tamagui 1.130.3 → 1.130.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.
- package/dist/native.js +266 -218
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +265 -216
- package/dist/test.native.js.map +2 -2
- package/package.json +55 -55
package/dist/test.native.js
CHANGED
|
@@ -7465,10 +7465,7 @@ var require_Theme_native = __commonJS({
|
|
|
7465
7465
|
}
|
|
7466
7466
|
});
|
|
7467
7467
|
module2.exports = __toCommonJS2(Theme_exports);
|
|
7468
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_useTheme = require_useTheme_native(), import_useThemeState = require_useThemeState_native(), import_ThemeDebug = require_ThemeDebug_native(),
|
|
7469
|
-
className: "",
|
|
7470
|
-
style: {}
|
|
7471
|
-
}, Theme2 = /* @__PURE__ */ (0, import_react3.forwardRef)(function(props, ref) {
|
|
7468
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_useTheme = require_useTheme_native(), import_useThemeState = require_useThemeState_native(), import_ThemeDebug = require_ThemeDebug_native(), Theme2 = /* @__PURE__ */ (0, import_react3.forwardRef)(function(props, ref) {
|
|
7472
7469
|
if (props.disable) return props.children;
|
|
7473
7470
|
var { passThrough } = props, isRoot = !!props._isRoot, [_, themeState] = (0, import_useTheme.useThemeWithState)(props, isRoot), disableDirectChildTheme = props["disable-child-theme"], finalChildren = disableDirectChildTheme ? import_react3.Children.map(props.children, function(child) {
|
|
7474
7471
|
return passThrough ? child : /* @__PURE__ */ (0, import_react3.cloneElement)(child, {
|
|
@@ -7509,14 +7506,18 @@ var require_Theme_native = __commonJS({
|
|
|
7509
7506
|
}
|
|
7510
7507
|
if (forceClassName === !1) return children;
|
|
7511
7508
|
if (import_constants4.isWeb) {
|
|
7512
|
-
var { className = "",
|
|
7509
|
+
var baseStyle = props.contain ? inertContainedStyle : inertStyle, { className = "", color } = passThrough ? {} : getThemeClassNameAndColor(themeState, props, isRoot);
|
|
7513
7510
|
if (children = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
|
|
7514
|
-
className: `${className}
|
|
7515
|
-
style: passThrough ?
|
|
7511
|
+
className: `${className} is_Theme`,
|
|
7512
|
+
style: passThrough ? baseStyle : {
|
|
7513
|
+
color,
|
|
7514
|
+
...baseStyle
|
|
7515
|
+
},
|
|
7516
7516
|
children
|
|
7517
7517
|
}), state.hasEverThemed === "wrapped") {
|
|
7518
|
-
var className1 = !passThrough && requiresExtraWrapper ? `${isInverse ? name.startsWith("light") ? "t_light is_inversed" : name.startsWith("dark") ? "t_dark is_inversed" : "" : ""}
|
|
7518
|
+
var className1 = !passThrough && requiresExtraWrapper ? `${isInverse ? name.startsWith("light") ? "t_light is_inversed" : name.startsWith("dark") ? "t_dark is_inversed" : "" : ""} ` : "";
|
|
7519
7519
|
children = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
|
|
7520
|
+
style: baseStyle,
|
|
7520
7521
|
className: className1,
|
|
7521
7522
|
children
|
|
7522
7523
|
});
|
|
@@ -7525,14 +7526,21 @@ var require_Theme_native = __commonJS({
|
|
|
7525
7526
|
}
|
|
7526
7527
|
return children;
|
|
7527
7528
|
}
|
|
7528
|
-
|
|
7529
|
+
var inertStyle = {
|
|
7530
|
+
display: "contents"
|
|
7531
|
+
}, inertContainedStyle = {
|
|
7532
|
+
display: "contents",
|
|
7533
|
+
contain: "strict"
|
|
7534
|
+
}, empty = {
|
|
7535
|
+
className: "",
|
|
7536
|
+
color: void 0
|
|
7537
|
+
};
|
|
7538
|
+
function getThemeClassNameAndColor(themeState, props) {
|
|
7529
7539
|
var isRoot = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
|
|
7530
7540
|
if (!themeState.isNew && !props.forceClassName) return empty;
|
|
7531
|
-
var themeColor = themeState != null && themeState.theme && themeState.isNew ? (0, import_createVariable.variableToString)(themeState.theme.color) : "",
|
|
7532
|
-
color: themeColor
|
|
7533
|
-
} : void 0, maxInverses = (0, import_config.getSetting)("maxDarkLightNesting") || 3, themeClassName = themeState.inverses >= maxInverses ? themeState.name : themeState.name.replace(schemePrefix, ""), className = `${isRoot ? "" : "t_sub_theme"} t_${themeClassName}`;
|
|
7541
|
+
var themeColor = themeState != null && themeState.theme && themeState.isNew ? (0, import_createVariable.variableToString)(themeState.theme.color) : "", maxInverses = (0, import_config.getSetting)("maxDarkLightNesting") || 3, themeClassName = themeState.inverses >= maxInverses ? themeState.name : themeState.name.replace(schemePrefix, ""), className = `${isRoot ? "" : "t_sub_theme"} t_${themeClassName}`;
|
|
7534
7542
|
return {
|
|
7535
|
-
|
|
7543
|
+
color: themeColor,
|
|
7536
7544
|
className
|
|
7537
7545
|
};
|
|
7538
7546
|
}
|
|
@@ -8532,12 +8540,13 @@ var require_createComponent_native = __commonJS({
|
|
|
8532
8540
|
onPress,
|
|
8533
8541
|
onLongPress
|
|
8534
8542
|
});
|
|
8535
|
-
|
|
8536
|
-
import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps)), splitStyles || (elementType = "span", content = propsIn.children, viewProps = {
|
|
8543
|
+
splitStyles || (content = propsIn.children, elementType = BaseViewComponent, viewProps = {
|
|
8537
8544
|
style: {
|
|
8538
8545
|
display: "contents"
|
|
8539
8546
|
}
|
|
8540
|
-
})
|
|
8547
|
+
});
|
|
8548
|
+
var useChildrenResult;
|
|
8549
|
+
import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps)), useChildrenResult ? content = useChildrenResult : content = /* @__PURE__ */ import_react3.default.createElement(elementType, viewProps, content);
|
|
8541
8550
|
var ResetPresence2 = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence, needsReset = !!// not when passing down to child
|
|
8542
8551
|
(!asChild && // not when passThrough
|
|
8543
8552
|
splitStyles && // not when HOC
|
|
@@ -12847,7 +12856,6 @@ var require_index_native19 = __commonJS({
|
|
|
12847
12856
|
return cb();
|
|
12848
12857
|
}), queuedUpdates.clear()));
|
|
12849
12858
|
}
|
|
12850
|
-
var expectedFrameTime = 16.67, numDroppedFramesUntilPause = 10;
|
|
12851
12859
|
function startGlobalIntersectionObserver() {
|
|
12852
12860
|
!import_constants4.isClient || globalIntersectionObserver || (globalIntersectionObserver = new IntersectionObserver(function(entries) {
|
|
12853
12861
|
entries.forEach(function(entry) {
|
|
@@ -12860,20 +12868,18 @@ var require_index_native19 = __commonJS({
|
|
|
12860
12868
|
}
|
|
12861
12869
|
if (import_constants4.isClient && rAF) {
|
|
12862
12870
|
layoutOnAnimationFrame = function() {
|
|
12863
|
-
var now = Date.now(), timeSinceLastFrame = now - lastFrameAt;
|
|
12864
|
-
if (lastFrameAt = now, frameCount++, frameCount % RUN_EVERY_X_FRAMES === 0) {
|
|
12865
|
-
frameCount = 0, rAF(layoutOnAnimationFrame);
|
|
12866
|
-
return;
|
|
12867
|
-
}
|
|
12868
12871
|
if (strategy !== "off") {
|
|
12869
|
-
|
|
12870
|
-
|
|
12871
|
-
|
|
12872
|
+
if (frameCount++ % RUN_EVERY_X_FRAMES !== 0) {
|
|
12873
|
+
rAF(layoutOnAnimationFrame);
|
|
12874
|
+
return;
|
|
12875
|
+
}
|
|
12876
|
+
frameCount === Number.MAX_SAFE_INTEGER && (frameCount = 0), Nodes.forEach(function(node) {
|
|
12877
|
+
updateLayoutIfChanged(node);
|
|
12872
12878
|
});
|
|
12873
12879
|
}
|
|
12874
12880
|
rAF(layoutOnAnimationFrame);
|
|
12875
|
-
}, layoutOnAnimationFrame2 = layoutOnAnimationFrame, supportsCheckVisibility = "checkVisibility" in document.body
|
|
12876
|
-
async function updateLayoutIfChanged(node
|
|
12881
|
+
}, layoutOnAnimationFrame2 = layoutOnAnimationFrame, supportsCheckVisibility = "checkVisibility" in document.body;
|
|
12882
|
+
async function updateLayoutIfChanged(node) {
|
|
12877
12883
|
if (IntersectionState.get(node) !== !1 && !(process.env.TAMAGUI_ONLAYOUT_VISIBILITY_CHECK === "1" && supportsCheckVisibility && !node.checkVisibility())) {
|
|
12878
12884
|
var onLayout = LayoutHandlers.get(node);
|
|
12879
12885
|
if (typeof onLayout == "function") {
|
|
@@ -12885,7 +12891,7 @@ var require_index_native19 = __commonJS({
|
|
|
12885
12891
|
getBoundingClientRectAsync(node),
|
|
12886
12892
|
getBoundingClientRectAsync(parentNode)
|
|
12887
12893
|
]);
|
|
12888
|
-
if (nr === !1 || pr === !1
|
|
12894
|
+
if (nr === !1 || pr === !1) return;
|
|
12889
12895
|
nodeRect = nr, parentRect = pr;
|
|
12890
12896
|
} else nodeRect = node.getBoundingClientRect(), parentRect = parentNode.getBoundingClientRect();
|
|
12891
12897
|
var cachedRect = NodeRectCache.get(node), cachedParentRect = NodeRectCache.get(parentNode);
|
|
@@ -12903,9 +12909,9 @@ var require_index_native19 = __commonJS({
|
|
|
12903
12909
|
}
|
|
12904
12910
|
}
|
|
12905
12911
|
}
|
|
12906
|
-
rAF(layoutOnAnimationFrame), frameCount = 0, RUN_EVERY_X_FRAMES =
|
|
12912
|
+
rAF(layoutOnAnimationFrame), frameCount = 0, RUN_EVERY_X_FRAMES = 8;
|
|
12907
12913
|
}
|
|
12908
|
-
var layoutOnAnimationFrame, layoutOnAnimationFrame2, supportsCheckVisibility,
|
|
12914
|
+
var layoutOnAnimationFrame, layoutOnAnimationFrame2, supportsCheckVisibility, frameCount, RUN_EVERY_X_FRAMES, getElementLayoutEvent = function(nodeRect, parentRect) {
|
|
12909
12915
|
return {
|
|
12910
12916
|
nativeEvent: {
|
|
12911
12917
|
layout: getRelativeDimensions(nodeRect, parentRect),
|
|
@@ -12970,7 +12976,7 @@ var require_index_native19 = __commonJS({
|
|
|
12970
12976
|
if (onLayout) {
|
|
12971
12977
|
var node2 = (_ref_current2 = ref.current) === null || _ref_current2 === void 0 ? void 0 : _ref_current2.host;
|
|
12972
12978
|
if (node2) {
|
|
12973
|
-
|
|
12979
|
+
Nodes.add(node2), startGlobalIntersectionObserver(), globalIntersectionObserver && (globalIntersectionObserver.observe(node2), IntersectionState.set(node2, !0));
|
|
12974
12980
|
var parentNode = node2.parentNode;
|
|
12975
12981
|
return parentNode && onLayout(getElementLayoutEvent(node2.getBoundingClientRect(), parentNode.getBoundingClientRect())), function() {
|
|
12976
12982
|
Nodes.delete(node2), LayoutHandlers.delete(node2), NodeRectCache.delete(node2), LastChangeTime.delete(node2), IntersectionState.delete(node2), globalIntersectionObserver && globalIntersectionObserver.unobserve(node2);
|
|
@@ -16242,7 +16248,7 @@ var require_Portal_native = __commonJS({
|
|
|
16242
16248
|
}
|
|
16243
16249
|
});
|
|
16244
16250
|
module2.exports = __toCommonJS2(Portal_native_exports);
|
|
16245
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"),
|
|
16251
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_z_index_stack2 = require_index_native29(), React4 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), import_constants4 = require_constants_native3(), import_GorhomPortalItem = require_GorhomPortalItem_native(), import_helpers = require_helpers_native(), createPortal = function() {
|
|
16246
16252
|
if (import_constants4.IS_FABRIC) try {
|
|
16247
16253
|
var _ReactFabricShimModule_default, ReactFabricShimModule = require_fake_react_native(), _ReactFabricShimModule_default_createPortal;
|
|
16248
16254
|
return (_ReactFabricShimModule_default_createPortal = ReactFabricShimModule == null || (_ReactFabricShimModule_default = ReactFabricShimModule.default) === null || _ReactFabricShimModule_default === void 0 ? void 0 : _ReactFabricShimModule_default.createPortal) !== null && _ReactFabricShimModule_default_createPortal !== void 0 ? _ReactFabricShimModule_default_createPortal : ReactFabricShimModule.createPortal;
|
|
@@ -16256,15 +16262,17 @@ var require_Portal_native = __commonJS({
|
|
|
16256
16262
|
return console.info("Note: error importing portal, defaulting to non-native portals", err), null;
|
|
16257
16263
|
}
|
|
16258
16264
|
}(), Portal = function(propsIn) {
|
|
16259
|
-
var
|
|
16265
|
+
var rootTag = React4.useContext(import_react_native4.RootTagContext), zIndex = (0, import_z_index_stack2.useStackedZIndex)((0, import_helpers.getStackedZIndexProps)(propsIn)), { children, passThrough } = propsIn, contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
16260
16266
|
pointerEvents: "box-none",
|
|
16261
|
-
fullscreen: !0,
|
|
16262
16267
|
position: "absolute",
|
|
16268
|
+
inset: 0,
|
|
16263
16269
|
maxWidth: "100%",
|
|
16264
|
-
|
|
16265
|
-
|
|
16270
|
+
zIndex,
|
|
16271
|
+
passThrough,
|
|
16272
|
+
children
|
|
16266
16273
|
});
|
|
16267
16274
|
return !createPortal || !import_constants4.USE_NATIVE_PORTAL || !rootTag ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_GorhomPortalItem.GorhomPortalItem, {
|
|
16275
|
+
passThrough,
|
|
16268
16276
|
hostName: "root",
|
|
16269
16277
|
children: contents
|
|
16270
16278
|
}) : createPortal(contents, rootTag);
|
|
@@ -18043,11 +18051,11 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18043
18051
|
scrollBridge.paneMinY = minY;
|
|
18044
18052
|
var startY = at.current;
|
|
18045
18053
|
function setPanning(val) {
|
|
18046
|
-
setIsDragging(val),
|
|
18054
|
+
setIsDragging(val), import_constants4.isClient && (sheetHiddenStyleSheet || (sheetHiddenStyleSheet = document.createElement("style"), typeof document.head < "u" && document.head.appendChild(sheetHiddenStyleSheet)), val ? sheetHiddenStyleSheet.innerText = ":root * { user-select: none !important; -webkit-user-select: none !important; }" : sheetHiddenStyleSheet.innerText = "");
|
|
18047
18055
|
}
|
|
18048
18056
|
var release = function(param) {
|
|
18049
18057
|
var { vy, dragAt } = param;
|
|
18050
|
-
if (!scrollBridge.scrollLock) {
|
|
18058
|
+
if (scrollBridge.setParentDragging(!1), !scrollBridge.scrollLock) {
|
|
18051
18059
|
isExternalDrag = !1, previouslyScrolling = !1, setPanning(!1);
|
|
18052
18060
|
for (var at2 = dragAt + startY, end = at2 + frameSize * vy * 0.2, closestPoint = 0, dist = Number.POSITIVE_INFINITY, i = 0; i < positions.length; i++) {
|
|
18053
18061
|
var position2 = positions[i], curDist = end > position2 ? end - position2 : position2 - end;
|
|
@@ -18226,6 +18234,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18226
18234
|
...portalProps,
|
|
18227
18235
|
children: shouldMountChildren && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ContainerComponent, {
|
|
18228
18236
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
18237
|
+
contain: !0,
|
|
18229
18238
|
forceClassName: !0,
|
|
18230
18239
|
name: themeName,
|
|
18231
18240
|
children: contents
|
|
@@ -18413,116 +18422,139 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
18413
18422
|
}
|
|
18414
18423
|
});
|
|
18415
18424
|
module2.exports = __toCommonJS2(SheetScrollView_exports);
|
|
18416
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_core12 = require_index_native20(), import_scroll_view = require_index_native37(), import_use_controllable_state = require_index_native10(), import_react3 = __toESM2(require("react")), import_SheetContext = require_SheetContext_native(), SHEET_SCROLL_VIEW_NAME = "SheetScrollView", SheetScrollView = /* @__PURE__ */ import_react3.default.forwardRef(
|
|
18417
|
-
|
|
18418
|
-
|
|
18419
|
-
|
|
18420
|
-
|
|
18421
|
-
|
|
18422
|
-
|
|
18423
|
-
|
|
18424
|
-
|
|
18425
|
-
|
|
18426
|
-
|
|
18427
|
-
|
|
18428
|
-
|
|
18429
|
-
|
|
18430
|
-
|
|
18431
|
-
|
|
18432
|
-
|
|
18433
|
-
|
|
18434
|
-
|
|
18435
|
-
|
|
18436
|
-
|
|
18437
|
-
|
|
18438
|
-
|
|
18439
|
-
if (state.current.isDraggingScrollArea) {
|
|
18440
|
-
state.current.isDraggingScrollArea = !1, scrollBridge.scrollStartY = -1, scrollBridge.scrollLock = !1, state.current.isScrolling = !1, setScrollEnabled(!0);
|
|
18441
|
-
var vy = 0;
|
|
18442
|
-
if (state.current.dys.length) {
|
|
18443
|
-
var recentDys = state.current.dys.slice(-10), dist = recentDys.length ? recentDys.reduce(function(a, b) {
|
|
18444
|
-
return a + b;
|
|
18445
|
-
}, 0) : 0, avgDy = dist / recentDys.length;
|
|
18446
|
-
vy = avgDy * 0.04;
|
|
18447
|
-
}
|
|
18448
|
-
state.current.dys = [], scrollBridge.release({
|
|
18449
|
-
dragAt: state.current.dragAt,
|
|
18450
|
-
vy
|
|
18451
|
-
});
|
|
18452
|
-
}
|
|
18453
|
-
}, scrollable = scrollEnabled;
|
|
18454
|
-
return (0, import_react3.useEffect)(function() {
|
|
18455
|
-
if (!(typeof window > "u") && scrollRef.current) {
|
|
18456
|
-
var controller = new AbortController(), node = scrollRef.current.getScrollableNode();
|
|
18457
|
-
node.addEventListener(
|
|
18458
|
-
"touchmove",
|
|
18459
|
-
function(e) {
|
|
18460
|
-
scrollBridge.isParentDragging && node.scrollTo({
|
|
18461
|
-
top: scrollBridge.y,
|
|
18462
|
-
behavior: "instant"
|
|
18463
|
-
});
|
|
18464
|
-
},
|
|
18465
|
-
// can't preventdefault its not cancellable
|
|
18466
|
-
{
|
|
18467
|
-
signal: controller.signal,
|
|
18468
|
-
passive: !1
|
|
18469
|
-
}
|
|
18470
|
-
);
|
|
18471
|
-
var disposeBridgeListen = scrollBridge.onParentDragging(function(val) {
|
|
18472
|
-
});
|
|
18473
|
-
return function() {
|
|
18474
|
-
disposeBridgeListen(), controller.abort();
|
|
18425
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_core12 = require_index_native20(), import_scroll_view = require_index_native37(), import_use_controllable_state = require_index_native10(), import_react3 = __toESM2(require("react")), import_SheetContext = require_SheetContext_native(), SHEET_SCROLL_VIEW_NAME = "SheetScrollView", SheetScrollView = /* @__PURE__ */ import_react3.default.forwardRef(
|
|
18426
|
+
// we disallow customizing it because we want to let people know it doens't work well with out measuring of inner content
|
|
18427
|
+
// height using a view
|
|
18428
|
+
function(param, ref) {
|
|
18429
|
+
var { __scopeSheet, children, onScroll, scrollEnabled: scrollEnabledProp, ...props } = param, context = (0, import_SheetContext.useSheetContext)(SHEET_SCROLL_VIEW_NAME, __scopeSheet), { scrollBridge, setHasScrollView } = context, [scrollEnabled, setScrollEnabled_] = (0, import_use_controllable_state.useControllableState)({
|
|
18430
|
+
prop: scrollEnabledProp,
|
|
18431
|
+
defaultProp: !0
|
|
18432
|
+
}), scrollRef = import_react3.default.useRef(null), setScrollEnabled = function(next) {
|
|
18433
|
+
var _scrollRef_current_setNativeProps, _scrollRef_current;
|
|
18434
|
+
(_scrollRef_current = scrollRef.current) === null || _scrollRef_current === void 0 || (_scrollRef_current_setNativeProps = _scrollRef_current.setNativeProps) === null || _scrollRef_current_setNativeProps === void 0 || _scrollRef_current_setNativeProps.call(_scrollRef_current, {
|
|
18435
|
+
scrollEnabled: next
|
|
18436
|
+
}), setScrollEnabled_(next);
|
|
18437
|
+
}, state = import_react3.default.useRef({
|
|
18438
|
+
lastPageY: 0,
|
|
18439
|
+
dragAt: 0,
|
|
18440
|
+
dys: [],
|
|
18441
|
+
// store a few recent dys to get velocity on release
|
|
18442
|
+
isScrolling: !1,
|
|
18443
|
+
isDraggingScrollArea: !1
|
|
18444
|
+
});
|
|
18445
|
+
(0, import_react3.useEffect)(function() {
|
|
18446
|
+
return setHasScrollView(!0), function() {
|
|
18447
|
+
setHasScrollView(!1);
|
|
18475
18448
|
};
|
|
18476
|
-
}
|
|
18477
|
-
|
|
18478
|
-
|
|
18479
|
-
|
|
18480
|
-
|
|
18481
|
-
|
|
18482
|
-
|
|
18483
|
-
|
|
18484
|
-
|
|
18485
|
-
|
|
18486
|
-
// })}
|
|
18487
|
-
onScroll: function(e) {
|
|
18488
|
-
var { y } = e.nativeEvent.contentOffset;
|
|
18489
|
-
scrollBridge.y = y, import_core12.isWeb && (scrollBridge.scrollLock = y > 0), y > 0 && (scrollBridge.scrollStartY = -1), onScroll == null || onScroll(e);
|
|
18490
|
-
},
|
|
18491
|
-
// This assures that we do not skip the "scrollBridge" values processing
|
|
18492
|
-
// when passing this prop into a <Sheet.ScrollView /> overriding it here
|
|
18493
|
-
// Useful when using this ScrollView with lists such as "FlashList", i.e.
|
|
18494
|
-
// ```
|
|
18495
|
-
// renderScrollComponent={Sheet.ScrollView}
|
|
18496
|
-
// ```
|
|
18497
|
-
onStartShouldSetResponder: function() {
|
|
18498
|
-
return scrollBridge.scrollStartY = -1, state.current.isDraggingScrollArea = !0, scrollable;
|
|
18499
|
-
},
|
|
18500
|
-
// setting to false while onResponderMove is disabled
|
|
18501
|
-
onMoveShouldSetResponder: function(e) {
|
|
18502
|
-
return scrollable;
|
|
18503
|
-
},
|
|
18504
|
-
contentContainerStyle: {
|
|
18505
|
-
minHeight: "100%"
|
|
18506
|
-
},
|
|
18507
|
-
onResponderMove: function(e) {
|
|
18508
|
-
if (import_core12.isWeb) {
|
|
18509
|
-
var { pageY } = e.nativeEvent;
|
|
18510
|
-
state.current.isScrolling || scrollBridge.scrollStartY === -1 && (scrollBridge.scrollStartY = pageY, state.current.lastPageY = pageY);
|
|
18511
|
-
var dragAt = pageY - scrollBridge.scrollStartY, dy = pageY - state.current.lastPageY;
|
|
18512
|
-
state.current.lastPageY = pageY;
|
|
18513
|
-
var isDraggingUp = dy < 0, isPaneAtTop = scrollBridge.paneY <= scrollBridge.paneMinY, shouldScrollLock = (dy === 0 || isDraggingUp) && isPaneAtTop;
|
|
18514
|
-
if (shouldScrollLock && !state.current.isScrolling) {
|
|
18515
|
-
state.current.isScrolling = !0, scrollBridge.scrollLock = !0, setScrollEnabled(!0);
|
|
18516
|
-
return;
|
|
18449
|
+
}, []);
|
|
18450
|
+
var release = function() {
|
|
18451
|
+
if (state.current.isDraggingScrollArea) {
|
|
18452
|
+
state.current.isDraggingScrollArea = !1, scrollBridge.scrollStartY = -1, scrollBridge.scrollLock = !1, state.current.isScrolling = !1, setScrollEnabled(!0);
|
|
18453
|
+
var vy = 0;
|
|
18454
|
+
if (state.current.dys.length) {
|
|
18455
|
+
var recentDys = state.current.dys.slice(-10), dist = recentDys.length ? recentDys.reduce(function(a, b) {
|
|
18456
|
+
return a + b;
|
|
18457
|
+
}, 0) : 0, avgDy = dist / recentDys.length;
|
|
18458
|
+
vy = avgDy * 0.04;
|
|
18517
18459
|
}
|
|
18518
|
-
|
|
18519
|
-
|
|
18460
|
+
state.current.dys = [], scrollBridge.release({
|
|
18461
|
+
dragAt: state.current.dragAt,
|
|
18462
|
+
vy
|
|
18463
|
+
});
|
|
18520
18464
|
}
|
|
18521
|
-
},
|
|
18522
|
-
|
|
18523
|
-
|
|
18524
|
-
|
|
18525
|
-
|
|
18465
|
+
}, scrollable = scrollEnabled;
|
|
18466
|
+
(0, import_react3.useEffect)(function() {
|
|
18467
|
+
if (import_core12.isClient && scrollRef.current) {
|
|
18468
|
+
var controller = new AbortController(), node = scrollRef.current.getScrollableNode();
|
|
18469
|
+
node.addEventListener(
|
|
18470
|
+
"touchmove",
|
|
18471
|
+
function(e) {
|
|
18472
|
+
scrollBridge.isParentDragging && node.scrollTo({
|
|
18473
|
+
top: scrollBridge.y,
|
|
18474
|
+
behavior: "instant"
|
|
18475
|
+
});
|
|
18476
|
+
},
|
|
18477
|
+
// can't preventdefault its not cancellable
|
|
18478
|
+
{
|
|
18479
|
+
signal: controller.signal,
|
|
18480
|
+
passive: !1
|
|
18481
|
+
}
|
|
18482
|
+
);
|
|
18483
|
+
var disposeBridgeListen = scrollBridge.onParentDragging(function(val) {
|
|
18484
|
+
});
|
|
18485
|
+
return function() {
|
|
18486
|
+
disposeBridgeListen(), controller.abort();
|
|
18487
|
+
};
|
|
18488
|
+
}
|
|
18489
|
+
}, []);
|
|
18490
|
+
var [hasScrollableContent, setHasScrollableContent] = (0, import_react3.useState)(!0), parentHeight = (0, import_react3.useRef)(0), contentHeight = (0, import_react3.useRef)(0), setIsScrollable = function() {
|
|
18491
|
+
parentHeight.current && contentHeight.current && setHasScrollableContent(contentHeight.current > parentHeight.current);
|
|
18492
|
+
};
|
|
18493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_scroll_view.ScrollView, {
|
|
18494
|
+
onLayout: function(e) {
|
|
18495
|
+
parentHeight.current = e.nativeEvent.layout.height, setIsScrollable();
|
|
18496
|
+
},
|
|
18497
|
+
ref: (0, import_compose_refs.composeRefs)(scrollRef, ref),
|
|
18498
|
+
flex: 1,
|
|
18499
|
+
scrollEventThrottle: 8,
|
|
18500
|
+
onResponderRelease: release,
|
|
18501
|
+
className: "_ovs-contain",
|
|
18502
|
+
scrollEnabled: scrollable,
|
|
18503
|
+
// {...(Platform.OS === 'android' && {
|
|
18504
|
+
// pointerEvents: scrollable ? undefined : 'none',
|
|
18505
|
+
// })}
|
|
18506
|
+
onScroll: function(e) {
|
|
18507
|
+
var { y } = e.nativeEvent.contentOffset;
|
|
18508
|
+
scrollBridge.y = y, import_core12.isWeb && (scrollBridge.scrollLock = y > 0), y > 0 && (scrollBridge.scrollStartY = -1), onScroll == null || onScroll(e);
|
|
18509
|
+
},
|
|
18510
|
+
// This assures that we do not skip the "scrollBridge" values processing
|
|
18511
|
+
// when passing this prop into a <Sheet.ScrollView /> overriding it here
|
|
18512
|
+
// Useful when using this ScrollView with lists such as "FlashList", i.e.
|
|
18513
|
+
// ```
|
|
18514
|
+
// renderScrollComponent={Sheet.ScrollView}
|
|
18515
|
+
// ```
|
|
18516
|
+
onStartShouldSetResponder: function() {
|
|
18517
|
+
return scrollBridge.scrollStartY = -1, state.current.isDraggingScrollArea = !0, scrollable;
|
|
18518
|
+
},
|
|
18519
|
+
// setting to false while onResponderMove is disabled
|
|
18520
|
+
onMoveShouldSetResponder: function(e) {
|
|
18521
|
+
return scrollable;
|
|
18522
|
+
},
|
|
18523
|
+
contentContainerStyle: {
|
|
18524
|
+
minHeight: "100%"
|
|
18525
|
+
},
|
|
18526
|
+
onResponderMove: function(e) {
|
|
18527
|
+
if (import_core12.isWeb) {
|
|
18528
|
+
var { pageY } = e.nativeEvent;
|
|
18529
|
+
state.current.isScrolling || scrollBridge.scrollStartY === -1 && (scrollBridge.scrollStartY = pageY, state.current.lastPageY = pageY);
|
|
18530
|
+
var dragAt = pageY - scrollBridge.scrollStartY, dy = pageY - state.current.lastPageY;
|
|
18531
|
+
state.current.lastPageY = pageY;
|
|
18532
|
+
var isDraggingUp = dy < 0, isPaneAtTop = scrollBridge.paneY <= scrollBridge.paneMinY, shouldScrollLock = hasScrollableContent && (dy === 0 || isDraggingUp) && isPaneAtTop;
|
|
18533
|
+
if (shouldScrollLock && !state.current.isScrolling) {
|
|
18534
|
+
state.current.isScrolling = !0, scrollBridge.scrollLock = !0, setScrollEnabled(!0);
|
|
18535
|
+
return;
|
|
18536
|
+
}
|
|
18537
|
+
if (scrollBridge.y >= 0) return;
|
|
18538
|
+
setScrollEnabled(!1), scrollBridge.drag(dragAt), state.current.dragAt = dragAt, state.current.dys.push(dy), state.current.dys.length > 100 && (state.current.dys = state.current.dys.slice(-10));
|
|
18539
|
+
}
|
|
18540
|
+
},
|
|
18541
|
+
...props,
|
|
18542
|
+
children: [
|
|
18543
|
+
/* content height measurer */
|
|
18544
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
18545
|
+
position: "absolute",
|
|
18546
|
+
inset: 0,
|
|
18547
|
+
pointerEvents: "none",
|
|
18548
|
+
zIndex: -1,
|
|
18549
|
+
onLayout: function(e) {
|
|
18550
|
+
contentHeight.current = e.nativeEvent.layout.height, setIsScrollable();
|
|
18551
|
+
}
|
|
18552
|
+
}),
|
|
18553
|
+
children
|
|
18554
|
+
]
|
|
18555
|
+
});
|
|
18556
|
+
}
|
|
18557
|
+
);
|
|
18526
18558
|
}
|
|
18527
18559
|
});
|
|
18528
18560
|
|
|
@@ -23423,6 +23455,7 @@ var require_Animate_native = __commonJS({
|
|
|
23423
23455
|
},
|
|
23424
23456
|
children
|
|
23425
23457
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
|
|
23458
|
+
passThrough,
|
|
23426
23459
|
...props,
|
|
23427
23460
|
children: mounted || passThrough ? children : null
|
|
23428
23461
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
@@ -24192,8 +24225,8 @@ var require_Popover_native = __commonJS({
|
|
|
24192
24225
|
}
|
|
24193
24226
|
});
|
|
24194
24227
|
module2.exports = __toCommonJS2(Popover_exports);
|
|
24195
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_polyfill_dev = require_polyfill_dev(), import_adapt = require_index_native31(), import_animate = require_index_native57(), import_animate_presence = require_index_native4(), import_aria_hidden = require_index_native33(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_floating = require_index_native58(), import_focus_scope = require_index_native35(), import_helpers = require_index_native7(), import_popper = require_index_native59(), import_portal2 = require_index_native30(), import_remove_scroll = require_index_native36(), import_sheet = require_index_native38(), import_stacks3 = require_index_native24(), import_use_controllable_state = require_index_native10(), import_z_index_stack2 = require_index_native29(), React4 = __toESM2(require("react")), import_useFloatingContext = require_useFloatingContext_native(), needsRepropagation = import_constants4.isAndroid || import_constants4.isIos && !import_portal2.USE_NATIVE_PORTAL, POPOVER_SCOPE = "PopoverScope", PopoverContext = (0, import_core12.createStyledContext)({}), usePopoverContext = PopoverContext.useStyledContext, PopoverAnchor = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24196
|
-
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
|
|
24228
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_polyfill_dev = require_polyfill_dev(), import_adapt = require_index_native31(), import_animate = require_index_native57(), import_animate_presence = require_index_native4(), import_aria_hidden = require_index_native33(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_floating = require_index_native58(), import_focus_scope = require_index_native35(), import_helpers = require_index_native7(), import_popper = require_index_native59(), import_portal2 = require_index_native30(), import_remove_scroll = require_index_native36(), import_scroll_view = require_index_native37(), import_sheet = require_index_native38(), import_stacks3 = require_index_native24(), import_use_controllable_state = require_index_native10(), import_z_index_stack2 = require_index_native29(), React4 = __toESM2(require("react")), import_useFloatingContext = require_useFloatingContext_native(), needsRepropagation = import_constants4.isAndroid || import_constants4.isIos && !import_portal2.USE_NATIVE_PORTAL, POPOVER_SCOPE = "PopoverScope", PopoverContext = (0, import_core12.createStyledContext)({}), usePopoverContext = PopoverContext.useStyledContext, PopoverAnchor = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24229
|
+
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover || POPOVER_SCOPE), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
|
|
24197
24230
|
return React4.useEffect(function() {
|
|
24198
24231
|
return onCustomAnchorAdd(), function() {
|
|
24199
24232
|
return onCustomAnchorRemove();
|
|
@@ -24207,7 +24240,7 @@ var require_Popover_native = __commonJS({
|
|
|
24207
24240
|
ref: forwardedRef
|
|
24208
24241
|
});
|
|
24209
24242
|
}), PopoverTrigger = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24210
|
-
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover), anchorTo = context.anchorTo, composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
24243
|
+
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover || POPOVER_SCOPE), anchorTo = context.anchorTo, composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
24211
24244
|
if (!props.children) return null;
|
|
24212
24245
|
var trigger = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
24213
24246
|
"aria-expanded": context.open,
|
|
@@ -24251,7 +24284,7 @@ var require_Popover_native = __commonJS({
|
|
|
24251
24284
|
children: trigger
|
|
24252
24285
|
});
|
|
24253
24286
|
}), PopoverContent = import_popper.PopperContentFrame.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24254
|
-
var { trapFocus, enableRemoveScroll = !1, zIndex, __scopePopover, ...contentImplProps } = props, context = usePopoverContext(__scopePopover), contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isRightClickOutsideRef = React4.useRef(!1), [isFullyHidden, setIsFullyHidden] = React4.useState(!context.open);
|
|
24287
|
+
var { trapFocus, enableRemoveScroll = !1, zIndex, __scopePopover, ...contentImplProps } = props, context = usePopoverContext(__scopePopover || POPOVER_SCOPE), contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isRightClickOutsideRef = React4.useRef(!1), [isFullyHidden, setIsFullyHidden] = React4.useState(!context.open);
|
|
24255
24288
|
if (context.open && isFullyHidden && setIsFullyHidden(!1), React4.useEffect(function() {
|
|
24256
24289
|
if (context.open) {
|
|
24257
24290
|
var content = contentRef.current;
|
|
@@ -24261,17 +24294,19 @@ var require_Popover_native = __commonJS({
|
|
|
24261
24294
|
context.open
|
|
24262
24295
|
]), !context.keepChildrenMounted && isFullyHidden) return null;
|
|
24263
24296
|
var _contentImplProps_pointerEvents;
|
|
24264
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
24265
|
-
|
|
24297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverPortal, {
|
|
24298
|
+
passThrough: context.breakpointActive,
|
|
24299
|
+
__scopePopover: __scopePopover || POPOVER_SCOPE,
|
|
24266
24300
|
zIndex,
|
|
24267
24301
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Stack, {
|
|
24302
|
+
passThrough: context.breakpointActive,
|
|
24268
24303
|
pointerEvents: context.open ? (_contentImplProps_pointerEvents = contentImplProps.pointerEvents) !== null && _contentImplProps_pointerEvents !== void 0 ? _contentImplProps_pointerEvents : "auto" : "none",
|
|
24269
24304
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContentImpl, {
|
|
24270
24305
|
...contentImplProps,
|
|
24271
24306
|
enableRemoveScroll,
|
|
24272
24307
|
ref: composedRefs,
|
|
24273
24308
|
setIsFullyHidden,
|
|
24274
|
-
__scopePopover,
|
|
24309
|
+
__scopePopover: __scopePopover || POPOVER_SCOPE,
|
|
24275
24310
|
// we make sure we're not trapping once it's been closed
|
|
24276
24311
|
// (closed !== unmounted when animating out)
|
|
24277
24312
|
trapFocus: trapFocus ?? context.open,
|
|
@@ -24296,55 +24331,76 @@ var require_Popover_native = __commonJS({
|
|
|
24296
24331
|
})
|
|
24297
24332
|
})
|
|
24298
24333
|
});
|
|
24299
|
-
}))
|
|
24300
|
-
|
|
24301
|
-
|
|
24334
|
+
})), useParentContexts = function(scope) {
|
|
24335
|
+
var popperContext = (0, import_popper.usePopperContext)(scope || POPOVER_SCOPE), adaptContext = (0, import_adapt.useAdaptContext)(), context = usePopoverContext(scope || POPOVER_SCOPE);
|
|
24336
|
+
return {
|
|
24337
|
+
popperContext,
|
|
24338
|
+
adaptContext,
|
|
24339
|
+
context
|
|
24340
|
+
};
|
|
24341
|
+
};
|
|
24342
|
+
function RepropagateParentContexts(param) {
|
|
24343
|
+
var { adaptContext, children, context, popperContext, scope } = param;
|
|
24302
24344
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
|
|
24303
|
-
scope
|
|
24345
|
+
scope,
|
|
24304
24346
|
...popperContext,
|
|
24305
24347
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
|
|
24306
|
-
...
|
|
24348
|
+
...context,
|
|
24307
24349
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.ProvideAdaptContext, {
|
|
24308
|
-
...
|
|
24309
|
-
children
|
|
24350
|
+
...adaptContext,
|
|
24351
|
+
children
|
|
24310
24352
|
})
|
|
24311
24353
|
})
|
|
24312
24354
|
});
|
|
24313
24355
|
}
|
|
24314
|
-
function
|
|
24315
|
-
var {
|
|
24316
|
-
|
|
24317
|
-
scope
|
|
24318
|
-
|
|
24319
|
-
|
|
24320
|
-
|
|
24321
|
-
|
|
24322
|
-
|
|
24356
|
+
var PortalAdaptSafe = function(param) {
|
|
24357
|
+
var { children, __scopePopover } = param;
|
|
24358
|
+
if (needsRepropagation) {
|
|
24359
|
+
var scope = __scopePopover || POPOVER_SCOPE, parentContexts = useParentContexts(scope);
|
|
24360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
24361
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RepropagateParentContexts, {
|
|
24362
|
+
scope,
|
|
24363
|
+
...parentContexts,
|
|
24364
|
+
children
|
|
24365
|
+
})
|
|
24366
|
+
});
|
|
24367
|
+
}
|
|
24368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
24369
|
+
children
|
|
24370
|
+
});
|
|
24371
|
+
};
|
|
24372
|
+
function PopoverPortal(props) {
|
|
24373
|
+
var scope = props.__scopePopover || POPOVER_SCOPE, zIndex = props.zIndex, themeName = (0, import_core12.useThemeName)(), content = props.children;
|
|
24374
|
+
if (needsRepropagation) {
|
|
24375
|
+
var parentContexts = useParentContexts(scope);
|
|
24376
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RepropagateParentContexts, {
|
|
24377
|
+
scope,
|
|
24378
|
+
...parentContexts,
|
|
24379
|
+
children: content
|
|
24380
|
+
});
|
|
24381
|
+
}
|
|
24382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
|
|
24383
|
+
passThrough: props.passThrough,
|
|
24323
24384
|
stackZIndex: !0,
|
|
24324
24385
|
zIndex,
|
|
24325
24386
|
children: (
|
|
24326
24387
|
/* forceClassName avoids forced re-mount renders for some reason... see the HeadMenu as you change tints a few times */
|
|
24327
24388
|
/* without this you'll see the site menu re-rendering. It must be something in wrapping children in Theme */
|
|
24328
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.
|
|
24329
|
-
passThrough:
|
|
24389
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
24390
|
+
passThrough: props.passThrough,
|
|
24391
|
+
contain: !0,
|
|
24330
24392
|
forceClassName: !0,
|
|
24331
24393
|
name: themeName,
|
|
24332
|
-
children:
|
|
24333
|
-
|
|
24334
|
-
|
|
24335
|
-
|
|
24336
|
-
}),
|
|
24337
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_z_index_stack2.StackZIndexContext, {
|
|
24338
|
-
zIndex: (0, import_portal2.resolveViewZIndex)(zIndex),
|
|
24339
|
-
children: contents
|
|
24340
|
-
})
|
|
24341
|
-
]
|
|
24394
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_z_index_stack2.StackZIndexContext, {
|
|
24395
|
+
zIndex: (0, import_portal2.resolveViewZIndex)(zIndex),
|
|
24396
|
+
children: content
|
|
24397
|
+
})
|
|
24342
24398
|
})
|
|
24343
24399
|
)
|
|
24344
24400
|
});
|
|
24345
24401
|
}
|
|
24346
24402
|
var PopoverContentImpl = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24347
|
-
var { trapFocus, __scopePopover, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, disableFocusScope, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, children, enableRemoveScroll, freezeContentsWhenHidden, setIsFullyHidden, lazyMount, ...contentProps } = props, context = usePopoverContext(__scopePopover), { open, keepChildrenMounted } = context, handleExitComplete = React4.useCallback(function() {
|
|
24403
|
+
var { trapFocus, __scopePopover, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, disableFocusScope, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, children, enableRemoveScroll, freezeContentsWhenHidden, setIsFullyHidden, lazyMount, ...contentProps } = props, context = usePopoverContext(__scopePopover || POPOVER_SCOPE), { open, keepChildrenMounted } = context, handleExitComplete = React4.useCallback(function() {
|
|
24348
24404
|
setIsFullyHidden == null || setIsFullyHidden(!0);
|
|
24349
24405
|
}, [
|
|
24350
24406
|
setIsFullyHidden
|
|
@@ -24352,42 +24408,27 @@ var require_Popover_native = __commonJS({
|
|
|
24352
24408
|
disable: context.breakpointActive,
|
|
24353
24409
|
children
|
|
24354
24410
|
});
|
|
24355
|
-
return context.breakpointActive, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
24356
|
-
|
|
24357
|
-
|
|
24358
|
-
|
|
24359
|
-
|
|
24360
|
-
|
|
24361
|
-
|
|
24362
|
-
|
|
24411
|
+
return context.breakpointActive, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate.Animate, {
|
|
24412
|
+
type: "presence",
|
|
24413
|
+
present: !!open,
|
|
24414
|
+
keepChildrenMounted: !!keepChildrenMounted,
|
|
24415
|
+
onExitComplete: handleExitComplete,
|
|
24416
|
+
lazyMount,
|
|
24417
|
+
passThrough: context.breakpointActive,
|
|
24418
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContent, {
|
|
24419
|
+
__scopePopper: __scopePopover || POPOVER_SCOPE,
|
|
24420
|
+
"data-state": getState(open),
|
|
24421
|
+
id: context.contentId,
|
|
24422
|
+
ref: forwardedRef,
|
|
24363
24423
|
passThrough: context.breakpointActive,
|
|
24364
|
-
|
|
24365
|
-
|
|
24366
|
-
"data-state": getState(open),
|
|
24367
|
-
id: context.contentId,
|
|
24368
|
-
ref: forwardedRef,
|
|
24369
|
-
passThrough: context.breakpointActive,
|
|
24370
|
-
...contentProps,
|
|
24424
|
+
...contentProps,
|
|
24425
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalAdaptSafe, {
|
|
24371
24426
|
children: contents
|
|
24372
|
-
}, context.contentId)
|
|
24373
|
-
})
|
|
24374
|
-
});
|
|
24375
|
-
}), RepropagatePopperAdapt = function(param) {
|
|
24376
|
-
var { children, __scopePopover } = param;
|
|
24377
|
-
if (needsRepropagation) {
|
|
24378
|
-
var popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE);
|
|
24379
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
24380
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
|
|
24381
|
-
...popperContext,
|
|
24382
|
-
children
|
|
24383
24427
|
})
|
|
24384
|
-
})
|
|
24385
|
-
}
|
|
24386
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
24387
|
-
children
|
|
24428
|
+
}, context.contentId)
|
|
24388
24429
|
});
|
|
24389
|
-
}, PopoverClose = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24390
|
-
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover);
|
|
24430
|
+
}), PopoverClose = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24431
|
+
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover || POPOVER_SCOPE);
|
|
24391
24432
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, {
|
|
24392
24433
|
...rest,
|
|
24393
24434
|
ref: forwardedRef,
|
|
@@ -24407,7 +24448,14 @@ var require_Popover_native = __commonJS({
|
|
|
24407
24448
|
});
|
|
24408
24449
|
}), PopoverScrollView = /* @__PURE__ */ React4.forwardRef(function(props, ref) {
|
|
24409
24450
|
var context = usePopoverContext(POPOVER_SCOPE);
|
|
24410
|
-
return
|
|
24451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_scroll_view.ScrollView, {
|
|
24452
|
+
ref,
|
|
24453
|
+
// when adapted, no pointer events!
|
|
24454
|
+
pointerEvents: context.breakpointActive ? "none" : void 0,
|
|
24455
|
+
scrollEnabled: !context.breakpointActive,
|
|
24456
|
+
passThrough: context.breakpointActive,
|
|
24457
|
+
...props
|
|
24458
|
+
});
|
|
24411
24459
|
}), Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
|
|
24412
24460
|
var id = React4.useId();
|
|
24413
24461
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
|
|
@@ -24487,7 +24535,7 @@ var require_Popover_native = __commonJS({
|
|
|
24487
24535
|
keepChildrenMounted
|
|
24488
24536
|
}, memoizedChildren = React4.useMemo(function() {
|
|
24489
24537
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
|
|
24490
|
-
scope: __scopePopover,
|
|
24538
|
+
scope: __scopePopover || POPOVER_SCOPE,
|
|
24491
24539
|
...popoverContext,
|
|
24492
24540
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverSheetController, {
|
|
24493
24541
|
onOpenChange: setOpen,
|
|
@@ -24495,6 +24543,7 @@ var require_Popover_native = __commonJS({
|
|
|
24495
24543
|
})
|
|
24496
24544
|
});
|
|
24497
24545
|
}, [
|
|
24546
|
+
__scopePopover,
|
|
24498
24547
|
setOpen,
|
|
24499
24548
|
children,
|
|
24500
24549
|
...Object.values(popoverContext)
|
|
@@ -24517,7 +24566,7 @@ var require_Popover_native = __commonJS({
|
|
|
24517
24566
|
return open ? "open" : "closed";
|
|
24518
24567
|
}
|
|
24519
24568
|
var PopoverSheetController = function(param) {
|
|
24520
|
-
var { __scopePopover, ...props } = param, context = usePopoverContext(__scopePopover), showSheet = useShowPopoverSheet(context), breakpointActive = context.breakpointActive, getShowSheet = (0, import_core12.useGet)(showSheet);
|
|
24569
|
+
var { __scopePopover, ...props } = param, context = usePopoverContext(__scopePopover || POPOVER_SCOPE), showSheet = useShowPopoverSheet(context), breakpointActive = context.breakpointActive, getShowSheet = (0, import_core12.useGet)(showSheet);
|
|
24521
24570
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_sheet.SheetController, {
|
|
24522
24571
|
onOpenChange: function(val) {
|
|
24523
24572
|
if (getShowSheet()) {
|