@danxbot/ui 15.8.0 → 15.9.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.
- package/dist/index.js +17 -6
- package/dist/index.js.map +1 -1
- package/dist/types/components/Popover.d.ts +19 -1
- package/package.json +1 -1
|
@@ -31,6 +31,24 @@ export interface PopoverProps {
|
|
|
31
31
|
className?: string;
|
|
32
32
|
children: ReactNode;
|
|
33
33
|
ref?: Ref<HTMLDivElement>;
|
|
34
|
+
/**
|
|
35
|
+
* DX-3662 — open the popover on hover, not just on click, WITHOUT a
|
|
36
|
+
* consumer hand-rolling its own mouseenter/mouseleave state alongside the
|
|
37
|
+
* trigger's own click-to-open. Forwards straight to Base UI's
|
|
38
|
+
* `Popover.Trigger` (`openOnHover`/`delay`/`closeDelay` below), which
|
|
39
|
+
* already coordinates hover, click and touch as ONE state machine
|
|
40
|
+
* (`useHoverReferenceInteraction` + `useClick`, both reading the same
|
|
41
|
+
* `openMethod`/`openReason` store) — a real touch tap is tracked as
|
|
42
|
+
* `openMethod: 'touch'` and is exempted from the hover-close path
|
|
43
|
+
* (`PopoverTrigger`'s own `enabled` check), so it does not fight a
|
|
44
|
+
* subsequent tap the way two independently-owned state machines would.
|
|
45
|
+
* Off by default — every existing click-only popover is unaffected.
|
|
46
|
+
*/
|
|
47
|
+
openOnHover?: boolean;
|
|
48
|
+
/** Hover-open delay, ms. Matches Base UI's own `restMs` default (`OPEN_DELAY`) when unset. Only meaningful with `openOnHover`. */
|
|
49
|
+
delay?: number;
|
|
50
|
+
/** Hover-CLOSE delay, ms — how long the popover survives after the pointer leaves BOTH the trigger and the popup before it closes, so crossing the gap between them doesn't flicker it shut. Only meaningful with `openOnHover`. */
|
|
51
|
+
closeDelay?: number;
|
|
34
52
|
/**
|
|
35
53
|
* Render open on mount. Uncontrolled — the popover still closes on its own
|
|
36
54
|
* afterwards; this only decides the starting state.
|
|
@@ -66,7 +84,7 @@ export interface PopoverProps {
|
|
|
66
84
|
"aria-labelledby"?: string;
|
|
67
85
|
"aria-label"?: string;
|
|
68
86
|
}
|
|
69
|
-
export declare function Popover({ trigger, open, side, align, arrow, width, className, children, ref, defaultOpen, onOpenChange, "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel, }: PopoverProps): import("react").JSX.Element;
|
|
87
|
+
export declare function Popover({ trigger, open, side, align, arrow, width, className, children, ref, defaultOpen, onOpenChange, openOnHover, delay, closeDelay, "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel, }: PopoverProps): import("react").JSX.Element;
|
|
70
88
|
/** Closes the nearest Popover. */
|
|
71
89
|
export declare function PopoverClose({ children }: {
|
|
72
90
|
children: ReactNode;
|