@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.
Files changed (198) hide show
  1. package/.turbo/turbo-build.log +16 -0
  2. package/CHANGELOG.md +7 -0
  3. package/LICENSE +21 -0
  4. package/dist/Accordion/Accordion.cjs.js +31 -0
  5. package/dist/Accordion/Accordion.esm.js +29 -0
  6. package/dist/Author/Author.cjs.js +14 -0
  7. package/dist/Author/Author.esm.js +8 -0
  8. package/dist/Author/styles.css +1 -0
  9. package/dist/BannerWithTabs/BannerWithTabs.cjs.js +36 -0
  10. package/dist/BannerWithTabs/BannerWithTabs.esm.js +34 -0
  11. package/dist/BannerWithTabs/styles.css +1 -0
  12. package/dist/CopyLead/CopyLead.cjs.js +129 -0
  13. package/dist/CopyLead/CopyLead.esm.js +127 -0
  14. package/dist/CopyLead/styles.css +1 -0
  15. package/dist/DownloadList/DownloadList.cjs.js +26 -0
  16. package/dist/DownloadList/DownloadList.esm.js +24 -0
  17. package/dist/DownloadList/styles.css +1 -0
  18. package/dist/FeaturePost/FeaturePost.cjs.js +2281 -0
  19. package/dist/FeaturePost/FeaturePost.esm.js +2279 -0
  20. package/dist/FeaturePost/styles.css +1 -0
  21. package/dist/Highlights/Highlights.cjs.js +50 -0
  22. package/dist/Highlights/Highlights.esm.js +48 -0
  23. package/dist/Highlights/styles.css +1 -0
  24. package/dist/PromoListing/PromoListing.cjs.js +50 -0
  25. package/dist/PromoListing/PromoListing.esm.js +48 -0
  26. package/dist/PromoListing/styles.css +1 -0
  27. package/dist/Quote/Quote.cjs.js +27 -0
  28. package/dist/Quote/Quote.esm.js +25 -0
  29. package/dist/Quote/styles.css +1 -0
  30. package/dist/SectionHeading/SectionHeading.cjs.js +14 -0
  31. package/dist/SectionHeading/SectionHeading.esm.js +8 -0
  32. package/dist/SectionHeading/styles.css +1 -0
  33. package/dist/Statistics/Statistics.cjs.js +60 -0
  34. package/dist/Statistics/Statistics.esm.js +58 -0
  35. package/dist/Statistics/styles.css +1 -0
  36. package/dist/Summary/Summary.cjs.js +30 -0
  37. package/dist/Summary/Summary.esm.js +28 -0
  38. package/dist/Summary/styles.css +1 -0
  39. package/dist/_shared/cjs/Author-CAo-qryZ.js +30 -0
  40. package/dist/_shared/cjs/SectionHeading-L2EpTQ79.js +25 -0
  41. package/dist/_shared/cjs/filter-data-attrs-ajtUvDAC.js +15 -0
  42. package/dist/_shared/cjs/index-Bp6Dd2i1.js +94 -0
  43. package/dist/_shared/cjs/index.es-X428Cm3N.js +15 -0
  44. package/dist/_shared/cjs/tslib.es6-DBA0GFPJ.js +48 -0
  45. package/dist/_shared/esm/Author-Bx-cE9Pz.js +28 -0
  46. package/dist/_shared/esm/SectionHeading-C70XNhqJ.js +23 -0
  47. package/dist/_shared/esm/filter-data-attrs-V7cbJuwS.js +13 -0
  48. package/dist/_shared/esm/index-BfTCfPZ1.js +92 -0
  49. package/dist/_shared/esm/index.es-BzmvPxje.js +10 -0
  50. package/dist/_shared/esm/tslib.es6-Cv15O4Nx.js +46 -0
  51. package/dist/index.es.js +2796 -0
  52. package/dist/index.es.js.map +1 -0
  53. package/dist/index.js +2808 -0
  54. package/dist/index.js.map +1 -0
  55. package/dist/styles.css +1 -0
  56. package/dist/types/components/Accordion/Accordion.d.ts +9 -0
  57. package/dist/types/components/Accordion/components/AccordionDisclosureList/AccordionDisclosureList.d.ts +9 -0
  58. package/dist/types/components/Accordion/index.d.ts +1 -0
  59. package/dist/types/components/Author/Author.d.ts +17 -0
  60. package/dist/types/components/Author/index.d.ts +1 -0
  61. package/dist/types/components/BannerWithTabs/BannerWithTabs.d.ts +17 -0
  62. package/dist/types/components/BannerWithTabs/index.d.ts +1 -0
  63. package/dist/types/components/CopyLead/CopyLead.d.ts +42 -0
  64. package/dist/types/components/CopyLead/components/Button/Button.d.ts +3 -0
  65. package/dist/types/components/CopyLead/components/Button/index.d.ts +1 -0
  66. package/dist/types/components/CopyLead/components/Column/Column.d.ts +6 -0
  67. package/dist/types/components/CopyLead/components/Column/index.d.ts +1 -0
  68. package/dist/types/components/CopyLead/components/Container/Container.d.ts +9 -0
  69. package/dist/types/components/CopyLead/components/Container/index.d.ts +1 -0
  70. package/dist/types/components/CopyLead/components/IconList/IconList.d.ts +8 -0
  71. package/dist/types/components/CopyLead/components/IconList/index.d.ts +1 -0
  72. package/dist/types/components/CopyLead/components/Image/Image.d.ts +3 -0
  73. package/dist/types/components/CopyLead/components/Image/index.d.ts +1 -0
  74. package/dist/types/components/CopyLead/components/MediaContent/MediaContent.d.ts +9 -0
  75. package/dist/types/components/CopyLead/components/MediaContent/index.d.ts +1 -0
  76. package/dist/types/components/CopyLead/index.d.ts +1 -0
  77. package/dist/types/components/CopyLead/templates/Content/Content.d.ts +10 -0
  78. package/dist/types/components/CopyLead/templates/Content/index.d.ts +1 -0
  79. package/dist/types/components/CopyLead/templates/Media/Media.d.ts +16 -0
  80. package/dist/types/components/CopyLead/templates/Media/index.d.ts +1 -0
  81. package/dist/types/components/CopyLead/types/copy-lead-button.d.ts +2 -0
  82. package/dist/types/components/CopyLead/types/copy-lead-image.d.ts +4 -0
  83. package/dist/types/components/CopyLead/types/copy-lead-list-item.d.ts +6 -0
  84. package/dist/types/components/CopyLead/types/copy-lead-transcript-link.d.ts +6 -0
  85. package/dist/types/components/CopyLead/types/index.d.ts +4 -0
  86. package/dist/types/components/DownloadList/DownloadList.d.ts +10 -0
  87. package/dist/types/components/DownloadList/index.d.ts +1 -0
  88. package/dist/types/components/FeaturePost/FeaturePost.d.ts +45 -0
  89. package/dist/types/components/FeaturePost/components/Image/Image.d.ts +3 -0
  90. package/dist/types/components/FeaturePost/components/Image/index.d.ts +1 -0
  91. package/dist/types/components/FeaturePost/components/MediaContent/MediaContent.d.ts +15 -0
  92. package/dist/types/components/FeaturePost/index.d.ts +1 -0
  93. package/dist/types/components/FeaturePost/types/feature-post-app-button-footer.d.ts +6 -0
  94. package/dist/types/components/FeaturePost/types/feature-post-cta-footer.d.ts +7 -0
  95. package/dist/types/components/FeaturePost/types/feature-post-image.d.ts +4 -0
  96. package/dist/types/components/FeaturePost/types/index.d.ts +3 -0
  97. package/dist/types/components/Highlights/Highlights.d.ts +17 -0
  98. package/dist/types/components/Highlights/components/HighlightItem/HighlightItem.d.ts +14 -0
  99. package/dist/types/components/Highlights/components/HighlightList/HighlightList.d.ts +9 -0
  100. package/dist/types/components/Highlights/index.d.ts +1 -0
  101. package/dist/types/components/Highlights/types/highlight-list-item.d.ts +10 -0
  102. package/dist/types/components/Highlights/types/index.d.ts +1 -0
  103. package/dist/types/components/PromoListing/PromoListing.d.ts +38 -0
  104. package/dist/types/components/PromoListing/index.d.ts +1 -0
  105. package/dist/types/components/Quote/Quote.d.ts +11 -0
  106. package/dist/types/components/Quote/index.d.ts +1 -0
  107. package/dist/types/components/SectionHeading/SectionHeading.d.ts +25 -0
  108. package/dist/types/components/SectionHeading/index.d.ts +1 -0
  109. package/dist/types/components/Statistics/Statistics.d.ts +7 -0
  110. package/dist/types/components/Statistics/helpers/get-link-props.d.ts +2 -0
  111. package/dist/types/components/Statistics/index.d.ts +1 -0
  112. package/dist/types/components/Statistics/types/statistic-link.d.ts +6 -0
  113. package/dist/types/components/Statistics/types/statistic.d.ts +8 -0
  114. package/dist/types/components/Summary/Summary.d.ts +18 -0
  115. package/dist/types/components/Summary/index.d.ts +1 -0
  116. package/dist/types/components/index.d.ts +11 -0
  117. package/dist/types/index.d.ts +1 -0
  118. package/eslint.config.js +4 -0
  119. package/package.json +105 -0
  120. package/postcss.config.cjs +5 -0
  121. package/rollup.config.js +101 -0
  122. package/src/components/Accordion/Accordion.tsx +38 -0
  123. package/src/components/Accordion/components/AccordionDisclosureList/AccordionDisclosureList.tsx +44 -0
  124. package/src/components/Accordion/index.ts +1 -0
  125. package/src/components/Author/Author.module.css +9 -0
  126. package/src/components/Author/Author.tsx +60 -0
  127. package/src/components/Author/index.ts +1 -0
  128. package/src/components/BannerWithTabs/BannerWithTabs.module.css +19 -0
  129. package/src/components/BannerWithTabs/BannerWithTabs.tsx +74 -0
  130. package/src/components/BannerWithTabs/index.ts +1 -0
  131. package/src/components/CopyLead/CopyLead.module.css +127 -0
  132. package/src/components/CopyLead/CopyLead.tsx +102 -0
  133. package/src/components/CopyLead/components/Button/Button.tsx +13 -0
  134. package/src/components/CopyLead/components/Button/index.ts +1 -0
  135. package/src/components/CopyLead/components/Column/Column.tsx +10 -0
  136. package/src/components/CopyLead/components/Column/index.ts +1 -0
  137. package/src/components/CopyLead/components/Container/Container.tsx +32 -0
  138. package/src/components/CopyLead/components/Container/index.ts +1 -0
  139. package/src/components/CopyLead/components/IconList/IconList.tsx +49 -0
  140. package/src/components/CopyLead/components/IconList/index.ts +1 -0
  141. package/src/components/CopyLead/components/Image/Image.tsx +17 -0
  142. package/src/components/CopyLead/components/Image/index.ts +1 -0
  143. package/src/components/CopyLead/components/MediaContent/MediaContent.tsx +36 -0
  144. package/src/components/CopyLead/components/MediaContent/index.ts +1 -0
  145. package/src/components/CopyLead/index.ts +1 -0
  146. package/src/components/CopyLead/templates/Content/Content.tsx +58 -0
  147. package/src/components/CopyLead/templates/Content/index.ts +1 -0
  148. package/src/components/CopyLead/templates/Media/Media.tsx +104 -0
  149. package/src/components/CopyLead/templates/Media/index.ts +1 -0
  150. package/src/components/CopyLead/types/copy-lead-button.ts +6 -0
  151. package/src/components/CopyLead/types/copy-lead-image.ts +19 -0
  152. package/src/components/CopyLead/types/copy-lead-list-item.ts +7 -0
  153. package/src/components/CopyLead/types/copy-lead-transcript-link.ts +6 -0
  154. package/src/components/CopyLead/types/index.ts +4 -0
  155. package/src/components/DownloadList/DownloadList.module.css +7 -0
  156. package/src/components/DownloadList/DownloadList.tsx +41 -0
  157. package/src/components/DownloadList/index.ts +1 -0
  158. package/src/components/FeaturePost/FeaturePost.module.css +58 -0
  159. package/src/components/FeaturePost/FeaturePost.tsx +203 -0
  160. package/src/components/FeaturePost/components/Image/Image.tsx +18 -0
  161. package/src/components/FeaturePost/components/Image/index.ts +1 -0
  162. package/src/components/FeaturePost/components/MediaContent/MediaContent.tsx +45 -0
  163. package/src/components/FeaturePost/components/MediaContent/index.ts +0 -0
  164. package/src/components/FeaturePost/index.ts +1 -0
  165. package/src/components/FeaturePost/types/feature-post-app-button-footer.ts +7 -0
  166. package/src/components/FeaturePost/types/feature-post-cta-footer.ts +11 -0
  167. package/src/components/FeaturePost/types/feature-post-image.ts +19 -0
  168. package/src/components/FeaturePost/types/index.ts +3 -0
  169. package/src/components/Highlights/Highlights.module.css +85 -0
  170. package/src/components/Highlights/Highlights.tsx +53 -0
  171. package/src/components/Highlights/components/HighlightItem/HighlightItem.tsx +68 -0
  172. package/src/components/Highlights/components/HighlightList/HighlightList.tsx +42 -0
  173. package/src/components/Highlights/index.ts +1 -0
  174. package/src/components/Highlights/types/highlight-list-item.ts +11 -0
  175. package/src/components/Highlights/types/index.ts +1 -0
  176. package/src/components/PromoListing/PromoListing.module.css +97 -0
  177. package/src/components/PromoListing/PromoListing.tsx +153 -0
  178. package/src/components/PromoListing/index.ts +1 -0
  179. package/src/components/Quote/Quote.module.css +60 -0
  180. package/src/components/Quote/Quote.tsx +57 -0
  181. package/src/components/Quote/index.ts +1 -0
  182. package/src/components/SectionHeading/SectionHeading.module.css +34 -0
  183. package/src/components/SectionHeading/SectionHeading.tsx +65 -0
  184. package/src/components/SectionHeading/index.ts +1 -0
  185. package/src/components/Statistics/Statistics.module.css +25 -0
  186. package/src/components/Statistics/Statistics.tsx +97 -0
  187. package/src/components/Statistics/helpers/get-link-props.ts +11 -0
  188. package/src/components/Statistics/index.ts +1 -0
  189. package/src/components/Statistics/types/statistic-link.ts +6 -0
  190. package/src/components/Statistics/types/statistic.ts +9 -0
  191. package/src/components/Summary/Summary.module.css +31 -0
  192. package/src/components/Summary/Summary.tsx +65 -0
  193. package/src/components/Summary/index.ts +1 -0
  194. package/src/components/index.ts +11 -0
  195. package/src/index.ts +5 -0
  196. package/src/types/file-types.d.ts +9 -0
  197. package/stylelint.config.js +4 -0
  198. 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,10 @@
1
+ import React from "react";
2
+ import styles from "../../CopyLead.module.css";
3
+
4
+ export const Column: React.FC<ColumnProps> = ({ children }) => (
5
+ <div className={styles.col}>{children}</div>
6
+ );
7
+
8
+ interface ColumnProps {
9
+ children?: React.ReactNode;
10
+ }
@@ -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,6 @@
1
+ import { type ButtonProps } from "@arc-ui/components/dist/types/components/Button/Button";
2
+
3
+ export type CopyLeadButton = Pick<
4
+ ButtonProps,
5
+ "label" | "onClick" | "href" | "target" | "ariaLabel"
6
+ >;
@@ -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,7 @@
1
+ import { type ArcIcon } from "@arc-ui/components/dist/types/types/arc-icon";
2
+
3
+ export interface CopyLeadListItem {
4
+ icon: ArcIcon;
5
+ heading: string;
6
+ text?: string;
7
+ }
@@ -0,0 +1,6 @@
1
+ export interface CopyLeadTranscriptLink {
2
+ url: string;
3
+ text: string;
4
+ fileSize: string;
5
+ format: string;
6
+ }
@@ -0,0 +1,4 @@
1
+ export { type CopyLeadImage } from "./copy-lead-image";
2
+ export { type CopyLeadListItem } from "./copy-lead-list-item";
3
+ export { type CopyLeadTranscriptLink } from "./copy-lead-transcript-link";
4
+ export { type CopyLeadButton } from "./copy-lead-button";
@@ -0,0 +1,7 @@
1
+ @import url("@arc-ui/tokens-arc/dist/custom-media.css");
2
+
3
+ @media (--arc-custom-media-min-width-m-px) {
4
+ .headingContainer {
5
+ max-width: 75%;
6
+ }
7
+ }
@@ -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
+ }