@tamagui/popover 2.7.7 → 3.0.0-beta.643.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/cjs/Popover.cjs +509 -664
- package/dist/cjs/Popover.native.cjs +603 -0
- package/dist/cjs/Popover.native.js +536 -691
- package/dist/cjs/Popover.native.js.map +1 -1
- package/dist/cjs/index.cjs +10 -11
- package/dist/cjs/index.native.cjs +22 -0
- package/dist/cjs/index.native.js +10 -10
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/useFloatingContext.cjs +202 -234
- package/dist/cjs/useFloatingContext.native.cjs +36 -0
- package/dist/cjs/useFloatingContext.native.js +20 -27
- package/dist/cjs/useFloatingContext.native.js.map +1 -1
- package/dist/esm/Popover.mjs +473 -617
- package/dist/esm/Popover.mjs.map +1 -1
- package/dist/esm/Popover.native.js +499 -644
- package/dist/esm/Popover.native.js.map +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/index.native.js +3 -3
- package/dist/esm/useFloatingContext.mjs +186 -208
- package/dist/esm/useFloatingContext.mjs.map +1 -1
- package/dist/esm/useFloatingContext.native.js +4 -2
- package/dist/esm/useFloatingContext.native.js.map +1 -1
- package/dist/jsx/Popover.mjs +473 -617
- package/dist/jsx/Popover.mjs.map +1 -1
- package/dist/jsx/Popover.native.cjs +603 -0
- package/dist/jsx/Popover.native.js +536 -691
- package/dist/jsx/Popover.native.js.map +1 -1
- package/dist/jsx/index.js +3 -3
- package/dist/jsx/index.mjs +3 -3
- package/dist/jsx/index.native.cjs +22 -0
- package/dist/jsx/index.native.js +10 -10
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/useFloatingContext.mjs +186 -208
- package/dist/jsx/useFloatingContext.mjs.map +1 -1
- package/dist/jsx/useFloatingContext.native.cjs +36 -0
- package/dist/jsx/useFloatingContext.native.js +20 -27
- package/dist/jsx/useFloatingContext.native.js.map +1 -1
- package/package.json +22 -22
- package/src/Popover.tsx +115 -147
- package/types/Popover.d.ts +33 -109
- package/types/Popover.d.ts.map +1 -1
- package/types/useFloatingContext.d.ts.map +1 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs.map +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -5,245 +6,212 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
5
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
8
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
for (var name in all) __defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
12
13
|
};
|
|
13
14
|
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
16
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return to;
|
|
21
22
|
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
-
value: mod,
|
|
29
|
-
enumerable: true
|
|
23
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
+
value: mod,
|
|
25
|
+
enumerable: true
|
|
30
26
|
}) : target, mod));
|
|
31
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
-
value: true
|
|
33
|
-
}), mod);
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
34
28
|
var useFloatingContext_exports = {};
|
|
35
|
-
__export(useFloatingContext_exports, {
|
|
36
|
-
useFloatingContext: () => useFloatingContext
|
|
37
|
-
});
|
|
29
|
+
__export(useFloatingContext_exports, { useFloatingContext: () => useFloatingContext });
|
|
38
30
|
module.exports = __toCommonJS(useFloatingContext_exports);
|
|
39
31
|
var import_react = __toESM(require("react"), 1);
|
|
40
32
|
var import_floating = require("@tamagui/floating");
|
|
41
|
-
const useFloatingContext = ({
|
|
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
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
setOpenWithDelay();
|
|
227
|
-
} : void 0,
|
|
228
|
-
onLeaveReference: currentHoverable ? () => {
|
|
229
|
-
clearTimeout(restTimerRef.current);
|
|
230
|
-
clearTimeout(graceRef.current);
|
|
231
|
-
graceRef.current = setTimeout(() => {
|
|
232
|
-
onTriggerRef.current = false;
|
|
233
|
-
if (pendingCloseRef.current) {
|
|
234
|
-
pendingCloseRef.current = false;
|
|
235
|
-
setOpen(false, "hover");
|
|
236
|
-
return;
|
|
237
|
-
}
|
|
238
|
-
if (openRef.current) {
|
|
239
|
-
graceRef.current = setTimeout(() => {
|
|
240
|
-
if (openRef.current && !isOverFloatingRef.current && !handleCloseActiveRef.current) {
|
|
241
|
-
setOpen(false, "hover");
|
|
242
|
-
}
|
|
243
|
-
}, Math.max(250, closeDelay));
|
|
244
|
-
}
|
|
245
|
-
}, 40);
|
|
246
|
-
} : void 0
|
|
247
|
-
};
|
|
248
|
-
}, [setOpen]);
|
|
249
|
-
};
|
|
33
|
+
const useFloatingContext = ({ open, setOpen, disable, disableFocus, hoverable, role: roleProp = "dialog", focus: focusProp, groupId, delay: delayProp, restMs: restMsProp }) => {
|
|
34
|
+
"use no memo";
|
|
35
|
+
const openRef = import_react.default.useRef(open);
|
|
36
|
+
openRef.current = open;
|
|
37
|
+
const hoverableRef = import_react.default.useRef(hoverable);
|
|
38
|
+
hoverableRef.current = hoverable;
|
|
39
|
+
const disableRef = import_react.default.useRef(disable);
|
|
40
|
+
disableRef.current = disable;
|
|
41
|
+
const disableFocusRef = import_react.default.useRef(disableFocus);
|
|
42
|
+
disableFocusRef.current = disableFocus;
|
|
43
|
+
const roleRef = import_react.default.useRef(roleProp);
|
|
44
|
+
roleRef.current = roleProp;
|
|
45
|
+
const focusRef = import_react.default.useRef(focusProp);
|
|
46
|
+
focusRef.current = focusProp;
|
|
47
|
+
const groupIdRef = import_react.default.useRef(groupId);
|
|
48
|
+
groupIdRef.current = groupId;
|
|
49
|
+
const delayRef = import_react.default.useRef(delayProp);
|
|
50
|
+
delayRef.current = delayProp;
|
|
51
|
+
const restMsRef = import_react.default.useRef(restMsProp);
|
|
52
|
+
restMsRef.current = restMsProp;
|
|
53
|
+
const events = import_react.default.useMemo(() => (0, import_floating.createFloatingEvents)(), []);
|
|
54
|
+
const triggerElements = import_react.default.useMemo(() => new import_floating.PopupTriggerMap(), []);
|
|
55
|
+
import_react.default.useEffect(() => {
|
|
56
|
+
events.emit("openchange", { open });
|
|
57
|
+
}, [open, events]);
|
|
58
|
+
return import_react.default.useCallback((props) => {
|
|
59
|
+
const onTriggerRef = import_react.default.useRef(false);
|
|
60
|
+
const restTimerRef = import_react.default.useRef(void 0);
|
|
61
|
+
const graceRef = import_react.default.useRef(void 0);
|
|
62
|
+
const pendingCloseRef = import_react.default.useRef(false);
|
|
63
|
+
const isOverFloatingRef = import_react.default.useRef(false);
|
|
64
|
+
const handleCloseActiveRef = import_react.default.useRef(false);
|
|
65
|
+
import_react.default.useEffect(() => {
|
|
66
|
+
return () => {
|
|
67
|
+
clearTimeout(restTimerRef.current);
|
|
68
|
+
clearTimeout(graceRef.current);
|
|
69
|
+
};
|
|
70
|
+
}, []);
|
|
71
|
+
const onOpenChange = (val, event) => {
|
|
72
|
+
if (val && event?.type === "mouseenter") {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (!val && onTriggerRef.current && (event?.type === "mousemove" || event?.type === "mouseleave")) {
|
|
76
|
+
pendingCloseRef.current = true;
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const type = event?.type === "mousemove" || event?.type === "mouseenter" || event?.type === "mouseleave" ? "hover" : "press";
|
|
80
|
+
setOpen(val, type);
|
|
81
|
+
};
|
|
82
|
+
const floating = (0, import_floating.useFloatingRaw)({
|
|
83
|
+
...props,
|
|
84
|
+
open: openRef.current
|
|
85
|
+
});
|
|
86
|
+
const currentHoverable = hoverableRef.current;
|
|
87
|
+
const dataRef = import_react.default.useRef({});
|
|
88
|
+
dataRef.current.placement = floating.placement;
|
|
89
|
+
const floatingRefs = floating.refs;
|
|
90
|
+
const nullRef = { current: null };
|
|
91
|
+
const interactionContext = {
|
|
92
|
+
open: openRef.current,
|
|
93
|
+
onOpenChange,
|
|
94
|
+
refs: {
|
|
95
|
+
reference: floatingRefs?.reference || nullRef,
|
|
96
|
+
floating: floatingRefs?.floating || nullRef,
|
|
97
|
+
domReference: floatingRefs?.reference || nullRef
|
|
98
|
+
},
|
|
99
|
+
elements: {
|
|
100
|
+
get reference() {
|
|
101
|
+
return floatingRefs?.reference?.current || null;
|
|
102
|
+
},
|
|
103
|
+
get floating() {
|
|
104
|
+
return floatingRefs?.floating?.current || null;
|
|
105
|
+
},
|
|
106
|
+
get domReference() {
|
|
107
|
+
return floatingRefs?.reference?.current || null;
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
dataRef,
|
|
111
|
+
events,
|
|
112
|
+
triggerElements,
|
|
113
|
+
handleCloseActiveRef
|
|
114
|
+
};
|
|
115
|
+
const { delay: groupDelay, currentId: groupCurrentId } = (0, import_floating.useDelayGroup)(interactionContext, { id: groupIdRef.current });
|
|
116
|
+
const isInActiveGroup = groupIdRef.current && groupCurrentId != null && typeof groupDelay === "object";
|
|
117
|
+
let delay;
|
|
118
|
+
let restMs;
|
|
119
|
+
if (isInActiveGroup) {
|
|
120
|
+
delay = groupDelay;
|
|
121
|
+
restMs = 0;
|
|
122
|
+
} else if (delayRef.current !== void 0) {
|
|
123
|
+
delay = delayRef.current;
|
|
124
|
+
restMs = restMsRef.current ?? 0;
|
|
125
|
+
} else {
|
|
126
|
+
delay = currentHoverable && typeof currentHoverable === "object" ? currentHoverable.delay ?? 0 : 0;
|
|
127
|
+
restMs = currentHoverable && typeof currentHoverable === "object" ? currentHoverable.restMs ?? 0 : 0;
|
|
128
|
+
}
|
|
129
|
+
const currentRole = roleRef.current;
|
|
130
|
+
const currentFocus = focusRef.current;
|
|
131
|
+
const { getReferenceProps, getFloatingProps: getFloatingPropsInner } = (0, import_floating.useInteractions)([
|
|
132
|
+
currentHoverable ? (0, import_floating.useHover)(interactionContext, {
|
|
133
|
+
enabled: !disableRef.current && !!currentHoverable,
|
|
134
|
+
delay,
|
|
135
|
+
restMs,
|
|
136
|
+
handleClose: (0, import_floating.safePolygon)({
|
|
137
|
+
requireIntent: true,
|
|
138
|
+
buffer: 1,
|
|
139
|
+
__debug: typeof window !== "undefined" && new URLSearchParams(window.location.search).get("debug") === "safePolygon"
|
|
140
|
+
}),
|
|
141
|
+
...typeof currentHoverable === "object" && currentHoverable
|
|
142
|
+
}) : (0, import_floating.useHover)(interactionContext, { enabled: false }),
|
|
143
|
+
(0, import_floating.useFocus)(interactionContext, {
|
|
144
|
+
enabled: !disableRef.current && !disableFocusRef.current,
|
|
145
|
+
visibleOnly: true,
|
|
146
|
+
...currentFocus
|
|
147
|
+
}),
|
|
148
|
+
(0, import_floating.useRole)(interactionContext, { role: currentRole })
|
|
149
|
+
]);
|
|
150
|
+
const getFloatingProps = currentHoverable ? (userProps) => {
|
|
151
|
+
const merged = getFloatingPropsInner(userProps);
|
|
152
|
+
const origEnter = merged.onMouseEnter;
|
|
153
|
+
const origLeave = merged.onMouseLeave;
|
|
154
|
+
return {
|
|
155
|
+
...merged,
|
|
156
|
+
onMouseEnter: (e) => {
|
|
157
|
+
isOverFloatingRef.current = true;
|
|
158
|
+
origEnter?.(e);
|
|
159
|
+
},
|
|
160
|
+
onMouseLeave: (e) => {
|
|
161
|
+
isOverFloatingRef.current = false;
|
|
162
|
+
origLeave?.(e);
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
} : getFloatingPropsInner;
|
|
166
|
+
const openDelay = typeof delay === "number" ? delay : delay?.open ?? 0;
|
|
167
|
+
const closeDelay = typeof delay === "number" ? delay : delay?.close ?? 0;
|
|
168
|
+
const setOpenWithDelay = () => {
|
|
169
|
+
clearTimeout(restTimerRef.current);
|
|
170
|
+
if (restMs && !openDelay) {
|
|
171
|
+
restTimerRef.current = setTimeout(() => {
|
|
172
|
+
setOpen(true, "hover");
|
|
173
|
+
}, restMs);
|
|
174
|
+
} else if (openDelay) {
|
|
175
|
+
restTimerRef.current = setTimeout(() => {
|
|
176
|
+
setOpen(true, "hover");
|
|
177
|
+
}, openDelay);
|
|
178
|
+
} else {
|
|
179
|
+
setOpen(true, "hover");
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
return {
|
|
183
|
+
...floating,
|
|
184
|
+
open: openRef.current,
|
|
185
|
+
triggerElements,
|
|
186
|
+
getReferenceProps,
|
|
187
|
+
getFloatingProps,
|
|
188
|
+
onHoverReference: currentHoverable ? (_event) => {
|
|
189
|
+
clearTimeout(graceRef.current);
|
|
190
|
+
onTriggerRef.current = true;
|
|
191
|
+
pendingCloseRef.current = false;
|
|
192
|
+
clearTimeout(restTimerRef.current);
|
|
193
|
+
if (openRef.current) return;
|
|
194
|
+
setOpenWithDelay();
|
|
195
|
+
} : void 0,
|
|
196
|
+
onLeaveReference: currentHoverable ? () => {
|
|
197
|
+
clearTimeout(restTimerRef.current);
|
|
198
|
+
clearTimeout(graceRef.current);
|
|
199
|
+
graceRef.current = setTimeout(() => {
|
|
200
|
+
onTriggerRef.current = false;
|
|
201
|
+
if (pendingCloseRef.current) {
|
|
202
|
+
pendingCloseRef.current = false;
|
|
203
|
+
setOpen(false, "hover");
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
if (openRef.current) {
|
|
207
|
+
graceRef.current = setTimeout(() => {
|
|
208
|
+
if (openRef.current && !isOverFloatingRef.current && !handleCloseActiveRef.current) {
|
|
209
|
+
setOpen(false, "hover");
|
|
210
|
+
}
|
|
211
|
+
}, Math.max(250, closeDelay));
|
|
212
|
+
}
|
|
213
|
+
}, 40);
|
|
214
|
+
} : void 0
|
|
215
|
+
};
|
|
216
|
+
}, [setOpen]);
|
|
217
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var __create = Object.create;
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __export = (target, all) => {
|
|
11
|
+
for (var name in all) __defProp(target, name, {
|
|
12
|
+
get: all[name],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
var __copyProps = (to, from, except, desc) => {
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
19
|
+
get: () => from[key],
|
|
20
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
24
|
+
};
|
|
25
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
+
value: mod,
|
|
27
|
+
enumerable: true
|
|
28
|
+
}) : target, mod));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var useFloatingContext_native_exports = {};
|
|
31
|
+
__export(useFloatingContext_native_exports, { useFloatingContext: () => useFloatingContext });
|
|
32
|
+
module.exports = __toCommonJS(useFloatingContext_native_exports);
|
|
33
|
+
var import_react = __toESM(require("react"), 1);
|
|
34
|
+
var useFloatingContext = function() {
|
|
35
|
+
return import_react.default.useCallback(function() {}, []);
|
|
36
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
var __create = Object.create;
|
|
4
5
|
var __defProp = Object.defineProperty;
|
|
5
6
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -7,39 +8,31 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
|
7
8
|
var __getProtoOf = Object.getPrototypeOf;
|
|
8
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
10
|
var __export = (target, all) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
for (var name in all) __defProp(target, name, {
|
|
12
|
+
get: all[name],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
14
15
|
};
|
|
15
16
|
var __copyProps = (to, from, except, desc) => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
18
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
19
|
+
get: () => from[key],
|
|
20
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
return to;
|
|
23
24
|
};
|
|
24
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
30
|
-
value: mod,
|
|
31
|
-
enumerable: true
|
|
25
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
26
|
+
value: mod,
|
|
27
|
+
enumerable: true
|
|
32
28
|
}) : target, mod));
|
|
33
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
34
|
-
value: true
|
|
35
|
-
}), mod);
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
36
30
|
var useFloatingContext_native_exports = {};
|
|
37
|
-
__export(useFloatingContext_native_exports, {
|
|
38
|
-
useFloatingContext: () => useFloatingContext
|
|
39
|
-
});
|
|
31
|
+
__export(useFloatingContext_native_exports, { useFloatingContext: () => useFloatingContext });
|
|
40
32
|
module.exports = __toCommonJS(useFloatingContext_native_exports);
|
|
41
33
|
var import_react = __toESM(require("react"), 1);
|
|
42
|
-
var useFloatingContext = function
|
|
43
|
-
|
|
34
|
+
var useFloatingContext = function() {
|
|
35
|
+
return import_react.default.useCallback(function() {}, []);
|
|
44
36
|
};
|
|
37
|
+
|
|
45
38
|
//# sourceMappingURL=useFloatingContext.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"useFloatingContext.native.js","names":[],"sources":["cjs/useFloatingContext.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar useFloatingContext_native_exports = {};\n__export(useFloatingContext_native_exports, {\n useFloatingContext: () => useFloatingContext\n});\nmodule.exports = __toCommonJS(useFloatingContext_native_exports);\nvar import_react = __toESM(require(\"react\"), 1);\nvar useFloatingContext = function() {\n return import_react.default.useCallback(function() {\n }, []);\n};\n//# sourceMappingURL=useFloatingContext.native.js.map\n"],"mappings":";;;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,WAAW,KAAK,YAAY,YAAY,SAAS,OAAO,OAAO,SAAS,aAAa,GAAG,CAAC,IAAI,CAAC,GAAG,YAKnG,cAAc,CAAC,OAAO,CAAC,IAAI,aAAa,UAAU,QAAQ,WAAW;CAAE,OAAO;CAAK,YAAY;AAAK,CAAC,IAAI,QACzG,GACF;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,oCAAoC,CAAC;AACzC,SAAS,mCAAmC,EAC1C,0BAA0B,mBAC5B,CAAC;AACD,OAAO,UAAU,aAAa,iCAAiC;AAC/D,IAAI,eAAe,QAAQ,QAAQ,OAAO,GAAG,CAAC;AAC9C,IAAI,qBAAqB,WAAW;CAClC,OAAO,aAAa,QAAQ,YAAY,WAAW,CACnD,GAAG,CAAC,CAAC;AACP"}
|