quirk-ui 0.0.600 → 0.0.601
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,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index67.css');const e=require("react/jsx-runtime"),g=require("react"),G=require("./HeroContext.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index67.css');const e=require("react/jsx-runtime"),g=require("react"),G=require("./HeroContext.cjs"),c=require("../../ui/PortableTextRenderer/index.cjs"),v=require("../../ui/CallToActions/index.cjs"),w=require("next/image"),R=require("../../ui/LocaleLink/index.cjs"),J=require("../../hooks/usePrefersReducedMotion.cjs"),K=require("../../contexts/ThemeContext.cjs"),Q=require("../../../createLucideIcon-DpotSgUx.cjs"),X=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 Z=[["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"}]],A=Q.createLucideIcon("pause",Z),D="_hero_dpqis_1",O="_container_dpqis_7",ee="_heading_dpqis_15",se="_text_dpqis_22",te="_eyebrow_dpqis_37",re="_disclaimer_dpqis_41",le="_articleDetails_dpqis_53",
|
|
6
|
+
*/const Z=[["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"}]],A=Q.createLucideIcon("pause",Z),D="_hero_dpqis_1",O="_container_dpqis_7",ee="_heading_dpqis_15",se="_text_dpqis_22",te="_eyebrow_dpqis_37",re="_disclaimer_dpqis_41",le="_articleDetails_dpqis_53",ie="_articleType_dpqis_66",ce="_articleCategories_dpqis_80",oe="_category_dpqis_86",ae="_number_dpqis_102",ne="_blog_dpqis_129",de="_overlay_dpqis_153",ue="_fullBleed_dpqis_223",xe="_split_dpqis_317",me="_image_dpqis_322",pe="_videoControl_dpqis_345",_e="_videoWrapper_dpqis_366",ye="_videoBackground_dpqis_386",je="_iframe_dpqis_387",s={hero:D,container:O,heading:ee,text:se,eyebrow:te,disclaimer:re,articleDetails:le,articleType:ie,articleCategories:ce,category:oe,number:ae,default:"_default_dpqis_125",blog:ne,overlay:de,fullBleed:ue,split:xe,image:me,videoControl:pe,videoWrapper:_e,videoBackground:ye,iframe:je};function be({heading:r,image:i,video:t,callToAction:o,pageData:n,styleOptions:d}){var U,F,z,S,W,H,E,M,V;const u=J.usePrefersReducedMotion(),[$,T]=g.useState(!u),{mode:j}=K.useTheme(),{setIsFullbleedHeroAtTop:I}=G.useHeroContext(),_=g.useRef(null),x=(d==null?void 0:d.layout)??"default",Y=((U=d==null?void 0:d.padding)==null?void 0:U.join(" "))??"",N={default:s.default,split:s.split,"split-35-65":s.split,"full-bleed":s.fullBleed,blog:s.blog}[x],B=((F=n==null?void 0:n.categories)==null?void 0:F.filter(l=>{var a,y;return!((y=(a=l.slug)==null?void 0:a.current)!=null&&y.startsWith("library/type"))}))??[],b=B[0]??null,m=B[1]??null,h=((z=n==null?void 0:n.categories)==null?void 0:z.find(l=>{var a,y;return(y=(a=l.slug)==null?void 0:a.current)==null?void 0:y.startsWith("library/type")}))??null;g.useEffect(()=>{const l=()=>{I(window.scrollY===0)};if(x==="full-bleed"&&typeof window<"u")return I(!0),window.addEventListener("scroll",l),()=>window.removeEventListener("scroll",l)},[x]),g.useEffect(()=>{const l=_.current;l&&(u?l.pause():l.play())},[u]);let f,p;i!=null&&i.imageUrls&&(f=j==="dark"&&((S=i.imageUrls.dark)==null?void 0:S.medium)||i.imageUrls.default.medium,p=j==="dark"&&((W=i.imageUrls.dark)==null?void 0:W.large)||i.imageUrls.default.large);let k=((E=(H=i==null?void 0:i[j==="dark"?"darkImage":"defaultImage"])==null?void 0:H.asset)==null?void 0:E.altText)||((V=(M=i==null?void 0:i[j==="dark"?"darkImage":"defaultImage"])==null?void 0:M.asset)==null?void 0:V.description)||"Card image";const q=()=>e.jsx("button",{title:`${$?"Pause the video":"Play the video"}`,className:s.videoControl,onClick:()=>{const l=_.current;l&&(l.paused?(l.play().catch(()=>{}),T(!0)):(l.pause(),T(!1)))},children:$?e.jsx(A,{size:18}):e.jsx(X.Play,{size:18})}),P=()=>{if(!t)return null;const l=t.includes("vimeo.com"),a=t.includes("youtube.com")||t.includes("youtu.be");return l||a?e.jsx("div",{className:s.videoWrapper,children:e.jsx("iframe",{src:l?`${t}?autoplay=1&muted=1&loop=1&background=1`:`${t}?autoplay=1&mute=1&loop=1&playlist=${C(t)}`,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs("div",{className:s.videoWrapper,children:[e.jsx(q,{}),e.jsx("video",{ref:_,src:t,autoPlay:!u,loop:!0,muted:!0,playsInline:!0,poster:p||void 0,preload:"metadata"})]})};function C(l){const a=l.match(/(?:youtube\.com\/.*v=|youtu\.be\/)([^&?/]+)/);return(a==null?void 0:a[1])||""}const L=()=>i&&f?e.jsx("div",{className:s.image,children:x==="blog"||x==="full-bleed"?e.jsx(w,{src:f,alt:k,fill:!0,priority:!0,fetchPriority:"high",style:{objectFit:"cover"},draggable:!1,sizes:"(max-width: 767px) 600px, 1200px"}):e.jsx(w,{src:f,alt:k,width:650,height:750,priority:!0,fetchPriority:"high"})}):null;switch(x){case"split-35-65":case"split":return e.jsx("section",{className:`${s.hero} ${s.split}`,children:e.jsxs("article",{className:`${Y} ${s.container}`,children:[e.jsxs("div",{className:s.heading,children:[e.jsxs("div",{children:[r.eyebrow&&e.jsx(c.RichText,{className:s.eyebrow,blocks:r.eyebrow}),e.jsx(c.RichText,{blocks:r.title})]}),e.jsxs("div",{className:s.text,children:[r.description&&e.jsx(c.RichText,{blocks:r.description}),o&&e.jsx(v.CallToActions,{items:o.items,alignment:o.alignment})]}),r.disclaimer&&e.jsx(c.RichText,{className:s.disclaimer,blocks:r.disclaimer})]}),t?e.jsx(P,{}):e.jsx(L,{})]})});case"default":return e.jsx("section",{className:`${s.hero} ${N}`,children:e.jsxs("article",{className:s.container,children:[t?e.jsx(P,{}):e.jsx(L,{}),e.jsxs("div",{className:s.text,children:[e.jsxs("div",{children:[r.eyebrow&&e.jsx(c.RichText,{className:s.eyebrow,blocks:r.eyebrow}),e.jsx(c.RichText,{blocks:r.title})]}),r.description&&e.jsx(c.RichText,{blocks:r.description}),o&&e.jsx(v.CallToActions,{items:o.items,alignment:o.alignment})]})]})});case"full-bleed":return e.jsx("section",{className:`${s.hero} ${N} heroFullBleed`,children:e.jsxs("article",{className:s.container,children:[t?t.includes("vimeo.com")||t.includes("youtube.com")||t.includes("youtu.be")?e.jsx("div",{className:s.videoBackground,children:e.jsx("iframe",{src:t.includes("vimeo.com")?`${t}?autoplay=1&muted=1&loop=1&background=1`:`${t}?autoplay=1&mute=1&loop=1&playlist=${C(t)}`,className:s.iframe,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(q,{}),e.jsx("video",{ref:_,className:s.videoBackground,src:t,autoPlay:!u,loop:!0,muted:!0,playsInline:!0,poster:p||void 0})]}):e.jsx(w,{src:p??"",alt:k,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:[r.eyebrow&&e.jsx(c.RichText,{className:s.eyebrow,blocks:r.eyebrow}),e.jsx(c.RichText,{blocks:r.title})]}),r.description&&e.jsx(c.RichText,{blocks:r.description}),o&&e.jsx(v.CallToActions,{items:o.items,alignment:o.alignment})]})})]})});case"blog":return e.jsx("section",{className:`${s.hero} ${N}`,children:e.jsxs("article",{className:s.container,children:[t?t.includes("vimeo.com")||t.includes("youtube.com")||t.includes("youtu.be")?e.jsx("div",{className:s.videoBackground,children:e.jsx("iframe",{src:t.includes("vimeo.com")?`${t}?autoplay=1&muted=1&loop=1&background=1`:`${t}?autoplay=1&mute=1&loop=1&playlist=${C(t)}`,className:s.iframe,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(q,{}),e.jsx("video",{ref:_,className:s.videoBackground,src:t,autoPlay:!u,loop:!0,muted:!0,playsInline:!0,poster:p||void 0})]}):e.jsx(w,{src:p??"",alt:k,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:[r.eyebrow&&e.jsx(c.RichText,{className:s.eyebrow,blocks:r.eyebrow}),n&&e.jsxs("div",{className:s.articleDetails,children:[h&&e.jsx(R.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(h._id)}`,className:s.articleType,children:h.title},h._id),e.jsxs("div",{className:s.articleCategories,children:[b&&e.jsx(R.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(b._id)}`,className:s.category,children:b.title},b._id),m&&m.title.toLowerCase()!=="library"&&!m.slug.current.includes("keywords")&&e.jsx(R.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(m._id)}`,className:s.category,children:m.title},m._id)]}),n.timeToRead&&e.jsx(e.Fragment,{children:e.jsxs("span",{children:[e.jsx("span",{className:s.number,children:n.timeToRead}),"min read"]})})]}),e.jsx(c.RichText,{blocks:r.title})]}),r.description&&e.jsx(c.RichText,{blocks:r.description}),o&&e.jsx(v.CallToActions,{items:o.items,alignment:o.alignment})]})})]})})}}exports.HeroBlock=be;
|
|
@@ -18,7 +18,7 @@ import '../../../assets/index67.css';/**
|
|
|
18
18
|
const ee = [
|
|
19
19
|
["rect", { x: "14", y: "4", width: "4", height: "16", rx: "1", key: "zuxfzm" }],
|
|
20
20
|
["rect", { x: "6", y: "4", width: "4", height: "16", rx: "1", key: "1okwgv" }]
|
|
21
|
-
], re = D("pause", ee), le = "_hero_dpqis_1", te = "_container_dpqis_7", se = "_heading_dpqis_15", oe = "_text_dpqis_22", ie = "_eyebrow_dpqis_37", ce = "_disclaimer_dpqis_41", ae = "_articleDetails_dpqis_53", ne = "_articleType_dpqis_66", de = "_articleCategories_dpqis_80", ue = "_category_dpqis_86", me = "_number_dpqis_102", pe = "_blog_dpqis_129", ye = "_overlay_dpqis_153", fe = "_fullBleed_dpqis_223", _e = "_split_dpqis_317", be = "_image_dpqis_322", he = "_videoControl_dpqis_345",
|
|
21
|
+
], re = D("pause", ee), le = "_hero_dpqis_1", te = "_container_dpqis_7", se = "_heading_dpqis_15", oe = "_text_dpqis_22", ie = "_eyebrow_dpqis_37", ce = "_disclaimer_dpqis_41", ae = "_articleDetails_dpqis_53", ne = "_articleType_dpqis_66", de = "_articleCategories_dpqis_80", ue = "_category_dpqis_86", me = "_number_dpqis_102", pe = "_blog_dpqis_129", ye = "_overlay_dpqis_153", fe = "_fullBleed_dpqis_223", _e = "_split_dpqis_317", be = "_image_dpqis_322", he = "_videoControl_dpqis_345", ge = "_videoWrapper_dpqis_366", we = "_videoBackground_dpqis_386", ke = "_iframe_dpqis_387", r = {
|
|
22
22
|
hero: le,
|
|
23
23
|
container: te,
|
|
24
24
|
heading: se,
|
|
@@ -37,9 +37,9 @@ const ee = [
|
|
|
37
37
|
split: _e,
|
|
38
38
|
image: be,
|
|
39
39
|
videoControl: he,
|
|
40
|
-
videoWrapper:
|
|
41
|
-
videoBackground:
|
|
42
|
-
iframe:
|
|
40
|
+
videoWrapper: ge,
|
|
41
|
+
videoBackground: we,
|
|
42
|
+
iframe: ke
|
|
43
43
|
};
|
|
44
44
|
function Fe({
|
|
45
45
|
heading: t,
|
|
@@ -50,7 +50,7 @@ function Fe({
|
|
|
50
50
|
styleOptions: u
|
|
51
51
|
}) {
|
|
52
52
|
var j, L, S, T, V, E, H, Y, M;
|
|
53
|
-
const m = Z(), [
|
|
53
|
+
const m = Z(), [P, U] = K(!m), { mode: h } = A(), { setIsFullbleedHeroAtTop: R } = X(), _ = Q(null), p = (u == null ? void 0 : u.layout) ?? "default", J = ((j = u == null ? void 0 : u.padding) == null ? void 0 : j.join(" ")) ?? "", C = {
|
|
54
54
|
default: r.default,
|
|
55
55
|
split: r.split,
|
|
56
56
|
"split-35-65": r.split,
|
|
@@ -61,7 +61,7 @@ function Fe({
|
|
|
61
61
|
var n, b;
|
|
62
62
|
return !((b = (n = s.slug) == null ? void 0 : n.current) != null && b.startsWith("library/type"));
|
|
63
63
|
}
|
|
64
|
-
)) ?? [],
|
|
64
|
+
)) ?? [], g = F[0] ?? null, y = F[1] ?? null, w = ((S = d == null ? void 0 : d.categories) == null ? void 0 : S.find(
|
|
65
65
|
(s) => {
|
|
66
66
|
var n, b;
|
|
67
67
|
return (b = (n = s.slug) == null ? void 0 : n.current) == null ? void 0 : b.startsWith("library/type");
|
|
@@ -77,20 +77,20 @@ function Fe({
|
|
|
77
77
|
const s = _.current;
|
|
78
78
|
s && (m ? s.pause() : s.play());
|
|
79
79
|
}, [m]);
|
|
80
|
-
let
|
|
81
|
-
i != null && i.imageUrls && (
|
|
82
|
-
let
|
|
80
|
+
let k, f;
|
|
81
|
+
i != null && i.imageUrls && (k = h === "dark" && ((T = i.imageUrls.dark) == null ? void 0 : T.medium) || i.imageUrls.default.medium, f = h === "dark" && ((V = i.imageUrls.dark) == null ? void 0 : V.large) || i.imageUrls.default.large);
|
|
82
|
+
let v = ((H = (E = i == null ? void 0 : i[h === "dark" ? "darkImage" : "defaultImage"]) == null ? void 0 : E.asset) == null ? void 0 : H.altText) || ((M = (Y = i == null ? void 0 : i[h === "dark" ? "darkImage" : "defaultImage"]) == null ? void 0 : Y.asset) == null ? void 0 : M.description) || "Card image";
|
|
83
83
|
const $ = () => /* @__PURE__ */ e(
|
|
84
84
|
"button",
|
|
85
85
|
{
|
|
86
|
-
title: `${
|
|
86
|
+
title: `${P ? "Pause the video" : "Play the video"}`,
|
|
87
87
|
className: r.videoControl,
|
|
88
88
|
onClick: () => {
|
|
89
89
|
const s = _.current;
|
|
90
90
|
s && (s.paused ? (s.play().catch(() => {
|
|
91
|
-
}),
|
|
91
|
+
}), U(!0)) : (s.pause(), U(!1)));
|
|
92
92
|
},
|
|
93
|
-
children:
|
|
93
|
+
children: P ? /* @__PURE__ */ e(re, { size: 18 }) : /* @__PURE__ */ e(O, { size: 18 })
|
|
94
94
|
}
|
|
95
95
|
), z = () => {
|
|
96
96
|
if (!l) return null;
|
|
@@ -125,13 +125,14 @@ function Fe({
|
|
|
125
125
|
const n = s.match(/(?:youtube\.com\/.*v=|youtu\.be\/)([^&?/]+)/);
|
|
126
126
|
return (n == null ? void 0 : n[1]) || "";
|
|
127
127
|
}
|
|
128
|
-
const W = () => i &&
|
|
128
|
+
const W = () => i && k ? /* @__PURE__ */ e("div", { className: r.image, children: p === "blog" || p === "full-bleed" ? /* @__PURE__ */ e(
|
|
129
129
|
x,
|
|
130
130
|
{
|
|
131
|
-
src:
|
|
132
|
-
alt:
|
|
131
|
+
src: k,
|
|
132
|
+
alt: v,
|
|
133
133
|
fill: !0,
|
|
134
134
|
priority: !0,
|
|
135
|
+
fetchPriority: "high",
|
|
135
136
|
style: { objectFit: "cover" },
|
|
136
137
|
draggable: !1,
|
|
137
138
|
sizes: "(max-width: 767px) 600px, 1200px"
|
|
@@ -139,11 +140,12 @@ function Fe({
|
|
|
139
140
|
) : /* @__PURE__ */ e(
|
|
140
141
|
x,
|
|
141
142
|
{
|
|
142
|
-
src:
|
|
143
|
-
alt:
|
|
143
|
+
src: k,
|
|
144
|
+
alt: v,
|
|
144
145
|
width: 650,
|
|
145
146
|
height: 750,
|
|
146
|
-
priority: !0
|
|
147
|
+
priority: !0,
|
|
148
|
+
fetchPriority: "high"
|
|
147
149
|
}
|
|
148
150
|
) }) : null;
|
|
149
151
|
switch (p) {
|
|
@@ -236,7 +238,7 @@ function Fe({
|
|
|
236
238
|
x,
|
|
237
239
|
{
|
|
238
240
|
src: f ?? "",
|
|
239
|
-
alt:
|
|
241
|
+
alt: v,
|
|
240
242
|
fill: !0,
|
|
241
243
|
priority: !0,
|
|
242
244
|
style: { objectFit: "cover" },
|
|
@@ -296,7 +298,7 @@ function Fe({
|
|
|
296
298
|
x,
|
|
297
299
|
{
|
|
298
300
|
src: f ?? "",
|
|
299
|
-
alt:
|
|
301
|
+
alt: v,
|
|
300
302
|
fill: !0,
|
|
301
303
|
priority: !0,
|
|
302
304
|
style: { objectFit: "cover" },
|
|
@@ -314,28 +316,28 @@ function Fe({
|
|
|
314
316
|
}
|
|
315
317
|
),
|
|
316
318
|
d && /* @__PURE__ */ o("div", { className: r.articleDetails, children: [
|
|
317
|
-
|
|
319
|
+
w && /* @__PURE__ */ e(
|
|
318
320
|
B,
|
|
319
321
|
{
|
|
320
322
|
href: `/blog/search?categories=${encodeURIComponent(
|
|
321
|
-
|
|
323
|
+
w._id
|
|
322
324
|
)}`,
|
|
323
325
|
className: r.articleType,
|
|
324
|
-
children:
|
|
326
|
+
children: w.title
|
|
325
327
|
},
|
|
326
|
-
|
|
328
|
+
w._id
|
|
327
329
|
),
|
|
328
330
|
/* @__PURE__ */ o("div", { className: r.articleCategories, children: [
|
|
329
|
-
|
|
331
|
+
g && /* @__PURE__ */ e(
|
|
330
332
|
B,
|
|
331
333
|
{
|
|
332
334
|
href: `/blog/search?categories=${encodeURIComponent(
|
|
333
|
-
|
|
335
|
+
g._id
|
|
334
336
|
)}`,
|
|
335
337
|
className: r.category,
|
|
336
|
-
children:
|
|
338
|
+
children: g.title
|
|
337
339
|
},
|
|
338
|
-
|
|
340
|
+
g._id
|
|
339
341
|
),
|
|
340
342
|
y && y.title.toLowerCase() !== "library" && !y.slug.current.includes(
|
|
341
343
|
"keywords"
|