@arc-ui/community-components 3.12.0 → 3.13.1
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 +11 -11
- package/CHANGELOG.md +17 -0
- package/lib/ArticleCarousel/ArticleCarousel.cjs +1 -1
- package/lib/ArticleCarousel/ArticleCarousel.mjs +1 -1
- package/lib/ArticleSidebar/ArticleSidebar.cjs +15 -9
- package/lib/ArticleSidebar/ArticleSidebar.mjs +16 -10
- package/lib/CopyLead/CopyLead.cjs +1 -1
- package/lib/CopyLead/CopyLead.mjs +1 -1
- package/lib/FeaturePost/FeaturePost.cjs +1 -1
- package/lib/FeaturePost/FeaturePost.mjs +1 -1
- package/lib/HeaderBarNotification/HeaderBarNotification.cjs +1 -1
- package/lib/HeaderBarNotification/HeaderBarNotification.mjs +1 -1
- package/lib/ProductNavigation/ProductNavigation.cjs +1 -1
- package/lib/ProductNavigation/ProductNavigation.mjs +1 -1
- package/lib/PromoListing/PromoListing.cjs +1 -1
- package/lib/PromoListing/PromoListing.mjs +1 -1
- package/lib/Summary/Summary.cjs +1 -1
- package/lib/Summary/Summary.mjs +1 -1
- package/lib/_shared/cjs/{index.es-B73RVhhj.cjs → index.es-DcJ01c8P.cjs} +1 -1
- package/lib/_shared/esm/{index.es-DNGykRl2.mjs → index.es-C76rXaZz.mjs} +1 -1
- package/lib/index.cjs +17 -11
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +5 -0
- package/lib/index.d.mts +5 -0
- package/lib/index.mjs +17 -11
- package/lib/index.mjs.map +1 -1
- package/package.json +13 -13
- package/src/components/ArticleSidebar/ArticleSidebar.tsx +24 -10
- package/src/components/HeaderBarNotification/HeaderBarNotification.tsx +1 -0
- package/versions.json +1 -1
package/lib/index.d.cts
CHANGED
|
@@ -602,6 +602,11 @@ interface ArticleSidebarProps {
|
|
|
602
602
|
* Sharing options for the article.
|
|
603
603
|
*/
|
|
604
604
|
share?: Share;
|
|
605
|
+
/**
|
|
606
|
+
* The article URL used by the share buttons.
|
|
607
|
+
* If it is not provided, the component uses the current browser URL.
|
|
608
|
+
*/
|
|
609
|
+
url?: string;
|
|
605
610
|
}
|
|
606
611
|
|
|
607
612
|
type ListProps = InformationCardProps;
|
package/lib/index.d.mts
CHANGED
|
@@ -602,6 +602,11 @@ interface ArticleSidebarProps {
|
|
|
602
602
|
* Sharing options for the article.
|
|
603
603
|
*/
|
|
604
604
|
share?: Share;
|
|
605
|
+
/**
|
|
606
|
+
* The article URL used by the share buttons.
|
|
607
|
+
* If it is not provided, the component uses the current browser URL.
|
|
608
|
+
*/
|
|
609
|
+
url?: string;
|
|
605
610
|
}
|
|
606
611
|
|
|
607
612
|
type ListProps = InformationCardProps;
|
package/lib/index.mjs
CHANGED
|
@@ -274,7 +274,7 @@ var HeaderBarNotification = function (_a) {
|
|
|
274
274
|
localStorage.setItem(localStorageId, "true");
|
|
275
275
|
setShowNotification(false);
|
|
276
276
|
};
|
|
277
|
-
return (React.createElement(Popover, __assign({ open: showNotification, side: "bottom", sideOffset: 12, maxWidth: 900, arrow: true, asChild: true, className: classNames(styles$v.popupNotification, (_b = {}, _b[styles$v.hiddenByDefault] = showAtSize, _b), showAtSize === null || showAtSize === void 0 ? void 0 : showAtSize.map(function (s) { return styles$v[s]; })), content: React.createElement("div", { className: styles$v.container },
|
|
277
|
+
return (React.createElement(Popover, __assign({ open: showNotification, side: "bottom", sideOffset: 12, maxWidth: 900, arrow: true, asChild: true, onOpenAutoFocus: function (e) { return e.preventDefault(); }, className: classNames(styles$v.popupNotification, (_b = {}, _b[styles$v.hiddenByDefault] = showAtSize, _b), showAtSize === null || showAtSize === void 0 ? void 0 : showAtSize.map(function (s) { return styles$v[s]; })), content: React.createElement("div", { className: styles$v.container },
|
|
278
278
|
React.createElement("div", { className: styles$v.content },
|
|
279
279
|
(image || icon) && (React.createElement("div", { className: styles$v.image },
|
|
280
280
|
image && (React.createElement(Image$2, { src: image, alt: heading, fit: "cover", width: 55 })),
|
|
@@ -1009,7 +1009,7 @@ var SectionHeading = function (_a) {
|
|
|
1009
1009
|
|
|
1010
1010
|
/**
|
|
1011
1011
|
* Do not edit directly
|
|
1012
|
-
* Generated on Thu,
|
|
1012
|
+
* Generated on Thu, 23 Jul 2026 08:25:27 GMT
|
|
1013
1013
|
*/
|
|
1014
1014
|
var ArcSizeBreakpointsXs = "320px";
|
|
1015
1015
|
var ArcSizeBreakpointsS = "636px";
|
|
@@ -3835,10 +3835,15 @@ var styles$e = {"tagGroup":"ArticleSidebar-module_tagGroup__rIPQc","textContent"
|
|
|
3835
3835
|
*/
|
|
3836
3836
|
var ArticleSidebar = function (_a) {
|
|
3837
3837
|
var _b;
|
|
3838
|
-
var author = _a.author, aboutSection = _a.aboutSection, topics = _a.topics, share = _a.share, additionalContent = _a.additionalContent, linkSection = _a.linkSection, props = __rest(_a, ["author", "aboutSection", "topics", "share", "additionalContent", "linkSection"]);
|
|
3838
|
+
var author = _a.author, aboutSection = _a.aboutSection, topics = _a.topics, share = _a.share, additionalContent = _a.additionalContent, linkSection = _a.linkSection, providedUrl = _a.url, props = __rest(_a, ["author", "aboutSection", "topics", "share", "additionalContent", "linkSection", "url"]);
|
|
3839
3839
|
var id = useId();
|
|
3840
3840
|
var _c = useState(false), showToast = _c[0], setShowToast = _c[1];
|
|
3841
|
-
var
|
|
3841
|
+
var _d = useState(""), clientUrl = _d[0], setClientUrl = _d[1];
|
|
3842
|
+
useEffect(function () {
|
|
3843
|
+
if (!providedUrl)
|
|
3844
|
+
setClientUrl(window.location.href);
|
|
3845
|
+
}, [providedUrl]);
|
|
3846
|
+
var url = providedUrl !== null && providedUrl !== void 0 ? providedUrl : clientUrl;
|
|
3842
3847
|
var copyTextToClipBoard = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
3843
3848
|
return __generator(this, function (_a) {
|
|
3844
3849
|
switch (_a.label) {
|
|
@@ -3859,14 +3864,14 @@ var ArticleSidebar = function (_a) {
|
|
|
3859
3864
|
ariaLabel: share.clipboardAriaLabel || "Copy url to clipboard",
|
|
3860
3865
|
},
|
|
3861
3866
|
{
|
|
3862
|
-
href: "mailto:?subject=".concat(share.articleTitle, "&body=").concat(url),
|
|
3867
|
+
href: "mailto:?subject=".concat(encodeURIComponent(share.articleTitle), "&body=").concat(encodeURIComponent(url)),
|
|
3863
3868
|
icon: BtIconEmailUnread,
|
|
3864
3869
|
ariaLabel: share.emailAriaLabel || "Share by email",
|
|
3865
3870
|
}
|
|
3866
3871
|
], (share.linkedin
|
|
3867
3872
|
? [
|
|
3868
3873
|
{
|
|
3869
|
-
href: "https://www.linkedin.com/sharing/share-offsite/?url=".concat(url),
|
|
3874
|
+
href: "https://www.linkedin.com/sharing/share-offsite/?url=".concat(encodeURIComponent(url)),
|
|
3870
3875
|
icon: ArcIconSocialLinkedin,
|
|
3871
3876
|
ariaLabel: share.linkedInAriaLabel || "Share on LinkedIn",
|
|
3872
3877
|
},
|
|
@@ -3874,14 +3879,15 @@ var ArticleSidebar = function (_a) {
|
|
|
3874
3879
|
: []), true), (share.x
|
|
3875
3880
|
? [
|
|
3876
3881
|
{
|
|
3877
|
-
href: "https://twitter.com/intent/tweet?url=".concat(url),
|
|
3882
|
+
href: "https://twitter.com/intent/tweet?url=".concat(encodeURIComponent(url)),
|
|
3878
3883
|
icon: ArcIconSocialX,
|
|
3879
3884
|
ariaLabel: share.xAriaLabel || "Share on x",
|
|
3880
3885
|
},
|
|
3881
3886
|
]
|
|
3882
3887
|
: []), true) : [];
|
|
3883
3888
|
var hasTopContent = Boolean(author || aboutSection || additionalContent);
|
|
3884
|
-
var
|
|
3889
|
+
var showShare = share && url;
|
|
3890
|
+
var hasBottomContent = Boolean(linkSection || topics || showShare);
|
|
3885
3891
|
return (React.createElement("div", __assign({}, filterAttrs(props)),
|
|
3886
3892
|
React.createElement("div", { className: classNames((_b = {},
|
|
3887
3893
|
_b[styles$e.textContent] = hasTopContent,
|
|
@@ -3909,9 +3915,9 @@ var ArticleSidebar = function (_a) {
|
|
|
3909
3915
|
React.createElement(Heading, { level: linkSection.headingLevel }, linkSection.heading),
|
|
3910
3916
|
linkSection.links.map(function (_a) {
|
|
3911
3917
|
var text = _a.text, url = _a.url, ariaLabel = _a.ariaLabel;
|
|
3912
|
-
return (React.createElement(React.Fragment,
|
|
3918
|
+
return (React.createElement(React.Fragment, { key: "".concat(id, "-").concat(url) },
|
|
3913
3919
|
React.createElement(VerticalSpace, { size: "8" }),
|
|
3914
|
-
React.createElement("div",
|
|
3920
|
+
React.createElement("div", null,
|
|
3915
3921
|
React.createElement(Link, { "aria-label": ariaLabel, size: "s", href: url }, text))));
|
|
3916
3922
|
}))),
|
|
3917
3923
|
topics && (React.createElement(React.Fragment, null,
|
|
@@ -3919,7 +3925,7 @@ var ArticleSidebar = function (_a) {
|
|
|
3919
3925
|
React.createElement(Heading, { level: topics.headingLevel }, topics.heading),
|
|
3920
3926
|
React.createElement(VerticalSpace, { size: "16" }),
|
|
3921
3927
|
React.createElement("div", { className: styles$e.tagGroup }, topics.tags.map(function (tag) { return (React.createElement(Tag, __assign({ key: "".concat(id, "-").concat(tag.title) }, tag))); })))),
|
|
3922
|
-
|
|
3928
|
+
showShare && (React.createElement(React.Fragment, null,
|
|
3923
3929
|
(linkSection || topics) && (React.createElement("div", { "data-testid": "links-topics-content-rule" },
|
|
3924
3930
|
React.createElement(VerticalSpace, { size: "32" }),
|
|
3925
3931
|
React.createElement(Rule, null),
|