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.
- package/dist/native.js +259 -199
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +257 -195
- 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/native.js
CHANGED
|
@@ -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, {
|
|
@@ -6790,6 +6793,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6790
6793
|
};
|
|
6791
6794
|
conf = conf || (0, import_config.getConfig)();
|
|
6792
6795
|
var animationDriver = (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
|
|
6796
|
+
if (props.passThrough) return null;
|
|
6793
6797
|
import_constants4.isWeb && styleProps.isAnimated && animationDriver.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
6794
6798
|
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);
|
|
6795
6799
|
process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-setup`;
|
|
@@ -7097,20 +7101,29 @@ var require_mergeProps_native = __commonJS({
|
|
|
7097
7101
|
var out = {};
|
|
7098
7102
|
for (var key in a) mergeProp(out, a, b, key, inverseShorthands);
|
|
7099
7103
|
if (b) for (var key1 in b) mergeProp(out, b, void 0, key1, inverseShorthands);
|
|
7104
|
+
if (b && Object.keys(b).length > 0) {
|
|
7105
|
+
var hasPropsNeedingReorder = Object.keys(b).some(function(key4) {
|
|
7106
|
+
return (key4 in import_pseudoDescriptors.pseudoDescriptors || key4 === "variant") && key4 in a && key4 in out;
|
|
7107
|
+
});
|
|
7108
|
+
if (hasPropsNeedingReorder) {
|
|
7109
|
+
var reordered = {};
|
|
7110
|
+
for (var key2 in b) (key2 in import_pseudoDescriptors.pseudoDescriptors || key2 === "variant") && key2 in out && (reordered[key2] = out[key2]);
|
|
7111
|
+
for (var key3 in out) key3 in reordered || (reordered[key3] = out[key3]);
|
|
7112
|
+
return reordered;
|
|
7113
|
+
}
|
|
7114
|
+
}
|
|
7100
7115
|
return out;
|
|
7101
7116
|
};
|
|
7102
7117
|
function mergeProp(out, a, b, key, inverseShorthands) {
|
|
7103
7118
|
var longhand = (inverseShorthands == null ? void 0 : inverseShorthands[key]) || null, val = a[key];
|
|
7104
|
-
if (
|
|
7105
|
-
|
|
7106
|
-
out[key]
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
return;
|
|
7111
|
-
}
|
|
7112
|
-
out[longhand || key] = val;
|
|
7119
|
+
if (key in import_pseudoDescriptors.pseudoDescriptors || import_useMedia.mediaKeys.has(key)) {
|
|
7120
|
+
out[key] = {
|
|
7121
|
+
...out[key],
|
|
7122
|
+
...val
|
|
7123
|
+
};
|
|
7124
|
+
return;
|
|
7113
7125
|
}
|
|
7126
|
+
b && (key in b || longhand && longhand in b) || (out[longhand || key] = val);
|
|
7114
7127
|
}
|
|
7115
7128
|
}
|
|
7116
7129
|
});
|
|
@@ -7351,7 +7364,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
7351
7364
|
id,
|
|
7352
7365
|
parentId
|
|
7353
7366
|
]), propsKey = getPropsKey(props), getSnapshot = function() {
|
|
7354
|
-
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));
|
|
7367
|
+
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));
|
|
7355
7368
|
return PendingUpdate.delete(id), (!local || rerender) && (local = {
|
|
7356
7369
|
...next
|
|
7357
7370
|
}, localStates.set(id, local)), process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile" && (console.groupCollapsed(` ${id} getSnapshot ${rerender}`, local.name, ">", next.name), console.info({
|
|
@@ -7386,6 +7399,10 @@ var require_useThemeState_native = __commonJS({
|
|
|
7386
7399
|
]), state;
|
|
7387
7400
|
}, getNextState = function(lastState, props, propsKey) {
|
|
7388
7401
|
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);
|
|
7402
|
+
if (props.passThrough) return [
|
|
7403
|
+
!1,
|
|
7404
|
+
lastState ?? parentState
|
|
7405
|
+
];
|
|
7389
7406
|
themes || (themes = (0, import_config.getConfig)().themes);
|
|
7390
7407
|
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)));
|
|
7391
7408
|
if (process.env.NODE_ENV === "development" && debug && debug !== "profile") {
|
|
@@ -7857,8 +7874,8 @@ var require_Theme_native = __commonJS({
|
|
|
7857
7874
|
style: {}
|
|
7858
7875
|
}, Theme2 = /* @__PURE__ */ (0, import_react3.forwardRef)(function(props, ref) {
|
|
7859
7876
|
if (props.disable) return props.children;
|
|
7860
|
-
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) {
|
|
7861
|
-
return /* @__PURE__ */ (0, import_react3.cloneElement)(child, {
|
|
7877
|
+
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) {
|
|
7878
|
+
return passThrough ? child : /* @__PURE__ */ (0, import_react3.cloneElement)(child, {
|
|
7862
7879
|
"data-disable-theme": !0
|
|
7863
7880
|
});
|
|
7864
7881
|
}) : props.children;
|
|
@@ -7871,11 +7888,11 @@ var require_Theme_native = __commonJS({
|
|
|
7871
7888
|
var stateRef = (0, import_react3.useRef)({
|
|
7872
7889
|
hasEverThemed: !1
|
|
7873
7890
|
});
|
|
7874
|
-
return getThemedChildren(themeState, finalChildren, props, isRoot, stateRef);
|
|
7891
|
+
return getThemedChildren(themeState, finalChildren, props, isRoot, stateRef, passThrough);
|
|
7875
7892
|
});
|
|
7876
7893
|
Theme2.avoidForwardRef = !0;
|
|
7877
7894
|
function getThemedChildren(themeState, children, props) {
|
|
7878
|
-
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);
|
|
7895
|
+
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);
|
|
7879
7896
|
if (process.env.NODE_ENV === "development" && props.debug === "visualize" && (children = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ThemeDebug.ThemeDebug, {
|
|
7880
7897
|
themeState,
|
|
7881
7898
|
themeProps: props,
|
|
@@ -7892,7 +7909,7 @@ var require_Theme_native = __commonJS({
|
|
|
7892
7909
|
var parentState = (0, import_useThemeState.getThemeState)(themeState.isNew ? themeState.id : themeState.parentId);
|
|
7893
7910
|
if (!parentState) throw new Error("\u203C\uFE0F010");
|
|
7894
7911
|
children = import_react3.Children.toArray(children).map(function(child) {
|
|
7895
|
-
return /* @__PURE__ */ (0, import_react3.isValidElement)(child) ? /* @__PURE__ */ (0, import_react3.cloneElement)(child, void 0, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Theme2, {
|
|
7912
|
+
return /* @__PURE__ */ (0, import_react3.isValidElement)(child) ? passThrough ? child : /* @__PURE__ */ (0, import_react3.cloneElement)(child, void 0, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Theme2, {
|
|
7896
7913
|
name: parentState.name,
|
|
7897
7914
|
children: child.props.children
|
|
7898
7915
|
})) : child;
|
|
@@ -7909,10 +7926,10 @@ var require_Theme_native = __commonJS({
|
|
|
7909
7926
|
var { className, style } = getThemeClassNameAndStyle(themeState, props, isRoot);
|
|
7910
7927
|
if (children = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
|
|
7911
7928
|
className: `${className} _dsp_contents is_Theme`,
|
|
7912
|
-
style,
|
|
7929
|
+
style: passThrough ? void 0 : style,
|
|
7913
7930
|
children
|
|
7914
7931
|
}), state.hasEverThemed === "wrapped") {
|
|
7915
|
-
var className1 = requiresExtraWrapper ? `${isInverse ? name.startsWith("light") ? "t_light is_inversed" : name.startsWith("dark") ? "t_dark is_inversed" : "" : ""} _dsp_contents` : "_dsp_contents";
|
|
7932
|
+
var className1 = !passThrough && requiresExtraWrapper ? `${isInverse ? name.startsWith("light") ? "t_light is_inversed" : name.startsWith("dark") ? "t_dark is_inversed" : "" : ""} _dsp_contents` : "_dsp_contents";
|
|
7916
7933
|
children = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
|
|
7917
7934
|
className: className1,
|
|
7918
7935
|
children
|
|
@@ -8337,7 +8354,7 @@ var require_useComponentState_native = __commonJS({
|
|
|
8337
8354
|
}
|
|
8338
8355
|
var isDisabled = function(props) {
|
|
8339
8356
|
var _props_accessibilityState;
|
|
8340
|
-
return props.disabled || ((_props_accessibilityState = props.accessibilityState) === null || _props_accessibilityState === void 0 ? void 0 : _props_accessibilityState.disabled) || props["aria-disabled"] || props.accessibilityDisabled || !1;
|
|
8357
|
+
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;
|
|
8341
8358
|
};
|
|
8342
8359
|
}
|
|
8343
8360
|
});
|
|
@@ -8657,7 +8674,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8657
8674
|
});
|
|
8658
8675
|
var allGroupContexts = (0, import_react3.useMemo)(function() {
|
|
8659
8676
|
var _stateRef_current_group;
|
|
8660
|
-
if (!groupName) return groupContextParent;
|
|
8677
|
+
if (!groupName || props.passThrough) return groupContextParent;
|
|
8661
8678
|
(_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.listeners.clear();
|
|
8662
8679
|
var listeners = /* @__PURE__ */ new Set();
|
|
8663
8680
|
return stateRef.current.group = {
|
|
@@ -8760,7 +8777,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8760
8777
|
}, themeName = (themeState == null ? void 0 : themeState.name) || "";
|
|
8761
8778
|
process.env.NODE_ENV === "development" && time2 && time2`split-styles-prepare`;
|
|
8762
8779
|
var 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;
|
|
8763
|
-
if (groupContext) {
|
|
8780
|
+
if (splitStyles && groupContext) {
|
|
8764
8781
|
var groupState = groupContext == null ? void 0 : groupContext.state;
|
|
8765
8782
|
if (groupState && groupState.layout === void 0) {
|
|
8766
8783
|
var _splitStyles_style, _splitStyles_style1;
|
|
@@ -8770,8 +8787,8 @@ var require_createComponent_native = __commonJS({
|
|
|
8770
8787
|
});
|
|
8771
8788
|
}
|
|
8772
8789
|
}
|
|
8773
|
-
if ((hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
|
|
8774
|
-
var
|
|
8790
|
+
if (splitStyles && (!hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
|
|
8791
|
+
var useStyleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
|
|
8775
8792
|
stateRef.current.setStateShallow = function(nextOrGetNext) {
|
|
8776
8793
|
var prev = NextState.get(stateRef) || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
|
|
8777
8794
|
if (!(next === prev || (0, import_is_equal_shallow.isEqualShallow)(prev, next))) {
|
|
@@ -8788,9 +8805,9 @@ var require_createComponent_native = __commonJS({
|
|
|
8788
8805
|
props
|
|
8789
8806
|
}), console.info(stateRef.current.host), console.groupEnd());
|
|
8790
8807
|
var { group, hasDynGroupChildren, unmounted, animation, ...childrenGroupState } = updatedState;
|
|
8791
|
-
if (groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState), !hasAnimationProp || !
|
|
8808
|
+
if (groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState), !hasAnimationProp || !useStyleListener) return;
|
|
8792
8809
|
var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp);
|
|
8793
|
-
|
|
8810
|
+
useStyleListener((nextStyles == null ? void 0 : nextStyles.style) || {});
|
|
8794
8811
|
} else process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile" && console.info("[\u{1F40C}] re-render", {
|
|
8795
8812
|
canAvoidReRender,
|
|
8796
8813
|
next
|
|
@@ -8801,14 +8818,16 @@ var require_createComponent_native = __commonJS({
|
|
|
8801
8818
|
(_stateRef_current_setStateShallow = (_stateRef_current = stateRef.current).setStateShallow) === null || _stateRef_current_setStateShallow === void 0 || _stateRef_current_setStateShallow.call(_stateRef_current, state2);
|
|
8802
8819
|
};
|
|
8803
8820
|
}
|
|
8804
|
-
if (process.env.NODE_ENV === "development" && time2 && time2`split-styles`,
|
|
8805
|
-
|
|
8806
|
-
|
|
8821
|
+
if (process.env.NODE_ENV === "development" && time2 && time2`split-styles`, splitStyles) {
|
|
8822
|
+
if (props.group && props.untilMeasured === "hide" && !stateRef.current.hasMeasured) {
|
|
8823
|
+
var _splitStyles;
|
|
8824
|
+
(_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
|
|
8825
|
+
}
|
|
8826
|
+
splitStyles.dynamicThemeAccess != null && (stateRef.current.isListeningToTheme = splitStyles.dynamicThemeAccess);
|
|
8807
8827
|
}
|
|
8808
|
-
splitStyles
|
|
8809
|
-
var hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClass && splitStyles.hasMedia === !0, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
|
|
8828
|
+
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;
|
|
8810
8829
|
process.env.NODE_ENV === "development" && debugProp === "verbose" && console.info("useMedia() createComponent", shouldListenForMedia, mediaListeningKeys), (0, import_useMedia.setMediaShouldUpdate)(componentContext, shouldListenForMedia, mediaListeningKeys);
|
|
8811
|
-
var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, space } = splitStyles, propsWithAnimation = props, {
|
|
8830
|
+
var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, space, pseudoGroups, mediaGroups } = splitStyles || {}, propsWithAnimation = props, {
|
|
8812
8831
|
asChild,
|
|
8813
8832
|
children,
|
|
8814
8833
|
themeShallow,
|
|
@@ -8832,7 +8851,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8832
8851
|
onClick,
|
|
8833
8852
|
theme: _themeProp,
|
|
8834
8853
|
...nonTamaguiProps
|
|
8835
|
-
} = viewPropsIn, viewProps = nonTamaguiProps;
|
|
8854
|
+
} = viewPropsIn || {}, viewProps = nonTamaguiProps;
|
|
8836
8855
|
!isTaggable && props.forceStyle && (viewProps.forceStyle = props.forceStyle), isHOC && _themeProp && (viewProps.theme = _themeProp), tagProp && elementType.acceptTagProp && (viewProps.tag = tagProp);
|
|
8837
8856
|
var animationStyles, shouldUseAnimation = (
|
|
8838
8857
|
// if it supports css vars we run it on server too to get matching initial style
|
|
@@ -8860,7 +8879,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8860
8879
|
}
|
|
8861
8880
|
process.env.NODE_ENV === "development" && props.untilMeasured && !props.group && console.warn(`You set the untilMeasured prop without setting group. This doesn't work, be sure to set untilMeasured on the parent that sets group, not the children that use the $group- prop.
|
|
8862
8881
|
|
|
8863
|
-
If you meant to do this, you can disable this warning - either change untilMeasured and group at the same time, or do group={conditional ? 'name' : undefined}`), process.env.NODE_ENV === "development" && time2 && time2`destructure`, groupContext && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
|
|
8882
|
+
If you meant to do this, you can disable this warning - either change untilMeasured and group at the same time, or do group={conditional ? 'name' : undefined}`), process.env.NODE_ENV === "development" && time2 && time2`destructure`, splitStyles && groupContext && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
|
|
8864
8883
|
var _stateRef_current_group, layout = e.nativeEvent.layout;
|
|
8865
8884
|
groupContext.state.layout = layout, (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.emit({
|
|
8866
8885
|
layout
|
|
@@ -8875,7 +8894,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8875
8894
|
typeof item == "string" && item !== `
|
|
8876
8895
|
` && console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <${staticConfig.componentName || propsIn.tag || "View"}>.`, props);
|
|
8877
8896
|
}), process.env.NODE_ENV === "development" && time2 && time2`events-hooks`;
|
|
8878
|
-
var
|
|
8897
|
+
var unPress = function() {
|
|
8879
8898
|
setStateShallow({
|
|
8880
8899
|
press: !1,
|
|
8881
8900
|
pressIn: !1
|
|
@@ -8889,7 +8908,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8889
8908
|
styleObject[prop] = style.getPropertyValue(prop);
|
|
8890
8909
|
}
|
|
8891
8910
|
return styleObject;
|
|
8892
|
-
}, cssStyleDeclarationToObject = cssStyleDeclarationToObject2, computed = cssStyleDeclarationToObject2(getComputedStyle(stateRef.current.host));
|
|
8911
|
+
}, cssStyleDeclarationToObject = cssStyleDeclarationToObject2, computed = stateRef.current.host ? cssStyleDeclarationToObject2(getComputedStyle(stateRef.current.host)) : {};
|
|
8893
8912
|
console.groupCollapsed(`Rendered > (opacity: ${computed.opacity})`), console.warn(stateRef.current.host), console.warn(computed), console.groupEnd();
|
|
8894
8913
|
}
|
|
8895
8914
|
}), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
@@ -9021,7 +9040,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9021
9040
|
}), (_hooks_useEvents = import_setupHooks.hooks.useEvents) === null || _hooks_useEvents === void 0 || _hooks_useEvents.call(import_setupHooks.hooks, viewProps, events, splitStyles, setStateShallow, staticConfig);
|
|
9022
9041
|
var direction = props.spaceDirection || "both";
|
|
9023
9042
|
process.env.NODE_ENV === "development" && time2 && time2`hooks`;
|
|
9024
|
-
var content = !children || asChild ? children : spacedChildren2({
|
|
9043
|
+
var content = !children || asChild || !splitStyles ? children : spacedChildren2({
|
|
9025
9044
|
separator,
|
|
9026
9045
|
children,
|
|
9027
9046
|
space,
|
|
@@ -9036,8 +9055,15 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9036
9055
|
});
|
|
9037
9056
|
process.env.NODE_ENV === "development" && time2 && time2`spaced-as-child`;
|
|
9038
9057
|
var useChildrenResult;
|
|
9039
|
-
import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps)), process.env.NODE_ENV === "development" && time2 && time2`use-children`,
|
|
9040
|
-
|
|
9058
|
+
import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps)), process.env.NODE_ENV === "development" && time2 && time2`use-children`, splitStyles || (elementType = "span", content = propsIn.children, viewProps = {
|
|
9059
|
+
style: {
|
|
9060
|
+
display: "contents"
|
|
9061
|
+
}
|
|
9062
|
+
}), useChildrenResult ? content = useChildrenResult : content = /* @__PURE__ */ import_react3.default.createElement(elementType, viewProps, content);
|
|
9063
|
+
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
|
|
9064
|
+
(!asChild && // not when passThrough
|
|
9065
|
+
splitStyles && // not when HOC
|
|
9066
|
+
!isHOC && ResetPresence2 && willBeAnimated && (hasEnterStyle || presenceState)), hasEverReset = stateRef.current.hasEverResetPresence;
|
|
9041
9067
|
needsReset && !hasEverReset && (stateRef.current.hasEverResetPresence = !0);
|
|
9042
9068
|
var renderReset = needsReset || hasEverReset;
|
|
9043
9069
|
if (renderReset && ResetPresence2 && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ResetPresence2, {
|
|
@@ -9050,7 +9076,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9050
9076
|
})), "group" in props && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_GroupContext.GroupContext.Provider, {
|
|
9051
9077
|
value: allGroupContexts,
|
|
9052
9078
|
children: content
|
|
9053
|
-
})), process.env.NODE_ENV === "development" && time2 && time2`group-context`, content = disableTheme ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, !1, stateRef), process.env.NODE_ENV === "development" && time2 && time2`themed-children`, staticConfig.context) {
|
|
9079
|
+
})), process.env.NODE_ENV === "development" && time2 && time2`group-context`, content = disableTheme || !splitStyles ? content : (0, import_Theme.getThemedChildren)(themeState, content, themeStateProps, !1, stateRef), process.env.NODE_ENV === "development" && time2 && time2`themed-children`, staticConfig.context) {
|
|
9054
9080
|
var contextProps = staticConfig.context.props;
|
|
9055
9081
|
for (var key1 in contextProps) if (viewProps.style && key1 in viewProps.style || key1 in viewProps) {
|
|
9056
9082
|
var _viewProps_style;
|
|
@@ -9141,7 +9167,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9141
9167
|
}
|
|
9142
9168
|
function styleable(Component2, options) {
|
|
9143
9169
|
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);
|
|
9144
|
-
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;
|
|
9170
|
+
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;
|
|
9145
9171
|
}
|
|
9146
9172
|
return res.extractable = extractable, res.styleable = styleable, res;
|
|
9147
9173
|
}
|
|
@@ -11100,7 +11126,7 @@ var require_useProps_native = __commonJS({
|
|
|
11100
11126
|
noClass: !0,
|
|
11101
11127
|
resolveValues: "auto",
|
|
11102
11128
|
...opts
|
|
11103
|
-
}, null, componentContext, groupContext), { mediaGroups, pseudoGroups } = splitStyles;
|
|
11129
|
+
}, null, componentContext, groupContext), { mediaGroups, pseudoGroups } = splitStyles || {};
|
|
11104
11130
|
return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
11105
11131
|
if (!disabled) {
|
|
11106
11132
|
if (state.unmounted) {
|
|
@@ -11126,8 +11152,8 @@ var require_useProps_native = __commonJS({
|
|
|
11126
11152
|
...mediaGroups
|
|
11127
11153
|
]).join("") : 0
|
|
11128
11154
|
]), [
|
|
11129
|
-
splitStyles.viewProps,
|
|
11130
|
-
splitStyles.style || {},
|
|
11155
|
+
(splitStyles == null ? void 0 : splitStyles.viewProps) || {},
|
|
11156
|
+
(splitStyles == null ? void 0 : splitStyles.style) || {},
|
|
11131
11157
|
theme,
|
|
11132
11158
|
import_useMedia.mediaState
|
|
11133
11159
|
];
|
|
@@ -13418,7 +13444,7 @@ var require_index_native19 = __commonJS({
|
|
|
13418
13444
|
getBoundingClientRectAsync(node),
|
|
13419
13445
|
getBoundingClientRectAsync(parentNode)
|
|
13420
13446
|
]);
|
|
13421
|
-
if (frameId !== lastFrameAt) return;
|
|
13447
|
+
if (nr === !1 || pr === !1 || frameId !== lastFrameAt) return;
|
|
13422
13448
|
nodeRect = nr, parentRect = pr;
|
|
13423
13449
|
} else nodeRect = node.getBoundingClientRect(), parentRect = parentNode.getBoundingClientRect();
|
|
13424
13450
|
var cachedRect = NodeRectCache.get(node), cachedParentRect = NodeRectCache.get(parentNode);
|
|
@@ -13521,7 +13547,7 @@ var require_index_native19 = __commonJS({
|
|
|
13521
13547
|
return new Promise(function(res) {
|
|
13522
13548
|
if (!(!node || node.nodeType !== 1)) {
|
|
13523
13549
|
var io = new IntersectionObserver(function(entries) {
|
|
13524
|
-
return io.disconnect(), res(entries[0].boundingClientRect);
|
|
13550
|
+
return entries[0].isIntersecting ? (io.disconnect(), res(entries[0].boundingClientRect)) : res(!1);
|
|
13525
13551
|
}, {
|
|
13526
13552
|
threshold: 0
|
|
13527
13553
|
});
|
|
@@ -14130,8 +14156,7 @@ var require_index_native20 = __commonJS({
|
|
|
14130
14156
|
if (isDOM && plainDOMProps.href && hrefAttrs) var download, rel, target;
|
|
14131
14157
|
}
|
|
14132
14158
|
},
|
|
14133
|
-
useEvents(viewProps, events,
|
|
14134
|
-
var { pseudos } = param;
|
|
14159
|
+
useEvents(viewProps, events, splitStyles, setStateShallow, staticConfig) {
|
|
14135
14160
|
if (events && (events.onFocus && (viewProps.onFocus = events.onFocus), events.onBlur && (viewProps.onBlur = events.onBlur)), staticConfig.isInput) {
|
|
14136
14161
|
if (events) {
|
|
14137
14162
|
var { onPressIn, onPressOut, onPress } = events, inputEvents = {
|
|
@@ -16652,7 +16677,7 @@ var require_GorhomPortalItem_native = __commonJS({
|
|
|
16652
16677
|
});
|
|
16653
16678
|
module2.exports = __toCommonJS2(GorhomPortalItem_native_exports);
|
|
16654
16679
|
var import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_react3 = require("react"), import_GorhomPortal = require_GorhomPortal_native(), GorhomPortalItem = function(props) {
|
|
16655
|
-
var { name: _providedName, hostName, handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children,
|
|
16680
|
+
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() {
|
|
16656
16681
|
_providedHandleOnMount ? _providedHandleOnMount(function() {
|
|
16657
16682
|
return addUpdatePortal(name, children);
|
|
16658
16683
|
}) : addUpdatePortal(name, children);
|
|
@@ -16666,14 +16691,14 @@ var require_GorhomPortalItem_native = __commonJS({
|
|
|
16666
16691
|
}) : addUpdatePortal(name, children);
|
|
16667
16692
|
});
|
|
16668
16693
|
return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
16669
|
-
if (!
|
|
16694
|
+
if (!passThrough) return handleOnMount(), function() {
|
|
16670
16695
|
handleOnUnmount();
|
|
16671
16696
|
};
|
|
16672
16697
|
}, []), (0, import_react3.useEffect)(function() {
|
|
16673
|
-
|
|
16698
|
+
passThrough || handleOnUpdate();
|
|
16674
16699
|
}, [
|
|
16675
16700
|
children
|
|
16676
|
-
]),
|
|
16701
|
+
]), passThrough ? children : null;
|
|
16677
16702
|
};
|
|
16678
16703
|
}
|
|
16679
16704
|
});
|
|
@@ -17081,9 +17106,9 @@ var require_Adapt_native = __commonJS({
|
|
|
17081
17106
|
}, {
|
|
17082
17107
|
Contents: AdaptContents
|
|
17083
17108
|
}), AdaptPortalContents = function(props) {
|
|
17084
|
-
var { portalName } = useAdaptContext(props.scope);
|
|
17109
|
+
var isActive = useAdaptIsActive(props.scope), { portalName } = useAdaptContext(props.scope);
|
|
17085
17110
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
|
|
17086
|
-
|
|
17111
|
+
passThrough: !isActive,
|
|
17087
17112
|
hostName: portalName,
|
|
17088
17113
|
children: props.children
|
|
17089
17114
|
});
|
|
@@ -18050,12 +18075,11 @@ var require_useSheetOpenState_native = __commonJS({
|
|
|
18050
18075
|
var { isHidden, controller } = (0, import_useSheetController.useSheetController)(), onOpenChangeInternal = function(val) {
|
|
18051
18076
|
var _controller_onOpenChange, _props_onOpenChange;
|
|
18052
18077
|
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);
|
|
18053
|
-
}, _controller_open, _props_defaultOpen, [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
18054
|
-
prop:
|
|
18078
|
+
}, _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)({
|
|
18079
|
+
prop: propVal,
|
|
18055
18080
|
defaultProp: (_props_defaultOpen = props.defaultOpen) !== null && _props_defaultOpen !== void 0 ? _props_defaultOpen : !1,
|
|
18056
18081
|
onChange: onOpenChangeInternal,
|
|
18057
|
-
strategy: "
|
|
18058
|
-
transition: !0
|
|
18082
|
+
strategy: "prop-wins"
|
|
18059
18083
|
});
|
|
18060
18084
|
return {
|
|
18061
18085
|
open,
|
|
@@ -18142,8 +18166,7 @@ var require_useSheetProviderProps_native = __commonJS({
|
|
|
18142
18166
|
prop: props.position,
|
|
18143
18167
|
defaultProp: props.defaultPosition || (state.open ? 0 : -1),
|
|
18144
18168
|
onChange: props.onPositionChange,
|
|
18145
|
-
strategy: "
|
|
18146
|
-
transition: !0
|
|
18169
|
+
strategy: "prop-wins"
|
|
18147
18170
|
}), position = state.open === !1 ? -1 : position_, { open } = state, setPosition = import_react3.default.useCallback(function(next) {
|
|
18148
18171
|
props.dismissOnSnapToBottom && next === snapPoints.length - 1 ? state.setOpen(!1) : setPositionImmediate(next);
|
|
18149
18172
|
}, [
|
|
@@ -18564,27 +18587,26 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18564
18587
|
...animationConfig
|
|
18565
18588
|
}));
|
|
18566
18589
|
}
|
|
18567
|
-
})
|
|
18590
|
+
}), isAbleToPosition = /* @__PURE__ */ function() {
|
|
18591
|
+
return !(disableAnimation || !frameSize || !screenSize || isHidden || hasntMeasured && !open);
|
|
18592
|
+
}();
|
|
18568
18593
|
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
18569
|
-
|
|
18570
|
-
|
|
18571
|
-
|
|
18572
|
-
|
|
18573
|
-
|
|
18574
|
-
|
|
18575
|
-
|
|
18576
|
-
|
|
18577
|
-
});
|
|
18578
|
-
return;
|
|
18579
|
-
}
|
|
18580
|
-
disableAnimation || !frameSize || !screenSize || isHidden || hasntMeasured && !open || animateTo(position);
|
|
18594
|
+
hasntMeasured && screenSize && frameSize && (at.current = screenSize, animatedNumber.setValue(screenSize, {
|
|
18595
|
+
type: "timing",
|
|
18596
|
+
duration: 0
|
|
18597
|
+
}, function() {
|
|
18598
|
+
setTimeout(function() {
|
|
18599
|
+
setDisableAnimation(!1);
|
|
18600
|
+
}, 10);
|
|
18601
|
+
}));
|
|
18581
18602
|
}, [
|
|
18582
18603
|
hasntMeasured,
|
|
18583
|
-
disableAnimation,
|
|
18584
|
-
isHidden,
|
|
18585
|
-
frameSize,
|
|
18586
18604
|
screenSize,
|
|
18587
|
-
|
|
18605
|
+
frameSize
|
|
18606
|
+
]), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
18607
|
+
isAbleToPosition && animateTo(position);
|
|
18608
|
+
}, [
|
|
18609
|
+
isAbleToPosition,
|
|
18588
18610
|
position
|
|
18589
18611
|
]);
|
|
18590
18612
|
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) {
|
|
@@ -18599,12 +18621,14 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18599
18621
|
}
|
|
18600
18622
|
var release = function(param) {
|
|
18601
18623
|
var { vy, dragAt } = param;
|
|
18602
|
-
|
|
18603
|
-
|
|
18604
|
-
var
|
|
18605
|
-
|
|
18624
|
+
if (!scrollBridge.scrollLock) {
|
|
18625
|
+
isExternalDrag = !1, previouslyScrolling = !1, setPanning(!1);
|
|
18626
|
+
for (var at2 = dragAt + startY, end = at2 + frameSize * vy * 0.2, closestPoint = 0, dist = Number.POSITIVE_INFINITY, i = 0; i < positions.length; i++) {
|
|
18627
|
+
var position2 = positions[i], curDist = end > position2 ? end - position2 : position2 - end;
|
|
18628
|
+
curDist < dist && (dist = curDist, closestPoint = i);
|
|
18629
|
+
}
|
|
18630
|
+
setPosition(closestPoint), animateTo(closestPoint), setScrollEnabled(closestPoint === 0);
|
|
18606
18631
|
}
|
|
18607
|
-
setPosition(closestPoint), animateTo(closestPoint), setScrollEnabled(closestPoint === 0 && dragAt <= 0);
|
|
18608
18632
|
}, finish = function(_e, state2) {
|
|
18609
18633
|
release({
|
|
18610
18634
|
vy: state2.vy,
|
|
@@ -18612,10 +18636,13 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18612
18636
|
});
|
|
18613
18637
|
}, previouslyScrolling = !1, onMoveShouldSet = function(e, param) {
|
|
18614
18638
|
var { dy } = param;
|
|
18615
|
-
|
|
18616
|
-
|
|
18617
|
-
|
|
18618
|
-
|
|
18639
|
+
function getShouldSet() {
|
|
18640
|
+
if (e.target === providerProps.handleRef.current || !scrollEnabled.current) return !0;
|
|
18641
|
+
if (scrollBridge.scrollLock) return !1;
|
|
18642
|
+
var isScrolled = scrollBridge.y !== 0, isDraggingUp = dy < 0, isNearTop = scrollBridge.paneY - 5 <= scrollBridge.paneMinY;
|
|
18643
|
+
return isScrolled ? (previouslyScrolling = !0, !1) : isNearTop && hasScrollView.current && isDraggingUp ? !1 : Math.abs(dy) > 10;
|
|
18644
|
+
}
|
|
18645
|
+
return getShouldSet();
|
|
18619
18646
|
}, grant = function() {
|
|
18620
18647
|
setScrollEnabled(!1), setPanning(!0), stopSpring(), startY = at.current;
|
|
18621
18648
|
}, isExternalDrag = !1;
|
|
@@ -18984,7 +19011,7 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
18984
19011
|
}, []);
|
|
18985
19012
|
var release = function() {
|
|
18986
19013
|
if (state.current.isDragging) {
|
|
18987
|
-
state.current.isDragging = !1, scrollBridge.scrollStartY = -1, state.current.isScrolling = !1, setScrollEnabled(!0);
|
|
19014
|
+
state.current.isDragging = !1, scrollBridge.scrollStartY = -1, scrollBridge.scrollLock = !1, state.current.isScrolling = !1, setScrollEnabled(!0);
|
|
18988
19015
|
var vy = 0;
|
|
18989
19016
|
if (state.current.dys.length) {
|
|
18990
19017
|
var recentDys = state.current.dys.slice(-10), dist = recentDys.length ? recentDys.reduce(function(a, b) {
|
|
@@ -19031,15 +19058,12 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
19031
19058
|
onResponderMove: function(e) {
|
|
19032
19059
|
if (import_core12.isWeb) {
|
|
19033
19060
|
var { pageY } = e.nativeEvent;
|
|
19034
|
-
if (state.current.isScrolling)
|
|
19035
|
-
e.stopPropagation();
|
|
19036
|
-
return;
|
|
19037
|
-
}
|
|
19061
|
+
if (state.current.isScrolling) return;
|
|
19038
19062
|
scrollBridge.scrollStartY === -1 && (scrollBridge.scrollStartY = pageY, state.current.lastPageY = pageY);
|
|
19039
19063
|
var dragAt = pageY - scrollBridge.scrollStartY, dy = pageY - state.current.lastPageY;
|
|
19040
19064
|
state.current.lastPageY = pageY;
|
|
19041
|
-
var isDraggingUp = dy < 0, isPaneAtTop = scrollBridge.paneY <= scrollBridge.paneMinY;
|
|
19042
|
-
if (
|
|
19065
|
+
var isDraggingUp = dy < 0, isPaneAtTop = scrollBridge.paneY <= scrollBridge.paneMinY, shouldScrollLock = (dy === 0 || isDraggingUp) && isPaneAtTop;
|
|
19066
|
+
if (shouldScrollLock) {
|
|
19043
19067
|
state.current.isScrolling = !0, scrollBridge.scrollLock = !0, setScrollEnabled(!0);
|
|
19044
19068
|
return;
|
|
19045
19069
|
}
|
|
@@ -19230,14 +19254,7 @@ var require_createSheet_native = __commonJS({
|
|
|
19230
19254
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, {
|
|
19231
19255
|
children: [
|
|
19232
19256
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_remove_scroll.RemoveScroll, {
|
|
19233
|
-
|
|
19234
|
-
enabled: removeScrollEnabled,
|
|
19235
|
-
allowPinchZoom: !0,
|
|
19236
|
-
shards: [
|
|
19237
|
-
contentRef
|
|
19238
|
-
],
|
|
19239
|
-
// causes lots of bugs on touch web on site
|
|
19240
|
-
removeScrollBar: !1,
|
|
19257
|
+
enabled: removeScrollEnabled && context.open,
|
|
19241
19258
|
children: sheetContents
|
|
19242
19259
|
}),
|
|
19243
19260
|
/* below frame hide when bouncing past 100% */
|
|
@@ -19570,18 +19587,20 @@ var require_SheetController_native = __commonJS({
|
|
|
19570
19587
|
});
|
|
19571
19588
|
module2.exports = __toCommonJS2(SheetController_exports);
|
|
19572
19589
|
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) {
|
|
19573
|
-
var { children, onOpenChange: onOpenChangeProp,
|
|
19590
|
+
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() {
|
|
19574
19591
|
return {
|
|
19575
|
-
|
|
19576
|
-
|
|
19577
|
-
|
|
19592
|
+
id,
|
|
19593
|
+
open,
|
|
19594
|
+
hidden,
|
|
19595
|
+
disableDrag,
|
|
19578
19596
|
onOpenChange
|
|
19579
19597
|
};
|
|
19580
19598
|
}, [
|
|
19599
|
+
id,
|
|
19581
19600
|
onOpenChange,
|
|
19582
|
-
|
|
19583
|
-
|
|
19584
|
-
|
|
19601
|
+
open,
|
|
19602
|
+
hidden,
|
|
19603
|
+
disableDrag
|
|
19585
19604
|
]);
|
|
19586
19605
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_useSheetController.SheetControllerContext.Provider, {
|
|
19587
19606
|
value: memoValue,
|
|
@@ -19881,14 +19900,7 @@ var require_Dialog_native = __commonJS({
|
|
|
19881
19900
|
})
|
|
19882
19901
|
});
|
|
19883
19902
|
return !import_constants4.isWeb || context.disableRemoveScroll ? contents : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_remove_scroll.RemoveScroll, {
|
|
19884
|
-
forwardProps: !0,
|
|
19885
19903
|
enabled: context.open,
|
|
19886
|
-
allowPinchZoom: context.allowPinchZoom,
|
|
19887
|
-
shards: [
|
|
19888
|
-
context.contentRef
|
|
19889
|
-
],
|
|
19890
|
-
// causes lots of bugs on touch web on site
|
|
19891
|
-
removeScrollBar: !1,
|
|
19892
19904
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
|
|
19893
19905
|
"data-remove-scroll-container": !0,
|
|
19894
19906
|
className: "_dsp_contents",
|
|
@@ -20057,9 +20069,7 @@ var require_Dialog_native = __commonJS({
|
|
|
20057
20069
|
}), TitleWarning = function(param) {
|
|
20058
20070
|
var { titleId } = param;
|
|
20059
20071
|
if (process.env.NODE_ENV === "development") {
|
|
20060
|
-
var titleWarningContext = useWarningContext(TITLE_WARNING_NAME), MESSAGE = `\`${titleWarningContext.contentName}\`
|
|
20061
|
-
|
|
20062
|
-
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.`;
|
|
20072
|
+
var titleWarningContext = useWarningContext(TITLE_WARNING_NAME), MESSAGE = `\`${titleWarningContext.contentName}\` wants a \`${titleWarningContext.titleName}\` to be accessible. If you want to hide the \`${titleWarningContext.titleName}\`, wrap it with <VisuallyHidden />.`;
|
|
20063
20073
|
React4.useEffect(function() {
|
|
20064
20074
|
if (import_constants4.isWeb && titleId) {
|
|
20065
20075
|
var hasTitle = document.getElementById(titleId);
|
|
@@ -20094,7 +20104,7 @@ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it wi
|
|
|
20094
20104
|
}
|
|
20095
20105
|
return null;
|
|
20096
20106
|
}, Dialog = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
|
|
20097
|
-
var { __scopeDialog, children, open: openProp, defaultOpen = !1, onOpenChange, modal = !0,
|
|
20107
|
+
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({
|
|
20098
20108
|
scopeKey,
|
|
20099
20109
|
contentId
|
|
20100
20110
|
}), triggerRef = React4.useRef(null), contentRef = React4.useRef(null), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
@@ -20119,7 +20129,6 @@ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it wi
|
|
|
20119
20129
|
onOpenChange: setOpen,
|
|
20120
20130
|
onOpenToggle,
|
|
20121
20131
|
modal,
|
|
20122
|
-
allowPinchZoom,
|
|
20123
20132
|
disableRemoveScroll,
|
|
20124
20133
|
adaptName
|
|
20125
20134
|
};
|
|
@@ -24026,9 +24035,9 @@ var require_Animate_native = __commonJS({
|
|
|
24026
24035
|
module2.exports = __toCommonJS2(Animate_exports);
|
|
24027
24036
|
var import_jsx_runtime6 = require("react/jsx-runtime"), import_animate_presence = require_index_native4(), import_react3 = require("react");
|
|
24028
24037
|
function Animate(param) {
|
|
24029
|
-
var { children, lazyMount, type, present, ...props } = param, [lazyMounted, setLazyMounted] = (0, import_react3.useState)(lazyMount ? !1 : present);
|
|
24038
|
+
var { children, lazyMount, type, present, passThrough, ...props } = param, [lazyMounted, setLazyMounted] = (0, import_react3.useState)(lazyMount ? !1 : present);
|
|
24030
24039
|
(0, import_react3.useEffect)(function() {
|
|
24031
|
-
lazyMount && present && (0, import_react3.startTransition)(function() {
|
|
24040
|
+
passThrough || lazyMount && present && (0, import_react3.startTransition)(function() {
|
|
24032
24041
|
setLazyMounted(present);
|
|
24033
24042
|
});
|
|
24034
24043
|
}, [
|
|
@@ -24037,20 +24046,23 @@ var require_Animate_native = __commonJS({
|
|
|
24037
24046
|
]);
|
|
24038
24047
|
var mounted = present ? lazyMount ? lazyMounted : present : !1;
|
|
24039
24048
|
return type === "presence" ? props.keepChildrenMounted ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.PresenceChild, {
|
|
24040
|
-
|
|
24041
|
-
|
|
24042
|
-
|
|
24043
|
-
|
|
24044
|
-
|
|
24045
|
-
|
|
24046
|
-
|
|
24047
|
-
|
|
24048
|
-
|
|
24049
|
-
|
|
24049
|
+
isPresent: !0,
|
|
24050
|
+
...!passThrough && {
|
|
24051
|
+
initial: props.initial ? void 0 : !1,
|
|
24052
|
+
onExitComplete: props.onExitComplete,
|
|
24053
|
+
enterVariant: props.enterVariant,
|
|
24054
|
+
exitVariant: props.exitVariant,
|
|
24055
|
+
enterExitVariant: props.enterExitVariant,
|
|
24056
|
+
// BUGFIX: this causes continous re-renders if keepChildrenMounted is true, see HeaderMenu
|
|
24057
|
+
// but since we always re-render this component on open changes this should be fine to leave off?
|
|
24058
|
+
presenceAffectsLayout: !1,
|
|
24059
|
+
isPresent: present,
|
|
24060
|
+
custom: props.custom
|
|
24061
|
+
},
|
|
24050
24062
|
children
|
|
24051
24063
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
|
|
24052
24064
|
...props,
|
|
24053
|
-
children: mounted ? children : null
|
|
24065
|
+
children: mounted || passThrough ? children : null
|
|
24054
24066
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
24055
24067
|
children
|
|
24056
24068
|
});
|
|
@@ -24370,6 +24382,12 @@ var require_Popper_native = __commonJS({
|
|
|
24370
24382
|
PopperContext: function() {
|
|
24371
24383
|
return PopperContext;
|
|
24372
24384
|
},
|
|
24385
|
+
PopperInfrequentContext: function() {
|
|
24386
|
+
return PopperInfrequentContext;
|
|
24387
|
+
},
|
|
24388
|
+
PopperPositionContext: function() {
|
|
24389
|
+
return PopperPositionContext;
|
|
24390
|
+
},
|
|
24373
24391
|
PopperProvider: function() {
|
|
24374
24392
|
return PopperProvider;
|
|
24375
24393
|
},
|
|
@@ -24378,10 +24396,15 @@ var require_Popper_native = __commonJS({
|
|
|
24378
24396
|
},
|
|
24379
24397
|
usePopperContext: function() {
|
|
24380
24398
|
return usePopperContext;
|
|
24399
|
+
},
|
|
24400
|
+
usePopperInfrequentContext: function() {
|
|
24401
|
+
return usePopperInfrequentContext;
|
|
24381
24402
|
}
|
|
24382
24403
|
});
|
|
24383
24404
|
module2.exports = __toCommonJS2(Popper_exports);
|
|
24384
|
-
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,
|
|
24405
|
+
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)({
|
|
24406
|
+
size: void 0
|
|
24407
|
+
}), usePopperInfrequentContext = PopperInfrequentContext.useStyledContext, checkFloating = {
|
|
24385
24408
|
name: "checkFloating",
|
|
24386
24409
|
fn(data) {
|
|
24387
24410
|
return {
|
|
@@ -24395,12 +24418,15 @@ var require_Popper_native = __commonJS({
|
|
|
24395
24418
|
Object.assign(setupOptions, options);
|
|
24396
24419
|
}
|
|
24397
24420
|
function Popper(props) {
|
|
24398
|
-
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)({
|
|
24421
|
+
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)({
|
|
24422
|
+
...passThrough && {
|
|
24423
|
+
open: !1
|
|
24424
|
+
},
|
|
24399
24425
|
strategy,
|
|
24400
24426
|
placement,
|
|
24401
24427
|
sameScrollView: !1,
|
|
24402
24428
|
// this only takes effect on native
|
|
24403
|
-
whileElementsMounted: import_floating.autoUpdate,
|
|
24429
|
+
whileElementsMounted: passThrough ? void 0 : import_floating.autoUpdate,
|
|
24404
24430
|
platform: disableRTL ?? setupOptions.disableRTL ? {
|
|
24405
24431
|
...import_floating.platform,
|
|
24406
24432
|
isRTL(element) {
|
|
@@ -24432,8 +24458,9 @@ var require_Popper_native = __commonJS({
|
|
|
24432
24458
|
showSubscription.remove(), hideSubscription.remove();
|
|
24433
24459
|
};
|
|
24434
24460
|
}, []), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
24435
|
-
floating.update();
|
|
24461
|
+
passThrough || floating.update();
|
|
24436
24462
|
}, [
|
|
24463
|
+
passThrough,
|
|
24437
24464
|
dimensions,
|
|
24438
24465
|
keyboardOpen
|
|
24439
24466
|
]);
|
|
@@ -24446,9 +24473,12 @@ var require_Popper_native = __commonJS({
|
|
|
24446
24473
|
hasFloating: (_middlewareData_checkFloating = middlewareData.checkFloating) === null || _middlewareData_checkFloating === void 0 ? void 0 : _middlewareData_checkFloating.hasFloating,
|
|
24447
24474
|
...floating
|
|
24448
24475
|
};
|
|
24449
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
24450
|
-
|
|
24451
|
-
children
|
|
24476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperInfrequentContext.Provider, {
|
|
24477
|
+
size: size2,
|
|
24478
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperProvider, {
|
|
24479
|
+
...popperContext,
|
|
24480
|
+
children
|
|
24481
|
+
})
|
|
24452
24482
|
});
|
|
24453
24483
|
}
|
|
24454
24484
|
var PopperAnchor = import_stacks3.YStack.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
@@ -24490,10 +24520,11 @@ var require_Popper_native = __commonJS({
|
|
|
24490
24520
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
24491
24521
|
}
|
|
24492
24522
|
}), PopperContent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24493
|
-
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);
|
|
24523
|
+
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);
|
|
24494
24524
|
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
24495
|
-
x && y && setNeedsMeasure(!1);
|
|
24525
|
+
needsMeasure && x && y && setNeedsMeasure(!1);
|
|
24496
24526
|
}, [
|
|
24527
|
+
needsMeasure,
|
|
24497
24528
|
enableAnimationForPositionChange,
|
|
24498
24529
|
x,
|
|
24499
24530
|
y
|
|
@@ -24518,14 +24549,20 @@ var require_Popper_native = __commonJS({
|
|
|
24518
24549
|
}
|
|
24519
24550
|
}, { style, ...floatingProps } = getFloatingProps ? getFloatingProps(frameProps) : frameProps;
|
|
24520
24551
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Stack, {
|
|
24521
|
-
|
|
24552
|
+
passThrough,
|
|
24553
|
+
ref: contentRefs,
|
|
24554
|
+
...passThrough ? null : floatingProps,
|
|
24522
24555
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperContentFrame, {
|
|
24523
|
-
|
|
24524
|
-
|
|
24525
|
-
|
|
24526
|
-
|
|
24527
|
-
|
|
24528
|
-
|
|
24556
|
+
passThrough,
|
|
24557
|
+
...!passThrough && {
|
|
24558
|
+
"data-placement": placement,
|
|
24559
|
+
"data-strategy": strategy,
|
|
24560
|
+
contain: "layout",
|
|
24561
|
+
size: size2,
|
|
24562
|
+
...style,
|
|
24563
|
+
...rest
|
|
24564
|
+
},
|
|
24565
|
+
children
|
|
24529
24566
|
}, "popper-content-frame")
|
|
24530
24567
|
});
|
|
24531
24568
|
}), PopperArrowFrame = (0, import_core12.styled)(import_stacks3.YStack, {
|
|
@@ -24795,7 +24832,7 @@ var require_Popover_native = __commonJS({
|
|
|
24795
24832
|
}
|
|
24796
24833
|
});
|
|
24797
24834
|
module2.exports = __toCommonJS2(Popover_exports);
|
|
24798
|
-
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(),
|
|
24835
|
+
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) {
|
|
24799
24836
|
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
|
|
24800
24837
|
return React4.useEffect(function() {
|
|
24801
24838
|
return onCustomAnchorAdd(), function() {
|
|
@@ -24854,7 +24891,7 @@ var require_Popover_native = __commonJS({
|
|
|
24854
24891
|
children: trigger
|
|
24855
24892
|
});
|
|
24856
24893
|
}), PopoverContent = import_popper.PopperContentFrame.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24857
|
-
var {
|
|
24894
|
+
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);
|
|
24858
24895
|
if (context.open && isFullyHidden && setIsFullyHidden(!1), React4.useEffect(function() {
|
|
24859
24896
|
if (context.open) {
|
|
24860
24897
|
var content = contentRef.current;
|
|
@@ -24871,7 +24908,7 @@ var require_Popover_native = __commonJS({
|
|
|
24871
24908
|
pointerEvents: context.open ? (_contentImplProps_pointerEvents = contentImplProps.pointerEvents) !== null && _contentImplProps_pointerEvents !== void 0 ? _contentImplProps_pointerEvents : "auto" : "none",
|
|
24872
24909
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContentImpl, {
|
|
24873
24910
|
...contentImplProps,
|
|
24874
|
-
|
|
24911
|
+
enableRemoveScroll,
|
|
24875
24912
|
ref: composedRefs,
|
|
24876
24913
|
setIsFullyHidden,
|
|
24877
24914
|
__scopePopover,
|
|
@@ -24901,25 +24938,29 @@ var require_Popover_native = __commonJS({
|
|
|
24901
24938
|
});
|
|
24902
24939
|
}));
|
|
24903
24940
|
function PopoverRepropagateContext(props) {
|
|
24904
|
-
|
|
24905
|
-
|
|
24906
|
-
|
|
24907
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
24908
|
-
|
|
24909
|
-
|
|
24910
|
-
|
|
24911
|
-
|
|
24941
|
+
var popperContext = (0, import_popper.usePopperContext)(props.scope || POPOVER_SCOPE);
|
|
24942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
|
|
24943
|
+
zIndex: props.zIndex,
|
|
24944
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
|
|
24945
|
+
scope: props.scope,
|
|
24946
|
+
...popperContext,
|
|
24947
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
|
|
24948
|
+
...props.context,
|
|
24949
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.ProvideAdaptContext, {
|
|
24950
|
+
...props.adaptContext,
|
|
24951
|
+
children: props.children
|
|
24952
|
+
})
|
|
24912
24953
|
})
|
|
24913
24954
|
})
|
|
24914
24955
|
});
|
|
24915
24956
|
}
|
|
24916
24957
|
function PopoverContentPortal(props) {
|
|
24917
|
-
var { __scopePopover } = props, zIndex = props.zIndex, context = usePopoverContext(__scopePopover),
|
|
24918
|
-
return
|
|
24958
|
+
var { __scopePopover } = props, zIndex = props.zIndex, context = usePopoverContext(__scopePopover), themeName = (0, import_core12.useThemeName)(), adaptContext = (0, import_adapt.useAdaptContext)(), contents = props.children;
|
|
24959
|
+
return needsRepropagation && (contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverRepropagateContext, {
|
|
24919
24960
|
scope: __scopePopover || POPOVER_SCOPE,
|
|
24920
|
-
popperContext,
|
|
24921
24961
|
context,
|
|
24922
24962
|
adaptContext,
|
|
24963
|
+
zIndex,
|
|
24923
24964
|
children: props.children
|
|
24924
24965
|
})), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
|
|
24925
24966
|
stackZIndex: !0,
|
|
@@ -24945,35 +24986,49 @@ var require_Popover_native = __commonJS({
|
|
|
24945
24986
|
});
|
|
24946
24987
|
}
|
|
24947
24988
|
var PopoverContentImpl = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24948
|
-
var { trapFocus, __scopePopover, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, disableFocusScope, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, children,
|
|
24989
|
+
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() {
|
|
24949
24990
|
setIsFullyHidden == null || setIsFullyHidden(!0);
|
|
24950
24991
|
}, [
|
|
24951
24992
|
setIsFullyHidden
|
|
24952
24993
|
]), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.ResetPresence, {
|
|
24994
|
+
disable: context.breakpointActive,
|
|
24953
24995
|
children
|
|
24954
24996
|
});
|
|
24955
|
-
return context.breakpointActive
|
|
24956
|
-
|
|
24957
|
-
|
|
24958
|
-
|
|
24959
|
-
|
|
24997
|
+
return context.breakpointActive, /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RepropagatePopperAdapt, {
|
|
24998
|
+
__scopePopover: __scopePopover || POPOVER_SCOPE,
|
|
24999
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate.Animate, {
|
|
25000
|
+
type: "presence",
|
|
25001
|
+
present: !!open,
|
|
25002
|
+
keepChildrenMounted: !!keepChildrenMounted,
|
|
25003
|
+
onExitComplete: handleExitComplete,
|
|
25004
|
+
lazyMount,
|
|
25005
|
+
passThrough: context.breakpointActive,
|
|
25006
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContent, {
|
|
25007
|
+
__scopePopper: __scopePopover || POPOVER_SCOPE,
|
|
25008
|
+
"data-state": getState(open),
|
|
25009
|
+
id: context.contentId,
|
|
25010
|
+
ref: forwardedRef,
|
|
25011
|
+
passThrough: context.breakpointActive,
|
|
25012
|
+
...contentProps,
|
|
25013
|
+
children: contents
|
|
25014
|
+
}, context.contentId)
|
|
24960
25015
|
})
|
|
24961
|
-
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate.Animate, {
|
|
24962
|
-
type: "presence",
|
|
24963
|
-
present: !!open,
|
|
24964
|
-
keepChildrenMounted,
|
|
24965
|
-
onExitComplete: handleExitComplete,
|
|
24966
|
-
lazyMount,
|
|
24967
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContent, {
|
|
24968
|
-
__scopePopper: __scopePopover || POPOVER_SCOPE,
|
|
24969
|
-
"data-state": getState(open),
|
|
24970
|
-
id: context.contentId,
|
|
24971
|
-
ref: forwardedRef,
|
|
24972
|
-
...contentProps,
|
|
24973
|
-
children: contents
|
|
24974
|
-
}, context.contentId)
|
|
24975
25016
|
});
|
|
24976
|
-
}),
|
|
25017
|
+
}), RepropagatePopperAdapt = function(param) {
|
|
25018
|
+
var { children, __scopePopover } = param;
|
|
25019
|
+
if (needsRepropagation) {
|
|
25020
|
+
var popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE);
|
|
25021
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
25022
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
|
|
25023
|
+
...popperContext,
|
|
25024
|
+
children
|
|
25025
|
+
})
|
|
25026
|
+
});
|
|
25027
|
+
}
|
|
25028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
25029
|
+
children
|
|
25030
|
+
});
|
|
25031
|
+
}, PopoverClose = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24977
25032
|
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover);
|
|
24978
25033
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, {
|
|
24979
25034
|
...rest,
|
|
@@ -24994,13 +25049,7 @@ var require_Popover_native = __commonJS({
|
|
|
24994
25049
|
});
|
|
24995
25050
|
}), PopoverScrollView = /* @__PURE__ */ React4.forwardRef(function(props, ref) {
|
|
24996
25051
|
var context = usePopoverContext(POPOVER_SCOPE);
|
|
24997
|
-
return
|
|
24998
|
-
ref,
|
|
24999
|
-
// when adapted, no pointer events!
|
|
25000
|
-
pointerEvents: context.breakpointActive ? "none" : void 0,
|
|
25001
|
-
scrollEnabled: !context.breakpointActive,
|
|
25002
|
-
...props
|
|
25003
|
-
});
|
|
25052
|
+
return props.children;
|
|
25004
25053
|
}), Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
|
|
25005
25054
|
var id = React4.useId();
|
|
25006
25055
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
|
|
@@ -25023,7 +25072,11 @@ var require_Popover_native = __commonJS({
|
|
|
25023
25072
|
Sheet: import_sheet.Sheet.Controlled,
|
|
25024
25073
|
FocusScope: import_focus_scope.FocusScopeController
|
|
25025
25074
|
}), PopoverInner = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
25026
|
-
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), [
|
|
25075
|
+
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)({
|
|
25076
|
+
prop: keepChildrenMountedProp,
|
|
25077
|
+
defaultProp: !1,
|
|
25078
|
+
transition: keepChildrenMountedProp === "lazy"
|
|
25079
|
+
}), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
25027
25080
|
prop: openProp,
|
|
25028
25081
|
defaultProp: defaultOpen || !1,
|
|
25029
25082
|
onChange: function(val) {
|
|
@@ -25074,18 +25127,25 @@ var require_Popover_native = __commonJS({
|
|
|
25074
25127
|
return setHasCustomAnchor(!1);
|
|
25075
25128
|
}, []),
|
|
25076
25129
|
keepChildrenMounted
|
|
25077
|
-
},
|
|
25078
|
-
|
|
25079
|
-
stayInFrame: !0,
|
|
25080
|
-
...restProps,
|
|
25081
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
|
|
25130
|
+
}, memoizedChildren = React4.useMemo(function() {
|
|
25131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
|
|
25082
25132
|
scope: __scopePopover,
|
|
25083
25133
|
...popoverContext,
|
|
25084
25134
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverSheetController, {
|
|
25085
25135
|
onOpenChange: setOpen,
|
|
25086
25136
|
children
|
|
25087
25137
|
})
|
|
25088
|
-
})
|
|
25138
|
+
});
|
|
25139
|
+
}, [
|
|
25140
|
+
setOpen,
|
|
25141
|
+
children,
|
|
25142
|
+
...Object.values(popoverContext)
|
|
25143
|
+
]), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.Popper, {
|
|
25144
|
+
passThrough: isAdapted,
|
|
25145
|
+
__scopePopper: __scopePopover || POPOVER_SCOPE,
|
|
25146
|
+
stayInFrame: !0,
|
|
25147
|
+
...restProps,
|
|
25148
|
+
children: memoizedChildren
|
|
25089
25149
|
});
|
|
25090
25150
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
25091
25151
|
children: import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_floating.FloatingOverrideContext.Provider, {
|
|
@@ -25107,7 +25167,7 @@ var require_Popover_native = __commonJS({
|
|
|
25107
25167
|
}
|
|
25108
25168
|
},
|
|
25109
25169
|
open: context.open,
|
|
25110
|
-
hidden: breakpointActive
|
|
25170
|
+
hidden: !breakpointActive,
|
|
25111
25171
|
children: props.children
|
|
25112
25172
|
});
|
|
25113
25173
|
}, useShowPopoverSheet = function(context) {
|
|
@@ -27468,7 +27528,7 @@ var require_Select_native = __commonJS({
|
|
|
27468
27528
|
getShowSheet() && props.onOpenChange(val);
|
|
27469
27529
|
},
|
|
27470
27530
|
open: context.open,
|
|
27471
|
-
hidden: isAdapted
|
|
27531
|
+
hidden: !isAdapted,
|
|
27472
27532
|
children: props.children
|
|
27473
27533
|
});
|
|
27474
27534
|
}, SelectSheetImpl = function(props) {
|