@windstream/react-shared-components 0.1.63 → 0.1.67
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.esm.js +1 -1
- package/dist/contentful/index.esm.js.map +1 -1
- package/dist/contentful/index.js +1 -1
- package/dist/contentful/index.js.map +1 -1
- package/dist/core.d.ts +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/contentful/blocks/accordion/Accordion.stories.mocks.tsx +128 -0
- package/src/contentful/blocks/accordion/Accordion.stories.tsx +80 -8
- package/src/contentful/blocks/blogs-grid-base/index.tsx +119 -119
- package/src/contentful/blocks/blogs-grid-base/types.ts +35 -35
- package/src/contentful/blocks/breadcrumbs/index.tsx +1 -1
- package/src/contentful/blocks/cards/blog-card/index.tsx +129 -129
- package/src/contentful/blocks/cart-retention-banner/index.tsx +33 -25
- package/src/contentful/blocks/footer/Footer.stories.tsx +181 -7
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
|
|
3
|
-
import type { TypeCartRetentionBannerFields } from "./types";
|
|
2
|
+
|
|
4
3
|
import { useEffect, useState } from "react";
|
|
4
|
+
import type { TypeCartRetentionBannerFields } from "./types";
|
|
5
|
+
|
|
6
|
+
import { Text } from "@shared/components/text";
|
|
5
7
|
import { Button } from "@shared/contentful/blocks/button";
|
|
6
8
|
import { Modal } from "@shared/contentful/blocks/modal";
|
|
7
|
-
import { toDocument } from "@shared/utils/contentful/to-document";
|
|
8
9
|
import { renderContentfulRichText } from "@shared/hooks/contentful/use-contentful-rich-text";
|
|
9
|
-
|
|
10
|
+
import { toDocument } from "@shared/utils/contentful/to-document";
|
|
10
11
|
|
|
11
12
|
const CartRetentionBanner: React.FC<{
|
|
12
13
|
fields: TypeCartRetentionBannerFields;
|
|
@@ -16,12 +17,18 @@ const CartRetentionBanner: React.FC<{
|
|
|
16
17
|
onContinueCheckout?: () => void;
|
|
17
18
|
checkShouldShowBanner?: () => boolean;
|
|
18
19
|
onBannerShown?: () => void;
|
|
19
|
-
}> = ({
|
|
20
|
+
}> = ({
|
|
21
|
+
fields,
|
|
22
|
+
isInPopupContainer = false,
|
|
23
|
+
onClose,
|
|
24
|
+
onContinueCheckout,
|
|
25
|
+
checkShouldShowBanner,
|
|
26
|
+
onBannerShown,
|
|
27
|
+
}) => {
|
|
20
28
|
const { anchorId, mainHeading, description, cta } = fields;
|
|
21
29
|
|
|
22
30
|
const [modalOpen, setModalOpen] = useState<boolean>(false);
|
|
23
31
|
|
|
24
|
-
|
|
25
32
|
useEffect(() => {
|
|
26
33
|
const checkRetentionCookie = () => {
|
|
27
34
|
if (checkShouldShowBanner?.() && !modalOpen) {
|
|
@@ -39,28 +46,30 @@ const CartRetentionBanner: React.FC<{
|
|
|
39
46
|
setModalOpen(false);
|
|
40
47
|
};
|
|
41
48
|
|
|
42
|
-
|
|
49
|
+
const continueCheckout = () => {
|
|
43
50
|
onContinueCheckout?.();
|
|
44
51
|
};
|
|
45
52
|
|
|
46
53
|
if (isInPopupContainer) {
|
|
47
54
|
return (
|
|
48
|
-
<div
|
|
49
|
-
|
|
50
|
-
|
|
55
|
+
<div
|
|
56
|
+
className="pop-up-body mb-5 mt-10 flex w-full flex-col items-center justify-center"
|
|
57
|
+
data-section-type={"cart-retention-banner"}
|
|
58
|
+
data-section-index={"0"}
|
|
59
|
+
>
|
|
60
|
+
<Text className="heading5 text-center lg:heading3">
|
|
51
61
|
{mainHeading || "Welcome back. Let’s finish your order"}
|
|
52
62
|
</Text>
|
|
53
63
|
{description &&
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
/>
|
|
64
|
+
renderContentfulRichText(
|
|
65
|
+
toDocument(description?.json),
|
|
66
|
+
false,
|
|
67
|
+
"body1 my-4"
|
|
68
|
+
)}
|
|
69
|
+
<Button
|
|
70
|
+
onClick={continueCheckout}
|
|
71
|
+
buttonLabel={cta?.buttonLabel ?? "Continue checkout"}
|
|
72
|
+
/>
|
|
64
73
|
</div>
|
|
65
74
|
);
|
|
66
75
|
}
|
|
@@ -71,10 +80,10 @@ const CartRetentionBanner: React.FC<{
|
|
|
71
80
|
isOpen={modalOpen}
|
|
72
81
|
onRequestClose={handleClose}
|
|
73
82
|
bodyClassName="flex items-center justify-center"
|
|
83
|
+
type="cart-retention-banner"
|
|
74
84
|
>
|
|
75
|
-
<div className="mb-5 mt-10 flex w-full flex-col items-center justify-center">
|
|
76
|
-
|
|
77
|
-
className="heading5 lg:heading3 text-center">
|
|
85
|
+
<div className="pop-up-body mb-5 mt-10 flex w-full flex-col items-center justify-center">
|
|
86
|
+
<Text className="heading5 text-center lg:heading3">
|
|
78
87
|
{mainHeading || "Welcome back. Let's finish your order"}
|
|
79
88
|
</Text>
|
|
80
89
|
{description &&
|
|
@@ -82,8 +91,7 @@ const CartRetentionBanner: React.FC<{
|
|
|
82
91
|
toDocument(description?.json),
|
|
83
92
|
false,
|
|
84
93
|
"body1 my-4"
|
|
85
|
-
)
|
|
86
|
-
}
|
|
94
|
+
)}
|
|
87
95
|
<Button
|
|
88
96
|
onClick={continueCheckout}
|
|
89
97
|
buttonLabel={cta?.buttonLabel ?? "Continue checkout"}
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import { Footer } from "./index";
|
|
2
|
-
|
|
3
2
|
import { DocsPage } from "@shared/stories/DocsTemplate";
|
|
4
3
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
5
4
|
|
|
5
|
+
// ─── Mock Data ────────────────────────────────────────────────────────────────
|
|
6
|
+
const mockBody = `<p><strong>Kinetic's multi-Gig Fiber upload speeds</strong> are faster than advertised cable upload speeds, excluding areas where cable providers offer symmetrical upload speeds for service tiers 1 Gig and above. Speed comparison based upon publicly available advertised speeds in Kinetic's footprint as of February 2026.</p>
|
|
7
|
+
<br/><p><strong>99.9% Network Reliability:</strong> Kinetic Network Reliability based on monthly service availability scores from March 2023 to Dec. 2025 as measured by the Kinetic Network Operations Center using the formula Available Customer Hours divided by Total Customer Hours (Available Customer Hours plus Customer Outage Hours). Customer Outage Hours does not include planned maintenance, emergency events (hurricanes, winter storms, mass flooding, etc.).</p>
|
|
8
|
+
<br/><p><strong>100% Fiber excludes some multitenant units.</strong></p>
|
|
9
|
+
<br/><p><strong>The Kinetic Promise</strong> - relies on reasonable effort to confirm Wi-Fi works in living spaces where customer grants technician access. Wi-Fi coverage & performance vary by layout, building materials, interference, & device capability. Not a guarantee of uniform coverage, speed, or error-free service. Add. equipment or wiring may be required & incur charges; certain areas/devices (e.g., detached structures or outdoor spaces) may be excluded. Customer may cancel any time.</p>`;
|
|
10
|
+
|
|
11
|
+
const mockCopyrights = `<strong>Uniti2101</strong><br/><strong>Riverfront Drive</strong><br/><strong>Little Rock, Arkansas 72202</strong><br/><br/>`;
|
|
12
|
+
|
|
6
13
|
const meta: Meta<typeof Footer> = {
|
|
7
14
|
title: "Contentful Blocks/Footer",
|
|
8
15
|
component: Footer,
|
|
9
16
|
tags: ["autodocs"],
|
|
10
17
|
parameters: {
|
|
11
|
-
layout: "
|
|
18
|
+
layout: "fullscreen",
|
|
12
19
|
docs: {
|
|
13
20
|
page: DocsPage,
|
|
14
21
|
description: {
|
|
@@ -17,14 +24,181 @@ const meta: Meta<typeof Footer> = {
|
|
|
17
24
|
},
|
|
18
25
|
},
|
|
19
26
|
},
|
|
27
|
+
argTypes: {
|
|
28
|
+
body: {
|
|
29
|
+
control: "text",
|
|
30
|
+
description: "HTML string for disclaimer or promotional body content at top of footer",
|
|
31
|
+
},
|
|
32
|
+
copyrights: {
|
|
33
|
+
control: "text",
|
|
34
|
+
description: "HTML string for copyright description text rendered below the year",
|
|
35
|
+
},
|
|
36
|
+
terms: {
|
|
37
|
+
control: "text",
|
|
38
|
+
description: "Company name shown after © year symbol",
|
|
39
|
+
},
|
|
40
|
+
links: {
|
|
41
|
+
control: "object",
|
|
42
|
+
description: "Navigation link groups rendered as columns",
|
|
43
|
+
},
|
|
44
|
+
bottomLinks: {
|
|
45
|
+
control: "object",
|
|
46
|
+
description: "Legal bottom links rendered inline with bullet separators",
|
|
47
|
+
},
|
|
48
|
+
maxWidth: {
|
|
49
|
+
control: "boolean",
|
|
50
|
+
description: "Constrains footer content to max-width centered layout",
|
|
51
|
+
},
|
|
52
|
+
onClick: {
|
|
53
|
+
action: "clicked",
|
|
54
|
+
description: "Callback fired when any footer link is clicked",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
20
57
|
args: {
|
|
21
|
-
body:
|
|
22
|
-
copyrights:
|
|
23
|
-
terms: "All rights reserved",
|
|
24
|
-
|
|
25
|
-
|
|
58
|
+
body: mockBody,
|
|
59
|
+
copyrights: mockCopyrights,
|
|
60
|
+
terms: "All rights reserved Uniti Group, Inc.",
|
|
61
|
+
maxWidth: true,
|
|
62
|
+
links: [
|
|
63
|
+
{
|
|
64
|
+
title: "Explore",
|
|
65
|
+
items: {
|
|
66
|
+
items: [
|
|
67
|
+
{ buttonLabel: "Fiber Internet", href: "/fiber-internet", showButtonAs: "text" },
|
|
68
|
+
{ buttonLabel: "High-Speed Internet", href: "/high-speed-internet", showButtonAs: "text" },
|
|
69
|
+
{ buttonLabel: "Whole Home Wi-Fi", href: "/whole-home-wifi", showButtonAs: "text" },
|
|
70
|
+
{ buttonLabel: "Internet Security", href: "/kinetic-secure-packs", showButtonAs: "text" },
|
|
71
|
+
{ buttonLabel: "AT&T Wireless", href: "/att-wireless", showButtonAs: "text" },
|
|
72
|
+
{ buttonLabel: "TV & Entertainment", href: "/products", showButtonAs: "text" },
|
|
73
|
+
{ buttonLabel: "Home Phone", href: "/home-phone", showButtonAs: "text" },
|
|
74
|
+
{ buttonLabel: "Kinetic Wi-Fi Manager", href: "/wifi-manager", showButtonAs: "text" },
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
title: "Resources",
|
|
80
|
+
items: {
|
|
81
|
+
items: [
|
|
82
|
+
{ buttonLabel: "Support", href: "/support", showButtonAs: "text" },
|
|
83
|
+
{ buttonLabel: "Find Local", href: "/find-local", showButtonAs: "text" },
|
|
84
|
+
{ buttonLabel: "Go Kinetic Customer Portal", href: "https://www.my.gokinetic.com/", showButtonAs: "text" },
|
|
85
|
+
{ buttonLabel: "Move My Service", href: "/moving-my-internet-service", showButtonAs: "text" },
|
|
86
|
+
{ buttonLabel: "Kinetic Blog", href: "/blog", showButtonAs: "text" },
|
|
87
|
+
{ buttonLabel: "Referral Program", href: "/refer-a-friend-program", showButtonAs: "text" },
|
|
88
|
+
{ buttonLabel: "Lifeline Assistance Program", href: "/lifeline", showButtonAs: "text" },
|
|
89
|
+
{ buttonLabel: "Digital Literacy Program", href: "/residential/digital-literacy-program", showButtonAs: "text" },
|
|
90
|
+
{ buttonLabel: "Become an Authorized Dealer", href: "/authorized-dealer", showButtonAs: "text" },
|
|
91
|
+
],
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
title: "Company",
|
|
96
|
+
items: {
|
|
97
|
+
items: [
|
|
98
|
+
{ buttonLabel: "About Us", href: "/about", showButtonAs: "text" },
|
|
99
|
+
{ buttonLabel: "Careers", href: "/careers", showButtonAs: "text" },
|
|
100
|
+
{ buttonLabel: "News", href: "/news", showButtonAs: "text" },
|
|
101
|
+
{ buttonLabel: "Investor Relations", href: "https://investor.windstream.com", showButtonAs: "text" },
|
|
102
|
+
{ buttonLabel: "Suppliers", href: "/about/supplier-information", showButtonAs: "text" },
|
|
103
|
+
{ buttonLabel: "Offer Conditions", href: "/offer-conditions", showButtonAs: "text" },
|
|
104
|
+
{ buttonLabel: "Broadband Network Statement", href: "/about/legal/broadband-network-statement", showButtonAs: "text" },
|
|
105
|
+
{ buttonLabel: "Law Enforcement Support Center", href: "/law-enforcement-support-center-2", showButtonAs: "text" },
|
|
106
|
+
{ buttonLabel: "Call Authentication Statement", href: "/about/legal/call-authentication-statement", showButtonAs: "text" },
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
title: "Kinetic",
|
|
112
|
+
items: {
|
|
113
|
+
items: [
|
|
114
|
+
{ buttonLabel: "Residential", href: "/", showButtonAs: "text" },
|
|
115
|
+
{ buttonLabel: "Business", href: "/business", showButtonAs: "text" },
|
|
116
|
+
{ buttonLabel: "Uniti Solutions", href: "/enterprise", showButtonAs: "text" },
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
bottomLinks: [
|
|
122
|
+
{ buttonLabel: "Privacy Policy", href: "/about/legal/privacy-policy", showButtonAs: "text" },
|
|
123
|
+
{ buttonLabel: "Terms & Conditions", href: "/about/legal/terms-and-conditions", showButtonAs: "text" },
|
|
124
|
+
{ buttonLabel: "Legal Notice", href: "/about/legal/legal-notices", showButtonAs: "text" },
|
|
125
|
+
],
|
|
26
126
|
},
|
|
127
|
+
render: ({ body, copyrights, ...rest }) => (
|
|
128
|
+
<Footer
|
|
129
|
+
{...rest}
|
|
130
|
+
body={
|
|
131
|
+
body ? (
|
|
132
|
+
<div dangerouslySetInnerHTML={{ __html: body as string }} />
|
|
133
|
+
) : undefined
|
|
134
|
+
}
|
|
135
|
+
copyrights={
|
|
136
|
+
copyrights ? (
|
|
137
|
+
<div dangerouslySetInnerHTML={{ __html: copyrights as string }} />
|
|
138
|
+
) : undefined
|
|
139
|
+
}
|
|
140
|
+
/>
|
|
141
|
+
),
|
|
27
142
|
};
|
|
143
|
+
|
|
28
144
|
export default meta;
|
|
29
145
|
type Story = StoryObj<typeof meta>;
|
|
146
|
+
|
|
30
147
|
export const Default: Story = {};
|
|
148
|
+
|
|
149
|
+
export const NoLinks: Story = {
|
|
150
|
+
parameters: {
|
|
151
|
+
docs: {
|
|
152
|
+
description: {
|
|
153
|
+
story: "Footer without navigation link group columns.",
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
args: {
|
|
158
|
+
links: [],
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
export const NoBottomLinks: Story = {
|
|
163
|
+
parameters: {
|
|
164
|
+
docs: {
|
|
165
|
+
description: {
|
|
166
|
+
story: "Footer without bottom copyright and legal links row.",
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
args: {
|
|
171
|
+
bottomLinks: [],
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
/**no max-width constraint */
|
|
176
|
+
export const FullWidth: Story = {
|
|
177
|
+
parameters: {
|
|
178
|
+
docs: {
|
|
179
|
+
description: {
|
|
180
|
+
story: "Footer without max-width constraint — spans full container width.",
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
args: {
|
|
185
|
+
maxWidth: false,
|
|
186
|
+
},
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
/**terms and copyright, no links or body */
|
|
190
|
+
export const Minimal: Story = {
|
|
191
|
+
parameters: {
|
|
192
|
+
docs: {
|
|
193
|
+
description: {
|
|
194
|
+
story: "Minimal footer with only terms and copyright text — no body, no links.",
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
args: {
|
|
199
|
+
body: undefined,
|
|
200
|
+
links: [],
|
|
201
|
+
bottomLinks: [],
|
|
202
|
+
copyrights: undefined,
|
|
203
|
+
},
|
|
204
|
+
};
|