@wix/editor-react-components 1.2664.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
|
|
299
|
-
onMouseLeave
|
|
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 {
|
|
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.
|
|
3
|
+
"version": "1.2666.0",
|
|
4
4
|
"description": "React components for the Wix Editor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@wix/site-service-configuration": "^1.0.1",
|
|
86
86
|
"@wix/site-service-experiments": "^1.0.4",
|
|
87
87
|
"@wix/site-service-rendering-context": "^1.0.1",
|
|
88
|
-
"@wix/site-ui": "1.
|
|
88
|
+
"@wix/site-ui": "1.274.0",
|
|
89
89
|
"@wix/video": "^1.106.0",
|
|
90
90
|
"@wix/viewer-service-consent-policy": "^1.0.103",
|
|
91
91
|
"@wix/web-bi-logger": "^2.1.29",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"@astrojs/cloudflare": "^12.6.13",
|
|
109
109
|
"@astrojs/react": "^4.4.2",
|
|
110
110
|
"@codemirror/lang-html": "^6.4.9",
|
|
111
|
-
"@playwright/test": "~1.
|
|
111
|
+
"@playwright/test": "~1.63.0",
|
|
112
112
|
"@storybook/addon-docs": "^9.1.19",
|
|
113
113
|
"@storybook/react-vite": "^9.1.19",
|
|
114
114
|
"@testing-library/jest-dom": "^6.4.2",
|
|
@@ -200,5 +200,5 @@
|
|
|
200
200
|
"registry": "https://registry.npmjs.org/",
|
|
201
201
|
"access": "public"
|
|
202
202
|
},
|
|
203
|
-
"falconPackageHash": "
|
|
203
|
+
"falconPackageHash": "f56c4b341d936fe0b1248d5ef2525e2a4721b20d0919becd025d1eab"
|
|
204
204
|
}
|