@arc-ui/community-components 3.13.1 → 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 +17 -15
- package/CHANGELOG.md +11 -0
- package/lib/ArticleCarousel/ArticleCarousel.cjs +1 -1
- package/lib/ArticleCarousel/ArticleCarousel.mjs +1 -1
- 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 +294 -171
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +70 -2
- package/lib/index.d.mts +70 -2
- package/lib/index.mjs +291 -173
- package/lib/index.mjs.map +1 -1
- package/lib/styles.css +1 -1
- package/package.json +13 -13
- 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
|
@@ -2,7 +2,7 @@ import { _ as __rest, a as __assign } from '../_shared/esm/tslib.es6-BVXMhEem.mj
|
|
|
2
2
|
import React__default, { useId } from 'react';
|
|
3
3
|
import { Visible } from '@arc-ui/components/Visible';
|
|
4
4
|
import { Spacing } from '@arc-ui/components/Spacing';
|
|
5
|
-
import { V as VideoCardPlayer, a as VideoCardThumbnail } from '../_shared/esm/VideoCardThumbnail-
|
|
5
|
+
import { V as VideoCardPlayer, a as VideoCardThumbnail } from '../_shared/esm/VideoCardThumbnail-B8JS-s6O.mjs';
|
|
6
6
|
import { Heading } from '@arc-ui/components/Heading';
|
|
7
7
|
import { Icon } from '@arc-ui/components/Icon';
|
|
8
8
|
import { Text } from '@arc-ui/components/Text';
|
|
@@ -37,7 +37,7 @@ const BtIconClock =
|
|
|
37
37
|
var styles = {"mainText--lightBackground":"VideoHeroCardContent-module_mainText--lightBackground__nGl6W","statContainer--lightBackground":"VideoHeroCardContent-module_statContainer--lightBackground__7hXAf","statContainer--darkBackground":"VideoHeroCardContent-module_statContainer--darkBackground__X3-r2","mainText--darkBackground":"VideoHeroCardContent-module_mainText--darkBackground__Pfizt","statContainer":"VideoHeroCardContent-module_statContainer__q21g9","stat":"VideoHeroCardContent-module_stat__iIcoq"};
|
|
38
38
|
|
|
39
39
|
var VideoHeroCardContent = function (_a) {
|
|
40
|
-
var title = _a.title, label = _a.label, description = _a.description, videoDate = _a.videoDate, duration = _a.duration, background = _a.background, subtitleAvailabilityText = _a.subtitleAvailabilityText;
|
|
40
|
+
var title = _a.title, label = _a.label, _b = _a.titleLevel, titleLevel = _b === void 0 ? "3" : _b, labelLevel = _a.labelLevel, description = _a.description, videoDate = _a.videoDate, duration = _a.duration, background = _a.background, subtitleAvailabilityText = _a.subtitleAvailabilityText;
|
|
41
41
|
var id = useId();
|
|
42
42
|
var metaItems = [
|
|
43
43
|
{ icon: BtIconCalendar, text: videoDate },
|
|
@@ -50,9 +50,9 @@ var VideoHeroCardContent = function (_a) {
|
|
|
50
50
|
var hasMeta = metaItems.some(function (meta) { return Boolean(meta.text); });
|
|
51
51
|
return (React__default.createElement("div", { className: styles["".concat(background, "Background")] },
|
|
52
52
|
React__default.createElement("div", { className: classNames(styles.mainText, styles["mainText--".concat(background, "Background")]) },
|
|
53
|
-
React__default.createElement(Heading, { fontStyle: "overline" }, label),
|
|
53
|
+
React__default.createElement(Heading, { level: labelLevel, fontStyle: "overline" }, label),
|
|
54
54
|
React__default.createElement(VerticalSpace, { size: "8", sizeM: "4" }),
|
|
55
|
-
React__default.createElement(Heading, { level:
|
|
55
|
+
React__default.createElement(Heading, { level: titleLevel, isWordWrap: false, size: "xl" }, title),
|
|
56
56
|
React__default.createElement(VerticalSpace, { size: "16" }),
|
|
57
57
|
React__default.createElement(Text, null, description)),
|
|
58
58
|
hasMeta && (React__default.createElement(React__default.Fragment, null,
|
|
@@ -5,7 +5,7 @@ var React = require('react');
|
|
|
5
5
|
var Heading = require('@arc-ui/components/Heading');
|
|
6
6
|
var Surface = require('@arc-ui/components/Surface');
|
|
7
7
|
var VerticalSpace = require('@arc-ui/components/VerticalSpace');
|
|
8
|
-
var VideoCardThumbnail = require('../_shared/cjs/VideoCardThumbnail-
|
|
8
|
+
var VideoCardThumbnail = require('../_shared/cjs/VideoCardThumbnail-DhdbNf5c.cjs');
|
|
9
9
|
require('../_shared/cjs/index-B7Z7sgRq.cjs');
|
|
10
10
|
require('../_shared/cjs/filter-attrs-BizjMsy0.cjs');
|
|
11
11
|
require('@arc-ui/components/Icon');
|
|
@@ -15,9 +15,9 @@ var VideoPortraitCard = function (_a) {
|
|
|
15
15
|
var thumbnail = _a.thumbnail, player = _a.player, props = tslib_es6.__rest(_a, ["thumbnail", "player"]);
|
|
16
16
|
return (React.createElement(VideoCardThumbnail.VideoCardPlayer, tslib_es6.__assign({ thumbnail: thumbnail && (React.createElement(VideoCardThumbnail.VideoCardThumbnail, { orientation: "portrait", src: thumbnail.img },
|
|
17
17
|
React.createElement(Surface.Surface, { isTransparent: true, background: "dark-black" },
|
|
18
|
-
React.createElement(Heading.Heading, { fontStyle: "overline" }, thumbnail.label),
|
|
18
|
+
React.createElement(Heading.Heading, { fontStyle: "overline", level: thumbnail.labelLevel }, thumbnail.label),
|
|
19
19
|
React.createElement(VerticalSpace.VerticalSpace, { size: "8" }),
|
|
20
|
-
React.createElement(Heading.Heading, { level:
|
|
20
|
+
React.createElement(Heading.Heading, { level: thumbnail.titleLevel, isWordWrap: false, size: "xs" }, thumbnail.title)))), orientation: "portrait", player: player, playIconSize: "s" }, props)));
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
exports.VideoPortraitCard = VideoPortraitCard;
|
|
@@ -3,7 +3,7 @@ import React__default from 'react';
|
|
|
3
3
|
import { Heading } from '@arc-ui/components/Heading';
|
|
4
4
|
import { Surface } from '@arc-ui/components/Surface';
|
|
5
5
|
import { VerticalSpace } from '@arc-ui/components/VerticalSpace';
|
|
6
|
-
import { V as VideoCardPlayer, a as VideoCardThumbnail } from '../_shared/esm/VideoCardThumbnail-
|
|
6
|
+
import { V as VideoCardPlayer, a as VideoCardThumbnail } from '../_shared/esm/VideoCardThumbnail-B8JS-s6O.mjs';
|
|
7
7
|
import '../_shared/esm/index-BSO2EFem.mjs';
|
|
8
8
|
import '../_shared/esm/filter-attrs-DZ7RCEZm.mjs';
|
|
9
9
|
import '@arc-ui/components/Icon';
|
|
@@ -13,9 +13,9 @@ var VideoPortraitCard = function (_a) {
|
|
|
13
13
|
var thumbnail = _a.thumbnail, player = _a.player, props = __rest(_a, ["thumbnail", "player"]);
|
|
14
14
|
return (React__default.createElement(VideoCardPlayer, __assign({ thumbnail: thumbnail && (React__default.createElement(VideoCardThumbnail, { orientation: "portrait", src: thumbnail.img },
|
|
15
15
|
React__default.createElement(Surface, { isTransparent: true, background: "dark-black" },
|
|
16
|
-
React__default.createElement(Heading, { fontStyle: "overline" }, thumbnail.label),
|
|
16
|
+
React__default.createElement(Heading, { fontStyle: "overline", level: thumbnail.labelLevel }, thumbnail.label),
|
|
17
17
|
React__default.createElement(VerticalSpace, { size: "8" }),
|
|
18
|
-
React__default.createElement(Heading, { level:
|
|
18
|
+
React__default.createElement(Heading, { level: thumbnail.titleLevel, isWordWrap: false, size: "xs" }, thumbnail.title)))), orientation: "portrait", player: player, playIconSize: "s" }, props)));
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export { VideoPortraitCard };
|
|
@@ -421,12 +421,20 @@ var styles$1 = {"container":"VideoCardPlayer-module_container__G-Uta","player":"
|
|
|
421
421
|
var VideoCardPlayer = function (_a) {
|
|
422
422
|
var thumbnail = _a.thumbnail, playIconSize = _a.playIconSize, orientation = _a.orientation, children = _a.children, player = _a.player, props = tslib_es6.__rest(_a, ["thumbnail", "playIconSize", "orientation", "children", "player"]);
|
|
423
423
|
var _b = React.useState(false), isClient = _b[0], setIsClient = _b[1];
|
|
424
|
+
var playerWrapperRef = React.useRef(null);
|
|
424
425
|
React.useEffect(function () {
|
|
425
426
|
setIsClient(true);
|
|
426
427
|
}, []);
|
|
427
|
-
var
|
|
428
|
+
var handleClickPreview = React.useCallback(function () {
|
|
429
|
+
// Restore focus to the player wrapper after preview is clicked.
|
|
430
|
+
requestAnimationFrame(function () {
|
|
431
|
+
var _a;
|
|
432
|
+
(_a = playerWrapperRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
433
|
+
});
|
|
434
|
+
}, []);
|
|
435
|
+
var playerProps = tslib_es6.__assign(tslib_es6.__assign({}, player), { light: thumbnail, playIcon: React.createElement(VideoCardPlayIcon, { size: playIconSize }), muted: !thumbnail, playing: true, controls: true, className: styles$1.player, width: "100%", height: "100%", onClickPreview: handleClickPreview });
|
|
428
436
|
return (React.createElement("div", tslib_es6.__assign({ className: styles$1.container }, filterAttrs.filterAttrs(props)),
|
|
429
|
-
React.createElement("div", { "data-testid": "arc-video-card", className: index.classNames(styles$1.playerWrapper, styles$1["playerWrapper--".concat(orientation)]) }, isClient && React.createElement(src_default, tslib_es6.__assign({}, playerProps))),
|
|
437
|
+
React.createElement("div", { ref: playerWrapperRef, "data-testid": "arc-video-card", role: "button", tabIndex: -1, className: index.classNames(styles$1.playerWrapper, styles$1["playerWrapper--".concat(orientation)]) }, isClient && React.createElement(src_default, tslib_es6.__assign({}, playerProps))),
|
|
430
438
|
children));
|
|
431
439
|
};
|
|
432
440
|
|
|
@@ -419,12 +419,20 @@ var styles$1 = {"container":"VideoCardPlayer-module_container__G-Uta","player":"
|
|
|
419
419
|
var VideoCardPlayer = function (_a) {
|
|
420
420
|
var thumbnail = _a.thumbnail, playIconSize = _a.playIconSize, orientation = _a.orientation, children = _a.children, player = _a.player, props = __rest(_a, ["thumbnail", "playIconSize", "orientation", "children", "player"]);
|
|
421
421
|
var _b = useState(false), isClient = _b[0], setIsClient = _b[1];
|
|
422
|
+
var playerWrapperRef = useRef(null);
|
|
422
423
|
useEffect(function () {
|
|
423
424
|
setIsClient(true);
|
|
424
425
|
}, []);
|
|
425
|
-
var
|
|
426
|
+
var handleClickPreview = useCallback(function () {
|
|
427
|
+
// Restore focus to the player wrapper after preview is clicked.
|
|
428
|
+
requestAnimationFrame(function () {
|
|
429
|
+
var _a;
|
|
430
|
+
(_a = playerWrapperRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
431
|
+
});
|
|
432
|
+
}, []);
|
|
433
|
+
var playerProps = __assign(__assign({}, player), { light: thumbnail, playIcon: React__default.createElement(VideoCardPlayIcon, { size: playIconSize }), muted: !thumbnail, playing: true, controls: true, className: styles$1.player, width: "100%", height: "100%", onClickPreview: handleClickPreview });
|
|
426
434
|
return (React__default.createElement("div", __assign({ className: styles$1.container }, filterAttrs(props)),
|
|
427
|
-
React__default.createElement("div", { "data-testid": "arc-video-card", className: classNames(styles$1.playerWrapper, styles$1["playerWrapper--".concat(orientation)]) }, isClient && React__default.createElement(src_default, __assign({}, playerProps))),
|
|
435
|
+
React__default.createElement("div", { ref: playerWrapperRef, "data-testid": "arc-video-card", role: "button", tabIndex: -1, className: classNames(styles$1.playerWrapper, styles$1["playerWrapper--".concat(orientation)]) }, isClient && React__default.createElement(src_default, __assign({}, playerProps))),
|
|
428
436
|
children));
|
|
429
437
|
};
|
|
430
438
|
|