@arc-ui/community-components 3.13.0 → 3.14.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 +18 -16
- package/CHANGELOG.md +18 -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/InlineLinkGroup/InlineLinkGroup.cjs +2 -2
- package/lib/InlineLinkGroup/InlineLinkGroup.mjs +2 -2
- package/lib/ProductCard/ProductCard.cjs +77 -0
- package/lib/ProductCard/ProductCard.mjs +72 -0
- package/lib/ProductCard/styles.css +1 -0
- package/lib/ProductCardGrid/ProductCardGrid.cjs +69 -0
- package/lib/ProductCardGrid/ProductCardGrid.mjs +67 -0
- 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/VideoHeroCard/VideoHeroCard.cjs +4 -4
- package/lib/VideoHeroCard/VideoHeroCard.mjs +4 -4
- package/lib/VideoPortraitCard/VideoPortraitCard.cjs +3 -3
- package/lib/VideoPortraitCard/VideoPortraitCard.mjs +3 -3
- package/lib/_shared/cjs/{VideoCardThumbnail-BM3GwyWR.cjs → VideoCardThumbnail-DhdbNf5c.cjs} +10 -2
- package/lib/_shared/cjs/{index.es-DcJ01c8P.cjs → index.es-5qmN4ppJ.cjs} +1 -1
- package/lib/_shared/esm/{VideoCardThumbnail-K6eHIeAM.mjs → VideoCardThumbnail-B8JS-s6O.mjs} +10 -2
- package/lib/_shared/esm/{index.es-C76rXaZz.mjs → index.es-Cis5MKaa.mjs} +1 -1
- package/lib/index.cjs +309 -180
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +75 -2
- package/lib/index.d.mts +75 -2
- package/lib/index.mjs +306 -182
- package/lib/index.mjs.map +1 -1
- package/lib/styles.css +1 -1
- package/package.json +14 -14
- package/src/components/ArticleSidebar/ArticleSidebar.tsx +24 -10
- package/src/components/InlineLinkGroup/InlineLinkGroup.tsx +4 -0
- package/src/components/ProductCard/ProductCard.module.css +49 -0
- package/src/components/ProductCard/ProductCard.tsx +113 -0
- package/src/components/ProductCard/ProductCardBenefits/ProductCardBenefits.module.css +14 -0
- package/src/components/ProductCard/ProductCardBenefits/ProductCardBenefits.tsx +42 -0
- package/src/components/ProductCard/ProductCardBenefits/index.ts +4 -0
- package/src/components/ProductCard/ProductCardPrice/ProductCardPrice.module.css +5 -0
- package/src/components/ProductCard/ProductCardPrice/ProductCardPrice.tsx +37 -0
- package/src/components/ProductCard/ProductCardPrice/index.ts +4 -0
- package/src/components/ProductCard/ProductCardPriceIncrease/ProductCardPriceIncrease.module.css +25 -0
- package/src/components/ProductCard/ProductCardPriceIncrease/ProductCardPriceIncrease.tsx +39 -0
- package/src/components/ProductCard/ProductCardPriceIncrease/index.ts +4 -0
- package/src/components/ProductCard/index.ts +13 -0
- package/src/components/ProductCardGrid/ProductCardGrid.tsx +162 -0
- package/src/components/ProductCardGrid/components/CardGrid/CardGrid.module.css +34 -0
- package/src/components/ProductCardGrid/components/CardGrid/CardGrid.tsx +44 -0
- package/src/components/ProductCardGrid/components/CardGrid/index.ts +1 -0
- package/src/components/ProductCardGrid/index.ts +5 -0
- package/src/components/VideoHeroCard/components/VideoHeroCardContent/VideoHeroCardContent.tsx +9 -3
- package/src/components/VideoPortraitCard/VideoPortraitCard.tsx +11 -3
- package/src/components/index.ts +2 -0
- package/src/internal/VideoCardPlayer/VideoCardPlayer.module.css +5 -2
- package/src/internal/VideoCardPlayer/VideoCardPlayer.tsx +16 -1
- package/versions.json +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,47 +1,49 @@
|
|
|
1
1
|
|
|
2
|
-
> @arc-ui/community-components@3.
|
|
2
|
+
> @arc-ui/community-components@3.14.0 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
|
-
Browserslist: browsers data (caniuse-lite) is
|
|
5
|
+
Browserslist: browsers data (caniuse-lite) is 12 months old. Please run:
|
|
6
6
|
npx update-browserslist-db@latest
|
|
7
7
|
Why you should do it regularly: https://github.com/browserslist/update-db#readme
|
|
8
8
|
[36m
|
|
9
9
|
[1msrc/index.ts[22m → [1mlib/index.cjs, lib/index.mjs[22m...[39m
|
|
10
|
-
[32mcreated [1mlib/index.cjs, lib/index.mjs[22m in [
|
|
10
|
+
[32mcreated [1mlib/index.cjs, lib/index.mjs[22m in [1m7.5s[22m[39m
|
|
11
11
|
[36m
|
|
12
12
|
[1m./lib/types/index.d.ts[22m → [1mlib/index.d.mts, lib/index.d.cts[22m...[39m
|
|
13
13
|
[1m[33m(!) Unresolved dependencies[39m[22m
|
|
14
14
|
[90mhttps://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency[39m
|
|
15
|
-
[1m@arc-ui/components/MediaCard[22m (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
|
-
[1m@arc-ui/components/Avatar[22m (imported by "lib/types/components/Author/Author.d.ts")
|
|
17
15
|
[1m@arc-ui/components/NavigationHeader[22m (imported by "lib/types/components/HeaderBarNotification/HeaderBarNotification.d.ts")
|
|
18
|
-
[1m@arc-ui/components/Heading[22m (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
|
-
[1m@arc-ui/components/VideoPlayer[22m (imported by "lib/types/components/CopyLead/CopyLead.d.ts" and "lib/types/components/FeaturePost/FeaturePost.d.ts")
|
|
20
16
|
[1m@arc-ui/components/Download[22m (imported by "lib/types/components/DownloadList/DownloadList.d.ts")
|
|
21
|
-
[1m@arc-ui/components/
|
|
17
|
+
[1m@arc-ui/components/Avatar[22m (imported by "lib/types/components/Author/Author.d.ts")
|
|
18
|
+
[1m@arc-ui/components/MediaCard[22m (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")
|
|
19
|
+
[1m@arc-ui/components/Heading[22m (imported by "lib/types/components/FeaturePost/FeaturePost.d.ts", "lib/types/components/CopyLead/CopyLead.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/VideoPortraitCard/VideoPortraitCard.d.ts", "lib/types/components/PartnerBrandLogos/PartnerBrandLogos.d.ts", "lib/types/components/ProductCard/ProductCard.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/share.d.ts", "lib/types/components/ArticleSidebar/types/link-section.d.ts", "lib/types/components/ArticleSidebar/types/topic.d.ts", "lib/types/components/PartnerBrandLogos/components/PartnerLogoSubgroup/PartnerLogoSubgroup.d.ts", "lib/types/components/ProductCard/ProductCardBenefits/ProductCardBenefits.d.ts", "lib/types/components/ProductCard/ProductCardPriceIncrease/ProductCardPriceIncrease.d.ts" and "lib/types/components/VideoHeroCard/components/VideoHeroCardContent/VideoHeroCardContent.d.ts")
|
|
20
|
+
[1m@arc-ui/components/VideoPlayer[22m (imported by "lib/types/components/FeaturePost/FeaturePost.d.ts" and "lib/types/components/CopyLead/CopyLead.d.ts")
|
|
21
|
+
[1m@arc-ui/components/ButtonV2[22m (imported by "lib/types/components/Highlights/Highlights.d.ts", "lib/types/components/PromoListing/PromoListing.d.ts" and "lib/types/components/ProductCard/ProductCard.d.ts")
|
|
22
22
|
[1m@arc-ui/components/ImpactCard[22m (imported by "lib/types/components/PromoListing/PromoListing.d.ts")
|
|
23
23
|
[1m@arc-ui/components/InformationCard[22m (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
|
[1m@arc-ui/components/TypographyCard[22m (imported by "lib/types/components/PromoListing/PromoListing.d.ts" and "lib/types/components/BusinessSegmentSwitcher/types/types.d.ts")
|
|
25
25
|
[1m@arc-ui/components/TemplateBanner[22m (imported by "lib/types/components/BannerWithTabs/BannerWithTabs.d.ts")
|
|
26
26
|
[1m@arc-ui/components/Image[22m (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")
|
|
27
27
|
[1m@arc-ui/components/VerticalSpace[22m (imported by "lib/types/components/PartnerBrandLogos/PartnerBrandLogos.d.ts")
|
|
28
|
+
[1m@arc-ui/components/Surface[22m (imported by "lib/types/components/ProductCard/ProductCard.d.ts")
|
|
29
|
+
[1m@arc-ui/components/Tabs[22m (imported by "lib/types/components/ProductCardGrid/ProductCardGrid.d.ts")
|
|
28
30
|
[1m@arc-ui/components/Disclosure[22m (imported by "lib/types/components/Accordion/components/AccordionDisclosureList/AccordionDisclosureList.d.ts")
|
|
29
31
|
[1m@arc-ui/components/Tag[22m (imported by "lib/types/components/ArticleSidebar/types/topic.d.ts")
|
|
30
32
|
[1m@arc-ui/components/AppButton[22m (imported by "lib/types/components/FeaturePost/types/feature-post-app-button-footer.d.ts")
|
|
31
|
-
[1m@arc-ui/components/Button[22m (imported by "lib/types/components/
|
|
33
|
+
[1m@arc-ui/components/Button[22m (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
34
|
[1mreact-player/types[22m (imported by "lib/types/internal/VideoCardPlayer/VideoCardPlayer.d.ts" and "lib/types/internal/VideoCardPlayer/types/player-props.d.ts")
|
|
33
35
|
[1m@arc-ui/components/Visible[22m (imported by "lib/types/internal/VideoCardPlayer/components/VideoCardThumbnail/VideoCardThumbnail.d.ts")
|
|
34
|
-
[32mcreated [1mlib/index.d.mts, lib/index.d.cts[22m in [
|
|
36
|
+
[32mcreated [1mlib/index.d.mts, lib/index.d.cts[22m in [1m223ms[22m[39m
|
|
35
37
|
[36m
|
|
36
|
-
[1m./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[22m → [1mlib[22m...[39m
|
|
37
|
-
[32mcreated [1mlib[22m in [
|
|
38
|
+
[1m./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/ProductCard/index.ts, ./src/components/ProductCardGrid/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[22m → [1mlib[22m...[39m
|
|
39
|
+
[32mcreated [1mlib[22m in [1m9.1s[22m[39m
|
|
38
40
|
[36m
|
|
39
|
-
[1m./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[22m → [1mlib[22m...[39m
|
|
40
|
-
[32mcreated [1mlib[22m in [
|
|
41
|
-
Browserslist: browsers data (caniuse-lite) is
|
|
41
|
+
[1m./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/ProductCard/index.ts, ./src/components/ProductCardGrid/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[22m → [1mlib[22m...[39m
|
|
42
|
+
[32mcreated [1mlib[22m in [1m8s[22m[39m
|
|
43
|
+
Browserslist: browsers data (caniuse-lite) is 12 months old. Please run:
|
|
42
44
|
npx update-browserslist-db@latest
|
|
43
45
|
Why you should do it regularly: https://github.com/browserslist/update-db#readme
|
|
44
46
|
|
|
45
|
-
> @arc-ui/community-components@3.
|
|
47
|
+
> @arc-ui/community-components@3.14.0 build:clean /builds/enterprise/frontend/arc-community/packages/components
|
|
46
48
|
> rimraf ./lib/types ./lib/styles.js ./lib/index.js ./lib/index.js.map
|
|
47
49
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @arc-ui/community-components
|
|
2
2
|
|
|
3
|
+
## 3.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a9440d2: feat: added isImplied property to InlineLinkGroup
|
|
8
|
+
- 3287177: feat: Add new ProductCard and ProductCardGrid components with ProductCardPrice, ProductCardIncrease and ProductCardBenefits subcomponents
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- 06c7127: fix: update videocards to improve heading accessibility
|
|
13
|
+
|
|
14
|
+
## 3.13.1
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 8978dfe: Add support for URL prop
|
|
19
|
+
- 8978dfe: Add optional URL prop to ArticleSidebar
|
|
20
|
+
|
|
3
21
|
## 3.13.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
|
@@ -6,7 +6,7 @@ var index = require('../_shared/cjs/index-B7Z7sgRq.cjs');
|
|
|
6
6
|
var Carousel = require('@arc-ui/components/Carousel');
|
|
7
7
|
var SectionHeading = require('../_shared/cjs/SectionHeading-XCMdv8eZ.cjs');
|
|
8
8
|
var filterAttrs = require('../_shared/cjs/filter-attrs-BizjMsy0.cjs');
|
|
9
|
-
var index_es = require('../_shared/cjs/index.es-
|
|
9
|
+
var index_es = require('../_shared/cjs/index.es-5qmN4ppJ.cjs');
|
|
10
10
|
var MediaCard = require('@arc-ui/components/MediaCard');
|
|
11
11
|
var useMediaQuery = require('@arc-ui/components/use-media-query');
|
|
12
12
|
require('@arc-ui/components/Text');
|
|
@@ -4,7 +4,7 @@ import { a as commonjsGlobal, g as getDefaultExportFromCjs, c as classNames } fr
|
|
|
4
4
|
import { Carousel } from '@arc-ui/components/Carousel';
|
|
5
5
|
import { S as SectionHeading } from '../_shared/esm/SectionHeading-lyXLUtdr.mjs';
|
|
6
6
|
import { f as filterAttrs } from '../_shared/esm/filter-attrs-DZ7RCEZm.mjs';
|
|
7
|
-
import { d as ArcSizeBreakpointsXs, A as ArcSizeBreakpointsS, b as ArcSizeBreakpointsM, a as ArcSizeBreakpointsL, c as ArcSizeBreakpointsXl, e as ArcSizeBreakpointsXxl } from '../_shared/esm/index.es-
|
|
7
|
+
import { d as ArcSizeBreakpointsXs, A as ArcSizeBreakpointsS, b as ArcSizeBreakpointsM, a as ArcSizeBreakpointsL, c as ArcSizeBreakpointsXl, e as ArcSizeBreakpointsXxl } from '../_shared/esm/index.es-Cis5MKaa.mjs';
|
|
8
8
|
import { MediaCard } from '@arc-ui/components/MediaCard';
|
|
9
9
|
import { useMediaQuery } from '@arc-ui/components/use-media-query';
|
|
10
10
|
import '@arc-ui/components/Text';
|
|
@@ -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
|
|
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
|
|
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,
|
|
138
|
+
return (React.createElement(React.Fragment, { key: "".concat(id, "-").concat(url) },
|
|
133
139
|
React.createElement(VerticalSpace.VerticalSpace, { size: "8" }),
|
|
134
|
-
React.createElement("div",
|
|
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
|
-
|
|
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
|
|
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
|
|
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,
|
|
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",
|
|
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
|
-
|
|
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),
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var tslib_es6 = require('../_shared/cjs/tslib.es6-BxB9I209.cjs');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var filterAttrs = require('../_shared/cjs/filter-attrs-BizjMsy0.cjs');
|
|
6
|
-
var index_es = require('../_shared/cjs/index.es-
|
|
6
|
+
var index_es = require('../_shared/cjs/index.es-5qmN4ppJ.cjs');
|
|
7
7
|
var Columns = require('@arc-ui/components/Columns');
|
|
8
8
|
var useMediaQuery = require('@arc-ui/components/use-media-query');
|
|
9
9
|
var Heading = require('@arc-ui/components/Heading');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign } from '../_shared/esm/tslib.es6-BVXMhEem.mjs';
|
|
2
2
|
import React__default, { useState, useEffect, Suspense } from 'react';
|
|
3
3
|
import { f as filterAttrs } from '../_shared/esm/filter-attrs-DZ7RCEZm.mjs';
|
|
4
|
-
import { a as ArcSizeBreakpointsL, c as ArcSizeBreakpointsXl, b as ArcSizeBreakpointsM } from '../_shared/esm/index.es-
|
|
4
|
+
import { a as ArcSizeBreakpointsL, c as ArcSizeBreakpointsXl, b as ArcSizeBreakpointsM } from '../_shared/esm/index.es-Cis5MKaa.mjs';
|
|
5
5
|
import { Columns, ColumnsCol } from '@arc-ui/components/Columns';
|
|
6
6
|
import { useMediaQuery } from '@arc-ui/components/use-media-query';
|
|
7
7
|
import { Heading } from '@arc-ui/components/Heading';
|
|
@@ -4,7 +4,7 @@ var tslib_es6 = require('../_shared/cjs/tslib.es6-BxB9I209.cjs');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var index = require('../_shared/cjs/index-B7Z7sgRq.cjs');
|
|
6
6
|
var filterAttrs = require('../_shared/cjs/filter-attrs-BizjMsy0.cjs');
|
|
7
|
-
var index_es = require('../_shared/cjs/index.es-
|
|
7
|
+
var index_es = require('../_shared/cjs/index.es-5qmN4ppJ.cjs');
|
|
8
8
|
var AppButton = require('@arc-ui/components/AppButton');
|
|
9
9
|
var Grid = require('@arc-ui/components/Grid');
|
|
10
10
|
var ButtonV2 = require('@arc-ui/components/ButtonV2');
|
|
@@ -2,7 +2,7 @@ import { _ as __rest, a as __assign } from '../_shared/esm/tslib.es6-BVXMhEem.mj
|
|
|
2
2
|
import React__default, { useState, useEffect, Suspense } from 'react';
|
|
3
3
|
import { c as classNames } from '../_shared/esm/index-BSO2EFem.mjs';
|
|
4
4
|
import { f as filterAttrs } from '../_shared/esm/filter-attrs-DZ7RCEZm.mjs';
|
|
5
|
-
import { b as ArcSizeBreakpointsM } from '../_shared/esm/index.es-
|
|
5
|
+
import { b as ArcSizeBreakpointsM } from '../_shared/esm/index.es-Cis5MKaa.mjs';
|
|
6
6
|
import { AppButton } from '@arc-ui/components/AppButton';
|
|
7
7
|
import { Grid, GridRow, GridCol } from '@arc-ui/components/Grid';
|
|
8
8
|
import { ButtonV2 } from '@arc-ui/components/ButtonV2';
|
|
@@ -11,13 +11,13 @@ var filterAttrs = require('../_shared/cjs/filter-attrs-BizjMsy0.cjs');
|
|
|
11
11
|
var styles = {"quick-help":"InlineLinkGroup-module_quick-help__cMTpB","quick-help-label":"InlineLinkGroup-module_quick-help-label__VLKen","quick-help-container":"InlineLinkGroup-module_quick-help-container__IStTk","quick-help-item":"InlineLinkGroup-module_quick-help-item__QTIMl","quick-help-separator":"InlineLinkGroup-module_quick-help-separator__qJE0q","quick-help-separator-line":"InlineLinkGroup-module_quick-help-separator-line__VbCVI"};
|
|
12
12
|
|
|
13
13
|
var InlineLinkGroup = function (_a) {
|
|
14
|
-
var label = _a.label, _b = _a.headingLevel, headingLevel = _b === void 0 ? "2" : _b, links = _a.links, props = tslib_es6.__rest(_a, ["label", "headingLevel", "links"]);
|
|
14
|
+
var label = _a.label, _b = _a.headingLevel, headingLevel = _b === void 0 ? "2" : _b, links = _a.links, _c = _a.isImplied, isImplied = _c === void 0 ? false : _c, props = tslib_es6.__rest(_a, ["label", "headingLevel", "links", "isImplied"]);
|
|
15
15
|
return (React.createElement("div", tslib_es6.__assign({ className: styles["quick-help"] }, filterAttrs.filterAttrs(props)),
|
|
16
16
|
label && (React.createElement("div", { className: styles["quick-help-label"] },
|
|
17
17
|
React.createElement(Heading.Heading, { level: headingLevel, size: "xxs", fontStyle: "overline" }, label))),
|
|
18
18
|
React.createElement("ul", { className: styles["quick-help-container"] }, links.map(function (link, index) { return (React.createElement(React.Fragment, { key: index },
|
|
19
19
|
React.createElement("li", { className: styles["quick-help-item"] },
|
|
20
|
-
React.createElement(Link.Link, { href: link.href, onClick: link.onClick, "aria-label": link.ariaLabel }, link.label),
|
|
20
|
+
React.createElement(Link.Link, { href: link.href, onClick: link.onClick, "aria-label": link.ariaLabel, isImplied: isImplied }, link.label),
|
|
21
21
|
React.createElement(Icon.Icon, { icon: BtIconArrowAltRight.BtIconArrowAltRight, size: 24, color: "brand" })),
|
|
22
22
|
index < links.length - 1 && (React.createElement("li", { className: styles["quick-help-separator"], "aria-hidden": "true" },
|
|
23
23
|
React.createElement("div", { className: styles["quick-help-separator-line"] }))))); }))));
|
|
@@ -9,13 +9,13 @@ import { f as filterAttrs } from '../_shared/esm/filter-attrs-DZ7RCEZm.mjs';
|
|
|
9
9
|
var styles = {"quick-help":"InlineLinkGroup-module_quick-help__cMTpB","quick-help-label":"InlineLinkGroup-module_quick-help-label__VLKen","quick-help-container":"InlineLinkGroup-module_quick-help-container__IStTk","quick-help-item":"InlineLinkGroup-module_quick-help-item__QTIMl","quick-help-separator":"InlineLinkGroup-module_quick-help-separator__qJE0q","quick-help-separator-line":"InlineLinkGroup-module_quick-help-separator-line__VbCVI"};
|
|
10
10
|
|
|
11
11
|
var InlineLinkGroup = function (_a) {
|
|
12
|
-
var label = _a.label, _b = _a.headingLevel, headingLevel = _b === void 0 ? "2" : _b, links = _a.links, props = __rest(_a, ["label", "headingLevel", "links"]);
|
|
12
|
+
var label = _a.label, _b = _a.headingLevel, headingLevel = _b === void 0 ? "2" : _b, links = _a.links, _c = _a.isImplied, isImplied = _c === void 0 ? false : _c, props = __rest(_a, ["label", "headingLevel", "links", "isImplied"]);
|
|
13
13
|
return (React__default.createElement("div", __assign({ className: styles["quick-help"] }, filterAttrs(props)),
|
|
14
14
|
label && (React__default.createElement("div", { className: styles["quick-help-label"] },
|
|
15
15
|
React__default.createElement(Heading, { level: headingLevel, size: "xxs", fontStyle: "overline" }, label))),
|
|
16
16
|
React__default.createElement("ul", { className: styles["quick-help-container"] }, links.map(function (link, index) { return (React__default.createElement(React__default.Fragment, { key: index },
|
|
17
17
|
React__default.createElement("li", { className: styles["quick-help-item"] },
|
|
18
|
-
React__default.createElement(Link, { href: link.href, onClick: link.onClick, "aria-label": link.ariaLabel }, link.label),
|
|
18
|
+
React__default.createElement(Link, { href: link.href, onClick: link.onClick, "aria-label": link.ariaLabel, isImplied: isImplied }, link.label),
|
|
19
19
|
React__default.createElement(Icon, { icon: BtIconArrowAltRight, size: 24, color: "brand" })),
|
|
20
20
|
index < links.length - 1 && (React__default.createElement("li", { className: styles["quick-help-separator"], "aria-hidden": "true" },
|
|
21
21
|
React__default.createElement("div", { className: styles["quick-help-separator-line"] }))))); }))));
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tslib_es6 = require('../_shared/cjs/tslib.es6-BxB9I209.cjs');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var filterAttrs = require('../_shared/cjs/filter-attrs-BizjMsy0.cjs');
|
|
6
|
+
var Heading = require('@arc-ui/components/Heading');
|
|
7
|
+
var Text = require('@arc-ui/components/Text');
|
|
8
|
+
var ButtonV2 = require('@arc-ui/components/ButtonV2');
|
|
9
|
+
var Surface = require('@arc-ui/components/Surface');
|
|
10
|
+
var VerticalSpace = require('@arc-ui/components/VerticalSpace');
|
|
11
|
+
var Rule = require('@arc-ui/components/Rule');
|
|
12
|
+
var VisuallyHidden = require('@arc-ui/components/VisuallyHidden');
|
|
13
|
+
var Icon = require('@arc-ui/components/Icon');
|
|
14
|
+
|
|
15
|
+
var styles$3 = {"productCard":"ProductCard-module_productCard__4-BqH","productCardPromoted":"ProductCard-module_productCardPromoted__7cxo-","productCardTopSection":"ProductCard-module_productCardTopSection__8ukd-","divider":"ProductCard-module_divider__rF6XX","productCardBottom":"ProductCard-module_productCardBottom__XvXan","ctaWrapper":"ProductCard-module_ctaWrapper__bJfHv"};
|
|
16
|
+
|
|
17
|
+
var ProductCard = function (_a) {
|
|
18
|
+
var heading = _a.heading, headingLevel = _a.headingLevel, topSlot = _a.topSlot, _b = _a.divider, divider = _b === void 0 ? true : _b, bottomSlot = _a.bottomSlot, promoted = _a.promoted, button = _a.button, props = tslib_es6.__rest(_a, ["heading", "headingLevel", "topSlot", "divider", "bottomSlot", "promoted", "button"]);
|
|
19
|
+
var headingId = React.useId();
|
|
20
|
+
return (React.createElement("div", tslib_es6.__assign({ className: styles$3.productCard }, filterAttrs.filterAttrs(props), { role: "group", "aria-labelledby": headingId }),
|
|
21
|
+
React.createElement("div", { className: styles$3.productCardTop },
|
|
22
|
+
promoted && (React.createElement("div", { className: styles$3.productCardPromoted },
|
|
23
|
+
React.createElement(Surface.Surface, { background: promoted.background, paddingVertical: "16", paddingHorizontal: "24" },
|
|
24
|
+
React.createElement(VisuallyHidden.VisuallyHidden, null, "Promotional offer. "),
|
|
25
|
+
React.createElement(Text.Text, { size: "s" }, promoted.content)))),
|
|
26
|
+
React.createElement("div", { className: styles$3.productCardTopSection },
|
|
27
|
+
React.createElement(Heading.Heading, { id: headingId, size: "m", level: headingLevel, color: "brand" }, heading),
|
|
28
|
+
React.createElement(VerticalSpace.VerticalSpace, { size: "16" }),
|
|
29
|
+
topSlot)),
|
|
30
|
+
React.createElement("div", { className: styles$3.productCardBottom },
|
|
31
|
+
divider ? (React.createElement("div", { className: styles$3.divider },
|
|
32
|
+
React.createElement(Rule.Rule, null))) : (React.createElement(VerticalSpace.VerticalSpace, { size: "16" })),
|
|
33
|
+
bottomSlot,
|
|
34
|
+
React.createElement(VerticalSpace.VerticalSpace, { size: "24" }),
|
|
35
|
+
React.createElement("div", { className: styles$3.ctaWrapper },
|
|
36
|
+
React.createElement(ButtonV2.ButtonV2, tslib_es6.__assign({ label: "Explore ".concat(heading), buttonStyle: "secondary", isFullWidth: true }, button))))));
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
var styles$2 = {"benefitList":"ProductCardBenefits-module_benefitList__Qb1io","benefitItem":"ProductCardBenefits-module_benefitItem__nJqa6"};
|
|
40
|
+
|
|
41
|
+
var ProductCardBenefits = function (_a) {
|
|
42
|
+
var _b = _a.heading, heading = _b === void 0 ? "Includes:" : _b, _c = _a.headingLevel, headingLevel = _c === void 0 ? "4" : _c, benefits = _a.benefits;
|
|
43
|
+
return (React.createElement(React.Fragment, null,
|
|
44
|
+
React.createElement(Heading.Heading, { size: "xs", level: headingLevel }, heading),
|
|
45
|
+
React.createElement(VerticalSpace.VerticalSpace, { size: "12" }),
|
|
46
|
+
React.createElement("ul", { className: styles$2.benefitList }, benefits.map(function (benefit, index) { return (React.createElement("li", { key: index, className: styles$2.benefitItem },
|
|
47
|
+
React.createElement(Icon.Icon, { icon: benefit.icon, color: "brand", size: 24 }),
|
|
48
|
+
benefit.benefit)); }))));
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
var styles$1 = {"priceIncreaseWrapper":"ProductCardPriceIncrease-module_priceIncreaseWrapper__Psknf","priceIncreaseBorder":"ProductCardPriceIncrease-module_priceIncreaseBorder__NC2eA","priceIncreaseList":"ProductCardPriceIncrease-module_priceIncreaseList__qsmOQ","priceIncreaseItem":"ProductCardPriceIncrease-module_priceIncreaseItem__f-x-D"};
|
|
52
|
+
|
|
53
|
+
var ProductCardPriceIncrease = function (_a) {
|
|
54
|
+
var _b = _a.heading, heading = _b === void 0 ? "Price increasing to" : _b, _c = _a.headingLevel, headingLevel = _c === void 0 ? "4" : _c, _d = _a.items, items = _d === void 0 ? [] : _d;
|
|
55
|
+
return (React.createElement(React.Fragment, null,
|
|
56
|
+
React.createElement(VerticalSpace.VerticalSpace, { size: "16" }),
|
|
57
|
+
React.createElement(Heading.Heading, { size: "xs", level: headingLevel }, heading),
|
|
58
|
+
React.createElement(VerticalSpace.VerticalSpace, { size: "12" }),
|
|
59
|
+
React.createElement("div", { className: styles$1.priceIncreaseWrapper },
|
|
60
|
+
React.createElement("div", { className: styles$1.priceIncreaseBorder }),
|
|
61
|
+
React.createElement("ul", { className: styles$1.priceIncreaseList }, items.map(function (item, index) { return (React.createElement("li", { key: index, className: styles$1.priceIncreaseItem }, item)); })))));
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
var styles = {"productCardPrice":"ProductCardPrice-module_productCardPrice__6k4kU"};
|
|
65
|
+
|
|
66
|
+
var ProductCardPrice = function (_a) {
|
|
67
|
+
var prefix = _a.prefix, value = _a.value, suffix = _a.suffix;
|
|
68
|
+
return (React.createElement("div", { className: styles.productCardPrice },
|
|
69
|
+
prefix && (React.createElement(Text.Text, { tone: "muted", size: "s" }, prefix)),
|
|
70
|
+
React.createElement(Heading.Heading, { color: "brand", size: "m" }, value),
|
|
71
|
+
suffix && (React.createElement(Text.Text, { tone: "muted", size: "s" }, suffix))));
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
exports.ProductCard = ProductCard;
|
|
75
|
+
exports.ProductCardBenefits = ProductCardBenefits;
|
|
76
|
+
exports.ProductCardPrice = ProductCardPrice;
|
|
77
|
+
exports.ProductCardPriceIncrease = ProductCardPriceIncrease;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { _ as __rest, a as __assign } from '../_shared/esm/tslib.es6-BVXMhEem.mjs';
|
|
2
|
+
import React__default, { useId } from 'react';
|
|
3
|
+
import { f as filterAttrs } from '../_shared/esm/filter-attrs-DZ7RCEZm.mjs';
|
|
4
|
+
import { Heading } from '@arc-ui/components/Heading';
|
|
5
|
+
import { Text } from '@arc-ui/components/Text';
|
|
6
|
+
import { ButtonV2 } from '@arc-ui/components/ButtonV2';
|
|
7
|
+
import { Surface } from '@arc-ui/components/Surface';
|
|
8
|
+
import { VerticalSpace } from '@arc-ui/components/VerticalSpace';
|
|
9
|
+
import { Rule } from '@arc-ui/components/Rule';
|
|
10
|
+
import { VisuallyHidden } from '@arc-ui/components/VisuallyHidden';
|
|
11
|
+
import { Icon } from '@arc-ui/components/Icon';
|
|
12
|
+
|
|
13
|
+
var styles$3 = {"productCard":"ProductCard-module_productCard__4-BqH","productCardPromoted":"ProductCard-module_productCardPromoted__7cxo-","productCardTopSection":"ProductCard-module_productCardTopSection__8ukd-","divider":"ProductCard-module_divider__rF6XX","productCardBottom":"ProductCard-module_productCardBottom__XvXan","ctaWrapper":"ProductCard-module_ctaWrapper__bJfHv"};
|
|
14
|
+
|
|
15
|
+
var ProductCard = function (_a) {
|
|
16
|
+
var heading = _a.heading, headingLevel = _a.headingLevel, topSlot = _a.topSlot, _b = _a.divider, divider = _b === void 0 ? true : _b, bottomSlot = _a.bottomSlot, promoted = _a.promoted, button = _a.button, props = __rest(_a, ["heading", "headingLevel", "topSlot", "divider", "bottomSlot", "promoted", "button"]);
|
|
17
|
+
var headingId = useId();
|
|
18
|
+
return (React__default.createElement("div", __assign({ className: styles$3.productCard }, filterAttrs(props), { role: "group", "aria-labelledby": headingId }),
|
|
19
|
+
React__default.createElement("div", { className: styles$3.productCardTop },
|
|
20
|
+
promoted && (React__default.createElement("div", { className: styles$3.productCardPromoted },
|
|
21
|
+
React__default.createElement(Surface, { background: promoted.background, paddingVertical: "16", paddingHorizontal: "24" },
|
|
22
|
+
React__default.createElement(VisuallyHidden, null, "Promotional offer. "),
|
|
23
|
+
React__default.createElement(Text, { size: "s" }, promoted.content)))),
|
|
24
|
+
React__default.createElement("div", { className: styles$3.productCardTopSection },
|
|
25
|
+
React__default.createElement(Heading, { id: headingId, size: "m", level: headingLevel, color: "brand" }, heading),
|
|
26
|
+
React__default.createElement(VerticalSpace, { size: "16" }),
|
|
27
|
+
topSlot)),
|
|
28
|
+
React__default.createElement("div", { className: styles$3.productCardBottom },
|
|
29
|
+
divider ? (React__default.createElement("div", { className: styles$3.divider },
|
|
30
|
+
React__default.createElement(Rule, null))) : (React__default.createElement(VerticalSpace, { size: "16" })),
|
|
31
|
+
bottomSlot,
|
|
32
|
+
React__default.createElement(VerticalSpace, { size: "24" }),
|
|
33
|
+
React__default.createElement("div", { className: styles$3.ctaWrapper },
|
|
34
|
+
React__default.createElement(ButtonV2, __assign({ label: "Explore ".concat(heading), buttonStyle: "secondary", isFullWidth: true }, button))))));
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var styles$2 = {"benefitList":"ProductCardBenefits-module_benefitList__Qb1io","benefitItem":"ProductCardBenefits-module_benefitItem__nJqa6"};
|
|
38
|
+
|
|
39
|
+
var ProductCardBenefits = function (_a) {
|
|
40
|
+
var _b = _a.heading, heading = _b === void 0 ? "Includes:" : _b, _c = _a.headingLevel, headingLevel = _c === void 0 ? "4" : _c, benefits = _a.benefits;
|
|
41
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
42
|
+
React__default.createElement(Heading, { size: "xs", level: headingLevel }, heading),
|
|
43
|
+
React__default.createElement(VerticalSpace, { size: "12" }),
|
|
44
|
+
React__default.createElement("ul", { className: styles$2.benefitList }, benefits.map(function (benefit, index) { return (React__default.createElement("li", { key: index, className: styles$2.benefitItem },
|
|
45
|
+
React__default.createElement(Icon, { icon: benefit.icon, color: "brand", size: 24 }),
|
|
46
|
+
benefit.benefit)); }))));
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
var styles$1 = {"priceIncreaseWrapper":"ProductCardPriceIncrease-module_priceIncreaseWrapper__Psknf","priceIncreaseBorder":"ProductCardPriceIncrease-module_priceIncreaseBorder__NC2eA","priceIncreaseList":"ProductCardPriceIncrease-module_priceIncreaseList__qsmOQ","priceIncreaseItem":"ProductCardPriceIncrease-module_priceIncreaseItem__f-x-D"};
|
|
50
|
+
|
|
51
|
+
var ProductCardPriceIncrease = function (_a) {
|
|
52
|
+
var _b = _a.heading, heading = _b === void 0 ? "Price increasing to" : _b, _c = _a.headingLevel, headingLevel = _c === void 0 ? "4" : _c, _d = _a.items, items = _d === void 0 ? [] : _d;
|
|
53
|
+
return (React__default.createElement(React__default.Fragment, null,
|
|
54
|
+
React__default.createElement(VerticalSpace, { size: "16" }),
|
|
55
|
+
React__default.createElement(Heading, { size: "xs", level: headingLevel }, heading),
|
|
56
|
+
React__default.createElement(VerticalSpace, { size: "12" }),
|
|
57
|
+
React__default.createElement("div", { className: styles$1.priceIncreaseWrapper },
|
|
58
|
+
React__default.createElement("div", { className: styles$1.priceIncreaseBorder }),
|
|
59
|
+
React__default.createElement("ul", { className: styles$1.priceIncreaseList }, items.map(function (item, index) { return (React__default.createElement("li", { key: index, className: styles$1.priceIncreaseItem }, item)); })))));
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
var styles = {"productCardPrice":"ProductCardPrice-module_productCardPrice__6k4kU"};
|
|
63
|
+
|
|
64
|
+
var ProductCardPrice = function (_a) {
|
|
65
|
+
var prefix = _a.prefix, value = _a.value, suffix = _a.suffix;
|
|
66
|
+
return (React__default.createElement("div", { className: styles.productCardPrice },
|
|
67
|
+
prefix && (React__default.createElement(Text, { tone: "muted", size: "s" }, prefix)),
|
|
68
|
+
React__default.createElement(Heading, { color: "brand", size: "m" }, value),
|
|
69
|
+
suffix && (React__default.createElement(Text, { tone: "muted", size: "s" }, suffix))));
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export { ProductCard, ProductCardBenefits, ProductCardPrice, ProductCardPriceIncrease };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ProductCard-module_productCard__4-BqH{max-width:603px;border-radius:var(--card-border-radius-s);box-shadow:0 0 0 1px var(--card-colors-light-border-default);display:grid;grid-template-rows:subgrid;grid-row:span 2;height:100%}.ProductCard-module_productCardPromoted__7cxo-{overflow:hidden;text-align:center;border-radius:var(--card-border-radius-s) var(--card-border-radius-s) 0 0}.ProductCard-module_productCardTopSection__8ukd-{padding:24px;padding-bottom:0}.ProductCard-module_divider__rF6XX{padding:24px 0;align-items:center}.ProductCard-module_productCardBottom__XvXan{display:flex;flex-direction:column;padding:0 24px 24px}.ProductCard-module_ctaWrapper__bJfHv{display:flex;flex-direction:column-reverse;height:auto;flex-grow:1}@media (--arc-custom-media-min-width-xl-px){.ProductCard-module_productCardTopSection__8ukd-{padding:32px 32px 0}.ProductCard-module_productCardBottom__XvXan{padding:0 32px 32px}}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var tslib_es6 = require('../_shared/cjs/tslib.es6-BxB9I209.cjs');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var filterAttrs = require('../_shared/cjs/filter-attrs-BizjMsy0.cjs');
|
|
6
|
+
var SectionHeading = require('../_shared/cjs/SectionHeading-XCMdv8eZ.cjs');
|
|
7
|
+
var Tabs = require('@arc-ui/components/Tabs');
|
|
8
|
+
var VerticalSpace = require('@arc-ui/components/VerticalSpace');
|
|
9
|
+
var ButtonV2 = require('@arc-ui/components/ButtonV2');
|
|
10
|
+
var Rule = require('@arc-ui/components/Rule');
|
|
11
|
+
var Align = require('@arc-ui/components/Align');
|
|
12
|
+
require('../_shared/cjs/index-B7Z7sgRq.cjs');
|
|
13
|
+
require('@arc-ui/components/Text');
|
|
14
|
+
require('@arc-ui/components/Image');
|
|
15
|
+
require('@arc-ui/components/Heading');
|
|
16
|
+
require('@arc-ui/components/Columns');
|
|
17
|
+
|
|
18
|
+
var styles = {"cardGrid":"CardGrid-module_cardGrid__b6S6h","cardGridItem":"CardGrid-module_cardGridItem__xy0D3"};
|
|
19
|
+
|
|
20
|
+
var CardGrid = function (_a) {
|
|
21
|
+
var cards = _a.cards, cardsRevealed = _a.cardsRevealed, fourthCardRef = _a.fourthCardRef, props = tslib_es6.__rest(_a, ["cards", "cardsRevealed", "fourthCardRef"]);
|
|
22
|
+
return (React.createElement(React.Fragment, null,
|
|
23
|
+
React.createElement("ul", tslib_es6.__assign({ className: styles.cardGrid }, filterAttrs.filterAttrs(props)), (cardsRevealed ? cards : cards.slice(0, 3)).map(function (card, index) { return (React.createElement("li", { key: "card-".concat(index), className: styles.cardGridItem, ref: index === 3 ? fourthCardRef : undefined, tabIndex: -1 }, card)); })),
|
|
24
|
+
React.createElement(VerticalSpace.VerticalSpace, { size: "24", sizeXL: "32" })));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var ProductCardGrid = function (_a) {
|
|
28
|
+
var _b, _c, _d, _e, _f;
|
|
29
|
+
var id = _a.id, isHeadingWordWrap = _a.isHeadingWordWrap, heading = _a.heading, content = _a.content, headingLevel = _a.headingLevel, tabs = _a.tabs, _g = _a.expanded, expanded = _g === void 0 ? true : _g, _h = _a.hideTabs, hideTabs = _h === void 0 ? false : _h, props = tslib_es6.__rest(_a, ["id", "isHeadingWordWrap", "heading", "content", "headingLevel", "tabs", "expanded", "hideTabs"]);
|
|
30
|
+
var _j = React.useState(expanded), cardsRevealed = _j[0], setCardsRevealed = _j[1];
|
|
31
|
+
var _k = React.useState((_b = tabs === null || tabs === void 0 ? void 0 : tabs[0]) === null || _b === void 0 ? void 0 : _b.value), activeTab = _k[0], setActiveTab = _k[1];
|
|
32
|
+
var fourthCardRef = React.useRef(null);
|
|
33
|
+
var cardContext = React.useId();
|
|
34
|
+
var activeCards = (_c = tabs === null || tabs === void 0 ? void 0 : tabs.find(function (tab) { return tab.value === activeTab; })) === null || _c === void 0 ? void 0 : _c.cards;
|
|
35
|
+
var hasMoreCards = ((_d = activeCards === null || activeCards === void 0 ? void 0 : activeCards.length) !== null && _d !== void 0 ? _d : 0) > 3;
|
|
36
|
+
var remainingCards = Math.max(((_e = activeCards === null || activeCards === void 0 ? void 0 : activeCards.length) !== null && _e !== void 0 ? _e : 0) - 3, 0);
|
|
37
|
+
var showMore = function () {
|
|
38
|
+
setCardsRevealed(true);
|
|
39
|
+
setTimeout(function () {
|
|
40
|
+
var _a;
|
|
41
|
+
(_a = fourthCardRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
42
|
+
}, 0);
|
|
43
|
+
};
|
|
44
|
+
var showLess = function () {
|
|
45
|
+
setCardsRevealed(false);
|
|
46
|
+
};
|
|
47
|
+
return (React.createElement("div", tslib_es6.__assign({}, filterAttrs.filterAttrs(props)),
|
|
48
|
+
React.createElement(SectionHeading.SectionHeading, { id: id, isHeadingWordWrap: isHeadingWordWrap, heading: heading, content: content, headingLevel: headingLevel, isPadded: true }),
|
|
49
|
+
tabs && !hideTabs && (React.createElement(Tabs.Tabs, { defaultValue: (_f = tabs[0]) === null || _f === void 0 ? void 0 : _f.value, onValueChange: function (value) {
|
|
50
|
+
setActiveTab(value);
|
|
51
|
+
} },
|
|
52
|
+
React.createElement(Tabs.TabsList, { type: "standard" }, tabs.map(function (tab) { return (React.createElement(Tabs.TabsItem, { key: tab.value, label: tab.label, value: tab.value, icon: tab.icon, iconActive: tab.iconActive })); })),
|
|
53
|
+
tabs.map(function (tab) { return (React.createElement(Tabs.TabsContent, { key: tab.value, value: tab.value },
|
|
54
|
+
React.createElement(VerticalSpace.VerticalSpace, { size: "24", sizeL: "32" }),
|
|
55
|
+
React.createElement(CardGrid, { cards: tab.cards, cardsRevealed: cardsRevealed, fourthCardRef: tab.value === activeTab ? fourthCardRef : { current: null } }))); }))),
|
|
56
|
+
(tabs === null || tabs === void 0 ? void 0 : tabs.length) === 1 && hideTabs && (React.createElement(React.Fragment, null,
|
|
57
|
+
React.createElement(CardGrid, { cards: tabs[0].cards, cardsRevealed: cardsRevealed, fourthCardRef: fourthCardRef }))),
|
|
58
|
+
!expanded && hasMoreCards && (React.createElement(React.Fragment, null,
|
|
59
|
+
React.createElement(Rule.Rule, null),
|
|
60
|
+
React.createElement("span", { id: cardContext, style: { display: "none" } }, remainingCards === 1
|
|
61
|
+
? "".concat(remainingCards, " card")
|
|
62
|
+
: "".concat(remainingCards, " cards")),
|
|
63
|
+
React.createElement(Align.Align, { horizontal: "center" },
|
|
64
|
+
React.createElement(VerticalSpace.VerticalSpace, { size: "16" }),
|
|
65
|
+
!cardsRevealed && (React.createElement(ButtonV2.ButtonV2, { label: "Show more", buttonStyle: "secondary", onClick: showMore, "aria-describedby": cardContext })),
|
|
66
|
+
cardsRevealed && (React.createElement(ButtonV2.ButtonV2, { label: "Show less", buttonStyle: "secondary", onClick: showLess, "aria-describedby": cardContext })))))));
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
exports.ProductCardGrid = ProductCardGrid;
|