@comicrelief/component-library 8.86.5 → 8.87.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.
- package/dist/index.cjs.js +3 -2
- package/dist/index.es.js +52 -20
- package/package.json +1 -1
- package/src/components/Organisms/FilterCard/FilterCard.js +2 -2
- package/src/components/Organisms/FilterCard/FilterCard.style.js +1 -0
- package/src/components/Organisms/FooterNew/FooterNew.js +23 -4
- package/src/components/Organisms/FooterNew/FooterNewExample.jsx +18 -1
- package/src/data/data.js +0 -2
package/dist/index.cjs.js
CHANGED
|
@@ -5214,7 +5214,7 @@ gap: ${T("md")};
|
|
|
5214
5214
|
opacity: 0.8;
|
|
5215
5215
|
font-size: 0.875rem;
|
|
5216
5216
|
margin-bottom: ${T("sm")};
|
|
5217
|
-
`,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
|
|
5217
|
+
`,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,externalCRLink:$=null,...w})=>{const M=h.replace(/\s/g,"").toLowerCase(),O=typeof t=="string"?t.trim():"",A=yc({email:_r().nullable().transform(W=>W===""?null:W).email("Please provide a valid email address")}),F=qW({mode:"onBlur",resolver:ZW(A)}),{handleSubmit:D}=F,ee=W=>{u&&u(W.email)};return f.jsx("div",{children:f.jsx(iU,{...w,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,target:$?"blank":"self",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,{...F,children:f.jsx("form",{onSubmit:D(ee),noValidate:!0,children:f.jsx(J7,{formContext:F})})})}),f.jsx(i5,{$desktopOnly:!0,$inTopSection:!0,children:f.jsx(Ms,{campaign:M,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,target:$?"blank":"self",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,target:$?"blank":"self",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,...w}),f.jsx(i5,{$mobileOnly:!0,children:f.jsx(Ms,{campaign:M,newStyle:!0,invertColor:!0,showFacebookSocialIcon:r,showInstagramSocialIcon:n,showXSocialIcon:o,showTikTokSocialIcon:s,showYouTubeSocialIcon:c})}),f.jsx(ev,{navItems:m,...w}),f.jsxs(yU,{"data-testid":"footer-copyright",children:[O.length>0&&f.jsx(o5,{children:O}),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,externalCRLink:l.string};const bU=g(fe)`
|
|
5218
5218
|
${sn};
|
|
5219
5219
|
`,I1=g.span`
|
|
5220
5220
|
background-color: ${({theme:e})=>e.color("deep_violet_dark")};
|
|
@@ -7489,6 +7489,7 @@ gap: ${T("md")};
|
|
|
7489
7489
|
width: 1.25rem;
|
|
7490
7490
|
margin: 0;
|
|
7491
7491
|
animation: ${Bh} 0.2s ease-in;
|
|
7492
|
+
height: auto;
|
|
7492
7493
|
}
|
|
7493
7494
|
|
|
7494
7495
|
> ${ka} {
|
|
@@ -7664,7 +7665,7 @@ gap: ${T("md")};
|
|
|
7664
7665
|
display: flex;
|
|
7665
7666
|
margin-top: 2rem;
|
|
7666
7667
|
justify-content: center;
|
|
7667
|
-
`,Ry=({updateTotalResult:e,processedNodes:t,firstFilterCardNodeAsHero:r,nodeRenderLimit:n,currentFilters:o,hideShowMoreButton:s})=>{let c=0,u=0;const p=o.length>0,h=t.map((v,b)=>{const C=o.some(w=>v.tags.includes(w));(p&&C||!p)&&(u+=1);const x=!p||C,$=n===0||n>0&&c<n;if(x&&$){const{id:w,label:M,heading:O,description:A,image:F,imageLow:D,imageSet:ee,imageAltText:W,url:re,ctaText:le,ctaIcon:ge}=v,X=b===0&&r;return c+=1,f.jsxs(rQ,{$isHero:X,"data-testid":"FilterCard-Node",children:[f.jsx(i2,{children:f.jsx(nQ,{image:F,images:ee,imageLow:D,objectFit:"cover",width:"100%",height:"100%",alt:W,$isHero:X})}),f.jsxs(o2,{tabIndex:"0",children:[f.jsx(iQ,{tag:"p",color:"grey",weight:"500",$isHero:X,children:M}),f.jsx(aQ,{tag:X?"h2":"p",weight:"700",$isHero:X,$hasDescription:A,"data-testid":"FilterCard-Node--Heading",children:O}),A&&f.jsx(oQ,{tag:"p",$isHero:X,children:A}),f.jsx(fe,{tag:"p",children:f.jsx(sQ,{href:re,$underline:!0,target:"blank",icon:HJ(ge),children:le})})]})]},w)}return null}).filter(Boolean);return R.useEffect(()=>{e(u),s(c===u)},[h,e,s,c,u]),f.jsx(tQ,{children:h})};Ry.propTypes={processedNodes:l.arrayOf(l.shape()).isRequired,currentFilters:l.arrayOf(l.string).isRequired,firstFilterCardNodeAsHero:l.bool.isRequired,updateTotalResult:l.func.isRequired,nodeRenderLimit:l.number.isRequired,hideShowMoreButton:l.func.isRequired};const Iy=({data:e})=>{const{body:t,id:r,filterCardNodes:n,title:o,firstFilterCardNodeAsHero:s=!1,loadingBehaviour:c=null,paddingAbove:u="
|
|
7668
|
+
`,Ry=({updateTotalResult:e,processedNodes:t,firstFilterCardNodeAsHero:r,nodeRenderLimit:n,currentFilters:o,hideShowMoreButton:s})=>{let c=0,u=0;const p=o.length>0,h=t.map((v,b)=>{const C=o.some(w=>v.tags.includes(w));(p&&C||!p)&&(u+=1);const x=!p||C,$=n===0||n>0&&c<n;if(x&&$){const{id:w,label:M,heading:O,description:A,image:F,imageLow:D,imageSet:ee,imageAltText:W,url:re,ctaText:le,ctaIcon:ge}=v,X=b===0&&r;return c+=1,f.jsxs(rQ,{$isHero:X,"data-testid":"FilterCard-Node",children:[f.jsx(i2,{children:f.jsx(nQ,{image:F,images:ee,imageLow:D,objectFit:"cover",width:"100%",height:"100%",alt:W,$isHero:X})}),f.jsxs(o2,{tabIndex:"0",children:[f.jsx(iQ,{tag:"p",color:"grey",weight:"500",$isHero:X,children:M}),f.jsx(aQ,{tag:X?"h2":"p",weight:"700",$isHero:X,$hasDescription:A,"data-testid":"FilterCard-Node--Heading",children:O}),A&&f.jsx(oQ,{tag:"p",$isHero:X,children:A}),f.jsx(fe,{tag:"p",children:f.jsx(sQ,{href:re,$underline:!0,target:"blank",icon:HJ(ge),children:le})})]})]},w)}return null}).filter(Boolean);return R.useEffect(()=>{e(u),s(c===u)},[h,e,s,c,u]),f.jsx(tQ,{children:h})};Ry.propTypes={processedNodes:l.arrayOf(l.shape()).isRequired,currentFilters:l.arrayOf(l.string).isRequired,firstFilterCardNodeAsHero:l.bool.isRequired,updateTotalResult:l.func.isRequired,nodeRenderLimit:l.number.isRequired,hideShowMoreButton:l.func.isRequired};const Iy=({data:e})=>{const{body:t,id:r,filterCardNodes:n,title:o,firstFilterCardNodeAsHero:s=!1,loadingBehaviour:c=null,paddingAbove:u="2rem",paddingBelow:p="2rem",pageBackgroundColour:m="transparent"}=e,h=6,[v,b]=R.useState(!1),[C,x]=R.useState(!1),[$,w]=R.useState(!1),M=R.useRef(zJ(c,s)),[O,A]=R.useState(!1),[F,D]=R.useState([]),[ee,W]=R.useState(0),[re,le]=R.useState(M.current);R.useEffect(()=>{let Z;const{outputNodes:B,outputTags:J}=VJ(n);return B&&J&&(Z=setTimeout(()=>{b(B),x(J)},1e3)),()=>clearTimeout(Z)},[n]);const ge=R.useCallback(Z=>{le(M.current),w(!0);let B=F;B.includes(Z)?B=[...B.slice(0,B.indexOf(Z)),...B.slice(B.indexOf(Z)+1)]:B.push(Z),D([...B])},[F]),X=!(!O&&F.length===0),U=`${ee} ${ee===1?"result":"results"}`;return f.jsx(YJ,{$paddingAbove:u,$paddingBelow:p,$pageBackgroundColour:m,"data-testid":"FilterCard",id:r,children:f.jsxs(UJ,{children:[f.jsxs(GJ,{children:[f.jsx(qJ,{tag:"h1",children:o}),f.jsx(ZJ,{children:t}),C&&v?f.jsxs(f.Fragment,{children:[f.jsxs(KJ,{children:[f.jsx(XJ,{color:"white",$isActive:X,role:"checkbox","aria-checked":O,onClick:()=>{A(!O)},icon:O?f.jsx(y7,{}):f.jsx(XN,{}),"data-testid":"FilterCard-ShowHideButton",children:O?"Hide Filters":"Show Filters"}),f.jsx(QJ,{color:"white",icon:f.jsx(QN,{}),$show:X,disabled:F.length===0,onClick:()=>{D([]),le(M.current),w(!0)},"data-testid":"FilterCard-ClearSelectionButton",children:"Clear selection"}),f.jsx(JJ,{"data-testid":"FilterCard-Results",role:"status",children:f.jsx(fe,{tag:"span",children:U})})]}),f.jsx(Ay,{$show:O,"data-testid":"FilterCard-FilterButtonsWrapper",children:Object.keys(C).map(Z=>{const{tag:B,selectedIcon:J,unselectedIcon:de}=C[Z],P=F.includes(B);return f.jsx(eQ,{type:"button",color:"grey_light",value:B,name:B,iconLeft:!0,$isSelected:P,role:"checkbox","aria-checked":P,icon:P?J:de,onClick:()=>{ge(B)},iconKey:`${P}`,"data-testid":"FilterCard-FilterButton",children:B},B)})})]}):f.jsx(m7,{color:"black",style:{textAlign:"center",display:"block"}})]}),C&&v&&f.jsx(Ry,{processedNodes:v,firstFilterCardNodeAsHero:s,nodeRenderLimit:re,currentFilters:F,updateTotalResult:W,hideShowMoreButton:w,"data-testid":"FilterCard-Nodes"}),!$&&C&&v&&f.jsx(lQ,{children:f.jsx(to,{onClick:()=>le(re+h),"data-testid":"FilterCard-ShowMoreButton",children:"Show more"})})]})})};Iy.propTypes={data:l.shape({id:l.string.isRequired,title:l.string.isRequired,body:l.oneOfType([l.node,l.string]).isRequired,paddingAbove:l.string,paddingBelow:l.string,pageBackgroundColour:l.string,loadingBehaviour:l.string,firstFilterCardNodeAsHero:l.bool,filterCardNodes:l.arrayOf(l.shape({id:l.string.isRequired,title:l.string.isRequired,label:l.string.isRequired,heading:l.string.isRequired,ctaText:l.string.isRequired,url:l.string.isRequired,description:l.string,image:l.string.isRequired,imageLow:l.string.isRequired,imageSet:l.string.isRequired,imageAltText:l.string.isRequired,filterTags:l.arrayOf(l.shape({tag:l.string.isRequired,title:l.string.isRequired,filterIconSelected:l.shape({file:l.shape({url:l.string.isRequired})}),filterIconUnselected:l.shape({file:l.shape({url:l.string.isRequired})})}))})).isRequired}).isRequired};const cQ=g.div`
|
|
7668
7669
|
width: 100%;
|
|
7669
7670
|
`,uQ=g.div`
|
|
7670
7671
|
position: relative;
|
package/dist/index.es.js
CHANGED
|
@@ -28381,26 +28381,36 @@ const xq = ({
|
|
|
28381
28381
|
showFundraisingRegulatorLogo: y = !1,
|
|
28382
28382
|
showEmailSignup: C = !0,
|
|
28383
28383
|
animateRotate: w = !0,
|
|
28384
|
-
|
|
28384
|
+
externalCRLink: $ = null,
|
|
28385
|
+
...x
|
|
28385
28386
|
}) => {
|
|
28386
|
-
const
|
|
28387
|
-
email: Tr().nullable().transform((
|
|
28388
|
-
}),
|
|
28387
|
+
const M = f.replace(/\s/g, "").toLowerCase(), T = typeof t == "string" ? t.trim() : "", A = $c({
|
|
28388
|
+
email: Tr().nullable().transform((U) => U === "" ? null : U).email("Please provide a valid email address")
|
|
28389
|
+
}), I = GU({
|
|
28389
28390
|
mode: "onBlur",
|
|
28390
|
-
resolver: XU(
|
|
28391
|
-
}), { handleSubmit:
|
|
28392
|
-
u && u(
|
|
28391
|
+
resolver: XU(A)
|
|
28392
|
+
}), { handleSubmit: D } = I, te = (U) => {
|
|
28393
|
+
u && u(U.email);
|
|
28393
28394
|
};
|
|
28394
|
-
return /* @__PURE__ */ g("div", { children: /* @__PURE__ */ g(aq, {
|
|
28395
|
+
return /* @__PURE__ */ g("div", { children: /* @__PURE__ */ g(aq, { ...x, children: /* @__PURE__ */ z(sq, { children: [
|
|
28395
28396
|
m && /* @__PURE__ */ g(lq, { children: m }),
|
|
28396
|
-
/* @__PURE__ */ g(Sl, { $mobileOnly: !0, children: /* @__PURE__ */ g(
|
|
28397
|
+
/* @__PURE__ */ g(Sl, { $mobileOnly: !0, children: /* @__PURE__ */ g(
|
|
28398
|
+
gd,
|
|
28399
|
+
{
|
|
28400
|
+
href: $ ?? "/",
|
|
28401
|
+
title: `Go to ${f} homepage`,
|
|
28402
|
+
$animateRotate: w,
|
|
28403
|
+
target: $ ? "blank" : "self",
|
|
28404
|
+
children: /* @__PURE__ */ g(wi, { sizeSm: "59px", sizeMd: "59px", sizeLg: "72px", rotate: !1, campaign: f })
|
|
28405
|
+
}
|
|
28406
|
+
) }),
|
|
28397
28407
|
/* @__PURE__ */ z(cq, { $hasEmailSignup: C, children: [
|
|
28398
28408
|
/* @__PURE__ */ z(uq, { children: [
|
|
28399
|
-
C && /* @__PURE__ */ g(dq, { children: /* @__PURE__ */ g(AU, { ...
|
|
28409
|
+
C && /* @__PURE__ */ g(dq, { children: /* @__PURE__ */ g(AU, { ...I, children: /* @__PURE__ */ g("form", { onSubmit: D(te), noValidate: !0, children: /* @__PURE__ */ g(C7, { formContext: I }) }) }) }),
|
|
28400
28410
|
/* @__PURE__ */ g(l5, { $desktopOnly: !0, $inTopSection: !0, children: /* @__PURE__ */ g(
|
|
28401
28411
|
h2,
|
|
28402
28412
|
{
|
|
28403
|
-
campaign:
|
|
28413
|
+
campaign: M,
|
|
28404
28414
|
newStyle: !0,
|
|
28405
28415
|
invertColor: !0,
|
|
28406
28416
|
showFacebookSocialIcon: r,
|
|
@@ -28411,17 +28421,35 @@ const xq = ({
|
|
|
28411
28421
|
}
|
|
28412
28422
|
) })
|
|
28413
28423
|
] }),
|
|
28414
|
-
/* @__PURE__ */ g(Sl, { $desktopOnly: !0, $showCRLogoOnly: !0, children: /* @__PURE__ */ g(
|
|
28424
|
+
/* @__PURE__ */ g(Sl, { $desktopOnly: !0, $showCRLogoOnly: !0, children: /* @__PURE__ */ g(
|
|
28425
|
+
gd,
|
|
28426
|
+
{
|
|
28427
|
+
href: $ ?? "/",
|
|
28428
|
+
title: `Go to ${f} homepage`,
|
|
28429
|
+
$animateRotate: w,
|
|
28430
|
+
target: $ ? "blank" : "self",
|
|
28431
|
+
children: /* @__PURE__ */ g(wi, { sizeSm: "59px", sizeMd: "59px", sizeLg: "59px", rotate: !1, campaign: f })
|
|
28432
|
+
}
|
|
28433
|
+
) }),
|
|
28415
28434
|
/* @__PURE__ */ z(Sl, { $desktopOnly: !0, $showPairedLogos: !0, children: [
|
|
28416
|
-
/* @__PURE__ */ g(
|
|
28435
|
+
/* @__PURE__ */ g(
|
|
28436
|
+
gd,
|
|
28437
|
+
{
|
|
28438
|
+
href: $ ?? "/",
|
|
28439
|
+
title: `Go to ${f} homepage`,
|
|
28440
|
+
$animateRotate: w,
|
|
28441
|
+
target: $ ? "blank" : "self",
|
|
28442
|
+
children: /* @__PURE__ */ g(wi, { sizeSm: "59px", sizeMd: "59px", sizeLg: "59px", rotate: !1, campaign: f })
|
|
28443
|
+
}
|
|
28444
|
+
),
|
|
28417
28445
|
y && /* @__PURE__ */ g(R2, { animateOnHover: !0, noMargin: !0 })
|
|
28418
28446
|
] })
|
|
28419
28447
|
] }),
|
|
28420
|
-
/* @__PURE__ */ g($7, { navItems: h,
|
|
28448
|
+
/* @__PURE__ */ g($7, { navItems: h, ...x }),
|
|
28421
28449
|
/* @__PURE__ */ g(l5, { $mobileOnly: !0, children: /* @__PURE__ */ g(
|
|
28422
28450
|
h2,
|
|
28423
28451
|
{
|
|
28424
|
-
campaign:
|
|
28452
|
+
campaign: M,
|
|
28425
28453
|
newStyle: !0,
|
|
28426
28454
|
invertColor: !0,
|
|
28427
28455
|
showFacebookSocialIcon: r,
|
|
@@ -28431,9 +28459,9 @@ const xq = ({
|
|
|
28431
28459
|
showYouTubeSocialIcon: c
|
|
28432
28460
|
}
|
|
28433
28461
|
) }),
|
|
28434
|
-
/* @__PURE__ */ g(_7, { navItems: p,
|
|
28462
|
+
/* @__PURE__ */ g(_7, { navItems: p, ...x }),
|
|
28435
28463
|
/* @__PURE__ */ z(wq, { "data-testid": "footer-copyright", children: [
|
|
28436
|
-
|
|
28464
|
+
T.length > 0 && /* @__PURE__ */ g(c5, { children: T }),
|
|
28437
28465
|
e && /* @__PURE__ */ g(c5, { children: e })
|
|
28438
28466
|
] }),
|
|
28439
28467
|
/* @__PURE__ */ g(Sl, { $mobileOnly: !0, $showFundraiserAtBottom: !0, children: y && /* @__PURE__ */ g(R2, { noMargin: !0 }) })
|
|
@@ -28482,7 +28510,10 @@ xq.propTypes = {
|
|
|
28482
28510
|
/** Animate logo rotation on hover */
|
|
28483
28511
|
animateRotate: l.bool,
|
|
28484
28512
|
/** Optional function to handle newsletter signup form submission */
|
|
28485
|
-
onNewsletterSubmit: l.func
|
|
28513
|
+
onNewsletterSubmit: l.func,
|
|
28514
|
+
// Rather than just using a boolean here, this will allow us to point
|
|
28515
|
+
// the CR logo at any Sorry/Lite version of CRcom, if needs arise:
|
|
28516
|
+
externalCRLink: l.string
|
|
28486
28517
|
};
|
|
28487
28518
|
const Cq = b(he)`
|
|
28488
28519
|
${Fn};
|
|
@@ -33379,6 +33410,7 @@ const ZJ = (e) => {
|
|
|
33379
33410
|
width: 1.25rem;
|
|
33380
33411
|
margin: 0;
|
|
33381
33412
|
animation: ${Wh} 0.2s ease-in;
|
|
33413
|
+
height: auto;
|
|
33382
33414
|
}
|
|
33383
33415
|
|
|
33384
33416
|
> ${Ra} {
|
|
@@ -33668,8 +33700,8 @@ const vQ = ({ data: e }) => {
|
|
|
33668
33700
|
title: o,
|
|
33669
33701
|
firstFilterCardNodeAsHero: s = !1,
|
|
33670
33702
|
loadingBehaviour: c = null,
|
|
33671
|
-
paddingAbove: u = "
|
|
33672
|
-
paddingBelow: h = "
|
|
33703
|
+
paddingAbove: u = "2rem",
|
|
33704
|
+
paddingBelow: h = "2rem",
|
|
33673
33705
|
pageBackgroundColour: p = "transparent"
|
|
33674
33706
|
} = e, f = 6, [m, y] = ke(!1), [C, w] = ke(!1), [$, x] = ke(!1), M = Vt(XJ(c, s)), [T, A] = ke(!1), [I, D] = ke([]), [te, U] = ke(0), [ne, ce] = ke(M.current);
|
|
33675
33707
|
Ue(() => {
|
package/package.json
CHANGED
|
@@ -34,8 +34,8 @@ const FilterCard = ({ data }) => {
|
|
|
34
34
|
title,
|
|
35
35
|
firstFilterCardNodeAsHero = false,
|
|
36
36
|
loadingBehaviour = null,
|
|
37
|
-
paddingAbove = '
|
|
38
|
-
paddingBelow = '
|
|
37
|
+
paddingAbove = '2rem',
|
|
38
|
+
paddingBelow = '2rem',
|
|
39
39
|
pageBackgroundColour = 'transparent'
|
|
40
40
|
} = data;
|
|
41
41
|
|
|
@@ -40,6 +40,7 @@ const FooterNew = ({
|
|
|
40
40
|
showFundraisingRegulatorLogo = false,
|
|
41
41
|
showEmailSignup = true,
|
|
42
42
|
animateRotate = true,
|
|
43
|
+
externalCRLink = null,
|
|
43
44
|
...rest
|
|
44
45
|
}) => {
|
|
45
46
|
// Remove white space between words
|
|
@@ -79,7 +80,12 @@ const FooterNew = ({
|
|
|
79
80
|
)}
|
|
80
81
|
|
|
81
82
|
<LogosContainer $mobileOnly>
|
|
82
|
-
<Brand
|
|
83
|
+
<Brand
|
|
84
|
+
href={externalCRLink ?? '/'}
|
|
85
|
+
title={`Go to ${campaign} homepage`}
|
|
86
|
+
$animateRotate={animateRotate}
|
|
87
|
+
target={externalCRLink ? 'blank' : 'self'}
|
|
88
|
+
>
|
|
83
89
|
<Logo sizeSm="59px" sizeMd="59px" sizeLg="72px" rotate={false} campaign={campaign} />
|
|
84
90
|
</Brand>
|
|
85
91
|
</LogosContainer>
|
|
@@ -109,12 +115,22 @@ const FooterNew = ({
|
|
|
109
115
|
</SocialIconWrapper>
|
|
110
116
|
</TopSectionLeft>
|
|
111
117
|
<LogosContainer $desktopOnly $showCRLogoOnly>
|
|
112
|
-
<Brand
|
|
118
|
+
<Brand
|
|
119
|
+
href={externalCRLink ?? '/'}
|
|
120
|
+
title={`Go to ${campaign} homepage`}
|
|
121
|
+
$animateRotate={animateRotate}
|
|
122
|
+
target={externalCRLink ? 'blank' : 'self'}
|
|
123
|
+
>
|
|
113
124
|
<Logo sizeSm="59px" sizeMd="59px" sizeLg="59px" rotate={false} campaign={campaign} />
|
|
114
125
|
</Brand>
|
|
115
126
|
</LogosContainer>
|
|
116
127
|
<LogosContainer $desktopOnly $showPairedLogos>
|
|
117
|
-
<Brand
|
|
128
|
+
<Brand
|
|
129
|
+
href={externalCRLink ?? '/'}
|
|
130
|
+
title={`Go to ${campaign} homepage`}
|
|
131
|
+
$animateRotate={animateRotate}
|
|
132
|
+
target={externalCRLink ? 'blank' : 'self'}
|
|
133
|
+
>
|
|
118
134
|
<Logo sizeSm="59px" sizeMd="59px" sizeLg="59px" rotate={false} campaign={campaign} />
|
|
119
135
|
</Brand>
|
|
120
136
|
{showFundraisingRegulatorLogo && <FundraisingRegulatorLogo animateOnHover noMargin />}
|
|
@@ -203,7 +219,10 @@ FooterNew.propTypes = {
|
|
|
203
219
|
/** Animate logo rotation on hover */
|
|
204
220
|
animateRotate: PropTypes.bool,
|
|
205
221
|
/** Optional function to handle newsletter signup form submission */
|
|
206
|
-
onNewsletterSubmit: PropTypes.func
|
|
222
|
+
onNewsletterSubmit: PropTypes.func,
|
|
223
|
+
// Rather than just using a boolean here, this will allow us to point
|
|
224
|
+
// the CR logo at any Sorry/Lite version of CRcom, if needs arise:
|
|
225
|
+
externalCRLink: PropTypes.string
|
|
207
226
|
};
|
|
208
227
|
|
|
209
228
|
export default FooterNew;
|
|
@@ -21,7 +21,7 @@ export default function FooterNewExample() {
|
|
|
21
21
|
showTikTokSocialIcon
|
|
22
22
|
showYouTubeSocialIcon
|
|
23
23
|
animateRotate
|
|
24
|
-
onNewsletterSubmit={
|
|
24
|
+
onNewsletterSubmit={email => console.log('Newsletter submitted. Normally at this point, the frontend would run its own function to send.', email)}
|
|
25
25
|
/>
|
|
26
26
|
|
|
27
27
|
<h3>FooterNew without email signup</h3>
|
|
@@ -40,6 +40,23 @@ export default function FooterNewExample() {
|
|
|
40
40
|
animateRotate
|
|
41
41
|
/>
|
|
42
42
|
|
|
43
|
+
<h3>FooterNew without email signup + external CR logo link (as per Donate)</h3>
|
|
44
|
+
<FooterNew
|
|
45
|
+
primaryLinksList={primaryLinksList}
|
|
46
|
+
secondaryLinksList={secondaryLinksList}
|
|
47
|
+
legalText={footerCopy.copy}
|
|
48
|
+
campaign="Comic Relief"
|
|
49
|
+
showEmailSignup={false}
|
|
50
|
+
showFundraisingRegulatorLogo
|
|
51
|
+
showFacebookSocialIcon
|
|
52
|
+
showInstagramSocialIcon
|
|
53
|
+
showXSocialIcon
|
|
54
|
+
showTikTokSocialIcon
|
|
55
|
+
showYouTubeSocialIcon
|
|
56
|
+
animateRotate
|
|
57
|
+
externalCRLink="https://www.comicrelief.com"
|
|
58
|
+
/>
|
|
59
|
+
|
|
43
60
|
</div>
|
|
44
61
|
);
|
|
45
62
|
}
|
package/src/data/data.js
CHANGED
|
@@ -353,8 +353,6 @@ const ButtonIconSvgPath = 'https://images.ctfassets.net/0p265iutoxgq/3GaahqcCBaX
|
|
|
353
353
|
|
|
354
354
|
// Reused config and 'top' content for the FilterCard examples:
|
|
355
355
|
const filterCardConfig = {
|
|
356
|
-
paddingAbove: '2rem',
|
|
357
|
-
paddingBelow: '2rem',
|
|
358
356
|
pageBackgroundColour: 'grey_light',
|
|
359
357
|
loadingBehaviour: 'Load all cards at once',
|
|
360
358
|
body:
|