tamagui 1.126.3 → 1.126.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 +39 -37
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +39 -37
- package/dist/test.native.js.map +1 -1
- package/package.json +55 -55
package/dist/test.native.js
CHANGED
|
@@ -16346,8 +16346,9 @@ var require_Adapt_native = __commonJS({
|
|
|
16346
16346
|
}, [
|
|
16347
16347
|
when,
|
|
16348
16348
|
platform2,
|
|
16349
|
-
|
|
16350
|
-
|
|
16349
|
+
enabled,
|
|
16350
|
+
context.setWhen,
|
|
16351
|
+
context.setPlatform
|
|
16351
16352
|
]), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
16352
16353
|
return function() {
|
|
16353
16354
|
var _context_setWhen, _context_setPlatform;
|
|
@@ -18962,48 +18963,44 @@ var require_Dialog_native = __commonJS({
|
|
|
18962
18963
|
});
|
|
18963
18964
|
return isAdapted ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
18964
18965
|
children: content
|
|
18965
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
|
|
18966
|
-
hostName: context.adaptName,
|
|
18966
|
+
}) : context.modal ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
|
|
18967
|
+
hostName: context.modal ? "root" : context.adaptName,
|
|
18967
18968
|
children: content
|
|
18968
|
-
});
|
|
18969
|
+
}) : content;
|
|
18969
18970
|
}, DialogPortal = function(props) {
|
|
18970
18971
|
var { __scopeDialog, forceMount, children, ...frameProps } = props, context = useDialogContext(PORTAL_NAME, __scopeDialog), isShowing = forceMount || context.open, [isFullyHidden, setIsFullyHidden] = React4.useState(!isShowing), isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
18971
18972
|
isShowing && isFullyHidden && setIsFullyHidden(!1);
|
|
18972
18973
|
var handleExitComplete = React4.useCallback(function() {
|
|
18973
18974
|
setIsFullyHidden(!0);
|
|
18974
|
-
}, []), zIndex = (0, import_core12.getExpandedShorthand)("zIndex", props)
|
|
18975
|
-
|
|
18976
|
-
|
|
18977
|
-
|
|
18978
|
-
children:
|
|
18979
|
-
|
|
18980
|
-
|
|
18981
|
-
|
|
18982
|
-
|
|
18983
|
-
|
|
18984
|
-
|
|
18985
|
-
|
|
18986
|
-
|
|
18987
|
-
|
|
18988
|
-
|
|
18989
|
-
|
|
18990
|
-
|
|
18991
|
-
|
|
18992
|
-
|
|
18993
|
-
|
|
18994
|
-
|
|
18995
|
-
|
|
18996
|
-
|
|
18997
|
-
stackZIndex: 1e3,
|
|
18998
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PassthroughTheme, {
|
|
18999
|
-
children: framedContents
|
|
19000
|
-
})
|
|
19001
|
-
}) : isAdapted ? framedContents : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
|
|
19002
|
-
__scopeDialog,
|
|
18975
|
+
}, []), zIndex = (0, import_core12.getExpandedShorthand)("zIndex", props), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_z_index_stack2.StackZIndexContext, {
|
|
18976
|
+
zIndex: (0, import_portal2.resolveViewZIndex)(zIndex),
|
|
18977
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
|
|
18978
|
+
onExitComplete: handleExitComplete,
|
|
18979
|
+
children: isShowing || isAdapted ? children : null
|
|
18980
|
+
})
|
|
18981
|
+
});
|
|
18982
|
+
if (isFullyHidden && !isAdapted) return null;
|
|
18983
|
+
var framedContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalProvider2, {
|
|
18984
|
+
scope: __scopeDialog,
|
|
18985
|
+
forceMount,
|
|
18986
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalFrame, {
|
|
18987
|
+
pointerEvents: isShowing ? "auto" : "none",
|
|
18988
|
+
...frameProps,
|
|
18989
|
+
children: contents
|
|
18990
|
+
})
|
|
18991
|
+
});
|
|
18992
|
+
return import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
|
|
18993
|
+
zIndex,
|
|
18994
|
+
// set to 1000 which "boosts" it 1000 above baseline for current context
|
|
18995
|
+
// this makes sure its above (this first 1k) popovers on the same layer
|
|
18996
|
+
stackZIndex: 1e3,
|
|
18997
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PassthroughTheme, {
|
|
19003
18998
|
children: framedContents
|
|
19004
|
-
})
|
|
19005
|
-
}
|
|
19006
|
-
|
|
18999
|
+
})
|
|
19000
|
+
}) : isAdapted ? framedContents : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
|
|
19001
|
+
__scopeDialog,
|
|
19002
|
+
children: framedContents
|
|
19003
|
+
});
|
|
19007
19004
|
}, PassthroughTheme = function(param) {
|
|
19008
19005
|
var { children } = param, themeName = (0, import_core12.useThemeName)();
|
|
19009
19006
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
@@ -19017,6 +19014,11 @@ var require_Dialog_native = __commonJS({
|
|
|
19017
19014
|
var { __scopeDialog, ...props } = param, portalContext = usePortalContext(OVERLAY_NAME, __scopeDialog), { forceMount = portalContext.forceMount, ...overlayProps } = props, context = useDialogContext(OVERLAY_NAME, __scopeDialog), isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
19018
19015
|
return !forceMount && (!context.modal || isAdapted) ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogOverlayFrame, {
|
|
19019
19016
|
"data-state": getState(context.open),
|
|
19017
|
+
// TODO: this will be apply for v2
|
|
19018
|
+
// onPress={() => {
|
|
19019
|
+
// // if the overlay is pressed, close the dialog
|
|
19020
|
+
// context.onOpenChange(false)
|
|
19021
|
+
// }}
|
|
19020
19022
|
// We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay.
|
|
19021
19023
|
pointerEvents: context.open ? "auto" : "none",
|
|
19022
19024
|
...overlayProps,
|