@arc-ui/community-components 0.1.0
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/.turbo/turbo-build.log +16 -0
- package/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/dist/Accordion/Accordion.cjs.js +31 -0
- package/dist/Accordion/Accordion.esm.js +29 -0
- package/dist/Author/Author.cjs.js +14 -0
- package/dist/Author/Author.esm.js +8 -0
- package/dist/Author/styles.css +1 -0
- package/dist/BannerWithTabs/BannerWithTabs.cjs.js +36 -0
- package/dist/BannerWithTabs/BannerWithTabs.esm.js +34 -0
- package/dist/BannerWithTabs/styles.css +1 -0
- package/dist/CopyLead/CopyLead.cjs.js +129 -0
- package/dist/CopyLead/CopyLead.esm.js +127 -0
- package/dist/CopyLead/styles.css +1 -0
- package/dist/DownloadList/DownloadList.cjs.js +26 -0
- package/dist/DownloadList/DownloadList.esm.js +24 -0
- package/dist/DownloadList/styles.css +1 -0
- package/dist/FeaturePost/FeaturePost.cjs.js +2281 -0
- package/dist/FeaturePost/FeaturePost.esm.js +2279 -0
- package/dist/FeaturePost/styles.css +1 -0
- package/dist/Highlights/Highlights.cjs.js +50 -0
- package/dist/Highlights/Highlights.esm.js +48 -0
- package/dist/Highlights/styles.css +1 -0
- package/dist/PromoListing/PromoListing.cjs.js +50 -0
- package/dist/PromoListing/PromoListing.esm.js +48 -0
- package/dist/PromoListing/styles.css +1 -0
- package/dist/Quote/Quote.cjs.js +27 -0
- package/dist/Quote/Quote.esm.js +25 -0
- package/dist/Quote/styles.css +1 -0
- package/dist/SectionHeading/SectionHeading.cjs.js +14 -0
- package/dist/SectionHeading/SectionHeading.esm.js +8 -0
- package/dist/SectionHeading/styles.css +1 -0
- package/dist/Statistics/Statistics.cjs.js +60 -0
- package/dist/Statistics/Statistics.esm.js +58 -0
- package/dist/Statistics/styles.css +1 -0
- package/dist/Summary/Summary.cjs.js +30 -0
- package/dist/Summary/Summary.esm.js +28 -0
- package/dist/Summary/styles.css +1 -0
- package/dist/_shared/cjs/Author-CAo-qryZ.js +30 -0
- package/dist/_shared/cjs/SectionHeading-L2EpTQ79.js +25 -0
- package/dist/_shared/cjs/filter-data-attrs-ajtUvDAC.js +15 -0
- package/dist/_shared/cjs/index-Bp6Dd2i1.js +94 -0
- package/dist/_shared/cjs/index.es-X428Cm3N.js +15 -0
- package/dist/_shared/cjs/tslib.es6-DBA0GFPJ.js +48 -0
- package/dist/_shared/esm/Author-Bx-cE9Pz.js +28 -0
- package/dist/_shared/esm/SectionHeading-C70XNhqJ.js +23 -0
- package/dist/_shared/esm/filter-data-attrs-V7cbJuwS.js +13 -0
- package/dist/_shared/esm/index-BfTCfPZ1.js +92 -0
- package/dist/_shared/esm/index.es-BzmvPxje.js +10 -0
- package/dist/_shared/esm/tslib.es6-Cv15O4Nx.js +46 -0
- package/dist/index.es.js +2796 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.js +2808 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +1 -0
- package/dist/types/components/Accordion/Accordion.d.ts +9 -0
- package/dist/types/components/Accordion/components/AccordionDisclosureList/AccordionDisclosureList.d.ts +9 -0
- package/dist/types/components/Accordion/index.d.ts +1 -0
- package/dist/types/components/Author/Author.d.ts +17 -0
- package/dist/types/components/Author/index.d.ts +1 -0
- package/dist/types/components/BannerWithTabs/BannerWithTabs.d.ts +17 -0
- package/dist/types/components/BannerWithTabs/index.d.ts +1 -0
- package/dist/types/components/CopyLead/CopyLead.d.ts +42 -0
- package/dist/types/components/CopyLead/components/Button/Button.d.ts +3 -0
- package/dist/types/components/CopyLead/components/Button/index.d.ts +1 -0
- package/dist/types/components/CopyLead/components/Column/Column.d.ts +6 -0
- package/dist/types/components/CopyLead/components/Column/index.d.ts +1 -0
- package/dist/types/components/CopyLead/components/Container/Container.d.ts +9 -0
- package/dist/types/components/CopyLead/components/Container/index.d.ts +1 -0
- package/dist/types/components/CopyLead/components/IconList/IconList.d.ts +8 -0
- package/dist/types/components/CopyLead/components/IconList/index.d.ts +1 -0
- package/dist/types/components/CopyLead/components/Image/Image.d.ts +3 -0
- package/dist/types/components/CopyLead/components/Image/index.d.ts +1 -0
- package/dist/types/components/CopyLead/components/MediaContent/MediaContent.d.ts +9 -0
- package/dist/types/components/CopyLead/components/MediaContent/index.d.ts +1 -0
- package/dist/types/components/CopyLead/index.d.ts +1 -0
- package/dist/types/components/CopyLead/templates/Content/Content.d.ts +10 -0
- package/dist/types/components/CopyLead/templates/Content/index.d.ts +1 -0
- package/dist/types/components/CopyLead/templates/Media/Media.d.ts +16 -0
- package/dist/types/components/CopyLead/templates/Media/index.d.ts +1 -0
- package/dist/types/components/CopyLead/types/copy-lead-button.d.ts +2 -0
- package/dist/types/components/CopyLead/types/copy-lead-image.d.ts +4 -0
- package/dist/types/components/CopyLead/types/copy-lead-list-item.d.ts +6 -0
- package/dist/types/components/CopyLead/types/copy-lead-transcript-link.d.ts +6 -0
- package/dist/types/components/CopyLead/types/index.d.ts +4 -0
- package/dist/types/components/DownloadList/DownloadList.d.ts +10 -0
- package/dist/types/components/DownloadList/index.d.ts +1 -0
- package/dist/types/components/FeaturePost/FeaturePost.d.ts +45 -0
- package/dist/types/components/FeaturePost/components/Image/Image.d.ts +3 -0
- package/dist/types/components/FeaturePost/components/Image/index.d.ts +1 -0
- package/dist/types/components/FeaturePost/components/MediaContent/MediaContent.d.ts +15 -0
- package/dist/types/components/FeaturePost/index.d.ts +1 -0
- package/dist/types/components/FeaturePost/types/feature-post-app-button-footer.d.ts +6 -0
- package/dist/types/components/FeaturePost/types/feature-post-cta-footer.d.ts +7 -0
- package/dist/types/components/FeaturePost/types/feature-post-image.d.ts +4 -0
- package/dist/types/components/FeaturePost/types/index.d.ts +3 -0
- package/dist/types/components/Highlights/Highlights.d.ts +17 -0
- package/dist/types/components/Highlights/components/HighlightItem/HighlightItem.d.ts +14 -0
- package/dist/types/components/Highlights/components/HighlightList/HighlightList.d.ts +9 -0
- package/dist/types/components/Highlights/index.d.ts +1 -0
- package/dist/types/components/Highlights/types/highlight-list-item.d.ts +10 -0
- package/dist/types/components/Highlights/types/index.d.ts +1 -0
- package/dist/types/components/PromoListing/PromoListing.d.ts +38 -0
- package/dist/types/components/PromoListing/index.d.ts +1 -0
- package/dist/types/components/Quote/Quote.d.ts +11 -0
- package/dist/types/components/Quote/index.d.ts +1 -0
- package/dist/types/components/SectionHeading/SectionHeading.d.ts +25 -0
- package/dist/types/components/SectionHeading/index.d.ts +1 -0
- package/dist/types/components/Statistics/Statistics.d.ts +7 -0
- package/dist/types/components/Statistics/helpers/get-link-props.d.ts +2 -0
- package/dist/types/components/Statistics/index.d.ts +1 -0
- package/dist/types/components/Statistics/types/statistic-link.d.ts +6 -0
- package/dist/types/components/Statistics/types/statistic.d.ts +8 -0
- package/dist/types/components/Summary/Summary.d.ts +18 -0
- package/dist/types/components/Summary/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +11 -0
- package/dist/types/index.d.ts +1 -0
- package/eslint.config.js +4 -0
- package/package.json +105 -0
- package/postcss.config.cjs +5 -0
- package/rollup.config.js +101 -0
- package/src/components/Accordion/Accordion.tsx +38 -0
- package/src/components/Accordion/components/AccordionDisclosureList/AccordionDisclosureList.tsx +44 -0
- package/src/components/Accordion/index.ts +1 -0
- package/src/components/Author/Author.module.css +9 -0
- package/src/components/Author/Author.tsx +60 -0
- package/src/components/Author/index.ts +1 -0
- package/src/components/BannerWithTabs/BannerWithTabs.module.css +19 -0
- package/src/components/BannerWithTabs/BannerWithTabs.tsx +74 -0
- package/src/components/BannerWithTabs/index.ts +1 -0
- package/src/components/CopyLead/CopyLead.module.css +127 -0
- package/src/components/CopyLead/CopyLead.tsx +102 -0
- package/src/components/CopyLead/components/Button/Button.tsx +13 -0
- package/src/components/CopyLead/components/Button/index.ts +1 -0
- package/src/components/CopyLead/components/Column/Column.tsx +10 -0
- package/src/components/CopyLead/components/Column/index.ts +1 -0
- package/src/components/CopyLead/components/Container/Container.tsx +32 -0
- package/src/components/CopyLead/components/Container/index.ts +1 -0
- package/src/components/CopyLead/components/IconList/IconList.tsx +49 -0
- package/src/components/CopyLead/components/IconList/index.ts +1 -0
- package/src/components/CopyLead/components/Image/Image.tsx +17 -0
- package/src/components/CopyLead/components/Image/index.ts +1 -0
- package/src/components/CopyLead/components/MediaContent/MediaContent.tsx +36 -0
- package/src/components/CopyLead/components/MediaContent/index.ts +1 -0
- package/src/components/CopyLead/index.ts +1 -0
- package/src/components/CopyLead/templates/Content/Content.tsx +58 -0
- package/src/components/CopyLead/templates/Content/index.ts +1 -0
- package/src/components/CopyLead/templates/Media/Media.tsx +104 -0
- package/src/components/CopyLead/templates/Media/index.ts +1 -0
- package/src/components/CopyLead/types/copy-lead-button.ts +6 -0
- package/src/components/CopyLead/types/copy-lead-image.ts +19 -0
- package/src/components/CopyLead/types/copy-lead-list-item.ts +7 -0
- package/src/components/CopyLead/types/copy-lead-transcript-link.ts +6 -0
- package/src/components/CopyLead/types/index.ts +4 -0
- package/src/components/DownloadList/DownloadList.module.css +7 -0
- package/src/components/DownloadList/DownloadList.tsx +41 -0
- package/src/components/DownloadList/index.ts +1 -0
- package/src/components/FeaturePost/FeaturePost.module.css +58 -0
- package/src/components/FeaturePost/FeaturePost.tsx +203 -0
- package/src/components/FeaturePost/components/Image/Image.tsx +18 -0
- package/src/components/FeaturePost/components/Image/index.ts +1 -0
- package/src/components/FeaturePost/components/MediaContent/MediaContent.tsx +45 -0
- package/src/components/FeaturePost/components/MediaContent/index.ts +0 -0
- package/src/components/FeaturePost/index.ts +1 -0
- package/src/components/FeaturePost/types/feature-post-app-button-footer.ts +7 -0
- package/src/components/FeaturePost/types/feature-post-cta-footer.ts +11 -0
- package/src/components/FeaturePost/types/feature-post-image.ts +19 -0
- package/src/components/FeaturePost/types/index.ts +3 -0
- package/src/components/Highlights/Highlights.module.css +85 -0
- package/src/components/Highlights/Highlights.tsx +53 -0
- package/src/components/Highlights/components/HighlightItem/HighlightItem.tsx +68 -0
- package/src/components/Highlights/components/HighlightList/HighlightList.tsx +42 -0
- package/src/components/Highlights/index.ts +1 -0
- package/src/components/Highlights/types/highlight-list-item.ts +11 -0
- package/src/components/Highlights/types/index.ts +1 -0
- package/src/components/PromoListing/PromoListing.module.css +97 -0
- package/src/components/PromoListing/PromoListing.tsx +153 -0
- package/src/components/PromoListing/index.ts +1 -0
- package/src/components/Quote/Quote.module.css +60 -0
- package/src/components/Quote/Quote.tsx +57 -0
- package/src/components/Quote/index.ts +1 -0
- package/src/components/SectionHeading/SectionHeading.module.css +34 -0
- package/src/components/SectionHeading/SectionHeading.tsx +65 -0
- package/src/components/SectionHeading/index.ts +1 -0
- package/src/components/Statistics/Statistics.module.css +25 -0
- package/src/components/Statistics/Statistics.tsx +97 -0
- package/src/components/Statistics/helpers/get-link-props.ts +11 -0
- package/src/components/Statistics/index.ts +1 -0
- package/src/components/Statistics/types/statistic-link.ts +6 -0
- package/src/components/Statistics/types/statistic.ts +9 -0
- package/src/components/Summary/Summary.module.css +31 -0
- package/src/components/Summary/Summary.tsx +65 -0
- package/src/components/Summary/index.ts +1 -0
- package/src/components/index.ts +11 -0
- package/src/index.ts +5 -0
- package/src/types/file-types.d.ts +9 -0
- package/stylelint.config.js +4 -0
- package/tsconfig.json +11 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { ButtonV2 } from "@arc-ui/components/dist/ButtonV2";
|
|
4
|
+
|
|
5
|
+
import { CopyLeadButton } from "../../types";
|
|
6
|
+
|
|
7
|
+
import styles from "../../CopyLead.module.css";
|
|
8
|
+
|
|
9
|
+
export const Button: React.FC<CopyLeadButton> = (props) => (
|
|
10
|
+
<div className={styles.buttonContainer}>
|
|
11
|
+
<ButtonV2 isFullWidth buttonStyle="secondary" {...props} />
|
|
12
|
+
</div>
|
|
13
|
+
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Button } from "./Button";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Column } from "./Column";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
|
|
4
|
+
import styles from "../../CopyLead.module.css";
|
|
5
|
+
|
|
6
|
+
export const Container: React.FC<ContainerProps> = ({
|
|
7
|
+
children,
|
|
8
|
+
isReverseOrder,
|
|
9
|
+
type,
|
|
10
|
+
alignment,
|
|
11
|
+
}) => (
|
|
12
|
+
<div
|
|
13
|
+
data-testid="copy-lead-container"
|
|
14
|
+
className={classNames(
|
|
15
|
+
styles.container,
|
|
16
|
+
styles[`container--${type}`],
|
|
17
|
+
styles[`container--align-${alignment}`],
|
|
18
|
+
{
|
|
19
|
+
[styles[`container--reverse`]]: isReverseOrder,
|
|
20
|
+
},
|
|
21
|
+
)}
|
|
22
|
+
>
|
|
23
|
+
{children}
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
interface ContainerProps {
|
|
28
|
+
type: "media" | "content";
|
|
29
|
+
alignment: "top" | "center";
|
|
30
|
+
isReverseOrder?: boolean;
|
|
31
|
+
children?: React.ReactNode;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Container } from "./Container";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { Heading } from "@arc-ui/components/dist/Heading";
|
|
4
|
+
import { Icon } from "@arc-ui/components/dist/Icon";
|
|
5
|
+
import { Text } from "@arc-ui/components/dist/Text";
|
|
6
|
+
import { VerticalSpace } from "@arc-ui/components/dist/VerticalSpace";
|
|
7
|
+
|
|
8
|
+
import { CopyLeadListItem } from "../../types";
|
|
9
|
+
|
|
10
|
+
import styles from "../../CopyLead.module.css";
|
|
11
|
+
import classNames from "classnames";
|
|
12
|
+
|
|
13
|
+
export const IconList: React.FC<IconListProps> = ({
|
|
14
|
+
listItems,
|
|
15
|
+
isLgScreen,
|
|
16
|
+
}) => (
|
|
17
|
+
<ul className={styles.list}>
|
|
18
|
+
{listItems.map(({ icon, heading, text }) => (
|
|
19
|
+
<li
|
|
20
|
+
key={heading}
|
|
21
|
+
className={classNames(styles.listItem, {
|
|
22
|
+
[styles.listItemCentered]: !text,
|
|
23
|
+
})}
|
|
24
|
+
>
|
|
25
|
+
<div className={styles.listItemIconContainer}>
|
|
26
|
+
<Icon color="brand" icon={icon} size={isLgScreen ? 64 : 48} />
|
|
27
|
+
</div>
|
|
28
|
+
<div className={styles.listItemTextContainer}>
|
|
29
|
+
<Heading level="3" size="s">
|
|
30
|
+
{heading}
|
|
31
|
+
</Heading>
|
|
32
|
+
|
|
33
|
+
{text && (
|
|
34
|
+
<>
|
|
35
|
+
<VerticalSpace size="8" sizeL="16" />
|
|
36
|
+
|
|
37
|
+
<Text>{text}</Text>
|
|
38
|
+
</>
|
|
39
|
+
)}
|
|
40
|
+
</div>
|
|
41
|
+
</li>
|
|
42
|
+
))}
|
|
43
|
+
</ul>
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
interface IconListProps {
|
|
47
|
+
isLgScreen: boolean;
|
|
48
|
+
listItems: CopyLeadListItem[];
|
|
49
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IconList } from "./IconList";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { Image as ArcImage } from "@arc-ui/components/dist/Image";
|
|
4
|
+
|
|
5
|
+
import styles from "../../CopyLead.module.css";
|
|
6
|
+
import { CopyLeadImage } from "../../types";
|
|
7
|
+
|
|
8
|
+
export const Image: React.FC<CopyLeadImage> = ({ sources, ...props }) => (
|
|
9
|
+
<div className={styles.imgWrapper}>
|
|
10
|
+
<ArcImage fadeOnLoad {...props}>
|
|
11
|
+
{sources &&
|
|
12
|
+
sources.map((source) => (
|
|
13
|
+
<ArcImage.Source key={source.srcSet} {...source} />
|
|
14
|
+
))}
|
|
15
|
+
</ArcImage>
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Image } from "./Image";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Heading as ArcHeading,
|
|
5
|
+
type HeadingLevel,
|
|
6
|
+
} from "@arc-ui/components/dist/Heading";
|
|
7
|
+
|
|
8
|
+
import { Text } from "@arc-ui/components/dist/Text";
|
|
9
|
+
import { VerticalSpace } from "@arc-ui/components/dist/VerticalSpace";
|
|
10
|
+
|
|
11
|
+
import styles from "../../CopyLead.module.css";
|
|
12
|
+
|
|
13
|
+
export const MediaContent: React.FC<MediaContentProps> = ({
|
|
14
|
+
heading,
|
|
15
|
+
headingLevel,
|
|
16
|
+
children,
|
|
17
|
+
}) => (
|
|
18
|
+
<div className={styles.mediaContainer}>
|
|
19
|
+
<ArcHeading level={headingLevel} size="xl">
|
|
20
|
+
{heading}
|
|
21
|
+
</ArcHeading>
|
|
22
|
+
|
|
23
|
+
{children && (
|
|
24
|
+
<div className={styles.content}>
|
|
25
|
+
<VerticalSpace size="24" />
|
|
26
|
+
<Text size="l">{children}</Text>
|
|
27
|
+
</div>
|
|
28
|
+
)}
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
interface MediaContentProps {
|
|
33
|
+
heading: string;
|
|
34
|
+
headingLevel?: HeadingLevel;
|
|
35
|
+
children?: string;
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MediaContent } from "./MediaContent";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CopyLead, type CopyLeadProps } from "./CopyLead";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { ArcSizeBreakpointsL, ArcSizeBreakpointsM } from "@arc-ui/tokens-arc";
|
|
4
|
+
|
|
5
|
+
import { useMediaQuery } from "@arc-ui/components/dist/use-media-query";
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
SectionHeading,
|
|
9
|
+
type SectionHeadingProps,
|
|
10
|
+
} from "../../../../components/SectionHeading";
|
|
11
|
+
|
|
12
|
+
import { type CopyLeadButton, type CopyLeadListItem } from "../../types";
|
|
13
|
+
|
|
14
|
+
import { IconList } from "../../components/IconList";
|
|
15
|
+
import { Button } from "../../components/Button/Button";
|
|
16
|
+
import { Container } from "../../components/Container";
|
|
17
|
+
import { Column } from "../../components/Column";
|
|
18
|
+
|
|
19
|
+
export const ContentTemplate: React.FC<ContentTemplateProps> = ({
|
|
20
|
+
button,
|
|
21
|
+
heading,
|
|
22
|
+
headingLevel,
|
|
23
|
+
listItems,
|
|
24
|
+
content,
|
|
25
|
+
}) => {
|
|
26
|
+
const isMinWidthArcBreakpointM = useMediaQuery(
|
|
27
|
+
`(min-width: ${ArcSizeBreakpointsM})`,
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
const isMinWidthArcBreakpointL = useMediaQuery(
|
|
31
|
+
`(min-width: ${ArcSizeBreakpointsL})`,
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<Container type="content" alignment="top">
|
|
36
|
+
<Column>
|
|
37
|
+
<SectionHeading
|
|
38
|
+
heading={heading}
|
|
39
|
+
headingLevel={headingLevel}
|
|
40
|
+
content={content}
|
|
41
|
+
/>
|
|
42
|
+
|
|
43
|
+
{button && isMinWidthArcBreakpointM && <Button {...button} />}
|
|
44
|
+
</Column>
|
|
45
|
+
<Column>
|
|
46
|
+
<IconList listItems={listItems} isLgScreen={isMinWidthArcBreakpointL} />
|
|
47
|
+
|
|
48
|
+
{button && !isMinWidthArcBreakpointM && <Button {...button} />}
|
|
49
|
+
</Column>
|
|
50
|
+
</Container>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
interface ContentTemplateProps extends SectionHeadingProps {
|
|
55
|
+
content: string;
|
|
56
|
+
listItems: CopyLeadListItem[];
|
|
57
|
+
button?: CopyLeadButton;
|
|
58
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ContentTemplate } from "./Content";
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import React, { Suspense, useEffect, useState } from "react";
|
|
2
|
+
|
|
3
|
+
import { ArcSizeBreakpointsL, ArcSizeBreakpointsXl } from "@arc-ui/tokens-arc";
|
|
4
|
+
|
|
5
|
+
import { Columns } from "@arc-ui/components/dist/Columns";
|
|
6
|
+
import { useMediaQuery } from "@arc-ui/components/dist/use-media-query";
|
|
7
|
+
|
|
8
|
+
import { type HeadingLevel } from "@arc-ui/components/dist/Heading";
|
|
9
|
+
import { type VideoPlayerProps } from "@arc-ui/components/dist/VideoPlayer";
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
type CopyLeadButton,
|
|
13
|
+
type CopyLeadImage,
|
|
14
|
+
type CopyLeadListItem,
|
|
15
|
+
} from "../../types";
|
|
16
|
+
|
|
17
|
+
import { MediaContent } from "../../components/MediaContent";
|
|
18
|
+
import { Image } from "../../components/Image";
|
|
19
|
+
import { IconList } from "../../components/IconList";
|
|
20
|
+
import { Button } from "../../components/Button/Button";
|
|
21
|
+
import { Container } from "../../components/Container";
|
|
22
|
+
import { Column } from "../../components/Column";
|
|
23
|
+
|
|
24
|
+
const VideoPlayer = React.lazy(() =>
|
|
25
|
+
import("@arc-ui/components/dist/VideoPlayer").then(({ VideoPlayer }) => ({
|
|
26
|
+
default: VideoPlayer,
|
|
27
|
+
})),
|
|
28
|
+
);
|
|
29
|
+
|
|
30
|
+
export const MediaTemplate: React.FC<MediaTemplateProps> = ({
|
|
31
|
+
button,
|
|
32
|
+
heading,
|
|
33
|
+
headingLevel,
|
|
34
|
+
listItems,
|
|
35
|
+
video,
|
|
36
|
+
image,
|
|
37
|
+
content,
|
|
38
|
+
isReverseOrder = false,
|
|
39
|
+
}) => {
|
|
40
|
+
const [isClient, setIsClient] = useState(false);
|
|
41
|
+
|
|
42
|
+
const isMinWidthArcBreakpointL = useMediaQuery(
|
|
43
|
+
`(min-width: ${ArcSizeBreakpointsL})`,
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
const isMinWidthArcBreakpointXl = useMediaQuery(
|
|
47
|
+
`(min-width: ${ArcSizeBreakpointsXl})`,
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
setIsClient(true);
|
|
52
|
+
}, []);
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<div>
|
|
56
|
+
{!isMinWidthArcBreakpointXl && (
|
|
57
|
+
<Columns>
|
|
58
|
+
<Columns.Col span={12} spanM={9}>
|
|
59
|
+
<MediaContent heading={heading} headingLevel={headingLevel}>
|
|
60
|
+
{content}
|
|
61
|
+
</MediaContent>
|
|
62
|
+
</Columns.Col>
|
|
63
|
+
</Columns>
|
|
64
|
+
)}
|
|
65
|
+
<Container
|
|
66
|
+
type="media"
|
|
67
|
+
isReverseOrder={isReverseOrder}
|
|
68
|
+
alignment={!isMinWidthArcBreakpointXl ? "top" : "center"}
|
|
69
|
+
>
|
|
70
|
+
<Column>
|
|
71
|
+
{isMinWidthArcBreakpointXl && (
|
|
72
|
+
<MediaContent heading={heading}>{content}</MediaContent>
|
|
73
|
+
)}
|
|
74
|
+
|
|
75
|
+
<IconList
|
|
76
|
+
listItems={listItems}
|
|
77
|
+
isLgScreen={isMinWidthArcBreakpointL}
|
|
78
|
+
/>
|
|
79
|
+
|
|
80
|
+
{button && <Button {...button} />}
|
|
81
|
+
</Column>
|
|
82
|
+
<Column>
|
|
83
|
+
{video && isClient && (
|
|
84
|
+
<Suspense fallback={null}>
|
|
85
|
+
<VideoPlayer {...video} />
|
|
86
|
+
</Suspense>
|
|
87
|
+
)}
|
|
88
|
+
{image && !video && <Image {...image} />}
|
|
89
|
+
</Column>
|
|
90
|
+
</Container>
|
|
91
|
+
</div>
|
|
92
|
+
);
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
interface MediaTemplateProps {
|
|
96
|
+
heading: string;
|
|
97
|
+
headingLevel?: HeadingLevel;
|
|
98
|
+
listItems: CopyLeadListItem[];
|
|
99
|
+
content?: string;
|
|
100
|
+
isReverseOrder?: boolean;
|
|
101
|
+
button?: CopyLeadButton;
|
|
102
|
+
image?: CopyLeadImage;
|
|
103
|
+
video?: VideoPlayerProps;
|
|
104
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MediaTemplate } from "./Media";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type ImageSourceProps,
|
|
3
|
+
type ImageProps as ArcImageProps,
|
|
4
|
+
} from "@arc-ui/components/dist/types/components/Image/Image";
|
|
5
|
+
|
|
6
|
+
export interface CopyLeadImage
|
|
7
|
+
extends Pick<
|
|
8
|
+
ArcImageProps,
|
|
9
|
+
| "src"
|
|
10
|
+
| "alt"
|
|
11
|
+
| "loading"
|
|
12
|
+
| "sizes"
|
|
13
|
+
| "srcSet"
|
|
14
|
+
| "width"
|
|
15
|
+
| "height"
|
|
16
|
+
| "fadeOnLoad"
|
|
17
|
+
> {
|
|
18
|
+
sources?: Pick<ImageSourceProps, "media" | "sizes" | "srcSet">[];
|
|
19
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import { Text } from "@arc-ui/components/dist/Text";
|
|
4
|
+
import { VerticalSpace } from "@arc-ui/components/dist/VerticalSpace";
|
|
5
|
+
import { Heading, type HeadingLevel } from "@arc-ui/components/dist/Heading";
|
|
6
|
+
import { Download, type DownloadProps } from "@arc-ui/components/dist/Download";
|
|
7
|
+
|
|
8
|
+
import styles from "./DownloadList.module.css";
|
|
9
|
+
|
|
10
|
+
export const DownloadList: React.FC<DownloadListProps> = ({
|
|
11
|
+
heading,
|
|
12
|
+
headingLevel = "2",
|
|
13
|
+
content,
|
|
14
|
+
downloads,
|
|
15
|
+
}) => {
|
|
16
|
+
return (
|
|
17
|
+
<>
|
|
18
|
+
<div className={styles.headingContainer}>
|
|
19
|
+
<Heading size="xl" level={headingLevel}>
|
|
20
|
+
{heading}
|
|
21
|
+
</Heading>
|
|
22
|
+
<VerticalSpace size="24" />
|
|
23
|
+
<Text size="l">{content}</Text>
|
|
24
|
+
</div>
|
|
25
|
+
<VerticalSpace size="40" />
|
|
26
|
+
{downloads.map((props, i) => (
|
|
27
|
+
<>
|
|
28
|
+
<Download {...props} />{" "}
|
|
29
|
+
{i !== downloads.length - 1 && <VerticalSpace size="16" />}
|
|
30
|
+
</>
|
|
31
|
+
))}
|
|
32
|
+
</>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export interface DownloadListProps {
|
|
37
|
+
heading: string;
|
|
38
|
+
content: string;
|
|
39
|
+
downloads: DownloadProps[];
|
|
40
|
+
headingLevel?: HeadingLevel;
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DownloadList, type DownloadListProps } from "./DownloadList";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
@import url("@arc-ui/tokens-arc/dist/custom-media.css");
|
|
2
|
+
|
|
3
|
+
.labelDate {
|
|
4
|
+
padding-top: var(--sem-space-padding-20);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.authorContent {
|
|
8
|
+
padding-left: var(--sem-space-padding-70);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.googlePlayButtonWrapper {
|
|
12
|
+
padding: var(--sem-space-padding-70) 0 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.imgWrapper {
|
|
16
|
+
border-radius: var(--sem-border-radius-s);
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@media (--arc-custom-media-min-width-s-px) {
|
|
21
|
+
.googlePlayButtonWrapper {
|
|
22
|
+
padding: 0 0 0 var(--sem-space-padding-70);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@media (--arc-custom-media-min-width-m-px) {
|
|
27
|
+
.featurePost {
|
|
28
|
+
display: flex;
|
|
29
|
+
gap: 24px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.featurePostReversed {
|
|
33
|
+
flex-direction: row-reverse;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.contentContainer {
|
|
37
|
+
padding: 0 var(--sem-space-padding-110) 0 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.col {
|
|
41
|
+
flex: 0 1 auto;
|
|
42
|
+
width: 50%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.labelDate {
|
|
46
|
+
padding-left: var(--sem-space-padding-70);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media (--arc-custom-media-min-width-xl-px) {
|
|
51
|
+
.featurePost {
|
|
52
|
+
gap: 32px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.contentContainer {
|
|
56
|
+
padding: 0 var(--sem-space-padding-130) 0 0;
|
|
57
|
+
}
|
|
58
|
+
}
|