quirk-ui 0.0.512 → 0.0.514
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.
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const Se=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],_e=G.createLucideIcon("search",Se),Le={standard:e.styles.standard,transparent:e.styles.transparent},Me={left:e.styles.left,center:e.styles.center,right:e.styles.right},Ee=({spotlight:a,renderText:m})=>{var t,C,k,p,j,S,x,_,L,M,u;const w=(t=a.image)==null?void 0:t.asset.altText,f=((C=a.callToAction.linkOptions)==null?void 0:C.linkType)==="external";let y="#";return((k=a.callToAction.linkOptions)==null?void 0:k.linkType)==="external"&&((p=a.callToAction.linkOptions)!=null&&p.externalUrl)?y=(j=a.callToAction.linkOptions)==null?void 0:j.externalUrl:((S=a.callToAction.linkOptions)==null?void 0:S.linkType)==="internal"&&((_=(x=a.callToAction.linkOptions)==null?void 0:x.internalUrl)!=null&&_.slug.current)&&(y=`/${(M=(L=a.callToAction.linkOptions)==null?void 0:L.internalUrl)==null?void 0:M.slug.current}`),s.jsxs("div",{className:e.styles.spotlight,children:[a.image&&s.jsx("div",{className:e.styles.imageWrapper,children:s.jsx("img",{src:(a==null?void 0:a.image.imageUrl)??"",alt:w||a.image.asset.description||"Content image",width:600,height:400})}),s.jsxs("div",{className:e.styles.content,children:[a.title&&s.jsx("div",{className:e.styles.title,children:m==null?void 0:m(a.title,e.styles.title)}),a.description&&s.jsx("div",{className:e.styles.description,children:m==null?void 0:m(a.description,e.styles.description)})]}),((u=a.callToAction)==null?void 0:u.linkOptions)&&s.jsx("div",{className:e.styles.actions,children:s.jsx(O.CallToAction,{as:"a",variant:a.callToAction.variant??"primary",href:y,target:f?"_blank":"_self",rel:f?"noopener noreferrer":"","aria-label":a.callToAction.ariaLabel||a.callToAction.label,children:a.callToAction.label})})]})};function Ae({renderText:a,title:m,logo:w,items:f,groups:y,utilityItems:t,isSticky:C=!1,showSearch:k=!0,showLocaleSelect:p=!0,alignment:j="right",variant:S="standard",navigationType:x="default",searchComponent:_,localeSelectComponent:L,className:M}){const[u,U]=r.useState(!1),[X,b]=r.useState(null),[ce,re]=r.useState(0),[oe,de]=r.useState(!1),[ue,ye]=r.useState(null),[o,N]=r.useState([]),[E,q]=r.useState(0),[he,H]=r.useState(null),[$,me]=r.useState(!1),[A,T]=r.useState("forward"),B=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} ${e.styles.searchWrapper}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(te.Modal,{className:e.styles.searchModal,trigger:s.jsx("button",{role:"menuitem",title:"Search","aria-label":"Search",className:e.styles.search,children:s.jsx(_e,{size:16})}),content:_})})}),V=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} `,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(te.Modal,{className:e.styles.localeModal,trigger:s.jsx("button",{title:"Locale Select","aria-label":"Locale Select",role:"menuitem",className:e.styles.locale,children:s.jsx(ge,{size:16})}),content:L})})});r.useEffect(()=>{if(typeof window<"u"){const l=()=>{const n=window.innerWidth<768;me(n)};return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)}},[]);const be=()=>{N([])},fe=l=>{T("forward"),N([{title:l.title,primary:l.primaryItems??[],secondary:l.secondaryItems??[],description:""}])},J=l=>{T("forward"),N(n=>[...n,{title:l.label,primary:l.sublinks??[],secondary:[],description:l.description}])},xe=()=>{T("backward"),N(l=>l.slice(0,-1))},F=r.useRef(null),g=r.useRef(null),W=r.useRef(new Map),ke=()=>{U(l=>{const n=!l;return n||(N([]),T("forward"),b(null)),n})},K=l=>{const n=W.current.get(l);if(n&&g.current){const d=n.getBoundingClientRect(),h=g.current.getBoundingClientRect(),c=d.left-h.left+d.width/2;ye(c)}},je=l=>{b(n=>n===l?null:l)},Q=r.useCallback(l=>{F.current&&!F.current.contains(l.target)&&b(null)},[]),Y=r.useCallback(()=>{Z(),typeof window<"u"&&window.innerWidth>768&&(U(!1),b(null),typeof document<"u"&&(document.body.style.overflow=""))},[]),Z=r.useCallback(()=>{if(g.current){const l=g.current.getBoundingClientRect().width;re(l),de(!0)}},[]);r.useEffect(()=>{const l=typeof window<"u",n=typeof document<"u";return l&&window.addEventListener("resize",Y),n&&document.addEventListener("click",Q),Z(),()=>{l&&window.removeEventListener("resize",Y),n&&document.removeEventListener("click",Q)}},[]),r.useEffect(()=>{if(typeof document<"u")return u?setTimeout(()=>{I.lockScroll()},0):I.unlockScroll(),()=>I.unlockScroll()},[u]);const ve=l=>l.map((n,d)=>{var P,ee,se,le,ne;const h=`group-${d}`,z=he===d,c=(P=n.primaryItems)==null?void 0:P[E??0];return s.jsxs("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,onMouseEnter:()=>{H(d),b(h),K(h)},onMouseLeave:()=>{H(null),q(0),b(null)},children:[s.jsx("div",{className:e.styles.linkItem,children:s.jsxs("button",{ref:i=>{W.current.set(h,i)},role:"menuitem","aria-haspopup":"true","aria-expanded":z,"aria-controls":`submenu-${d}`,className:`${e.styles.sublinkToggle} ${z?e.styles.open:""} `,children:[n.title,s.jsx(Ne.ChevronDown,{size:18,className:e.styles.chevron})]})}),s.jsx("div",{id:`submenu-${d}`,className:`${e.styles.sublinks} ${z?e.styles.show:""}`,role:"menu","aria-label":`${n.title} submenu`,children:s.jsx("div",{children:s.jsxs("div",{className:`${e.styles.sublinksInner} ${n.spotlight?e.styles.withSpotlight:e.styles.withoutSpotlight}`,children:[s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.primaryColumn}`,children:[s.jsx("div",{className:e.styles.linkItem}),(ee=n.primaryItems)==null?void 0:ee.map((i,v)=>i.href?s.jsxs("a",{href:i.href,className:`${e.styles.link} ${E===v?e.styles.open:""}`,target:i.isExternal?"_blank":"_self",rel:i.isExternal?"noopener noreferrer":void 0,onClick:()=>{var ae;b(null),(ae=i.onClick)==null||ae.call(i)},onMouseEnter:()=>i.sublinks?q(v):null,role:"menuitem",children:[s.jsxs("span",{className:e.styles.linkContent,children:[i.label,i.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:i.subtitle})]}),i.isExternal&&s.jsx(D.ExternalLink,{className:e.styles.newTabIcon,size:16})]},i._key??v):s.jsx("button",{role:"menuitem",className:`${e.styles.sublinkToggle} ${E===v?e.styles.open:""}`,onMouseEnter:()=>q(v),children:s.jsxs("span",{className:e.styles.linkContent,children:[i.label,i.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:i.subtitle})]})},i._key??v))]}),(c==null?void 0:c.sublinks)&&((se=c==null?void 0:c.sublinks)==null?void 0:se.length)>0&&s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.fadeInFromLeft}`,children:[(c==null?void 0:c.description)&&s.jsxs("div",{className:e.styles.sublinksDescription,children:[s.jsx("p",{children:"TEXT HERE"}),a==null?void 0:a(c.description)]}),(c==null?void 0:c.sublinks)&&R(c.sublinks,`${h}-${E}`)]},`${c.label}-${(le=c==null?void 0:c.sublinks)==null?void 0:le.length}`),(n==null?void 0:n.secondaryItems)&&((ne=n==null?void 0:n.secondaryItems)==null?void 0:ne.length)>0&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.secondaryColumn}`,children:n.secondaryItems&&n.secondaryItems.length>0&&R(n.secondaryItems,`${h}-secondary`)}),n.spotlight&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.spotlightColumn}`,children:s.jsx(Ee,{spotlight:n.spotlight,renderText:a??(i=>String(i))})})]})})})]},n._key??`group-${d}`)}),R=(l,n="")=>l.map(d=>{const h=`${n}/${d.label}`;return s.jsx(e.NavLink,{link:d,path:h,parentPath:n,openPath:X,togglePath:je,updateTriangleIndicator:K,setOpenPath:b,renderLinks:R,buttonRefs:W},d._key??h)});return s.jsx("header",{ref:F,className:`${M??""} ${Me[j]} ${Le[S]} ${e.styles.navbar} ${C?e.styles.sticky:""} ${y&&y.length?e.styles.advanced:e.styles.default}`,"aria-label":"Main navigation",children:s.jsxs("div",{className:`${e.styles.container} ${(!t||t.length===0)&&j!=="center"?e.styles.twoColumn:""}`,children:[w?s.jsx("div",{className:e.styles.logo,children:w}):s.jsx("div",{className:e.styles.title,children:m}),s.jsx("nav",{ref:g,style:{left:j==="center"?`calc(50% - ${ce/2}px)`:"0"},className:`${e.styles.nav} ${u?e.styles.open:""} ${oe?e.styles.visible:e.styles.hidden}`,id:"main-menu",role:"menubar","aria-label":"Main navigation",children:s.jsxs("div",{className:e.styles.navInner,children:[s.jsx("svg",{style:{left:`${ue}px`},className:`${e.styles.triangle} ${X?e.styles.show:""}`,width:16,height:12,viewBox:"0 0 100 75",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("polygon",{points:"50,5 95,70 5,70",strokeLinejoin:"round",fill:"white",stroke:"white"})}),x==="default"&&f&&s.jsxs("div",{className:e.styles.grid,children:[f&&f.length>0&&R(f),k&&!$&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:e.styles.separator}),s.jsx(B,{})]}),p&&s.jsx(V,{})]}),!$&&x==="advanced"&&y&&s.jsxs("div",{className:e.styles.grid,children:[y.length>0&&ve(y),k&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:e.styles.separator}),s.jsx(B,{})]}),p&&s.jsx(V,{})]}),$&&x==="advanced"&&u&&o.length===0&&y&&s.jsx("div",{className:`${e.styles.mobileMenu}`,children:y.map((l,n)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${A==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:s.jsx("button",{role:"menuitem",className:e.styles.sublinkToggle,onClick:()=>fe(l),children:l.title})},l._key??n))}),$&&x==="advanced"&&u&&o.length>0&&s.jsxs("div",{className:`${e.styles.mobileMenuSlide} `,children:[s.jsx("button",{role:"menuitem",className:e.styles.back,onClick:o.length===1?be:xe,children:s.jsx(O.ChevronLeft,{size:18,"aria-hidden":"true",focusable:"false"})}),o[o.length-1].description&&s.jsx("div",{className:`${e.styles.sublinksDescription} ${A==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:a==null?void 0:a(o[o.length-1].description)}),o[o.length-1].primary.map((l,n)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${A==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:l.sublinks?s.jsx("button",{role:"menuitem",className:e.styles.sublinkToggle,onClick:()=>J(l),children:s.jsxs("span",{className:e.styles.linkContent,children:[l.label,l.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:l.subtitle})]})}):s.jsxs("a",{href:l.href,className:e.styles.link,target:l.isExternal?"_blank":"_self",rel:l.isExternal?"noopener noreferrer":void 0,role:"menuitem",children:[s.jsxs("span",{className:e.styles.linkContent,children:[l.label,l.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:l.subtitle})]}),l.isExternal&&s.jsx(D.ExternalLink,{className:e.styles.newTabIcon,size:16})]})},l._key??`primary-${n}`)),o[o.length-1].secondary.length>0&&s.jsx("hr",{className:e.styles.groupDivider}),o[o.length-1].secondary.map((l,n)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${A==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:l.sublinks?s.jsx("button",{role:"menuitem",className:e.styles.sublinkToggle,onClick:()=>J(l),children:l.label}):s.jsxs("a",{href:l.href,className:e.styles.link,target:l.isExternal?"_blank":"_self",rel:l.isExternal?"noopener noreferrer":void 0,role:"menuitem",children:[l.label,l.isExternal&&s.jsx(D.ExternalLink,{className:e.styles.newTabIcon,size:16})]})},l._key??`secondary-${n}`))]},`stack-${o.length}`)]})}),t&&t.length>0&&s.jsx("nav",{className:e.styles.utility,role:"menu","aria-label":"Utility navigation",children:s.jsx(ie.ButtonGroup,{children:t.map((l,n)=>s.jsx(O.CallToAction,{as:"a",href:l.href??"/",variant:l.variant??"primary",displayType:l.displayType??"text",imageSrc:l.imageSrc,imageAlt:l.imageAlt,"aria-label":l.ariaLabel??l.label,icon:l.icon,iconAlignment:l.iconAlignment,role:"menuitem",children:l.imageSrc?s.jsx("img",{src:l.imageSrc,alt:l.imageAlt??l.ariaLabel??l.label}):l.label},l._key||n))})}),t&&t.length>0&&s.jsx("nav",{role:"menu","aria-label":"Utility navigation",className:`${e.styles.utilityMobile} ${u?e.styles.open:""}`,children:s.jsx(ie.ButtonGroup,{alignment:"center",children:s.jsx(O.CallToAction,{as:"a",href:t[1].href??"/",variant:t[1].variant??"primary",displayType:t[1].displayType??"text",imageSrc:t[1].imageSrc,imageAlt:t[1].imageAlt,"aria-label":t[1].ariaLabel??t[1].label,icon:t[1].icon,iconAlignment:t[1].iconAlignment,role:"menuitem",children:t[1].imageSrc?s.jsx("img",{src:t[1].imageSrc,"aria-label":t[1].imageAlt??t[1].ariaLabel??t[1].label}):t[1].label})})}),s.jsxs("div",{className:e.styles.mobileButtons,children:[$&&k&&s.jsx(B,{}),s.jsx("button",{className:e.styles.menuToggle,onClick:ke,"aria-label":u?"Close menu":"Open menu","aria-expanded":u,"aria-controls":"main-menu",children:u?s.jsx(pe.X,{size:24}):s.jsx(Ce,{size:24})})]})]})})}exports.Navbar=Ae;
|
|
16
|
+
*/const Se=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],_e=G.createLucideIcon("search",Se),Le={standard:e.styles.standard,transparent:e.styles.transparent},Me={left:e.styles.left,center:e.styles.center,right:e.styles.right},Ee=({spotlight:a,renderText:m})=>{var t,C,k,p,j,S,x,_,L,M,u;const w=(t=a.image)==null?void 0:t.asset.altText,f=((C=a.callToAction.linkOptions)==null?void 0:C.linkType)==="external";let y="#";return((k=a.callToAction.linkOptions)==null?void 0:k.linkType)==="external"&&((p=a.callToAction.linkOptions)!=null&&p.externalUrl)?y=(j=a.callToAction.linkOptions)==null?void 0:j.externalUrl:((S=a.callToAction.linkOptions)==null?void 0:S.linkType)==="internal"&&((_=(x=a.callToAction.linkOptions)==null?void 0:x.internalUrl)!=null&&_.slug.current)&&(y=`/${(M=(L=a.callToAction.linkOptions)==null?void 0:L.internalUrl)==null?void 0:M.slug.current}`),s.jsxs("div",{className:e.styles.spotlight,children:[a.image&&s.jsx("div",{className:e.styles.imageWrapper,children:s.jsx("img",{src:(a==null?void 0:a.image.imageUrl)??"",alt:w||a.image.asset.description||"Content image",width:600,height:400})}),s.jsxs("div",{className:e.styles.content,children:[a.title&&s.jsx("div",{className:e.styles.title,children:m==null?void 0:m(a.title,e.styles.title)}),a.description&&s.jsx("div",{className:e.styles.description,children:m==null?void 0:m(a.description,e.styles.description)})]}),((u=a.callToAction)==null?void 0:u.linkOptions)&&s.jsx("div",{className:e.styles.actions,children:s.jsx(O.CallToAction,{as:"a",variant:a.callToAction.variant??"primary",href:y,target:f?"_blank":"_self",rel:f?"noopener noreferrer":"","aria-label":a.callToAction.ariaLabel||a.callToAction.label,children:a.callToAction.label})})]})};function Ae({renderText:a,title:m,logo:w,items:f,groups:y,utilityItems:t,isSticky:C=!1,showSearch:k=!0,showLocaleSelect:p=!0,alignment:j="right",variant:S="standard",navigationType:x="default",searchComponent:_,localeSelectComponent:L,className:M}){const[u,U]=r.useState(!1),[X,b]=r.useState(null),[ce,re]=r.useState(0),[oe,de]=r.useState(!1),[ue,ye]=r.useState(null),[o,N]=r.useState([]),[E,q]=r.useState(0),[he,H]=r.useState(null),[$,me]=r.useState(!1),[A,T]=r.useState("forward"),B=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} ${e.styles.searchWrapper}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(te.Modal,{className:e.styles.searchModal,trigger:s.jsx("button",{role:"button",title:"Search","aria-label":"Search",className:e.styles.search,children:s.jsx(_e,{size:16})}),content:_})})}),V=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} `,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(te.Modal,{className:e.styles.localeModal,trigger:s.jsx("button",{title:"Locale Select","aria-label":"Locale Select",role:"button",className:e.styles.locale,children:s.jsx(ge,{size:16})}),content:L})})});r.useEffect(()=>{if(typeof window<"u"){const l=()=>{const n=window.innerWidth<768;me(n)};return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)}},[]);const be=()=>{N([])},fe=l=>{T("forward"),N([{title:l.title,primary:l.primaryItems??[],secondary:l.secondaryItems??[],description:""}])},J=l=>{T("forward"),N(n=>[...n,{title:l.label,primary:l.sublinks??[],secondary:[],description:l.description}])},xe=()=>{T("backward"),N(l=>l.slice(0,-1))},F=r.useRef(null),g=r.useRef(null),W=r.useRef(new Map),ke=()=>{U(l=>{const n=!l;return n||(N([]),T("forward"),b(null)),n})},K=l=>{const n=W.current.get(l);if(n&&g.current){const d=n.getBoundingClientRect(),h=g.current.getBoundingClientRect(),c=d.left-h.left+d.width/2;ye(c)}},je=l=>{b(n=>n===l?null:l)},Q=r.useCallback(l=>{F.current&&!F.current.contains(l.target)&&b(null)},[]),Y=r.useCallback(()=>{Z(),typeof window<"u"&&window.innerWidth>768&&(U(!1),b(null),typeof document<"u"&&(document.body.style.overflow=""))},[]),Z=r.useCallback(()=>{if(g.current){const l=g.current.getBoundingClientRect().width;re(l),de(!0)}},[]);r.useEffect(()=>{const l=typeof window<"u",n=typeof document<"u";return l&&window.addEventListener("resize",Y),n&&document.addEventListener("click",Q),Z(),()=>{l&&window.removeEventListener("resize",Y),n&&document.removeEventListener("click",Q)}},[]),r.useEffect(()=>{if(typeof document<"u")return u?setTimeout(()=>{I.lockScroll()},0):I.unlockScroll(),()=>I.unlockScroll()},[u]);const ve=l=>l.map((n,d)=>{var P,ee,se,le,ne;const h=`group-${d}`,z=he===d,c=(P=n.primaryItems)==null?void 0:P[E??0];return s.jsxs("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,onMouseEnter:()=>{H(d),b(h),K(h)},onMouseLeave:()=>{H(null),q(0),b(null)},children:[s.jsx("div",{className:e.styles.linkItem,children:s.jsxs("button",{ref:i=>{W.current.set(h,i)},role:"menuitem","aria-haspopup":"true","aria-expanded":z,"aria-controls":`submenu-${d}`,className:`${e.styles.sublinkToggle} ${z?e.styles.open:""} `,children:[n.title,s.jsx(Ne.ChevronDown,{size:18,className:e.styles.chevron})]})}),s.jsx("div",{id:`submenu-${d}`,className:`${e.styles.sublinks} ${z?e.styles.show:""}`,role:"menu","aria-label":`${n.title} submenu`,children:s.jsx("div",{children:s.jsxs("div",{className:`${e.styles.sublinksInner} ${n.spotlight?e.styles.withSpotlight:e.styles.withoutSpotlight}`,children:[s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.primaryColumn}`,children:[s.jsx("div",{className:e.styles.linkItem}),(ee=n.primaryItems)==null?void 0:ee.map((i,v)=>i.href?s.jsxs("a",{href:i.href,className:`${e.styles.link} ${E===v?e.styles.open:""}`,target:i.isExternal?"_blank":"_self",rel:i.isExternal?"noopener noreferrer":void 0,onClick:()=>{var ae;b(null),(ae=i.onClick)==null||ae.call(i)},onMouseEnter:()=>i.sublinks?q(v):null,role:"menuitem",children:[s.jsxs("span",{className:e.styles.linkContent,children:[i.label,i.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:i.subtitle})]}),i.isExternal&&s.jsx(D.ExternalLink,{className:e.styles.newTabIcon,size:16})]},i._key??v):s.jsx("button",{role:"menuitem",className:`${e.styles.sublinkToggle} ${E===v?e.styles.open:""}`,onMouseEnter:()=>q(v),children:s.jsxs("span",{className:e.styles.linkContent,children:[i.label,i.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:i.subtitle})]})},i._key??v))]}),(c==null?void 0:c.sublinks)&&((se=c==null?void 0:c.sublinks)==null?void 0:se.length)>0&&s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.fadeInFromLeft}`,children:[(c==null?void 0:c.description)&&s.jsxs("div",{className:e.styles.sublinksDescription,children:[s.jsx("p",{children:"TEXT HERE"}),a==null?void 0:a(c.description)]}),(c==null?void 0:c.sublinks)&&R(c.sublinks,`${h}-${E}`)]},`${c.label}-${(le=c==null?void 0:c.sublinks)==null?void 0:le.length}`),(n==null?void 0:n.secondaryItems)&&((ne=n==null?void 0:n.secondaryItems)==null?void 0:ne.length)>0&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.secondaryColumn}`,children:n.secondaryItems&&n.secondaryItems.length>0&&R(n.secondaryItems,`${h}-secondary`)}),n.spotlight&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.spotlightColumn}`,children:s.jsx(Ee,{spotlight:n.spotlight,renderText:a??(i=>String(i))})})]})})})]},n._key??`group-${d}`)}),R=(l,n="")=>l.map(d=>{const h=`${n}/${d.label}`;return s.jsx(e.NavLink,{link:d,path:h,parentPath:n,openPath:X,togglePath:je,updateTriangleIndicator:K,setOpenPath:b,renderLinks:R,buttonRefs:W},d._key??h)});return s.jsx("header",{ref:F,className:`${M??""} ${Me[j]} ${Le[S]} ${e.styles.navbar} ${C?e.styles.sticky:""} ${y&&y.length?e.styles.advanced:e.styles.default}`,"aria-label":"Main navigation",children:s.jsxs("div",{className:`${e.styles.container} ${(!t||t.length===0)&&j!=="center"?e.styles.twoColumn:""}`,children:[w?s.jsx("div",{className:e.styles.logo,children:w}):s.jsx("div",{className:e.styles.title,children:m}),s.jsx("nav",{ref:g,style:{left:j==="center"?`calc(50% - ${ce/2}px)`:"0"},className:`${e.styles.nav} ${u?e.styles.open:""} ${oe?e.styles.visible:e.styles.hidden}`,id:"main-menu",role:"menubar","aria-label":"Main navigation",children:s.jsxs("div",{className:e.styles.navInner,children:[s.jsx("svg",{style:{left:`${ue}px`},className:`${e.styles.triangle} ${X?e.styles.show:""}`,width:16,height:12,viewBox:"0 0 100 75",xmlns:"http://www.w3.org/2000/svg",children:s.jsx("polygon",{points:"50,5 95,70 5,70",strokeLinejoin:"round",fill:"white",stroke:"white"})}),x==="default"&&f&&s.jsxs("div",{className:e.styles.grid,children:[f&&f.length>0&&R(f),k&&!$&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:e.styles.separator}),s.jsx(B,{})]}),p&&s.jsx(V,{})]}),!$&&x==="advanced"&&y&&s.jsxs("div",{className:e.styles.grid,children:[y.length>0&&ve(y),k&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:e.styles.separator}),s.jsx(B,{})]}),p&&s.jsx(V,{})]}),$&&x==="advanced"&&u&&o.length===0&&y&&s.jsx("div",{className:`${e.styles.mobileMenu}`,children:y.map((l,n)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${A==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:s.jsx("button",{role:"menuitem",className:e.styles.sublinkToggle,onClick:()=>fe(l),children:l.title})},l._key??n))}),$&&x==="advanced"&&u&&o.length>0&&s.jsxs("div",{className:`${e.styles.mobileMenuSlide} `,children:[s.jsx("button",{role:"menuitem",className:e.styles.back,onClick:o.length===1?be:xe,children:s.jsx(O.ChevronLeft,{size:18,"aria-hidden":"true",focusable:"false"})}),o[o.length-1].description&&s.jsx("div",{className:`${e.styles.sublinksDescription} ${A==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:a==null?void 0:a(o[o.length-1].description)}),o[o.length-1].primary.map((l,n)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${A==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:l.sublinks?s.jsx("button",{role:"menuitem",className:e.styles.sublinkToggle,onClick:()=>J(l),children:s.jsxs("span",{className:e.styles.linkContent,children:[l.label,l.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:l.subtitle})]})}):s.jsxs("a",{href:l.href,className:e.styles.link,target:l.isExternal?"_blank":"_self",rel:l.isExternal?"noopener noreferrer":void 0,role:"menuitem",children:[s.jsxs("span",{className:e.styles.linkContent,children:[l.label,l.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:l.subtitle})]}),l.isExternal&&s.jsx(D.ExternalLink,{className:e.styles.newTabIcon,size:16})]})},l._key??`primary-${n}`)),o[o.length-1].secondary.length>0&&s.jsx("hr",{className:e.styles.groupDivider}),o[o.length-1].secondary.map((l,n)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${A==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:l.sublinks?s.jsx("button",{role:"menuitem",className:e.styles.sublinkToggle,onClick:()=>J(l),children:l.label}):s.jsxs("a",{href:l.href,className:e.styles.link,target:l.isExternal?"_blank":"_self",rel:l.isExternal?"noopener noreferrer":void 0,role:"menuitem",children:[l.label,l.isExternal&&s.jsx(D.ExternalLink,{className:e.styles.newTabIcon,size:16})]})},l._key??`secondary-${n}`))]},`stack-${o.length}`)]})}),t&&t.length>0&&s.jsx("nav",{className:e.styles.utility,role:"menu","aria-label":"Utility navigation",children:s.jsx(ie.ButtonGroup,{children:t.map((l,n)=>s.jsx(O.CallToAction,{as:"a",href:l.href??"/",variant:l.variant??"primary",displayType:l.displayType??"text",imageSrc:l.imageSrc,imageAlt:l.imageAlt,"aria-label":l.ariaLabel??l.label,icon:l.icon,iconAlignment:l.iconAlignment,role:"menuitem",children:l.imageSrc?s.jsx("img",{src:l.imageSrc,alt:l.imageAlt??l.ariaLabel??l.label}):l.label},l._key||n))})}),t&&t.length>0&&s.jsx("nav",{role:"menu","aria-label":"Utility navigation",className:`${e.styles.utilityMobile} ${u?e.styles.open:""}`,children:s.jsx(ie.ButtonGroup,{alignment:"center",children:s.jsx(O.CallToAction,{as:"a",href:t[1].href??"/",variant:t[1].variant??"primary",displayType:t[1].displayType??"text",imageSrc:t[1].imageSrc,imageAlt:t[1].imageAlt,"aria-label":t[1].ariaLabel??t[1].label,icon:t[1].icon,iconAlignment:t[1].iconAlignment,role:"menuitem",children:t[1].imageSrc?s.jsx("img",{src:t[1].imageSrc,"aria-label":t[1].imageAlt??t[1].ariaLabel??t[1].label}):t[1].label})})}),s.jsxs("div",{className:e.styles.mobileButtons,children:[$&&k&&s.jsx(B,{}),s.jsx("button",{className:e.styles.menuToggle,onClick:ke,"aria-label":u?"Close menu":"Open menu","aria-expanded":u,"aria-controls":"main-menu",children:u?s.jsx(pe.X,{size:24}):s.jsx(Ce,{size:24})})]})]})})}exports.Navbar=Ae;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as a, jsxs as c, Fragment as oe } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as b, useEffect as U, useRef as I, useCallback as G } from "react";
|
|
3
3
|
import { Modal as te } from "../Modal/index.mjs";
|
|
4
4
|
import { a as Me, C as H } from "../../../index-C-E0ib2G.js";
|
|
5
5
|
import { ButtonGroup as de } from "../ButtonGroup/index.mjs";
|
|
6
6
|
import { s as e, N as Ee } from "../../../NavLink-CsNKwUSm.js";
|
|
7
|
-
import { lockScroll as Ae, unlockScroll as
|
|
7
|
+
import { lockScroll as Ae, unlockScroll as he } from "../../utils/NoScroll/noScroll.mjs";
|
|
8
8
|
import { E as X } from "../../../external-link-BOPobeQJ.js";
|
|
9
9
|
import { X as Se } from "../../../x-CnsEH4Ox.js";
|
|
10
10
|
import { c as V } from "../../../createLucideIcon-C8GTh_Qx.js";
|
|
@@ -56,12 +56,12 @@ const Oe = [
|
|
|
56
56
|
right: e.right
|
|
57
57
|
}, je = ({
|
|
58
58
|
spotlight: i,
|
|
59
|
-
renderText:
|
|
59
|
+
renderText: f
|
|
60
60
|
}) => {
|
|
61
|
-
var s, E, N, w, $, A, p, S, _, z,
|
|
61
|
+
var s, E, N, w, $, A, p, S, _, z, h;
|
|
62
62
|
const M = (s = i.image) == null ? void 0 : s.asset.altText, v = ((E = i.callToAction.linkOptions) == null ? void 0 : E.linkType) === "external";
|
|
63
|
-
let
|
|
64
|
-
return ((N = i.callToAction.linkOptions) == null ? void 0 : N.linkType) === "external" && ((w = i.callToAction.linkOptions) != null && w.externalUrl) ?
|
|
63
|
+
let m = "#";
|
|
64
|
+
return ((N = i.callToAction.linkOptions) == null ? void 0 : N.linkType) === "external" && ((w = i.callToAction.linkOptions) != null && w.externalUrl) ? m = ($ = i.callToAction.linkOptions) == null ? void 0 : $.externalUrl : ((A = i.callToAction.linkOptions) == null ? void 0 : A.linkType) === "internal" && ((S = (p = i.callToAction.linkOptions) == null ? void 0 : p.internalUrl) != null && S.slug.current) && (m = `/${(z = (_ = i.callToAction.linkOptions) == null ? void 0 : _.internalUrl) == null ? void 0 : z.slug.current}`), /* @__PURE__ */ c("div", { className: e.spotlight, children: [
|
|
65
65
|
i.image && /* @__PURE__ */ a("div", { className: e.imageWrapper, children: /* @__PURE__ */ a(
|
|
66
66
|
"img",
|
|
67
67
|
{
|
|
@@ -72,15 +72,15 @@ const Oe = [
|
|
|
72
72
|
}
|
|
73
73
|
) }),
|
|
74
74
|
/* @__PURE__ */ c("div", { className: e.content, children: [
|
|
75
|
-
i.title && /* @__PURE__ */ a("div", { className: e.title, children:
|
|
76
|
-
i.description && /* @__PURE__ */ a("div", { className: e.description, children:
|
|
75
|
+
i.title && /* @__PURE__ */ a("div", { className: e.title, children: f == null ? void 0 : f(i.title, e.title) }),
|
|
76
|
+
i.description && /* @__PURE__ */ a("div", { className: e.description, children: f == null ? void 0 : f(i.description, e.description) })
|
|
77
77
|
] }),
|
|
78
|
-
((
|
|
78
|
+
((h = i.callToAction) == null ? void 0 : h.linkOptions) && /* @__PURE__ */ a("div", { className: e.actions, children: /* @__PURE__ */ a(
|
|
79
79
|
H,
|
|
80
80
|
{
|
|
81
81
|
as: "a",
|
|
82
82
|
variant: i.callToAction.variant ?? "primary",
|
|
83
|
-
href:
|
|
83
|
+
href: m,
|
|
84
84
|
target: v ? "_blank" : "_self",
|
|
85
85
|
rel: v ? "noopener noreferrer" : "",
|
|
86
86
|
"aria-label": i.callToAction.ariaLabel || i.callToAction.label,
|
|
@@ -91,10 +91,10 @@ const Oe = [
|
|
|
91
91
|
};
|
|
92
92
|
function Ye({
|
|
93
93
|
renderText: i,
|
|
94
|
-
title:
|
|
94
|
+
title: f,
|
|
95
95
|
logo: M,
|
|
96
96
|
items: v,
|
|
97
|
-
groups:
|
|
97
|
+
groups: m,
|
|
98
98
|
utilityItems: s,
|
|
99
99
|
isSticky: E = !1,
|
|
100
100
|
showSearch: N = !0,
|
|
@@ -106,9 +106,9 @@ function Ye({
|
|
|
106
106
|
localeSelectComponent: _,
|
|
107
107
|
className: z
|
|
108
108
|
}) {
|
|
109
|
-
const [
|
|
109
|
+
const [h, q] = b(!1), [J, k] = b(null), [me, ue] = b(0), [be, fe] = b(!1), [ke, ve] = b(null), [t, y] = b([]), [T, F] = b(
|
|
110
110
|
0
|
|
111
|
-
), [pe, K] =
|
|
111
|
+
), [pe, K] = b(null), [C, Ne] = b(!1), [x, R] = b("forward"), B = () => /* @__PURE__ */ a(
|
|
112
112
|
"div",
|
|
113
113
|
{
|
|
114
114
|
className: `${e.linkWrapper} ${e.parent} ${e.searchWrapper}`,
|
|
@@ -119,7 +119,7 @@ function Ye({
|
|
|
119
119
|
trigger: /* @__PURE__ */ a(
|
|
120
120
|
"button",
|
|
121
121
|
{
|
|
122
|
-
role: "
|
|
122
|
+
role: "button",
|
|
123
123
|
title: "Search",
|
|
124
124
|
"aria-label": "Search",
|
|
125
125
|
className: e.search,
|
|
@@ -139,7 +139,7 @@ function Ye({
|
|
|
139
139
|
{
|
|
140
140
|
title: "Locale Select",
|
|
141
141
|
"aria-label": "Locale Select",
|
|
142
|
-
role: "
|
|
142
|
+
role: "button",
|
|
143
143
|
className: e.locale,
|
|
144
144
|
children: /* @__PURE__ */ a(Te, { size: 16 })
|
|
145
145
|
}
|
|
@@ -199,7 +199,7 @@ function Ye({
|
|
|
199
199
|
}, []), ne = G(() => {
|
|
200
200
|
if (L.current) {
|
|
201
201
|
const n = L.current.getBoundingClientRect().width;
|
|
202
|
-
ue(n),
|
|
202
|
+
ue(n), fe(!0);
|
|
203
203
|
}
|
|
204
204
|
}, []);
|
|
205
205
|
U(() => {
|
|
@@ -209,10 +209,10 @@ function Ye({
|
|
|
209
209
|
};
|
|
210
210
|
}, []), U(() => {
|
|
211
211
|
if (typeof document < "u")
|
|
212
|
-
return
|
|
212
|
+
return h ? setTimeout(() => {
|
|
213
213
|
Ae();
|
|
214
|
-
}, 0) :
|
|
215
|
-
}, [
|
|
214
|
+
}, 0) : he(), () => he();
|
|
215
|
+
}, [h]);
|
|
216
216
|
const Le = (n) => n.map((l, d) => {
|
|
217
217
|
var ae, le, ie, se, ce;
|
|
218
218
|
const u = `group-${d}`, W = pe === d, o = (ae = l.primaryItems) == null ? void 0 : ae[T ?? 0];
|
|
@@ -376,22 +376,22 @@ function Ye({
|
|
|
376
376
|
"header",
|
|
377
377
|
{
|
|
378
378
|
ref: j,
|
|
379
|
-
className: `${z ?? ""} ${Be[$]} ${Fe[A]} ${e.navbar} ${E ? e.sticky : ""} ${
|
|
379
|
+
className: `${z ?? ""} ${Be[$]} ${Fe[A]} ${e.navbar} ${E ? e.sticky : ""} ${m && m.length ? e.advanced : e.default}`,
|
|
380
380
|
"aria-label": "Main navigation",
|
|
381
381
|
children: /* @__PURE__ */ c(
|
|
382
382
|
"div",
|
|
383
383
|
{
|
|
384
384
|
className: `${e.container} ${(!s || s.length === 0) && $ !== "center" ? e.twoColumn : ""}`,
|
|
385
385
|
children: [
|
|
386
|
-
M ? /* @__PURE__ */ a("div", { className: e.logo, children: M }) : /* @__PURE__ */ a("div", { className: e.title, children:
|
|
386
|
+
M ? /* @__PURE__ */ a("div", { className: e.logo, children: M }) : /* @__PURE__ */ a("div", { className: e.title, children: f }),
|
|
387
387
|
/* @__PURE__ */ a(
|
|
388
388
|
"nav",
|
|
389
389
|
{
|
|
390
390
|
ref: L,
|
|
391
391
|
style: {
|
|
392
|
-
left: $ === "center" ? `calc(50% - ${
|
|
392
|
+
left: $ === "center" ? `calc(50% - ${me / 2}px)` : "0"
|
|
393
393
|
},
|
|
394
|
-
className: `${e.nav} ${
|
|
394
|
+
className: `${e.nav} ${h ? e.open : ""} ${be ? e.visible : e.hidden}`,
|
|
395
395
|
id: "main-menu",
|
|
396
396
|
role: "menubar",
|
|
397
397
|
"aria-label": "Main navigation",
|
|
@@ -424,15 +424,15 @@ function Ye({
|
|
|
424
424
|
] }),
|
|
425
425
|
w && /* @__PURE__ */ a(Q, {})
|
|
426
426
|
] }),
|
|
427
|
-
!C && p === "advanced" &&
|
|
428
|
-
|
|
427
|
+
!C && p === "advanced" && m && /* @__PURE__ */ c("div", { className: e.grid, children: [
|
|
428
|
+
m.length > 0 && Le(m),
|
|
429
429
|
N && /* @__PURE__ */ c(oe, { children: [
|
|
430
430
|
/* @__PURE__ */ a("span", { className: e.separator }),
|
|
431
431
|
/* @__PURE__ */ a(B, {})
|
|
432
432
|
] }),
|
|
433
433
|
w && /* @__PURE__ */ a(Q, {})
|
|
434
434
|
] }),
|
|
435
|
-
C && p === "advanced" &&
|
|
435
|
+
C && p === "advanced" && h && t.length === 0 && m && /* @__PURE__ */ a("div", { className: `${e.mobileMenu}`, children: m.map((n, l) => /* @__PURE__ */ a(
|
|
436
436
|
"div",
|
|
437
437
|
{
|
|
438
438
|
className: `${e.mobileMenuItem} ${x === "forward" ? e.fadeInFromLeft : e.fadeInFromRight}`,
|
|
@@ -448,7 +448,7 @@ function Ye({
|
|
|
448
448
|
},
|
|
449
449
|
n._key ?? l
|
|
450
450
|
)) }),
|
|
451
|
-
C && p === "advanced" &&
|
|
451
|
+
C && p === "advanced" && h && t.length > 0 && /* @__PURE__ */ c(
|
|
452
452
|
"div",
|
|
453
453
|
{
|
|
454
454
|
className: `${e.mobileMenuSlide} `,
|
|
@@ -600,7 +600,7 @@ function Ye({
|
|
|
600
600
|
{
|
|
601
601
|
role: "menu",
|
|
602
602
|
"aria-label": "Utility navigation",
|
|
603
|
-
className: `${e.utilityMobile} ${
|
|
603
|
+
className: `${e.utilityMobile} ${h ? e.open : ""}`,
|
|
604
604
|
children: /* @__PURE__ */ a(de, { alignment: "center", children: /* @__PURE__ */ a(
|
|
605
605
|
H,
|
|
606
606
|
{
|
|
@@ -632,10 +632,10 @@ function Ye({
|
|
|
632
632
|
{
|
|
633
633
|
className: e.menuToggle,
|
|
634
634
|
onClick: ye,
|
|
635
|
-
"aria-label":
|
|
636
|
-
"aria-expanded":
|
|
635
|
+
"aria-label": h ? "Close menu" : "Open menu",
|
|
636
|
+
"aria-expanded": h,
|
|
637
637
|
"aria-controls": "main-menu",
|
|
638
|
-
children:
|
|
638
|
+
children: h ? /* @__PURE__ */ a(Se, { size: 24 }) : /* @__PURE__ */ a(Re, { size: 24 })
|
|
639
639
|
}
|
|
640
640
|
)
|
|
641
641
|
] })
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const p=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],f=y.createLucideIcon("arrow-up-right",p),v="_item_1d7j0_1",I="_itemImage_1d7j0_14",N="_itemTitle_1d7j0_20",T="_callToAction_1d7j0_26",b="_icon_1d7j0_33",C="_single_1d7j0_39",E="_first_1d7j0_40",w="_itemContent_1d7j0_41",A="_itemExcerpt_1d7j0_113",$="_imagePlaceholder_1d7j0_179",L="_category_1d7j0_223",k="_itemEyebrow_1d7j0_242",i={item:v,itemImage:I,itemTitle:N,callToAction:T,icon:b,single:C,first:E,itemContent:w,itemExcerpt:A,imagePlaceholder:$,category:L,itemEyebrow:k};function q({article:e,className:_="",index:g,limit:u}){var a,l,m,d;const j=`/blog/articles/${e.slug.current}`,r=((a=e.categories)==null?void 0:a.find(n=>{var s,c;return!((c=(s=n.slug)==null?void 0:s.current)!=null&&c.startsWith("library/type"))}))??null,o=((l=e.categories)==null?void 0:l.find(n=>{var s,c;return(c=(s=n.slug)==null?void 0:s.current)==null?void 0:c.startsWith("library/type")}))??null;return t.jsxs(h.LocaleLink,{href:j,className:`${i.item} ${_??""} ${g===0?i.first:""} ${u===1?i.single:""}`,children:[t.jsxs("div",{className:i.itemImage,children:[o&&t.jsx("div",{className:i.category,children:o.title}),e.featuredImage&&e.featuredImage.imageUrl?t.jsx(x,{src:e.featuredImage.imageUrl??"",alt:((m=e.featuredImage)==null?void 0:m.asset.altText)||((d=e==null?void 0:e.featuredImage)==null?void 0:d.asset.description)||"Content image",fill:!0,sizes:"(max-width: 767px)
|
|
6
|
+
*/const p=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],f=y.createLucideIcon("arrow-up-right",p),v="_item_1d7j0_1",I="_itemImage_1d7j0_14",N="_itemTitle_1d7j0_20",T="_callToAction_1d7j0_26",b="_icon_1d7j0_33",C="_single_1d7j0_39",E="_first_1d7j0_40",w="_itemContent_1d7j0_41",A="_itemExcerpt_1d7j0_113",$="_imagePlaceholder_1d7j0_179",L="_category_1d7j0_223",k="_itemEyebrow_1d7j0_242",i={item:v,itemImage:I,itemTitle:N,callToAction:T,icon:b,single:C,first:E,itemContent:w,itemExcerpt:A,imagePlaceholder:$,category:L,itemEyebrow:k};function q({article:e,className:_="",index:g,limit:u}){var a,l,m,d;const j=`/blog/articles/${e.slug.current}`,r=((a=e.categories)==null?void 0:a.find(n=>{var s,c;return!((c=(s=n.slug)==null?void 0:s.current)!=null&&c.startsWith("library/type"))}))??null,o=((l=e.categories)==null?void 0:l.find(n=>{var s,c;return(c=(s=n.slug)==null?void 0:s.current)==null?void 0:c.startsWith("library/type")}))??null;return t.jsxs(h.LocaleLink,{href:j,className:`${i.item} ${_??""} ${g===0?i.first:""} ${u===1?i.single:""}`,children:[t.jsxs("div",{className:i.itemImage,children:[o&&t.jsx("div",{className:i.category,children:o.title}),e.featuredImage&&e.featuredImage.imageUrl?t.jsx(x,{src:e.featuredImage.imageUrl??"",alt:((m=e.featuredImage)==null?void 0:m.asset.altText)||((d=e==null?void 0:e.featuredImage)==null?void 0:d.asset.description)||"Content image",fill:!0,sizes:"(max-width: 767px) 650px, 300px",priority:!0}):t.jsx("div",{className:i.imagePlaceholder})]}),t.jsxs("div",{className:i.itemContent,children:[r&&t.jsx("div",{className:i.itemEyebrow,children:r.title}),t.jsxs("div",{className:i.itemTitle,children:[t.jsx("h3",{children:e.title}),t.jsx("div",{className:i.callToAction,children:t.jsx("div",{className:i.icon,children:t.jsx(f,{size:45})})})]}),e.excerpt&&t.jsx("p",{className:i.itemExcerpt,children:e.excerpt})]})]})}exports.BlogArticleCard=q;
|
|
@@ -58,7 +58,7 @@ function B({
|
|
|
58
58
|
src: e.featuredImage.imageUrl ?? "",
|
|
59
59
|
alt: ((d = e.featuredImage) == null ? void 0 : d.asset.altText) || ((_ = e == null ? void 0 : e.featuredImage) == null ? void 0 : _.asset.description) || "Content image",
|
|
60
60
|
fill: !0,
|
|
61
|
-
sizes: "(max-width: 767px)
|
|
61
|
+
sizes: "(max-width: 767px) 650px, 300px",
|
|
62
62
|
priority: !0
|
|
63
63
|
}
|
|
64
64
|
) : /* @__PURE__ */ i("div", { className: t.imagePlaceholder })
|