@lumx/react 4.9.0-next.2 → 4.9.0-next.4

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.d.ts CHANGED
@@ -4245,11 +4245,13 @@ interface UserBlockProps$1 extends HasClassName, HasTheme {
4245
4245
  * Called when the mouse enters the component.
4246
4246
  */
4247
4247
  handleMouseEnter?(): void;
4248
+ mouseEnterProp?: string;
4248
4249
  /**
4249
4250
  * Mouse leave event handler.
4250
4251
  * Called when the mouse leaves the component.
4251
4252
  */
4252
4253
  handleMouseLeave?(): void;
4254
+ mouseLeaveProp?: string;
4253
4255
  /**
4254
4256
  * Additional custom fields to display below the standard fields.
4255
4257
  * Only visible when size is not 'xs' or 's'.
@@ -4282,7 +4284,7 @@ interface UserBlockProps$1 extends HasClassName, HasTheme {
4282
4284
  */
4283
4285
  Avatar: (props: any) => any;
4284
4286
  }
4285
- type UserBlockPropsToOverride = 'Avatar' | 'Text' | 'nameProps' | 'linkProps' | 'avatarProps';
4287
+ type UserBlockPropsToOverride = 'Avatar' | 'Text' | 'linkProps' | 'avatarProps' | 'mouseLeaveProp' | 'mouseEnterProp';
4286
4288
 
4287
4289
  /**
4288
4290
  * Defines the props of the component.
package/index.js CHANGED
@@ -16354,6 +16354,8 @@ const UserBlock$1 = props => {
16354
16354
  linkAs,
16355
16355
  ref,
16356
16356
  multipleActions,
16357
+ mouseEnterProp = 'onMouseEnter',
16358
+ mouseLeaveProp = 'onMouseLeave',
16357
16359
  name,
16358
16360
  nameProps,
16359
16361
  handleClick,
@@ -16391,17 +16393,24 @@ const UserBlock$1 = props => {
16391
16393
  children: field
16392
16394
  }, idx))
16393
16395
  });
16396
+ const eventHandlers = {
16397
+ ...(handleMouseEnter && {
16398
+ [mouseEnterProp]: handleMouseEnter
16399
+ }),
16400
+ ...(handleMouseLeave && {
16401
+ [mouseLeaveProp]: handleMouseLeave
16402
+ })
16403
+ };
16394
16404
  return /*#__PURE__*/jsxs("div", {
16395
16405
  ref: ref,
16396
16406
  ...forwardedProps,
16407
+ ...eventHandlers,
16397
16408
  className: classnames(className, block({
16398
16409
  [`orientation-${orientation}`]: Boolean(orientation),
16399
16410
  [`size-${componentSize}`]: Boolean(componentSize),
16400
16411
  [`theme-${theme}`]: Boolean(theme),
16401
16412
  'is-clickable': isClickable
16402
16413
  })),
16403
- onMouseLeave: handleMouseLeave,
16404
- onMouseEnter: handleMouseEnter,
16405
16414
  children: [avatarProps && /*#__PURE__*/jsx(Avatar, {
16406
16415
  linkAs: linkAs,
16407
16416
  linkProps: linkProps,