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