@arc-ui/community-components 3.3.0 → 3.4.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.
Files changed (104) hide show
  1. package/.turbo/turbo-build.log +132 -12
  2. package/CHANGELOG.md +12 -0
  3. package/lib/Accordion/Accordion.mjs +1 -1
  4. package/lib/ActionTile/ActionTile.mjs +9 -9
  5. package/lib/ArticleSidebar/ArticleSidebar.mjs +44 -44
  6. package/lib/Author/Author.mjs +1 -1
  7. package/lib/BannerWithTabs/BannerWithTabs.mjs +6 -6
  8. package/lib/ContentInfoWidget/ContentInfoWidget.mjs +6 -6
  9. package/lib/CopyLead/CopyLead.cjs +18 -8
  10. package/lib/CopyLead/CopyLead.mjs +59 -49
  11. package/lib/DownloadList/DownloadList.mjs +9 -9
  12. package/lib/FAQs/FAQs.mjs +21 -21
  13. package/lib/FeaturePost/FeaturePost.cjs +1 -1
  14. package/lib/FeaturePost/FeaturePost.mjs +53 -53
  15. package/lib/Highlights/Highlights.mjs +19 -19
  16. package/lib/InlineLinkGroup/InlineLinkGroup.mjs +10 -10
  17. package/lib/LinkTile/LinkTile.mjs +5 -5
  18. package/lib/ProductNavigation/ProductNavigation.cjs +1 -1
  19. package/lib/ProductNavigation/ProductNavigation.mjs +17 -17
  20. package/lib/PromoListing/PromoListing.cjs +1 -1
  21. package/lib/PromoListing/PromoListing.mjs +15 -15
  22. package/lib/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.cjs +2 -2
  23. package/lib/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.mjs +8 -8
  24. package/lib/Quote/Quote.mjs +8 -8
  25. package/lib/SectionHeading/SectionHeading.mjs +1 -1
  26. package/lib/Statistics/Statistics.mjs +31 -31
  27. package/lib/Summary/Summary.cjs +1 -1
  28. package/lib/Summary/Summary.mjs +11 -11
  29. package/lib/ThumbnailSignpost/ThumbnailSignpost.mjs +1 -1
  30. package/lib/VideoHeroCard/VideoHeroCard.cjs +76 -0
  31. package/lib/VideoHeroCard/VideoHeroCard.mjs +74 -0
  32. package/lib/VideoPortraitCard/VideoPortraitCard.cjs +22 -0
  33. package/lib/VideoPortraitCard/VideoPortraitCard.mjs +20 -0
  34. package/lib/_shared/cjs/Preview-Dx1kCzJ1.cjs +102 -0
  35. package/lib/_shared/cjs/VideoCardThumbnail-BqYgpk0u.cjs +440 -0
  36. package/lib/_shared/cjs/dash.all.min-BPXzla24.cjs +6 -0
  37. package/lib/_shared/cjs/hls-Ckhp5fVA.cjs +36628 -0
  38. package/lib/_shared/cjs/index-DjiIVIaV.cjs +96 -0
  39. package/lib/_shared/cjs/index-oGP6D6gL.cjs +14826 -0
  40. package/lib/_shared/cjs/{index.es-Dq8bYrbW.cjs → index.es-B0J3cvrY.cjs} +1 -1
  41. package/lib/_shared/cjs/mixin-BFwaXKGB.cjs +1027 -0
  42. package/lib/_shared/cjs/react-CEvhi3LL.cjs +737 -0
  43. package/lib/_shared/cjs/react-CqsEClV0.cjs +466 -0
  44. package/lib/_shared/cjs/react-DE6M3seI.cjs +496 -0
  45. package/lib/_shared/cjs/react-Dri2yjKm.cjs +554 -0
  46. package/lib/_shared/cjs/react-DxToimBj.cjs +4239 -0
  47. package/lib/_shared/cjs/react-JTfV8OSA.cjs +325 -0
  48. package/lib/_shared/cjs/react-caXJFZ8W.cjs +400 -0
  49. package/lib/_shared/cjs/react-fep2ei7j.cjs +727 -0
  50. package/lib/_shared/esm/{Accordion-DrOTh90S.mjs → Accordion-DtU7jbCv.mjs} +15 -15
  51. package/lib/_shared/esm/Author-CJQFrQM9.mjs +27 -0
  52. package/lib/_shared/esm/Preview-CmbKOgEO.mjs +100 -0
  53. package/lib/_shared/esm/{SectionHeading-DZOg_gYi.mjs → SectionHeading-BskdQ2Tt.mjs} +9 -9
  54. package/lib/_shared/esm/{ThumbnailSignpost-DaZByYIH.mjs → ThumbnailSignpost-CBSdQiHw.mjs} +12 -12
  55. package/lib/_shared/esm/VideoCardThumbnail-VfOKmPCv.mjs +437 -0
  56. package/lib/_shared/esm/dash.all.min-CbWI_8dN.mjs +4 -0
  57. package/lib/_shared/esm/hls-AFbJDS9D.mjs +36625 -0
  58. package/lib/_shared/esm/index-CrcIrdjn.mjs +14799 -0
  59. package/lib/_shared/esm/index-DYnuIO1L.mjs +94 -0
  60. package/lib/_shared/esm/{index.es-Bfdys5__.mjs → index.es-DraZ-qKh.mjs} +1 -1
  61. package/lib/_shared/esm/mixin-BGGG8VrM.mjs +1024 -0
  62. package/lib/_shared/esm/react-BGimq-TB.mjs +4237 -0
  63. package/lib/_shared/esm/react-BHT4t_eQ.mjs +494 -0
  64. package/lib/_shared/esm/react-BSd0sGcO.mjs +464 -0
  65. package/lib/_shared/esm/react-CSr43fZV.mjs +552 -0
  66. package/lib/_shared/esm/react-Ca6E7Fr-.mjs +398 -0
  67. package/lib/_shared/esm/react-DG070IvZ.mjs +725 -0
  68. package/lib/_shared/esm/react-DZyqy7W7.mjs +735 -0
  69. package/lib/_shared/esm/react-WW_9iHcl.mjs +323 -0
  70. package/lib/index.cjs +249 -123
  71. package/lib/index.cjs.map +1 -1
  72. package/lib/index.d.cts +55 -2
  73. package/lib/index.d.mts +55 -2
  74. package/lib/index.mjs +248 -124
  75. package/lib/index.mjs.map +1 -1
  76. package/lib/styles.css +1 -1
  77. package/package.json +17 -14
  78. package/rollup.config.js +1 -1
  79. package/src/components/CopyLead/components/MediaContent/MediaContent.tsx +7 -6
  80. package/src/components/CopyLead/templates/Content/Content.tsx +5 -3
  81. package/src/components/CopyLead/templates/Media/Media.tsx +5 -6
  82. package/src/components/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.tsx +2 -0
  83. package/src/components/VideoHeroCard/VideoHeroCard.tsx +63 -0
  84. package/src/components/VideoHeroCard/components/VideoHeroCardContent/VideoHeroCardContent.module.css +32 -0
  85. package/src/components/VideoHeroCard/components/VideoHeroCardContent/VideoHeroCardContent.tsx +97 -0
  86. package/src/components/VideoHeroCard/components/VideoHeroCardContent/index.ts +4 -0
  87. package/src/components/VideoHeroCard/index.ts +1 -0
  88. package/src/components/VideoPortraitCard/VideoPortraitCard.tsx +54 -0
  89. package/src/components/VideoPortraitCard/index.ts +4 -0
  90. package/src/components/index.ts +2 -0
  91. package/src/internal/MultiLineText/MultiLineText.tsx +25 -0
  92. package/src/internal/MultiLineText/index.ts +1 -0
  93. package/src/internal/VideoCardPlayer/VideoCardPlayer.module.css +54 -0
  94. package/src/internal/VideoCardPlayer/VideoCardPlayer.tsx +62 -0
  95. package/src/internal/VideoCardPlayer/components/VideoCardPlayIcon/VideoCardPlayIcon.module.css +41 -0
  96. package/src/internal/VideoCardPlayer/components/VideoCardPlayIcon/VideoCardPlayIcon.tsx +28 -0
  97. package/src/internal/VideoCardPlayer/components/VideoCardPlayIcon/index.ts +1 -0
  98. package/src/internal/VideoCardPlayer/components/VideoCardThumbnail/VideoCardThumbnail.module.css +58 -0
  99. package/src/internal/VideoCardPlayer/components/VideoCardThumbnail/VideoCardThumbnail.tsx +38 -0
  100. package/src/internal/VideoCardPlayer/components/VideoCardThumbnail/index.ts +1 -0
  101. package/src/internal/VideoCardPlayer/index.ts +2 -0
  102. package/src/internal/VideoCardPlayer/types/player-props.ts +6 -0
  103. package/versions.json +1 -1
  104. package/lib/_shared/esm/Author-BVCRPgkl.mjs +0 -27
@@ -0,0 +1,54 @@
1
+ /* stylelint-disable selector-pseudo-class-no-unknown */
2
+ .container {
3
+ border-radius: var(--sem-border-radius-s);
4
+ border: var(--sem-border-width-xs) solid
5
+ var(--sem-color-border-secondary-light-subtle);
6
+ outline: var(--sem-border-width-l) solid transparent;
7
+ transition:
8
+ 0.4s ease outline-color,
9
+ 0.4s ease box-shadow;
10
+ overflow: hidden;
11
+ }
12
+
13
+ .container iframe {
14
+ border: none;
15
+ height: 100%;
16
+ width: 100%;
17
+ }
18
+
19
+ .container :global(.react-player__preview) {
20
+ position: relative;
21
+ }
22
+
23
+ .player {
24
+ height: 100%;
25
+ width: 100%;
26
+ }
27
+
28
+ .playerWrapper {
29
+ width: 100%;
30
+ position: relative;
31
+ }
32
+
33
+ .playerWrapper--landscape {
34
+ aspect-ratio: 16 / 9;
35
+ }
36
+
37
+ .playerWrapper--portrait {
38
+ aspect-ratio: 9 / 16;
39
+ }
40
+
41
+ .container:has(:global(.react-player__preview):focus) {
42
+ outline-color: var(--sem-color-border-primary-light-default);
43
+ }
44
+
45
+ .container:has(:global(.react-player__preview):hover),
46
+ .container:has(:global(.react-player__preview):focus) {
47
+ box-shadow: var(--elevation-05);
48
+ }
49
+
50
+ @media (--arc-custom-media-min-width-l-px) {
51
+ .container {
52
+ border: none;
53
+ }
54
+ }
@@ -0,0 +1,62 @@
1
+ import React, { useEffect, useState } from "react";
2
+ import classNames from "classnames";
3
+
4
+ import ReactPlayer from "react-player";
5
+ import { ReactPlayerProps } from "react-player/types";
6
+
7
+ import { filterAttrs } from "@arc-ui/community-utils/filter-attrs";
8
+
9
+ import { VideoCardPlayIcon } from "./components/VideoCardPlayIcon";
10
+ import { PlayerProps } from "./types/player-props";
11
+
12
+ import styles from "./VideoCardPlayer.module.css";
13
+
14
+ export const VideoCardPlayer = ({
15
+ thumbnail,
16
+ playIconSize,
17
+ orientation,
18
+ children,
19
+ player,
20
+ ...props
21
+ }: VideoCardPlayerProps) => {
22
+ const [isClient, setIsClient] = useState<boolean>(false);
23
+
24
+ useEffect(() => {
25
+ setIsClient(true);
26
+ }, []);
27
+
28
+ const playerProps = {
29
+ ...player,
30
+ light: thumbnail,
31
+ playIcon: <VideoCardPlayIcon size={playIconSize} />,
32
+ muted: !thumbnail,
33
+ playing: true,
34
+ controls: true,
35
+ className: styles.player,
36
+ width: "100%",
37
+ height: "100%",
38
+ };
39
+
40
+ return (
41
+ <div className={styles.container} {...filterAttrs(props)}>
42
+ <div
43
+ data-testid="arc-video-card"
44
+ className={classNames(
45
+ styles.playerWrapper,
46
+ styles[`playerWrapper--${orientation}`],
47
+ )}
48
+ >
49
+ {isClient && <ReactPlayer {...playerProps} />}
50
+ </div>
51
+ {children}
52
+ </div>
53
+ );
54
+ };
55
+
56
+ export interface VideoCardPlayerProps {
57
+ player: PlayerProps;
58
+ orientation: "portrait" | "landscape";
59
+ playIconSize: "s" | "l";
60
+ thumbnail?: ReactPlayerProps["light"];
61
+ children?: React.ReactNode;
62
+ }
@@ -0,0 +1,41 @@
1
+ /* stylelint-disable selector-pseudo-class-no-unknown */
2
+ .playIconContainer {
3
+ background: var(--sem-color-bg-primary-dark-default);
4
+ position: relative;
5
+ z-index: 1;
6
+ transition: 0.4s ease background-color;
7
+ border-radius: var(--sem-border-radius-s);
8
+ }
9
+
10
+ .playIconContainer--s {
11
+ width: 44px;
12
+ height: 44px;
13
+ position: absolute;
14
+ right: var(--sem-space-gap-110);
15
+ top: var(--sem-space-gap-110);
16
+ }
17
+
18
+ .playIconContainer--l {
19
+ height: 64px;
20
+ width: 64px;
21
+ }
22
+
23
+ .playIcon {
24
+ color: var(--sem-color-fg-secondary-light-default);
25
+ height: 100%;
26
+ width: 100%;
27
+ transition: 0.4s ease color;
28
+ }
29
+
30
+ :global(.react-player__preview):hover .playIconContainer {
31
+ background: var(--sem-color-bg-primary-light-subtle);
32
+ }
33
+
34
+ :global(.react-player__preview):focus .playIconContainer {
35
+ background: var(--sem-color-bg-primary-light-default);
36
+ }
37
+
38
+ :global(.react-player__preview):focus .playIcon,
39
+ :global(.react-player__preview):hover .playIcon {
40
+ color: var(--sem-color-fg-primary-dark-default);
41
+ }
@@ -0,0 +1,28 @@
1
+ import React from "react";
2
+
3
+ import classNames from "classnames";
4
+
5
+ import { Icon } from "@arc-ui/components/Icon";
6
+
7
+ import { ArcIconPlay } from "@arc-ui/icons/ArcIconPlay";
8
+
9
+ import styles from "./VideoCardPlayIcon.module.css";
10
+
11
+ export const VideoCardPlayIcon = ({ size = "l" }: VideoCardPlayIconProps) => {
12
+ return (
13
+ <div
14
+ className={classNames(
15
+ styles.playIconContainer,
16
+ styles[`playIconContainer--${size}`],
17
+ )}
18
+ >
19
+ <div className={styles.playIcon}>
20
+ <Icon icon={ArcIconPlay} />
21
+ </div>
22
+ </div>
23
+ );
24
+ };
25
+
26
+ interface VideoCardPlayIconProps {
27
+ size?: "s" | "l";
28
+ }
@@ -0,0 +1 @@
1
+ export { VideoCardPlayIcon } from "./VideoCardPlayIcon";
@@ -0,0 +1,58 @@
1
+ @import url("@arc-ui/tokens-arc/dist/custom-media.css");
2
+
3
+ .thumbnail {
4
+ align-items: flex-end;
5
+ background-size: cover;
6
+ bottom: 0;
7
+ display: flex;
8
+ left: 0;
9
+ overflow: hidden;
10
+ position: absolute;
11
+ right: 0;
12
+ top: 0;
13
+ cursor: pointer;
14
+ }
15
+
16
+ .thumbnail::before {
17
+ bottom: 0;
18
+ content: "";
19
+ display: block;
20
+ left: 0;
21
+ position: absolute;
22
+ right: 0;
23
+ top: 0;
24
+ }
25
+
26
+ .thumbnail--landscape::before {
27
+ background: linear-gradient(
28
+ 180deg,
29
+ rgba(42, 42, 42, 0%) 0%,
30
+ rgba(42, 42, 42, 62%) 51.92%,
31
+ var(--sem-color-bg-secondary-light-alt) 100%
32
+ );
33
+ }
34
+
35
+ .thumbnail--portrait::before {
36
+ background: linear-gradient(
37
+ 0deg,
38
+ var(--sem-color-bg-secondary-light-alt) 0.01%,
39
+ rgba(42, 42, 42, 90%) 16.31%,
40
+ rgba(42, 42, 42, 81%) 26.66%,
41
+ rgba(42, 42, 42, 0%) 100%
42
+ );
43
+ }
44
+
45
+ .thumbnailContent {
46
+ position: relative;
47
+ padding: var(--sem-space-padding-130);
48
+ }
49
+
50
+ .thumbnail--portrait .thumbnailContent {
51
+ padding: var(--sem-space-padding-110);
52
+ }
53
+
54
+ @media (--arc-custom-media-min-width-xl-px) {
55
+ .thumbnailContent {
56
+ padding: var(--sem-space-padding-160);
57
+ }
58
+ }
@@ -0,0 +1,38 @@
1
+ import classNames from "classnames";
2
+ import React from "react";
3
+
4
+ import { Visible, VisibleProps } from "@arc-ui/components/Visible";
5
+
6
+ import styles from "./VideoCardThumbnail.module.css";
7
+
8
+ export const VideoCardThumbnail = ({
9
+ orientation,
10
+ contentVisibility,
11
+ src,
12
+ children,
13
+ }: VideoCardThumbnailProps) => {
14
+ const content = <div className={styles.thumbnailContent}>{children}</div>;
15
+
16
+ return (
17
+ <div
18
+ className={classNames(
19
+ styles.thumbnail,
20
+ styles[`thumbnail--${orientation}`],
21
+ )}
22
+ style={{ backgroundImage: `url(${src})` }}
23
+ >
24
+ {contentVisibility ? (
25
+ <Visible {...contentVisibility}>{content}</Visible>
26
+ ) : (
27
+ content
28
+ )}
29
+ </div>
30
+ );
31
+ };
32
+
33
+ interface VideoCardThumbnailProps {
34
+ src: string;
35
+ children: React.ReactNode;
36
+ orientation: "portrait" | "landscape";
37
+ contentVisibility?: Omit<VisibleProps, "children">;
38
+ }
@@ -0,0 +1 @@
1
+ export { VideoCardThumbnail } from "./VideoCardThumbnail";
@@ -0,0 +1,2 @@
1
+ export { VideoCardPlayer, type VideoCardPlayerProps } from "./VideoCardPlayer";
2
+ export { VideoCardThumbnail } from "./components/VideoCardThumbnail";
@@ -0,0 +1,6 @@
1
+ import { ReactPlayerProps } from "react-player/types";
2
+
3
+ export type PlayerProps = Pick<
4
+ ReactPlayerProps,
5
+ "onReady" | "onPlay" | "onStart" | "onPause" | "onEnded" | "onError" | "src"
6
+ >;
package/versions.json CHANGED
@@ -1 +1 @@
1
- ["v3.3.0","v3.2.0","v3.1.0","v3.0.1","v3.0.0","v2.0.0","v1.1.0","v1.0.2","v1.0.1","v1.0.0","v0.1.0"]
1
+ ["v3.4.0","v3.3.0","v3.2.0","v3.1.0","v3.0.1","v3.0.0","v2.0.0","v1.1.0","v1.0.2","v1.0.1","v1.0.0","v0.1.0"]
@@ -1,27 +0,0 @@
1
- import { _ as __rest, a as __assign, f as filterAttrs } from './filter-attrs-D-1kWaCP.mjs';
2
- import React from 'react';
3
- import { Grid, GridRow, GridCol } from '@arc-ui/components/Grid';
4
- import { Avatar } from '@arc-ui/components/Avatar';
5
- import { Heading } from '@arc-ui/components/Heading';
6
- import { Text } from '@arc-ui/components/Text';
7
-
8
- var styles = {"authorContent":"Author-module_authorContent__TBY7b","largeAvatar":"Author-module_largeAvatar__Vco03"};
9
-
10
- var Author = function (_a) {
11
- var name = _a.name, title = _a.title, _b = _a.avatar, avatar = _b === void 0 ? {} : _b, props = __rest(_a, ["name", "title", "avatar"]);
12
- var avatarSizes = ["s", "m", "l", "xl"];
13
- avatar.size = avatarSizes.includes(avatar.size || "") ? avatar.size : "m";
14
- var isLargeAvatar = avatar.size === "l" || avatar.size === "xl";
15
- return (React.createElement("div", __assign({}, filterAttrs(props)),
16
- React.createElement(Grid, { isFluid: true, isGutterless: true },
17
- React.createElement(GridRow, { align: "center" },
18
- React.createElement(GridCol, { xs: isLargeAvatar ? 12 : "auto" },
19
- React.createElement("div", { className: isLargeAvatar ? styles.largeAvatar : undefined },
20
- React.createElement(Avatar, __assign({}, avatar)))),
21
- React.createElement(GridCol, null,
22
- React.createElement("div", { className: "".concat(!isLargeAvatar && styles.authorContent), "data-testid": "authorContent" },
23
- React.createElement(Heading, { size: "xs" }, name),
24
- React.createElement(Text, { size: "s" }, title)))))));
25
- };
26
-
27
- export { Author as A };