@comicrelief/component-library 8.13.2 → 8.13.4

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.
@@ -478,6 +478,7 @@ const [success, setSuccess] = React.useState(false);
478
478
 
479
479
  <>
480
480
  <Header2025
481
+ showBoxShadow="true"
481
482
  characterLimit={50}
482
483
  navItems={data}
483
484
  rotate="true"
@@ -589,6 +590,7 @@ const [success, setSuccess] = React.useState(false);
589
590
 
590
591
  <>
591
592
  <Header2025
593
+ showBoxShadow="true"
592
594
  characterLimit={50}
593
595
  navItems={data}
594
596
  rotate="true"
@@ -29,29 +29,24 @@ const Header2025Wrapper = exports.Header2025Wrapper = _styledComponents.default.
29
29
  let {
30
30
  showBoxShadow
31
31
  } = _ref3;
32
- return showBoxShadow && (0, _styledComponents.css)(["box-shadow:0 5px 15px 0 ", ";"], _ref4 => {
33
- let {
34
- theme
35
- } = _ref4;
36
- return theme.color('grey_4');
37
- });
32
+ return showBoxShadow && (0, _styledComponents.css)(["box-shadow:0px 13px 15px 0 rgba(0,0,0,0.15);"]);
38
33
  });
39
34
  const InnerWrapper = exports.InnerWrapper = _styledComponents.default.div.withConfig({
40
35
  displayName: "Header2025style__InnerWrapper",
41
36
  componentId: "sc-7gs40r-1"
42
- })(["display:flex;align-items:center;height:100%;padding:0 12px;cursor:pointer;max-width:", ";@media ", "{margin:0 auto;}"], _containers.default.large, _ref5 => {
37
+ })(["display:flex;align-items:center;height:100%;padding:0 12px;cursor:pointer;max-width:", ";@media ", "{margin:0 auto;}"], _containers.default.large, _ref4 => {
43
38
  let {
44
39
  theme
45
- } = _ref5;
40
+ } = _ref4;
46
41
  return theme.allBreakpoints('Nav');
47
42
  });
48
43
  const Brand = exports.Brand = _styledComponents.default.div.withConfig({
49
44
  displayName: "Header2025style__Brand",
50
45
  componentId: "sc-7gs40r-2"
51
- })(["", ";margin-right:auto;display:flex;align-items:center;a{border:0;color:transparent;margin-right:25px;img{width:100%;object-fit:contain;}:hover{border:0;}}@media ", "{margin-right:0}"], (0, _zIndex.default)('high'), _ref6 => {
46
+ })(["", ";margin-right:auto;display:flex;align-items:center;a{border:0;color:transparent;margin-right:25px;img{width:100%;object-fit:contain;}:hover{border:0;}}@media ", "{margin-right:0}"], (0, _zIndex.default)('high'), _ref5 => {
52
47
  let {
53
48
  theme
54
- } = _ref6;
49
+ } = _ref5;
55
50
  return theme.allBreakpoints('Nav');
56
51
  });
57
52
  const DonateButtonWrapperTop = exports.DonateButtonWrapperTop = _styledComponents.default.div.withConfig({
@@ -61,20 +56,20 @@ const DonateButtonWrapperTop = exports.DonateButtonWrapperTop = _styledComponent
61
56
  const Header2025MetaIcons = exports.Header2025MetaIcons = _styledComponents.default.div.withConfig({
62
57
  displayName: "Header2025style__Header2025MetaIcons",
63
58
  componentId: "sc-7gs40r-4"
64
- })(["display:none;@media ", "{width:auto;align-items:center;> div{height:35px;width:auto;display:inline-block;> a{height:inherit;width:inherit;margin-right:6px;img{padding:5px 7px;height:inherit;width:inherit;}}}position:relative;display:flex;align-items:center;background-color:", ";margin-right:0px;right:0px;}@media ", "{> div > a{margin-right:20px;}}"], _ref7 => {
59
+ })(["display:none;@media ", "{width:auto;align-items:center;> div{height:35px;width:auto;display:inline-block;> a{height:inherit;width:inherit;margin-right:6px;img{padding:5px 7px;height:inherit;width:inherit;}}}position:relative;display:flex;align-items:center;background-color:", ";margin-right:0px;right:0px;}@media ", "{> div > a{margin-right:20px;}}"], _ref6 => {
65
60
  let {
66
61
  theme
67
- } = _ref7;
62
+ } = _ref6;
68
63
  return theme.allBreakpoints('Nav');
69
- }, _ref8 => {
64
+ }, _ref7 => {
70
65
  let {
71
66
  theme
72
- } = _ref8;
67
+ } = _ref7;
73
68
  return theme.color('white');
74
- }, _ref9 => {
69
+ }, _ref8 => {
75
70
  let {
76
71
  theme
77
- } = _ref9;
72
+ } = _ref8;
78
73
  return theme.allBreakpoints('NavWide');
79
74
  });
80
75
  const ButtonsAndIcons = exports.ButtonsAndIcons = _styledComponents.default.div.withConfig({
@@ -92,7 +92,6 @@ const HeaderNav2025 = _ref => {
92
92
  // If we've changed from desktop to not, remove any previously-attached MoreNav event
93
93
  // listeners, BEFORE we update the flag that'd remove the elements from the DOM:
94
94
  if (isCurrentlyNotDesktop && processedItems.moreNavGroups.length) {
95
- // HERE CHERE
96
95
  document.getElementById('more-nav-ul').removeEventListener('mouseleave', resetMoreNavMouse);
97
96
  }
98
97
 
@@ -59,7 +59,7 @@ const NavLinkClass = (0, _styledComponents.default)(_Link.default).withConfig({
59
59
  const Nav = exports.Nav = _styledComponents.default.nav.withConfig({
60
60
  displayName: "HeaderNav2025style__Nav",
61
61
  componentId: "sc-xflhtq-1"
62
- })(["display:", ";width:100%;position:absolute;top:75px;left:0;", ";background-color:", ";box-shadow:0px 20px 20px 5px rgba(0,0,0,0.25);@media ", "{width:50%;right:0;left:inherit;box-shadow:-20px 15px 20px 0px rgba(0,0,0,0.25);}@media ", "{", ";position:relative;top:0;display:block;margin:0;width:auto;height:100%;box-shadow:none;}@media ", "{margin:0 10px;}> h2{", ";}"], _ref8 => {
62
+ })(["display:", ";width:100%;position:absolute;top:75px;left:0;", ";background-color:", ";box-shadow:0px 20px 20px 5px rgba(0,0,0,0.25);@media ", "{width:50%;right:0;left:inherit;box-shadow:-20px 15px 20px 0px rgba(0,0,0,0.25);}@media ", "{", ";position:relative;top:0;display:block;margin:0;width:100%;height:100%;box-shadow:none;}@media ", "{margin:0 10px;}> h2{", ";}"], _ref8 => {
63
63
  let {
64
64
  isExpandable
65
65
  } = _ref8;
@@ -92,7 +92,7 @@ const Nav = exports.Nav = _styledComponents.default.nav.withConfig({
92
92
  const SubNavMenu = exports.SubNavMenu = _styledComponents.default.ul.withConfig({
93
93
  displayName: "HeaderNav2025style__SubNavMenu",
94
94
  componentId: "sc-xflhtq-2"
95
- })(["visibility:", ";display:", ";padding:0;position:relative;list-style:none outside;left:0;top:0;flex-direction:column;justify-content:center;align-items:center;background-color:", ";overflow:hidden;border-top:1px solid ", ";@media ", "{display:flex;width:330px;height:auto;padding:0;position:absolute;top:86px;left:-5px;border-radius:0 0 25px 25px;transition:opacity ", "s ease;opacity:0;box-shadow:0px 20px 20px 5px rgba(0,0,0,0.25);}"], _ref13 => {
95
+ })(["visibility:", ";display:", ";padding:0;position:relative;list-style:none outside;left:0;top:0;flex-direction:column;justify-content:center;align-items:center;background-color:", ";overflow:hidden;border-top:1px solid ", ";@media ", "{display:flex;width:330px;height:auto;padding:0;position:absolute;top:86px;left:-42px;border-radius:0 0 25px 25px;transition:opacity ", "s linear;opacity:0;box-shadow:0px 13px 15px 0 rgba(0,0,0,0.15);}"], _ref13 => {
96
96
  let {
97
97
  isSubMenuOpen
98
98
  } = _ref13;
@@ -125,7 +125,7 @@ const SubNavMenu = exports.SubNavMenu = _styledComponents.default.ul.withConfig(
125
125
  const SubNavItem = exports.SubNavItem = _styledComponents.default.li.withConfig({
126
126
  displayName: "HeaderNav2025style__SubNavItem",
127
127
  componentId: "sc-xflhtq-3"
128
- })(["padding:0;height:100%;width:100%;border-top:1px solid ", ";;position:relative;transition:background-color ", "s ease;span{font-weight:100;}"], _ref18 => {
128
+ })(["padding:0;height:100%;width:100%;border-top:1px solid ", ";;position:relative;transition:background-color ", "s ease;&:first-of-type{border-top:none;}span{font-weight:100;}"], _ref18 => {
129
129
  let {
130
130
  theme
131
131
  } = _ref18;
@@ -75,7 +75,7 @@ const MoreNav = _ref => {
75
75
  return (
76
76
  /*#__PURE__*/
77
77
  // 'More Nav' sub item:
78
- _react.default.createElement(_MoreNav.MoreSubNavItem, {
78
+ _react.default.createElement(_MoreNav.MoreNavSubItem, {
79
79
  key: thisSubUrl
80
80
  }, /*#__PURE__*/_react.default.createElement(_MoreNav.MoreSubNavLink, {
81
81
  href: thisSubUrl,
@@ -5,7 +5,7 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.MoreSubNavMenu = exports.MoreSubNavLink = exports.MoreSubNavItem = exports.MoreNestedSubNavMenu = exports.MoreNavNestedLink = exports.MoreNavLabel = exports.MoreNavItem = void 0;
8
+ exports.MoreSubNavMenu = exports.MoreSubNavLink = exports.MoreSubNavItem = exports.MoreNestedSubNavMenu = exports.MoreNavSubItem = exports.MoreNavNestedLink = exports.MoreNavLabel = exports.MoreNavItem = void 0;
9
9
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
10
10
  var _HeaderNav = require("./HeaderNav2025.style");
11
11
  var _Text = _interopRequireDefault(require("../../../Atoms/Text/Text"));
@@ -47,7 +47,7 @@ const MoreNavLabel = exports.MoreNavLabel = (0, _styledComponents.default)(_Text
47
47
  const MoreNavItem = exports.MoreNavItem = (0, _styledComponents.default)(_HeaderNav.NavItem).withConfig({
48
48
  displayName: "MoreNavstyle__MoreNavItem",
49
49
  componentId: "sc-68lngb-2"
50
- })(["@media ", "{margin-left:22px;", " > ", "{transition:transform 0.35s cubic-bezier(0.41,1.64,0.41,0.8);}:hover,:focus{", "{color:", ";> ", "{transform:rotate(-180deg);img{filter:invert(0.5) sepia(1) saturate(100) hue-rotate(20deg);}}}}:hover,:focus,:focus-within{> ", "{border-bottom:none;padding-bottom:10px;}> ", "{visibility:visible;opacity:1;display:flex;flex-direction:column;}}:focus{> ", "{visibility:hidden !important;opacity:0 !important;display:none !important;}}}@media ", "{margin-left:20px;}"], _ref6 => {
50
+ })(["@media ", "{margin-left:22px;display:flex;flex-grow:0.5;", " > ", "{transition:transform 0.35s cubic-bezier(0.41,1.64,0.41,0.8);}:hover,:focus{", "{color:", ";> ", "{transform:rotate(-180deg);img{filter:invert(0.5) sepia(1) saturate(100) hue-rotate(20deg);}}}}:hover,:focus,:focus-within{> ", "{border-bottom:none;padding-bottom:10px;}> ", "{visibility:visible;opacity:1;display:flex;flex-direction:column;}}:focus{> ", "{visibility:hidden !important;opacity:0 !important;display:none !important;}}}@media ", "{margin-left:20px;}"], _ref6 => {
51
51
  let {
52
52
  theme
53
53
  } = _ref6;
@@ -88,21 +88,30 @@ const MoreSubNavItem = exports.MoreSubNavItem = (0, _styledComponents.default)(_
88
88
  } = _ref11;
89
89
  return theme.color('red');
90
90
  }, _HeaderNav.ChevronWrapper);
91
+ const MoreNavSubItem = exports.MoreNavSubItem = (0, _styledComponents.default)(MoreSubNavItem).withConfig({
92
+ displayName: "MoreNavstyle__MoreNavSubItem",
93
+ componentId: "sc-68lngb-5"
94
+ })(["&:first-of-type{border-top:1px solid ", ";}"], _ref12 => {
95
+ let {
96
+ theme
97
+ } = _ref12;
98
+ return theme.color('grey_medium');
99
+ });
91
100
  const MoreNavNestedLink = exports.MoreNavNestedLink = (0, _styledComponents.default)(_HeaderNav.NavLink).withConfig({
92
101
  displayName: "MoreNavstyle__MoreNavNestedLink",
93
- componentId: "sc-68lngb-5"
94
- })(["padding:20px 25px 22px 42px;> div{height:auto;}", ";"], _ref12 => {
102
+ componentId: "sc-68lngb-6"
103
+ })(["padding:20px 25px 22px 42px;> div{height:auto;}", ";"], _ref13 => {
95
104
  let {
96
105
  isSubMenuOpen
97
- } = _ref12;
98
- return isSubMenuOpen && (0, _styledComponents.css)(["color:", ";> ", "{transform:rotate(-180deg);img{filter:invert(0.5) sepia(1) saturate(100) hue-rotate(20deg);}}"], _ref13 => {
106
+ } = _ref13;
107
+ return isSubMenuOpen && (0, _styledComponents.css)(["color:", ";> ", "{transform:rotate(-180deg);img{filter:invert(0.5) sepia(1) saturate(100) hue-rotate(20deg);}}"], _ref14 => {
99
108
  let {
100
109
  theme
101
- } = _ref13;
110
+ } = _ref14;
102
111
  return theme.color('red');
103
112
  }, _HeaderNav.ChevronWrapper);
104
113
  });
105
114
  const MoreSubNavLink = exports.MoreSubNavLink = (0, _styledComponents.default)(_HeaderNav.SubNavLink).withConfig({
106
115
  displayName: "MoreNavstyle__MoreSubNavLink",
107
- componentId: "sc-68lngb-6"
116
+ componentId: "sc-68lngb-7"
108
117
  })([""]);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@comicrelief/component-library",
3
3
  "author": "Comic Relief Engineering Team",
4
- "version": "8.13.2",
4
+ "version": "8.13.4",
5
5
  "main": "dist/index.js",
6
6
  "license": "ISC",
7
7
  "jest": {
@@ -478,6 +478,7 @@ const [success, setSuccess] = React.useState(false);
478
478
 
479
479
  <>
480
480
  <Header2025
481
+ showBoxShadow="true"
481
482
  characterLimit={50}
482
483
  navItems={data}
483
484
  rotate="true"
@@ -589,6 +590,7 @@ const [success, setSuccess] = React.useState(false);
589
590
 
590
591
  <>
591
592
  <Header2025
593
+ showBoxShadow="true"
592
594
  characterLimit={50}
593
595
  navItems={data}
594
596
  rotate="true"
@@ -18,7 +18,7 @@ const Header2025Wrapper = styled.header.attrs(() => ({
18
18
  }
19
19
 
20
20
  ${({ showBoxShadow }) => showBoxShadow && css`
21
- box-shadow: 0 5px 15px 0 ${({ theme }) => theme.color('grey_4')};
21
+ box-shadow: 0px 13px 15px 0 rgba(0, 0, 0, 0.15);
22
22
  `};
23
23
  `;
24
24
 
@@ -83,7 +83,6 @@ const HeaderNav2025 = ({
83
83
  // If we've changed from desktop to not, remove any previously-attached MoreNav event
84
84
  // listeners, BEFORE we update the flag that'd remove the elements from the DOM:
85
85
  if (isCurrentlyNotDesktop && processedItems.moreNavGroups.length) {
86
- // HERE CHERE
87
86
  document.getElementById('more-nav-ul').removeEventListener('mouseleave', resetMoreNavMouse);
88
87
  }
89
88
 
@@ -81,7 +81,7 @@ const Nav = styled.nav`
81
81
  top: 0;
82
82
  display: block;
83
83
  margin: 0;
84
- width: auto;
84
+ width: 100%;
85
85
  height: 100%;
86
86
  box-shadow: none;
87
87
  }
@@ -121,11 +121,11 @@ const SubNavMenu = styled.ul`
121
121
  padding: 0;
122
122
  position: absolute;
123
123
  top: 86px;
124
- left: -5px;
124
+ left: -42px;
125
125
  border-radius: 0 0 25px 25px;
126
- transition: opacity ${transitionDuration}s ease;
126
+ transition: opacity ${transitionDuration}s linear;
127
127
  opacity: 0;
128
- box-shadow: 0px 20px 20px 5px rgba(0, 0, 0, 0.25);
128
+ box-shadow: 0px 13px 15px 0 rgba(0, 0, 0, 0.15);
129
129
  }
130
130
  `;
131
131
 
@@ -140,6 +140,10 @@ const SubNavItem = styled.li`
140
140
  position: relative;
141
141
  transition: background-color ${transitionDuration}s ease;
142
142
 
143
+ &:first-of-type {
144
+ border-top: none;
145
+ }
146
+
143
147
  span {
144
148
  font-weight: 100;
145
149
  }
@@ -13,7 +13,8 @@ import {
13
13
  MoreNestedSubNavMenu,
14
14
  MoreSubNavItem,
15
15
  MoreNavNestedLink,
16
- MoreSubNavLink
16
+ MoreSubNavLink,
17
+ MoreNavSubItem
17
18
  } from './MoreNav.style';
18
19
 
19
20
  const MoreNav = ({
@@ -96,7 +97,7 @@ const MoreNav = ({
96
97
  const thisSubUrl = navHelper(subChild);
97
98
  return (
98
99
  // 'More Nav' sub item:
99
- <MoreSubNavItem key={thisSubUrl}>
100
+ <MoreNavSubItem key={thisSubUrl}>
100
101
  <MoreSubNavLink
101
102
  href={thisSubUrl}
102
103
  inline
@@ -109,7 +110,7 @@ const MoreNav = ({
109
110
  {subChild.title}
110
111
  </Text>
111
112
  </MoreSubNavLink>
112
- </MoreSubNavItem>
113
+ </MoreNavSubItem>
113
114
  );
114
115
  })}
115
116
  </MoreNestedSubNavMenu>
@@ -57,6 +57,9 @@ const MoreNavLabel = styled(Text)`
57
57
  const MoreNavItem = styled(NavItem)`
58
58
  @media ${({ theme }) => theme.allBreakpoints('Nav')} {
59
59
  margin-left: 22px;
60
+ // Let it take up all the space to be a bigger target:
61
+ display: flex;
62
+ flex-grow: 0.5;
60
63
 
61
64
  // Chevron icon:
62
65
  ${MoreNavLabel} > ${ChevronWrapper} {
@@ -154,6 +157,12 @@ const MoreSubNavItem = styled(SubNavItem)`
154
157
  }
155
158
  `;
156
159
 
160
+ const MoreNavSubItem = styled(MoreSubNavItem)`
161
+ &:first-of-type {
162
+ border-top: 1px solid ${({ theme }) => theme.color('grey_medium')};
163
+ }
164
+ `;
165
+
157
166
  const MoreNavNestedLink = styled(NavLink)`
158
167
  padding: 20px 25px 22px 42px;
159
168
 
@@ -186,5 +195,6 @@ export {
186
195
  MoreNestedSubNavMenu,
187
196
  MoreSubNavItem,
188
197
  MoreNavNestedLink,
189
- MoreSubNavLink
198
+ MoreSubNavLink,
199
+ MoreNavSubItem
190
200
  };