@windstream/react-shared-components 0.0.37 → 0.0.38

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 (57) hide show
  1. package/dist/contentful/index.d.ts +9 -29
  2. package/dist/contentful/index.esm.js +1 -1
  3. package/dist/contentful/index.esm.js.map +1 -1
  4. package/dist/contentful/index.js +1 -1
  5. package/dist/contentful/index.js.map +1 -1
  6. package/dist/core.d.ts +2 -2
  7. package/dist/index.esm.js +1 -1
  8. package/dist/index.esm.js.map +1 -1
  9. package/dist/index.js +1 -1
  10. package/dist/index.js.map +1 -1
  11. package/dist/styles.css +1 -1
  12. package/package.json +1 -1
  13. package/src/components/accordion/index.tsx +49 -49
  14. package/src/components/alert-card/types.ts +9 -9
  15. package/src/components/brand-button/index.tsx +93 -93
  16. package/src/components/button/index.tsx +27 -27
  17. package/src/components/button/types.ts +14 -14
  18. package/src/components/checkbox/index.tsx +197 -197
  19. package/src/components/collapse/index.tsx +46 -46
  20. package/src/components/image/types.ts +33 -33
  21. package/src/components/input/index.tsx +6 -6
  22. package/src/components/link/index.tsx +97 -97
  23. package/src/components/link/types.ts +25 -25
  24. package/src/components/list/index.tsx +88 -88
  25. package/src/components/list/list-item/index.tsx +38 -38
  26. package/src/components/list/list-item/types.ts +13 -13
  27. package/src/components/list/types.ts +29 -29
  28. package/src/components/material-icon/index.tsx +44 -44
  29. package/src/components/material-icon/types.ts +31 -31
  30. package/src/components/modal/index.tsx +164 -164
  31. package/src/components/see-more/index.tsx +44 -44
  32. package/src/components/select/index.tsx +150 -150
  33. package/src/components/skeleton/index.tsx +61 -61
  34. package/src/components/text/index.tsx +25 -25
  35. package/src/components/text/types.ts +45 -45
  36. package/src/contentful/blocks/accordion/Accordion.stories.tsx +29 -29
  37. package/src/contentful/blocks/accordion/index.tsx +52 -52
  38. package/src/contentful/blocks/accordion/types.ts +17 -17
  39. package/src/contentful/blocks/button/index.tsx +5 -0
  40. package/src/contentful/blocks/button/types.ts +1 -0
  41. package/src/contentful/blocks/callout/Callout.stories.tsx +1 -1
  42. package/src/contentful/blocks/callout/index.tsx +15 -52
  43. package/src/contentful/blocks/callout/types.ts +1 -14
  44. package/src/contentful/blocks/find-kinetic/FindKinetic.stories.tsx +23 -23
  45. package/src/contentful/blocks/find-kinetic/index.tsx +80 -80
  46. package/src/contentful/blocks/find-kinetic/types.ts +18 -18
  47. package/src/contentful/blocks/footer/index.tsx +79 -79
  48. package/src/contentful/blocks/image-promo-bar/index.tsx +154 -154
  49. package/src/contentful/blocks/navigation/index.tsx +1 -2
  50. package/src/contentful/blocks/navigation/link-groups.tsx/index.tsx +64 -62
  51. package/src/contentful/blocks/primary-hero/index.tsx +163 -64
  52. package/src/contentful/blocks/primary-hero/types.ts +1 -0
  53. package/src/contentful/index.ts +45 -48
  54. package/src/hooks/use-body-scroll-lock.ts +34 -34
  55. package/src/setupTests.ts +46 -46
  56. package/src/contentful/blocks/cards/simple-card/index.tsx +0 -45
  57. package/src/contentful/blocks/cards/simple-card/types.ts +0 -11
@@ -1,154 +1,154 @@
1
- import React from "react";
2
- import { Button } from "../button";
3
- import { ImagePromoBarProps } from "./types";
4
-
5
- import { Checklist } from "@shared/components/checklist";
6
- import { Image } from "@shared/components/image";
7
- import { NextImage } from "@shared/components/next-image";
8
- import { Text } from "@shared/components/text";
9
-
10
- export const ImagePromoBar: React.FC<ImagePromoBarProps> = ({
11
- brow,
12
- enableHeading,
13
- title,
14
- subTitle,
15
- ctaDisclaimer,
16
- disclaimer,
17
- description,
18
- image,
19
- imageLinks,
20
- mediaPosition = true,
21
- checklist,
22
- secondaryCta,
23
- cta,
24
- videoLink,
25
- maxWidth = true,
26
- color = "light",
27
- }) => {
28
- return (
29
- <div className="component-container">
30
- <div
31
- className={`image-promo-bar-content ${maxWidth ? "max-w-120 xl:mx-auto" : ""} mx-5 mb-8 mt-16`}
32
- >
33
- <div
34
- className={`flex shrink-0 flex-col items-center gap-8 xl:gap-[126px] ${mediaPosition ? "flex-row xl:flex-row-reverse" : "xl:flex-row"}`}
35
- >
36
- <div
37
- className={`flex flex-[1_0_0] flex-col items-start justify-center gap-8 xl:gap-10 ${color == "dark" ? "text-text" : "text-white"}`}
38
- >
39
- <div className="heading holder">
40
- {brow && (
41
- <Text
42
- as="div"
43
- className="subheading4 mb-4 text-text-brand xl:subheading2 xl:mb-3"
44
- >
45
- {brow}
46
- </Text>
47
- )}
48
- {title && (
49
- <Text
50
- as={enableHeading ? "h1" : "h2"}
51
- className="heading2 xl:heading1"
52
- >
53
- {title}
54
- </Text>
55
- )}
56
- {subTitle && (
57
- <Text
58
- as={enableHeading ? "h2" : "h3"}
59
- className="subheading1 mt-3"
60
- >
61
- {subTitle}
62
- </Text>
63
- )}
64
- </div>
65
- {/* Content Section */}
66
- {description && (
67
- <Text as="div" className="body1">
68
- {description}
69
- </Text>
70
- )}
71
- {/* Checklist Rendering */}
72
- {checklist.length > 0 && <Checklist items={checklist} />}
73
- {/* Image Links Collection */}
74
- {imageLinks?.map((link, index) => (
75
- <div key={index} className="image-link">
76
- <Image src={link.url} alt="icon-link" />
77
- </div>
78
- ))}
79
- {/* CTAs and Disclaimers */}
80
- <div className="flex w-full flex-col gap-8 xl:flex-row xl:gap-3">
81
- {cta && (
82
- <div className="primary-cta w-full xl:w-auto">
83
- <Button {...cta} fullWidth={true} />
84
- </div>
85
- )}
86
- {secondaryCta && (
87
- <div className="secondary-cta">
88
- <Button {...secondaryCta} fullWidth={true} />
89
- </div>
90
- )}
91
- </div>
92
- {ctaDisclaimer && <div>{ctaDisclaimer}</div>}
93
- {disclaimer && <div>{disclaimer}</div>}
94
- </div>
95
- <aside className="flex shrink-0 content-center items-center">
96
- <div>
97
- {/* Media Section */}
98
- {image && (
99
- <>
100
- <NextImage
101
- src={image}
102
- alt="section-image"
103
- width={486}
104
- height={100}
105
- className="hidden rounded-[40px] xl:block"
106
- />
107
- <NextImage
108
- src={image}
109
- alt="section-image"
110
- width={984}
111
- height={100}
112
- className="hidden rounded-[40px] lg:block xl:hidden"
113
- />
114
- <NextImage
115
- src={image}
116
- alt="section-image"
117
- width={728}
118
- height={100}
119
- className="hidden rounded-[40px] md:block lg:hidden"
120
- />
121
- <NextImage
122
- src={image}
123
- alt="section-image"
124
- width={350}
125
- height={100}
126
- className="block rounded-[40px] md:hidden"
127
- />
128
- </>
129
- )}
130
- </div>
131
- <div>
132
- {/* Video Link Section */}
133
- {videoLink?.link && (
134
- <div className="video-section">
135
- {videoLink.image && (
136
- <NextImage
137
- src={videoLink.image}
138
- alt="Video preview"
139
- width={486}
140
- height={100}
141
- className="rounded-[40px]"
142
- />
143
- )}
144
- </div>
145
- )}
146
- </div>
147
- </aside>
148
- </div>
149
- </div>
150
- </div>
151
- );
152
- };
153
-
154
- export default ImagePromoBar;
1
+ import React from "react";
2
+ import { ImagePromoBarProps } from "./types";
3
+
4
+ import { Checklist } from "@shared/components/checklist";
5
+ import { Image } from "@shared/components/image";
6
+ import { NextImage } from "@shared/components/next-image";
7
+ import { Text } from "@shared/components/text";
8
+ import { Button } from "@shared/contentful";
9
+
10
+ export const ImagePromoBar: React.FC<ImagePromoBarProps> = ({
11
+ brow,
12
+ enableHeading,
13
+ title,
14
+ subTitle,
15
+ ctaDisclaimer,
16
+ disclaimer,
17
+ description,
18
+ image,
19
+ imageLinks,
20
+ mediaPosition = true,
21
+ checklist,
22
+ secondaryCta,
23
+ cta,
24
+ videoLink,
25
+ maxWidth = true,
26
+ color = "light",
27
+ }) => {
28
+ return (
29
+ <div className="component-container">
30
+ <div
31
+ className={`image-promo-bar-content ${maxWidth ? "max-w-120 xl:mx-auto" : ""} mx-5 mb-8 mt-16`}
32
+ >
33
+ <div
34
+ className={`flex shrink-0 flex-col items-center gap-8 xl:gap-[126px] ${mediaPosition ? "flex-row xl:flex-row-reverse" : "xl:flex-row"}`}
35
+ >
36
+ <div
37
+ className={`flex flex-[1_0_0] flex-col items-start justify-center gap-8 xl:gap-10 ${color == "dark" ? "text-text" : "text-white"}`}
38
+ >
39
+ <div className="heading holder">
40
+ {brow && (
41
+ <Text
42
+ as="div"
43
+ className="subheading4 mb-4 text-text-brand xl:subheading2 xl:mb-3"
44
+ >
45
+ {brow}
46
+ </Text>
47
+ )}
48
+ {title && (
49
+ <Text
50
+ as={enableHeading ? "h1" : "h2"}
51
+ className="heading2 xl:heading1"
52
+ >
53
+ {title}
54
+ </Text>
55
+ )}
56
+ {subTitle && (
57
+ <Text
58
+ as={enableHeading ? "h2" : "h3"}
59
+ className="subheading1 mt-3"
60
+ >
61
+ {subTitle}
62
+ </Text>
63
+ )}
64
+ </div>
65
+ {/* Content Section */}
66
+ {description && (
67
+ <Text as="div" className="body1">
68
+ {description}
69
+ </Text>
70
+ )}
71
+ {/* Checklist Rendering */}
72
+ {checklist.length > 0 && <Checklist items={checklist} />}
73
+ {/* Image Links Collection */}
74
+ {imageLinks?.map((link, index) => (
75
+ <div key={index} className="image-link">
76
+ <Image src={link.url} alt="icon-link" />
77
+ </div>
78
+ ))}
79
+ {/* CTAs and Disclaimers */}
80
+ <div className="flex w-full flex-col gap-8 xl:flex-row xl:gap-3">
81
+ {cta && (
82
+ <div className="primary-cta w-full xl:w-auto">
83
+ <Button {...cta} fullWidth={true} />
84
+ </div>
85
+ )}
86
+ {secondaryCta && (
87
+ <div className="secondary-cta">
88
+ <Button {...secondaryCta} fullWidth={true} />
89
+ </div>
90
+ )}
91
+ </div>
92
+ {ctaDisclaimer && <div>{ctaDisclaimer}</div>}
93
+ {disclaimer && <div>{disclaimer}</div>}
94
+ </div>
95
+ <aside className="flex shrink-0 content-center items-center">
96
+ <div>
97
+ {/* Media Section */}
98
+ {image && (
99
+ <>
100
+ <NextImage
101
+ src={image}
102
+ alt="section-image"
103
+ width={486}
104
+ height={100}
105
+ className="hidden rounded-[40px] xl:block"
106
+ />
107
+ <NextImage
108
+ src={image}
109
+ alt="section-image"
110
+ width={984}
111
+ height={100}
112
+ className="hidden rounded-[40px] lg:block xl:hidden"
113
+ />
114
+ <NextImage
115
+ src={image}
116
+ alt="section-image"
117
+ width={728}
118
+ height={100}
119
+ className="hidden rounded-[40px] md:block lg:hidden"
120
+ />
121
+ <NextImage
122
+ src={image}
123
+ alt="section-image"
124
+ width={350}
125
+ height={100}
126
+ className="block rounded-[40px] md:hidden"
127
+ />
128
+ </>
129
+ )}
130
+ </div>
131
+ <div>
132
+ {/* Video Link Section */}
133
+ {videoLink?.link && (
134
+ <div className="video-section">
135
+ {videoLink.image && (
136
+ <NextImage
137
+ src={videoLink.image}
138
+ alt="Video preview"
139
+ width={486}
140
+ height={100}
141
+ className="rounded-[40px]"
142
+ />
143
+ )}
144
+ </div>
145
+ )}
146
+ </div>
147
+ </aside>
148
+ </div>
149
+ </div>
150
+ </div>
151
+ );
152
+ };
153
+
154
+ export default ImagePromoBar;
@@ -1,7 +1,6 @@
1
- import React from "react";
2
1
  import { LinkGroups } from "./link-groups.tsx";
3
2
  import { NavigationProps } from "./types";
4
-
3
+ import React from "react";
5
4
  export const Navigation: React.FC<NavigationProps> = ({
6
5
  // accountNavigationLinks,
7
6
  // callNowCtaIcon,
@@ -1,62 +1,64 @@
1
- import React from "react";
2
- import { Button } from "../../button";
3
- import { ButtonProps as ContentfulButtonProps } from "../../button/types";
4
-
5
- type ComponentButtonGroup = {
6
- anchorId?: string | null;
7
- title?: string | null;
8
- items?: { items?: ContentfulButtonProps[] | null } | null;
9
- };
10
-
11
- type Link = ContentfulButtonProps | ComponentButtonGroup;
12
-
13
- type LinkGroupsProps = {
14
- link?: Link;
15
- };
16
-
17
- const isButton = (link: Link): link is ContentfulButtonProps => {
18
- // If your group never has `href`, this is a simple and effective guard
19
- return typeof (link as ContentfulButtonProps).href === "string";
20
- };
21
-
22
- export const LinkGroups: React.FC<LinkGroupsProps> = ({ link }) => {
23
- if (!link) return null;
24
-
25
- // Single button
26
- if (isButton(link)) {
27
- const key = "submenu-link-btn";
28
- return (
29
- <ul>
30
- <li key={key} className="submenu-link">
31
- <Button {...link} linkVariant="unstyled" />
32
- </li>
33
- </ul>
34
- );
35
- }
36
-
37
- // Group
38
- const { anchorId, title, items } = link;
39
- const subMenu = Array.isArray(items?.items) ? items!.items! : [];
40
-
41
- const RenderSubMenu: React.FC<{ items: ContentfulButtonProps[] }> = ({
42
- items,
43
- }) => (
44
- <ul>
45
- {items.map((site, index) => {
46
- const key = `submenu-link-${index}`;
47
- return (
48
- <li key={key} className="submenu-link">
49
- <Button {...site} linkVariant="unstyled" />
50
- </li>
51
- );
52
- })}
53
- </ul>
54
- );
55
-
56
- return (
57
- <div id={anchorId ?? undefined}>
58
- <div>{title ?? null}</div>
59
- {subMenu.length > 0 && <RenderSubMenu items={subMenu} />}
60
- </div>
61
- );
62
- };
1
+ import React from "react";
2
+ import {
3
+ Button,
4
+ ButtonProps as ContentfulButtonProps,
5
+ } from "@shared/contentful";
6
+
7
+ type ComponentButtonGroup = {
8
+ anchorId?: string | null;
9
+ title?: string | null;
10
+ items?: { items?: ContentfulButtonProps[] | null } | null;
11
+ };
12
+
13
+ type Link = ContentfulButtonProps | ComponentButtonGroup;
14
+
15
+ type LinkGroupsProps = {
16
+ link?: Link;
17
+ };
18
+
19
+ const isButton = (link: Link): link is ContentfulButtonProps => {
20
+ // If your group never has `href`, this is a simple and effective guard
21
+ return typeof (link as ContentfulButtonProps).href === "string";
22
+ };
23
+
24
+ export const LinkGroups: React.FC<LinkGroupsProps> = ({ link }) => {
25
+ if (!link) return null;
26
+
27
+ // Single button
28
+ if (isButton(link)) {
29
+ const key = "submenu-link-btn";
30
+ return (
31
+ <ul>
32
+ <li key={key} className="submenu-link">
33
+ <Button {...link} linkVariant="unstyled" />
34
+ </li>
35
+ </ul>
36
+ );
37
+ }
38
+
39
+ // Group
40
+ const { anchorId, title, items } = link;
41
+ const subMenu = Array.isArray(items?.items) ? items!.items! : [];
42
+
43
+ const RenderSubMenu: React.FC<{ items: ContentfulButtonProps[] }> = ({
44
+ items,
45
+ }) => (
46
+ <ul>
47
+ {items.map((site, index) => {
48
+ const key = `submenu-link-${index}`;
49
+ return (
50
+ <li key={key} className="submenu-link">
51
+ <Button {...site} linkVariant="unstyled" />
52
+ </li>
53
+ );
54
+ })}
55
+ </ul>
56
+ );
57
+
58
+ return (
59
+ <div id={anchorId ?? undefined}>
60
+ <div>{title ?? null}</div>
61
+ {subMenu.length > 0 && <RenderSubMenu items={subMenu} />}
62
+ </div>
63
+ );
64
+ };