@comicrelief/component-library 8.86.1 → 8.86.2
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.
package/dist/index.cjs.js
CHANGED
|
@@ -5220,7 +5220,7 @@ gap: ${T("md")};
|
|
|
5220
5220
|
opacity: 0.8;
|
|
5221
5221
|
font-size: 0.875rem;
|
|
5222
5222
|
margin-bottom: ${T("sm")};
|
|
5223
|
-
`,Q7=({navItems:e=[],...t})=>!e||e.length===0?null:f.jsx(uU,{"aria-label":"Primary footer navigation",role:"navigation",children:e.map(r=>{const n=Gi(Ji(r));return f.jsx(dU,{children:f.jsx(fU,{href:n,...t,children:f.jsx(hU,{children:r.title})})},`primary-${n}-${r.title}`)})});Q7.propTypes={navItems:l.arrayOf(l.shape({title:l.string.isRequired,path:l.string,url:l.string,reference:l.shape({path:l.string}),internal:l.shape({type:l.string})}))};const ev=({navItems:e=[],...t})=>!e||e.length===0?null:f.jsx(pU,{"aria-label":"Secondary footer navigation",role:"navigation",children:e.map(r=>{const n=Gi(Ji(r));return f.jsx(gU,{children:f.jsx(mU,{href:n,...t,children:f.jsx(vU,{children:r.title})})},`secondary-${n}-${r.title}`)})});ev.propTypes={navItems:l.arrayOf(l.shape({title:l.string.isRequired,path:l.string,url:l.string,reference:l.shape({path:l.string}),internal:l.shape({type:l.string})}))};const tv=({legalText:e,copyrightText:t,showFacebookSocialIcon:r,showInstagramSocialIcon:n,showXSocialIcon:o,showTikTokSocialIcon:s,showYouTubeSocialIcon:c,onNewsletterSubmit:u,primaryLinksList:p=[],secondaryLinksList:m=[],campaign:h="Comic Relief",additionalLegalLine:v="",showFundraisingRegulatorLogo:b=!1,showEmailSignup:C=!0,animateRotate:x=!0,...$})=>{const w=h.replace(/\s/g,"").toLowerCase(),M=typeof t=="string"?t.trim():"",O=yc({email:_r().nullable().transform(ee=>ee===""?null:ee).email("Please provide a valid email address")}),A=qW({mode:"onBlur",resolver:ZW(O)}),{handleSubmit:F}=A,D=ee=>{u&&u(ee.email)};return f.jsx("div",{children:f.jsx(iU,{...$,children:f.jsxs(oU,{children:[v&&f.jsx(aU,{children:v}),f.jsx(Sl,{$mobileOnly:!0,children:f.jsx(ud,{href:"/",title:`Go to ${h} homepage`,$animateRotate:x,children:f.jsx(Wn,{sizeSm:"59px",sizeMd:"59px",sizeLg:"72px",rotate:!1,campaign:h})})}),f.jsxs(sU,{$hasEmailSignup:C,children:[f.jsxs(lU,{children:[C&&f.jsx(cU,{children:f.jsx(TW,{...A,children:f.jsx("form",{onSubmit:F(D),noValidate:!0,children:f.jsx(J7,{formContext:A})})})}),f.jsx(i5,{$desktopOnly:!0,$inTopSection:!0,children:f.jsx(Ms,{campaign:w,newStyle:!0,invertColor:!0,showFacebookSocialIcon:r,showInstagramSocialIcon:n,showXSocialIcon:o,showTikTokSocialIcon:s,showYouTubeSocialIcon:c})})]}),f.jsx(Sl,{$desktopOnly:!0,$showCRLogoOnly:!0,children:f.jsx(ud,{href:"/",title:`Go to ${h} homepage`,$animateRotate:x,children:f.jsx(Wn,{sizeSm:"59px",sizeMd:"59px",sizeLg:"59px",rotate:!1,campaign:h})})}),f.jsxs(Sl,{$desktopOnly:!0,$showPairedLogos:!0,children:[f.jsx(ud,{href:"/",title:`Go to ${h} homepage`,$animateRotate:x,children:f.jsx(Wn,{sizeSm:"59px",sizeMd:"59px",sizeLg:"59px",rotate:!1,campaign:h})}),b&&f.jsx(M2,{animateOnHover:!0,noMargin:!0})]})]}),f.jsx(Q7,{navItems:p,...$}),f.jsx(i5,{$mobileOnly:!0,children:f.jsx(Ms,{campaign:w,newStyle:!0,invertColor:!0,showFacebookSocialIcon:r,showInstagramSocialIcon:n,showXSocialIcon:o,showTikTokSocialIcon:s,showYouTubeSocialIcon:c})}),f.jsx(ev,{navItems:m,...$}),f.jsxs(yU,{children:[M.length>0&&f.jsx(o5,{children:M}),e&&f.jsx(o5,{children:e})]}),f.jsx(Sl,{$mobileOnly:!0,$showFundraiserAtBottom:!0,children:b&&f.jsx(M2,{noMargin:!0})})]})})})};tv.propTypes={primaryLinksList:l.arrayOf(l.shape({title:l.string,path:l.string,url:l.string,reference:l.shape({path:l.string}),internal:l.shape({type:l.string})})),secondaryLinksList:l.arrayOf(l.shape({title:l.string,path:l.string,url:l.string,reference:l.shape({path:l.string}),internal:l.shape({type:l.string})})),legalText:l.string,copyrightText:l.string,campaign:l.string,additionalLegalLine:l.string,showFundraisingRegulatorLogo:l.bool,showEmailSignup:l.bool,showFacebookSocialIcon:l.bool,showInstagramSocialIcon:l.bool,showXSocialIcon:l.bool,showTikTokSocialIcon:l.bool,showYouTubeSocialIcon:l.bool,animateRotate:l.bool,onNewsletterSubmit:l.func};const bU=g(fe)`
|
|
5223
|
+
`,Q7=({navItems:e=[],...t})=>!e||e.length===0?null:f.jsx(uU,{"aria-label":"Primary footer navigation",role:"navigation",children:e.map(r=>{const n=Gi(Ji(r));return f.jsx(dU,{children:f.jsx(fU,{href:n,...t,children:f.jsx(hU,{children:r.title})})},`primary-${n}-${r.title}`)})});Q7.propTypes={navItems:l.arrayOf(l.shape({title:l.string.isRequired,path:l.string,url:l.string,reference:l.shape({path:l.string}),internal:l.shape({type:l.string})}))};const ev=({navItems:e=[],...t})=>!e||e.length===0?null:f.jsx(pU,{"aria-label":"Secondary footer navigation",role:"navigation",children:e.map(r=>{const n=Gi(Ji(r));return f.jsx(gU,{children:f.jsx(mU,{href:n,...t,children:f.jsx(vU,{children:r.title})})},`secondary-${n}-${r.title}`)})});ev.propTypes={navItems:l.arrayOf(l.shape({title:l.string.isRequired,path:l.string,url:l.string,reference:l.shape({path:l.string}),internal:l.shape({type:l.string})}))};const tv=({legalText:e,copyrightText:t,showFacebookSocialIcon:r,showInstagramSocialIcon:n,showXSocialIcon:o,showTikTokSocialIcon:s,showYouTubeSocialIcon:c,onNewsletterSubmit:u,primaryLinksList:p=[],secondaryLinksList:m=[],campaign:h="Comic Relief",additionalLegalLine:v="",showFundraisingRegulatorLogo:b=!1,showEmailSignup:C=!0,animateRotate:x=!0,...$})=>{const w=h.replace(/\s/g,"").toLowerCase(),M=typeof t=="string"?t.trim():"",O=yc({email:_r().nullable().transform(ee=>ee===""?null:ee).email("Please provide a valid email address")}),A=qW({mode:"onBlur",resolver:ZW(O)}),{handleSubmit:F}=A,D=ee=>{u&&u(ee.email)};return f.jsx("div",{children:f.jsx(iU,{...$,children:f.jsxs(oU,{children:[v&&f.jsx(aU,{children:v}),f.jsx(Sl,{$mobileOnly:!0,children:f.jsx(ud,{href:"/",title:`Go to ${h} homepage`,$animateRotate:x,children:f.jsx(Wn,{sizeSm:"59px",sizeMd:"59px",sizeLg:"72px",rotate:!1,campaign:h})})}),f.jsxs(sU,{$hasEmailSignup:C,children:[f.jsxs(lU,{children:[C&&f.jsx(cU,{children:f.jsx(TW,{...A,children:f.jsx("form",{onSubmit:F(D),noValidate:!0,children:f.jsx(J7,{formContext:A})})})}),f.jsx(i5,{$desktopOnly:!0,$inTopSection:!0,children:f.jsx(Ms,{campaign:w,newStyle:!0,invertColor:!0,showFacebookSocialIcon:r,showInstagramSocialIcon:n,showXSocialIcon:o,showTikTokSocialIcon:s,showYouTubeSocialIcon:c})})]}),f.jsx(Sl,{$desktopOnly:!0,$showCRLogoOnly:!0,children:f.jsx(ud,{href:"/",title:`Go to ${h} homepage`,$animateRotate:x,children:f.jsx(Wn,{sizeSm:"59px",sizeMd:"59px",sizeLg:"59px",rotate:!1,campaign:h})})}),f.jsxs(Sl,{$desktopOnly:!0,$showPairedLogos:!0,children:[f.jsx(ud,{href:"/",title:`Go to ${h} homepage`,$animateRotate:x,children:f.jsx(Wn,{sizeSm:"59px",sizeMd:"59px",sizeLg:"59px",rotate:!1,campaign:h})}),b&&f.jsx(M2,{animateOnHover:!0,noMargin:!0})]})]}),f.jsx(Q7,{navItems:p,...$}),f.jsx(i5,{$mobileOnly:!0,children:f.jsx(Ms,{campaign:w,newStyle:!0,invertColor:!0,showFacebookSocialIcon:r,showInstagramSocialIcon:n,showXSocialIcon:o,showTikTokSocialIcon:s,showYouTubeSocialIcon:c})}),f.jsx(ev,{navItems:m,...$}),f.jsxs(yU,{"data-testid":"footer-copyright",children:[M.length>0&&f.jsx(o5,{children:M}),e&&f.jsx(o5,{children:e})]}),f.jsx(Sl,{$mobileOnly:!0,$showFundraiserAtBottom:!0,children:b&&f.jsx(M2,{noMargin:!0})})]})})})};tv.propTypes={primaryLinksList:l.arrayOf(l.shape({title:l.string,path:l.string,url:l.string,reference:l.shape({path:l.string}),internal:l.shape({type:l.string})})),secondaryLinksList:l.arrayOf(l.shape({title:l.string,path:l.string,url:l.string,reference:l.shape({path:l.string}),internal:l.shape({type:l.string})})),legalText:l.string,copyrightText:l.string,campaign:l.string,additionalLegalLine:l.string,showFundraisingRegulatorLogo:l.bool,showEmailSignup:l.bool,showFacebookSocialIcon:l.bool,showInstagramSocialIcon:l.bool,showXSocialIcon:l.bool,showTikTokSocialIcon:l.bool,showYouTubeSocialIcon:l.bool,animateRotate:l.bool,onNewsletterSubmit:l.func};const bU=g(fe)`
|
|
5224
5224
|
${sn};
|
|
5225
5225
|
`,I1=g.span`
|
|
5226
5226
|
background-color: ${({theme:e})=>e.color("deep_violet_dark")};
|
package/dist/index.es.js
CHANGED
|
@@ -28438,7 +28438,7 @@ const xq = ({
|
|
|
28438
28438
|
}
|
|
28439
28439
|
) }),
|
|
28440
28440
|
/* @__PURE__ */ g(_7, { navItems: p, ...$ }),
|
|
28441
|
-
/* @__PURE__ */ z(wq, { children: [
|
|
28441
|
+
/* @__PURE__ */ z(wq, { "data-testid": "footer-copyright", children: [
|
|
28442
28442
|
M.length > 0 && /* @__PURE__ */ g(c5, { children: M }),
|
|
28443
28443
|
e && /* @__PURE__ */ g(c5, { children: e })
|
|
28444
28444
|
] }),
|
package/package.json
CHANGED
|
@@ -138,7 +138,7 @@ const FooterNew = ({
|
|
|
138
138
|
|
|
139
139
|
<SecondaryNav navItems={secondaryLinksList} {...rest} />
|
|
140
140
|
|
|
141
|
-
<FooterCopyright>
|
|
141
|
+
<FooterCopyright data-testid="footer-copyright">
|
|
142
142
|
{displayCopyrightText.length > 0 && (
|
|
143
143
|
<FooterCopyrightText>
|
|
144
144
|
{displayCopyrightText}
|
|
@@ -1325,6 +1325,7 @@ exports[`does not render copyright text when not supplied 1`] = `
|
|
|
1325
1325
|
</nav>
|
|
1326
1326
|
<div
|
|
1327
1327
|
className="c44"
|
|
1328
|
+
data-testid="footer-copyright"
|
|
1328
1329
|
>
|
|
1329
1330
|
<p
|
|
1330
1331
|
className="c17 c45"
|
|
@@ -2665,6 +2666,7 @@ exports[`renders correctly 1`] = `
|
|
|
2665
2666
|
</nav>
|
|
2666
2667
|
<div
|
|
2667
2668
|
className="c44"
|
|
2669
|
+
data-testid="footer-copyright"
|
|
2668
2670
|
>
|
|
2669
2671
|
<p
|
|
2670
2672
|
className="c17 c45"
|