@arc-ui/community-components 3.2.0 → 3.3.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 +10 -10
- package/CHANGELOG.md +19 -0
- package/lib/Accordion/Accordion.cjs +2 -3
- package/lib/Accordion/Accordion.mjs +2 -3
- package/lib/ActionTile/ActionTile.cjs +4 -5
- package/lib/ActionTile/ActionTile.mjs +2 -3
- package/lib/ActionTile/styles.css +1 -1
- package/lib/ArticleSidebar/ArticleSidebar.cjs +9 -10
- package/lib/ArticleSidebar/ArticleSidebar.mjs +4 -5
- package/lib/Author/Author.cjs +2 -3
- package/lib/Author/Author.mjs +2 -3
- package/lib/BannerWithTabs/BannerWithTabs.cjs +4 -5
- package/lib/BannerWithTabs/BannerWithTabs.mjs +4 -5
- package/lib/ContentInfoWidget/ContentInfoWidget.cjs +3 -2
- package/lib/ContentInfoWidget/ContentInfoWidget.mjs +3 -2
- package/lib/CopyLead/CopyLead.cjs +14 -15
- package/lib/CopyLead/CopyLead.mjs +2 -3
- package/lib/DownloadList/DownloadList.cjs +6 -8
- package/lib/DownloadList/DownloadList.mjs +6 -8
- package/lib/FAQs/FAQs.cjs +5 -6
- package/lib/FAQs/FAQs.mjs +3 -4
- package/lib/FeaturePost/FeaturePost.cjs +13 -14
- package/lib/FeaturePost/FeaturePost.mjs +5 -6
- package/lib/Highlights/Highlights.cjs +11 -12
- package/lib/Highlights/Highlights.mjs +11 -12
- package/lib/InlineLinkGroup/InlineLinkGroup.cjs +25 -0
- package/lib/InlineLinkGroup/InlineLinkGroup.mjs +23 -0
- package/lib/InlineLinkGroup/styles.css +1 -0
- package/lib/LinkTile/LinkTile.cjs +6 -6
- package/lib/LinkTile/LinkTile.mjs +4 -4
- package/lib/LinkTile/styles.css +1 -1
- package/lib/ProductNavigation/ProductNavigation.cjs +5 -6
- package/lib/ProductNavigation/ProductNavigation.mjs +2 -3
- package/lib/PromoListing/PromoListing.cjs +6 -7
- package/lib/PromoListing/PromoListing.mjs +4 -5
- package/lib/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.cjs +6 -7
- package/lib/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.mjs +3 -4
- package/lib/Quote/Quote.cjs +5 -6
- package/lib/Quote/Quote.mjs +3 -4
- package/lib/SectionHeading/SectionHeading.cjs +2 -3
- package/lib/SectionHeading/SectionHeading.mjs +2 -3
- package/lib/Statistics/Statistics.cjs +21 -19
- package/lib/Statistics/Statistics.mjs +21 -19
- package/lib/Statistics/styles.css +1 -1
- package/lib/Summary/Summary.cjs +3 -3
- package/lib/Summary/Summary.mjs +3 -3
- package/lib/ThumbnailSignpost/ThumbnailSignpost.cjs +2 -3
- package/lib/ThumbnailSignpost/ThumbnailSignpost.mjs +2 -3
- package/lib/_shared/cjs/{Accordion-DfNGOjTm.cjs → Accordion-QqDoB3pY.cjs} +8 -9
- package/lib/_shared/cjs/{Author-D4dKNQem.cjs → Author-aL8YXi7C.cjs} +4 -5
- package/lib/_shared/cjs/{SectionHeading-DeSFM0HV.cjs → SectionHeading-Dj-dJfv3.cjs} +4 -5
- package/lib/_shared/cjs/{ThumbnailSignpost-GkOiwt-Z.cjs → ThumbnailSignpost-SBnrGooA.cjs} +4 -5
- package/lib/_shared/cjs/{tslib.es6-BxB9I209.cjs → filter-attrs-C26zOt4_.cjs} +25 -0
- package/lib/_shared/esm/{Accordion-cd1oYvBv.mjs → Accordion-DrOTh90S.mjs} +1 -2
- package/lib/_shared/esm/{Author-HnYsFTPT.mjs → Author-BVCRPgkl.mjs} +1 -2
- package/lib/_shared/esm/{SectionHeading-CpDLCndw.mjs → SectionHeading-DZOg_gYi.mjs} +1 -2
- package/lib/_shared/esm/{ThumbnailSignpost-BeRiXbUp.mjs → ThumbnailSignpost-DaZByYIH.mjs} +1 -2
- package/lib/_shared/esm/{tslib.es6-D6Wu-xwB.mjs → filter-attrs-D-1kWaCP.mjs} +25 -1
- package/lib/index.cjs +75 -83
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +24 -63
- package/lib/index.d.mts +24 -63
- package/lib/index.mjs +75 -83
- package/lib/index.mjs.map +1 -1
- package/lib/styles.css +1 -1
- package/package.json +4 -4
- package/src/components/ActionTile/ActionTile.module.css +56 -37
- package/src/components/ActionTile/ActionTile.tsx +1 -1
- package/src/components/ArticleSidebar/ArticleSidebar.tsx +4 -6
- package/src/components/Author/Author.tsx +0 -3
- package/src/components/BannerWithTabs/BannerWithTabs.tsx +4 -6
- package/src/components/ContentInfoWidget/ContentInfoWidget.tsx +3 -4
- package/src/components/DownloadList/DownloadList.tsx +8 -8
- package/src/components/FeaturePost/FeaturePost.tsx +3 -7
- package/src/components/Highlights/Highlights.tsx +3 -2
- package/src/components/Highlights/components/HighlightItem/HighlightItem.tsx +3 -2
- package/src/components/Highlights/components/HighlightList/HighlightList.tsx +5 -2
- package/src/components/InlineLinkGroup/InlineLinkGroup.module.css +81 -0
- package/src/components/InlineLinkGroup/InlineLinkGroup.tsx +67 -0
- package/src/components/InlineLinkGroup/index.ts +5 -0
- package/src/components/LinkTile/LinkTile.module.css +62 -26
- package/src/components/LinkTile/LinkTile.tsx +8 -1
- package/src/components/PromoListing/PromoListing.tsx +3 -11
- package/src/components/Quote/Quote.tsx +1 -7
- package/src/components/Statistics/Statistics.module.css +0 -10
- package/src/components/Statistics/Statistics.tsx +35 -32
- package/src/components/Summary/Summary.tsx +3 -1
- package/src/components/index.ts +1 -1
- package/versions.json +1 -1
- package/lib/HeroLink/HeroLink.cjs +0 -35
- package/lib/HeroLink/HeroLink.mjs +0 -33
- package/lib/HeroLink/styles.css +0 -1
- package/lib/_shared/cjs/filter-attrs-BizjMsy0.cjs +0 -27
- package/lib/_shared/esm/filter-attrs-DZ7RCEZm.mjs +0 -25
- package/src/components/HeroLink/HeroLink.module.css +0 -44
- package/src/components/HeroLink/HeroLink.tsx +0 -136
- package/src/components/HeroLink/index.ts +0 -2
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import React, { type Ref } from "react";
|
|
2
|
-
import classNames from "classnames";
|
|
3
|
-
import { BtIconArrowAltRight } from "@arc-ui/icons/BtIconArrowAltRight";
|
|
4
|
-
import { Icon } from "@arc-ui/components/Icon";
|
|
5
|
-
import styles from "./HeroLink.module.css";
|
|
6
|
-
|
|
7
|
-
export type ElementUnion = HTMLButtonElement | HTMLAnchorElement;
|
|
8
|
-
export type ButtonRef = Ref<ElementUnion> | null;
|
|
9
|
-
type AnchorElProps = React.AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
10
|
-
type ButtonElProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
11
|
-
type CommonElProps = AnchorElProps & ButtonElProps & { ref?: ButtonRef | null };
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Pill-style HeroLink component with default and hover states
|
|
15
|
-
*/
|
|
16
|
-
export const HeroLink = ({
|
|
17
|
-
label,
|
|
18
|
-
onClick,
|
|
19
|
-
href,
|
|
20
|
-
id,
|
|
21
|
-
rel,
|
|
22
|
-
target,
|
|
23
|
-
ariaLabel,
|
|
24
|
-
ref,
|
|
25
|
-
...props
|
|
26
|
-
}: HeroLinkProps) => {
|
|
27
|
-
const HeroLinkClasses = classNames(styles.heroLink, {
|
|
28
|
-
[styles["heroLink--emptyLabel"]]: !label,
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
const commonProps: CommonElProps = {
|
|
32
|
-
id,
|
|
33
|
-
onClick,
|
|
34
|
-
ref,
|
|
35
|
-
...props,
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
if (href) {
|
|
39
|
-
return (
|
|
40
|
-
<a
|
|
41
|
-
{...(commonProps as AnchorElProps)}
|
|
42
|
-
className={HeroLinkClasses}
|
|
43
|
-
href={href}
|
|
44
|
-
rel={rel}
|
|
45
|
-
aria-label={ariaLabel}
|
|
46
|
-
target={target}
|
|
47
|
-
>
|
|
48
|
-
<span className={styles["heroLink-inner"]}>
|
|
49
|
-
{label && <span className={styles["heroLink-label"]}>{label}</span>}
|
|
50
|
-
<span className={styles["heroLink-icon"]}>
|
|
51
|
-
<Icon
|
|
52
|
-
testId="hero-link-icon"
|
|
53
|
-
size={24}
|
|
54
|
-
icon={BtIconArrowAltRight}
|
|
55
|
-
/>
|
|
56
|
-
</span>
|
|
57
|
-
</span>
|
|
58
|
-
</a>
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
return (
|
|
62
|
-
<button
|
|
63
|
-
{...(commonProps as ButtonElProps)}
|
|
64
|
-
className={HeroLinkClasses}
|
|
65
|
-
aria-label={ariaLabel}
|
|
66
|
-
>
|
|
67
|
-
<span className={styles["heroLink-inner"]}>
|
|
68
|
-
{label && <span className={styles["heroLink-label"]}>{label}</span>}
|
|
69
|
-
<span className={styles["heroLink-icon"]}>
|
|
70
|
-
<Icon testId="hero-link-icon" size={24} icon={BtIconArrowAltRight} />
|
|
71
|
-
</span>
|
|
72
|
-
</span>
|
|
73
|
-
</button>
|
|
74
|
-
);
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
interface LinkElementProps {
|
|
78
|
-
/**
|
|
79
|
-
* URL to link to if `HeroButton` elementType is 'a'.
|
|
80
|
-
*/
|
|
81
|
-
href?: string;
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Target window for the `HeroButton` href URL.
|
|
85
|
-
*/
|
|
86
|
-
target?: string;
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Relationship between the Button href URL and the current page. See
|
|
90
|
-
* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel).
|
|
91
|
-
*/
|
|
92
|
-
rel?: string;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
interface HeroButtonElementProps {
|
|
96
|
-
/**
|
|
97
|
-
* Default behavior of the Button element. If not provided, 'submit' will
|
|
98
|
-
* be inferred. Type 'reset' deliberately excluded.
|
|
99
|
-
*/
|
|
100
|
-
type?: "button" | "submit";
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Refers to the id of a form so it can be submitted if the button exists outside of it.
|
|
104
|
-
*/
|
|
105
|
-
form?: string;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export interface HeroLinkProps
|
|
109
|
-
extends HeroButtonElementProps,
|
|
110
|
-
LinkElementProps {
|
|
111
|
-
/**
|
|
112
|
-
* Label for `HeroLink`
|
|
113
|
-
*/
|
|
114
|
-
label?: string;
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Optional click handler for the `HeroLink`.
|
|
118
|
-
*/
|
|
119
|
-
onClick?: () => void;
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Optional property to provide component Ref
|
|
123
|
-
*/
|
|
124
|
-
ref?: ButtonRef;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Text to override `label` with additional, more precise information
|
|
128
|
-
* specifically for screen reader users.
|
|
129
|
-
*/
|
|
130
|
-
ariaLabel?: string;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* HTML ID for the `HeroLink`
|
|
134
|
-
*/
|
|
135
|
-
id?: string;
|
|
136
|
-
}
|