tamagui 1.129.19 → 1.130.0

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.
@@ -636,9 +636,12 @@ var require_AnimatePresence_native = __commonJS({
636
636
  }), filtered;
637
637
  }
638
638
  var AnimatePresence = function(param) {
639
- var { children, enterVariant, exitVariant, enterExitVariant, initial = !0, onExitComplete, exitBeforeEnter, presenceAffectsLayout = !0, custom } = param, _useContext_forceRender, forceRender = (_useContext_forceRender = (0, import_react3.useContext)(import_LayoutGroupContext.LayoutGroupContext).forceRender) !== null && _useContext_forceRender !== void 0 ? _useContext_forceRender : (0, import_use_force_update.useForceUpdate)(), filteredChildren = onlyElements(children), presentChildren = (0, import_react3.useRef)(filteredChildren), allChildren = (0, import_react3.useRef)(/* @__PURE__ */ new Map()).current, exiting = (0, import_react3.useRef)(/* @__PURE__ */ new Set()).current;
639
+ var { children, enterVariant, exitVariant, enterExitVariant, initial = !0, onExitComplete, exitBeforeEnter, presenceAffectsLayout = !0, custom, passThrough } = param, _useContext_forceRender, forceRender = (_useContext_forceRender = (0, import_react3.useContext)(import_LayoutGroupContext.LayoutGroupContext).forceRender) !== null && _useContext_forceRender !== void 0 ? _useContext_forceRender : (0, import_use_force_update.useForceUpdate)(), filteredChildren = onlyElements(children), presentChildren = (0, import_react3.useRef)(filteredChildren), allChildren = (0, import_react3.useRef)(/* @__PURE__ */ new Map()).current, exiting = (0, import_react3.useRef)(/* @__PURE__ */ new Set()).current;
640
640
  updateChildLookup(filteredChildren, allChildren);
641
641
  var isInitialRender = (0, import_react3.useRef)(!0);
642
+ if (passThrough) return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
643
+ children
644
+ });
642
645
  if (isInitialRender.current) return isInitialRender.current = !1, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
643
646
  children: filteredChildren.map(function(child) {
644
647
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_PresenceChild.PresenceChild, {
@@ -6440,6 +6443,7 @@ var require_getSplitStyles_native = __commonJS({
6440
6443
  };
6441
6444
  conf = conf || (0, import_config.getConfig)();
6442
6445
  var animationDriver = (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
6446
+ if (props.passThrough) return null;
6443
6447
  import_constants4.isWeb && styleProps.isAnimated && animationDriver.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
6444
6448
  var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, shouldDoClasses = acceptsClassName && import_constants4.isWeb && !styleProps.noClass, rulesToInsert = void 0, classNames = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, validStyles = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles), styleState = {
6445
6449
  classNames,
@@ -6720,20 +6724,29 @@ var require_mergeProps_native = __commonJS({
6720
6724
  var out = {};
6721
6725
  for (var key in a) mergeProp(out, a, b, key, inverseShorthands);
6722
6726
  if (b) for (var key1 in b) mergeProp(out, b, void 0, key1, inverseShorthands);
6727
+ if (b && Object.keys(b).length > 0) {
6728
+ var hasPropsNeedingReorder = Object.keys(b).some(function(key4) {
6729
+ return (key4 in import_pseudoDescriptors.pseudoDescriptors || key4 === "variant") && key4 in a && key4 in out;
6730
+ });
6731
+ if (hasPropsNeedingReorder) {
6732
+ var reordered = {};
6733
+ for (var key2 in b) (key2 in import_pseudoDescriptors.pseudoDescriptors || key2 === "variant") && key2 in out && (reordered[key2] = out[key2]);
6734
+ for (var key3 in out) key3 in reordered || (reordered[key3] = out[key3]);
6735
+ return reordered;
6736
+ }
6737
+ }
6723
6738
  return out;
6724
6739
  };
6725
6740
  function mergeProp(out, a, b, key, inverseShorthands) {
6726
6741
  var longhand = (inverseShorthands == null ? void 0 : inverseShorthands[key]) || null, val = a[key];
6727
- if (!(b && (key in b || longhand && longhand in b))) {
6728
- if (key in import_pseudoDescriptors.pseudoDescriptors || import_useMedia.mediaKeys.has(key)) {
6729
- out[key] = {
6730
- ...out[key],
6731
- ...val
6732
- };
6733
- return;
6734
- }
6735
- out[longhand || key] = val;
6742
+ if (key in import_pseudoDescriptors.pseudoDescriptors || import_useMedia.mediaKeys.has(key)) {
6743
+ out[key] = {
6744
+ ...out[key],
6745
+ ...val
6746
+ };
6747
+ return;
6736
6748
  }
6749
+ b && (key in b || longhand && longhand in b) || (out[longhand || key] = val);
6737
6750
  }
6738
6751
  }
6739
6752
  });
@@ -6973,7 +6986,7 @@ var require_useThemeState_native = __commonJS({
6973
6986
  id,
6974
6987
  parentId
6975
6988
  ]), propsKey = getPropsKey(props), getSnapshot = function() {
6976
- var _keys_current, _props_needsUpdate, local = localStates.get(id), needsUpdate = isRoot || props.name === "light" || props.name === "dark" || props.name === null ? !0 : HasRenderedOnce.get(keys) ? !(keys == null || (_keys_current = keys.current) === null || _keys_current === void 0) && _keys_current.size ? !0 : (_props_needsUpdate = props.needsUpdate) === null || _props_needsUpdate === void 0 ? void 0 : _props_needsUpdate.call(props) : !0, [rerender, next] = getNextState(local, props, propsKey, isRoot, id, parentId, needsUpdate, PendingUpdate.get(id));
6989
+ var _keys_current, _props_needsUpdate, local = localStates.get(id), needsUpdate = props.passThrough ? !1 : isRoot || props.name === "light" || props.name === "dark" || props.name === null ? !0 : HasRenderedOnce.get(keys) ? !(keys == null || (_keys_current = keys.current) === null || _keys_current === void 0) && _keys_current.size ? !0 : (_props_needsUpdate = props.needsUpdate) === null || _props_needsUpdate === void 0 ? void 0 : _props_needsUpdate.call(props) : !0, [rerender, next] = getNextState(local, props, propsKey, isRoot, id, parentId, needsUpdate, PendingUpdate.get(id));
6977
6990
  return PendingUpdate.delete(id), (!local || rerender) && (local = {
6978
6991
  ...next
6979
6992
  }, localStates.set(id, local)), Object.assign(local, next), local.id = id, states.set(id, next), local;
@@ -6996,6 +7009,10 @@ var require_useThemeState_native = __commonJS({
6996
7009
  ]), state;
6997
7010
  }, getNextState = function(lastState, props, propsKey) {
6998
7011
  var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, id = arguments.length > 4 ? arguments[4] : void 0, parentId = arguments.length > 5 ? arguments[5] : void 0, needsUpdate = arguments.length > 6 ? arguments[6] : void 0, pendingUpdate = arguments.length > 7 ? arguments[7] : void 0, { debug } = props, parentState = states.get(parentId);
7012
+ if (props.passThrough) return [
7013
+ !1,
7014
+ lastState ?? parentState
7015
+ ];
6999
7016
  themes || (themes = (0, import_config.getConfig)().themes);
7000
7017
  var name = !propsKey && (!lastState || !(lastState != null && lastState.isNew)) ? null : getNewThemeName(parentState == null ? void 0 : parentState.name, props, pendingUpdate === "force" ? !0 : !!needsUpdate), isSameAsParent = parentState && (!name || name === parentState.name), shouldRerender = !!(needsUpdate && (pendingUpdate || (lastState == null ? void 0 : lastState.name) !== (parentState == null ? void 0 : parentState.name)));
7001
7018
  if (0)
@@ -7451,8 +7468,8 @@ var require_Theme_native = __commonJS({
7451
7468
  style: {}
7452
7469
  }, Theme2 = /* @__PURE__ */ (0, import_react3.forwardRef)(function(props, ref) {
7453
7470
  if (props.disable) return props.children;
7454
- var 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) {
7455
- return /* @__PURE__ */ (0, import_react3.cloneElement)(child, {
7471
+ 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) {
7472
+ return passThrough ? child : /* @__PURE__ */ (0, import_react3.cloneElement)(child, {
7456
7473
  "data-disable-theme": !0
7457
7474
  });
7458
7475
  }) : props.children;
@@ -7465,11 +7482,11 @@ var require_Theme_native = __commonJS({
7465
7482
  var stateRef = (0, import_react3.useRef)({
7466
7483
  hasEverThemed: !1
7467
7484
  });
7468
- return getThemedChildren(themeState, finalChildren, props, isRoot, stateRef);
7485
+ return getThemedChildren(themeState, finalChildren, props, isRoot, stateRef, passThrough);
7469
7486
  });
7470
7487
  Theme2.avoidForwardRef = !0;
7471
7488
  function getThemedChildren(themeState, children, props) {
7472
- var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, stateRef = arguments.length > 4 ? arguments[4] : void 0, { shallow, forceClassName } = props, state = stateRef.current, hasEverThemed = state.hasEverThemed, shouldRenderChildrenWithTheme = hasEverThemed || themeState.isNew || isRoot || (0, import_useThemeState.hasThemeUpdatingProps)(props);
7489
+ var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, stateRef = arguments.length > 4 ? arguments[4] : void 0, passThrough = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !1, { shallow, forceClassName } = props, state = stateRef.current, hasEverThemed = state.hasEverThemed, shouldRenderChildrenWithTheme = hasEverThemed || themeState.isNew || isRoot || (0, import_useThemeState.hasThemeUpdatingProps)(props);
7473
7490
  if (!shouldRenderChildrenWithTheme) return children;
7474
7491
  children = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_useThemeState.ThemeStateContext.Provider, {
7475
7492
  value: themeState.id,
@@ -7482,7 +7499,7 @@ var require_Theme_native = __commonJS({
7482
7499
  var parentState = (0, import_useThemeState.getThemeState)(themeState.isNew ? themeState.id : themeState.parentId);
7483
7500
  if (!parentState) throw new Error("\u203C\uFE0F010");
7484
7501
  children = import_react3.Children.toArray(children).map(function(child) {
7485
- return /* @__PURE__ */ (0, import_react3.isValidElement)(child) ? /* @__PURE__ */ (0, import_react3.cloneElement)(child, void 0, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Theme2, {
7502
+ return /* @__PURE__ */ (0, import_react3.isValidElement)(child) ? passThrough ? child : /* @__PURE__ */ (0, import_react3.cloneElement)(child, void 0, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Theme2, {
7486
7503
  name: parentState.name,
7487
7504
  children: child.props.children
7488
7505
  })) : child;
@@ -7493,10 +7510,10 @@ var require_Theme_native = __commonJS({
7493
7510
  var { className, style } = getThemeClassNameAndStyle(themeState, props, isRoot);
7494
7511
  if (children = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
7495
7512
  className: `${className} _dsp_contents is_Theme`,
7496
- style,
7513
+ style: passThrough ? void 0 : style,
7497
7514
  children
7498
7515
  }), state.hasEverThemed === "wrapped") {
7499
- var className1 = requiresExtraWrapper ? `${isInverse ? name.startsWith("light") ? "t_light is_inversed" : name.startsWith("dark") ? "t_dark is_inversed" : "" : ""} _dsp_contents` : "_dsp_contents";
7516
+ var className1 = !passThrough && requiresExtraWrapper ? `${isInverse ? name.startsWith("light") ? "t_light is_inversed" : name.startsWith("dark") ? "t_dark is_inversed" : "" : ""} _dsp_contents` : "_dsp_contents";
7500
7517
  children = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
7501
7518
  className: className1,
7502
7519
  children
@@ -7916,7 +7933,7 @@ var require_useComponentState_native = __commonJS({
7916
7933
  }
7917
7934
  var isDisabled = function(props) {
7918
7935
  var _props_accessibilityState;
7919
- return props.disabled || ((_props_accessibilityState = props.accessibilityState) === null || _props_accessibilityState === void 0 ? void 0 : _props_accessibilityState.disabled) || props["aria-disabled"] || props.accessibilityDisabled || !1;
7936
+ return props.disabled || props.passThrough || ((_props_accessibilityState = props.accessibilityState) === null || _props_accessibilityState === void 0 ? void 0 : _props_accessibilityState.disabled) || props["aria-disabled"] || props.accessibilityDisabled || !1;
7920
7937
  };
7921
7938
  }
7922
7939
  });
@@ -8205,7 +8222,7 @@ var require_createComponent_native = __commonJS({
8205
8222
  });
8206
8223
  var allGroupContexts = (0, import_react3.useMemo)(function() {
8207
8224
  var _stateRef_current_group;
8208
- if (!groupName) return groupContextParent;
8225
+ if (!groupName || props.passThrough) return groupContextParent;
8209
8226
  (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.listeners.clear();
8210
8227
  var listeners = /* @__PURE__ */ new Set();
8211
8228
  return stateRef.current.group = {
@@ -8278,7 +8295,7 @@ var require_createComponent_native = __commonJS({
8278
8295
  willBeAnimated,
8279
8296
  styledContextProps
8280
8297
  }, themeName = (themeState == null ? void 0 : themeState.name) || "", splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), groupContext = groupName && (allGroupContexts == null ? void 0 : allGroupContexts[groupName]) || null;
8281
- if (groupContext) {
8298
+ if (splitStyles && groupContext) {
8282
8299
  var groupState = groupContext == null ? void 0 : groupContext.state;
8283
8300
  if (groupState && groupState.layout === void 0) {
8284
8301
  var _splitStyles_style, _splitStyles_style1;
@@ -8288,8 +8305,8 @@ var require_createComponent_native = __commonJS({
8288
8305
  });
8289
8306
  }
8290
8307
  }
8291
- if ((hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
8292
- var styleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
8308
+ if (splitStyles && (!hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
8309
+ var useStyleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
8293
8310
  stateRef.current.setStateShallow = function(nextOrGetNext) {
8294
8311
  var prev = NextState.get(stateRef) || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
8295
8312
  if (!(next === prev || (0, import_is_equal_shallow.isEqualShallow)(prev, next))) {
@@ -8303,9 +8320,9 @@ var require_createComponent_native = __commonJS({
8303
8320
  };
8304
8321
  NextState.set(stateRef, updatedState);
8305
8322
  var { group, hasDynGroupChildren, unmounted, animation, ...childrenGroupState } = updatedState;
8306
- if (groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState), !hasAnimationProp || !styleListener) return;
8323
+ if (groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState), !hasAnimationProp || !useStyleListener) return;
8307
8324
  var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp);
8308
- styleListener(nextStyles.style);
8325
+ useStyleListener((nextStyles == null ? void 0 : nextStyles.style) || {});
8309
8326
  } else ogSetStateShallow(next);
8310
8327
  }
8311
8328
  }, setStateShallow = function(state2) {
@@ -8313,14 +8330,16 @@ var require_createComponent_native = __commonJS({
8313
8330
  (_stateRef_current_setStateShallow = (_stateRef_current = stateRef.current).setStateShallow) === null || _stateRef_current_setStateShallow === void 0 || _stateRef_current_setStateShallow.call(_stateRef_current, state2);
8314
8331
  };
8315
8332
  }
8316
- if (props.group && props.untilMeasured === "hide" && !stateRef.current.hasMeasured) {
8317
- var _splitStyles;
8318
- (_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
8333
+ if (splitStyles) {
8334
+ if (props.group && props.untilMeasured === "hide" && !stateRef.current.hasMeasured) {
8335
+ var _splitStyles;
8336
+ (_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
8337
+ }
8338
+ splitStyles.dynamicThemeAccess != null && (stateRef.current.isListeningToTheme = splitStyles.dynamicThemeAccess);
8319
8339
  }
8320
- splitStyles.dynamicThemeAccess != null && (stateRef.current.isListeningToTheme = splitStyles.dynamicThemeAccess);
8321
- var hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClass && splitStyles.hasMedia === !0, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
8340
+ var hasRuntimeMediaKeys = (splitStyles == null ? void 0 : splitStyles.hasMedia) && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClass && (splitStyles == null ? void 0 : splitStyles.hasMedia) === !0, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
8322
8341
  (0, import_useMedia.setMediaShouldUpdate)(componentContext, shouldListenForMedia, mediaListeningKeys);
8323
- var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, space } = splitStyles, propsWithAnimation = props, {
8342
+ var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, space, pseudoGroups, mediaGroups } = splitStyles || {}, propsWithAnimation = props, {
8324
8343
  asChild,
8325
8344
  children,
8326
8345
  themeShallow,
@@ -8344,7 +8363,7 @@ var require_createComponent_native = __commonJS({
8344
8363
  onClick,
8345
8364
  theme: _themeProp,
8346
8365
  ...nonTamaguiProps
8347
- } = viewPropsIn, viewProps = nonTamaguiProps;
8366
+ } = viewPropsIn || {}, viewProps = nonTamaguiProps;
8348
8367
  !isTaggable && props.forceStyle && (viewProps.forceStyle = props.forceStyle), isHOC && _themeProp && (viewProps.theme = _themeProp), tagProp && elementType.acceptTagProp && (viewProps.tag = tagProp);
8349
8368
  var animationStyles, shouldUseAnimation = (
8350
8369
  // if it supports css vars we run it on server too to get matching initial style
@@ -8370,7 +8389,7 @@ var require_createComponent_native = __commonJS({
8370
8389
  });
8371
8390
  animations && (animations.ref && (animatedRef = animations.ref), isHydrated && animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = `${state.unmounted === "should-enter" ? "t_unmounted " : ""}${viewProps.className || ""} ${animations.className}`)));
8372
8391
  }
8373
- groupContext && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
8392
+ splitStyles && groupContext && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
8374
8393
  var _stateRef_current_group, layout = e.nativeEvent.layout;
8375
8394
  groupContext.state.layout = layout, (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.emit({
8376
8395
  layout
@@ -8382,7 +8401,7 @@ var require_createComponent_native = __commonJS({
8382
8401
  })), viewProps = ((_hooks_usePropsTransform = import_setupHooks.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_setupHooks.hooks, elementType, nonTamaguiProps, stateRef, stateRef.current.willHydrate)) || nonTamaguiProps, stateRef.current.composedRef || (stateRef.current.composedRef = (0, import_compose_refs.composeRefs)(function(x) {
8383
8402
  return stateRef.current.host = x;
8384
8403
  }, forwardedRef, import_setElementProps.setElementProps, animatedRef)), viewProps.ref = stateRef.current.composedRef;
8385
- var { pseudoGroups, mediaGroups } = splitStyles, unPress = function() {
8404
+ var unPress = function() {
8386
8405
  setStateShallow({
8387
8406
  press: !1,
8388
8407
  pressIn: !1
@@ -8498,7 +8517,7 @@ var require_createComponent_native = __commonJS({
8498
8517
  });
8499
8518
  }
8500
8519
  (_hooks_useEvents = import_setupHooks.hooks.useEvents) === null || _hooks_useEvents === void 0 || _hooks_useEvents.call(import_setupHooks.hooks, viewProps, events, splitStyles, setStateShallow, staticConfig);
8501
- var direction = props.spaceDirection || "both", content = !children || asChild ? children : spacedChildren2({
8520
+ var direction = props.spaceDirection || "both", content = !children || asChild || !splitStyles ? children : spacedChildren2({
8502
8521
  separator,
8503
8522
  children,
8504
8523
  space,
@@ -8512,8 +8531,15 @@ var require_createComponent_native = __commonJS({
8512
8531
  onLongPress
8513
8532
  });
8514
8533
  var useChildrenResult;
8515
- import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps)), useChildrenResult ? content = useChildrenResult : content = /* @__PURE__ */ import_react3.default.createElement(elementType, viewProps, content);
8516
- var ResetPresence2 = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence, needsReset = !!(!isHOC && ResetPresence2 && willBeAnimated && (hasEnterStyle || presenceState)), hasEverReset = stateRef.current.hasEverResetPresence;
8534
+ import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps)), splitStyles || (elementType = "span", content = propsIn.children, viewProps = {
8535
+ style: {
8536
+ display: "contents"
8537
+ }
8538
+ }), useChildrenResult ? content = useChildrenResult : content = /* @__PURE__ */ import_react3.default.createElement(elementType, viewProps, content);
8539
+ 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
8540
+ (!asChild && // not when passThrough
8541
+ splitStyles && // not when HOC
8542
+ !isHOC && ResetPresence2 && willBeAnimated && (hasEnterStyle || presenceState)), hasEverReset = stateRef.current.hasEverResetPresence;
8517
8543
  needsReset && !hasEverReset && (stateRef.current.hasEverResetPresence = !0);
8518
8544
  var renderReset = needsReset || hasEverReset;
8519
8545
  if (renderReset && ResetPresence2 && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ResetPresence2, {
@@ -8526,7 +8552,7 @@ var require_createComponent_native = __commonJS({
8526
8552
  })), "group" in props && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_GroupContext.GroupContext.Provider, {
8527
8553
  value: allGroupContexts,
8528
8554
  children: content
8529
- })), content = disableTheme ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, !1, stateRef), staticConfig.context) {
8555
+ })), content = disableTheme || !splitStyles ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, !1, stateRef), staticConfig.context) {
8530
8556
  var contextProps = staticConfig.context.props;
8531
8557
  for (var key1 in contextProps) if (viewProps.style && key1 in viewProps.style || key1 in viewProps) {
8532
8558
  var _viewProps_style;
@@ -8577,7 +8603,7 @@ var require_createComponent_native = __commonJS({
8577
8603
  }
8578
8604
  function styleable(Component2, options) {
8579
8605
  var _Component_render, skipForwardRef = import_constants4.IS_REACT_19 && typeof Component2 == "function" && Component2.length === 1 || ((_Component_render = Component2.render) === null || _Component_render === void 0 ? void 0 : _Component_render.length) === 2, out = skipForwardRef ? Component2 : /* @__PURE__ */ import_react3.default.forwardRef(Component2), extendedConfig = extendStyledConfig(options == null ? void 0 : options.staticConfig);
8580
- return out = options != null && options.disableTheme ? out : (0, import_themeable.themeable)(out, extendedConfig, !0), process.env.TAMAGUI_MEMOIZE_STYLEABLE && (out = /* @__PURE__ */ import_react3.default.memo(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
8606
+ return out = options != null && options.disableTheme ? out : (0, import_themeable.themeable)(out, extendedConfig, !0), (extendedConfig.memo || process.env.TAMAGUI_MEMOIZE_STYLEABLE) && (out = /* @__PURE__ */ import_react3.default.memo(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
8581
8607
  }
8582
8608
  return res.extractable = extractable, res.styleable = styleable, res;
8583
8609
  }
@@ -10532,7 +10558,7 @@ var require_useProps_native = __commonJS({
10532
10558
  noClass: !0,
10533
10559
  resolveValues: "auto",
10534
10560
  ...opts
10535
- }, null, componentContext, groupContext), { mediaGroups, pseudoGroups } = splitStyles;
10561
+ }, null, componentContext, groupContext), { mediaGroups, pseudoGroups } = splitStyles || {};
10536
10562
  return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
10537
10563
  if (!disabled) {
10538
10564
  if (state.unmounted) {
@@ -10558,8 +10584,8 @@ var require_useProps_native = __commonJS({
10558
10584
  ...mediaGroups
10559
10585
  ]).join("") : 0
10560
10586
  ]), [
10561
- splitStyles.viewProps,
10562
- splitStyles.style || {},
10587
+ (splitStyles == null ? void 0 : splitStyles.viewProps) || {},
10588
+ (splitStyles == null ? void 0 : splitStyles.style) || {},
10563
10589
  theme,
10564
10590
  import_useMedia.mediaState
10565
10591
  ];
@@ -12846,7 +12872,7 @@ var require_index_native19 = __commonJS({
12846
12872
  getBoundingClientRectAsync(node),
12847
12873
  getBoundingClientRectAsync(parentNode)
12848
12874
  ]);
12849
- if (frameId !== lastFrameAt) return;
12875
+ if (nr === !1 || pr === !1 || frameId !== lastFrameAt) return;
12850
12876
  nodeRect = nr, parentRect = pr;
12851
12877
  } else nodeRect = node.getBoundingClientRect(), parentRect = parentNode.getBoundingClientRect();
12852
12878
  var cachedRect = NodeRectCache.get(node), cachedParentRect = NodeRectCache.get(parentNode);
@@ -12949,7 +12975,7 @@ var require_index_native19 = __commonJS({
12949
12975
  return new Promise(function(res) {
12950
12976
  if (!(!node || node.nodeType !== 1)) {
12951
12977
  var io = new IntersectionObserver(function(entries) {
12952
- return io.disconnect(), res(entries[0].boundingClientRect);
12978
+ return entries[0].isIntersecting ? (io.disconnect(), res(entries[0].boundingClientRect)) : res(!1);
12953
12979
  }, {
12954
12980
  threshold: 0
12955
12981
  });
@@ -13555,8 +13581,7 @@ var require_index_native20 = __commonJS({
13555
13581
  if (isDOM && plainDOMProps.href && hrefAttrs) var download, rel, target;
13556
13582
  }
13557
13583
  },
13558
- useEvents(viewProps, events, param, setStateShallow, staticConfig) {
13559
- var { pseudos } = param;
13584
+ useEvents(viewProps, events, splitStyles, setStateShallow, staticConfig) {
13560
13585
  if (events && (events.onFocus && (viewProps.onFocus = events.onFocus), events.onBlur && (viewProps.onBlur = events.onBlur)), staticConfig.isInput) {
13561
13586
  if (events) {
13562
13587
  var { onPressIn, onPressOut, onPress } = events, inputEvents = {
@@ -16066,7 +16091,7 @@ var require_GorhomPortalItem_native = __commonJS({
16066
16091
  });
16067
16092
  module2.exports = __toCommonJS2(GorhomPortalItem_native_exports);
16068
16093
  var import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_react3 = require("react"), import_GorhomPortal = require_GorhomPortal_native(), GorhomPortalItem = function(props) {
16069
- var { name: _providedName, hostName, handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passthrough } = props, { addPortal: addUpdatePortal, removePortal } = (0, import_GorhomPortal.usePortal)(hostName), id = (0, import_react3.useId)(), name = _providedName || id, handleOnMount = (0, import_core12.useEvent)(function() {
16094
+ var { name: _providedName, hostName, handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passThrough } = props, { addPortal: addUpdatePortal, removePortal } = (0, import_GorhomPortal.usePortal)(hostName), id = (0, import_react3.useId)(), name = _providedName || id, handleOnMount = (0, import_core12.useEvent)(function() {
16070
16095
  _providedHandleOnMount ? _providedHandleOnMount(function() {
16071
16096
  return addUpdatePortal(name, children);
16072
16097
  }) : addUpdatePortal(name, children);
@@ -16080,14 +16105,14 @@ var require_GorhomPortalItem_native = __commonJS({
16080
16105
  }) : addUpdatePortal(name, children);
16081
16106
  });
16082
16107
  return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
16083
- if (!passthrough) return handleOnMount(), function() {
16108
+ if (!passThrough) return handleOnMount(), function() {
16084
16109
  handleOnUnmount();
16085
16110
  };
16086
16111
  }, []), (0, import_react3.useEffect)(function() {
16087
- passthrough || handleOnUpdate();
16112
+ passThrough || handleOnUpdate();
16088
16113
  }, [
16089
16114
  children
16090
- ]), passthrough ? children : null;
16115
+ ]), passThrough ? children : null;
16091
16116
  };
16092
16117
  }
16093
16118
  });
@@ -16495,9 +16520,9 @@ var require_Adapt_native = __commonJS({
16495
16520
  }, {
16496
16521
  Contents: AdaptContents
16497
16522
  }), AdaptPortalContents = function(props) {
16498
- var { portalName } = useAdaptContext(props.scope);
16523
+ var isActive = useAdaptIsActive(props.scope), { portalName } = useAdaptContext(props.scope);
16499
16524
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
16500
- // passthrough={!isWeb && !isActive}
16525
+ passThrough: !isActive,
16501
16526
  hostName: portalName,
16502
16527
  children: props.children
16503
16528
  });
@@ -17464,12 +17489,11 @@ var require_useSheetOpenState_native = __commonJS({
17464
17489
  var { isHidden, controller } = (0, import_useSheetController.useSheetController)(), onOpenChangeInternal = function(val) {
17465
17490
  var _controller_onOpenChange, _props_onOpenChange;
17466
17491
  controller == null || (_controller_onOpenChange = controller.onOpenChange) === null || _controller_onOpenChange === void 0 || _controller_onOpenChange.call(controller, val), (_props_onOpenChange = props.onOpenChange) === null || _props_onOpenChange === void 0 || _props_onOpenChange.call(props, val);
17467
- }, _controller_open, _props_defaultOpen, [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
17468
- prop: (_controller_open = controller == null ? void 0 : controller.open) !== null && _controller_open !== void 0 ? _controller_open : props.open,
17492
+ }, _controller_open, propVal = (_controller_open = controller == null ? void 0 : controller.open) !== null && _controller_open !== void 0 ? _controller_open : props.open, _props_defaultOpen, [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
17493
+ prop: propVal,
17469
17494
  defaultProp: (_props_defaultOpen = props.defaultOpen) !== null && _props_defaultOpen !== void 0 ? _props_defaultOpen : !1,
17470
17495
  onChange: onOpenChangeInternal,
17471
- strategy: "most-recent-wins",
17472
- transition: !0
17496
+ strategy: "prop-wins"
17473
17497
  });
17474
17498
  return {
17475
17499
  open,
@@ -17556,8 +17580,7 @@ var require_useSheetProviderProps_native = __commonJS({
17556
17580
  prop: props.position,
17557
17581
  defaultProp: props.defaultPosition || (state.open ? 0 : -1),
17558
17582
  onChange: props.onPositionChange,
17559
- strategy: "most-recent-wins",
17560
- transition: !0
17583
+ strategy: "prop-wins"
17561
17584
  }), position = state.open === !1 ? -1 : position_, { open } = state, setPosition = import_react3.default.useCallback(function(next) {
17562
17585
  props.dismissOnSnapToBottom && next === snapPoints.length - 1 ? state.setOpen(!1) : setPositionImmediate(next);
17563
17586
  }, [
@@ -17964,27 +17987,26 @@ var require_SheetImplementationCustom_native = __commonJS({
17964
17987
  ...animationConfig
17965
17988
  }));
17966
17989
  }
17967
- });
17990
+ }), isAbleToPosition = /* @__PURE__ */ function() {
17991
+ return !(disableAnimation || !frameSize || !screenSize || isHidden || hasntMeasured && !open);
17992
+ }();
17968
17993
  (0, import_constants4.useIsomorphicLayoutEffect)(function() {
17969
- if (hasntMeasured && screenSize && frameSize) {
17970
- at.current = screenSize, animatedNumber.setValue(screenSize, {
17971
- type: "timing",
17972
- duration: 0
17973
- }, function() {
17974
- setTimeout(function() {
17975
- setDisableAnimation(!1);
17976
- }, 10);
17977
- });
17978
- return;
17979
- }
17980
- disableAnimation || !frameSize || !screenSize || isHidden || hasntMeasured && !open || animateTo(position);
17994
+ hasntMeasured && screenSize && frameSize && (at.current = screenSize, animatedNumber.setValue(screenSize, {
17995
+ type: "timing",
17996
+ duration: 0
17997
+ }, function() {
17998
+ setTimeout(function() {
17999
+ setDisableAnimation(!1);
18000
+ }, 10);
18001
+ }));
17981
18002
  }, [
17982
18003
  hasntMeasured,
17983
- disableAnimation,
17984
- isHidden,
17985
- frameSize,
17986
18004
  screenSize,
17987
- open,
18005
+ frameSize
18006
+ ]), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
18007
+ isAbleToPosition && animateTo(position);
18008
+ }, [
18009
+ isAbleToPosition,
17988
18010
  position
17989
18011
  ]);
17990
18012
  var _props_disableDrag, disableDrag = (_props_disableDrag = props.disableDrag) !== null && _props_disableDrag !== void 0 ? _props_disableDrag : controller == null ? void 0 : controller.disableDrag, themeName = (0, import_core12.useThemeName)(), [isDragging, setIsDragging] = import_react3.default.useState(!1), scrollEnabled = (0, import_react3.useRef)(!0), setScrollEnabled = import_react3.default.useCallback(function(val) {
@@ -17999,12 +18021,14 @@ var require_SheetImplementationCustom_native = __commonJS({
17999
18021
  }
18000
18022
  var release = function(param) {
18001
18023
  var { vy, dragAt } = param;
18002
- isExternalDrag = !1, previouslyScrolling = !1, setPanning(!1);
18003
- for (var at2 = dragAt + startY, end = at2 + frameSize * vy * 0.2, closestPoint = 0, dist = Number.POSITIVE_INFINITY, i = 0; i < positions.length; i++) {
18004
- var position2 = positions[i], curDist = end > position2 ? end - position2 : position2 - end;
18005
- curDist < dist && (dist = curDist, closestPoint = i);
18024
+ if (!scrollBridge.scrollLock) {
18025
+ isExternalDrag = !1, previouslyScrolling = !1, setPanning(!1);
18026
+ for (var at2 = dragAt + startY, end = at2 + frameSize * vy * 0.2, closestPoint = 0, dist = Number.POSITIVE_INFINITY, i = 0; i < positions.length; i++) {
18027
+ var position2 = positions[i], curDist = end > position2 ? end - position2 : position2 - end;
18028
+ curDist < dist && (dist = curDist, closestPoint = i);
18029
+ }
18030
+ setPosition(closestPoint), animateTo(closestPoint), setScrollEnabled(closestPoint === 0);
18006
18031
  }
18007
- setPosition(closestPoint), animateTo(closestPoint), setScrollEnabled(closestPoint === 0 && dragAt <= 0);
18008
18032
  }, finish = function(_e, state2) {
18009
18033
  release({
18010
18034
  vy: state2.vy,
@@ -18012,10 +18036,13 @@ var require_SheetImplementationCustom_native = __commonJS({
18012
18036
  });
18013
18037
  }, previouslyScrolling = !1, onMoveShouldSet = function(e, param) {
18014
18038
  var { dy } = param;
18015
- if (e.target === providerProps.handleRef.current || !scrollEnabled.current) return !0;
18016
- if (scrollBridge.scrollLock) return !1;
18017
- var isScrolled = scrollBridge.y !== 0, isDraggingUp = dy < 0, isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;
18018
- return isScrolled ? (previouslyScrolling = !0, !1) : isNearTop && scrollEnabled.current && hasScrollView.current && isDraggingUp ? !1 : Math.abs(dy) > 10;
18039
+ function getShouldSet() {
18040
+ if (e.target === providerProps.handleRef.current || !scrollEnabled.current) return !0;
18041
+ if (scrollBridge.scrollLock) return !1;
18042
+ var isScrolled = scrollBridge.y !== 0, isDraggingUp = dy < 0, isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;
18043
+ return isScrolled ? (previouslyScrolling = !0, !1) : isNearTop && hasScrollView.current && isDraggingUp ? !1 : Math.abs(dy) > 10;
18044
+ }
18045
+ return getShouldSet();
18019
18046
  }, grant = function() {
18020
18047
  setScrollEnabled(!1), setPanning(!0), stopSpring(), startY = at.current;
18021
18048
  }, isExternalDrag = !1;
@@ -18384,7 +18411,7 @@ var require_SheetScrollView_native = __commonJS({
18384
18411
  }, []);
18385
18412
  var release = function() {
18386
18413
  if (state.current.isDragging) {
18387
- state.current.isDragging = !1, scrollBridge.scrollStartY = -1, state.current.isScrolling = !1, setScrollEnabled(!0);
18414
+ state.current.isDragging = !1, scrollBridge.scrollStartY = -1, scrollBridge.scrollLock = !1, state.current.isScrolling = !1, setScrollEnabled(!0);
18388
18415
  var vy = 0;
18389
18416
  if (state.current.dys.length) {
18390
18417
  var recentDys = state.current.dys.slice(-10), dist = recentDys.length ? recentDys.reduce(function(a, b) {
@@ -18431,15 +18458,12 @@ var require_SheetScrollView_native = __commonJS({
18431
18458
  onResponderMove: function(e) {
18432
18459
  if (import_core12.isWeb) {
18433
18460
  var { pageY } = e.nativeEvent;
18434
- if (state.current.isScrolling) {
18435
- e.stopPropagation();
18436
- return;
18437
- }
18461
+ if (state.current.isScrolling) return;
18438
18462
  scrollBridge.scrollStartY === -1 && (scrollBridge.scrollStartY = pageY, state.current.lastPageY = pageY);
18439
18463
  var dragAt = pageY - scrollBridge.scrollStartY, dy = pageY - state.current.lastPageY;
18440
18464
  state.current.lastPageY = pageY;
18441
- var isDraggingUp = dy < 0, isPaneAtTop = scrollBridge.paneY <= scrollBridge.paneMinY;
18442
- if ((dy === 0 || isDraggingUp) && isPaneAtTop) {
18465
+ var isDraggingUp = dy < 0, isPaneAtTop = scrollBridge.paneY <= scrollBridge.paneMinY, shouldScrollLock = (dy === 0 || isDraggingUp) && isPaneAtTop;
18466
+ if (shouldScrollLock) {
18443
18467
  state.current.isScrolling = !0, scrollBridge.scrollLock = !0, setScrollEnabled(!0);
18444
18468
  return;
18445
18469
  }
@@ -18630,14 +18654,7 @@ var require_createSheet_native = __commonJS({
18630
18654
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, {
18631
18655
  children: [
18632
18656
  /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_remove_scroll.RemoveScroll, {
18633
- forwardProps: !0,
18634
- enabled: removeScrollEnabled,
18635
- allowPinchZoom: !0,
18636
- shards: [
18637
- contentRef
18638
- ],
18639
- // causes lots of bugs on touch web on site
18640
- removeScrollBar: !1,
18657
+ enabled: removeScrollEnabled && context.open,
18641
18658
  children: sheetContents
18642
18659
  }),
18643
18660
  /* below frame hide when bouncing past 100% */
@@ -18970,18 +18987,20 @@ var require_SheetController_native = __commonJS({
18970
18987
  });
18971
18988
  module2.exports = __toCommonJS2(SheetController_exports);
18972
18989
  var import_jsx_runtime6 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_core12 = require_index_native20(), import_useSheetController = require_useSheetController_native(), SheetController = function(param) {
18973
- var { children, onOpenChange: onOpenChangeProp, ...value } = param, onOpenChange = (0, import_core12.useEvent)(onOpenChangeProp), memoValue = import_react3.default.useMemo(function() {
18990
+ var { children, onOpenChange: onOpenChangeProp, open, hidden, disableDrag } = param, onOpenChange = (0, import_core12.useEvent)(onOpenChangeProp), id = (0, import_react3.useId)(), memoValue = import_react3.default.useMemo(function() {
18974
18991
  return {
18975
- open: value.open,
18976
- hidden: value.hidden,
18977
- disableDrag: value.disableDrag,
18992
+ id,
18993
+ open,
18994
+ hidden,
18995
+ disableDrag,
18978
18996
  onOpenChange
18979
18997
  };
18980
18998
  }, [
18999
+ id,
18981
19000
  onOpenChange,
18982
- value.open,
18983
- value.hidden,
18984
- value.disableDrag
19001
+ open,
19002
+ hidden,
19003
+ disableDrag
18985
19004
  ]);
18986
19005
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_useSheetController.SheetControllerContext.Provider, {
18987
19006
  value: memoValue,
@@ -19281,14 +19300,7 @@ var require_Dialog_native = __commonJS({
19281
19300
  })
19282
19301
  });
19283
19302
  return !import_constants4.isWeb || context.disableRemoveScroll ? contents : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_remove_scroll.RemoveScroll, {
19284
- forwardProps: !0,
19285
19303
  enabled: context.open,
19286
- allowPinchZoom: context.allowPinchZoom,
19287
- shards: [
19288
- context.contentRef
19289
- ],
19290
- // causes lots of bugs on touch web on site
19291
- removeScrollBar: !1,
19292
19304
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
19293
19305
  "data-remove-scroll-container": !0,
19294
19306
  className: "_dsp_contents",
@@ -19445,7 +19457,7 @@ var require_Dialog_native = __commonJS({
19445
19457
  titleName: "DialogTitle",
19446
19458
  docsSlug: "dialog"
19447
19459
  }), Dialog = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
19448
- var { __scopeDialog, children, open: openProp, defaultOpen = !1, onOpenChange, modal = !0, allowPinchZoom = !1, disableRemoveScroll = !1 } = props, baseId = React4.useId(), scopeId = `scope-${baseId}`, contentId = `content-${baseId}`, titleId = `title-${baseId}`, descriptionId = `description-${baseId}`, scopeKey = __scopeDialog ? Object.keys(__scopeDialog)[0] : scopeId, adaptName = getAdaptName({
19460
+ var { __scopeDialog, children, open: openProp, defaultOpen = !1, onOpenChange, modal = !0, disableRemoveScroll = !1 } = props, baseId = React4.useId(), scopeId = `scope-${baseId}`, contentId = `content-${baseId}`, titleId = `title-${baseId}`, descriptionId = `description-${baseId}`, scopeKey = __scopeDialog ? Object.keys(__scopeDialog)[0] : scopeId, adaptName = getAdaptName({
19449
19461
  scopeKey,
19450
19462
  contentId
19451
19463
  }), triggerRef = React4.useRef(null), contentRef = React4.useRef(null), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
@@ -19470,7 +19482,6 @@ var require_Dialog_native = __commonJS({
19470
19482
  onOpenChange: setOpen,
19471
19483
  onOpenToggle,
19472
19484
  modal,
19473
- allowPinchZoom,
19474
19485
  disableRemoveScroll,
19475
19486
  adaptName
19476
19487
  };
@@ -23337,9 +23348,9 @@ var require_Animate_native = __commonJS({
23337
23348
  module2.exports = __toCommonJS2(Animate_exports);
23338
23349
  var import_jsx_runtime6 = require("react/jsx-runtime"), import_animate_presence = require_index_native4(), import_react3 = require("react");
23339
23350
  function Animate(param) {
23340
- var { children, lazyMount, type, present, ...props } = param, [lazyMounted, setLazyMounted] = (0, import_react3.useState)(lazyMount ? !1 : present);
23351
+ var { children, lazyMount, type, present, passThrough, ...props } = param, [lazyMounted, setLazyMounted] = (0, import_react3.useState)(lazyMount ? !1 : present);
23341
23352
  (0, import_react3.useEffect)(function() {
23342
- lazyMount && present && (0, import_react3.startTransition)(function() {
23353
+ passThrough || lazyMount && present && (0, import_react3.startTransition)(function() {
23343
23354
  setLazyMounted(present);
23344
23355
  });
23345
23356
  }, [
@@ -23348,20 +23359,23 @@ var require_Animate_native = __commonJS({
23348
23359
  ]);
23349
23360
  var mounted = present ? lazyMount ? lazyMounted : present : !1;
23350
23361
  return type === "presence" ? props.keepChildrenMounted ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.PresenceChild, {
23351
- initial: props.initial ? void 0 : !1,
23352
- onExitComplete: props.onExitComplete,
23353
- enterVariant: props.enterVariant,
23354
- exitVariant: props.exitVariant,
23355
- enterExitVariant: props.enterExitVariant,
23356
- // BUGFIX: this causes continous re-renders if keepChildrenMounted is true, see HeaderMenu
23357
- // but since we always re-render this component on open changes this should be fine to leave off?
23358
- presenceAffectsLayout: !1,
23359
- isPresent: present,
23360
- custom: props.custom,
23362
+ isPresent: !0,
23363
+ ...!passThrough && {
23364
+ initial: props.initial ? void 0 : !1,
23365
+ onExitComplete: props.onExitComplete,
23366
+ enterVariant: props.enterVariant,
23367
+ exitVariant: props.exitVariant,
23368
+ enterExitVariant: props.enterExitVariant,
23369
+ // BUGFIX: this causes continous re-renders if keepChildrenMounted is true, see HeaderMenu
23370
+ // but since we always re-render this component on open changes this should be fine to leave off?
23371
+ presenceAffectsLayout: !1,
23372
+ isPresent: present,
23373
+ custom: props.custom
23374
+ },
23361
23375
  children
23362
23376
  }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
23363
23377
  ...props,
23364
- children: mounted ? children : null
23378
+ children: mounted || passThrough ? children : null
23365
23379
  }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
23366
23380
  children
23367
23381
  });
@@ -23681,6 +23695,12 @@ var require_Popper_native = __commonJS({
23681
23695
  PopperContext: function() {
23682
23696
  return PopperContext;
23683
23697
  },
23698
+ PopperInfrequentContext: function() {
23699
+ return PopperInfrequentContext;
23700
+ },
23701
+ PopperPositionContext: function() {
23702
+ return PopperPositionContext;
23703
+ },
23684
23704
  PopperProvider: function() {
23685
23705
  return PopperProvider;
23686
23706
  },
@@ -23689,10 +23709,15 @@ var require_Popper_native = __commonJS({
23689
23709
  },
23690
23710
  usePopperContext: function() {
23691
23711
  return usePopperContext;
23712
+ },
23713
+ usePopperInfrequentContext: function() {
23714
+ return usePopperInfrequentContext;
23692
23715
  }
23693
23716
  });
23694
23717
  module2.exports = __toCommonJS2(Popper_exports);
23695
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_floating = require_index_native58(), import_get_token2 = require_index_native22(), import_stacks3 = require_index_native24(), import_start_transition = require_index_native9(), React4 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), PopperContext = (0, import_core12.createStyledContext)({}), { useStyledContext: usePopperContext, Provider: PopperProvider } = PopperContext, checkFloating = {
23718
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_floating = require_index_native58(), import_get_token2 = require_index_native22(), import_stacks3 = require_index_native24(), import_start_transition = require_index_native9(), React4 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), PopperContext = (0, import_core12.createStyledContext)({}), PopperPositionContext = import_core12.createStyledContext, { useStyledContext: usePopperContext, Provider: PopperProvider } = PopperContext, PopperInfrequentContext = (0, import_core12.createStyledContext)({
23719
+ size: void 0
23720
+ }), usePopperInfrequentContext = PopperInfrequentContext.useStyledContext, checkFloating = {
23696
23721
  name: "checkFloating",
23697
23722
  fn(data) {
23698
23723
  return {
@@ -23706,12 +23731,15 @@ var require_Popper_native = __commonJS({
23706
23731
  Object.assign(setupOptions, options);
23707
23732
  }
23708
23733
  function Popper(props) {
23709
- var _middlewareData_checkFloating, { children, size: size2, strategy = "absolute", placement = "bottom", stayInFrame, allowFlip, offset: offset2, disableRTL, resize, __scopePopper } = props, [arrowEl, setArrow] = React4.useState(null), [arrowSize, setArrowSize] = React4.useState(0), offsetOptions = offset2 ?? arrowSize, floatingStyle = React4.useRef({}), floating = (0, import_floating.useFloating)({
23734
+ var _middlewareData_checkFloating, { children, size: size2, strategy = "absolute", placement = "bottom", stayInFrame, allowFlip, offset: offset2, disableRTL, resize, passThrough, __scopePopper } = props, [arrowEl, setArrow] = React4.useState(null), [arrowSize, setArrowSize] = React4.useState(0), offsetOptions = offset2 ?? arrowSize, floatingStyle = React4.useRef({}), floating = (0, import_floating.useFloating)({
23735
+ ...passThrough && {
23736
+ open: !1
23737
+ },
23710
23738
  strategy,
23711
23739
  placement,
23712
23740
  sameScrollView: !1,
23713
23741
  // this only takes effect on native
23714
- whileElementsMounted: import_floating.autoUpdate,
23742
+ whileElementsMounted: passThrough ? void 0 : import_floating.autoUpdate,
23715
23743
  platform: disableRTL ?? setupOptions.disableRTL ? {
23716
23744
  ...import_floating.platform,
23717
23745
  isRTL(element) {
@@ -23743,8 +23771,9 @@ var require_Popper_native = __commonJS({
23743
23771
  showSubscription.remove(), hideSubscription.remove();
23744
23772
  };
23745
23773
  }, []), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
23746
- floating.update();
23774
+ passThrough || floating.update();
23747
23775
  }, [
23776
+ passThrough,
23748
23777
  dimensions,
23749
23778
  keyboardOpen
23750
23779
  ]);
@@ -23757,9 +23786,12 @@ var require_Popper_native = __commonJS({
23757
23786
  hasFloating: (_middlewareData_checkFloating = middlewareData.checkFloating) === null || _middlewareData_checkFloating === void 0 ? void 0 : _middlewareData_checkFloating.hasFloating,
23758
23787
  ...floating
23759
23788
  };
23760
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperProvider, {
23761
- ...popperContext,
23762
- children
23789
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperInfrequentContext.Provider, {
23790
+ size: size2,
23791
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperProvider, {
23792
+ ...popperContext,
23793
+ children
23794
+ })
23763
23795
  });
23764
23796
  }
23765
23797
  var PopperAnchor = import_stacks3.YStack.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
@@ -23801,10 +23833,11 @@ var require_Popper_native = __commonJS({
23801
23833
  unstyled: process.env.TAMAGUI_HEADLESS === "1"
23802
23834
  }
23803
23835
  }), PopperContent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
23804
- var { __scopePopper, enableAnimationForPositionChange, ...rest } = props, { strategy, placement, refs, x, y, getFloatingProps, size: size2 } = usePopperContext(__scopePopper), contentRefs = (0, import_compose_refs.useComposedRefs)(refs.setFloating, forwardedRef), [needsMeasure, setNeedsMeasure] = React4.useState(enableAnimationForPositionChange);
23836
+ var { __scopePopper, enableAnimationForPositionChange, children, passThrough, ...rest } = props, { strategy, placement, refs, x, y, getFloatingProps, size: size2 } = usePopperContext(__scopePopper), contentRefs = (0, import_compose_refs.useComposedRefs)(refs.setFloating, forwardedRef), [needsMeasure, setNeedsMeasure] = React4.useState(enableAnimationForPositionChange);
23805
23837
  (0, import_constants4.useIsomorphicLayoutEffect)(function() {
23806
- x && y && setNeedsMeasure(!1);
23838
+ needsMeasure && x && y && setNeedsMeasure(!1);
23807
23839
  }, [
23840
+ needsMeasure,
23808
23841
  enableAnimationForPositionChange,
23809
23842
  x,
23810
23843
  y
@@ -23829,14 +23862,20 @@ var require_Popper_native = __commonJS({
23829
23862
  }
23830
23863
  }, { style, ...floatingProps } = getFloatingProps ? getFloatingProps(frameProps) : frameProps;
23831
23864
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Stack, {
23832
- ...floatingProps,
23865
+ passThrough,
23866
+ ref: contentRefs,
23867
+ ...passThrough ? null : floatingProps,
23833
23868
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperContentFrame, {
23834
- "data-placement": placement,
23835
- "data-strategy": strategy,
23836
- contain: "layout",
23837
- size: size2,
23838
- ...style,
23839
- ...rest
23869
+ passThrough,
23870
+ ...!passThrough && {
23871
+ "data-placement": placement,
23872
+ "data-strategy": strategy,
23873
+ contain: "layout",
23874
+ size: size2,
23875
+ ...style,
23876
+ ...rest
23877
+ },
23878
+ children
23840
23879
  }, "popper-content-frame")
23841
23880
  });
23842
23881
  }), PopperArrowFrame = (0, import_core12.styled)(import_stacks3.YStack, {
@@ -24106,7 +24145,7 @@ var require_Popover_native = __commonJS({
24106
24145
  }
24107
24146
  });
24108
24147
  module2.exports = __toCommonJS2(Popover_exports);
24109
- 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_react_native4 = require_fake_react_native(), import_useFloatingContext = require_useFloatingContext_native(), POPOVER_SCOPE = "PopoverScope", PopoverContext = (0, import_core12.createStyledContext)({}), usePopoverContext = PopoverContext.useStyledContext, PopoverAnchor = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
24148
+ 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) {
24110
24149
  var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
24111
24150
  return React4.useEffect(function() {
24112
24151
  return onCustomAnchorAdd(), function() {
@@ -24165,7 +24204,7 @@ var require_Popover_native = __commonJS({
24165
24204
  children: trigger
24166
24205
  });
24167
24206
  }), PopoverContent = import_popper.PopperContentFrame.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
24168
- var { allowPinchZoom, trapFocus, disableRemoveScroll = !0, 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);
24207
+ 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);
24169
24208
  if (context.open && isFullyHidden && setIsFullyHidden(!1), React4.useEffect(function() {
24170
24209
  if (context.open) {
24171
24210
  var content = contentRef.current;
@@ -24182,7 +24221,7 @@ var require_Popover_native = __commonJS({
24182
24221
  pointerEvents: context.open ? (_contentImplProps_pointerEvents = contentImplProps.pointerEvents) !== null && _contentImplProps_pointerEvents !== void 0 ? _contentImplProps_pointerEvents : "auto" : "none",
24183
24222
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContentImpl, {
24184
24223
  ...contentImplProps,
24185
- disableRemoveScroll,
24224
+ enableRemoveScroll,
24186
24225
  ref: composedRefs,
24187
24226
  setIsFullyHidden,
24188
24227
  __scopePopover,
@@ -24212,25 +24251,29 @@ var require_Popover_native = __commonJS({
24212
24251
  });
24213
24252
  }));
24214
24253
  function PopoverRepropagateContext(props) {
24215
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
24216
- scope: props.scope,
24217
- ...props.popperContext,
24218
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
24219
- ...props.context,
24220
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.ProvideAdaptContext, {
24221
- ...props.adaptContext,
24222
- children: props.children
24254
+ var popperContext = (0, import_popper.usePopperContext)(props.scope || POPOVER_SCOPE);
24255
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
24256
+ zIndex: props.zIndex,
24257
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
24258
+ scope: props.scope,
24259
+ ...popperContext,
24260
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
24261
+ ...props.context,
24262
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.ProvideAdaptContext, {
24263
+ ...props.adaptContext,
24264
+ children: props.children
24265
+ })
24223
24266
  })
24224
24267
  })
24225
24268
  });
24226
24269
  }
24227
24270
  function PopoverContentPortal(props) {
24228
- var { __scopePopover } = props, zIndex = props.zIndex, context = usePopoverContext(__scopePopover), popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE), themeName = (0, import_core12.useThemeName)(), adaptContext = (0, import_adapt.useAdaptContext)(), contents = props.children;
24229
- return (import_react_native4.Platform.OS === "android" || import_react_native4.Platform.OS === "ios") && (contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverRepropagateContext, {
24271
+ var { __scopePopover } = props, zIndex = props.zIndex, context = usePopoverContext(__scopePopover), themeName = (0, import_core12.useThemeName)(), adaptContext = (0, import_adapt.useAdaptContext)(), contents = props.children;
24272
+ return needsRepropagation && (contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverRepropagateContext, {
24230
24273
  scope: __scopePopover || POPOVER_SCOPE,
24231
- popperContext,
24232
24274
  context,
24233
24275
  adaptContext,
24276
+ zIndex,
24234
24277
  children: props.children
24235
24278
  })), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
24236
24279
  stackZIndex: !0,
@@ -24256,35 +24299,49 @@ var require_Popover_native = __commonJS({
24256
24299
  });
24257
24300
  }
24258
24301
  var PopoverContentImpl = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
24259
- var { trapFocus, __scopePopover, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, disableFocusScope, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, children, disableRemoveScroll, freezeContentsWhenHidden, setIsFullyHidden, lazyMount, ...contentProps } = props, context = usePopoverContext(__scopePopover), { open, keepChildrenMounted } = context, popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE), handleExitComplete = React4.useCallback(function() {
24302
+ 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() {
24260
24303
  setIsFullyHidden == null || setIsFullyHidden(!0);
24261
24304
  }, [
24262
24305
  setIsFullyHidden
24263
24306
  ]), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.ResetPresence, {
24307
+ disable: context.breakpointActive,
24264
24308
  children
24265
24309
  });
24266
- return context.breakpointActive ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
24267
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
24268
- scope: __scopePopover || POPOVER_SCOPE,
24269
- ...popperContext,
24270
- children
24310
+ return context.breakpointActive, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RepropagatePopperAdapt, {
24311
+ __scopePopover: __scopePopover || POPOVER_SCOPE,
24312
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate.Animate, {
24313
+ type: "presence",
24314
+ present: !!open,
24315
+ keepChildrenMounted: !!keepChildrenMounted,
24316
+ onExitComplete: handleExitComplete,
24317
+ lazyMount,
24318
+ passThrough: context.breakpointActive,
24319
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContent, {
24320
+ __scopePopper: __scopePopover || POPOVER_SCOPE,
24321
+ "data-state": getState(open),
24322
+ id: context.contentId,
24323
+ ref: forwardedRef,
24324
+ passThrough: context.breakpointActive,
24325
+ ...contentProps,
24326
+ children: contents
24327
+ }, context.contentId)
24271
24328
  })
24272
- }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate.Animate, {
24273
- type: "presence",
24274
- present: !!open,
24275
- keepChildrenMounted,
24276
- onExitComplete: handleExitComplete,
24277
- lazyMount,
24278
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContent, {
24279
- __scopePopper: __scopePopover || POPOVER_SCOPE,
24280
- "data-state": getState(open),
24281
- id: context.contentId,
24282
- ref: forwardedRef,
24283
- ...contentProps,
24284
- children: contents
24285
- }, context.contentId)
24286
24329
  });
24287
- }), PopoverClose = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
24330
+ }), RepropagatePopperAdapt = function(param) {
24331
+ var { children, __scopePopover } = param;
24332
+ if (needsRepropagation) {
24333
+ var popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE);
24334
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
24335
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
24336
+ ...popperContext,
24337
+ children
24338
+ })
24339
+ });
24340
+ }
24341
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
24342
+ children
24343
+ });
24344
+ }, PopoverClose = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
24288
24345
  var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover);
24289
24346
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, {
24290
24347
  ...rest,
@@ -24305,13 +24362,7 @@ var require_Popover_native = __commonJS({
24305
24362
  });
24306
24363
  }), PopoverScrollView = /* @__PURE__ */ React4.forwardRef(function(props, ref) {
24307
24364
  var context = usePopoverContext(POPOVER_SCOPE);
24308
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_scroll_view.ScrollView, {
24309
- ref,
24310
- // when adapted, no pointer events!
24311
- pointerEvents: context.breakpointActive ? "none" : void 0,
24312
- scrollEnabled: !context.breakpointActive,
24313
- ...props
24314
- });
24365
+ return props.children;
24315
24366
  }), Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
24316
24367
  var id = React4.useId();
24317
24368
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
@@ -24334,7 +24385,11 @@ var require_Popover_native = __commonJS({
24334
24385
  Sheet: import_sheet.Sheet.Controlled,
24335
24386
  FocusScope: import_focus_scope.FocusScopeController
24336
24387
  }), PopoverInner = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
24337
- var { children, open: openProp, defaultOpen, onOpenChange, __scopePopover, keepChildrenMounted, hoverable, disableFocus, id, ...restProps } = props, triggerRef = React4.useRef(null), [hasCustomAnchor, setHasCustomAnchor] = React4.useState(!1), viaRef = React4.useRef(void 0), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
24388
+ var { children, open: openProp, defaultOpen, onOpenChange, __scopePopover, keepChildrenMounted: keepChildrenMountedProp, hoverable, disableFocus, id, ...restProps } = props, triggerRef = React4.useRef(null), [hasCustomAnchor, setHasCustomAnchor] = React4.useState(!1), viaRef = React4.useRef(void 0), [keepChildrenMounted] = (0, import_use_controllable_state.useControllableState)({
24389
+ prop: keepChildrenMountedProp,
24390
+ defaultProp: !1,
24391
+ transition: keepChildrenMountedProp === "lazy"
24392
+ }), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
24338
24393
  prop: openProp,
24339
24394
  defaultProp: defaultOpen || !1,
24340
24395
  onChange: function(val) {
@@ -24385,18 +24440,25 @@ var require_Popover_native = __commonJS({
24385
24440
  return setHasCustomAnchor(!1);
24386
24441
  }, []),
24387
24442
  keepChildrenMounted
24388
- }, contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.Popper, {
24389
- __scopePopper: __scopePopover || POPOVER_SCOPE,
24390
- stayInFrame: !0,
24391
- ...restProps,
24392
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
24443
+ }, memoizedChildren = React4.useMemo(function() {
24444
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
24393
24445
  scope: __scopePopover,
24394
24446
  ...popoverContext,
24395
24447
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverSheetController, {
24396
24448
  onOpenChange: setOpen,
24397
24449
  children
24398
24450
  })
24399
- })
24451
+ });
24452
+ }, [
24453
+ setOpen,
24454
+ children,
24455
+ ...Object.values(popoverContext)
24456
+ ]), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.Popper, {
24457
+ passThrough: isAdapted,
24458
+ __scopePopper: __scopePopover || POPOVER_SCOPE,
24459
+ stayInFrame: !0,
24460
+ ...restProps,
24461
+ children: memoizedChildren
24400
24462
  });
24401
24463
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
24402
24464
  children: import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_floating.FloatingOverrideContext.Provider, {
@@ -24418,7 +24480,7 @@ var require_Popover_native = __commonJS({
24418
24480
  }
24419
24481
  },
24420
24482
  open: context.open,
24421
- hidden: breakpointActive === !1,
24483
+ hidden: !breakpointActive,
24422
24484
  children: props.children
24423
24485
  });
24424
24486
  }, useShowPopoverSheet = function(context) {
@@ -26779,7 +26841,7 @@ var require_Select_native = __commonJS({
26779
26841
  getShowSheet() && props.onOpenChange(val);
26780
26842
  },
26781
26843
  open: context.open,
26782
- hidden: isAdapted === !1,
26844
+ hidden: !isAdapted,
26783
26845
  children: props.children
26784
26846
  });
26785
26847
  }, SelectSheetImpl = function(props) {