quirk-ui 0.0.482 → 0.0.484

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"});require('../../../assets/index11.css');const n=require("react/jsx-runtime"),l=require("../../ui/LocaleLink/index.cjs"),o="_additionalCategories_1wmnv_1",a="_container_1wmnv_6",c="_categories_1wmnv_12",r="_list_1wmnv_23",d="_category_1wmnv_31",i={additionalCategories:o,container:a,categories:c,list:r,category:d};function _({categories:e,type:s}){if((e==null?void 0:e.length)!==0)return console.log("CAT",e),n.jsx("section",{className:`${i.additionalCategories} ${s=="article"?"blog":""}`,children:n.jsx("article",{className:i.container,children:n.jsxs("div",{className:i.categories,children:[n.jsx("p",{children:"In this article:"}),n.jsx("div",{className:i.list,children:e&&e.length>0&&e.map(t=>t.slug.current.includes("keyword")&&n.jsx(l.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(t._id)}`,className:i.category,children:t.title},t._id))})]})})})}exports.AdditionalCategoriesBlock=_;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index11.css');const i=require("react/jsx-runtime"),l=require("../../ui/LocaleLink/index.cjs"),o="_additionalCategories_1wmnv_1",a="_container_1wmnv_6",c="_categories_1wmnv_12",r="_list_1wmnv_23",d="_category_1wmnv_31",n={additionalCategories:o,container:a,categories:c,list:r,category:d};function _({categories:e,type:s}){if((e==null?void 0:e.length)!==0)return i.jsx("section",{className:`${n.additionalCategories} ${s=="article"?"blog":""}`,children:i.jsx("article",{className:n.container,children:i.jsxs("div",{className:n.categories,children:[i.jsx("p",{children:"In this article:"}),i.jsx("div",{className:n.list,children:e&&e.length>0&&e.map(t=>t.slug.current.includes("keyword")&&i.jsx(l.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(t._id)}`,className:n.category,children:t.title},t._id))})]})})})}exports.AdditionalCategoriesBlock=_;
@@ -1,7 +1,7 @@
1
- import { jsx as i, jsxs as l } from "react/jsx-runtime";
2
- import { LocaleLink as s } from "../../ui/LocaleLink/index.mjs";
3
- import '../../../assets/index11.css';const a = "_additionalCategories_1wmnv_1", c = "_container_1wmnv_6", r = "_categories_1wmnv_12", d = "_list_1wmnv_23", _ = "_category_1wmnv_31", e = {
4
- additionalCategories: a,
1
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
2
+ import { LocaleLink as l } from "../../ui/LocaleLink/index.mjs";
3
+ import '../../../assets/index11.css';const s = "_additionalCategories_1wmnv_1", c = "_container_1wmnv_6", r = "_categories_1wmnv_12", d = "_list_1wmnv_23", _ = "_category_1wmnv_31", e = {
4
+ additionalCategories: s,
5
5
  container: c,
6
6
  categories: r,
7
7
  list: d,
@@ -12,15 +12,15 @@ function g({
12
12
  type: o
13
13
  }) {
14
14
  if ((n == null ? void 0 : n.length) !== 0)
15
- return console.log("CAT", n), /* @__PURE__ */ i(
15
+ return /* @__PURE__ */ i(
16
16
  "section",
17
17
  {
18
18
  className: `${e.additionalCategories} ${o == "article" ? "blog" : ""}`,
19
- children: /* @__PURE__ */ i("article", { className: e.container, children: /* @__PURE__ */ l("div", { className: e.categories, children: [
19
+ children: /* @__PURE__ */ i("article", { className: e.container, children: /* @__PURE__ */ a("div", { className: e.categories, children: [
20
20
  /* @__PURE__ */ i("p", { children: "In this article:" }),
21
21
  /* @__PURE__ */ i("div", { className: e.list, children: n && n.length > 0 && n.map(
22
22
  (t) => t.slug.current.includes("keyword") && /* @__PURE__ */ i(
23
- s,
23
+ l,
24
24
  {
25
25
  href: `/blog/search?categories=${encodeURIComponent(
26
26
  t._id
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index67.css');const e=require("react/jsx-runtime"),h=require("react"),I=require("./HeroContext.cjs"),i=require("../../ui/PortableTextRenderer/index.cjs"),m=require("../../ui/CallToActions/index.cjs"),v=require("next/image"),w=require("../../ui/LocaleLink/index.cjs"),L=require("../../hooks/usePrefersReducedMotion.cjs"),P=require("../../../createLucideIcon-DpotSgUx.cjs"),q=require("../../../play-CQBnZgNa.cjs");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index67.css');const e=require("react/jsx-runtime"),j=require("react"),q=require("./HeroContext.cjs"),c=require("../../ui/PortableTextRenderer/index.cjs"),p=require("../../ui/CallToActions/index.cjs"),k=require("next/image"),N=require("../../ui/LocaleLink/index.cjs"),F=require("../../hooks/usePrefersReducedMotion.cjs"),U=require("../../../createLucideIcon-DpotSgUx.cjs"),H=require("../../../play-CQBnZgNa.cjs");/**
2
2
  * @license lucide-react v0.488.0 - ISC
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 F=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],U=P.createLucideIcon("pause",F),H="_hero_vho5i_1",S="_container_vho5i_7",z="_eyebrow_vho5i_24",W="_disclaimer_vho5i_28",E="_text_vho5i_33",M="_articleDetails_vho5i_40",V="_articleType_vho5i_53",Y="_articleCategories_vho5i_67",G="_category_vho5i_73",J="_number_vho5i_89",K="_blog_vho5i_116",Q="_overlay_vho5i_140",X="_fullBleed_vho5i_210",Z="_split_vho5i_304",O="_image_vho5i_309",A="_videoControl_vho5i_332",g="_videoWrapper_vho5i_353",D="_videoBackground_vho5i_373",ee="_iframe_vho5i_374",s={hero:H,container:S,eyebrow:z,disclaimer:W,text:E,articleDetails:M,articleType:V,articleCategories:Y,category:G,number:J,default:"_default_vho5i_112",blog:K,overlay:Q,fullBleed:X,split:Z,image:O,videoControl:A,videoWrapper:g,videoBackground:D,iframe:ee};function se({heading:t,image:l,video:r,callToAction:n,pageData:o,styleOptions:j}){var $,B;const u=L.usePrefersReducedMotion(),[k,N]=h.useState(!u),{setIsFullbleedHeroAtTop:C}=I.useHeroContext(),a=h.useRef(null),y=(j==null?void 0:j.layout)??"default",b={default:s.default,split:s.split,"full-bleed":s.fullBleed,blog:s.blog}[y],_=($=o==null?void 0:o.categories)!=null&&$.length?o==null?void 0:o.categories[0]:null,d=(B=o==null?void 0:o.categories)!=null&&B.length?o==null?void 0:o.categories[1]:null;h.useEffect(()=>{const c=()=>{C(window.scrollY===0)};if(y==="full-bleed"&&typeof window<"u")return C(!0),window.addEventListener("scroll",c),()=>window.removeEventListener("scroll",c)},[y]),h.useEffect(()=>{const c=a.current;c&&(u?c.pause():c.play())},[u]);const p=()=>e.jsx("button",{title:`${k?"Pause the video":"Play the video"}`,className:s.videoControl,onClick:()=>{const c=a.current;c&&(c.paused?(c.play().catch(()=>{}),N(!0)):(c.pause(),N(!1)))},children:k?e.jsx(U,{size:18}):e.jsx(q.Play,{size:18})}),R=()=>{if(!r)return null;const c=r.includes("vimeo.com"),x=r.includes("youtube.com")||r.includes("youtu.be");return c||x?e.jsx("div",{className:s.videoWrapper,children:e.jsx("iframe",{src:c?`${r}?autoplay=1&muted=1&loop=1&background=1`:`${r}?autoplay=1&mute=1&loop=1&playlist=${f(r)}`,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs("div",{className:s.videoWrapper,children:[e.jsx(p,{}),e.jsx("video",{ref:a,src:r,autoPlay:!u,loop:!0,muted:!0,playsInline:!0,poster:(l==null?void 0:l.imageUrl)||void 0,preload:"metadata"})]})};function f(c){const x=c.match(/(?:youtube\.com\/.*v=|youtu\.be\/)([^&?/]+)/);return(x==null?void 0:x[1])||""}const T=()=>l&&l.imageUrl?e.jsx("div",{className:s.image,children:e.jsx(v,{src:l.imageUrl,alt:l.asset.altText||l.asset.description||"Hero image",width:600,height:658,priority:!0})}):null;switch(y){case"split":return e.jsx("section",{className:`${s.hero} ${s.split}`,children:e.jsxs("article",{className:s.container,children:[e.jsxs("div",{className:s.text,children:[e.jsxs("div",{children:[t.eyebrow&&e.jsx(i.RichText,{className:s.eyebrow,blocks:t.eyebrow}),e.jsx(i.RichText,{blocks:t.title})]}),t.description&&e.jsx(i.RichText,{blocks:t.description}),n&&e.jsx(m.CallToActions,{items:n.items,alignment:n.alignment}),t.disclaimer&&e.jsx(i.RichText,{className:s.disclaimer,blocks:t.disclaimer})]}),r?e.jsx(R,{}):e.jsx(T,{})]})});case"default":return e.jsx("section",{className:`${s.hero} ${b}`,children:e.jsxs("article",{className:s.container,children:[r?e.jsx(R,{}):e.jsx(T,{}),e.jsxs("div",{className:s.text,children:[e.jsxs("div",{children:[t.eyebrow&&e.jsx(i.RichText,{className:s.eyebrow,blocks:t.eyebrow}),e.jsx(i.RichText,{blocks:t.title})]}),t.description&&e.jsx(i.RichText,{blocks:t.description}),n&&e.jsx(m.CallToActions,{items:n.items,alignment:n.alignment})]})]})});case"full-bleed":return e.jsx("section",{className:`${s.hero} ${b} heroFullBleed`,children:e.jsxs("article",{className:s.container,children:[r?r.includes("vimeo.com")||r.includes("youtube.com")||r.includes("youtu.be")?e.jsx("div",{className:s.videoBackground,children:e.jsx("iframe",{src:r.includes("vimeo.com")?`${r}?autoplay=1&muted=1&loop=1&background=1`:`${r}?autoplay=1&mute=1&loop=1&playlist=${f(r)}`,className:s.iframe,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(p,{}),e.jsx("video",{ref:a,className:s.videoBackground,src:r,autoPlay:!u,loop:!0,muted:!0,playsInline:!0,poster:(l==null?void 0:l.imageUrl)||void 0})]}):e.jsx(v,{src:(l==null?void 0:l.imageUrl)??"",alt:(l==null?void 0:l.asset.altText)||(l==null?void 0:l.asset.description)||"Card image",fill:!0,priority:!0,style:{objectFit:"cover"},draggable:!1,sizes:"(min-width: 500px) 500px, 100vw"}),e.jsx("div",{className:s.overlay,children:e.jsxs("div",{className:s.text,children:[e.jsxs("div",{children:[t.eyebrow&&e.jsx(i.RichText,{className:s.eyebrow,blocks:t.eyebrow}),e.jsx(i.RichText,{blocks:t.title})]}),t.description&&e.jsx(i.RichText,{blocks:t.description}),n&&e.jsx(m.CallToActions,{items:n.items,alignment:n.alignment})]})})]})});case"blog":return e.jsx("section",{className:`${s.hero} ${b}`,children:e.jsxs("article",{className:s.container,children:[r?r.includes("vimeo.com")||r.includes("youtube.com")||r.includes("youtu.be")?e.jsx("div",{className:s.videoBackground,children:e.jsx("iframe",{src:r.includes("vimeo.com")?`${r}?autoplay=1&muted=1&loop=1&background=1`:`${r}?autoplay=1&mute=1&loop=1&playlist=${f(r)}`,className:s.iframe,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(p,{}),e.jsx("video",{ref:a,className:s.videoBackground,src:r,autoPlay:!u,loop:!0,muted:!0,playsInline:!0,poster:(l==null?void 0:l.imageUrl)||void 0})]}):e.jsx(v,{src:(l==null?void 0:l.imageUrl)??"",alt:(l==null?void 0:l.asset.altText)||(l==null?void 0:l.asset.description)||"Card image",fill:!0,priority:!0,style:{objectFit:"cover"},draggable:!1,sizes:"(min-width: 500px) 500px, 100vw"}),e.jsx("div",{className:s.overlay,children:e.jsxs("div",{className:s.text,children:[e.jsxs("div",{children:[t.eyebrow&&e.jsx(i.RichText,{className:s.eyebrow,blocks:t.eyebrow}),o&&e.jsxs("div",{className:s.articleDetails,children:[o.articleType&&e.jsx(w.LocaleLink,{href:`/blog/search?type=${encodeURIComponent(o.articleType)}`,className:s.articleType,children:o.articleType},o.articleType),e.jsxs("div",{className:s.articleCategories,children:[_&&e.jsx(w.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(_._id)}`,className:s.category,children:_.title},_._id),d&&d.title.toLowerCase()!=="library"&&!d.slug.current.includes("keywords")&&e.jsx(w.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(d._id)}`,className:s.category,children:d.title},d._id)]}),o.timeToRead&&e.jsx(e.Fragment,{children:e.jsxs("span",{children:[e.jsx("span",{className:s.number,children:o.timeToRead}),"min read"]})})]}),e.jsx(i.RichText,{blocks:t.title})]}),t.description&&e.jsx(i.RichText,{blocks:t.description}),n&&e.jsx(m.CallToActions,{items:n.items,alignment:n.alignment})]})})]})})}}exports.HeroBlock=se;
6
+ */const S=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],W=U.createLucideIcon("pause",S),z="_hero_vho5i_1",E="_container_vho5i_7",M="_eyebrow_vho5i_24",V="_disclaimer_vho5i_28",Y="_text_vho5i_33",G="_articleDetails_vho5i_40",J="_articleType_vho5i_53",K="_articleCategories_vho5i_67",Q="_category_vho5i_73",X="_number_vho5i_89",Z="_blog_vho5i_116",g="_overlay_vho5i_140",O="_fullBleed_vho5i_210",A="_split_vho5i_304",D="_image_vho5i_309",ee="_videoControl_vho5i_332",se="_videoWrapper_vho5i_353",te="_videoBackground_vho5i_373",re="_iframe_vho5i_374",s={hero:z,container:E,eyebrow:M,disclaimer:V,text:Y,articleDetails:G,articleType:J,articleCategories:K,category:Q,number:X,default:"_default_vho5i_112",blog:Z,overlay:g,fullBleed:O,split:A,image:D,videoControl:ee,videoWrapper:se,videoBackground:te,iframe:re};function le({heading:l,image:t,video:r,callToAction:i,pageData:a,styleOptions:b}){var L,P;const u=F.usePrefersReducedMotion(),[C,R]=j.useState(!u),{setIsFullbleedHeroAtTop:$}=q.useHeroContext(),x=j.useRef(null),_=(b==null?void 0:b.layout)??"default",f={default:s.default,split:s.split,"full-bleed":s.fullBleed,blog:s.blog}[_],T=((L=a==null?void 0:a.categories)==null?void 0:L.filter(o=>{var n,y;return!((y=(n=o.slug)==null?void 0:n.current)!=null&&y.startsWith("library/type"))}))??[],h=T[0]??null,d=T[1]??null,m=((P=a==null?void 0:a.categories)==null?void 0:P.find(o=>{var n,y;return(y=(n=o.slug)==null?void 0:n.current)==null?void 0:y.startsWith("library/type")}))??null;j.useEffect(()=>{const o=()=>{$(window.scrollY===0)};if(_==="full-bleed"&&typeof window<"u")return $(!0),window.addEventListener("scroll",o),()=>window.removeEventListener("scroll",o)},[_]),j.useEffect(()=>{const o=x.current;o&&(u?o.pause():o.play())},[u]);const v=()=>e.jsx("button",{title:`${C?"Pause the video":"Play the video"}`,className:s.videoControl,onClick:()=>{const o=x.current;o&&(o.paused?(o.play().catch(()=>{}),R(!0)):(o.pause(),R(!1)))},children:C?e.jsx(W,{size:18}):e.jsx(H.Play,{size:18})}),B=()=>{if(!r)return null;const o=r.includes("vimeo.com"),n=r.includes("youtube.com")||r.includes("youtu.be");return o||n?e.jsx("div",{className:s.videoWrapper,children:e.jsx("iframe",{src:o?`${r}?autoplay=1&muted=1&loop=1&background=1`:`${r}?autoplay=1&mute=1&loop=1&playlist=${w(r)}`,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs("div",{className:s.videoWrapper,children:[e.jsx(v,{}),e.jsx("video",{ref:x,src:r,autoPlay:!u,loop:!0,muted:!0,playsInline:!0,poster:(t==null?void 0:t.imageUrl)||void 0,preload:"metadata"})]})};function w(o){const n=o.match(/(?:youtube\.com\/.*v=|youtu\.be\/)([^&?/]+)/);return(n==null?void 0:n[1])||""}const I=()=>t&&t.imageUrl?e.jsx("div",{className:s.image,children:e.jsx(k,{src:t.imageUrl,alt:t.asset.altText||t.asset.description||"Hero image",width:600,height:658,priority:!0})}):null;switch(_){case"split":return e.jsx("section",{className:`${s.hero} ${s.split}`,children:e.jsxs("article",{className:s.container,children:[e.jsxs("div",{className:s.text,children:[e.jsxs("div",{children:[l.eyebrow&&e.jsx(c.RichText,{className:s.eyebrow,blocks:l.eyebrow}),e.jsx(c.RichText,{blocks:l.title})]}),l.description&&e.jsx(c.RichText,{blocks:l.description}),i&&e.jsx(p.CallToActions,{items:i.items,alignment:i.alignment}),l.disclaimer&&e.jsx(c.RichText,{className:s.disclaimer,blocks:l.disclaimer})]}),r?e.jsx(B,{}):e.jsx(I,{})]})});case"default":return e.jsx("section",{className:`${s.hero} ${f}`,children:e.jsxs("article",{className:s.container,children:[r?e.jsx(B,{}):e.jsx(I,{}),e.jsxs("div",{className:s.text,children:[e.jsxs("div",{children:[l.eyebrow&&e.jsx(c.RichText,{className:s.eyebrow,blocks:l.eyebrow}),e.jsx(c.RichText,{blocks:l.title})]}),l.description&&e.jsx(c.RichText,{blocks:l.description}),i&&e.jsx(p.CallToActions,{items:i.items,alignment:i.alignment})]})]})});case"full-bleed":return e.jsx("section",{className:`${s.hero} ${f} heroFullBleed`,children:e.jsxs("article",{className:s.container,children:[r?r.includes("vimeo.com")||r.includes("youtube.com")||r.includes("youtu.be")?e.jsx("div",{className:s.videoBackground,children:e.jsx("iframe",{src:r.includes("vimeo.com")?`${r}?autoplay=1&muted=1&loop=1&background=1`:`${r}?autoplay=1&mute=1&loop=1&playlist=${w(r)}`,className:s.iframe,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(v,{}),e.jsx("video",{ref:x,className:s.videoBackground,src:r,autoPlay:!u,loop:!0,muted:!0,playsInline:!0,poster:(t==null?void 0:t.imageUrl)||void 0})]}):e.jsx(k,{src:(t==null?void 0:t.imageUrl)??"",alt:(t==null?void 0:t.asset.altText)||(t==null?void 0:t.asset.description)||"Card image",fill:!0,priority:!0,style:{objectFit:"cover"},draggable:!1,sizes:"(min-width: 500px) 500px, 100vw"}),e.jsx("div",{className:s.overlay,children:e.jsxs("div",{className:s.text,children:[e.jsxs("div",{children:[l.eyebrow&&e.jsx(c.RichText,{className:s.eyebrow,blocks:l.eyebrow}),e.jsx(c.RichText,{blocks:l.title})]}),l.description&&e.jsx(c.RichText,{blocks:l.description}),i&&e.jsx(p.CallToActions,{items:i.items,alignment:i.alignment})]})})]})});case"blog":return e.jsx("section",{className:`${s.hero} ${f}`,children:e.jsxs("article",{className:s.container,children:[r?r.includes("vimeo.com")||r.includes("youtube.com")||r.includes("youtu.be")?e.jsx("div",{className:s.videoBackground,children:e.jsx("iframe",{src:r.includes("vimeo.com")?`${r}?autoplay=1&muted=1&loop=1&background=1`:`${r}?autoplay=1&mute=1&loop=1&playlist=${w(r)}`,className:s.iframe,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(v,{}),e.jsx("video",{ref:x,className:s.videoBackground,src:r,autoPlay:!u,loop:!0,muted:!0,playsInline:!0,poster:(t==null?void 0:t.imageUrl)||void 0})]}):e.jsx(k,{src:(t==null?void 0:t.imageUrl)??"",alt:(t==null?void 0:t.asset.altText)||(t==null?void 0:t.asset.description)||"Card image",fill:!0,priority:!0,style:{objectFit:"cover"},draggable:!1,sizes:"(min-width: 500px) 500px, 100vw"}),e.jsx("div",{className:s.overlay,children:e.jsxs("div",{className:s.text,children:[e.jsxs("div",{children:[l.eyebrow&&e.jsx(c.RichText,{className:s.eyebrow,blocks:l.eyebrow}),a&&e.jsxs("div",{className:s.articleDetails,children:[m&&e.jsx(N.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(m._id)}`,className:s.articleType,children:m.title},m._id),e.jsxs("div",{className:s.articleCategories,children:[h&&e.jsx(N.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(h._id)}`,className:s.category,children:h.title},h._id),d&&d.title.toLowerCase()!=="library"&&!d.slug.current.includes("keywords")&&e.jsx(N.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(d._id)}`,className:s.category,children:d.title},d._id)]}),a.timeToRead&&e.jsx(e.Fragment,{children:e.jsxs("span",{children:[e.jsx("span",{className:s.number,children:a.timeToRead}),"min read"]})})]}),e.jsx(c.RichText,{blocks:l.title})]}),l.description&&e.jsx(c.RichText,{blocks:l.description}),i&&e.jsx(p.CallToActions,{items:i.items,alignment:i.alignment})]})})]})})}}exports.HeroBlock=le;
@@ -1,212 +1,222 @@
1
- import { jsx as e, jsxs as c, Fragment as N } from "react/jsx-runtime";
2
- import { useState as T, useRef as z, useEffect as F } from "react";
3
- import { useHeroContext as L } from "./HeroContext.mjs";
4
- import { RichText as n } from "../../ui/PortableTextRenderer/index.mjs";
1
+ import { jsx as e, jsxs as c, Fragment as x } from "react/jsx-runtime";
2
+ import { useState as S, useRef as j, useEffect as L } from "react";
3
+ import { useHeroContext as H } from "./HeroContext.mjs";
4
+ import { RichText as i } from "../../ui/PortableTextRenderer/index.mjs";
5
5
  import { CallToActions as h } from "../../ui/CallToActions/index.mjs";
6
- import k from "next/image";
7
- import { LocaleLink as x } from "../../ui/LocaleLink/index.mjs";
8
- import { usePrefersReducedMotion as S } from "../../hooks/usePrefersReducedMotion.mjs";
9
- import { c as W } from "../../../createLucideIcon-C8GTh_Qx.js";
10
- import { P as j } from "../../../play-DYgKiSaf.js";
6
+ import C from "next/image";
7
+ import { LocaleLink as $ } from "../../ui/LocaleLink/index.mjs";
8
+ import { usePrefersReducedMotion as T } from "../../hooks/usePrefersReducedMotion.mjs";
9
+ import { c as V } from "../../../createLucideIcon-C8GTh_Qx.js";
10
+ import { P as E } from "../../../play-DYgKiSaf.js";
11
11
  import '../../../assets/index67.css';/**
12
12
  * @license lucide-react v0.488.0 - ISC
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
16
  */
17
- const H = [
17
+ const Y = [
18
18
  ["rect", { x: "14", y: "4", width: "4", height: "16", rx: "1", key: "zuxfzm" }],
19
19
  ["rect", { x: "6", y: "4", width: "4", height: "16", rx: "1", key: "1okwgv" }]
20
- ], V = W("pause", H), E = "_hero_vho5i_1", Y = "_container_vho5i_7", M = "_eyebrow_vho5i_24", q = "_disclaimer_vho5i_28", G = "_text_vho5i_33", J = "_articleDetails_vho5i_40", K = "_articleType_vho5i_53", Q = "_articleCategories_vho5i_67", X = "_category_vho5i_73", Z = "_number_vho5i_89", O = "_blog_vho5i_116", A = "_overlay_vho5i_140", g = "_fullBleed_vho5i_210", D = "_split_vho5i_304", ee = "_image_vho5i_309", re = "_videoControl_vho5i_332", le = "_videoWrapper_vho5i_353", oe = "_videoBackground_vho5i_373", te = "_iframe_vho5i_374", r = {
21
- hero: E,
22
- container: Y,
23
- eyebrow: M,
24
- disclaimer: q,
25
- text: G,
26
- articleDetails: J,
27
- articleType: K,
28
- articleCategories: Q,
29
- category: X,
30
- number: Z,
20
+ ], M = V("pause", Y), q = "_hero_vho5i_1", G = "_container_vho5i_7", J = "_eyebrow_vho5i_24", K = "_disclaimer_vho5i_28", Q = "_text_vho5i_33", X = "_articleDetails_vho5i_40", Z = "_articleType_vho5i_53", O = "_articleCategories_vho5i_67", g = "_category_vho5i_73", D = "_number_vho5i_89", A = "_blog_vho5i_116", ee = "_overlay_vho5i_140", re = "_fullBleed_vho5i_210", te = "_split_vho5i_304", le = "_image_vho5i_309", oe = "_videoControl_vho5i_332", se = "_videoWrapper_vho5i_353", ce = "_videoBackground_vho5i_373", ie = "_iframe_vho5i_374", r = {
21
+ hero: q,
22
+ container: G,
23
+ eyebrow: J,
24
+ disclaimer: K,
25
+ text: Q,
26
+ articleDetails: X,
27
+ articleType: Z,
28
+ articleCategories: O,
29
+ category: g,
30
+ number: D,
31
31
  default: "_default_vho5i_112",
32
- blog: O,
33
- overlay: A,
34
- fullBleed: g,
35
- split: D,
36
- image: ee,
37
- videoControl: re,
38
- videoWrapper: le,
39
- videoBackground: oe,
40
- iframe: te
32
+ blog: A,
33
+ overlay: ee,
34
+ fullBleed: re,
35
+ split: te,
36
+ image: le,
37
+ videoControl: oe,
38
+ videoWrapper: se,
39
+ videoBackground: ce,
40
+ iframe: ie
41
41
  };
42
- function _e({
43
- heading: t,
44
- image: l,
45
- video: o,
46
- callToAction: u,
47
- pageData: s,
48
- styleOptions: b
42
+ function he({
43
+ heading: o,
44
+ image: t,
45
+ video: l,
46
+ callToAction: n,
47
+ pageData: u,
48
+ styleOptions: v
49
49
  }) {
50
- var R, U;
51
- const d = S(), [C, $] = T(!d), { setIsFullbleedHeroAtTop: B } = L(), m = z(null), p = (b == null ? void 0 : b.layout) ?? "default", f = {
50
+ var W, z;
51
+ const d = T(), [B, I] = S(!d), { setIsFullbleedHeroAtTop: P } = H(), y = j(null), _ = (v == null ? void 0 : v.layout) ?? "default", w = {
52
52
  default: r.default,
53
53
  split: r.split,
54
54
  "full-bleed": r.fullBleed,
55
55
  blog: r.blog
56
- }[p], _ = (R = s == null ? void 0 : s.categories) != null && R.length ? s == null ? void 0 : s.categories[0] : null, a = (U = s == null ? void 0 : s.categories) != null && U.length ? s == null ? void 0 : s.categories[1] : null;
57
- F(() => {
58
- const i = () => {
59
- B(window.scrollY === 0);
56
+ }[_], R = ((W = u == null ? void 0 : u.categories) == null ? void 0 : W.filter(
57
+ (s) => {
58
+ var a, p;
59
+ return !((p = (a = s.slug) == null ? void 0 : a.current) != null && p.startsWith("library/type"));
60
+ }
61
+ )) ?? [], b = R[0] ?? null, m = R[1] ?? null, f = ((z = u == null ? void 0 : u.categories) == null ? void 0 : z.find(
62
+ (s) => {
63
+ var a, p;
64
+ return (p = (a = s.slug) == null ? void 0 : a.current) == null ? void 0 : p.startsWith("library/type");
65
+ }
66
+ )) ?? null;
67
+ L(() => {
68
+ const s = () => {
69
+ P(window.scrollY === 0);
60
70
  };
61
- if (p === "full-bleed" && typeof window < "u")
62
- return B(!0), window.addEventListener("scroll", i), () => window.removeEventListener("scroll", i);
63
- }, [p]), F(() => {
64
- const i = m.current;
65
- i && (d ? i.pause() : i.play());
71
+ if (_ === "full-bleed" && typeof window < "u")
72
+ return P(!0), window.addEventListener("scroll", s), () => window.removeEventListener("scroll", s);
73
+ }, [_]), L(() => {
74
+ const s = y.current;
75
+ s && (d ? s.pause() : s.play());
66
76
  }, [d]);
67
- const v = () => /* @__PURE__ */ e(
77
+ const N = () => /* @__PURE__ */ e(
68
78
  "button",
69
79
  {
70
- title: `${C ? "Pause the video" : "Play the video"}`,
80
+ title: `${B ? "Pause the video" : "Play the video"}`,
71
81
  className: r.videoControl,
72
82
  onClick: () => {
73
- const i = m.current;
74
- i && (i.paused ? (i.play().catch(() => {
75
- }), $(!0)) : (i.pause(), $(!1)));
83
+ const s = y.current;
84
+ s && (s.paused ? (s.play().catch(() => {
85
+ }), I(!0)) : (s.pause(), I(!1)));
76
86
  },
77
- children: C ? /* @__PURE__ */ e(V, { size: 18 }) : /* @__PURE__ */ e(j, { size: 18 })
87
+ children: B ? /* @__PURE__ */ e(M, { size: 18 }) : /* @__PURE__ */ e(E, { size: 18 })
78
88
  }
79
- ), I = () => {
80
- if (!o) return null;
81
- const i = o.includes("vimeo.com"), y = o.includes("youtube.com") || o.includes("youtu.be");
82
- return i || y ? /* @__PURE__ */ e("div", { className: r.videoWrapper, children: /* @__PURE__ */ e(
89
+ ), U = () => {
90
+ if (!l) return null;
91
+ const s = l.includes("vimeo.com"), a = l.includes("youtube.com") || l.includes("youtu.be");
92
+ return s || a ? /* @__PURE__ */ e("div", { className: r.videoWrapper, children: /* @__PURE__ */ e(
83
93
  "iframe",
84
94
  {
85
- src: i ? `${o}?autoplay=1&muted=1&loop=1&background=1` : `${o}?autoplay=1&mute=1&loop=1&playlist=${w(
86
- o
95
+ src: s ? `${l}?autoplay=1&muted=1&loop=1&background=1` : `${l}?autoplay=1&mute=1&loop=1&playlist=${k(
96
+ l
87
97
  )}`,
88
98
  allow: "autoplay; fullscreen",
89
99
  allowFullScreen: !0
90
100
  }
91
101
  ) }) : /* @__PURE__ */ c("div", { className: r.videoWrapper, children: [
92
- /* @__PURE__ */ e(v, {}),
102
+ /* @__PURE__ */ e(N, {}),
93
103
  /* @__PURE__ */ e(
94
104
  "video",
95
105
  {
96
- ref: m,
97
- src: o,
106
+ ref: y,
107
+ src: l,
98
108
  autoPlay: !d,
99
109
  loop: !0,
100
110
  muted: !0,
101
111
  playsInline: !0,
102
- poster: (l == null ? void 0 : l.imageUrl) || void 0,
112
+ poster: (t == null ? void 0 : t.imageUrl) || void 0,
103
113
  preload: "metadata"
104
114
  }
105
115
  )
106
116
  ] });
107
117
  };
108
- function w(i) {
109
- const y = i.match(/(?:youtube\.com\/.*v=|youtu\.be\/)([^&?/]+)/);
110
- return (y == null ? void 0 : y[1]) || "";
118
+ function k(s) {
119
+ const a = s.match(/(?:youtube\.com\/.*v=|youtu\.be\/)([^&?/]+)/);
120
+ return (a == null ? void 0 : a[1]) || "";
111
121
  }
112
- const P = () => l && l.imageUrl ? /* @__PURE__ */ e("div", { className: r.image, children: /* @__PURE__ */ e(
113
- k,
122
+ const F = () => t && t.imageUrl ? /* @__PURE__ */ e("div", { className: r.image, children: /* @__PURE__ */ e(
123
+ C,
114
124
  {
115
- src: l.imageUrl,
116
- alt: l.asset.altText || l.asset.description || "Hero image",
125
+ src: t.imageUrl,
126
+ alt: t.asset.altText || t.asset.description || "Hero image",
117
127
  width: 600,
118
128
  height: 658,
119
129
  priority: !0
120
130
  }
121
131
  ) }) : null;
122
- switch (p) {
132
+ switch (_) {
123
133
  case "split":
124
134
  return /* @__PURE__ */ e("section", { className: `${r.hero} ${r.split}`, children: /* @__PURE__ */ c("article", { className: r.container, children: [
125
135
  /* @__PURE__ */ c("div", { className: r.text, children: [
126
136
  /* @__PURE__ */ c("div", { children: [
127
- t.eyebrow && /* @__PURE__ */ e(
128
- n,
137
+ o.eyebrow && /* @__PURE__ */ e(
138
+ i,
129
139
  {
130
140
  className: r.eyebrow,
131
- blocks: t.eyebrow
141
+ blocks: o.eyebrow
132
142
  }
133
143
  ),
134
- /* @__PURE__ */ e(n, { blocks: t.title })
144
+ /* @__PURE__ */ e(i, { blocks: o.title })
135
145
  ] }),
136
- t.description && /* @__PURE__ */ e(n, { blocks: t.description }),
137
- u && /* @__PURE__ */ e(
146
+ o.description && /* @__PURE__ */ e(i, { blocks: o.description }),
147
+ n && /* @__PURE__ */ e(
138
148
  h,
139
149
  {
140
- items: u.items,
141
- alignment: u.alignment
150
+ items: n.items,
151
+ alignment: n.alignment
142
152
  }
143
153
  ),
144
- t.disclaimer && /* @__PURE__ */ e(
145
- n,
154
+ o.disclaimer && /* @__PURE__ */ e(
155
+ i,
146
156
  {
147
157
  className: r.disclaimer,
148
- blocks: t.disclaimer
158
+ blocks: o.disclaimer
149
159
  }
150
160
  )
151
161
  ] }),
152
- o ? /* @__PURE__ */ e(I, {}) : /* @__PURE__ */ e(P, {})
162
+ l ? /* @__PURE__ */ e(U, {}) : /* @__PURE__ */ e(F, {})
153
163
  ] }) });
154
164
  case "default":
155
- return /* @__PURE__ */ e("section", { className: `${r.hero} ${f}`, children: /* @__PURE__ */ c("article", { className: r.container, children: [
156
- o ? /* @__PURE__ */ e(I, {}) : /* @__PURE__ */ e(P, {}),
165
+ return /* @__PURE__ */ e("section", { className: `${r.hero} ${w}`, children: /* @__PURE__ */ c("article", { className: r.container, children: [
166
+ l ? /* @__PURE__ */ e(U, {}) : /* @__PURE__ */ e(F, {}),
157
167
  /* @__PURE__ */ c("div", { className: r.text, children: [
158
168
  /* @__PURE__ */ c("div", { children: [
159
- t.eyebrow && /* @__PURE__ */ e(
160
- n,
169
+ o.eyebrow && /* @__PURE__ */ e(
170
+ i,
161
171
  {
162
172
  className: r.eyebrow,
163
- blocks: t.eyebrow
173
+ blocks: o.eyebrow
164
174
  }
165
175
  ),
166
- /* @__PURE__ */ e(n, { blocks: t.title })
176
+ /* @__PURE__ */ e(i, { blocks: o.title })
167
177
  ] }),
168
- t.description && /* @__PURE__ */ e(n, { blocks: t.description }),
169
- u && /* @__PURE__ */ e(
178
+ o.description && /* @__PURE__ */ e(i, { blocks: o.description }),
179
+ n && /* @__PURE__ */ e(
170
180
  h,
171
181
  {
172
- items: u.items,
173
- alignment: u.alignment
182
+ items: n.items,
183
+ alignment: n.alignment
174
184
  }
175
185
  )
176
186
  ] })
177
187
  ] }) });
178
188
  case "full-bleed":
179
- return /* @__PURE__ */ e("section", { className: `${r.hero} ${f} heroFullBleed`, children: /* @__PURE__ */ c("article", { className: r.container, children: [
180
- o ? o.includes("vimeo.com") || o.includes("youtube.com") || o.includes("youtu.be") ? /* @__PURE__ */ e("div", { className: r.videoBackground, children: /* @__PURE__ */ e(
189
+ return /* @__PURE__ */ e("section", { className: `${r.hero} ${w} heroFullBleed`, children: /* @__PURE__ */ c("article", { className: r.container, children: [
190
+ l ? l.includes("vimeo.com") || l.includes("youtube.com") || l.includes("youtu.be") ? /* @__PURE__ */ e("div", { className: r.videoBackground, children: /* @__PURE__ */ e(
181
191
  "iframe",
182
192
  {
183
- src: o.includes("vimeo.com") ? `${o}?autoplay=1&muted=1&loop=1&background=1` : `${o}?autoplay=1&mute=1&loop=1&playlist=${w(
184
- o
193
+ src: l.includes("vimeo.com") ? `${l}?autoplay=1&muted=1&loop=1&background=1` : `${l}?autoplay=1&mute=1&loop=1&playlist=${k(
194
+ l
185
195
  )}`,
186
196
  className: r.iframe,
187
197
  allow: "autoplay; fullscreen",
188
198
  allowFullScreen: !0
189
199
  }
190
- ) }) : /* @__PURE__ */ c(N, { children: [
191
- /* @__PURE__ */ e(v, {}),
200
+ ) }) : /* @__PURE__ */ c(x, { children: [
201
+ /* @__PURE__ */ e(N, {}),
192
202
  /* @__PURE__ */ e(
193
203
  "video",
194
204
  {
195
- ref: m,
205
+ ref: y,
196
206
  className: r.videoBackground,
197
- src: o,
207
+ src: l,
198
208
  autoPlay: !d,
199
209
  loop: !0,
200
210
  muted: !0,
201
211
  playsInline: !0,
202
- poster: (l == null ? void 0 : l.imageUrl) || void 0
212
+ poster: (t == null ? void 0 : t.imageUrl) || void 0
203
213
  }
204
214
  )
205
215
  ] }) : /* @__PURE__ */ e(
206
- k,
216
+ C,
207
217
  {
208
- src: (l == null ? void 0 : l.imageUrl) ?? "",
209
- alt: (l == null ? void 0 : l.asset.altText) || (l == null ? void 0 : l.asset.description) || "Card image",
218
+ src: (t == null ? void 0 : t.imageUrl) ?? "",
219
+ alt: (t == null ? void 0 : t.asset.altText) || (t == null ? void 0 : t.asset.description) || "Card image",
210
220
  fill: !0,
211
221
  priority: !0,
212
222
  style: { objectFit: "cover" },
@@ -216,57 +226,57 @@ function _e({
216
226
  ),
217
227
  /* @__PURE__ */ e("div", { className: r.overlay, children: /* @__PURE__ */ c("div", { className: r.text, children: [
218
228
  /* @__PURE__ */ c("div", { children: [
219
- t.eyebrow && /* @__PURE__ */ e(
220
- n,
229
+ o.eyebrow && /* @__PURE__ */ e(
230
+ i,
221
231
  {
222
232
  className: r.eyebrow,
223
- blocks: t.eyebrow
233
+ blocks: o.eyebrow
224
234
  }
225
235
  ),
226
- /* @__PURE__ */ e(n, { blocks: t.title })
236
+ /* @__PURE__ */ e(i, { blocks: o.title })
227
237
  ] }),
228
- t.description && /* @__PURE__ */ e(n, { blocks: t.description }),
229
- u && /* @__PURE__ */ e(
238
+ o.description && /* @__PURE__ */ e(i, { blocks: o.description }),
239
+ n && /* @__PURE__ */ e(
230
240
  h,
231
241
  {
232
- items: u.items,
233
- alignment: u.alignment
242
+ items: n.items,
243
+ alignment: n.alignment
234
244
  }
235
245
  )
236
246
  ] }) })
237
247
  ] }) });
238
248
  case "blog":
239
- return /* @__PURE__ */ e("section", { className: `${r.hero} ${f}`, children: /* @__PURE__ */ c("article", { className: r.container, children: [
240
- o ? o.includes("vimeo.com") || o.includes("youtube.com") || o.includes("youtu.be") ? /* @__PURE__ */ e("div", { className: r.videoBackground, children: /* @__PURE__ */ e(
249
+ return /* @__PURE__ */ e("section", { className: `${r.hero} ${w}`, children: /* @__PURE__ */ c("article", { className: r.container, children: [
250
+ l ? l.includes("vimeo.com") || l.includes("youtube.com") || l.includes("youtu.be") ? /* @__PURE__ */ e("div", { className: r.videoBackground, children: /* @__PURE__ */ e(
241
251
  "iframe",
242
252
  {
243
- src: o.includes("vimeo.com") ? `${o}?autoplay=1&muted=1&loop=1&background=1` : `${o}?autoplay=1&mute=1&loop=1&playlist=${w(
244
- o
253
+ src: l.includes("vimeo.com") ? `${l}?autoplay=1&muted=1&loop=1&background=1` : `${l}?autoplay=1&mute=1&loop=1&playlist=${k(
254
+ l
245
255
  )}`,
246
256
  className: r.iframe,
247
257
  allow: "autoplay; fullscreen",
248
258
  allowFullScreen: !0
249
259
  }
250
- ) }) : /* @__PURE__ */ c(N, { children: [
251
- /* @__PURE__ */ e(v, {}),
260
+ ) }) : /* @__PURE__ */ c(x, { children: [
261
+ /* @__PURE__ */ e(N, {}),
252
262
  /* @__PURE__ */ e(
253
263
  "video",
254
264
  {
255
- ref: m,
265
+ ref: y,
256
266
  className: r.videoBackground,
257
- src: o,
267
+ src: l,
258
268
  autoPlay: !d,
259
269
  loop: !0,
260
270
  muted: !0,
261
271
  playsInline: !0,
262
- poster: (l == null ? void 0 : l.imageUrl) || void 0
272
+ poster: (t == null ? void 0 : t.imageUrl) || void 0
263
273
  }
264
274
  )
265
275
  ] }) : /* @__PURE__ */ e(
266
- k,
276
+ C,
267
277
  {
268
- src: (l == null ? void 0 : l.imageUrl) ?? "",
269
- alt: (l == null ? void 0 : l.asset.altText) || (l == null ? void 0 : l.asset.description) || "Card image",
278
+ src: (t == null ? void 0 : t.imageUrl) ?? "",
279
+ alt: (t == null ? void 0 : t.asset.altText) || (t == null ? void 0 : t.asset.description) || "Card image",
270
280
  fill: !0,
271
281
  priority: !0,
272
282
  style: { objectFit: "cover" },
@@ -276,64 +286,64 @@ function _e({
276
286
  ),
277
287
  /* @__PURE__ */ e("div", { className: r.overlay, children: /* @__PURE__ */ c("div", { className: r.text, children: [
278
288
  /* @__PURE__ */ c("div", { children: [
279
- t.eyebrow && /* @__PURE__ */ e(
280
- n,
289
+ o.eyebrow && /* @__PURE__ */ e(
290
+ i,
281
291
  {
282
292
  className: r.eyebrow,
283
- blocks: t.eyebrow
293
+ blocks: o.eyebrow
284
294
  }
285
295
  ),
286
- s && /* @__PURE__ */ c("div", { className: r.articleDetails, children: [
287
- s.articleType && /* @__PURE__ */ e(
288
- x,
296
+ u && /* @__PURE__ */ c("div", { className: r.articleDetails, children: [
297
+ f && /* @__PURE__ */ e(
298
+ $,
289
299
  {
290
- href: `/blog/search?type=${encodeURIComponent(
291
- s.articleType
300
+ href: `/blog/search?categories=${encodeURIComponent(
301
+ f._id
292
302
  )}`,
293
303
  className: r.articleType,
294
- children: s.articleType
304
+ children: f.title
295
305
  },
296
- s.articleType
306
+ f._id
297
307
  ),
298
308
  /* @__PURE__ */ c("div", { className: r.articleCategories, children: [
299
- _ && /* @__PURE__ */ e(
300
- x,
309
+ b && /* @__PURE__ */ e(
310
+ $,
301
311
  {
302
312
  href: `/blog/search?categories=${encodeURIComponent(
303
- _._id
313
+ b._id
304
314
  )}`,
305
315
  className: r.category,
306
- children: _.title
316
+ children: b.title
307
317
  },
308
- _._id
318
+ b._id
309
319
  ),
310
- a && a.title.toLowerCase() !== "library" && !a.slug.current.includes(
320
+ m && m.title.toLowerCase() !== "library" && !m.slug.current.includes(
311
321
  "keywords"
312
322
  ) && /* @__PURE__ */ e(
313
- x,
323
+ $,
314
324
  {
315
325
  href: `/blog/search?categories=${encodeURIComponent(
316
- a._id
326
+ m._id
317
327
  )}`,
318
328
  className: r.category,
319
- children: a.title
329
+ children: m.title
320
330
  },
321
- a._id
331
+ m._id
322
332
  )
323
333
  ] }),
324
- s.timeToRead && /* @__PURE__ */ e(N, { children: /* @__PURE__ */ c("span", { children: [
325
- /* @__PURE__ */ e("span", { className: r.number, children: s.timeToRead }),
334
+ u.timeToRead && /* @__PURE__ */ e(x, { children: /* @__PURE__ */ c("span", { children: [
335
+ /* @__PURE__ */ e("span", { className: r.number, children: u.timeToRead }),
326
336
  "min read"
327
337
  ] }) })
328
338
  ] }),
329
- /* @__PURE__ */ e(n, { blocks: t.title })
339
+ /* @__PURE__ */ e(i, { blocks: o.title })
330
340
  ] }),
331
- t.description && /* @__PURE__ */ e(n, { blocks: t.description }),
332
- u && /* @__PURE__ */ e(
341
+ o.description && /* @__PURE__ */ e(i, { blocks: o.description }),
342
+ n && /* @__PURE__ */ e(
333
343
  h,
334
344
  {
335
- items: u.items,
336
- alignment: u.alignment
345
+ items: n.items,
346
+ alignment: n.alignment
337
347
  }
338
348
  )
339
349
  ] }) })
@@ -341,5 +351,5 @@ function _e({
341
351
  }
342
352
  }
343
353
  export {
344
- _e as HeroBlock
354
+ he as HeroBlock
345
355
  };
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index68.css');const t=require("react/jsx-runtime"),x=require("next/image"),y=require("../../ui/LocaleLink/index.cjs"),p=require("../../../createLucideIcon-DpotSgUx.cjs");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index68.css');const t=require("react/jsx-runtime"),f=require("next/image"),x=require("../../ui/LocaleLink/index.cjs"),y=require("../../../createLucideIcon-DpotSgUx.cjs");/**
2
2
  * @license lucide-react v0.488.0 - ISC
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 j=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],I=p.createLucideIcon("arrow-up-right",j),v="_item_1fhn6_1",N="_itemImage_1fhn6_14",T="_itemTitle_1fhn6_20",C="_callToAction_1fhn6_26",E="_icon_1fhn6_33",b="_single_1fhn6_39",A="_first_1fhn6_40",w="_itemContent_1fhn6_41",$="_itemExcerpt_1fhn6_88",L="_imagePlaceholder_1fhn6_179",P="_category_1fhn6_227",k="_itemEyebrow_1fhn6_246",i={item:v,itemImage:N,itemTitle:T,callToAction:C,icon:E,single:b,first:A,itemContent:w,itemExcerpt:$,imagePlaceholder:L,category:P,itemEyebrow:k};function q({article:e,className:_="",index:h,limit:u}){var a,l,m,g,d;const f=`/blog/articles/${e.slug.current}`;console.log(e.categories);const c=((a=e.categories)==null?void 0:a.find(n=>{var s,o;return!((o=(s=n.slug)==null?void 0:s.current)!=null&&o.startsWith("library/type"))}))??null,r=((l=e.categories)==null?void 0:l.find(n=>{var s,o;return(o=(s=n.slug)==null?void 0:s.current)==null?void 0:o.startsWith("library/type")}))??null;return console.log("TYPE",r),console.log("MAIN",c),(m=e.categories)==null||m.forEach(n=>{var s;return console.log("CAT",(s=n.slug)==null?void 0:s.current)}),console.log("================"),t.jsxs(y.LocaleLink,{href:f,className:`${i.item} ${_??""} ${h===0?i.first:""} ${u===1?i.single:""}`,children:[t.jsxs("div",{className:i.itemImage,children:[r&&t.jsx("div",{className:i.category,children:r.title}),e.featuredImage&&e.featuredImage.imageUrl?t.jsx(x,{src:e.featuredImage.imageUrl??"",alt:((g=e.featuredImage)==null?void 0:g.asset.altText)||((d=e==null?void 0:e.featuredImage)==null?void 0:d.asset.description)||"Content image",width:600,height:400,priority:!0}):t.jsx("div",{className:i.imagePlaceholder})]}),t.jsxs("div",{className:i.itemContent,children:[c&&t.jsx("div",{className:i.itemEyebrow,children:c.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(I,{size:45})})})]}),e.excerpt&&t.jsx("p",{className:i.itemExcerpt,children:e.excerpt})]})]})}exports.BlogArticleCard=q;
6
+ */const p=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],j=y.createLucideIcon("arrow-up-right",p),v="_item_1fhn6_1",I="_itemImage_1fhn6_14",N="_itemTitle_1fhn6_20",T="_callToAction_1fhn6_26",b="_icon_1fhn6_33",C="_single_1fhn6_39",E="_first_1fhn6_40",w="_itemContent_1fhn6_41",A="_itemExcerpt_1fhn6_88",$="_imagePlaceholder_1fhn6_179",L="_category_1fhn6_227",k="_itemEyebrow_1fhn6_246",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:h}){var a,l,m,d;const u=`/blog/articles/${e.slug.current}`,r=((a=e.categories)==null?void 0:a.find(c=>{var n,s;return!((s=(n=c.slug)==null?void 0:n.current)!=null&&s.startsWith("library/type"))}))??null,o=((l=e.categories)==null?void 0:l.find(c=>{var n,s;return(s=(n=c.slug)==null?void 0:n.current)==null?void 0:s.startsWith("library/type")}))??null;return t.jsxs(x.LocaleLink,{href:u,className:`${i.item} ${_??""} ${g===0?i.first:""} ${h===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(f,{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",width:600,height:400,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(j,{size:45})})})]}),e.excerpt&&t.jsx("p",{className:i.itemExcerpt,children:e.excerpt})]})]})}exports.BlogArticleCard=q;
@@ -1,63 +1,58 @@
1
- import { jsxs as c, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as s, jsx as i } from "react/jsx-runtime";
2
2
  import y from "next/image";
3
- import { LocaleLink as I } from "../../ui/LocaleLink/index.mjs";
4
- import { c as N } from "../../../createLucideIcon-C8GTh_Qx.js";
3
+ import { LocaleLink as u } from "../../ui/LocaleLink/index.mjs";
4
+ import { c as v } from "../../../createLucideIcon-C8GTh_Qx.js";
5
5
  import '../../../assets/index68.css';/**
6
6
  * @license lucide-react v0.488.0 - ISC
7
7
  *
8
8
  * This source code is licensed under the ISC license.
9
9
  * See the LICENSE file in the root directory of this source tree.
10
10
  */
11
- const v = [
11
+ const I = [
12
12
  ["path", { d: "M7 7h10v10", key: "1tivn9" }],
13
13
  ["path", { d: "M7 17 17 7", key: "1vkiza" }]
14
- ], T = N("arrow-up-right", v), x = "_item_1fhn6_1", E = "_itemImage_1fhn6_14", C = "_itemTitle_1fhn6_20", A = "_callToAction_1fhn6_26", b = "_icon_1fhn6_33", w = "_single_1fhn6_39", P = "_first_1fhn6_40", $ = "_itemContent_1fhn6_41", k = "_itemExcerpt_1fhn6_88", L = "_imagePlaceholder_1fhn6_179", M = "_category_1fhn6_227", U = "_itemEyebrow_1fhn6_246", t = {
14
+ ], N = v("arrow-up-right", I), x = "_item_1fhn6_1", T = "_itemImage_1fhn6_14", C = "_itemTitle_1fhn6_20", E = "_callToAction_1fhn6_26", b = "_icon_1fhn6_33", w = "_single_1fhn6_39", A = "_first_1fhn6_40", $ = "_itemContent_1fhn6_41", k = "_itemExcerpt_1fhn6_88", P = "_imagePlaceholder_1fhn6_179", L = "_category_1fhn6_227", U = "_itemEyebrow_1fhn6_246", t = {
15
15
  item: x,
16
- itemImage: E,
16
+ itemImage: T,
17
17
  itemTitle: C,
18
- callToAction: A,
18
+ callToAction: E,
19
19
  icon: b,
20
20
  single: w,
21
- first: P,
21
+ first: A,
22
22
  itemContent: $,
23
23
  itemExcerpt: k,
24
- imagePlaceholder: L,
25
- category: M,
24
+ imagePlaceholder: P,
25
+ category: L,
26
26
  itemEyebrow: U
27
27
  };
28
- function R({
28
+ function B({
29
29
  article: e,
30
- className: d = "",
31
- index: f,
30
+ className: g = "",
31
+ index: d,
32
32
  //layout,
33
- limit: p
33
+ limit: f
34
34
  }) {
35
- var l, m, g, h, _;
36
- const u = `/blog/articles/${e.slug.current}`;
37
- console.log(e.categories);
38
- const r = ((l = e.categories) == null ? void 0 : l.find(
39
- (n) => {
40
- var i, s;
41
- return !((s = (i = n.slug) == null ? void 0 : i.current) != null && s.startsWith("library/type"));
35
+ var m, l, h, _;
36
+ const p = `/blog/articles/${e.slug.current}`, c = ((m = e.categories) == null ? void 0 : m.find(
37
+ (r) => {
38
+ var n, o;
39
+ return !((o = (n = r.slug) == null ? void 0 : n.current) != null && o.startsWith("library/type"));
42
40
  }
43
- )) ?? null, a = ((m = e.categories) == null ? void 0 : m.find(
44
- (n) => {
45
- var i, s;
46
- return (s = (i = n.slug) == null ? void 0 : i.current) == null ? void 0 : s.startsWith("library/type");
41
+ )) ?? null, a = ((l = e.categories) == null ? void 0 : l.find(
42
+ (r) => {
43
+ var n, o;
44
+ return (o = (n = r.slug) == null ? void 0 : n.current) == null ? void 0 : o.startsWith("library/type");
47
45
  }
48
46
  )) ?? null;
49
- return console.log("TYPE", a), console.log("MAIN", r), (g = e.categories) == null || g.forEach((n) => {
50
- var i;
51
- return console.log("CAT", (i = n.slug) == null ? void 0 : i.current);
52
- }), console.log("================"), /* @__PURE__ */ c(
53
- I,
47
+ return /* @__PURE__ */ s(
48
+ u,
54
49
  {
55
- href: u,
56
- className: `${t.item} ${d ?? ""} ${f === 0 ? t.first : ""} ${p === 1 ? t.single : ""}`,
50
+ href: p,
51
+ className: `${t.item} ${g ?? ""} ${d === 0 ? t.first : ""} ${f === 1 ? t.single : ""}`,
57
52
  children: [
58
- /* @__PURE__ */ c("div", { className: t.itemImage, children: [
59
- a && /* @__PURE__ */ o("div", { className: t.category, children: a.title }),
60
- e.featuredImage && e.featuredImage.imageUrl ? /* @__PURE__ */ o(
53
+ /* @__PURE__ */ s("div", { className: t.itemImage, children: [
54
+ a && /* @__PURE__ */ i("div", { className: t.category, children: a.title }),
55
+ e.featuredImage && e.featuredImage.imageUrl ? /* @__PURE__ */ i(
61
56
  y,
62
57
  {
63
58
  src: e.featuredImage.imageUrl ?? "",
@@ -66,20 +61,20 @@ function R({
66
61
  height: 400,
67
62
  priority: !0
68
63
  }
69
- ) : /* @__PURE__ */ o("div", { className: t.imagePlaceholder })
64
+ ) : /* @__PURE__ */ i("div", { className: t.imagePlaceholder })
70
65
  ] }),
71
- /* @__PURE__ */ c("div", { className: t.itemContent, children: [
72
- r && /* @__PURE__ */ o("div", { className: t.itemEyebrow, children: r.title }),
73
- /* @__PURE__ */ c("div", { className: t.itemTitle, children: [
74
- /* @__PURE__ */ o("h3", { children: e.title }),
75
- /* @__PURE__ */ o("div", { className: t.callToAction, children: /* @__PURE__ */ o("div", { className: t.icon, children: /* @__PURE__ */ o(T, { size: 45 }) }) })
66
+ /* @__PURE__ */ s("div", { className: t.itemContent, children: [
67
+ c && /* @__PURE__ */ i("div", { className: t.itemEyebrow, children: c.title }),
68
+ /* @__PURE__ */ s("div", { className: t.itemTitle, children: [
69
+ /* @__PURE__ */ i("h3", { children: e.title }),
70
+ /* @__PURE__ */ i("div", { className: t.callToAction, children: /* @__PURE__ */ i("div", { className: t.icon, children: /* @__PURE__ */ i(N, { size: 45 }) }) })
76
71
  ] }),
77
- e.excerpt && /* @__PURE__ */ o("p", { className: t.itemExcerpt, children: e.excerpt })
72
+ e.excerpt && /* @__PURE__ */ i("p", { className: t.itemExcerpt, children: e.excerpt })
78
73
  ] })
79
74
  ]
80
75
  }
81
76
  );
82
77
  }
83
78
  export {
84
- R as BlogArticleCard
79
+ B as BlogArticleCard
85
80
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quirk-ui",
3
3
  "private": false,
4
- "version": "0.0.482",
4
+ "version": "0.0.484",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {