@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,153 @@
1
+ import React, { useId } from "react";
2
+ import classNames from "classnames";
3
+
4
+ import { ArcSizeBreakpointsL } from "@arc-ui/tokens-arc";
5
+
6
+ import { Carousel } from "@arc-ui/components/dist/Carousel";
7
+ import { useMediaQuery } from "@arc-ui/components/dist/use-media-query";
8
+
9
+ import { SectionHeading, type SectionHeadingProps } from "../SectionHeading";
10
+
11
+ import {
12
+ MediaCard,
13
+ type MediaCardProps,
14
+ } from "@arc-ui/components/dist/MediaCard";
15
+
16
+ import {
17
+ ImpactCard,
18
+ type ImpactCardProps,
19
+ } from "@arc-ui/components/dist/ImpactCard";
20
+
21
+ import {
22
+ InformationCard,
23
+ type InformationCardProps,
24
+ } from "@arc-ui/components/dist/InformationCard";
25
+
26
+ import {
27
+ TypographyCard,
28
+ type TypographyCardProps,
29
+ } from "@arc-ui/components/dist/TypographyCard";
30
+
31
+ import styles from "./PromoListing.module.css";
32
+
33
+ /**
34
+ * Use `PromoListing` to give supporting information about a page or proposition in the form of the card components (`ImpactCard`, `InformationCard`, `MediaCard` and `TypographyCard`).
35
+ */
36
+ export const PromoListing: React.FC<PromoListingProps> = ({
37
+ heading,
38
+ content,
39
+ isCarousel,
40
+ cards,
41
+ headingLevel,
42
+ columns = "2",
43
+ }) => {
44
+ const id = useId();
45
+
46
+ const isMinWidthArcBreakpointL = useMediaQuery(
47
+ `(min-width: ${ArcSizeBreakpointsL})`,
48
+ );
49
+
50
+ const columnCount = isMinWidthArcBreakpointL ? columns : 2;
51
+
52
+ const getCard = (card: PromoListCard) => (
53
+ <>
54
+ {card.type === "media-card" && <MediaCard {...card} />}
55
+ {card.type === "impact-card" && <ImpactCard {...card} />}
56
+ {card.type === "information-card" && <InformationCard {...card} />}
57
+ {card.type === "typography-card" && <TypographyCard {...card} />}
58
+ </>
59
+ );
60
+
61
+ return (
62
+ <div className={styles.PromoListing}>
63
+ <SectionHeading
64
+ isPadded
65
+ data-testid="PromoListing-header"
66
+ heading={heading}
67
+ headingLevel={headingLevel}
68
+ content={content}
69
+ />
70
+
71
+ {isCarousel && !isMinWidthArcBreakpointL ? (
72
+ <Carousel
73
+ itemsPerSlide={1}
74
+ responsive={{
75
+ s: {
76
+ itemsToScroll: 1,
77
+ isPartialVisible: false,
78
+ itemsPerSlide: 2,
79
+ },
80
+ m: {
81
+ itemsToScroll: 1,
82
+ isPartialVisible: true,
83
+ itemsPerSlide: 2,
84
+ },
85
+ }}
86
+ >
87
+ {cards?.map((card: PromoListCard, i) => (
88
+ <div key={`card-${id}-${i}`} className={styles.carouselSlide}>
89
+ {getCard(card)}
90
+ </div>
91
+ ))}
92
+ </Carousel>
93
+ ) : (
94
+ <div
95
+ className={classNames(
96
+ styles.cardGrid,
97
+ styles[`cardGrid${columnCount}Columns`],
98
+ styles[`cardGrid${cards.length}Cards`],
99
+ )}
100
+ >
101
+ {cards?.map((card: PromoListCard, index) => (
102
+ <div
103
+ data-testid={`promoList-card${index}`}
104
+ className={classNames(styles.promoListingContainer)}
105
+ key={index}
106
+ >
107
+ {getCard(card)}
108
+ </div>
109
+ ))}
110
+ </div>
111
+ )}
112
+ </div>
113
+ );
114
+ };
115
+
116
+ interface PromoListMediaCard extends MediaCardProps {
117
+ type: "media-card";
118
+ }
119
+
120
+ interface PromoListImpactCard extends ImpactCardProps {
121
+ type: "impact-card";
122
+ }
123
+
124
+ interface PromoListInformationCard extends InformationCardProps {
125
+ type: "information-card";
126
+ }
127
+
128
+ interface PromoListTypographyCard extends TypographyCardProps {
129
+ type: "typography-card";
130
+ }
131
+
132
+ type PromoListCard =
133
+ | PromoListMediaCard
134
+ | PromoListInformationCard
135
+ | PromoListTypographyCard
136
+ | PromoListImpactCard;
137
+
138
+ export interface PromoListingProps extends SectionHeadingProps {
139
+ /**
140
+ * Cards for the PromoListing.
141
+ */
142
+ cards: PromoListCard[];
143
+
144
+ /**
145
+ * Shows cards in a carousel on devices below 1024px if true.
146
+ */
147
+ isCarousel?: true;
148
+
149
+ /**
150
+ * Number of columns for desktop breakpoints. "2" and "3" column options available.
151
+ */
152
+ columns?: "2" | "3";
153
+ }
@@ -0,0 +1 @@
1
+ export { PromoListing, type PromoListingProps } from "./PromoListing";
@@ -0,0 +1,60 @@
1
+ @import url("@arc-ui/tokens-arc/dist/custom-media.css");
2
+
3
+ .blockQuote {
4
+ font-size: 36px;
5
+ font-style: normal;
6
+ font-weight: 500;
7
+ margin: 0;
8
+ }
9
+
10
+ .quoteContent {
11
+ line-height: 44px; /* 114.286% */
12
+ margin: 0;
13
+ padding-block: 32px;
14
+ }
15
+
16
+ .quoteDefault {
17
+ color: #5514b4; /* TODO: This needs to be tokenized */
18
+ fill: #5514b4; /* TODO: This needs to be tokenized */
19
+ }
20
+
21
+ .quoteSecondary {
22
+ color: #434343; /* TODO: This needs to be tokenized */
23
+ fill: #434343; /* TODO: This needs to be tokenized */
24
+ }
25
+
26
+ .quoteIcon {
27
+ height: 76.471px;
28
+ width: 100px;
29
+ }
30
+
31
+ svg {
32
+ padding: 0;
33
+ }
34
+
35
+ @media (--arc-custom-media-min-width-m-px) {
36
+ .blockQuote {
37
+ font-size: 40px;
38
+ }
39
+
40
+ .quoteContent {
41
+ line-height: 48px; /* 114.286% */
42
+ }
43
+ }
44
+
45
+ @media (--arc-custom-media-min-width-l-px) {
46
+ .quoteIcon {
47
+ height: 95.588px;
48
+ width: 125px;
49
+ }
50
+ }
51
+
52
+ @media (--arc-custom-media-min-width-xl-px) {
53
+ .blockQuote {
54
+ font-size: 56px;
55
+ }
56
+
57
+ .quoteContent {
58
+ line-height: 64px; /* 114.286% */
59
+ }
60
+ }
@@ -0,0 +1,57 @@
1
+ import React from "react";
2
+ import classNames from "classnames";
3
+
4
+ import { filterDataAttrs } from "@arc-ui/community-utils/filter-data-attrs";
5
+
6
+ import { Author } from "../Author";
7
+ import { AuthorProps } from "../Author/Author";
8
+
9
+ import styles from "./Quote.module.css";
10
+
11
+ /**
12
+ * Use `Quote` where a quote or testimonial from an existing customer or stakeholder would help build trust and credibility with potential new customers. It's commonly used on product pages where customers would learn about a product or service that we offer.*/
13
+ export const Quote: React.FC<QuoteProps> = ({
14
+ author,
15
+ styling = "Default",
16
+ content,
17
+ citeUrl,
18
+ ...props
19
+ }) => {
20
+ return (
21
+ <div
22
+ className="community-component--quote"
23
+ data-testid="quote-test"
24
+ {...filterDataAttrs(props)}
25
+ >
26
+ <blockquote
27
+ data-testid="style-test"
28
+ className={classNames(styles.blockQuote, styles[`quote${styling}`])}
29
+ cite={citeUrl}
30
+ >
31
+ <svg
32
+ xmlns="http://www.w3.org/2000/svg"
33
+ viewBox="0 0 100 77"
34
+ className={styles.quoteIcon}
35
+ aria-hidden="true"
36
+ >
37
+ <path d="M21.8085 76.4706C15.9574 76.4706 10.8156 74.2732 6.38298 69.8783C2.12766 65.4834 0 58.979 0 50.3651C0 40.5206 3.10284 31.1156 9.30851 22.1501C15.6915 13.1846 25.3546 5.80122 38.2979 0L44.1489 11.3387C37.4113 14.3272 31.7376 18.0189 27.1277 22.4138C22.5177 26.6329 19.6809 31.4672 18.617 36.9168C19.8582 36.741 21.0106 36.6531 22.0745 36.6531C27.7482 36.6531 32.4468 38.499 36.1702 42.1907C40.0709 45.8824 42.0213 50.7167 42.0213 56.6937C42.0213 62.4949 39.9823 67.2414 35.9043 70.9331C32.0035 74.6247 27.305 76.4706 21.8085 76.4706ZM77.6596 76.4706C71.8085 76.4706 66.6667 74.2732 62.234 69.8783C57.9787 65.4834 55.8511 58.979 55.8511 50.3651C55.8511 40.5206 58.9539 31.1156 65.1596 22.1501C71.5425 13.1846 81.2057 5.80122 94.1489 0L100 11.3387C93.2624 14.3272 87.5886 18.0189 82.9787 22.4138C78.3688 26.6329 75.5319 31.4672 74.4681 36.9168C75.7092 36.741 76.8617 36.6531 77.9255 36.6531C83.5993 36.6531 88.2979 38.499 92.0213 42.1907C95.922 45.8824 97.8723 50.7167 97.8723 56.6937C97.8723 62.4949 95.8333 67.2414 91.7553 70.9331C87.8546 74.6247 83.156 76.4706 77.6596 76.4706Z" />
38
+ </svg>
39
+ <p className={styles.quoteContent}>{content}</p>
40
+ </blockquote>
41
+ {author && (
42
+ <Author
43
+ name={author.name}
44
+ title={author.title}
45
+ avatar={author.avatar}
46
+ />
47
+ )}
48
+ </div>
49
+ );
50
+ };
51
+
52
+ export interface QuoteProps {
53
+ styling?: "Default" | "Secondary";
54
+ content: string;
55
+ author?: AuthorProps;
56
+ citeUrl?: string;
57
+ }
@@ -0,0 +1 @@
1
+ export { Quote, type QuoteProps } from "./Quote";
@@ -0,0 +1,34 @@
1
+ @import url("@arc-ui/tokens-arc/dist/custom-media.css");
2
+
3
+ .section-header--padded {
4
+ padding-bottom: 40px;
5
+ width: auto;
6
+ }
7
+
8
+ @media (--arc-custom-media-min-width-s-px) {
9
+ .section-header--padded {
10
+ min-width: 588px;
11
+ width: auto;
12
+ }
13
+ }
14
+
15
+ @media (--arc-custom-media-min-width-m-px) {
16
+ .section-header--padded {
17
+ min-width: 720px;
18
+ padding: 0 186px 40px 0;
19
+ }
20
+ }
21
+
22
+ @media (--arc-custom-media-min-width-l-px) {
23
+ .section-header--padded {
24
+ min-width: 960px;
25
+ padding: 0 246px 40px 0;
26
+ }
27
+ }
28
+
29
+ @media (--arc-custom-media-min-width-xl-px) {
30
+ .section-header--padded {
31
+ min-width: 1216px;
32
+ padding: 0 312px 40px 0;
33
+ }
34
+ }
@@ -0,0 +1,65 @@
1
+ import React from "react";
2
+ import classNames from "classnames";
3
+
4
+ import { filterDataAttrs } from "@arc-ui/community-utils/filter-data-attrs";
5
+
6
+ import { Heading, type HeadingLevel } from "@arc-ui/components/dist/Heading";
7
+ import { Text } from "@arc-ui/components/dist/Text";
8
+ import { VerticalSpace } from "@arc-ui/components/dist/VerticalSpace";
9
+
10
+ import styles from "./SectionHeading.module.css";
11
+
12
+ export const SectionHeading: React.FC<SectionHeadingProps> = ({
13
+ heading,
14
+ content,
15
+ id,
16
+ isPadded = false,
17
+ headingLevel = "2",
18
+ ...props
19
+ }) => (
20
+ <div
21
+ className={classNames({
22
+ [styles["section-header--padded"]]: isPadded,
23
+ })}
24
+ {...filterDataAttrs(props)}
25
+ >
26
+ <Heading level={headingLevel} id={id} size="xl">
27
+ {heading}
28
+ </Heading>
29
+ {content && (
30
+ <>
31
+ <VerticalSpace size="24" />
32
+ <Text size="l" elementType="p">
33
+ {content}
34
+ </Text>
35
+ </>
36
+ )}
37
+ </div>
38
+ );
39
+
40
+ export interface SectionHeadingProps {
41
+ /**
42
+ * heading for `SectionHeading`.
43
+ */
44
+ heading: string;
45
+
46
+ /**
47
+ * Adds padding to `SectionHeading`.
48
+ */
49
+ isPadded?: boolean;
50
+
51
+ /**
52
+ * Determine a heading level for `SectionHeading`.
53
+ */
54
+ headingLevel?: HeadingLevel;
55
+
56
+ /**
57
+ * Text content for `SectionHeading`.
58
+ */
59
+ content?: string;
60
+
61
+ /**
62
+ * Id content for `SectionHeading`.
63
+ */
64
+ id?: string;
65
+ }
@@ -0,0 +1 @@
1
+ export { SectionHeading, type SectionHeadingProps } from "./SectionHeading";
@@ -0,0 +1,25 @@
1
+ /* stylelint-disable selector-pseudo-class-no-unknown */
2
+ /* stylelint-disable no-descending-specificity */
3
+
4
+ @import url("@arc-ui/tokens-arc/dist/custom-media.css");
5
+
6
+ .list {
7
+ list-style: none;
8
+ margin: 0;
9
+ padding: 0;
10
+ }
11
+
12
+ :global(.arc a).mutedText,
13
+ .mutedText {
14
+ color: var(--sem-color-text-primary-light-subtle);
15
+ }
16
+
17
+ .statWrapper {
18
+ margin-bottom: -12px;
19
+ }
20
+
21
+ @media (--arc-custom-media-min-width-s-px) {
22
+ .statWrapper {
23
+ margin-bottom: 0;
24
+ }
25
+ }
@@ -0,0 +1,97 @@
1
+ import React, { useId } from "react";
2
+
3
+ import { Columns } from "@arc-ui/components/dist/Columns";
4
+ import { Rule } from "@arc-ui/components/dist/Rule";
5
+ import { Text } from "@arc-ui/components/dist/Text";
6
+ import { Align } from "@arc-ui/components/dist/Align";
7
+ import { Heading } from "@arc-ui/components/dist/Heading";
8
+ import { VerticalSpace } from "@arc-ui/components/dist/VerticalSpace";
9
+
10
+ import { SectionHeading, type SectionHeadingProps } from "../SectionHeading";
11
+
12
+ import styles from "./Statistics.module.css";
13
+
14
+ import { getLinkProps } from "./helpers/get-link-props";
15
+ import { type Statistic } from "./types/statistic";
16
+
17
+ export const Statistics: React.FC<StatisticsProps> = ({
18
+ headingLevel,
19
+ heading,
20
+ content,
21
+ statistics,
22
+ }) => {
23
+ const id = useId();
24
+
25
+ return (
26
+ <Columns>
27
+ <Columns.Col spanM={9}>
28
+ <SectionHeading
29
+ heading={heading}
30
+ headingLevel={headingLevel}
31
+ content={content}
32
+ />
33
+ <VerticalSpace size="16" />
34
+ </Columns.Col>
35
+ <Columns.Col spanL={9}>
36
+ <ul className={styles.list}>
37
+ {statistics.map(({ stat, copy, link, source, sourceUrl }, i) => (
38
+ <li key={`statistic-${id}-${i}`}>
39
+ {i !== 0 && (
40
+ <>
41
+ <VerticalSpace size="24" sizeS="32" sizeXL="40" />
42
+ <Rule />
43
+ <VerticalSpace size="24" sizeS="32" sizeXL="40" />
44
+ </>
45
+ )}
46
+ <Columns>
47
+ <Columns.Col spanS={6} spanM={8}>
48
+ <Align vertical="center">
49
+ <div className={styles.statWrapper}>
50
+ <Heading color="brand" size="xxl">
51
+ {stat}
52
+ </Heading>
53
+ </div>
54
+ </Align>
55
+ </Columns.Col>
56
+ <Columns.Col spanS={6} spanM={4}>
57
+ <Text>{copy}</Text>
58
+ {link && (
59
+ <>
60
+ <VerticalSpace size="12" />
61
+ <a
62
+ href={link.href}
63
+ aria-label={link.ariaLabel}
64
+ {...getLinkProps(link)}
65
+ >
66
+ {link.text}
67
+ </a>
68
+ </>
69
+ )}
70
+ {source && (
71
+ <>
72
+ <VerticalSpace size="12" />
73
+ <Text size="xs">
74
+ <span className={styles.mutedText}>{source}</span>
75
+ </Text>
76
+ </>
77
+ )}
78
+ {sourceUrl && (
79
+ <Text size="xs">
80
+ <a className={styles.mutedText} href={sourceUrl}>
81
+ {sourceUrl}
82
+ </a>
83
+ </Text>
84
+ )}
85
+ </Columns.Col>
86
+ </Columns>
87
+ </li>
88
+ ))}
89
+ </ul>
90
+ </Columns.Col>
91
+ </Columns>
92
+ );
93
+ };
94
+
95
+ export interface StatisticsProps extends Omit<SectionHeadingProps, "isPadded"> {
96
+ statistics: Statistic[];
97
+ }
@@ -0,0 +1,11 @@
1
+ import { type StatisticlLink } from "../types/statistic-link";
2
+
3
+ export const getLinkProps: (
4
+ link: StatisticlLink,
5
+ ) => React.AnchorHTMLAttributes<HTMLAnchorElement> = (link) =>
6
+ link.openInNewTab
7
+ ? {
8
+ rel: "noreferrer",
9
+ target: "_blank",
10
+ }
11
+ : {};
@@ -0,0 +1 @@
1
+ export { Statistics, type StatisticsProps } from "./Statistics";
@@ -0,0 +1,6 @@
1
+ export interface StatisticlLink {
2
+ text: string;
3
+ href: string;
4
+ openInNewTab?: boolean;
5
+ ariaLabel?: string;
6
+ }
@@ -0,0 +1,9 @@
1
+ import { type StatisticlLink } from "./statistic-link";
2
+
3
+ export interface Statistic {
4
+ stat: string;
5
+ copy: string;
6
+ link?: StatisticlLink;
7
+ source?: string;
8
+ sourceUrl?: string;
9
+ }
@@ -0,0 +1,31 @@
1
+ @import url("@arc-ui/tokens-arc/dist/custom-media.css");
2
+
3
+ .ruleContainer {
4
+ flex: 0 1 auto;
5
+ padding: 24px;
6
+ }
7
+
8
+ /* stylelint-disable-next-line selector-pseudo-class-no-unknown */
9
+ .ruleContainer :global(.arc-Rule) {
10
+ margin: 0;
11
+ }
12
+
13
+ @media (--arc-custom-media-min-width-s-px) {
14
+ .row {
15
+ display: grid;
16
+ grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(
17
+ 0,
18
+ 1fr
19
+ );
20
+ }
21
+ }
22
+
23
+ @media (--arc-custom-media-min-width-l-px) {
24
+ .ruleContainer {
25
+ padding: 12px 48px;
26
+ }
27
+
28
+ .row {
29
+ padding: 0 24px;
30
+ }
31
+ }
@@ -0,0 +1,65 @@
1
+ import React from "react";
2
+
3
+ import { ArcSizeBreakpointsS } from "@arc-ui/tokens-arc";
4
+
5
+ import { Heading, type HeadingLevel } from "@arc-ui/components/dist/Heading";
6
+ import { Text } from "@arc-ui/components/dist/Text";
7
+ import { Box } from "@arc-ui/components/dist/Box";
8
+ import { Rule } from "@arc-ui/components/dist/Rule";
9
+ import { VerticalSpace } from "@arc-ui/components/dist/VerticalSpace";
10
+ import { useMediaQuery } from "@arc-ui/components/dist/use-media-query";
11
+
12
+ import styles from "./Summary.module.css";
13
+
14
+ export const Summary: React.FC<SummaryProps> = ({
15
+ content,
16
+ headingLevel = "3",
17
+ }) => {
18
+ const isMinWidthArcBreakpointS = useMediaQuery(
19
+ `(min-width: ${ArcSizeBreakpointsS})`,
20
+ );
21
+
22
+ return (
23
+ <Box isBorderRadius borderWidth="thin" padding="24">
24
+ <div className={styles.row}>
25
+ {content.map(({ heading, text }, i) => (
26
+ <>
27
+ <div className={styles.col}>
28
+ <Heading size="s" level={headingLevel}>
29
+ {heading}
30
+ </Heading>
31
+ <VerticalSpace size="8" />
32
+ <Text size="s">{text}</Text>
33
+ </div>
34
+ {i !== content.length - 1 && (
35
+ <div className={styles.ruleContainer}>
36
+ <Rule
37
+ orientation={
38
+ isMinWidthArcBreakpointS ? "vertical" : "horizontal"
39
+ }
40
+ />
41
+ </div>
42
+ )}
43
+ </>
44
+ ))}
45
+ </div>
46
+ </Box>
47
+ );
48
+ };
49
+
50
+ interface SummaryContent {
51
+ heading: string;
52
+ text: string;
53
+ }
54
+
55
+ export interface SummaryProps {
56
+ /**
57
+ * Content for <Summary />
58
+ */
59
+ content: [SummaryContent, SummaryContent, SummaryContent];
60
+
61
+ /**
62
+ * Determine a heading level for each column.
63
+ */
64
+ headingLevel?: HeadingLevel;
65
+ }
@@ -0,0 +1 @@
1
+ export { Summary, type SummaryProps } from "./Summary";
@@ -0,0 +1,11 @@
1
+ export { Accordion } from "./Accordion";
2
+ export { Author } from "./Author";
3
+ export { CopyLead } from "./CopyLead";
4
+ export { DownloadList } from "./DownloadList";
5
+ export { FeaturePost } from "./FeaturePost";
6
+ export { Highlights } from "./Highlights";
7
+ export { PromoListing } from "./PromoListing";
8
+ export { Quote } from "./Quote";
9
+ export { Summary } from "./Summary";
10
+ export { Statistics } from "./Statistics";
11
+ export { BannerWithTabs } from "./BannerWithTabs";
package/src/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ export * from "./components";
2
+
3
+ // TODO
4
+ // replace build utils
5
+ // replace arc ui helpers
@@ -0,0 +1,9 @@
1
+ declare module "*.jpg";
2
+ declare module "*.png";
3
+ declare module "*.mp4";
4
+ declare module "*.svg";
5
+
6
+ declare module "*.css" {
7
+ const classes: { [key: string]: string };
8
+ export default classes;
9
+ }
@@ -0,0 +1,4 @@
1
+ /** @type {import('stylelint').Config} */
2
+ export default {
3
+ extends: ["@arc-ui/community-css-config/stylelint"],
4
+ };
package/tsconfig.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "@arc-ui/community-typescript-config/base.json",
3
+ "include": ["src"],
4
+ "compilerOptions": {
5
+ "rootDir": "src",
6
+ "baseUrl": "./",
7
+ "lib": ["dom", "esnext"],
8
+ "jsx": "react",
9
+ "declaration": false
10
+ }
11
+ }