@windstream/react-shared-components 0.0.15 → 0.0.17
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 +26 -4
- 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 +1 -1
- package/dist/index.d.ts +6 -6
- package/package.json +1 -1
- package/src/contentful/blocks/cta-callout/index.tsx +22 -20
- package/src/contentful/blocks/footer/index.tsx +51 -48
- package/src/contentful/blocks/primary-hero/index.tsx +72 -2
- package/src/contentful/blocks/primary-hero/types.ts +25 -1
package/dist/core.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ declare const Input: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAtt
|
|
|
59
59
|
size?: "slim" | "medium" | "large" | undefined;
|
|
60
60
|
label?: string | undefined;
|
|
61
61
|
errorText?: string | undefined;
|
|
62
|
-
prefixIconName?: "
|
|
62
|
+
prefixIconName?: "location_on" | "search" | undefined;
|
|
63
63
|
prefixIconSize?: 20 | 24 | 40 | 48 | undefined;
|
|
64
64
|
prefixIconFill?: boolean | undefined;
|
|
65
65
|
suffixIconFill?: boolean | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -55,15 +55,15 @@ type InputFieldProps = Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & {
|
|
|
55
55
|
|
|
56
56
|
declare const InputField: ForwardRefRenderFunction<HTMLInputElement, InputFieldProps>;
|
|
57
57
|
declare const Input: React$1.ForwardRefExoticComponent<Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size"> & {
|
|
58
|
-
state?: "default" | "
|
|
59
|
-
size?: "
|
|
58
|
+
state?: "default" | "error" | "filled" | "active" | "focus" | "hover" | undefined;
|
|
59
|
+
size?: "medium" | "large" | "slim" | undefined;
|
|
60
60
|
label?: string | undefined;
|
|
61
61
|
errorText?: string | undefined;
|
|
62
|
-
prefixIconName?: "
|
|
62
|
+
prefixIconName?: "search" | "location_on" | undefined;
|
|
63
63
|
prefixIconSize?: 20 | 24 | 40 | 48 | undefined;
|
|
64
64
|
prefixIconFill?: boolean | undefined;
|
|
65
65
|
suffixIconFill?: boolean | undefined;
|
|
66
|
-
suffixIconName?: "visibility" | "
|
|
66
|
+
suffixIconName?: "visibility" | "lock" | "visibility_off" | undefined;
|
|
67
67
|
suffixIconSize?: 20 | 24 | 40 | 48 | undefined;
|
|
68
68
|
containerClassName?: string | undefined;
|
|
69
69
|
prefixIconClassName?: string | undefined;
|
|
@@ -130,7 +130,7 @@ interface ListItemProps extends LiHTMLAttributes<HTMLLIElement> {
|
|
|
130
130
|
|
|
131
131
|
declare const ListItem: React$1.ForwardRefExoticComponent<ListItemProps & React$1.RefAttributes<HTMLLIElement>>;
|
|
132
132
|
|
|
133
|
-
declare const List: React__default.ForwardRefExoticComponent<ListProps & React__default.RefAttributes<
|
|
133
|
+
declare const List: React__default.ForwardRefExoticComponent<ListProps & React__default.RefAttributes<HTMLOListElement | HTMLUListElement>>;
|
|
134
134
|
|
|
135
135
|
declare const iconNameList: readonly ["info", "download", "featured_seasonal_and_gifts", "visibility", "paid", "check_box", "check_box_outline_blank", "radio_button_unchecked", "radio_button_checked", "counter_1", "counter_2", "counter_3", "error", "search", "cancel", "router", "broadcast_on_home", "check", "check_circle", "lock", "shield_lock", "phone_in_talk", "call", "chevron_left", "chevron_right", "keyboard_arrow_down", "keyboard_arrow_up", "arrow_back", "arrow_forward", "help", "home_pin", "location_on", "timer", "schedule", "add", "remove", "bolt", "rocket", "cloud_sync", "close", "groups", "speed", "mail", "credit_card", "language", "forum", "contract", "local_atm", "headset_mic", "sensors", "wifi", "settings", "home", "devices", "build", "thumb_up", "desktop_windows", "block", "all_inclusive", "verified_user", "extension", "stadia_controller", "visibility_off", "close_fullscreen", "progress_activity", "travel_explore", "share", "business_center", "upload", "videocam", "expand_circle_right", "add_circle", "do_not_disturb_on", "expand_circle_up", "expand_circle_down", "replay", "fiber_manual_record", "menu", "dangerous"];
|
|
136
136
|
declare const OpticalSizes: readonly ["20dp", "24dp", "40dp", "48dp"];
|
|
@@ -295,7 +295,7 @@ type ButtonCustomProps = {
|
|
|
295
295
|
};
|
|
296
296
|
type ButtonProps = ButtonCustomProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children" | "className">;
|
|
297
297
|
|
|
298
|
-
declare const BrandButton: React$1.ForwardRefExoticComponent<_shared_components_brand_button_types.ButtonCustomProps & Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, "
|
|
298
|
+
declare const BrandButton: React$1.ForwardRefExoticComponent<_shared_components_brand_button_types.ButtonCustomProps & Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, "children" | "className"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
299
299
|
|
|
300
300
|
declare const Checklist: React__default.FC<ChecklistProps>;
|
|
301
301
|
|
package/package.json
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
import React from "react";
|
|
3
2
|
import { CtaCalloutProps, ThemeKey } from "./types";
|
|
4
3
|
import { Text } from "@shared/components/text";
|
|
@@ -25,28 +24,31 @@ export const CtaCallout: React.FC<CtaCalloutProps> = ({
|
|
|
25
24
|
navy: "bg-[#00002D]",
|
|
26
25
|
};
|
|
27
26
|
return (
|
|
28
|
-
<div
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<Text
|
|
32
|
-
as={enableHeading ? "h1" : "h2"}
|
|
33
|
-
className={`heading2 lg:heading1 text-${contentAlignment}`}
|
|
27
|
+
<div className={`${bgColorClasses[background]} component-container`}>
|
|
28
|
+
<div
|
|
29
|
+
className={`${maxWidth ? "mx-auto max-w-120" : ""} flex flex-col text-${color} px-5 py-16 lg:px-13 lg:py-24 `}
|
|
34
30
|
>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
<
|
|
31
|
+
<Text
|
|
32
|
+
as={enableHeading ? "h1" : "h2"}
|
|
33
|
+
className={`heading2 lg:heading1 text-${contentAlignment}`}
|
|
34
|
+
>
|
|
35
|
+
{title}
|
|
36
|
+
</Text>
|
|
37
|
+
<Text
|
|
38
|
+
as="h3"
|
|
39
|
+
className={`subheading3 pt-2 lg:pt-3 lg:subheading1 text-${contentAlignment}`}
|
|
40
|
+
>
|
|
41
|
+
{subTitle}
|
|
42
|
+
</Text>
|
|
43
|
+
<div className={`text-body1 pt-2 lg:pt-3 text-${descriptionAlignment}`}>
|
|
44
|
+
{description}
|
|
45
|
+
</div>
|
|
46
|
+
<div className="pt-5 lg:pt-14 flex justify-center ">
|
|
47
|
+
<Button {...button} />
|
|
48
|
+
</div>
|
|
48
49
|
</div>
|
|
49
50
|
</div>
|
|
51
|
+
|
|
50
52
|
);
|
|
51
53
|
};
|
|
52
54
|
export default CtaCallout;
|
|
@@ -10,60 +10,63 @@ export const Footer: React.FC<FooterProps> = ({
|
|
|
10
10
|
maxWidth = true,
|
|
11
11
|
}) => {
|
|
12
12
|
return (
|
|
13
|
-
<div
|
|
14
|
-
className={` ${maxWidth ? "mx-auto max-w-120" : ""} px-5 py-8 lg:px-[120px] lg:py-18`}
|
|
15
|
-
>
|
|
16
|
-
<div>{body}</div>
|
|
13
|
+
<div className="component-container bg-bg-surface-inverse text-white">
|
|
17
14
|
<div
|
|
18
|
-
className={
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
15
|
+
className={` ${maxWidth ? "mx-auto max-w-120" : ""} px-5 py-8 lg:px-[120px] lg:py-18`}
|
|
16
|
+
>
|
|
17
|
+
<div>{body}</div>
|
|
18
|
+
<div
|
|
19
|
+
className={
|
|
20
|
+
"bg-white h-[1px] border-t-0 opacity-100 dark:opacity-50 my-8 lg:my-16"
|
|
21
|
+
}
|
|
22
|
+
/>
|
|
23
|
+
<div className="grid-1 grid gap-8 md:grid-cols-2 lg:grid-cols-4 py-8">
|
|
24
|
+
{links?.map((link: any, index: number) => (
|
|
25
|
+
<div key={`footer-link-group-${index}`}>
|
|
26
|
+
<div className="site-links-group" key={`link-group-${index}`}>
|
|
27
|
+
<div>{link?.title}</div>
|
|
28
|
+
<div className="flex flex-col">
|
|
29
|
+
{link?.itemsCollection?.items?.map(
|
|
30
|
+
(site: any, _index: number) => (
|
|
31
|
+
<div className="pt-3" key={`site-links-${_index}`}>
|
|
32
|
+
<Button {...site} />
|
|
33
|
+
</div>
|
|
34
|
+
),
|
|
35
|
+
)}
|
|
36
|
+
</div>
|
|
35
37
|
</div>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
/>
|
|
42
|
-
</>
|
|
43
|
-
))}
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<div className="pt-8">
|
|
47
|
-
<p className="copy-rights">{copyrights}</p>
|
|
48
|
-
<p className="terms-text text-sm font-normal ">
|
|
49
|
-
© {new Date().getFullYear()} {terms}
|
|
50
|
-
</p>
|
|
51
|
-
<ul className="bottom-links list-none">
|
|
52
|
-
{bottomLinks?.map((link: any, index: number) => (
|
|
53
|
-
<li
|
|
54
|
-
key={`links-${index}`}
|
|
55
|
-
className="relative float-left pl-[8px] first-of-type:pl-0 first-of-type:before:content-[''] before:content-['•'] before:absolute before:left-[3px] before:top-1/2 before:-translate-y-1/2 before:text-[14px]"
|
|
56
|
-
>
|
|
57
|
-
<Button
|
|
58
|
-
{...link}
|
|
59
|
-
className="text-sm font-normal"
|
|
60
|
-
linkVariant="unstyled"
|
|
38
|
+
<div
|
|
39
|
+
className={
|
|
40
|
+
"bg-white h-[1px] border-t-0 opacity-100 dark:opacity-50 block md:hidden "
|
|
41
|
+
}
|
|
61
42
|
/>
|
|
62
|
-
</
|
|
43
|
+
</div>
|
|
63
44
|
))}
|
|
64
|
-
</
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div className="pt-8">
|
|
48
|
+
<p className="copy-rights">{copyrights}</p>
|
|
49
|
+
<p className="terms-text text-sm font-normal ">
|
|
50
|
+
© {new Date().getFullYear()} {terms}
|
|
51
|
+
</p>
|
|
52
|
+
<ul className="bottom-links list-none">
|
|
53
|
+
{bottomLinks?.map((link: any, index: number) => (
|
|
54
|
+
<li
|
|
55
|
+
key={`links-${index}`}
|
|
56
|
+
className="relative float-left pl-[8px] first-of-type:pl-0 first-of-type:before:content-[''] before:content-['•'] before:absolute before:left-[3px] before:top-1/2 before:-translate-y-1/2 before:text-[14px]"
|
|
57
|
+
>
|
|
58
|
+
<Button
|
|
59
|
+
{...link}
|
|
60
|
+
className="text-sm font-normal"
|
|
61
|
+
linkVariant="unstyled"
|
|
62
|
+
/>
|
|
63
|
+
</li>
|
|
64
|
+
))}
|
|
65
|
+
</ul>
|
|
66
|
+
</div>
|
|
65
67
|
</div>
|
|
66
68
|
</div>
|
|
69
|
+
|
|
67
70
|
);
|
|
68
71
|
};
|
|
69
72
|
|
|
@@ -1,7 +1,77 @@
|
|
|
1
1
|
import { PrimaryHeroProps } from "./types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export const PrimaryHero: React.FC<PrimaryHeroProps> = ({
|
|
4
|
+
maxWidth = true,
|
|
5
|
+
title,
|
|
6
|
+
showAsHeading,
|
|
7
|
+
subTitle,
|
|
8
|
+
price,
|
|
9
|
+
priceSuffix,
|
|
10
|
+
priceCallout,
|
|
11
|
+
pricingDescription,
|
|
12
|
+
pricingDescriptionDisclaimer,
|
|
13
|
+
checklist,
|
|
14
|
+
logoLockup,
|
|
15
|
+
checkAvailabilityEyebrow,
|
|
16
|
+
primaryCtaPrefix1,
|
|
17
|
+
primaryCtaPrefix2,
|
|
18
|
+
primaryCta1,
|
|
19
|
+
primaryCta2,
|
|
20
|
+
secondaryCtaPrefix,
|
|
21
|
+
secondaryCta,
|
|
22
|
+
carouselImages,
|
|
23
|
+
squareImage,
|
|
24
|
+
badgeImage,
|
|
25
|
+
bottomLink,
|
|
26
|
+
}) => {
|
|
27
|
+
return (
|
|
28
|
+
<div className="component-container">
|
|
29
|
+
<div
|
|
30
|
+
className={`primary-hero-container ${maxWidth ? "mx-auto max-w-120" : ""}`}
|
|
31
|
+
>
|
|
32
|
+
{/* Text Content */}
|
|
33
|
+
{title && <div>{title}</div>}
|
|
34
|
+
{showAsHeading && <div>Heading Mode: {String(showAsHeading)}</div>}
|
|
35
|
+
{subTitle && <div>{subTitle}</div>}
|
|
2
36
|
|
|
3
|
-
|
|
4
|
-
|
|
37
|
+
{/* Pricing Section */}
|
|
38
|
+
{price && <div>{price}</div>}
|
|
39
|
+
{priceSuffix && <div>{priceSuffix}</div>}
|
|
40
|
+
{priceCallout && <div>{priceCallout}</div>}
|
|
41
|
+
{pricingDescription && <div>{pricingDescription}</div>}
|
|
42
|
+
{pricingDescriptionDisclaimer && (
|
|
43
|
+
<div>{pricingDescriptionDisclaimer}</div>
|
|
44
|
+
)}
|
|
45
|
+
|
|
46
|
+
{/* Assets & Logos */}
|
|
47
|
+
{logoLockup && <div>Logo: {logoLockup}</div>}
|
|
48
|
+
{badgeImage && <div>Badge: {badgeImage}</div>}
|
|
49
|
+
{squareImage && <div>Square Layout: {String(squareImage)}</div>}
|
|
50
|
+
|
|
51
|
+
{/* Checklist */}
|
|
52
|
+
{checklist?.map((item) => (
|
|
53
|
+
<div key={item.anchorId}>Checklist Item: {item.title}</div>
|
|
54
|
+
))}
|
|
55
|
+
|
|
56
|
+
{/* CTAs & Availability */}
|
|
57
|
+
{checkAvailabilityEyebrow && <div>{checkAvailabilityEyebrow}</div>}
|
|
58
|
+
{primaryCtaPrefix1 && <div>{primaryCtaPrefix1}</div>}
|
|
59
|
+
{primaryCta1 && <div>CTA 1: {primaryCta1.label}</div>}
|
|
60
|
+
{primaryCtaPrefix2 && <div>{primaryCtaPrefix2}</div>}
|
|
61
|
+
{primaryCta2 && <div>CTA 2: {primaryCta2.label}</div>}
|
|
62
|
+
{secondaryCtaPrefix && <div>{secondaryCtaPrefix}</div>}
|
|
63
|
+
{secondaryCta && <div>Secondary: {secondaryCta.label}</div>}
|
|
64
|
+
{bottomLink && <div>Bottom Link: {bottomLink.label}</div>}
|
|
65
|
+
|
|
66
|
+
{/* Carousel URLs via hook */}
|
|
67
|
+
{carouselImages?.map((url, index) => (
|
|
68
|
+
<div key={index}>
|
|
69
|
+
Carousel Image {index + 1}: {url}
|
|
70
|
+
</div>
|
|
71
|
+
))}
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
);
|
|
5
75
|
};
|
|
6
76
|
|
|
7
77
|
export default PrimaryHero;
|
|
@@ -1 +1,25 @@
|
|
|
1
|
-
export type PrimaryHeroProps = {
|
|
1
|
+
export type PrimaryHeroProps = {
|
|
2
|
+
title: string;
|
|
3
|
+
showAsHeading?: boolean;
|
|
4
|
+
subTitle?: string;
|
|
5
|
+
price?: string;
|
|
6
|
+
priceSuffix?: string;
|
|
7
|
+
priceCallout?: string;
|
|
8
|
+
pricingDescription?: string;
|
|
9
|
+
pricingDescriptionDisclaimer?: string;
|
|
10
|
+
checklist?: any[];
|
|
11
|
+
logoLockup?: string;
|
|
12
|
+
checkAvailabilityEyebrow?: string;
|
|
13
|
+
primaryCtaPrefix1?: string;
|
|
14
|
+
primaryCtaPrefix2?: string;
|
|
15
|
+
primaryCta1?: any;
|
|
16
|
+
primaryCta2?: any;
|
|
17
|
+
secondaryCtaPrefix?: string;
|
|
18
|
+
secondaryCta?: any;
|
|
19
|
+
bottomLink?: any;
|
|
20
|
+
carouselImages?: string[];
|
|
21
|
+
squareImage?: boolean;
|
|
22
|
+
badgeImage?: string;
|
|
23
|
+
textColor?: string;
|
|
24
|
+
maxWidth?: boolean;
|
|
25
|
+
};
|