@comicrelief/component-library 7.36.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 (95) hide show
  1. package/dist/components/Atoms/Button/Button.js +1 -1
  2. package/dist/components/Atoms/Icons/Arrow.js +25 -4
  3. package/dist/components/Atoms/Icons/AtSign.js +32 -6
  4. package/dist/components/Atoms/Icons/Chevron.js +25 -3
  5. package/dist/components/Atoms/Icons/Download.js +31 -4
  6. package/dist/components/Atoms/Icons/External.js +31 -4
  7. package/dist/components/Atoms/Icons/Favourite.js +31 -4
  8. package/dist/components/Atoms/Icons/Internal.js +31 -4
  9. package/dist/components/Atoms/Input/Input.js +1 -1
  10. package/dist/components/Atoms/Link/Link.md +22 -21
  11. package/dist/components/Atoms/Link/Link.style.js +3 -3
  12. package/dist/components/Atoms/Link/Link.test.js +1 -1
  13. package/dist/components/Atoms/Logo/Logo.js +1 -1
  14. package/dist/components/Atoms/Select/Select.js +1 -1
  15. package/dist/components/Atoms/SocialIcons/SocialIcons.js +2 -2
  16. package/dist/components/Atoms/Text/Text.js +2 -2
  17. package/dist/components/Molecules/Accordion/Accordion.js +3 -3
  18. package/dist/components/Molecules/Accordion/__snapshots__/Accordion.test.js.snap +7 -0
  19. package/dist/components/Molecules/ArticleTeaser/ArticleTeaser.js +6 -6
  20. package/dist/components/Molecules/Banner/Banner.js +2 -2
  21. package/dist/components/Molecules/Box/Box.js +4 -4
  22. package/dist/components/Molecules/CardDs/CardDs.style.js +9 -9
  23. package/dist/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +11 -0
  24. package/dist/components/Molecules/DoubleCopy/DoubleCopy.style.js +1 -1
  25. package/dist/components/Molecules/InfoBanner/InfoBanner.js +2 -2
  26. package/dist/components/Molecules/PartnerLink/PartnerLink.style.js +1 -1
  27. package/dist/components/Molecules/Promo/_PromoVideoButton.style.js +1 -1
  28. package/dist/components/Molecules/SearchResult/SearchResult.js +3 -3
  29. package/dist/components/Molecules/SingleMessage/SingleMessage.style.js +4 -4
  30. package/dist/components/Molecules/SingleMessageDS/SingleMessageDs.md +3 -3
  31. package/dist/components/Molecules/SingleMessageDS/SingleMessageDs.style.js +6 -6
  32. package/dist/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +11 -0
  33. package/dist/components/Organisms/CookieBanner/CookieBanner.style.js +2 -2
  34. package/dist/components/Organisms/EmailSignUp/EmailSignUp.style.js +2 -2
  35. package/dist/components/Organisms/Footer/Footer.style.js +4 -4
  36. package/dist/components/Organisms/Footer/Nav/Nav.style.js +8 -8
  37. package/dist/components/Organisms/Header/Burger/BurgerMenu.style.js +1 -1
  38. package/dist/components/Organisms/Header/Header.style.js +3 -3
  39. package/dist/components/Organisms/Header/Nav/Nav.style.js +6 -6
  40. package/dist/components/Organisms/ImpactSlider/ImpactMoneybuys.style.js +6 -6
  41. package/dist/components/Organisms/ImpactSlider/ImpactSlider.style.js +7 -7
  42. package/dist/components/Organisms/MarketingPreferencesDS/MarketingPreferencesDS.style.js +4 -4
  43. package/dist/components/Organisms/Membership/Membership.style.js +2 -2
  44. package/dist/components/Organisms/WYMDCarousel/WYMDCarousel.style.js +10 -10
  45. package/dist/theme/crTheme/buttonColors.js +1 -1
  46. package/dist/theme/crTheme/theme.js +2 -0
  47. package/dist/theme/shared/allBreakpoints.js +20 -0
  48. package/package.json +1 -1
  49. package/src/components/Atoms/Button/Button.js +1 -1
  50. package/src/components/Atoms/Icons/Arrow.js +13 -2
  51. package/src/components/Atoms/Icons/AtSign.js +20 -7
  52. package/src/components/Atoms/Icons/Chevron.js +13 -1
  53. package/src/components/Atoms/Icons/Download.js +18 -4
  54. package/src/components/Atoms/Icons/External.js +18 -4
  55. package/src/components/Atoms/Icons/Favourite.js +18 -4
  56. package/src/components/Atoms/Icons/Internal.js +18 -4
  57. package/src/components/Atoms/Input/Input.js +1 -1
  58. package/src/components/Atoms/Link/Link.md +22 -21
  59. package/src/components/Atoms/Link/Link.style.js +3 -3
  60. package/src/components/Atoms/Link/Link.test.js +11 -0
  61. package/src/components/Atoms/Logo/Logo.js +1 -1
  62. package/src/components/Atoms/Select/Select.js +1 -1
  63. package/src/components/Atoms/SocialIcons/SocialIcons.js +2 -2
  64. package/src/components/Atoms/Text/Text.js +3 -3
  65. package/src/components/Molecules/Accordion/Accordion.js +6 -6
  66. package/src/components/Molecules/Accordion/__snapshots__/Accordion.test.js.snap +7 -0
  67. package/src/components/Molecules/ArticleTeaser/ArticleTeaser.js +6 -6
  68. package/src/components/Molecules/Banner/Banner.js +2 -2
  69. package/src/components/Molecules/Box/Box.js +4 -4
  70. package/src/components/Molecules/CardDs/CardDs.style.js +9 -9
  71. package/src/components/Molecules/CardDs/__snapshots__/CardDs.test.js.snap +11 -0
  72. package/src/components/Molecules/DoubleCopy/DoubleCopy.style.js +1 -1
  73. package/src/components/Molecules/InfoBanner/InfoBanner.js +2 -2
  74. package/src/components/Molecules/PartnerLink/PartnerLink.style.js +1 -1
  75. package/src/components/Molecules/Promo/_PromoVideoButton.style.js +1 -1
  76. package/src/components/Molecules/SearchResult/SearchResult.js +3 -3
  77. package/src/components/Molecules/SingleMessage/SingleMessage.style.js +6 -6
  78. package/src/components/Molecules/SingleMessageDS/SingleMessageDs.md +3 -3
  79. package/src/components/Molecules/SingleMessageDS/SingleMessageDs.style.js +6 -6
  80. package/src/components/Molecules/SingleMessageDS/__snapshots__/SingleMessageDs.test.js.snap +11 -0
  81. package/src/components/Organisms/CookieBanner/CookieBanner.style.js +2 -2
  82. package/src/components/Organisms/EmailSignUp/EmailSignUp.style.js +3 -3
  83. package/src/components/Organisms/Footer/Footer.style.js +4 -4
  84. package/src/components/Organisms/Footer/Nav/Nav.style.js +8 -8
  85. package/src/components/Organisms/Header/Burger/BurgerMenu.style.js +1 -1
  86. package/src/components/Organisms/Header/Header.style.js +3 -3
  87. package/src/components/Organisms/Header/Nav/Nav.style.js +6 -6
  88. package/src/components/Organisms/ImpactSlider/ImpactMoneybuys.style.js +7 -7
  89. package/src/components/Organisms/ImpactSlider/ImpactSlider.style.js +8 -8
  90. package/src/components/Organisms/MarketingPreferencesDS/MarketingPreferencesDS.style.js +4 -4
  91. package/src/components/Organisms/Membership/Membership.style.js +2 -2
  92. package/src/components/Organisms/WYMDCarousel/WYMDCarousel.style.js +21 -21
  93. package/src/theme/crTheme/buttonColors.js +1 -1
  94. package/src/theme/crTheme/theme.js +2 -0
  95. package/src/theme/shared/allBreakpoints.js +14 -0
@@ -28,7 +28,7 @@ const StyledButton = _styledComponents.default.button.withConfig({
28
28
  let {
29
29
  theme
30
30
  } = _ref3;
31
- return theme.breakpoint('small');
31
+ return theme.allBreakpoints('M');
32
32
  }, (0, _breakpoint.default)('medium'), (0, _spacing.default)('md'), (0, _spacing.default)('l'), (0, _spacing.default)('l'));
33
33
  const Button = /*#__PURE__*/_react.default.forwardRef((_ref4, ref) => {
34
34
  let {
@@ -17,25 +17,45 @@ const angle = {
17
17
  const Icon = _styledComponents.default.svg.withConfig({
18
18
  displayName: "Arrow__Icon",
19
19
  componentId: "sc-1iegggu-0"
20
- })(["transform:", ";"], _ref => {
20
+ })(["transform:", ";fill:", ";@media ", "{fill:", ";}"], _ref => {
21
21
  let {
22
22
  direction
23
23
  } = _ref;
24
24
  return "rotate(".concat(angle[direction], ")");
25
+ }, _ref2 => {
26
+ let {
27
+ mobileColour,
28
+ colour,
29
+ theme
30
+ } = _ref2;
31
+ return mobileColour ? theme.color(mobileColour) : theme.color(colour);
32
+ }, _ref3 => {
33
+ let {
34
+ theme
35
+ } = _ref3;
36
+ return theme.allBreakpoints('L');
37
+ }, _ref4 => {
38
+ let {
39
+ colour,
40
+ theme
41
+ } = _ref4;
42
+ return colour ? theme.color(colour) : theme.color('white');
25
43
  });
26
- const Arrow = _ref2 => {
44
+ const Arrow = _ref5 => {
27
45
  let {
28
46
  colour,
47
+ mobileColour,
29
48
  theme,
30
49
  size,
31
50
  direction,
32
51
  ...rest
33
- } = _ref2;
52
+ } = _ref5;
34
53
  return /*#__PURE__*/_react.default.createElement(Icon, Object.assign({
35
54
  direction: direction,
36
55
  width: size,
37
56
  height: size,
38
- fill: theme.color(colour),
57
+ colour: colour,
58
+ mobileColour: mobileColour,
39
59
  xmlns: "http://www.w3.org/2000/svg",
40
60
  viewBox: "0 0 96 96"
41
61
  }, rest), /*#__PURE__*/_react.default.createElement("path", {
@@ -46,6 +66,7 @@ const Arrow = _ref2 => {
46
66
  };
47
67
  Arrow.defaultProps = {
48
68
  colour: 'white',
69
+ mobileColour: null,
49
70
  size: 24,
50
71
  direction: 'up'
51
72
  };
@@ -1,24 +1,49 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
8
9
  var _react = _interopRequireDefault(require("react"));
9
- var _styledComponents = require("styled-components");
10
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
10
11
  const PATH_DATA = 'M40.811,9.307C36.607,4.664,30.48,2,24,2C11.458,2,2,11.458,2,24s9.458,22,22,22c10.221,0,14.032-3.779,15.29-5.031 c0.197-0.115,0.379-0.265,0.533-0.451c0.707-0.849,0.592-2.11-0.257-2.817c-0.438-0.362-1.61-1.049-3.093,0.427 C35.512,39.086,32.585,42,24,42C13.738,42,6,34.262,6,24S13.738,6,24,6c5.353,0,10.398,2.184,13.845,5.991 c3.162,3.495,4.642,8.044,4.165,12.81c-0.364,3.641-1.958,6.013-4.487,6.677c-1.853,0.487-3.658-0.145-4.269-1.011 c-1.001-1.422-0.753-4.747,0.009-8.237c1.035-3.375,2.104-6.939,2.177-7.179c0.308-1.027-0.249-2.114-1.263-2.465 c-1.012-0.349-2.122,0.161-2.515,1.159c-0.097,0.247-0.191,0.491-0.282,0.732c-1.427-1.455-3.424-2.421-5.724-2.66 c-3.983-0.41-9.547,1.602-12.107,8.643c-1.334,3.667-1.19,7.467,0.384,10.163c1.241,2.126,3.291,3.482,5.929,3.921 c4.299,0.714,7.438-0.837,9.464-3.098c0.254,0.695,0.516,1.122,0.659,1.325c1.66,2.358,5.257,3.443,8.555,2.576 c1.987-0.522,6.691-2.557,7.451-10.147C46.581,19.295,44.741,13.651,40.811,9.307z M37.871,41.195 c-0.149-0.03-0.3-0.081-0.448-0.152C37.567,41.112,37.718,41.163,37.871,41.195z M29.195,21.849 c-0.554,1.799-1.07,3.451-1.379,4.375c-0.413,1.243-2.174,5.229-7.297,4.374c-1.468-0.245-2.493-0.896-3.133-1.993 c-0.967-1.657-0.997-4.254-0.078-6.779c1.633-4.492,4.727-6.064,7.296-6.064c0.217,0,0.431,0.011,0.639,0.033 c1.952,0.203,4.068,1.433,4.396,3.726c0.01,0.074,0.024,0.146,0.043,0.217C29.49,20.479,29.329,21.181,29.195,21.849z';
11
- const AtSign = _ref => {
12
+ const StyledSVG = _styledComponents.default.svg.withConfig({
13
+ displayName: "AtSign__StyledSVG",
14
+ componentId: "sc-1328gc9-0"
15
+ })(["fill:", ";@media ", "{fill:", ";}"], _ref => {
16
+ let {
17
+ mobileColour,
18
+ colour,
19
+ theme
20
+ } = _ref;
21
+ return mobileColour ? theme.color(mobileColour) : theme.color(colour);
22
+ }, _ref2 => {
23
+ let {
24
+ theme
25
+ } = _ref2;
26
+ return theme.allBreakpoints('L');
27
+ }, _ref3 => {
28
+ let {
29
+ colour,
30
+ theme
31
+ } = _ref3;
32
+ return colour ? theme.color(colour) : theme.color('white');
33
+ });
34
+ const AtSign = _ref4 => {
12
35
  let {
13
36
  theme,
14
37
  size,
15
38
  colour,
39
+ mobileColour,
16
40
  ...rest
17
- } = _ref;
18
- return /*#__PURE__*/_react.default.createElement("svg", Object.assign({
41
+ } = _ref4;
42
+ return /*#__PURE__*/_react.default.createElement(StyledSVG, Object.assign({
19
43
  width: size,
20
44
  height: size,
21
- fill: theme.color(colour),
45
+ colour: colour,
46
+ mobileColour: mobileColour,
22
47
  viewBox: "0 0 48 48"
23
48
  }, rest), /*#__PURE__*/_react.default.createElement("path", {
24
49
  d: PATH_DATA
@@ -26,6 +51,7 @@ const AtSign = _ref => {
26
51
  };
27
52
  AtSign.defaultProps = {
28
53
  size: 24,
29
- colour: 'white'
54
+ colour: 'white',
55
+ mobileColour: null
30
56
  };
31
57
  var _default = exports.default = (0, _styledComponents.withTheme)(AtSign);
@@ -17,25 +17,46 @@ const angle = {
17
17
  const Icon = _styledComponents.default.svg.withConfig({
18
18
  displayName: "Chevron__Icon",
19
19
  componentId: "sc-1p4fsgl-0"
20
- })(["transform:", ";"], _ref => {
20
+ })(["transform:", ";fill:", ";@media ", "{fill:", ";}"], _ref => {
21
21
  let {
22
22
  direction
23
23
  } = _ref;
24
24
  return "rotate(".concat(angle[direction], ")");
25
+ }, _ref2 => {
26
+ let {
27
+ mobileColour,
28
+ colour,
29
+ theme
30
+ } = _ref2;
31
+ return mobileColour ? theme.color(mobileColour) : theme.color(colour);
32
+ }, _ref3 => {
33
+ let {
34
+ theme
35
+ } = _ref3;
36
+ return theme.allBreakpoints('L');
37
+ }, _ref4 => {
38
+ let {
39
+ colour,
40
+ theme
41
+ } = _ref4;
42
+ return colour ? theme.color(colour) : theme.color('white');
25
43
  });
26
- const Chevron = _ref2 => {
44
+ const Chevron = _ref5 => {
27
45
  let {
28
46
  colour,
47
+ mobileColour,
29
48
  theme,
30
49
  size,
31
50
  direction,
32
51
  ...rest
33
- } = _ref2;
52
+ } = _ref5;
34
53
  return /*#__PURE__*/_react.default.createElement(Icon, Object.assign({
35
54
  direction: direction,
36
55
  width: size,
37
56
  height: size,
38
57
  fill: theme.color(colour),
58
+ colour: colour,
59
+ mobileColour: mobileColour,
39
60
  xmlns: "http://www.w3.org/2000/svg",
40
61
  viewBox: "0 0 48 48"
41
62
  }, rest), /*#__PURE__*/_react.default.createElement("path", {
@@ -44,6 +65,7 @@ const Chevron = _ref2 => {
44
65
  };
45
66
  Chevron.defaultProps = {
46
67
  colour: 'white',
68
+ mobileColour: null,
47
69
  size: 24,
48
70
  direction: 'up'
49
71
  };
@@ -1,23 +1,49 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
8
9
  var _react = _interopRequireDefault(require("react"));
9
- var _styledComponents = require("styled-components");
10
- const Download = _ref => {
10
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
+ const StyledSVG = _styledComponents.default.svg.withConfig({
12
+ displayName: "Download__StyledSVG",
13
+ componentId: "sc-eoa7se-0"
14
+ })(["fill:", ";@media ", "{fill:", ";}"], _ref => {
11
15
  let {
16
+ mobileColour,
12
17
  colour,
18
+ theme
19
+ } = _ref;
20
+ return mobileColour ? theme.color(mobileColour) : theme.color(colour);
21
+ }, _ref2 => {
22
+ let {
23
+ theme
24
+ } = _ref2;
25
+ return theme.allBreakpoints('L');
26
+ }, _ref3 => {
27
+ let {
28
+ colour,
29
+ theme
30
+ } = _ref3;
31
+ return colour ? theme.color(colour) : theme.color('white');
32
+ });
33
+ const Download = _ref4 => {
34
+ let {
35
+ colour,
36
+ mobileColour,
13
37
  theme,
14
38
  size,
15
39
  ...rest
16
- } = _ref;
17
- return /*#__PURE__*/_react.default.createElement("svg", Object.assign({}, rest, {
40
+ } = _ref4;
41
+ return /*#__PURE__*/_react.default.createElement(StyledSVG, Object.assign({}, rest, {
18
42
  width: size,
19
43
  height: size,
20
44
  fill: theme.color(colour),
45
+ colour: colour,
46
+ mobileColour: mobileColour,
21
47
  xmlns: "http://www.w3.org/2000/svg",
22
48
  viewBox: "0 0 96 96"
23
49
  }), /*#__PURE__*/_react.default.createElement("path", {
@@ -26,6 +52,7 @@ const Download = _ref => {
26
52
  };
27
53
  Download.defaultProps = {
28
54
  colour: 'white',
55
+ mobileColour: null,
29
56
  size: 24
30
57
  };
31
58
  var _default = exports.default = (0, _styledComponents.withTheme)(Download);
@@ -1,23 +1,49 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
8
9
  var _react = _interopRequireDefault(require("react"));
9
- var _styledComponents = require("styled-components");
10
- const External = _ref => {
10
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
+ const StyledSVG = _styledComponents.default.svg.withConfig({
12
+ displayName: "External__StyledSVG",
13
+ componentId: "sc-oha23y-0"
14
+ })(["fill:", ";@media ", "{fill:", ";}"], _ref => {
11
15
  let {
16
+ mobileColour,
12
17
  colour,
18
+ theme
19
+ } = _ref;
20
+ return mobileColour ? theme.color(mobileColour) : theme.color(colour);
21
+ }, _ref2 => {
22
+ let {
23
+ theme
24
+ } = _ref2;
25
+ return theme.allBreakpoints('L');
26
+ }, _ref3 => {
27
+ let {
28
+ colour,
29
+ theme
30
+ } = _ref3;
31
+ return colour ? theme.color(colour) : theme.color('white');
32
+ });
33
+ const External = _ref4 => {
34
+ let {
35
+ colour,
36
+ mobileColour,
13
37
  theme,
14
38
  size,
15
39
  ...rest
16
- } = _ref;
17
- return /*#__PURE__*/_react.default.createElement("svg", Object.assign({}, rest, {
40
+ } = _ref4;
41
+ return /*#__PURE__*/_react.default.createElement(StyledSVG, Object.assign({}, rest, {
18
42
  width: size,
19
43
  height: size,
20
44
  fill: theme.color(colour),
45
+ colour: colour,
46
+ mobileColour: mobileColour,
21
47
  xmlns: "http://www.w3.org/2000/svg",
22
48
  viewBox: "0 0 96 96"
23
49
  }), /*#__PURE__*/_react.default.createElement("path", {
@@ -26,6 +52,7 @@ const External = _ref => {
26
52
  };
27
53
  External.defaultProps = {
28
54
  colour: 'white',
55
+ mobileColour: null,
29
56
  size: 24
30
57
  };
31
58
  var _default = exports.default = (0, _styledComponents.withTheme)(External);
@@ -1,23 +1,49 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
8
9
  var _react = _interopRequireDefault(require("react"));
9
- var _styledComponents = require("styled-components");
10
- const Favourite = _ref => {
10
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
+ const StyledSVG = _styledComponents.default.svg.withConfig({
12
+ displayName: "Favourite__StyledSVG",
13
+ componentId: "sc-16rqg62-0"
14
+ })(["fill:", ";@media ", "{fill:", ";}"], _ref => {
11
15
  let {
16
+ mobileColour,
12
17
  colour,
18
+ theme
19
+ } = _ref;
20
+ return mobileColour ? theme.color(mobileColour) : theme.color(colour);
21
+ }, _ref2 => {
22
+ let {
23
+ theme
24
+ } = _ref2;
25
+ return theme.allBreakpoints('L');
26
+ }, _ref3 => {
27
+ let {
28
+ colour,
29
+ theme
30
+ } = _ref3;
31
+ return colour ? theme.color(colour) : theme.color('white');
32
+ });
33
+ const Favourite = _ref4 => {
34
+ let {
35
+ colour,
36
+ mobileColour,
13
37
  theme,
14
38
  size,
15
39
  ...rest
16
- } = _ref;
17
- return /*#__PURE__*/_react.default.createElement("svg", Object.assign({}, rest, {
40
+ } = _ref4;
41
+ return /*#__PURE__*/_react.default.createElement(StyledSVG, Object.assign({}, rest, {
18
42
  width: size,
19
43
  height: size,
20
44
  fill: theme.color(colour),
45
+ colour: colour,
46
+ mobileColour: mobileColour,
21
47
  xmlns: "http://www.w3.org/2000/svg",
22
48
  viewBox: "0 0 96 96"
23
49
  }), /*#__PURE__*/_react.default.createElement("path", {
@@ -26,6 +52,7 @@ const Favourite = _ref => {
26
52
  };
27
53
  Favourite.defaultProps = {
28
54
  colour: 'white',
55
+ mobileColour: null,
29
56
  size: 24
30
57
  };
31
58
  var _default = exports.default = (0, _styledComponents.withTheme)(Favourite);
@@ -1,23 +1,49 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
8
9
  var _react = _interopRequireDefault(require("react"));
9
- var _styledComponents = require("styled-components");
10
- const Internal = _ref => {
10
+ var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
+ const StyledSVG = _styledComponents.default.svg.withConfig({
12
+ displayName: "Internal__StyledSVG",
13
+ componentId: "sc-166yk4t-0"
14
+ })(["fill:", ";@media ", "{fill:", ";}"], _ref => {
11
15
  let {
16
+ mobileColour,
12
17
  colour,
18
+ theme
19
+ } = _ref;
20
+ return mobileColour ? theme.color(mobileColour) : theme.color(colour);
21
+ }, _ref2 => {
22
+ let {
23
+ theme
24
+ } = _ref2;
25
+ return theme.allBreakpoints('L');
26
+ }, _ref3 => {
27
+ let {
28
+ colour,
29
+ theme
30
+ } = _ref3;
31
+ return colour ? theme.color(colour) : theme.color('white');
32
+ });
33
+ const Internal = _ref4 => {
34
+ let {
35
+ colour,
36
+ mobileColour,
13
37
  theme,
14
38
  size,
15
39
  ...rest
16
- } = _ref;
17
- return /*#__PURE__*/_react.default.createElement("svg", Object.assign({}, rest, {
40
+ } = _ref4;
41
+ return /*#__PURE__*/_react.default.createElement(StyledSVG, Object.assign({}, rest, {
18
42
  width: size,
19
43
  height: size,
20
44
  fill: theme.color(colour),
45
+ colour: colour,
46
+ mobileColour: mobileColour,
21
47
  xmlns: "http://www.w3.org/2000/svg",
22
48
  viewBox: "0 0 96 96"
23
49
  }), /*#__PURE__*/_react.default.createElement("path", {
@@ -26,6 +52,7 @@ const Internal = _ref => {
26
52
  };
27
53
  Internal.defaultProps = {
28
54
  colour: 'white',
55
+ mobileColour: null,
29
56
  size: 24
30
57
  };
31
58
  var _default = exports.default = (0, _styledComponents.withTheme)(Internal);
@@ -25,7 +25,7 @@ const InputField = _styledComponents.default.input.withConfig({
25
25
  error,
26
26
  prefixLength
27
27
  } = _ref;
28
- return (0, _styledComponents.css)(["position:relative;box-sizing:border-box;width:100%;height:48px;padding:", " ", ";", " background-color:", ";border:1px solid;border-color:", ";box-shadow:none;appearance:none;color:", ";border-radius:", ";font-size:inherit;z-index:2;font-family:", ";:focus{border:1px solid ", ";}@media ", "{max-width:290px;}"], (0, _spacing.default)('md'), (0, _spacing.default)('m'), prefixLength > 0 ? "padding-left: ".concat(getPrefixWidth(prefixLength), ";") : '', theme.color('grey_light'), error ? theme.color('red') : theme.color('grey_medium'), theme.color('black'), (0, _spacing.default)('sm'), theme.fontFamilies(theme.font.regular), theme.color('grey_for_forms'), theme.breakpoint('small'));
28
+ return (0, _styledComponents.css)(["position:relative;box-sizing:border-box;width:100%;height:48px;padding:", " ", ";", " background-color:", ";border:1px solid;border-color:", ";box-shadow:none;appearance:none;color:", ";border-radius:", ";font-size:inherit;z-index:2;font-family:", ";:focus{border:1px solid ", ";}@media ", "{max-width:290px;}"], (0, _spacing.default)('md'), (0, _spacing.default)('m'), prefixLength > 0 ? "padding-left: ".concat(getPrefixWidth(prefixLength), ";") : '', theme.color('grey_light'), error ? theme.color('red') : theme.color('grey_medium'), theme.color('black'), (0, _spacing.default)('sm'), theme.fontFamilies(theme.font.regular), theme.color('grey_for_forms'), theme.allBreakpoints('M'));
29
29
  });
30
30
  const InputWrapper = _styledComponents.default.div.withConfig({
31
31
  displayName: "Input__InputWrapper",
@@ -44,21 +44,22 @@ import { External, Download, Favourite, Internal, Chevron, Arrow, AtSign } from
44
44
  href="#anchor"
45
45
  target="blank"
46
46
  type="button"
47
- icon={<Internal colour="white" />}
47
+ icon={<Internal colour="white" mobileColour="red"/>}
48
48
  >
49
- Internal link, 'blue' on tablet and mobile
49
+ Internal link, 'blue' with red icon on tablet and mobile
50
50
  </Link>
51
51
  </div>
52
52
 
53
53
  <div style={{ display: 'block', marginBottom: '10px' }}>
54
54
  <Link
55
- color="red"
55
+ color="blue"
56
+ mobileColour="black"
56
57
  href="#anchor"
57
58
  target="blank"
58
59
  type="button"
59
- icon={<External colour="white" />}
60
+ icon={<External colour="white" mobileColour="blue" />}
60
61
  >
61
- External link
62
+ External link (black on mobile, blue on desktop)
62
63
  </Link>
63
64
  </div>
64
65
 
@@ -68,9 +69,9 @@ import { External, Download, Favourite, Internal, Chevron, Arrow, AtSign } from
68
69
  href="#anchor"
69
70
  target="blank"
70
71
  type="button"
71
- icon={<Download colour="white" />}
72
+ icon={<Download colour="white" mobileColour="blue" />}
72
73
  >
73
- Download link
74
+ Download link (blue mobile-tablet icon, white desktop icon)
74
75
  </Link>
75
76
  </div>
76
77
 
@@ -80,9 +81,9 @@ import { External, Download, Favourite, Internal, Chevron, Arrow, AtSign } from
80
81
  href="#anchor"
81
82
  target="blank"
82
83
  type="button"
83
- icon={<Favourite colour="white" />}
84
+ icon={<Favourite colour="white" mobileColour="blue" />}
84
85
  >
85
- Favourite link
86
+ Favourite link (blue mobile-tablet icon, white desktop icon)
86
87
  </Link>
87
88
  </div>
88
89
 
@@ -92,9 +93,9 @@ import { External, Download, Favourite, Internal, Chevron, Arrow, AtSign } from
92
93
  href="#anchor"
93
94
  target="blank"
94
95
  type="button"
95
- icon={<Chevron direction="up" colour="white" />}
96
+ icon={<Chevron direction="up" colour="white" mobileColour="blue" />}
96
97
  >
97
- Chevron Up
98
+ Chevron Up (blue mobile-tablet icon, white desktop icon)
98
99
  </Link>
99
100
  </div>
100
101
 
@@ -104,9 +105,9 @@ import { External, Download, Favourite, Internal, Chevron, Arrow, AtSign } from
104
105
  href="#anchor"
105
106
  target="blank"
106
107
  type="button"
107
- icon={<Chevron direction="down" colour="white" />}
108
+ icon={<Chevron direction="down" colour="white" mobileColour="blue" />}
108
109
  >
109
- Chevron Down
110
+ Chevron Down (blue mobile-tablet icon, white desktop icon)
110
111
  </Link>
111
112
  </div>
112
113
 
@@ -116,9 +117,9 @@ import { External, Download, Favourite, Internal, Chevron, Arrow, AtSign } from
116
117
  href="#anchor"
117
118
  target="blank"
118
119
  type="button"
119
- icon={<Chevron direction="left" colour="white" />}
120
+ icon={<Chevron direction="left" colour="white" mobileColour="blue" />}
120
121
  >
121
- Chevron Left
122
+ Chevron Left (blue mobile-tablet icon, white desktop icon)
122
123
  </Link>
123
124
  </div>
124
125
 
@@ -128,9 +129,9 @@ import { External, Download, Favourite, Internal, Chevron, Arrow, AtSign } from
128
129
  href="#anchor"
129
130
  target="blank"
130
131
  type="button"
131
- icon={<Chevron direction="right" colour="white" />}
132
+ icon={<Chevron direction="right" colour="white" mobileColour="blue" />}
132
133
  >
133
- Chevron Right
134
+ Chevron Right (blue mobile-tablet icon, white desktop icon)
134
135
  </Link>
135
136
  </div>
136
137
 
@@ -141,9 +142,9 @@ import { External, Download, Favourite, Internal, Chevron, Arrow, AtSign } from
141
142
  target="blank"
142
143
  type="button"
143
144
  iconFirst
144
- icon={<Arrow direction="left" colour="white" />}
145
+ icon={<Arrow direction="left" colour="white" mobileColour="blue" />}
145
146
  >
146
- Arrow Left
147
+ Arrow Left (blue mobile-tablet icon, white desktop icon)
147
148
  </Link>
148
149
  </div>
149
150
 
@@ -153,9 +154,9 @@ import { External, Download, Favourite, Internal, Chevron, Arrow, AtSign } from
153
154
  href="#anchor"
154
155
  target="blank"
155
156
  type="button"
156
- icon={<AtSign />}
157
+ icon={<AtSign colour="white" mobileColour="blue" />}
157
158
  >
158
- At Sign
159
+ At Sign (blue mobile-tablet icon, white desktop icon)
159
160
  </Link>
160
161
  </div>
161
162
  </div>;
@@ -30,12 +30,12 @@ const buttonStyle = () => (0, _styledComponents.css)(["display:inline-flex;posit
30
30
  let {
31
31
  theme
32
32
  } = _ref4;
33
- return theme.breakpoint('small');
33
+ return theme.allBreakpoints('M');
34
34
  }, _ref5 => {
35
35
  let {
36
36
  theme
37
37
  } = _ref5;
38
- return theme.breakpoint('medium');
38
+ return theme.allBreakpoints('L');
39
39
  }, _ref6 => {
40
40
  let {
41
41
  color,
@@ -68,7 +68,7 @@ const IconWrapper = exports.IconWrapper = _styledComponents.default.span.withCon
68
68
  let {
69
69
  theme
70
70
  } = _ref10;
71
- return theme.breakpoint('small');
71
+ return theme.allBreakpoints('M');
72
72
  }, _ref11 => {
73
73
  let {
74
74
  type
@@ -22,7 +22,7 @@ it("renders a button with an icon", () => {
22
22
  colour: "white"
23
23
  })
24
24
  }, "Internal link")).toJSON();
25
- expect(tree).toMatchInlineSnapshot("\n .c1 {\n display: -webkit-inline-box;\n display: -webkit-inline-flex;\n display: -ms-inline-flexbox;\n display: inline-flex;\n margin-left: 1rem;\n -webkit-align-self: center;\n -ms-flex-item-align: center;\n align-self: center;\n right: 1.5rem;\n position: absolute;\n right: -2rem;\n top: 0;\n bottom: 0;\n }\n\n .c0 {\n position: relative;\n -webkit-text-decoration: none;\n text-decoration: none;\n display: inline;\n line-height: 1.5rem;\n color: #000000;\n border-bottom: 2px solid #000000;\n font-weight: normal;\n }\n\n .c0:hover {\n color: #000000;\n border-bottom: 2px solid #000000;\n }\n\n @media (min-width:740px) {\n .c1 {\n width: auto;\n right: auto;\n position: relative;\n position: absolute;\n right: -2rem;\n top: 0;\n bottom: 0;\n }\n }\n\n <a\n className=\"c0\"\n color=\"red\"\n href=\"/test\"\n target=\"_self\"\n type=\"standard\"\n >\n Internal link\n <span\n className=\"c1\"\n type=\"standard\"\n >\n <svg\n fill=\"#FFFFFF\"\n height={24}\n viewBox=\"0 0 96 96\"\n width={24}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M90.871 50.776c-.016.016-.026.036-.043.052l-32 32C58.047 83.609 57.024 84 56 84s-2.047-.391-2.829-1.171a4 4 0 010-5.657L78.343 52H8a4 4 0 010-8h70.343L53.171 18.829a4 4 0 015.657-5.657l32 32c.016.016.027.036.043.052.167.172.321.357.455.557.069.104.118.216.176.325.065.121.138.236.191.364.057.137.09.279.13.42.032.109.074.214.097.327a4.017 4.017 0 010 1.568c-.023.113-.065.217-.097.327-.041.141-.074.283-.13.42-.053.128-.126.243-.191.364-.059.109-.107.221-.176.325a4.035 4.035 0 01-.455.555z\"\n />\n </svg>\n </span>\n </a>\n ");
25
+ expect(tree).toMatchInlineSnapshot("\n .c1 {\n display: -webkit-inline-box;\n display: -webkit-inline-flex;\n display: -ms-inline-flexbox;\n display: inline-flex;\n margin-left: 1rem;\n -webkit-align-self: center;\n -ms-flex-item-align: center;\n align-self: center;\n right: 1.5rem;\n position: absolute;\n right: -2rem;\n top: 0;\n bottom: 0;\n }\n\n .c0 {\n position: relative;\n -webkit-text-decoration: none;\n text-decoration: none;\n display: inline;\n line-height: 1.5rem;\n color: #000000;\n border-bottom: 2px solid #000000;\n font-weight: normal;\n }\n\n .c0:hover {\n color: #000000;\n border-bottom: 2px solid #000000;\n }\n\n .c2 {\n fill: #FFFFFF;\n }\n\n @media (min-width:740px) {\n .c1 {\n width: auto;\n right: auto;\n position: relative;\n position: absolute;\n right: -2rem;\n top: 0;\n bottom: 0;\n }\n }\n\n @media (min-width:1024px) {\n .c2 {\n fill: #FFFFFF;\n }\n }\n\n <a\n className=\"c0\"\n color=\"red\"\n href=\"/test\"\n target=\"_self\"\n type=\"standard\"\n >\n Internal link\n <span\n className=\"c1\"\n type=\"standard\"\n >\n <svg\n className=\"c2\"\n fill=\"#FFFFFF\"\n height={24}\n viewBox=\"0 0 96 96\"\n width={24}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M90.871 50.776c-.016.016-.026.036-.043.052l-32 32C58.047 83.609 57.024 84 56 84s-2.047-.391-2.829-1.171a4 4 0 010-5.657L78.343 52H8a4 4 0 010-8h70.343L53.171 18.829a4 4 0 015.657-5.657l32 32c.016.016.027.036.043.052.167.172.321.357.455.557.069.104.118.216.176.325.065.121.138.236.191.364.057.137.09.279.13.42.032.109.074.214.097.327a4.017 4.017 0 010 1.568c-.023.113-.065.217-.097.327-.041.141-.074.283-.13.42-.053.128-.126.243-.191.364-.059.109-.107.221-.176.325a4.035 4.035 0 01-.455.555z\"\n />\n </svg>\n </span>\n </a>\n ");
26
26
  });
27
27
  it("renders a standard styled link correctly with target blank and assistive text", () => {
28
28
  const tree = (0, _shallowWithTheme.default)( /*#__PURE__*/_react.default.createElement(_Link.default, {
@@ -29,7 +29,7 @@ const LogoWrapper = _styledComponents.default.div.withConfig({
29
29
  let {
30
30
  theme
31
31
  } = _ref;
32
- return theme.breakpoint('nav');
32
+ return theme.allBreakpoints('Nav');
33
33
  }, props => props.sizeMd);
34
34
  const themeSwitcher = theme => {
35
35
  switch (theme) {
@@ -52,7 +52,7 @@ const StyledSelect = _styledComponents.default.select.withConfig({
52
52
  let {
53
53
  theme
54
54
  } = _ref7;
55
- return theme.breakpoint('small');
55
+ return theme.allBreakpoints('M');
56
56
  });
57
57
  const Select = /*#__PURE__*/_react.default.forwardRef((_ref8, ref) => {
58
58
  let {
@@ -18,7 +18,7 @@ const StyledList = _styledComponents.default.ul.withConfig({
18
18
  let {
19
19
  theme
20
20
  } = _ref;
21
- return theme.breakpoint('small');
21
+ return theme.allBreakpoints('M');
22
22
  });
23
23
  const StyledItem = _styledComponents.default.li.withConfig({
24
24
  displayName: "SocialIcons__StyledItem",
@@ -27,7 +27,7 @@ const StyledItem = _styledComponents.default.li.withConfig({
27
27
  let {
28
28
  theme
29
29
  } = _ref2;
30
- return theme.breakpoint('small');
30
+ return theme.allBreakpoints('M');
31
31
  });
32
32
 
33
33
  /** Social media icons with customizable style linked to campaign social media accounts */