@arc-ui/community-components 3.4.0 → 3.5.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 +42 -42
- package/CHANGELOG.md +10 -0
- package/lib/Accordion/Accordion.cjs +3 -2
- package/lib/Accordion/Accordion.mjs +3 -2
- package/lib/ActionTile/ActionTile.cjs +7 -5
- package/lib/ActionTile/ActionTile.mjs +6 -4
- package/lib/ActionTile/styles.css +1 -1
- package/lib/ArticleSidebar/ArticleSidebar.cjs +10 -9
- package/lib/ArticleSidebar/ArticleSidebar.mjs +3 -2
- package/lib/Author/Author.cjs +3 -2
- package/lib/Author/Author.mjs +3 -2
- package/lib/BannerWithTabs/BannerWithTabs.cjs +5 -4
- package/lib/BannerWithTabs/BannerWithTabs.mjs +3 -2
- package/lib/BusinessSegmentSwitcher/BusinessSegmentSwitcher.cjs +81 -0
- package/lib/BusinessSegmentSwitcher/BusinessSegmentSwitcher.mjs +79 -0
- package/lib/BusinessSegmentSwitcher/styles.css +1 -0
- package/lib/ContentInfoWidget/ContentInfoWidget.cjs +4 -3
- package/lib/ContentInfoWidget/ContentInfoWidget.mjs +2 -1
- package/lib/CopyLead/CopyLead.cjs +17 -16
- package/lib/CopyLead/CopyLead.mjs +3 -2
- package/lib/DownloadList/DownloadList.cjs +6 -5
- package/lib/DownloadList/DownloadList.mjs +3 -2
- package/lib/FAQs/FAQs.cjs +6 -5
- package/lib/FAQs/FAQs.mjs +4 -3
- package/lib/FeaturePost/FeaturePost.cjs +12 -11
- package/lib/FeaturePost/FeaturePost.mjs +3 -2
- package/lib/Highlights/Highlights.cjs +11 -10
- package/lib/Highlights/Highlights.mjs +3 -2
- package/lib/InlineLinkGroup/InlineLinkGroup.cjs +4 -3
- package/lib/InlineLinkGroup/InlineLinkGroup.mjs +2 -1
- package/lib/LinkTile/LinkTile.cjs +3 -3
- package/lib/LinkTile/LinkTile.mjs +2 -2
- package/lib/LinkTile/styles.css +1 -1
- package/lib/ProductNavigation/ProductNavigation.cjs +6 -5
- package/lib/ProductNavigation/ProductNavigation.mjs +3 -2
- package/lib/PromoListing/PromoListing.cjs +7 -6
- package/lib/PromoListing/PromoListing.mjs +3 -2
- package/lib/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.cjs +7 -6
- package/lib/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.mjs +4 -3
- package/lib/Quote/Quote.cjs +6 -5
- package/lib/Quote/Quote.mjs +3 -2
- package/lib/SectionHeading/SectionHeading.cjs +3 -2
- package/lib/SectionHeading/SectionHeading.mjs +3 -2
- package/lib/Statistics/Statistics.cjs +6 -5
- package/lib/Statistics/Statistics.mjs +3 -2
- package/lib/Summary/Summary.cjs +4 -3
- package/lib/Summary/Summary.mjs +2 -1
- package/lib/ThumbnailSignpost/ThumbnailSignpost.cjs +3 -2
- package/lib/ThumbnailSignpost/ThumbnailSignpost.mjs +3 -2
- package/lib/VideoHeroCard/VideoHeroCard.cjs +7 -6
- package/lib/VideoHeroCard/VideoHeroCard.mjs +3 -2
- package/lib/VideoPortraitCard/VideoPortraitCard.cjs +5 -4
- package/lib/VideoPortraitCard/VideoPortraitCard.mjs +3 -2
- package/lib/_shared/cjs/{Accordion-QqDoB3pY.cjs → Accordion-DfNGOjTm.cjs} +9 -8
- package/lib/_shared/cjs/{Author-aL8YXi7C.cjs → Author-D4dKNQem.cjs} +5 -4
- package/lib/_shared/cjs/{SectionHeading-Dj-dJfv3.cjs → SectionHeading-DeSFM0HV.cjs} +5 -4
- package/lib/_shared/cjs/{ThumbnailSignpost-SBnrGooA.cjs → ThumbnailSignpost-GkOiwt-Z.cjs} +5 -4
- package/lib/_shared/cjs/{VideoCardThumbnail-BqYgpk0u.cjs → VideoCardThumbnail-N5iC-cAU.cjs} +7 -6
- package/lib/_shared/cjs/filter-attrs-BizjMsy0.cjs +27 -0
- package/lib/_shared/cjs/{filter-attrs-C26zOt4_.cjs → tslib.es6-BxB9I209.cjs} +0 -25
- package/lib/_shared/esm/{Accordion-DtU7jbCv.mjs → Accordion-DSRlkcXi.mjs} +2 -1
- package/lib/_shared/esm/{Author-CJQFrQM9.mjs → Author-CLMgH9ES.mjs} +2 -1
- package/lib/_shared/esm/{SectionHeading-BskdQ2Tt.mjs → SectionHeading-DSwsdNSp.mjs} +2 -1
- package/lib/_shared/esm/{ThumbnailSignpost-CBSdQiHw.mjs → ThumbnailSignpost-BtaHAB0h.mjs} +2 -1
- package/lib/_shared/esm/{VideoCardThumbnail-VfOKmPCv.mjs → VideoCardThumbnail-Tbh7Xi-X.mjs} +2 -1
- package/lib/_shared/esm/filter-attrs-DZ7RCEZm.mjs +25 -0
- package/lib/_shared/esm/{filter-attrs-D-1kWaCP.mjs → tslib.es6-BVXMhEem.mjs} +1 -25
- package/lib/index.cjs +204 -132
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +61 -3
- package/lib/index.d.mts +61 -3
- package/lib/index.mjs +204 -133
- package/lib/index.mjs.map +1 -1
- package/lib/styles.css +1 -1
- package/package.json +2 -2
- package/src/components/ActionTile/ActionTile.module.css +1 -0
- package/src/components/ActionTile/ActionTile.tsx +11 -3
- package/src/components/BusinessSegmentSwitcher/BusinessSegmentSwitcher.module.css +92 -0
- package/src/components/BusinessSegmentSwitcher/BusinessSegmentSwitcher.tsx +119 -0
- package/src/components/BusinessSegmentSwitcher/helpers/renderBusinessSegmentSwitcherCarousel.tsx +45 -0
- package/src/components/BusinessSegmentSwitcher/helpers/renderCard.tsx +17 -0
- package/src/components/BusinessSegmentSwitcher/index.ts +9 -0
- package/src/components/BusinessSegmentSwitcher/types/types.ts +45 -0
- package/src/components/LinkTile/LinkTile.module.css +8 -4
- package/src/components/LinkTile/LinkTile.tsx +1 -2
- package/src/components/index.ts +1 -0
- package/versions.json +1 -1
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var tslib_es6 = require('./tslib.es6-BxB9I209.cjs');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var index = require('./index-Bp6Dd2i1.cjs');
|
|
6
|
+
var filterAttrs = require('./filter-attrs-BizjMsy0.cjs');
|
|
6
7
|
var BtIconArrowRightFill = require('./BtIconArrowRightFill-BVCZv7Lm.cjs');
|
|
7
8
|
var Image = require('@arc-ui/components/Image');
|
|
8
9
|
var VerticalSpace = require('@arc-ui/components/VerticalSpace');
|
|
@@ -13,12 +14,12 @@ var styles = {"thumbnailSignpost":"ThumbnailSignpost-module_thumbnailSignpost__Y
|
|
|
13
14
|
/** Use `ThumbnailSignpost` to highlight key information or navigation points with an accompanying thumbnail image or icon. */
|
|
14
15
|
var ThumbnailSignpost = function (_a) {
|
|
15
16
|
var _b;
|
|
16
|
-
var text = _a.text, title = _a.title, img = _a.img, onClick = _a.onClick, buttonLabel = _a.buttonLabel, props =
|
|
17
|
-
return (React.createElement("div",
|
|
17
|
+
var text = _a.text, title = _a.title, img = _a.img, onClick = _a.onClick, buttonLabel = _a.buttonLabel, props = tslib_es6.__rest(_a, ["text", "title", "img", "onClick", "buttonLabel"]);
|
|
18
|
+
return (React.createElement("div", tslib_es6.__assign({ className: index.classNames(styles.thumbnailSignpost, (_b = {},
|
|
18
19
|
_b[styles.isLink] = onClick,
|
|
19
20
|
_b)), onClick: onClick, "aria-label": title, tabIndex: onClick ? 0 : -1 }, (onClick && { role: "button" }), filterAttrs.filterAttrs(props)),
|
|
20
21
|
img && (React.createElement("div", { className: styles.image },
|
|
21
|
-
React.createElement(Image.Image,
|
|
22
|
+
React.createElement(Image.Image, tslib_es6.__assign({}, img)))),
|
|
22
23
|
React.createElement("div", { className: styles.content },
|
|
23
24
|
React.createElement("span", { className: styles.heading }, title),
|
|
24
25
|
React.createElement(VerticalSpace.VerticalSpace, { size: "8" }),
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var tslib_es6 = require('./tslib.es6-BxB9I209.cjs');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var index = require('./index-Bp6Dd2i1.cjs');
|
|
6
|
+
var filterAttrs = require('./filter-attrs-BizjMsy0.cjs');
|
|
6
7
|
var Icon = require('@arc-ui/components/Icon');
|
|
7
8
|
var Visible = require('@arc-ui/components/Visible');
|
|
8
9
|
|
|
@@ -417,14 +418,14 @@ var VideoCardPlayIcon = function (_a) {
|
|
|
417
418
|
var styles$1 = {"container":"VideoCardPlayer-module_container__G-Uta","player":"VideoCardPlayer-module_player__BgueT","playerWrapper":"VideoCardPlayer-module_playerWrapper__UcH1q","playerWrapper--landscape":"VideoCardPlayer-module_playerWrapper--landscape__shKv-","playerWrapper--portrait":"VideoCardPlayer-module_playerWrapper--portrait__7bKAr"};
|
|
418
419
|
|
|
419
420
|
var VideoCardPlayer = function (_a) {
|
|
420
|
-
var thumbnail = _a.thumbnail, playIconSize = _a.playIconSize, orientation = _a.orientation, children = _a.children, player = _a.player, props =
|
|
421
|
+
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"]);
|
|
421
422
|
var _b = React.useState(false), isClient = _b[0], setIsClient = _b[1];
|
|
422
423
|
React.useEffect(function () {
|
|
423
424
|
setIsClient(true);
|
|
424
425
|
}, []);
|
|
425
|
-
var playerProps =
|
|
426
|
-
return (React.createElement("div",
|
|
427
|
-
React.createElement("div", { "data-testid": "arc-video-card", className: index.classNames(styles$1.playerWrapper, styles$1["playerWrapper--".concat(orientation)]) }, isClient && React.createElement(src_default,
|
|
426
|
+
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%" });
|
|
427
|
+
return (React.createElement("div", tslib_es6.__assign({ className: styles$1.container }, filterAttrs.filterAttrs(props)),
|
|
428
|
+
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))),
|
|
428
429
|
children));
|
|
429
430
|
};
|
|
430
431
|
|
|
@@ -433,7 +434,7 @@ var styles = {"thumbnail":"VideoCardThumbnail-module_thumbnail__Yamk0","thumbnai
|
|
|
433
434
|
var VideoCardThumbnail = function (_a) {
|
|
434
435
|
var orientation = _a.orientation, contentVisibility = _a.contentVisibility, src = _a.src, children = _a.children;
|
|
435
436
|
var content = React.createElement("div", { className: styles.thumbnailContent }, children);
|
|
436
|
-
return (React.createElement("div", { className: index.classNames(styles.thumbnail, styles["thumbnail--".concat(orientation)]), style: { backgroundImage: "url(".concat(src, ")") } }, contentVisibility ? (React.createElement(Visible.Visible,
|
|
437
|
+
return (React.createElement("div", { className: index.classNames(styles.thumbnail, styles["thumbnail--".concat(orientation)]), style: { backgroundImage: "url(".concat(src, ")") } }, contentVisibility ? (React.createElement(Visible.Visible, tslib_es6.__assign({}, contentVisibility), content)) : (content)));
|
|
437
438
|
};
|
|
438
439
|
|
|
439
440
|
exports.VideoCardPlayer = VideoCardPlayer;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Filters out attributes from the given props object based on a pattern.
|
|
5
|
+
*
|
|
6
|
+
* This function extracts all properties that match either the `data-*` or `aria-*` attribute patterns
|
|
7
|
+
* and returns a new object containing only those properties.
|
|
8
|
+
*
|
|
9
|
+
* @param props - The object containing properties to filter.
|
|
10
|
+
* @returns A new object containing only the matched attributes (`data-*` and `aria-*`) from the input props.
|
|
11
|
+
*/
|
|
12
|
+
var attributePrefixes = ["data-", "aria-"];
|
|
13
|
+
var filterAttrs = function (props) {
|
|
14
|
+
var filteredProps = {};
|
|
15
|
+
var _loop_1 = function (prop) {
|
|
16
|
+
if (Object.prototype.hasOwnProperty.call(props, prop) &&
|
|
17
|
+
attributePrefixes.some(function (prefix) { return prop.startsWith(prefix); })) {
|
|
18
|
+
filteredProps[prop] = props[prop];
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
for (var prop in props) {
|
|
22
|
+
_loop_1(prop);
|
|
23
|
+
}
|
|
24
|
+
return filteredProps;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.filterAttrs = filterAttrs;
|
|
@@ -93,32 +93,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
93
93
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
-
/**
|
|
97
|
-
* Filters out attributes from the given props object based on a pattern.
|
|
98
|
-
*
|
|
99
|
-
* This function extracts all properties that match either the `data-*` or `aria-*` attribute patterns
|
|
100
|
-
* and returns a new object containing only those properties.
|
|
101
|
-
*
|
|
102
|
-
* @param props - The object containing properties to filter.
|
|
103
|
-
* @returns A new object containing only the matched attributes (`data-*` and `aria-*`) from the input props.
|
|
104
|
-
*/
|
|
105
|
-
var attributePrefixes = ["data-", "aria-"];
|
|
106
|
-
var filterAttrs = function (props) {
|
|
107
|
-
var filteredProps = {};
|
|
108
|
-
var _loop_1 = function (prop) {
|
|
109
|
-
if (Object.prototype.hasOwnProperty.call(props, prop) &&
|
|
110
|
-
attributePrefixes.some(function (prefix) { return prop.startsWith(prefix); })) {
|
|
111
|
-
filteredProps[prop] = props[prop];
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
for (var prop in props) {
|
|
115
|
-
_loop_1(prop);
|
|
116
|
-
}
|
|
117
|
-
return filteredProps;
|
|
118
|
-
};
|
|
119
|
-
|
|
120
96
|
exports.__awaiter = __awaiter;
|
|
121
97
|
exports.__generator = __generator;
|
|
122
98
|
exports.__rest = __rest;
|
|
123
99
|
exports.__spreadArray = __spreadArray;
|
|
124
|
-
exports.filterAttrs = filterAttrs;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { _ as __rest, a as __assign
|
|
1
|
+
import { _ as __rest, a as __assign } from './tslib.es6-BVXMhEem.mjs';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
+
import { f as filterAttrs } from './filter-attrs-DZ7RCEZm.mjs';
|
|
3
4
|
import { c as classNames } from './index-BfTCfPZ1.mjs';
|
|
4
5
|
import { Heading } from '@arc-ui/components/Heading';
|
|
5
6
|
import { Text } from '@arc-ui/components/Text';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { _ as __rest, a as __assign
|
|
1
|
+
import { _ as __rest, a as __assign } from './tslib.es6-BVXMhEem.mjs';
|
|
2
2
|
import React__default from 'react';
|
|
3
|
+
import { f as filterAttrs } from './filter-attrs-DZ7RCEZm.mjs';
|
|
3
4
|
import { Grid, GridRow, GridCol } from '@arc-ui/components/Grid';
|
|
4
5
|
import { Avatar } from '@arc-ui/components/Avatar';
|
|
5
6
|
import { Heading } from '@arc-ui/components/Heading';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { _ as __rest, a as __assign
|
|
1
|
+
import { _ as __rest, a as __assign } from './tslib.es6-BVXMhEem.mjs';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { c as classNames } from './index-BfTCfPZ1.mjs';
|
|
4
|
+
import { f as filterAttrs } from './filter-attrs-DZ7RCEZm.mjs';
|
|
4
5
|
import { Text } from '@arc-ui/components/Text';
|
|
5
6
|
import { VerticalSpace } from '@arc-ui/components/VerticalSpace';
|
|
6
7
|
import { Image } from '@arc-ui/components/Image';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { _ as __rest, a as __assign
|
|
1
|
+
import { _ as __rest, a as __assign } from './tslib.es6-BVXMhEem.mjs';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { c as classNames } from './index-BfTCfPZ1.mjs';
|
|
4
|
+
import { f as filterAttrs } from './filter-attrs-DZ7RCEZm.mjs';
|
|
4
5
|
import { B as BtIconArrowRightFill } from './BtIconArrowRightFill-D0zKgk3B.mjs';
|
|
5
6
|
import { Image } from '@arc-ui/components/Image';
|
|
6
7
|
import { VerticalSpace } from '@arc-ui/components/VerticalSpace';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { _ as __rest, a as __assign
|
|
1
|
+
import { _ as __rest, a as __assign } from './tslib.es6-BVXMhEem.mjs';
|
|
2
2
|
import React__default, { lazy, useRef, useEffect, useCallback, useState, Suspense } from 'react';
|
|
3
3
|
import { c as classNames } from './index-BfTCfPZ1.mjs';
|
|
4
|
+
import { f as filterAttrs } from './filter-attrs-DZ7RCEZm.mjs';
|
|
4
5
|
import { Icon } from '@arc-ui/components/Icon';
|
|
5
6
|
import { Visible } from '@arc-ui/components/Visible';
|
|
6
7
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Filters out attributes from the given props object based on a pattern.
|
|
3
|
+
*
|
|
4
|
+
* This function extracts all properties that match either the `data-*` or `aria-*` attribute patterns
|
|
5
|
+
* and returns a new object containing only those properties.
|
|
6
|
+
*
|
|
7
|
+
* @param props - The object containing properties to filter.
|
|
8
|
+
* @returns A new object containing only the matched attributes (`data-*` and `aria-*`) from the input props.
|
|
9
|
+
*/
|
|
10
|
+
var attributePrefixes = ["data-", "aria-"];
|
|
11
|
+
var filterAttrs = function (props) {
|
|
12
|
+
var filteredProps = {};
|
|
13
|
+
var _loop_1 = function (prop) {
|
|
14
|
+
if (Object.prototype.hasOwnProperty.call(props, prop) &&
|
|
15
|
+
attributePrefixes.some(function (prefix) { return prop.startsWith(prefix); })) {
|
|
16
|
+
filteredProps[prop] = props[prop];
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
for (var prop in props) {
|
|
20
|
+
_loop_1(prop);
|
|
21
|
+
}
|
|
22
|
+
return filteredProps;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { filterAttrs as f };
|
|
@@ -91,28 +91,4 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
91
91
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
92
92
|
};
|
|
93
93
|
|
|
94
|
-
|
|
95
|
-
* Filters out attributes from the given props object based on a pattern.
|
|
96
|
-
*
|
|
97
|
-
* This function extracts all properties that match either the `data-*` or `aria-*` attribute patterns
|
|
98
|
-
* and returns a new object containing only those properties.
|
|
99
|
-
*
|
|
100
|
-
* @param props - The object containing properties to filter.
|
|
101
|
-
* @returns A new object containing only the matched attributes (`data-*` and `aria-*`) from the input props.
|
|
102
|
-
*/
|
|
103
|
-
var attributePrefixes = ["data-", "aria-"];
|
|
104
|
-
var filterAttrs = function (props) {
|
|
105
|
-
var filteredProps = {};
|
|
106
|
-
var _loop_1 = function (prop) {
|
|
107
|
-
if (Object.prototype.hasOwnProperty.call(props, prop) &&
|
|
108
|
-
attributePrefixes.some(function (prefix) { return prop.startsWith(prefix); })) {
|
|
109
|
-
filteredProps[prop] = props[prop];
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
for (var prop in props) {
|
|
113
|
-
_loop_1(prop);
|
|
114
|
-
}
|
|
115
|
-
return filteredProps;
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
export { __rest as _, __assign as a, __spreadArray as b, __awaiter as c, __generator as d, filterAttrs as f };
|
|
94
|
+
export { __rest as _, __assign as a, __spreadArray as b, __awaiter as c, __generator as d };
|