@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.
- package/.turbo/turbo-build.log +19 -22
- package/CHANGELOG.md +30 -0
- package/lib/Accordion/Accordion.cjs +2 -2
- package/lib/Accordion/Accordion.mjs +2 -2
- package/lib/ActionTile/ActionTile.cjs +35 -0
- package/lib/ActionTile/ActionTile.mjs +33 -0
- package/lib/ActionTile/styles.css +1 -0
- package/lib/ArticleSidebar/ArticleSidebar.cjs +68 -58
- package/lib/ArticleSidebar/ArticleSidebar.mjs +68 -58
- package/lib/ArticleSidebar/styles.css +1 -1
- package/lib/Author/Author.cjs +2 -2
- package/lib/Author/Author.mjs +2 -2
- package/lib/BannerWithTabs/BannerWithTabs.cjs +5 -5
- package/lib/BannerWithTabs/BannerWithTabs.mjs +5 -5
- package/lib/CopyLead/CopyLead.cjs +12 -12
- package/lib/CopyLead/CopyLead.mjs +12 -12
- package/lib/DownloadList/DownloadList.cjs +5 -5
- package/lib/DownloadList/DownloadList.mjs +5 -5
- package/lib/FAQs/FAQs.cjs +16 -12
- package/lib/FAQs/FAQs.mjs +16 -12
- package/lib/FeaturePost/FeaturePost.cjs +18 -11
- package/lib/FeaturePost/FeaturePost.mjs +18 -11
- package/lib/HeroLink/HeroLink.cjs +35 -0
- package/lib/HeroLink/HeroLink.mjs +33 -0
- package/lib/HeroLink/styles.css +1 -0
- package/lib/Highlights/Highlights.cjs +9 -16
- package/lib/Highlights/Highlights.mjs +7 -14
- package/lib/LinkTile/LinkTile.cjs +21 -0
- package/lib/LinkTile/LinkTile.mjs +19 -0
- package/lib/LinkTile/styles.css +1 -0
- package/lib/ProductNavigation/ProductNavigation.cjs +10 -13
- package/lib/ProductNavigation/ProductNavigation.mjs +10 -13
- package/lib/PromoListing/PromoListing.cjs +17 -9
- package/lib/PromoListing/PromoListing.mjs +17 -9
- package/lib/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.cjs +28 -0
- package/lib/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.mjs +26 -0
- package/lib/PromoListingThumbnailSignpost/styles.css +1 -0
- package/lib/Quote/Quote.cjs +3 -3
- package/lib/Quote/Quote.mjs +3 -3
- package/lib/SectionHeading/SectionHeading.cjs +3 -3
- package/lib/SectionHeading/SectionHeading.mjs +3 -3
- package/lib/Statistics/Statistics.cjs +6 -6
- package/lib/Statistics/Statistics.mjs +6 -6
- package/lib/Summary/Summary.cjs +1 -1
- package/lib/Summary/Summary.mjs +1 -1
- package/lib/ThumbnailSignpost/ThumbnailSignpost.cjs +15 -0
- package/lib/ThumbnailSignpost/ThumbnailSignpost.mjs +9 -0
- package/lib/ThumbnailSignpost/styles.css +1 -0
- package/lib/_shared/cjs/{Accordion-D5fpUJzm.cjs → Accordion-DfNGOjTm.cjs} +5 -5
- package/lib/_shared/cjs/{Author-X47pv31V.cjs → Author-D4dKNQem.cjs} +2 -2
- package/lib/_shared/cjs/BtIconArrowAltRight-CLQdP61r.cjs +11 -0
- package/lib/_shared/cjs/BtIconArrowRightFill-BVCZv7Lm.cjs +11 -0
- package/lib/_shared/cjs/{SectionHeading-DepTV4JA.cjs → SectionHeading-DeSFM0HV.cjs} +5 -5
- package/lib/_shared/cjs/ThumbnailSignpost-GkOiwt-Z.cjs +39 -0
- package/lib/_shared/cjs/filter-attrs-BizjMsy0.cjs +27 -0
- package/lib/_shared/cjs/{index.es-D11PdokQ.cjs → index.es-Dq8bYrbW.cjs} +1 -1
- package/lib/_shared/esm/{Accordion-LLwNdzax.mjs → Accordion-cd1oYvBv.mjs} +5 -5
- package/lib/_shared/esm/{Author-CydDYCma.mjs → Author-HnYsFTPT.mjs} +2 -2
- package/lib/_shared/esm/BtIconArrowAltRight-VH6RTTnL.mjs +9 -0
- package/lib/_shared/esm/BtIconArrowRightFill-D0zKgk3B.mjs +9 -0
- package/lib/_shared/esm/{SectionHeading-BayinGP_.mjs → SectionHeading-CpDLCndw.mjs} +5 -5
- package/lib/_shared/esm/ThumbnailSignpost-BeRiXbUp.mjs +37 -0
- package/lib/_shared/esm/filter-attrs-DZ7RCEZm.mjs +25 -0
- package/lib/_shared/esm/{index.es-C4PyYMjI.mjs → index.es-Bfdys5__.mjs} +1 -1
- package/lib/index.cjs +378 -227
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +190 -26
- package/lib/index.d.mts +190 -26
- package/lib/index.mjs +374 -228
- package/lib/index.mjs.map +1 -1
- package/lib/styles.css +1 -1
- package/package.json +13 -13
- package/src/components/Accordion/Accordion.tsx +3 -2
- package/src/components/Accordion/components/AccordionDisclosureList/AccordionDisclosureList.tsx +3 -3
- package/src/components/Accordion/components/AccordionHeading/AccordionHeading.tsx +3 -4
- package/src/components/ActionTile/ActionTile.module.css +89 -0
- package/src/components/ActionTile/ActionTile.tsx +70 -0
- package/src/components/ActionTile/index.ts +1 -0
- package/src/components/ArticleSidebar/ArticleSidebar.module.css +6 -0
- package/src/components/ArticleSidebar/ArticleSidebar.tsx +115 -85
- package/src/components/ArticleSidebar/types/link-section.ts +2 -1
- package/src/components/ArticleSidebar/types/share-button.ts +1 -1
- package/src/components/ArticleSidebar/types/share.ts +5 -1
- package/src/components/ArticleSidebar/types/text-section.ts +3 -2
- package/src/components/ArticleSidebar/types/topic.ts +2 -2
- package/src/components/Author/Author.tsx +2 -2
- package/src/components/BannerWithTabs/BannerWithTabs.tsx +9 -3
- package/src/components/CopyLead/CopyLead.tsx +21 -5
- package/src/components/CopyLead/components/MediaContent/MediaContent.tsx +10 -1
- package/src/components/CopyLead/templates/Content/Content.tsx +4 -0
- package/src/components/CopyLead/templates/Media/Media.tsx +10 -1
- package/src/components/CopyLead/types/copy-lead-button.ts +1 -1
- package/src/components/CopyLead/types/copy-lead-image.ts +1 -1
- package/src/components/DownloadList/DownloadList.tsx +4 -0
- package/src/components/FAQs/FAQs.tsx +20 -9
- package/src/components/FeaturePost/FeaturePost.tsx +27 -6
- package/src/components/FeaturePost/components/Image/Image.tsx +31 -7
- package/src/components/FeaturePost/types/feature-post-app-button-footer.ts +1 -1
- package/src/components/FeaturePost/types/feature-post-cta-footer.ts +2 -1
- package/src/components/FeaturePost/types/feature-post-image.ts +3 -1
- package/src/components/HeroLink/HeroLink.module.css +44 -0
- package/src/components/HeroLink/HeroLink.tsx +136 -0
- package/src/components/HeroLink/index.ts +2 -0
- package/src/components/Highlights/Highlights.tsx +6 -1
- package/src/components/Highlights/components/HighlightItem/HighlightItem.tsx +1 -0
- package/src/components/Highlights/types/highlight-link.ts +1 -0
- package/src/components/LinkTile/LinkTile.module.css +57 -0
- package/src/components/LinkTile/LinkTile.tsx +38 -0
- package/src/components/LinkTile/index.ts +1 -0
- package/src/components/ProductNavigation/ProductNavigation.tsx +10 -11
- package/src/components/ProductNavigation/types/product-list.ts +1 -8
- package/src/components/PromoListing/PromoListing.tsx +67 -3
- package/src/components/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.module.css +54 -0
- package/src/components/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.tsx +53 -0
- package/src/components/PromoListingThumbnailSignpost/index.ts +4 -0
- package/src/components/Quote/Quote.tsx +2 -2
- package/src/components/SectionHeading/SectionHeading.tsx +17 -7
- package/src/components/Statistics/Statistics.tsx +6 -2
- package/src/components/ThumbnailSignpost/ThumbnailSignpost.module.css +112 -0
- package/src/components/ThumbnailSignpost/ThumbnailSignpost.tsx +100 -0
- package/src/components/ThumbnailSignpost/index.ts +4 -0
- package/src/components/index.ts +5 -0
- package/versions.json +1 -1
- package/lib/_shared/cjs/filter-data-attrs-ajtUvDAC.cjs +0 -15
- package/lib/_shared/esm/filter-data-attrs-V7cbJuwS.mjs +0 -13
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HeadingLevel } from "@arc-ui/components/
|
|
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 {
|
|
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/
|
|
2
|
-
import { type TagProps } from "@arc-ui/components/
|
|
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 {
|
|
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 {...
|
|
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/
|
|
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 {
|
|
2
|
+
import { filterAttrs } from "@arc-ui/community-utils/filter-attrs";
|
|
3
3
|
|
|
4
|
-
import { type HeadingLevel } from "@arc-ui/components/
|
|
5
|
-
import { type VideoPlayerProps } from "@arc-ui/components/
|
|
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
|
-
{...
|
|
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
|
-
{...
|
|
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
|
|
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
|
|
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;
|
|
@@ -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 {
|
|
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
|
|
35
|
+
type,
|
|
22
36
|
linkListHeading = "Skip to section",
|
|
23
37
|
accordionData,
|
|
24
38
|
...props
|
|
25
39
|
}) => (
|
|
26
|
-
<div className={styles.FAQs} {...
|
|
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
|
-
|
|
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 {
|
|
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
|
-
{...
|
|
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
|
|
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
|
-
|
|
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:
|
|
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> = ({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
type ImageSourceProps,
|
|
3
3
|
type ImageProps as ArcImageProps,
|
|
4
|
-
} from "@arc-ui/components/
|
|
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
|
+
}
|