quirk-ui 0.1.63 → 0.1.64

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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),k=require("react"),V=require("./HeroContext.cjs"),s=require("../../../HeroSubComponents-DwgNZsms.cjs"),w=require("../../utils/mediaUtils.cjs"),W=require("../../hooks/usePrefersReducedMotion.cjs"),Y={default:s.styles.default,split:s.styles.split,"split-35-65":s.styles.splitAlt,tile:s.styles.tile,fullBleed:s.styles.fullBleed,blog:s.styles.blog};function $({heading:l,callToAction:a,renderRichText:t,renderCallToAction:r,extraChildren:n}){return e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[l.eyebrow&&(t==null?void 0:t({blocks:l.eyebrow,className:s.styles.eyebrow})),t==null?void 0:t({blocks:l.title})]}),n,l.description&&(t==null?void 0:t({blocks:l.description})),a&&(r==null?void 0:r(a))]})}function C({id:l,paddingClasses:a,layoutClass:t,extraSectionClass:r,mediaNode:n,overlayContent:c}){return e.jsx("section",{id:l,className:`${s.styles.hero} ${a} ${t} ${r??""}`,children:e.jsxs("article",{className:s.styles.container,children:[n,e.jsx("div",{className:s.styles.overlay,children:e.jsx("div",{className:s.styles.text,children:c})})]})})}const z={render:({href:l,className:a,children:t})=>e.jsx("a",{href:l,className:a,children:t})};function G({heading:l,image:a,video:t,callToAction:r,pageData:n,styleOptions:c,id:y,imageAdapter:m,linkAdapter:v,renderRichText:o,renderCallToAction:i}){var M;const u=W.usePrefersReducedMotion(),[B,H]=k.useState(!u),d=(()=>{try{return V.useHeroContext()}catch{return null}})(),F=v??z,b=(c==null?void 0:c.layout)??"default",j=((M=c==null?void 0:c.padding)==null?void 0:M.join(" "))??"",g=Y[b]??s.styles.default,N=(c==null?void 0:c.mode)??"light",p=w.resolveImageUrl(a,N,"medium"),f=w.resolveImageUrl(a,N,"large"),I=w.resolveAltText(a,N),U=t?w.detectVideoProvider(t):null,x=!u,L=k.useCallback(()=>{H(P=>!P)},[]);k.useEffect(()=>{if(!(b==="tile"||b==="fullBleed")||typeof window>"u")return;d==null||d.setIsFullbleedHeroAtTop(!0);const q=()=>{d==null||d.setIsFullbleedHeroAtTop(window.scrollY===0)};return window.addEventListener("scroll",q,{passive:!0}),()=>window.removeEventListener("scroll",q)},[b,d]),k.useEffect(()=>{H(!u)},[u]);const S=t&&U?e.jsx(s.VideoBlock,{url:t,autoPlay:x,posterUrl:f,isPlaying:B,onToggle:L,variant:"inline"}):a?e.jsx(s.HeroImage,{image:a,mode:N,variant:"intrinsic",imageAdapter:m}):null,_=t&&U?e.jsx(s.VideoBlock,{url:t,autoPlay:x,posterUrl:f,isPlaying:B,onToggle:L,variant:"background"}):p||f?m?m.render({src:f??p??"",alt:I,fill:!0,priority:!0,style:{objectFit:"cover"},draggable:!1,sizes:"(min-width: 500px) 500px, 100vw"}):e.jsx("img",{src:f??p,alt:I,style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"},draggable:!1}):null,E=n?J(n,F):null;switch(b){case"split":case"split-35-65":return e.jsx("section",{id:y,className:`${s.styles.hero} ${g} ${j}`,children:e.jsxs("article",{className:s.styles.container,children:[e.jsxs("div",{className:s.styles.heading,children:[e.jsxs("div",{children:[l.eyebrow&&(o==null?void 0:o({blocks:l.eyebrow,className:s.styles.eyebrow})),o==null?void 0:o({blocks:l.title})]}),e.jsxs("div",{className:s.styles.text,children:[l.description&&(o==null?void 0:o({blocks:l.description})),r&&(i==null?void 0:i(r))]}),l.disclaimer&&(o==null?void 0:o({blocks:l.disclaimer,className:s.styles.disclaimer}))]}),S]})});case"default":return e.jsx("section",{id:y,className:`${s.styles.hero} ${j} ${g}`,children:e.jsxs("article",{className:s.styles.container,children:[S,e.jsx("div",{className:s.styles.text,children:e.jsx($,{heading:l,callToAction:r,renderRichText:o,renderCallToAction:i})})]})});case"tile":return e.jsx(C,{id:y,paddingClasses:j,layoutClass:g,extraSectionClass:"heroTile",mediaNode:_,overlayContent:e.jsx($,{heading:l,callToAction:r,renderRichText:o,renderCallToAction:i})});case"fullBleed":return e.jsxs("section",{id:y,className:`${s.styles.hero} ${s.styles.fullBleed} ${j}`,children:[e.jsx("div",{className:s.styles.media,children:_}),e.jsx("div",{className:s.styles.container,children:e.jsx("div",{className:s.styles.text,children:e.jsx($,{heading:l,callToAction:r,renderRichText:o,renderCallToAction:i})})})]});case"blog":return e.jsx(C,{id:y,paddingClasses:j,layoutClass:g,mediaNode:_,overlayContent:e.jsx($,{heading:l,callToAction:r,renderRichText:o,renderCallToAction:i,extraChildren:E})})}}function J(l,a){var m,v;const t=((m=l.categories)==null?void 0:m.filter(o=>{var i,u;return!((u=(i=o.slug)==null?void 0:i.current)!=null&&u.startsWith("library/type"))}))??[],r=t[0]??null,n=t[1]??null,c=((v=l.categories)==null?void 0:v.find(o=>{var i,u;return(u=(i=o.slug)==null?void 0:i.current)==null?void 0:u.startsWith("library/type")}))??null,y=n&&n.title.toLowerCase()!=="library"&&!n.slug.current.includes("keywords");return e.jsxs("div",{className:s.styles.articleDetails,children:[c&&a.render({href:`/blog/search?categories=${encodeURIComponent(c._id)}`,className:s.styles.articleType,children:c.title}),e.jsxs("div",{className:s.styles.articleCategories,children:[r&&a.render({href:`/blog/search?categories=${encodeURIComponent(r._id)}`,className:s.styles.category,children:r.title}),y&&a.render({href:`/blog/search?categories=${encodeURIComponent(n._id)}`,className:s.styles.category,children:n.title})]}),l.timeToRead>0&&e.jsxs("span",{children:[e.jsx("span",{className:s.styles.number,children:l.timeToRead}),"min read"]})]})}exports.HeroBlock=G;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),k=require("react"),V=require("./HeroContext.cjs"),s=require("../../../HeroSubComponents-DwgNZsms.cjs"),w=require("../../utils/mediaUtils.cjs"),W=require("../../hooks/usePrefersReducedMotion.cjs"),Y={default:s.styles.default,split:s.styles.split,"split-35-65":s.styles.splitAlt,tile:s.styles.tile,fullBleed:s.styles.fullBleed,blog:s.styles.blog};function $({heading:l,callToAction:a,renderRichText:t,renderCallToAction:r,extraChildren:n}){return e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[l.eyebrow&&(t==null?void 0:t({blocks:l.eyebrow,className:s.styles.eyebrow})),t==null?void 0:t({blocks:l.title})]}),n,l.description&&(t==null?void 0:t({blocks:l.description})),a&&(r==null?void 0:r(a))]})}function C({id:l,paddingClasses:a,layoutClass:t,extraSectionClass:r,mediaNode:n,overlayContent:c}){return e.jsx("section",{id:l,className:`${s.styles.hero} ${a} ${t} ${r??""}`,children:e.jsxs("article",{className:s.styles.container,children:[n,e.jsx("div",{className:s.styles.overlay,children:e.jsx("div",{className:s.styles.text,children:c})})]})})}const z={render:({href:l,className:a,children:t})=>e.jsx("a",{href:l,className:a,children:t})};function G({heading:l,image:a,video:t,callToAction:r,pageData:n,styleOptions:c,id:y,imageAdapter:m,linkAdapter:v,renderRichText:o,renderCallToAction:i}){var M;const u=W.usePrefersReducedMotion(),[B,H]=k.useState(!u),d=(()=>{try{return V.useHeroContext()}catch{return null}})(),F=v??z,b=(c==null?void 0:c.layout)??"default",j=((M=c==null?void 0:c.padding)==null?void 0:M.join(" "))??"",g=Y[b]??s.styles.default,N=(c==null?void 0:c.mode)??"light",p=w.resolveImageUrl(a,N,"medium"),f=w.resolveImageUrl(a,N,"large"),I=w.resolveAltText(a,N),U=t?w.detectVideoProvider(t):null,x=!u,L=k.useCallback(()=>{H(P=>!P)},[]);k.useEffect(()=>{if(!(b==="tile"||b==="fullBleed")||typeof window>"u")return;d==null||d.setIsFullbleedHeroAtTop(!0);const q=()=>{d==null||d.setIsFullbleedHeroAtTop(window.scrollY===0)};return window.addEventListener("scroll",q,{passive:!0}),()=>window.removeEventListener("scroll",q)},[b,d]),k.useEffect(()=>{H(!u)},[u]);const S=t&&U?e.jsx(s.VideoBlock,{url:t,autoPlay:x,posterUrl:f,isPlaying:B,onToggle:L,variant:"inline"}):a?e.jsx(s.HeroImage,{image:a,mode:N,variant:"intrinsic",imageAdapter:m}):null,_=t&&U?e.jsx(s.VideoBlock,{url:t,autoPlay:x,posterUrl:f,isPlaying:B,onToggle:L,variant:"background"}):p||f?m?m.render({src:f??p??"",alt:I,fill:!0,priority:!0,style:{objectFit:"cover"},draggable:!1,sizes:"(min-width: 500px) 500px, 100vw"}):e.jsx("img",{src:f??p,alt:I,style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"},draggable:!1}):null,E=n?J(n,F):null;switch(b){case"split":case"split-35-65":return e.jsx("section",{id:y,className:`${s.styles.hero} ${g} ${j}`,children:e.jsxs("article",{className:s.styles.container,children:[e.jsxs("div",{className:s.styles.heading,children:[e.jsxs("div",{children:[l.eyebrow&&(o==null?void 0:o({blocks:l.eyebrow,className:s.styles.eyebrow})),o==null?void 0:o({blocks:l.title})]}),e.jsxs("div",{className:s.styles.text,children:[l.description&&(o==null?void 0:o({blocks:l.description})),r&&(i==null?void 0:i(r))]}),l.disclaimer&&(o==null?void 0:o({blocks:l.disclaimer,className:s.styles.disclaimer}))]}),S]})});case"default":return e.jsx("section",{id:y,className:`${s.styles.hero} ${j} ${g}`,children:e.jsxs("article",{className:s.styles.container,children:[S,e.jsx("div",{className:s.styles.text,children:e.jsx($,{heading:l,callToAction:r,renderRichText:o,renderCallToAction:i})})]})});case"tile":return e.jsx(C,{id:y,paddingClasses:j,layoutClass:g,extraSectionClass:"heroTile",mediaNode:_,overlayContent:e.jsx($,{heading:l,callToAction:r,renderRichText:o,renderCallToAction:i})});case"fullBleed":return e.jsxs("section",{"data-overlay":"true",id:y,className:`${s.styles.hero} ${s.styles.fullBleed} ${j}`,children:[e.jsx("div",{className:s.styles.media,children:_}),e.jsx("div",{className:s.styles.container,children:e.jsx("div",{className:s.styles.text,children:e.jsx($,{heading:l,callToAction:r,renderRichText:o,renderCallToAction:i})})})]});case"blog":return e.jsx(C,{id:y,paddingClasses:j,layoutClass:g,mediaNode:_,overlayContent:e.jsx($,{heading:l,callToAction:r,renderRichText:o,renderCallToAction:i,extraChildren:E})})}}function J(l,a){var m,v;const t=((m=l.categories)==null?void 0:m.filter(o=>{var i,u;return!((u=(i=o.slug)==null?void 0:i.current)!=null&&u.startsWith("library/type"))}))??[],r=t[0]??null,n=t[1]??null,c=((v=l.categories)==null?void 0:v.find(o=>{var i,u;return(u=(i=o.slug)==null?void 0:i.current)==null?void 0:u.startsWith("library/type")}))??null,y=n&&n.title.toLowerCase()!=="library"&&!n.slug.current.includes("keywords");return e.jsxs("div",{className:s.styles.articleDetails,children:[c&&a.render({href:`/blog/search?categories=${encodeURIComponent(c._id)}`,className:s.styles.articleType,children:c.title}),e.jsxs("div",{className:s.styles.articleCategories,children:[r&&a.render({href:`/blog/search?categories=${encodeURIComponent(r._id)}`,className:s.styles.category,children:r.title}),y&&a.render({href:`/blog/search?categories=${encodeURIComponent(n._id)}`,className:s.styles.category,children:n.title})]}),l.timeToRead>0&&e.jsxs("span",{children:[e.jsx("span",{className:s.styles.number,children:l.timeToRead}),"min read"]})]})}exports.HeroBlock=G;
@@ -213,6 +213,7 @@ function as({
213
213
  return /* @__PURE__ */ u(
214
214
  "section",
215
215
  {
216
+ "data-overlay": "true",
216
217
  id: d,
217
218
  className: `${s.hero} ${s.fullBleed} ${y}`,
218
219
  children: [
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index13.css');const a=require("react/jsx-runtime"),D=require("../../hooks/useStyleClasses.cjs"),u=require("../../../core/components/Tabs/index.cjs"),G=require("../../../index-D0ylyll7.cjs"),M=require("../../utils/resolveLinkUrl.cjs"),P=require("../../../core/context/ThemeContext.cjs"),m=require("../../utils/mediaUtils.cjs"),A="_tabs_1rrg8_1",F="_container_1rrg8_7",Y="_heading_1rrg8_25",J="_text_1rrg8_32",K="_headingHorizontal_1rrg8_46",Q="_title_1rrg8_54",W="_headingVertical_1rrg8_64",X="_tabContent_1rrg8_74",Z="_vertical_1rrg8_97",O="_tabsContainer_1rrg8_69",T="_tabImage_1rrg8_112",R="_tabText_1rrg8_120",tt="_gridItems_1rrg8_141",at="_gridItem_1rrg8_141",st="_fullBleed_1rrg8_181",lt="_overlay_1rrg8_208",ot="_eyebrow_1rrg8_314",s={tabs:A,container:F,heading:Y,text:J,headingHorizontal:K,title:Q,headingVertical:W,tabContent:X,vertical:Z,tabsContainer:O,tabImage:T,tabText:R,gridItems:tt,gridItem:at,default:"_default_1rrg8_166",fullBleed:st,overlay:lt,eyebrow:ot},et={orientationHorizontal:"horizontal",orientationVertical:"vertical"},it={themeDefault:"default",themeLight:"light",themeDark:"dark",themeTransparent:"transparent"},nt={horizontal:s.headingHorizontal,vertical:s.headingVertical},rt={horizontal:"",vertical:s.vertical};function ct({src:l,alt:r,renderImage:b}){return b?b({src:l,alt:r,width:600,height:658,priority:!0}):a.jsx("img",{src:l,alt:r,width:600,height:658})}function bt({items:l,mode:r,renderImage:b,renderRichText:n}){return a.jsx("div",{className:s.gridItems,children:l.map((o,t)=>{const i=m.resolveImageUrl(o.itemImage,r,"medium"),c=m.resolveAltText(o.itemImage,r,"Grid image");return a.jsxs("div",{className:s.gridItem,children:[i&&b?b({src:i,alt:c,width:200,height:200}):i?a.jsx("img",{src:i,alt:c,width:200,height:200}):null,o.itemText&&(n==null?void 0:n({blocks:o.itemText}))]},t)})})}function _t({heading:l,image:r,items:b,callToAction:n,styleOptions:o,renderRichText:t,renderCallToAction:i,renderImage:c}){const{mode:g}=P.useTheme(),I=D.useStyleClasses(o),d=(o==null?void 0:o.layout)??"default",w=nt[l.headingLayout??"vertical"],y=et[(o==null?void 0:o.orientation)??"orientationHorizontal"],x=it[(o==null?void 0:o.theme)??"themeDefault"],L=m.resolveImageUrl(r,g,"medium"),v=m.resolveImageUrl(r,g,"large"),j=m.resolveAltText(r,g,"Block image"),$=a.jsxs(u.Tabs,{defaultIndex:0,orientation:y,theme:x,children:[a.jsx(u.Tabs.List,{children:b.map((e,k)=>a.jsx(u.Tabs.Trigger,{index:k,children:e.title},e.title))}),b.map((e,k)=>{var z,p,h,q,H,S,C,E,V;const N=m.resolveImageUrl((z=e.content)==null?void 0:z.tabImage,g,"medium"),U=m.resolveAltText((p=e.content)==null?void 0:p.tabImage,g,"Tab image"),f=(h=e.content)!=null&&h.tabLink?M.resolveLinkURL(e.content.tabLink):void 0,_=(q=e.content)==null?void 0:q.tabLink,B=Array.isArray((H=e.content)==null?void 0:H.tabGridItem)?e.content.tabGridItem:null;return a.jsx(u.Tabs.Panel,{index:k,children:a.jsxs("div",{className:`${s.tabContent} ${rt[y]}`,children:[N&&a.jsx("div",{className:s.tabImage,children:c?c({src:N,alt:U,width:250,height:250}):a.jsx("img",{src:N,alt:U,width:250,height:250})}),a.jsxs("div",{className:s.tabText,children:[((S=e.content)==null?void 0:S.tabText)&&(t==null?void 0:t({blocks:e.content.tabText})),B&&a.jsx(bt,{items:B,mode:g,renderImage:c,renderRichText:t}),f&&f!=="#"&&_&&a.jsx(G.Button,{as:"a",variant:_.variant??"primary",href:f,target:((C=_.linkOptions)==null?void 0:C.linkType)==="external"?"_blank":"_self",rel:((E=_.linkOptions)==null?void 0:E.linkType)==="external"?"noopener noreferrer":"","aria-label":_.ariaLabel||_.label,children:_.label}),((V=e.content)==null?void 0:V.tabDisclaimer)&&(t==null?void 0:t({blocks:e.content.tabDisclaimer}))]})]})},e.title)})]});return d==="default"?a.jsx("section",{className:`${s.tabs} ${s.default} ${I}`,children:a.jsxs("article",{className:s.container,children:[L&&a.jsx(ct,{src:L,alt:j,renderImage:c}),a.jsxs("div",{className:`${s.heading} ${w}`,children:[a.jsxs("div",{children:[l.eyebrow&&(t==null?void 0:t({blocks:l.eyebrow,className:s.eyebrow})),t==null?void 0:t({blocks:l.title,className:s.title})]}),l.description&&a.jsx("div",{className:s.text,children:t==null?void 0:t({blocks:l.description})})]}),a.jsx("div",{className:s.tabsContainer,children:$}),n&&(i==null?void 0:i({items:n.items,alignment:n.alignment})),l.disclaimer&&(t==null?void 0:t({blocks:l.disclaimer}))]})}):d==="full-bleed"?a.jsx("section",{className:`${s.tabs} ${s.fullBleed} ${I} tabsFullBleed`,children:a.jsxs("article",{className:s.container,children:[v&&(c?c({src:v,alt:j,fill:!0,priority:!0,sizes:"(max-width: 767px) 600px, 1200px",style:{objectFit:"cover"},draggable:!1}):a.jsx("img",{src:v,alt:j,style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}})),a.jsx("div",{className:s.overlay,children:a.jsxs("div",{className:`${s.heading} ${w}`,children:[a.jsxs("div",{children:[l.eyebrow&&(t==null?void 0:t({blocks:l.eyebrow,className:s.eyebrow})),t==null?void 0:t({blocks:l.title,className:s.title})]}),l.description&&(t==null?void 0:t({blocks:l.description})),a.jsx("div",{className:s.tabsContainer,children:$}),n&&(i==null?void 0:i({items:n.items,alignment:n.alignment})),l.disclaimer&&(t==null?void 0:t({blocks:l.disclaimer}))]})})]})}):null}exports.TabsBlock=_t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index13.css');const a=require("react/jsx-runtime"),D=require("../../hooks/useStyleClasses.cjs"),u=require("../../../core/components/Tabs/index.cjs"),G=require("../../../index-D0ylyll7.cjs"),M=require("../../utils/resolveLinkUrl.cjs"),P=require("../../../core/context/ThemeContext.cjs"),m=require("../../utils/mediaUtils.cjs"),A="_tabs_1rrg8_1",F="_container_1rrg8_7",Y="_heading_1rrg8_25",J="_text_1rrg8_32",K="_headingHorizontal_1rrg8_46",Q="_title_1rrg8_54",W="_headingVertical_1rrg8_64",X="_tabContent_1rrg8_74",Z="_vertical_1rrg8_97",O="_tabsContainer_1rrg8_69",T="_tabImage_1rrg8_112",R="_tabText_1rrg8_120",tt="_gridItems_1rrg8_141",at="_gridItem_1rrg8_141",st="_fullBleed_1rrg8_181",lt="_overlay_1rrg8_208",ot="_eyebrow_1rrg8_314",s={tabs:A,container:F,heading:Y,text:J,headingHorizontal:K,title:Q,headingVertical:W,tabContent:X,vertical:Z,tabsContainer:O,tabImage:T,tabText:R,gridItems:tt,gridItem:at,default:"_default_1rrg8_166",fullBleed:st,overlay:lt,eyebrow:ot},et={orientationHorizontal:"horizontal",orientationVertical:"vertical"},it={themeDefault:"default",themeLight:"light",themeDark:"dark",themeTransparent:"transparent"},nt={horizontal:s.headingHorizontal,vertical:s.headingVertical},rt={horizontal:"",vertical:s.vertical};function ct({src:l,alt:r,renderImage:b}){return b?b({src:l,alt:r,width:600,height:658,priority:!0}):a.jsx("img",{src:l,alt:r,width:600,height:658})}function bt({items:l,mode:r,renderImage:b,renderRichText:n}){return a.jsx("div",{className:s.gridItems,children:l.map((o,t)=>{const i=m.resolveImageUrl(o.itemImage,r,"medium"),c=m.resolveAltText(o.itemImage,r,"Grid image");return a.jsxs("div",{className:s.gridItem,children:[i&&b?b({src:i,alt:c,width:200,height:200}):i?a.jsx("img",{src:i,alt:c,width:200,height:200}):null,o.itemText&&(n==null?void 0:n({blocks:o.itemText}))]},t)})})}function _t({heading:l,image:r,items:b,callToAction:n,styleOptions:o,renderRichText:t,renderCallToAction:i,renderImage:c}){const{mode:g}=P.useTheme(),I=D.useStyleClasses(o),d=(o==null?void 0:o.layout)??"default",w=nt[l.headingLayout??"vertical"],y=et[(o==null?void 0:o.orientation)??"orientationHorizontal"],x=it[(o==null?void 0:o.theme)??"themeDefault"],L=m.resolveImageUrl(r,g,"medium"),v=m.resolveImageUrl(r,g,"large"),j=m.resolveAltText(r,g,"Block image"),$=a.jsxs(u.Tabs,{defaultIndex:0,orientation:y,theme:x,children:[a.jsx(u.Tabs.List,{children:b.map((e,k)=>a.jsx(u.Tabs.Trigger,{index:k,children:e.title},e.title))}),b.map((e,k)=>{var z,p,h,q,H,S,C,E,V;const N=m.resolveImageUrl((z=e.content)==null?void 0:z.tabImage,g,"medium"),U=m.resolveAltText((p=e.content)==null?void 0:p.tabImage,g,"Tab image"),f=(h=e.content)!=null&&h.tabLink?M.resolveLinkURL(e.content.tabLink):void 0,_=(q=e.content)==null?void 0:q.tabLink,B=Array.isArray((H=e.content)==null?void 0:H.tabGridItem)?e.content.tabGridItem:null;return a.jsx(u.Tabs.Panel,{index:k,children:a.jsxs("div",{className:`${s.tabContent} ${rt[y]}`,children:[N&&a.jsx("div",{className:s.tabImage,children:c?c({src:N,alt:U,width:250,height:250}):a.jsx("img",{src:N,alt:U,width:250,height:250})}),a.jsxs("div",{className:s.tabText,children:[((S=e.content)==null?void 0:S.tabText)&&(t==null?void 0:t({blocks:e.content.tabText})),B&&a.jsx(bt,{items:B,mode:g,renderImage:c,renderRichText:t}),f&&f!=="#"&&_&&a.jsx(G.Button,{as:"a",variant:_.variant??"primary",href:f,target:((C=_.linkOptions)==null?void 0:C.linkType)==="external"?"_blank":"_self",rel:((E=_.linkOptions)==null?void 0:E.linkType)==="external"?"noopener noreferrer":"","aria-label":_.ariaLabel||_.label,children:_.label}),((V=e.content)==null?void 0:V.tabDisclaimer)&&(t==null?void 0:t({blocks:e.content.tabDisclaimer}))]})]})},e.title)})]});return d==="default"?a.jsx("section",{className:`${s.tabs} ${s.default} ${I}`,children:a.jsxs("article",{className:s.container,children:[L&&a.jsx(ct,{src:L,alt:j,renderImage:c}),a.jsxs("div",{className:`${s.heading} ${w}`,children:[a.jsxs("div",{children:[l.eyebrow&&(t==null?void 0:t({blocks:l.eyebrow,className:s.eyebrow})),t==null?void 0:t({blocks:l.title,className:s.title})]}),l.description&&a.jsx("div",{className:s.text,children:t==null?void 0:t({blocks:l.description})})]}),a.jsx("div",{className:s.tabsContainer,children:$}),n&&(i==null?void 0:i({items:n.items,alignment:n.alignment})),l.disclaimer&&(t==null?void 0:t({blocks:l.disclaimer}))]})}):d==="full-bleed"?a.jsx("section",{"data-overlay":"true",className:`${s.tabs} ${s.fullBleed} ${I} tabsFullBleed`,children:a.jsxs("article",{className:s.container,children:[v&&(c?c({src:v,alt:j,fill:!0,priority:!0,sizes:"(max-width: 767px) 600px, 1200px",style:{objectFit:"cover"},draggable:!1}):a.jsx("img",{src:v,alt:j,style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}})),a.jsx("div",{className:s.overlay,children:a.jsxs("div",{className:`${s.heading} ${w}`,children:[a.jsxs("div",{children:[l.eyebrow&&(t==null?void 0:t({blocks:l.eyebrow,className:s.eyebrow})),t==null?void 0:t({blocks:l.title,className:s.title})]}),l.description&&(t==null?void 0:t({blocks:l.description})),a.jsx("div",{className:s.tabsContainer,children:$}),n&&(i==null?void 0:i({items:n.items,alignment:n.alignment})),l.disclaimer&&(t==null?void 0:t({blocks:l.disclaimer}))]})})]})}):null}exports.TabsBlock=_t;
@@ -1,10 +1,10 @@
1
- import { jsxs as c, jsx as s } from "react/jsx-runtime";
1
+ import { jsxs as r, jsx as s } from "react/jsx-runtime";
2
2
  import { useStyleClasses as P } from "../../hooks/useStyleClasses.mjs";
3
3
  import { Tabs as u } from "../../../core/components/Tabs/index.mjs";
4
4
  import { B as A } from "../../../index-CnlJ2RgH.js";
5
5
  import { resolveLinkURL as Y } from "../../utils/resolveLinkUrl.mjs";
6
6
  import { useTheme as q } from "../../../core/context/ThemeContext.mjs";
7
- import { resolveImageUrl as v, resolveAltText as L } from "../../utils/mediaUtils.mjs";
7
+ import { resolveImageUrl as v, resolveAltText as d } from "../../utils/mediaUtils.mjs";
8
8
  import '../../../index13.css';const J = "_tabs_1rrg8_1", K = "_container_1rrg8_7", Q = "_heading_1rrg8_25", W = "_text_1rrg8_32", X = "_headingHorizontal_1rrg8_46", Z = "_title_1rrg8_54", O = "_headingVertical_1rrg8_64", x = "_tabContent_1rrg8_74", T = "_vertical_1rrg8_97", R = "_tabsContainer_1rrg8_69", tt = "_tabImage_1rrg8_112", at = "_tabText_1rrg8_120", lt = "_gridItems_1rrg8_141", st = "_gridItem_1rrg8_141", ot = "_fullBleed_1rrg8_181", it = "_overlay_1rrg8_208", nt = "_eyebrow_1rrg8_314", a = {
9
9
  tabs: J,
10
10
  container: K,
@@ -27,48 +27,48 @@ import '../../../index13.css';const J = "_tabs_1rrg8_1", K = "_container_1rrg8_7
27
27
  }, mt = {
28
28
  orientationHorizontal: "horizontal",
29
29
  orientationVertical: "vertical"
30
- }, ct = {
30
+ }, rt = {
31
31
  themeDefault: "default",
32
32
  themeLight: "light",
33
33
  themeDark: "dark",
34
34
  themeTransparent: "transparent"
35
- }, rt = {
35
+ }, ct = {
36
36
  horizontal: a.headingHorizontal,
37
37
  vertical: a.headingVertical
38
- }, bt = {
38
+ }, et = {
39
39
  horizontal: "",
40
40
  vertical: a.vertical
41
41
  };
42
- function et({ src: l, alt: r, renderImage: e }) {
43
- return e ? e({ src: l, alt: r, width: 600, height: 658, priority: !0 }) : /* @__PURE__ */ s("img", { src: l, alt: r, width: 600, height: 658 });
42
+ function bt({ src: l, alt: c, renderImage: b }) {
43
+ return b ? b({ src: l, alt: c, width: 600, height: 658, priority: !0 }) : /* @__PURE__ */ s("img", { src: l, alt: c, width: 600, height: 658 });
44
44
  }
45
45
  function _t({
46
46
  items: l,
47
- mode: r,
48
- renderImage: e,
47
+ mode: c,
48
+ renderImage: b,
49
49
  renderRichText: m
50
50
  }) {
51
51
  return /* @__PURE__ */ s("div", { className: a.gridItems, children: l.map((o, t) => {
52
52
  const n = v(
53
53
  o.itemImage,
54
- r,
54
+ c,
55
55
  "medium"
56
- ), b = L(
56
+ ), e = d(
57
57
  o.itemImage,
58
- r,
58
+ c,
59
59
  "Grid image"
60
60
  );
61
- return /* @__PURE__ */ c("div", { className: a.gridItem, children: [
62
- n && e ? e({
61
+ return /* @__PURE__ */ r("div", { className: a.gridItem, children: [
62
+ n && b ? b({
63
63
  src: n,
64
- alt: b,
64
+ alt: e,
65
65
  width: 200,
66
66
  height: 200
67
67
  }) : n ? /* @__PURE__ */ s(
68
68
  "img",
69
69
  {
70
70
  src: n,
71
- alt: b,
71
+ alt: e,
72
72
  width: 200,
73
73
  height: 200
74
74
  }
@@ -79,33 +79,33 @@ function _t({
79
79
  }
80
80
  function wt({
81
81
  heading: l,
82
- image: r,
83
- items: e,
82
+ image: c,
83
+ items: b,
84
84
  callToAction: m,
85
85
  styleOptions: o,
86
86
  renderRichText: t,
87
87
  renderCallToAction: n,
88
- renderImage: b
88
+ renderImage: e
89
89
  }) {
90
- const { mode: g } = q(), d = P(o), p = (o == null ? void 0 : o.layout) ?? "default", y = rt[l.headingLayout ?? "vertical"], $ = mt[(o == null ? void 0 : o.orientation) ?? "orientationHorizontal"], M = ct[(o == null ? void 0 : o.theme) ?? "themeDefault"], B = v(r, g, "medium"), f = v(r, g, "large"), k = L(r, g, "Block image"), z = /* @__PURE__ */ c(u, { defaultIndex: 0, orientation: $, theme: M, children: [
91
- /* @__PURE__ */ s(u.List, { children: e.map((i, N) => /* @__PURE__ */ s(u.Trigger, { index: N, children: i.title }, i.title)) }),
92
- e.map((i, N) => {
90
+ const { mode: g } = q(), L = P(o), p = (o == null ? void 0 : o.layout) ?? "default", y = ct[l.headingLayout ?? "vertical"], $ = mt[(o == null ? void 0 : o.orientation) ?? "orientationHorizontal"], M = rt[(o == null ? void 0 : o.theme) ?? "themeDefault"], B = v(c, g, "medium"), f = v(c, g, "large"), k = d(c, g, "Block image"), z = /* @__PURE__ */ r(u, { defaultIndex: 0, orientation: $, theme: M, children: [
91
+ /* @__PURE__ */ s(u.List, { children: b.map((i, N) => /* @__PURE__ */ s(u.Trigger, { index: N, children: i.title }, i.title)) }),
92
+ b.map((i, N) => {
93
93
  var E, V, h, D, G, C, S, j, F;
94
94
  const I = v(
95
95
  (E = i.content) == null ? void 0 : E.tabImage,
96
96
  g,
97
97
  "medium"
98
- ), H = L(
98
+ ), H = d(
99
99
  (V = i.content) == null ? void 0 : V.tabImage,
100
100
  g,
101
101
  "Tab image"
102
102
  ), w = (h = i.content) != null && h.tabLink ? Y(i.content.tabLink) : void 0, _ = (D = i.content) == null ? void 0 : D.tabLink, U = Array.isArray((G = i.content) == null ? void 0 : G.tabGridItem) ? i.content.tabGridItem : null;
103
- return /* @__PURE__ */ s(u.Panel, { index: N, children: /* @__PURE__ */ c(
103
+ return /* @__PURE__ */ s(u.Panel, { index: N, children: /* @__PURE__ */ r(
104
104
  "div",
105
105
  {
106
- className: `${a.tabContent} ${bt[$]}`,
106
+ className: `${a.tabContent} ${et[$]}`,
107
107
  children: [
108
- I && /* @__PURE__ */ s("div", { className: a.tabImage, children: b ? b({
108
+ I && /* @__PURE__ */ s("div", { className: a.tabImage, children: e ? e({
109
109
  src: I,
110
110
  alt: H,
111
111
  width: 250,
@@ -119,14 +119,14 @@ function wt({
119
119
  height: 250
120
120
  }
121
121
  ) }),
122
- /* @__PURE__ */ c("div", { className: a.tabText, children: [
122
+ /* @__PURE__ */ r("div", { className: a.tabText, children: [
123
123
  ((C = i.content) == null ? void 0 : C.tabText) && (t == null ? void 0 : t({ blocks: i.content.tabText })),
124
124
  U && /* @__PURE__ */ s(
125
125
  _t,
126
126
  {
127
127
  items: U,
128
128
  mode: g,
129
- renderImage: b,
129
+ renderImage: e,
130
130
  renderRichText: t
131
131
  }
132
132
  ),
@@ -149,17 +149,17 @@ function wt({
149
149
  ) }, i.title);
150
150
  })
151
151
  ] });
152
- return p === "default" ? /* @__PURE__ */ s("section", { className: `${a.tabs} ${a.default} ${d}`, children: /* @__PURE__ */ c("article", { className: a.container, children: [
152
+ return p === "default" ? /* @__PURE__ */ s("section", { className: `${a.tabs} ${a.default} ${L}`, children: /* @__PURE__ */ r("article", { className: a.container, children: [
153
153
  B && /* @__PURE__ */ s(
154
- et,
154
+ bt,
155
155
  {
156
156
  src: B,
157
157
  alt: k,
158
- renderImage: b
158
+ renderImage: e
159
159
  }
160
160
  ),
161
- /* @__PURE__ */ c("div", { className: `${a.heading} ${y}`, children: [
162
- /* @__PURE__ */ c("div", { children: [
161
+ /* @__PURE__ */ r("div", { className: `${a.heading} ${y}`, children: [
162
+ /* @__PURE__ */ r("div", { children: [
163
163
  l.eyebrow && (t == null ? void 0 : t({
164
164
  blocks: l.eyebrow,
165
165
  className: a.eyebrow
@@ -180,9 +180,10 @@ function wt({
180
180
  ] }) }) : p === "full-bleed" ? /* @__PURE__ */ s(
181
181
  "section",
182
182
  {
183
- className: `${a.tabs} ${a.fullBleed} ${d} tabsFullBleed`,
184
- children: /* @__PURE__ */ c("article", { className: a.container, children: [
185
- f && (b ? b({
183
+ "data-overlay": "true",
184
+ className: `${a.tabs} ${a.fullBleed} ${L} tabsFullBleed`,
185
+ children: /* @__PURE__ */ r("article", { className: a.container, children: [
186
+ f && (e ? e({
186
187
  src: f,
187
188
  alt: k,
188
189
  fill: !0,
@@ -204,8 +205,8 @@ function wt({
204
205
  }
205
206
  }
206
207
  )),
207
- /* @__PURE__ */ s("div", { className: a.overlay, children: /* @__PURE__ */ c("div", { className: `${a.heading} ${y}`, children: [
208
- /* @__PURE__ */ c("div", { children: [
208
+ /* @__PURE__ */ s("div", { className: a.overlay, children: /* @__PURE__ */ r("div", { className: `${a.heading} ${y}`, children: [
209
+ /* @__PURE__ */ r("div", { children: [
209
210
  l.eyebrow && (t == null ? void 0 : t({
210
211
  blocks: l.eyebrow,
211
212
  className: a.eyebrow
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quirk-ui",
3
3
  "private": false,
4
- "version": "0.1.63",
4
+ "version": "0.1.64",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {