tamagui 1.90.2 → 1.90.3
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 +40 -46
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +40 -46
- package/dist/test.native.js.map +2 -2
- package/package.json +54 -54
package/dist/native.js
CHANGED
|
@@ -453,7 +453,7 @@ var require_PresenceChild_native = __commonJS({
|
|
|
453
453
|
}
|
|
454
454
|
});
|
|
455
455
|
module2.exports = __toCommonJS2(PresenceChild_exports);
|
|
456
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_use_constant = require_index_native2(), import_use_presence = require_index_native3(), React2 = __toESM2(require("react")), import_react2 = require("react"), PresenceChild = function(param) {
|
|
456
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_use_constant = require_index_native2(), import_use_presence = require_index_native3(), React2 = __toESM2(require("react")), import_react2 = require("react"), PresenceChild = /* @__PURE__ */ React2.memo(function(param) {
|
|
457
457
|
var children = param.children, initial = param.initial, isPresent = param.isPresent, onExitComplete = param.onExitComplete, exitVariant = param.exitVariant, enterVariant = param.enterVariant, enterExitVariant = param.enterExitVariant, presenceAffectsLayout = param.presenceAffectsLayout, custom = param.custom, presenceChildren = (0, import_use_constant.useConstant)(newChildrenMap), id = (0, import_react2.useId)() || "", context = React2.useMemo(
|
|
458
458
|
function() {
|
|
459
459
|
return {
|
|
@@ -518,7 +518,7 @@ var require_PresenceChild_native = __commonJS({
|
|
|
518
518
|
value: context,
|
|
519
519
|
children
|
|
520
520
|
});
|
|
521
|
-
};
|
|
521
|
+
});
|
|
522
522
|
function newChildrenMap() {
|
|
523
523
|
return /* @__PURE__ */ new Map();
|
|
524
524
|
}
|
|
@@ -8099,8 +8099,6 @@ current`, _object_spread9({}, styleState.style)));
|
|
|
8099
8099
|
mergeTransform(styleState.style, key6, val4, !0);
|
|
8100
8100
|
});
|
|
8101
8101
|
}
|
|
8102
|
-
if (0)
|
|
8103
|
-
var _styleState_style;
|
|
8104
8102
|
if (parentSplitStyles) {
|
|
8105
8103
|
if (0)
|
|
8106
8104
|
for (var key2 in parentSplitStyles.classNames)
|
|
@@ -8112,6 +8110,8 @@ current`, _object_spread9({}, styleState.style)));
|
|
|
8112
8110
|
}
|
|
8113
8111
|
}
|
|
8114
8112
|
}
|
|
8113
|
+
if (0)
|
|
8114
|
+
var _styleState_style, shouldStringifyTransforms;
|
|
8115
8115
|
if (0) {
|
|
8116
8116
|
if (styleState.style && shouldDoClasses) {
|
|
8117
8117
|
var retainedStyles, shouldRetain;
|
|
@@ -9453,7 +9453,7 @@ var require_createComponent_native = __commonJS({
|
|
|
9453
9453
|
process.env.NODE_ENV === "development" && time && time(_templateObject4());
|
|
9454
9454
|
var hasTextAncestor = !!(import_constants4.isWeb && isText && componentContext.inText), _props_disabled, isDisabled = (_props_disabled = props.disabled) !== null && _props_disabled !== void 0 ? _props_disabled : (_props_accessibilityState = props.accessibilityState) === null || _props_accessibilityState === void 0 ? void 0 : _props_accessibilityState.disabled;
|
|
9455
9455
|
process.env.NODE_ENV === "development" && time && time(_templateObject5());
|
|
9456
|
-
var isTaggable = !Component || typeof Component == "string", element = import_constants4.isWeb && isTaggable &&
|
|
9456
|
+
var isTaggable = !Component || typeof Component == "string", tagProp = props.tag, element = import_constants4.isWeb && isTaggable && tagProp || Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div"), elementType = isText ? BaseTextComponent : BaseViewComponent;
|
|
9457
9457
|
animationsConfig && isAnimated && (elementType = animationsConfig[isText ? "Text" : "View"] || elementType);
|
|
9458
9458
|
var disableThemeProp = !1, disableTheme = disableThemeProp || isHOC;
|
|
9459
9459
|
process.env.NODE_ENV === "development" && time && time(_templateObject6()), props.themeShallow && (curState.themeShallow = !0);
|
|
@@ -9548,7 +9548,7 @@ var require_createComponent_native = __commonJS({
|
|
|
9548
9548
|
"theme",
|
|
9549
9549
|
"defaultVariants"
|
|
9550
9550
|
]), viewProps = nonTamaguiProps;
|
|
9551
|
-
isHOC && _themeProp && (viewProps.theme = _themeProp);
|
|
9551
|
+
isHOC && _themeProp && (viewProps.theme = _themeProp), elementType.acceptTagProp && (viewProps.tag = tagProp);
|
|
9552
9552
|
var animationStyles;
|
|
9553
9553
|
if (
|
|
9554
9554
|
// if it supports css vars we run it on server too to get matching initial style
|
|
@@ -9579,9 +9579,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9579
9579
|
}), !stateRef.current.hasMeasured && props.untilMeasured === "hide" && setState(function(prev) {
|
|
9580
9580
|
return _object_spread9({}, prev);
|
|
9581
9581
|
}), stateRef.current.hasMeasured = !0;
|
|
9582
|
-
}))
|
|
9583
|
-
var _hooks_usePropsTransform1;
|
|
9584
|
-
viewProps = (_hooks_usePropsTransform1 = (_hooks_usePropsTransform = import_setupHooks.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_setupHooks.hooks, elementType, nonTamaguiProps, stateRef, curState.willHydrate)) !== null && _hooks_usePropsTransform1 !== void 0 ? _hooks_usePropsTransform1 : nonTamaguiProps, curState.composedRef || (curState.composedRef = (0, import_compose_refs.composeRefs)(function(x) {
|
|
9582
|
+
})), viewProps = ((_hooks_usePropsTransform = import_setupHooks.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_setupHooks.hooks, elementType, nonTamaguiProps, stateRef, curState.willHydrate)) || nonTamaguiProps, curState.composedRef || (curState.composedRef = (0, import_compose_refs.composeRefs)(function(x) {
|
|
9585
9583
|
return stateRef.current.host = x;
|
|
9586
9584
|
}, forwardedRef)), viewProps.ref = curState.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && import_constants4.isWeb && !isHOC && import_react2.Children.toArray(props.children).forEach(function(item) {
|
|
9587
9585
|
typeof item == "string" && item !== `
|
|
@@ -21402,10 +21400,10 @@ var require_Dialog_native = __commonJS({
|
|
|
21402
21400
|
"children"
|
|
21403
21401
|
]), context = useDialogContext(PORTAL_NAME, __scopeDialog), isShowing = forceMount || context.open, _React_useState = _sliced_to_array(React2.useState(!isShowing), 2), isFullyHidden = _React_useState[0], setIsFullyHidden = _React_useState[1];
|
|
21404
21402
|
isShowing && isFullyHidden && setIsFullyHidden(!1);
|
|
21405
|
-
var
|
|
21406
|
-
|
|
21407
|
-
|
|
21408
|
-
|
|
21403
|
+
var handleExitComplete = React2.useCallback(function() {
|
|
21404
|
+
setIsFullyHidden(!0);
|
|
21405
|
+
}, []), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
|
|
21406
|
+
onExitComplete: handleExitComplete,
|
|
21409
21407
|
children: isShowing ? children : null
|
|
21410
21408
|
}), isSheet = useShowDialogSheet(context);
|
|
21411
21409
|
if (isSheet)
|
|
@@ -26920,7 +26918,7 @@ var require_Group_native = __commonJS({
|
|
|
26920
26918
|
}
|
|
26921
26919
|
});
|
|
26922
26920
|
function createGroup(verticalDefault) {
|
|
26923
|
-
return (0, import_helpers.withStaticProperties)(
|
|
26921
|
+
return (0, import_helpers.withStaticProperties)(GroupFrame.styleable(function(props, ref) {
|
|
26924
26922
|
var activeProps = (0, import_core12.useProps)(props), __scopeGroup = activeProps.__scopeGroup, childrenProp = activeProps.children, space = activeProps.space, _activeProps_size = activeProps.size, size3 = _activeProps_size === void 0 ? "$true" : _activeProps_size, spaceDirection = activeProps.spaceDirection, separator = activeProps.separator, scrollable = activeProps.scrollable, _activeProps_axis = activeProps.axis, axis = _activeProps_axis === void 0 ? verticalDefault ? "vertical" : "horizontal" : _activeProps_axis, _activeProps_orientation = activeProps.orientation, orientation = _activeProps_orientation === void 0 ? axis : _activeProps_orientation, disabledProp = activeProps.disabled, disablePassBorderRadiusProp = activeProps.disablePassBorderRadius, borderRadius = activeProps.borderRadius, forceUseItem = activeProps.forceUseItem, restProps = _object_without_properties5(activeProps, [
|
|
26925
26923
|
"__scopeGroup",
|
|
26926
26924
|
"children",
|
|
@@ -28165,8 +28163,11 @@ var require_Animate_native = __commonJS({
|
|
|
28165
28163
|
enterVariant: props.enterVariant,
|
|
28166
28164
|
exitVariant: props.exitVariant,
|
|
28167
28165
|
enterExitVariant: props.enterExitVariant,
|
|
28168
|
-
|
|
28166
|
+
// BUGFIX: this causes continous re-renders if keepChildrenMounted is true, see HeaderMenu
|
|
28167
|
+
// but since we always re-render this component on open changes this should be fine to leave off?
|
|
28168
|
+
presenceAffectsLayout: !1,
|
|
28169
28169
|
isPresent: props.present,
|
|
28170
|
+
custom: props.custom,
|
|
28170
28171
|
children
|
|
28171
28172
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, _object_spread_props8(_object_spread9({}, props), {
|
|
28172
28173
|
children: props.present ? children : null
|
|
@@ -30997,40 +30998,35 @@ var require_Popover_native = __commonJS({
|
|
|
30997
30998
|
"disableRemoveScroll",
|
|
30998
30999
|
"freezeContentsWhenHidden",
|
|
30999
31000
|
"setIsFullyHidden"
|
|
31000
|
-
]), context = usePopoverContext(__scopePopover), open = context.open, keepChildrenMounted = context.keepChildrenMounted, popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE), contents =
|
|
31001
|
-
|
|
31002
|
-
style: {
|
|
31003
|
-
display: "contents"
|
|
31004
|
-
},
|
|
31005
|
-
children
|
|
31006
|
-
}) : children;
|
|
31007
|
-
}, [
|
|
31001
|
+
]), context = usePopoverContext(__scopePopover), open = context.open, keepChildrenMounted = context.keepChildrenMounted, popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE), contents = import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
|
|
31002
|
+
style: dspContentsStyle,
|
|
31008
31003
|
children
|
|
31009
|
-
|
|
31004
|
+
}) : children;
|
|
31010
31005
|
if (context.breakpointActive) {
|
|
31011
31006
|
var childrenWithoutScrollView = React2.Children.toArray(children).map(function(child) {
|
|
31012
31007
|
return /* @__PURE__ */ React2.isValidElement(child) && child.type === import_react_native4.ScrollView ? child.props.children : child;
|
|
31013
|
-
}), content =
|
|
31014
|
-
|
|
31008
|
+
}), content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.ResetPresence, {
|
|
31009
|
+
children: childrenWithoutScrollView
|
|
31010
|
+
});
|
|
31011
|
+
return (import_react_native4.Platform.OS === "android" || import_react_native4.Platform.OS === "ios") && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, _object_spread_props8(_object_spread9({
|
|
31015
31012
|
scope: __scopePopover || POPOVER_SCOPE
|
|
31016
31013
|
}, popperContext), {
|
|
31017
|
-
children:
|
|
31018
|
-
|
|
31019
|
-
})
|
|
31020
|
-
})) : content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.ResetPresence, {
|
|
31021
|
-
children: content
|
|
31022
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
|
|
31014
|
+
children: childrenWithoutScrollView
|
|
31015
|
+
}))), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
|
|
31023
31016
|
hostName: "".concat(context.id, "PopoverContents"),
|
|
31024
31017
|
children: content
|
|
31025
31018
|
});
|
|
31026
31019
|
}
|
|
31020
|
+
var handleExitComplete = React2.useCallback(function() {
|
|
31021
|
+
setIsFullyHidden == null || setIsFullyHidden(!0);
|
|
31022
|
+
}, [
|
|
31023
|
+
setIsFullyHidden
|
|
31024
|
+
]);
|
|
31027
31025
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate.Animate, {
|
|
31028
31026
|
type: "presence",
|
|
31029
31027
|
present: !!open,
|
|
31030
31028
|
keepChildrenMounted,
|
|
31031
|
-
onExitComplete:
|
|
31032
|
-
setIsFullyHidden && setIsFullyHidden(!0);
|
|
31033
|
-
},
|
|
31029
|
+
onExitComplete: handleExitComplete,
|
|
31034
31030
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContent, _object_spread_props8(_object_spread9({
|
|
31035
31031
|
__scopePopper: __scopePopover || POPOVER_SCOPE,
|
|
31036
31032
|
"data-state": getState(open),
|
|
@@ -31042,9 +31038,7 @@ var require_Popover_native = __commonJS({
|
|
|
31042
31038
|
allowPinchZoom: !0,
|
|
31043
31039
|
// causes lots of bugs on touch web on site
|
|
31044
31040
|
removeScrollBar: !1,
|
|
31045
|
-
style:
|
|
31046
|
-
display: "contents"
|
|
31047
|
-
},
|
|
31041
|
+
style: dspContentsStyle,
|
|
31048
31042
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.ResetPresence, {
|
|
31049
31043
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_focus_scope.FocusScope, {
|
|
31050
31044
|
loop: !0,
|
|
@@ -31058,7 +31052,9 @@ var require_Popover_native = __commonJS({
|
|
|
31058
31052
|
})
|
|
31059
31053
|
}), context.contentId)
|
|
31060
31054
|
});
|
|
31061
|
-
}),
|
|
31055
|
+
}), dspContentsStyle = {
|
|
31056
|
+
display: "contents"
|
|
31057
|
+
}, PopoverClose = /* @__PURE__ */ React2.forwardRef(function(props, forwardedRef) {
|
|
31062
31058
|
var __scopePopover = props.__scopePopover, rest = _object_without_properties5(props, [
|
|
31063
31059
|
"__scopePopover"
|
|
31064
31060
|
]), context = usePopoverContext(__scopePopover);
|
|
@@ -31101,11 +31097,11 @@ var require_Popover_native = __commonJS({
|
|
|
31101
31097
|
onChange: function(val) {
|
|
31102
31098
|
onOpenChange == null || onOpenChange(val, viaRef.current);
|
|
31103
31099
|
}
|
|
31104
|
-
}), 2), open = _useControllableState[0], setOpen = _useControllableState[1],
|
|
31100
|
+
}), 2), open = _useControllableState[0], setOpen = _useControllableState[1], handleOpenChange = (0, import_core12.useEvent)(function(val, via) {
|
|
31101
|
+
viaRef.current = via, setOpen(val);
|
|
31102
|
+
}), sheetActive = useSheetBreakpointActive(sheetBreakpoint), floatingContext = (0, import_useFloatingContext.useFloatingContext)({
|
|
31105
31103
|
open,
|
|
31106
|
-
setOpen:
|
|
31107
|
-
viaRef.current = via, setOpen(val);
|
|
31108
|
-
},
|
|
31104
|
+
setOpen: handleOpenChange,
|
|
31109
31105
|
disable: sheetActive,
|
|
31110
31106
|
hoverable,
|
|
31111
31107
|
disableFocus
|
|
@@ -31122,9 +31118,7 @@ var require_Popover_native = __commonJS({
|
|
|
31122
31118
|
triggerRef,
|
|
31123
31119
|
open,
|
|
31124
31120
|
breakpointActive: sheetActive,
|
|
31125
|
-
onOpenChange:
|
|
31126
|
-
viaRef.current = via, setOpen(val);
|
|
31127
|
-
},
|
|
31121
|
+
onOpenChange: handleOpenChange,
|
|
31128
31122
|
onOpenToggle: (0, import_core12.useEvent)(function() {
|
|
31129
31123
|
open && sheetActive || setOpen(!open);
|
|
31130
31124
|
}),
|