quirk-ui 0.0.472 → 0.0.474

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"),s=require("../../ui/LocaleLink/index.cjs"),o="_additionalCategories_1wmnv_1",c="_container_1wmnv_6",r="_categories_1wmnv_12",a="_list_1wmnv_23",d="_category_1wmnv_31",i={additionalCategories:o,container:c,categories:r,list:a,category:d};function _({categories:e,type:l}){if((e==null?void 0:e.length)!==0)return console.log("CAT",e),n.jsx("section",{className:`${i.additionalCategories} ${l=="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(s.LocaleLink,{href:`/blog/search?category=${encodeURIComponent(t.slug.current)}`,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 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,34 +1,34 @@
1
- import { jsx as e, jsxs as o } from "react/jsx-runtime";
1
+ import { jsx as i, jsxs as l } from "react/jsx-runtime";
2
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", m = "_category_1wmnv_31", t = {
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
4
  additionalCategories: a,
5
5
  container: c,
6
6
  categories: r,
7
7
  list: d,
8
- category: m
8
+ category: _
9
9
  };
10
10
  function g({
11
11
  categories: n,
12
- type: l
12
+ type: o
13
13
  }) {
14
14
  if ((n == null ? void 0 : n.length) !== 0)
15
- return console.log("CAT", n), /* @__PURE__ */ e(
15
+ return console.log("CAT", n), /* @__PURE__ */ i(
16
16
  "section",
17
17
  {
18
- className: `${t.additionalCategories} ${l == "article" ? "blog" : ""}`,
19
- children: /* @__PURE__ */ e("article", { className: t.container, children: /* @__PURE__ */ o("div", { className: t.categories, children: [
20
- /* @__PURE__ */ e("p", { children: "In this article:" }),
21
- /* @__PURE__ */ e("div", { className: t.list, children: n && n.length > 0 && n.map(
22
- (i) => i.slug.current.includes("keyword") && /* @__PURE__ */ e(
18
+ className: `${e.additionalCategories} ${o == "article" ? "blog" : ""}`,
19
+ children: /* @__PURE__ */ i("article", { className: e.container, children: /* @__PURE__ */ l("div", { className: e.categories, children: [
20
+ /* @__PURE__ */ i("p", { children: "In this article:" }),
21
+ /* @__PURE__ */ i("div", { className: e.list, children: n && n.length > 0 && n.map(
22
+ (t) => t.slug.current.includes("keyword") && /* @__PURE__ */ i(
23
23
  s,
24
24
  {
25
- href: `/blog/search?category=${encodeURIComponent(
26
- i.slug.current
25
+ href: `/blog/search?categories=${encodeURIComponent(
26
+ t._id
27
27
  )}`,
28
- className: t.category,
29
- children: i.title
28
+ className: e.category,
29
+ children: t.title
30
30
  },
31
- i._id
31
+ t._id
32
32
  )
33
33
  ) })
34
34
  ] }) })
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),R=require("../../ui/PortableTextRenderer/index.cjs"),G=require("../../hooks/useStyleClasses.cjs"),U=require("../../contexts/LocaleBridge.cjs"),b=require("../../../index-DpYgzTme.cjs"),X=require("../../../core/components/Input/index.cjs"),J=require("../../../core/components/Select/index.cjs"),K=require("../../cards/BlogArticleCard/index.cjs"),t=require("../../../CategoryFilters-CJsgwMGz.cjs"),Q=require("../../../x-Dft9NVe_.cjs"),V=[{label:"Newest",value:"date-desc"},{label:"Oldest",value:"date-asc"},{label:"Title A-Z",value:"title-asc"},{label:"Title Z-A",value:"title-desc"},{label:"Most Popular",value:"popular-desc"}];function Y({heading:o,layout:B="grid",includeFilters:y,excludeFilters:p,limit:C=3,categoryFilters:d,documentType:_,styleOptions:$}){const[w,c]=l.useState([]),[M,P]=l.useState(null),[N,z]=l.useState("date-desc"),[f,L]=l.useState([]),[T,i]=l.useState(0),[a,g]=l.useState(!1),[m,h]=l.useState(!1),[k,r]=l.useState(!0),[u,S]=l.useState(""),[v,D]=l.useState(""),{locale:I}=U.useLocaleBridge(),H=G.useStyleClasses($),O={list:t.styles.list}[B??"grid"],W=s=>{z(s.target.value),c([]),i(0),r(!0)},q=()=>{h(!m)},Z=()=>{c([]),i(0),r(!0),L([]),S(""),h(!1)},A=async()=>{if(a||!k)return;g(!0);const s=new URLSearchParams({start:String(T),limit:String(C),sort:N,documentType:_,locale:I});v&&s.append("search",v),f.forEach(n=>s.append("categories",n)),y==null||y.forEach(n=>s.append("include",n._id)),p==null||p.forEach(n=>s.append("exclude",n._id));try{const x=await(await fetch(`/api/articles?${s.toString()}`,{method:"GET"})).json();c(j=>[...j,...x.articles]),i(j=>j+C),P(x.totalCount),T+x.articles.length>=x.totalCount&&r(!1)}catch(n){console.error("Failed to load articles:",n),r(!1)}finally{g(!1)}},E=l.useCallback(()=>{typeof window<"u"&&window.innerWidth>768&&(h(!1),typeof document<"u"&&(document.body.style.overflow=""))},[]);return l.useEffect(()=>{const s=typeof window<"u";return s&&window.addEventListener("resize",E),()=>{s&&window.removeEventListener("resize",E)}},[]),l.useEffect(()=>{if(typeof document<"u")return document.body.style.overflow=m?"hidden":"",()=>{document.body.style.overflow=""}},[m]),l.useEffect(()=>{const s=setTimeout(()=>{D(u)},1e3);return()=>clearTimeout(s)},[u]),l.useEffect(()=>{A()},[v,N,f.join(",")]),e.jsx("section",{className:`${t.styles.documentList} ${H}`,children:e.jsxs("article",{className:t.styles.container,children:[e.jsxs("div",{className:t.styles.heading,children:[(o==null?void 0:o.title)&&e.jsx(R.RichText,{blocks:o==null?void 0:o.title}),(o==null?void 0:o.description)&&e.jsx(R.RichText,{blocks:o==null?void 0:o.description})]}),e.jsxs("div",{className:t.styles.listContainer,children:[(d==null?void 0:d.length)&&e.jsxs("div",{className:t.styles.filterToggle,children:[e.jsx(b.CallToAction,{as:"button",variant:"secondary",onClick:q,disabled:a,icon:"settings",iconAlignment:"left",children:"Filters"}),e.jsx(b.CallToAction,{as:"button",variant:"link",onClick:Z,disabled:a||f.length===0&&u.length===0,children:"Reset"})]}),d&&e.jsx(t.CategoryFilters,{categoryFilters:d,selectedCategories:f,setSelectedCategories:L,setArticles:c,setStart:i,setHasMore:r,showFilters:m,toggleFilters:q,isLoading:a}),e.jsxs("div",{className:t.styles.listWrapper,children:[e.jsxs("div",{className:t.styles.listHeader,children:[e.jsxs("div",{className:t.styles.listResults,children:["Results: ",e.jsx("span",{children:M})]}),e.jsxs("div",{className:t.styles.listHeaderFilters,children:[e.jsxs("div",{className:t.styles.listSearch,children:[e.jsx(X.Input,{type:"text",name:"list-search",placeholder:"Search articles",value:u,onChange:s=>{S(s.target.value),c([]),i(0),r(!0)}}),u&&e.jsx("button",{className:t.styles.clearSearch,onClick:()=>{S(""),c([]),i(0),r(!0)},children:e.jsx(Q.X,{size:21})})]}),e.jsx("div",{className:t.styles.listSort,children:e.jsx(J.Select,{id:"list-sort",name:"list-sort",options:V,onChange:W})})]})]}),e.jsx("div",{className:`${t.styles.list} ${O}`,children:w&&w.map(s=>_=="blog"&&e.jsx(K.BlogArticleCard,{article:s},s._id))}),k&&e.jsx("div",{className:t.styles.loadMore,children:e.jsx(b.CallToAction,{as:"button",variant:"primary",onClick:A,disabled:a,icon:"refresh",iconAlignment:"left",className:a?t.styles.buttonIsLoading:"",children:a?"Loading...":"Load more"})})]})]})]})})}exports.DocumentListBlock=Y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),B=require("../../ui/PortableTextRenderer/index.cjs"),X=require("../../hooks/useStyleClasses.cjs"),J=require("../../contexts/LocaleBridge.cjs"),C=require("../../../index-DpYgzTme.cjs"),K=require("../../../core/components/Input/index.cjs"),Q=require("../../../core/components/Select/index.cjs"),V=require("../../cards/BlogArticleCard/index.cjs"),l=require("../../../CategoryFilters-CJsgwMGz.cjs"),Y=require("../../../x-Dft9NVe_.cjs"),F=[{label:"Newest",value:"date-desc"},{label:"Oldest",value:"date-asc"},{label:"Title A-Z",value:"title-asc"},{label:"Title Z-A",value:"title-desc"},{label:"Most Popular",value:"popular-desc"}];function ee({heading:o,layout:$="grid",includeFilters:y,excludeFilters:x,limit:w=3,categoryFilters:u,documentType:_,styleOptions:P}){const[g,r]=s.useState([]),[M,z]=s.useState(null),[N,D]=s.useState("date-desc"),[m,S]=s.useState([]),[T,I]=s.useState(null),[L,c]=s.useState(0),[i,k]=s.useState(!1),[h,p]=s.useState(!1),[q,a]=s.useState(!0),[f,v]=s.useState(""),[j,U]=s.useState(""),{locale:H}=J.useLocaleBridge(),O=X.useStyleClasses(P),W={list:l.styles.list}[$??"grid"];s.useEffect(()=>{if(typeof window>"u")return;const t=new URLSearchParams(window.location.search),n=t.getAll("categories");n.length>0&&S(n);const d=t.get("type");d&&I(d),r([]),c(0),a(!0)},[]);const Z=t=>{D(t.target.value),r([]),c(0),a(!0)},A=()=>{p(!h)},G=()=>{r([]),c(0),a(!0),S([]),v(""),p(!1)},E=async()=>{if(i||!q)return;k(!0);const t=new URLSearchParams({start:String(L),limit:String(w),sort:N,documentType:_,locale:H});T&&t.append("type",T),j&&t.append("search",j),m.forEach(n=>t.append("categories",n)),y==null||y.forEach(n=>t.append("include",n._id)),x==null||x.forEach(n=>t.append("exclude",n._id));try{const d=await(await fetch(`/api/articles?${t.toString()}`,{method:"GET"})).json();r(b=>[...b,...d.articles]),c(b=>b+w),z(d.totalCount),L+d.articles.length>=d.totalCount&&a(!1)}catch(n){console.error("Failed to load articles:",n),a(!1)}finally{k(!1)}},R=s.useCallback(()=>{typeof window<"u"&&window.innerWidth>768&&(p(!1),typeof document<"u"&&(document.body.style.overflow=""))},[]);return s.useEffect(()=>{const t=typeof window<"u";return t&&window.addEventListener("resize",R),()=>{t&&window.removeEventListener("resize",R)}},[]),s.useEffect(()=>{if(typeof document<"u")return document.body.style.overflow=h?"hidden":"",()=>{document.body.style.overflow=""}},[h]),s.useEffect(()=>{const t=setTimeout(()=>{U(f)},1e3);return()=>clearTimeout(t)},[f]),s.useEffect(()=>{E()},[j,N,m.join(",")]),e.jsx("section",{className:`${l.styles.documentList} ${O}`,children:e.jsxs("article",{className:l.styles.container,children:[e.jsxs("div",{className:l.styles.heading,children:[(o==null?void 0:o.title)&&e.jsx(B.RichText,{blocks:o==null?void 0:o.title}),(o==null?void 0:o.description)&&e.jsx(B.RichText,{blocks:o==null?void 0:o.description})]}),e.jsxs("div",{className:l.styles.listContainer,children:[(u==null?void 0:u.length)&&e.jsxs("div",{className:l.styles.filterToggle,children:[e.jsx(C.CallToAction,{as:"button",variant:"secondary",onClick:A,disabled:i,icon:"settings",iconAlignment:"left",children:"Filters"}),e.jsx(C.CallToAction,{as:"button",variant:"link",onClick:G,disabled:i||m.length===0&&f.length===0,children:"Reset"})]}),u&&e.jsx(l.CategoryFilters,{categoryFilters:u,selectedCategories:m,setSelectedCategories:S,setArticles:r,setStart:c,setHasMore:a,showFilters:h,toggleFilters:A,isLoading:i}),e.jsxs("div",{className:l.styles.listWrapper,children:[e.jsxs("div",{className:l.styles.listHeader,children:[e.jsxs("div",{className:l.styles.listResults,children:["Results: ",e.jsx("span",{children:M})]}),e.jsxs("div",{className:l.styles.listHeaderFilters,children:[e.jsxs("div",{className:l.styles.listSearch,children:[e.jsx(K.Input,{type:"text",name:"list-search",placeholder:"Search articles",value:f,onChange:t=>{v(t.target.value),r([]),c(0),a(!0)}}),f&&e.jsx("button",{className:l.styles.clearSearch,onClick:()=>{v(""),r([]),c(0),a(!0)},children:e.jsx(Y.X,{size:21})})]}),e.jsx("div",{className:l.styles.listSort,children:e.jsx(Q.Select,{id:"list-sort",name:"list-sort",options:F,onChange:Z})})]})]}),e.jsx("div",{className:`${l.styles.list} ${W}`,children:g&&g.map(t=>_=="blog"&&e.jsx(V.BlogArticleCard,{article:t},t._id))}),q&&e.jsx("div",{className:l.styles.loadMore,children:e.jsx(C.CallToAction,{as:"button",variant:"primary",onClick:E,disabled:i,icon:"refresh",iconAlignment:"left",className:i?l.styles.buttonIsLoading:"",children:i?"Loading...":"Load more"})})]})]})]})})}exports.DocumentListBlock=ee;
@@ -1,102 +1,110 @@
1
- import { jsx as t, jsxs as a } from "react/jsx-runtime";
2
- import { useState as l, useCallback as X, useEffect as b } from "react";
3
- import { RichText as H } from "../../ui/PortableTextRenderer/index.mjs";
4
- import { useStyleClasses as J } from "../../hooks/useStyleClasses.mjs";
5
- import { useLocaleBridge as K } from "../../contexts/LocaleBridge.mjs";
1
+ import { jsx as t, jsxs as r } from "react/jsx-runtime";
2
+ import { useState as a, useEffect as p, useCallback as K } from "react";
3
+ import { RichText as B } from "../../ui/PortableTextRenderer/index.mjs";
4
+ import { useStyleClasses as Q } from "../../hooks/useStyleClasses.mjs";
5
+ import { useLocaleBridge as V } from "../../contexts/LocaleBridge.mjs";
6
6
  import { C as L } from "../../../index-CIb65n0z.js";
7
- import { Input as Q } from "../../../core/components/Input/index.mjs";
8
- import { Select as V } from "../../../core/components/Select/index.mjs";
9
- import { BlogArticleCard as Y } from "../../cards/BlogArticleCard/index.mjs";
10
- import { s, C as F } from "../../../CategoryFilters-BrPk0efZ.js";
11
- import { X as ee } from "../../../x-CnsEH4Ox.js";
12
- const te = [
7
+ import { Input as Y } from "../../../core/components/Input/index.mjs";
8
+ import { Select as F } from "../../../core/components/Select/index.mjs";
9
+ import { BlogArticleCard as ee } from "../../cards/BlogArticleCard/index.mjs";
10
+ import { s, C as te } from "../../../CategoryFilters-BrPk0efZ.js";
11
+ import { X as se } from "../../../x-CnsEH4Ox.js";
12
+ const oe = [
13
13
  { label: "Newest", value: "date-desc" },
14
14
  { label: "Oldest", value: "date-asc" },
15
15
  { label: "Title A-Z", value: "title-asc" },
16
16
  { label: "Title Z-A", value: "title-desc" },
17
17
  { label: "Most Popular", value: "popular-desc" }
18
18
  ];
19
- function ue({
19
+ function he({
20
20
  heading: o,
21
- layout: I = "grid",
22
- includeFilters: C,
23
- excludeFilters: w,
24
- limit: k = 3,
25
- categoryFilters: m,
26
- documentType: g,
21
+ layout: H = "grid",
22
+ includeFilters: b,
23
+ excludeFilters: C,
24
+ limit: T = 3,
25
+ categoryFilters: f,
26
+ documentType: k,
27
27
  // filterMode,
28
- styleOptions: P
28
+ styleOptions: I
29
29
  }) {
30
- const [A, c] = l([]), [W, _] = l(null), [T, x] = l("date-desc"), [u, E] = l([]), [R, d] = l(0), [i, $] = l(!1), [p, h] = l(!1), [j, n] = l(!0), [f, S] = l(""), [N, D] = l(""), { locale: O } = K(), Z = J(P), q = {
30
+ const [A, i] = a([]), [W, _] = a(null), [E, x] = a("date-desc"), [h, S] = a([]), [R, D] = a(null), [$, c] = a(0), [d, j] = a(!1), [v, w] = a(!1), [z, n] = a(!0), [u, y] = a(""), [N, O] = a(""), { locale: Z } = V(), q = Q(I), G = {
31
31
  //grid: styles.grid,
32
32
  list: s.list
33
- }[I ?? "grid"], G = (e) => {
34
- x(e.target.value), c([]), d(0), n(!0);
35
- }, z = () => {
36
- h(!p);
37
- }, U = () => {
38
- c([]), d(0), n(!0), E([]), S(""), h(!1);
39
- }, M = async () => {
40
- if (i || !j) return;
41
- $(!0);
33
+ }[H ?? "grid"];
34
+ p(() => {
35
+ if (typeof window > "u") return;
36
+ const e = new URLSearchParams(window.location.search), l = e.getAll("categories");
37
+ l.length > 0 && S(l);
38
+ const m = e.get("type");
39
+ m && D(m), i([]), c(0), n(!0);
40
+ }, []);
41
+ const X = (e) => {
42
+ x(e.target.value), i([]), c(0), n(!0);
43
+ }, M = () => {
44
+ w(!v);
45
+ }, J = () => {
46
+ i([]), c(0), n(!0), S([]), y(""), w(!1);
47
+ }, P = async () => {
48
+ if (d || !z) return;
49
+ j(!0);
42
50
  const e = new URLSearchParams({
43
- start: String(R),
44
- limit: String(k),
45
- sort: T,
46
- documentType: g,
47
- locale: O
51
+ start: String($),
52
+ limit: String(T),
53
+ sort: E,
54
+ documentType: k,
55
+ locale: Z
48
56
  });
49
- N && e.append("search", N), u.forEach(
50
- (r) => e.append("categories", r)
57
+ R && e.append("type", R), N && e.append("search", N), h.forEach(
58
+ (l) => e.append("categories", l)
59
+ ), b == null || b.forEach(
60
+ (l) => e.append("include", l._id)
51
61
  ), C == null || C.forEach(
52
- (r) => e.append("include", r._id)
53
- ), w == null || w.forEach(
54
- (r) => e.append("exclude", r._id)
62
+ (l) => e.append("exclude", l._id)
55
63
  );
56
64
  try {
57
- const v = await (await fetch(`/api/articles?${e.toString()}`, {
65
+ const m = await (await fetch(`/api/articles?${e.toString()}`, {
58
66
  method: "GET"
59
67
  })).json();
60
- c((y) => [...y, ...v.articles]), d((y) => y + k), _(v.totalCount), R + v.articles.length >= v.totalCount && n(!1);
61
- } catch (r) {
62
- console.error("Failed to load articles:", r), n(!1);
68
+ i((g) => [...g, ...m.articles]), c((g) => g + T), _(m.totalCount), $ + m.articles.length >= m.totalCount && n(!1);
69
+ } catch (l) {
70
+ console.error("Failed to load articles:", l), n(!1);
63
71
  } finally {
64
- $(!1);
72
+ j(!1);
65
73
  }
66
- }, B = X(() => {
67
- typeof window < "u" && window.innerWidth > 768 && (h(!1), typeof document < "u" && (document.body.style.overflow = ""));
74
+ }, U = K(() => {
75
+ typeof window < "u" && window.innerWidth > 768 && (w(!1), typeof document < "u" && (document.body.style.overflow = ""));
68
76
  }, []);
69
- return b(() => {
77
+ return p(() => {
70
78
  const e = typeof window < "u";
71
- return e && window.addEventListener("resize", B), () => {
72
- e && window.removeEventListener("resize", B);
79
+ return e && window.addEventListener("resize", U), () => {
80
+ e && window.removeEventListener("resize", U);
73
81
  };
74
- }, []), b(() => {
82
+ }, []), p(() => {
75
83
  if (typeof document < "u")
76
- return document.body.style.overflow = p ? "hidden" : "", () => {
84
+ return document.body.style.overflow = v ? "hidden" : "", () => {
77
85
  document.body.style.overflow = "";
78
86
  };
79
- }, [p]), b(() => {
87
+ }, [v]), p(() => {
80
88
  const e = setTimeout(() => {
81
- D(f);
89
+ O(u);
82
90
  }, 1e3);
83
91
  return () => clearTimeout(e);
84
- }, [f]), b(() => {
85
- M();
86
- }, [N, T, u.join(",")]), /* @__PURE__ */ t("section", { className: `${s.documentList} ${Z}`, children: /* @__PURE__ */ a("article", { className: s.container, children: [
87
- /* @__PURE__ */ a("div", { className: s.heading, children: [
88
- (o == null ? void 0 : o.title) && /* @__PURE__ */ t(H, { blocks: o == null ? void 0 : o.title }),
89
- (o == null ? void 0 : o.description) && /* @__PURE__ */ t(H, { blocks: o == null ? void 0 : o.description })
92
+ }, [u]), p(() => {
93
+ P();
94
+ }, [N, E, h.join(",")]), /* @__PURE__ */ t("section", { className: `${s.documentList} ${q}`, children: /* @__PURE__ */ r("article", { className: s.container, children: [
95
+ /* @__PURE__ */ r("div", { className: s.heading, children: [
96
+ (o == null ? void 0 : o.title) && /* @__PURE__ */ t(B, { blocks: o == null ? void 0 : o.title }),
97
+ (o == null ? void 0 : o.description) && /* @__PURE__ */ t(B, { blocks: o == null ? void 0 : o.description })
90
98
  ] }),
91
- /* @__PURE__ */ a("div", { className: s.listContainer, children: [
92
- (m == null ? void 0 : m.length) && /* @__PURE__ */ a("div", { className: s.filterToggle, children: [
99
+ /* @__PURE__ */ r("div", { className: s.listContainer, children: [
100
+ (f == null ? void 0 : f.length) && /* @__PURE__ */ r("div", { className: s.filterToggle, children: [
93
101
  /* @__PURE__ */ t(
94
102
  L,
95
103
  {
96
104
  as: "button",
97
105
  variant: "secondary",
98
- onClick: z,
99
- disabled: i,
106
+ onClick: M,
107
+ disabled: d,
100
108
  icon: "settings",
101
109
  iconAlignment: "left",
102
110
  children: "Filters"
@@ -107,82 +115,82 @@ function ue({
107
115
  {
108
116
  as: "button",
109
117
  variant: "link",
110
- onClick: U,
111
- disabled: i || u.length === 0 && f.length === 0,
118
+ onClick: J,
119
+ disabled: d || h.length === 0 && u.length === 0,
112
120
  children: "Reset"
113
121
  }
114
122
  )
115
123
  ] }),
116
- m && /* @__PURE__ */ t(
117
- F,
124
+ f && /* @__PURE__ */ t(
125
+ te,
118
126
  {
119
- categoryFilters: m,
120
- selectedCategories: u,
121
- setSelectedCategories: E,
122
- setArticles: c,
123
- setStart: d,
127
+ categoryFilters: f,
128
+ selectedCategories: h,
129
+ setSelectedCategories: S,
130
+ setArticles: i,
131
+ setStart: c,
124
132
  setHasMore: n,
125
- showFilters: p,
126
- toggleFilters: z,
127
- isLoading: i
133
+ showFilters: v,
134
+ toggleFilters: M,
135
+ isLoading: d
128
136
  }
129
137
  ),
130
- /* @__PURE__ */ a("div", { className: s.listWrapper, children: [
131
- /* @__PURE__ */ a("div", { className: s.listHeader, children: [
132
- /* @__PURE__ */ a("div", { className: s.listResults, children: [
138
+ /* @__PURE__ */ r("div", { className: s.listWrapper, children: [
139
+ /* @__PURE__ */ r("div", { className: s.listHeader, children: [
140
+ /* @__PURE__ */ r("div", { className: s.listResults, children: [
133
141
  "Results: ",
134
142
  /* @__PURE__ */ t("span", { children: W })
135
143
  ] }),
136
- /* @__PURE__ */ a("div", { className: s.listHeaderFilters, children: [
137
- /* @__PURE__ */ a("div", { className: s.listSearch, children: [
144
+ /* @__PURE__ */ r("div", { className: s.listHeaderFilters, children: [
145
+ /* @__PURE__ */ r("div", { className: s.listSearch, children: [
138
146
  /* @__PURE__ */ t(
139
- Q,
147
+ Y,
140
148
  {
141
149
  type: "text",
142
150
  name: "list-search",
143
151
  placeholder: "Search articles",
144
- value: f,
152
+ value: u,
145
153
  onChange: (e) => {
146
- S(e.target.value), c([]), d(0), n(!0);
154
+ y(e.target.value), i([]), c(0), n(!0);
147
155
  }
148
156
  }
149
157
  ),
150
- f && /* @__PURE__ */ t(
158
+ u && /* @__PURE__ */ t(
151
159
  "button",
152
160
  {
153
161
  className: s.clearSearch,
154
162
  onClick: () => {
155
- S(""), c([]), d(0), n(!0);
163
+ y(""), i([]), c(0), n(!0);
156
164
  },
157
- children: /* @__PURE__ */ t(ee, { size: 21 })
165
+ children: /* @__PURE__ */ t(se, { size: 21 })
158
166
  }
159
167
  )
160
168
  ] }),
161
169
  /* @__PURE__ */ t("div", { className: s.listSort, children: /* @__PURE__ */ t(
162
- V,
170
+ F,
163
171
  {
164
172
  id: "list-sort",
165
173
  name: "list-sort",
166
- options: te,
167
- onChange: G
174
+ options: oe,
175
+ onChange: X
168
176
  }
169
177
  ) })
170
178
  ] })
171
179
  ] }),
172
- /* @__PURE__ */ t("div", { className: `${s.list} ${q}`, children: A && A.map(
173
- (e) => g == "blog" && /* @__PURE__ */ t(Y, { article: e }, e._id)
180
+ /* @__PURE__ */ t("div", { className: `${s.list} ${G}`, children: A && A.map(
181
+ (e) => k == "blog" && /* @__PURE__ */ t(ee, { article: e }, e._id)
174
182
  ) }),
175
- j && /* @__PURE__ */ t("div", { className: s.loadMore, children: /* @__PURE__ */ t(
183
+ z && /* @__PURE__ */ t("div", { className: s.loadMore, children: /* @__PURE__ */ t(
176
184
  L,
177
185
  {
178
186
  as: "button",
179
187
  variant: "primary",
180
- onClick: M,
181
- disabled: i,
188
+ onClick: P,
189
+ disabled: d,
182
190
  icon: "refresh",
183
191
  iconAlignment: "left",
184
- className: i ? s.buttonIsLoading : "",
185
- children: i ? "Loading..." : "Load more"
192
+ className: d ? s.buttonIsLoading : "",
193
+ children: d ? "Loading..." : "Load more"
186
194
  }
187
195
  ) })
188
196
  ] })
@@ -190,5 +198,5 @@ function ue({
190
198
  ] }) });
191
199
  }
192
200
  export {
193
- ue as DocumentListBlock
201
+ he as DocumentListBlock
194
202
  };
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index67.css');const e=require("react/jsx-runtime"),_=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"),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");/**
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:r,video:l,callToAction:n,pageData:o,styleOptions:j}){var $,B;const u=L.usePrefersReducedMotion(),[k,N]=_.useState(!u),{setIsFullbleedHeroAtTop:C}=I.useHeroContext(),a=_.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],h=($=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;_.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]),_.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(!l)return null;const c=l.includes("vimeo.com"),x=l.includes("youtube.com")||l.includes("youtu.be");return c||x?e.jsx("div",{className:s.videoWrapper,children:e.jsx("iframe",{src:c?`${l}?autoplay=1&muted=1&loop=1&background=1`:`${l}?autoplay=1&mute=1&loop=1&playlist=${f(l)}`,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs("div",{className:s.videoWrapper,children:[e.jsx(p,{}),e.jsx("video",{ref:a,src:l,autoPlay:!u,loop:!0,muted:!0,playsInline:!0,poster:(r==null?void 0:r.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=()=>r&&r.imageUrl?e.jsx("div",{className:s.image,children:e.jsx(v,{src:r.imageUrl,alt:r.asset.altText||r.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})]}),l?e.jsx(R,{}):e.jsx(T,{})]})});case"default":return e.jsx("section",{className:`${s.hero} ${b}`,children:e.jsxs("article",{className:s.container,children:[l?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:[l?l.includes("vimeo.com")||l.includes("youtube.com")||l.includes("youtu.be")?e.jsx("div",{className:s.videoBackground,children:e.jsx("iframe",{src:l.includes("vimeo.com")?`${l}?autoplay=1&muted=1&loop=1&background=1`:`${l}?autoplay=1&mute=1&loop=1&playlist=${f(l)}`,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:l,autoPlay:!u,loop:!0,muted:!0,playsInline:!0,poster:(r==null?void 0:r.imageUrl)||void 0})]}):e.jsx(v,{src:(r==null?void 0:r.imageUrl)??"",alt:(r==null?void 0:r.asset.altText)||(r==null?void 0:r.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:[l?l.includes("vimeo.com")||l.includes("youtube.com")||l.includes("youtu.be")?e.jsx("div",{className:s.videoBackground,children:e.jsx("iframe",{src:l.includes("vimeo.com")?`${l}?autoplay=1&muted=1&loop=1&background=1`:`${l}?autoplay=1&mute=1&loop=1&playlist=${f(l)}`,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:l,autoPlay:!u,loop:!0,muted:!0,playsInline:!0,poster:(r==null?void 0:r.imageUrl)||void 0})]}):e.jsx(v,{src:(r==null?void 0:r.imageUrl)??"",alt:(r==null?void 0:r.asset.altText)||(r==null?void 0:r.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:[h&&e.jsx(w.LocaleLink,{href:`/blog/search?category=${encodeURIComponent(h.slug.current)}`,className:s.category,children:h.title},h._id),d&&d.title.toLowerCase()!=="library"&&!d.slug.current.includes("keywords")&&e.jsx(w.LocaleLink,{href:`/blog/search?category=${encodeURIComponent(d.slug.current)}`,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 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;
@@ -2,7 +2,7 @@ import { jsx as e, jsxs as c, Fragment as N } from "react/jsx-runtime";
2
2
  import { useState as T, useRef as z, useEffect as F } from "react";
3
3
  import { useHeroContext as L } from "./HeroContext.mjs";
4
4
  import { RichText as n } from "../../ui/PortableTextRenderer/index.mjs";
5
- import { CallToActions as b } from "../../ui/CallToActions/index.mjs";
5
+ import { CallToActions as h } from "../../ui/CallToActions/index.mjs";
6
6
  import k from "next/image";
7
7
  import { LocaleLink as x } from "../../ui/LocaleLink/index.mjs";
8
8
  import { usePrefersReducedMotion as S } from "../../hooks/usePrefersReducedMotion.mjs";
@@ -39,21 +39,21 @@ const H = [
39
39
  videoBackground: oe,
40
40
  iframe: te
41
41
  };
42
- function he({
42
+ function _e({
43
43
  heading: t,
44
44
  image: l,
45
45
  video: o,
46
46
  callToAction: u,
47
47
  pageData: s,
48
- styleOptions: _
48
+ styleOptions: b
49
49
  }) {
50
50
  var R, U;
51
- const d = S(), [C, $] = T(!d), { setIsFullbleedHeroAtTop: B } = L(), m = z(null), p = (_ == null ? void 0 : _.layout) ?? "default", f = {
51
+ const d = S(), [C, $] = T(!d), { setIsFullbleedHeroAtTop: B } = L(), m = z(null), p = (b == null ? void 0 : b.layout) ?? "default", f = {
52
52
  default: r.default,
53
53
  split: r.split,
54
54
  "full-bleed": r.fullBleed,
55
55
  blog: r.blog
56
- }[p], h = (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;
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
57
  F(() => {
58
58
  const i = () => {
59
59
  B(window.scrollY === 0);
@@ -135,7 +135,7 @@ function he({
135
135
  ] }),
136
136
  t.description && /* @__PURE__ */ e(n, { blocks: t.description }),
137
137
  u && /* @__PURE__ */ e(
138
- b,
138
+ h,
139
139
  {
140
140
  items: u.items,
141
141
  alignment: u.alignment
@@ -167,7 +167,7 @@ function he({
167
167
  ] }),
168
168
  t.description && /* @__PURE__ */ e(n, { blocks: t.description }),
169
169
  u && /* @__PURE__ */ e(
170
- b,
170
+ h,
171
171
  {
172
172
  items: u.items,
173
173
  alignment: u.alignment
@@ -227,7 +227,7 @@ function he({
227
227
  ] }),
228
228
  t.description && /* @__PURE__ */ e(n, { blocks: t.description }),
229
229
  u && /* @__PURE__ */ e(
230
- b,
230
+ h,
231
231
  {
232
232
  items: u.items,
233
233
  alignment: u.alignment
@@ -296,24 +296,24 @@ function he({
296
296
  s.articleType
297
297
  ),
298
298
  /* @__PURE__ */ c("div", { className: r.articleCategories, children: [
299
- h && /* @__PURE__ */ e(
299
+ _ && /* @__PURE__ */ e(
300
300
  x,
301
301
  {
302
- href: `/blog/search?category=${encodeURIComponent(
303
- h.slug.current
302
+ href: `/blog/search?categories=${encodeURIComponent(
303
+ _._id
304
304
  )}`,
305
305
  className: r.category,
306
- children: h.title
306
+ children: _.title
307
307
  },
308
- h._id
308
+ _._id
309
309
  ),
310
310
  a && a.title.toLowerCase() !== "library" && !a.slug.current.includes(
311
311
  "keywords"
312
312
  ) && /* @__PURE__ */ e(
313
313
  x,
314
314
  {
315
- href: `/blog/search?category=${encodeURIComponent(
316
- a.slug.current
315
+ href: `/blog/search?categories=${encodeURIComponent(
316
+ a._id
317
317
  )}`,
318
318
  className: r.category,
319
319
  children: a.title
@@ -330,7 +330,7 @@ function he({
330
330
  ] }),
331
331
  t.description && /* @__PURE__ */ e(n, { blocks: t.description }),
332
332
  u && /* @__PURE__ */ e(
333
- b,
333
+ h,
334
334
  {
335
335
  items: u.items,
336
336
  alignment: u.alignment
@@ -341,5 +341,5 @@ function he({
341
341
  }
342
342
  }
343
343
  export {
344
- he as HeroBlock
344
+ _e as HeroBlock
345
345
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quirk-ui",
3
3
  "private": false,
4
- "version": "0.0.472",
4
+ "version": "0.0.474",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {