@hanzogui/popper 3.0.2 → 7.3.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/LICENSE +40 -19
- package/dist/cjs/Popper.cjs +492 -460
- package/dist/cjs/Popper.native.js +514 -517
- package/dist/cjs/Popper.native.js.map +1 -1
- package/dist/cjs/index.cjs +7 -5
- package/dist/cjs/index.native.js +8 -6
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/Popper.mjs +456 -426
- package/dist/esm/Popper.mjs.map +1 -1
- package/dist/esm/Popper.native.js +489 -495
- package/dist/esm/Popper.native.js.map +1 -1
- package/dist/jsx/Popper.mjs +456 -426
- package/dist/jsx/Popper.mjs.map +1 -1
- package/dist/jsx/Popper.native.js +514 -517
- package/dist/jsx/Popper.native.js.map +1 -1
- package/dist/jsx/index.native.js +7 -5
- package/package.json +18 -15
- package/src/Popper.tsx +8 -8
- package/types/Popper.d.ts +28 -28
- package/types/Popper.d.ts.map +1 -0
- package/types/index.d.ts.map +1 -0
|
@@ -4,140 +4,138 @@ import { useComposedRefs } from "@hanzogui/compose-refs";
|
|
|
4
4
|
import { isWeb, useIsomorphicLayoutEffect } from "@hanzogui/constants";
|
|
5
5
|
import { LayoutMeasurementController, View as GuiView, createStyledContext, getVariableValue, registerLayoutNode, styled } from "@hanzogui/core";
|
|
6
6
|
import { FloatingOverrideContext } from "@hanzogui/floating";
|
|
7
|
-
import { arrow, flip, getOverflowAncestors, offset as offsetFn, platform, shift, useFloating } from "@hanzogui/floating";
|
|
7
|
+
import { arrow, flip, getOverflowAncestors, offset as offsetFn, platform, shift, size as sizeMiddleware, useFloating } from "@hanzogui/floating";
|
|
8
8
|
import { getSpace } from "@hanzogui/get-token";
|
|
9
9
|
import { YStack } from "@hanzogui/stacks";
|
|
10
10
|
import { startTransition } from "@hanzogui/start-transition";
|
|
11
11
|
import * as React from "react";
|
|
12
12
|
import { Keyboard, useWindowDimensions } from "react-native";
|
|
13
13
|
function _instanceof(left, right) {
|
|
14
|
-
|
|
14
|
+
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) return !!right[Symbol.hasInstance](left);else return left instanceof right;
|
|
15
15
|
}
|
|
16
16
|
function _type_of(obj) {
|
|
17
17
|
"@swc/helpers - typeof";
|
|
18
18
|
|
|
19
|
-
return obj && typeof Symbol
|
|
19
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
20
20
|
}
|
|
21
21
|
var PopperContextFast = createStyledContext(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
22
|
+
// since we always provide this we can avoid setting here
|
|
23
|
+
{}, "Popper__");
|
|
24
|
+
var PopperPositionContext = createStyledContext;
|
|
25
|
+
var {
|
|
26
|
+
useStyledContext: usePopperContext,
|
|
27
|
+
Provider: PopperProviderFast
|
|
28
|
+
} = PopperContextFast;
|
|
29
|
+
var PopperContextSlow = createStyledContext(
|
|
30
|
+
// since we always provide this we can avoid setting here
|
|
31
|
+
{}, "PopperSlow__");
|
|
32
|
+
var {
|
|
33
|
+
useStyledContext: usePopperContextSlow,
|
|
34
|
+
Provider: PopperProviderSlow
|
|
35
|
+
} = PopperContextSlow;
|
|
36
|
+
var PopperProvider = function (param) {
|
|
37
|
+
var {
|
|
38
|
+
scope,
|
|
39
|
+
children,
|
|
40
|
+
...context
|
|
41
|
+
} = param;
|
|
42
|
+
var fns = React.useRef(context);
|
|
43
|
+
fns.current = context;
|
|
44
|
+
var [slowContext] = React.useState(function () {
|
|
45
|
+
return {
|
|
46
|
+
refs: context.refs,
|
|
47
|
+
triggerElements: context.triggerElements,
|
|
48
|
+
update() {
|
|
49
|
+
for (var _len = arguments.length, a = new Array(_len), _key = 0; _key < _len; _key++) a[_key] = arguments[_key];
|
|
50
|
+
fns.current.update(...a);
|
|
51
|
+
},
|
|
52
|
+
getReferenceProps(p) {
|
|
53
|
+
var _fns_current_getReferenceProps, _fns_current;
|
|
54
|
+
return (_fns_current_getReferenceProps = (_fns_current = fns.current).getReferenceProps) === null || _fns_current_getReferenceProps === void 0 ? void 0 : _fns_current_getReferenceProps.call(_fns_current, p);
|
|
55
|
+
},
|
|
56
|
+
onHoverReference(e) {
|
|
57
|
+
var _fns_current_onHoverReference, _fns_current;
|
|
58
|
+
(_fns_current_onHoverReference = (_fns_current = fns.current).onHoverReference) === null || _fns_current_onHoverReference === void 0 || _fns_current_onHoverReference.call(_fns_current, e);
|
|
59
|
+
},
|
|
60
|
+
onLeaveReference() {
|
|
61
|
+
var _fns_current_onLeaveReference, _fns_current;
|
|
62
|
+
(_fns_current_onLeaveReference = (_fns_current = fns.current).onLeaveReference) === null || _fns_current_onLeaveReference === void 0 || _fns_current_onLeaveReference.call(_fns_current);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
});
|
|
66
|
+
return /* @__PURE__ */_jsx(PopperProviderFast, {
|
|
67
|
+
scope,
|
|
68
|
+
...context,
|
|
69
|
+
children: /* @__PURE__ */_jsx(PopperProviderSlow, {
|
|
67
70
|
scope,
|
|
68
|
-
...
|
|
69
|
-
children
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
setupOptions = {};
|
|
71
|
+
...slowContext,
|
|
72
|
+
children
|
|
73
|
+
})
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
var checkFloating = {
|
|
77
|
+
name: "checkFloating",
|
|
78
|
+
fn(data) {
|
|
79
|
+
return {
|
|
80
|
+
data: {
|
|
81
|
+
hasFloating: !!data.rects.floating.width
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
var setupOptions = {};
|
|
87
87
|
function setupPopper(options) {
|
|
88
88
|
Object.assign(setupOptions, options);
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function guiAutoUpdate(reference, floating, update) {
|
|
91
91
|
update();
|
|
92
92
|
var rafId = requestAnimationFrame(function () {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
_didIteratorError =
|
|
93
|
+
update();
|
|
94
|
+
rafId = 0;
|
|
95
|
+
});
|
|
96
|
+
var cleanups = [function () {
|
|
97
|
+
if (rafId) cancelAnimationFrame(rafId);
|
|
98
|
+
}];
|
|
99
|
+
if (_instanceof(reference, HTMLElement)) cleanups.push(registerLayoutNode(reference, update));
|
|
100
|
+
var ancestors = [...(_instanceof(reference, Element) ? getOverflowAncestors(reference) : []), ...getOverflowAncestors(floating)];
|
|
101
|
+
var uniqueAncestors = [...new Set(ancestors)];
|
|
102
|
+
var _iteratorNormalCompletion = true,
|
|
103
|
+
_didIteratorError = false,
|
|
104
104
|
_iteratorError = void 0;
|
|
105
105
|
try {
|
|
106
|
-
for (var _iterator = uniqueAncestors[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion =
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
passive: !0
|
|
110
|
-
});
|
|
111
|
-
}
|
|
106
|
+
for (var _iterator = uniqueAncestors[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) _step.value.addEventListener("scroll", update, {
|
|
107
|
+
passive: true
|
|
108
|
+
});
|
|
112
109
|
} catch (err) {
|
|
113
|
-
_didIteratorError =
|
|
110
|
+
_didIteratorError = true;
|
|
111
|
+
_iteratorError = err;
|
|
114
112
|
} finally {
|
|
115
113
|
try {
|
|
116
|
-
!_iteratorNormalCompletion && _iterator.return != null
|
|
114
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
117
115
|
} finally {
|
|
118
116
|
if (_didIteratorError) throw _iteratorError;
|
|
119
117
|
}
|
|
120
118
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
119
|
+
window.addEventListener("resize", update);
|
|
120
|
+
cleanups.push(function () {
|
|
121
|
+
var _iteratorNormalCompletion2 = true,
|
|
122
|
+
_didIteratorError2 = false,
|
|
124
123
|
_iteratorError2 = void 0;
|
|
125
124
|
try {
|
|
126
|
-
for (var _iterator2 = uniqueAncestors[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 =
|
|
127
|
-
var ancestor2 = _step2.value;
|
|
128
|
-
ancestor2.removeEventListener("scroll", update);
|
|
129
|
-
}
|
|
125
|
+
for (var _iterator2 = uniqueAncestors[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) _step2.value.removeEventListener("scroll", update);
|
|
130
126
|
} catch (err) {
|
|
131
|
-
_didIteratorError2 =
|
|
127
|
+
_didIteratorError2 = true;
|
|
128
|
+
_iteratorError2 = err;
|
|
132
129
|
} finally {
|
|
133
130
|
try {
|
|
134
|
-
!_iteratorNormalCompletion2 && _iterator2.return != null
|
|
131
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
|
|
135
132
|
} finally {
|
|
136
133
|
if (_didIteratorError2) throw _iteratorError2;
|
|
137
134
|
}
|
|
138
135
|
}
|
|
139
136
|
window.removeEventListener("resize", update);
|
|
140
|
-
})
|
|
137
|
+
});
|
|
138
|
+
return function () {
|
|
141
139
|
return cleanups.forEach(function (fn) {
|
|
142
140
|
return fn();
|
|
143
141
|
});
|
|
@@ -145,437 +143,433 @@ function tamaguiAutoUpdate(reference, floating, update) {
|
|
|
145
143
|
}
|
|
146
144
|
function Popper(props) {
|
|
147
145
|
var {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
isOpen
|
|
168
|
-
// order matters: offset first, then flip, then shift, then arrow
|
|
169
|
-
typeof offsetOptions < "u" ? offsetFn(offsetOptions) : null, allowFlip ? flip(typeof allowFlip == "boolean" ? {} : allowFlip) : null,
|
|
170
|
-
// NOTE: shift's axis terminology is reversed vs flip/offset:
|
|
171
|
-
// for top/bottom placements: mainAxis = horizontal, crossAxis = vertical
|
|
172
|
-
// for left/right placements: mainAxis = vertical, crossAxis = horizontal
|
|
173
|
-
// default to horizontal shift only (mainAxis: true, crossAxis: false)
|
|
174
|
-
stayInFrame ? shift({
|
|
146
|
+
children,
|
|
147
|
+
size,
|
|
148
|
+
strategy = "absolute",
|
|
149
|
+
placement = "bottom",
|
|
150
|
+
stayInFrame,
|
|
151
|
+
allowFlip,
|
|
152
|
+
offset,
|
|
153
|
+
disableRTL,
|
|
154
|
+
resize,
|
|
155
|
+
passThrough,
|
|
156
|
+
open,
|
|
157
|
+
scope
|
|
158
|
+
} = props;
|
|
159
|
+
var [arrowEl, setArrow] = React.useState(null);
|
|
160
|
+
var [arrowSize, setArrowSize] = React.useState(0);
|
|
161
|
+
var offsetOptions = offset !== null && offset !== void 0 ? offset : arrowSize;
|
|
162
|
+
React.useRef({});
|
|
163
|
+
var isOpen = passThrough ? false : open !== null && open !== void 0 ? open : true;
|
|
164
|
+
var middlewareRef = React.useRef([]);
|
|
165
|
+
if (isOpen) middlewareRef.current = [typeof offsetOptions !== "undefined" ? offsetFn(offsetOptions) : null, allowFlip ? flip(typeof allowFlip === "boolean" ? {} : allowFlip) : null, stayInFrame ? shift({
|
|
175
166
|
padding: 10,
|
|
176
|
-
mainAxis:
|
|
177
|
-
crossAxis:
|
|
178
|
-
...((typeof stayInFrame
|
|
167
|
+
mainAxis: true,
|
|
168
|
+
crossAxis: false,
|
|
169
|
+
...((typeof stayInFrame === "undefined" ? "undefined" : _type_of(stayInFrame)) === "object" ? stayInFrame : null)
|
|
179
170
|
}) : null, arrowEl ? arrow({
|
|
180
171
|
element: arrowEl
|
|
181
|
-
}) : null, checkFloating, null, null, null].filter(Boolean)
|
|
172
|
+
}) : null, checkFloating, null, null, null].filter(Boolean);
|
|
182
173
|
var floating = useFloating({
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
platform
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
[keyboardOpen, setKeyboardOpen] = React.useState(!1);
|
|
174
|
+
open: isOpen,
|
|
175
|
+
strategy,
|
|
176
|
+
placement,
|
|
177
|
+
sameScrollView: false,
|
|
178
|
+
whileElementsMounted: !isOpen ? void 0 : guiAutoUpdate,
|
|
179
|
+
platform: (disableRTL !== null && disableRTL !== void 0 ? disableRTL : setupOptions.disableRTL) ? {
|
|
180
|
+
...platform,
|
|
181
|
+
isRTL(element) {
|
|
182
|
+
return false;
|
|
183
|
+
}
|
|
184
|
+
} : platform,
|
|
185
|
+
middleware: middlewareRef.current
|
|
186
|
+
});
|
|
187
|
+
var {
|
|
188
|
+
middlewareData
|
|
189
|
+
} = floating;
|
|
190
|
+
var dimensions = useWindowDimensions();
|
|
191
|
+
var [keyboardOpen, setKeyboardOpen] = React.useState(false);
|
|
202
192
|
React.useEffect(function () {
|
|
203
193
|
var showSubscription = Keyboard.addListener("keyboardDidShow", function () {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
});
|
|
194
|
+
startTransition(function () {
|
|
195
|
+
setKeyboardOpen(true);
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
var hideSubscription = Keyboard.addListener("keyboardDidHide", function () {
|
|
199
|
+
startTransition(function () {
|
|
200
|
+
setKeyboardOpen(false);
|
|
212
201
|
});
|
|
202
|
+
});
|
|
213
203
|
return function () {
|
|
214
|
-
showSubscription.remove()
|
|
204
|
+
showSubscription.remove();
|
|
205
|
+
hideSubscription.remove();
|
|
215
206
|
};
|
|
216
|
-
}, [])
|
|
217
|
-
|
|
207
|
+
}, []);
|
|
208
|
+
useIsomorphicLayoutEffect(function () {
|
|
209
|
+
if (passThrough) return;
|
|
210
|
+
floating.update();
|
|
218
211
|
}, [passThrough, dimensions, keyboardOpen]);
|
|
219
|
-
var popperContext = React.useMemo(function () {
|
|
220
|
-
var _middlewareData_checkFloating;
|
|
221
|
-
return {
|
|
222
|
-
size,
|
|
223
|
-
arrowRef: setArrow,
|
|
224
|
-
arrowStyle: middlewareData.arrow,
|
|
225
|
-
onArrowSize: setArrowSize,
|
|
226
|
-
hasFloating: (_middlewareData_checkFloating = middlewareData.checkFloating) === null || _middlewareData_checkFloating === void 0 ? void 0 : _middlewareData_checkFloating.hasFloating,
|
|
227
|
-
transformOrigin: middlewareData.transformOrigin,
|
|
228
|
-
open: !!open,
|
|
229
|
-
...floating
|
|
230
|
-
};
|
|
231
|
-
}, [open, size, floating, JSON.stringify(middlewareData.arrow || null), JSON.stringify(middlewareData.transformOrigin || null)]);
|
|
232
212
|
return /* @__PURE__ */_jsx(PopperProvider, {
|
|
233
213
|
scope,
|
|
234
|
-
...
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
214
|
+
...React.useMemo(function () {
|
|
215
|
+
var _middlewareData_checkFloating;
|
|
216
|
+
return {
|
|
217
|
+
size,
|
|
218
|
+
arrowRef: setArrow,
|
|
219
|
+
arrowStyle: middlewareData.arrow,
|
|
220
|
+
onArrowSize: setArrowSize,
|
|
221
|
+
hasFloating: (_middlewareData_checkFloating = middlewareData.checkFloating) === null || _middlewareData_checkFloating === void 0 ? void 0 : _middlewareData_checkFloating.hasFloating,
|
|
222
|
+
transformOrigin: middlewareData.transformOrigin,
|
|
223
|
+
open: !!open,
|
|
224
|
+
...floating
|
|
225
|
+
};
|
|
226
|
+
}, [open, size, floating, JSON.stringify(middlewareData.arrow || null), JSON.stringify(middlewareData.transformOrigin || null)]),
|
|
227
|
+
children: /* @__PURE__ */_jsx(FloatingOverrideContext.Provider, {
|
|
241
228
|
value: null,
|
|
242
229
|
children
|
|
243
|
-
})
|
|
230
|
+
})
|
|
244
231
|
});
|
|
245
232
|
}
|
|
246
|
-
var PopperAnchor = YStack.styleable(function (props, forwardedRef) {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
composedRefs = useComposedRefs(forwardedRef, ref,
|
|
284
|
-
// web handles this onMouseEnter below so it can support multiple targets + hovering
|
|
285
|
-
shouldHandleInHover ? void 0 : safeSetReference);
|
|
286
|
-
return /* @__PURE__ */_jsx(GuiView, {
|
|
287
|
-
...rest,
|
|
288
|
-
...refProps,
|
|
289
|
-
ref: composedRefs,
|
|
290
|
-
...(shouldHandleInHover && {
|
|
291
|
-
// scoped poppers with multiple triggers: set the reference on
|
|
292
|
-
// mouseEnter so floating-ui positions relative to the hovered
|
|
293
|
-
// trigger, not the last one rendered.
|
|
294
|
-
//
|
|
295
|
-
// flushSync is critical here: without it, setReference batches
|
|
296
|
-
// with React's async state updates and the arrow/content position
|
|
297
|
-
// computes against the OLD reference element. this causes the
|
|
298
|
-
// arrow to flash at x=0 (top-left) during trigger switches.
|
|
299
|
-
// flushSync forces synchronous commit so update() below reads
|
|
300
|
-
// the correct reference element immediately.
|
|
301
|
-
onMouseEnter: function (e) {
|
|
302
|
-
var _e_currentTarget,
|
|
303
|
-
el = (_e_currentTarget = e.currentTarget) !== null && _e_currentTarget !== void 0 ? _e_currentTarget : ref.current;
|
|
304
|
-
if (_instanceof(el, HTMLElement)) {
|
|
305
|
-
var _refProps_onPointerEnter, _context_onHoverReference;
|
|
306
|
-
if (flushSync(function () {
|
|
307
|
-
return refs.setReference(el);
|
|
308
|
-
}), update(), !refProps) return;
|
|
309
|
-
(_refProps_onPointerEnter = refProps.onPointerEnter) === null || _refProps_onPointerEnter === void 0 || _refProps_onPointerEnter.call(refProps, e), (_context_onHoverReference = context.onHoverReference) === null || _context_onHoverReference === void 0 || _context_onHoverReference.call(context, e.nativeEvent);
|
|
310
|
-
}
|
|
311
|
-
},
|
|
312
|
-
onMouseLeave: function (e) {
|
|
313
|
-
var _context_onLeaveReference, _refProps_onMouseLeave;
|
|
314
|
-
(_context_onLeaveReference = context.onLeaveReference) === null || _context_onLeaveReference === void 0 || _context_onLeaveReference.call(context), refProps == null || (_refProps_onMouseLeave = refProps.onMouseLeave) === null || _refProps_onMouseLeave === void 0 || _refProps_onMouseLeave.call(refProps, e);
|
|
315
|
-
}
|
|
316
|
-
})
|
|
233
|
+
var PopperAnchor = YStack.styleable(function PopperAnchor2(props, forwardedRef) {
|
|
234
|
+
var {
|
|
235
|
+
virtualRef,
|
|
236
|
+
scope,
|
|
237
|
+
...rest
|
|
238
|
+
} = props;
|
|
239
|
+
var context = usePopperContextSlow(scope);
|
|
240
|
+
var {
|
|
241
|
+
getReferenceProps,
|
|
242
|
+
refs,
|
|
243
|
+
update
|
|
244
|
+
} = context;
|
|
245
|
+
var ref = React.useRef(null);
|
|
246
|
+
var triggerId = React.useId();
|
|
247
|
+
React.useEffect(function () {
|
|
248
|
+
if (!scope || !context.triggerElements || !ref.current) return;
|
|
249
|
+
if (!_instanceof(ref.current, Element)) return;
|
|
250
|
+
var el = ref.current;
|
|
251
|
+
context.triggerElements.add(triggerId, el);
|
|
252
|
+
return function () {
|
|
253
|
+
var _context_triggerElements;
|
|
254
|
+
(_context_triggerElements = context.triggerElements) === null || _context_triggerElements === void 0 || _context_triggerElements.delete(triggerId);
|
|
255
|
+
};
|
|
256
|
+
}, [scope, triggerId, context.triggerElements]);
|
|
257
|
+
React.useEffect(function () {
|
|
258
|
+
if (virtualRef) {
|
|
259
|
+
refs.setReference(virtualRef.current);
|
|
260
|
+
update();
|
|
261
|
+
}
|
|
262
|
+
}, [virtualRef]);
|
|
263
|
+
var refProps = (getReferenceProps === null || getReferenceProps === void 0 ? void 0 : getReferenceProps({
|
|
264
|
+
...rest,
|
|
265
|
+
ref
|
|
266
|
+
})) || null;
|
|
267
|
+
var safeSetReference = React.useCallback(function (node) {
|
|
268
|
+
startTransition(function () {
|
|
269
|
+
refs.setReference(node);
|
|
317
270
|
});
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
271
|
+
},
|
|
272
|
+
// it was refs.setRefernce but its stable and refs is undefined on server
|
|
273
|
+
[refs]);
|
|
274
|
+
var shouldHandleInHover = isWeb && scope;
|
|
275
|
+
var composedRefs = useComposedRefs(forwardedRef, ref,
|
|
276
|
+
// web handles this onMouseEnter below so it can support multiple targets + hovering
|
|
277
|
+
shouldHandleInHover ? void 0 : safeSetReference);
|
|
278
|
+
return /* @__PURE__ */_jsx(GuiView, {
|
|
279
|
+
...rest,
|
|
280
|
+
...refProps,
|
|
281
|
+
ref: composedRefs,
|
|
282
|
+
...(shouldHandleInHover && {
|
|
283
|
+
onMouseEnter: function (e) {
|
|
284
|
+
var _e_currentTarget;
|
|
285
|
+
var el = (_e_currentTarget = e.currentTarget) !== null && _e_currentTarget !== void 0 ? _e_currentTarget : ref.current;
|
|
286
|
+
if (_instanceof(el, HTMLElement)) {
|
|
287
|
+
var _refProps_onPointerEnter, _context_onHoverReference;
|
|
288
|
+
flushSync(function () {
|
|
289
|
+
return refs.setReference(el);
|
|
290
|
+
});
|
|
291
|
+
update();
|
|
292
|
+
if (!refProps) return;
|
|
293
|
+
(_refProps_onPointerEnter = refProps.onPointerEnter) === null || _refProps_onPointerEnter === void 0 || _refProps_onPointerEnter.call(refProps, e);
|
|
294
|
+
(_context_onHoverReference = context.onHoverReference) === null || _context_onHoverReference === void 0 || _context_onHoverReference.call(context, e.nativeEvent);
|
|
334
295
|
}
|
|
296
|
+
},
|
|
297
|
+
onMouseLeave: function (e) {
|
|
298
|
+
var _context_onLeaveReference, _refProps_onMouseLeave;
|
|
299
|
+
(_context_onLeaveReference = context.onLeaveReference) === null || _context_onLeaveReference === void 0 || _context_onLeaveReference.call(context);
|
|
300
|
+
refProps === null || refProps === void 0 || (_refProps_onMouseLeave = refProps.onMouseLeave) == null || _refProps_onMouseLeave.call(refProps, e);
|
|
301
|
+
}
|
|
302
|
+
})
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
var PopperContentFrame = styled(YStack, {
|
|
306
|
+
name: "PopperContent",
|
|
307
|
+
variants: {
|
|
308
|
+
unstyled: {
|
|
309
|
+
true: {}
|
|
310
|
+
},
|
|
311
|
+
size: {
|
|
312
|
+
"...size": function (val, param) {
|
|
313
|
+
var {
|
|
314
|
+
tokens
|
|
315
|
+
} = param;
|
|
316
|
+
return {
|
|
317
|
+
padding: tokens.space[val],
|
|
318
|
+
borderRadius: tokens.radius[val]
|
|
319
|
+
};
|
|
335
320
|
}
|
|
336
321
|
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
var PopperContent = /* @__PURE__ */React.forwardRef(function PopperContent2(props, forwardedRef) {
|
|
325
|
+
var {
|
|
326
|
+
scope,
|
|
327
|
+
animatePosition,
|
|
328
|
+
enableAnimationForPositionChange,
|
|
329
|
+
children,
|
|
330
|
+
passThrough,
|
|
331
|
+
unstyled,
|
|
332
|
+
...rest
|
|
333
|
+
} = props;
|
|
334
|
+
var animatePos = animatePosition !== null && animatePosition !== void 0 ? animatePosition : enableAnimationForPositionChange;
|
|
335
|
+
var context = usePopperContext(scope);
|
|
336
|
+
var {
|
|
337
|
+
strategy,
|
|
338
|
+
placement,
|
|
339
|
+
refs,
|
|
340
|
+
x,
|
|
341
|
+
y,
|
|
342
|
+
getFloatingProps,
|
|
343
|
+
size,
|
|
344
|
+
isPositioned,
|
|
345
|
+
transformOrigin,
|
|
346
|
+
update
|
|
347
|
+
} = context;
|
|
348
|
+
var updateRef = React.useRef(update);
|
|
349
|
+
updateRef.current = update;
|
|
350
|
+
var lastNodeRef = React.useRef(null);
|
|
351
|
+
var safeSetFloating = React.useCallback(function (node) {
|
|
352
|
+
var isNewNode = node !== lastNodeRef.current;
|
|
353
|
+
if (node) {
|
|
354
|
+
lastNodeRef.current = node;
|
|
355
|
+
refs.setFloating(node);
|
|
356
|
+
if (!isNewNode) {
|
|
357
|
+
var _updateRef_current;
|
|
358
|
+
(_updateRef_current = updateRef.current) === null || _updateRef_current === void 0 || _updateRef_current.call(updateRef);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
// null calls are blocked: cycling nulls are transient, genuine unmount
|
|
363
|
+
// is handled by the useEffect cleanup below
|
|
364
|
+
[refs.setFloating]);
|
|
365
|
+
React.useEffect(function () {
|
|
366
|
+
return function () {
|
|
367
|
+
var ourNode = lastNodeRef.current;
|
|
368
|
+
if (ourNode && refs.floating.current === ourNode) refs.setFloating(null);
|
|
369
|
+
lastNodeRef.current = null;
|
|
370
|
+
};
|
|
371
|
+
}, []);
|
|
372
|
+
var contentRefs = useComposedRefs(safeSetFloating, forwardedRef);
|
|
373
|
+
var [needsMeasure, setNeedsMeasure] = React.useState(animatePos);
|
|
374
|
+
useIsomorphicLayoutEffect(function () {
|
|
375
|
+
if (needsMeasure && x && y) setNeedsMeasure(false);
|
|
376
|
+
}, [needsMeasure, animatePos, x, y]);
|
|
377
|
+
var hasBeenPositioned = React.useRef(false);
|
|
378
|
+
var lastGoodPosition = React.useRef({
|
|
379
|
+
x: 0,
|
|
380
|
+
y: 0
|
|
381
|
+
});
|
|
382
|
+
if (x !== 0 || y !== 0) {
|
|
383
|
+
lastGoodPosition.current = {
|
|
392
384
|
x,
|
|
393
385
|
y
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
386
|
+
};
|
|
387
|
+
if (isPositioned) hasBeenPositioned.current = true;
|
|
388
|
+
}
|
|
389
|
+
var brieflyZero = hasBeenPositioned.current && x === 0 && y === 0;
|
|
390
|
+
var effectiveX = brieflyZero ? lastGoodPosition.current.x : x;
|
|
391
|
+
var effectiveY = brieflyZero ? lastGoodPosition.current.y : y;
|
|
392
|
+
var hide = !hasBeenPositioned.current && effectiveX === 0 && effectiveY === 0;
|
|
393
|
+
var disableAnimationProp = animatePos === "even-when-repositioning" ? needsMeasure : !hasBeenPositioned.current && !isPositioned || needsMeasure;
|
|
394
|
+
var [disableAnimation, setDisableAnimation] = React.useState(disableAnimationProp);
|
|
395
|
+
React.useEffect(function () {
|
|
396
|
+
setDisableAnimation(disableAnimationProp);
|
|
397
|
+
}, [disableAnimationProp]);
|
|
398
|
+
var frameProps = {
|
|
399
|
+
ref: contentRefs,
|
|
400
|
+
...(hide ? {} :
|
|
401
|
+
// omit x/y when hiding - prevents motion driver from animating from origin
|
|
402
|
+
{
|
|
403
|
+
x: effectiveX || 0,
|
|
404
|
+
y: effectiveY || 0
|
|
405
|
+
}),
|
|
406
|
+
top: 0,
|
|
407
|
+
left: 0,
|
|
408
|
+
position: strategy,
|
|
409
|
+
opacity: hide ? 0 : 1,
|
|
410
|
+
...(animatePos && {
|
|
411
|
+
transition: rest.transition,
|
|
412
|
+
animateOnly: disableAnimation ? [] : rest.animateOnly,
|
|
413
|
+
animatePresence: false
|
|
414
|
+
})
|
|
415
|
+
};
|
|
416
|
+
var {
|
|
417
|
+
style,
|
|
418
|
+
...floatingProps
|
|
419
|
+
} = getFloatingProps ? getFloatingProps(frameProps) : frameProps;
|
|
420
|
+
var transformOriginStyle = isWeb && transformOrigin ? {
|
|
421
|
+
transformOrigin: `${transformOrigin.x} ${transformOrigin.y}`
|
|
422
|
+
} : void 0;
|
|
423
|
+
return /* @__PURE__ */_jsx(LayoutMeasurementController, {
|
|
424
|
+
disable: !context.open,
|
|
425
|
+
children: /* @__PURE__ */_jsx(GuiView, {
|
|
426
|
+
passThrough,
|
|
427
|
+
ref: contentRefs,
|
|
428
|
+
direction: rest.direction,
|
|
429
|
+
...(passThrough ? null : floatingProps),
|
|
430
|
+
...(!passThrough && animatePos && {
|
|
431
|
+
"data-popper-animate-position": "true"
|
|
432
|
+
}),
|
|
433
|
+
children: /* @__PURE__ */_jsx(PopperContentFrame, {
|
|
437
434
|
passThrough,
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
435
|
+
unstyled,
|
|
436
|
+
...(!passThrough && {
|
|
437
|
+
"data-placement": placement,
|
|
438
|
+
"data-strategy": strategy,
|
|
439
|
+
size,
|
|
440
|
+
...style,
|
|
441
|
+
...transformOriginStyle,
|
|
442
|
+
...rest
|
|
443
443
|
}),
|
|
444
|
-
children
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
})
|
|
458
|
-
});
|
|
459
|
-
}),
|
|
460
|
-
PopperArrowFrame = styled(YStack, {
|
|
461
|
-
name: "PopperArrow",
|
|
462
|
-
variants: {
|
|
463
|
-
unstyled: {
|
|
464
|
-
false: {
|
|
465
|
-
borderColor: "$borderColor",
|
|
466
|
-
backgroundColor: "$background",
|
|
467
|
-
position: "relative"
|
|
468
|
-
}
|
|
444
|
+
children
|
|
445
|
+
}, "popper-content-frame")
|
|
446
|
+
})
|
|
447
|
+
});
|
|
448
|
+
});
|
|
449
|
+
var PopperArrowFrame = styled(YStack, {
|
|
450
|
+
name: "PopperArrow",
|
|
451
|
+
variants: {
|
|
452
|
+
unstyled: {
|
|
453
|
+
false: {
|
|
454
|
+
borderColor: "$borderColor",
|
|
455
|
+
backgroundColor: "$background",
|
|
456
|
+
position: "relative"
|
|
469
457
|
}
|
|
470
|
-
},
|
|
471
|
-
defaultVariants: {
|
|
472
|
-
unstyled: process.env.HANZO_GUI_HEADLESS === "1"
|
|
473
458
|
}
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
459
|
+
},
|
|
460
|
+
defaultVariants: {
|
|
461
|
+
unstyled: process.env.GUI_HEADLESS === "1"
|
|
462
|
+
}
|
|
463
|
+
});
|
|
464
|
+
var PopperArrowOuterFrame = styled(YStack, {
|
|
465
|
+
name: "PopperArrowOuter",
|
|
466
|
+
variants: {
|
|
467
|
+
unstyled: {
|
|
468
|
+
false: {
|
|
469
|
+
position: "absolute",
|
|
470
|
+
zIndex: 1e6,
|
|
471
|
+
pointerEvents: "none",
|
|
472
|
+
overflow: "hidden",
|
|
473
|
+
alignItems: "center",
|
|
474
|
+
justifyContent: "center"
|
|
487
475
|
}
|
|
488
|
-
},
|
|
489
|
-
defaultVariants: {
|
|
490
|
-
unstyled: process.env.HANZO_GUI_HEADLESS === "1"
|
|
491
476
|
}
|
|
492
|
-
}),
|
|
493
|
-
opposites = {
|
|
494
|
-
top: "bottom",
|
|
495
|
-
right: "left",
|
|
496
|
-
bottom: "top",
|
|
497
|
-
left: "right"
|
|
498
477
|
},
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
478
|
+
defaultVariants: {
|
|
479
|
+
unstyled: process.env.GUI_HEADLESS === "1"
|
|
480
|
+
}
|
|
481
|
+
});
|
|
482
|
+
var opposites = {
|
|
483
|
+
top: "bottom",
|
|
484
|
+
right: "left",
|
|
485
|
+
bottom: "top",
|
|
486
|
+
left: "right"
|
|
487
|
+
};
|
|
488
|
+
var PopperArrow = /* @__PURE__ */React.forwardRef(function PopperArrow2(propsIn, forwardedRef) {
|
|
489
|
+
var _context_arrowStyle, _context_arrowStyle1;
|
|
490
|
+
var {
|
|
491
|
+
scope,
|
|
492
|
+
animatePosition,
|
|
493
|
+
transition,
|
|
494
|
+
...rest
|
|
495
|
+
} = propsIn;
|
|
496
|
+
var {
|
|
497
|
+
offset,
|
|
498
|
+
size: sizeProp,
|
|
499
|
+
borderWidth = 0,
|
|
500
|
+
...arrowProps
|
|
501
|
+
} = rest;
|
|
502
|
+
var context = usePopperContext(scope);
|
|
503
|
+
var sizeVal = typeof sizeProp === "number" ? sizeProp : getVariableValue(getSpace(sizeProp !== null && sizeProp !== void 0 ? sizeProp : context.size, {
|
|
504
|
+
shift: -2,
|
|
505
|
+
bounds: [2]
|
|
506
|
+
}));
|
|
507
|
+
var size = Math.max(0, +sizeVal);
|
|
508
|
+
var {
|
|
509
|
+
placement
|
|
510
|
+
} = context;
|
|
511
|
+
var refs = useComposedRefs(context.arrowRef, forwardedRef);
|
|
512
|
+
var x = ((_context_arrowStyle = context.arrowStyle) === null || _context_arrowStyle === void 0 ? void 0 : _context_arrowStyle.x) || 0;
|
|
513
|
+
var y = ((_context_arrowStyle1 = context.arrowStyle) === null || _context_arrowStyle1 === void 0 ? void 0 : _context_arrowStyle1.y) || 0;
|
|
514
|
+
var arrowPositioned = context.arrowStyle != null;
|
|
515
|
+
var primaryPlacement = placement ? placement.split("-")[0] : "top";
|
|
516
|
+
var arrowStyle = {
|
|
517
|
+
x,
|
|
518
|
+
y,
|
|
519
|
+
width: size,
|
|
520
|
+
height: size
|
|
521
|
+
};
|
|
522
|
+
var innerArrowStyle = {};
|
|
523
|
+
var isVertical = primaryPlacement === "bottom" || primaryPlacement === "top";
|
|
524
|
+
if (primaryPlacement) {
|
|
525
|
+
arrowStyle[isVertical ? "width" : "height"] = size * 2;
|
|
526
|
+
var oppSide = opposites[primaryPlacement];
|
|
527
|
+
if (oppSide) {
|
|
528
|
+
arrowStyle[oppSide] = -size;
|
|
529
|
+
innerArrowStyle[oppSide] = size / 2;
|
|
543
530
|
}
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
531
|
+
if (oppSide === "top" || oppSide === "bottom") arrowStyle.left = 0;
|
|
532
|
+
if (oppSide === "left" || oppSide === "right") arrowStyle.top = 0;
|
|
533
|
+
useIsomorphicLayoutEffect(function () {
|
|
534
|
+
var _context_onArrowSize;
|
|
535
|
+
(_context_onArrowSize = context.onArrowSize) === null || _context_onArrowSize === void 0 || _context_onArrowSize.call(context, size);
|
|
536
|
+
}, [size, context.onArrowSize]);
|
|
537
|
+
}
|
|
538
|
+
return /* @__PURE__ */_jsx(PopperArrowOuterFrame, {
|
|
539
|
+
ref: refs,
|
|
540
|
+
...arrowStyle,
|
|
541
|
+
...(!arrowPositioned && {
|
|
542
|
+
opacity: 0
|
|
543
|
+
}),
|
|
544
|
+
...(animatePosition && {
|
|
545
|
+
transition,
|
|
546
|
+
animateOnly: ["transform"],
|
|
547
|
+
animatePresence: false
|
|
548
|
+
}),
|
|
549
|
+
children: /* @__PURE__ */_jsx(PopperArrowFrame, {
|
|
550
|
+
width: size,
|
|
551
|
+
height: size,
|
|
552
|
+
...arrowProps,
|
|
553
|
+
...innerArrowStyle,
|
|
554
|
+
rotate: "45deg",
|
|
555
|
+
...(primaryPlacement === "bottom" && {
|
|
556
|
+
borderLeftWidth: borderWidth,
|
|
557
|
+
borderTopWidth: borderWidth
|
|
549
558
|
}),
|
|
550
|
-
...(
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
animatePresence: !1
|
|
559
|
+
...(primaryPlacement === "top" && {
|
|
560
|
+
borderBottomWidth: borderWidth,
|
|
561
|
+
borderRightWidth: borderWidth
|
|
554
562
|
}),
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
borderLeftWidth: borderWidth,
|
|
563
|
-
borderTopWidth: borderWidth
|
|
564
|
-
}),
|
|
565
|
-
...(primaryPlacement === "top" && {
|
|
566
|
-
borderBottomWidth: borderWidth,
|
|
567
|
-
borderRightWidth: borderWidth
|
|
568
|
-
}),
|
|
569
|
-
...(primaryPlacement === "right" && {
|
|
570
|
-
borderLeftWidth: borderWidth,
|
|
571
|
-
borderBottomWidth: borderWidth
|
|
572
|
-
}),
|
|
573
|
-
...(primaryPlacement === "left" && {
|
|
574
|
-
borderTopWidth: borderWidth,
|
|
575
|
-
borderRightWidth: borderWidth
|
|
576
|
-
})
|
|
563
|
+
...(primaryPlacement === "right" && {
|
|
564
|
+
borderLeftWidth: borderWidth,
|
|
565
|
+
borderBottomWidth: borderWidth
|
|
566
|
+
}),
|
|
567
|
+
...(primaryPlacement === "left" && {
|
|
568
|
+
borderTopWidth: borderWidth,
|
|
569
|
+
borderRightWidth: borderWidth
|
|
577
570
|
})
|
|
578
|
-
})
|
|
571
|
+
})
|
|
579
572
|
});
|
|
573
|
+
});
|
|
580
574
|
export { Popper, PopperAnchor, PopperArrow, PopperArrowFrame, PopperContent, PopperContentFrame, PopperContextFast, PopperContextSlow, PopperPositionContext, PopperProvider, PopperProviderFast, PopperProviderSlow, setupPopper, usePopperContext, usePopperContextSlow };
|
|
581
575
|
//# sourceMappingURL=Popper.native.js.map
|