@lumx/react 3.18.2-alpha.1 → 3.18.2-alpha.3

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
@@ -1389,6 +1389,7 @@ const ButtonRoot = forwardRef((props, ref) => {
1389
1389
  }), children);
1390
1390
  }
1391
1391
  return /*#__PURE__*/React__default.createElement("button", _extends({}, forwardedProps, disabledStateProps, {
1392
+ "aria-disabled": isAnyDisabled,
1392
1393
  "aria-label": ariaLabel,
1393
1394
  ref: ref,
1394
1395
  className: buttonClassName,
@@ -13651,6 +13652,10 @@ const DEFAULT_PROPS$4 = {
13651
13652
  */
13652
13653
  const Thumbnail = forwardRef((props, ref) => {
13653
13654
  var _loadingPlaceholderIm;
13655
+ const {
13656
+ isAnyDisabled,
13657
+ otherProps
13658
+ } = useDisableStateProps(props);
13654
13659
  const defaultTheme = useTheme() || Theme.light;
13655
13660
  const {
13656
13661
  align,
@@ -13676,8 +13681,8 @@ const Thumbnail = forwardRef((props, ref) => {
13676
13681
  variant,
13677
13682
  linkProps,
13678
13683
  linkAs
13679
- } = props,
13680
- forwardedProps = _objectWithoutProperties(props, _excluded$4);
13684
+ } = otherProps,
13685
+ forwardedProps = _objectWithoutProperties(otherProps, _excluded$4);
13681
13686
  const [imgElement, setImgElement] = useState();
13682
13687
 
13683
13688
  // Image loading state.
@@ -13700,13 +13705,13 @@ const Thumbnail = forwardRef((props, ref) => {
13700
13705
  }
13701
13706
  const isLink = Boolean((linkProps === null || linkProps === void 0 ? void 0 : linkProps.href) || linkAs);
13702
13707
  const isButton = !!forwardedProps.onClick;
13703
- const isClickable = isButton || isLink;
13708
+ const isClickable = !isAnyDisabled && (isButton || isLink);
13704
13709
  let Wrapper = 'div';
13705
13710
  const wrapperProps = _objectSpread2({}, forwardedProps);
13706
- if (isLink) {
13711
+ if (!isAnyDisabled && isLink) {
13707
13712
  Wrapper = linkAs || 'a';
13708
13713
  Object.assign(wrapperProps, linkProps);
13709
- } else if (isButton) {
13714
+ } else if (!isAnyDisabled && isButton) {
13710
13715
  Wrapper = 'button';
13711
13716
  wrapperProps.type = forwardedProps.type || 'button';
13712
13717
  wrapperProps['aria-label'] = forwardedProps['aria-label'] || alt;