@windstream/react-shared-components 0.1.96 → 0.1.98
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/contentful/index.d.ts +5 -0
- package/dist/contentful/index.esm.js +2 -2
- package/dist/contentful/index.esm.js.map +1 -1
- package/dist/contentful/index.js +2 -2
- package/dist/contentful/index.js.map +1 -1
- package/dist/core.d.ts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/next/index.esm.js.map +1 -1
- package/dist/next/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/utils/index.esm.js +1 -1
- package/dist/utils/index.esm.js.map +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/animation-wrapper/index.tsx +5 -0
- package/src/components/animation-wrapper/types.ts +7 -1
- package/src/components/brand-button/index.tsx +1 -1
- package/src/contentful/blocks/breadcrumbs/index.tsx +2 -2
- package/src/contentful/blocks/button/index.tsx +24 -3
- package/src/contentful/blocks/button/types.ts +1 -0
- package/src/contentful/blocks/email-input-block/index.tsx +16 -7
- package/src/contentful/blocks/find-kinetic/index.tsx +61 -35
- package/src/contentful/blocks/find-kinetic/types.ts +1 -0
- package/src/contentful/blocks/image-promo-bar/helper.tsx +1 -1
- package/src/contentful/blocks/image-promo-bar/index.tsx +38 -10
- package/src/contentful/blocks/image-promo-bar/types.ts +3 -0
- package/src/contentful/blocks/image-promo-bar/youtube-embed.tsx +1 -1
- package/src/contentful/blocks/shape-background-wrapper/index.tsx +5 -2
- package/src/hooks/contentful/use-contentful-rich-text.tsx +6 -2
|
@@ -17,7 +17,7 @@ export const PlayButton: React.FC<PlayButtonProps> = ({
|
|
|
17
17
|
name="play_arrow"
|
|
18
18
|
size={72 as any}
|
|
19
19
|
fill={1}
|
|
20
|
-
className={`transition-colors duration-300 ${
|
|
20
|
+
className={`max-w-[72px] transition-colors duration-300 ${
|
|
21
21
|
isOuterHovered
|
|
22
22
|
? "text-text-brand"
|
|
23
23
|
: "text-slate-500 group-hover:text-text-brand"
|
|
@@ -31,7 +31,10 @@ export const ImagePromoBar: React.FC<ImagePromoBarProps> = ({
|
|
|
31
31
|
color = "light",
|
|
32
32
|
imageWidth = 660,
|
|
33
33
|
imageHeight = 660,
|
|
34
|
+
useOriginalImageAspectRatio = false,
|
|
35
|
+
isAboveTheFold = false,
|
|
34
36
|
onModalButtonClick,
|
|
37
|
+
onClick,
|
|
35
38
|
renderCheckPlans,
|
|
36
39
|
}) => {
|
|
37
40
|
const [activeVideo, setActiveVideo] = useState("");
|
|
@@ -61,9 +64,9 @@ export const ImagePromoBar: React.FC<ImagePromoBarProps> = ({
|
|
|
61
64
|
const contentVideo = videoLink && videoImage ? embedSelector() : null;
|
|
62
65
|
|
|
63
66
|
return (
|
|
64
|
-
<div className="component-container shared-component-ipb">
|
|
67
|
+
<div className="component-container shared-component-ipb pb-16 pt-16">
|
|
65
68
|
<div
|
|
66
|
-
className={`image-promo-bar-content ${maxWidth ? "max-w-120 xl:mx-auto" : ""}
|
|
69
|
+
className={`image-promo-bar-content ${maxWidth ? "max-w-120 xl:mx-auto" : ""} px-5 pb-8 pt-8 md:px-10`}
|
|
67
70
|
>
|
|
68
71
|
<div
|
|
69
72
|
className={`flex shrink-0 flex-col items-center gap-8 xl:items-stretch xl:gap-10 xl:gap-[126px] ${mediaPosition ? "xl:flex-row-reverse" : "xl:flex-row"}`}
|
|
@@ -113,6 +116,7 @@ export const ImagePromoBar: React.FC<ImagePromoBarProps> = ({
|
|
|
113
116
|
listContainerClassName="mt-0 space-y-0 flex flex-col gap-3"
|
|
114
117
|
/>
|
|
115
118
|
)}
|
|
119
|
+
{ctaDisclaimer && <div>{ctaDisclaimer}</div>}
|
|
116
120
|
{imageLinks.length > 0 && (
|
|
117
121
|
<div className="flex gap-4">
|
|
118
122
|
{/* Image Links Collection */}
|
|
@@ -143,6 +147,7 @@ export const ImagePromoBar: React.FC<ImagePromoBarProps> = ({
|
|
|
143
147
|
size={{ base: "large" }}
|
|
144
148
|
renderCheckPlans={renderCheckPlans}
|
|
145
149
|
onModalButtonClick={onModalButtonClick}
|
|
150
|
+
onClick={(e: React.MouseEvent) => onClick?.(e, "primary")}
|
|
146
151
|
/>
|
|
147
152
|
</div>
|
|
148
153
|
)}
|
|
@@ -154,23 +159,42 @@ export const ImagePromoBar: React.FC<ImagePromoBarProps> = ({
|
|
|
154
159
|
size={{ base: "large" }}
|
|
155
160
|
renderCheckPlans={renderCheckPlans}
|
|
156
161
|
onModalButtonClick={onModalButtonClick}
|
|
162
|
+
onClick={(e: React.MouseEvent) =>
|
|
163
|
+
onClick?.(e, "secondary")
|
|
164
|
+
}
|
|
157
165
|
/>
|
|
158
166
|
</div>
|
|
159
167
|
)}
|
|
160
168
|
</div>
|
|
161
169
|
)}
|
|
162
|
-
{ctaDisclaimer && <div>{ctaDisclaimer}</div>}
|
|
163
170
|
</div>
|
|
164
|
-
<aside className="flex w-full shrink-0 items-center justify-center lg:w-auto">
|
|
171
|
+
<aside className="flex w-full flex-1 shrink-0 items-center justify-center lg:w-auto">
|
|
165
172
|
{/* Media Section */}
|
|
166
173
|
{image && (
|
|
167
|
-
<div
|
|
174
|
+
<div
|
|
175
|
+
className={cx(
|
|
176
|
+
!useOriginalImageAspectRatio
|
|
177
|
+
? "relative aspect-[16/9] w-full overflow-hidden rounded-image lg:h-[486px] xl:aspect-square xl:max-h-[486px] xl:w-[486px]"
|
|
178
|
+
: "overflow-hidden rounded-image"
|
|
179
|
+
)}
|
|
180
|
+
>
|
|
168
181
|
<NextImage
|
|
169
182
|
src={image}
|
|
170
183
|
alt="section-image"
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
184
|
+
priority={isAboveTheFold}
|
|
185
|
+
fill={!useOriginalImageAspectRatio}
|
|
186
|
+
width={
|
|
187
|
+
!useOriginalImageAspectRatio ? undefined : imageWidth || 660
|
|
188
|
+
}
|
|
189
|
+
height={
|
|
190
|
+
!useOriginalImageAspectRatio
|
|
191
|
+
? undefined
|
|
192
|
+
: imageHeight || 660
|
|
193
|
+
}
|
|
194
|
+
sizes="(max-width: 430px) 100vw, (max-width: 834px) 100vw, 50vw"
|
|
195
|
+
className={cx(
|
|
196
|
+
!useOriginalImageAspectRatio ? "object-cover" : "w-full"
|
|
197
|
+
)}
|
|
174
198
|
/>
|
|
175
199
|
</div>
|
|
176
200
|
)}
|
|
@@ -212,7 +236,9 @@ export const ImagePromoBar: React.FC<ImagePromoBarProps> = ({
|
|
|
212
236
|
<div
|
|
213
237
|
className={cx(
|
|
214
238
|
"aspect-[16/9] w-full overflow-hidden rounded-image transition-opacity duration-300",
|
|
215
|
-
isPlaying ? "opacity-100" : "opacity-0"
|
|
239
|
+
isPlaying ? "opacity-100" : "opacity-0",
|
|
240
|
+
!useOriginalImageAspectRatio &&
|
|
241
|
+
"xl:aspect-square xl:max-h-[486px] xl:w-[486px]"
|
|
216
242
|
)}
|
|
217
243
|
>
|
|
218
244
|
{contentVideo}
|
|
@@ -239,7 +265,9 @@ export const ImagePromoBar: React.FC<ImagePromoBarProps> = ({
|
|
|
239
265
|
</div>
|
|
240
266
|
)}
|
|
241
267
|
{disclaimer && (
|
|
242
|
-
<div className="mt-10 flex justify-center xl:mt-18">
|
|
268
|
+
<div className="mt-10 flex justify-center xl:mt-18">
|
|
269
|
+
<div>{disclaimer}</div>
|
|
270
|
+
</div>
|
|
243
271
|
)}
|
|
244
272
|
</div>
|
|
245
273
|
);
|
|
@@ -22,6 +22,8 @@ export type ImagePromoBarProps = {
|
|
|
22
22
|
image: string;
|
|
23
23
|
imageWidth: number;
|
|
24
24
|
imageHeight: number;
|
|
25
|
+
useOriginalImageAspectRatio?: boolean;
|
|
26
|
+
isAboveTheFold?: boolean;
|
|
25
27
|
mediaPosition: boolean;
|
|
26
28
|
description: React.ReactNode;
|
|
27
29
|
openDescriptionLinksOnANewTab: boolean;
|
|
@@ -35,6 +37,7 @@ export type ImagePromoBarProps = {
|
|
|
35
37
|
maxWidth?: boolean;
|
|
36
38
|
color: "light" | "dark";
|
|
37
39
|
onModalButtonClick?: (id?: string) => void;
|
|
40
|
+
onClick?: (event: React.MouseEvent, source: "primary" | "secondary") => void;
|
|
38
41
|
renderCheckPlans?: (overrides?: CheckPlansProps) => React.ReactNode;
|
|
39
42
|
};
|
|
40
43
|
|
|
@@ -46,7 +46,10 @@ export const ShapeBackgroundWrapper: React.FC<ShapeBackgroundWrapperProps> = ({
|
|
|
46
46
|
|
|
47
47
|
if (!show) {
|
|
48
48
|
return (
|
|
49
|
-
<div
|
|
49
|
+
<div
|
|
50
|
+
className={`shared-component-backgound-wrapper ${className ?? ""} ${bgClass ?? ""}`}
|
|
51
|
+
style={bgStyle}
|
|
52
|
+
>
|
|
50
53
|
{children}
|
|
51
54
|
</div>
|
|
52
55
|
);
|
|
@@ -54,7 +57,7 @@ export const ShapeBackgroundWrapper: React.FC<ShapeBackgroundWrapperProps> = ({
|
|
|
54
57
|
|
|
55
58
|
return (
|
|
56
59
|
<div
|
|
57
|
-
className={`shape-bg relative overflow-hidden ${className ?? ""} ${maxFit ? "max-content" : ""} ${
|
|
60
|
+
className={`shared-component-backgound-wrapper shape-bg relative overflow-hidden ${className ?? ""} ${maxFit ? "max-content" : ""} ${
|
|
58
61
|
bgClass ?? (!bgStyle ? "bg-white" : "")
|
|
59
62
|
}`}
|
|
60
63
|
style={bgStyle}
|
|
@@ -60,8 +60,12 @@ const defaultOptions: Options = {
|
|
|
60
60
|
</Text>
|
|
61
61
|
),
|
|
62
62
|
[BLOCKS.QUOTE]: (_node, children) => <blockquote>{children}</blockquote>,
|
|
63
|
-
[BLOCKS.UL_LIST]: (_node, children) =>
|
|
64
|
-
|
|
63
|
+
[BLOCKS.UL_LIST]: (_node, children) => (
|
|
64
|
+
<ul className="list-disc pl-6">{children}</ul>
|
|
65
|
+
),
|
|
66
|
+
[BLOCKS.OL_LIST]: (_node, children) => (
|
|
67
|
+
<ol className="list-decimal pl-6">{children}</ol>
|
|
68
|
+
),
|
|
65
69
|
[BLOCKS.LIST_ITEM]: (_node, children) => <li>{children}</li>,
|
|
66
70
|
|
|
67
71
|
[INLINES.HYPERLINK]: (node, children) => {
|