quirk-ui 0.0.519 → 0.0.520
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index14.css');const s=require("react/jsx-runtime"),l=require("../../ui/PortableTextRenderer/index.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index14.css');const s=require("react/jsx-runtime"),l=require("../../ui/PortableTextRenderer/index.cjs"),I=require("../../ui/CallToActions/index.cjs"),V=require("next/image"),W=require("../../hooks/useStyleClasses.cjs"),y="_content_ivubr_1",N="_container_ivubr_7",H="_metrics_ivubr_34",$="_metric_ivubr_34",B="_metricValue_ivubr_50",C="_disclaimer_ivubr_71",k="_layoutHImageRight_ivubr_76",w="_heading_ivubr_80",R="_image_ivubr_85",z="_noImage_ivubr_95",g="_layoutHImageLeft_ivubr_99",T="_layoutVImageTop_ivubr_118",q="_layoutVImageBottom_ivubr_131",L="_title_ivubr_151",S="_text_ivubr_156",D="_cta_ivubr_170",U="_headingHorizontal_ivubr_178",P="_titleWrapper_ivubr_187",F="_headingVertical_ivubr_208",M="_videoWrapper_ivubr_229",Y="_maxWidth_ivubr_257",E="_fullBleed_ivubr_267",e={content:y,container:N,metrics:H,metric:$,metricValue:B,disclaimer:C,layoutHImageRight:k,heading:w,image:R,noImage:z,layoutHImageLeft:g,layoutVImageTop:T,layoutVImageBottom:q,title:L,text:S,cta:D,headingHorizontal:U,titleWrapper:P,headingVertical:F,videoWrapper:M,default:"_default_ivubr_249",maxWidth:Y,fullBleed:E};function G({layout:r,heading:i,image:t,video:o,metrics:u,callToAction:c,disclaimer:_,styleOptions:a}){var m;const x=W.useStyleClasses(a),d={"--container-max-width":(a==null?void 0:a.maxWidth)??"unset","--gap":r==null?void 0:r.gap},h={"--max-width":(t==null?void 0:t.display)==="max-width"?t==null?void 0:t.maxWidth:"unset"},v={"no-image":e.noImage,"horizontal-image-right":e.layoutHImageRight,"horizontal-image-left":e.layoutHImageLeft,"vertical-image-top":e.layoutVImageTop,"vertical-image-bottom":e.layoutVImageBottom}[(r==null?void 0:r.orientation)??"horizontal-image-right"],b={horizontal:e.headingHorizontal,vertical:e.headingVertical}[i.headingLayout??"horizontal"],p={default:e.default,"max-width":e.maxWidth,"full-bleed":e.fullBleed}[(t==null?void 0:t.display)??"default"],f=()=>{if(!o)return null;const n=o.includes("vimeo.com"),j=o.includes("youtube.com")||o.includes("youtu.be");return n||j?s.jsx("div",{style:{maxWidth:(t==null?void 0:t.maxWidth)??"unset",flex:.65},children:s.jsx("div",{className:e.videoWrapper,children:s.jsx("iframe",{src:n?`${o}?autoplay=0&muted=0&loop=0`:`${o}?autoplay=0&mute=0&loop=0}`,allow:"autoplay; fullscreen",allowFullScreen:!0})})}):s.jsx("div",{style:{maxWidth:(t==null?void 0:t.maxWidth)??"unset",width:"100%",flex:.65},children:s.jsx("div",{className:e.videoWrapper,children:s.jsx("video",{src:o,controls:!0,poster:(t==null?void 0:t.imageUrl)||void 0})})})};return s.jsx("section",{className:`${x} ${e.content}`,children:s.jsxs("article",{className:`${e.container} ${v}`,style:d||{},children:[s.jsxs("div",{className:`${e.heading} ${b}`,children:[s.jsxs("div",{className:e.titleWrapper,children:[i.eyebrow&&s.jsx(l.RichText,{blocks:i.eyebrow}),i.title&&s.jsx(l.RichText,{className:e.title,blocks:i.title})]}),((i==null?void 0:i.description)||(c==null?void 0:c.items))&&s.jsxs("div",{className:e.text,children:[i.description&&s.jsx(l.RichText,{blocks:i.description}),u&&s.jsx("div",{className:e.metrics,children:u.map(n=>s.jsxs("div",{className:e.metric,children:[s.jsx("div",{className:e.metricValue,children:n.metricValue}),n.metricDescription&&s.jsx(l.RichText,{blocks:n.metricDescription})]},n._key))}),c&&s.jsx(I.CallToActions,{className:e.cta,items:c.items,alignment:c.alignment}),_&&s.jsx(l.RichText,{className:e.disclaimer,blocks:_})]})]}),(r==null?void 0:r.orientation)!=="no-image"&&o?f():(r==null?void 0:r.orientation)!=="no-image"&&t&&t.imageUrls&&s.jsx("div",{className:`${e.image} ${p}`,style:h,children:s.jsx(V,{src:(m=t==null?void 0:t.imageUrls)==null?void 0:m.small,alt:(t==null?void 0:t.asset.altText)||(t==null?void 0:t.asset.description)||"Content image",width:600,height:400,priority:!0})})]})})}exports.ContentBlock=G;
|
|
@@ -1,68 +1,69 @@
|
|
|
1
1
|
import { jsx as r, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import { RichText as c } from "../../ui/PortableTextRenderer/index.mjs";
|
|
3
|
-
import { CallToActions as
|
|
4
|
-
import
|
|
5
|
-
import { useStyleClasses as
|
|
6
|
-
import '../../../assets/index14.css';const
|
|
7
|
-
content:
|
|
8
|
-
container:
|
|
9
|
-
metrics:
|
|
10
|
-
metric:
|
|
11
|
-
metricValue:
|
|
12
|
-
disclaimer:
|
|
13
|
-
layoutHImageRight:
|
|
14
|
-
heading:
|
|
15
|
-
image:
|
|
16
|
-
noImage:
|
|
17
|
-
layoutHImageLeft:
|
|
18
|
-
layoutVImageTop:
|
|
19
|
-
layoutVImageBottom:
|
|
20
|
-
title:
|
|
21
|
-
text:
|
|
22
|
-
cta:
|
|
23
|
-
headingHorizontal:
|
|
24
|
-
titleWrapper:
|
|
25
|
-
headingVertical:
|
|
26
|
-
videoWrapper:
|
|
3
|
+
import { CallToActions as W } from "../../ui/CallToActions/index.mjs";
|
|
4
|
+
import N from "next/image";
|
|
5
|
+
import { useStyleClasses as y } from "../../hooks/useStyleClasses.mjs";
|
|
6
|
+
import '../../../assets/index14.css';const H = "_content_ivubr_1", w = "_container_ivubr_7", B = "_metrics_ivubr_34", $ = "_metric_ivubr_34", z = "_metricValue_ivubr_50", k = "_disclaimer_ivubr_71", C = "_layoutHImageRight_ivubr_76", g = "_heading_ivubr_80", L = "_image_ivubr_85", R = "_noImage_ivubr_95", D = "_layoutHImageLeft_ivubr_99", U = "_layoutVImageTop_ivubr_118", j = "_layoutVImageBottom_ivubr_131", S = "_title_ivubr_151", F = "_text_ivubr_156", T = "_cta_ivubr_170", Y = "_headingHorizontal_ivubr_178", q = "_titleWrapper_ivubr_187", E = "_headingVertical_ivubr_208", G = "_videoWrapper_ivubr_229", J = "_maxWidth_ivubr_257", K = "_fullBleed_ivubr_267", e = {
|
|
7
|
+
content: H,
|
|
8
|
+
container: w,
|
|
9
|
+
metrics: B,
|
|
10
|
+
metric: $,
|
|
11
|
+
metricValue: z,
|
|
12
|
+
disclaimer: k,
|
|
13
|
+
layoutHImageRight: C,
|
|
14
|
+
heading: g,
|
|
15
|
+
image: L,
|
|
16
|
+
noImage: R,
|
|
17
|
+
layoutHImageLeft: D,
|
|
18
|
+
layoutVImageTop: U,
|
|
19
|
+
layoutVImageBottom: j,
|
|
20
|
+
title: S,
|
|
21
|
+
text: F,
|
|
22
|
+
cta: T,
|
|
23
|
+
headingHorizontal: Y,
|
|
24
|
+
titleWrapper: q,
|
|
25
|
+
headingVertical: E,
|
|
26
|
+
videoWrapper: G,
|
|
27
27
|
default: "_default_ivubr_249",
|
|
28
|
-
maxWidth:
|
|
29
|
-
fullBleed:
|
|
28
|
+
maxWidth: J,
|
|
29
|
+
fullBleed: K
|
|
30
30
|
};
|
|
31
|
-
function
|
|
31
|
+
function O({
|
|
32
32
|
layout: i,
|
|
33
33
|
heading: o,
|
|
34
34
|
image: t,
|
|
35
35
|
video: s,
|
|
36
|
-
metrics:
|
|
37
|
-
callToAction:
|
|
38
|
-
disclaimer:
|
|
36
|
+
metrics: u,
|
|
37
|
+
callToAction: a,
|
|
38
|
+
disclaimer: d,
|
|
39
39
|
styleOptions: _
|
|
40
40
|
}) {
|
|
41
|
-
|
|
41
|
+
var h;
|
|
42
|
+
const p = y(_), m = {
|
|
42
43
|
"--container-max-width": (_ == null ? void 0 : _.maxWidth) ?? "unset",
|
|
43
44
|
"--gap": i == null ? void 0 : i.gap
|
|
44
|
-
}, p = {
|
|
45
|
-
"--max-width": (t == null ? void 0 : t.display) === "max-width" ? t == null ? void 0 : t.maxWidth : "unset"
|
|
46
45
|
}, v = {
|
|
46
|
+
"--max-width": (t == null ? void 0 : t.display) === "max-width" ? t == null ? void 0 : t.maxWidth : "unset"
|
|
47
|
+
}, b = {
|
|
47
48
|
"no-image": e.noImage,
|
|
48
49
|
"horizontal-image-right": e.layoutHImageRight,
|
|
49
50
|
"horizontal-image-left": e.layoutHImageLeft,
|
|
50
51
|
"vertical-image-top": e.layoutVImageTop,
|
|
51
52
|
"vertical-image-bottom": e.layoutVImageBottom
|
|
52
|
-
}[(i == null ? void 0 : i.orientation) ?? "horizontal-image-right"],
|
|
53
|
+
}[(i == null ? void 0 : i.orientation) ?? "horizontal-image-right"], f = {
|
|
53
54
|
horizontal: e.headingHorizontal,
|
|
54
55
|
vertical: e.headingVertical
|
|
55
|
-
}[o.headingLayout ?? "horizontal"],
|
|
56
|
+
}[o.headingLayout ?? "horizontal"], x = {
|
|
56
57
|
default: e.default,
|
|
57
58
|
"max-width": e.maxWidth,
|
|
58
59
|
"full-bleed": e.fullBleed
|
|
59
|
-
}[(t == null ? void 0 : t.display) ?? "default"],
|
|
60
|
+
}[(t == null ? void 0 : t.display) ?? "default"], I = () => {
|
|
60
61
|
if (!s) return null;
|
|
61
|
-
const
|
|
62
|
-
return
|
|
62
|
+
const l = s.includes("vimeo.com"), V = s.includes("youtube.com") || s.includes("youtu.be");
|
|
63
|
+
return l || V ? /* @__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(
|
|
63
64
|
"iframe",
|
|
64
65
|
{
|
|
65
|
-
src:
|
|
66
|
+
src: l ? `${s}?autoplay=0&muted=0&loop=0` : `${s}?autoplay=0&mute=0&loop=0}`,
|
|
66
67
|
allow: "autoplay; fullscreen",
|
|
67
68
|
allowFullScreen: !0
|
|
68
69
|
}
|
|
@@ -78,43 +79,43 @@ function Z({
|
|
|
78
79
|
}
|
|
79
80
|
);
|
|
80
81
|
};
|
|
81
|
-
return /* @__PURE__ */ r("section", { className: `${
|
|
82
|
+
return /* @__PURE__ */ r("section", { className: `${p} ${e.content}`, children: /* @__PURE__ */ n(
|
|
82
83
|
"article",
|
|
83
84
|
{
|
|
84
|
-
className: `${e.container} ${
|
|
85
|
-
style:
|
|
85
|
+
className: `${e.container} ${b}`,
|
|
86
|
+
style: m || {},
|
|
86
87
|
children: [
|
|
87
|
-
/* @__PURE__ */ n("div", { className: `${e.heading} ${
|
|
88
|
+
/* @__PURE__ */ n("div", { className: `${e.heading} ${f}`, children: [
|
|
88
89
|
/* @__PURE__ */ n("div", { className: e.titleWrapper, children: [
|
|
89
90
|
o.eyebrow && /* @__PURE__ */ r(c, { blocks: o.eyebrow }),
|
|
90
91
|
o.title && /* @__PURE__ */ r(c, { className: e.title, blocks: o.title })
|
|
91
92
|
] }),
|
|
92
|
-
((o == null ? void 0 : o.description) || (
|
|
93
|
+
((o == null ? void 0 : o.description) || (a == null ? void 0 : a.items)) && /* @__PURE__ */ n("div", { className: e.text, children: [
|
|
93
94
|
o.description && /* @__PURE__ */ r(c, { blocks: o.description }),
|
|
94
|
-
|
|
95
|
-
/* @__PURE__ */ r("div", { className: e.metricValue, children:
|
|
96
|
-
|
|
97
|
-
] },
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
u && /* @__PURE__ */ r("div", { className: e.metrics, children: u.map((l) => /* @__PURE__ */ n("div", { className: e.metric, children: [
|
|
96
|
+
/* @__PURE__ */ r("div", { className: e.metricValue, children: l.metricValue }),
|
|
97
|
+
l.metricDescription && /* @__PURE__ */ r(c, { blocks: l.metricDescription })
|
|
98
|
+
] }, l._key)) }),
|
|
99
|
+
a && /* @__PURE__ */ r(
|
|
100
|
+
W,
|
|
100
101
|
{
|
|
101
102
|
className: e.cta,
|
|
102
|
-
items:
|
|
103
|
-
alignment:
|
|
103
|
+
items: a.items,
|
|
104
|
+
alignment: a.alignment
|
|
104
105
|
}
|
|
105
106
|
),
|
|
106
|
-
|
|
107
|
+
d && /* @__PURE__ */ r(c, { className: e.disclaimer, blocks: d })
|
|
107
108
|
] })
|
|
108
109
|
] }),
|
|
109
|
-
(i == null ? void 0 : i.orientation) !== "no-image" && s ?
|
|
110
|
+
(i == null ? void 0 : i.orientation) !== "no-image" && s ? I() : (i == null ? void 0 : i.orientation) !== "no-image" && t && t.imageUrls && /* @__PURE__ */ r(
|
|
110
111
|
"div",
|
|
111
112
|
{
|
|
112
|
-
className: `${e.image} ${
|
|
113
|
-
style:
|
|
113
|
+
className: `${e.image} ${x}`,
|
|
114
|
+
style: v,
|
|
114
115
|
children: /* @__PURE__ */ r(
|
|
115
|
-
|
|
116
|
+
N,
|
|
116
117
|
{
|
|
117
|
-
src: t.
|
|
118
|
+
src: (h = t == null ? void 0 : t.imageUrls) == null ? void 0 : h.small,
|
|
118
119
|
alt: (t == null ? void 0 : t.asset.altText) || (t == null ? void 0 : t.asset.description) || "Content image",
|
|
119
120
|
width: 600,
|
|
120
121
|
height: 400,
|
|
@@ -128,5 +129,5 @@ function Z({
|
|
|
128
129
|
) });
|
|
129
130
|
}
|
|
130
131
|
export {
|
|
131
|
-
|
|
132
|
+
O as ContentBlock
|
|
132
133
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index21.css');const e=require("react/jsx-runtime"),h=require("react"),a=require("../../ui/PortableTextRenderer/index.cjs"),u=require("next/image"),g=require("../../../core/components/Avatar/index.cjs"),v=require("../../../core/components/Modal/index.cjs"),y=require("../../utils/resolveLinkUrl.cjs"),k=require("../../../play-CQBnZgNa.cjs"),B="_card_rxzrj_1",U="_imageBackgroundContainer_rxzrj_15",q="_modalTrigger_rxzrj_20",L="_callToAction_rxzrj_24",I="_cardIcon_rxzrj_33",$="_label_rxzrj_49",F="_video_rxzrj_58",P="_image_rxzrj_15",M="_fullBleed_rxzrj_76",O="_content_rxzrj_80",S="_overlay_rxzrj_86",E="_description_rxzrj_104",w="_title_rxzrj_137",D="_imageLeft_rxzrj_213",G="_container_rxzrj_224",H="_imageRight_rxzrj_273",J="_imageBottom_rxzrj_327",K="_personContainer_rxzrj_342",Q="_imageTop_rxzrj_350",s={card:B,imageBackgroundContainer:U,modalTrigger:q,callToAction:L,cardIcon:I,label:$,video:F,image:P,fullBleed:M,content:O,overlay:S,description:E,title:w,default:"_default_rxzrj_145",imageLeft:D,container:G,imageRight:H,imageBottom:J,personContainer:K,imageTop:Q};function V({eyebrow:n,title:i,description:x,person:d,image:t,callToAction:r,style:o,variant:b}){const[_,f]=h.useState(void 0);h.useEffect(()=>{async function c(){if((r==null?void 0:r.type)==="link"||(r==null?void 0:r.type)==="download"){const l=await y.resolveLinkURL(r);f(l)}}c()},[r]);const R={"full-bleed":s.fullBleed,"image-left":s.imageLeft,"image-right":s.imageRight,"image-top":s.imageTop,"image-bottom":s.imageBottom}[o||"text"],N=e.jsx("div",{className:s.content,children:(r==null?void 0:r.type)==="video"?e.jsxs(e.Fragment,{children:[n&&e.jsx(a.RichText,{blocks:n}),i&&e.jsx(a.RichText,{className:s.title,blocks:i}),x&&e.jsx(a.RichText,{className:s.description,blocks:x}),d&&e.jsx(a.RichText,{blocks:d})]}):e.jsxs(e.Fragment,{children:[n&&e.jsx(a.RichText,{blocks:n}),i&&e.jsx(a.RichText,{className:s.title,blocks:i}),x&&e.jsx(a.RichText,{className:s.description,blocks:x}),d&&e.jsx(a.RichText,{blocks:d})]})}),z=e.jsx(e.Fragment,{children:t&&t.imageUrl?e.jsxs("div",{className:s.image,children:[(r==null?void 0:r.videoUrl)&&e.jsx("div",{className:s.callToAction,children:e.jsx("div",{className:s.cardIcon,children:e.jsx(k.Play,{size:45})})}),e.jsx(u,{src:t.imageUrl,alt:(t==null?void 0:t.asset.altText)||(t==null?void 0:t.asset.description)||"Card image",width:600,height:658,priority:!0,draggable:!1})]}):null}),j=()=>{switch(o){case"full-bleed":return e.jsxs("div",{className:s.imageBackgroundContainer,children:[(r==null?void 0:r.type)==="video"&&e.jsx("div",{className:s.cardIcon,children:e.jsx(k.Play,{size:45})}),e.jsx(u,{src:(t==null?void 0:t.imageUrl)??"",alt:(t==null?void 0:t.asset.altText)||(t==null?void 0:t.asset.description)||"Card image",fill:!0,priority:!1,style:{objectFit:"cover"},draggable:!1,sizes:"(min-width: 500px) 500px, 100vw"}),e.jsx("div",{className:s.overlay,children:N})]});case"image-right":case"image-left":return e.jsxs("div",{className:s.container,children:[z,e.jsxs("div",{className:s.content,children:[n&&e.jsx(a.RichText,{blocks:n}),i&&e.jsx(a.RichText,{className:s.title,blocks:i}),x&&e.jsx(a.RichText,{className:s.description,blocks:x}),d&&e.jsx(a.RichText,{blocks:d})]})]});case"image-bottom":return e.jsx("div",{className:s.container,children:e.jsxs("div",{className:s.content,children:[n&&e.jsx(a.RichText,{blocks:n}),i&&e.jsx(a.RichText,{className:s.title,blocks:i}),x&&e.jsx(a.RichText,{className:s.description,blocks:x}),e.jsxs("div",{className:s.personContainer,children:[e.jsx(g.Avatar,{src:(t==null?void 0:t.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../assets/index21.css');const e=require("react/jsx-runtime"),h=require("react"),a=require("../../ui/PortableTextRenderer/index.cjs"),u=require("next/image"),g=require("../../../core/components/Avatar/index.cjs"),v=require("../../../core/components/Modal/index.cjs"),y=require("../../utils/resolveLinkUrl.cjs"),k=require("../../../play-CQBnZgNa.cjs"),B="_card_rxzrj_1",U="_imageBackgroundContainer_rxzrj_15",q="_modalTrigger_rxzrj_20",L="_callToAction_rxzrj_24",I="_cardIcon_rxzrj_33",$="_label_rxzrj_49",F="_video_rxzrj_58",P="_image_rxzrj_15",M="_fullBleed_rxzrj_76",O="_content_rxzrj_80",S="_overlay_rxzrj_86",E="_description_rxzrj_104",w="_title_rxzrj_137",D="_imageLeft_rxzrj_213",G="_container_rxzrj_224",H="_imageRight_rxzrj_273",J="_imageBottom_rxzrj_327",K="_personContainer_rxzrj_342",Q="_imageTop_rxzrj_350",s={card:B,imageBackgroundContainer:U,modalTrigger:q,callToAction:L,cardIcon:I,label:$,video:F,image:P,fullBleed:M,content:O,overlay:S,description:E,title:w,default:"_default_rxzrj_145",imageLeft:D,container:G,imageRight:H,imageBottom:J,personContainer:K,imageTop:Q};function V({eyebrow:n,title:i,description:x,person:d,image:t,callToAction:r,style:o,variant:b}){const[_,f]=h.useState(void 0);h.useEffect(()=>{async function c(){if((r==null?void 0:r.type)==="link"||(r==null?void 0:r.type)==="download"){const l=await y.resolveLinkURL(r);f(l)}}c()},[r]);const R={"full-bleed":s.fullBleed,"image-left":s.imageLeft,"image-right":s.imageRight,"image-top":s.imageTop,"image-bottom":s.imageBottom}[o||"text"],N=e.jsx("div",{className:s.content,children:(r==null?void 0:r.type)==="video"?e.jsxs(e.Fragment,{children:[n&&e.jsx(a.RichText,{blocks:n}),i&&e.jsx(a.RichText,{className:s.title,blocks:i}),x&&e.jsx(a.RichText,{className:s.description,blocks:x}),d&&e.jsx(a.RichText,{blocks:d})]}):e.jsxs(e.Fragment,{children:[n&&e.jsx(a.RichText,{blocks:n}),i&&e.jsx(a.RichText,{className:s.title,blocks:i}),x&&e.jsx(a.RichText,{className:s.description,blocks:x}),d&&e.jsx(a.RichText,{blocks:d})]})}),z=e.jsx(e.Fragment,{children:t&&t.imageUrl?e.jsxs("div",{className:s.image,children:[(r==null?void 0:r.videoUrl)&&e.jsx("div",{className:s.callToAction,children:e.jsx("div",{className:s.cardIcon,children:e.jsx(k.Play,{size:45})})}),e.jsx(u,{src:t.imageUrl,alt:(t==null?void 0:t.asset.altText)||(t==null?void 0:t.asset.description)||"Card image",width:600,height:658,priority:!0,draggable:!1})]}):null}),j=()=>{var c,l;switch(o){case"full-bleed":return e.jsxs("div",{className:s.imageBackgroundContainer,children:[(r==null?void 0:r.type)==="video"&&e.jsx("div",{className:s.cardIcon,children:e.jsx(k.Play,{size:45})}),e.jsx(u,{src:(t==null?void 0:t.imageUrl)??"",alt:(t==null?void 0:t.asset.altText)||(t==null?void 0:t.asset.description)||"Card image",fill:!0,priority:!1,style:{objectFit:"cover"},draggable:!1,sizes:"(min-width: 500px) 500px, 100vw"}),e.jsx("div",{className:s.overlay,children:N})]});case"image-right":case"image-left":return e.jsxs("div",{className:s.container,children:[z,e.jsxs("div",{className:s.content,children:[n&&e.jsx(a.RichText,{blocks:n}),i&&e.jsx(a.RichText,{className:s.title,blocks:i}),x&&e.jsx(a.RichText,{className:s.description,blocks:x}),d&&e.jsx(a.RichText,{blocks:d})]})]});case"image-bottom":return e.jsx("div",{className:s.container,children:e.jsxs("div",{className:s.content,children:[n&&e.jsx(a.RichText,{blocks:n}),i&&e.jsx(a.RichText,{className:s.title,blocks:i}),x&&e.jsx(a.RichText,{className:s.description,blocks:x}),e.jsxs("div",{className:s.personContainer,children:[e.jsx(g.Avatar,{src:((c=t==null?void 0:t.imageUrls)==null?void 0:c.small)??"",size:"lg"}),d&&e.jsx(a.RichText,{blocks:d})]})]})});case"image-top":return e.jsxs("div",{className:s.container,children:[e.jsx(g.Avatar,{src:((l=t==null?void 0:t.imageUrls)==null?void 0:l.small)??"",size:"xl"}),e.jsxs("div",{className:s.content,children:[n&&e.jsx(a.RichText,{blocks:n}),i&&e.jsx(a.RichText,{className:s.title,blocks:i}),x&&e.jsx(a.RichText,{className:s.description,blocks:x}),d&&e.jsx(a.RichText,{blocks:d})]})]})}},p=(r==null?void 0:r.type)==="video"?s.video:s.default,C=({children:c})=>{var l,m;switch(r==null?void 0:r.type){case"link":return e.jsx("a",{"aria-label":r.ariaLabel||r.label,href:_,target:((l=r.linkOptions)==null?void 0:l.linkType)==="external"?"_blank":"_self",rel:((m=r.linkOptions)==null?void 0:m.linkType)==="external"?"noopener noreferrer":"",children:c});case"modal":return e.jsx(v.Modal,{className:s.modalTrigger,trigger:c,content:r.modalContent});case"video":return e.jsx(v.Modal,{className:s.modalTrigger,trigger:c,content:e.jsx("video",{src:r.videoUrl,controls:!0,autoPlay:!0})});case"download":return e.jsx("a",{"aria-label":r.ariaLabel||r.label,href:_,download:!0,target:"_blank",rel:"noopener noreferrer",children:c})}};return e.jsx("article",{className:`${s.card} ${R??""} ${s[b]} ${p}`,children:(r==null?void 0:r.type)!=="none"?e.jsx(C,{children:j()}):e.jsx(e.Fragment,{children:j()})})}exports.TestimonialCard=V;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e, jsxs as o, Fragment as _ } from "react/jsx-runtime";
|
|
2
2
|
import { useState as U, useEffect as L } from "react";
|
|
3
|
-
import { RichText as
|
|
3
|
+
import { RichText as t } from "../../ui/PortableTextRenderer/index.mjs";
|
|
4
4
|
import u from "next/image";
|
|
5
5
|
import { Avatar as x } from "../../../core/components/Avatar/index.mjs";
|
|
6
6
|
import { Modal as h } from "../../../core/components/Modal/index.mjs";
|
|
@@ -28,12 +28,12 @@ import '../../../assets/index21.css';const R = "_card_rxzrj_1", $ = "_imageBackg
|
|
|
28
28
|
personContainer: W,
|
|
29
29
|
imageTop: X
|
|
30
30
|
};
|
|
31
|
-
function
|
|
31
|
+
function te({
|
|
32
32
|
eyebrow: n,
|
|
33
33
|
title: d,
|
|
34
34
|
description: l,
|
|
35
35
|
person: i,
|
|
36
|
-
image:
|
|
36
|
+
image: a,
|
|
37
37
|
//icon,
|
|
38
38
|
callToAction: s,
|
|
39
39
|
// onHover,
|
|
@@ -43,13 +43,13 @@ function ae({
|
|
|
43
43
|
}) {
|
|
44
44
|
const [g, N] = U(void 0);
|
|
45
45
|
L(() => {
|
|
46
|
-
async function
|
|
46
|
+
async function m() {
|
|
47
47
|
if ((s == null ? void 0 : s.type) === "link" || (s == null ? void 0 : s.type) === "download") {
|
|
48
|
-
const
|
|
49
|
-
N(
|
|
48
|
+
const c = await I(s);
|
|
49
|
+
N(c);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
m();
|
|
53
53
|
}, [s]);
|
|
54
54
|
const z = {
|
|
55
55
|
"full-bleed": r.fullBleed,
|
|
@@ -59,22 +59,22 @@ function ae({
|
|
|
59
59
|
"image-top": r.imageTop,
|
|
60
60
|
"image-bottom": r.imageBottom
|
|
61
61
|
}[f || "text"], j = /* @__PURE__ */ e("div", { className: r.content, children: (s == null ? void 0 : s.type) === "video" ? /* @__PURE__ */ o(_, { children: [
|
|
62
|
-
n && /* @__PURE__ */ e(
|
|
63
|
-
d && /* @__PURE__ */ e(
|
|
64
|
-
l && /* @__PURE__ */ e(
|
|
65
|
-
i && /* @__PURE__ */ e(
|
|
62
|
+
n && /* @__PURE__ */ e(t, { blocks: n }),
|
|
63
|
+
d && /* @__PURE__ */ e(t, { className: r.title, blocks: d }),
|
|
64
|
+
l && /* @__PURE__ */ e(t, { className: r.description, blocks: l }),
|
|
65
|
+
i && /* @__PURE__ */ e(t, { blocks: i })
|
|
66
66
|
] }) : /* @__PURE__ */ o(_, { children: [
|
|
67
|
-
n && /* @__PURE__ */ e(
|
|
68
|
-
d && /* @__PURE__ */ e(
|
|
69
|
-
l && /* @__PURE__ */ e(
|
|
70
|
-
i && /* @__PURE__ */ e(
|
|
71
|
-
] }) }), C = /* @__PURE__ */ e(_, { children:
|
|
67
|
+
n && /* @__PURE__ */ e(t, { blocks: n }),
|
|
68
|
+
d && /* @__PURE__ */ e(t, { className: r.title, blocks: d }),
|
|
69
|
+
l && /* @__PURE__ */ e(t, { className: r.description, blocks: l }),
|
|
70
|
+
i && /* @__PURE__ */ e(t, { blocks: i })
|
|
71
|
+
] }) }), C = /* @__PURE__ */ e(_, { children: a && a.imageUrl ? /* @__PURE__ */ o("div", { className: r.image, children: [
|
|
72
72
|
(s == null ? void 0 : s.videoUrl) && /* @__PURE__ */ e("div", { className: r.callToAction, children: /* @__PURE__ */ e("div", { className: r.cardIcon, children: /* @__PURE__ */ e(b, { size: 45 }) }) }),
|
|
73
73
|
/* @__PURE__ */ e(
|
|
74
74
|
u,
|
|
75
75
|
{
|
|
76
|
-
src:
|
|
77
|
-
alt: (
|
|
76
|
+
src: a.imageUrl,
|
|
77
|
+
alt: (a == null ? void 0 : a.asset.altText) || (a == null ? void 0 : a.asset.description) || "Card image",
|
|
78
78
|
width: 600,
|
|
79
79
|
height: 658,
|
|
80
80
|
priority: !0,
|
|
@@ -82,6 +82,7 @@ function ae({
|
|
|
82
82
|
}
|
|
83
83
|
)
|
|
84
84
|
] }) : null }), v = () => {
|
|
85
|
+
var m, c;
|
|
85
86
|
switch (f) {
|
|
86
87
|
case "full-bleed":
|
|
87
88
|
return /* @__PURE__ */ o("div", { className: r.imageBackgroundContainer, children: [
|
|
@@ -89,8 +90,8 @@ function ae({
|
|
|
89
90
|
/* @__PURE__ */ e(
|
|
90
91
|
u,
|
|
91
92
|
{
|
|
92
|
-
src: (
|
|
93
|
-
alt: (
|
|
93
|
+
src: (a == null ? void 0 : a.imageUrl) ?? "",
|
|
94
|
+
alt: (a == null ? void 0 : a.asset.altText) || (a == null ? void 0 : a.asset.description) || "Card image",
|
|
94
95
|
fill: !0,
|
|
95
96
|
priority: !1,
|
|
96
97
|
style: { objectFit: "cover" },
|
|
@@ -105,35 +106,35 @@ function ae({
|
|
|
105
106
|
return /* @__PURE__ */ o("div", { className: r.container, children: [
|
|
106
107
|
C,
|
|
107
108
|
/* @__PURE__ */ o("div", { className: r.content, children: [
|
|
108
|
-
n && /* @__PURE__ */ e(
|
|
109
|
-
d && /* @__PURE__ */ e(
|
|
110
|
-
l && /* @__PURE__ */ e(
|
|
111
|
-
i && /* @__PURE__ */ e(
|
|
109
|
+
n && /* @__PURE__ */ e(t, { blocks: n }),
|
|
110
|
+
d && /* @__PURE__ */ e(t, { className: r.title, blocks: d }),
|
|
111
|
+
l && /* @__PURE__ */ e(t, { className: r.description, blocks: l }),
|
|
112
|
+
i && /* @__PURE__ */ e(t, { blocks: i })
|
|
112
113
|
] })
|
|
113
114
|
] });
|
|
114
115
|
case "image-bottom":
|
|
115
116
|
return /* @__PURE__ */ e("div", { className: r.container, children: /* @__PURE__ */ o("div", { className: r.content, children: [
|
|
116
|
-
n && /* @__PURE__ */ e(
|
|
117
|
-
d && /* @__PURE__ */ e(
|
|
118
|
-
l && /* @__PURE__ */ e(
|
|
117
|
+
n && /* @__PURE__ */ e(t, { blocks: n }),
|
|
118
|
+
d && /* @__PURE__ */ e(t, { className: r.title, blocks: d }),
|
|
119
|
+
l && /* @__PURE__ */ e(t, { className: r.description, blocks: l }),
|
|
119
120
|
/* @__PURE__ */ o("div", { className: r.personContainer, children: [
|
|
120
|
-
/* @__PURE__ */ e(x, { src: (
|
|
121
|
-
i && /* @__PURE__ */ e(
|
|
121
|
+
/* @__PURE__ */ e(x, { src: ((m = a == null ? void 0 : a.imageUrls) == null ? void 0 : m.small) ?? "", size: "lg" }),
|
|
122
|
+
i && /* @__PURE__ */ e(t, { blocks: i })
|
|
122
123
|
] })
|
|
123
124
|
] }) });
|
|
124
125
|
case "image-top":
|
|
125
126
|
return /* @__PURE__ */ o("div", { className: r.container, children: [
|
|
126
|
-
/* @__PURE__ */ e(x, { src: (
|
|
127
|
+
/* @__PURE__ */ e(x, { src: ((c = a == null ? void 0 : a.imageUrls) == null ? void 0 : c.small) ?? "", size: "xl" }),
|
|
127
128
|
/* @__PURE__ */ o("div", { className: r.content, children: [
|
|
128
|
-
n && /* @__PURE__ */ e(
|
|
129
|
-
d && /* @__PURE__ */ e(
|
|
130
|
-
l && /* @__PURE__ */ e(
|
|
131
|
-
i && /* @__PURE__ */ e(
|
|
129
|
+
n && /* @__PURE__ */ e(t, { blocks: n }),
|
|
130
|
+
d && /* @__PURE__ */ e(t, { className: r.title, blocks: d }),
|
|
131
|
+
l && /* @__PURE__ */ e(t, { className: r.description, blocks: l }),
|
|
132
|
+
i && /* @__PURE__ */ e(t, { blocks: i })
|
|
132
133
|
] })
|
|
133
134
|
] });
|
|
134
135
|
}
|
|
135
|
-
}, B = (s == null ? void 0 : s.type) === "video" ? r.video : r.default, y = ({ children:
|
|
136
|
-
var
|
|
136
|
+
}, B = (s == null ? void 0 : s.type) === "video" ? r.video : r.default, y = ({ children: m }) => {
|
|
137
|
+
var c, k;
|
|
137
138
|
switch (s == null ? void 0 : s.type) {
|
|
138
139
|
case "link":
|
|
139
140
|
return /* @__PURE__ */ e(
|
|
@@ -141,9 +142,9 @@ function ae({
|
|
|
141
142
|
{
|
|
142
143
|
"aria-label": s.ariaLabel || s.label,
|
|
143
144
|
href: g,
|
|
144
|
-
target: ((
|
|
145
|
+
target: ((c = s.linkOptions) == null ? void 0 : c.linkType) === "external" ? "_blank" : "_self",
|
|
145
146
|
rel: ((k = s.linkOptions) == null ? void 0 : k.linkType) === "external" ? "noopener noreferrer" : "",
|
|
146
|
-
children:
|
|
147
|
+
children: m
|
|
147
148
|
}
|
|
148
149
|
);
|
|
149
150
|
case "modal":
|
|
@@ -151,7 +152,7 @@ function ae({
|
|
|
151
152
|
h,
|
|
152
153
|
{
|
|
153
154
|
className: r.modalTrigger,
|
|
154
|
-
trigger:
|
|
155
|
+
trigger: m,
|
|
155
156
|
content: s.modalContent
|
|
156
157
|
}
|
|
157
158
|
);
|
|
@@ -160,7 +161,7 @@ function ae({
|
|
|
160
161
|
h,
|
|
161
162
|
{
|
|
162
163
|
className: r.modalTrigger,
|
|
163
|
-
trigger:
|
|
164
|
+
trigger: m,
|
|
164
165
|
content: /* @__PURE__ */ e("video", { src: s.videoUrl, controls: !0, autoPlay: !0 })
|
|
165
166
|
}
|
|
166
167
|
);
|
|
@@ -173,7 +174,7 @@ function ae({
|
|
|
173
174
|
download: !0,
|
|
174
175
|
target: "_blank",
|
|
175
176
|
rel: "noopener noreferrer",
|
|
176
|
-
children:
|
|
177
|
+
children: m
|
|
177
178
|
}
|
|
178
179
|
);
|
|
179
180
|
}
|
|
@@ -187,5 +188,5 @@ function ae({
|
|
|
187
188
|
);
|
|
188
189
|
}
|
|
189
190
|
export {
|
|
190
|
-
|
|
191
|
+
te as TestimonialCard
|
|
191
192
|
};
|