quirk-ui 0.1.44 → 0.1.45
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('../../../index35.css');const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index35.css');const e=require("react/jsx-runtime"),c=require("react"),M=require("react-dom"),R=require("../../../x-Dft9NVe_.cjs"),T="_overlay_1h84d_2",D="_fadeIn_1h84d_1",P="_modal_1h84d_19",U="_slideUp_1h84d_1",A="_trigger_1h84d_54",C="_closeButton_1h84d_61",F="_title_1h84d_89",K="_content_1h84d_99",l={overlay:T,fadeIn:D,modal:P,slideUp:U,"size-sm":"_size-sm_1h84d_31","size-md":"_size-md_1h84d_35","size-lg":"_size-lg_1h84d_39","size-xl":"_size-xl_1h84d_43","size-full":"_size-full_1h84d_47",trigger:A,closeButton:C,title:F,content:K},X=()=>{typeof document<"u"&&(document.body.style.overflow="hidden")},b=()=>{typeof document<"u"&&(document.body.style.overflow="")};function G({content:x,trigger:k,isOpen:h,onOpen:i,onClose:o,size:z="md",closeOnEscape:v=!0,closeOnOverlayClick:j=!0,showCloseButton:p=!0,className:w,overlayClassName:$,style:E,title:f}){const[q,y]=c.useState(!1),_=c.useRef(null),m=h!==void 0,t=m?h:q,N=()=>{m||y(!0),i==null||i()},r=()=>{m||y(!1),o==null||o()},S=()=>{t?r():N()},I=()=>{j&&r()};c.useEffect(()=>{if(!v||!t)return;const s=d=>{d.key==="Escape"&&r()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[t,v]),c.useEffect(()=>(t?X():b(),()=>b()),[t]),c.useEffect(()=>{if(!t||!_.current)return;const s=_.current,d=s.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),n=d[0],a=d[d.length-1],g=u=>{u.key==="Tab"&&(u.shiftKey?document.activeElement===n&&(u.preventDefault(),a==null||a.focus()):document.activeElement===a&&(u.preventDefault(),n==null||n.focus()))};return s.addEventListener("keydown",g),n==null||n.focus(),()=>{s.removeEventListener("keydown",g)}},[t]);const B=l[`size-${z}`]||"",L=t?e.jsx("div",{className:`${l.overlay} ${$??""}`.trim(),onClick:I,role:"dialog","aria-modal":"true","aria-labelledby":f?"modal-title":void 0,children:e.jsxs("div",{style:{position:"relative"},children:[p&&e.jsx("button",{"aria-label":"Close",className:l.closeButton,onClick:r,type:"button",children:e.jsx(R.X,{size:20})}),e.jsxs("div",{ref:_,className:`${l.modal} ${B} ${w??""}`.trim(),style:E,onClick:s=>s.stopPropagation(),children:[f&&e.jsx("div",{className:l.title,id:"modal-title",children:f}),e.jsx("div",{className:l.content,children:x})]})]})}):null;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:l.trigger,onClick:S,children:k}),typeof window<"u"&&M.createPortal(L,document.body)]})}exports.Modal=G;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as P, useRef as R, useEffect as
|
|
1
|
+
import { jsxs as _, Fragment as D, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { useState as P, useRef as R, useEffect as h } from "react";
|
|
3
3
|
import { createPortal as q } from "react-dom";
|
|
4
4
|
import { X as A } from "../../../x-CnsEH4Ox.js";
|
|
5
|
-
import '../../../index35.css';const C = "
|
|
5
|
+
import '../../../index35.css';const C = "_overlay_1h84d_2", F = "_fadeIn_1h84d_1", K = "_modal_1h84d_19", M = "_slideUp_1h84d_1", X = "_trigger_1h84d_54", G = "_closeButton_1h84d_61", H = "_title_1h84d_89", J = "_content_1h84d_99", l = {
|
|
6
6
|
overlay: C,
|
|
7
7
|
fadeIn: F,
|
|
8
8
|
modal: K,
|
|
9
9
|
slideUp: M,
|
|
10
|
-
"size-sm": "_size-
|
|
11
|
-
"size-md": "_size-
|
|
12
|
-
"size-lg": "_size-
|
|
13
|
-
"size-xl": "_size-
|
|
14
|
-
"size-full": "_size-
|
|
10
|
+
"size-sm": "_size-sm_1h84d_31",
|
|
11
|
+
"size-md": "_size-md_1h84d_35",
|
|
12
|
+
"size-lg": "_size-lg_1h84d_39",
|
|
13
|
+
"size-xl": "_size-xl_1h84d_43",
|
|
14
|
+
"size-full": "_size-full_1h84d_47",
|
|
15
15
|
trigger: X,
|
|
16
16
|
closeButton: G,
|
|
17
17
|
title: H,
|
|
18
18
|
content: J
|
|
19
19
|
}, Q = () => {
|
|
20
20
|
typeof document < "u" && (document.body.style.overflow = "hidden");
|
|
21
|
-
},
|
|
21
|
+
}, p = () => {
|
|
22
22
|
typeof document < "u" && (document.body.style.overflow = "");
|
|
23
23
|
};
|
|
24
24
|
function O({
|
|
25
|
-
content:
|
|
25
|
+
content: k,
|
|
26
26
|
trigger: z,
|
|
27
|
-
isOpen:
|
|
28
|
-
onOpen:
|
|
27
|
+
isOpen: v,
|
|
28
|
+
onOpen: o,
|
|
29
29
|
onClose: i,
|
|
30
30
|
size: w = "md",
|
|
31
|
-
closeOnEscape:
|
|
31
|
+
closeOnEscape: y = !0,
|
|
32
32
|
closeOnOverlayClick: x = !0,
|
|
33
33
|
showCloseButton: N = !0,
|
|
34
34
|
className: $,
|
|
@@ -36,67 +36,69 @@ function O({
|
|
|
36
36
|
style: I,
|
|
37
37
|
title: u
|
|
38
38
|
}) {
|
|
39
|
-
const [B,
|
|
40
|
-
m ||
|
|
39
|
+
const [B, g] = P(!1), f = R(null), m = v !== void 0, e = m ? v : B, L = () => {
|
|
40
|
+
m || g(!0), o == null || o();
|
|
41
41
|
}, r = () => {
|
|
42
|
-
m ||
|
|
42
|
+
m || g(!1), i == null || i();
|
|
43
43
|
}, S = () => {
|
|
44
44
|
e ? r() : L();
|
|
45
45
|
}, T = () => {
|
|
46
46
|
x && r();
|
|
47
47
|
};
|
|
48
|
-
|
|
49
|
-
if (!
|
|
50
|
-
const t = (
|
|
51
|
-
|
|
48
|
+
h(() => {
|
|
49
|
+
if (!y || !e) return;
|
|
50
|
+
const t = (s) => {
|
|
51
|
+
s.key === "Escape" && r();
|
|
52
52
|
};
|
|
53
53
|
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
54
|
-
}, [e,
|
|
54
|
+
}, [e, y]), h(() => (e ? Q() : p(), () => p()), [e]), h(() => {
|
|
55
55
|
if (!e || !f.current) return;
|
|
56
|
-
const t = f.current,
|
|
56
|
+
const t = f.current, s = t.querySelectorAll(
|
|
57
57
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
58
|
-
), n =
|
|
59
|
-
a.key === "Tab" && (a.shiftKey ? document.activeElement === n && (a.preventDefault(),
|
|
58
|
+
), n = s[0], c = s[s.length - 1], b = (a) => {
|
|
59
|
+
a.key === "Tab" && (a.shiftKey ? document.activeElement === n && (a.preventDefault(), c == null || c.focus()) : document.activeElement === c && (a.preventDefault(), n == null || n.focus()));
|
|
60
60
|
};
|
|
61
|
-
return t.addEventListener("keydown",
|
|
62
|
-
t.removeEventListener("keydown",
|
|
61
|
+
return t.addEventListener("keydown", b), n == null || n.focus(), () => {
|
|
62
|
+
t.removeEventListener("keydown", b);
|
|
63
63
|
};
|
|
64
64
|
}, [e]);
|
|
65
|
-
const U =
|
|
65
|
+
const U = l[`size-${w}`] || "", j = e ? /* @__PURE__ */ d(
|
|
66
66
|
"div",
|
|
67
67
|
{
|
|
68
|
-
className: `${
|
|
68
|
+
className: `${l.overlay} ${E ?? ""}`.trim(),
|
|
69
69
|
onClick: T,
|
|
70
70
|
role: "dialog",
|
|
71
71
|
"aria-modal": "true",
|
|
72
72
|
"aria-labelledby": u ? "modal-title" : void 0,
|
|
73
|
-
children: /* @__PURE__ */
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
),
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
73
|
+
children: /* @__PURE__ */ _("div", { style: { position: "relative" }, children: [
|
|
74
|
+
N && /* @__PURE__ */ d(
|
|
75
|
+
"button",
|
|
76
|
+
{
|
|
77
|
+
"aria-label": "Close",
|
|
78
|
+
className: l.closeButton,
|
|
79
|
+
onClick: r,
|
|
80
|
+
type: "button",
|
|
81
|
+
children: /* @__PURE__ */ d(A, { size: 20 })
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
/* @__PURE__ */ _(
|
|
85
|
+
"div",
|
|
86
|
+
{
|
|
87
|
+
ref: f,
|
|
88
|
+
className: `${l.modal} ${U} ${$ ?? ""}`.trim(),
|
|
89
|
+
style: I,
|
|
90
|
+
onClick: (t) => t.stopPropagation(),
|
|
91
|
+
children: [
|
|
92
|
+
u && /* @__PURE__ */ d("div", { className: l.title, id: "modal-title", children: u }),
|
|
93
|
+
/* @__PURE__ */ d("div", { className: l.content, children: k })
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
] })
|
|
96
98
|
}
|
|
97
99
|
) : null;
|
|
98
|
-
return /* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
+
return /* @__PURE__ */ _(D, { children: [
|
|
101
|
+
/* @__PURE__ */ d("div", { className: l.trigger, onClick: S, children: z }),
|
|
100
102
|
typeof window < "u" && q(j, document.body)
|
|
101
103
|
] });
|
|
102
104
|
}
|
package/dist/index35.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._overlay_1h84d_2{position:fixed;top:0;left:0;width:100vw;height:100vh;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:1000;animation:_fadeIn_1h84d_1 .2s ease;padding:var(--spacing-md, 1rem);overflow-y:auto}._modal_1h84d_19{position:relative;background-color:var(--color-foreground, #fff);border-radius:var(--radius-lg, .5rem);padding:var(--spacing-xl, 2rem);max-height:90vh;overflow-y:auto;animation:_slideUp_1h84d_1 .3s ease;box-shadow:var(--shadow-xl, 0 20px 25px -5px rgba(0, 0, 0, .1))}._size-sm_1h84d_31{width:min(90%,400px)}._size-md_1h84d_35{width:min(90%,600px)}._size-lg_1h84d_39{width:min(90%,800px)}._size-xl_1h84d_43{width:min(90%,1200px)}._size-full_1h84d_47{width:95%;height:95vh;max-height:95vh}._trigger_1h84d_54{width:auto;display:inline-block;cursor:pointer}._closeButton_1h84d_61{position:absolute;top:-2rem;right:2.5rem;background:none;border:none;cursor:pointer;padding:var(--spacing-xs, .25rem);border-radius:var(--radius-sm, .25rem);color:#fff;transition:all .2s ease;display:flex;align-items:center;justify-content:center;z-index:1}._closeButton_1h84d_61:hover{background-color:var(--color-secondary-10, #f5f5f5);color:var(--color-text-primary, #333)}._closeButton_1h84d_61:focus-visible{outline:2px solid var(--color-primary-100, #007bff);outline-offset:2px}._title_1h84d_89{font-size:var(--font-size-xl, 1.5rem);font-weight:var(--font-weight-bold, 700);color:var(--color-heading, #111);margin-bottom:var(--spacing-lg, 1.5rem);padding-right:var(--spacing-xl, 2rem);line-height:var(--line-height-heading, 1.2)}._content_1h84d_99{color:var(--color-text-primary, #333);line-height:var(--line-height-normal, 1.5)}._content_1h84d_99 video{width:100%;max-width:100%;height:auto;border-radius:var(--radius-md, .5rem)}._content_1h84d_99 img{max-width:100%;height:auto;border-radius:var(--radius-md, .5rem)}@keyframes _fadeIn_1h84d_1{0%{opacity:0}to{opacity:1}}@keyframes _slideUp_1h84d_1{0%{opacity:0;transform:translateY(30px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}@media (max-width: 768px){._modal_1h84d_19{padding:var(--spacing-lg, 1.5rem);max-height:85vh}._size-sm_1h84d_31,._size-md_1h84d_35,._size-lg_1h84d_39,._size-xl_1h84d_43{width:95%}._title_1h84d_89{font-size:var(--font-size-lg, 1.25rem);padding-right:var(--spacing-lg, 1.5rem)}}@media (max-width: 480px){._overlay_1h84d_2{padding:var(--spacing-sm, .5rem)}._modal_1h84d_19{padding:var(--spacing-md, 1rem);max-height:90vh}._closeButton_1h84d_61{top:var(--spacing-sm, .5rem);right:var(--spacing-sm, .5rem)}._title_1h84d_89{font-size:var(--font-size-md, 1rem);margin-bottom:var(--spacing-md, 1rem)}}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index.css');require('../../../index60.css');const t=require("react/jsx-runtime");;/* empty css */require("react");require("../../../core/components/Avatar/index.cjs");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index.css');require('../../../index60.css');const t=require("react/jsx-runtime");;/* empty css */require("react");require("../../../core/components/Avatar/index.cjs");const g=require("../../../core/components/Badge/index.cjs");require("../../../core/components/Checkbox/index.cjs");require("react-dom");require("../../../core/components/Tabs/index.cjs");require("../../../core/tokens/theme.cjs");const j=require("../../../core/context/ThemeContext.cjs"),C=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 T=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],N=C.createLucideIcon("arrow-up-right",T),q="_item_1vn4l_1",
|
|
6
|
+
*/const T=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],N=C.createLucideIcon("arrow-up-right",T),q="_item_1vn4l_1",I="_itemImage_1vn4l_14",b="_itemTitle_1vn4l_20",k="_callToAction_1vn4l_26",A="_icon_1vn4l_33",w="_single_1vn4l_39",E="_first_1vn4l_40",U="_itemContent_1vn4l_41",B="_itemExcerpt_1vn4l_113",P="_imagePlaceholder_1vn4l_180",L="_category_1vn4l_229",z="_itemEyebrow_1vn4l_248",s={item:q,itemImage:I,itemTitle:b,callToAction:k,icon:A,single:w,first:E,itemContent:U,itemExcerpt:B,imagePlaceholder:P,category:L,itemEyebrow:z};function M(e,i){var r;if(e!=null&&e.imageUrls)return i==="dark"?((r=e.imageUrls.dark)==null?void 0:r.medium)??e.imageUrls.default.medium:e.imageUrls.default.medium}function $(e,i){var c,n,o,u,d,m;if(!e)return"Card image";const r=i==="dark"?"darkImage":"defaultImage",l=((n=(c=e==null?void 0:e[r])==null?void 0:c.asset)==null?void 0:n.altText)??((u=(o=e==null?void 0:e[r])==null?void 0:o.asset)==null?void 0:u.description);if(l)return l;const a=((d=e==null?void 0:e.asset)==null?void 0:d.altText)??((m=e==null?void 0:e.asset)==null?void 0:m.description);return a||"Card image"}function F(e){var l,a;const i=((l=e.categories)==null?void 0:l.find(c=>{var n,o;return!((o=(n=c.slug)==null?void 0:n.current)!=null&&o.startsWith("library/type"))}))??null,r=((a=e.categories)==null?void 0:a.find(c=>{var n,o;return(o=(n=c.slug)==null?void 0:n.current)==null?void 0:o.startsWith("library/type")}))??null;return{mainCategory:i,typeCategory:r}}function S({href:e,className:i,children:r}){return t.jsx("a",{href:e,className:i,children:r})}function W({article:e,className:i="",index:r,layout:l,limit:a,renderImage:c,renderLink:n}){const{mode:o}=j.useTheme(),u=`/blog/articles/${e.slug.current}`,d=M(e.featuredImage,o),m=$(e.featuredImage,o),{mainCategory:x,typeCategory:v}=F(e),h=[s.item,i,r===0?s.first:"",a===1?s.single:"",l??""].filter(Boolean).join(" "),y=t.jsxs("div",{className:s.itemImage,children:[v&&t.jsx("div",{className:s.category,children:v.title}),d?c?c({src:d,alt:m,fill:!0,sizes:"(max-width: 767px) 650px, 300px",priority:r===0}):t.jsx("img",{src:d,alt:m,style:{width:"100%",height:"100%",objectFit:"cover"}}):t.jsx("div",{className:s.imagePlaceholder})]}),f=t.jsxs(t.Fragment,{children:[y,t.jsxs("div",{className:s.itemContent,children:[x&&t.jsx(g.Badge,{className:s.itemEyebrow,text:x.title,variant:"muted"}),t.jsxs("div",{className:s.itemTitle,children:[t.jsx("h3",{children:e.title}),t.jsx("div",{className:s.callToAction,children:t.jsx("div",{className:s.icon,children:t.jsx(N,{size:45})})})]}),e.excerpt&&t.jsx("p",{className:s.itemExcerpt,children:e.excerpt})]})]}),p=n?({children:_})=>n({href:u,className:h,children:_}):({children:_})=>t.jsx(S,{href:u,className:h,children:_});return t.jsx(p,{children:f})}exports.BlogArticleCard=W;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as _, jsx as o, Fragment as x } from "react/jsx-runtime";
|
|
2
2
|
import '../../../index.css';import '../../../index60.css';/* empty css */
|
|
3
3
|
import "react";
|
|
4
4
|
import "../../../core/components/Avatar/index.mjs";
|
|
@@ -8,112 +8,115 @@ import "react-dom";
|
|
|
8
8
|
import "../../../core/components/Tabs/index.mjs";
|
|
9
9
|
import "../../../core/tokens/theme.mjs";
|
|
10
10
|
import { useTheme as N } from "../../../core/context/ThemeContext.mjs";
|
|
11
|
-
import { c as
|
|
11
|
+
import { c as T } from "../../../createLucideIcon-C8GTh_Qx.js";
|
|
12
12
|
/**
|
|
13
13
|
* @license lucide-react v0.488.0 - ISC
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the ISC license.
|
|
16
16
|
* See the LICENSE file in the root directory of this source tree.
|
|
17
17
|
*/
|
|
18
|
-
const
|
|
18
|
+
const k = [
|
|
19
19
|
["path", { d: "M7 7h10v10", key: "1tivn9" }],
|
|
20
20
|
["path", { d: "M7 17 17 7", key: "1vkiza" }]
|
|
21
|
-
], I =
|
|
21
|
+
], I = T("arrow-up-right", k), b = "_item_1vn4l_1", w = "_itemImage_1vn4l_14", A = "_itemTitle_1vn4l_20", E = "_callToAction_1vn4l_26", U = "_icon_1vn4l_33", P = "_single_1vn4l_39", j = "_first_1vn4l_40", B = "_itemContent_1vn4l_41", L = "_itemExcerpt_1vn4l_113", z = "_imagePlaceholder_1vn4l_180", F = "_category_1vn4l_229", M = "_itemEyebrow_1vn4l_248", n = {
|
|
22
22
|
item: b,
|
|
23
23
|
itemImage: w,
|
|
24
24
|
itemTitle: A,
|
|
25
25
|
callToAction: E,
|
|
26
26
|
icon: U,
|
|
27
|
-
single:
|
|
28
|
-
first:
|
|
29
|
-
itemContent:
|
|
30
|
-
itemExcerpt:
|
|
31
|
-
imagePlaceholder:
|
|
27
|
+
single: P,
|
|
28
|
+
first: j,
|
|
29
|
+
itemContent: B,
|
|
30
|
+
itemExcerpt: L,
|
|
31
|
+
imagePlaceholder: z,
|
|
32
32
|
category: F,
|
|
33
33
|
itemEyebrow: M
|
|
34
34
|
};
|
|
35
|
-
function W(t,
|
|
36
|
-
var
|
|
35
|
+
function W(t, s) {
|
|
36
|
+
var e;
|
|
37
37
|
if (t != null && t.imageUrls)
|
|
38
|
-
return
|
|
38
|
+
return s === "dark" ? ((e = t.imageUrls.dark) == null ? void 0 : e.medium) ?? t.imageUrls.default.medium : t.imageUrls.default.medium;
|
|
39
39
|
}
|
|
40
|
-
function D(t,
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
function D(t, s) {
|
|
41
|
+
var c, r, i, d, m, u;
|
|
42
|
+
if (!t) return "Card image";
|
|
43
|
+
const e = s === "dark" ? "darkImage" : "defaultImage", l = ((r = (c = t == null ? void 0 : t[e]) == null ? void 0 : c.asset) == null ? void 0 : r.altText) ?? ((d = (i = t == null ? void 0 : t[e]) == null ? void 0 : i.asset) == null ? void 0 : d.description);
|
|
44
|
+
if (l) return l;
|
|
45
|
+
const a = ((m = t == null ? void 0 : t.asset) == null ? void 0 : m.altText) ?? ((u = t == null ? void 0 : t.asset) == null ? void 0 : u.description);
|
|
46
|
+
return a || "Card image";
|
|
44
47
|
}
|
|
45
|
-
function
|
|
48
|
+
function K(t) {
|
|
46
49
|
var l, a;
|
|
47
|
-
const
|
|
48
|
-
(
|
|
49
|
-
var
|
|
50
|
-
return !((
|
|
50
|
+
const s = ((l = t.categories) == null ? void 0 : l.find(
|
|
51
|
+
(c) => {
|
|
52
|
+
var r, i;
|
|
53
|
+
return !((i = (r = c.slug) == null ? void 0 : r.current) != null && i.startsWith("library/type"));
|
|
51
54
|
}
|
|
52
|
-
)) ?? null,
|
|
53
|
-
(
|
|
54
|
-
var
|
|
55
|
-
return (
|
|
55
|
+
)) ?? null, e = ((a = t.categories) == null ? void 0 : a.find(
|
|
56
|
+
(c) => {
|
|
57
|
+
var r, i;
|
|
58
|
+
return (i = (r = c.slug) == null ? void 0 : r.current) == null ? void 0 : i.startsWith("library/type");
|
|
56
59
|
}
|
|
57
60
|
)) ?? null;
|
|
58
|
-
return { mainCategory:
|
|
61
|
+
return { mainCategory: s, typeCategory: e };
|
|
59
62
|
}
|
|
60
|
-
function
|
|
63
|
+
function R({
|
|
61
64
|
href: t,
|
|
62
|
-
className:
|
|
63
|
-
children:
|
|
65
|
+
className: s,
|
|
66
|
+
children: e
|
|
64
67
|
}) {
|
|
65
|
-
return /* @__PURE__ */
|
|
68
|
+
return /* @__PURE__ */ o("a", { href: t, className: s, children: e });
|
|
66
69
|
}
|
|
67
70
|
function tt({
|
|
68
71
|
article: t,
|
|
69
|
-
className:
|
|
70
|
-
index:
|
|
72
|
+
className: s = "",
|
|
73
|
+
index: e,
|
|
71
74
|
layout: l,
|
|
72
75
|
limit: a,
|
|
73
|
-
renderImage:
|
|
74
|
-
renderLink:
|
|
76
|
+
renderImage: c,
|
|
77
|
+
renderLink: r
|
|
75
78
|
}) {
|
|
76
|
-
const { mode:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
a === 1 ?
|
|
79
|
+
const { mode: i } = N(), d = `/blog/articles/${t.slug.current}`, m = W(t.featuredImage, i), u = D(t.featuredImage, i), { mainCategory: f, typeCategory: v } = K(t), h = [
|
|
80
|
+
n.item,
|
|
81
|
+
s,
|
|
82
|
+
e === 0 ? n.first : "",
|
|
83
|
+
a === 1 ? n.single : "",
|
|
81
84
|
l ?? ""
|
|
82
|
-
].filter(Boolean).join(" "),
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
src:
|
|
85
|
+
].filter(Boolean).join(" "), y = /* @__PURE__ */ _("div", { className: n.itemImage, children: [
|
|
86
|
+
v && /* @__PURE__ */ o("div", { className: n.category, children: v.title }),
|
|
87
|
+
m ? c ? c({
|
|
88
|
+
src: m,
|
|
86
89
|
alt: u,
|
|
87
90
|
fill: !0,
|
|
88
91
|
sizes: "(max-width: 767px) 650px, 300px",
|
|
89
|
-
priority:
|
|
90
|
-
}) : /* @__PURE__ */
|
|
92
|
+
priority: e === 0
|
|
93
|
+
}) : /* @__PURE__ */ o(
|
|
91
94
|
"img",
|
|
92
95
|
{
|
|
93
|
-
src:
|
|
96
|
+
src: m,
|
|
94
97
|
alt: u,
|
|
95
98
|
style: { width: "100%", height: "100%", objectFit: "cover" }
|
|
96
99
|
}
|
|
97
|
-
) : /* @__PURE__ */
|
|
98
|
-
] }),
|
|
99
|
-
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
|
|
100
|
+
) : /* @__PURE__ */ o("div", { className: n.imagePlaceholder })
|
|
101
|
+
] }), g = /* @__PURE__ */ _(x, { children: [
|
|
102
|
+
y,
|
|
103
|
+
/* @__PURE__ */ _("div", { className: n.itemContent, children: [
|
|
104
|
+
f && /* @__PURE__ */ o(
|
|
102
105
|
C,
|
|
103
106
|
{
|
|
104
|
-
className:
|
|
105
|
-
text:
|
|
107
|
+
className: n.itemEyebrow,
|
|
108
|
+
text: f.title,
|
|
106
109
|
variant: "muted"
|
|
107
110
|
}
|
|
108
111
|
),
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
-
/* @__PURE__ */
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ _("div", { className: n.itemTitle, children: [
|
|
113
|
+
/* @__PURE__ */ o("h3", { children: t.title }),
|
|
114
|
+
/* @__PURE__ */ o("div", { className: n.callToAction, children: /* @__PURE__ */ o("div", { className: n.icon, children: /* @__PURE__ */ o(I, { size: 45 }) }) })
|
|
112
115
|
] }),
|
|
113
|
-
t.excerpt && /* @__PURE__ */
|
|
116
|
+
t.excerpt && /* @__PURE__ */ o("p", { className: n.itemExcerpt, children: t.excerpt })
|
|
114
117
|
] })
|
|
115
118
|
] });
|
|
116
|
-
return /* @__PURE__ */
|
|
119
|
+
return /* @__PURE__ */ o(r ? ({ children: p }) => r({ href: d, className: h, children: p }) : ({ children: p }) => /* @__PURE__ */ o(R, { href: d, className: h, children: p }), { children: g });
|
|
117
120
|
}
|
|
118
121
|
export {
|
|
119
122
|
tt as BlogArticleCard
|