quirk-ui 0.1.26 → 0.1.28

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.
@@ -1 +1 @@
1
- "use strict";require('./assets/NavLink.css');const e=require("react/jsx-runtime"),d=require("react"),h=require("./external-link-DDShu-48.cjs"),k=require("./chevron-down-DfK1XBl3.cjs"),v="_navbar_p4o24_5",f="_sticky_p4o24_19",I="_left_p4o24_35",C="_container_p4o24_36",M="_logo_p4o24_40",w="_nav_p4o24_5",y="_center_p4o24_55",x="_hidden_p4o24_63",T="_visible_p4o24_70",N="_right_p4o24_85",j="_title_p4o24_92",S="_linkWrapper_p4o24_102",W="_parent_p4o24_102",$="_linkItem_p4o24_109",D="_link_p4o24_102",L="_search_p4o24_115",E="_locale_p4o24_116",F="_themeToggle_p4o24_117",q="_sublinkToggle_p4o24_118",R="_standard_p4o24_169",B="_triangle_p4o24_177",z="_twoColumn_p4o24_204",A="_mobileButtons_p4o24_213",G="_menuToggle_p4o24_281",H="_utilityMobile_p4o24_299",J="_utility_p4o24_299",K="_navInner_p4o24_327",Q="_grid_p4o24_338",U="_searchModal_p4o24_357",V="_localeModal_p4o24_358",X="_separator_p4o24_377",Y="_newTabIcon_p4o24_408",Z="_sublinksDescription_p4o24_421",O="_linkContent_p4o24_424",P="_open_p4o24_437",oo="_back_p4o24_461",no="_sublinks_p4o24_421",eo="_show_p4o24_510",to="_primaryColumn_p4o24_559",so="_secondaryColumn_p4o24_568",_o="_spotlightColumn_p4o24_572",io="_sublinksInner_p4o24_576",lo="_sublinksColumn_p4o24_596",ro="_chevron_p4o24_606",co="_advanced_p4o24_798",ao="_subtitle_p4o24_807",po="_withSpotlight_p4o24_849",uo="_withoutSpotlight_p4o24_853",mo="_transparent_p4o24_891",bo="_groupDivider_p4o24_1002",go="_searchWrapper_p4o24_1010",ho="_mobileMenu_p4o24_1017",ko="_mobileMenuSlide_p4o24_1018",vo="_mobileMenuItem_p4o24_1028",fo="_fadeInFromLeft_p4o24_1032",Io="_fadeInFromRight_p4o24_1036",Co="_spotlight_p4o24_572",Mo="_imageWrapper_p4o24_1046",wo="_content_p4o24_1068",yo="_description_p4o24_1083",xo="_actions_p4o24_1087",n={navbar:v,sticky:f,left:I,container:C,logo:M,nav:w,center:y,hidden:x,visible:T,right:N,title:j,linkWrapper:S,parent:W,linkItem:$,link:D,search:L,locale:E,themeToggle:F,sublinkToggle:q,standard:R,triangle:B,twoColumn:z,mobileButtons:A,menuToggle:G,utilityMobile:H,utility:J,navInner:K,grid:Q,searchModal:U,localeModal:V,separator:X,newTabIcon:Y,sublinksDescription:Z,linkContent:O,open:P,back:oo,sublinks:no,show:eo,primaryColumn:to,secondaryColumn:so,spotlightColumn:_o,sublinksInner:io,sublinksColumn:lo,chevron:ro,default:"_default_p4o24_729",advanced:co,subtitle:ao,withSpotlight:po,withoutSpotlight:uo,transparent:mo,groupDivider:bo,searchWrapper:go,mobileMenu:ho,mobileMenuSlide:ko,mobileMenuItem:vo,fadeInFromLeft:fo,fadeInFromRight:Io,spotlight:Co,imageWrapper:Mo,content:wo,description:yo,actions:xo};function To({link:o,path:t,parentPath:r,openPath:m,togglePath:c,updateTriangleIndicator:b,setOpenPath:_,renderLinks:g,buttonRefs:i}){var p;const l=m===t,s=!!((p=o.sublinks)!=null&&p.length),a=d.useRef(null);return d.useEffect(()=>(i.current.set(t,a.current),()=>{i.current.delete(t)}),[t,i]),e.jsxs("div",{className:`${n.linkWrapper} ${r?"":n.parent}`,children:[e.jsx("div",{className:n.linkItem,children:o.href?e.jsxs("a",{href:o.href,className:n.link,target:o.isExternal?"_blank":"_self",rel:o.isExternal?"noopener noreferrer":void 0,onClick:()=>{var u;_(null),(u=o.onClick)==null||u.call(o)},onMouseEnter:()=>{r||_(null)},role:"menuitem",children:[o.label,o.isExternal&&e.jsx(h.ExternalLink,{className:n.newTabIcon,size:16,"aria-hidden":"true"})]}):e.jsxs("button",{ref:a,"aria-haspopup":s?!0:void 0,"aria-expanded":s?l:void 0,className:`${n.sublinkToggle} ${l?n.open:""}`,onClick:()=>c(t),onMouseEnter:()=>{b(t),_(t)},children:[o.label,s&&e.jsx(k.ChevronDown,{size:18,className:n.chevron,"aria-hidden":"true"})]})}),s&&e.jsx("div",{className:`${n.sublinks} ${l?n.show:""}`,onMouseLeave:()=>c(t),role:"menu","aria-label":`${o.label} submenu`,children:e.jsx("div",{children:e.jsx("div",{className:n.sublinksInner,children:e.jsx("div",{className:n.sublinksColumn,children:g(o.sublinks,t)})})})})]})}exports.NavLink=To;exports.styles=n;
1
+ "use strict";require('./assets/NavLink.css');const e=require("react/jsx-runtime"),d=require("react"),h=require("./external-link-DDShu-48.cjs"),k=require("./chevron-down-DfK1XBl3.cjs"),v="_navbar_p4o24_5",f="_sticky_p4o24_19",I="_left_p4o24_35",C="_container_p4o24_36",M="_logo_p4o24_40",w="_nav_p4o24_5",y="_center_p4o24_55",x="_hidden_p4o24_63",T="_visible_p4o24_70",N="_right_p4o24_85",j="_title_p4o24_92",S="_linkWrapper_p4o24_102",W="_parent_p4o24_102",$="_linkItem_p4o24_109",D="_link_p4o24_102",L="_search_p4o24_115",E="_locale_p4o24_116",F="_themeToggle_p4o24_117",q="_sublinkToggle_p4o24_118",R="_standard_p4o24_169",B="_triangle_p4o24_177",z="_twoColumn_p4o24_204",A="_mobileButtons_p4o24_213",G="_menuToggle_p4o24_281",H="_utilityMobile_p4o24_299",J="_utility_p4o24_299",K="_navInner_p4o24_327",Q="_grid_p4o24_338",U="_searchModal_p4o24_357",V="_localeModal_p4o24_358",X="_separator_p4o24_377",Y="_newTabIcon_p4o24_408",Z="_sublinksDescription_p4o24_421",O="_linkContent_p4o24_424",P="_open_p4o24_437",oo="_back_p4o24_461",no="_sublinks_p4o24_421",eo="_show_p4o24_510",to="_primaryColumn_p4o24_559",so="_secondaryColumn_p4o24_568",_o="_spotlightColumn_p4o24_572",io="_sublinksInner_p4o24_576",lo="_sublinksColumn_p4o24_596",ro="_chevron_p4o24_606",co="_advanced_p4o24_798",ao="_subtitle_p4o24_807",po="_withSpotlight_p4o24_849",uo="_withoutSpotlight_p4o24_853",mo="_transparent_p4o24_891",bo="_groupDivider_p4o24_1002",go="_searchWrapper_p4o24_1010",ho="_mobileMenu_p4o24_1017",ko="_mobileMenuSlide_p4o24_1018",vo="_mobileMenuItem_p4o24_1028",fo="_fadeInFromLeft_p4o24_1032",Io="_fadeInFromRight_p4o24_1036",Co="_spotlight_p4o24_572",Mo="_imageWrapper_p4o24_1046",wo="_content_p4o24_1068",yo="_description_p4o24_1083",xo="_actions_p4o24_1087",n={navbar:v,sticky:f,left:I,container:C,logo:M,nav:w,center:y,hidden:x,visible:T,right:N,title:j,linkWrapper:S,parent:W,linkItem:$,link:D,search:L,locale:E,themeToggle:F,sublinkToggle:q,standard:R,triangle:B,twoColumn:z,mobileButtons:A,menuToggle:G,utilityMobile:H,utility:J,navInner:K,grid:Q,searchModal:U,localeModal:V,separator:X,newTabIcon:Y,sublinksDescription:Z,linkContent:O,open:P,back:oo,sublinks:no,show:eo,primaryColumn:to,secondaryColumn:so,spotlightColumn:_o,sublinksInner:io,sublinksColumn:lo,chevron:ro,default:"_default_p4o24_729",advanced:co,subtitle:ao,withSpotlight:po,withoutSpotlight:uo,transparent:mo,groupDivider:bo,searchWrapper:go,mobileMenu:ho,mobileMenuSlide:ko,mobileMenuItem:vo,fadeInFromLeft:fo,fadeInFromRight:Io,spotlight:Co,imageWrapper:Mo,content:wo,description:yo,actions:xo};function To({link:o,path:t,parentPath:r,openPath:m,togglePath:c,updateTriangleIndicator:b,setOpenPath:_,renderLinks:g,buttonRefs:i}){var p;const l=m===t,s=!!((p=o.sublinks)!=null&&p.length),a=d.useRef(null);return d.useEffect(()=>(i.current.set(t,a.current),()=>{i.current.delete(t)}),[t,i]),e.jsxs("div",{role:"menuitem",className:`${n.linkWrapper} ${r?"":n.parent}`,children:[e.jsx("div",{className:n.linkItem,children:o.href?e.jsxs("a",{href:o.href,className:n.link,target:o.isExternal?"_blank":"_self",rel:o.isExternal?"noopener noreferrer":void 0,onClick:()=>{var u;_(null),(u=o.onClick)==null||u.call(o)},onMouseEnter:()=>{r||_(null)},children:[o.label,o.isExternal&&e.jsx(h.ExternalLink,{className:n.newTabIcon,size:16,"aria-hidden":"true"})]}):e.jsxs("button",{ref:a,"aria-haspopup":s?!0:void 0,"aria-expanded":s?l:void 0,className:`${n.sublinkToggle} ${l?n.open:""}`,onClick:()=>c(t),onMouseEnter:()=>{b(t),_(t)},children:[o.label,s&&e.jsx(k.ChevronDown,{size:18,className:n.chevron,"aria-hidden":"true"})]})}),s&&e.jsx("div",{className:`${n.sublinks} ${l?n.show:""}`,onMouseLeave:()=>c(t),role:"menu","aria-label":`${o.label} submenu`,children:e.jsx("div",{children:e.jsx("div",{className:n.sublinksInner,children:e.jsx("div",{className:n.sublinksColumn,children:g(o.sublinks,t)})})})})]})}exports.NavLink=To;exports.styles=n;
@@ -84,6 +84,7 @@ function $o({
84
84
  }), [e, i]), /* @__PURE__ */ r(
85
85
  "div",
86
86
  {
87
+ role: "menuitem",
87
88
  className: `${n.linkWrapper} ${c ? "" : n.parent}`,
88
89
  children: [
89
90
  /* @__PURE__ */ t("div", { className: n.linkItem, children: o.href ? /* @__PURE__ */ r(
@@ -100,7 +101,6 @@ function $o({
100
101
  onMouseEnter: () => {
101
102
  c || _(null);
102
103
  },
103
- role: "menuitem",
104
104
  children: [
105
105
  o.label,
106
106
  o.isExternal && /* @__PURE__ */ t(
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const e=require("../../../NavLink-Bld-qcLP.cjs");require("../../../external-link-DDShu-48.cjs");require("../../../chevron-down-DfK1XBl3.cjs");exports.NavLink=e.NavLink;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const e=require("../../../NavLink-BVoXgmyD.cjs");require("../../../external-link-DDShu-48.cjs");require("../../../chevron-down-DfK1XBl3.cjs");exports.NavLink=e.NavLink;
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { N as a } from "../../../NavLink-EFx91-2v.js";
3
+ import { N as a } from "../../../NavLink-Dxf80v5Z.js";
4
4
  import "../../../external-link-BOPobeQJ.js";
5
5
  import "../../../chevron-down-DSUzBz9F.js";
6
6
  export {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),a=require("react"),se=require("../Modal/index.cjs"),q=require("../../../index-CVFNs6JY.cjs"),le=require("../ButtonGroup/index.cjs"),e=require("../../../NavLink-Bld-qcLP.cjs"),U=require("../../utils/NoScroll/noScroll.cjs"),we=require("../../../chevron-right-motlyADs.cjs"),P=require("../../../external-link-DDShu-48.cjs"),Ce=require("../../../x-Dft9NVe_.cjs"),ne=require("../../../createLucideIcon-DpotSgUx.cjs"),_e=require("../../../chevron-down-DfK1XBl3.cjs");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),a=require("react"),se=require("../Modal/index.cjs"),q=require("../../../index-CVFNs6JY.cjs"),le=require("../ButtonGroup/index.cjs"),e=require("../../../NavLink-BVoXgmyD.cjs"),U=require("../../utils/NoScroll/noScroll.cjs"),we=require("../../../chevron-right-motlyADs.cjs"),P=require("../../../external-link-DDShu-48.cjs"),Ce=require("../../../x-Dft9NVe_.cjs"),ne=require("../../../createLucideIcon-DpotSgUx.cjs"),_e=require("../../../chevron-down-DfK1XBl3.cjs");/**
2
2
  * @license lucide-react v0.488.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -8,4 +8,4 @@
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const Le=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Me=ne.createLucideIcon("search",Le),Ee={standard:e.styles.standard,transparent:e.styles.transparent},Be={left:e.styles.left,center:e.styles.center,right:e.styles.right},Re=({spotlight:i,renderText:h})=>{var y,_,p,k,v,S;const r=i.callToAction;if(!r)return null;const j=((y=r.linkOptions)==null?void 0:y.linkType)==="external";let u="#";return j&&((_=r.linkOptions)!=null&&_.externalUrl)?u=r.linkOptions.externalUrl:((p=r.linkOptions)==null?void 0:p.linkType)==="internal"&&((v=(k=r.linkOptions)==null?void 0:k.internalUrl)!=null&&v.slug.current)&&(u=`/${r.linkOptions.internalUrl.slug.current}`),s.jsxs("div",{className:e.styles.spotlight,children:[i.image&&s.jsx("div",{className:e.styles.imageWrapper,children:s.jsx("img",{src:((S=i.image.imageUrls)==null?void 0:S.medium)??"",alt:i.image.asset.altText||i.image.asset.description||"Content image",width:600,height:400})}),s.jsxs("div",{className:e.styles.content,children:[i.title&&s.jsx("div",{className:e.styles.title,children:h==null?void 0:h(i.title,e.styles.title)}),i.description&&s.jsx("div",{className:e.styles.description,children:h==null?void 0:h(i.description,e.styles.description)})]}),r.linkOptions&&s.jsx("div",{className:e.styles.actions,children:s.jsx(q.Button,{as:"a",variant:r.variant??"primary",href:u,target:j?"_blank":"_self",rel:j?"noopener noreferrer":void 0,"aria-label":r.ariaLabel||r.label,children:r.label})})]})};function qe({renderText:i,title:h,logo:r,items:j,groups:u,utilityItems:y,isSticky:_=!1,showSearch:p=!0,showLocaleSelect:k=!0,showThemeToggle:v=!0,themeToggleComponent:S,alignment:z="right",variant:ae="standard",navigationType:I="default",searchComponent:te,localeSelectComponent:ie,className:re,style:ce,...oe}){const[m,V]=a.useState(!1),[H,f]=a.useState(null),[de,ue]=a.useState(0),[ye,he]=a.useState(!1),[me,be]=a.useState(null),[c,$]=a.useState([]),[L,O]=a.useState(0),[xe,X]=a.useState(null),[w,pe]=a.useState(!1),[M,E]=a.useState("forward"),A=a.useRef(null),C=a.useRef(null),W=a.useRef(new Map),J=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,children:s.jsx("div",{className:`${e.styles.linkItem} ${e.styles.themeToggle}`,children:S})}),F=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} ${e.styles.searchWrapper}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(se.Modal,{className:e.styles.searchModal,trigger:s.jsx("button",{title:"Search","aria-label":"Search",className:e.styles.search,children:s.jsx(Me,{size:16,"aria-hidden":"true"})}),content:te})})}),K=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(se.Modal,{className:e.styles.localeModal,trigger:s.jsx("button",{title:"Locale Select","aria-label":"Locale Select",className:e.styles.locale,children:s.jsx(Ie,{size:16,"aria-hidden":"true"})}),content:ie})})}),B=a.useCallback(()=>{C.current&&ue(C.current.getBoundingClientRect().width)},[]),fe=()=>{V(l=>{const n=!l;return n||($([]),E("forward"),f(null)),n})},Q=a.useCallback(l=>{const n=W.current.get(l);if(n&&C.current){const d=n.getBoundingClientRect(),b=C.current.getBoundingClientRect();be(d.left-b.left+d.width/2)}},[]),je=a.useCallback(l=>{f(n=>n===l?null:l)},[]),G=a.useCallback(l=>{A.current&&!A.current.contains(l.target)&&f(null)},[]),D=a.useCallback(()=>{B(),typeof window<"u"&&window.innerWidth>768&&(V(!1),f(null))},[B]),ke=()=>$([]),ve=l=>{E("forward"),$([{title:l.title,primary:l.primaryItems??[],secondary:l.secondaryItems??[],description:""}])},Y=l=>{E("forward"),$(n=>[...n,{title:l.label,primary:l.sublinks??[],secondary:[],description:l.description}])},ge=()=>{E("backward"),$(l=>l.slice(0,-1))};a.useEffect(()=>{if(typeof window>"u")return;const l=()=>pe(window.innerWidth<768);return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)},[]),a.useEffect(()=>{const l=typeof window<"u",n=typeof document<"u";return l&&window.addEventListener("resize",D),n&&document.addEventListener("click",G),B(),he(!0),()=>{l&&window.removeEventListener("resize",D),n&&document.removeEventListener("click",G)}},[D,G,B]),a.useEffect(()=>{if(!(typeof document>"u"))return m?setTimeout(()=>U.lockScroll(),0):U.unlockScroll(),()=>U.unlockScroll()},[m]);const R=(l,n="")=>l.map((d,b)=>{const g=`${n}/${d._key??d.label}-${b}`;return s.jsx(e.NavLink,{link:d,path:g,parentPath:n,openPath:H,togglePath:je,updateTriangleIndicator:Q,setOpenPath:f,renderLinks:R,buttonRefs:W},g)}),Ne=l=>l.map((n,d)=>{var Z,T;const b=`group-${d}`,g=xe===d,x=(Z=n.primaryItems)==null?void 0:Z[L??0];return s.jsxs("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,onMouseEnter:()=>{X(d),f(b),Q(b)},children:[s.jsx("div",{className:e.styles.linkItem,children:s.jsxs("button",{ref:t=>{W.current.set(b,t)},"aria-haspopup":!0,"aria-expanded":g,"aria-controls":`submenu-${d}`,className:`${e.styles.sublinkToggle} ${g?e.styles.open:""}`,children:[n.title,s.jsx(_e.ChevronDown,{size:18,className:e.styles.chevron,"aria-hidden":"true"})]})}),s.jsx("div",{id:`submenu-${d}`,className:`${e.styles.sublinks} ${g?e.styles.show:""}`,role:"menu","aria-label":`${n.title} submenu`,onMouseLeave:()=>{X(null),O(0),f(null)},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}),(T=n.primaryItems)==null?void 0:T.map((t,N)=>t.href?s.jsxs("a",{href:t.href,className:`${e.styles.link} ${L===N?e.styles.open:""}`,target:t.isExternal?"_blank":"_self",rel:t.isExternal?"noopener noreferrer":void 0,onClick:()=>{var ee;f(null),(ee=t.onClick)==null||ee.call(t)},onMouseEnter:()=>O(N),role:"menuitem",children:[s.jsxs("span",{className:e.styles.linkContent,children:[t.label,t.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:t.subtitle})]}),t.isExternal&&s.jsx(P.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]},t._key??N):s.jsx("button",{className:`${e.styles.sublinkToggle} ${L===N?e.styles.open:""}`,onMouseEnter:()=>O(N),children:s.jsxs("span",{className:e.styles.linkContent,children:[t.label,t.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:t.subtitle})]})},t._key??N))]}),(x==null?void 0:x.sublinks)&&x.sublinks.length>0&&s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.fadeInFromLeft}`,children:[x.description&&s.jsx("div",{className:e.styles.sublinksDescription,children:i==null?void 0:i(x.description)}),R(x.sublinks,`${b}-${L}`)]},`${x.label}-${x.sublinks.length}`),n.secondaryItems&&n.secondaryItems.length>0&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.secondaryColumn}`,children:R(n.secondaryItems,`${b}-secondary`)}),n.spotlight&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.spotlightColumn}`,children:s.jsx(Re,{spotlight:n.spotlight,renderText:i})})]})})})]},n._key??`group-${d}`)}),$e=[e.styles.navbar,Be[z],Ee[ae],_?e.styles.sticky:"",u!=null&&u.length?e.styles.advanced:e.styles.default,re??""].filter(Boolean).join(" "),o=y&&y.length>0?y[Math.min(1,y.length-1)]:null;return s.jsx("header",{ref:A,className:$e,style:ce,"aria-label":"Site header",...oe,children:s.jsxs("div",{className:`${e.styles.container} ${(!y||y.length===0)&&z!=="center"?e.styles.twoColumn:""}`,children:[r?s.jsx("div",{className:e.styles.logo,children:r}):h?s.jsx("div",{className:e.styles.title,children:h}):null,s.jsx("nav",{ref:C,style:{left:z==="center"?`calc(50% - ${de/2}px)`:"0"},className:`${e.styles.nav} ${m?e.styles.open:""} ${ye?e.styles.visible:e.styles.hidden}`,id:"main-menu","aria-label":"Primary navigation",children:s.jsxs("div",{className:e.styles.navInner,children:[s.jsx("svg",{style:{left:`${me}px`},className:`${e.styles.triangle} ${H?e.styles.show:""}`,width:16,height:12,viewBox:"0 0 100 75",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:s.jsx("polygon",{points:"50,5 95,70 5,70",strokeLinejoin:"round",fill:"white",stroke:"white"})}),I==="default"&&j&&s.jsxs("div",{className:e.styles.grid,role:"menubar",children:[j.length>0&&R(j),(p||k||v)&&s.jsx("span",{className:e.styles.separator,"aria-hidden":"true"}),v&&s.jsx(J,{}),p&&!w&&s.jsx(F,{}),k&&s.jsx(K,{})]}),!w&&I==="advanced"&&u&&s.jsxs("div",{className:e.styles.grid,children:[u.length>0&&Ne(u),(p||k||v)&&s.jsx("span",{className:e.styles.separator,"aria-hidden":"true"}),v&&s.jsx(J,{}),p&&s.jsx(F,{}),k&&s.jsx(K,{})]}),w&&I==="advanced"&&m&&c.length===0&&u&&s.jsx("div",{className:e.styles.mobileMenu,children:u.map((l,n)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${M==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>ve(l),children:l.title})},l._key??n))}),w&&I==="advanced"&&m&&c.length>0&&s.jsxs("div",{className:e.styles.mobileMenuSlide,children:[s.jsx("button",{className:e.styles.back,"aria-label":"Go back",onClick:c.length===1?ke:ge,children:s.jsx(we.ChevronLeft,{size:18,"aria-hidden":"true"})}),c[c.length-1].description&&s.jsx("div",{className:`${e.styles.sublinksDescription} ${M==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:i==null?void 0:i(c[c.length-1].description)}),c[c.length-1].primary.map((l,n)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${M==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:l.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>Y(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(P.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},l._key??`primary-${n}`)),c[c.length-1].secondary.length>0&&s.jsx("hr",{className:e.styles.groupDivider}),c[c.length-1].secondary.map((l,n)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${M==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:l.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>Y(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(P.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},l._key??`secondary-${n}`))]},`stack-${c.length}`)]})}),y&&y.length>0&&s.jsx("nav",{className:e.styles.utility,"aria-label":"Utility navigation",children:s.jsx(le.ButtonGroup,{children:y.map((l,n)=>s.jsx(q.Button,{as:"a",href:l.href??"/",variant:l.variant??"primary",displayType:l.displayType??"text",imageSrc:l.imageSrc,imageAlt:l.imageAlt,"aria-label":l.ariaLabel,icon:l.icon,iconAlignment:l.iconAlignment,children:l.imageSrc?s.jsx("img",{src:l.imageSrc,alt:l.imageAlt??l.ariaLabel}):l.label},l._key??n))})}),o&&s.jsx("nav",{"aria-label":"Utility navigation",className:`${e.styles.utilityMobile} ${m?e.styles.open:""}`,children:s.jsx(le.ButtonGroup,{alignment:"center",children:s.jsx(q.Button,{as:"a",href:o.href??"/",variant:o.variant??"primary",displayType:o.displayType??"text",imageSrc:o.imageSrc,imageAlt:o.imageAlt,"aria-label":o.ariaLabel,icon:o.icon,iconAlignment:o.iconAlignment,children:o.imageSrc?s.jsx("img",{src:o.imageSrc,alt:o.imageAlt??o.ariaLabel}):o.label})})}),s.jsxs("div",{className:e.styles.mobileButtons,children:[w&&p&&s.jsx(F,{}),s.jsx("button",{className:e.styles.menuToggle,onClick:fe,"aria-label":m?"Close menu":"Open menu","aria-expanded":m,"aria-controls":"main-menu",children:m?s.jsx(Ce.X,{size:24,"aria-hidden":"true"}):s.jsx(q.Menu,{size:24,"aria-hidden":"true"})})]})]})})}exports.Navbar=qe;
11
+ */const Le=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Me=ne.createLucideIcon("search",Le),Ee={standard:e.styles.standard,transparent:e.styles.transparent},Be={left:e.styles.left,center:e.styles.center,right:e.styles.right},Re=({spotlight:i,renderText:h})=>{var y,_,p,v,k,S;const r=i.callToAction;if(!r)return null;const j=((y=r.linkOptions)==null?void 0:y.linkType)==="external";let u="#";return j&&((_=r.linkOptions)!=null&&_.externalUrl)?u=r.linkOptions.externalUrl:((p=r.linkOptions)==null?void 0:p.linkType)==="internal"&&((k=(v=r.linkOptions)==null?void 0:v.internalUrl)!=null&&k.slug.current)&&(u=`/${r.linkOptions.internalUrl.slug.current}`),s.jsxs("div",{className:e.styles.spotlight,children:[i.image&&s.jsx("div",{className:e.styles.imageWrapper,children:s.jsx("img",{src:((S=i.image.imageUrls)==null?void 0:S.medium)??"",alt:i.image.asset.altText||i.image.asset.description||"Content image",width:600,height:400})}),s.jsxs("div",{className:e.styles.content,children:[i.title&&s.jsx("div",{className:e.styles.title,children:h==null?void 0:h(i.title,e.styles.title)}),i.description&&s.jsx("div",{className:e.styles.description,children:h==null?void 0:h(i.description,e.styles.description)})]}),r.linkOptions&&s.jsx("div",{className:e.styles.actions,children:s.jsx(q.Button,{as:"a",variant:r.variant??"primary",href:u,target:j?"_blank":"_self",rel:j?"noopener noreferrer":void 0,"aria-label":r.ariaLabel||r.label,children:r.label})})]})};function qe({renderText:i,title:h,logo:r,items:j,groups:u,utilityItems:y,isSticky:_=!1,showSearch:p=!0,showLocaleSelect:v=!0,showThemeToggle:k=!0,themeToggleComponent:S,alignment:z="right",variant:ae="standard",navigationType:I="default",searchComponent:te,localeSelectComponent:ie,className:re,style:ce,...oe}){const[m,V]=a.useState(!1),[H,f]=a.useState(null),[de,ue]=a.useState(0),[ye,he]=a.useState(!1),[me,be]=a.useState(null),[c,$]=a.useState([]),[L,O]=a.useState(0),[xe,X]=a.useState(null),[w,pe]=a.useState(!1),[M,E]=a.useState("forward"),A=a.useRef(null),C=a.useRef(null),W=a.useRef(new Map),J=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,children:s.jsx("div",{className:`${e.styles.linkItem} ${e.styles.themeToggle}`,children:S})}),F=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent} ${e.styles.searchWrapper}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(se.Modal,{className:e.styles.searchModal,trigger:s.jsx("button",{title:"Search","aria-label":"Search",className:e.styles.search,children:s.jsx(Me,{size:16,"aria-hidden":"true"})}),content:te})})}),K=()=>s.jsx("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,children:s.jsx("div",{className:e.styles.linkItem,children:s.jsx(se.Modal,{className:e.styles.localeModal,trigger:s.jsx("button",{title:"Locale Select","aria-label":"Locale Select",className:e.styles.locale,children:s.jsx(Ie,{size:16,"aria-hidden":"true"})}),content:ie})})}),B=a.useCallback(()=>{C.current&&ue(C.current.getBoundingClientRect().width)},[]),fe=()=>{V(l=>{const n=!l;return n||($([]),E("forward"),f(null)),n})},Q=a.useCallback(l=>{const n=W.current.get(l);if(n&&C.current){const d=n.getBoundingClientRect(),b=C.current.getBoundingClientRect();be(d.left-b.left+d.width/2)}},[]),je=a.useCallback(l=>{f(n=>n===l?null:l)},[]),G=a.useCallback(l=>{A.current&&!A.current.contains(l.target)&&f(null)},[]),D=a.useCallback(()=>{B(),typeof window<"u"&&window.innerWidth>768&&(V(!1),f(null))},[B]),ve=()=>$([]),ke=l=>{E("forward"),$([{title:l.title,primary:l.primaryItems??[],secondary:l.secondaryItems??[],description:""}])},Y=l=>{E("forward"),$(n=>[...n,{title:l.label,primary:l.sublinks??[],secondary:[],description:l.description}])},ge=()=>{E("backward"),$(l=>l.slice(0,-1))};a.useEffect(()=>{if(typeof window>"u")return;const l=()=>pe(window.innerWidth<768);return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)},[]),a.useEffect(()=>{const l=typeof window<"u",n=typeof document<"u";return l&&window.addEventListener("resize",D),n&&document.addEventListener("click",G),B(),he(!0),()=>{l&&window.removeEventListener("resize",D),n&&document.removeEventListener("click",G)}},[D,G,B]),a.useEffect(()=>{if(!(typeof document>"u"))return m?setTimeout(()=>U.lockScroll(),0):U.unlockScroll(),()=>U.unlockScroll()},[m]);const R=(l,n="")=>l.map((d,b)=>{const g=`${n}/${d._key??d.label}-${b}`;return s.jsx(e.NavLink,{link:d,path:g,parentPath:n,openPath:H,togglePath:je,updateTriangleIndicator:Q,setOpenPath:f,renderLinks:R,buttonRefs:W},g)}),Ne=l=>l.map((n,d)=>{var Z,T;const b=`group-${d}`,g=xe===d,x=(Z=n.primaryItems)==null?void 0:Z[L??0];return s.jsxs("div",{className:`${e.styles.linkWrapper} ${e.styles.parent}`,onMouseEnter:()=>{X(d),f(b),Q(b)},children:[s.jsx("div",{className:e.styles.linkItem,children:s.jsxs("button",{ref:t=>{W.current.set(b,t)},"aria-haspopup":!0,"aria-expanded":g,"aria-controls":`submenu-${d}`,className:`${e.styles.sublinkToggle} ${g?e.styles.open:""}`,children:[n.title,s.jsx(_e.ChevronDown,{size:18,className:e.styles.chevron,"aria-hidden":"true"})]})}),s.jsx("div",{id:`submenu-${d}`,className:`${e.styles.sublinks} ${g?e.styles.show:""}`,role:"menu","aria-label":`${n.title} submenu`,onMouseLeave:()=>{X(null),O(0),f(null)},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}),(T=n.primaryItems)==null?void 0:T.map((t,N)=>t.href?s.jsx("div",{role:"menuitem",children:s.jsxs("a",{href:t.href,className:`${e.styles.link} ${L===N?e.styles.open:""}`,target:t.isExternal?"_blank":"_self",rel:t.isExternal?"noopener noreferrer":void 0,onClick:()=>{var ee;f(null),(ee=t.onClick)==null||ee.call(t)},onMouseEnter:()=>O(N),children:[s.jsxs("span",{className:e.styles.linkContent,children:[t.label,t.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:t.subtitle})]}),t.isExternal&&s.jsx(P.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},t._key??N):s.jsx("div",{role:"menuitem",children:s.jsx("button",{className:`${e.styles.sublinkToggle} ${L===N?e.styles.open:""}`,onMouseEnter:()=>O(N),children:s.jsxs("span",{className:e.styles.linkContent,children:[t.label,t.subtitle&&s.jsx("span",{className:e.styles.subtitle,children:t.subtitle})]})})},t._key??N))]}),(x==null?void 0:x.sublinks)&&x.sublinks.length>0&&s.jsxs("div",{className:`${e.styles.sublinksColumn} ${e.styles.fadeInFromLeft}`,children:[x.description&&s.jsx("div",{className:e.styles.sublinksDescription,children:i==null?void 0:i(x.description)}),R(x.sublinks,`${b}-${L}`)]},`${x.label}-${x.sublinks.length}`),n.secondaryItems&&n.secondaryItems.length>0&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.secondaryColumn}`,children:R(n.secondaryItems,`${b}-secondary`)}),n.spotlight&&s.jsx("div",{className:`${e.styles.sublinksColumn} ${e.styles.spotlightColumn}`,children:s.jsx(Re,{spotlight:n.spotlight,renderText:i})})]})})})]},n._key??`group-${d}`)}),$e=[e.styles.navbar,Be[z],Ee[ae],_?e.styles.sticky:"",u!=null&&u.length?e.styles.advanced:e.styles.default,re??""].filter(Boolean).join(" "),o=y&&y.length>0?y[Math.min(1,y.length-1)]:null;return s.jsx("header",{ref:A,className:$e,style:ce,"aria-label":"Site header",...oe,children:s.jsxs("div",{className:`${e.styles.container} ${(!y||y.length===0)&&z!=="center"?e.styles.twoColumn:""}`,children:[r?s.jsx("div",{className:e.styles.logo,children:r}):h?s.jsx("div",{className:e.styles.title,children:h}):null,s.jsx("nav",{ref:C,style:{left:z==="center"?`calc(50% - ${de/2}px)`:"0"},className:`${e.styles.nav} ${m?e.styles.open:""} ${ye?e.styles.visible:e.styles.hidden}`,id:"main-menu","aria-label":"Primary navigation",children:s.jsxs("div",{className:e.styles.navInner,children:[s.jsx("svg",{style:{left:`${me}px`},className:`${e.styles.triangle} ${H?e.styles.show:""}`,width:16,height:12,viewBox:"0 0 100 75",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:s.jsx("polygon",{points:"50,5 95,70 5,70",strokeLinejoin:"round",fill:"white",stroke:"white"})}),I==="default"&&j&&s.jsxs("div",{className:e.styles.grid,role:"menubar",children:[j.length>0&&R(j),(p||v||k)&&s.jsx("span",{className:e.styles.separator,"aria-hidden":"true"}),k&&s.jsx(J,{}),p&&!w&&s.jsx(F,{}),v&&s.jsx(K,{})]}),!w&&I==="advanced"&&u&&s.jsxs("div",{className:e.styles.grid,children:[u.length>0&&Ne(u),(p||v||k)&&s.jsx("span",{className:e.styles.separator,"aria-hidden":"true"}),k&&s.jsx(J,{}),p&&s.jsx(F,{}),v&&s.jsx(K,{})]}),w&&I==="advanced"&&m&&c.length===0&&u&&s.jsx("div",{className:e.styles.mobileMenu,children:u.map((l,n)=>s.jsx("div",{className:`${e.styles.mobileMenuItem} ${M==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>ke(l),children:l.title})},l._key??n))}),w&&I==="advanced"&&m&&c.length>0&&s.jsxs("div",{className:e.styles.mobileMenuSlide,children:[s.jsx("button",{className:e.styles.back,"aria-label":"Go back",onClick:c.length===1?ve:ge,children:s.jsx(we.ChevronLeft,{size:18,"aria-hidden":"true"})}),c[c.length-1].description&&s.jsx("div",{className:`${e.styles.sublinksDescription} ${M==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:i==null?void 0:i(c[c.length-1].description)}),c[c.length-1].primary.map((l,n)=>s.jsx("div",{role:"menuitem",className:`${e.styles.mobileMenuItem} ${M==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:l.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>Y(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,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(P.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},l._key??`primary-${n}`)),c[c.length-1].secondary.length>0&&s.jsx("hr",{className:e.styles.groupDivider}),c[c.length-1].secondary.map((l,n)=>s.jsx("div",{role:"menuitem",className:`${e.styles.mobileMenuItem} ${M==="forward"?e.styles.fadeInFromLeft:e.styles.fadeInFromRight}`,children:l.sublinks?s.jsx("button",{className:e.styles.sublinkToggle,onClick:()=>Y(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,children:[l.label,l.isExternal&&s.jsx(P.ExternalLink,{className:e.styles.newTabIcon,size:16,"aria-hidden":"true"})]})},l._key??`secondary-${n}`))]},`stack-${c.length}`)]})}),y&&y.length>0&&s.jsx("nav",{className:e.styles.utility,"aria-label":"Utility navigation",children:s.jsx(le.ButtonGroup,{children:y.map((l,n)=>s.jsx(q.Button,{as:"a",href:l.href??"/",variant:l.variant??"primary",displayType:l.displayType??"text",imageSrc:l.imageSrc,imageAlt:l.imageAlt,"aria-label":l.ariaLabel,icon:l.icon,iconAlignment:l.iconAlignment,children:l.imageSrc?s.jsx("img",{src:l.imageSrc,alt:l.imageAlt??l.ariaLabel}):l.label},l._key??n))})}),o&&s.jsx("nav",{"aria-label":"Utility navigation",className:`${e.styles.utilityMobile} ${m?e.styles.open:""}`,children:s.jsx(le.ButtonGroup,{alignment:"center",children:s.jsx(q.Button,{as:"a",href:o.href??"/",variant:o.variant??"primary",displayType:o.displayType??"text",imageSrc:o.imageSrc,imageAlt:o.imageAlt,"aria-label":o.ariaLabel,icon:o.icon,iconAlignment:o.iconAlignment,children:o.imageSrc?s.jsx("img",{src:o.imageSrc,alt:o.imageAlt??o.ariaLabel}):o.label})})}),s.jsxs("div",{className:e.styles.mobileButtons,children:[w&&p&&s.jsx(F,{}),s.jsx("button",{className:e.styles.menuToggle,onClick:fe,"aria-label":m?"Close menu":"Open menu","aria-expanded":m,"aria-controls":"main-menu",children:m?s.jsx(Ce.X,{size:24,"aria-hidden":"true"}):s.jsx(q.Menu,{size:24,"aria-hidden":"true"})})]})]})})}exports.Navbar=qe;
@@ -3,7 +3,7 @@ import { useState as u, useRef as V, useCallback as L, useEffect as H } from "re
3
3
  import { Modal as ie } from "../Modal/index.mjs";
4
4
  import { B as q, M as _e } from "../../../index-DqfgBFpU.js";
5
5
  import { ButtonGroup as se } from "../ButtonGroup/index.mjs";
6
- import { s as e, N as Se } from "../../../NavLink-EFx91-2v.js";
6
+ import { s as e, N as Se } from "../../../NavLink-Dxf80v5Z.js";
7
7
  import { lockScroll as ze, unlockScroll as re } from "../../utils/NoScroll/noScroll.mjs";
8
8
  import { C as Re } from "../../../chevron-right-Cim1KPuL.js";
9
9
  import { E as X } from "../../../external-link-BOPobeQJ.js";
@@ -267,7 +267,7 @@ function en({
267
267
  children: [
268
268
  /* @__PURE__ */ n("div", { className: e.linkItem }),
269
269
  (ae = l.primaryItems) == null ? void 0 : ae.map(
270
- (s, C) => s.href ? /* @__PURE__ */ i(
270
+ (s, C) => s.href ? /* @__PURE__ */ n("div", { role: "menuitem", children: /* @__PURE__ */ i(
271
271
  "a",
272
272
  {
273
273
  href: s.href,
@@ -279,7 +279,6 @@ function en({
279
279
  g(null), (le = s.onClick) == null || le.call(s);
280
280
  },
281
281
  onMouseEnter: () => F(C),
282
- role: "menuitem",
283
282
  children: [
284
283
  /* @__PURE__ */ i("span", { className: e.linkContent, children: [
285
284
  s.label,
@@ -294,9 +293,8 @@ function en({
294
293
  }
295
294
  )
296
295
  ]
297
- },
298
- s._key ?? C
299
- ) : /* @__PURE__ */ n(
296
+ }
297
+ ) }, s._key ?? C) : /* @__PURE__ */ n("div", { role: "menuitem", children: /* @__PURE__ */ n(
300
298
  "button",
301
299
  {
302
300
  className: `${e.sublinkToggle} ${R === C ? e.open : ""}`,
@@ -305,9 +303,8 @@ function en({
305
303
  s.label,
306
304
  s.subtitle && /* @__PURE__ */ n("span", { className: e.subtitle, children: s.subtitle })
307
305
  ] })
308
- },
309
- s._key ?? C
310
- )
306
+ }
307
+ ) }, s._key ?? C)
311
308
  )
312
309
  ]
313
310
  }
@@ -464,6 +461,7 @@ function en({
464
461
  c[c.length - 1].primary.map((a, l) => /* @__PURE__ */ n(
465
462
  "div",
466
463
  {
464
+ role: "menuitem",
467
465
  className: `${e.mobileMenuItem} ${A === "forward" ? e.fadeInFromLeft : e.fadeInFromRight}`,
468
466
  children: a.sublinks ? /* @__PURE__ */ n(
469
467
  "button",
@@ -482,7 +480,6 @@ function en({
482
480
  className: e.link,
483
481
  target: a.isExternal ? "_blank" : "_self",
484
482
  rel: a.isExternal ? "noopener noreferrer" : void 0,
485
- role: "menuitem",
486
483
  children: [
487
484
  /* @__PURE__ */ i("span", { className: e.linkContent, children: [
488
485
  a.label,
@@ -507,6 +504,7 @@ function en({
507
504
  (a, l) => /* @__PURE__ */ n(
508
505
  "div",
509
506
  {
507
+ role: "menuitem",
510
508
  className: `${e.mobileMenuItem} ${A === "forward" ? e.fadeInFromLeft : e.fadeInFromRight}`,
511
509
  children: a.sublinks ? /* @__PURE__ */ n(
512
510
  "button",
@@ -522,7 +520,6 @@ function en({
522
520
  className: e.link,
523
521
  target: a.isExternal ? "_blank" : "_self",
524
522
  rel: a.isExternal ? "noopener noreferrer" : void 0,
525
- role: "menuitem",
526
523
  children: [
527
524
  a.label,
528
525
  a.isExternal && /* @__PURE__ */ n(
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index27.css');const s=require("react/jsx-runtime"),p=require("../../../core/components/Modal/index.cjs"),O=require("../../utils/resolveLinkUrl.cjs"),S=require("../../hooks/useMediaQuery.cjs"),$=require("../../hooks/useStyleClasses.cjs"),U=require("../../../core/context/ThemeContext.cjs");require("@fortawesome/fontawesome-free/css/all.min.css");const d=require("../../utils/mediaUtils.cjs"),P=require("../../../play-CQBnZgNa.cjs"),F=require("../../../arrow-right-DO6S4vfx.cjs"),W="_cardLink_16ew5_1",z="_card_16ew5_1",G="_container_16ew5_21",D="_content_16ew5_31",E="_icon_16ew5_38",Q="_modalTrigger_16ew5_60",Y="_callToAction_16ew5_65",H="_label_16ew5_66",J="_cardIcon_16ew5_71",K="_title_16ew5_78",X="_description_16ew5_101",Z="_imageWrapper_16ew5_116",V="_metric_16ew5_205",R="_outerCircle_16ew5_222",A="_innerCircle_16ew5_227",T="_metricLabel_16ew5_233",ee="_textOnly_16ew5_241",se="_imageOnly_16ew5_278",te="_fullBleed_16ew5_303",ae="_imageTop_16ew5_344",ne="_imageBottom_16ew5_363",re="_imageLeft_16ew5_391",oe="_imageRight_16ew5_401",ie="_containImage_16ew5_459",le="_fullBleedImage_16ew5_467",ce="_image_16ew5_116",_e="_eyebrow_16ew5_563",me="_cta_16ew5_575",de="_secondary_16ew5_576",e={cardLink:W,card:z,container:G,content:D,icon:E,modalTrigger:Q,callToAction:Y,label:H,cardIcon:J,title:K,description:X,imageWrapper:Z,metric:V,outerCircle:R,innerCircle:A,metricLabel:T,textOnly:ee,imageOnly:se,fullBleed:te,imageTop:ae,imageBottom:ne,imageLeft:re,imageRight:oe,containImage:ie,fullBleedImage:le,image:ce,eyebrow:_e,cta:me,secondary:de},b={"full-bleed":e.fullBleed,text:e.textOnly,metric:e.metric,"image-left":e.imageLeft,"image-right":e.imageRight,"image-top":e.imageTop,"image-bottom":e.imageBottom,"image-only":e.imageOnly};function ge({value:t}){if(!t.includes("%"))return s.jsx("div",{className:e.metric});const a=125,n=(a-10)/2,r=2*Math.PI*n,l=r-parseFloat(t)/100*r;return s.jsxs("svg",{width:a,height:a,viewBox:`0 0 ${a} ${a}`,children:[s.jsx("circle",{className:e.outerCircle,cx:a/2,cy:a/2,r:n,fill:"none"}),s.jsx("circle",{className:e.innerCircle,cx:a/2,cy:a/2,r:n,fill:"none",strokeDasharray:r,strokeDashoffset:l,strokeLinecap:"round",transform:`rotate(-90 ${a/2} ${a/2})`}),s.jsx("text",{className:e.metricLabel,x:"50%",y:"52%",dominantBaseline:"middle",textAnchor:"middle",children:t})]})}function ue({callToAction:t,resolvedUrl:a,children:n}){var r,l;switch(t==null?void 0:t.type){case"link":return s.jsx("a",{className:e.cardLink,"aria-label":t.ariaLabel||t.label,href:a,target:((r=t.linkOptions)==null?void 0:r.linkType)==="external"?"_blank":"_self",rel:((l=t.linkOptions)==null?void 0:l.linkType)==="external"?"noopener noreferrer":"",children:n});case"modal":return s.jsx(p.Modal,{className:e.modalTrigger,trigger:n,content:t.modalContent});case"video":return s.jsx(p.Modal,{className:e.modalTrigger,trigger:n,content:s.jsx("video",{src:t.videoUrl,controls:!0,autoPlay:!0})});case"download":return s.jsx("a",{className:e.cardLink,"aria-label":t.ariaLabel||t.label,href:a,download:!0,target:"_blank",rel:"noopener noreferrer",children:n});default:return s.jsx(s.Fragment,{children:n})}}function we({style:t,variant:a="noImage",metricValue:n,eyebrow:r,title:l,description:_,image:c,icon:g,callToAction:o,onHover:h,onLeave:v,gridArea:u,styleOptions:N,renderImage:w,renderRichText:i}){const{mode:x}=U.useTheme(),y=S.useMediaQuery("(max-width: 767px)"),k=$.useStyleClasses(N),L=O.resolveLinkURL(o),m=d.resolveImageUrl(c,x),f=d.resolveAltText(c,x),j=d.resolveImageStyle(c,y),C=(c==null?void 0:c.layout)==="cover",B=b[t??"image-top"]??b["image-top"],I=c&&m?s.jsx("div",{className:e.imageWrapper,children:w?w({src:m,alt:f,width:600,height:658,style:j}):s.jsx("img",{src:m,alt:f,width:600,height:658,style:j})}):null,M=!n&&!r&&!l&&!_,q=s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:`${e.container} ${C?e.fullBleedImage:e.containImage}`,children:[a!=="image"&&!M&&s.jsxs("div",{className:e.content,children:[g&&s.jsx("div",{className:e.icon,children:s.jsx("i",{className:g})}),n&&s.jsx(ge,{value:n}),r&&(i==null?void 0:i({blocks:r,className:e.eyebrow})),l&&(i==null?void 0:i({blocks:l,className:e.title})),_&&(i==null?void 0:i({blocks:_,className:e.description}))]}),I]}),(o==null?void 0:o.videoUrl)&&s.jsxs("div",{className:e.callToAction,children:[s.jsx("div",{className:e.label,children:o.label}),s.jsx("div",{className:e.cardIcon,children:s.jsx(P.Play,{size:45})})]}),(o==null?void 0:o.type)==="link"&&s.jsxs("div",{className:e.callToAction,children:[s.jsx("div",{className:e.label,children:o.label}),s.jsx("div",{className:e.cardIcon,children:s.jsx(F.ArrowRight,{size:45})})]})]});return s.jsx("div",{className:[k,e.card,B,e[a]??""].filter(Boolean).join(" "),onMouseEnter:h,onMouseLeave:v,style:u&&!y?{gridArea:u}:{},children:s.jsx(ue,{callToAction:o,resolvedUrl:L,children:q})})}exports.GridCard=we;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index27.css');const s=require("react/jsx-runtime"),p=require("../../../core/components/Modal/index.cjs"),q=require("../../utils/resolveLinkUrl.cjs"),S=require("../../hooks/useMediaQuery.cjs"),$=require("../../hooks/useStyleClasses.cjs"),U=require("../../../core/context/ThemeContext.cjs"),d=require("../../utils/mediaUtils.cjs"),P=require("../../../play-CQBnZgNa.cjs"),F=require("../../../arrow-right-DO6S4vfx.cjs"),W="_cardLink_16ew5_1",z="_card_16ew5_1",G="_container_16ew5_21",D="_content_16ew5_31",E="_icon_16ew5_38",Q="_modalTrigger_16ew5_60",Y="_callToAction_16ew5_65",H="_label_16ew5_66",J="_cardIcon_16ew5_71",K="_title_16ew5_78",X="_description_16ew5_101",Z="_imageWrapper_16ew5_116",V="_metric_16ew5_205",R="_outerCircle_16ew5_222",A="_innerCircle_16ew5_227",T="_metricLabel_16ew5_233",ee="_textOnly_16ew5_241",se="_imageOnly_16ew5_278",te="_fullBleed_16ew5_303",ae="_imageTop_16ew5_344",ne="_imageBottom_16ew5_363",re="_imageLeft_16ew5_391",oe="_imageRight_16ew5_401",le="_containImage_16ew5_459",ie="_fullBleedImage_16ew5_467",ce="_image_16ew5_116",_e="_eyebrow_16ew5_563",me="_cta_16ew5_575",de="_secondary_16ew5_576",e={cardLink:W,card:z,container:G,content:D,icon:E,modalTrigger:Q,callToAction:Y,label:H,cardIcon:J,title:K,description:X,imageWrapper:Z,metric:V,outerCircle:R,innerCircle:A,metricLabel:T,textOnly:ee,imageOnly:se,fullBleed:te,imageTop:ae,imageBottom:ne,imageLeft:re,imageRight:oe,containImage:le,fullBleedImage:ie,image:ce,eyebrow:_e,cta:me,secondary:de},b={"full-bleed":e.fullBleed,text:e.textOnly,metric:e.metric,"image-left":e.imageLeft,"image-right":e.imageRight,"image-top":e.imageTop,"image-bottom":e.imageBottom,"image-only":e.imageOnly};function ge({value:t}){if(!t.includes("%"))return s.jsx("div",{className:e.metric});const a=125,n=(a-10)/2,r=2*Math.PI*n,i=r-parseFloat(t)/100*r;return s.jsxs("svg",{width:a,height:a,viewBox:`0 0 ${a} ${a}`,children:[s.jsx("circle",{className:e.outerCircle,cx:a/2,cy:a/2,r:n,fill:"none"}),s.jsx("circle",{className:e.innerCircle,cx:a/2,cy:a/2,r:n,fill:"none",strokeDasharray:r,strokeDashoffset:i,strokeLinecap:"round",transform:`rotate(-90 ${a/2} ${a/2})`}),s.jsx("text",{className:e.metricLabel,x:"50%",y:"52%",dominantBaseline:"middle",textAnchor:"middle",children:t})]})}function ue({callToAction:t,resolvedUrl:a,children:n}){var r,i;switch(t==null?void 0:t.type){case"link":return s.jsx("a",{className:e.cardLink,"aria-label":t.ariaLabel||t.label,href:a,target:((r=t.linkOptions)==null?void 0:r.linkType)==="external"?"_blank":"_self",rel:((i=t.linkOptions)==null?void 0:i.linkType)==="external"?"noopener noreferrer":"",children:n});case"modal":return s.jsx(p.Modal,{className:e.modalTrigger,trigger:n,content:t.modalContent});case"video":return s.jsx(p.Modal,{className:e.modalTrigger,trigger:n,content:s.jsx("video",{src:t.videoUrl,controls:!0,autoPlay:!0})});case"download":return s.jsx("a",{className:e.cardLink,"aria-label":t.ariaLabel||t.label,href:a,download:!0,target:"_blank",rel:"noopener noreferrer",children:n});default:return s.jsx(s.Fragment,{children:n})}}function we({style:t,variant:a="noImage",metricValue:n,eyebrow:r,title:i,description:_,image:c,icon:g,callToAction:o,onHover:h,onLeave:v,gridArea:u,styleOptions:N,renderImage:w,renderRichText:l}){const{mode:x}=U.useTheme(),y=S.useMediaQuery("(max-width: 767px)"),k=$.useStyleClasses(N),L=q.resolveLinkURL(o),m=d.resolveImageUrl(c,x),f=d.resolveAltText(c,x),j=d.resolveImageStyle(c,y),C=(c==null?void 0:c.layout)==="cover",B=b[t??"image-top"]??b["image-top"],I=c&&m?s.jsx("div",{className:e.imageWrapper,children:w?w({src:m,alt:f,width:600,height:658,style:j}):s.jsx("img",{src:m,alt:f,width:600,height:658,style:j})}):null,M=!n&&!r&&!i&&!_,O=s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:`${e.container} ${C?e.fullBleedImage:e.containImage}`,children:[a!=="image"&&!M&&s.jsxs("div",{className:e.content,children:[g&&s.jsx("div",{className:e.icon,children:s.jsx("i",{className:g})}),n&&s.jsx(ge,{value:n}),r&&(l==null?void 0:l({blocks:r,className:e.eyebrow})),i&&(l==null?void 0:l({blocks:i,className:e.title})),_&&(l==null?void 0:l({blocks:_,className:e.description}))]}),I]}),(o==null?void 0:o.videoUrl)&&s.jsxs("div",{className:e.callToAction,children:[s.jsx("div",{className:e.label,children:o.label}),s.jsx("div",{className:e.cardIcon,children:s.jsx(P.Play,{size:45})})]}),(o==null?void 0:o.type)==="link"&&s.jsxs("div",{className:e.callToAction,children:[s.jsx("div",{className:e.label,children:o.label}),s.jsx("div",{className:e.cardIcon,children:s.jsx(F.ArrowRight,{size:45})})]})]});return s.jsx("div",{className:[k,e.card,B,e[a]??""].filter(Boolean).join(" "),onMouseEnter:h,onMouseLeave:v,style:u&&!y?{gridArea:u}:{},children:s.jsx(ue,{callToAction:o,resolvedUrl:L,children:O})})}exports.GridCard=we;
@@ -4,11 +4,10 @@ import { resolveLinkURL as P } from "../../utils/resolveLinkUrl.mjs";
4
4
  import { useMediaQuery as U } from "../../hooks/useMediaQuery.mjs";
5
5
  import { useStyleClasses as W } from "../../hooks/useStyleClasses.mjs";
6
6
  import { useTheme as j } from "../../../core/context/ThemeContext.mjs";
7
- import "@fortawesome/fontawesome-free/css/all.min.css";
8
7
  import { resolveImageUrl as z, resolveAltText as F, resolveImageStyle as D } from "../../utils/mediaUtils.mjs";
9
8
  import { P as E } from "../../../play-DYgKiSaf.js";
10
9
  import { A as G } from "../../../arrow-right-QEwnX3Sk.js";
11
- import '../../../assets/index27.css';const Q = "_cardLink_16ew5_1", Y = "_card_16ew5_1", q = "_container_16ew5_21", H = "_content_16ew5_31", J = "_icon_16ew5_38", K = "_modalTrigger_16ew5_60", X = "_callToAction_16ew5_65", Z = "_label_16ew5_66", V = "_cardIcon_16ew5_71", R = "_title_16ew5_78", A = "_description_16ew5_101", T = "_imageWrapper_16ew5_116", ee = "_metric_16ew5_205", te = "_outerCircle_16ew5_222", ae = "_innerCircle_16ew5_227", se = "_metricLabel_16ew5_233", re = "_textOnly_16ew5_241", ne = "_imageOnly_16ew5_278", oe = "_fullBleed_16ew5_303", ie = "_imageTop_16ew5_344", le = "_imageBottom_16ew5_363", ce = "_imageLeft_16ew5_391", me = "_imageRight_16ew5_401", _e = "_containImage_16ew5_459", de = "_fullBleedImage_16ew5_467", ge = "_image_16ew5_116", fe = "_eyebrow_16ew5_563", we = "_cta_16ew5_575", pe = "_secondary_16ew5_576", e = {
10
+ import '../../../assets/index27.css';const Q = "_cardLink_16ew5_1", Y = "_card_16ew5_1", q = "_container_16ew5_21", H = "_content_16ew5_31", J = "_icon_16ew5_38", K = "_modalTrigger_16ew5_60", X = "_callToAction_16ew5_65", Z = "_label_16ew5_66", V = "_cardIcon_16ew5_71", R = "_title_16ew5_78", A = "_description_16ew5_101", T = "_imageWrapper_16ew5_116", ee = "_metric_16ew5_205", te = "_outerCircle_16ew5_222", ae = "_innerCircle_16ew5_227", se = "_metricLabel_16ew5_233", re = "_textOnly_16ew5_241", ne = "_imageOnly_16ew5_278", oe = "_fullBleed_16ew5_303", le = "_imageTop_16ew5_344", ie = "_imageBottom_16ew5_363", ce = "_imageLeft_16ew5_391", me = "_imageRight_16ew5_401", _e = "_containImage_16ew5_459", de = "_fullBleedImage_16ew5_467", ge = "_image_16ew5_116", fe = "_eyebrow_16ew5_563", we = "_cta_16ew5_575", ue = "_secondary_16ew5_576", e = {
12
11
  cardLink: Q,
13
12
  card: Y,
14
13
  container: q,
@@ -28,8 +27,8 @@ import '../../../assets/index27.css';const Q = "_cardLink_16ew5_1", Y = "_card_1
28
27
  textOnly: re,
29
28
  imageOnly: ne,
30
29
  fullBleed: oe,
31
- imageTop: ie,
32
- imageBottom: le,
30
+ imageTop: le,
31
+ imageBottom: ie,
33
32
  imageLeft: ce,
34
33
  imageRight: me,
35
34
  containImage: _e,
@@ -37,7 +36,7 @@ import '../../../assets/index27.css';const Q = "_cardLink_16ew5_1", Y = "_card_1
37
36
  image: ge,
38
37
  eyebrow: fe,
39
38
  cta: we,
40
- secondary: pe
39
+ secondary: ue
41
40
  }, v = {
42
41
  "full-bleed": e.fullBleed,
43
42
  text: e.textOnly,
@@ -48,9 +47,9 @@ import '../../../assets/index27.css';const Q = "_cardLink_16ew5_1", Y = "_card_1
48
47
  "image-bottom": e.imageBottom,
49
48
  "image-only": e.imageOnly
50
49
  };
51
- function ue({ value: a }) {
50
+ function pe({ value: a }) {
52
51
  if (!a.includes("%")) return /* @__PURE__ */ t("div", { className: e.metric });
53
- const s = 125, r = (s - 10) / 2, n = 2 * Math.PI * r, l = n - parseFloat(a) / 100 * n;
52
+ const s = 125, r = (s - 10) / 2, n = 2 * Math.PI * r, i = n - parseFloat(a) / 100 * n;
54
53
  return /* @__PURE__ */ m("svg", { width: s, height: s, viewBox: `0 0 ${s} ${s}`, children: [
55
54
  /* @__PURE__ */ t(
56
55
  "circle",
@@ -71,7 +70,7 @@ function ue({ value: a }) {
71
70
  r,
72
71
  fill: "none",
73
72
  strokeDasharray: n,
74
- strokeDashoffset: l,
73
+ strokeDashoffset: i,
75
74
  strokeLinecap: "round",
76
75
  transform: `rotate(-90 ${s / 2} ${s / 2})`
77
76
  }
@@ -94,7 +93,7 @@ function ye({
94
93
  resolvedUrl: s,
95
94
  children: r
96
95
  }) {
97
- var n, l;
96
+ var n, i;
98
97
  switch (a == null ? void 0 : a.type) {
99
98
  case "link":
100
99
  return /* @__PURE__ */ t(
@@ -104,7 +103,7 @@ function ye({
104
103
  "aria-label": a.ariaLabel || a.label,
105
104
  href: s,
106
105
  target: ((n = a.linkOptions) == null ? void 0 : n.linkType) === "external" ? "_blank" : "_self",
107
- rel: ((l = a.linkOptions) == null ? void 0 : l.linkType) === "external" ? "noopener noreferrer" : "",
106
+ rel: ((i = a.linkOptions) == null ? void 0 : i.linkType) === "external" ? "noopener noreferrer" : "",
108
107
  children: r
109
108
  }
110
109
  );
@@ -143,12 +142,12 @@ function ye({
143
142
  return /* @__PURE__ */ t(h, { children: r });
144
143
  }
145
144
  }
146
- function Me({
145
+ function Oe({
147
146
  style: a,
148
147
  variant: s = "noImage",
149
148
  metricValue: r,
150
149
  eyebrow: n,
151
- title: l,
150
+ title: i,
152
151
  description: _,
153
152
  image: c,
154
153
  icon: g,
@@ -158,9 +157,9 @@ function Me({
158
157
  gridArea: f,
159
158
  styleOptions: B,
160
159
  renderImage: w,
161
- renderRichText: i
160
+ renderRichText: l
162
161
  }) {
163
- const { mode: p } = j(), u = U("(max-width: 767px)"), I = W(B), C = P(o), d = z(c, p), y = F(c, p), b = D(c, u), O = (c == null ? void 0 : c.layout) === "cover", M = v[a ?? "image-top"] ?? v["image-top"], x = c && d ? /* @__PURE__ */ t("div", { className: e.imageWrapper, children: w ? w({
162
+ const { mode: u } = j(), p = U("(max-width: 767px)"), I = W(B), C = P(o), d = z(c, u), y = F(c, u), b = D(c, p), O = (c == null ? void 0 : c.layout) === "cover", M = v[a ?? "image-top"] ?? v["image-top"], x = c && d ? /* @__PURE__ */ t("div", { className: e.imageWrapper, children: w ? w({
164
163
  src: d,
165
164
  alt: y,
166
165
  width: 600,
@@ -175,7 +174,7 @@ function Me({
175
174
  height: 658,
176
175
  style: b
177
176
  }
178
- ) }) : null, S = !r && !n && !l && !_, $ = /* @__PURE__ */ m(h, { children: [
177
+ ) }) : null, S = !r && !n && !i && !_, $ = /* @__PURE__ */ m(h, { children: [
179
178
  /* @__PURE__ */ m(
180
179
  "div",
181
180
  {
@@ -183,10 +182,10 @@ function Me({
183
182
  children: [
184
183
  s !== "image" && !S && /* @__PURE__ */ m("div", { className: e.content, children: [
185
184
  g && /* @__PURE__ */ t("div", { className: e.icon, children: /* @__PURE__ */ t("i", { className: g }) }),
186
- r && /* @__PURE__ */ t(ue, { value: r }),
187
- n && (i == null ? void 0 : i({ blocks: n, className: e.eyebrow })),
188
- l && (i == null ? void 0 : i({ blocks: l, className: e.title })),
189
- _ && (i == null ? void 0 : i({
185
+ r && /* @__PURE__ */ t(pe, { value: r }),
186
+ n && (l == null ? void 0 : l({ blocks: n, className: e.eyebrow })),
187
+ i && (l == null ? void 0 : l({ blocks: i, className: e.title })),
188
+ _ && (l == null ? void 0 : l({
190
189
  blocks: _,
191
190
  className: e.description
192
191
  }))
@@ -215,11 +214,11 @@ function Me({
215
214
  ].filter(Boolean).join(" "),
216
215
  onMouseEnter: k,
217
216
  onMouseLeave: L,
218
- style: f && !u ? { gridArea: f } : {},
217
+ style: f && !p ? { gridArea: f } : {},
219
218
  children: /* @__PURE__ */ t(ye, { callToAction: o, resolvedUrl: C, children: $ })
220
219
  }
221
220
  );
222
221
  }
223
222
  export {
224
- Me as GridCard
223
+ Oe as GridCard
225
224
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quirk-ui",
3
3
  "private": false,
4
- "version": "0.1.26",
4
+ "version": "0.1.28",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {