@arc-ui/community-components 3.13.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @arc-ui/community-components@3.13.0 build /builds/enterprise/frontend/arc-community/packages/components
2
+ > @arc-ui/community-components@3.13.1 build /builds/enterprise/frontend/arc-community/packages/components
3
3
  > rimraf lib dist && rollup -c && generate-subpath-css && pnpm run build:clean
4
4
 
5
5
  Browserslist: browsers data (caniuse-lite) is 11 months old. Please run:
@@ -7,41 +7,41 @@ Browserslist: browsers data (caniuse-lite) is 11 months old. Please run:
7
7
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
8
8
  
9
9
  src/index.ts → lib/index.cjs, lib/index.mjs...
10
- created lib/index.cjs, lib/index.mjs in 12.7s
10
+ created lib/index.cjs, lib/index.mjs in 6.9s
11
11
  
12
12
  ./lib/types/index.d.ts → lib/index.d.mts, lib/index.d.cts...
13
13
  (!) Unresolved dependencies
14
14
  https://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency
15
- @arc-ui/components/MediaCard (imported by "lib/types/components/ArticleCarousel/ArticleCarousel.d.ts", "lib/types/components/PromoListing/PromoListing.d.ts" and "lib/types/components/BusinessSegmentSwitcher/types/types.d.ts")
16
- @arc-ui/components/Avatar (imported by "lib/types/components/Author/Author.d.ts")
17
15
  @arc-ui/components/NavigationHeader (imported by "lib/types/components/HeaderBarNotification/HeaderBarNotification.d.ts")
18
- @arc-ui/components/Heading (imported by "lib/types/components/CopyLead/CopyLead.d.ts", "lib/types/components/FeaturePost/FeaturePost.d.ts", "lib/types/components/PromoListing/PromoListing.d.ts", "lib/types/components/Summary/Summary.d.ts", "lib/types/components/BannerWithTabs/BannerWithTabs.d.ts", "lib/types/components/SectionHeading/SectionHeading.d.ts", "lib/types/components/PartnerBrandLogos/PartnerBrandLogos.d.ts", "lib/types/components/Accordion/components/AccordionHeading/AccordionHeading.d.ts", "lib/types/components/ArticleSidebar/types/text-section.d.ts", "lib/types/components/ArticleSidebar/types/link-section.d.ts", "lib/types/components/ArticleSidebar/types/topic.d.ts", "lib/types/components/ArticleSidebar/types/share.d.ts" and "lib/types/components/PartnerBrandLogos/components/PartnerLogoSubgroup/PartnerLogoSubgroup.d.ts")
19
- @arc-ui/components/VideoPlayer (imported by "lib/types/components/CopyLead/CopyLead.d.ts" and "lib/types/components/FeaturePost/FeaturePost.d.ts")
16
+ @arc-ui/components/Avatar (imported by "lib/types/components/Author/Author.d.ts")
20
17
  @arc-ui/components/Download (imported by "lib/types/components/DownloadList/DownloadList.d.ts")
18
+ @arc-ui/components/Heading (imported by "lib/types/components/CopyLead/CopyLead.d.ts", "lib/types/components/FeaturePost/FeaturePost.d.ts", "lib/types/components/Summary/Summary.d.ts", "lib/types/components/PromoListing/PromoListing.d.ts", "lib/types/components/BannerWithTabs/BannerWithTabs.d.ts", "lib/types/components/SectionHeading/SectionHeading.d.ts", "lib/types/components/PartnerBrandLogos/PartnerBrandLogos.d.ts", "lib/types/components/Accordion/components/AccordionHeading/AccordionHeading.d.ts", "lib/types/components/ArticleSidebar/types/link-section.d.ts", "lib/types/components/ArticleSidebar/types/topic.d.ts", "lib/types/components/ArticleSidebar/types/text-section.d.ts", "lib/types/components/ArticleSidebar/types/share.d.ts" and "lib/types/components/PartnerBrandLogos/components/PartnerLogoSubgroup/PartnerLogoSubgroup.d.ts")
19
+ @arc-ui/components/VideoPlayer (imported by "lib/types/components/CopyLead/CopyLead.d.ts" and "lib/types/components/FeaturePost/FeaturePost.d.ts")
20
+ @arc-ui/components/MediaCard (imported by "lib/types/components/ArticleCarousel/ArticleCarousel.d.ts", "lib/types/components/PromoListing/PromoListing.d.ts" and "lib/types/components/BusinessSegmentSwitcher/types/types.d.ts")
21
21
  @arc-ui/components/ButtonV2 (imported by "lib/types/components/Highlights/Highlights.d.ts" and "lib/types/components/PromoListing/PromoListing.d.ts")
22
22
  @arc-ui/components/ImpactCard (imported by "lib/types/components/PromoListing/PromoListing.d.ts")
23
23
  @arc-ui/components/InformationCard (imported by "lib/types/components/PromoListing/PromoListing.d.ts", "lib/types/components/BusinessSegmentSwitcher/types/types.d.ts" and "lib/types/components/ProductNavigation/types/product-list.d.ts")
24
24
  @arc-ui/components/TypographyCard (imported by "lib/types/components/PromoListing/PromoListing.d.ts" and "lib/types/components/BusinessSegmentSwitcher/types/types.d.ts")
25
25
  @arc-ui/components/TemplateBanner (imported by "lib/types/components/BannerWithTabs/BannerWithTabs.d.ts")
26
- @arc-ui/components/Image (imported by "lib/types/components/SectionHeading/SectionHeading.d.ts", "lib/types/components/ThumbnailSignpost/ThumbnailSignpost.d.ts", "lib/types/components/Accordion/components/AccordionHeading/AccordionHeading.d.ts", "lib/types/components/CopyLead/types/copy-lead-image.d.ts" and "lib/types/components/FeaturePost/types/feature-post-image.d.ts")
26
+ @arc-ui/components/Image (imported by "lib/types/components/SectionHeading/SectionHeading.d.ts", "lib/types/components/ThumbnailSignpost/ThumbnailSignpost.d.ts", "lib/types/components/Accordion/components/AccordionHeading/AccordionHeading.d.ts", "lib/types/components/FeaturePost/types/feature-post-image.d.ts" and "lib/types/components/CopyLead/types/copy-lead-image.d.ts")
27
27
  @arc-ui/components/VerticalSpace (imported by "lib/types/components/PartnerBrandLogos/PartnerBrandLogos.d.ts")
28
28
  @arc-ui/components/Disclosure (imported by "lib/types/components/Accordion/components/AccordionDisclosureList/AccordionDisclosureList.d.ts")
29
29
  @arc-ui/components/Tag (imported by "lib/types/components/ArticleSidebar/types/topic.d.ts")
30
30
  @arc-ui/components/AppButton (imported by "lib/types/components/FeaturePost/types/feature-post-app-button-footer.d.ts")
31
- @arc-ui/components/Button (imported by "lib/types/components/CopyLead/types/copy-lead-button.d.ts" and "lib/types/components/FeaturePost/types/feature-post-cta-footer.d.ts")
31
+ @arc-ui/components/Button (imported by "lib/types/components/FeaturePost/types/feature-post-cta-footer.d.ts" and "lib/types/components/CopyLead/types/copy-lead-button.d.ts")
32
32
  react-player/types (imported by "lib/types/internal/VideoCardPlayer/VideoCardPlayer.d.ts" and "lib/types/internal/VideoCardPlayer/types/player-props.d.ts")
33
33
  @arc-ui/components/Visible (imported by "lib/types/internal/VideoCardPlayer/components/VideoCardThumbnail/VideoCardThumbnail.d.ts")
34
- created lib/index.d.mts, lib/index.d.cts in 276ms
34
+ created lib/index.d.mts, lib/index.d.cts in 154ms
35
35
  
36
36
  ./src/components/Accordion/index.ts, ./src/components/ActionTile/index.ts, ./src/components/ArticleCarousel/index.ts, ./src/components/ArticleSidebar/index.ts, ./src/components/Author/index.ts, ./src/components/BannerWithTabs/index.ts, ./src/components/BusinessSegmentSwitcher/index.ts, ./src/components/ContentInfoWidget/index.ts, ./src/components/CopyLead/index.ts, ./src/components/DownloadList/index.ts, ./src/components/FAQs/index.ts, ./src/components/FeaturePost/index.ts, ./src/components/HeaderBarNotification/index.ts, ./src/components/Highlights/index.ts, ./src/components/InlineLinkGroup/index.ts, ./src/components/LinkTile/index.ts, ./src/components/PartnerBrandLogos/index.ts, ./src/components/ProductNavigation/index.ts, ./src/components/PromoListing/index.ts, ./src/components/PromoListingThumbnailSignpost/index.ts, ./src/components/Quote/index.ts, ./src/components/SectionHeading/index.ts, ./src/components/Statistics/index.ts, ./src/components/Summary/index.ts, ./src/components/ThumbnailSignpost/index.ts, ./src/components/VideoHeroCard/index.ts, ./src/components/VideoPortraitCard/index.ts → lib...
37
- created lib in 16.9s
37
+ created lib in 7.6s
38
38
  
39
39
  ./src/components/Accordion/index.ts, ./src/components/ActionTile/index.ts, ./src/components/ArticleCarousel/index.ts, ./src/components/ArticleSidebar/index.ts, ./src/components/Author/index.ts, ./src/components/BannerWithTabs/index.ts, ./src/components/BusinessSegmentSwitcher/index.ts, ./src/components/ContentInfoWidget/index.ts, ./src/components/CopyLead/index.ts, ./src/components/DownloadList/index.ts, ./src/components/FAQs/index.ts, ./src/components/FeaturePost/index.ts, ./src/components/HeaderBarNotification/index.ts, ./src/components/Highlights/index.ts, ./src/components/InlineLinkGroup/index.ts, ./src/components/LinkTile/index.ts, ./src/components/PartnerBrandLogos/index.ts, ./src/components/ProductNavigation/index.ts, ./src/components/PromoListing/index.ts, ./src/components/PromoListingThumbnailSignpost/index.ts, ./src/components/Quote/index.ts, ./src/components/SectionHeading/index.ts, ./src/components/Statistics/index.ts, ./src/components/Summary/index.ts, ./src/components/ThumbnailSignpost/index.ts, ./src/components/VideoHeroCard/index.ts, ./src/components/VideoPortraitCard/index.ts → lib...
40
- created lib in 16.2s
40
+ created lib in 7.3s
41
41
  Browserslist: browsers data (caniuse-lite) is 11 months old. Please run:
42
42
  npx update-browserslist-db@latest
43
43
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
44
44
 
45
- > @arc-ui/community-components@3.13.0 build:clean /builds/enterprise/frontend/arc-community/packages/components
45
+ > @arc-ui/community-components@3.13.1 build:clean /builds/enterprise/frontend/arc-community/packages/components
46
46
  > rimraf ./lib/types ./lib/styles.js ./lib/index.js ./lib/index.js.map
47
47
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @arc-ui/community-components
2
2
 
3
+ ## 3.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 8978dfe: Add support for URL prop
8
+ - 8978dfe: Add optional URL prop to ArticleSidebar
9
+
3
10
  ## 3.13.0
4
11
 
5
12
  ### Minor Changes
@@ -55,10 +55,15 @@ var styles = {"tagGroup":"ArticleSidebar-module_tagGroup__rIPQc","textContent":"
55
55
  */
56
56
  var ArticleSidebar = function (_a) {
57
57
  var _b;
58
- var author = _a.author, aboutSection = _a.aboutSection, topics = _a.topics, share = _a.share, additionalContent = _a.additionalContent, linkSection = _a.linkSection, props = tslib_es6.__rest(_a, ["author", "aboutSection", "topics", "share", "additionalContent", "linkSection"]);
58
+ var author = _a.author, aboutSection = _a.aboutSection, topics = _a.topics, share = _a.share, additionalContent = _a.additionalContent, linkSection = _a.linkSection, providedUrl = _a.url, props = tslib_es6.__rest(_a, ["author", "aboutSection", "topics", "share", "additionalContent", "linkSection", "url"]);
59
59
  var id = React.useId();
60
60
  var _c = React.useState(false), showToast = _c[0], setShowToast = _c[1];
61
- var url = location.href;
61
+ var _d = React.useState(""), clientUrl = _d[0], setClientUrl = _d[1];
62
+ React.useEffect(function () {
63
+ if (!providedUrl)
64
+ setClientUrl(window.location.href);
65
+ }, [providedUrl]);
66
+ var url = providedUrl !== null && providedUrl !== void 0 ? providedUrl : clientUrl;
62
67
  var copyTextToClipBoard = function () { return tslib_es6.__awaiter(void 0, void 0, void 0, function () {
63
68
  return tslib_es6.__generator(this, function (_a) {
64
69
  switch (_a.label) {
@@ -79,14 +84,14 @@ var ArticleSidebar = function (_a) {
79
84
  ariaLabel: share.clipboardAriaLabel || "Copy url to clipboard",
80
85
  },
81
86
  {
82
- href: "mailto:?subject=".concat(share.articleTitle, "&body=").concat(url),
87
+ href: "mailto:?subject=".concat(encodeURIComponent(share.articleTitle), "&body=").concat(encodeURIComponent(url)),
83
88
  icon: BtIconEmailUnread,
84
89
  ariaLabel: share.emailAriaLabel || "Share by email",
85
90
  }
86
91
  ], (share.linkedin
87
92
  ? [
88
93
  {
89
- href: "https://www.linkedin.com/sharing/share-offsite/?url=".concat(url),
94
+ href: "https://www.linkedin.com/sharing/share-offsite/?url=".concat(encodeURIComponent(url)),
90
95
  icon: ArcIconSocialLinkedin,
91
96
  ariaLabel: share.linkedInAriaLabel || "Share on LinkedIn",
92
97
  },
@@ -94,14 +99,15 @@ var ArticleSidebar = function (_a) {
94
99
  : []), true), (share.x
95
100
  ? [
96
101
  {
97
- href: "https://twitter.com/intent/tweet?url=".concat(url),
102
+ href: "https://twitter.com/intent/tweet?url=".concat(encodeURIComponent(url)),
98
103
  icon: ArcIconSocialX,
99
104
  ariaLabel: share.xAriaLabel || "Share on x",
100
105
  },
101
106
  ]
102
107
  : []), true) : [];
103
108
  var hasTopContent = Boolean(author || aboutSection || additionalContent);
104
- var hasBottomContent = Boolean(linkSection || topics || share);
109
+ var showShare = share && url;
110
+ var hasBottomContent = Boolean(linkSection || topics || showShare);
105
111
  return (React.createElement("div", tslib_es6.__assign({}, filterAttrs.filterAttrs(props)),
106
112
  React.createElement("div", { className: index.classNames((_b = {},
107
113
  _b[styles.textContent] = hasTopContent,
@@ -129,9 +135,9 @@ var ArticleSidebar = function (_a) {
129
135
  React.createElement(Heading.Heading, { level: linkSection.headingLevel }, linkSection.heading),
130
136
  linkSection.links.map(function (_a) {
131
137
  var text = _a.text, url = _a.url, ariaLabel = _a.ariaLabel;
132
- return (React.createElement(React.Fragment, null,
138
+ return (React.createElement(React.Fragment, { key: "".concat(id, "-").concat(url) },
133
139
  React.createElement(VerticalSpace.VerticalSpace, { size: "8" }),
134
- React.createElement("div", { key: "".concat(id, "-").concat(url) },
140
+ React.createElement("div", null,
135
141
  React.createElement(Link.Link, { "aria-label": ariaLabel, size: "s", href: url }, text))));
136
142
  }))),
137
143
  topics && (React.createElement(React.Fragment, null,
@@ -139,7 +145,7 @@ var ArticleSidebar = function (_a) {
139
145
  React.createElement(Heading.Heading, { level: topics.headingLevel }, topics.heading),
140
146
  React.createElement(VerticalSpace.VerticalSpace, { size: "16" }),
141
147
  React.createElement("div", { className: styles.tagGroup }, topics.tags.map(function (tag) { return (React.createElement(Tag.Tag, tslib_es6.__assign({ key: "".concat(id, "-").concat(tag.title) }, tag))); })))),
142
- share && (React.createElement(React.Fragment, null,
148
+ showShare && (React.createElement(React.Fragment, null,
143
149
  (linkSection || topics) && (React.createElement("div", { "data-testid": "links-topics-content-rule" },
144
150
  React.createElement(VerticalSpace.VerticalSpace, { size: "32" }),
145
151
  React.createElement(Rule.Rule, null),
@@ -1,5 +1,5 @@
1
1
  import { _ as __rest, b as __spreadArray, a as __assign, c as __awaiter, d as __generator } from '../_shared/esm/tslib.es6-BVXMhEem.mjs';
2
- import React__default, { useId, useState } from 'react';
2
+ import React__default, { useId, useState, useEffect } from 'react';
3
3
  import { c as classNames } from '../_shared/esm/index-BSO2EFem.mjs';
4
4
  import { Heading } from '@arc-ui/components/Heading';
5
5
  import { Icon } from '@arc-ui/components/Icon';
@@ -53,10 +53,15 @@ var styles = {"tagGroup":"ArticleSidebar-module_tagGroup__rIPQc","textContent":"
53
53
  */
54
54
  var ArticleSidebar = function (_a) {
55
55
  var _b;
56
- 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"]);
56
+ 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"]);
57
57
  var id = useId();
58
58
  var _c = useState(false), showToast = _c[0], setShowToast = _c[1];
59
- var url = location.href;
59
+ var _d = useState(""), clientUrl = _d[0], setClientUrl = _d[1];
60
+ useEffect(function () {
61
+ if (!providedUrl)
62
+ setClientUrl(window.location.href);
63
+ }, [providedUrl]);
64
+ var url = providedUrl !== null && providedUrl !== void 0 ? providedUrl : clientUrl;
60
65
  var copyTextToClipBoard = function () { return __awaiter(void 0, void 0, void 0, function () {
61
66
  return __generator(this, function (_a) {
62
67
  switch (_a.label) {
@@ -77,14 +82,14 @@ var ArticleSidebar = function (_a) {
77
82
  ariaLabel: share.clipboardAriaLabel || "Copy url to clipboard",
78
83
  },
79
84
  {
80
- href: "mailto:?subject=".concat(share.articleTitle, "&body=").concat(url),
85
+ href: "mailto:?subject=".concat(encodeURIComponent(share.articleTitle), "&body=").concat(encodeURIComponent(url)),
81
86
  icon: BtIconEmailUnread,
82
87
  ariaLabel: share.emailAriaLabel || "Share by email",
83
88
  }
84
89
  ], (share.linkedin
85
90
  ? [
86
91
  {
87
- href: "https://www.linkedin.com/sharing/share-offsite/?url=".concat(url),
92
+ href: "https://www.linkedin.com/sharing/share-offsite/?url=".concat(encodeURIComponent(url)),
88
93
  icon: ArcIconSocialLinkedin,
89
94
  ariaLabel: share.linkedInAriaLabel || "Share on LinkedIn",
90
95
  },
@@ -92,14 +97,15 @@ var ArticleSidebar = function (_a) {
92
97
  : []), true), (share.x
93
98
  ? [
94
99
  {
95
- href: "https://twitter.com/intent/tweet?url=".concat(url),
100
+ href: "https://twitter.com/intent/tweet?url=".concat(encodeURIComponent(url)),
96
101
  icon: ArcIconSocialX,
97
102
  ariaLabel: share.xAriaLabel || "Share on x",
98
103
  },
99
104
  ]
100
105
  : []), true) : [];
101
106
  var hasTopContent = Boolean(author || aboutSection || additionalContent);
102
- var hasBottomContent = Boolean(linkSection || topics || share);
107
+ var showShare = share && url;
108
+ var hasBottomContent = Boolean(linkSection || topics || showShare);
103
109
  return (React__default.createElement("div", __assign({}, filterAttrs(props)),
104
110
  React__default.createElement("div", { className: classNames((_b = {},
105
111
  _b[styles.textContent] = hasTopContent,
@@ -127,9 +133,9 @@ var ArticleSidebar = function (_a) {
127
133
  React__default.createElement(Heading, { level: linkSection.headingLevel }, linkSection.heading),
128
134
  linkSection.links.map(function (_a) {
129
135
  var text = _a.text, url = _a.url, ariaLabel = _a.ariaLabel;
130
- return (React__default.createElement(React__default.Fragment, null,
136
+ return (React__default.createElement(React__default.Fragment, { key: "".concat(id, "-").concat(url) },
131
137
  React__default.createElement(VerticalSpace, { size: "8" }),
132
- React__default.createElement("div", { key: "".concat(id, "-").concat(url) },
138
+ React__default.createElement("div", null,
133
139
  React__default.createElement(Link, { "aria-label": ariaLabel, size: "s", href: url }, text))));
134
140
  }))),
135
141
  topics && (React__default.createElement(React__default.Fragment, null,
@@ -137,7 +143,7 @@ var ArticleSidebar = function (_a) {
137
143
  React__default.createElement(Heading, { level: topics.headingLevel }, topics.heading),
138
144
  React__default.createElement(VerticalSpace, { size: "16" }),
139
145
  React__default.createElement("div", { className: styles.tagGroup }, topics.tags.map(function (tag) { return (React__default.createElement(Tag, __assign({ key: "".concat(id, "-").concat(tag.title) }, tag))); })))),
140
- share && (React__default.createElement(React__default.Fragment, null,
146
+ showShare && (React__default.createElement(React__default.Fragment, null,
141
147
  (linkSection || topics) && (React__default.createElement("div", { "data-testid": "links-topics-content-rule" },
142
148
  React__default.createElement(VerticalSpace, { size: "32" }),
143
149
  React__default.createElement(Rule, null),
package/lib/index.cjs CHANGED
@@ -3837,10 +3837,15 @@ var styles$e = {"tagGroup":"ArticleSidebar-module_tagGroup__rIPQc","textContent"
3837
3837
  */
3838
3838
  var ArticleSidebar = function (_a) {
3839
3839
  var _b;
3840
- 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"]);
3840
+ 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"]);
3841
3841
  var id = React.useId();
3842
3842
  var _c = React.useState(false), showToast = _c[0], setShowToast = _c[1];
3843
- var url = location.href;
3843
+ var _d = React.useState(""), clientUrl = _d[0], setClientUrl = _d[1];
3844
+ React.useEffect(function () {
3845
+ if (!providedUrl)
3846
+ setClientUrl(window.location.href);
3847
+ }, [providedUrl]);
3848
+ var url = providedUrl !== null && providedUrl !== void 0 ? providedUrl : clientUrl;
3844
3849
  var copyTextToClipBoard = function () { return __awaiter(void 0, void 0, void 0, function () {
3845
3850
  return __generator(this, function (_a) {
3846
3851
  switch (_a.label) {
@@ -3861,14 +3866,14 @@ var ArticleSidebar = function (_a) {
3861
3866
  ariaLabel: share.clipboardAriaLabel || "Copy url to clipboard",
3862
3867
  },
3863
3868
  {
3864
- href: "mailto:?subject=".concat(share.articleTitle, "&body=").concat(url),
3869
+ href: "mailto:?subject=".concat(encodeURIComponent(share.articleTitle), "&body=").concat(encodeURIComponent(url)),
3865
3870
  icon: BtIconEmailUnread,
3866
3871
  ariaLabel: share.emailAriaLabel || "Share by email",
3867
3872
  }
3868
3873
  ], (share.linkedin
3869
3874
  ? [
3870
3875
  {
3871
- href: "https://www.linkedin.com/sharing/share-offsite/?url=".concat(url),
3876
+ href: "https://www.linkedin.com/sharing/share-offsite/?url=".concat(encodeURIComponent(url)),
3872
3877
  icon: ArcIconSocialLinkedin,
3873
3878
  ariaLabel: share.linkedInAriaLabel || "Share on LinkedIn",
3874
3879
  },
@@ -3876,14 +3881,15 @@ var ArticleSidebar = function (_a) {
3876
3881
  : []), true), (share.x
3877
3882
  ? [
3878
3883
  {
3879
- href: "https://twitter.com/intent/tweet?url=".concat(url),
3884
+ href: "https://twitter.com/intent/tweet?url=".concat(encodeURIComponent(url)),
3880
3885
  icon: ArcIconSocialX,
3881
3886
  ariaLabel: share.xAriaLabel || "Share on x",
3882
3887
  },
3883
3888
  ]
3884
3889
  : []), true) : [];
3885
3890
  var hasTopContent = Boolean(author || aboutSection || additionalContent);
3886
- var hasBottomContent = Boolean(linkSection || topics || share);
3891
+ var showShare = share && url;
3892
+ var hasBottomContent = Boolean(linkSection || topics || showShare);
3887
3893
  return (React.createElement("div", __assign({}, filterAttrs(props)),
3888
3894
  React.createElement("div", { className: classNames((_b = {},
3889
3895
  _b[styles$e.textContent] = hasTopContent,
@@ -3911,9 +3917,9 @@ var ArticleSidebar = function (_a) {
3911
3917
  React.createElement(Heading.Heading, { level: linkSection.headingLevel }, linkSection.heading),
3912
3918
  linkSection.links.map(function (_a) {
3913
3919
  var text = _a.text, url = _a.url, ariaLabel = _a.ariaLabel;
3914
- return (React.createElement(React.Fragment, null,
3920
+ return (React.createElement(React.Fragment, { key: "".concat(id, "-").concat(url) },
3915
3921
  React.createElement(VerticalSpace.VerticalSpace, { size: "8" }),
3916
- React.createElement("div", { key: "".concat(id, "-").concat(url) },
3922
+ React.createElement("div", null,
3917
3923
  React.createElement(Link.Link, { "aria-label": ariaLabel, size: "s", href: url }, text))));
3918
3924
  }))),
3919
3925
  topics && (React.createElement(React.Fragment, null,
@@ -3921,7 +3927,7 @@ var ArticleSidebar = function (_a) {
3921
3927
  React.createElement(Heading.Heading, { level: topics.headingLevel }, topics.heading),
3922
3928
  React.createElement(VerticalSpace.VerticalSpace, { size: "16" }),
3923
3929
  React.createElement("div", { className: styles$e.tagGroup }, topics.tags.map(function (tag) { return (React.createElement(Tag.Tag, __assign({ key: "".concat(id, "-").concat(tag.title) }, tag))); })))),
3924
- share && (React.createElement(React.Fragment, null,
3930
+ showShare && (React.createElement(React.Fragment, null,
3925
3931
  (linkSection || topics) && (React.createElement("div", { "data-testid": "links-topics-content-rule" },
3926
3932
  React.createElement(VerticalSpace.VerticalSpace, { size: "32" }),
3927
3933
  React.createElement(Rule.Rule, null),