@wistia/ui 0.18.8-beta.d7ed0035.c214a27 → 0.18.9
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/dist/index.cjs +21 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.mjs +21 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -123,11 +123,11 @@ declare const useFocusTrap: (active?: boolean, options?: UseFocusTrapOptions) =>
|
|
|
123
123
|
declare const useForceUpdate: () => (() => void);
|
|
124
124
|
|
|
125
125
|
type HoverProps = {
|
|
126
|
-
onFocus: () => void;
|
|
127
|
-
onMouseEnter: () => void;
|
|
128
|
-
onBlur: () => void;
|
|
129
|
-
onMouseLeave: () => void;
|
|
130
|
-
onMouseMove?: () => void;
|
|
126
|
+
onFocus: (event: React.FocusEvent) => void;
|
|
127
|
+
onMouseEnter: (event: React.MouseEvent) => void;
|
|
128
|
+
onBlur: (event: React.FocusEvent) => void;
|
|
129
|
+
onMouseLeave: (event: React.MouseEvent) => void;
|
|
130
|
+
onMouseMove?: (event: React.MouseEvent) => void;
|
|
131
131
|
};
|
|
132
132
|
declare const useIsHovered: () => [boolean, HoverProps, (hovered: boolean) => void];
|
|
133
133
|
|
package/dist/index.d.ts
CHANGED
|
@@ -123,11 +123,11 @@ declare const useFocusTrap: (active?: boolean, options?: UseFocusTrapOptions) =>
|
|
|
123
123
|
declare const useForceUpdate: () => (() => void);
|
|
124
124
|
|
|
125
125
|
type HoverProps = {
|
|
126
|
-
onFocus: () => void;
|
|
127
|
-
onMouseEnter: () => void;
|
|
128
|
-
onBlur: () => void;
|
|
129
|
-
onMouseLeave: () => void;
|
|
130
|
-
onMouseMove?: () => void;
|
|
126
|
+
onFocus: (event: React.FocusEvent) => void;
|
|
127
|
+
onMouseEnter: (event: React.MouseEvent) => void;
|
|
128
|
+
onBlur: (event: React.FocusEvent) => void;
|
|
129
|
+
onMouseLeave: (event: React.MouseEvent) => void;
|
|
130
|
+
onMouseMove?: (event: React.MouseEvent) => void;
|
|
131
131
|
};
|
|
132
132
|
declare const useIsHovered: () => [boolean, HoverProps, (hovered: boolean) => void];
|
|
133
133
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/ui v0.18.
|
|
3
|
+
* @license @wistia/ui v0.18.9
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2024-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -2807,11 +2807,26 @@ var useForceUpdate = () => {
|
|
|
2807
2807
|
import { useState as useState6 } from "react";
|
|
2808
2808
|
var useIsHovered = () => {
|
|
2809
2809
|
const [isHovered, setIsHovered] = useState6(false);
|
|
2810
|
-
const onFocus = () =>
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
const
|
|
2810
|
+
const onFocus = (event) => {
|
|
2811
|
+
if (event.target !== event.currentTarget) return;
|
|
2812
|
+
setIsHovered(true);
|
|
2813
|
+
};
|
|
2814
|
+
const onMouseEnter = (event) => {
|
|
2815
|
+
if (event.target !== event.currentTarget) return;
|
|
2816
|
+
setIsHovered(true);
|
|
2817
|
+
};
|
|
2818
|
+
const onMouseMove = (event) => {
|
|
2819
|
+
if (event.target !== event.currentTarget) return;
|
|
2820
|
+
setIsHovered(true);
|
|
2821
|
+
};
|
|
2822
|
+
const onBlur = (event) => {
|
|
2823
|
+
if (event.target !== event.currentTarget) return;
|
|
2824
|
+
setIsHovered(false);
|
|
2825
|
+
};
|
|
2826
|
+
const onMouseLeave = (event) => {
|
|
2827
|
+
if (event.target !== event.currentTarget) return;
|
|
2828
|
+
setIsHovered(false);
|
|
2829
|
+
};
|
|
2815
2830
|
const hoverProps = {
|
|
2816
2831
|
onFocus,
|
|
2817
2832
|
onMouseEnter,
|