@comicrelief/component-library 7.38.0 → 7.39.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 (35) hide show
  1. package/dist/components/Atoms/Button/Button.js +9 -5
  2. package/dist/components/Atoms/Button/Button.test.js +2 -2
  3. package/dist/components/Molecules/Chip/Chip.style.js +26 -22
  4. package/dist/components/Molecules/Chip/Chip.test.js +2 -2
  5. package/dist/components/Molecules/Promo/Promo.style.js +65 -20
  6. package/dist/components/Molecules/SearchInput/SearchInput.style.js +7 -3
  7. package/dist/components/Molecules/SingleMessage/SingleMessage.style.js +89 -59
  8. package/dist/components/Organisms/Donate/Donate.style.js +96 -42
  9. package/dist/components/Organisms/Donate/Form/PopUpComponent.js +11 -7
  10. package/dist/components/Organisms/Donate/GivingSelector/GivingSelector.style.js +17 -13
  11. package/dist/components/Organisms/Donate/MoneyBuy/MoneyBuy.js +17 -13
  12. package/dist/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +8 -6
  13. package/dist/components/Organisms/Header/Header.style.js +2 -2
  14. package/dist/components/Organisms/MarketingPreferencesDS/MarketingPreferencesDS.style.js +35 -26
  15. package/dist/components/Organisms/Membership/Membership.style.js +43 -24
  16. package/dist/index.js +7 -0
  17. package/dist/theme/shared/allContainers.js +12 -0
  18. package/package.json +1 -1
  19. package/src/components/Atoms/Button/Button.js +1 -2
  20. package/src/components/Atoms/Button/Button.test.js +12 -10
  21. package/src/components/Molecules/Chip/Chip.style.js +1 -2
  22. package/src/components/Molecules/Chip/Chip.test.js +12 -10
  23. package/src/components/Molecules/Promo/Promo.style.js +10 -10
  24. package/src/components/Molecules/SearchInput/SearchInput.style.js +1 -2
  25. package/src/components/Molecules/SingleMessage/SingleMessage.style.js +7 -7
  26. package/src/components/Organisms/Donate/Donate.style.js +11 -12
  27. package/src/components/Organisms/Donate/Form/PopUpComponent.js +1 -2
  28. package/src/components/Organisms/Donate/GivingSelector/GivingSelector.style.js +1 -2
  29. package/src/components/Organisms/Donate/MoneyBuy/MoneyBuy.js +1 -2
  30. package/src/components/Organisms/EmailSignUp/__snapshots__/EmailSignUp.test.js.snap +8 -6
  31. package/src/components/Organisms/Header/Header.style.js +1 -1
  32. package/src/components/Organisms/MarketingPreferencesDS/MarketingPreferencesDS.style.js +2 -3
  33. package/src/components/Organisms/Membership/Membership.style.js +4 -5
  34. package/src/index.js +1 -0
  35. package/src/theme/shared/allContainers.js +7 -0
@@ -9,11 +9,10 @@ var _react = _interopRequireDefault(require("react"));
9
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
10
10
  var _styledComponents = _interopRequireDefault(require("styled-components"));
11
11
  var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
12
- var _breakpoint = _interopRequireDefault(require("../../../theme/shared/breakpoint"));
13
12
  const StyledButton = _styledComponents.default.button.withConfig({
14
13
  displayName: "Button__StyledButton",
15
14
  componentId: "sc-1gm5vj0-0"
16
- })(["display:inline-flex;position:relative;padding:0.5rem 1.25rem;text-decoration:none;font-weight:700;font-size:", ";border-radius:2rem;transition:all 0.3s;height:3.125rem;width:100%;justify-content:center;align-items:center;border:none;cursor:pointer;> a{text-decoration:none;}", ";@media ", "{width:auto;}", "{width:auto;padding:", " ", ";margin:0 auto ", ";}"], _ref => {
15
+ })(["display:inline-flex;position:relative;padding:0.5rem 1.25rem;text-decoration:none;font-weight:700;font-size:", ";border-radius:2rem;transition:all 0.3s;height:3.125rem;width:100%;justify-content:center;align-items:center;border:none;cursor:pointer;> a{text-decoration:none;}", ";@media ", "{width:auto;}@media ", "{width:auto;padding:", " ", ";margin:0 auto ", ";}"], _ref => {
17
16
  let {
18
17
  theme
19
18
  } = _ref;
@@ -29,13 +28,18 @@ const StyledButton = _styledComponents.default.button.withConfig({
29
28
  theme
30
29
  } = _ref3;
31
30
  return theme.allBreakpoints('M');
32
- }, (0, _breakpoint.default)('medium'), (0, _spacing.default)('md'), (0, _spacing.default)('l'), (0, _spacing.default)('l'));
33
- const Button = /*#__PURE__*/_react.default.forwardRef((_ref4, ref) => {
31
+ }, _ref4 => {
32
+ let {
33
+ theme
34
+ } = _ref4;
35
+ return theme.allBreakpoints('L');
36
+ }, (0, _spacing.default)('md'), (0, _spacing.default)('l'), (0, _spacing.default)('l'));
37
+ const Button = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
34
38
  let {
35
39
  children,
36
40
  wrapper,
37
41
  ...rest
38
- } = _ref4;
42
+ } = _ref5;
39
43
  return /*#__PURE__*/_react.default.createElement(StyledButton, Object.assign({}, rest, {
40
44
  as: wrapper ? 'span' : 'button',
41
45
  ref: ref
@@ -5,9 +5,9 @@ var _react = _interopRequireDefault(require("react"));
5
5
  require("jest-styled-components");
6
6
  var _shallowWithTheme = _interopRequireDefault(require("../../../hoc/shallowWithTheme"));
7
7
  var _Button = _interopRequireDefault(require("./Button"));
8
- it('renders a standard styled link correctly', () => {
8
+ it("renders a standard styled link correctly", () => {
9
9
  const tree = (0, _shallowWithTheme.default)( /*#__PURE__*/_react.default.createElement(_Button.default, {
10
10
  type: "submit"
11
11
  }, "A standard link")).toJSON();
12
- expect(tree).toMatchInlineSnapshot("\n .c0 {\n display: -webkit-inline-box;\n display: -webkit-inline-flex;\n display: -ms-inline-flexbox;\n display: inline-flex;\n position: relative;\n padding: 0.5rem 1.25rem;\n -webkit-text-decoration: none;\n text-decoration: none;\n font-weight: 700;\n font-size: 1rem;\n border-radius: 2rem;\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n height: 3.125rem;\n width: 100%;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n border: none;\n cursor: pointer;\n background-color: #E52630;\n color: #FFFFFF;\n }\n\n .c0 > a {\n -webkit-text-decoration: none;\n text-decoration: none;\n }\n\n .c0:hover {\n background-color: #890B11;\n color: #FFFFFF;\n }\n\n .c0 (min-width:1024px) {\n width: auto;\n padding: 1rem 2rem;\n margin: 0 auto 2rem;\n }\n\n @media (min-width:740px) {\n .c0 {\n width: auto;\n }\n }\n\n <button\n className=\"c0\"\n type=\"submit\"\n >\n A standard link\n </button>\n ");
12
+ expect(tree).toMatchInlineSnapshot("\n .c0 {\n display: -webkit-inline-box;\n display: -webkit-inline-flex;\n display: -ms-inline-flexbox;\n display: inline-flex;\n position: relative;\n padding: 0.5rem 1.25rem;\n -webkit-text-decoration: none;\n text-decoration: none;\n font-weight: 700;\n font-size: 1rem;\n border-radius: 2rem;\n -webkit-transition: all 0.3s;\n transition: all 0.3s;\n height: 3.125rem;\n width: 100%;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n border: none;\n cursor: pointer;\n background-color: #E52630;\n color: #FFFFFF;\n }\n\n .c0 > a {\n -webkit-text-decoration: none;\n text-decoration: none;\n }\n\n .c0:hover {\n background-color: #890B11;\n color: #FFFFFF;\n }\n\n @media (min-width:740px) {\n .c0 {\n width: auto;\n }\n }\n\n @media (min-width:1024px) {\n .c0 {\n width: auto;\n padding: 1rem 2rem;\n margin: 0 auto 2rem;\n }\n }\n\n <button\n className=\"c0\"\n type=\"submit\"\n >\n A standard link\n </button>\n ");
13
13
  });
@@ -8,7 +8,6 @@ exports.Overlay = exports.LabelGroup = exports.ClearButton = exports.CheckLabel
8
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
  var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
10
10
  var _zIndex = _interopRequireDefault(require("../../../theme/shared/zIndex"));
11
- var _breakpoint = _interopRequireDefault(require("../../../theme/shared/breakpoint"));
12
11
  var _CR_RedShed = _interopRequireDefault(require("./assets/CR_RedShed.svg"));
13
12
  var _CR_Funding = _interopRequireDefault(require("./assets/CR_Funding.svg"));
14
13
  var _CR_MentalHealth = _interopRequireDefault(require("./assets/CR_MentalHealth.svg"));
@@ -50,67 +49,72 @@ const LabelGroup = exports.LabelGroup = _styledComponents.default.div.withConfig
50
49
  const CheckLabel = exports.CheckLabel = _styledComponents.default.label.withConfig({
51
50
  displayName: "Chipstyle__CheckLabel",
52
51
  componentId: "sc-6s9oo3-1"
53
- })(["display:flex;align-items:center;width:auto;height:48px;border-radius:2rem;background-color:#d5d5d5;margin:", " ", " 0 0;padding:4px;padding-right:1rem;flex:0 0 auto;position:relative;", "{margin:", " ", " 0 0;}"], (0, _spacing.default)('sm'), (0, _spacing.default)('sm'), (0, _breakpoint.default)('small'), (0, _spacing.default)('md'), (0, _spacing.default)('md'));
52
+ })(["display:flex;align-items:center;width:auto;height:48px;border-radius:2rem;background-color:#d5d5d5;margin:", " ", " 0 0;padding:4px;padding-right:1rem;flex:0 0 auto;position:relative;@media ", "{margin:", " ", " 0 0;}"], (0, _spacing.default)('sm'), (0, _spacing.default)('sm'), _ref => {
53
+ let {
54
+ theme
55
+ } = _ref;
56
+ return theme.allBreakpoints('M');
57
+ }, (0, _spacing.default)('md'), (0, _spacing.default)('md'));
54
58
  const Overlay = exports.Overlay = _styledComponents.default.span.withConfig({
55
59
  displayName: "Chipstyle__Overlay",
56
60
  componentId: "sc-6s9oo3-2"
57
- })(["display:block;position:absolute;width:100%;height:100%;opacity:0.2;border-radius:2rem;left:0;top:0;right:0;bottom:0;", ";:hover{background:", ";}"], (0, _zIndex.default)('low'), _ref => {
61
+ })(["display:block;position:absolute;width:100%;height:100%;opacity:0.2;border-radius:2rem;left:0;top:0;right:0;bottom:0;", ";:hover{background:", ";}"], (0, _zIndex.default)('low'), _ref2 => {
58
62
  let {
59
63
  theme
60
- } = _ref;
64
+ } = _ref2;
61
65
  return theme.color('grey_medium');
62
66
  });
63
67
  const CheckInput = exports.CheckInput = _styledComponents.default.input.withConfig({
64
68
  displayName: "Chipstyle__CheckInput",
65
69
  componentId: "sc-6s9oo3-3"
66
- })(["font-size:", ";display:block;box-sizing:border-box;opacity:0;position:absolute;left:0px;width:40px;height:40px;margin:0;border:1px solid ", ";+ span{background:url(", ") no-repeat center;background-size:24px;margin-right:", ";width:40px;height:40px;border-radius:50%;background-color:", ";float:left;", ";}:checked ~ span{background-size:24px;background-color:", ";}:focus + span{border-color:", ";border-width:3px;}:focus + span{border-color:", ";border-width:3px;}"], _ref2 => {
70
+ })(["font-size:", ";display:block;box-sizing:border-box;opacity:0;position:absolute;left:0px;width:40px;height:40px;margin:0;border:1px solid ", ";+ span{background:url(", ") no-repeat center;background-size:24px;margin-right:", ";width:40px;height:40px;border-radius:50%;background-color:", ";float:left;", ";}:checked ~ span{background-size:24px;background-color:", ";}:focus + span{border-color:", ";border-width:3px;}:focus + span{border-color:", ";border-width:3px;}"], _ref3 => {
67
71
  let {
68
72
  theme
69
- } = _ref2;
73
+ } = _ref3;
70
74
  return theme.fontSize('sm');
71
- }, _ref3 => {
75
+ }, _ref4 => {
72
76
  let {
73
77
  theme
74
- } = _ref3;
78
+ } = _ref4;
75
79
  return theme.color('grey_for_forms');
76
- }, _ref4 => {
80
+ }, _ref5 => {
77
81
  let {
78
82
  value
79
- } = _ref4;
83
+ } = _ref5;
80
84
  return selectIcon(value);
81
- }, (0, _spacing.default)('md'), _ref5 => {
85
+ }, (0, _spacing.default)('md'), _ref6 => {
82
86
  let {
83
87
  theme
84
- } = _ref5;
88
+ } = _ref6;
85
89
  return theme.color('grey');
86
- }, (0, _zIndex.default)('medium'), _ref6 => {
90
+ }, (0, _zIndex.default)('medium'), _ref7 => {
87
91
  let {
88
92
  theme,
89
93
  color
90
- } = _ref6;
94
+ } = _ref7;
91
95
  return theme.color(color);
92
- }, _ref7 => {
96
+ }, _ref8 => {
93
97
  let {
94
98
  theme
95
- } = _ref7;
99
+ } = _ref8;
96
100
  return theme.color('grey_for_forms');
97
- }, _ref8 => {
101
+ }, _ref9 => {
98
102
  let {
99
103
  theme
100
- } = _ref8;
104
+ } = _ref9;
101
105
  return theme.color('grey_for_forms');
102
106
  });
103
107
  const ClearButton = exports.ClearButton = _styledComponents.default.button.withConfig({
104
108
  displayName: "Chipstyle__ClearButton",
105
109
  componentId: "sc-6s9oo3-4"
106
- })(["border-radius:2rem;background:none;padding:", " ", ";margin:", " 0 0 0;border:1px solid ", ";outline:none;padding-left:3rem;position:relative;height:48px;:focus{border-color:", ";}:before{content:'';background:url(", ") no-repeat center;width:20px;height:20px;display:block;position:absolute;left:1rem;}"], (0, _spacing.default)('sm'), (0, _spacing.default)('md'), (0, _spacing.default)('md'), _ref9 => {
110
+ })(["border-radius:2rem;background:none;padding:", " ", ";margin:", " 0 0 0;border:1px solid ", ";outline:none;padding-left:3rem;position:relative;height:48px;:focus{border-color:", ";}:before{content:'';background:url(", ") no-repeat center;width:20px;height:20px;display:block;position:absolute;left:1rem;}"], (0, _spacing.default)('sm'), (0, _spacing.default)('md'), (0, _spacing.default)('md'), _ref10 => {
107
111
  let {
108
112
  theme
109
- } = _ref9;
113
+ } = _ref10;
110
114
  return theme.color('grey_medium');
111
- }, _ref10 => {
115
+ }, _ref11 => {
112
116
  let {
113
117
  theme
114
- } = _ref10;
118
+ } = _ref11;
115
119
  return theme.color('grey_for_forms');
116
120
  }, _clear.default);
@@ -5,11 +5,11 @@ var _react = _interopRequireDefault(require("react"));
5
5
  require("jest-styled-components");
6
6
  var _shallowWithTheme = _interopRequireDefault(require("../../../hoc/shallowWithTheme"));
7
7
  var _Chip = _interopRequireDefault(require("./Chip"));
8
- it('renders article teaser correctly', () => {
8
+ it("renders article teaser correctly", () => {
9
9
  const handleToggle = e => e.target.value;
10
10
  const tree = (0, _shallowWithTheme.default)( /*#__PURE__*/_react.default.createElement(_Chip.default, {
11
11
  category: "Gender Justice",
12
12
  handleToggle: handleToggle
13
13
  })).toJSON();
14
- expect(tree).toMatchInlineSnapshot("\n .c0 {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n width: auto;\n height: 48px;\n border-radius: 2rem;\n background-color: #d5d5d5;\n margin: 0.5rem 0.5rem 0 0;\n padding: 4px;\n padding-right: 1rem;\n -webkit-flex: 0 0 auto;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n position: relative;\n }\n\n .c0 (min-width:740px) {\n margin: 1rem 1rem 0 0;\n }\n\n .c2 {\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n opacity: 0.2;\n border-radius: 2rem;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n z-index: 1;\n }\n\n .c2:hover {\n background: #E1E2E3;\n }\n\n .c1 {\n display: block;\n box-sizing: border-box;\n opacity: 0;\n position: absolute;\n left: 0px;\n width: 40px;\n height: 40px;\n margin: 0;\n border: 1px solid #666;\n }\n\n .c1 + span {\n background: url(mock.asset) no-repeat center;\n background-size: 24px;\n margin-right: 1rem;\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background-color: #969598;\n float: left;\n z-index: 2;\n }\n\n .c1:checked ~ span {\n background-size: 24px;\n background-color: #6F3AAB;\n }\n\n .c1:focus + span {\n border-color: #666;\n border-width: 3px;\n }\n\n .c1:focus + span {\n border-color: #666;\n border-width: 3px;\n }\n\n <label\n className=\"c0\"\n >\n <input\n checked={false}\n className=\"c1\"\n color=\"purple\"\n onChange={[Function]}\n type=\"checkbox\"\n value=\"Gender Justice\"\n />\n <span />\n <span\n className=\"c2\"\n />\n Gender Justice\n </label>\n ");
14
+ expect(tree).toMatchInlineSnapshot("\n .c0 {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-align-items: center;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n width: auto;\n height: 48px;\n border-radius: 2rem;\n background-color: #d5d5d5;\n margin: 0.5rem 0.5rem 0 0;\n padding: 4px;\n padding-right: 1rem;\n -webkit-flex: 0 0 auto;\n -ms-flex: 0 0 auto;\n flex: 0 0 auto;\n position: relative;\n }\n\n .c2 {\n display: block;\n position: absolute;\n width: 100%;\n height: 100%;\n opacity: 0.2;\n border-radius: 2rem;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n z-index: 1;\n }\n\n .c2:hover {\n background: #E1E2E3;\n }\n\n .c1 {\n display: block;\n box-sizing: border-box;\n opacity: 0;\n position: absolute;\n left: 0px;\n width: 40px;\n height: 40px;\n margin: 0;\n border: 1px solid #666;\n }\n\n .c1 + span {\n background: url(mock.asset) no-repeat center;\n background-size: 24px;\n margin-right: 1rem;\n width: 40px;\n height: 40px;\n border-radius: 50%;\n background-color: #969598;\n float: left;\n z-index: 2;\n }\n\n .c1:checked ~ span {\n background-size: 24px;\n background-color: #6F3AAB;\n }\n\n .c1:focus + span {\n border-color: #666;\n border-width: 3px;\n }\n\n .c1:focus + span {\n border-color: #666;\n border-width: 3px;\n }\n\n @media (min-width:740px) {\n .c0 {\n margin: 1rem 1rem 0 0;\n }\n }\n\n <label\n className=\"c0\"\n >\n <input\n checked={false}\n className=\"c1\"\n color=\"purple\"\n onChange={[Function]}\n type=\"checkbox\"\n value=\"Gender Justice\"\n />\n <span />\n <span\n className=\"c2\"\n />\n Gender Justice\n </label>\n ");
15
15
  });
@@ -7,56 +7,96 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.Wrapper = exports.Video = exports.Media = exports.Gradient = exports.Copy = exports.Container = void 0;
9
9
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
10
- var _size = require("../../../theme/shared/size");
10
+ var _allContainers = _interopRequireDefault(require("../../../theme/shared/allContainers"));
11
11
  var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
12
12
  var _zIndex = _interopRequireDefault(require("../../../theme/shared/zIndex"));
13
13
  const Container = exports.Container = _styledComponents.default.div.withConfig({
14
14
  displayName: "Promostyle__Container",
15
15
  componentId: "sc-kk4nna-0"
16
- })(["width:100%;display:flex;position:relative;flex-direction:column;overflow:hidden;background:", ";", "{flex-direction:row;}", " ", " ", ""], _ref => {
16
+ })(["width:100%;display:flex;position:relative;flex-direction:column;overflow:hidden;background:", ";@media ", "{flex-direction:row;}", " ", " ", ""], _ref => {
17
17
  let {
18
18
  theme,
19
19
  backgroundColor
20
20
  } = _ref;
21
21
  return theme.color(backgroundColor);
22
- }, (0, _size.media)('medium'), _ref2 => {
22
+ }, _ref2 => {
23
23
  let {
24
- position
24
+ theme
25
25
  } = _ref2;
26
- return position === 'upper' && (0, _styledComponents.css)(["clip-path:polygon(0 0,100% 0,100% 90%,0 100%);", "{clip-path:polygon(0 0,100% 0,100% 85%,0 100%);}"], (0, _size.media)('medium'));
26
+ return theme.allBreakpoints('L');
27
27
  }, _ref3 => {
28
28
  let {
29
29
  position
30
30
  } = _ref3;
31
- return position === 'lower' && (0, _styledComponents.css)(["clip-path:polygon(0 10%,100% 0,100% 100%,0 100%);", "{clip-path:polygon(0 15%,100% 0,100% 100%,0 100%);}"], (0, _size.media)('medium'));
32
- }, _ref4 => {
31
+ return position === 'upper' && (0, _styledComponents.css)(["clip-path:polygon(0 0,100% 0,100% 90%,0 100%);@media ", "{clip-path:polygon(0 0,100% 0,100% 85%,0 100%);}"], _ref4 => {
32
+ let {
33
+ theme
34
+ } = _ref4;
35
+ return theme.allBreakpoints('L');
36
+ });
37
+ }, _ref5 => {
38
+ let {
39
+ position
40
+ } = _ref5;
41
+ return position === 'lower' && (0, _styledComponents.css)(["clip-path:polygon(0 10%,100% 0,100% 100%,0 100%);@media ", "{clip-path:polygon(0 15%,100% 0,100% 100%,0 100%);}"], _ref6 => {
42
+ let {
43
+ theme
44
+ } = _ref6;
45
+ return theme.allBreakpoints('L');
46
+ });
47
+ }, _ref7 => {
33
48
  let {
34
49
  position
35
- } = _ref4;
36
- return position === 'end' && (0, _styledComponents.css)(["clip-path:polygon(0 0,100% 0,100% 90%,0 101%);border-radius:0 0 0 2rem;", "{clip-path:polygon(0 0,100% 0,100% 85%,0% 101%);border-radius:0 0 0 4rem;}"], (0, _size.media)('medium'));
50
+ } = _ref7;
51
+ return position === 'end' && (0, _styledComponents.css)(["clip-path:polygon(0 0,100% 0,100% 90%,0 101%);border-radius:0 0 0 2rem;@media ", "{clip-path:polygon(0 0,100% 0,100% 85%,0% 101%);border-radius:0 0 0 4rem;}"], _ref8 => {
52
+ let {
53
+ theme
54
+ } = _ref8;
55
+ return theme.allBreakpoints('L');
56
+ });
37
57
  });
38
58
  const Wrapper = exports.Wrapper = _styledComponents.default.div.withConfig({
39
59
  displayName: "Promostyle__Wrapper",
40
60
  componentId: "sc-kk4nna-1"
41
- })(["width:100%;max-width:", ";height:100%;left:0;right:0;margin:0 auto;display:flex;align-items:center;position:relative;", ";", "{min-height:calc(100vh - 90px);}"], _size.container.medium, _ref5 => {
61
+ })(["width:100%;max-width:", ";height:100%;left:0;right:0;margin:0 auto;display:flex;align-items:center;position:relative;", ";@media ", "{min-height:calc(100vh - 90px);}"], _allContainers.default.medium, _ref9 => {
42
62
  let {
43
63
  copyLeft
44
- } = _ref5;
64
+ } = _ref9;
45
65
  return !copyLeft && 'justify-content: flex-end';
46
- }, (0, _size.media)('medium'));
66
+ }, _ref10 => {
67
+ let {
68
+ theme
69
+ } = _ref10;
70
+ return theme.allBreakpoints('L');
71
+ });
47
72
  const Copy = exports.Copy = _styledComponents.default.div.withConfig({
48
73
  displayName: "Promostyle__Copy",
49
74
  componentId: "sc-kk4nna-2"
50
- })(["width:100%;padding:", " ", " ", ";", ";", "{width:100%;padding:", " ", ";}", ""], (0, _spacing.default)('m'), (0, _spacing.default)('m'), (0, _spacing.default)('xl'), (0, _zIndex.default)('low'), (0, _size.media)('medium'), (0, _spacing.default)('xxl'), (0, _spacing.default)('m'), _ref6 => {
75
+ })(["width:100%;padding:", " ", " ", ";", ";@media ", "{width:100%;padding:", " ", ";}", ""], (0, _spacing.default)('m'), (0, _spacing.default)('m'), (0, _spacing.default)('xl'), (0, _zIndex.default)('low'), _ref11 => {
76
+ let {
77
+ theme
78
+ } = _ref11;
79
+ return theme.allBreakpoints('L');
80
+ }, (0, _spacing.default)('xxl'), (0, _spacing.default)('m'), _ref12 => {
51
81
  let {
52
82
  position
53
- } = _ref6;
54
- return position === 'lower' && (0, _styledComponents.css)(["padding:", " ", ";", "{padding:6rem ", ";margin-top:6rem;}"], (0, _spacing.default)('xl'), (0, _spacing.default)('m'), (0, _size.media)('medium'), (0, _spacing.default)('m'));
83
+ } = _ref12;
84
+ return position === 'lower' && (0, _styledComponents.css)(["padding:", " ", ";@media ", "{padding:6rem ", ";margin-top:6rem;}"], (0, _spacing.default)('xl'), (0, _spacing.default)('m'), _ref13 => {
85
+ let {
86
+ theme
87
+ } = _ref13;
88
+ return theme.allBreakpoints('L');
89
+ }, (0, _spacing.default)('m'));
55
90
  });
56
91
  const Media = exports.Media = _styledComponents.default.div.withConfig({
57
92
  displayName: "Promostyle__Media",
58
93
  componentId: "sc-kk4nna-3"
59
- })(["width:100%;height:auto;img{object-position:center;}", "{height:100%;position:absolute;}"], (0, _size.media)('medium'));
94
+ })(["width:100%;height:auto;img{object-position:center;}@media ", "{height:100%;position:absolute;}"], _ref14 => {
95
+ let {
96
+ theme
97
+ } = _ref14;
98
+ return theme.allBreakpoints('L');
99
+ });
60
100
  const Video = exports.Video = _styledComponents.default.video.attrs(() => ({
61
101
  playsInline: true
62
102
  })).withConfig({
@@ -66,15 +106,20 @@ const Video = exports.Video = _styledComponents.default.video.attrs(() => ({
66
106
  const Gradient = exports.Gradient = _styledComponents.default.div.withConfig({
67
107
  displayName: "Promostyle__Gradient",
68
108
  componentId: "sc-kk4nna-5"
69
- })(["width:100%;height:100%;display:flex;align-items:center;", "{width:50%;position:absolute;top:0;left:0;", ";", ";}"], (0, _size.media)('medium'), _ref7 => {
109
+ })(["width:100%;height:100%;display:flex;align-items:center;@media ", "{width:50%;position:absolute;top:0;left:0;", ";", ";}"], _ref15 => {
110
+ let {
111
+ theme
112
+ } = _ref15;
113
+ return theme.allBreakpoints('L');
114
+ }, _ref16 => {
70
115
  let {
71
116
  copyLeft
72
- } = _ref7;
117
+ } = _ref16;
73
118
  return !copyLeft && (0, _styledComponents.css)(["left:auto;right:0;"]);
74
- }, _ref8 => {
119
+ }, _ref17 => {
75
120
  let {
76
121
  hasVideo,
77
122
  behindTextGradient
78
- } = _ref8;
123
+ } = _ref17;
79
124
  return hasVideo !== false && behindTextGradient !== 'none' && (0, _styledComponents.css)(["overflow:hidden;background-color:", ";box-shadow:0px 0px 50px 60px ", ";"], behindTextGradient === 'black' ? 'rgba(0,0,0,0.5)' : 'rgba(255, 255, 255, 0.5)', behindTextGradient === 'black' ? 'rgba(0,0,0,0.5)' : 'rgba(255, 255, 255, 0.5)');
80
125
  });
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.Wrapper = exports.SearchWrapper = exports.SearchField = exports.SearchBox = exports.InnerWrapper = void 0;
8
8
  var _styledComponents = _interopRequireDefault(require("styled-components"));
9
9
  var _Input = _interopRequireDefault(require("../../Atoms/Input/Input"));
10
- var _size = require("../../../theme/shared/size");
11
10
  var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
12
11
  const Wrapper = exports.Wrapper = _styledComponents.default.div.withConfig({
13
12
  displayName: "SearchInputstyle__Wrapper",
@@ -33,7 +32,7 @@ const SearchWrapper = exports.SearchWrapper = _styledComponents.default.div.with
33
32
  const SearchField = exports.SearchField = (0, _styledComponents.default)(_Input.default).withConfig({
34
33
  displayName: "SearchInputstyle__SearchField",
35
34
  componentId: "sc-1y1iity-4"
36
- })(["input{padding:13px 0;margin:0;font-size:", ";max-width:100%;border:0;outline:", ";background:none;:focus{border:0;}", "{height:100px;font-size:", ";}}"], _ref2 => {
35
+ })(["input{padding:13px 0;margin:0;font-size:", ";max-width:100%;border:0;outline:", ";background:none;:focus{border:0;}@media ", "{height:100px;font-size:", ";}}"], _ref2 => {
37
36
  let {
38
37
  theme
39
38
  } = _ref2;
@@ -43,9 +42,14 @@ const SearchField = exports.SearchField = (0, _styledComponents.default)(_Input.
43
42
  theme
44
43
  } = _ref3;
45
44
  return theme.color('red');
46
- }, (0, _size.media)('small'), _ref4 => {
45
+ }, _ref4 => {
47
46
  let {
48
47
  theme
49
48
  } = _ref4;
49
+ return theme.allBreakpoints('M');
50
+ }, _ref5 => {
51
+ let {
52
+ theme
53
+ } = _ref5;
50
54
  return theme.fontSize('xxl');
51
55
  });
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.VideoWrapper = exports.PlayButton = exports.Media = exports.Image = exports.Copy = exports.Container = void 0;
9
9
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
10
10
  var _spacing = _interopRequireDefault(require("../../../theme/shared/spacing"));
11
- var _size = require("../../../theme/shared/size");
11
+ var _allContainers = _interopRequireDefault(require("../../../theme/shared/allContainers"));
12
12
  var _zIndex = _interopRequireDefault(require("../../../theme/shared/zIndex"));
13
13
  var _videoPlayIcon = _interopRequireDefault(require("./assets/video--play-icon.svg"));
14
14
  var _videoPlayIcon__hover = _interopRequireDefault(require("./assets/video--play-icon__hover.svg"));
@@ -17,178 +17,208 @@ var _utils = _interopRequireDefault(require("../../../utils/_utils"));
17
17
  const Container = exports.Container = _styledComponents.default.div.withConfig({
18
18
  displayName: "SingleMessagestyle__Container",
19
19
  componentId: "sc-86zg20-0"
20
- })(["display:flex;position:relative;flex-direction:column;overflow:hidden;background:", ";", "{flex-direction:", ";", ";}iframe{height:100%;width:100%;position:absolute;top:0;", ";", ";}"], _ref => {
20
+ })(["display:flex;position:relative;flex-direction:column;overflow:hidden;background:", ";@media ", "{flex-direction:", ";", ";}iframe{height:100%;width:100%;position:absolute;top:0;", ";", ";}"], _ref => {
21
21
  let {
22
22
  theme,
23
23
  backgroundColor
24
24
  } = _ref;
25
25
  return theme.color(backgroundColor);
26
- }, (0, _size.media)('small'), _ref2 => {
26
+ }, _ref2 => {
27
27
  let {
28
- copyFirst
28
+ theme
29
29
  } = _ref2;
30
- return copyFirst === true ? 'row-reverse' : 'row';
30
+ return theme.allBreakpoints('M');
31
31
  }, _ref3 => {
32
+ let {
33
+ copyFirst
34
+ } = _ref3;
35
+ return copyFirst === true ? 'row-reverse' : 'row';
36
+ }, _ref4 => {
32
37
  let {
33
38
  landscapeVideo,
34
39
  hasVideo,
35
40
  fullImage
36
- } = _ref3;
41
+ } = _ref4;
37
42
  return landscapeVideo && hasVideo && !fullImage ? 'min-height: 0;' : null;
38
- }, _ref4 => {
43
+ }, _ref5 => {
39
44
  let {
40
45
  copyFirst
41
- } = _ref4;
46
+ } = _ref5;
42
47
  return copyFirst === true ? 'left: auto; right: 0;' : 'left: 0; right: auto;';
43
- }, _ref5 => {
48
+ }, _ref6 => {
44
49
  let {
45
50
  isPlaying
46
- } = _ref5;
51
+ } = _ref6;
47
52
  return isPlaying ? (0, _zIndex.default)('high') : (0, _zIndex.default)('base');
48
53
  });
49
54
  const Copy = exports.Copy = _styledComponents.default.div.withConfig({
50
55
  displayName: "SingleMessagestyle__Copy",
51
56
  componentId: "sc-86zg20-1"
52
- })(["width:100%;", ";", ";padding:", ";", "{", ";", ";flex-direction:column;justify-content:center;padding:", ";}", ";", ";", "{", ";}"], (0, _zIndex.default)('low'), _ref6 => {
57
+ })(["width:100%;", ";", ";padding:", ";@media ", "{", ";", ";flex-direction:column;justify-content:center;padding:", ";}", ";", ";@media ", "{", ";}"], (0, _zIndex.default)('low'), _ref7 => {
53
58
  let {
54
59
  hasVideo,
55
60
  fullImage
56
- } = _ref6;
61
+ } = _ref7;
57
62
  return hasVideo === true && fullImage === true ? 'display: none;' : null;
58
- }, (0, _spacing.default)('l'), (0, _size.media)('small'), _ref7 => {
63
+ }, (0, _spacing.default)('l'), _ref8 => {
64
+ let {
65
+ theme
66
+ } = _ref8;
67
+ return theme.allBreakpoints('M');
68
+ }, _ref9 => {
59
69
  let {
60
70
  vhFull,
61
71
  fullImage
62
- } = _ref7;
72
+ } = _ref9;
63
73
  return vhFull || fullImage ? 'min-height: calc(100vh - 5.625rem); flex-direction: column; justify-content: center;' : 'height: auto;';
64
- }, _ref8 => {
74
+ }, _ref10 => {
65
75
  let {
66
76
  hasVideo,
67
77
  fullImage
68
- } = _ref8;
78
+ } = _ref10;
69
79
  return hasVideo === true && fullImage === true ? 'display: none;' : 'display: flex;';
70
- }, (0, _spacing.default)('xl'), props => props.fullImage && (0, _styledComponents.css)(["", "{position:absolute;width:100%;right:0;top:50%;transform:translateY(-50%);", " width:50%;}"], (0, _size.media)('small'), props.copyFirst ? (0, _styledComponents.css)(["left:0;"]) : null), props => props.hasImage ? (0, _styledComponents.css)(["@media ", "{width:50%;}"], _ref9 => {
80
+ }, (0, _spacing.default)('xl'), props => props.fullImage && (0, _styledComponents.css)(["@media ", "{position:absolute;width:100%;right:0;top:50%;transform:translateY(-50%);", " width:50%;}"], _ref11 => {
71
81
  let {
72
82
  theme
73
- } = _ref9;
83
+ } = _ref11;
74
84
  return theme.allBreakpoints('M');
75
- }) : (0, _styledComponents.css)(["@media ", "{width:100%;max-width ", ";padding:", ";}margin:auto;padding:", ";"], _ref10 => {
85
+ }, props.copyFirst ? (0, _styledComponents.css)(["left:0;"]) : null), props => props.hasImage ? (0, _styledComponents.css)(["@media ", "{width:50%;}"], _ref12 => {
76
86
  let {
77
87
  theme
78
- } = _ref10;
88
+ } = _ref12;
89
+ return theme.allBreakpoints('M');
90
+ }) : (0, _styledComponents.css)(["@media ", "{width:100%;max-width ", ";padding:", ";}margin:auto;padding:", ";"], _ref13 => {
91
+ let {
92
+ theme
93
+ } = _ref13;
79
94
  return theme.allBreakpoints('M');
80
- }, _size.container.small, (0, _spacing.default)('xl'), (0, _spacing.default)('md')), (0, _size.media)('medium'), _ref11 => {
95
+ }, _allContainers.default.small, (0, _spacing.default)('xl'), (0, _spacing.default)('md')), _ref14 => {
96
+ let {
97
+ theme
98
+ } = _ref14;
99
+ return theme.allBreakpoints('L');
100
+ }, _ref15 => {
81
101
  let {
82
102
  paddingOption
83
- } = _ref11;
103
+ } = _ref15;
84
104
  return (0, _utils.default)(paddingOption);
85
105
  });
86
106
  const Media = exports.Media = _styledComponents.default.div.withConfig({
87
107
  displayName: "SingleMessagestyle__Media",
88
108
  componentId: "sc-86zg20-2"
89
- })(["width:100%;", ";@media ", "{height:auto;width:", ";", ";", ";}position:relative;", ";", ";", "{padding-bottom:", ";}"], _ref12 => {
109
+ })(["width:100%;", ";@media ", "{height:auto;width:", ";", ";", ";}position:relative;", ";", ";@media ", "{padding-bottom:", ";}"], _ref16 => {
90
110
  let {
91
111
  fullImage
92
- } = _ref12;
112
+ } = _ref16;
93
113
  return fullImage ? 'height: 200px;' : 'height: 280px;';
94
- }, _ref13 => {
114
+ }, _ref17 => {
95
115
  let {
96
116
  theme
97
- } = _ref13;
117
+ } = _ref17;
98
118
  return theme.allBreakpoints('M');
99
- }, _ref14 => {
119
+ }, _ref18 => {
100
120
  let {
101
121
  fullImage
102
- } = _ref14;
122
+ } = _ref18;
103
123
  return fullImage ? '100%' : '50%';
104
- }, _ref15 => {
124
+ }, _ref19 => {
105
125
  let {
106
126
  fullImage
107
- } = _ref15;
127
+ } = _ref19;
108
128
  return fullImage ? 'min-height: 500px;' : null;
109
- }, _ref16 => {
129
+ }, _ref20 => {
110
130
  let {
111
131
  vhFull,
112
132
  fullImage
113
- } = _ref16;
133
+ } = _ref20;
114
134
  return vhFull && fullImage ? 'min-height: calc(100vh - 5.625rem);' : null;
115
- }, _ref17 => {
135
+ }, _ref21 => {
116
136
  let {
117
137
  doubleImage
118
- } = _ref17;
138
+ } = _ref21;
119
139
  return doubleImage && 'display: flex; flex-direction: column';
120
- }, _ref18 => {
140
+ }, _ref22 => {
121
141
  let {
122
142
  hasVideo
123
- } = _ref18;
143
+ } = _ref22;
124
144
  return hasVideo ? 'height: auto; overflow: hidden; padding-bottom: 56.25%;' : null;
125
- }, (0, _size.media)('small'), _ref19 => {
145
+ }, _ref23 => {
146
+ let {
147
+ theme
148
+ } = _ref23;
149
+ return theme.allBreakpoints('M');
150
+ }, _ref24 => {
126
151
  let {
127
152
  landscapeVideo,
128
153
  hasVideo
129
- } = _ref19;
154
+ } = _ref24;
130
155
  return landscapeVideo && hasVideo ? 'calc(56.25% / 2);' : '0;';
131
156
  });
132
157
  const PlayButton = exports.PlayButton = _styledComponents.default.button.withConfig({
133
158
  displayName: "SingleMessagestyle__PlayButton",
134
159
  componentId: "sc-86zg20-3"
135
- })(["", ";cursor:pointer;width:100%;height:100%;position:absolute;top:0;border:0;margin:0;padding:0;text-indent:-9999px;background:rgba(0,0,0,0) center no-repeat;background-size:70px;background-image:", ";", ";display:", ";&:focus,&:hover{background-image:", ";}", "{background-size:100px;}"], (0, _zIndex.default)('medium'), _ref20 => {
160
+ })(["", ";cursor:pointer;width:100%;height:100%;position:absolute;top:0;border:0;margin:0;padding:0;text-indent:-9999px;background:rgba(0,0,0,0) center no-repeat;background-size:70px;background-image:", ";", ";display:", ";&:focus,&:hover{background-image:", ";}@media ", "{background-size:100px;}"], (0, _zIndex.default)('medium'), _ref25 => {
136
161
  let {
137
162
  isBuffering
138
- } = _ref20;
163
+ } = _ref25;
139
164
  return isBuffering === true ? "url(".concat(_loader.default, ")") : "url(".concat(_videoPlayIcon.default, ")");
140
- }, _ref21 => {
165
+ }, _ref26 => {
141
166
  let {
142
167
  copyFirst
143
- } = _ref21;
168
+ } = _ref26;
144
169
  return copyFirst === true ? 'left: auto; right: 0;' : 'left: 0; right: auto;';
145
- }, _ref22 => {
170
+ }, _ref27 => {
146
171
  let {
147
172
  isPlaying
148
- } = _ref22;
173
+ } = _ref27;
149
174
  return isPlaying ? 'none' : 'block';
150
- }, _ref23 => {
175
+ }, _ref28 => {
151
176
  let {
152
177
  isBuffering
153
- } = _ref23;
178
+ } = _ref28;
154
179
  return isBuffering === true ? "url(".concat(_loader.default, ")") : "url(".concat(_videoPlayIcon__hover.default, ")");
155
- }, (0, _size.media)('small'));
180
+ }, _ref29 => {
181
+ let {
182
+ theme
183
+ } = _ref29;
184
+ return theme.allBreakpoints('M');
185
+ });
156
186
  const Image = exports.Image = _styledComponents.default.div.withConfig({
157
187
  displayName: "SingleMessagestyle__Image",
158
188
  componentId: "sc-86zg20-4"
159
- })(["@media ", "{img{position:", ";}}width:100%;height:100%;", ";", ";", ";"], _ref24 => {
189
+ })(["@media ", "{img{position:", ";}}width:100%;height:100%;", ";", ";", ";"], _ref30 => {
160
190
  let {
161
191
  theme
162
- } = _ref24;
192
+ } = _ref30;
163
193
  return theme.allBreakpoints('M');
164
- }, _ref25 => {
194
+ }, _ref31 => {
165
195
  let {
166
196
  fullImage,
167
197
  vhFull
168
- } = _ref25;
198
+ } = _ref31;
169
199
  return fullImage || vhFull ? 'absolute' : null;
170
- }, _ref26 => {
200
+ }, _ref32 => {
171
201
  let {
172
202
  doubleImage
173
- } = _ref26;
203
+ } = _ref32;
174
204
  return doubleImage && 'height: 50%';
175
- }, _ref27 => {
205
+ }, _ref33 => {
176
206
  let {
177
207
  isPlaying
178
- } = _ref27;
208
+ } = _ref33;
179
209
  return isPlaying ? (0, _zIndex.default)('base') : (0, _zIndex.default)('low');
180
- }, _ref28 => {
210
+ }, _ref34 => {
181
211
  let {
182
212
  hasVideo
183
- } = _ref28;
213
+ } = _ref34;
184
214
  return hasVideo ? 'position: absolute; top: 0; left: 0;' : null;
185
215
  });
186
216
  const VideoWrapper = exports.VideoWrapper = _styledComponents.default.div.withConfig({
187
217
  displayName: "SingleMessagestyle__VideoWrapper",
188
218
  componentId: "sc-86zg20-5"
189
- })(["width:100%;height:100%;position:absolute;top:0;left:0;", ";"], _ref29 => {
219
+ })(["width:100%;height:100%;position:absolute;top:0;left:0;", ";"], _ref35 => {
190
220
  let {
191
221
  isPlaying
192
- } = _ref29;
222
+ } = _ref35;
193
223
  return isPlaying ? (0, _zIndex.default)('medium') : (0, _zIndex.default)('base');
194
224
  });