tamagui 1.129.18 → 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.
- package/dist/native.js +281 -210
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +264 -198
- package/dist/test.native.js.map +2 -2
- package/package.json +55 -55
- package/types/views/Input.d.ts +4 -3
- package/types/views/Input.d.ts.map +1 -1
package/dist/test.native.js
CHANGED
|
@@ -289,8 +289,9 @@ var require_PresenceContext_native = __commonJS({
|
|
|
289
289
|
});
|
|
290
290
|
module2.exports = __toCommonJS2(PresenceContext_exports);
|
|
291
291
|
var import_jsx_runtime6 = require("react/jsx-runtime"), React4 = __toESM2(require("react")), PresenceContext2 = /* @__PURE__ */ React4.createContext(null), ResetPresence2 = function(props) {
|
|
292
|
+
var parent = React4.useContext(PresenceContext2);
|
|
292
293
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PresenceContext2.Provider, {
|
|
293
|
-
value: null,
|
|
294
|
+
value: props.disable ? parent : null,
|
|
294
295
|
children: props.children
|
|
295
296
|
});
|
|
296
297
|
};
|
|
@@ -635,9 +636,12 @@ var require_AnimatePresence_native = __commonJS({
|
|
|
635
636
|
}), filtered;
|
|
636
637
|
}
|
|
637
638
|
var AnimatePresence = function(param) {
|
|
638
|
-
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;
|
|
639
640
|
updateChildLookup(filteredChildren, allChildren);
|
|
640
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
|
+
});
|
|
641
645
|
if (isInitialRender.current) return isInitialRender.current = !1, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
642
646
|
children: filteredChildren.map(function(child) {
|
|
643
647
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_PresenceChild.PresenceChild, {
|
|
@@ -6439,6 +6443,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6439
6443
|
};
|
|
6440
6444
|
conf = conf || (0, import_config.getConfig)();
|
|
6441
6445
|
var animationDriver = (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
|
|
6446
|
+
if (props.passThrough) return null;
|
|
6442
6447
|
import_constants4.isWeb && styleProps.isAnimated && animationDriver.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
6443
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 = {
|
|
6444
6449
|
classNames,
|
|
@@ -6719,20 +6724,29 @@ var require_mergeProps_native = __commonJS({
|
|
|
6719
6724
|
var out = {};
|
|
6720
6725
|
for (var key in a) mergeProp(out, a, b, key, inverseShorthands);
|
|
6721
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
|
+
}
|
|
6722
6738
|
return out;
|
|
6723
6739
|
};
|
|
6724
6740
|
function mergeProp(out, a, b, key, inverseShorthands) {
|
|
6725
6741
|
var longhand = (inverseShorthands == null ? void 0 : inverseShorthands[key]) || null, val = a[key];
|
|
6726
|
-
if (
|
|
6727
|
-
|
|
6728
|
-
out[key]
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
return;
|
|
6733
|
-
}
|
|
6734
|
-
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;
|
|
6735
6748
|
}
|
|
6749
|
+
b && (key in b || longhand && longhand in b) || (out[longhand || key] = val);
|
|
6736
6750
|
}
|
|
6737
6751
|
}
|
|
6738
6752
|
});
|
|
@@ -6972,7 +6986,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
6972
6986
|
id,
|
|
6973
6987
|
parentId
|
|
6974
6988
|
]), propsKey = getPropsKey(props), getSnapshot = function() {
|
|
6975
|
-
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));
|
|
6976
6990
|
return PendingUpdate.delete(id), (!local || rerender) && (local = {
|
|
6977
6991
|
...next
|
|
6978
6992
|
}, localStates.set(id, local)), Object.assign(local, next), local.id = id, states.set(id, next), local;
|
|
@@ -6995,6 +7009,10 @@ var require_useThemeState_native = __commonJS({
|
|
|
6995
7009
|
]), state;
|
|
6996
7010
|
}, getNextState = function(lastState, props, propsKey) {
|
|
6997
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
|
+
];
|
|
6998
7016
|
themes || (themes = (0, import_config.getConfig)().themes);
|
|
6999
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)));
|
|
7000
7018
|
if (0)
|
|
@@ -7450,8 +7468,8 @@ var require_Theme_native = __commonJS({
|
|
|
7450
7468
|
style: {}
|
|
7451
7469
|
}, Theme2 = /* @__PURE__ */ (0, import_react3.forwardRef)(function(props, ref) {
|
|
7452
7470
|
if (props.disable) return props.children;
|
|
7453
|
-
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) {
|
|
7454
|
-
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, {
|
|
7455
7473
|
"data-disable-theme": !0
|
|
7456
7474
|
});
|
|
7457
7475
|
}) : props.children;
|
|
@@ -7464,11 +7482,11 @@ var require_Theme_native = __commonJS({
|
|
|
7464
7482
|
var stateRef = (0, import_react3.useRef)({
|
|
7465
7483
|
hasEverThemed: !1
|
|
7466
7484
|
});
|
|
7467
|
-
return getThemedChildren(themeState, finalChildren, props, isRoot, stateRef);
|
|
7485
|
+
return getThemedChildren(themeState, finalChildren, props, isRoot, stateRef, passThrough);
|
|
7468
7486
|
});
|
|
7469
7487
|
Theme2.avoidForwardRef = !0;
|
|
7470
7488
|
function getThemedChildren(themeState, children, props) {
|
|
7471
|
-
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);
|
|
7472
7490
|
if (!shouldRenderChildrenWithTheme) return children;
|
|
7473
7491
|
children = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_useThemeState.ThemeStateContext.Provider, {
|
|
7474
7492
|
value: themeState.id,
|
|
@@ -7481,7 +7499,7 @@ var require_Theme_native = __commonJS({
|
|
|
7481
7499
|
var parentState = (0, import_useThemeState.getThemeState)(themeState.isNew ? themeState.id : themeState.parentId);
|
|
7482
7500
|
if (!parentState) throw new Error("\u203C\uFE0F010");
|
|
7483
7501
|
children = import_react3.Children.toArray(children).map(function(child) {
|
|
7484
|
-
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, {
|
|
7485
7503
|
name: parentState.name,
|
|
7486
7504
|
children: child.props.children
|
|
7487
7505
|
})) : child;
|
|
@@ -7492,10 +7510,10 @@ var require_Theme_native = __commonJS({
|
|
|
7492
7510
|
var { className, style } = getThemeClassNameAndStyle(themeState, props, isRoot);
|
|
7493
7511
|
if (children = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
|
|
7494
7512
|
className: `${className} _dsp_contents is_Theme`,
|
|
7495
|
-
style,
|
|
7513
|
+
style: passThrough ? void 0 : style,
|
|
7496
7514
|
children
|
|
7497
7515
|
}), state.hasEverThemed === "wrapped") {
|
|
7498
|
-
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";
|
|
7499
7517
|
children = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
|
|
7500
7518
|
className: className1,
|
|
7501
7519
|
children
|
|
@@ -7915,7 +7933,7 @@ var require_useComponentState_native = __commonJS({
|
|
|
7915
7933
|
}
|
|
7916
7934
|
var isDisabled = function(props) {
|
|
7917
7935
|
var _props_accessibilityState;
|
|
7918
|
-
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;
|
|
7919
7937
|
};
|
|
7920
7938
|
}
|
|
7921
7939
|
});
|
|
@@ -8204,7 +8222,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8204
8222
|
});
|
|
8205
8223
|
var allGroupContexts = (0, import_react3.useMemo)(function() {
|
|
8206
8224
|
var _stateRef_current_group;
|
|
8207
|
-
if (!groupName) return groupContextParent;
|
|
8225
|
+
if (!groupName || props.passThrough) return groupContextParent;
|
|
8208
8226
|
(_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.listeners.clear();
|
|
8209
8227
|
var listeners = /* @__PURE__ */ new Set();
|
|
8210
8228
|
return stateRef.current.group = {
|
|
@@ -8277,7 +8295,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8277
8295
|
willBeAnimated,
|
|
8278
8296
|
styledContextProps
|
|
8279
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;
|
|
8280
|
-
if (groupContext) {
|
|
8298
|
+
if (splitStyles && groupContext) {
|
|
8281
8299
|
var groupState = groupContext == null ? void 0 : groupContext.state;
|
|
8282
8300
|
if (groupState && groupState.layout === void 0) {
|
|
8283
8301
|
var _splitStyles_style, _splitStyles_style1;
|
|
@@ -8287,8 +8305,8 @@ var require_createComponent_native = __commonJS({
|
|
|
8287
8305
|
});
|
|
8288
8306
|
}
|
|
8289
8307
|
}
|
|
8290
|
-
if ((hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
|
|
8291
|
-
var
|
|
8308
|
+
if (splitStyles && (!hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
|
|
8309
|
+
var useStyleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
|
|
8292
8310
|
stateRef.current.setStateShallow = function(nextOrGetNext) {
|
|
8293
8311
|
var prev = NextState.get(stateRef) || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
|
|
8294
8312
|
if (!(next === prev || (0, import_is_equal_shallow.isEqualShallow)(prev, next))) {
|
|
@@ -8302,9 +8320,9 @@ var require_createComponent_native = __commonJS({
|
|
|
8302
8320
|
};
|
|
8303
8321
|
NextState.set(stateRef, updatedState);
|
|
8304
8322
|
var { group, hasDynGroupChildren, unmounted, animation, ...childrenGroupState } = updatedState;
|
|
8305
|
-
if (groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState), !hasAnimationProp || !
|
|
8323
|
+
if (groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState), !hasAnimationProp || !useStyleListener) return;
|
|
8306
8324
|
var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp);
|
|
8307
|
-
|
|
8325
|
+
useStyleListener((nextStyles == null ? void 0 : nextStyles.style) || {});
|
|
8308
8326
|
} else ogSetStateShallow(next);
|
|
8309
8327
|
}
|
|
8310
8328
|
}, setStateShallow = function(state2) {
|
|
@@ -8312,14 +8330,16 @@ var require_createComponent_native = __commonJS({
|
|
|
8312
8330
|
(_stateRef_current_setStateShallow = (_stateRef_current = stateRef.current).setStateShallow) === null || _stateRef_current_setStateShallow === void 0 || _stateRef_current_setStateShallow.call(_stateRef_current, state2);
|
|
8313
8331
|
};
|
|
8314
8332
|
}
|
|
8315
|
-
if (
|
|
8316
|
-
|
|
8317
|
-
|
|
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);
|
|
8318
8339
|
}
|
|
8319
|
-
splitStyles
|
|
8320
|
-
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;
|
|
8321
8341
|
(0, import_useMedia.setMediaShouldUpdate)(componentContext, shouldListenForMedia, mediaListeningKeys);
|
|
8322
|
-
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, {
|
|
8323
8343
|
asChild,
|
|
8324
8344
|
children,
|
|
8325
8345
|
themeShallow,
|
|
@@ -8343,7 +8363,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8343
8363
|
onClick,
|
|
8344
8364
|
theme: _themeProp,
|
|
8345
8365
|
...nonTamaguiProps
|
|
8346
|
-
} = viewPropsIn, viewProps = nonTamaguiProps;
|
|
8366
|
+
} = viewPropsIn || {}, viewProps = nonTamaguiProps;
|
|
8347
8367
|
!isTaggable && props.forceStyle && (viewProps.forceStyle = props.forceStyle), isHOC && _themeProp && (viewProps.theme = _themeProp), tagProp && elementType.acceptTagProp && (viewProps.tag = tagProp);
|
|
8348
8368
|
var animationStyles, shouldUseAnimation = (
|
|
8349
8369
|
// if it supports css vars we run it on server too to get matching initial style
|
|
@@ -8367,9 +8387,9 @@ var require_createComponent_native = __commonJS({
|
|
|
8367
8387
|
staticConfig,
|
|
8368
8388
|
stateRef
|
|
8369
8389
|
});
|
|
8370
|
-
isHydrated && animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = `${state.unmounted === "should-enter" ? "t_unmounted " : ""}${viewProps.className || ""} ${animations.className}`)
|
|
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}`)));
|
|
8371
8391
|
}
|
|
8372
|
-
groupContext && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
|
|
8392
|
+
splitStyles && groupContext && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
|
|
8373
8393
|
var _stateRef_current_group, layout = e.nativeEvent.layout;
|
|
8374
8394
|
groupContext.state.layout = layout, (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.emit({
|
|
8375
8395
|
layout
|
|
@@ -8381,7 +8401,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8381
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) {
|
|
8382
8402
|
return stateRef.current.host = x;
|
|
8383
8403
|
}, forwardedRef, import_setElementProps.setElementProps, animatedRef)), viewProps.ref = stateRef.current.composedRef;
|
|
8384
|
-
var
|
|
8404
|
+
var unPress = function() {
|
|
8385
8405
|
setStateShallow({
|
|
8386
8406
|
press: !1,
|
|
8387
8407
|
pressIn: !1
|
|
@@ -8497,7 +8517,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8497
8517
|
});
|
|
8498
8518
|
}
|
|
8499
8519
|
(_hooks_useEvents = import_setupHooks.hooks.useEvents) === null || _hooks_useEvents === void 0 || _hooks_useEvents.call(import_setupHooks.hooks, viewProps, events, splitStyles, setStateShallow, staticConfig);
|
|
8500
|
-
var direction = props.spaceDirection || "both", content = !children || asChild ? children : spacedChildren2({
|
|
8520
|
+
var direction = props.spaceDirection || "both", content = !children || asChild || !splitStyles ? children : spacedChildren2({
|
|
8501
8521
|
separator,
|
|
8502
8522
|
children,
|
|
8503
8523
|
space,
|
|
@@ -8511,9 +8531,19 @@ var require_createComponent_native = __commonJS({
|
|
|
8511
8531
|
onLongPress
|
|
8512
8532
|
});
|
|
8513
8533
|
var useChildrenResult;
|
|
8514
|
-
import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps)),
|
|
8515
|
-
|
|
8516
|
-
|
|
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;
|
|
8543
|
+
needsReset && !hasEverReset && (stateRef.current.hasEverResetPresence = !0);
|
|
8544
|
+
var renderReset = needsReset || hasEverReset;
|
|
8545
|
+
if (renderReset && ResetPresence2 && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ResetPresence2, {
|
|
8546
|
+
disabled: !needsReset,
|
|
8517
8547
|
children: content
|
|
8518
8548
|
})), "focusWithinStyle" in propsIn && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
8519
8549
|
...componentContext,
|
|
@@ -8522,7 +8552,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8522
8552
|
})), "group" in props && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_GroupContext.GroupContext.Provider, {
|
|
8523
8553
|
value: allGroupContexts,
|
|
8524
8554
|
children: content
|
|
8525
|
-
})), 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) {
|
|
8526
8556
|
var contextProps = staticConfig.context.props;
|
|
8527
8557
|
for (var key1 in contextProps) if (viewProps.style && key1 in viewProps.style || key1 in viewProps) {
|
|
8528
8558
|
var _viewProps_style;
|
|
@@ -8573,7 +8603,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8573
8603
|
}
|
|
8574
8604
|
function styleable(Component2, options) {
|
|
8575
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);
|
|
8576
|
-
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;
|
|
8577
8607
|
}
|
|
8578
8608
|
return res.extractable = extractable, res.styleable = styleable, res;
|
|
8579
8609
|
}
|
|
@@ -10528,7 +10558,7 @@ var require_useProps_native = __commonJS({
|
|
|
10528
10558
|
noClass: !0,
|
|
10529
10559
|
resolveValues: "auto",
|
|
10530
10560
|
...opts
|
|
10531
|
-
}, null, componentContext, groupContext), { mediaGroups, pseudoGroups } = splitStyles;
|
|
10561
|
+
}, null, componentContext, groupContext), { mediaGroups, pseudoGroups } = splitStyles || {};
|
|
10532
10562
|
return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
10533
10563
|
if (!disabled) {
|
|
10534
10564
|
if (state.unmounted) {
|
|
@@ -10554,8 +10584,8 @@ var require_useProps_native = __commonJS({
|
|
|
10554
10584
|
...mediaGroups
|
|
10555
10585
|
]).join("") : 0
|
|
10556
10586
|
]), [
|
|
10557
|
-
splitStyles.viewProps,
|
|
10558
|
-
splitStyles.style || {},
|
|
10587
|
+
(splitStyles == null ? void 0 : splitStyles.viewProps) || {},
|
|
10588
|
+
(splitStyles == null ? void 0 : splitStyles.style) || {},
|
|
10559
10589
|
theme,
|
|
10560
10590
|
import_useMedia.mediaState
|
|
10561
10591
|
];
|
|
@@ -12842,7 +12872,7 @@ var require_index_native19 = __commonJS({
|
|
|
12842
12872
|
getBoundingClientRectAsync(node),
|
|
12843
12873
|
getBoundingClientRectAsync(parentNode)
|
|
12844
12874
|
]);
|
|
12845
|
-
if (frameId !== lastFrameAt) return;
|
|
12875
|
+
if (nr === !1 || pr === !1 || frameId !== lastFrameAt) return;
|
|
12846
12876
|
nodeRect = nr, parentRect = pr;
|
|
12847
12877
|
} else nodeRect = node.getBoundingClientRect(), parentRect = parentNode.getBoundingClientRect();
|
|
12848
12878
|
var cachedRect = NodeRectCache.get(node), cachedParentRect = NodeRectCache.get(parentNode);
|
|
@@ -12945,7 +12975,7 @@ var require_index_native19 = __commonJS({
|
|
|
12945
12975
|
return new Promise(function(res) {
|
|
12946
12976
|
if (!(!node || node.nodeType !== 1)) {
|
|
12947
12977
|
var io = new IntersectionObserver(function(entries) {
|
|
12948
|
-
return io.disconnect(), res(entries[0].boundingClientRect);
|
|
12978
|
+
return entries[0].isIntersecting ? (io.disconnect(), res(entries[0].boundingClientRect)) : res(!1);
|
|
12949
12979
|
}, {
|
|
12950
12980
|
threshold: 0
|
|
12951
12981
|
});
|
|
@@ -13551,8 +13581,7 @@ var require_index_native20 = __commonJS({
|
|
|
13551
13581
|
if (isDOM && plainDOMProps.href && hrefAttrs) var download, rel, target;
|
|
13552
13582
|
}
|
|
13553
13583
|
},
|
|
13554
|
-
useEvents(viewProps, events,
|
|
13555
|
-
var { pseudos } = param;
|
|
13584
|
+
useEvents(viewProps, events, splitStyles, setStateShallow, staticConfig) {
|
|
13556
13585
|
if (events && (events.onFocus && (viewProps.onFocus = events.onFocus), events.onBlur && (viewProps.onBlur = events.onBlur)), staticConfig.isInput) {
|
|
13557
13586
|
if (events) {
|
|
13558
13587
|
var { onPressIn, onPressOut, onPress } = events, inputEvents = {
|
|
@@ -16062,7 +16091,7 @@ var require_GorhomPortalItem_native = __commonJS({
|
|
|
16062
16091
|
});
|
|
16063
16092
|
module2.exports = __toCommonJS2(GorhomPortalItem_native_exports);
|
|
16064
16093
|
var import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_react3 = require("react"), import_GorhomPortal = require_GorhomPortal_native(), GorhomPortalItem = function(props) {
|
|
16065
|
-
var { name: _providedName, hostName, handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children,
|
|
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() {
|
|
16066
16095
|
_providedHandleOnMount ? _providedHandleOnMount(function() {
|
|
16067
16096
|
return addUpdatePortal(name, children);
|
|
16068
16097
|
}) : addUpdatePortal(name, children);
|
|
@@ -16076,14 +16105,14 @@ var require_GorhomPortalItem_native = __commonJS({
|
|
|
16076
16105
|
}) : addUpdatePortal(name, children);
|
|
16077
16106
|
});
|
|
16078
16107
|
return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
16079
|
-
if (!
|
|
16108
|
+
if (!passThrough) return handleOnMount(), function() {
|
|
16080
16109
|
handleOnUnmount();
|
|
16081
16110
|
};
|
|
16082
16111
|
}, []), (0, import_react3.useEffect)(function() {
|
|
16083
|
-
|
|
16112
|
+
passThrough || handleOnUpdate();
|
|
16084
16113
|
}, [
|
|
16085
16114
|
children
|
|
16086
|
-
]),
|
|
16115
|
+
]), passThrough ? children : null;
|
|
16087
16116
|
};
|
|
16088
16117
|
}
|
|
16089
16118
|
});
|
|
@@ -16491,9 +16520,9 @@ var require_Adapt_native = __commonJS({
|
|
|
16491
16520
|
}, {
|
|
16492
16521
|
Contents: AdaptContents
|
|
16493
16522
|
}), AdaptPortalContents = function(props) {
|
|
16494
|
-
var { portalName } = useAdaptContext(props.scope);
|
|
16523
|
+
var isActive = useAdaptIsActive(props.scope), { portalName } = useAdaptContext(props.scope);
|
|
16495
16524
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
|
|
16496
|
-
|
|
16525
|
+
passThrough: !isActive,
|
|
16497
16526
|
hostName: portalName,
|
|
16498
16527
|
children: props.children
|
|
16499
16528
|
});
|
|
@@ -17460,12 +17489,11 @@ var require_useSheetOpenState_native = __commonJS({
|
|
|
17460
17489
|
var { isHidden, controller } = (0, import_useSheetController.useSheetController)(), onOpenChangeInternal = function(val) {
|
|
17461
17490
|
var _controller_onOpenChange, _props_onOpenChange;
|
|
17462
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);
|
|
17463
|
-
}, _controller_open, _props_defaultOpen, [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
17464
|
-
prop:
|
|
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,
|
|
17465
17494
|
defaultProp: (_props_defaultOpen = props.defaultOpen) !== null && _props_defaultOpen !== void 0 ? _props_defaultOpen : !1,
|
|
17466
17495
|
onChange: onOpenChangeInternal,
|
|
17467
|
-
strategy: "
|
|
17468
|
-
transition: !0
|
|
17496
|
+
strategy: "prop-wins"
|
|
17469
17497
|
});
|
|
17470
17498
|
return {
|
|
17471
17499
|
open,
|
|
@@ -17552,8 +17580,7 @@ var require_useSheetProviderProps_native = __commonJS({
|
|
|
17552
17580
|
prop: props.position,
|
|
17553
17581
|
defaultProp: props.defaultPosition || (state.open ? 0 : -1),
|
|
17554
17582
|
onChange: props.onPositionChange,
|
|
17555
|
-
strategy: "
|
|
17556
|
-
transition: !0
|
|
17583
|
+
strategy: "prop-wins"
|
|
17557
17584
|
}), position = state.open === !1 ? -1 : position_, { open } = state, setPosition = import_react3.default.useCallback(function(next) {
|
|
17558
17585
|
props.dismissOnSnapToBottom && next === snapPoints.length - 1 ? state.setOpen(!1) : setPositionImmediate(next);
|
|
17559
17586
|
}, [
|
|
@@ -17960,27 +17987,26 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
17960
17987
|
...animationConfig
|
|
17961
17988
|
}));
|
|
17962
17989
|
}
|
|
17963
|
-
})
|
|
17990
|
+
}), isAbleToPosition = /* @__PURE__ */ function() {
|
|
17991
|
+
return !(disableAnimation || !frameSize || !screenSize || isHidden || hasntMeasured && !open);
|
|
17992
|
+
}();
|
|
17964
17993
|
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
17965
|
-
|
|
17966
|
-
|
|
17967
|
-
|
|
17968
|
-
|
|
17969
|
-
|
|
17970
|
-
|
|
17971
|
-
|
|
17972
|
-
|
|
17973
|
-
});
|
|
17974
|
-
return;
|
|
17975
|
-
}
|
|
17976
|
-
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
|
+
}));
|
|
17977
18002
|
}, [
|
|
17978
18003
|
hasntMeasured,
|
|
17979
|
-
disableAnimation,
|
|
17980
|
-
isHidden,
|
|
17981
|
-
frameSize,
|
|
17982
18004
|
screenSize,
|
|
17983
|
-
|
|
18005
|
+
frameSize
|
|
18006
|
+
]), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
18007
|
+
isAbleToPosition && animateTo(position);
|
|
18008
|
+
}, [
|
|
18009
|
+
isAbleToPosition,
|
|
17984
18010
|
position
|
|
17985
18011
|
]);
|
|
17986
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) {
|
|
@@ -17995,12 +18021,14 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
17995
18021
|
}
|
|
17996
18022
|
var release = function(param) {
|
|
17997
18023
|
var { vy, dragAt } = param;
|
|
17998
|
-
|
|
17999
|
-
|
|
18000
|
-
var
|
|
18001
|
-
|
|
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);
|
|
18002
18031
|
}
|
|
18003
|
-
setPosition(closestPoint), animateTo(closestPoint), setScrollEnabled(closestPoint === 0 && dragAt <= 0);
|
|
18004
18032
|
}, finish = function(_e, state2) {
|
|
18005
18033
|
release({
|
|
18006
18034
|
vy: state2.vy,
|
|
@@ -18008,10 +18036,13 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18008
18036
|
});
|
|
18009
18037
|
}, previouslyScrolling = !1, onMoveShouldSet = function(e, param) {
|
|
18010
18038
|
var { dy } = param;
|
|
18011
|
-
|
|
18012
|
-
|
|
18013
|
-
|
|
18014
|
-
|
|
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();
|
|
18015
18046
|
}, grant = function() {
|
|
18016
18047
|
setScrollEnabled(!1), setPanning(!0), stopSpring(), startY = at.current;
|
|
18017
18048
|
}, isExternalDrag = !1;
|
|
@@ -18380,7 +18411,7 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
18380
18411
|
}, []);
|
|
18381
18412
|
var release = function() {
|
|
18382
18413
|
if (state.current.isDragging) {
|
|
18383
|
-
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);
|
|
18384
18415
|
var vy = 0;
|
|
18385
18416
|
if (state.current.dys.length) {
|
|
18386
18417
|
var recentDys = state.current.dys.slice(-10), dist = recentDys.length ? recentDys.reduce(function(a, b) {
|
|
@@ -18427,15 +18458,12 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
18427
18458
|
onResponderMove: function(e) {
|
|
18428
18459
|
if (import_core12.isWeb) {
|
|
18429
18460
|
var { pageY } = e.nativeEvent;
|
|
18430
|
-
if (state.current.isScrolling)
|
|
18431
|
-
e.stopPropagation();
|
|
18432
|
-
return;
|
|
18433
|
-
}
|
|
18461
|
+
if (state.current.isScrolling) return;
|
|
18434
18462
|
scrollBridge.scrollStartY === -1 && (scrollBridge.scrollStartY = pageY, state.current.lastPageY = pageY);
|
|
18435
18463
|
var dragAt = pageY - scrollBridge.scrollStartY, dy = pageY - state.current.lastPageY;
|
|
18436
18464
|
state.current.lastPageY = pageY;
|
|
18437
|
-
var isDraggingUp = dy < 0, isPaneAtTop = scrollBridge.paneY <= scrollBridge.paneMinY;
|
|
18438
|
-
if (
|
|
18465
|
+
var isDraggingUp = dy < 0, isPaneAtTop = scrollBridge.paneY <= scrollBridge.paneMinY, shouldScrollLock = (dy === 0 || isDraggingUp) && isPaneAtTop;
|
|
18466
|
+
if (shouldScrollLock) {
|
|
18439
18467
|
state.current.isScrolling = !0, scrollBridge.scrollLock = !0, setScrollEnabled(!0);
|
|
18440
18468
|
return;
|
|
18441
18469
|
}
|
|
@@ -18626,14 +18654,7 @@ var require_createSheet_native = __commonJS({
|
|
|
18626
18654
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, {
|
|
18627
18655
|
children: [
|
|
18628
18656
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_remove_scroll.RemoveScroll, {
|
|
18629
|
-
|
|
18630
|
-
enabled: removeScrollEnabled,
|
|
18631
|
-
allowPinchZoom: !0,
|
|
18632
|
-
shards: [
|
|
18633
|
-
contentRef
|
|
18634
|
-
],
|
|
18635
|
-
// causes lots of bugs on touch web on site
|
|
18636
|
-
removeScrollBar: !1,
|
|
18657
|
+
enabled: removeScrollEnabled && context.open,
|
|
18637
18658
|
children: sheetContents
|
|
18638
18659
|
}),
|
|
18639
18660
|
/* below frame hide when bouncing past 100% */
|
|
@@ -18966,18 +18987,20 @@ var require_SheetController_native = __commonJS({
|
|
|
18966
18987
|
});
|
|
18967
18988
|
module2.exports = __toCommonJS2(SheetController_exports);
|
|
18968
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) {
|
|
18969
|
-
var { children, onOpenChange: onOpenChangeProp,
|
|
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() {
|
|
18970
18991
|
return {
|
|
18971
|
-
|
|
18972
|
-
|
|
18973
|
-
|
|
18992
|
+
id,
|
|
18993
|
+
open,
|
|
18994
|
+
hidden,
|
|
18995
|
+
disableDrag,
|
|
18974
18996
|
onOpenChange
|
|
18975
18997
|
};
|
|
18976
18998
|
}, [
|
|
18999
|
+
id,
|
|
18977
19000
|
onOpenChange,
|
|
18978
|
-
|
|
18979
|
-
|
|
18980
|
-
|
|
19001
|
+
open,
|
|
19002
|
+
hidden,
|
|
19003
|
+
disableDrag
|
|
18981
19004
|
]);
|
|
18982
19005
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_useSheetController.SheetControllerContext.Provider, {
|
|
18983
19006
|
value: memoValue,
|
|
@@ -19277,14 +19300,7 @@ var require_Dialog_native = __commonJS({
|
|
|
19277
19300
|
})
|
|
19278
19301
|
});
|
|
19279
19302
|
return !import_constants4.isWeb || context.disableRemoveScroll ? contents : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_remove_scroll.RemoveScroll, {
|
|
19280
|
-
forwardProps: !0,
|
|
19281
19303
|
enabled: context.open,
|
|
19282
|
-
allowPinchZoom: context.allowPinchZoom,
|
|
19283
|
-
shards: [
|
|
19284
|
-
context.contentRef
|
|
19285
|
-
],
|
|
19286
|
-
// causes lots of bugs on touch web on site
|
|
19287
|
-
removeScrollBar: !1,
|
|
19288
19304
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
|
|
19289
19305
|
"data-remove-scroll-container": !0,
|
|
19290
19306
|
className: "_dsp_contents",
|
|
@@ -19441,7 +19457,7 @@ var require_Dialog_native = __commonJS({
|
|
|
19441
19457
|
titleName: "DialogTitle",
|
|
19442
19458
|
docsSlug: "dialog"
|
|
19443
19459
|
}), Dialog = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
|
|
19444
|
-
var { __scopeDialog, children, open: openProp, defaultOpen = !1, onOpenChange, modal = !0,
|
|
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({
|
|
19445
19461
|
scopeKey,
|
|
19446
19462
|
contentId
|
|
19447
19463
|
}), triggerRef = React4.useRef(null), contentRef = React4.useRef(null), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
@@ -19466,7 +19482,6 @@ var require_Dialog_native = __commonJS({
|
|
|
19466
19482
|
onOpenChange: setOpen,
|
|
19467
19483
|
onOpenToggle,
|
|
19468
19484
|
modal,
|
|
19469
|
-
allowPinchZoom,
|
|
19470
19485
|
disableRemoveScroll,
|
|
19471
19486
|
adaptName
|
|
19472
19487
|
};
|
|
@@ -23333,9 +23348,9 @@ var require_Animate_native = __commonJS({
|
|
|
23333
23348
|
module2.exports = __toCommonJS2(Animate_exports);
|
|
23334
23349
|
var import_jsx_runtime6 = require("react/jsx-runtime"), import_animate_presence = require_index_native4(), import_react3 = require("react");
|
|
23335
23350
|
function Animate(param) {
|
|
23336
|
-
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);
|
|
23337
23352
|
(0, import_react3.useEffect)(function() {
|
|
23338
|
-
lazyMount && present && (0, import_react3.startTransition)(function() {
|
|
23353
|
+
passThrough || lazyMount && present && (0, import_react3.startTransition)(function() {
|
|
23339
23354
|
setLazyMounted(present);
|
|
23340
23355
|
});
|
|
23341
23356
|
}, [
|
|
@@ -23344,20 +23359,23 @@ var require_Animate_native = __commonJS({
|
|
|
23344
23359
|
]);
|
|
23345
23360
|
var mounted = present ? lazyMount ? lazyMounted : present : !1;
|
|
23346
23361
|
return type === "presence" ? props.keepChildrenMounted ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.PresenceChild, {
|
|
23347
|
-
|
|
23348
|
-
|
|
23349
|
-
|
|
23350
|
-
|
|
23351
|
-
|
|
23352
|
-
|
|
23353
|
-
|
|
23354
|
-
|
|
23355
|
-
|
|
23356
|
-
|
|
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
|
+
},
|
|
23357
23375
|
children
|
|
23358
23376
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
|
|
23359
23377
|
...props,
|
|
23360
|
-
children: mounted ? children : null
|
|
23378
|
+
children: mounted || passThrough ? children : null
|
|
23361
23379
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
23362
23380
|
children
|
|
23363
23381
|
});
|
|
@@ -23677,6 +23695,12 @@ var require_Popper_native = __commonJS({
|
|
|
23677
23695
|
PopperContext: function() {
|
|
23678
23696
|
return PopperContext;
|
|
23679
23697
|
},
|
|
23698
|
+
PopperInfrequentContext: function() {
|
|
23699
|
+
return PopperInfrequentContext;
|
|
23700
|
+
},
|
|
23701
|
+
PopperPositionContext: function() {
|
|
23702
|
+
return PopperPositionContext;
|
|
23703
|
+
},
|
|
23680
23704
|
PopperProvider: function() {
|
|
23681
23705
|
return PopperProvider;
|
|
23682
23706
|
},
|
|
@@ -23685,10 +23709,15 @@ var require_Popper_native = __commonJS({
|
|
|
23685
23709
|
},
|
|
23686
23710
|
usePopperContext: function() {
|
|
23687
23711
|
return usePopperContext;
|
|
23712
|
+
},
|
|
23713
|
+
usePopperInfrequentContext: function() {
|
|
23714
|
+
return usePopperInfrequentContext;
|
|
23688
23715
|
}
|
|
23689
23716
|
});
|
|
23690
23717
|
module2.exports = __toCommonJS2(Popper_exports);
|
|
23691
|
-
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,
|
|
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 = {
|
|
23692
23721
|
name: "checkFloating",
|
|
23693
23722
|
fn(data) {
|
|
23694
23723
|
return {
|
|
@@ -23702,12 +23731,15 @@ var require_Popper_native = __commonJS({
|
|
|
23702
23731
|
Object.assign(setupOptions, options);
|
|
23703
23732
|
}
|
|
23704
23733
|
function Popper(props) {
|
|
23705
|
-
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
|
+
},
|
|
23706
23738
|
strategy,
|
|
23707
23739
|
placement,
|
|
23708
23740
|
sameScrollView: !1,
|
|
23709
23741
|
// this only takes effect on native
|
|
23710
|
-
whileElementsMounted: import_floating.autoUpdate,
|
|
23742
|
+
whileElementsMounted: passThrough ? void 0 : import_floating.autoUpdate,
|
|
23711
23743
|
platform: disableRTL ?? setupOptions.disableRTL ? {
|
|
23712
23744
|
...import_floating.platform,
|
|
23713
23745
|
isRTL(element) {
|
|
@@ -23739,8 +23771,9 @@ var require_Popper_native = __commonJS({
|
|
|
23739
23771
|
showSubscription.remove(), hideSubscription.remove();
|
|
23740
23772
|
};
|
|
23741
23773
|
}, []), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
23742
|
-
floating.update();
|
|
23774
|
+
passThrough || floating.update();
|
|
23743
23775
|
}, [
|
|
23776
|
+
passThrough,
|
|
23744
23777
|
dimensions,
|
|
23745
23778
|
keyboardOpen
|
|
23746
23779
|
]);
|
|
@@ -23753,9 +23786,12 @@ var require_Popper_native = __commonJS({
|
|
|
23753
23786
|
hasFloating: (_middlewareData_checkFloating = middlewareData.checkFloating) === null || _middlewareData_checkFloating === void 0 ? void 0 : _middlewareData_checkFloating.hasFloating,
|
|
23754
23787
|
...floating
|
|
23755
23788
|
};
|
|
23756
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
23757
|
-
|
|
23758
|
-
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
|
+
})
|
|
23759
23795
|
});
|
|
23760
23796
|
}
|
|
23761
23797
|
var PopperAnchor = import_stacks3.YStack.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
@@ -23797,10 +23833,11 @@ var require_Popper_native = __commonJS({
|
|
|
23797
23833
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
23798
23834
|
}
|
|
23799
23835
|
}), PopperContent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
23800
|
-
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);
|
|
23801
23837
|
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
23802
|
-
x && y && setNeedsMeasure(!1);
|
|
23838
|
+
needsMeasure && x && y && setNeedsMeasure(!1);
|
|
23803
23839
|
}, [
|
|
23840
|
+
needsMeasure,
|
|
23804
23841
|
enableAnimationForPositionChange,
|
|
23805
23842
|
x,
|
|
23806
23843
|
y
|
|
@@ -23825,14 +23862,20 @@ var require_Popper_native = __commonJS({
|
|
|
23825
23862
|
}
|
|
23826
23863
|
}, { style, ...floatingProps } = getFloatingProps ? getFloatingProps(frameProps) : frameProps;
|
|
23827
23864
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Stack, {
|
|
23828
|
-
|
|
23865
|
+
passThrough,
|
|
23866
|
+
ref: contentRefs,
|
|
23867
|
+
...passThrough ? null : floatingProps,
|
|
23829
23868
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperContentFrame, {
|
|
23830
|
-
|
|
23831
|
-
|
|
23832
|
-
|
|
23833
|
-
|
|
23834
|
-
|
|
23835
|
-
|
|
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
|
|
23836
23879
|
}, "popper-content-frame")
|
|
23837
23880
|
});
|
|
23838
23881
|
}), PopperArrowFrame = (0, import_core12.styled)(import_stacks3.YStack, {
|
|
@@ -24102,7 +24145,7 @@ var require_Popover_native = __commonJS({
|
|
|
24102
24145
|
}
|
|
24103
24146
|
});
|
|
24104
24147
|
module2.exports = __toCommonJS2(Popover_exports);
|
|
24105
|
-
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(),
|
|
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) {
|
|
24106
24149
|
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
|
|
24107
24150
|
return React4.useEffect(function() {
|
|
24108
24151
|
return onCustomAnchorAdd(), function() {
|
|
@@ -24161,7 +24204,7 @@ var require_Popover_native = __commonJS({
|
|
|
24161
24204
|
children: trigger
|
|
24162
24205
|
});
|
|
24163
24206
|
}), PopoverContent = import_popper.PopperContentFrame.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24164
|
-
var {
|
|
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);
|
|
24165
24208
|
if (context.open && isFullyHidden && setIsFullyHidden(!1), React4.useEffect(function() {
|
|
24166
24209
|
if (context.open) {
|
|
24167
24210
|
var content = contentRef.current;
|
|
@@ -24178,7 +24221,7 @@ var require_Popover_native = __commonJS({
|
|
|
24178
24221
|
pointerEvents: context.open ? (_contentImplProps_pointerEvents = contentImplProps.pointerEvents) !== null && _contentImplProps_pointerEvents !== void 0 ? _contentImplProps_pointerEvents : "auto" : "none",
|
|
24179
24222
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContentImpl, {
|
|
24180
24223
|
...contentImplProps,
|
|
24181
|
-
|
|
24224
|
+
enableRemoveScroll,
|
|
24182
24225
|
ref: composedRefs,
|
|
24183
24226
|
setIsFullyHidden,
|
|
24184
24227
|
__scopePopover,
|
|
@@ -24208,25 +24251,29 @@ var require_Popover_native = __commonJS({
|
|
|
24208
24251
|
});
|
|
24209
24252
|
}));
|
|
24210
24253
|
function PopoverRepropagateContext(props) {
|
|
24211
|
-
|
|
24212
|
-
|
|
24213
|
-
|
|
24214
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
24215
|
-
|
|
24216
|
-
|
|
24217
|
-
|
|
24218
|
-
|
|
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
|
+
})
|
|
24219
24266
|
})
|
|
24220
24267
|
})
|
|
24221
24268
|
});
|
|
24222
24269
|
}
|
|
24223
24270
|
function PopoverContentPortal(props) {
|
|
24224
|
-
var { __scopePopover } = props, zIndex = props.zIndex, context = usePopoverContext(__scopePopover),
|
|
24225
|
-
return
|
|
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, {
|
|
24226
24273
|
scope: __scopePopover || POPOVER_SCOPE,
|
|
24227
|
-
popperContext,
|
|
24228
24274
|
context,
|
|
24229
24275
|
adaptContext,
|
|
24276
|
+
zIndex,
|
|
24230
24277
|
children: props.children
|
|
24231
24278
|
})), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
|
|
24232
24279
|
stackZIndex: !0,
|
|
@@ -24252,35 +24299,49 @@ var require_Popover_native = __commonJS({
|
|
|
24252
24299
|
});
|
|
24253
24300
|
}
|
|
24254
24301
|
var PopoverContentImpl = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24255
|
-
var { trapFocus, __scopePopover, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, disableFocusScope, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, children,
|
|
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() {
|
|
24256
24303
|
setIsFullyHidden == null || setIsFullyHidden(!0);
|
|
24257
24304
|
}, [
|
|
24258
24305
|
setIsFullyHidden
|
|
24259
24306
|
]), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.ResetPresence, {
|
|
24307
|
+
disable: context.breakpointActive,
|
|
24260
24308
|
children
|
|
24261
24309
|
});
|
|
24262
|
-
return context.breakpointActive
|
|
24263
|
-
|
|
24264
|
-
|
|
24265
|
-
|
|
24266
|
-
|
|
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)
|
|
24267
24328
|
})
|
|
24268
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate.Animate, {
|
|
24269
|
-
type: "presence",
|
|
24270
|
-
present: !!open,
|
|
24271
|
-
keepChildrenMounted,
|
|
24272
|
-
onExitComplete: handleExitComplete,
|
|
24273
|
-
lazyMount,
|
|
24274
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContent, {
|
|
24275
|
-
__scopePopper: __scopePopover || POPOVER_SCOPE,
|
|
24276
|
-
"data-state": getState(open),
|
|
24277
|
-
id: context.contentId,
|
|
24278
|
-
ref: forwardedRef,
|
|
24279
|
-
...contentProps,
|
|
24280
|
-
children: contents
|
|
24281
|
-
}, context.contentId)
|
|
24282
24329
|
});
|
|
24283
|
-
}),
|
|
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) {
|
|
24284
24345
|
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover);
|
|
24285
24346
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, {
|
|
24286
24347
|
...rest,
|
|
@@ -24301,13 +24362,7 @@ var require_Popover_native = __commonJS({
|
|
|
24301
24362
|
});
|
|
24302
24363
|
}), PopoverScrollView = /* @__PURE__ */ React4.forwardRef(function(props, ref) {
|
|
24303
24364
|
var context = usePopoverContext(POPOVER_SCOPE);
|
|
24304
|
-
return
|
|
24305
|
-
ref,
|
|
24306
|
-
// when adapted, no pointer events!
|
|
24307
|
-
pointerEvents: context.breakpointActive ? "none" : void 0,
|
|
24308
|
-
scrollEnabled: !context.breakpointActive,
|
|
24309
|
-
...props
|
|
24310
|
-
});
|
|
24365
|
+
return props.children;
|
|
24311
24366
|
}), Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
|
|
24312
24367
|
var id = React4.useId();
|
|
24313
24368
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
|
|
@@ -24330,7 +24385,11 @@ var require_Popover_native = __commonJS({
|
|
|
24330
24385
|
Sheet: import_sheet.Sheet.Controlled,
|
|
24331
24386
|
FocusScope: import_focus_scope.FocusScopeController
|
|
24332
24387
|
}), PopoverInner = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24333
|
-
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), [
|
|
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)({
|
|
24334
24393
|
prop: openProp,
|
|
24335
24394
|
defaultProp: defaultOpen || !1,
|
|
24336
24395
|
onChange: function(val) {
|
|
@@ -24381,18 +24440,25 @@ var require_Popover_native = __commonJS({
|
|
|
24381
24440
|
return setHasCustomAnchor(!1);
|
|
24382
24441
|
}, []),
|
|
24383
24442
|
keepChildrenMounted
|
|
24384
|
-
},
|
|
24385
|
-
|
|
24386
|
-
stayInFrame: !0,
|
|
24387
|
-
...restProps,
|
|
24388
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
|
|
24443
|
+
}, memoizedChildren = React4.useMemo(function() {
|
|
24444
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
|
|
24389
24445
|
scope: __scopePopover,
|
|
24390
24446
|
...popoverContext,
|
|
24391
24447
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverSheetController, {
|
|
24392
24448
|
onOpenChange: setOpen,
|
|
24393
24449
|
children
|
|
24394
24450
|
})
|
|
24395
|
-
})
|
|
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
|
|
24396
24462
|
});
|
|
24397
24463
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
24398
24464
|
children: import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_floating.FloatingOverrideContext.Provider, {
|
|
@@ -24414,7 +24480,7 @@ var require_Popover_native = __commonJS({
|
|
|
24414
24480
|
}
|
|
24415
24481
|
},
|
|
24416
24482
|
open: context.open,
|
|
24417
|
-
hidden: breakpointActive
|
|
24483
|
+
hidden: !breakpointActive,
|
|
24418
24484
|
children: props.children
|
|
24419
24485
|
});
|
|
24420
24486
|
}, useShowPopoverSheet = function(context) {
|
|
@@ -26775,7 +26841,7 @@ var require_Select_native = __commonJS({
|
|
|
26775
26841
|
getShowSheet() && props.onOpenChange(val);
|
|
26776
26842
|
},
|
|
26777
26843
|
open: context.open,
|
|
26778
|
-
hidden: isAdapted
|
|
26844
|
+
hidden: !isAdapted,
|
|
26779
26845
|
children: props.children
|
|
26780
26846
|
});
|
|
26781
26847
|
}, SelectSheetImpl = function(props) {
|