@pushwoosh/dumb-components 2.9.3 → 2.9.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.
@@ -1,11 +1,11 @@
1
- import type { RefObject, ReactNode } from 'react';
1
+ import type { Ref, RefObject, ReactNode } from 'react';
2
2
  import type { Placement } from 'tippy.js';
3
3
  /** Props of {@link Popover}. */
4
4
  export interface PopoverProps {
5
5
  /** Ref to the element the popover anchors to. */
6
- readonly anchorEl: RefObject<HTMLElement>;
6
+ readonly anchorEl: RefObject<HTMLElement | null>;
7
7
  /** Ref to the popover window, e.g. for click-outside detection. */
8
- readonly internalWindowRef?: RefObject<HTMLDivElement> | null;
8
+ readonly internalWindowRef?: Ref<HTMLDivElement>;
9
9
  /** Placement relative to the anchor (default `right-start`). */
10
10
  readonly position?: Placement;
11
11
  /** Whether the popover is open. */
@@ -24,7 +24,7 @@ export type TooltipProps = {
24
24
  /** Controlled visibility; omit for hover/focus behavior. */
25
25
  readonly isVisible?: boolean;
26
26
  /** External anchor ref to attach to instead of wrapping `children`. */
27
- readonly reference?: RefObject<Element>;
27
+ readonly reference?: RefObject<Element | null>;
28
28
  /** The anchor element the tooltip wraps. */
29
29
  readonly children?: ReactElement<unknown>;
30
30
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "2.9.3",
3
+ "version": "2.9.4",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",