quirk-ui 0.0.478 → 0.0.479
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
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"),Z=require("../../hooks/useStyleClasses.cjs"),G=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:w,styleOptions:$}){const[_,c]=l.useState([]),[P,M]=l.useState(null),[N,z]=l.useState("date-desc"),[f,g]=l.useState(()=>typeof window>"u"?[]:Array.from(new URLSearchParams(window.location.search).getAll("categories"))),[L,i]=l.useState(0),[a,A]=l.useState(!1),[m,h]=l.useState(!1),[T,r]=l.useState(!0),[u,S]=l.useState(""),[v,D]=l.useState(""),{locale:I}=G.useLocaleBridge(),H=Z.useStyleClasses($),O={list:t.styles.list}[B??"grid"],W=s=>{z(s.target.value),c([]),i(0),r(!0)},k=()=>{h(!m)},U=()=>{c([]),i(0),r(!0),g([]),S(""),h(!1)},q=async()=>{if(a||!T)return;A(!0);const s=new URLSearchParams({start:String(L),limit:String(C),sort:N,documentType:w,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),M(x.totalCount),L+x.articles.length>=x.totalCount&&r(!1)}catch(n){console.error("Failed to load articles:",n),r(!1)}finally{A(!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(()=>{q()},[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:k,disabled:a,icon:"settings",iconAlignment:"left",children:"Filters"}),e.jsx(b.CallToAction,{as:"button",variant:"link",onClick:U,disabled:a||f.length===0&&u.length===0,children:"Reset"})]}),d&&e.jsx(t.CategoryFilters,{categoryFilters:d,selectedCategories:f,setSelectedCategories:g,setArticles:c,setStart:i,setHasMore:r,showFilters:m,toggleFilters:k,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:P})]}),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:_&&_.map(s=>w=="blog"&&e.jsx(K.BlogArticleCard,{article:s},s._id))}),T&&e.jsx("div",{className:t.styles.loadMore,children:e.jsx(b.CallToAction,{as:"button",variant:"primary",onClick:q,disabled:a,icon:"refresh",iconAlignment:"left",className:a?t.styles.buttonIsLoading:"",children:a?"Loading...":"Load more"})})]})]})]})})}exports.DocumentListBlock=Y;
|
|
@@ -1,190 +1,190 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { RichText as
|
|
4
|
-
import { useStyleClasses as
|
|
5
|
-
import { useLocaleBridge as
|
|
6
|
-
import { C as
|
|
7
|
-
import { Input as
|
|
8
|
-
import { Select as
|
|
9
|
-
import { BlogArticleCard as
|
|
10
|
-
import { s, C as
|
|
11
|
-
import { X as
|
|
12
|
-
const
|
|
1
|
+
import { jsx as t, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as a, useCallback as X, useEffect as w } from "react";
|
|
3
|
+
import { RichText as B } from "../../ui/PortableTextRenderer/index.mjs";
|
|
4
|
+
import { useStyleClasses as J } from "../../hooks/useStyleClasses.mjs";
|
|
5
|
+
import { useLocaleBridge as K } from "../../contexts/LocaleBridge.mjs";
|
|
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 = [
|
|
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
|
|
19
|
+
function ue({
|
|
20
20
|
heading: o,
|
|
21
|
-
layout:
|
|
21
|
+
layout: H = "grid",
|
|
22
22
|
includeFilters: b,
|
|
23
23
|
excludeFilters: C,
|
|
24
|
-
limit:
|
|
25
|
-
categoryFilters:
|
|
26
|
-
documentType:
|
|
24
|
+
limit: g = 3,
|
|
25
|
+
categoryFilters: m,
|
|
26
|
+
documentType: A,
|
|
27
27
|
// filterMode,
|
|
28
|
-
styleOptions:
|
|
28
|
+
styleOptions: I
|
|
29
29
|
}) {
|
|
30
|
-
const [
|
|
30
|
+
const [k, c] = a([]), [W, _] = a(null), [T, x] = a("date-desc"), [u, E] = a(() => typeof window > "u" ? [] : Array.from(
|
|
31
31
|
new URLSearchParams(window.location.search).getAll("categories")
|
|
32
|
-
)), [
|
|
32
|
+
)), [R, d] = a(0), [n, $] = a(!1), [p, h] = a(!1), [j, i] = a(!0), [f, S] = a(""), [N, D] = a(""), { locale: O } = K(), U = J(I), Z = {
|
|
33
33
|
//grid: styles.grid,
|
|
34
34
|
list: s.list
|
|
35
|
-
}[
|
|
36
|
-
x(e.target.value),
|
|
35
|
+
}[H ?? "grid"], q = (e) => {
|
|
36
|
+
x(e.target.value), c([]), d(0), i(!0);
|
|
37
37
|
}, z = () => {
|
|
38
38
|
h(!p);
|
|
39
|
-
},
|
|
40
|
-
|
|
39
|
+
}, G = () => {
|
|
40
|
+
c([]), d(0), i(!0), E([]), S(""), h(!1);
|
|
41
41
|
}, M = async () => {
|
|
42
|
-
if (
|
|
42
|
+
if (n || !j) return;
|
|
43
43
|
$(!0);
|
|
44
44
|
const e = new URLSearchParams({
|
|
45
|
-
start: String(
|
|
46
|
-
limit: String(
|
|
47
|
-
sort:
|
|
48
|
-
documentType:
|
|
45
|
+
start: String(R),
|
|
46
|
+
limit: String(g),
|
|
47
|
+
sort: T,
|
|
48
|
+
documentType: A,
|
|
49
49
|
locale: O
|
|
50
50
|
});
|
|
51
|
-
|
|
52
|
-
(
|
|
51
|
+
N && e.append("search", N), u.forEach(
|
|
52
|
+
(l) => e.append("categories", l)
|
|
53
53
|
), b == null || b.forEach(
|
|
54
|
-
(
|
|
54
|
+
(l) => e.append("include", l._id)
|
|
55
55
|
), C == null || C.forEach(
|
|
56
|
-
(
|
|
56
|
+
(l) => e.append("exclude", l._id)
|
|
57
57
|
);
|
|
58
58
|
try {
|
|
59
|
-
const
|
|
59
|
+
const v = await (await fetch(`/api/articles?${e.toString()}`, {
|
|
60
60
|
method: "GET"
|
|
61
61
|
})).json();
|
|
62
|
-
|
|
63
|
-
} catch (
|
|
64
|
-
console.error("Failed to load articles:",
|
|
62
|
+
c((y) => [...y, ...v.articles]), d((y) => y + g), _(v.totalCount), R + v.articles.length >= v.totalCount && i(!1);
|
|
63
|
+
} catch (l) {
|
|
64
|
+
console.error("Failed to load articles:", l), i(!1);
|
|
65
65
|
} finally {
|
|
66
66
|
$(!1);
|
|
67
67
|
}
|
|
68
|
-
},
|
|
68
|
+
}, P = X(() => {
|
|
69
69
|
typeof window < "u" && window.innerWidth > 768 && (h(!1), typeof document < "u" && (document.body.style.overflow = ""));
|
|
70
70
|
}, []);
|
|
71
|
-
return
|
|
71
|
+
return w(() => {
|
|
72
72
|
const e = typeof window < "u";
|
|
73
|
-
return e && window.addEventListener("resize",
|
|
74
|
-
e && window.removeEventListener("resize",
|
|
73
|
+
return e && window.addEventListener("resize", P), () => {
|
|
74
|
+
e && window.removeEventListener("resize", P);
|
|
75
75
|
};
|
|
76
|
-
}, []),
|
|
76
|
+
}, []), w(() => {
|
|
77
77
|
if (typeof document < "u")
|
|
78
78
|
return document.body.style.overflow = p ? "hidden" : "", () => {
|
|
79
79
|
document.body.style.overflow = "";
|
|
80
80
|
};
|
|
81
|
-
}, [p]),
|
|
81
|
+
}, [p]), w(() => {
|
|
82
82
|
const e = setTimeout(() => {
|
|
83
|
-
D(
|
|
83
|
+
D(f);
|
|
84
84
|
}, 1e3);
|
|
85
85
|
return () => clearTimeout(e);
|
|
86
|
-
}, [
|
|
87
|
-
|
|
88
|
-
}, [N,
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
(o == null ? void 0 : o.title) && /* @__PURE__ */ t(
|
|
91
|
-
(o == null ? void 0 : o.description) && /* @__PURE__ */ t(
|
|
86
|
+
}, [f]), w(() => {
|
|
87
|
+
M();
|
|
88
|
+
}, [N, T, u.join(",")]), /* @__PURE__ */ t("section", { className: `${s.documentList} ${U}`, children: /* @__PURE__ */ r("article", { className: s.container, children: [
|
|
89
|
+
/* @__PURE__ */ r("div", { className: s.heading, children: [
|
|
90
|
+
(o == null ? void 0 : o.title) && /* @__PURE__ */ t(B, { blocks: o == null ? void 0 : o.title }),
|
|
91
|
+
(o == null ? void 0 : o.description) && /* @__PURE__ */ t(B, { blocks: o == null ? void 0 : o.description })
|
|
92
92
|
] }),
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
(
|
|
93
|
+
/* @__PURE__ */ r("div", { className: s.listContainer, children: [
|
|
94
|
+
(m == null ? void 0 : m.length) && /* @__PURE__ */ r("div", { className: s.filterToggle, children: [
|
|
95
95
|
/* @__PURE__ */ t(
|
|
96
|
-
|
|
96
|
+
L,
|
|
97
97
|
{
|
|
98
98
|
as: "button",
|
|
99
99
|
variant: "secondary",
|
|
100
100
|
onClick: z,
|
|
101
|
-
disabled:
|
|
101
|
+
disabled: n,
|
|
102
102
|
icon: "settings",
|
|
103
103
|
iconAlignment: "left",
|
|
104
104
|
children: "Filters"
|
|
105
105
|
}
|
|
106
106
|
),
|
|
107
107
|
/* @__PURE__ */ t(
|
|
108
|
-
|
|
108
|
+
L,
|
|
109
109
|
{
|
|
110
110
|
as: "button",
|
|
111
111
|
variant: "link",
|
|
112
|
-
onClick:
|
|
113
|
-
disabled:
|
|
112
|
+
onClick: G,
|
|
113
|
+
disabled: n || u.length === 0 && f.length === 0,
|
|
114
114
|
children: "Reset"
|
|
115
115
|
}
|
|
116
116
|
)
|
|
117
117
|
] }),
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
m && /* @__PURE__ */ t(
|
|
119
|
+
F,
|
|
120
120
|
{
|
|
121
|
-
categoryFilters:
|
|
121
|
+
categoryFilters: m,
|
|
122
122
|
selectedCategories: u,
|
|
123
123
|
setSelectedCategories: E,
|
|
124
|
-
setArticles:
|
|
125
|
-
setStart:
|
|
126
|
-
setHasMore:
|
|
124
|
+
setArticles: c,
|
|
125
|
+
setStart: d,
|
|
126
|
+
setHasMore: i,
|
|
127
127
|
showFilters: p,
|
|
128
128
|
toggleFilters: z,
|
|
129
|
-
isLoading:
|
|
129
|
+
isLoading: n
|
|
130
130
|
}
|
|
131
131
|
),
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ r("div", { className: s.listWrapper, children: [
|
|
133
|
+
/* @__PURE__ */ r("div", { className: s.listHeader, children: [
|
|
134
|
+
/* @__PURE__ */ r("div", { className: s.listResults, children: [
|
|
135
135
|
"Results: ",
|
|
136
136
|
/* @__PURE__ */ t("span", { children: W })
|
|
137
137
|
] }),
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ r("div", { className: s.listHeaderFilters, children: [
|
|
139
|
+
/* @__PURE__ */ r("div", { className: s.listSearch, children: [
|
|
140
140
|
/* @__PURE__ */ t(
|
|
141
|
-
|
|
141
|
+
Q,
|
|
142
142
|
{
|
|
143
143
|
type: "text",
|
|
144
144
|
name: "list-search",
|
|
145
145
|
placeholder: "Search articles",
|
|
146
|
-
value:
|
|
146
|
+
value: f,
|
|
147
147
|
onChange: (e) => {
|
|
148
|
-
|
|
148
|
+
S(e.target.value), c([]), d(0), i(!0);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
),
|
|
152
|
-
|
|
152
|
+
f && /* @__PURE__ */ t(
|
|
153
153
|
"button",
|
|
154
154
|
{
|
|
155
155
|
className: s.clearSearch,
|
|
156
156
|
onClick: () => {
|
|
157
|
-
|
|
157
|
+
S(""), c([]), d(0), i(!0);
|
|
158
158
|
},
|
|
159
|
-
children: /* @__PURE__ */ t(
|
|
159
|
+
children: /* @__PURE__ */ t(ee, { size: 21 })
|
|
160
160
|
}
|
|
161
161
|
)
|
|
162
162
|
] }),
|
|
163
163
|
/* @__PURE__ */ t("div", { className: s.listSort, children: /* @__PURE__ */ t(
|
|
164
|
-
|
|
164
|
+
V,
|
|
165
165
|
{
|
|
166
166
|
id: "list-sort",
|
|
167
167
|
name: "list-sort",
|
|
168
|
-
options:
|
|
169
|
-
onChange:
|
|
168
|
+
options: te,
|
|
169
|
+
onChange: q
|
|
170
170
|
}
|
|
171
171
|
) })
|
|
172
172
|
] })
|
|
173
173
|
] }),
|
|
174
|
-
/* @__PURE__ */ t("div", { className: `${s.list} ${
|
|
175
|
-
(e) =>
|
|
174
|
+
/* @__PURE__ */ t("div", { className: `${s.list} ${Z}`, children: k && k.map(
|
|
175
|
+
(e) => A == "blog" && /* @__PURE__ */ t(Y, { article: e }, e._id)
|
|
176
176
|
) }),
|
|
177
177
|
j && /* @__PURE__ */ t("div", { className: s.loadMore, children: /* @__PURE__ */ t(
|
|
178
|
-
|
|
178
|
+
L,
|
|
179
179
|
{
|
|
180
180
|
as: "button",
|
|
181
181
|
variant: "primary",
|
|
182
182
|
onClick: M,
|
|
183
|
-
disabled:
|
|
183
|
+
disabled: n,
|
|
184
184
|
icon: "refresh",
|
|
185
185
|
iconAlignment: "left",
|
|
186
|
-
className:
|
|
187
|
-
children:
|
|
186
|
+
className: n ? s.buttonIsLoading : "",
|
|
187
|
+
children: n ? "Loading..." : "Load more"
|
|
188
188
|
}
|
|
189
189
|
) })
|
|
190
190
|
] })
|
|
@@ -192,5 +192,5 @@ function pe({
|
|
|
192
192
|
] }) });
|
|
193
193
|
}
|
|
194
194
|
export {
|
|
195
|
-
|
|
195
|
+
ue as DocumentListBlock
|
|
196
196
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index68.css');const t=require("react/jsx-runtime"),
|
|
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
|
|
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 s,n;(n=(s=c.slug)==null?void 0:s.current)!=null&&n.startsWith("library/type")}))??null,o=(l=e.categories)==null?void 0:l.find(c=>{var s,n;(n=(s=c.slug)==null?void 0:s.current)==null||n.startsWith("library/type")});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,69 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { LocaleLink as
|
|
4
|
-
import { c as
|
|
1
|
+
import { jsxs as s, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import y from "next/image";
|
|
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
|
|
11
|
+
const I = [
|
|
12
12
|
["path", { d: "M7 7h10v10", key: "1tivn9" }],
|
|
13
13
|
["path", { d: "M7 17 17 7", key: "1vkiza" }]
|
|
14
|
-
],
|
|
15
|
-
item:
|
|
16
|
-
itemImage:
|
|
17
|
-
itemTitle:
|
|
18
|
-
callToAction:
|
|
19
|
-
icon:
|
|
20
|
-
single:
|
|
21
|
-
first:
|
|
22
|
-
itemContent:
|
|
23
|
-
itemExcerpt:
|
|
24
|
-
imagePlaceholder:
|
|
25
|
-
category:
|
|
26
|
-
itemEyebrow:
|
|
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
|
+
item: x,
|
|
16
|
+
itemImage: T,
|
|
17
|
+
itemTitle: C,
|
|
18
|
+
callToAction: E,
|
|
19
|
+
icon: b,
|
|
20
|
+
single: w,
|
|
21
|
+
first: A,
|
|
22
|
+
itemContent: $,
|
|
23
|
+
itemExcerpt: k,
|
|
24
|
+
imagePlaceholder: P,
|
|
25
|
+
category: L,
|
|
26
|
+
itemEyebrow: U
|
|
27
27
|
};
|
|
28
|
-
function
|
|
28
|
+
function B({
|
|
29
29
|
article: e,
|
|
30
|
-
className:
|
|
31
|
-
index:
|
|
30
|
+
className: g = "",
|
|
31
|
+
index: d,
|
|
32
32
|
//layout,
|
|
33
|
-
limit:
|
|
33
|
+
limit: f
|
|
34
34
|
}) {
|
|
35
|
-
var
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
var m, l, h, _;
|
|
36
|
+
const p = `/blog/articles/${e.slug.current}`, c = ((m = e.categories) == null ? void 0 : m.find((r) => {
|
|
37
|
+
var n, o;
|
|
38
|
+
(o = (n = r.slug) == null ? void 0 : n.current) != null && o.startsWith("library/type");
|
|
39
|
+
})) ?? null, a = (l = e.categories) == null ? void 0 : l.find((r) => {
|
|
40
|
+
var n, o;
|
|
41
|
+
(o = (n = r.slug) == null ? void 0 : n.current) == null || o.startsWith("library/type");
|
|
42
|
+
});
|
|
43
|
+
return /* @__PURE__ */ s(
|
|
44
|
+
u,
|
|
39
45
|
{
|
|
40
|
-
href:
|
|
41
|
-
className: `${t.item} ${
|
|
46
|
+
href: p,
|
|
47
|
+
className: `${t.item} ${g ?? ""} ${d === 0 ? t.first : ""} ${f === 1 ? t.single : ""}`,
|
|
42
48
|
children: [
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
|
|
49
|
+
/* @__PURE__ */ s("div", { className: t.itemImage, children: [
|
|
50
|
+
a && /* @__PURE__ */ i("div", { className: t.category, children: a.title }),
|
|
45
51
|
e.featuredImage && e.featuredImage.imageUrl ? /* @__PURE__ */ i(
|
|
46
|
-
|
|
52
|
+
y,
|
|
47
53
|
{
|
|
48
54
|
src: e.featuredImage.imageUrl ?? "",
|
|
49
|
-
alt: ((
|
|
55
|
+
alt: ((h = e.featuredImage) == null ? void 0 : h.asset.altText) || ((_ = e == null ? void 0 : e.featuredImage) == null ? void 0 : _.asset.description) || "Content image",
|
|
50
56
|
width: 600,
|
|
51
57
|
height: 400,
|
|
52
58
|
priority: !0
|
|
53
59
|
}
|
|
54
60
|
) : /* @__PURE__ */ i("div", { className: t.imagePlaceholder })
|
|
55
61
|
] }),
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
-
|
|
58
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ s("div", { className: t.itemContent, children: [
|
|
63
|
+
c && /* @__PURE__ */ i("div", { className: t.itemEyebrow, children: c.title }),
|
|
64
|
+
/* @__PURE__ */ s("div", { className: t.itemTitle, children: [
|
|
59
65
|
/* @__PURE__ */ i("h3", { children: e.title }),
|
|
60
|
-
/* @__PURE__ */ i("div", { className: t.callToAction, children: /* @__PURE__ */ i("div", { className: t.icon, children: /* @__PURE__ */ i(
|
|
66
|
+
/* @__PURE__ */ i("div", { className: t.callToAction, children: /* @__PURE__ */ i("div", { className: t.icon, children: /* @__PURE__ */ i(N, { size: 45 }) }) })
|
|
61
67
|
] }),
|
|
62
68
|
e.excerpt && /* @__PURE__ */ i("p", { className: t.itemExcerpt, children: e.excerpt })
|
|
63
69
|
] })
|
|
@@ -66,5 +72,5 @@ function U({
|
|
|
66
72
|
);
|
|
67
73
|
}
|
|
68
74
|
export {
|
|
69
|
-
|
|
75
|
+
B as BlogArticleCard
|
|
70
76
|
};
|