tamagui 1.125.29 → 1.125.31
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 +23 -14
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +22 -13
- package/dist/test.native.js.map +1 -1
- package/package.json +55 -55
package/dist/test.native.js
CHANGED
|
@@ -9758,6 +9758,9 @@ var require_getExpandedShorthands_native = __commonJS({
|
|
|
9758
9758
|
}), mod);
|
|
9759
9759
|
}, getExpandedShorthands_exports = {};
|
|
9760
9760
|
__export2(getExpandedShorthands_exports, {
|
|
9761
|
+
getExpandedShorthand: function() {
|
|
9762
|
+
return getExpandedShorthand;
|
|
9763
|
+
},
|
|
9761
9764
|
getExpandedShorthands: function() {
|
|
9762
9765
|
return getExpandedShorthands;
|
|
9763
9766
|
}
|
|
@@ -9771,6 +9774,10 @@ var require_getExpandedShorthands_native = __commonJS({
|
|
|
9771
9774
|
for (var key in props) res[shorthands[key] || key] = props[key];
|
|
9772
9775
|
return res;
|
|
9773
9776
|
}
|
|
9777
|
+
function getExpandedShorthand(propKey, props) {
|
|
9778
|
+
var shorthands = (0, import_config.getConfig)().inverseShorthands, _props_propKey;
|
|
9779
|
+
return (_props_propKey = props[propKey]) !== null && _props_propKey !== void 0 ? _props_propKey : props[shorthands[propKey]];
|
|
9780
|
+
}
|
|
9774
9781
|
}
|
|
9775
9782
|
});
|
|
9776
9783
|
|
|
@@ -15377,20 +15384,20 @@ var require_useStackedZIndex_native = __commonJS({
|
|
|
15377
15384
|
});
|
|
15378
15385
|
module2.exports = __toCommonJS2(useStackedZIndex_exports);
|
|
15379
15386
|
var import_react3 = require("react"), import_context = require_context_native(), ZIndicesByContext = {}, useStackedZIndex = function(props) {
|
|
15380
|
-
var _ZIndicesByContext,
|
|
15381
|
-
(_ZIndicesByContext = ZIndicesByContext)[
|
|
15382
|
-
var stackContext = ZIndicesByContext[
|
|
15387
|
+
var _ZIndicesByContext, _stackLayer, { stackZIndex, zIndex: zIndexProp } = props, id = (0, import_react3.useId)(), stackingContextLevel = (0, import_react3.useContext)(import_context.ZIndexStackContext), stackLayer = stackZIndex === "global" ? 0 : stackingContextLevel, hardcoded = (0, import_react3.useContext)(import_context.ZIndexHardcodedContext);
|
|
15388
|
+
(_ZIndicesByContext = ZIndicesByContext)[_stackLayer = stackLayer] || (_ZIndicesByContext[_stackLayer] = {});
|
|
15389
|
+
var stackContext = ZIndicesByContext[stackLayer], zIndex = (0, import_react3.useMemo)(function() {
|
|
15383
15390
|
if (typeof zIndexProp == "number") return zIndexProp;
|
|
15384
15391
|
if (stackZIndex) {
|
|
15385
15392
|
if (hardcoded) return hardcoded + 1;
|
|
15386
15393
|
var highest = Object.values(stackContext).reduce(function(acc, cur) {
|
|
15387
15394
|
return Math.max(acc, cur);
|
|
15388
|
-
}, 0), found =
|
|
15395
|
+
}, 0), found = stackLayer * 5e3 + highest + 1;
|
|
15389
15396
|
return typeof stackZIndex == "number" ? stackZIndex + found : found;
|
|
15390
15397
|
}
|
|
15391
15398
|
return 1;
|
|
15392
15399
|
}, [
|
|
15393
|
-
|
|
15400
|
+
stackLayer,
|
|
15394
15401
|
zIndexProp,
|
|
15395
15402
|
stackZIndex
|
|
15396
15403
|
]);
|
|
@@ -15970,13 +15977,13 @@ var require_Portal_native = __commonJS({
|
|
|
15970
15977
|
var import_jsx_runtime6 = require("react/jsx-runtime"), import_stacks3 = require_index_native22(), import_z_index_stack2 = require_index_native27(), React4 = __toESM2(require("react")), import_react_native4 = require("react-native"), import_constants4 = require_constants_native3(), import_GorhomPortalItem = require_GorhomPortalItem_native(), import_helpers = require_helpers_native(), createPortal = function() {
|
|
15971
15978
|
if (import_constants4.IS_FABRIC) try {
|
|
15972
15979
|
var _ReactFabricShimModule_default, ReactFabricShimModule = require("react-native/Libraries/Renderer/shims/ReactFabric"), _ReactFabricShimModule_default_createPortal;
|
|
15973
|
-
return (_ReactFabricShimModule_default_createPortal = (_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;
|
|
15980
|
+
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;
|
|
15974
15981
|
} catch (err) {
|
|
15975
15982
|
return console.info("Note: error importing portal, defaulting to non-native portals", err), null;
|
|
15976
15983
|
}
|
|
15977
15984
|
try {
|
|
15978
15985
|
var _ReactNativeShimModule_default, ReactNativeShimModule = require("react-native/Libraries/Renderer/shims/ReactNative").createPortal, _ReactNativeShimModule_default_createPortal;
|
|
15979
|
-
return (_ReactNativeShimModule_default_createPortal = (_ReactNativeShimModule_default = ReactNativeShimModule.default) === null || _ReactNativeShimModule_default === void 0 ? void 0 : _ReactNativeShimModule_default.createPortal) !== null && _ReactNativeShimModule_default_createPortal !== void 0 ? _ReactNativeShimModule_default_createPortal : ReactNativeShimModule.createPortal;
|
|
15986
|
+
return (_ReactNativeShimModule_default_createPortal = ReactNativeShimModule == null || (_ReactNativeShimModule_default = ReactNativeShimModule.default) === null || _ReactNativeShimModule_default === void 0 ? void 0 : _ReactNativeShimModule_default.createPortal) !== null && _ReactNativeShimModule_default_createPortal !== void 0 ? _ReactNativeShimModule_default_createPortal : ReactNativeShimModule.createPortal;
|
|
15980
15987
|
} catch (err) {
|
|
15981
15988
|
return console.info("Note: error importing portal, defaulting to non-native portals", err), null;
|
|
15982
15989
|
}
|
|
@@ -18848,6 +18855,7 @@ var require_Dialog_native = __commonJS({
|
|
|
18848
18855
|
return isAdapted ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
18849
18856
|
children: content
|
|
18850
18857
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
|
|
18858
|
+
hostName: context.adaptName,
|
|
18851
18859
|
children: content
|
|
18852
18860
|
});
|
|
18853
18861
|
}, DialogPortal = function(props) {
|
|
@@ -18855,10 +18863,10 @@ var require_Dialog_native = __commonJS({
|
|
|
18855
18863
|
isShowing && isFullyHidden && setIsFullyHidden(!1);
|
|
18856
18864
|
var handleExitComplete = React4.useCallback(function() {
|
|
18857
18865
|
setIsFullyHidden(!0);
|
|
18858
|
-
}, []);
|
|
18866
|
+
}, []), zIndex = (0, import_core12.getExpandedShorthand)("zIndex", props);
|
|
18859
18867
|
if (context.modal) {
|
|
18860
18868
|
var contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_z_index_stack2.StackZIndexContext, {
|
|
18861
|
-
zIndex: (0, import_portal2.resolveViewZIndex)(
|
|
18869
|
+
zIndex: (0, import_portal2.resolveViewZIndex)(zIndex),
|
|
18862
18870
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
|
|
18863
18871
|
onExitComplete: handleExitComplete,
|
|
18864
18872
|
children: isShowing || isAdapted ? children : null
|
|
@@ -18875,7 +18883,7 @@ var require_Dialog_native = __commonJS({
|
|
|
18875
18883
|
})
|
|
18876
18884
|
});
|
|
18877
18885
|
return import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
|
|
18878
|
-
zIndex
|
|
18886
|
+
zIndex,
|
|
18879
18887
|
// set to 1000 which "boosts" it 1000 above baseline for current context
|
|
18880
18888
|
// this makes sure its above (this first 1k) popovers on the same layer
|
|
18881
18889
|
stackZIndex: 1e3,
|
|
@@ -18959,8 +18967,8 @@ var require_Dialog_native = __commonJS({
|
|
|
18959
18967
|
});
|
|
18960
18968
|
})), DialogContentModal = /* @__PURE__ */ React4.forwardRef(function(param, forwardedRef) {
|
|
18961
18969
|
var { children, context, ...props } = param, contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.contentRef, contentRef);
|
|
18962
|
-
return
|
|
18963
|
-
if (context.open) {
|
|
18970
|
+
return React4.useEffect(function() {
|
|
18971
|
+
if (import_constants4.isWeb && context.open) {
|
|
18964
18972
|
var content = contentRef.current;
|
|
18965
18973
|
if (content) return (0, import_aria_hidden.hideOthers)(content);
|
|
18966
18974
|
}
|
|
@@ -19129,7 +19137,8 @@ var require_Dialog_native = __commonJS({
|
|
|
19129
19137
|
onOpenToggle,
|
|
19130
19138
|
modal,
|
|
19131
19139
|
allowPinchZoom,
|
|
19132
|
-
disableRemoveScroll
|
|
19140
|
+
disableRemoveScroll,
|
|
19141
|
+
adaptName
|
|
19133
19142
|
};
|
|
19134
19143
|
return React4.useImperativeHandle(ref, function() {
|
|
19135
19144
|
return {
|