@arc-ui/community-components 3.0.1 → 3.2.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 (125) hide show
  1. package/.turbo/turbo-build.log +19 -22
  2. package/CHANGELOG.md +30 -0
  3. package/lib/Accordion/Accordion.cjs +2 -2
  4. package/lib/Accordion/Accordion.mjs +2 -2
  5. package/lib/ActionTile/ActionTile.cjs +35 -0
  6. package/lib/ActionTile/ActionTile.mjs +33 -0
  7. package/lib/ActionTile/styles.css +1 -0
  8. package/lib/ArticleSidebar/ArticleSidebar.cjs +68 -58
  9. package/lib/ArticleSidebar/ArticleSidebar.mjs +68 -58
  10. package/lib/ArticleSidebar/styles.css +1 -1
  11. package/lib/Author/Author.cjs +2 -2
  12. package/lib/Author/Author.mjs +2 -2
  13. package/lib/BannerWithTabs/BannerWithTabs.cjs +5 -5
  14. package/lib/BannerWithTabs/BannerWithTabs.mjs +5 -5
  15. package/lib/CopyLead/CopyLead.cjs +12 -12
  16. package/lib/CopyLead/CopyLead.mjs +12 -12
  17. package/lib/DownloadList/DownloadList.cjs +5 -5
  18. package/lib/DownloadList/DownloadList.mjs +5 -5
  19. package/lib/FAQs/FAQs.cjs +16 -12
  20. package/lib/FAQs/FAQs.mjs +16 -12
  21. package/lib/FeaturePost/FeaturePost.cjs +18 -11
  22. package/lib/FeaturePost/FeaturePost.mjs +18 -11
  23. package/lib/HeroLink/HeroLink.cjs +35 -0
  24. package/lib/HeroLink/HeroLink.mjs +33 -0
  25. package/lib/HeroLink/styles.css +1 -0
  26. package/lib/Highlights/Highlights.cjs +9 -16
  27. package/lib/Highlights/Highlights.mjs +7 -14
  28. package/lib/LinkTile/LinkTile.cjs +21 -0
  29. package/lib/LinkTile/LinkTile.mjs +19 -0
  30. package/lib/LinkTile/styles.css +1 -0
  31. package/lib/ProductNavigation/ProductNavigation.cjs +10 -13
  32. package/lib/ProductNavigation/ProductNavigation.mjs +10 -13
  33. package/lib/PromoListing/PromoListing.cjs +17 -9
  34. package/lib/PromoListing/PromoListing.mjs +17 -9
  35. package/lib/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.cjs +28 -0
  36. package/lib/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.mjs +26 -0
  37. package/lib/PromoListingThumbnailSignpost/styles.css +1 -0
  38. package/lib/Quote/Quote.cjs +3 -3
  39. package/lib/Quote/Quote.mjs +3 -3
  40. package/lib/SectionHeading/SectionHeading.cjs +3 -3
  41. package/lib/SectionHeading/SectionHeading.mjs +3 -3
  42. package/lib/Statistics/Statistics.cjs +6 -6
  43. package/lib/Statistics/Statistics.mjs +6 -6
  44. package/lib/Summary/Summary.cjs +1 -1
  45. package/lib/Summary/Summary.mjs +1 -1
  46. package/lib/ThumbnailSignpost/ThumbnailSignpost.cjs +15 -0
  47. package/lib/ThumbnailSignpost/ThumbnailSignpost.mjs +9 -0
  48. package/lib/ThumbnailSignpost/styles.css +1 -0
  49. package/lib/_shared/cjs/{Accordion-D5fpUJzm.cjs → Accordion-DfNGOjTm.cjs} +5 -5
  50. package/lib/_shared/cjs/{Author-X47pv31V.cjs → Author-D4dKNQem.cjs} +2 -2
  51. package/lib/_shared/cjs/BtIconArrowAltRight-CLQdP61r.cjs +11 -0
  52. package/lib/_shared/cjs/BtIconArrowRightFill-BVCZv7Lm.cjs +11 -0
  53. package/lib/_shared/cjs/{SectionHeading-DepTV4JA.cjs → SectionHeading-DeSFM0HV.cjs} +5 -5
  54. package/lib/_shared/cjs/ThumbnailSignpost-GkOiwt-Z.cjs +39 -0
  55. package/lib/_shared/cjs/filter-attrs-BizjMsy0.cjs +27 -0
  56. package/lib/_shared/cjs/{index.es-D11PdokQ.cjs → index.es-Dq8bYrbW.cjs} +1 -1
  57. package/lib/_shared/esm/{Accordion-LLwNdzax.mjs → Accordion-cd1oYvBv.mjs} +5 -5
  58. package/lib/_shared/esm/{Author-CydDYCma.mjs → Author-HnYsFTPT.mjs} +2 -2
  59. package/lib/_shared/esm/BtIconArrowAltRight-VH6RTTnL.mjs +9 -0
  60. package/lib/_shared/esm/BtIconArrowRightFill-D0zKgk3B.mjs +9 -0
  61. package/lib/_shared/esm/{SectionHeading-BayinGP_.mjs → SectionHeading-CpDLCndw.mjs} +5 -5
  62. package/lib/_shared/esm/ThumbnailSignpost-BeRiXbUp.mjs +37 -0
  63. package/lib/_shared/esm/filter-attrs-DZ7RCEZm.mjs +25 -0
  64. package/lib/_shared/esm/{index.es-C4PyYMjI.mjs → index.es-Bfdys5__.mjs} +1 -1
  65. package/lib/index.cjs +378 -227
  66. package/lib/index.cjs.map +1 -1
  67. package/lib/index.d.cts +190 -26
  68. package/lib/index.d.mts +190 -26
  69. package/lib/index.mjs +374 -228
  70. package/lib/index.mjs.map +1 -1
  71. package/lib/styles.css +1 -1
  72. package/package.json +13 -13
  73. package/src/components/Accordion/Accordion.tsx +3 -2
  74. package/src/components/Accordion/components/AccordionDisclosureList/AccordionDisclosureList.tsx +3 -3
  75. package/src/components/Accordion/components/AccordionHeading/AccordionHeading.tsx +3 -4
  76. package/src/components/ActionTile/ActionTile.module.css +89 -0
  77. package/src/components/ActionTile/ActionTile.tsx +70 -0
  78. package/src/components/ActionTile/index.ts +1 -0
  79. package/src/components/ArticleSidebar/ArticleSidebar.module.css +6 -0
  80. package/src/components/ArticleSidebar/ArticleSidebar.tsx +115 -85
  81. package/src/components/ArticleSidebar/types/link-section.ts +2 -1
  82. package/src/components/ArticleSidebar/types/share-button.ts +1 -1
  83. package/src/components/ArticleSidebar/types/share.ts +5 -1
  84. package/src/components/ArticleSidebar/types/text-section.ts +3 -2
  85. package/src/components/ArticleSidebar/types/topic.ts +2 -2
  86. package/src/components/Author/Author.tsx +2 -2
  87. package/src/components/BannerWithTabs/BannerWithTabs.tsx +9 -3
  88. package/src/components/CopyLead/CopyLead.tsx +21 -5
  89. package/src/components/CopyLead/components/MediaContent/MediaContent.tsx +10 -1
  90. package/src/components/CopyLead/templates/Content/Content.tsx +4 -0
  91. package/src/components/CopyLead/templates/Media/Media.tsx +10 -1
  92. package/src/components/CopyLead/types/copy-lead-button.ts +1 -1
  93. package/src/components/CopyLead/types/copy-lead-image.ts +1 -1
  94. package/src/components/DownloadList/DownloadList.tsx +4 -0
  95. package/src/components/FAQs/FAQs.tsx +20 -9
  96. package/src/components/FeaturePost/FeaturePost.tsx +27 -6
  97. package/src/components/FeaturePost/components/Image/Image.tsx +31 -7
  98. package/src/components/FeaturePost/types/feature-post-app-button-footer.ts +1 -1
  99. package/src/components/FeaturePost/types/feature-post-cta-footer.ts +2 -1
  100. package/src/components/FeaturePost/types/feature-post-image.ts +3 -1
  101. package/src/components/HeroLink/HeroLink.module.css +44 -0
  102. package/src/components/HeroLink/HeroLink.tsx +136 -0
  103. package/src/components/HeroLink/index.ts +2 -0
  104. package/src/components/Highlights/Highlights.tsx +6 -1
  105. package/src/components/Highlights/components/HighlightItem/HighlightItem.tsx +1 -0
  106. package/src/components/Highlights/types/highlight-link.ts +1 -0
  107. package/src/components/LinkTile/LinkTile.module.css +57 -0
  108. package/src/components/LinkTile/LinkTile.tsx +38 -0
  109. package/src/components/LinkTile/index.ts +1 -0
  110. package/src/components/ProductNavigation/ProductNavigation.tsx +10 -11
  111. package/src/components/ProductNavigation/types/product-list.ts +1 -8
  112. package/src/components/PromoListing/PromoListing.tsx +67 -3
  113. package/src/components/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.module.css +54 -0
  114. package/src/components/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.tsx +53 -0
  115. package/src/components/PromoListingThumbnailSignpost/index.ts +4 -0
  116. package/src/components/Quote/Quote.tsx +2 -2
  117. package/src/components/SectionHeading/SectionHeading.tsx +17 -7
  118. package/src/components/Statistics/Statistics.tsx +6 -2
  119. package/src/components/ThumbnailSignpost/ThumbnailSignpost.module.css +112 -0
  120. package/src/components/ThumbnailSignpost/ThumbnailSignpost.tsx +100 -0
  121. package/src/components/ThumbnailSignpost/index.ts +4 -0
  122. package/src/components/index.ts +5 -0
  123. package/versions.json +1 -1
  124. package/lib/_shared/cjs/filter-data-attrs-ajtUvDAC.cjs +0 -15
  125. package/lib/_shared/esm/filter-data-attrs-V7cbJuwS.mjs +0 -13
@@ -1,4 +1,4 @@
1
- import { type HeadingLevel } from "@arc-ui/components/dist/Heading";
1
+ import { type HeadingLevel } from "@arc-ui/components/Heading";
2
2
 
3
3
  export interface Share {
4
4
  heading: string;
@@ -6,4 +6,8 @@ export interface Share {
6
6
  x?: boolean;
7
7
  headingLevel?: HeadingLevel;
8
8
  linkedin?: boolean;
9
+ linkedInAriaLabel?: string;
10
+ xAriaLabel?: string;
11
+ clipboardAriaLabel?: string;
12
+ emailAriaLabel?: string;
9
13
  }
@@ -1,7 +1,8 @@
1
- import { type HeadingLevel } from "@arc-ui/components/dist/Heading";
1
+ import { ReactNode } from "react";
2
+ import { type HeadingLevel } from "@arc-ui/components/Heading";
2
3
 
3
4
  export interface TextSection {
4
5
  heading: string;
5
- content: string;
6
+ content: string | ReactNode;
6
7
  headingLevel?: HeadingLevel;
7
8
  }
@@ -1,5 +1,5 @@
1
- import { type HeadingLevel } from "@arc-ui/components/dist/Heading";
2
- import { type TagProps } from "@arc-ui/components/dist/types/components/Tag/Tag";
1
+ import { type HeadingLevel } from "@arc-ui/components/Heading";
2
+ import { type TagProps } from "@arc-ui/components/Tag";
3
3
 
4
4
  export interface Topic {
5
5
  heading: string;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
 
3
- import { filterDataAttrs } from "@arc-ui/community-utils/filter-data-attrs";
3
+ import { filterAttrs } from "@arc-ui/community-utils/filter-attrs";
4
4
 
5
5
  import { Grid, GridRow, GridCol } from "@arc-ui/components/Grid";
6
6
  import { type AvatarProps, Avatar } from "@arc-ui/components/Avatar";
@@ -21,7 +21,7 @@ export const Author: React.FC<AuthorProps> = ({
21
21
  const isLargeAvatar = avatar.size === "l" || avatar.size === "xl";
22
22
 
23
23
  return (
24
- <div {...filterDataAttrs(props)}>
24
+ <div {...filterAttrs(props)}>
25
25
  <Grid isFluid isGutterless>
26
26
  <GridRow align="center">
27
27
  <GridCol xs={isLargeAvatar ? 12 : "auto"}>
@@ -2,16 +2,20 @@ import React, { FC } from "react";
2
2
 
3
3
  import classNames from "classnames";
4
4
 
5
- import styles from "./BannerWithTabs.module.css";
6
- import { SectionHeading, SectionHeadingProps } from "../SectionHeading";
7
5
  import { TabbedBanner } from "@arc-ui/components/TabbedBanner";
8
- import { TemplateBannerProps } from "@arc-ui/components/dist/types/components/TemplateBanner/TemplateBanner";
6
+ import { TemplateBannerProps } from "@arc-ui/components/TemplateBanner";
7
+
8
+ import { SectionHeading, SectionHeadingProps } from "../SectionHeading";
9
+
10
+ import styles from "./BannerWithTabs.module.css";
9
11
 
10
12
  export const BannerWithTabs: FC<BannerWithTabsProps> = ({
11
13
  tabs,
12
14
  defaultValue,
13
15
  heading,
14
16
  content,
17
+ id,
18
+ isHeadingWordWrap,
15
19
  alignTypography = "left",
16
20
  minHeight,
17
21
  minHeightM,
@@ -24,6 +28,8 @@ export const BannerWithTabs: FC<BannerWithTabsProps> = ({
24
28
  })}
25
29
  >
26
30
  <SectionHeading
31
+ id={id}
32
+ isHeadingWordWrap={isHeadingWordWrap}
27
33
  heading={heading}
28
34
  content={content}
29
35
  isPadded={alignTypography === "left" ? true : false}
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
- import { filterDataAttrs } from "@arc-ui/community-utils/filter-data-attrs";
2
+ import { filterAttrs } from "@arc-ui/community-utils/filter-attrs";
3
3
 
4
- import { type HeadingLevel } from "@arc-ui/components/dist/Heading";
5
- import { type VideoPlayerProps } from "@arc-ui/components/dist/VideoPlayer";
4
+ import { type HeadingLevel } from "@arc-ui/components/Heading";
5
+ import { type VideoPlayerProps } from "@arc-ui/components/VideoPlayer";
6
6
 
7
7
  import {
8
8
  type CopyLeadButton,
@@ -19,26 +19,30 @@ import { ContentTemplate } from "./templates/Content";
19
19
  export const CopyLead: React.FC<CopyLeadProps> = ({
20
20
  button,
21
21
  heading,
22
+ id,
22
23
  headingLevel = "2",
23
24
  listItems,
24
25
  video,
25
26
  image,
26
27
  content,
28
+ isHeadingWordWrap,
27
29
  isReverseOrder = false,
28
30
  ...props
29
31
  }) => {
30
32
  if (video || image) {
31
33
  return (
32
34
  <MediaTemplate
35
+ id={id}
33
36
  content={content}
34
37
  video={video}
35
38
  image={image}
36
39
  listItems={listItems}
37
40
  heading={heading}
38
41
  headingLevel={headingLevel}
42
+ isHeadingWordWrap={isHeadingWordWrap}
39
43
  button={button}
40
44
  isReverseOrder={isReverseOrder}
41
- {...filterDataAttrs(props)}
45
+ {...filterAttrs(props)}
42
46
  />
43
47
  );
44
48
  }
@@ -46,12 +50,14 @@ export const CopyLead: React.FC<CopyLeadProps> = ({
46
50
  if (content) {
47
51
  return (
48
52
  <ContentTemplate
53
+ id={id}
49
54
  listItems={listItems}
50
55
  heading={heading}
51
56
  headingLevel={headingLevel}
57
+ isHeadingWordWrap={isHeadingWordWrap}
52
58
  button={button}
53
59
  content={content}
54
- {...filterDataAttrs(props)}
60
+ {...filterAttrs(props)}
55
61
  />
56
62
  );
57
63
  }
@@ -70,6 +76,16 @@ export interface CopyLeadProps {
70
76
  */
71
77
  headingLevel?: HeadingLevel;
72
78
 
79
+ /**
80
+ * id for the heading of `<MediaTemplate />` and `<ContentTemplate />`
81
+ */
82
+ id?: string;
83
+
84
+ /**
85
+ * Word wrap behavior for the heading
86
+ */
87
+ isHeadingWordWrap?: boolean;
88
+
73
89
  /**
74
90
  * Reverse the columns so the image / video appears on the left. Doesn't affect mobile layouts, and is only applied if there is a video or an image.
75
91
  */
@@ -12,11 +12,18 @@ import styles from "../../CopyLead.module.css";
12
12
 
13
13
  export const MediaContent: React.FC<MediaContentProps> = ({
14
14
  heading,
15
+ id,
15
16
  headingLevel,
17
+ isHeadingWordWrap,
16
18
  children,
17
19
  }) => (
18
20
  <div className={styles.mediaContainer}>
19
- <ArcHeading level={headingLevel} size="xl">
21
+ <ArcHeading
22
+ id={id}
23
+ level={headingLevel}
24
+ isWordWrap={isHeadingWordWrap}
25
+ size="xl"
26
+ >
20
27
  {heading}
21
28
  </ArcHeading>
22
29
 
@@ -31,6 +38,8 @@ export const MediaContent: React.FC<MediaContentProps> = ({
31
38
 
32
39
  interface MediaContentProps {
33
40
  heading: string;
41
+ id?: string;
34
42
  headingLevel?: HeadingLevel;
43
+ isHeadingWordWrap?: boolean;
35
44
  children?: string | ReactNode;
36
45
  }
@@ -22,8 +22,10 @@ import { getListHeadingLevel } from "../../utils/getListHeadingLevel";
22
22
 
23
23
  export const ContentTemplate: React.FC<ContentTemplateProps> = ({
24
24
  button,
25
+ id,
25
26
  heading,
26
27
  headingLevel,
28
+ isHeadingWordWrap,
27
29
  listItems,
28
30
  content,
29
31
  }) => {
@@ -41,8 +43,10 @@ export const ContentTemplate: React.FC<ContentTemplateProps> = ({
41
43
  <Container type="content" alignment="top">
42
44
  <Column>
43
45
  <SectionHeading
46
+ id={id}
44
47
  heading={heading}
45
48
  headingLevel={headingLevel}
49
+ isHeadingWordWrap={isHeadingWordWrap}
46
50
  content={content}
47
51
  />
48
52
 
@@ -30,12 +30,14 @@ const VideoPlayer = React.lazy(() =>
30
30
 
31
31
  export const MediaTemplate: React.FC<MediaTemplateProps> = ({
32
32
  button,
33
+ id,
33
34
  heading,
34
35
  headingLevel,
35
36
  listItems,
36
37
  video,
37
38
  image,
38
39
  content,
40
+ isHeadingWordWrap,
39
41
  isReverseOrder = false,
40
42
  }) => {
41
43
  const [isClient, setIsClient] = useState(false);
@@ -59,7 +61,12 @@ export const MediaTemplate: React.FC<MediaTemplateProps> = ({
59
61
  {!isMinWidthArcBreakpointXl && (
60
62
  <Columns>
61
63
  <ColumnsCol span={12} spanM={9}>
62
- <MediaContent heading={heading} headingLevel={headingLevel}>
64
+ <MediaContent
65
+ heading={heading}
66
+ headingLevel={headingLevel}
67
+ id={id}
68
+ isHeadingWordWrap={isHeadingWordWrap}
69
+ >
63
70
  {content}
64
71
  </MediaContent>
65
72
  </ColumnsCol>
@@ -99,6 +106,8 @@ export const MediaTemplate: React.FC<MediaTemplateProps> = ({
99
106
  interface MediaTemplateProps {
100
107
  heading: string;
101
108
  headingLevel: HeadingLevel;
109
+ id?: string;
110
+ isHeadingWordWrap?: boolean;
102
111
  listItems: CopyLeadListItem[];
103
112
  content?: string | ReactNode;
104
113
  isReverseOrder?: boolean;
@@ -1,4 +1,4 @@
1
- import { type ButtonProps } from "@arc-ui/components/dist/types/components/Button/Button";
1
+ import { type ButtonProps } from "@arc-ui/components/Button";
2
2
 
3
3
  export type CopyLeadButton = Pick<
4
4
  ButtonProps,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  type ImageSourceProps,
3
3
  type ImageProps as ArcImageProps,
4
- } from "@arc-ui/components/dist/types/components/Image/Image";
4
+ } from "@arc-ui/components/Image";
5
5
 
6
6
  export interface CopyLeadImage
7
7
  extends Pick<
@@ -8,7 +8,9 @@ import styles from "./DownloadList.module.css";
8
8
 
9
9
  export const DownloadList: React.FC<DownloadListProps> = ({
10
10
  heading,
11
+ id,
11
12
  headingLevel = "2",
13
+ isHeadingWordWrap,
12
14
  content,
13
15
  downloads,
14
16
  }) => {
@@ -16,7 +18,9 @@ export const DownloadList: React.FC<DownloadListProps> = ({
16
18
  <>
17
19
  <div className={styles.headingContainer}>
18
20
  <SectionHeading
21
+ id={id}
19
22
  heading={heading}
23
+ isHeadingWordWrap={isHeadingWordWrap}
20
24
  headingLevel={headingLevel}
21
25
  content={content}
22
26
  />
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import classNames from "classnames";
3
3
 
4
- import { filterDataAttrs } from "@arc-ui/community-utils/filter-data-attrs";
4
+ import { filterAttrs } from "@arc-ui/community-utils/filter-attrs";
5
5
 
6
6
  import { Accordion, type AccordionProps } from "../Accordion";
7
7
  import { SectionHeading, type SectionHeadingProps } from "../SectionHeading";
@@ -12,19 +12,35 @@ import { Tabs, TabsList, TabsContent, TabsItem } from "@arc-ui/components/Tabs";
12
12
 
13
13
  import styles from "./FAQs.module.css";
14
14
 
15
+ const scrollToSectionFocusFirstElement = (item: ExtendedAccordionProps) => {
16
+ if (!item.id) return;
17
+
18
+ document.getElementById(item.id)?.scrollIntoView({ behavior: "smooth" });
19
+
20
+ // preventScroll avoids interfering with the scroll animation.
21
+ document
22
+ .getElementById(item.disclosureList?.[0]?.id)
23
+ ?.querySelector("summary")
24
+ ?.focus({ preventScroll: true });
25
+ };
26
+
15
27
  export const FAQs: React.FC<FAQsProps> = ({
16
28
  heading,
29
+ isHeadingWordWrap,
17
30
  content,
31
+ id,
18
32
  isPadded = false,
19
33
  headingLevel = "2",
20
34
  image,
21
- type = "list",
35
+ type,
22
36
  linkListHeading = "Skip to section",
23
37
  accordionData,
24
38
  ...props
25
39
  }) => (
26
- <div className={styles.FAQs} {...filterDataAttrs(props)}>
40
+ <div className={styles.FAQs} {...filterAttrs(props)}>
27
41
  <SectionHeading
42
+ id={id}
43
+ isHeadingWordWrap={isHeadingWordWrap}
28
44
  heading={heading}
29
45
  content={content}
30
46
  image={image}
@@ -49,12 +65,7 @@ export const FAQs: React.FC<FAQsProps> = ({
49
65
  href={`#${item.id}`}
50
66
  onClick={(e) => {
51
67
  e.preventDefault();
52
- if (item.id) {
53
- const element = document.getElementById(item.id);
54
- if (element) {
55
- element.scrollIntoView({ behavior: "smooth" });
56
- }
57
- }
68
+ scrollToSectionFocusFirstElement(item);
58
69
  }}
59
70
  >
60
71
  {item.altLinkTitle ?? item.heading}
@@ -1,8 +1,8 @@
1
- import React from "react";
1
+ import React, { type ReactNode } from "react";
2
2
  import classNames from "classnames";
3
3
  import { isDate, format } from "date-fns";
4
4
 
5
- import { filterDataAttrs } from "@arc-ui/community-utils/filter-data-attrs";
5
+ import { filterAttrs } from "@arc-ui/community-utils/filter-attrs";
6
6
 
7
7
  import { ArcSizeBreakpointsM } from "@arc-ui/tokens-arc";
8
8
 
@@ -31,12 +31,14 @@ import { MediaContent } from "./components/MediaContent/MediaContent";
31
31
  * */
32
32
  export const FeaturePost: React.FC<FeaturePostProps> = ({
33
33
  heading,
34
+ id,
34
35
  headingLevel = "2",
35
36
  label,
36
37
  image,
37
38
  content,
38
39
  footer,
39
40
  video,
41
+ isHeadingWordWrap,
40
42
  isReverseOrder = false,
41
43
  ...props
42
44
  }) => {
@@ -50,7 +52,7 @@ export const FeaturePost: React.FC<FeaturePostProps> = ({
50
52
  className={classNames(styles.featurePost, {
51
53
  [styles.featurePostReversed]: isReverseOrder,
52
54
  })}
53
- {...filterDataAttrs(props)}
55
+ {...filterAttrs(props)}
54
56
  >
55
57
  <div className={styles.col}>
56
58
  <div className={styles.contentContainer}>
@@ -82,7 +84,12 @@ export const FeaturePost: React.FC<FeaturePostProps> = ({
82
84
  </Grid>
83
85
  )}
84
86
 
85
- <Heading level={headingLevel} size="xl">
87
+ <Heading
88
+ id={id}
89
+ level={headingLevel}
90
+ isWordWrap={isHeadingWordWrap}
91
+ size="xl"
92
+ >
86
93
  {heading}
87
94
  </Heading>
88
95
 
@@ -96,7 +103,11 @@ export const FeaturePost: React.FC<FeaturePostProps> = ({
96
103
 
97
104
  <VerticalSpace size="40" />
98
105
 
99
- <Text size="l">{content}</Text>
106
+ {typeof content === "string" ? (
107
+ <Text size="l">{content}</Text>
108
+ ) : (
109
+ content
110
+ )}
100
111
 
101
112
  {footer?.type === "cta" && (
102
113
  <>
@@ -165,15 +176,25 @@ export interface FeaturePostProps {
165
176
  */
166
177
  heading: string;
167
178
 
179
+ /**
180
+ * id for `FeaturePost`.
181
+ */
182
+ id?: string;
183
+
168
184
  /**
169
185
  * Determine a heading level for `<FeaturePost />`
170
186
  */
171
187
  headingLevel?: HeadingLevel;
172
188
 
189
+ /**
190
+ * Word wrap behavior for the heading
191
+ */
192
+ isHeadingWordWrap?: boolean;
193
+
173
194
  /**
174
195
  * Text content for `FeaturePost`.
175
196
  */
176
- content: string;
197
+ content: ReactNode;
177
198
 
178
199
  /**
179
200
  * Reverse the columns so the image / video appears on the left. Doesn't affect mobile layouts, and is only applied if there is a video or an image.
@@ -1,16 +1,40 @@
1
1
  import React from "react";
2
2
 
3
3
  import { Image as ArcImage } from "@arc-ui/components/Image";
4
+ import { Text } from "@arc-ui/components/Text";
5
+ import { Heading } from "@arc-ui/components/Heading";
6
+ import { VerticalSpace } from "@arc-ui/components/VerticalSpace";
4
7
 
5
8
  import { FeaturePostImage } from "../../types";
6
9
 
7
10
  import styles from "../../FeaturePost.module.css";
8
11
 
9
- export const Image: React.FC<FeaturePostImage> = ({ sources, ...props }) => (
10
- <div className={styles.imgWrapper}>
11
- <ArcImage fadeOnLoad {...props}>
12
- {sources &&
13
- sources.map((source) => <source key={source.srcSet} {...source} />)}
14
- </ArcImage>
15
- </div>
12
+ export const Image: React.FC<FeaturePostImage> = ({
13
+ sources,
14
+ title,
15
+ description,
16
+ ...props
17
+ }) => (
18
+ <>
19
+ <div className={styles.imgWrapper}>
20
+ <ArcImage fadeOnLoad {...props}>
21
+ {sources &&
22
+ sources.map((source) => <source key={source.srcSet} {...source} />)}
23
+ </ArcImage>
24
+ </div>
25
+ {title && (
26
+ <>
27
+ <VerticalSpace size="24" />
28
+ <Heading level="3" size="s">
29
+ {title}
30
+ </Heading>
31
+ {description && (
32
+ <>
33
+ <VerticalSpace size="16" />
34
+ <Text size="m">{description}</Text>
35
+ </>
36
+ )}
37
+ </>
38
+ )}
39
+ </>
16
40
  );
@@ -1,4 +1,4 @@
1
- import { type AppButtonProps } from "@arc-ui/components/dist/types/components/AppButton";
1
+ import { type AppButtonProps } from "@arc-ui/components/AppButton";
2
2
 
3
3
  export interface FeaturePostAppButtonFooter {
4
4
  type: "appButton";
@@ -1,4 +1,5 @@
1
- import { type ButtonProps } from "@arc-ui/components/dist/types/components/Button/Button";
1
+ import { type ButtonProps } from "@arc-ui/components/Button";
2
+
2
3
  import { type AuthorProps } from "../../Author/Author";
3
4
 
4
5
  export interface FeaturePostCtaFooter {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  type ImageSourceProps,
3
3
  type ImageProps as ArcImageProps,
4
- } from "@arc-ui/components/dist/types/components/Image/Image";
4
+ } from "@arc-ui/components/Image";
5
5
 
6
6
  export interface FeaturePostImage
7
7
  extends Pick<
@@ -16,4 +16,6 @@ export interface FeaturePostImage
16
16
  | "fadeOnLoad"
17
17
  > {
18
18
  sources?: Pick<ImageSourceProps, "media" | "sizes" | "srcSet">[];
19
+ title?: string;
20
+ description?: string;
19
21
  }
@@ -0,0 +1,44 @@
1
+ .heroLink {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ gap: 4px;
6
+ padding: 16px 16px 16px 24px;
7
+ border: 2px solid #e5e5e5;
8
+ border-radius: 32px;
9
+ background: transparent;
10
+ color: #5514b4;
11
+ text-decoration: none;
12
+ font-size: 14px;
13
+ font-weight: 500;
14
+ line-height: 1;
15
+ cursor: pointer;
16
+ transition: all 0.2s ease;
17
+ width: fit-content;
18
+ height: fit-content;
19
+ }
20
+
21
+ .heroLink:hover {
22
+ border-color: #3f187f;
23
+ color: #3f187f;
24
+ }
25
+
26
+ .heroLink-inner {
27
+ display: flex;
28
+ align-items: center;
29
+ gap: 4px;
30
+ }
31
+
32
+ .heroLink-label {
33
+ white-space: nowrap;
34
+ }
35
+
36
+ .heroLink-icon {
37
+ display: flex;
38
+ align-items: center;
39
+ justify-content: center;
40
+ }
41
+
42
+ .heroLink--emptyLabel {
43
+ padding: 16px;
44
+ }