quirk-ui 0.1.162 → 0.1.163
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/HeroSubComponents-37eyejUn.js +203 -0
- package/dist/HeroSubComponents-CnNiv-zR.cjs +6 -0
- package/dist/HeroSubComponents.css +1 -1
- package/dist/main.d.ts +1 -1
- package/dist/next/blocks/HeroBlock/HeroSubComponents.cjs +1 -1
- package/dist/next/blocks/HeroBlock/HeroSubComponents.mjs +1 -1
- package/dist/next/blocks/HeroBlock/HeroSubComponents.test.cjs +1 -1
- package/dist/next/blocks/HeroBlock/HeroSubComponents.test.mjs +1 -1
- package/dist/next/blocks/HeroBlock/index.cjs +1 -1
- package/dist/next/blocks/HeroBlock/index.mjs +176 -166
- package/dist/next.d.ts +1 -1
- package/package.json +1 -1
- package/dist/HeroSubComponents-DU_zRp5K.cjs +0 -6
- package/dist/HeroSubComponents-tXOYToa8.js +0 -203
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { jsx as o, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { memo as u, forwardRef as v, useRef as y, useImperativeHandle as b, useEffect as g } from "react";
|
|
3
|
+
import { buildEmbedSrc as q, resolveImageUrl as x, resolveAltText as w } from "./next/utils/mediaUtils.mjs";
|
|
4
|
+
import { c as N } from "./createLucideIcon-C8GTh_Qx.js";
|
|
5
|
+
import { P as C } from "./play-DYgKiSaf.js";
|
|
6
|
+
import './HeroSubComponents.css';/**
|
|
7
|
+
* @license lucide-react v0.488.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
const k = [
|
|
13
|
+
["rect", { x: "14", y: "4", width: "4", height: "16", rx: "1", key: "zuxfzm" }],
|
|
14
|
+
["rect", { x: "6", y: "4", width: "4", height: "16", rx: "1", key: "1okwgv" }]
|
|
15
|
+
], B = N("pause", k), V = "_hero_qoehl_1", I = "_container_qoehl_7", E = "_heading_qoehl_15", z = "_text_qoehl_22", T = "_eyebrow_qoehl_37", j = "_disclaimer_qoehl_41", H = "_articleDetails_qoehl_52", P = "_articleType_qoehl_65", D = "_articleCategories_qoehl_79", F = "_category_qoehl_85", R = "_number_qoehl_101", A = "_blog_qoehl_128", S = "_overlay_qoehl_154", L = "_tile_qoehl_224", U = "_fullBleed_qoehl_333", Y = "_media_qoehl_360", G = "_splitAlt_qoehl_448", J = "_split_qoehl_448", K = "_videoControl_qoehl_522", M = "_videoBackground_qoehl_570", O = "_iframe_qoehl_571", c = {
|
|
16
|
+
hero: V,
|
|
17
|
+
container: I,
|
|
18
|
+
heading: E,
|
|
19
|
+
text: z,
|
|
20
|
+
eyebrow: T,
|
|
21
|
+
disclaimer: j,
|
|
22
|
+
articleDetails: H,
|
|
23
|
+
articleType: P,
|
|
24
|
+
articleCategories: D,
|
|
25
|
+
category: F,
|
|
26
|
+
number: R,
|
|
27
|
+
default: "_default_qoehl_124",
|
|
28
|
+
blog: A,
|
|
29
|
+
overlay: S,
|
|
30
|
+
tile: L,
|
|
31
|
+
fullBleed: U,
|
|
32
|
+
media: Y,
|
|
33
|
+
splitAlt: G,
|
|
34
|
+
split: J,
|
|
35
|
+
videoControl: K,
|
|
36
|
+
videoBackground: M,
|
|
37
|
+
iframe: O
|
|
38
|
+
}, Q = u(function({
|
|
39
|
+
isPlaying: e,
|
|
40
|
+
onToggle: i
|
|
41
|
+
}) {
|
|
42
|
+
return /* @__PURE__ */ o(
|
|
43
|
+
"button",
|
|
44
|
+
{
|
|
45
|
+
type: "button",
|
|
46
|
+
title: e ? "Pause the video" : "Play the video",
|
|
47
|
+
"aria-label": e ? "Pause video" : "Play video",
|
|
48
|
+
className: c.videoControl,
|
|
49
|
+
onClick: i,
|
|
50
|
+
children: e ? /* @__PURE__ */ o(B, { size: 18, "aria-hidden": !0 }) : /* @__PURE__ */ o(C, { size: 18, "aria-hidden": !0 })
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}), m = u(function({
|
|
54
|
+
url: e,
|
|
55
|
+
provider: i,
|
|
56
|
+
wrapperClassName: a,
|
|
57
|
+
iframeClassName: l
|
|
58
|
+
}) {
|
|
59
|
+
const r = q(e, i);
|
|
60
|
+
return /* @__PURE__ */ o("div", { className: a, children: /* @__PURE__ */ o(
|
|
61
|
+
"iframe",
|
|
62
|
+
{
|
|
63
|
+
src: r,
|
|
64
|
+
className: l,
|
|
65
|
+
allow: "autoplay; fullscreen",
|
|
66
|
+
allowFullScreen: !0,
|
|
67
|
+
title: "Embedded video",
|
|
68
|
+
"aria-label": "Background video"
|
|
69
|
+
}
|
|
70
|
+
) });
|
|
71
|
+
}), f = u(
|
|
72
|
+
v(function({
|
|
73
|
+
src: e,
|
|
74
|
+
autoPlay: i,
|
|
75
|
+
posterUrl: a,
|
|
76
|
+
wrapperClassName: l,
|
|
77
|
+
videoClassName: r,
|
|
78
|
+
isPlaying: s,
|
|
79
|
+
onToggle: d
|
|
80
|
+
}, h) {
|
|
81
|
+
const n = y(null);
|
|
82
|
+
return b(h, () => ({
|
|
83
|
+
play() {
|
|
84
|
+
var t;
|
|
85
|
+
(t = n.current) == null || t.play().catch(() => {
|
|
86
|
+
});
|
|
87
|
+
},
|
|
88
|
+
pause() {
|
|
89
|
+
var t;
|
|
90
|
+
(t = n.current) == null || t.pause();
|
|
91
|
+
}
|
|
92
|
+
})), g(() => {
|
|
93
|
+
const t = n.current;
|
|
94
|
+
t && (s ? t.play().catch(() => {
|
|
95
|
+
}) : t.pause());
|
|
96
|
+
}, [s]), /* @__PURE__ */ p("div", { className: l, children: [
|
|
97
|
+
/* @__PURE__ */ o(Q, { isPlaying: s, onToggle: d }),
|
|
98
|
+
/* @__PURE__ */ o(
|
|
99
|
+
"video",
|
|
100
|
+
{
|
|
101
|
+
ref: n,
|
|
102
|
+
src: e,
|
|
103
|
+
autoPlay: i,
|
|
104
|
+
loop: !0,
|
|
105
|
+
muted: !0,
|
|
106
|
+
playsInline: !0,
|
|
107
|
+
poster: a,
|
|
108
|
+
preload: "metadata",
|
|
109
|
+
className: r,
|
|
110
|
+
"aria-label": "Background video"
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
] });
|
|
114
|
+
})
|
|
115
|
+
), oe = u(function({
|
|
116
|
+
url: e,
|
|
117
|
+
autoPlay: i,
|
|
118
|
+
posterUrl: a,
|
|
119
|
+
isPlaying: l,
|
|
120
|
+
onToggle: r,
|
|
121
|
+
variant: s
|
|
122
|
+
}) {
|
|
123
|
+
const d = e.includes("vimeo.com"), h = e.includes("youtube.com") || e.includes("youtu.be"), n = d || h, t = d ? "vimeo" : "youtube";
|
|
124
|
+
return s === "inline" ? n ? /* @__PURE__ */ o(
|
|
125
|
+
m,
|
|
126
|
+
{
|
|
127
|
+
url: e,
|
|
128
|
+
provider: t,
|
|
129
|
+
wrapperClassName: c.media
|
|
130
|
+
}
|
|
131
|
+
) : /* @__PURE__ */ o(
|
|
132
|
+
f,
|
|
133
|
+
{
|
|
134
|
+
src: e,
|
|
135
|
+
autoPlay: i,
|
|
136
|
+
posterUrl: a,
|
|
137
|
+
wrapperClassName: c.media,
|
|
138
|
+
isPlaying: l,
|
|
139
|
+
onToggle: r
|
|
140
|
+
}
|
|
141
|
+
) : n ? /* @__PURE__ */ o(
|
|
142
|
+
m,
|
|
143
|
+
{
|
|
144
|
+
url: e,
|
|
145
|
+
provider: t,
|
|
146
|
+
wrapperClassName: c.videoBackground,
|
|
147
|
+
iframeClassName: c.iframe
|
|
148
|
+
}
|
|
149
|
+
) : /* @__PURE__ */ o(
|
|
150
|
+
f,
|
|
151
|
+
{
|
|
152
|
+
src: e,
|
|
153
|
+
autoPlay: i,
|
|
154
|
+
posterUrl: a,
|
|
155
|
+
videoClassName: c.videoBackground,
|
|
156
|
+
isPlaying: l,
|
|
157
|
+
onToggle: r
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
}), te = u(function({
|
|
161
|
+
image: e,
|
|
162
|
+
mode: i,
|
|
163
|
+
variant: a,
|
|
164
|
+
imageAdapter: l
|
|
165
|
+
}) {
|
|
166
|
+
const r = x(e, i, "medium");
|
|
167
|
+
if (!r) return null;
|
|
168
|
+
const s = w(e, i), d = /* @__PURE__ */ o(
|
|
169
|
+
"img",
|
|
170
|
+
{
|
|
171
|
+
fetchPriority: "high",
|
|
172
|
+
src: r,
|
|
173
|
+
alt: s,
|
|
174
|
+
draggable: !1,
|
|
175
|
+
style: a === "fill" ? { objectFit: "cover", width: "100%", height: "100%" } : { width: "100%", height: "100%" }
|
|
176
|
+
}
|
|
177
|
+
);
|
|
178
|
+
return l ? /* @__PURE__ */ o("div", { className: c.media, children: a === "fill" ? l.render({
|
|
179
|
+
src: r,
|
|
180
|
+
alt: s,
|
|
181
|
+
fill: !0,
|
|
182
|
+
priority: !0,
|
|
183
|
+
fetchPriority: "high",
|
|
184
|
+
style: { objectFit: "cover" },
|
|
185
|
+
draggable: !1,
|
|
186
|
+
sizes: "(max-width: 767px) 600px, 1200px"
|
|
187
|
+
}) : l.render({
|
|
188
|
+
src: r,
|
|
189
|
+
alt: s,
|
|
190
|
+
width: 650,
|
|
191
|
+
height: 750,
|
|
192
|
+
priority: !0,
|
|
193
|
+
fetchPriority: "high"
|
|
194
|
+
}) }) : /* @__PURE__ */ o("div", { className: c.media, children: d });
|
|
195
|
+
});
|
|
196
|
+
export {
|
|
197
|
+
te as H,
|
|
198
|
+
f as N,
|
|
199
|
+
oe as V,
|
|
200
|
+
Q as a,
|
|
201
|
+
m as b,
|
|
202
|
+
c as s
|
|
203
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";require('./HeroSubComponents.css');const o=require("react/jsx-runtime"),a=require("react"),m=require("./next/utils/mediaUtils.cjs"),y=require("./createLucideIcon-DpotSgUx.cjs"),x=require("./play-CQBnZgNa.cjs");/**
|
|
2
|
+
* @license lucide-react v0.488.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const b=[["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"}]],g=y.createLucideIcon("pause",b),q="_hero_qoehl_1",j="_container_qoehl_7",w="_heading_qoehl_15",C="_text_qoehl_22",N="_eyebrow_qoehl_37",k="_disclaimer_qoehl_41",B="_articleDetails_qoehl_52",V="_articleType_qoehl_65",I="_articleCategories_qoehl_79",E="_category_qoehl_85",z="_number_qoehl_101",T="_blog_qoehl_128",H="_overlay_qoehl_154",R="_tile_qoehl_224",D="_fullBleed_qoehl_333",F="_media_qoehl_360",P="_splitAlt_qoehl_448",A="_split_qoehl_448",L="_videoControl_qoehl_522",S="_videoBackground_qoehl_570",U="_iframe_qoehl_571",n={hero:q,container:j,heading:w,text:C,eyebrow:N,disclaimer:k,articleDetails:B,articleType:V,articleCategories:I,category:E,number:z,default:"_default_qoehl_124",blog:T,overlay:H,tile:R,fullBleed:D,media:F,splitAlt:P,split:A,videoControl:L,videoBackground:S,iframe:U},p=a.memo(function({isPlaying:e,onToggle:i}){return o.jsx("button",{type:"button",title:e?"Pause the video":"Play the video","aria-label":e?"Pause video":"Play video",className:n.videoControl,onClick:i,children:e?o.jsx(g,{size:18,"aria-hidden":!0}):o.jsx(x.Play,{size:18,"aria-hidden":!0})})}),f=a.memo(function({url:e,provider:i,wrapperClassName:s,iframeClassName:l}){const r=m.buildEmbedSrc(e,i);return o.jsx("div",{className:s,children:o.jsx("iframe",{src:r,className:l,allow:"autoplay; fullscreen",allowFullScreen:!0,title:"Embedded video","aria-label":"Background video"})})}),v=a.memo(a.forwardRef(function({src:e,autoPlay:i,posterUrl:s,wrapperClassName:l,videoClassName:r,isPlaying:c,onToggle:u},h){const d=a.useRef(null);return a.useImperativeHandle(h,()=>({play(){var t;(t=d.current)==null||t.play().catch(()=>{})},pause(){var t;(t=d.current)==null||t.pause()}})),a.useEffect(()=>{const t=d.current;t&&(c?t.play().catch(()=>{}):t.pause())},[c]),o.jsxs("div",{className:l,children:[o.jsx(p,{isPlaying:c,onToggle:u}),o.jsx("video",{ref:d,src:e,autoPlay:i,loop:!0,muted:!0,playsInline:!0,poster:s,preload:"metadata",className:r,"aria-label":"Background video"})]})})),$=a.memo(function({url:e,autoPlay:i,posterUrl:s,isPlaying:l,onToggle:r,variant:c}){const u=e.includes("vimeo.com"),h=e.includes("youtube.com")||e.includes("youtu.be"),d=u||h,t=u?"vimeo":"youtube";return c==="inline"?d?o.jsx(f,{url:e,provider:t,wrapperClassName:n.media}):o.jsx(v,{src:e,autoPlay:i,posterUrl:s,wrapperClassName:n.media,isPlaying:l,onToggle:r}):d?o.jsx(f,{url:e,provider:t,wrapperClassName:n.videoBackground,iframeClassName:n.iframe}):o.jsx(v,{src:e,autoPlay:i,posterUrl:s,videoClassName:n.videoBackground,isPlaying:l,onToggle:r})}),Y=a.memo(function({image:e,mode:i,variant:s,imageAdapter:l}){const r=m.resolveImageUrl(e,i,"medium");if(!r)return null;const c=m.resolveAltText(e,i),u=o.jsx("img",{fetchPriority:"high",src:r,alt:c,draggable:!1,style:s==="fill"?{objectFit:"cover",width:"100%",height:"100%"}:{width:"100%",height:"100%"}});return l?o.jsx("div",{className:n.media,children:s==="fill"?l.render({src:r,alt:c,fill:!0,priority:!0,fetchPriority:"high",style:{objectFit:"cover"},draggable:!1,sizes:"(max-width: 767px) 600px, 1200px"}):l.render({src:r,alt:c,width:650,height:750,priority:!0,fetchPriority:"high"})}):o.jsx("div",{className:n.media,children:u})});exports.HeroImage=Y;exports.NativeVideo=v;exports.VideoBlock=$;exports.VideoControl=p;exports.VideoEmbed=f;exports.styles=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._hero_qoehl_1{width:100%;padding-top:var(--spacing-xl);padding-bottom:var(--spacing-xl)}._container_qoehl_7{width:100%;max-width:var(--layout-width, 1300px);margin:0 auto;padding-left:var(--spacing-md);padding-right:var(--spacing-md)}._heading_qoehl_15{display:flex;flex-direction:column;width:100%;flex:1;gap:var(--spacing-md)}._heading_qoehl_15:not(:has(._text_qoehl_22 .portableTextContainer)){gap:var(--spacing-lg)}._heading_qoehl_15 h1,._heading_qoehl_15 h2,._heading_qoehl_15 h3,._heading_qoehl_15 h4,._heading_qoehl_15 h5,._heading_qoehl_15 h6{width:100%;margin-block:0}._eyebrow_qoehl_37{font-weight:var(--font-weight-bold)}._disclaimer_qoehl_41{font-size:var(--font-size-sm)}._text_qoehl_22{flex:1;display:flex;flex-direction:column;gap:var(--spacing-md)}._articleDetails_qoehl_52{color:var(--color-secondary-75);display:flex;align-items:center;margin-bottom:var(--spacing-md);gap:var(--spacing-md)}@media (max-width: 767px){._articleDetails_qoehl_52{flex-wrap:wrap;gap:var(--spacing-md)}}._articleType_qoehl_65{display:flex;align-items:center;justify-content:center;background-color:var(--color-secondary-75);padding:0 var(--spacing-md);color:#fff;width:auto;height:36px;border-radius:var(--radius-full);text-transform:capitalize;text-decoration:none}._articleCategories_qoehl_79{display:flex;flex-wrap:wrap;gap:var(--spacing-sm)}._category_qoehl_85{border:1px solid var(--color-secondary-75);display:flex;align-items:center;justify-content:center;background-color:transparent;padding:0 var(--spacing-md);color:var(--color-secondary-75);width:auto;height:36px;border-radius:var(--radius-full);text-transform:capitalize;text-decoration:none}._number_qoehl_101{display:inline-flex;align-items:center;justify-content:center;background-color:var(--color-secondary-75);color:#fff;width:25px;height:25px;border-radius:var(--radius-full);text-transform:capitalize;margin-right:var(--spacing-xs)}._pipe_qoehl_114{margin:0 var(--spacing-sm)}@media (max-width: 767px){._pipe_qoehl_114._hide_qoehl_117{display:none}}._default_qoehl_124{position:relative}._blog_qoehl_128{position:relative;padding:0 var(--spacing-md)}._blog_qoehl_128 ._container_qoehl_7{max-width:var(--layout-width, 1300px);position:relative;display:flex;align-items:flex-end;width:100%;min-height:450px;height:100%;overflow:hidden;flex-grow:1;padding:var(--nav-height) 0 0;border-radius:var(--radius-md)}._blog_qoehl_128 ._container_qoehl_7 img{z-index:1;transition:width .3s ease-in-out,height .3s ease-in-out}@media (max-width: 767px){._blog_qoehl_128 ._overlay_qoehl_154{width:100%;padding:4rem var(--spacing-md) var(--spacing-xl)}}._blog_qoehl_128 ._text_qoehl_22{z-index:3;position:relative;max-width:650px;background-color:var(--color-background);padding:var(--spacing-xl);border-radius:var(--radius-md)}@media (min-width: 768px){._blog_qoehl_128 ._text_qoehl_22{border-radius:var(--radius-md) var(--radius-md) 0 0}._blog_qoehl_128 ._text_qoehl_22:before{content:"";position:absolute;top:-25px;left:0;height:25px;width:20px;border-bottom-left-radius:var(--radius-md);box-shadow:-20px 20px 0 20px var(--color-background)}._blog_qoehl_128 ._text_qoehl_22:after{content:"";position:absolute;bottom:0;right:-20px;height:25px;width:20px;border-bottom-left-radius:var(--radius-md);box-shadow:0 10px 0 0 var(--color-background)}}._tile_qoehl_224{position:relative;padding:0 var(--spacing-md)}._tile_qoehl_224 ._container_qoehl_7{max-width:var(--layout-width, 1300px);position:relative;display:flex;align-items:flex-end;width:100%;min-height:550px;height:100%;overflow:hidden;flex-grow:1;padding:var(--nav-height) 0 0;border-radius:var(--radius-md)}._tile_qoehl_224 ._container_qoehl_7 img{z-index:1;transition:width .3s ease-in-out,height .3s ease-in-out}@media (max-width: 767px){._tile_qoehl_224 ._overlay_qoehl_154{width:100%;padding:var(--spacing-md)}}@media (max-width: 767px){._tile_qoehl_224:has(video) ._overlay_qoehl_154{padding-bottom:3rem}}._tile_qoehl_224 ._text_qoehl_22{z-index:3;position:relative;max-width:650px;background-color:var(--color-background);padding:var(--spacing-xl);border-radius:var(--radius-md)}@media (min-width: 768px){._tile_qoehl_224 ._text_qoehl_22{border-radius:var(--radius-md) var(--radius-md) 0 0}._tile_qoehl_224 ._text_qoehl_22:before{content:"";position:absolute;top:-25px;left:0;height:25px;width:20px;border-bottom-left-radius:var(--radius-md);box-shadow:-20px 20px 0 20px var(--color-background)}._tile_qoehl_224 ._text_qoehl_22:after{content:"";position:absolute;bottom:0;right:-20px;height:25px;width:20px;border-bottom-left-radius:var(--radius-md);box-shadow:0 10px 0 0 var(--color-background)}}._fullBleed_qoehl_333{position:relative;padding-top:0;padding-bottom:0}._fullBleed_qoehl_333 ._container_qoehl_7{max-width:var(--layout-width, 1300px);position:relative;display:flex;align-items:flex-end;width:100%;min-height:550px;height:100%;overflow:hidden;flex-grow:1;border-radius:0}._fullBleed_qoehl_333 ._container_qoehl_7 img{z-index:1;transition:width .3s ease-in-out,height .3s ease-in-out}._fullBleed_qoehl_333 ._media_qoehl_360{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:1;border-radius:0}._fullBleed_qoehl_333 ._media_qoehl_360 img,._fullBleed_qoehl_333 ._media_qoehl_360 video,._fullBleed_qoehl_333 ._media_qoehl_360 iframe{width:100%;height:100%;object-fit:cover;display:block}._fullBleed_qoehl_333 ._overlay_qoehl_154{position:relative;z-index:1;min-height:80vh;display:flex;align-items:flex-end;background:linear-gradient(to top,#000000a6,#0000004d,#0000)}@media (max-width: 767px){._fullBleed_qoehl_333 ._overlay_qoehl_154{min-height:60vh}}._fullBleed_qoehl_333 ._text_qoehl_22{max-width:700px;color:#fff;background-color:transparent;padding:0;border-radius:0;z-index:3;position:relative;max-width:650px;background-color:var(--color-background);padding:var(--spacing-xl);margin-top:var(--spacing-md);margin-bottom:var(--spacing-md);border-radius:var(--radius-md)}._fullBleed_qoehl_333 ._text_qoehl_22:before,._fullBleed_qoehl_333 ._text_qoehl_22:after{display:none}@media (max-width: 767px){._fullBleed_qoehl_333:has(video) ._text_qoehl_22{margin-bottom:3rem}}._default_qoehl_124 ._media_qoehl_360{position:relative;width:100%;height:480px;margin-bottom:var(--spacing-md);border-radius:var(--radius-md);overflow:hidden}@media (max-width: 767px){._default_qoehl_124 ._media_qoehl_360{height:280px}}._default_qoehl_124 ._media_qoehl_360 img{width:100%;height:100%;object-fit:cover;object-position:center;display:block}._splitAlt_qoehl_448 ._media_qoehl_360,._split_qoehl_448 ._media_qoehl_360{height:100%;padding-bottom:0;margin-bottom:0}._splitAlt_qoehl_448 ._media_qoehl_360 video,._splitAlt_qoehl_448 ._media_qoehl_360 iframe,._split_qoehl_448 ._media_qoehl_360 video,._split_qoehl_448 ._media_qoehl_360 iframe{position:relative;border-radius:var(--radius-md)}._splitAlt_qoehl_448 ._media_qoehl_360 img,._split_qoehl_448 ._media_qoehl_360 img{border-radius:var(--radius-md);width:100%;height:auto;max-height:500px;object-fit:contain}._splitAlt_qoehl_448 ._container_qoehl_7{display:flex;align-items:center;gap:3rem}@media (max-width: 767px){._splitAlt_qoehl_448 ._container_qoehl_7{flex-direction:column-reverse;gap:var(--spacing-xl)}._splitAlt_qoehl_448 ._container_qoehl_7 ._media_qoehl_360{width:100%;max-width:500px}}._splitAlt_qoehl_448 ._container_qoehl_7 ._media_qoehl_360{flex:.65}._splitAlt_qoehl_448 ._container_qoehl_7 ._heading_qoehl_15{flex:.35}._split_qoehl_448 ._container_qoehl_7{display:flex;align-items:center;gap:3rem}._split_qoehl_448 ._container_qoehl_7 ._media_qoehl_360{flex:1}._split_qoehl_448 ._container_qoehl_7 ._media_qoehl_360 img{width:100%;height:auto;max-height:500px;object-fit:contain}@media (max-width: 767px){._split_qoehl_448 ._container_qoehl_7{flex-direction:column-reverse;gap:var(--spacing-xl)}._split_qoehl_448 ._container_qoehl_7 ._media_qoehl_360{width:100%;max-width:500px}}._videoControl_qoehl_522{position:absolute;bottom:var(--spacing-sm);right:var(--spacing-sm);z-index:5;background:#00000080;border:none;border-radius:50%;padding:var(--spacing-sm);cursor:pointer;color:#fff;display:flex;align-items:center;justify-content:center;transition:color .3s ease-in-out}._videoControl_qoehl_522 svg{width:16px;height:16px}._videoControl_qoehl_522:hover{color:var(--color-primary-25)}._media_qoehl_360{position:relative;width:100%;height:0;overflow:hidden;border-radius:var(--radius-md);flex:1;margin-bottom:var(--spacing-md);line-height:0}._media_qoehl_360 iframe,._media_qoehl_360 video{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover}._videoBackground_qoehl_570,._iframe_qoehl_571{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;z-index:0;pointer-events:none}._iframe_qoehl_571{border:none}.splitAlt ._text_qoehl_22{flex:.65}._vAlignmentTop_qoehl_599 ._text_qoehl_22{align-self:flex-start}._vAlignmentMiddle_qoehl_605 ._text_qoehl_22{align-self:center}._vAlignmentBottom_qoehl_611 ._text_qoehl_22{align-self:flex-end}._hAlignmentLeft_qoehl_618 ._container_qoehl_7{justify-content:flex-start}._hAlignmentCenter_qoehl_624 ._container_qoehl_7{justify-content:center}._hAlignmentRight_qoehl_630 ._container_qoehl_7{justify-content:flex-end}
|
package/dist/main.d.ts
CHANGED
|
@@ -1069,7 +1069,7 @@ declare type HeadingTag = `h${HeadingLevel}`;
|
|
|
1069
1069
|
|
|
1070
1070
|
declare type HeadingTransform = "none" | "uppercase" | "lowercase" | "capitalize";
|
|
1071
1071
|
|
|
1072
|
-
export declare function HeroBlock({ heading, image, video, callToAction, pageData, styleOptions, id, imageAdapter, linkAdapter: linkAdapterProp, renderRichText, renderCallToAction, }: HeroBlockProps_2): JSX.Element;
|
|
1072
|
+
export declare function HeroBlock({ heading, image, video, callToAction, pageData, styleOptions, id, className, imageAdapter, linkAdapter: linkAdapterProp, renderRichText, renderCallToAction, }: HeroBlockProps_2): JSX.Element;
|
|
1073
1073
|
|
|
1074
1074
|
export { HeroBlockProps }
|
|
1075
1075
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");require("../../utils/mediaUtils.cjs");const e=require("../../../HeroSubComponents-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");require("../../utils/mediaUtils.cjs");const e=require("../../../HeroSubComponents-CnNiv-zR.cjs");require("../../../play-CQBnZgNa.cjs");exports.HeroImage=e.HeroImage;exports.NativeVideo=e.NativeVideo;exports.VideoBlock=e.VideoBlock;exports.VideoControl=e.VideoControl;exports.VideoEmbed=e.VideoEmbed;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "../../utils/mediaUtils.mjs";
|
|
4
|
-
import { H as t, N as d, V as p, a as s, b as V } from "../../../HeroSubComponents-
|
|
4
|
+
import { H as t, N as d, V as p, a as s, b as V } from "../../../HeroSubComponents-37eyejUn.js";
|
|
5
5
|
import "../../../play-DYgKiSaf.js";
|
|
6
6
|
export {
|
|
7
7
|
t as HeroImage,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("react/jsx-runtime"),e=require("../../../react.esm-C_9Ma9mj.cjs"),r=require("../../../HeroSubComponents-
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),e=require("../../../react.esm-C_9Ma9mj.cjs"),r=require("../../../HeroSubComponents-CnNiv-zR.cjs");e.vi.mock("./styles.module.css",()=>({default:new Proxy({},{get:(t,n)=>n})}));e.vi.mock("lucide-react",()=>({Pause:()=>i.jsx("span",{"data-testid":"pause-icon"}),Play:()=>i.jsx("span",{"data-testid":"play-icon"})}));e.vi.mock("../../utils/mediaUtils",()=>({buildEmbedSrc:e.vi.fn((o,t)=>`https://embed.${t}.com/${o}`),resolveImageUrl:e.vi.fn(o=>o?"https://cdn.example.com/image.jpg":void 0),resolveAltText:e.vi.fn(()=>"Hero image alt text")}));e.describe("1. VideoControl — Play/Pause icons",()=>{e.it("shows Play icon when isPlaying=false",()=>{e.render(i.jsx(r.VideoControl,{isPlaying:!1,onToggle:e.vi.fn()})),e.globalExpect(e.screen.getByTestId("play-icon")).toBeInTheDocument(),e.globalExpect(e.screen.queryByTestId("pause-icon")).toBeNull()}),e.it("shows Pause icon when isPlaying=true",()=>{e.render(i.jsx(r.VideoControl,{isPlaying:!0,onToggle:e.vi.fn()})),e.globalExpect(e.screen.getByTestId("pause-icon")).toBeInTheDocument(),e.globalExpect(e.screen.queryByTestId("play-icon")).toBeNull()}),e.it("has correct aria-label when playing",()=>{e.render(i.jsx(r.VideoControl,{isPlaying:!0,onToggle:e.vi.fn()})),e.globalExpect(e.screen.getByRole("button").getAttribute("aria-label")).toBe("Pause video")}),e.it("has correct aria-label when paused",()=>{e.render(i.jsx(r.VideoControl,{isPlaying:!1,onToggle:e.vi.fn()})),e.globalExpect(e.screen.getByRole("button").getAttribute("aria-label")).toBe("Play video")})});e.describe("2. VideoControl — onToggle called on click",()=>{e.it("calls onToggle when button is clicked",()=>{const o=e.vi.fn();e.render(i.jsx(r.VideoControl,{isPlaying:!1,onToggle:o})),e.fireEvent.click(e.screen.getByRole("button")),e.globalExpect(o).toHaveBeenCalledOnce()})});e.describe("3. VideoEmbed — iframe rendered with built src",()=>{e.it("renders an iframe",()=>{const{container:o}=e.render(i.jsx(r.VideoEmbed,{url:"https://vimeo.com/123",provider:"vimeo"}));e.globalExpect(o.querySelector("iframe")).toBeInTheDocument()}),e.it("calls buildEmbedSrc with url and provider",async()=>{const{buildEmbedSrc:o}=await Promise.resolve().then(()=>require("../../utils/mediaUtils.cjs"));e.render(i.jsx(r.VideoEmbed,{url:"https://vimeo.com/123",provider:"vimeo"})),e.globalExpect(o).toHaveBeenCalledWith("https://vimeo.com/123","vimeo")}),e.it("applies wrapperClassName to the wrapper div",()=>{var t;const{container:o}=e.render(i.jsx(r.VideoEmbed,{url:"https://vimeo.com/123",provider:"vimeo",wrapperClassName:"my-wrapper"}));e.globalExpect((t=o.firstElementChild)==null?void 0:t.className).toContain("my-wrapper")})});e.describe("4. VideoEmbed — YouTube provider",()=>{e.it("calls buildEmbedSrc with youtube provider",async()=>{const{buildEmbedSrc:o}=await Promise.resolve().then(()=>require("../../utils/mediaUtils.cjs"));e.render(i.jsx(r.VideoEmbed,{url:"https://youtube.com/embed/abc",provider:"youtube"})),e.globalExpect(o).toHaveBeenCalledWith("https://youtube.com/embed/abc","youtube")})});e.describe("5. VideoBlock inline variant",()=>{const o={autoPlay:!1,isPlaying:!1,onToggle:e.vi.fn(),variant:"inline"};e.it("renders an iframe for a Vimeo URL",()=>{const{container:t}=e.render(i.jsx(r.VideoBlock,{...o,url:"https://vimeo.com/123"}));e.globalExpect(t.querySelector("iframe")).toBeInTheDocument()}),e.it("renders a native video for a plain URL",()=>{const{container:t}=e.render(i.jsx(r.VideoBlock,{...o,url:"https://cdn.example.com/clip.mp4"}));e.globalExpect(t.querySelector("video")).toBeInTheDocument()}),e.it("renders an iframe for a YouTube URL",()=>{const{container:t}=e.render(i.jsx(r.VideoBlock,{...o,url:"https://youtube.com/embed/abc"}));e.globalExpect(t.querySelector("iframe")).toBeInTheDocument()})});e.describe("6. VideoBlock background variant",()=>{const o={autoPlay:!1,isPlaying:!1,onToggle:e.vi.fn(),variant:"background"};e.it("renders an iframe for Vimeo in background mode",()=>{const{container:t}=e.render(i.jsx(r.VideoBlock,{...o,url:"https://vimeo.com/123"}));e.globalExpect(t.querySelector("iframe")).toBeInTheDocument()}),e.it("renders a native video for plain URL in background mode",()=>{const{container:t}=e.render(i.jsx(r.VideoBlock,{...o,url:"https://cdn.example.com/clip.mp4"}));e.globalExpect(t.querySelector("video")).toBeInTheDocument()})});e.describe("7. NativeVideo — renders video with correct attributes",()=>{e.it("renders a video element",()=>{const{container:o}=e.render(i.jsx(r.NativeVideo,{src:"https://cdn.example.com/clip.mp4",autoPlay:!1,isPlaying:!1,onToggle:e.vi.fn()}));e.globalExpect(o.querySelector("video")).toBeInTheDocument()}),e.it("sets src on the video element",()=>{var t;const{container:o}=e.render(i.jsx(r.NativeVideo,{src:"https://cdn.example.com/clip.mp4",autoPlay:!1,isPlaying:!1,onToggle:e.vi.fn()}));e.globalExpect((t=o.querySelector("video"))==null?void 0:t.src).toContain("clip.mp4")}),e.it("renders muted and loop attributes",()=>{const{container:o}=e.render(i.jsx(r.NativeVideo,{src:"https://cdn.example.com/clip.mp4",autoPlay:!1,isPlaying:!1,onToggle:e.vi.fn()})),t=o.querySelector("video");e.globalExpect(t.muted).toBe(!0),e.globalExpect(t.loop).toBe(!0)}),e.it("renders the VideoControl button",()=>{e.render(i.jsx(r.NativeVideo,{src:"https://cdn.example.com/clip.mp4",autoPlay:!1,isPlaying:!1,onToggle:e.vi.fn()})),e.globalExpect(e.screen.getByRole("button")).toBeInTheDocument()})});e.describe("8. NativeVideo — plays/pauses when isPlaying changes",()=>{e.it("calls video.pause() when isPlaying becomes false",()=>{HTMLMediaElement.prototype.play=e.vi.fn().mockResolvedValue(void 0),HTMLMediaElement.prototype.pause=e.vi.fn();const{rerender:o}=e.render(i.jsx(r.NativeVideo,{src:"https://cdn.example.com/clip.mp4",autoPlay:!1,isPlaying:!0,onToggle:e.vi.fn()}));o(i.jsx(r.NativeVideo,{src:"https://cdn.example.com/clip.mp4",autoPlay:!1,isPlaying:!1,onToggle:e.vi.fn()})),e.globalExpect(HTMLMediaElement.prototype.pause).toHaveBeenCalled()})});e.describe("9. HeroImage — plain <img> fallback when no imageAdapter",()=>{const o={asset:{_ref:"img-abc"}};e.it("renders an img element",()=>{const{container:t}=e.render(i.jsx(r.HeroImage,{image:o,mode:"light",variant:"intrinsic"}));e.globalExpect(t.querySelector("img")).toBeInTheDocument()}),e.it("sets the resolved src on the img",()=>{var n;const{container:t}=e.render(i.jsx(r.HeroImage,{image:o,mode:"light",variant:"intrinsic"}));e.globalExpect((n=t.querySelector("img"))==null?void 0:n.src).toContain("cdn.example.com")}),e.it("sets the alt text on the img",()=>{var n;const{container:t}=e.render(i.jsx(r.HeroImage,{image:o,mode:"light",variant:"intrinsic"}));e.globalExpect((n=t.querySelector("img"))==null?void 0:n.alt).toBe("Hero image alt text")})});e.describe("10. HeroImage — renders via imageAdapter.render when provided",()=>{const o={asset:{_ref:"img-abc"}};e.it("calls imageAdapter.render",()=>{const t={render:e.vi.fn(()=>i.jsx("img",{src:"x",alt:"adapter"}))};e.render(i.jsx(r.HeroImage,{image:o,mode:"light",variant:"fill",imageAdapter:t})),e.globalExpect(t.render).toHaveBeenCalledOnce()}),e.it("passes fill=true for the fill variant",()=>{const t={render:e.vi.fn(()=>i.jsx("img",{src:"x",alt:"adapter"}))};e.render(i.jsx(r.HeroImage,{image:o,mode:"light",variant:"fill",imageAdapter:t})),e.globalExpect(t.render).toHaveBeenCalledWith(e.globalExpect.objectContaining({fill:!0}))})});e.describe("11. HeroImage — returns null when resolveImageUrl returns undefined",()=>{e.it("renders nothing when image is undefined",async()=>{const{resolveImageUrl:o}=await Promise.resolve().then(()=>require("../../utils/mediaUtils.cjs"));e.vi.mocked(o).mockReturnValueOnce(void 0);const{container:t}=e.render(i.jsx(r.HeroImage,{image:void 0,mode:"light",variant:"intrinsic"}));e.globalExpect(t.firstChild).toBeNull()})});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { v as r, d as l, i as n, r as i, g as a, s, f as y } from "../../../react.esm-DjxyacK8.js";
|
|
3
|
-
import { a as u, N as m, b as g, V as p, H as d } from "../../../HeroSubComponents-
|
|
3
|
+
import { a as u, N as m, b as g, V as p, H as d } from "../../../HeroSubComponents-37eyejUn.js";
|
|
4
4
|
r.mock("./styles.module.css", () => ({ default: new Proxy({}, { get: (o, c) => c }) }));
|
|
5
5
|
r.mock("lucide-react", () => ({
|
|
6
6
|
Pause: () => /* @__PURE__ */ t("span", { "data-testid": "pause-icon" }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),_=require("react"),Y=require("./HeroContext.cjs"),s=require("../../../HeroSubComponents-CnNiv-zR.cjs"),B=require("../../utils/mediaUtils.cjs"),G=require("../../hooks/usePrefersReducedMotion.cjs"),J={default:s.styles.default,split:s.styles.split,"split-35-65":s.styles.splitAlt,tile:s.styles.tile,fullBleed:s.styles.fullBleed,blog:s.styles.blog};function H({heading:e,callToAction:r,renderRichText:t,renderCallToAction:c,extraChildren:n}){return l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:[e.eyebrow&&(t==null?void 0:t({blocks:e.eyebrow,className:s.styles.eyebrow})),t==null?void 0:t({blocks:e.title})]}),n,e.description&&(t==null?void 0:t({blocks:e.description})),r&&(c==null?void 0:c(r)),e.disclaimer&&(t==null?void 0:t({blocks:e.disclaimer,className:s.styles.disclaimer}))]})}function V({id:e,paddingClasses:r,layoutClass:t,verticalAlignmentClass:c,horizontalAlignmentClass:n,extraSectionClass:a,className:y,mediaNode:i,overlayContent:m}){return l.jsx("section",{id:e,className:`${s.styles.hero} ${r} ${t} ${c} ${n} ${a??""}${y?` ${y}`:""}`,children:l.jsxs("article",{className:s.styles.container,children:[i,l.jsx("div",{className:s.styles.overlay,children:l.jsx("div",{className:s.styles.text,children:m})})]})})}const K={render:({href:e,className:r,children:t})=>l.jsx("a",{href:e,className:r,children:t})};function Q({heading:e,image:r,video:t,callToAction:c,pageData:n,styleOptions:a,id:y,className:i,imageAdapter:m,linkAdapter:b,renderRichText:o,renderCallToAction:u}){var F;const $=G.usePrefersReducedMotion(),[C,L]=_.useState(!$),d=(()=>{try{return Y.useHeroContext()}catch{return null}})(),z=b??K,j=(a==null?void 0:a.layout)??"default",v=((F=a==null?void 0:a.padding)==null?void 0:F.join(" "))??"",k=J[j]??s.styles.default,w=a==null?void 0:a.verticalAlignment,f=a==null?void 0:a.horizontalAlignment,N=(a==null?void 0:a.mode)??"light",I=B.resolveImageUrl(r,N,"medium"),g=B.resolveImageUrl(r,N,"large"),S=B.resolveAltText(r,N),M=t?B.detectVideoProvider(t):null,P=!$,q=_.useCallback(()=>{L(x=>!x)},[]);_.useEffect(()=>{if(!(j==="tile"||j==="fullBleed")||typeof window>"u")return;d==null||d.setIsFullbleedHeroAtTop(!0);const E=()=>{d==null||d.setIsFullbleedHeroAtTop(window.scrollY===0)};return window.addEventListener("scroll",E,{passive:!0}),()=>window.removeEventListener("scroll",E)},[j,d]),_.useEffect(()=>{L(!$)},[$]);const p=t&&M?l.jsx(s.VideoBlock,{url:t,autoPlay:P,posterUrl:g,isPlaying:C,onToggle:q,variant:"inline"}):r?l.jsx(s.HeroImage,{image:r,mode:N,variant:"intrinsic",imageAdapter:m}):null,U=t&&M?l.jsx(s.VideoBlock,{url:t,autoPlay:P,posterUrl:g,isPlaying:C,onToggle:q,variant:"background"}):I||g?m?m.render({src:g??I??"",alt:S,fill:!0,priority:!0,style:{objectFit:"cover"},draggable:!1,sizes:"(min-width: 500px) 500px, 100vw"}):l.jsx("img",{src:g??I,alt:S,style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"},draggable:!1}):null,W=n?X(n,z):null;switch(j){case"split":case"split-35-65":return l.jsx("section",{id:y,className:`${s.styles.hero} ${k} ${v} {verticalAlignmentClass} ${f} ${i?` ${i}`:""}`,children:l.jsxs("article",{className:s.styles.container,children:[l.jsxs("div",{className:s.styles.heading,children:[l.jsxs("div",{children:[e.eyebrow&&(o==null?void 0:o({blocks:e.eyebrow,className:s.styles.eyebrow})),o==null?void 0:o({blocks:e.title})]}),l.jsxs("div",{className:s.styles.text,children:[e.description&&(o==null?void 0:o({blocks:e.description})),c&&(u==null?void 0:u(c))]}),e.disclaimer&&(o==null?void 0:o({blocks:e.disclaimer,className:s.styles.disclaimer}))]}),p]})});case"default":return l.jsx("section",{id:y,className:`${s.styles.hero} ${v} ${k} ${w} ${f} ${i?` ${i}`:""}`,children:l.jsxs("article",{className:s.styles.container,children:[p,l.jsx("div",{className:s.styles.text,children:l.jsx(H,{heading:e,callToAction:c,renderRichText:o,renderCallToAction:u})})]})});case"tile":return l.jsx(V,{id:y,paddingClasses:v,layoutClass:k,verticalAlignmentClass:w,horizontalAlignmentClass:f,extraSectionClass:"heroTile",className:i,mediaNode:U,overlayContent:l.jsx(H,{heading:e,callToAction:c,renderRichText:o,renderCallToAction:u})});case"fullBleed":return l.jsxs("section",{"data-overlay":"true",id:y,className:`${s.styles.hero} ${s.styles.fullBleed} ${v} ${w} ${f} ${i?` ${i}`:""}`,children:[l.jsx("div",{className:s.styles.media,children:U}),l.jsx("div",{className:s.styles.container,children:l.jsx("div",{className:s.styles.text,children:l.jsx(H,{heading:e,callToAction:c,renderRichText:o,renderCallToAction:u})})})]});case"blog":return l.jsx(V,{id:y,paddingClasses:v,layoutClass:k,verticalAlignmentClass:w,horizontalAlignmentClass:f,className:i,mediaNode:U,overlayContent:l.jsx(H,{heading:e,callToAction:c,renderRichText:o,renderCallToAction:u,extraChildren:W})})}}function X(e,r){var i,m;const t=((i=e.categories)==null?void 0:i.filter(b=>{var o,u;return!((u=(o=b.slug)==null?void 0:o.current)!=null&&u.startsWith("library/type"))}))??[],c=t[0]??null,n=t[1]??null,a=((m=e.categories)==null?void 0:m.find(b=>{var o,u;return(u=(o=b.slug)==null?void 0:o.current)==null?void 0:u.startsWith("library/type")}))??null,y=n&&n.title.toLowerCase()!=="library"&&!n.slug.current.includes("keywords");return l.jsxs("div",{className:s.styles.articleDetails,children:[a&&r.render({href:`/blog/search?categories=${encodeURIComponent(a._id)}`,className:s.styles.articleType,children:a.title}),l.jsxs("div",{className:s.styles.articleCategories,children:[c&&r.render({href:`/blog/search?categories=${encodeURIComponent(c._id)}`,className:s.styles.category,children:c.title}),y&&r.render({href:`/blog/search?categories=${encodeURIComponent(n._id)}`,className:s.styles.category,children:n.title})]}),e.timeToRead>0&&l.jsxs("span",{children:[l.jsx("span",{className:s.styles.number,children:e.timeToRead}),"min read"]})]})}exports.HeroBlock=Q;
|
|
@@ -1,138 +1,142 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useHeroContext as
|
|
4
|
-
import { V as
|
|
5
|
-
import { resolveImageUrl as
|
|
6
|
-
import { usePrefersReducedMotion as
|
|
7
|
-
const
|
|
8
|
-
default:
|
|
9
|
-
split:
|
|
10
|
-
"split-35-65":
|
|
11
|
-
tile:
|
|
12
|
-
fullBleed:
|
|
13
|
-
blog:
|
|
1
|
+
import { jsx as t, jsxs as m, Fragment as K } from "react/jsx-runtime";
|
|
2
|
+
import { useState as Q, useCallback as X, useEffect as E } from "react";
|
|
3
|
+
import { useHeroContext as Z } from "./HeroContext.mjs";
|
|
4
|
+
import { V as W, s as l, H as D } from "../../../HeroSubComponents-37eyejUn.js";
|
|
5
|
+
import { resolveImageUrl as Y, resolveAltText as A, detectVideoProvider as h } from "../../utils/mediaUtils.mjs";
|
|
6
|
+
import { usePrefersReducedMotion as O } from "../../hooks/usePrefersReducedMotion.mjs";
|
|
7
|
+
const x = {
|
|
8
|
+
default: l.default,
|
|
9
|
+
split: l.split,
|
|
10
|
+
"split-35-65": l.splitAlt,
|
|
11
|
+
tile: l.tile,
|
|
12
|
+
fullBleed: l.fullBleed,
|
|
13
|
+
blog: l.blog
|
|
14
14
|
};
|
|
15
|
-
function
|
|
16
|
-
heading:
|
|
17
|
-
callToAction:
|
|
15
|
+
function L({
|
|
16
|
+
heading: s,
|
|
17
|
+
callToAction: r,
|
|
18
18
|
renderRichText: a,
|
|
19
19
|
renderCallToAction: c,
|
|
20
|
-
extraChildren:
|
|
20
|
+
extraChildren: n
|
|
21
21
|
}) {
|
|
22
|
-
return /* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
|
|
25
|
-
blocks:
|
|
26
|
-
className:
|
|
22
|
+
return /* @__PURE__ */ m(K, { children: [
|
|
23
|
+
/* @__PURE__ */ m("div", { children: [
|
|
24
|
+
s.eyebrow && (a == null ? void 0 : a({
|
|
25
|
+
blocks: s.eyebrow,
|
|
26
|
+
className: l.eyebrow
|
|
27
27
|
})),
|
|
28
|
-
a == null ? void 0 : a({ blocks:
|
|
28
|
+
a == null ? void 0 : a({ blocks: s.title })
|
|
29
29
|
] }),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
blocks:
|
|
35
|
-
className:
|
|
30
|
+
n,
|
|
31
|
+
s.description && (a == null ? void 0 : a({ blocks: s.description })),
|
|
32
|
+
r && (c == null ? void 0 : c(r)),
|
|
33
|
+
s.disclaimer && (a == null ? void 0 : a({
|
|
34
|
+
blocks: s.disclaimer,
|
|
35
|
+
className: l.disclaimer
|
|
36
36
|
}))
|
|
37
37
|
] });
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
id:
|
|
41
|
-
paddingClasses:
|
|
39
|
+
function q({
|
|
40
|
+
id: s,
|
|
41
|
+
paddingClasses: r,
|
|
42
42
|
layoutClass: a,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
verticalAlignmentClass: c,
|
|
44
|
+
horizontalAlignmentClass: n,
|
|
45
|
+
extraSectionClass: e,
|
|
46
|
+
className: d,
|
|
47
|
+
mediaNode: i,
|
|
48
|
+
overlayContent: f
|
|
46
49
|
}) {
|
|
47
|
-
return /* @__PURE__ */
|
|
50
|
+
return /* @__PURE__ */ t(
|
|
48
51
|
"section",
|
|
49
52
|
{
|
|
50
|
-
id:
|
|
51
|
-
className: `${
|
|
52
|
-
children: /* @__PURE__ */
|
|
53
|
-
|
|
54
|
-
/* @__PURE__ */
|
|
53
|
+
id: s,
|
|
54
|
+
className: `${l.hero} ${r} ${a} ${c} ${n} ${e ?? ""}${d ? ` ${d}` : ""}`,
|
|
55
|
+
children: /* @__PURE__ */ m("article", { className: l.container, children: [
|
|
56
|
+
i,
|
|
57
|
+
/* @__PURE__ */ t("div", { className: l.overlay, children: /* @__PURE__ */ t("div", { className: l.text, children: f }) })
|
|
55
58
|
] })
|
|
56
59
|
}
|
|
57
60
|
);
|
|
58
61
|
}
|
|
59
|
-
const
|
|
60
|
-
render: ({ href:
|
|
62
|
+
const R = {
|
|
63
|
+
render: ({ href: s, className: r, children: a }) => /* @__PURE__ */ t("a", { href: s, className: r, children: a })
|
|
61
64
|
};
|
|
62
|
-
function
|
|
63
|
-
heading:
|
|
64
|
-
image:
|
|
65
|
+
function rl({
|
|
66
|
+
heading: s,
|
|
67
|
+
image: r,
|
|
65
68
|
video: a,
|
|
66
69
|
callToAction: c,
|
|
67
|
-
pageData:
|
|
68
|
-
styleOptions:
|
|
70
|
+
pageData: n,
|
|
71
|
+
styleOptions: e,
|
|
69
72
|
id: d,
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
className: i,
|
|
74
|
+
imageAdapter: f,
|
|
75
|
+
linkAdapter: v,
|
|
72
76
|
renderRichText: o,
|
|
73
|
-
renderCallToAction:
|
|
77
|
+
renderCallToAction: u
|
|
74
78
|
}) {
|
|
75
|
-
var
|
|
76
|
-
const
|
|
79
|
+
var V;
|
|
80
|
+
const N = O(), [C, H] = Q(!N), b = (() => {
|
|
77
81
|
try {
|
|
78
|
-
return
|
|
82
|
+
return Z();
|
|
79
83
|
} catch {
|
|
80
84
|
return null;
|
|
81
85
|
}
|
|
82
|
-
})(),
|
|
83
|
-
|
|
86
|
+
})(), G = v ?? R, $ = (e == null ? void 0 : e.layout) ?? "default", g = ((V = e == null ? void 0 : e.padding) == null ? void 0 : V.join(" ")) ?? "", k = x[$] ?? l.default, p = e == null ? void 0 : e.verticalAlignment, w = e == null ? void 0 : e.horizontalAlignment, I = (e == null ? void 0 : e.mode) ?? "light", U = Y(r, I, "medium"), y = Y(r, I, "large"), M = A(r, I), P = a ? h(a) : null, S = !N, j = X(() => {
|
|
87
|
+
H((_) => !_);
|
|
84
88
|
}, []);
|
|
85
|
-
|
|
86
|
-
if (!(
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
|
|
89
|
+
E(() => {
|
|
90
|
+
if (!($ === "tile" || $ === "fullBleed") || typeof window > "u") return;
|
|
91
|
+
b == null || b.setIsFullbleedHeroAtTop(!0);
|
|
92
|
+
const z = () => {
|
|
93
|
+
b == null || b.setIsFullbleedHeroAtTop(window.scrollY === 0);
|
|
90
94
|
};
|
|
91
|
-
return window.addEventListener("scroll",
|
|
92
|
-
}, [
|
|
93
|
-
|
|
94
|
-
}, [
|
|
95
|
-
const
|
|
96
|
-
|
|
95
|
+
return window.addEventListener("scroll", z, { passive: !0 }), () => window.removeEventListener("scroll", z);
|
|
96
|
+
}, [$, b]), E(() => {
|
|
97
|
+
H(!N);
|
|
98
|
+
}, [N]);
|
|
99
|
+
const F = a && P ? /* @__PURE__ */ t(
|
|
100
|
+
W,
|
|
97
101
|
{
|
|
98
102
|
url: a,
|
|
99
|
-
autoPlay:
|
|
100
|
-
posterUrl:
|
|
101
|
-
isPlaying:
|
|
102
|
-
onToggle:
|
|
103
|
+
autoPlay: S,
|
|
104
|
+
posterUrl: y,
|
|
105
|
+
isPlaying: C,
|
|
106
|
+
onToggle: j,
|
|
103
107
|
variant: "inline"
|
|
104
108
|
}
|
|
105
|
-
) :
|
|
106
|
-
|
|
109
|
+
) : r ? /* @__PURE__ */ t(
|
|
110
|
+
D,
|
|
107
111
|
{
|
|
108
|
-
image:
|
|
109
|
-
mode:
|
|
112
|
+
image: r,
|
|
113
|
+
mode: I,
|
|
110
114
|
variant: "intrinsic",
|
|
111
|
-
imageAdapter:
|
|
115
|
+
imageAdapter: f
|
|
112
116
|
}
|
|
113
|
-
) : null,
|
|
114
|
-
|
|
117
|
+
) : null, B = a && P ? /* @__PURE__ */ t(
|
|
118
|
+
W,
|
|
115
119
|
{
|
|
116
120
|
url: a,
|
|
117
|
-
autoPlay:
|
|
118
|
-
posterUrl:
|
|
119
|
-
isPlaying:
|
|
120
|
-
onToggle:
|
|
121
|
+
autoPlay: S,
|
|
122
|
+
posterUrl: y,
|
|
123
|
+
isPlaying: C,
|
|
124
|
+
onToggle: j,
|
|
121
125
|
variant: "background"
|
|
122
126
|
}
|
|
123
|
-
) :
|
|
124
|
-
src:
|
|
125
|
-
alt:
|
|
127
|
+
) : U || y ? f ? f.render({
|
|
128
|
+
src: y ?? U ?? "",
|
|
129
|
+
alt: M,
|
|
126
130
|
fill: !0,
|
|
127
131
|
priority: !0,
|
|
128
132
|
style: { objectFit: "cover" },
|
|
129
133
|
draggable: !1,
|
|
130
134
|
sizes: "(min-width: 500px) 500px, 100vw"
|
|
131
|
-
}) : /* @__PURE__ */
|
|
135
|
+
}) : /* @__PURE__ */ t(
|
|
132
136
|
"img",
|
|
133
137
|
{
|
|
134
|
-
src:
|
|
135
|
-
alt:
|
|
138
|
+
src: y ?? U,
|
|
139
|
+
alt: M,
|
|
136
140
|
style: {
|
|
137
141
|
position: "absolute",
|
|
138
142
|
inset: 0,
|
|
@@ -142,157 +146,163 @@ function es({
|
|
|
142
146
|
},
|
|
143
147
|
draggable: !1
|
|
144
148
|
}
|
|
145
|
-
) : null,
|
|
146
|
-
switch (
|
|
149
|
+
) : null, J = n ? T(n, G) : null;
|
|
150
|
+
switch ($) {
|
|
147
151
|
case "split":
|
|
148
152
|
case "split-35-65":
|
|
149
|
-
return /* @__PURE__ */
|
|
153
|
+
return /* @__PURE__ */ t(
|
|
150
154
|
"section",
|
|
151
155
|
{
|
|
152
156
|
id: d,
|
|
153
|
-
className: `${
|
|
154
|
-
children: /* @__PURE__ */
|
|
155
|
-
/* @__PURE__ */
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
|
|
158
|
-
blocks:
|
|
159
|
-
className:
|
|
157
|
+
className: `${l.hero} ${k} ${g} {verticalAlignmentClass} ${w} ${i ? ` ${i}` : ""}`,
|
|
158
|
+
children: /* @__PURE__ */ m("article", { className: l.container, children: [
|
|
159
|
+
/* @__PURE__ */ m("div", { className: l.heading, children: [
|
|
160
|
+
/* @__PURE__ */ m("div", { children: [
|
|
161
|
+
s.eyebrow && (o == null ? void 0 : o({
|
|
162
|
+
blocks: s.eyebrow,
|
|
163
|
+
className: l.eyebrow
|
|
160
164
|
})),
|
|
161
|
-
o == null ? void 0 : o({ blocks:
|
|
165
|
+
o == null ? void 0 : o({ blocks: s.title })
|
|
162
166
|
] }),
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
|
|
165
|
-
c && (
|
|
167
|
+
/* @__PURE__ */ m("div", { className: l.text, children: [
|
|
168
|
+
s.description && (o == null ? void 0 : o({ blocks: s.description })),
|
|
169
|
+
c && (u == null ? void 0 : u(c))
|
|
166
170
|
] }),
|
|
167
|
-
|
|
168
|
-
blocks:
|
|
169
|
-
className:
|
|
171
|
+
s.disclaimer && (o == null ? void 0 : o({
|
|
172
|
+
blocks: s.disclaimer,
|
|
173
|
+
className: l.disclaimer
|
|
170
174
|
}))
|
|
171
175
|
] }),
|
|
172
|
-
|
|
176
|
+
F
|
|
173
177
|
] })
|
|
174
178
|
}
|
|
175
179
|
);
|
|
176
180
|
case "default":
|
|
177
|
-
return /* @__PURE__ */
|
|
181
|
+
return /* @__PURE__ */ t(
|
|
178
182
|
"section",
|
|
179
183
|
{
|
|
180
184
|
id: d,
|
|
181
|
-
className: `${
|
|
182
|
-
children: /* @__PURE__ */
|
|
183
|
-
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
|
|
185
|
+
className: `${l.hero} ${g} ${k} ${p} ${w} ${i ? ` ${i}` : ""}`,
|
|
186
|
+
children: /* @__PURE__ */ m("article", { className: l.container, children: [
|
|
187
|
+
F,
|
|
188
|
+
/* @__PURE__ */ t("div", { className: l.text, children: /* @__PURE__ */ t(
|
|
189
|
+
L,
|
|
186
190
|
{
|
|
187
|
-
heading:
|
|
191
|
+
heading: s,
|
|
188
192
|
callToAction: c,
|
|
189
193
|
renderRichText: o,
|
|
190
|
-
renderCallToAction:
|
|
194
|
+
renderCallToAction: u
|
|
191
195
|
}
|
|
192
196
|
) })
|
|
193
197
|
] })
|
|
194
198
|
}
|
|
195
199
|
);
|
|
196
200
|
case "tile":
|
|
197
|
-
return /* @__PURE__ */
|
|
198
|
-
|
|
201
|
+
return /* @__PURE__ */ t(
|
|
202
|
+
q,
|
|
199
203
|
{
|
|
200
204
|
id: d,
|
|
201
|
-
paddingClasses:
|
|
202
|
-
layoutClass:
|
|
205
|
+
paddingClasses: g,
|
|
206
|
+
layoutClass: k,
|
|
207
|
+
verticalAlignmentClass: p,
|
|
208
|
+
horizontalAlignmentClass: w,
|
|
203
209
|
extraSectionClass: "heroTile",
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
210
|
+
className: i,
|
|
211
|
+
mediaNode: B,
|
|
212
|
+
overlayContent: /* @__PURE__ */ t(
|
|
213
|
+
L,
|
|
207
214
|
{
|
|
208
|
-
heading:
|
|
215
|
+
heading: s,
|
|
209
216
|
callToAction: c,
|
|
210
217
|
renderRichText: o,
|
|
211
|
-
renderCallToAction:
|
|
218
|
+
renderCallToAction: u
|
|
212
219
|
}
|
|
213
220
|
)
|
|
214
221
|
}
|
|
215
222
|
);
|
|
216
223
|
case "fullBleed":
|
|
217
|
-
return /* @__PURE__ */
|
|
224
|
+
return /* @__PURE__ */ m(
|
|
218
225
|
"section",
|
|
219
226
|
{
|
|
220
227
|
"data-overlay": "true",
|
|
221
228
|
id: d,
|
|
222
|
-
className: `${
|
|
229
|
+
className: `${l.hero} ${l.fullBleed} ${g} ${p} ${w} ${i ? ` ${i}` : ""}`,
|
|
223
230
|
children: [
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
-
/* @__PURE__ */
|
|
226
|
-
|
|
231
|
+
/* @__PURE__ */ t("div", { className: l.media, children: B }),
|
|
232
|
+
/* @__PURE__ */ t("div", { className: l.container, children: /* @__PURE__ */ t("div", { className: l.text, children: /* @__PURE__ */ t(
|
|
233
|
+
L,
|
|
227
234
|
{
|
|
228
|
-
heading:
|
|
235
|
+
heading: s,
|
|
229
236
|
callToAction: c,
|
|
230
237
|
renderRichText: o,
|
|
231
|
-
renderCallToAction:
|
|
238
|
+
renderCallToAction: u
|
|
232
239
|
}
|
|
233
240
|
) }) })
|
|
234
241
|
]
|
|
235
242
|
}
|
|
236
243
|
);
|
|
237
244
|
case "blog":
|
|
238
|
-
return /* @__PURE__ */
|
|
239
|
-
|
|
245
|
+
return /* @__PURE__ */ t(
|
|
246
|
+
q,
|
|
240
247
|
{
|
|
241
248
|
id: d,
|
|
242
|
-
paddingClasses:
|
|
243
|
-
layoutClass:
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
249
|
+
paddingClasses: g,
|
|
250
|
+
layoutClass: k,
|
|
251
|
+
verticalAlignmentClass: p,
|
|
252
|
+
horizontalAlignmentClass: w,
|
|
253
|
+
className: i,
|
|
254
|
+
mediaNode: B,
|
|
255
|
+
overlayContent: /* @__PURE__ */ t(
|
|
256
|
+
L,
|
|
247
257
|
{
|
|
248
|
-
heading:
|
|
258
|
+
heading: s,
|
|
249
259
|
callToAction: c,
|
|
250
260
|
renderRichText: o,
|
|
251
|
-
renderCallToAction:
|
|
252
|
-
extraChildren:
|
|
261
|
+
renderCallToAction: u,
|
|
262
|
+
extraChildren: J
|
|
253
263
|
}
|
|
254
264
|
)
|
|
255
265
|
}
|
|
256
266
|
);
|
|
257
267
|
}
|
|
258
268
|
}
|
|
259
|
-
function
|
|
260
|
-
var
|
|
261
|
-
const a = ((
|
|
262
|
-
(
|
|
263
|
-
var
|
|
264
|
-
return !((
|
|
269
|
+
function T(s, r) {
|
|
270
|
+
var i, f;
|
|
271
|
+
const a = ((i = s.categories) == null ? void 0 : i.filter(
|
|
272
|
+
(v) => {
|
|
273
|
+
var o, u;
|
|
274
|
+
return !((u = (o = v.slug) == null ? void 0 : o.current) != null && u.startsWith("library/type"));
|
|
265
275
|
}
|
|
266
|
-
)) ?? [], c = a[0] ?? null,
|
|
267
|
-
(
|
|
268
|
-
var
|
|
269
|
-
return (
|
|
276
|
+
)) ?? [], c = a[0] ?? null, n = a[1] ?? null, e = ((f = s.categories) == null ? void 0 : f.find(
|
|
277
|
+
(v) => {
|
|
278
|
+
var o, u;
|
|
279
|
+
return (u = (o = v.slug) == null ? void 0 : o.current) == null ? void 0 : u.startsWith("library/type");
|
|
270
280
|
}
|
|
271
|
-
)) ?? null, d =
|
|
272
|
-
return /* @__PURE__ */
|
|
273
|
-
|
|
274
|
-
href: `/blog/search?categories=${encodeURIComponent(
|
|
275
|
-
className:
|
|
276
|
-
children:
|
|
281
|
+
)) ?? null, d = n && n.title.toLowerCase() !== "library" && !n.slug.current.includes("keywords");
|
|
282
|
+
return /* @__PURE__ */ m("div", { className: l.articleDetails, children: [
|
|
283
|
+
e && r.render({
|
|
284
|
+
href: `/blog/search?categories=${encodeURIComponent(e._id)}`,
|
|
285
|
+
className: l.articleType,
|
|
286
|
+
children: e.title
|
|
277
287
|
}),
|
|
278
|
-
/* @__PURE__ */
|
|
279
|
-
c &&
|
|
288
|
+
/* @__PURE__ */ m("div", { className: l.articleCategories, children: [
|
|
289
|
+
c && r.render({
|
|
280
290
|
href: `/blog/search?categories=${encodeURIComponent(c._id)}`,
|
|
281
|
-
className:
|
|
291
|
+
className: l.category,
|
|
282
292
|
children: c.title
|
|
283
293
|
}),
|
|
284
|
-
d &&
|
|
285
|
-
href: `/blog/search?categories=${encodeURIComponent(
|
|
286
|
-
className:
|
|
287
|
-
children:
|
|
294
|
+
d && r.render({
|
|
295
|
+
href: `/blog/search?categories=${encodeURIComponent(n._id)}`,
|
|
296
|
+
className: l.category,
|
|
297
|
+
children: n.title
|
|
288
298
|
})
|
|
289
299
|
] }),
|
|
290
|
-
|
|
291
|
-
/* @__PURE__ */
|
|
300
|
+
s.timeToRead > 0 && /* @__PURE__ */ m("span", { children: [
|
|
301
|
+
/* @__PURE__ */ t("span", { className: l.number, children: s.timeToRead }),
|
|
292
302
|
"min read"
|
|
293
303
|
] })
|
|
294
304
|
] });
|
|
295
305
|
}
|
|
296
306
|
export {
|
|
297
|
-
|
|
307
|
+
rl as HeroBlock
|
|
298
308
|
};
|
package/dist/next.d.ts
CHANGED
|
@@ -199,7 +199,7 @@ declare type GridCardProps = ItemType_2 & {
|
|
|
199
199
|
}) => default_2.ReactElement | null;
|
|
200
200
|
};
|
|
201
201
|
|
|
202
|
-
export declare function HeroBlock({ heading, image, video, callToAction, pageData, styleOptions, id, imageAdapter, linkAdapter: linkAdapterProp, renderRichText, renderCallToAction, }: HeroBlockProps_2): JSX.Element;
|
|
202
|
+
export declare function HeroBlock({ heading, image, video, callToAction, pageData, styleOptions, id, className, imageAdapter, linkAdapter: linkAdapterProp, renderRichText, renderCallToAction, }: HeroBlockProps_2): JSX.Element;
|
|
203
203
|
|
|
204
204
|
export { HeroBlockProps }
|
|
205
205
|
|
package/package.json
CHANGED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";require('./HeroSubComponents.css');const t=require("react/jsx-runtime"),l=require("react"),f=require("./next/utils/mediaUtils.cjs"),y=require("./createLucideIcon-DpotSgUx.cjs"),x=require("./play-CQBnZgNa.cjs");/**
|
|
2
|
-
* @license lucide-react v0.488.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const b=[["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"}]],g=y.createLucideIcon("pause",b),z="_hero_1fz0v_1",j="_container_1fz0v_7",w="_heading_1fz0v_15",C="_text_1fz0v_22",N="_eyebrow_1fz0v_37",k="_disclaimer_1fz0v_41",B="_articleDetails_1fz0v_52",V="_articleType_1fz0v_65",I="_articleCategories_1fz0v_79",E="_category_1fz0v_85",q="_number_1fz0v_101",T="_blog_1fz0v_128",H="_overlay_1fz0v_154",R="_tile_1fz0v_224",D="_fullBleed_1fz0v_333",F="_media_1fz0v_360",P="_splitAlt_1fz0v_447",A="_split_1fz0v_447",L="_videoControl_1fz0v_521",S="_videoBackground_1fz0v_569",U="_iframe_1fz0v_570",n={hero:z,container:j,heading:w,text:C,eyebrow:N,disclaimer:k,articleDetails:B,articleType:V,articleCategories:I,category:E,number:q,default:"_default_1fz0v_124",blog:T,overlay:H,tile:R,fullBleed:D,media:F,splitAlt:P,split:A,videoControl:L,videoBackground:S,iframe:U},p=l.memo(function({isPlaying:e,onToggle:i}){return t.jsx("button",{type:"button",title:e?"Pause the video":"Play the video","aria-label":e?"Pause video":"Play video",className:n.videoControl,onClick:i,children:e?t.jsx(g,{size:18,"aria-hidden":!0}):t.jsx(x.Play,{size:18,"aria-hidden":!0})})}),v=l.memo(function({url:e,provider:i,wrapperClassName:c,iframeClassName:s}){const r=f.buildEmbedSrc(e,i);return t.jsx("div",{className:c,children:t.jsx("iframe",{src:r,className:s,allow:"autoplay; fullscreen",allowFullScreen:!0,title:"Embedded video","aria-label":"Background video"})})}),h=l.memo(l.forwardRef(function({src:e,autoPlay:i,posterUrl:c,wrapperClassName:s,videoClassName:r,isPlaying:a,onToggle:u},m){const d=l.useRef(null);return l.useImperativeHandle(m,()=>({play(){var o;(o=d.current)==null||o.play().catch(()=>{})},pause(){var o;(o=d.current)==null||o.pause()}})),l.useEffect(()=>{const o=d.current;o&&(a?o.play().catch(()=>{}):o.pause())},[a]),t.jsxs("div",{className:s,children:[t.jsx(p,{isPlaying:a,onToggle:u}),t.jsx("video",{ref:d,src:e,autoPlay:i,loop:!0,muted:!0,playsInline:!0,poster:c,preload:"metadata",className:r,"aria-label":"Background video"})]})})),$=l.memo(function({url:e,autoPlay:i,posterUrl:c,isPlaying:s,onToggle:r,variant:a}){const u=e.includes("vimeo.com"),m=e.includes("youtube.com")||e.includes("youtu.be"),d=u||m,o=u?"vimeo":"youtube";return a==="inline"?d?t.jsx(v,{url:e,provider:o,wrapperClassName:n.media}):t.jsx(h,{src:e,autoPlay:i,posterUrl:c,wrapperClassName:n.media,isPlaying:s,onToggle:r}):d?t.jsx(v,{url:e,provider:o,wrapperClassName:n.videoBackground,iframeClassName:n.iframe}):t.jsx(h,{src:e,autoPlay:i,posterUrl:c,videoClassName:n.videoBackground,isPlaying:s,onToggle:r})}),Y=l.memo(function({image:e,mode:i,variant:c,imageAdapter:s}){const r=f.resolveImageUrl(e,i,"medium");if(!r)return null;const a=f.resolveAltText(e,i),u=t.jsx("img",{fetchPriority:"high",src:r,alt:a,draggable:!1,style:c==="fill"?{objectFit:"cover",width:"100%",height:"100%"}:{width:"100%",height:"100%"}});return s?t.jsx("div",{className:n.media,children:c==="fill"?s.render({src:r,alt:a,fill:!0,priority:!0,fetchPriority:"high",style:{objectFit:"cover"},draggable:!1,sizes:"(max-width: 767px) 600px, 1200px"}):s.render({src:r,alt:a,width:650,height:750,priority:!0,fetchPriority:"high"})}):t.jsx("div",{className:n.media,children:u})});exports.HeroImage=Y;exports.NativeVideo=h;exports.VideoBlock=$;exports.VideoControl=p;exports.VideoEmbed=v;exports.styles=n;
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
import { jsx as t, jsxs as h } from "react/jsx-runtime";
|
|
2
|
-
import { memo as u, forwardRef as p, useRef as y, useImperativeHandle as b, useEffect as g } from "react";
|
|
3
|
-
import { buildEmbedSrc as z, resolveImageUrl as x, resolveAltText as w } from "./next/utils/mediaUtils.mjs";
|
|
4
|
-
import { c as N } from "./createLucideIcon-C8GTh_Qx.js";
|
|
5
|
-
import { P as C } from "./play-DYgKiSaf.js";
|
|
6
|
-
import './HeroSubComponents.css';/**
|
|
7
|
-
* @license lucide-react v0.488.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/
|
|
12
|
-
const k = [
|
|
13
|
-
["rect", { x: "14", y: "4", width: "4", height: "16", rx: "1", key: "zuxfzm" }],
|
|
14
|
-
["rect", { x: "6", y: "4", width: "4", height: "16", rx: "1", key: "1okwgv" }]
|
|
15
|
-
], B = N("pause", k), V = "_hero_1fz0v_1", I = "_container_1fz0v_7", E = "_heading_1fz0v_15", T = "_text_1fz0v_22", j = "_eyebrow_1fz0v_37", H = "_disclaimer_1fz0v_41", P = "_articleDetails_1fz0v_52", D = "_articleType_1fz0v_65", F = "_articleCategories_1fz0v_79", R = "_category_1fz0v_85", A = "_number_1fz0v_101", S = "_blog_1fz0v_128", L = "_overlay_1fz0v_154", U = "_tile_1fz0v_224", Y = "_fullBleed_1fz0v_333", q = "_media_1fz0v_360", G = "_splitAlt_1fz0v_447", J = "_split_1fz0v_447", K = "_videoControl_1fz0v_521", M = "_videoBackground_1fz0v_569", O = "_iframe_1fz0v_570", l = {
|
|
16
|
-
hero: V,
|
|
17
|
-
container: I,
|
|
18
|
-
heading: E,
|
|
19
|
-
text: T,
|
|
20
|
-
eyebrow: j,
|
|
21
|
-
disclaimer: H,
|
|
22
|
-
articleDetails: P,
|
|
23
|
-
articleType: D,
|
|
24
|
-
articleCategories: F,
|
|
25
|
-
category: R,
|
|
26
|
-
number: A,
|
|
27
|
-
default: "_default_1fz0v_124",
|
|
28
|
-
blog: S,
|
|
29
|
-
overlay: L,
|
|
30
|
-
tile: U,
|
|
31
|
-
fullBleed: Y,
|
|
32
|
-
media: q,
|
|
33
|
-
splitAlt: G,
|
|
34
|
-
split: J,
|
|
35
|
-
videoControl: K,
|
|
36
|
-
videoBackground: M,
|
|
37
|
-
iframe: O
|
|
38
|
-
}, Q = u(function({
|
|
39
|
-
isPlaying: e,
|
|
40
|
-
onToggle: i
|
|
41
|
-
}) {
|
|
42
|
-
return /* @__PURE__ */ t(
|
|
43
|
-
"button",
|
|
44
|
-
{
|
|
45
|
-
type: "button",
|
|
46
|
-
title: e ? "Pause the video" : "Play the video",
|
|
47
|
-
"aria-label": e ? "Pause video" : "Play video",
|
|
48
|
-
className: l.videoControl,
|
|
49
|
-
onClick: i,
|
|
50
|
-
children: e ? /* @__PURE__ */ t(B, { size: 18, "aria-hidden": !0 }) : /* @__PURE__ */ t(C, { size: 18, "aria-hidden": !0 })
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
}), m = u(function({
|
|
54
|
-
url: e,
|
|
55
|
-
provider: i,
|
|
56
|
-
wrapperClassName: s,
|
|
57
|
-
iframeClassName: a
|
|
58
|
-
}) {
|
|
59
|
-
const r = z(e, i);
|
|
60
|
-
return /* @__PURE__ */ t("div", { className: s, children: /* @__PURE__ */ t(
|
|
61
|
-
"iframe",
|
|
62
|
-
{
|
|
63
|
-
src: r,
|
|
64
|
-
className: a,
|
|
65
|
-
allow: "autoplay; fullscreen",
|
|
66
|
-
allowFullScreen: !0,
|
|
67
|
-
title: "Embedded video",
|
|
68
|
-
"aria-label": "Background video"
|
|
69
|
-
}
|
|
70
|
-
) });
|
|
71
|
-
}), v = u(
|
|
72
|
-
p(function({
|
|
73
|
-
src: e,
|
|
74
|
-
autoPlay: i,
|
|
75
|
-
posterUrl: s,
|
|
76
|
-
wrapperClassName: a,
|
|
77
|
-
videoClassName: r,
|
|
78
|
-
isPlaying: c,
|
|
79
|
-
onToggle: d
|
|
80
|
-
}, f) {
|
|
81
|
-
const n = y(null);
|
|
82
|
-
return b(f, () => ({
|
|
83
|
-
play() {
|
|
84
|
-
var o;
|
|
85
|
-
(o = n.current) == null || o.play().catch(() => {
|
|
86
|
-
});
|
|
87
|
-
},
|
|
88
|
-
pause() {
|
|
89
|
-
var o;
|
|
90
|
-
(o = n.current) == null || o.pause();
|
|
91
|
-
}
|
|
92
|
-
})), g(() => {
|
|
93
|
-
const o = n.current;
|
|
94
|
-
o && (c ? o.play().catch(() => {
|
|
95
|
-
}) : o.pause());
|
|
96
|
-
}, [c]), /* @__PURE__ */ h("div", { className: a, children: [
|
|
97
|
-
/* @__PURE__ */ t(Q, { isPlaying: c, onToggle: d }),
|
|
98
|
-
/* @__PURE__ */ t(
|
|
99
|
-
"video",
|
|
100
|
-
{
|
|
101
|
-
ref: n,
|
|
102
|
-
src: e,
|
|
103
|
-
autoPlay: i,
|
|
104
|
-
loop: !0,
|
|
105
|
-
muted: !0,
|
|
106
|
-
playsInline: !0,
|
|
107
|
-
poster: s,
|
|
108
|
-
preload: "metadata",
|
|
109
|
-
className: r,
|
|
110
|
-
"aria-label": "Background video"
|
|
111
|
-
}
|
|
112
|
-
)
|
|
113
|
-
] });
|
|
114
|
-
})
|
|
115
|
-
), te = u(function({
|
|
116
|
-
url: e,
|
|
117
|
-
autoPlay: i,
|
|
118
|
-
posterUrl: s,
|
|
119
|
-
isPlaying: a,
|
|
120
|
-
onToggle: r,
|
|
121
|
-
variant: c
|
|
122
|
-
}) {
|
|
123
|
-
const d = e.includes("vimeo.com"), f = e.includes("youtube.com") || e.includes("youtu.be"), n = d || f, o = d ? "vimeo" : "youtube";
|
|
124
|
-
return c === "inline" ? n ? /* @__PURE__ */ t(
|
|
125
|
-
m,
|
|
126
|
-
{
|
|
127
|
-
url: e,
|
|
128
|
-
provider: o,
|
|
129
|
-
wrapperClassName: l.media
|
|
130
|
-
}
|
|
131
|
-
) : /* @__PURE__ */ t(
|
|
132
|
-
v,
|
|
133
|
-
{
|
|
134
|
-
src: e,
|
|
135
|
-
autoPlay: i,
|
|
136
|
-
posterUrl: s,
|
|
137
|
-
wrapperClassName: l.media,
|
|
138
|
-
isPlaying: a,
|
|
139
|
-
onToggle: r
|
|
140
|
-
}
|
|
141
|
-
) : n ? /* @__PURE__ */ t(
|
|
142
|
-
m,
|
|
143
|
-
{
|
|
144
|
-
url: e,
|
|
145
|
-
provider: o,
|
|
146
|
-
wrapperClassName: l.videoBackground,
|
|
147
|
-
iframeClassName: l.iframe
|
|
148
|
-
}
|
|
149
|
-
) : /* @__PURE__ */ t(
|
|
150
|
-
v,
|
|
151
|
-
{
|
|
152
|
-
src: e,
|
|
153
|
-
autoPlay: i,
|
|
154
|
-
posterUrl: s,
|
|
155
|
-
videoClassName: l.videoBackground,
|
|
156
|
-
isPlaying: a,
|
|
157
|
-
onToggle: r
|
|
158
|
-
}
|
|
159
|
-
);
|
|
160
|
-
}), oe = u(function({
|
|
161
|
-
image: e,
|
|
162
|
-
mode: i,
|
|
163
|
-
variant: s,
|
|
164
|
-
imageAdapter: a
|
|
165
|
-
}) {
|
|
166
|
-
const r = x(e, i, "medium");
|
|
167
|
-
if (!r) return null;
|
|
168
|
-
const c = w(e, i), d = /* @__PURE__ */ t(
|
|
169
|
-
"img",
|
|
170
|
-
{
|
|
171
|
-
fetchPriority: "high",
|
|
172
|
-
src: r,
|
|
173
|
-
alt: c,
|
|
174
|
-
draggable: !1,
|
|
175
|
-
style: s === "fill" ? { objectFit: "cover", width: "100%", height: "100%" } : { width: "100%", height: "100%" }
|
|
176
|
-
}
|
|
177
|
-
);
|
|
178
|
-
return a ? /* @__PURE__ */ t("div", { className: l.media, children: s === "fill" ? a.render({
|
|
179
|
-
src: r,
|
|
180
|
-
alt: c,
|
|
181
|
-
fill: !0,
|
|
182
|
-
priority: !0,
|
|
183
|
-
fetchPriority: "high",
|
|
184
|
-
style: { objectFit: "cover" },
|
|
185
|
-
draggable: !1,
|
|
186
|
-
sizes: "(max-width: 767px) 600px, 1200px"
|
|
187
|
-
}) : a.render({
|
|
188
|
-
src: r,
|
|
189
|
-
alt: c,
|
|
190
|
-
width: 650,
|
|
191
|
-
height: 750,
|
|
192
|
-
priority: !0,
|
|
193
|
-
fetchPriority: "high"
|
|
194
|
-
}) }) : /* @__PURE__ */ t("div", { className: l.media, children: d });
|
|
195
|
-
});
|
|
196
|
-
export {
|
|
197
|
-
oe as H,
|
|
198
|
-
v as N,
|
|
199
|
-
te as V,
|
|
200
|
-
Q as a,
|
|
201
|
-
m as b,
|
|
202
|
-
l as s
|
|
203
|
-
};
|