@windstream/react-shared-components 0.1.71 → 0.1.73

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.
Files changed (36) hide show
  1. package/dist/contentful/index.d.ts +104 -28
  2. package/dist/contentful/index.esm.js +2 -2
  3. package/dist/contentful/index.esm.js.map +1 -1
  4. package/dist/contentful/index.js +2 -2
  5. package/dist/contentful/index.js.map +1 -1
  6. package/dist/core.d.ts +3 -3
  7. package/dist/index.d.ts +3 -3
  8. package/dist/index.esm.js.map +1 -1
  9. package/dist/index.js.map +1 -1
  10. package/dist/next/index.esm.js.map +1 -1
  11. package/dist/next/index.js.map +1 -1
  12. package/dist/styles.css +1 -1
  13. package/dist/utils/index.d.ts +12 -1
  14. package/dist/utils/index.esm.js +1 -1
  15. package/dist/utils/index.esm.js.map +1 -1
  16. package/dist/utils/index.js +1 -1
  17. package/dist/utils/index.js.map +1 -1
  18. package/package.json +1 -1
  19. package/src/components/next-image/index.tsx +3 -1
  20. package/src/contentful/blocks/accordion/Accordion.stories.mocks.tsx +8 -8
  21. package/src/contentful/blocks/accordion/Accordion.stories.tsx +5 -13
  22. package/src/contentful/blocks/anchored-bottom-banner/index.tsx +114 -3
  23. package/src/contentful/blocks/anchored-bottom-banner/types.ts +4 -1
  24. package/src/contentful/blocks/callout/index.tsx +201 -37
  25. package/src/contentful/blocks/callout/types.ts +56 -3
  26. package/src/contentful/blocks/cards/floating-image-card/index.tsx +119 -0
  27. package/src/contentful/blocks/cards/floating-image-card/types.ts +30 -0
  28. package/src/contentful/blocks/cards/full-image-card/index.tsx +130 -0
  29. package/src/contentful/blocks/cards/full-image-card/types.ts +29 -0
  30. package/src/contentful/blocks/cards/simple-card/index.tsx +294 -58
  31. package/src/contentful/blocks/cards/simple-card/types.ts +47 -4
  32. package/src/contentful/blocks/comparison-table/index.tsx +3 -1
  33. package/src/contentful/blocks/footer/Footer.stories.tsx +145 -32
  34. package/src/hooks/contentful/use-contentful-rich-text.tsx +5 -3
  35. package/src/utils/index.ts +3 -0
  36. package/src/utils/speed-card-bg.ts +24 -0
@@ -1,4 +1,5 @@
1
1
  import { Footer } from "./index";
2
+
2
3
  import { DocsPage } from "@shared/stories/DocsTemplate";
3
4
  import type { Meta, StoryObj } from "@storybook/react";
4
5
 
@@ -27,11 +28,13 @@ const meta: Meta<typeof Footer> = {
27
28
  argTypes: {
28
29
  body: {
29
30
  control: "text",
30
- description: "HTML string for disclaimer or promotional body content at top of footer",
31
+ description:
32
+ "HTML string for disclaimer or promotional body content at top of footer",
31
33
  },
32
34
  copyrights: {
33
35
  control: "text",
34
- description: "HTML string for copyright description text rendered below the year",
36
+ description:
37
+ "HTML string for copyright description text rendered below the year",
35
38
  },
36
39
  terms: {
37
40
  control: "text",
@@ -64,14 +67,46 @@ const meta: Meta<typeof Footer> = {
64
67
  title: "Explore",
65
68
  items: {
66
69
  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" },
70
+ {
71
+ buttonLabel: "Fiber Internet",
72
+ href: "/fiber-internet",
73
+ showButtonAs: "text",
74
+ },
75
+ {
76
+ buttonLabel: "High-Speed Internet",
77
+ href: "/high-speed-internet",
78
+ showButtonAs: "text",
79
+ },
80
+ {
81
+ buttonLabel: "Whole Home Wi-Fi",
82
+ href: "/whole-home-wifi",
83
+ showButtonAs: "text",
84
+ },
85
+ {
86
+ buttonLabel: "Internet Security",
87
+ href: "/kinetic-secure-packs",
88
+ showButtonAs: "text",
89
+ },
90
+ {
91
+ buttonLabel: "AT&T Wireless",
92
+ href: "/att-wireless",
93
+ showButtonAs: "text",
94
+ },
95
+ {
96
+ buttonLabel: "TV & Entertainment",
97
+ href: "/products",
98
+ showButtonAs: "text",
99
+ },
100
+ {
101
+ buttonLabel: "Home Phone",
102
+ href: "/home-phone",
103
+ showButtonAs: "text",
104
+ },
105
+ {
106
+ buttonLabel: "Kinetic Wi-Fi Manager",
107
+ href: "/wifi-manager",
108
+ showButtonAs: "text",
109
+ },
75
110
  ],
76
111
  },
77
112
  },
@@ -80,14 +115,46 @@ const meta: Meta<typeof Footer> = {
80
115
  items: {
81
116
  items: [
82
117
  { 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" },
118
+ {
119
+ buttonLabel: "Find Local",
120
+ href: "/find-local",
121
+ showButtonAs: "text",
122
+ },
123
+ {
124
+ buttonLabel: "Go Kinetic Customer Portal",
125
+ href: "https://www.my.gokinetic.com/",
126
+ showButtonAs: "text",
127
+ },
128
+ {
129
+ buttonLabel: "Move My Service",
130
+ href: "/moving-my-internet-service",
131
+ showButtonAs: "text",
132
+ },
133
+ {
134
+ buttonLabel: "Kinetic Blog",
135
+ href: "/blog",
136
+ showButtonAs: "text",
137
+ },
138
+ {
139
+ buttonLabel: "Referral Program",
140
+ href: "/refer-a-friend-program",
141
+ showButtonAs: "text",
142
+ },
143
+ {
144
+ buttonLabel: "Lifeline Assistance Program",
145
+ href: "/lifeline",
146
+ showButtonAs: "text",
147
+ },
148
+ {
149
+ buttonLabel: "Digital Literacy Program",
150
+ href: "/residential/digital-literacy-program",
151
+ showButtonAs: "text",
152
+ },
153
+ {
154
+ buttonLabel: "Become an Authorized Dealer",
155
+ href: "/authorized-dealer",
156
+ showButtonAs: "text",
157
+ },
91
158
  ],
92
159
  },
93
160
  },
@@ -98,12 +165,36 @@ const meta: Meta<typeof Footer> = {
98
165
  { buttonLabel: "About Us", href: "/about", showButtonAs: "text" },
99
166
  { buttonLabel: "Careers", href: "/careers", showButtonAs: "text" },
100
167
  { 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" },
168
+ {
169
+ buttonLabel: "Investor Relations",
170
+ href: "https://investor.windstream.com",
171
+ showButtonAs: "text",
172
+ },
173
+ {
174
+ buttonLabel: "Suppliers",
175
+ href: "/about/supplier-information",
176
+ showButtonAs: "text",
177
+ },
178
+ {
179
+ buttonLabel: "Offer Conditions",
180
+ href: "/offer-conditions",
181
+ showButtonAs: "text",
182
+ },
183
+ {
184
+ buttonLabel: "Broadband Network Statement",
185
+ href: "/about/legal/broadband-network-statement",
186
+ showButtonAs: "text",
187
+ },
188
+ {
189
+ buttonLabel: "Law Enforcement Support Center",
190
+ href: "/law-enforcement-support-center-2",
191
+ showButtonAs: "text",
192
+ },
193
+ {
194
+ buttonLabel: "Call Authentication Statement",
195
+ href: "/about/legal/call-authentication-statement",
196
+ showButtonAs: "text",
197
+ },
107
198
  ],
108
199
  },
109
200
  },
@@ -112,16 +203,36 @@ const meta: Meta<typeof Footer> = {
112
203
  items: {
113
204
  items: [
114
205
  { buttonLabel: "Residential", href: "/", showButtonAs: "text" },
115
- { buttonLabel: "Business", href: "/business", showButtonAs: "text" },
116
- { buttonLabel: "Uniti Solutions", href: "/enterprise", showButtonAs: "text" },
206
+ {
207
+ buttonLabel: "Business",
208
+ href: "/business",
209
+ showButtonAs: "text",
210
+ },
211
+ {
212
+ buttonLabel: "Uniti Solutions",
213
+ href: "/enterprise",
214
+ showButtonAs: "text",
215
+ },
117
216
  ],
118
217
  },
119
218
  },
120
219
  ],
121
220
  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" },
221
+ {
222
+ buttonLabel: "Privacy Policy",
223
+ href: "/about/legal/privacy-policy",
224
+ showButtonAs: "text",
225
+ },
226
+ {
227
+ buttonLabel: "Terms & Conditions",
228
+ href: "/about/legal/terms-and-conditions",
229
+ showButtonAs: "text",
230
+ },
231
+ {
232
+ buttonLabel: "Legal Notice",
233
+ href: "/about/legal/legal-notices",
234
+ showButtonAs: "text",
235
+ },
125
236
  ],
126
237
  },
127
238
  render: ({ body, copyrights, ...rest }) => (
@@ -177,7 +288,8 @@ export const FullWidth: Story = {
177
288
  parameters: {
178
289
  docs: {
179
290
  description: {
180
- story: "Footer without max-width constraint — spans full container width.",
291
+ story:
292
+ "Footer without max-width constraint — spans full container width.",
181
293
  },
182
294
  },
183
295
  },
@@ -191,7 +303,8 @@ export const Minimal: Story = {
191
303
  parameters: {
192
304
  docs: {
193
305
  description: {
194
- story: "Minimal footer with only terms and copyright text — no body, no links.",
306
+ story:
307
+ "Minimal footer with only terms and copyright text — no body, no links.",
195
308
  },
196
309
  },
197
310
  },
@@ -201,4 +314,4 @@ export const Minimal: Story = {
201
314
  bottomLinks: [],
202
315
  copyrights: undefined,
203
316
  },
204
- };
317
+ };
@@ -206,7 +206,9 @@ export function renderContentfulRichTextTable(
206
206
  ...defaultOptions, // Spread defaultOptions so <p> and <strong> still work!
207
207
  renderMark: {
208
208
  ...defaultOptions.renderMark,
209
- [MARKS.BOLD]: text => <strong className="label4 md:label2">{text}</strong>,
209
+ [MARKS.BOLD]: text => (
210
+ <strong className="label4 md:label2">{text}</strong>
211
+ ),
210
212
  },
211
213
  renderNode: {
212
214
  ...defaultOptions.renderNode,
@@ -231,7 +233,7 @@ export function renderContentfulRichTextTable(
231
233
  const isScrollable = node.parent?.content.length > 2;
232
234
  return (
233
235
  <th
234
- className={`label4 md:label2 break-words py-4 text-center ${isScrollable ? "sticky left-0 z-20 w-[50vw] min-w-[50vw] first:z-30 first:w-[50vw] first:min-w-[50vw] first:border-r" : "w-1/4 first:w-1/2"} `}
236
+ className={`label4 break-words py-4 text-center md:label2 ${isScrollable ? "sticky left-0 z-20 w-[50vw] min-w-[50vw] first:z-30 first:w-[50vw] first:min-w-[50vw] first:border-r" : "w-1/4 first:w-1/2"} `}
235
237
  >
236
238
  {children}
237
239
  </th>
@@ -260,7 +262,7 @@ export function renderContentfulRichTextTable(
260
262
 
261
263
  return (
262
264
  <td
263
- className={`rt-table-cell footnote md:body2 leading-5 md:leading-7 text-text break-words bg-white py-2 text-center align-top first:text-left ${
265
+ className={`rt-table-cell footnote break-words bg-white py-2 md:py-4 text-center align-top leading-5 text-text md:body2 first:text-left md:leading-7 ${
264
266
  isScrollable
265
267
  ? "w-[50vw] min-w-[50vw] first:sticky first:left-0 first:z-10 first:w-[50vw] first:min-w-[50vw] first:border-r"
266
268
  : "w-1/4 first:w-1/2"
@@ -1,6 +1,9 @@
1
1
  export { cx, clsx } from "./cx";
2
2
  export type { ClassValue } from "./cx";
3
3
 
4
+ // Decorative SVG generators
5
+ export { SpeedCardBg } from "./speed-card-bg";
6
+
4
7
  // UTM & Cookie utilities
5
8
  export {
6
9
  getUTMs,
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Returns an inline SVG string for the SpeedCard pinwheel decorative
3
+ * background. The two paths are filled with the provided color so callers
4
+ * can theme the background dynamically (used by SimpleCard when
5
+ * `showBackgroundImage` is enabled and a `pinwheelColor` is provided).
6
+ *
7
+ * Output is intended to be embedded as a `data:image/svg+xml;utf8,...`
8
+ * `background-image`. Encode the result with `encodeURIComponent`.
9
+ */
10
+ export const SpeedCardBg = (color: string = "#24A76A"): string => {
11
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="684" height="107" viewBox="0 0 684 107" fill="none">
12
+ <g clip-path="url(#clip0_12352_9042)">
13
+ <path d="M154.09 -70.5605C173.769 -7.58032 204.79 24.8889 328.202 55.2823C444.619 83.9133 629.479 141.332 667.653 80.7015C691.679 45.2165 678.322 -5.62201 670.537 -46.3554C664.452 -73.1846 658.327 -97.1939 652.913 -123.475C651.135 -132.091 638.766 -131.974 637.067 -123.318C628.136 -77.6888 612.526 -44.9062 577.593 -22.4637C517.962 20.1889 377.954 -6.48361 303.148 -38.287C223.245 -70.7171 200.918 -132.366 195.425 -199.341C193.37 -235.257 198.467 -269.841 208.07 -299.569C210.915 -308.303 199.218 -314.178 193.844 -306.697C151.324 -247.751 137.69 -140.395 154.129 -70.5213" fill="${color}" />
14
+ <path d="M167.605 -417.382C104.062 -397.877 71.302 -367.131 40.6368 -244.813C11.7499 -129.428 -46.182 53.7941 14.9903 91.6292C50.7927 115.443 102.086 102.204 143.183 94.4883C170.253 88.4567 194.476 82.3858 220.992 77.02C229.686 75.2574 229.568 62.9983 220.834 61.3141C174.797 52.4624 141.721 36.9915 119.078 2.36813C76.0441 -56.7345 102.955 -195.502 135.043 -269.645C167.763 -348.84 229.963 -370.969 297.537 -376.414C333.774 -378.45 368.667 -373.398 398.661 -363.88C407.473 -361.06 413.401 -372.654 405.853 -377.98C346.38 -420.124 238.064 -433.636 167.565 -417.343" fill="${color}" />
15
+ </g>
16
+ <defs>
17
+ <clipPath id="clip0_12352_9042">
18
+ <rect width="684" height="107" fill="white" />
19
+ </clipPath>
20
+ </defs>
21
+ </svg>`;
22
+ };
23
+
24
+ export default SpeedCardBg;