@windstream/react-shared-components 0.2.37 → 0.2.39

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.
@@ -2,8 +2,6 @@ import React from "react";
2
2
  import { BlogCardProps } from "./types";
3
3
  import * as _NextLink from "next/link";
4
4
 
5
- // import { Button } from "@shared/components/button";
6
- import { MaterialIcon } from "@shared/components/material-icon";
7
5
  import { Text } from "@shared/components/text";
8
6
 
9
7
  // CJS/ESM interop: next/link uses standard __esModule exports so this is safe.
@@ -21,13 +19,12 @@ export const BlogCard: React.FC<BlogCardProps> = ({
21
19
  category,
22
20
  image,
23
21
  imageComponent: ImageComponent,
24
- readMoreText = "Read more",
25
22
  asGrid = true,
26
23
  index,
27
24
  }: BlogCardProps) => {
28
25
  const parentClassName = asGrid
29
- ? "flex h-full flex-col overflow-hidden rounded-card-lg bg-white shadow-drop transition-all duration-200 hover:-translate-y-0.5 hover:shadow-cardDrop"
30
- : `callout-card w-full flex h-full flex-col overflow-hidden`;
26
+ ? "group relative flex h-full flex-col overflow-hidden rounded-card-lg bg-white shadow-drop transition-all duration-200 hover:-translate-y-0.5 hover:shadow-cardDrop"
27
+ : `callout-card group relative w-full flex h-full flex-col overflow-hidden`;
31
28
 
32
29
  return (
33
30
  <article
@@ -38,42 +35,40 @@ export const BlogCard: React.FC<BlogCardProps> = ({
38
35
  >
39
36
  {/* Image (hidden in list view) */}
40
37
  {asGrid && (
41
- <Link href={href} tabIndex={-1} aria-hidden="true" className="block">
42
- <div className="h-[232px] w-full flex-shrink-0 overflow-hidden bg-gray-100">
43
- {image ? (
44
- ImageComponent ? (
45
- <ImageComponent
46
- src={image.src}
47
- alt={image.alt}
48
- width={image.width}
49
- height={image.height}
50
- className="h-full w-full object-cover transition-transform duration-300 hover:scale-[1.03]"
51
- sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw"
52
- />
53
- ) : (
54
- <img
55
- src={image.src}
56
- alt={image.alt}
57
- width={image.width}
58
- height={image.height}
59
- loading="lazy"
60
- decoding="async"
61
- className="h-full w-full object-cover transition-transform duration-300 hover:scale-[1.03]"
62
- />
63
- )
38
+ <div className="block h-[232px] w-full flex-shrink-0 overflow-hidden bg-gray-100">
39
+ {image ? (
40
+ ImageComponent ? (
41
+ <ImageComponent
42
+ src={image.src}
43
+ alt={image.alt}
44
+ width={image.width}
45
+ height={image.height}
46
+ className="h-full w-full object-cover transition-transform duration-300 group-hover:scale-[1.03]"
47
+ sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw"
48
+ />
64
49
  ) : (
65
- <div
66
- className="h-full w-full bg-gradient-to-br from-gray-200 to-gray-100"
67
- aria-hidden="true"
50
+ <img
51
+ src={image.src}
52
+ alt={image.alt}
53
+ width={image.width}
54
+ height={image.height}
55
+ loading="lazy"
56
+ decoding="async"
57
+ className="h-full w-full object-cover transition-transform duration-300 group-hover:scale-[1.03]"
68
58
  />
69
- )}
70
- </div>
71
- </Link>
59
+ )
60
+ ) : (
61
+ <div
62
+ className="h-full w-full bg-gradient-to-br from-gray-200 to-gray-100"
63
+ aria-hidden="true"
64
+ />
65
+ )}
66
+ </div>
72
67
  )}
73
68
 
74
69
  {/* Body */}
75
70
  <div
76
- className={`flex flex-1 flex-col ${
71
+ className={`flex flex-1 flex-col ${
77
72
  asGrid ? "gap-5 p-6 md:p-8" : "gap-1 border-b p-3 md:p-4"
78
73
  }`}
79
74
  >
@@ -94,12 +89,14 @@ export const BlogCard: React.FC<BlogCardProps> = ({
94
89
 
95
90
  {/* Title */}
96
91
  {title && (
97
- <Link
98
- href={href}
99
- className="heading6 m-0 line-clamp-3 font-black transition-colors duration-150 hover:text-text-brand"
100
- >
101
- {title}
102
- </Link>
92
+ <Text as="h2" className="heading6">
93
+ <Link
94
+ href={href}
95
+ className="m-0 line-clamp-3 font-black transition-colors duration-150 after:absolute after:inset-0 after:z-10 after:content-[''] hover:text-text-brand group-hover:text-text-brand"
96
+ >
97
+ {title}
98
+ </Link>
99
+ </Text>
103
100
  )}
104
101
 
105
102
  {/* Excerpt */}
@@ -108,29 +105,16 @@ export const BlogCard: React.FC<BlogCardProps> = ({
108
105
  {description}
109
106
  </Text>
110
107
  )}
111
-
112
- {/* Read more (hidden in list view) */}
113
- {asGrid && (
114
- <Link
115
- href={href}
116
- className="group mt-auto inline-flex items-center justify-start gap-2 pt-3 text-sm text-text-brand no-underline"
117
- aria-label={`${readMoreText} about ${title || "this article"}`}
118
- >
119
- <Text
120
- aria-label={`${readMoreText} about ${title || "this article"}`}
121
- className="label1 text-nowrap"
122
- >
123
- {readMoreText}
124
- </Text>
125
- <MaterialIcon
126
- name="expand_circle_right"
127
- fill={1}
128
- size={24}
129
- weight="200"
130
- />
131
- </Link>
132
- )}
133
108
  </div>
109
+
110
+ {/* Fallback stretched link keeps the card navigable when no title link is rendered */}
111
+ {!title && (
112
+ <Link
113
+ href={href}
114
+ aria-label={category ?? "Read more"}
115
+ className="absolute inset-0 z-10"
116
+ />
117
+ )}
134
118
  </article>
135
119
  );
136
120
  };
@@ -26,7 +26,6 @@ export interface BlogCardProps {
26
26
  };
27
27
  /** Pass next/image's Image component here to enable image optimization */
28
28
  imageComponent?: React.ComponentType<BlogCardImageProps>;
29
- readMoreText?: string;
30
29
  asGrid?: boolean;
31
30
  index?: number;
32
31
  }
@@ -53,7 +53,11 @@ export const PrimaryHero: React.FC<PrimaryHeroProps> = props => {
53
53
  const hasDesktopVideo = !!desktopVideoUrl;
54
54
  const hasMobileVideo = !!mobileVideoUrl;
55
55
  const bottomLinkLabel = bottomLink?.buttonLabel ?? bottomLink?.label;
56
- const textColorClass = textColor === "light" ? " text-white" : " text-text";
56
+ const baseTextColorClass = textColor === "dark" ? "text-text" : "text-white";
57
+ const textColorClass =
58
+ hasDesktopVideo && textColor === "dark"
59
+ ? `${baseTextColorClass} xl:text-white`
60
+ : baseTextColorClass;
57
61
  return (
58
62
  <div className="component-container relative overflow-hidden p-4 sm:px-6 sm:py-12 xl:flex xl:min-h-[724px] xl:items-center xl:px-10">
59
63
  {hasDesktopVideo ? (
@@ -91,7 +95,7 @@ export const PrimaryHero: React.FC<PrimaryHeroProps> = props => {
91
95
  </Text>
92
96
  )}
93
97
  {subTitle && (
94
- <Text as="p" className="subheading3 lg:subheading1">
98
+ <Text as="p" className="subheading3">
95
99
  {subTitle}
96
100
  </Text>
97
101
  )}
@@ -127,7 +131,10 @@ export const PrimaryHero: React.FC<PrimaryHeroProps> = props => {
127
131
  {pricingDescription ? (
128
132
  <Text
129
133
  data-cy="hero-pricing-description"
130
- className={cx("subheading1", "text-left sm:text-center xl:text-left")}
134
+ className={cx(
135
+ "subheading1",
136
+ "text-left sm:text-center xl:text-left"
137
+ )}
131
138
  >
132
139
  {pricingDescription}
133
140
  </Text>
@@ -206,7 +213,7 @@ export const PrimaryHero: React.FC<PrimaryHeroProps> = props => {
206
213
  renderCheckPlans={renderCheckPlans}
207
214
  onModalButtonClick={onModalButtonClick}
208
215
  fullWidth={true}
209
- buttonClassName="md:w-auto text-center"
216
+ buttonClassName="lg:w-auto text-center"
210
217
  />
211
218
  </div>
212
219
  )}
@@ -219,14 +226,14 @@ export const PrimaryHero: React.FC<PrimaryHeroProps> = props => {
219
226
  renderCheckPlans={renderCheckPlans}
220
227
  onModalButtonClick={onModalButtonClick}
221
228
  fullWidth={true}
222
- buttonClassName="md:w-auto text-center"
229
+ buttonClassName="lg:w-auto text-center"
223
230
  />
224
231
  </div>
225
232
  )}
226
233
  </>
227
234
  )}
228
235
  {secondaryCtaPrefix || secondaryCta ? (
229
- <div className="hidden md:flex">
236
+ <div className="hidden lg:flex">
230
237
  {secondaryCtaPrefix && (
231
238
  <Text as="span" className="body2 mr-1">
232
239
  {secondaryCtaPrefix}
@@ -244,7 +251,7 @@ export const PrimaryHero: React.FC<PrimaryHeroProps> = props => {
244
251
 
245
252
  {/* desktop bottom link */}
246
253
  {bottomLink && (bottomLinkLabel || bottomLink?.href) && (
247
- <div className="hidden md:block">
254
+ <div className="hidden lg:block">
248
255
  <Button
249
256
  {...bottomLink}
250
257
  linkClassName={`text-footnote ${textColorClass}`}
@@ -303,7 +310,7 @@ export const PrimaryHero: React.FC<PrimaryHeroProps> = props => {
303
310
 
304
311
  {secondaryCtaPrefix || secondaryCta ? (
305
312
  <div
306
- className={`flex flex-wrap items-center ${textColorClass} md:hidden`}
313
+ className={`flex flex-wrap items-center ${textColorClass} lg:hidden`}
307
314
  >
308
315
  {secondaryCtaPrefix && (
309
316
  <Text as="span" className="body2 mr-1">
@@ -321,7 +328,7 @@ export const PrimaryHero: React.FC<PrimaryHeroProps> = props => {
321
328
  ) : null}
322
329
 
323
330
  {bottomLink && (bottomLinkLabel || bottomLink?.href) && (
324
- <div className="md:hidden">
331
+ <div className="lg:hidden">
325
332
  <Button
326
333
  {...bottomLink}
327
334
  onModalButtonClick={onModalButtonClick}