@radix-ui/react-hover-card 1.0.8-rc.9 → 1.1.0-rc.1
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 +40 -28
- package/dist/index.d.ts +40 -28
- package/dist/index.js +258 -274
- package/dist/index.js.map +7 -1
- package/dist/index.mjs +244 -262
- package/dist/index.mjs.map +7 -1
- package/package.json +10 -11
- package/dist/index.d.ts.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,277 +1,259 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {composeEventHandlers
|
|
4
|
-
import {createContextScope
|
|
5
|
-
import {useControllableState
|
|
6
|
-
import {useComposedRefs
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
/* -------------------------------------------------------------------------------------------------
|
|
26
|
-
* HoverCard
|
|
27
|
-
* -----------------------------------------------------------------------------------------------*/ let $cef8881cdc69808e$var$originalBodyUserSelect;
|
|
28
|
-
const $cef8881cdc69808e$var$HOVERCARD_NAME = 'HoverCard';
|
|
29
|
-
const [$cef8881cdc69808e$var$createHoverCardContext, $cef8881cdc69808e$export$47b6998a836b7260] = $eRSIW$createContextScope($cef8881cdc69808e$var$HOVERCARD_NAME, [
|
|
30
|
-
$eRSIW$createPopperScope
|
|
1
|
+
// packages/react/hover-card/src/HoverCard.tsx
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { composeEventHandlers } from "@radix-ui/primitive";
|
|
4
|
+
import { createContextScope } from "@radix-ui/react-context";
|
|
5
|
+
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
|
6
|
+
import { useComposedRefs } from "@radix-ui/react-compose-refs";
|
|
7
|
+
import * as PopperPrimitive from "@radix-ui/react-popper";
|
|
8
|
+
import { createPopperScope } from "@radix-ui/react-popper";
|
|
9
|
+
import { Portal as PortalPrimitive } from "@radix-ui/react-portal";
|
|
10
|
+
import { Presence } from "@radix-ui/react-presence";
|
|
11
|
+
import { Primitive } from "@radix-ui/react-primitive";
|
|
12
|
+
import { DismissableLayer } from "@radix-ui/react-dismissable-layer";
|
|
13
|
+
import { jsx } from "react/jsx-runtime";
|
|
14
|
+
var originalBodyUserSelect;
|
|
15
|
+
var HOVERCARD_NAME = "HoverCard";
|
|
16
|
+
var [createHoverCardContext, createHoverCardScope] = createContextScope(HOVERCARD_NAME, [
|
|
17
|
+
createPopperScope
|
|
31
18
|
]);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
19
|
+
var usePopperScope = createPopperScope();
|
|
20
|
+
var [HoverCardProvider, useHoverCardContext] = createHoverCardContext(HOVERCARD_NAME);
|
|
21
|
+
var HoverCard = (props) => {
|
|
22
|
+
const {
|
|
23
|
+
__scopeHoverCard,
|
|
24
|
+
children,
|
|
25
|
+
open: openProp,
|
|
26
|
+
defaultOpen,
|
|
27
|
+
onOpenChange,
|
|
28
|
+
openDelay = 700,
|
|
29
|
+
closeDelay = 300
|
|
30
|
+
} = props;
|
|
31
|
+
const popperScope = usePopperScope(__scopeHoverCard);
|
|
32
|
+
const openTimerRef = React.useRef(0);
|
|
33
|
+
const closeTimerRef = React.useRef(0);
|
|
34
|
+
const hasSelectionRef = React.useRef(false);
|
|
35
|
+
const isPointerDownOnContentRef = React.useRef(false);
|
|
36
|
+
const [open = false, setOpen] = useControllableState({
|
|
37
|
+
prop: openProp,
|
|
38
|
+
defaultProp: defaultOpen,
|
|
39
|
+
onChange: onOpenChange
|
|
40
|
+
});
|
|
41
|
+
const handleOpen = React.useCallback(() => {
|
|
42
|
+
clearTimeout(closeTimerRef.current);
|
|
43
|
+
openTimerRef.current = window.setTimeout(() => setOpen(true), openDelay);
|
|
44
|
+
}, [openDelay, setOpen]);
|
|
45
|
+
const handleClose = React.useCallback(() => {
|
|
46
|
+
clearTimeout(openTimerRef.current);
|
|
47
|
+
if (!hasSelectionRef.current && !isPointerDownOnContentRef.current) {
|
|
48
|
+
closeTimerRef.current = window.setTimeout(() => setOpen(false), closeDelay);
|
|
49
|
+
}
|
|
50
|
+
}, [closeDelay, setOpen]);
|
|
51
|
+
const handleDismiss = React.useCallback(() => setOpen(false), [setOpen]);
|
|
52
|
+
React.useEffect(() => {
|
|
53
|
+
return () => {
|
|
54
|
+
clearTimeout(openTimerRef.current);
|
|
55
|
+
clearTimeout(closeTimerRef.current);
|
|
56
|
+
};
|
|
57
|
+
}, []);
|
|
58
|
+
return /* @__PURE__ */ jsx(
|
|
59
|
+
HoverCardProvider,
|
|
60
|
+
{
|
|
61
|
+
scope: __scopeHoverCard,
|
|
62
|
+
open,
|
|
63
|
+
onOpenChange: setOpen,
|
|
64
|
+
onOpen: handleOpen,
|
|
65
|
+
onClose: handleClose,
|
|
66
|
+
onDismiss: handleDismiss,
|
|
67
|
+
hasSelectionRef,
|
|
68
|
+
isPointerDownOnContentRef,
|
|
69
|
+
children: /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children })
|
|
70
|
+
}
|
|
71
|
+
);
|
|
82
72
|
};
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}, popperScope), /*#__PURE__*/ $eRSIW$createElement($eRSIW$Primitive.a, $eRSIW$babelruntimehelpersesmextends({
|
|
96
|
-
"data-state": context.open ? 'open' : 'closed'
|
|
97
|
-
}, triggerProps, {
|
|
73
|
+
HoverCard.displayName = HOVERCARD_NAME;
|
|
74
|
+
var TRIGGER_NAME = "HoverCardTrigger";
|
|
75
|
+
var HoverCardTrigger = React.forwardRef(
|
|
76
|
+
(props, forwardedRef) => {
|
|
77
|
+
const { __scopeHoverCard, ...triggerProps } = props;
|
|
78
|
+
const context = useHoverCardContext(TRIGGER_NAME, __scopeHoverCard);
|
|
79
|
+
const popperScope = usePopperScope(__scopeHoverCard);
|
|
80
|
+
return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
|
|
81
|
+
Primitive.a,
|
|
82
|
+
{
|
|
83
|
+
"data-state": context.open ? "open" : "closed",
|
|
84
|
+
...triggerProps,
|
|
98
85
|
ref: forwardedRef,
|
|
99
|
-
onPointerEnter:
|
|
100
|
-
onPointerLeave:
|
|
101
|
-
onFocus:
|
|
102
|
-
onBlur:
|
|
103
|
-
,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
86
|
+
onPointerEnter: composeEventHandlers(props.onPointerEnter, excludeTouch(context.onOpen)),
|
|
87
|
+
onPointerLeave: composeEventHandlers(props.onPointerLeave, excludeTouch(context.onClose)),
|
|
88
|
+
onFocus: composeEventHandlers(props.onFocus, context.onOpen),
|
|
89
|
+
onBlur: composeEventHandlers(props.onBlur, context.onClose),
|
|
90
|
+
onTouchStart: composeEventHandlers(props.onTouchStart, (event) => event.preventDefault())
|
|
91
|
+
}
|
|
92
|
+
) });
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
HoverCardTrigger.displayName = TRIGGER_NAME;
|
|
96
|
+
var PORTAL_NAME = "HoverCardPortal";
|
|
97
|
+
var [PortalProvider, usePortalContext] = createHoverCardContext(PORTAL_NAME, {
|
|
98
|
+
forceMount: void 0
|
|
110
99
|
});
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
forceMount: undefined
|
|
116
|
-
});
|
|
117
|
-
const $cef8881cdc69808e$export$b384c6e0a789f88b = (props)=>{
|
|
118
|
-
const { __scopeHoverCard: __scopeHoverCard , forceMount: forceMount , children: children , container: container } = props;
|
|
119
|
-
const context = $cef8881cdc69808e$var$useHoverCardContext($cef8881cdc69808e$var$PORTAL_NAME, __scopeHoverCard);
|
|
120
|
-
return /*#__PURE__*/ $eRSIW$createElement($cef8881cdc69808e$var$PortalProvider, {
|
|
121
|
-
scope: __scopeHoverCard,
|
|
122
|
-
forceMount: forceMount
|
|
123
|
-
}, /*#__PURE__*/ $eRSIW$createElement($eRSIW$Presence, {
|
|
124
|
-
present: forceMount || context.open
|
|
125
|
-
}, /*#__PURE__*/ $eRSIW$createElement($eRSIW$Portal, {
|
|
126
|
-
asChild: true,
|
|
127
|
-
container: container
|
|
128
|
-
}, children)));
|
|
100
|
+
var HoverCardPortal = (props) => {
|
|
101
|
+
const { __scopeHoverCard, forceMount, children, container } = props;
|
|
102
|
+
const context = useHoverCardContext(PORTAL_NAME, __scopeHoverCard);
|
|
103
|
+
return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeHoverCard, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });
|
|
129
104
|
};
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
const
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}, contentProps, {
|
|
145
|
-
onPointerEnter: $eRSIW$composeEventHandlers(props.onPointerEnter, $cef8881cdc69808e$var$excludeTouch(context.onOpen)),
|
|
146
|
-
onPointerLeave: $eRSIW$composeEventHandlers(props.onPointerLeave, $cef8881cdc69808e$var$excludeTouch(context.onClose)),
|
|
105
|
+
HoverCardPortal.displayName = PORTAL_NAME;
|
|
106
|
+
var CONTENT_NAME = "HoverCardContent";
|
|
107
|
+
var HoverCardContent = React.forwardRef(
|
|
108
|
+
(props, forwardedRef) => {
|
|
109
|
+
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeHoverCard);
|
|
110
|
+
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
111
|
+
const context = useHoverCardContext(CONTENT_NAME, props.__scopeHoverCard);
|
|
112
|
+
return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(
|
|
113
|
+
HoverCardContentImpl,
|
|
114
|
+
{
|
|
115
|
+
"data-state": context.open ? "open" : "closed",
|
|
116
|
+
...contentProps,
|
|
117
|
+
onPointerEnter: composeEventHandlers(props.onPointerEnter, excludeTouch(context.onOpen)),
|
|
118
|
+
onPointerLeave: composeEventHandlers(props.onPointerLeave, excludeTouch(context.onClose)),
|
|
147
119
|
ref: forwardedRef
|
|
148
|
-
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
context.isPointerDownOnContentRef
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
120
|
+
}
|
|
121
|
+
) });
|
|
122
|
+
}
|
|
123
|
+
);
|
|
124
|
+
HoverCardContent.displayName = CONTENT_NAME;
|
|
125
|
+
var HoverCardContentImpl = React.forwardRef((props, forwardedRef) => {
|
|
126
|
+
const {
|
|
127
|
+
__scopeHoverCard,
|
|
128
|
+
onEscapeKeyDown,
|
|
129
|
+
onPointerDownOutside,
|
|
130
|
+
onFocusOutside,
|
|
131
|
+
onInteractOutside,
|
|
132
|
+
...contentProps
|
|
133
|
+
} = props;
|
|
134
|
+
const context = useHoverCardContext(CONTENT_NAME, __scopeHoverCard);
|
|
135
|
+
const popperScope = usePopperScope(__scopeHoverCard);
|
|
136
|
+
const ref = React.useRef(null);
|
|
137
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
138
|
+
const [containSelection, setContainSelection] = React.useState(false);
|
|
139
|
+
React.useEffect(() => {
|
|
140
|
+
if (containSelection) {
|
|
141
|
+
const body = document.body;
|
|
142
|
+
originalBodyUserSelect = body.style.userSelect || body.style.webkitUserSelect;
|
|
143
|
+
body.style.userSelect = "none";
|
|
144
|
+
body.style.webkitUserSelect = "none";
|
|
145
|
+
return () => {
|
|
146
|
+
body.style.userSelect = originalBodyUserSelect;
|
|
147
|
+
body.style.webkitUserSelect = originalBodyUserSelect;
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
}, [containSelection]);
|
|
151
|
+
React.useEffect(() => {
|
|
152
|
+
if (ref.current) {
|
|
153
|
+
const handlePointerUp = () => {
|
|
154
|
+
setContainSelection(false);
|
|
155
|
+
context.isPointerDownOnContentRef.current = false;
|
|
156
|
+
setTimeout(() => {
|
|
157
|
+
const hasSelection = document.getSelection()?.toString() !== "";
|
|
158
|
+
if (hasSelection) context.hasSelectionRef.current = true;
|
|
159
|
+
});
|
|
160
|
+
};
|
|
161
|
+
document.addEventListener("pointerup", handlePointerUp);
|
|
162
|
+
return () => {
|
|
163
|
+
document.removeEventListener("pointerup", handlePointerUp);
|
|
164
|
+
context.hasSelectionRef.current = false;
|
|
165
|
+
context.isPointerDownOnContentRef.current = false;
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
}, [context.isPointerDownOnContentRef, context.hasSelectionRef]);
|
|
169
|
+
React.useEffect(() => {
|
|
170
|
+
if (ref.current) {
|
|
171
|
+
const tabbables = getTabbableNodes(ref.current);
|
|
172
|
+
tabbables.forEach((tabbable) => tabbable.setAttribute("tabindex", "-1"));
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
return /* @__PURE__ */ jsx(
|
|
176
|
+
DismissableLayer,
|
|
177
|
+
{
|
|
178
|
+
asChild: true,
|
|
179
|
+
disableOutsidePointerEvents: false,
|
|
180
|
+
onInteractOutside,
|
|
181
|
+
onEscapeKeyDown,
|
|
182
|
+
onPointerDownOutside,
|
|
183
|
+
onFocusOutside: composeEventHandlers(onFocusOutside, (event) => {
|
|
184
|
+
event.preventDefault();
|
|
185
|
+
}),
|
|
186
|
+
onDismiss: context.onDismiss,
|
|
187
|
+
children: /* @__PURE__ */ jsx(
|
|
188
|
+
PopperPrimitive.Content,
|
|
189
|
+
{
|
|
190
|
+
...popperScope,
|
|
191
|
+
...contentProps,
|
|
192
|
+
onPointerDown: composeEventHandlers(contentProps.onPointerDown, (event) => {
|
|
193
|
+
if (event.currentTarget.contains(event.target)) {
|
|
194
|
+
setContainSelection(true);
|
|
195
|
+
}
|
|
217
196
|
context.hasSelectionRef.current = false;
|
|
218
197
|
context.isPointerDownOnContentRef.current = true;
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
198
|
+
}),
|
|
199
|
+
ref: composedRefs,
|
|
200
|
+
style: {
|
|
222
201
|
...contentProps.style,
|
|
223
|
-
userSelect: containSelection ?
|
|
202
|
+
userSelect: containSelection ? "text" : void 0,
|
|
224
203
|
// Safari requires prefix
|
|
225
|
-
WebkitUserSelect: containSelection ?
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
204
|
+
WebkitUserSelect: containSelection ? "text" : void 0,
|
|
205
|
+
// re-namespace exposed content custom properties
|
|
206
|
+
...{
|
|
207
|
+
"--radix-hover-card-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
208
|
+
"--radix-hover-card-content-available-width": "var(--radix-popper-available-width)",
|
|
209
|
+
"--radix-hover-card-content-available-height": "var(--radix-popper-available-height)",
|
|
210
|
+
"--radix-hover-card-trigger-width": "var(--radix-popper-anchor-width)",
|
|
211
|
+
"--radix-hover-card-trigger-height": "var(--radix-popper-anchor-height)"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
231
214
|
}
|
|
232
|
-
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
* HoverCardArrow
|
|
236
|
-
* -----------------------------------------------------------------------------------------------*/ const $cef8881cdc69808e$var$ARROW_NAME = 'HoverCardArrow';
|
|
237
|
-
const $cef8881cdc69808e$export$b9744d3e7456d806 = /*#__PURE__*/ $eRSIW$forwardRef((props, forwardedRef)=>{
|
|
238
|
-
const { __scopeHoverCard: __scopeHoverCard , ...arrowProps } = props;
|
|
239
|
-
const popperScope = $cef8881cdc69808e$var$usePopperScope(__scopeHoverCard);
|
|
240
|
-
return /*#__PURE__*/ $eRSIW$createElement($eRSIW$Arrow, $eRSIW$babelruntimehelpersesmextends({}, popperScope, arrowProps, {
|
|
241
|
-
ref: forwardedRef
|
|
242
|
-
}));
|
|
215
|
+
)
|
|
216
|
+
}
|
|
217
|
+
);
|
|
243
218
|
});
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
;
|
|
219
|
+
var ARROW_NAME = "HoverCardArrow";
|
|
220
|
+
var HoverCardArrow = React.forwardRef(
|
|
221
|
+
(props, forwardedRef) => {
|
|
222
|
+
const { __scopeHoverCard, ...arrowProps } = props;
|
|
223
|
+
const popperScope = usePopperScope(__scopeHoverCard);
|
|
224
|
+
return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
|
225
|
+
}
|
|
226
|
+
);
|
|
227
|
+
HoverCardArrow.displayName = ARROW_NAME;
|
|
228
|
+
function excludeTouch(eventHandler) {
|
|
229
|
+
return (event) => event.pointerType === "touch" ? void 0 : eventHandler();
|
|
250
230
|
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
// for any kind of element that could be tabbed to.
|
|
261
|
-
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
262
|
-
}
|
|
263
|
-
});
|
|
264
|
-
while(walker.nextNode())nodes.push(walker.currentNode);
|
|
265
|
-
return nodes;
|
|
231
|
+
function getTabbableNodes(container) {
|
|
232
|
+
const nodes = [];
|
|
233
|
+
const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {
|
|
234
|
+
acceptNode: (node) => {
|
|
235
|
+
return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
while (walker.nextNode()) nodes.push(walker.currentNode);
|
|
239
|
+
return nodes;
|
|
266
240
|
}
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
241
|
+
var Root2 = HoverCard;
|
|
242
|
+
var Trigger = HoverCardTrigger;
|
|
243
|
+
var Portal = HoverCardPortal;
|
|
244
|
+
var Content2 = HoverCardContent;
|
|
245
|
+
var Arrow2 = HoverCardArrow;
|
|
246
|
+
export {
|
|
247
|
+
Arrow2 as Arrow,
|
|
248
|
+
Content2 as Content,
|
|
249
|
+
HoverCard,
|
|
250
|
+
HoverCardArrow,
|
|
251
|
+
HoverCardContent,
|
|
252
|
+
HoverCardPortal,
|
|
253
|
+
HoverCardTrigger,
|
|
254
|
+
Portal,
|
|
255
|
+
Root2 as Root,
|
|
256
|
+
Trigger,
|
|
257
|
+
createHoverCardScope
|
|
258
|
+
};
|
|
277
259
|
//# sourceMappingURL=index.mjs.map
|