@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
@@ -15,18 +15,22 @@ import { getLinkProps } from "./helpers/get-link-props";
15
15
  import { type Statistic } from "./types/statistic";
16
16
 
17
17
  export const Statistics: React.FC<StatisticsProps> = ({
18
+ id,
19
+ isHeadingWordWrap,
18
20
  headingLevel,
19
21
  heading,
20
22
  content,
21
23
  statistics,
22
24
  }) => {
23
- const id = useId();
25
+ const componentId = useId();
24
26
 
25
27
  return (
26
28
  <Columns>
27
29
  <ColumnsCol spanM={9}>
28
30
  <SectionHeading
31
+ id={id}
29
32
  heading={heading}
33
+ isHeadingWordWrap={isHeadingWordWrap}
30
34
  headingLevel={headingLevel}
31
35
  content={content}
32
36
  />
@@ -35,7 +39,7 @@ export const Statistics: React.FC<StatisticsProps> = ({
35
39
  <ColumnsCol spanL={9}>
36
40
  <ul className={styles.list}>
37
41
  {statistics.map(({ stat, copy, link, source, sourceUrl }, i) => (
38
- <li key={`statistic-${id}-${i}`}>
42
+ <li key={`statistic-${componentId}-${i}`}>
39
43
  {i !== 0 && (
40
44
  <>
41
45
  <VerticalSpace size="24" sizeS="32" sizeXL="40" />
@@ -0,0 +1,112 @@
1
+ @import url("@arc-ui/tokens-arc/dist/custom-media.css");
2
+
3
+ .thumbnailSignpost button {
4
+ all: unset;
5
+ cursor: pointer;
6
+ }
7
+
8
+ .thumbnailSignpost {
9
+ display: inline-flex;
10
+ flex-direction: row;
11
+ gap: var(--arc-size-grid-gutter-s);
12
+ max-width: 720px;
13
+ }
14
+
15
+ .isLink:focus {
16
+ cursor: pointer;
17
+ outline: var(--focus-border-weight-s) solid
18
+ var(--focus-colors-light-border-subtle);
19
+ outline-offset: 2px;
20
+ border-radius: calc(var(--thumbnail-signpost-border-radius-s) + 2px);
21
+ }
22
+
23
+ .isLink:hover {
24
+ cursor: pointer;
25
+ }
26
+
27
+ .content {
28
+ width: 100%;
29
+ font: var(--sem-type-body-reg-s);
30
+ }
31
+
32
+ .heading {
33
+ display: block;
34
+ font: var(--sem-type-mobile-semi-xxs);
35
+ font-family: var(--sem-font-family-heading);
36
+ font-size: 1em;
37
+ font-weight: var(--sem-font-weight-semi-bold);
38
+ margin: 0;
39
+ }
40
+
41
+ .isLink:hover .heading,
42
+ .isLink:focus .heading {
43
+ color: var(--button-v2-colors-light-text-hover);
44
+ text-decoration: underline;
45
+ }
46
+
47
+ .image {
48
+ width: calc(
49
+ (((100% + var(--arc-size-grid-gutter-s)) / 12) * 6) -
50
+ var(--arc-size-grid-gutter-s)
51
+ );
52
+ }
53
+
54
+ /* stylelint-disable-next-line plugin/selector-bem-pattern */
55
+ .image img {
56
+ border-radius: var(--thumbnail-signpost-border-radius-s);
57
+ width: 100%;
58
+ }
59
+
60
+ @media (--arc-custom-media-min-width-s-px) {
61
+ .image {
62
+ width: calc(
63
+ (((100% + var(--arc-size-grid-gutter-s)) / 12) * 6) -
64
+ var(--arc-size-grid-gutter-m)
65
+ );
66
+ }
67
+
68
+ .thumbnailSignpost {
69
+ gap: var(--arc-size-grid-gutter-m);
70
+ }
71
+
72
+ .heading {
73
+ font: var(--sem-type-mobile-semi-xs);
74
+ }
75
+ }
76
+
77
+ @media (--arc-custom-media-min-width-xl-px) {
78
+ .thumbnailSignpost {
79
+ gap: var(--arc-size-grid-gutter-l);
80
+ }
81
+ }
82
+
83
+ .thumbnailButton {
84
+ display: flex;
85
+ align-items: center;
86
+ gap: var(--button-v2-gap-xs);
87
+ color: var(--button-v2-colors-light-text-default);
88
+ font: var(--sem-type-interface-button-s);
89
+ height: var(--button-v2-size-s);
90
+ }
91
+
92
+ .buttonIcon {
93
+ background: var(--icon-color-brand-alt-light);
94
+ display: block;
95
+ height: 100%;
96
+ line-height: 0;
97
+ mask-position: center;
98
+ mask-size: contain;
99
+ width: 100%;
100
+ }
101
+
102
+ .isLink:focus .buttonIcon,
103
+ .isLink:hover .buttonIcon {
104
+ background: var(--button-v2-colors-light-text-hover);
105
+ }
106
+
107
+ .isLink:hover .thumbnailButton,
108
+ .isLink:focus .thumbnailButton {
109
+ background: none;
110
+ color: var(--button-v2-colors-light-text-hover);
111
+ text-decoration: var(--sem-underline);
112
+ }
@@ -0,0 +1,100 @@
1
+ import React from "react";
2
+
3
+ import classNames from "classnames";
4
+ import styles from "./ThumbnailSignpost.module.css";
5
+
6
+ import { filterAttrs } from "@arc-ui/community-utils/filter-attrs";
7
+
8
+ import { BtIconArrowRightFill } from "@arc-ui/icons/BtIconArrowRightFill";
9
+
10
+ import { Image, type ImageProps } from "@arc-ui/components/Image";
11
+ import { VerticalSpace } from "@arc-ui/components/VerticalSpace";
12
+ import { Heading } from "@arc-ui/components/Heading";
13
+
14
+ /** Use `ThumbnailSignpost` to highlight key information or navigation points with an accompanying thumbnail image or icon. */
15
+ export const ThumbnailSignpost = ({
16
+ text,
17
+ title,
18
+ img,
19
+ onClick,
20
+ buttonLabel,
21
+ ...props
22
+ }: ThumbnailSignpostProps) => {
23
+ return (
24
+ <div
25
+ className={classNames(styles.thumbnailSignpost, {
26
+ [styles.isLink]: onClick,
27
+ })}
28
+ onClick={onClick}
29
+ aria-label={title}
30
+ tabIndex={onClick ? 0 : -1}
31
+ {...(onClick && { role: "button" })}
32
+ {...filterAttrs(props)}
33
+ >
34
+ {img && (
35
+ <div className={styles.image}>
36
+ <Image {...img} />
37
+ </div>
38
+ )}
39
+ <div className={styles.content}>
40
+ <span className={styles.heading}>{title}</span>
41
+ <VerticalSpace size="8" />
42
+ {text}
43
+ {buttonLabel && onClick && (
44
+ <>
45
+ <VerticalSpace size="8" />
46
+ <div className={styles.thumbnailButton}>
47
+ <span
48
+ className={styles.buttonIcon}
49
+ role="img"
50
+ style={{
51
+ height: 24,
52
+ width: 24,
53
+ maskImage: `url("${BtIconArrowRightFill}")`,
54
+ WebkitMaskImage: `url("${BtIconArrowRightFill}")`,
55
+ }}
56
+ />
57
+ <Heading size="xxs">{buttonLabel}</Heading>
58
+ </div>
59
+ </>
60
+ )}
61
+ </div>
62
+ </div>
63
+ );
64
+ };
65
+
66
+ export interface ThumbnailSignpostProps {
67
+ /**
68
+ * Title for the ThumbnailSignpost.
69
+ */
70
+ title: string;
71
+
72
+ /**
73
+ * Text content for the ThumbnailSignpost.
74
+ */
75
+ text: string;
76
+
77
+ /**
78
+ * Label for the button in the ThumbnailSignpost.
79
+ */
80
+ buttonLabel?: string;
81
+
82
+ /**
83
+ * Image properties for the ThumbnailSignpost.
84
+ */
85
+ img?: Pick<
86
+ ImageProps,
87
+ | "src"
88
+ | "alt"
89
+ | "loading"
90
+ | "sizes"
91
+ | "srcSet"
92
+ | "anchor"
93
+ | "fadeOnLoad"
94
+ | "fetchPriority"
95
+ >;
96
+ /**
97
+ * Optional click handler for the ThumbnailSignpost.
98
+ */
99
+ onClick?: () => void;
100
+ }
@@ -0,0 +1,4 @@
1
+ export {
2
+ ThumbnailSignpost,
3
+ type ThumbnailSignpostProps,
4
+ } from "./ThumbnailSignpost";
@@ -14,3 +14,8 @@ export * from "./ArticleSidebar";
14
14
  export * from "./ProductNavigation";
15
15
  export * from "./SectionHeading";
16
16
  export * from "./ContentInfoWidget";
17
+ export * from "./HeroLink";
18
+ export * from "./ActionTile";
19
+ export * from "./LinkTile";
20
+ export * from "./ThumbnailSignpost";
21
+ export * from "./PromoListingThumbnailSignpost";
package/versions.json CHANGED
@@ -1 +1 @@
1
- ["v3.0.1","v3.0.0","v2.0.0","v1.1.0","v1.0.2","v1.0.1","v1.0.0","v0.1.0"]
1
+ ["v3.2.0","v3.1.0","v3.0.1","v3.0.0","v2.0.0","v1.1.0","v1.0.2","v1.0.1","v1.0.0","v0.1.0"]
@@ -1,15 +0,0 @@
1
- 'use strict';
2
-
3
- var dataAttrRe = /^(data-.*)$/;
4
- var filterDataAttrs = function (props) {
5
- var filteredProps = {};
6
- for (var prop in props) {
7
- if (Object.prototype.hasOwnProperty.call(props, prop) &&
8
- dataAttrRe.test(prop)) {
9
- filteredProps[prop] = props[prop];
10
- }
11
- }
12
- return filteredProps;
13
- };
14
-
15
- exports.filterDataAttrs = filterDataAttrs;
@@ -1,13 +0,0 @@
1
- var dataAttrRe = /^(data-.*)$/;
2
- var filterDataAttrs = function (props) {
3
- var filteredProps = {};
4
- for (var prop in props) {
5
- if (Object.prototype.hasOwnProperty.call(props, prop) &&
6
- dataAttrRe.test(prop)) {
7
- filteredProps[prop] = props[prop];
8
- }
9
- }
10
- return filteredProps;
11
- };
12
-
13
- export { filterDataAttrs as f };