@lumx/react 3.19.1-alpha.0 → 3.19.1-alpha.2

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/index.js CHANGED
@@ -1316,7 +1316,7 @@ const ButtonRoot = forwardRef((props, ref) => {
1316
1316
  fullWidth
1317
1317
  }));
1318
1318
  return /*#__PURE__*/React__default.createElement(RawClickable, _extends({
1319
- as: linkAs || forwardedProps.href ? 'a' : 'button'
1319
+ as: linkAs || (forwardedProps.href ? 'a' : 'button')
1320
1320
  }, forwardedProps, disabledStateProps, {
1321
1321
  "aria-disabled": isAnyDisabled,
1322
1322
  "aria-label": ariaLabel,
@@ -3684,7 +3684,7 @@ const ListItem = forwardRef((props, ref) => {
3684
3684
  /*#__PURE__*/
3685
3685
  /* Clickable list item */
3686
3686
  React__default.createElement(RawClickable, _extends({
3687
- as: linkAs || linkProps.href ? 'a' : 'button'
3687
+ as: linkAs || (linkProps.href ? 'a' : 'button')
3688
3688
  }, linkProps, disabledStateProps, {
3689
3689
  className: classNames(handleBasicClasses({
3690
3690
  prefix: `${CLASSNAME$13}__link`,
@@ -8985,7 +8985,7 @@ const Link = forwardRef((props, ref) => {
8985
8985
  const [color, colorVariant] = resolveColorWithVariants(propColor, propColorVariant);
8986
8986
  return /*#__PURE__*/React__default.createElement(RawClickable, _extends({
8987
8987
  ref: ref,
8988
- as: linkAs || forwardedProps.href ? 'a' : 'button'
8988
+ as: linkAs || (forwardedProps.href ? 'a' : 'button')
8989
8989
  }, forwardedProps, disabledStateProps, {
8990
8990
  className: classNames(className, handleBasicClasses({
8991
8991
  prefix: CLASSNAME$L,
@@ -11146,7 +11146,7 @@ const SideNavigationItem = forwardRef((props, ref) => {
11146
11146
  }), shouldSplitActions ? /*#__PURE__*/React__default.createElement("div", {
11147
11147
  className: `${CLASSNAME$n}__wrapper`
11148
11148
  }, /*#__PURE__*/React__default.createElement(RawClickable, _extends({
11149
- as: linkAs || linkProps !== null && linkProps !== void 0 && linkProps.href ? 'a' : 'button'
11149
+ as: linkAs || (linkProps !== null && linkProps !== void 0 && linkProps.href ? 'a' : 'button')
11150
11150
  }, linkProps, {
11151
11151
  className: `${CLASSNAME$n}__link`,
11152
11152
  onClick: onClick
@@ -11161,7 +11161,7 @@ const SideNavigationItem = forwardRef((props, ref) => {
11161
11161
  emphasis: Emphasis.low,
11162
11162
  onClick: onActionClick
11163
11163
  }, ariaProps))) : /*#__PURE__*/React__default.createElement(RawClickable, _extends({
11164
- as: linkAs || linkProps !== null && linkProps !== void 0 && linkProps.href ? 'a' : 'button'
11164
+ as: linkAs || (linkProps !== null && linkProps !== void 0 && linkProps.href ? 'a' : 'button')
11165
11165
  }, linkProps, {
11166
11166
  className: `${CLASSNAME$n}__link`,
11167
11167
  onClick: onClick
@@ -13697,14 +13697,19 @@ const Thumbnail = forwardRef((props, ref) => {
13697
13697
  // Remove the image on custom fallback.
13698
13698
  imageErrorStyle.display = 'none';
13699
13699
  }
13700
- const isClickable = !isAnyDisabled && ((linkProps === null || linkProps === void 0 ? void 0 : linkProps.href) || linkAs || forwardedProps.onClick);
13700
+ const isLink = (linkProps === null || linkProps === void 0 ? void 0 : linkProps.href) || linkAs;
13701
+ const isClickable = !isAnyDisabled && (isLink || forwardedProps.onClick);
13701
13702
  const Wrapper = isClickable ? RawClickable : 'div';
13702
13703
  const wrapperProps = _objectSpread2({}, forwardedProps);
13703
13704
  if (isClickable) {
13704
- Object.assign(wrapperProps, linkProps, {
13705
- as: linkAs || linkProps !== null && linkProps !== void 0 && linkProps.href ? 'a' : 'button'
13705
+ Object.assign(wrapperProps, {
13706
+ as: linkAs || (linkProps !== null && linkProps !== void 0 && linkProps.href ? 'a' : 'button')
13706
13707
  }, disabledStateProps);
13707
- wrapperProps['aria-label'] = forwardedProps['aria-label'] || alt;
13708
+ if (isLink) {
13709
+ Object.assign(wrapperProps, linkProps);
13710
+ } else {
13711
+ wrapperProps['aria-label'] = forwardedProps['aria-label'] || alt;
13712
+ }
13708
13713
  }
13709
13714
 
13710
13715
  // If we have a loading placeholder image that is really loaded (complete)