tamagui 1.130.3 → 1.130.5
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 +270 -217
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +269 -215
- 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,144 @@ 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
|
-
|
|
18440
|
-
|
|
18441
|
-
|
|
18442
|
-
if (state.current.
|
|
18443
|
-
|
|
18444
|
-
|
|
18445
|
-
|
|
18446
|
-
|
|
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);
|
|
18448
|
+
};
|
|
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;
|
|
18459
|
+
}
|
|
18460
|
+
state.current.dys = [], scrollBridge.release({
|
|
18461
|
+
dragAt: state.current.dragAt,
|
|
18462
|
+
vy
|
|
18463
|
+
});
|
|
18447
18464
|
}
|
|
18448
|
-
|
|
18449
|
-
|
|
18450
|
-
|
|
18451
|
-
|
|
18452
|
-
|
|
18453
|
-
|
|
18454
|
-
|
|
18455
|
-
|
|
18456
|
-
|
|
18457
|
-
|
|
18458
|
-
|
|
18459
|
-
|
|
18460
|
-
|
|
18461
|
-
|
|
18462
|
-
|
|
18465
|
+
}, scrollable = scrollEnabled;
|
|
18466
|
+
(0, import_react3.useEffect)(function() {
|
|
18467
|
+
var _scrollRef_current;
|
|
18468
|
+
if (import_core12.isClient && scrollRef.current) {
|
|
18469
|
+
var controller = new AbortController(), node = (_scrollRef_current = scrollRef.current) === null || _scrollRef_current === void 0 ? void 0 : _scrollRef_current.getScrollableNode();
|
|
18470
|
+
if (node) {
|
|
18471
|
+
node.addEventListener(
|
|
18472
|
+
"touchmove",
|
|
18473
|
+
function(e) {
|
|
18474
|
+
scrollBridge.isParentDragging && node.scrollTo({
|
|
18475
|
+
top: scrollBridge.y,
|
|
18476
|
+
behavior: "instant"
|
|
18477
|
+
});
|
|
18478
|
+
},
|
|
18479
|
+
// can't preventdefault its not cancellable
|
|
18480
|
+
{
|
|
18481
|
+
signal: controller.signal,
|
|
18482
|
+
passive: !1
|
|
18483
|
+
}
|
|
18484
|
+
);
|
|
18485
|
+
var disposeBridgeListen = scrollBridge.onParentDragging(function(val) {
|
|
18463
18486
|
});
|
|
18464
|
-
|
|
18465
|
-
|
|
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();
|
|
18475
|
-
};
|
|
18476
|
-
}
|
|
18477
|
-
}, []), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_scroll_view.ScrollView, {
|
|
18478
|
-
ref: (0, import_compose_refs.composeRefs)(scrollRef, ref),
|
|
18479
|
-
flex: 1,
|
|
18480
|
-
scrollEventThrottle: 8,
|
|
18481
|
-
onResponderRelease: release,
|
|
18482
|
-
className: "_ovs-contain",
|
|
18483
|
-
scrollEnabled: scrollable,
|
|
18484
|
-
// {...(Platform.OS === 'android' && {
|
|
18485
|
-
// pointerEvents: scrollable ? undefined : 'none',
|
|
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;
|
|
18487
|
+
return function() {
|
|
18488
|
+
disposeBridgeListen(), controller.abort();
|
|
18489
|
+
};
|
|
18517
18490
|
}
|
|
18518
|
-
if (scrollBridge.y >= 0) return;
|
|
18519
|
-
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));
|
|
18520
18491
|
}
|
|
18521
|
-
},
|
|
18522
|
-
|
|
18523
|
-
|
|
18524
|
-
|
|
18525
|
-
|
|
18492
|
+
}, [
|
|
18493
|
+
scrollRef
|
|
18494
|
+
]);
|
|
18495
|
+
var [hasScrollableContent, setHasScrollableContent] = (0, import_react3.useState)(!0), parentHeight = (0, import_react3.useRef)(0), contentHeight = (0, import_react3.useRef)(0), setIsScrollable = function() {
|
|
18496
|
+
parentHeight.current && contentHeight.current && setHasScrollableContent(contentHeight.current > parentHeight.current);
|
|
18497
|
+
};
|
|
18498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_scroll_view.ScrollView, {
|
|
18499
|
+
onLayout: function(e) {
|
|
18500
|
+
parentHeight.current = e.nativeEvent.layout.height, setIsScrollable();
|
|
18501
|
+
},
|
|
18502
|
+
ref: (0, import_compose_refs.composeRefs)(scrollRef, ref),
|
|
18503
|
+
flex: 1,
|
|
18504
|
+
scrollEventThrottle: 8,
|
|
18505
|
+
onResponderRelease: release,
|
|
18506
|
+
className: "_ovs-contain",
|
|
18507
|
+
scrollEnabled: scrollable,
|
|
18508
|
+
// {...(Platform.OS === 'android' && {
|
|
18509
|
+
// pointerEvents: scrollable ? undefined : 'none',
|
|
18510
|
+
// })}
|
|
18511
|
+
onScroll: function(e) {
|
|
18512
|
+
var { y } = e.nativeEvent.contentOffset;
|
|
18513
|
+
scrollBridge.y = y, import_core12.isWeb && (scrollBridge.scrollLock = y > 0), y > 0 && (scrollBridge.scrollStartY = -1), onScroll == null || onScroll(e);
|
|
18514
|
+
},
|
|
18515
|
+
// This assures that we do not skip the "scrollBridge" values processing
|
|
18516
|
+
// when passing this prop into a <Sheet.ScrollView /> overriding it here
|
|
18517
|
+
// Useful when using this ScrollView with lists such as "FlashList", i.e.
|
|
18518
|
+
// ```
|
|
18519
|
+
// renderScrollComponent={Sheet.ScrollView}
|
|
18520
|
+
// ```
|
|
18521
|
+
onStartShouldSetResponder: function() {
|
|
18522
|
+
return scrollBridge.scrollStartY = -1, state.current.isDraggingScrollArea = !0, scrollable;
|
|
18523
|
+
},
|
|
18524
|
+
// setting to false while onResponderMove is disabled
|
|
18525
|
+
onMoveShouldSetResponder: function(e) {
|
|
18526
|
+
return scrollable;
|
|
18527
|
+
},
|
|
18528
|
+
contentContainerStyle: {
|
|
18529
|
+
minHeight: "100%"
|
|
18530
|
+
},
|
|
18531
|
+
onResponderMove: function(e) {
|
|
18532
|
+
if (import_core12.isWeb) {
|
|
18533
|
+
var { pageY } = e.nativeEvent;
|
|
18534
|
+
state.current.isScrolling || scrollBridge.scrollStartY === -1 && (scrollBridge.scrollStartY = pageY, state.current.lastPageY = pageY);
|
|
18535
|
+
var dragAt = pageY - scrollBridge.scrollStartY, dy = pageY - state.current.lastPageY;
|
|
18536
|
+
state.current.lastPageY = pageY;
|
|
18537
|
+
var isDraggingUp = dy < 0, isPaneAtTop = scrollBridge.paneY <= scrollBridge.paneMinY, shouldScrollLock = hasScrollableContent && (dy === 0 || isDraggingUp) && isPaneAtTop;
|
|
18538
|
+
if (shouldScrollLock && !state.current.isScrolling) {
|
|
18539
|
+
state.current.isScrolling = !0, scrollBridge.scrollLock = !0, setScrollEnabled(!0);
|
|
18540
|
+
return;
|
|
18541
|
+
}
|
|
18542
|
+
if (scrollBridge.y >= 0) return;
|
|
18543
|
+
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));
|
|
18544
|
+
}
|
|
18545
|
+
},
|
|
18546
|
+
...props,
|
|
18547
|
+
children: [
|
|
18548
|
+
/* content height measurer */
|
|
18549
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
18550
|
+
position: "absolute",
|
|
18551
|
+
inset: 0,
|
|
18552
|
+
pointerEvents: "none",
|
|
18553
|
+
zIndex: -1,
|
|
18554
|
+
onLayout: function(e) {
|
|
18555
|
+
contentHeight.current = e.nativeEvent.layout.height, setIsScrollable();
|
|
18556
|
+
}
|
|
18557
|
+
}),
|
|
18558
|
+
children
|
|
18559
|
+
]
|
|
18560
|
+
});
|
|
18561
|
+
}
|
|
18562
|
+
);
|
|
18526
18563
|
}
|
|
18527
18564
|
});
|
|
18528
18565
|
|
|
@@ -23423,6 +23460,7 @@ var require_Animate_native = __commonJS({
|
|
|
23423
23460
|
},
|
|
23424
23461
|
children
|
|
23425
23462
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
|
|
23463
|
+
passThrough,
|
|
23426
23464
|
...props,
|
|
23427
23465
|
children: mounted || passThrough ? children : null
|
|
23428
23466
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
@@ -24192,8 +24230,8 @@ var require_Popover_native = __commonJS({
|
|
|
24192
24230
|
}
|
|
24193
24231
|
});
|
|
24194
24232
|
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 || {};
|
|
24233
|
+
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) {
|
|
24234
|
+
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover || POPOVER_SCOPE), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
|
|
24197
24235
|
return React4.useEffect(function() {
|
|
24198
24236
|
return onCustomAnchorAdd(), function() {
|
|
24199
24237
|
return onCustomAnchorRemove();
|
|
@@ -24207,7 +24245,7 @@ var require_Popover_native = __commonJS({
|
|
|
24207
24245
|
ref: forwardedRef
|
|
24208
24246
|
});
|
|
24209
24247
|
}), 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);
|
|
24248
|
+
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover || POPOVER_SCOPE), anchorTo = context.anchorTo, composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
24211
24249
|
if (!props.children) return null;
|
|
24212
24250
|
var trigger = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
24213
24251
|
"aria-expanded": context.open,
|
|
@@ -24251,7 +24289,7 @@ var require_Popover_native = __commonJS({
|
|
|
24251
24289
|
children: trigger
|
|
24252
24290
|
});
|
|
24253
24291
|
}), 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);
|
|
24292
|
+
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
24293
|
if (context.open && isFullyHidden && setIsFullyHidden(!1), React4.useEffect(function() {
|
|
24256
24294
|
if (context.open) {
|
|
24257
24295
|
var content = contentRef.current;
|
|
@@ -24261,17 +24299,19 @@ var require_Popover_native = __commonJS({
|
|
|
24261
24299
|
context.open
|
|
24262
24300
|
]), !context.keepChildrenMounted && isFullyHidden) return null;
|
|
24263
24301
|
var _contentImplProps_pointerEvents;
|
|
24264
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
24265
|
-
|
|
24302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverPortal, {
|
|
24303
|
+
passThrough: context.breakpointActive,
|
|
24304
|
+
__scopePopover: __scopePopover || POPOVER_SCOPE,
|
|
24266
24305
|
zIndex,
|
|
24267
24306
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Stack, {
|
|
24307
|
+
passThrough: context.breakpointActive,
|
|
24268
24308
|
pointerEvents: context.open ? (_contentImplProps_pointerEvents = contentImplProps.pointerEvents) !== null && _contentImplProps_pointerEvents !== void 0 ? _contentImplProps_pointerEvents : "auto" : "none",
|
|
24269
24309
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContentImpl, {
|
|
24270
24310
|
...contentImplProps,
|
|
24271
24311
|
enableRemoveScroll,
|
|
24272
24312
|
ref: composedRefs,
|
|
24273
24313
|
setIsFullyHidden,
|
|
24274
|
-
__scopePopover,
|
|
24314
|
+
__scopePopover: __scopePopover || POPOVER_SCOPE,
|
|
24275
24315
|
// we make sure we're not trapping once it's been closed
|
|
24276
24316
|
// (closed !== unmounted when animating out)
|
|
24277
24317
|
trapFocus: trapFocus ?? context.open,
|
|
@@ -24296,55 +24336,76 @@ var require_Popover_native = __commonJS({
|
|
|
24296
24336
|
})
|
|
24297
24337
|
})
|
|
24298
24338
|
});
|
|
24299
|
-
}))
|
|
24300
|
-
|
|
24301
|
-
|
|
24339
|
+
})), useParentContexts = function(scope) {
|
|
24340
|
+
var popperContext = (0, import_popper.usePopperContext)(scope || POPOVER_SCOPE), adaptContext = (0, import_adapt.useAdaptContext)(), context = usePopoverContext(scope || POPOVER_SCOPE);
|
|
24341
|
+
return {
|
|
24342
|
+
popperContext,
|
|
24343
|
+
adaptContext,
|
|
24344
|
+
context
|
|
24345
|
+
};
|
|
24346
|
+
};
|
|
24347
|
+
function RepropagateParentContexts(param) {
|
|
24348
|
+
var { adaptContext, children, context, popperContext, scope } = param;
|
|
24302
24349
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
|
|
24303
|
-
scope
|
|
24350
|
+
scope,
|
|
24304
24351
|
...popperContext,
|
|
24305
24352
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
|
|
24306
|
-
...
|
|
24353
|
+
...context,
|
|
24307
24354
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.ProvideAdaptContext, {
|
|
24308
|
-
...
|
|
24309
|
-
children
|
|
24355
|
+
...adaptContext,
|
|
24356
|
+
children
|
|
24310
24357
|
})
|
|
24311
24358
|
})
|
|
24312
24359
|
});
|
|
24313
24360
|
}
|
|
24314
|
-
function
|
|
24315
|
-
var {
|
|
24316
|
-
|
|
24317
|
-
scope
|
|
24318
|
-
|
|
24319
|
-
|
|
24320
|
-
|
|
24321
|
-
|
|
24322
|
-
|
|
24361
|
+
var PortalAdaptSafe = function(param) {
|
|
24362
|
+
var { children, __scopePopover } = param;
|
|
24363
|
+
if (needsRepropagation) {
|
|
24364
|
+
var scope = __scopePopover || POPOVER_SCOPE, parentContexts = useParentContexts(scope);
|
|
24365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
24366
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RepropagateParentContexts, {
|
|
24367
|
+
scope,
|
|
24368
|
+
...parentContexts,
|
|
24369
|
+
children
|
|
24370
|
+
})
|
|
24371
|
+
});
|
|
24372
|
+
}
|
|
24373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
24374
|
+
children
|
|
24375
|
+
});
|
|
24376
|
+
};
|
|
24377
|
+
function PopoverPortal(props) {
|
|
24378
|
+
var scope = props.__scopePopover || POPOVER_SCOPE, zIndex = props.zIndex, themeName = (0, import_core12.useThemeName)(), content = props.children;
|
|
24379
|
+
if (needsRepropagation) {
|
|
24380
|
+
var parentContexts = useParentContexts(scope);
|
|
24381
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RepropagateParentContexts, {
|
|
24382
|
+
scope,
|
|
24383
|
+
...parentContexts,
|
|
24384
|
+
children: content
|
|
24385
|
+
});
|
|
24386
|
+
}
|
|
24387
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
|
|
24388
|
+
passThrough: props.passThrough,
|
|
24323
24389
|
stackZIndex: !0,
|
|
24324
24390
|
zIndex,
|
|
24325
24391
|
children: (
|
|
24326
24392
|
/* forceClassName avoids forced re-mount renders for some reason... see the HeadMenu as you change tints a few times */
|
|
24327
24393
|
/* 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:
|
|
24394
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
24395
|
+
passThrough: props.passThrough,
|
|
24396
|
+
contain: !0,
|
|
24330
24397
|
forceClassName: !0,
|
|
24331
24398
|
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
|
-
]
|
|
24399
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_z_index_stack2.StackZIndexContext, {
|
|
24400
|
+
zIndex: (0, import_portal2.resolveViewZIndex)(zIndex),
|
|
24401
|
+
children: content
|
|
24402
|
+
})
|
|
24342
24403
|
})
|
|
24343
24404
|
)
|
|
24344
24405
|
});
|
|
24345
24406
|
}
|
|
24346
24407
|
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() {
|
|
24408
|
+
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
24409
|
setIsFullyHidden == null || setIsFullyHidden(!0);
|
|
24349
24410
|
}, [
|
|
24350
24411
|
setIsFullyHidden
|
|
@@ -24352,42 +24413,27 @@ var require_Popover_native = __commonJS({
|
|
|
24352
24413
|
disable: context.breakpointActive,
|
|
24353
24414
|
children
|
|
24354
24415
|
});
|
|
24355
|
-
return context.breakpointActive, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
24356
|
-
|
|
24357
|
-
|
|
24358
|
-
|
|
24359
|
-
|
|
24360
|
-
|
|
24361
|
-
|
|
24362
|
-
|
|
24416
|
+
return context.breakpointActive, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate.Animate, {
|
|
24417
|
+
type: "presence",
|
|
24418
|
+
present: !!open,
|
|
24419
|
+
keepChildrenMounted: !!keepChildrenMounted,
|
|
24420
|
+
onExitComplete: handleExitComplete,
|
|
24421
|
+
lazyMount,
|
|
24422
|
+
passThrough: context.breakpointActive,
|
|
24423
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContent, {
|
|
24424
|
+
__scopePopper: __scopePopover || POPOVER_SCOPE,
|
|
24425
|
+
"data-state": getState(open),
|
|
24426
|
+
id: context.contentId,
|
|
24427
|
+
ref: forwardedRef,
|
|
24363
24428
|
passThrough: context.breakpointActive,
|
|
24364
|
-
|
|
24365
|
-
|
|
24366
|
-
"data-state": getState(open),
|
|
24367
|
-
id: context.contentId,
|
|
24368
|
-
ref: forwardedRef,
|
|
24369
|
-
passThrough: context.breakpointActive,
|
|
24370
|
-
...contentProps,
|
|
24429
|
+
...contentProps,
|
|
24430
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalAdaptSafe, {
|
|
24371
24431
|
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
24432
|
})
|
|
24384
|
-
})
|
|
24385
|
-
}
|
|
24386
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
24387
|
-
children
|
|
24433
|
+
}, context.contentId)
|
|
24388
24434
|
});
|
|
24389
|
-
}, PopoverClose = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24390
|
-
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover);
|
|
24435
|
+
}), PopoverClose = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24436
|
+
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover || POPOVER_SCOPE);
|
|
24391
24437
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, {
|
|
24392
24438
|
...rest,
|
|
24393
24439
|
ref: forwardedRef,
|
|
@@ -24407,7 +24453,14 @@ var require_Popover_native = __commonJS({
|
|
|
24407
24453
|
});
|
|
24408
24454
|
}), PopoverScrollView = /* @__PURE__ */ React4.forwardRef(function(props, ref) {
|
|
24409
24455
|
var context = usePopoverContext(POPOVER_SCOPE);
|
|
24410
|
-
return
|
|
24456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_scroll_view.ScrollView, {
|
|
24457
|
+
ref,
|
|
24458
|
+
// when adapted, no pointer events!
|
|
24459
|
+
pointerEvents: context.breakpointActive ? "none" : void 0,
|
|
24460
|
+
scrollEnabled: !context.breakpointActive,
|
|
24461
|
+
passThrough: context.breakpointActive,
|
|
24462
|
+
...props
|
|
24463
|
+
});
|
|
24411
24464
|
}), Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
|
|
24412
24465
|
var id = React4.useId();
|
|
24413
24466
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
|
|
@@ -24487,7 +24540,7 @@ var require_Popover_native = __commonJS({
|
|
|
24487
24540
|
keepChildrenMounted
|
|
24488
24541
|
}, memoizedChildren = React4.useMemo(function() {
|
|
24489
24542
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
|
|
24490
|
-
scope: __scopePopover,
|
|
24543
|
+
scope: __scopePopover || POPOVER_SCOPE,
|
|
24491
24544
|
...popoverContext,
|
|
24492
24545
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverSheetController, {
|
|
24493
24546
|
onOpenChange: setOpen,
|
|
@@ -24495,6 +24548,7 @@ var require_Popover_native = __commonJS({
|
|
|
24495
24548
|
})
|
|
24496
24549
|
});
|
|
24497
24550
|
}, [
|
|
24551
|
+
__scopePopover,
|
|
24498
24552
|
setOpen,
|
|
24499
24553
|
children,
|
|
24500
24554
|
...Object.values(popoverContext)
|
|
@@ -24517,7 +24571,7 @@ var require_Popover_native = __commonJS({
|
|
|
24517
24571
|
return open ? "open" : "closed";
|
|
24518
24572
|
}
|
|
24519
24573
|
var PopoverSheetController = function(param) {
|
|
24520
|
-
var { __scopePopover, ...props } = param, context = usePopoverContext(__scopePopover), showSheet = useShowPopoverSheet(context), breakpointActive = context.breakpointActive, getShowSheet = (0, import_core12.useGet)(showSheet);
|
|
24574
|
+
var { __scopePopover, ...props } = param, context = usePopoverContext(__scopePopover || POPOVER_SCOPE), showSheet = useShowPopoverSheet(context), breakpointActive = context.breakpointActive, getShowSheet = (0, import_core12.useGet)(showSheet);
|
|
24521
24575
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_sheet.SheetController, {
|
|
24522
24576
|
onOpenChange: function(val) {
|
|
24523
24577
|
if (getShowSheet()) {
|