@wix/editor-react-components 1.2665.0 → 1.2666.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.
@@ -71,6 +71,8 @@ export type ButtonProps = {
71
71
  preventLinkNavigation?: boolean;
72
72
  onMouseEnter?: React.MouseEventHandler;
73
73
  onMouseLeave?: React.MouseEventHandler;
74
+ onMouseIn?: React.MouseEventHandler;
75
+ onMouseOut?: React.MouseEventHandler;
74
76
  onDblClick?: React.MouseEventHandler;
75
77
  onFocus?: (event: React.FocusEvent) => void;
76
78
  onBlur?: (event: React.FocusEvent) => void;
@@ -295,18 +295,39 @@ const Button = (props) => {
295
295
  onBlur,
296
296
  reportBiOnClick,
297
297
  preventLinkNavigation,
298
- onMouseEnter: propsOnMouseEnter,
299
- onMouseLeave: propsOnMouseLeave,
298
+ onMouseEnter,
299
+ onMouseLeave,
300
+ onMouseIn,
301
+ onMouseOut,
300
302
  wix,
301
303
  hasTransitions: hasTransitions2 = true
302
304
  } = props;
305
+ const propsOnMouseEnter = useCallback(
306
+ (event) => {
307
+ onMouseIn == null ? void 0 : onMouseIn(event);
308
+ onMouseEnter == null ? void 0 : onMouseEnter(event);
309
+ },
310
+ [onMouseIn, onMouseEnter]
311
+ );
312
+ const propsOnMouseLeave = useCallback(
313
+ (event) => {
314
+ onMouseOut == null ? void 0 : onMouseOut(event);
315
+ onMouseLeave == null ? void 0 : onMouseLeave(event);
316
+ },
317
+ [onMouseOut, onMouseLeave]
318
+ );
303
319
  const presetsWrapperProps = (wix == null ? void 0 : wix.presetsWrapperProps) || {};
304
320
  const animatedIconProps = elementProps == null ? void 0 : elementProps.animatedIcon;
305
321
  const corvidIconAnimationTriggers = (corvid == null ? void 0 : corvid.iconAnimationTriggers) ?? [];
306
322
  const defaultTrigger = (animatedIconProps == null ? void 0 : animatedIconProps.trigger) === IconAnimationTriggers.CLICK ? IconAnimationTriggers.CLICK : IconAnimationTriggers.HOVER;
307
323
  const iconAnimationTriggers = corvidIconAnimationTriggers.length > 0 ? corvidIconAnimationTriggers : [defaultTrigger];
308
324
  const { iconAnimatedRef, onAnimationForward, onAnimationBackward } = useIconAnimation(isDisabled);
309
- const { active: active2, onMouseEnter, onMouseLeave, onIconAnimationClick } = useButtonInteractionState(
325
+ const {
326
+ active: active2,
327
+ onMouseEnter: handleMouseEnter,
328
+ onMouseLeave: handleMouseLeave,
329
+ onIconAnimationClick
330
+ } = useButtonInteractionState(
310
331
  iconAnimationTriggers,
311
332
  onAnimationForward,
312
333
  onAnimationBackward,
@@ -349,8 +370,8 @@ const Button = (props) => {
349
370
  propsOnClick,
350
371
  preventLinkNavigation,
351
372
  reportBiOnClick: reportBiOnClick ?? reportClickAnalytics,
352
- onMouseEnter,
353
- onMouseLeave,
373
+ onMouseEnter: handleMouseEnter,
374
+ onMouseLeave: handleMouseLeave,
354
375
  onIconAnimationClick,
355
376
  onDblClick,
356
377
  onFocus,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/editor-react-components",
3
- "version": "1.2665.0",
3
+ "version": "1.2666.0",
4
4
  "description": "React components for the Wix Editor",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -200,5 +200,5 @@
200
200
  "registry": "https://registry.npmjs.org/",
201
201
  "access": "public"
202
202
  },
203
- "falconPackageHash": "cddd175b9c2aff8bcf779d96e918974fc24d35d3663640f28fd87ba4"
203
+ "falconPackageHash": "f56c4b341d936fe0b1248d5ef2525e2a4721b20d0919becd025d1eab"
204
204
  }