@wistia/ui 0.18.8 → 0.18.9-beta.1a9d3a8c.f773a5a

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.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.8
3
+ * @license @wistia/ui v0.18.9-beta.1a9d3a8c.f773a5a
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 = () => setIsHovered(true);
2811
- const onMouseEnter = () => setIsHovered(true);
2812
- const onMouseMove = () => setIsHovered(true);
2813
- const onBlur = () => setIsHovered(false);
2814
- const onMouseLeave = () => setIsHovered(false);
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,
@@ -17796,7 +17811,7 @@ var StyledThumbnailBadge = styled105.div`
17796
17811
  gap: var(--wui-space-01);
17797
17812
  padding: 0 var(--wui-space-01);
17798
17813
  position: absolute;
17799
- right: var(--wui-thumbnail-badge-offset);
17814
+ right: var(--wui-thumbnail-badge-offset, var(--wui-space-01));
17800
17815
  z-index: 1;
17801
17816
 
17802
17817
  svg {
@@ -18158,7 +18173,11 @@ var StyledThumbnail = styled107.div`
18158
18173
  width: 100%;
18159
18174
  overflow: hidden;
18160
18175
  position: relative;
18161
- border-radius: clamp(var(--wui-border-radius-01), 8cqh, var(--wui-border-radius-05));
18176
+
18177
+ &,
18178
+ img {
18179
+ border-radius: clamp(var(--wui-border-radius-01), 8cqh, var(--wui-border-radius-05));
18180
+ }
18162
18181
 
18163
18182
  @container (min-width: 200px) {
18164
18183
  --wui-thumbnail-badge-offset: var(--wui-space-02);