@arc-ui/components 6.4.0 → 7.0.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/dist/index.js CHANGED
@@ -775,7 +775,7 @@ var useAriaDescribedby = function (_a) {
775
775
  * Detect interaction mode
776
776
  */
777
777
  var useInteractionMode = function () {
778
- var _a = React.useState(""), interactionMode = _a[0], setInteractionMode = _a[1];
778
+ var _a = React.useState("pointer"), interactionMode = _a[0], setInteractionMode = _a[1];
779
779
  React.useEffect(function () {
780
780
  var onKeyDown = function (event) {
781
781
  if (event.altKey || event.ctrlKey || event.metaKey) {
@@ -868,7 +868,7 @@ var useNumericInput = function (props) {
868
868
  */
869
869
  var Card = function (_a) {
870
870
  var _b;
871
- var actionId = _a.actionId, _c = _a.actionLabel, actionLabel = _c === void 0 ? "Read more" : _c, children = _a.children, _d = _a.fill, fill = _d === void 0 ? "solid" : _d, href = _a.href, imageAlt = _a.imageAlt, imageSrc = _a.imageSrc, imageSrcSet = _a.imageSrcSet, imageHeight = _a.imageHeight, minHeight = _a.minHeight, target = _a.target, title = _a.title, _e = _a.titleSize, titleSize = _e === void 0 ? "s" : _e, props = __rest(_a, ["actionId", "actionLabel", "children", "fill", "href", "imageAlt", "imageSrc", "imageSrcSet", "imageHeight", "minHeight", "target", "title", "titleSize"]);
871
+ var actionId = _a.actionId, _c = _a.actionLabel, actionLabel = _c === void 0 ? "Read more" : _c, children = _a.children, _d = _a.fill, fill = _d === void 0 ? "solid" : _d, href = _a.href, imageAlt = _a.imageAlt, imageSrc = _a.imageSrc, imageSrcSet = _a.imageSrcSet, imageHeight = _a.imageHeight, linkData = _a.linkData, minHeight = _a.minHeight, target = _a.target, title = _a.title, _e = _a.titleSize, titleSize = _e === void 0 ? "s" : _e, props = __rest(_a, ["actionId", "actionLabel", "children", "fill", "href", "imageAlt", "imageSrc", "imageSrcSet", "imageHeight", "linkData", "minHeight", "target", "title", "titleSize"]);
872
872
  var surface = React.useContext(Context$3).surface;
873
873
  var interactionMode = useInteractionMode().interactionMode;
874
874
  var Wrapper = function (_a) {
@@ -888,7 +888,7 @@ var Card = function (_a) {
888
888
  React__default["default"].createElement("div", { className: "arc-Card-header" },
889
889
  React__default["default"].createElement("div", { className: "arc-Card-title" },
890
890
  React__default["default"].createElement(Heading, { size: titleSize },
891
- React__default["default"].createElement(CardLink, { actionId: actionId, fill: fill, href: href, stretch: true, target: target }, title))),
891
+ React__default["default"].createElement(CardLink, { actionId: actionId, fill: fill, href: href, linkData: linkData, stretch: true, target: target }, title))),
892
892
  coverImage),
893
893
  React__default["default"].createElement("div", { className: "arc-Card-children" },
894
894
  React__default["default"].createElement(Card.Block, null, children)),
@@ -927,14 +927,14 @@ Card.Image = CardImage;
927
927
  * Internal `CardLink` component.
928
928
  */
929
929
  var CardLink = function (_a) {
930
- var actionId = _a.actionId, isButton = _a.isButton, children = _a.children, fill = _a.fill, href = _a.href, stretch = _a.stretch, target = _a.target;
930
+ var actionId = _a.actionId, isButton = _a.isButton, children = _a.children, fill = _a.fill, href = _a.href, _b = _a.linkData, linkData = _b === void 0 ? {} : _b, stretch = _a.stretch, target = _a.target;
931
931
  var surface = React.useContext(Context$3).surface;
932
- return (React__default["default"].createElement("a", { "aria-describedby": actionId, className: classNames({
932
+ return (React__default["default"].createElement("a", __assign({ "aria-describedby": actionId, className: classNames({
933
933
  "arc-Card-link": true,
934
934
  "arc-Card-link--button": isButton,
935
935
  "arc-Card-link--onDarkSurface": surface === "dark" && fill !== "neutral",
936
936
  "arc-Card-link--stretch": stretch
937
- }), href: href, rel: target === "_blank" ? "noopener noreferrer" : undefined, tabIndex: isButton ? -1 : undefined, target: target },
937
+ }), href: href, rel: target === "_blank" ? "noopener noreferrer" : undefined, tabIndex: isButton ? -1 : undefined, target: target }, filterDataAttrs(linkData)),
938
938
  React__default["default"].createElement("span", { className: "arc-Card-linkText" }, children),
939
939
  isButton && (React__default["default"].createElement("span", { className: "arc-Card-linkIcon" },
940
940
  React__default["default"].createElement(Icon, { icon: "btChevronRight2px", size: 8 })))));