tamagui 1.138.2 → 1.138.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.
Files changed (3) hide show
  1. package/dist/native.cjs +121 -48
  2. package/dist/test.cjs +121 -48
  3. package/package.json +55 -55
package/dist/native.cjs CHANGED
@@ -3115,6 +3115,10 @@ var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVar
3115
3115
  for (var _key in value) {
3116
3116
  var subKey = conf2.shorthands[_key] || _key, val = value[_key];
3117
3117
  if (!(!styleProps2.noSkip && subKey in skipProps)) {
3118
+ if (staticConfig) {
3119
+ var _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 || (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);
3120
+ contextProps && subKey in contextProps && (styleState.overriddenContextProps || (styleState.overriddenContextProps = {}), styleState.overriddenContextProps[subKey] = val);
3121
+ }
3118
3122
  if (styleProps2.noExpand) res[subKey] = val;
3119
3123
  else if (variants2 && subKey in variants2) {
3120
3124
  if (parentVariantKey && parentVariantKey === key) res[subKey] = // SYNC WITH *1
@@ -3279,6 +3283,17 @@ function _type_of$5(obj) {
3279
3283
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
3280
3284
  }
3281
3285
  var conf;
3286
+ function normalizeGroupKey(key, groupContext) {
3287
+ var parts = key.split("-"), plen = parts.length;
3288
+ if (
3289
+ // check if its actually a simple group selector to avoid breaking selectors
3290
+ plen === 2 || plen === 3 && pseudoPriorities[parts[parts.length - 1]]
3291
+ ) {
3292
+ var name = parts[1];
3293
+ if (groupContext && !groupContext[name]) return key.replace("$group-", "$group-true-");
3294
+ }
3295
+ return key;
3296
+ }
3282
3297
  function isValidStyleKey(key, validStyles2, accept) {
3283
3298
  return key in validStyles2 ? true : accept && key in accept;
3284
3299
  }
@@ -3305,16 +3320,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3305
3320
  return "continue";
3306
3321
  }
3307
3322
  var isVariant = !isValidStyleKeyInit && variants2 && keyInit in variants2, isStyleLikeKey = isValidStyleKeyInit || isVariant, isPseudo = keyInit in validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo ? getMediaKey(keyInit) : false, isMediaOrPseudo = !!(isMedia || isPseudo);
3308
- if (isMediaOrPseudo && isMedia === "group") {
3309
- var parts = keyInit.split("-"), plen = parts.length;
3310
- if (
3311
- // check if its actually a simple group selector to avoid breaking selectors
3312
- plen === 2 || plen === 3 && pseudoPriorities[parts[parts.length - 1]]
3313
- ) {
3314
- var name2 = parts[1];
3315
- groupContext && !(groupContext == null ? void 0 : groupContext[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
3316
- }
3317
- }
3323
+ isMediaOrPseudo && isMedia === "group" && (keyInit = normalizeGroupKey(keyInit, groupContext));
3318
3324
  var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
3319
3325
  if (isStyleProp && (asChild === "except-style" || asChild === "except-style-web")) return "continue";
3320
3326
  var shouldPassProp = !isStyleProp && isHOC || // is in parent variants
@@ -3338,7 +3344,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3338
3344
  mergeStyle(styleState, key4, val2, 1);
3339
3345
  return;
3340
3346
  }
3341
- if (isPseudo = key4 in validPseudoKeys, isMedia = isPseudo ? false : getMediaKey(key4), isMediaOrPseudo = !!(isMedia || isPseudo), isVariant = variants2 && key4 in variants2, (inlineProps == null ? void 0 : inlineProps.has(key4)) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened == null ? void 0 : inlineWhenUnflattened.has(key4))) {
3347
+ if (isPseudo = key4 in validPseudoKeys, isMedia = isPseudo ? false : getMediaKey(key4), isMediaOrPseudo = !!(isMedia || isPseudo), isVariant = variants2 && key4 in variants2, isMedia === "group" && (key4 = normalizeGroupKey(key4, groupContext)), (inlineProps == null ? void 0 : inlineProps.has(key4)) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened == null ? void 0 : inlineWhenUnflattened.has(key4))) {
3342
3348
  var _props_key;
3343
3349
  viewProps[key4] = (_props_key = props[key4]) !== null && _props_key !== void 0 ? _props_key : val2;
3344
3350
  }
@@ -3538,6 +3544,10 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3538
3544
  (_styleState2 = styleState).style || (_styleState2.style = {}), Object.assign(styleState.style, normalizeStyle(style));
3539
3545
  }
3540
3546
  }
3547
+ if (viewProps.tabIndex === 0) {
3548
+ var _viewProps1, _accessible1;
3549
+ (_accessible1 = (_viewProps1 = viewProps).accessible) !== null && _accessible1 !== void 0 || (_viewProps1.accessible = true);
3550
+ }
3541
3551
  var style1 = styleState.style;
3542
3552
  if (style1 == null ? void 0 : style1.fontFamily) {
3543
3553
  var _getFont, faceInfo = (_getFont = getFont(style1.fontFamily)) === null || _getFont === void 0 ? void 0 : _getFont.face;
@@ -3557,7 +3567,8 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3557
3567
  rulesToInsert,
3558
3568
  dynamicThemeAccess,
3559
3569
  pseudoGroups,
3560
- mediaGroups
3570
+ mediaGroups,
3571
+ overriddenContextProps: styleState.overriddenContextProps
3561
3572
  }, asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
3562
3573
  if (!styleProps2.noMergeStyle && !asChildExceptStyleLike) {
3563
3574
  var style2 = styleState.style;
@@ -3575,26 +3586,33 @@ function mergeFlatTransforms(target, flatTransforms) {
3575
3586
  });
3576
3587
  }
3577
3588
  function mergeStyle(styleState, key, val, importance) {
3578
- var {
3589
+ var _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, {
3579
3590
  viewProps,
3580
3591
  styleProps: styleProps2,
3581
3592
  staticConfig,
3582
3593
  usedKeys
3583
3594
  } = styleState, existingImportance = usedKeys[key] || 0;
3584
- if (!(existingImportance > importance)) if (key in stylePropsTransform) {
3585
- var _styleState;
3586
- (_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), usedKeys[key] = importance, styleState.flatTransforms[key] = val;
3587
- } else {
3588
- var shouldNormalize = isWeb, out = shouldNormalize ? normalizeValueWithProperty$1(val) : val;
3589
- if (
3590
- // accept is for props not styles
3591
- staticConfig.accept && key in staticConfig.accept
3592
- ) viewProps[key] = out;
3593
- else {
3595
+ if (!(existingImportance > importance)) {
3596
+ var contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 || (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);
3597
+ if (contextProps && key in contextProps) {
3598
+ var _styleState;
3599
+ (_styleState = styleState).overriddenContextProps || (_styleState.overriddenContextProps = {}), styleState.overriddenContextProps[key] = val;
3600
+ }
3601
+ if (key in stylePropsTransform) {
3594
3602
  var _styleState1;
3595
- (_styleState1 = styleState).style || (_styleState1.style = {}), usedKeys[key] = importance, styleState.style[key] = // if you dont do this you'll be passing props.transform arrays directly here and then mutating them
3596
- // if theres any flatTransforms later, causing issues (mutating props is bad, in strict mode styles get borked)
3597
- key === "transform" && Array.isArray(out) ? [...out] : out;
3603
+ (_styleState1 = styleState).flatTransforms || (_styleState1.flatTransforms = {}), usedKeys[key] = importance, styleState.flatTransforms[key] = val;
3604
+ } else {
3605
+ var shouldNormalize = isWeb, out = shouldNormalize ? normalizeValueWithProperty$1(val) : val;
3606
+ if (
3607
+ // accept is for props not styles
3608
+ staticConfig.accept && key in staticConfig.accept
3609
+ ) viewProps[key] = out;
3610
+ else {
3611
+ var _styleState2;
3612
+ (_styleState2 = styleState).style || (_styleState2.style = {}), usedKeys[key] = importance, styleState.style[key] = // if you dont do this you'll be passing props.transform arrays directly here and then mutating them
3613
+ // if theres any flatTransforms later, causing issues (mutating props is bad, in strict mode styles get borked)
3614
+ key === "transform" && Array.isArray(out) ? [...out] : out;
3615
+ }
3598
3616
  }
3599
3617
  }
3600
3618
  }
@@ -3865,7 +3883,7 @@ function _type_of$4(obj) {
3865
3883
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
3866
3884
  }
3867
3885
  var useComponentState = function(props, animationDriver, staticConfig, config) {
3868
- var _animationDriver_usePresence, isHydrated = useDidFinishSSR(), needsHydration = !useIsClientOnly(), useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, {
3886
+ var _animationDriver_usePresence, isHydrated = useDidFinishSSR(), needsHydration = !useIsClientOnly(), useAnimations = (animationDriver == null ? void 0 : animationDriver.isStub) ? void 0 : animationDriver == null ? void 0 : animationDriver.useAnimations, {
3869
3887
  isHOC
3870
3888
  } = staticConfig, stateRef = React.useRef(
3871
3889
  // performance: avoid creating object every render
@@ -4022,7 +4040,7 @@ function createComponent(staticConfig) {
4022
4040
  nextProps && (props = nextProps), overriddenContextProps = overrides;
4023
4041
  }
4024
4042
  var componentName2 = props.componentName || staticConfig.componentName;
4025
- var componentContext = React.useContext(ComponentContext), groupContextParent = React.useContext(GroupContext), animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = useComponentState(props, animationDriver, staticConfig), {
4043
+ var componentContext = React.useContext(ComponentContext), groupContextParent = React.useContext(GroupContext), animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = useComponentState(props, (animationDriver == null ? void 0 : animationDriver.isStub) ? null : animationDriver, staticConfig), {
4026
4044
  disabled,
4027
4045
  groupName,
4028
4046
  hasAnimationProp,
@@ -4112,7 +4130,15 @@ function createComponent(staticConfig) {
4112
4130
  willBeAnimated,
4113
4131
  styledContext: styledContextValue
4114
4132
  }, themeName = (themeState == null ? void 0 : themeState.name) || "";
4115
- var splitStyles = useSplitStyles(props, staticConfig, theme, themeName, state, styleProps2, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), isPassthrough = !splitStyles, groupContext = groupName && (allGroupContexts == null ? void 0 : allGroupContexts[groupName]) || null;
4133
+ var splitStyles = useSplitStyles(props, staticConfig, theme, themeName, state, styleProps2, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), isPassthrough = !splitStyles, contextForOverride = staticConfig.context;
4134
+ if (splitStyles == null ? void 0 : splitStyles.overriddenContextProps) {
4135
+ var _staticConfig_parentStaticConfig, contextForProps = staticConfig.context || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 ? void 0 : _staticConfig_parentStaticConfig.context);
4136
+ if (contextForProps) {
4137
+ for (var key in splitStyles.overriddenContextProps) overriddenContextProps || (overriddenContextProps = {}), overriddenContextProps[key] = splitStyles.overriddenContextProps[key];
4138
+ staticConfig.context || (contextForOverride = contextForProps);
4139
+ }
4140
+ }
4141
+ var groupContext = groupName && (allGroupContexts == null ? void 0 : allGroupContexts[groupName]) || null;
4116
4142
  if (!isPassthrough && groupContext && // avoids onLayout if we don't need it
4117
4143
  props.containerType !== "normal") {
4118
4144
  var groupState = groupContext == null ? void 0 : groupContext.state;
@@ -4154,8 +4180,8 @@ function createComponent(staticConfig) {
4154
4180
  }), stateRef.current.setStateShallow = function(nextOrGetNext) {
4155
4181
  var prev = stateRef.current.nextState || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
4156
4182
  if (!(next === prev || isEqualShallow(prev, next))) {
4157
- var canAvoidReRender = Object.keys(next).every(function(key2) {
4158
- return avoidReRenderKeys.has(key2);
4183
+ var canAvoidReRender = Object.keys(next).every(function(key3) {
4184
+ return avoidReRenderKeys.has(key3);
4159
4185
  }), updatedState = __spreadValues(__spreadValues({}, prev), next);
4160
4186
  if (stateRef.current.nextState = updatedState, canAvoidReRender) {
4161
4187
  var _stateRef_current_updateStyleListener, _stateRef_current;
@@ -4401,9 +4427,9 @@ function createComponent(staticConfig) {
4401
4427
  }))), "group" in props && (content = /* @__PURE__ */ jsxRuntimeExports.jsx(GroupContext.Provider, {
4402
4428
  value: allGroupContexts,
4403
4429
  children: content
4404
- })), content = disableTheme || !splitStyles ? content : getThemedChildren(themeState, content, themeStateProps, false, stateRef), overriddenContextProps) {
4405
- var Provider = staticConfig.context.Provider;
4406
- for (var key in styledContextValue) key in overriddenContextProps || (overriddenContextProps[key] = styledContextValue[key]);
4430
+ })), content = disableTheme || !splitStyles ? content : getThemedChildren(themeState, content, themeStateProps, false, stateRef), overriddenContextProps && contextForOverride) {
4431
+ var Provider = contextForOverride.Provider;
4432
+ for (var key1 in styledContextValue) key1 in overriddenContextProps || (overriddenContextProps[key1] = styledContextValue[key1]);
4407
4433
  debugProp && console.info("overriddenContextProps", overriddenContextProps), content = /* @__PURE__ */ jsxRuntimeExports.jsx(Provider, __spreadProps(__spreadValues({
4408
4434
  __disableMergeDefaultValues: true
4409
4435
  }, overriddenContextProps), {
@@ -4749,6 +4775,35 @@ var cache$1 = /* @__PURE__ */ new WeakMap(), createVariables = function(tokens)
4749
4775
  }
4750
4776
  return cache$1.set(res, true), res;
4751
4777
  };
4778
+ var noAnimationDriver = function(method) {
4779
+ console.warn(`No animation driver configured. To use ${method}, you must pass \`animations\` to createTamagui. See: https://tamagui.dev/docs/core/animations`);
4780
+ }, createEmptyAnimationDriver = function() {
4781
+ return {
4782
+ isReactNative: false,
4783
+ supportsCSS: true,
4784
+ classNameAnimation: true,
4785
+ isStub: true,
4786
+ animations: {},
4787
+ useAnimations: function() {
4788
+ return noAnimationDriver("animations");
4789
+ },
4790
+ usePresence: function() {
4791
+ return noAnimationDriver("usePresence");
4792
+ },
4793
+ ResetPresence: function() {
4794
+ return noAnimationDriver("ResetPresence");
4795
+ },
4796
+ useAnimatedNumber: function() {
4797
+ return noAnimationDriver("useAnimatedNumber");
4798
+ },
4799
+ useAnimatedNumberStyle: function() {
4800
+ return noAnimationDriver("useAnimatedNumberStyle");
4801
+ },
4802
+ useAnimatedNumberReaction: function() {
4803
+ return noAnimationDriver("useAnimatedNumberReaction");
4804
+ }
4805
+ };
4806
+ }, defaultAnimationDriver = createEmptyAnimationDriver();
4752
4807
  function insertFont(name, fontIn) {
4753
4808
  var font = createFont(fontIn), tokened = createVariables(font, name), parsed = parseFont(tokened);
4754
4809
  return setConfigFont(name, tokened, parsed), parsed;
@@ -4831,7 +4886,7 @@ function createTamagui$2(configIn) {
4831
4886
  fonts: {},
4832
4887
  onlyAllowShorthands: false,
4833
4888
  fontLanguages: [],
4834
- animations: {},
4889
+ animations: defaultAnimationDriver,
4835
4890
  media: {}
4836
4891
  }, configIn), {
4837
4892
  unset,
@@ -4881,8 +4936,7 @@ function getThemesDeduped(themes2, colorTokens) {
4881
4936
  e2.names.push(themeName);
4882
4937
  continue;
4883
4938
  }
4884
- var theme = __spreadValues({}, rawTheme);
4885
- colorTokens && Object.assign(theme, colorTokens);
4939
+ var theme = __spreadValues(__spreadValues({}, colorTokens), rawTheme);
4886
4940
  for (var key1 in theme) ensureThemeVariable(theme, key1);
4887
4941
  var deduped = {
4888
4942
  names: [themeName],
@@ -9812,11 +9866,18 @@ var hiddenSize = 10000.1, relativeDimensionTo = "screen", SheetImplementationCus
9812
9866
  })(), [isShowingInnerSheet, setIsShowingInnerSheet] = React.useState(false), shouldHideParentSheet = modal && isShowingInnerSheet && // if not using weird portal limitation we dont need to hide parent sheet
9813
9867
  USE_NATIVE_PORTAL, sheetInsideSheet = React.useContext(SheetInsideSheetContext), onInnerSheet = React.useCallback(function(hasChild) {
9814
9868
  setIsShowingInnerSheet(hasChild);
9815
- }, []), positions = React.useMemo(function() {
9869
+ }, []), stableFrameSize = React.useRef(frameSize);
9870
+ React.useEffect(function() {
9871
+ open2 && frameSize && (stableFrameSize.current = frameSize);
9872
+ }, [open2, frameSize]);
9873
+ var positions = React.useMemo(function() {
9816
9874
  return snapPoints.map(function(point) {
9817
- return getYPositions(snapPointsMode, point, screenSize, frameSize);
9875
+ return (
9876
+ // FIX: Use stable frameSize when closing to prevent position jumps
9877
+ getYPositions(snapPointsMode, point, screenSize, open2 ? frameSize : stableFrameSize.current)
9878
+ );
9818
9879
  });
9819
- }, [screenSize, frameSize, snapPoints, snapPointsMode]), {
9880
+ }, [screenSize, frameSize, snapPoints, snapPointsMode, open2]), {
9820
9881
  useAnimatedNumber,
9821
9882
  useAnimatedNumberStyle,
9822
9883
  useAnimatedNumberReaction
@@ -9931,9 +9992,12 @@ var hiddenSize = 10000.1, relativeDimensionTo = "screen", SheetImplementationCus
9931
9992
  onPanResponderRelease: finish
9932
9993
  });
9933
9994
  }, [disableDrag, isShowingInnerSheet, animateTo, frameSize, positions, setPosition]), handleAnimationViewLayout = React.useCallback(function(e2) {
9934
- var _e_nativeEvent, next = Math.min((_e_nativeEvent = e2.nativeEvent) === null || _e_nativeEvent === void 0 ? void 0 : _e_nativeEvent.layout.height, Dimensions.get(relativeDimensionTo).height);
9935
- next && setFrameSize(next);
9936
- }, []), handleMaxContentViewLayout = React.useCallback(function(e2) {
9995
+ var _e_nativeEvent;
9996
+ if (!(!open2 && stableFrameSize.current !== 0)) {
9997
+ var next = Math.min((_e_nativeEvent = e2.nativeEvent) === null || _e_nativeEvent === void 0 ? void 0 : _e_nativeEvent.layout.height, Dimensions.get(relativeDimensionTo).height);
9998
+ next && setFrameSize(next);
9999
+ }
10000
+ }, [open2]), handleMaxContentViewLayout = React.useCallback(function(e2) {
9937
10001
  var _e_nativeEvent, next = Math.min((_e_nativeEvent = e2.nativeEvent) === null || _e_nativeEvent === void 0 ? void 0 : _e_nativeEvent.layout.height, Dimensions.get(relativeDimensionTo).height);
9938
10002
  next && setMaxContentSize(next);
9939
10003
  }, []), animatedStyle = useAnimatedNumberStyle(animatedNumber, function(val) {
@@ -10281,13 +10345,18 @@ function createSheet(param) {
10281
10345
  frameSize,
10282
10346
  contentRef,
10283
10347
  open: open2
10284
- } = context2, composedContentRef = useComposedRefs(forwardedRef, contentRef), offscreenSize = useSheetOffscreenSize(context2), sheetContents = React.useMemo(function() {
10348
+ } = context2, composedContentRef = useComposedRefs(forwardedRef, contentRef), offscreenSize = useSheetOffscreenSize(context2), stableFrameSize = React.useRef(frameSize);
10349
+ React.useEffect(function() {
10350
+ open2 && frameSize && (stableFrameSize.current = frameSize);
10351
+ }, [open2, frameSize]);
10352
+ var sheetContents = React.useMemo(function() {
10353
+ var shouldUseFixedHeight = hasFit && !open2 && stableFrameSize.current;
10285
10354
  return (
10286
10355
  // @ts-expect-error
10287
10356
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Frame2, __spreadProps(__spreadValues({
10288
10357
  ref: composedContentRef,
10289
- flex: hasFit ? 0 : 1,
10290
- height: hasFit ? void 0 : frameSize,
10358
+ flex: hasFit && open2 ? 0 : 1,
10359
+ height: shouldUseFixedHeight ? stableFrameSize.current : hasFit ? void 0 : frameSize,
10291
10360
  pointerEvents: open2 ? "auto" : "none"
10292
10361
  }, props), {
10293
10362
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx(StackZIndexContext, {
@@ -10498,7 +10567,9 @@ var DialogContext = createStyledContext(
10498
10567
  height: "auto",
10499
10568
  // ensure always in frame and right height
10500
10569
  maxHeight: "100vh",
10501
- position: "fixed"
10570
+ position: "fixed",
10571
+ // ensure dialog inherits stacking context from portal wrapper
10572
+ zIndex: 1
10502
10573
  }
10503
10574
  }
10504
10575
  }
@@ -11329,6 +11400,8 @@ var ButtonContext = createStyledContext({
11329
11400
  context: ButtonContext,
11330
11401
  role: "button",
11331
11402
  focusable: true,
11403
+ // forces runtime pressStyle so it passes through context text colors
11404
+ disableClassName: true,
11332
11405
  variants: {
11333
11406
  unstyled: {
11334
11407
  false: {
@@ -13938,7 +14011,7 @@ var needsRepropagation = isAndroid || isIos && !USE_NATIVE_PORTAL, PopoverContex
13938
14011
  virtualRef
13939
14012
  }), {
13940
14013
  scope,
13941
- asChild: rest.asChild,
14014
+ asChild: true,
13942
14015
  children: trigger
13943
14016
  }));
13944
14017
  }), PopoverContentFrame = styled(PopperContentFrame, {
package/dist/test.cjs CHANGED
@@ -3356,6 +3356,10 @@ var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVar
3356
3356
  for (var _key in value) {
3357
3357
  var subKey = conf2.shorthands[_key] || _key, val = value[_key];
3358
3358
  if (!(!styleProps2.noSkip && subKey in skipProps)) {
3359
+ if (staticConfig) {
3360
+ var _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 || (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);
3361
+ contextProps && subKey in contextProps && (styleState.overriddenContextProps || (styleState.overriddenContextProps = {}), styleState.overriddenContextProps[subKey] = val);
3362
+ }
3359
3363
  if (styleProps2.noExpand) res[subKey] = val;
3360
3364
  else if (variants2 && subKey in variants2) {
3361
3365
  if (parentVariantKey && parentVariantKey === key) res[subKey] = // SYNC WITH *1
@@ -3520,6 +3524,17 @@ function _type_of$5(obj) {
3520
3524
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
3521
3525
  }
3522
3526
  var conf;
3527
+ function normalizeGroupKey(key, groupContext) {
3528
+ var parts = key.split("-"), plen = parts.length;
3529
+ if (
3530
+ // check if its actually a simple group selector to avoid breaking selectors
3531
+ plen === 2 || plen === 3 && pseudoPriorities[parts[parts.length - 1]]
3532
+ ) {
3533
+ var name = parts[1];
3534
+ if (groupContext && !groupContext[name]) return key.replace("$group-", "$group-true-");
3535
+ }
3536
+ return key;
3537
+ }
3523
3538
  function isValidStyleKey(key, validStyles2, accept) {
3524
3539
  return key in validStyles2 ? true : accept && key in accept;
3525
3540
  }
@@ -3547,16 +3562,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3547
3562
  return "continue";
3548
3563
  }
3549
3564
  var isVariant = !isValidStyleKeyInit && variants2 && keyInit in variants2, isStyleLikeKey = isValidStyleKeyInit || isVariant, isPseudo = keyInit in validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo ? getMediaKey(keyInit) : false, isMediaOrPseudo = !!(isMedia || isPseudo);
3550
- if (isMediaOrPseudo && isMedia === "group") {
3551
- var parts = keyInit.split("-"), plen = parts.length;
3552
- if (
3553
- // check if its actually a simple group selector to avoid breaking selectors
3554
- plen === 2 || plen === 3 && pseudoPriorities[parts[parts.length - 1]]
3555
- ) {
3556
- var name2 = parts[1];
3557
- groupContext && !(groupContext == null ? void 0 : groupContext[name2]) && (keyInit = keyInit.replace("$group-", "$group-true-"));
3558
- }
3559
- }
3565
+ isMediaOrPseudo && isMedia === "group" && (keyInit = normalizeGroupKey(keyInit, groupContext));
3560
3566
  var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
3561
3567
  if (isStyleProp && (asChild === "except-style" || asChild === "except-style-web")) return "continue";
3562
3568
  var shouldPassProp = !isStyleProp && isHOC || // is in parent variants
@@ -3580,7 +3586,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3580
3586
  mergeStyle(styleState, key4, val2, 1);
3581
3587
  return;
3582
3588
  }
3583
- if (isPseudo = key4 in validPseudoKeys, isMedia = isPseudo ? false : getMediaKey(key4), isMediaOrPseudo = !!(isMedia || isPseudo), isVariant = variants2 && key4 in variants2, (inlineProps == null ? void 0 : inlineProps.has(key4)) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened == null ? void 0 : inlineWhenUnflattened.has(key4))) {
3589
+ if (isPseudo = key4 in validPseudoKeys, isMedia = isPseudo ? false : getMediaKey(key4), isMediaOrPseudo = !!(isMedia || isPseudo), isVariant = variants2 && key4 in variants2, isMedia === "group" && (key4 = normalizeGroupKey(key4, groupContext)), (inlineProps == null ? void 0 : inlineProps.has(key4)) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened == null ? void 0 : inlineWhenUnflattened.has(key4))) {
3584
3590
  var _props_key;
3585
3591
  viewProps[key4] = (_props_key = props[key4]) !== null && _props_key !== void 0 ? _props_key : val2;
3586
3592
  }
@@ -3780,6 +3786,10 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3780
3786
  (_styleState2 = styleState).style || (_styleState2.style = {}), Object.assign(styleState.style, normalizeStyle(style));
3781
3787
  }
3782
3788
  }
3789
+ if (viewProps.tabIndex === 0) {
3790
+ var _viewProps1, _accessible1;
3791
+ (_accessible1 = (_viewProps1 = viewProps).accessible) !== null && _accessible1 !== void 0 || (_viewProps1.accessible = true);
3792
+ }
3783
3793
  var style1 = styleState.style;
3784
3794
  if (style1 == null ? void 0 : style1.fontFamily) {
3785
3795
  var _getFont, faceInfo = (_getFont = getFont(style1.fontFamily)) === null || _getFont === void 0 ? void 0 : _getFont.face;
@@ -3799,7 +3809,8 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3799
3809
  rulesToInsert,
3800
3810
  dynamicThemeAccess,
3801
3811
  pseudoGroups,
3802
- mediaGroups
3812
+ mediaGroups,
3813
+ overriddenContextProps: styleState.overriddenContextProps
3803
3814
  }, asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
3804
3815
  if (!styleProps2.noMergeStyle && !asChildExceptStyleLike) {
3805
3816
  var style2 = styleState.style;
@@ -3817,26 +3828,33 @@ function mergeFlatTransforms(target, flatTransforms) {
3817
3828
  });
3818
3829
  }
3819
3830
  function mergeStyle(styleState, key, val, importance) {
3820
- var {
3831
+ var _staticConfig_context, _staticConfig_parentStaticConfig_context, _staticConfig_parentStaticConfig, {
3821
3832
  viewProps,
3822
3833
  styleProps: styleProps2,
3823
3834
  staticConfig,
3824
3835
  usedKeys
3825
3836
  } = styleState, existingImportance = usedKeys[key] || 0;
3826
- if (!(existingImportance > importance)) if (key in stylePropsTransform) {
3827
- var _styleState;
3828
- (_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), usedKeys[key] = importance, styleState.flatTransforms[key] = val;
3829
- } else {
3830
- var shouldNormalize = isWeb, out = shouldNormalize ? normalizeValueWithProperty$1(val) : val;
3831
- if (
3832
- // accept is for props not styles
3833
- staticConfig.accept && key in staticConfig.accept
3834
- ) viewProps[key] = out;
3835
- else {
3837
+ if (!(existingImportance > importance)) {
3838
+ var contextProps = ((_staticConfig_context = staticConfig.context) === null || _staticConfig_context === void 0 ? void 0 : _staticConfig_context.props) || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 || (_staticConfig_parentStaticConfig_context = _staticConfig_parentStaticConfig.context) === null || _staticConfig_parentStaticConfig_context === void 0 ? void 0 : _staticConfig_parentStaticConfig_context.props);
3839
+ if (contextProps && key in contextProps) {
3840
+ var _styleState;
3841
+ (_styleState = styleState).overriddenContextProps || (_styleState.overriddenContextProps = {}), styleState.overriddenContextProps[key] = val;
3842
+ }
3843
+ if (key in stylePropsTransform) {
3836
3844
  var _styleState1;
3837
- (_styleState1 = styleState).style || (_styleState1.style = {}), usedKeys[key] = importance, styleState.style[key] = // if you dont do this you'll be passing props.transform arrays directly here and then mutating them
3838
- // if theres any flatTransforms later, causing issues (mutating props is bad, in strict mode styles get borked)
3839
- key === "transform" && Array.isArray(out) ? [...out] : out;
3845
+ (_styleState1 = styleState).flatTransforms || (_styleState1.flatTransforms = {}), usedKeys[key] = importance, styleState.flatTransforms[key] = val;
3846
+ } else {
3847
+ var shouldNormalize = isWeb, out = shouldNormalize ? normalizeValueWithProperty$1(val) : val;
3848
+ if (
3849
+ // accept is for props not styles
3850
+ staticConfig.accept && key in staticConfig.accept
3851
+ ) viewProps[key] = out;
3852
+ else {
3853
+ var _styleState2;
3854
+ (_styleState2 = styleState).style || (_styleState2.style = {}), usedKeys[key] = importance, styleState.style[key] = // if you dont do this you'll be passing props.transform arrays directly here and then mutating them
3855
+ // if theres any flatTransforms later, causing issues (mutating props is bad, in strict mode styles get borked)
3856
+ key === "transform" && Array.isArray(out) ? [...out] : out;
3857
+ }
3840
3858
  }
3841
3859
  }
3842
3860
  }
@@ -4107,7 +4125,7 @@ function _type_of$4(obj) {
4107
4125
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
4108
4126
  }
4109
4127
  var useComponentState = function(props, animationDriver, staticConfig, config) {
4110
- var _animationDriver_usePresence, isHydrated = useDidFinishSSR(), needsHydration = !useIsClientOnly(), useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, {
4128
+ var _animationDriver_usePresence, isHydrated = useDidFinishSSR(), needsHydration = !useIsClientOnly(), useAnimations = (animationDriver == null ? void 0 : animationDriver.isStub) ? void 0 : animationDriver == null ? void 0 : animationDriver.useAnimations, {
4111
4129
  isHOC
4112
4130
  } = staticConfig, stateRef = React.useRef(
4113
4131
  // performance: avoid creating object every render
@@ -4268,7 +4286,7 @@ function createComponent(staticConfig) {
4268
4286
  nextProps && (props = nextProps), overriddenContextProps = overrides;
4269
4287
  }
4270
4288
  var componentName2 = props.componentName || staticConfig.componentName;
4271
- var componentContext = React.useContext(ComponentContext), groupContextParent = React.useContext(GroupContext), animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = useComponentState(props, animationDriver, staticConfig), {
4289
+ var componentContext = React.useContext(ComponentContext), groupContextParent = React.useContext(GroupContext), animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = useComponentState(props, (animationDriver == null ? void 0 : animationDriver.isStub) ? null : animationDriver, staticConfig), {
4272
4290
  disabled,
4273
4291
  groupName,
4274
4292
  hasAnimationProp,
@@ -4358,7 +4376,15 @@ function createComponent(staticConfig) {
4358
4376
  willBeAnimated,
4359
4377
  styledContext: styledContextValue
4360
4378
  }, themeName = (themeState == null ? void 0 : themeState.name) || "";
4361
- var splitStyles = useSplitStyles(props, staticConfig, theme, themeName, state, styleProps2, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), isPassthrough = !splitStyles, groupContext = groupName && (allGroupContexts == null ? void 0 : allGroupContexts[groupName]) || null;
4379
+ var splitStyles = useSplitStyles(props, staticConfig, theme, themeName, state, styleProps2, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), isPassthrough = !splitStyles, contextForOverride = staticConfig.context;
4380
+ if (splitStyles == null ? void 0 : splitStyles.overriddenContextProps) {
4381
+ var _staticConfig_parentStaticConfig, contextForProps = staticConfig.context || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 ? void 0 : _staticConfig_parentStaticConfig.context);
4382
+ if (contextForProps) {
4383
+ for (var key in splitStyles.overriddenContextProps) overriddenContextProps || (overriddenContextProps = {}), overriddenContextProps[key] = splitStyles.overriddenContextProps[key];
4384
+ staticConfig.context || (contextForOverride = contextForProps);
4385
+ }
4386
+ }
4387
+ var groupContext = groupName && (allGroupContexts == null ? void 0 : allGroupContexts[groupName]) || null;
4362
4388
  if (!isPassthrough && groupContext && // avoids onLayout if we don't need it
4363
4389
  props.containerType !== "normal") {
4364
4390
  var groupState = groupContext == null ? void 0 : groupContext.state;
@@ -4400,8 +4426,8 @@ function createComponent(staticConfig) {
4400
4426
  }), stateRef.current.setStateShallow = function(nextOrGetNext) {
4401
4427
  var prev = stateRef.current.nextState || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
4402
4428
  if (!(next === prev || isEqualShallow(prev, next))) {
4403
- var canAvoidReRender = Object.keys(next).every(function(key2) {
4404
- return avoidReRenderKeys.has(key2);
4429
+ var canAvoidReRender = Object.keys(next).every(function(key3) {
4430
+ return avoidReRenderKeys.has(key3);
4405
4431
  }), updatedState = __spreadValues(__spreadValues({}, prev), next);
4406
4432
  if (stateRef.current.nextState = updatedState, canAvoidReRender) {
4407
4433
  var _stateRef_current_updateStyleListener, _stateRef_current;
@@ -4647,9 +4673,9 @@ function createComponent(staticConfig) {
4647
4673
  }))), "group" in props && (content = /* @__PURE__ */ jsxRuntimeExports.jsx(GroupContext.Provider, {
4648
4674
  value: allGroupContexts,
4649
4675
  children: content
4650
- })), content = disableTheme || !splitStyles ? content : getThemedChildren(themeState, content, themeStateProps, false, stateRef), overriddenContextProps) {
4651
- var Provider = staticConfig.context.Provider;
4652
- for (var key in styledContextValue) key in overriddenContextProps || (overriddenContextProps[key] = styledContextValue[key]);
4676
+ })), content = disableTheme || !splitStyles ? content : getThemedChildren(themeState, content, themeStateProps, false, stateRef), overriddenContextProps && contextForOverride) {
4677
+ var Provider = contextForOverride.Provider;
4678
+ for (var key1 in styledContextValue) key1 in overriddenContextProps || (overriddenContextProps[key1] = styledContextValue[key1]);
4653
4679
  debugProp && console.info("overriddenContextProps", overriddenContextProps), content = /* @__PURE__ */ jsxRuntimeExports.jsx(Provider, __spreadProps(__spreadValues({
4654
4680
  __disableMergeDefaultValues: true
4655
4681
  }, overriddenContextProps), {
@@ -4995,6 +5021,35 @@ var cache$1 = /* @__PURE__ */ new WeakMap(), createVariables = function(tokens)
4995
5021
  }
4996
5022
  return cache$1.set(res, true), res;
4997
5023
  };
5024
+ var noAnimationDriver = function(method) {
5025
+ console.warn(`No animation driver configured. To use ${method}, you must pass \`animations\` to createTamagui. See: https://tamagui.dev/docs/core/animations`);
5026
+ }, createEmptyAnimationDriver = function() {
5027
+ return {
5028
+ isReactNative: false,
5029
+ supportsCSS: true,
5030
+ classNameAnimation: true,
5031
+ isStub: true,
5032
+ animations: {},
5033
+ useAnimations: function() {
5034
+ return noAnimationDriver("animations");
5035
+ },
5036
+ usePresence: function() {
5037
+ return noAnimationDriver("usePresence");
5038
+ },
5039
+ ResetPresence: function() {
5040
+ return noAnimationDriver("ResetPresence");
5041
+ },
5042
+ useAnimatedNumber: function() {
5043
+ return noAnimationDriver("useAnimatedNumber");
5044
+ },
5045
+ useAnimatedNumberStyle: function() {
5046
+ return noAnimationDriver("useAnimatedNumberStyle");
5047
+ },
5048
+ useAnimatedNumberReaction: function() {
5049
+ return noAnimationDriver("useAnimatedNumberReaction");
5050
+ }
5051
+ };
5052
+ }, defaultAnimationDriver = createEmptyAnimationDriver();
4998
5053
  function insertFont(name, fontIn) {
4999
5054
  var font = createFont(fontIn), tokened = createVariables(font, name), parsed = parseFont(tokened);
5000
5055
  return setConfigFont(name, tokened, parsed), parsed;
@@ -5078,7 +5133,7 @@ function createTamagui$2(configIn) {
5078
5133
  fonts: {},
5079
5134
  onlyAllowShorthands: false,
5080
5135
  fontLanguages: [],
5081
- animations: {},
5136
+ animations: defaultAnimationDriver,
5082
5137
  media: {}
5083
5138
  }, configIn), {
5084
5139
  unset,
@@ -5128,8 +5183,7 @@ function getThemesDeduped(themes2, colorTokens) {
5128
5183
  e2.names.push(themeName);
5129
5184
  continue;
5130
5185
  }
5131
- var theme = __spreadValues({}, rawTheme);
5132
- colorTokens && Object.assign(theme, colorTokens);
5186
+ var theme = __spreadValues(__spreadValues({}, colorTokens), rawTheme);
5133
5187
  for (var key1 in theme) ensureThemeVariable(theme, key1);
5134
5188
  var deduped = {
5135
5189
  names: [themeName],
@@ -9960,11 +10014,18 @@ var hiddenSize = 10000.1, relativeDimensionTo = "screen", SheetImplementationCus
9960
10014
  })(), [isShowingInnerSheet, setIsShowingInnerSheet] = React.useState(false), shouldHideParentSheet = modal && isShowingInnerSheet && // if not using weird portal limitation we dont need to hide parent sheet
9961
10015
  USE_NATIVE_PORTAL, sheetInsideSheet = React.useContext(SheetInsideSheetContext), onInnerSheet = React.useCallback(function(hasChild) {
9962
10016
  setIsShowingInnerSheet(hasChild);
9963
- }, []), positions = React.useMemo(function() {
10017
+ }, []), stableFrameSize = React.useRef(frameSize);
10018
+ React.useEffect(function() {
10019
+ open2 && frameSize && (stableFrameSize.current = frameSize);
10020
+ }, [open2, frameSize]);
10021
+ var positions = React.useMemo(function() {
9964
10022
  return snapPoints.map(function(point) {
9965
- return getYPositions(snapPointsMode, point, screenSize, frameSize);
10023
+ return (
10024
+ // FIX: Use stable frameSize when closing to prevent position jumps
10025
+ getYPositions(snapPointsMode, point, screenSize, open2 ? frameSize : stableFrameSize.current)
10026
+ );
9966
10027
  });
9967
- }, [screenSize, frameSize, snapPoints, snapPointsMode]), {
10028
+ }, [screenSize, frameSize, snapPoints, snapPointsMode, open2]), {
9968
10029
  useAnimatedNumber,
9969
10030
  useAnimatedNumberStyle,
9970
10031
  useAnimatedNumberReaction
@@ -10079,9 +10140,12 @@ var hiddenSize = 10000.1, relativeDimensionTo = "screen", SheetImplementationCus
10079
10140
  onPanResponderRelease: finish
10080
10141
  });
10081
10142
  }, [disableDrag, isShowingInnerSheet, animateTo, frameSize, positions, setPosition]), handleAnimationViewLayout = React.useCallback(function(e2) {
10082
- var _e_nativeEvent, next = Math.min((_e_nativeEvent = e2.nativeEvent) === null || _e_nativeEvent === void 0 ? void 0 : _e_nativeEvent.layout.height, Dimensions.get(relativeDimensionTo).height);
10083
- next && setFrameSize(next);
10084
- }, []), handleMaxContentViewLayout = React.useCallback(function(e2) {
10143
+ var _e_nativeEvent;
10144
+ if (!(!open2 && stableFrameSize.current !== 0)) {
10145
+ var next = Math.min((_e_nativeEvent = e2.nativeEvent) === null || _e_nativeEvent === void 0 ? void 0 : _e_nativeEvent.layout.height, Dimensions.get(relativeDimensionTo).height);
10146
+ next && setFrameSize(next);
10147
+ }
10148
+ }, [open2]), handleMaxContentViewLayout = React.useCallback(function(e2) {
10085
10149
  var _e_nativeEvent, next = Math.min((_e_nativeEvent = e2.nativeEvent) === null || _e_nativeEvent === void 0 ? void 0 : _e_nativeEvent.layout.height, Dimensions.get(relativeDimensionTo).height);
10086
10150
  next && setMaxContentSize(next);
10087
10151
  }, []), animatedStyle = useAnimatedNumberStyle(animatedNumber, function(val) {
@@ -10429,13 +10493,18 @@ function createSheet(param) {
10429
10493
  frameSize,
10430
10494
  contentRef,
10431
10495
  open: open2
10432
- } = context2, composedContentRef = useComposedRefs(forwardedRef, contentRef), offscreenSize = useSheetOffscreenSize(context2), sheetContents = React.useMemo(function() {
10496
+ } = context2, composedContentRef = useComposedRefs(forwardedRef, contentRef), offscreenSize = useSheetOffscreenSize(context2), stableFrameSize = React.useRef(frameSize);
10497
+ React.useEffect(function() {
10498
+ open2 && frameSize && (stableFrameSize.current = frameSize);
10499
+ }, [open2, frameSize]);
10500
+ var sheetContents = React.useMemo(function() {
10501
+ var shouldUseFixedHeight = hasFit && !open2 && stableFrameSize.current;
10433
10502
  return (
10434
10503
  // @ts-expect-error
10435
10504
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Frame2, __spreadProps(__spreadValues({
10436
10505
  ref: composedContentRef,
10437
- flex: hasFit ? 0 : 1,
10438
- height: hasFit ? void 0 : frameSize,
10506
+ flex: hasFit && open2 ? 0 : 1,
10507
+ height: shouldUseFixedHeight ? stableFrameSize.current : hasFit ? void 0 : frameSize,
10439
10508
  pointerEvents: open2 ? "auto" : "none"
10440
10509
  }, props), {
10441
10510
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx(StackZIndexContext, {
@@ -10646,7 +10715,9 @@ var DialogContext = createStyledContext(
10646
10715
  height: "auto",
10647
10716
  // ensure always in frame and right height
10648
10717
  maxHeight: "100vh",
10649
- position: "fixed"
10718
+ position: "fixed",
10719
+ // ensure dialog inherits stacking context from portal wrapper
10720
+ zIndex: 1
10650
10721
  }
10651
10722
  }
10652
10723
  }
@@ -11477,6 +11548,8 @@ var ButtonContext = createStyledContext({
11477
11548
  context: ButtonContext,
11478
11549
  role: "button",
11479
11550
  focusable: true,
11551
+ // forces runtime pressStyle so it passes through context text colors
11552
+ disableClassName: true,
11480
11553
  variants: {
11481
11554
  unstyled: {
11482
11555
  false: {
@@ -14086,7 +14159,7 @@ var needsRepropagation = isAndroid || isIos && !USE_NATIVE_PORTAL, PopoverContex
14086
14159
  virtualRef
14087
14160
  }), {
14088
14161
  scope,
14089
- asChild: rest.asChild,
14162
+ asChild: true,
14090
14163
  children: trigger
14091
14164
  }));
14092
14165
  }), PopoverContentFrame = styled(PopperContentFrame, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tamagui",
3
- "version": "1.138.2",
3
+ "version": "1.138.4",
4
4
  "type": "module",
5
5
  "description": "Style and UI for React (web and native) meet an optimizing compiler",
6
6
  "removeSideEffects": true,
@@ -81,62 +81,62 @@
81
81
  }
82
82
  },
83
83
  "dependencies": {
84
- "@tamagui/accordion": "1.138.2",
85
- "@tamagui/adapt": "1.138.2",
86
- "@tamagui/alert-dialog": "1.138.2",
87
- "@tamagui/animate-presence": "1.138.2",
88
- "@tamagui/avatar": "1.138.2",
89
- "@tamagui/button": "1.138.2",
90
- "@tamagui/card": "1.138.2",
91
- "@tamagui/checkbox": "1.138.2",
92
- "@tamagui/compose-refs": "1.138.2",
93
- "@tamagui/constants": "1.138.2",
94
- "@tamagui/core": "1.138.2",
95
- "@tamagui/create-context": "1.138.2",
96
- "@tamagui/dialog": "1.138.2",
97
- "@tamagui/elements": "1.138.2",
98
- "@tamagui/fake-react-native": "1.138.2",
99
- "@tamagui/focusable": "1.138.2",
100
- "@tamagui/font-size": "1.138.2",
101
- "@tamagui/form": "1.138.2",
102
- "@tamagui/get-button-sized": "1.138.2",
103
- "@tamagui/get-font-sized": "1.138.2",
104
- "@tamagui/get-token": "1.138.2",
105
- "@tamagui/group": "1.138.2",
106
- "@tamagui/helpers-tamagui": "1.138.2",
107
- "@tamagui/image": "1.138.2",
108
- "@tamagui/label": "1.138.2",
109
- "@tamagui/linear-gradient": "1.138.2",
110
- "@tamagui/list-item": "1.138.2",
111
- "@tamagui/polyfill-dev": "1.138.2",
112
- "@tamagui/popover": "1.138.2",
113
- "@tamagui/popper": "1.138.2",
114
- "@tamagui/portal": "1.138.2",
115
- "@tamagui/progress": "1.138.2",
116
- "@tamagui/radio-group": "1.138.2",
117
- "@tamagui/react-native-media-driver": "1.138.2",
118
- "@tamagui/scroll-view": "1.138.2",
119
- "@tamagui/select": "1.138.2",
120
- "@tamagui/separator": "1.138.2",
121
- "@tamagui/shapes": "1.138.2",
122
- "@tamagui/sheet": "1.138.2",
123
- "@tamagui/slider": "1.138.2",
124
- "@tamagui/stacks": "1.138.2",
125
- "@tamagui/switch": "1.138.2",
126
- "@tamagui/tabs": "1.138.2",
127
- "@tamagui/text": "1.138.2",
128
- "@tamagui/theme": "1.138.2",
129
- "@tamagui/toggle-group": "1.138.2",
130
- "@tamagui/tooltip": "1.138.2",
131
- "@tamagui/use-controllable-state": "1.138.2",
132
- "@tamagui/use-debounce": "1.138.2",
133
- "@tamagui/use-force-update": "1.138.2",
134
- "@tamagui/use-window-dimensions": "1.138.2",
135
- "@tamagui/visually-hidden": "1.138.2",
136
- "@tamagui/z-index-stack": "1.138.2"
84
+ "@tamagui/accordion": "1.138.4",
85
+ "@tamagui/adapt": "1.138.4",
86
+ "@tamagui/alert-dialog": "1.138.4",
87
+ "@tamagui/animate-presence": "1.138.4",
88
+ "@tamagui/avatar": "1.138.4",
89
+ "@tamagui/button": "1.138.4",
90
+ "@tamagui/card": "1.138.4",
91
+ "@tamagui/checkbox": "1.138.4",
92
+ "@tamagui/compose-refs": "1.138.4",
93
+ "@tamagui/constants": "1.138.4",
94
+ "@tamagui/core": "1.138.4",
95
+ "@tamagui/create-context": "1.138.4",
96
+ "@tamagui/dialog": "1.138.4",
97
+ "@tamagui/elements": "1.138.4",
98
+ "@tamagui/fake-react-native": "1.138.4",
99
+ "@tamagui/focusable": "1.138.4",
100
+ "@tamagui/font-size": "1.138.4",
101
+ "@tamagui/form": "1.138.4",
102
+ "@tamagui/get-button-sized": "1.138.4",
103
+ "@tamagui/get-font-sized": "1.138.4",
104
+ "@tamagui/get-token": "1.138.4",
105
+ "@tamagui/group": "1.138.4",
106
+ "@tamagui/helpers-tamagui": "1.138.4",
107
+ "@tamagui/image": "1.138.4",
108
+ "@tamagui/label": "1.138.4",
109
+ "@tamagui/linear-gradient": "1.138.4",
110
+ "@tamagui/list-item": "1.138.4",
111
+ "@tamagui/polyfill-dev": "1.138.4",
112
+ "@tamagui/popover": "1.138.4",
113
+ "@tamagui/popper": "1.138.4",
114
+ "@tamagui/portal": "1.138.4",
115
+ "@tamagui/progress": "1.138.4",
116
+ "@tamagui/radio-group": "1.138.4",
117
+ "@tamagui/react-native-media-driver": "1.138.4",
118
+ "@tamagui/scroll-view": "1.138.4",
119
+ "@tamagui/select": "1.138.4",
120
+ "@tamagui/separator": "1.138.4",
121
+ "@tamagui/shapes": "1.138.4",
122
+ "@tamagui/sheet": "1.138.4",
123
+ "@tamagui/slider": "1.138.4",
124
+ "@tamagui/stacks": "1.138.4",
125
+ "@tamagui/switch": "1.138.4",
126
+ "@tamagui/tabs": "1.138.4",
127
+ "@tamagui/text": "1.138.4",
128
+ "@tamagui/theme": "1.138.4",
129
+ "@tamagui/toggle-group": "1.138.4",
130
+ "@tamagui/tooltip": "1.138.4",
131
+ "@tamagui/use-controllable-state": "1.138.4",
132
+ "@tamagui/use-debounce": "1.138.4",
133
+ "@tamagui/use-force-update": "1.138.4",
134
+ "@tamagui/use-window-dimensions": "1.138.4",
135
+ "@tamagui/visually-hidden": "1.138.4",
136
+ "@tamagui/z-index-stack": "1.138.4"
137
137
  },
138
138
  "devDependencies": {
139
- "@tamagui/build": "1.138.2",
139
+ "@tamagui/build": "1.138.4",
140
140
  "react": "*",
141
141
  "react-native": "0.81.5",
142
142
  "react-native-web": "^0.21.0"