@windstream/react-shared-components 0.0.18 → 0.0.21
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 +34 -6
- package/dist/index.d.ts +33 -5
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/utils/index.esm.js.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/accordion/Accordion.stories.tsx +16 -11
- package/src/components/accordion/index.tsx +19 -8
- package/src/components/accordion/types.ts +8 -9
- package/src/components/alert-card/AlertCard.stories.tsx +4 -5
- package/src/components/alert-card/index.tsx +6 -9
- package/src/components/alert-card/types.ts +9 -9
- package/src/components/brand-button/BrandButton.stories.tsx +8 -10
- package/src/components/brand-button/helpers.ts +8 -8
- package/src/components/brand-button/index.tsx +28 -27
- package/src/components/brand-button/types.ts +6 -8
- package/src/components/button/Button.stories.tsx +6 -6
- package/src/components/button/index.tsx +3 -1
- package/src/components/button/types.ts +14 -14
- package/src/components/call-button/CallButton.stories.tsx +1 -1
- package/src/components/call-button/index.tsx +3 -4
- package/src/components/call-button/types.ts +1 -0
- package/src/components/checkbox/Checkbox.stories.tsx +6 -7
- package/src/components/checkbox/index.tsx +17 -7
- package/src/components/checkbox/types.ts +19 -16
- package/src/components/checklist/Checklist.stories.tsx +1 -2
- package/src/components/checklist/index.tsx +12 -6
- package/src/components/checklist/types.ts +5 -5
- package/src/components/collapse/Collapse.stories.tsx +18 -19
- package/src/components/collapse/index.tsx +1 -1
- package/src/components/collapse/types.ts +4 -4
- package/src/components/divider/Divider.stories.tsx +16 -17
- package/src/components/divider/index.tsx +2 -3
- package/src/components/divider/type.ts +2 -2
- package/src/components/image/Image.stories.tsx +113 -0
- package/src/components/image/index.tsx +22 -0
- package/src/components/image/types.ts +28 -0
- package/src/components/input/Input.stories.tsx +13 -46
- package/src/components/input/index.tsx +16 -15
- package/src/components/input/types.ts +1 -1
- package/src/components/link/Link.stories.tsx +1 -1
- package/src/components/link/index.tsx +1 -2
- package/src/components/link/types.ts +25 -25
- package/src/components/list/List.stories.tsx +1 -1
- package/src/components/list/index.tsx +86 -86
- package/src/components/list/list-item/index.tsx +36 -36
- package/src/components/list/list-item/types.ts +13 -13
- package/src/components/list/types.ts +29 -29
- package/src/components/material-icon/MaterialIcon.stories.tsx +1 -1
- package/src/components/material-icon/constants.ts +1 -1
- package/src/components/material-icon/index.tsx +44 -44
- package/src/components/material-icon/types.ts +31 -31
- package/src/components/modal/Modal.stories.tsx +9 -9
- package/src/components/modal/index.tsx +8 -14
- package/src/components/modal/types.ts +1 -1
- package/src/components/radio-button/RadioButton.stories.tsx +7 -7
- package/src/components/radio-button/index.tsx +11 -9
- package/src/components/radio-button/types.ts +18 -19
- package/src/components/see-more/SeeMore.stories.tsx +14 -15
- package/src/components/see-more/index.tsx +33 -29
- package/src/components/see-more/types.ts +3 -3
- package/src/components/select/Select.stories.tsx +3 -2
- package/src/components/select/index.tsx +15 -17
- package/src/components/select/types.ts +2 -1
- package/src/components/select-plan-button/SelectPlanButton.stories.tsx +20 -12
- package/src/components/select-plan-button/index.tsx +28 -20
- package/src/components/select-plan-button/types.ts +1 -1
- package/src/components/skeleton/Skeleton.stories.tsx +9 -10
- package/src/components/skeleton/index.tsx +61 -61
- package/src/components/skeleton/types.ts +3 -3
- package/src/components/spinner/Spinner.stories.tsx +1 -1
- package/src/components/spinner/index.tsx +1 -1
- package/src/components/spinner/types.ts +4 -4
- package/src/components/text/Text.stories.tsx +35 -16
- package/src/components/text/index.tsx +2 -5
- package/src/components/text/types.ts +45 -45
- package/src/components/tooltip/Tooltip.stories.tsx +15 -16
- package/src/components/tooltip/index.tsx +1 -5
- package/src/components/tooltip/types.ts +4 -4
- package/src/components/view-cart-button/ViewCartButton.stories.tsx +23 -12
- package/src/components/view-cart-button/index.tsx +11 -6
- package/src/components/view-cart-button/types.ts +1 -1
- package/src/contentful/blocks/accordion/Accordion.stories.tsx +23 -0
- package/src/contentful/blocks/accordion/index.tsx +11 -1
- package/src/contentful/blocks/accordion/types.ts +1 -1
- package/src/contentful/blocks/button/Button.stories.tsx +40 -0
- package/src/contentful/blocks/button/index.tsx +15 -14
- package/src/contentful/blocks/button/types.ts +17 -17
- package/src/contentful/blocks/callout/Callout.stories.tsx +23 -0
- package/src/contentful/blocks/callout/index.tsx +9 -1
- package/src/contentful/blocks/callout/types.ts +1 -1
- package/src/contentful/blocks/cards/Cards.stories.tsx +23 -0
- package/src/contentful/blocks/cards/index.tsx +7 -1
- package/src/contentful/blocks/cards/types.ts +1 -1
- package/src/contentful/blocks/carousel/Carousel.stories.tsx +23 -0
- package/src/contentful/blocks/carousel/index.tsx +7 -1
- package/src/contentful/blocks/carousel/types.ts +1 -1
- package/src/contentful/blocks/cta-callout/CtaCallout.stories.tsx +46 -0
- package/src/contentful/blocks/cta-callout/index.tsx +5 -5
- package/src/contentful/blocks/cta-callout/types.ts +16 -16
- package/src/contentful/blocks/floating-banner/FloatingBanner.stories.tsx +23 -0
- package/src/contentful/blocks/floating-banner/index.tsx +6 -2
- package/src/contentful/blocks/floating-banner/types.ts +1 -1
- package/src/contentful/blocks/footer/Footer.stories.tsx +30 -0
- package/src/contentful/blocks/footer/index.tsx +8 -7
- package/src/contentful/blocks/footer/types.ts +7 -6
- package/src/contentful/blocks/image-promo-bar/ImagePromoBar.stories.tsx +23 -0
- package/src/contentful/blocks/image-promo-bar/index.tsx +2 -1
- package/src/contentful/blocks/image-promo-bar/types.ts +28 -28
- package/src/contentful/blocks/modal/Modal.stories.tsx +23 -0
- package/src/contentful/blocks/modal/index.tsx +8 -2
- package/src/contentful/blocks/modal/types.ts +1 -1
- package/src/contentful/blocks/navigation/Navigation.stories.tsx +23 -0
- package/src/contentful/blocks/navigation/index.tsx +6 -2
- package/src/contentful/blocks/navigation/types.ts +1 -1
- package/src/contentful/blocks/primary-hero/PrimaryHero.stories.tsx +23 -0
- package/src/contentful/blocks/primary-hero/index.tsx +4 -3
- package/src/contentful/blocks/primary-hero/types.ts +29 -29
- package/src/contentful/blocks/shape-background-wrapper/ShapeBackgroundWrapper.stories.tsx +26 -0
- package/src/contentful/blocks/shape-background-wrapper/index.tsx +107 -106
- package/src/contentful/blocks/shape-background-wrapper/types.ts +24 -23
- package/src/contentful/blocks/text/Text.stories.tsx +23 -0
- package/src/contentful/blocks/text/index.tsx +7 -1
- package/src/contentful/blocks/text/types.ts +1 -1
- package/src/contentful/index.ts +1 -1
- package/src/hooks/use-body-scroll-lock.ts +2 -1
- package/src/index.ts +14 -2
- package/src/setupTests.ts +46 -46
- package/src/stories/DocsTemplate.tsx +0 -2
- package/src/styles/globals.css +162 -162
- package/src/types/global.d.ts +9 -9
- package/src/utils/index.ts +34 -34
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Accordion } from "./index";
|
|
2
|
+
|
|
3
|
+
import { DocsPage } from "@shared/stories/DocsTemplate";
|
|
4
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof Accordion> = {
|
|
7
|
+
title: "Contentful Blocks/Accordion",
|
|
8
|
+
component: Accordion,
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: "centered",
|
|
12
|
+
docs: {
|
|
13
|
+
page: DocsPage,
|
|
14
|
+
description: {
|
|
15
|
+
component: "Contentful accordion block.",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
args: { fields: {} },
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
23
|
+
export const Default: Story = {};
|
|
@@ -1,7 +1,17 @@
|
|
|
1
1
|
import { AccordionProps } from "./types";
|
|
2
2
|
|
|
3
|
+
import { Accordion as AccordionComponent } from "@shared/components/accordion";
|
|
4
|
+
import { Text } from "@shared/components/text";
|
|
5
|
+
|
|
3
6
|
export const Accordion: React.FC<{ fields: AccordionProps }> = ({ fields }) => {
|
|
4
|
-
return
|
|
7
|
+
return (
|
|
8
|
+
<div>
|
|
9
|
+
<Text>Accordion</Text>
|
|
10
|
+
<AccordionComponent title="Accordion">
|
|
11
|
+
<Text>Accordion</Text>
|
|
12
|
+
</AccordionComponent>
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
5
15
|
};
|
|
6
16
|
|
|
7
17
|
export default Accordion;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type AccordionProps = {}
|
|
1
|
+
export type AccordionProps = {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Button } from "./index";
|
|
2
|
+
|
|
3
|
+
import { DocsPage } from "@shared/stories/DocsTemplate";
|
|
4
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof Button> = {
|
|
7
|
+
title: "Contentful Blocks/Button",
|
|
8
|
+
component: Button,
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: "centered",
|
|
12
|
+
docs: {
|
|
13
|
+
page: DocsPage,
|
|
14
|
+
description: {
|
|
15
|
+
component:
|
|
16
|
+
"Contentful button block. Renders as solid (BrandButton) or text (Link).",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
args: {
|
|
21
|
+
showButtonAs: "solid",
|
|
22
|
+
buttonVariant: "primary_brand",
|
|
23
|
+
buttonLabel: "Button",
|
|
24
|
+
buttonPrefix: "",
|
|
25
|
+
badge: "",
|
|
26
|
+
badgeIcon: "",
|
|
27
|
+
buttonIcon: "",
|
|
28
|
+
buttonIconPosition: "left",
|
|
29
|
+
href: "",
|
|
30
|
+
target: "_self",
|
|
31
|
+
anchorId: "",
|
|
32
|
+
preserveQueryParameters: false,
|
|
33
|
+
clickToOpen: "",
|
|
34
|
+
tabmodalNameToOpen: "",
|
|
35
|
+
preDefinedFunctionExecution: "",
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
export default meta;
|
|
39
|
+
type Story = StoryObj<typeof meta>;
|
|
40
|
+
export const Default: Story = {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { BrandButton } from "@shared/components/brand-button";
|
|
2
|
-
import { ButtonProps } from "./types";
|
|
3
1
|
import React from "react";
|
|
2
|
+
import { ButtonProps } from "./types";
|
|
3
|
+
|
|
4
|
+
import { BrandButton } from "@shared/components/brand-button";
|
|
4
5
|
import { Link } from "@shared/components/link";
|
|
6
|
+
|
|
5
7
|
export const Button: React.FC<ButtonProps> = ({
|
|
6
8
|
showButtonAs,
|
|
7
9
|
buttonVariant,
|
|
@@ -19,27 +21,26 @@ export const Button: React.FC<ButtonProps> = ({
|
|
|
19
21
|
variant={buttonVariant}
|
|
20
22
|
text={buttonLabel}
|
|
21
23
|
label={buttonPrefix}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
// badge={badge}
|
|
25
|
+
// badgeIcon={badgeIcon}
|
|
26
|
+
// icon={buttonIcon}
|
|
27
|
+
// iconPosition={buttonIconPosition}
|
|
28
|
+
// href={href}
|
|
29
|
+
// target={target}
|
|
30
|
+
// preserveQueryParameters={preserveQueryParameters}
|
|
31
|
+
// clickToOpen={clickToOpen}
|
|
32
|
+
// tabmodalNameToOpen={tabmodalNameToOpen}
|
|
33
|
+
// preDefinedFunctionExecution={preDefinedFunctionExecution}
|
|
32
34
|
/>
|
|
33
35
|
) : showButtonAs === "text" ? (
|
|
34
36
|
<Link
|
|
35
37
|
href={href}
|
|
36
38
|
target={target}
|
|
37
39
|
variant={linkVariant || "default"}
|
|
38
|
-
|
|
40
|
+
className={`text-text-brand ${linkClassName || ""}`}
|
|
39
41
|
>
|
|
40
42
|
{buttonLabel}
|
|
41
43
|
</Link>
|
|
42
44
|
) : null;
|
|
43
45
|
};
|
|
44
46
|
export default Button;
|
|
45
|
-
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
export type ButtonProps = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
showButtonAs: "solid" | "text";
|
|
3
|
+
buttonVariant: "primary_brand" | "secondary" | "primary_inverse";
|
|
4
|
+
buttonLabel: string;
|
|
5
|
+
buttonPrefix: string;
|
|
6
|
+
badge: string;
|
|
7
|
+
badgeIcon: string;
|
|
8
|
+
buttonIcon: string;
|
|
9
|
+
buttonIconPosition: "left" | "right";
|
|
10
|
+
href: string;
|
|
11
|
+
target: "_self" | "_blank";
|
|
12
|
+
anchorId: string;
|
|
13
|
+
preserveQueryParameters: boolean;
|
|
14
|
+
clickToOpen: string;
|
|
15
|
+
tabmodalNameToOpen: string;
|
|
16
|
+
preDefinedFunctionExecution: string;
|
|
17
|
+
linkClassName?: string;
|
|
18
|
+
linkVariant?: "unstyled" | "default";
|
|
19
19
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Callout } from "./index";
|
|
2
|
+
|
|
3
|
+
import { DocsPage } from "@shared/stories/DocsTemplate";
|
|
4
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof Callout> = {
|
|
7
|
+
title: "Contentful Blocks/Callout",
|
|
8
|
+
component: Callout,
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: "centered",
|
|
12
|
+
docs: {
|
|
13
|
+
page: DocsPage,
|
|
14
|
+
description: {
|
|
15
|
+
component: "Contentful callout block.",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
args: { fields: {} },
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
23
|
+
export const Default: Story = {};
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { CalloutProps } from "./types";
|
|
2
2
|
|
|
3
|
+
import { BrandButton } from "@shared/components/brand-button";
|
|
4
|
+
import { Text } from "@shared/components/text";
|
|
5
|
+
|
|
3
6
|
export const Callout: React.FC<{ fields: CalloutProps }> = ({ fields }) => {
|
|
4
|
-
return
|
|
7
|
+
return (
|
|
8
|
+
<div>
|
|
9
|
+
<Text>Callout</Text>
|
|
10
|
+
<BrandButton label="Callout" />
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
5
13
|
};
|
|
6
14
|
|
|
7
15
|
export default Callout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type CalloutProps = {}
|
|
1
|
+
export type CalloutProps = {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Cards } from "./index";
|
|
2
|
+
|
|
3
|
+
import { DocsPage } from "@shared/stories/DocsTemplate";
|
|
4
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof Cards> = {
|
|
7
|
+
title: "Contentful Blocks/Cards",
|
|
8
|
+
component: Cards,
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: "centered",
|
|
12
|
+
docs: {
|
|
13
|
+
page: DocsPage,
|
|
14
|
+
description: {
|
|
15
|
+
component: "Contentful cards block.",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
args: { fields: {} },
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
23
|
+
export const Default: Story = {};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { CardsProps } from "./types";
|
|
2
2
|
|
|
3
|
+
import { Text } from "@shared/components/text";
|
|
4
|
+
|
|
3
5
|
export const Cards: React.FC<{ fields: CardsProps }> = ({ fields }) => {
|
|
4
|
-
return
|
|
6
|
+
return (
|
|
7
|
+
<div>
|
|
8
|
+
<Text>Cards</Text>
|
|
9
|
+
</div>
|
|
10
|
+
);
|
|
5
11
|
};
|
|
6
12
|
|
|
7
13
|
export default Cards;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type CardsProps = {}
|
|
1
|
+
export type CardsProps = {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Carousel } from "./index";
|
|
2
|
+
|
|
3
|
+
import { DocsPage } from "@shared/stories/DocsTemplate";
|
|
4
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof Carousel> = {
|
|
7
|
+
title: "Contentful Blocks/Carousel",
|
|
8
|
+
component: Carousel,
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: "centered",
|
|
12
|
+
docs: {
|
|
13
|
+
page: DocsPage,
|
|
14
|
+
description: {
|
|
15
|
+
component: "Contentful carousel block.",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
args: { fields: {} },
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
23
|
+
export const Default: Story = {};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { CarouselProps } from "./types";
|
|
2
2
|
|
|
3
|
+
import { Text } from "@shared/components/text";
|
|
4
|
+
|
|
3
5
|
export const Carousel: React.FC<{ fields: CarouselProps }> = ({ fields }) => {
|
|
4
|
-
return
|
|
6
|
+
return (
|
|
7
|
+
<div>
|
|
8
|
+
<Text>Carousel</Text>
|
|
9
|
+
</div>
|
|
10
|
+
);
|
|
5
11
|
};
|
|
6
12
|
|
|
7
13
|
export default Carousel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type CarouselProps = {}
|
|
1
|
+
export type CarouselProps = {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { CtaCallout } from "./index";
|
|
2
|
+
|
|
3
|
+
import { DocsPage } from "@shared/stories/DocsTemplate";
|
|
4
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof CtaCallout> = {
|
|
7
|
+
title: "Contentful Blocks/CtaCallout",
|
|
8
|
+
component: CtaCallout,
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: "centered",
|
|
12
|
+
docs: {
|
|
13
|
+
page: DocsPage,
|
|
14
|
+
description: {
|
|
15
|
+
component:
|
|
16
|
+
"Contentful CTA callout block with title, description, and optional button.",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
args: {
|
|
21
|
+
title: "Call to Action",
|
|
22
|
+
subTitle: "Subtitle",
|
|
23
|
+
description: "Description text.",
|
|
24
|
+
background: "white",
|
|
25
|
+
button: {
|
|
26
|
+
showButtonAs: "solid",
|
|
27
|
+
buttonVariant: "primary_brand",
|
|
28
|
+
buttonLabel: "Learn More",
|
|
29
|
+
buttonPrefix: "",
|
|
30
|
+
badge: "",
|
|
31
|
+
badgeIcon: "",
|
|
32
|
+
buttonIcon: "",
|
|
33
|
+
buttonIconPosition: "left",
|
|
34
|
+
href: "",
|
|
35
|
+
target: "_self",
|
|
36
|
+
anchorId: "",
|
|
37
|
+
preserveQueryParameters: false,
|
|
38
|
+
clickToOpen: "",
|
|
39
|
+
tabmodalNameToOpen: "",
|
|
40
|
+
preDefinedFunctionExecution: "",
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
export default meta;
|
|
45
|
+
type Story = StoryObj<typeof meta>;
|
|
46
|
+
export const Default: Story = {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { CtaCalloutProps, ThemeKey } from "./types";
|
|
3
|
+
|
|
3
4
|
import { Text } from "@shared/components/text";
|
|
4
5
|
import { Button } from "@shared/contentful/blocks/button";
|
|
5
6
|
|
|
@@ -26,7 +27,7 @@ export const CtaCallout: React.FC<CtaCalloutProps> = ({
|
|
|
26
27
|
return (
|
|
27
28
|
<div className={`${bgColorClasses[background]} component-container`}>
|
|
28
29
|
<div
|
|
29
|
-
className={`${maxWidth ? "mx-auto max-w-120" : ""} flex flex-col text-${color} px-5 py-16 lg:px-13 lg:py-24
|
|
30
|
+
className={`${maxWidth ? "mx-auto max-w-120" : ""} flex flex-col text-${color} px-5 py-16 lg:px-13 lg:py-24`}
|
|
30
31
|
>
|
|
31
32
|
<Text
|
|
32
33
|
as={enableHeading ? "h1" : "h2"}
|
|
@@ -36,19 +37,18 @@ export const CtaCallout: React.FC<CtaCalloutProps> = ({
|
|
|
36
37
|
</Text>
|
|
37
38
|
<Text
|
|
38
39
|
as="h3"
|
|
39
|
-
className={`subheading3 pt-2 lg:pt-3
|
|
40
|
+
className={`subheading3 pt-2 lg:subheading1 lg:pt-3 text-${contentAlignment}`}
|
|
40
41
|
>
|
|
41
42
|
{subTitle}
|
|
42
43
|
</Text>
|
|
43
|
-
<div className={`text-body1
|
|
44
|
+
<div className={`pt-2 text-body1 lg:pt-3 text-${descriptionAlignment}`}>
|
|
44
45
|
{description}
|
|
45
46
|
</div>
|
|
46
|
-
<div className="pt-5 lg:pt-14
|
|
47
|
+
<div className="flex justify-center pt-5 lg:pt-14">
|
|
47
48
|
<Button {...button} />
|
|
48
49
|
</div>
|
|
49
50
|
</div>
|
|
50
51
|
</div>
|
|
51
|
-
|
|
52
52
|
);
|
|
53
53
|
};
|
|
54
54
|
export default CtaCallout;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
3
|
export type CtaCalloutProps = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
title?: string;
|
|
5
|
+
subTitle?: string;
|
|
6
|
+
enableHeading?: boolean;
|
|
7
|
+
color?: "navy" | "white";
|
|
8
|
+
background?: "blue" | "green" | "navy" | "purple" | "white" | "yellow";
|
|
9
|
+
description?: React.ReactNode;
|
|
10
|
+
descriptionAlignment?: "center" | "left" | "right";
|
|
11
|
+
contentAlignment?: "center" | "left" | "right";
|
|
12
|
+
button?: any;
|
|
13
|
+
maxWidth?: boolean;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export type ThemeKey =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
| "blue"
|
|
18
|
+
| "green"
|
|
19
|
+
| "yellow"
|
|
20
|
+
| "purple"
|
|
21
|
+
| "white"
|
|
22
|
+
| "navy";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { FloatingBanner } from "./index";
|
|
2
|
+
|
|
3
|
+
import { DocsPage } from "@shared/stories/DocsTemplate";
|
|
4
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof FloatingBanner> = {
|
|
7
|
+
title: "Contentful Blocks/FloatingBanner",
|
|
8
|
+
component: FloatingBanner,
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: "centered",
|
|
12
|
+
docs: {
|
|
13
|
+
page: DocsPage,
|
|
14
|
+
description: {
|
|
15
|
+
component: "Contentful floating banner block.",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
args: { fields: {} },
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
23
|
+
export const Default: Story = {};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { FloatingBannerProps } from "./types";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
import { Text } from "@shared/components/text";
|
|
4
|
+
|
|
5
|
+
export const FloatingBanner: React.FC<{ fields: FloatingBannerProps }> = ({
|
|
6
|
+
fields,
|
|
7
|
+
}) => {
|
|
8
|
+
return <Text>FloatingBanner</Text>;
|
|
5
9
|
};
|
|
6
10
|
|
|
7
11
|
export default FloatingBanner;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type FloatingBannerProps = {}
|
|
1
|
+
export type FloatingBannerProps = {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Footer } from "./index";
|
|
2
|
+
|
|
3
|
+
import { DocsPage } from "@shared/stories/DocsTemplate";
|
|
4
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof Footer> = {
|
|
7
|
+
title: "Contentful Blocks/Footer",
|
|
8
|
+
component: Footer,
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: "centered",
|
|
12
|
+
docs: {
|
|
13
|
+
page: DocsPage,
|
|
14
|
+
description: {
|
|
15
|
+
component:
|
|
16
|
+
"Contentful footer block with body, links, copyrights, and terms.",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
args: {
|
|
21
|
+
body: "Footer body content",
|
|
22
|
+
copyrights: "Company Name",
|
|
23
|
+
terms: "All rights reserved",
|
|
24
|
+
links: [],
|
|
25
|
+
bottomLinks: [],
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
export default meta;
|
|
29
|
+
type Story = StoryObj<typeof meta>;
|
|
30
|
+
export const Default: Story = {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { FooterProps } from "./types";
|
|
3
|
+
|
|
3
4
|
import { Button } from "@shared/contentful/blocks/button";
|
|
5
|
+
|
|
4
6
|
export const Footer: React.FC<FooterProps> = ({
|
|
5
7
|
body,
|
|
6
8
|
links,
|
|
@@ -17,10 +19,10 @@ export const Footer: React.FC<FooterProps> = ({
|
|
|
17
19
|
<div>{body}</div>
|
|
18
20
|
<div
|
|
19
21
|
className={
|
|
20
|
-
"
|
|
22
|
+
"my-8 h-[1px] border-t-0 bg-white opacity-100 lg:my-16 dark:opacity-50"
|
|
21
23
|
}
|
|
22
24
|
/>
|
|
23
|
-
<div className="grid-1 grid gap-8 md:grid-cols-2 lg:grid-cols-4
|
|
25
|
+
<div className="grid-1 grid gap-8 py-8 md:grid-cols-2 lg:grid-cols-4">
|
|
24
26
|
{links?.map((link: any, index: number) => (
|
|
25
27
|
<div key={`footer-link-group-${index}`}>
|
|
26
28
|
<div className="site-links-group" key={`link-group-${index}`}>
|
|
@@ -31,13 +33,13 @@ export const Footer: React.FC<FooterProps> = ({
|
|
|
31
33
|
<div className="pt-3" key={`site-links-${_index}`}>
|
|
32
34
|
<Button {...site} />
|
|
33
35
|
</div>
|
|
34
|
-
)
|
|
36
|
+
)
|
|
35
37
|
)}
|
|
36
38
|
</div>
|
|
37
39
|
</div>
|
|
38
40
|
<div
|
|
39
41
|
className={
|
|
40
|
-
"
|
|
42
|
+
"block h-[1px] border-t-0 bg-white opacity-100 md:hidden dark:opacity-50"
|
|
41
43
|
}
|
|
42
44
|
/>
|
|
43
45
|
</div>
|
|
@@ -46,14 +48,14 @@ export const Footer: React.FC<FooterProps> = ({
|
|
|
46
48
|
|
|
47
49
|
<div className="pt-8">
|
|
48
50
|
<p className="copy-rights">{copyrights}</p>
|
|
49
|
-
<p className="terms-text text-sm font-normal
|
|
51
|
+
<p className="terms-text text-sm font-normal">
|
|
50
52
|
© {new Date().getFullYear()} {terms}
|
|
51
53
|
</p>
|
|
52
54
|
<ul className="bottom-links list-none">
|
|
53
55
|
{bottomLinks?.map((link: any, index: number) => (
|
|
54
56
|
<li
|
|
55
57
|
key={`links-${index}`}
|
|
56
|
-
className="relative float-left pl-[8px]
|
|
58
|
+
className="relative float-left pl-[8px] before:absolute before:left-[3px] before:top-1/2 before:-translate-y-1/2 before:text-[14px] before:content-['•'] first-of-type:pl-0 first-of-type:before:content-['']"
|
|
57
59
|
>
|
|
58
60
|
<Button
|
|
59
61
|
{...link}
|
|
@@ -66,7 +68,6 @@ export const Footer: React.FC<FooterProps> = ({
|
|
|
66
68
|
</div>
|
|
67
69
|
</div>
|
|
68
70
|
</div>
|
|
69
|
-
|
|
70
71
|
);
|
|
71
72
|
};
|
|
72
73
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
|
|
2
3
|
export type FooterProps = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
body: React.ReactNode;
|
|
5
|
+
links?: Array<any>;
|
|
6
|
+
bottomLinks?: Array<any>;
|
|
7
|
+
copyrights?: React.ReactNode;
|
|
8
|
+
terms?: string;
|
|
9
|
+
maxWidth?: boolean;
|
|
9
10
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ImagePromoBar } from "./index";
|
|
2
|
+
|
|
3
|
+
import { DocsPage } from "@shared/stories/DocsTemplate";
|
|
4
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof ImagePromoBar> = {
|
|
7
|
+
title: "Contentful Blocks/ImagePromoBar",
|
|
8
|
+
component: ImagePromoBar,
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: "centered",
|
|
12
|
+
docs: {
|
|
13
|
+
page: DocsPage,
|
|
14
|
+
description: {
|
|
15
|
+
component: "Contentful image promo bar block.",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
args: { fields: {} },
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
type Story = StoryObj<typeof meta>;
|
|
23
|
+
export const Default: Story = {};
|