quirk-ui 0.0.538 → 0.0.540
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.
- package/dist/next/blocks/ContentBlock/index.cjs +1 -1
- package/dist/next/blocks/ContentBlock/index.mjs +77 -80
- package/dist/next/blocks/HeroBlock/index.cjs +2 -2
- package/dist/next/blocks/HeroBlock/index.mjs +204 -204
- package/dist/next/blocks/StickyScrollBlock/index.cjs +1 -1
- package/dist/next/blocks/StickyScrollBlock/index.mjs +62 -58
- package/dist/next/blocks/TabsBlock/index.cjs +1 -1
- package/dist/next/blocks/TabsBlock/index.mjs +142 -144
- package/dist/next/cards/BioCard/index.cjs +1 -1
- package/dist/next/cards/BioCard/index.mjs +89 -84
- package/dist/next/cards/BlogArticleCard/index.cjs +2 -2
- package/dist/next/cards/BlogArticleCard/index.mjs +51 -46
- package/dist/next/cards/GridCard/index.cjs +1 -1
- package/dist/next/cards/GridCard/index.mjs +95 -89
- package/dist/next/cards/ProductCard/index.cjs +1 -1
- package/dist/next/cards/ProductCard/index.mjs +40 -36
- package/dist/next/cards/ReviewCard/index.cjs +1 -1
- package/dist/next/cards/ReviewCard/index.mjs +79 -73
- package/dist/next/cards/SegmentCard/index.cjs +1 -1
- package/dist/next/cards/SegmentCard/index.mjs +85 -80
- package/dist/next/cards/SpotlightCard/index.cjs +1 -1
- package/dist/next/cards/SpotlightCard/index.mjs +39 -34
- package/dist/next/cards/TestimonialCard/index.cjs +1 -1
- package/dist/next/cards/TestimonialCard/index.mjs +108 -103
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index13.css');const s=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index13.css');const s=require("react/jsx-runtime"),n=require("../../ui/PortableTextRenderer/index.cjs"),C=require("../../ui/CallToActions/index.cjs"),H=require("next/image"),$=require("../../hooks/useStyleClasses.cjs"),B=require("../../contexts/ThemeContext.cjs"),T="_content_ivubr_1",w="_container_ivubr_7",R="_metrics_ivubr_34",z="_metric_ivubr_34",q="_metricValue_ivubr_50",L="_disclaimer_ivubr_71",S="_layoutHImageRight_ivubr_76",U="_heading_ivubr_80",D="_image_ivubr_85",P="_noImage_ivubr_95",F="_layoutHImageLeft_ivubr_99",M="_layoutVImageTop_ivubr_118",Y="_layoutVImageBottom_ivubr_131",E="_title_ivubr_151",G="_text_ivubr_156",J="_cta_ivubr_170",K="_headingHorizontal_ivubr_178",Q="_titleWrapper_ivubr_187",X="_headingVertical_ivubr_208",Z="_videoWrapper_ivubr_229",A="_maxWidth_ivubr_257",O="_fullBleed_ivubr_267",t={content:T,container:w,metrics:R,metric:z,metricValue:q,disclaimer:L,layoutHImageRight:S,heading:U,image:D,noImage:P,layoutHImageLeft:F,layoutVImageTop:M,layoutVImageBottom:Y,title:E,text:G,cta:J,headingHorizontal:K,titleWrapper:Q,headingVertical:X,videoWrapper:Z,default:"_default_ivubr_249",maxWidth:A,fullBleed:O};function ee({layout:r,heading:i,image:e,video:a,metrics:_,callToAction:l,disclaimer:m,styleOptions:c}){var h,v,b,p,f;const{mode:d}=B.useTheme(),I=$.useStyleClasses(c),x={"--container-max-width":(c==null?void 0:c.maxWidth)??"unset","--gap":r==null?void 0:r.gap},j={"--max-width":(e==null?void 0:e.display)==="max-width"?e==null?void 0:e.maxWidth:"unset"},V={"no-image":t.noImage,"horizontal-image-right":t.layoutHImageRight,"horizontal-image-left":t.layoutHImageLeft,"vertical-image-top":t.layoutVImageTop,"vertical-image-bottom":t.layoutVImageBottom}[(r==null?void 0:r.orientation)??"horizontal-image-right"],W={horizontal:t.headingHorizontal,vertical:t.headingVertical}[i.headingLayout??"horizontal"],g={default:t.default,"max-width":t.maxWidth,"full-bleed":t.fullBleed}[(e==null?void 0:e.display)??"default"];let u;e!=null&&e.imageUrls&&(u=d==="dark"&&((h=e.imageUrls.dark)==null?void 0:h.medium)||e.imageUrls.default.medium);let k=((b=(v=e==null?void 0:e[d==="dark"?"darkImage":"defaultImage"])==null?void 0:v.asset)==null?void 0:b.altText)||((f=(p=e==null?void 0:e[d==="dark"?"darkImage":"defaultImage"])==null?void 0:p.asset)==null?void 0:f.description)||"Card image";const y=()=>{if(!a)return null;const o=a.includes("vimeo.com"),N=a.includes("youtube.com")||a.includes("youtu.be");return o||N?s.jsx("div",{style:{maxWidth:(e==null?void 0:e.maxWidth)??"unset",flex:.65},children:s.jsx("div",{className:t.videoWrapper,children:s.jsx("iframe",{src:o?`${a}?autoplay=0&muted=0&loop=0`:`${a}?autoplay=0&mute=0&loop=0}`,allow:"autoplay; fullscreen",allowFullScreen:!0})})}):s.jsx("div",{style:{maxWidth:(e==null?void 0:e.maxWidth)??"unset",width:"100%",flex:.65},children:s.jsx("div",{className:t.videoWrapper,children:s.jsx("video",{src:a,controls:!0,poster:u||void 0})})})};return s.jsx("section",{className:`${I} ${t.content}`,children:s.jsxs("article",{className:`${t.container} ${V}`,style:x||{},children:[s.jsxs("div",{className:`${t.heading} ${W}`,children:[s.jsxs("div",{className:t.titleWrapper,children:[i.eyebrow&&s.jsx(n.RichText,{blocks:i.eyebrow}),i.title&&s.jsx(n.RichText,{className:t.title,blocks:i.title})]}),((i==null?void 0:i.description)||(l==null?void 0:l.items))&&s.jsxs("div",{className:t.text,children:[i.description&&s.jsx(n.RichText,{blocks:i.description}),_&&s.jsx("div",{className:t.metrics,children:_.map(o=>s.jsxs("div",{className:t.metric,children:[s.jsx("div",{className:t.metricValue,children:o.metricValue}),o.metricDescription&&s.jsx(n.RichText,{blocks:o.metricDescription})]},o._key))}),l&&s.jsx(C.CallToActions,{className:t.cta,items:l.items,alignment:l.alignment}),m&&s.jsx(n.RichText,{className:t.disclaimer,blocks:m})]})]}),(r==null?void 0:r.orientation)!=="no-image"&&a?y():(r==null?void 0:r.orientation)!=="no-image"&&e&&u&&s.jsx("div",{className:`${t.image} ${g}`,style:j,children:s.jsx(H,{src:u,alt:k,width:600,height:400,priority:!0})})]})})}exports.ContentBlock=ee;
|
|
@@ -1,70 +1,74 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { RichText as
|
|
3
|
-
import { CallToActions as
|
|
4
|
-
import
|
|
5
|
-
import { useStyleClasses as
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import { jsx as r, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { RichText as n } from "../../ui/PortableTextRenderer/index.mjs";
|
|
3
|
+
import { CallToActions as B } from "../../ui/CallToActions/index.mjs";
|
|
4
|
+
import $ from "next/image";
|
|
5
|
+
import { useStyleClasses as z } from "../../hooks/useStyleClasses.mjs";
|
|
6
|
+
import { useTheme as C } from "../../contexts/ThemeContext.mjs";
|
|
7
|
+
import '../../../assets/index13.css';const L = "_content_ivubr_1", R = "_container_ivubr_7", U = "_metrics_ivubr_34", D = "_metric_ivubr_34", T = "_metricValue_ivubr_50", j = "_disclaimer_ivubr_71", S = "_layoutHImageRight_ivubr_76", F = "_heading_ivubr_80", Y = "_image_ivubr_85", q = "_noImage_ivubr_95", E = "_layoutHImageLeft_ivubr_99", G = "_layoutVImageTop_ivubr_118", J = "_layoutVImageBottom_ivubr_131", K = "_title_ivubr_151", M = "_text_ivubr_156", P = "_cta_ivubr_170", Q = "_headingHorizontal_ivubr_178", X = "_titleWrapper_ivubr_187", Z = "_headingVertical_ivubr_208", A = "_videoWrapper_ivubr_229", O = "_maxWidth_ivubr_257", tt = "_fullBleed_ivubr_267", e = {
|
|
8
|
+
content: L,
|
|
9
|
+
container: R,
|
|
10
|
+
metrics: U,
|
|
11
|
+
metric: D,
|
|
12
|
+
metricValue: T,
|
|
13
|
+
disclaimer: j,
|
|
14
|
+
layoutHImageRight: S,
|
|
15
|
+
heading: F,
|
|
16
|
+
image: Y,
|
|
17
|
+
noImage: q,
|
|
18
|
+
layoutHImageLeft: E,
|
|
19
|
+
layoutVImageTop: G,
|
|
20
|
+
layoutVImageBottom: J,
|
|
21
|
+
title: K,
|
|
22
|
+
text: M,
|
|
23
|
+
cta: P,
|
|
24
|
+
headingHorizontal: Q,
|
|
25
|
+
titleWrapper: X,
|
|
26
|
+
headingVertical: Z,
|
|
27
|
+
videoWrapper: A,
|
|
27
28
|
default: "_default_ivubr_249",
|
|
28
|
-
maxWidth:
|
|
29
|
-
fullBleed:
|
|
29
|
+
maxWidth: O,
|
|
30
|
+
fullBleed: tt
|
|
30
31
|
};
|
|
31
|
-
function
|
|
32
|
+
function lt({
|
|
32
33
|
layout: i,
|
|
33
|
-
heading:
|
|
34
|
+
heading: a,
|
|
34
35
|
image: t,
|
|
35
|
-
video:
|
|
36
|
+
video: o,
|
|
36
37
|
metrics: _,
|
|
37
|
-
callToAction:
|
|
38
|
-
disclaimer:
|
|
39
|
-
styleOptions:
|
|
38
|
+
callToAction: l,
|
|
39
|
+
disclaimer: h,
|
|
40
|
+
styleOptions: m
|
|
40
41
|
}) {
|
|
41
|
-
var
|
|
42
|
-
const
|
|
43
|
-
"--container-max-width": (
|
|
42
|
+
var v, b, f, x, I;
|
|
43
|
+
const { mode: u } = C(), V = z(m), p = {
|
|
44
|
+
"--container-max-width": (m == null ? void 0 : m.maxWidth) ?? "unset",
|
|
44
45
|
"--gap": i == null ? void 0 : i.gap
|
|
45
|
-
},
|
|
46
|
+
}, W = {
|
|
46
47
|
"--max-width": (t == null ? void 0 : t.display) === "max-width" ? t == null ? void 0 : t.maxWidth : "unset"
|
|
47
|
-
},
|
|
48
|
+
}, g = {
|
|
48
49
|
"no-image": e.noImage,
|
|
49
50
|
"horizontal-image-right": e.layoutHImageRight,
|
|
50
51
|
"horizontal-image-left": e.layoutHImageLeft,
|
|
51
52
|
"vertical-image-top": e.layoutVImageTop,
|
|
52
53
|
"vertical-image-bottom": e.layoutVImageBottom
|
|
53
|
-
}[(i == null ? void 0 : i.orientation) ?? "horizontal-image-right"],
|
|
54
|
+
}[(i == null ? void 0 : i.orientation) ?? "horizontal-image-right"], N = {
|
|
54
55
|
horizontal: e.headingHorizontal,
|
|
55
56
|
vertical: e.headingVertical
|
|
56
|
-
}[
|
|
57
|
+
}[a.headingLayout ?? "horizontal"], k = {
|
|
57
58
|
default: e.default,
|
|
58
59
|
"max-width": e.maxWidth,
|
|
59
60
|
"full-bleed": e.fullBleed
|
|
60
|
-
}[(t == null ? void 0 : t.display) ?? "default"]
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
}[(t == null ? void 0 : t.display) ?? "default"];
|
|
62
|
+
let d;
|
|
63
|
+
t != null && t.imageUrls && (d = u === "dark" && ((v = t.imageUrls.dark) == null ? void 0 : v.medium) || t.imageUrls.default.medium);
|
|
64
|
+
let y = ((f = (b = t == null ? void 0 : t[u === "dark" ? "darkImage" : "defaultImage"]) == null ? void 0 : b.asset) == null ? void 0 : f.altText) || ((I = (x = t == null ? void 0 : t[u === "dark" ? "darkImage" : "defaultImage"]) == null ? void 0 : x.asset) == null ? void 0 : I.description) || "Card image";
|
|
65
|
+
const H = () => {
|
|
66
|
+
if (!o) return null;
|
|
67
|
+
const s = o.includes("vimeo.com"), w = o.includes("youtube.com") || o.includes("youtu.be");
|
|
68
|
+
return s || w ? /* @__PURE__ */ r("div", { style: { maxWidth: (t == null ? void 0 : t.maxWidth) ?? "unset", flex: 0.65 }, children: /* @__PURE__ */ r("div", { className: e.videoWrapper, children: /* @__PURE__ */ r(
|
|
65
69
|
"iframe",
|
|
66
70
|
{
|
|
67
|
-
src:
|
|
71
|
+
src: s ? `${o}?autoplay=0&muted=0&loop=0` : `${o}?autoplay=0&mute=0&loop=0}`,
|
|
68
72
|
allow: "autoplay; fullscreen",
|
|
69
73
|
allowFullScreen: !0
|
|
70
74
|
}
|
|
@@ -76,55 +80,48 @@ function A({
|
|
|
76
80
|
width: "100%",
|
|
77
81
|
flex: 0.65
|
|
78
82
|
},
|
|
79
|
-
children: /* @__PURE__ */ r("div", { className: e.videoWrapper, children: /* @__PURE__ */ r(
|
|
80
|
-
"video",
|
|
81
|
-
{
|
|
82
|
-
src: s,
|
|
83
|
-
controls: !0,
|
|
84
|
-
poster: ((p = t == null ? void 0 : t.imageUrls) == null ? void 0 : p.medium) || void 0
|
|
85
|
-
}
|
|
86
|
-
) })
|
|
83
|
+
children: /* @__PURE__ */ r("div", { className: e.videoWrapper, children: /* @__PURE__ */ r("video", { src: o, controls: !0, poster: d || void 0 }) })
|
|
87
84
|
}
|
|
88
85
|
);
|
|
89
86
|
};
|
|
90
|
-
return /* @__PURE__ */ r("section", { className: `${
|
|
87
|
+
return /* @__PURE__ */ r("section", { className: `${V} ${e.content}`, children: /* @__PURE__ */ c(
|
|
91
88
|
"article",
|
|
92
89
|
{
|
|
93
|
-
className: `${e.container} ${
|
|
94
|
-
style:
|
|
90
|
+
className: `${e.container} ${g}`,
|
|
91
|
+
style: p || {},
|
|
95
92
|
children: [
|
|
96
|
-
/* @__PURE__ */
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
/* @__PURE__ */ c("div", { className: `${e.heading} ${N}`, children: [
|
|
94
|
+
/* @__PURE__ */ c("div", { className: e.titleWrapper, children: [
|
|
95
|
+
a.eyebrow && /* @__PURE__ */ r(n, { blocks: a.eyebrow }),
|
|
96
|
+
a.title && /* @__PURE__ */ r(n, { className: e.title, blocks: a.title })
|
|
100
97
|
] }),
|
|
101
|
-
((
|
|
102
|
-
|
|
103
|
-
_ && /* @__PURE__ */ r("div", { className: e.metrics, children: _.map((
|
|
104
|
-
/* @__PURE__ */ r("div", { className: e.metricValue, children:
|
|
105
|
-
|
|
106
|
-
] },
|
|
107
|
-
|
|
108
|
-
|
|
98
|
+
((a == null ? void 0 : a.description) || (l == null ? void 0 : l.items)) && /* @__PURE__ */ c("div", { className: e.text, children: [
|
|
99
|
+
a.description && /* @__PURE__ */ r(n, { blocks: a.description }),
|
|
100
|
+
_ && /* @__PURE__ */ r("div", { className: e.metrics, children: _.map((s) => /* @__PURE__ */ c("div", { className: e.metric, children: [
|
|
101
|
+
/* @__PURE__ */ r("div", { className: e.metricValue, children: s.metricValue }),
|
|
102
|
+
s.metricDescription && /* @__PURE__ */ r(n, { blocks: s.metricDescription })
|
|
103
|
+
] }, s._key)) }),
|
|
104
|
+
l && /* @__PURE__ */ r(
|
|
105
|
+
B,
|
|
109
106
|
{
|
|
110
107
|
className: e.cta,
|
|
111
|
-
items:
|
|
112
|
-
alignment:
|
|
108
|
+
items: l.items,
|
|
109
|
+
alignment: l.alignment
|
|
113
110
|
}
|
|
114
111
|
),
|
|
115
|
-
|
|
112
|
+
h && /* @__PURE__ */ r(n, { className: e.disclaimer, blocks: h })
|
|
116
113
|
] })
|
|
117
114
|
] }),
|
|
118
|
-
(i == null ? void 0 : i.orientation) !== "no-image" &&
|
|
115
|
+
(i == null ? void 0 : i.orientation) !== "no-image" && o ? H() : (i == null ? void 0 : i.orientation) !== "no-image" && t && d && /* @__PURE__ */ r(
|
|
119
116
|
"div",
|
|
120
117
|
{
|
|
121
|
-
className: `${e.image} ${
|
|
122
|
-
style:
|
|
118
|
+
className: `${e.image} ${k}`,
|
|
119
|
+
style: W,
|
|
123
120
|
children: /* @__PURE__ */ r(
|
|
124
|
-
|
|
121
|
+
$,
|
|
125
122
|
{
|
|
126
|
-
src:
|
|
127
|
-
alt:
|
|
123
|
+
src: d,
|
|
124
|
+
alt: y,
|
|
128
125
|
width: 600,
|
|
129
126
|
height: 400,
|
|
130
127
|
priority: !0
|
|
@@ -137,5 +134,5 @@ function A({
|
|
|
137
134
|
) });
|
|
138
135
|
}
|
|
139
136
|
export {
|
|
140
|
-
|
|
137
|
+
lt as ContentBlock
|
|
141
138
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index67.css');const e=require("react/jsx-runtime"),
|
|
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"),o=require("../../ui/PortableTextRenderer/index.cjs"),k=require("../../ui/CallToActions/index.cjs"),v=require("next/image"),$=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
|
|
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_fhigw_1",O="_container_fhigw_7",ee="_eyebrow_fhigw_24",se="_disclaimer_fhigw_28",te="_text_fhigw_33",re="_articleDetails_fhigw_40",le="_articleType_fhigw_53",ce="_articleCategories_fhigw_67",oe="_category_fhigw_73",ie="_number_fhigw_89",ae="_blog_fhigw_116",ne="_overlay_fhigw_140",ue="_fullBleed_fhigw_210",de="_split_fhigw_304",xe="_image_fhigw_309",me="_videoControl_fhigw_332",fe="_videoWrapper_fhigw_353",_e="_videoBackground_fhigw_373",ye="_iframe_fhigw_374",s={hero:D,container:O,eyebrow:ee,disclaimer:se,text:te,articleDetails:re,articleType:le,articleCategories:ce,category:oe,number:ie,default:"_default_fhigw_112",blog:ae,overlay:ne,fullBleed:ue,split:de,image:xe,videoControl:me,videoWrapper:fe,videoBackground:_e,iframe:ye};function he({heading:r,image:c,video:t,callToAction:i,pageData:n,styleOptions:u}){var U,F,z,S,W,H,E,M,V;const d=J.usePrefersReducedMotion(),[T,I]=g.useState(!d),{mode:h}=K.useTheme(),{setIsFullbleedHeroAtTop:B}=G.useHeroContext(),_=g.useRef(null),x=(u==null?void 0:u.layout)??"default",Y=((U=u==null?void 0:u.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],L=((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"))}))??[],j=L[0]??null,m=L[1]??null,b=((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=()=>{B(window.scrollY===0)};if(x==="full-bleed"&&typeof window<"u")return B(!0),window.addEventListener("scroll",l),()=>window.removeEventListener("scroll",l)},[x]),g.useEffect(()=>{const l=_.current;l&&(d?l.pause():l.play())},[d]);let p,f;c!=null&&c.imageUrls&&(p=h==="dark"&&((S=c.imageUrls.dark)==null?void 0:S.medium)||c.imageUrls.default.medium,f=h==="dark"&&((W=c.imageUrls.dark)==null?void 0:W.large)||c.imageUrls.default.large);let w=((E=(H=c==null?void 0:c[h==="dark"?"darkImage":"defaultImage"])==null?void 0:H.asset)==null?void 0:E.altText)||((V=(M=c==null?void 0:c[h==="dark"?"darkImage":"defaultImage"])==null?void 0:M.asset)==null?void 0:V.description)||"Card image";const C=()=>e.jsx("button",{title:`${T?"Pause the video":"Play the video"}`,className:s.videoControl,onClick:()=>{const l=_.current;l&&(l.paused?(l.play().catch(()=>{}),I(!0)):(l.pause(),I(!1)))},children:T?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=${R(t)}`,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs("div",{className:s.videoWrapper,children:[e.jsx(C,{}),e.jsx("video",{ref:_,src:t,autoPlay:!d,loop:!0,muted:!0,playsInline:!0,poster:f||void 0,preload:"metadata"})]})};function R(l){const a=l.match(/(?:youtube\.com\/.*v=|youtu\.be\/)([^&?/]+)/);return(a==null?void 0:a[1])||""}const q=()=>c&&p?e.jsx("div",{className:s.image,children:x==="blog"||x==="full-bleed"?e.jsx(v,{src:p,alt:w,fill:!0,priority:!0,style:{objectFit:"cover"},draggable:!1,sizes:"(max-width: 767px) 600px, 1200px"}):e.jsx(v,{src:p,alt:w,width:650,height:750,priority:!0})}):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.text,children:[e.jsxs("div",{children:[r.eyebrow&&e.jsx(o.RichText,{className:s.eyebrow,blocks:r.eyebrow}),e.jsx(o.RichText,{blocks:r.title})]}),r.description&&e.jsx(o.RichText,{blocks:r.description}),i&&e.jsx(k.CallToActions,{items:i.items,alignment:i.alignment}),r.disclaimer&&e.jsx(o.RichText,{className:s.disclaimer,blocks:r.disclaimer})]}),t?e.jsx(P,{}):e.jsx(q,{})]})});case"default":return e.jsx("section",{className:`${s.hero} ${N}`,children:e.jsxs("article",{className:s.container,children:[t?e.jsx(P,{}):e.jsx(q,{}),e.jsxs("div",{className:s.text,children:[e.jsxs("div",{children:[r.eyebrow&&e.jsx(o.RichText,{className:s.eyebrow,blocks:r.eyebrow}),e.jsx(o.RichText,{blocks:r.title})]}),r.description&&e.jsx(o.RichText,{blocks:r.description}),i&&e.jsx(k.CallToActions,{items:i.items,alignment:i.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=${R(t)}`,className:s.iframe,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(C,{}),e.jsx("video",{ref:_,className:s.videoBackground,src:t,autoPlay:!d,loop:!0,muted:!0,playsInline:!0,poster:f||void 0})]}):e.jsx(v,{src:f??"",alt:w,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(o.RichText,{className:s.eyebrow,blocks:r.eyebrow}),e.jsx(o.RichText,{blocks:r.title})]}),r.description&&e.jsx(o.RichText,{blocks:r.description}),i&&e.jsx(k.CallToActions,{items:i.items,alignment:i.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=${R(t)}`,className:s.iframe,allow:"autoplay; fullscreen",allowFullScreen:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(C,{}),e.jsx("video",{ref:_,className:s.videoBackground,src:t,autoPlay:!d,loop:!0,muted:!0,playsInline:!0,poster:f||void 0})]}):e.jsx(v,{src:f??"",alt:w,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(o.RichText,{className:s.eyebrow,blocks:r.eyebrow}),n&&e.jsxs("div",{className:s.articleDetails,children:[b&&e.jsx($.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(b._id)}`,className:s.articleType,children:b.title},b._id),e.jsxs("div",{className:s.articleCategories,children:[j&&e.jsx($.LocaleLink,{href:`/blog/search?categories=${encodeURIComponent(j._id)}`,className:s.category,children:j.title},j._id),m&&m.title.toLowerCase()!=="library"&&!m.slug.current.includes("keywords")&&e.jsx($.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(o.RichText,{blocks:r.title})]}),r.description&&e.jsx(o.RichText,{blocks:r.description}),i&&e.jsx(k.CallToActions,{items:i.items,alignment:i.alignment})]})})]})})}}exports.HeroBlock=he;
|