tamagui 1.115.5 → 1.116.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 +989 -948
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +984 -941
- package/dist/test.native.js.map +3 -3
- package/package.json +54 -54
package/dist/native.js
CHANGED
|
@@ -3000,8 +3000,8 @@ var require_useMedia_native = __commonJS({
|
|
|
3000
3000
|
}), mod);
|
|
3001
3001
|
}, useMedia_exports = {};
|
|
3002
3002
|
__export2(useMedia_exports, {
|
|
3003
|
-
|
|
3004
|
-
return
|
|
3003
|
+
_disableMediaTouch: function() {
|
|
3004
|
+
return _disableMediaTouch2;
|
|
3005
3005
|
},
|
|
3006
3006
|
configureMedia: function() {
|
|
3007
3007
|
return configureMedia2;
|
|
@@ -3050,7 +3050,7 @@ var require_useMedia_native = __commonJS({
|
|
|
3050
3050
|
}
|
|
3051
3051
|
});
|
|
3052
3052
|
module2.exports = __toCommonJS2(useMedia_exports);
|
|
3053
|
-
var import_react3 = __toESM2(require("react")),
|
|
3053
|
+
var import_constants4 = require_index_native6(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_matchMedia = require_matchMedia_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_useDisableSSR = require_useDisableSSR_native(), mediaState3 = (
|
|
3054
3054
|
// development only safeguard
|
|
3055
3055
|
process.env.NODE_ENV === "development" ? new Proxy({}, {
|
|
3056
3056
|
get(target, key) {
|
|
@@ -3079,7 +3079,7 @@ var require_useMedia_native = __commonJS({
|
|
|
3079
3079
|
for (var key in media) mediaState3[key] = (mediaQueryDefaultActive == null ? void 0 : mediaQueryDefaultActive[key]) || !1, mediaKeys.add(`$${key}`);
|
|
3080
3080
|
Object.assign(mediaQueryConfig3, media), initState = {
|
|
3081
3081
|
...mediaState3
|
|
3082
|
-
}, mediaKeysOrdered = Object.keys(media),
|
|
3082
|
+
}, mediaKeysOrdered = Object.keys(media), setupMediaListeners();
|
|
3083
3083
|
}
|
|
3084
3084
|
};
|
|
3085
3085
|
function unlisten() {
|
|
@@ -3132,48 +3132,64 @@ var require_useMedia_native = __commonJS({
|
|
|
3132
3132
|
listeners.delete(subscriber);
|
|
3133
3133
|
};
|
|
3134
3134
|
}
|
|
3135
|
-
function useMedia3(
|
|
3136
|
-
var
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
if (!
|
|
3142
|
-
var
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
return initialState;
|
|
3151
|
-
});
|
|
3152
|
-
else {
|
|
3153
|
-
var [_state, setState] = import_react3.default.useState(initialState);
|
|
3154
|
-
state = _state, (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
3155
|
-
function update() {
|
|
3156
|
-
setState(getSnapshot);
|
|
3135
|
+
function useMedia3(cc, debug) {
|
|
3136
|
+
var disableSSR = (0, import_config.getSetting)("disableSSR") || (0, import_useDisableSSR.getDisableSSR)(cc), initialState = disableSSR || !import_constants4.isWeb ? mediaState3 : initState, [state, setState] = import_react3.default.useState(initialState), currentKeys, getCurrentKeys = function() {
|
|
3137
|
+
return currentKeys;
|
|
3138
|
+
};
|
|
3139
|
+
function getSnapshot(cur) {
|
|
3140
|
+
var keys = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : cur.lastKeys;
|
|
3141
|
+
if (!keys) return cur;
|
|
3142
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
3143
|
+
try {
|
|
3144
|
+
for (var _iterator = keys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
3145
|
+
var key = _step.value;
|
|
3146
|
+
if (mediaState3[key] !== cur[key]) return process.env.NODE_ENV === "development" && debug && console.warn("useMedia()\u270D\uFE0F", key, cur[key], ">", mediaState3[key]), {
|
|
3147
|
+
...mediaState3,
|
|
3148
|
+
lastKeys: new Set(keys)
|
|
3149
|
+
};
|
|
3157
3150
|
}
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3151
|
+
} catch (err) {
|
|
3152
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
3153
|
+
} finally {
|
|
3154
|
+
try {
|
|
3155
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
3156
|
+
} finally {
|
|
3157
|
+
if (_didIteratorError) throw _iteratorError;
|
|
3158
|
+
}
|
|
3159
|
+
}
|
|
3160
|
+
return cur;
|
|
3162
3161
|
}
|
|
3163
|
-
|
|
3162
|
+
var isRendering = !0, isInitialState = state === initialState;
|
|
3163
|
+
return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
3164
|
+
isRendering = !1;
|
|
3165
|
+
}), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
3166
|
+
var update = function() {
|
|
3167
|
+
return setState(function(prev) {
|
|
3168
|
+
return getSnapshot(
|
|
3169
|
+
prev,
|
|
3170
|
+
// because the !didHydrateOnce logic we can't update as we render
|
|
3171
|
+
// we need to get the current keys in case we added
|
|
3172
|
+
// these only ever add keys so likely ok?
|
|
3173
|
+
getCurrentKeys()
|
|
3174
|
+
);
|
|
3175
|
+
});
|
|
3176
|
+
};
|
|
3177
|
+
return update(), subscribe(update);
|
|
3178
|
+
}, []), new Proxy(state, {
|
|
3164
3179
|
get(_, key) {
|
|
3165
|
-
if (!disableMediaTouch) {
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3180
|
+
if (isRendering && !disableMediaTouch && typeof key == "string") {
|
|
3181
|
+
var needsUpdateKeys = !state.lastKeys || !state.lastKeys.has(key);
|
|
3182
|
+
if ((needsUpdateKeys || state[key] !== mediaState3[key]) && (process.env.NODE_ENV === "development" && debug && console.info("useMedia() TOUCH", key), currentKeys || (currentKeys = /* @__PURE__ */ new Set()), currentKeys.add(key), !isInitialState)) {
|
|
3183
|
+
var next = getSnapshot(state, currentKeys);
|
|
3184
|
+
next !== state && setState(next);
|
|
3169
3185
|
}
|
|
3170
|
-
return Reflect.get(state, key);
|
|
3171
3186
|
}
|
|
3187
|
+
return Reflect.get(state, key);
|
|
3172
3188
|
}
|
|
3173
3189
|
});
|
|
3174
3190
|
}
|
|
3175
3191
|
var disableMediaTouch = !1;
|
|
3176
|
-
function
|
|
3192
|
+
function _disableMediaTouch2(val) {
|
|
3177
3193
|
disableMediaTouch = val;
|
|
3178
3194
|
}
|
|
3179
3195
|
function getMediaState(mediaGroups, layout) {
|
|
@@ -4605,9 +4621,6 @@ var require_defaultComponentState_native = __commonJS({
|
|
|
4605
4621
|
},
|
|
4606
4622
|
defaultComponentStateMounted: function() {
|
|
4607
4623
|
return defaultComponentStateMounted;
|
|
4608
|
-
},
|
|
4609
|
-
defaultComponentStateShouldEnter: function() {
|
|
4610
|
-
return defaultComponentStateShouldEnter;
|
|
4611
4624
|
}
|
|
4612
4625
|
});
|
|
4613
4626
|
module2.exports = __toCommonJS2(defaultComponentState_exports);
|
|
@@ -4622,9 +4635,6 @@ var require_defaultComponentState_native = __commonJS({
|
|
|
4622
4635
|
}, defaultComponentStateMounted = {
|
|
4623
4636
|
...defaultComponentState,
|
|
4624
4637
|
unmounted: !1
|
|
4625
|
-
}, defaultComponentStateShouldEnter = {
|
|
4626
|
-
...defaultComponentState,
|
|
4627
|
-
unmounted: "should-enter"
|
|
4628
4638
|
};
|
|
4629
4639
|
}
|
|
4630
4640
|
});
|
|
@@ -5817,11 +5827,11 @@ var require_log_native = __commonJS({
|
|
|
5817
5827
|
function log() {
|
|
5818
5828
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
|
|
5819
5829
|
if (process.env.NODE_ENV !== "production") {
|
|
5820
|
-
(0, import_useMedia.
|
|
5830
|
+
(0, import_useMedia._disableMediaTouch)(!0);
|
|
5821
5831
|
try {
|
|
5822
5832
|
return console.log(...args);
|
|
5823
5833
|
} finally {
|
|
5824
|
-
(0, import_useMedia.
|
|
5834
|
+
(0, import_useMedia._disableMediaTouch)(!1);
|
|
5825
5835
|
}
|
|
5826
5836
|
}
|
|
5827
5837
|
}
|
|
@@ -7062,7 +7072,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7062
7072
|
}
|
|
7063
7073
|
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug) {
|
|
7064
7074
|
conf = conf || (0, import_config.getConfig)(), import_constants4.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
7065
|
-
var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants4.isWeb && !styleProps.
|
|
7075
|
+
var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants4.isWeb && !styleProps.noClass, rulesToInsert = void 0, classNames = {}, transforms = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, styleState = {
|
|
7066
7076
|
classNames,
|
|
7067
7077
|
conf,
|
|
7068
7078
|
props,
|
|
@@ -7110,7 +7120,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7110
7120
|
}), console.groupEnd()), "continue";
|
|
7111
7121
|
if (isPseudo) {
|
|
7112
7122
|
if (!val) return "continue";
|
|
7113
|
-
var pseudoStyleObject = getSubStyle(styleState, key, val, styleProps.
|
|
7123
|
+
var pseudoStyleObject = getSubStyle(styleState, key, val, styleProps.noClass), descriptor = import_pseudoDescriptors.pseudoDescriptors[key], isEnter = key === "enterStyle", isExit = key === "exitStyle";
|
|
7114
7124
|
if (!descriptor) return "continue";
|
|
7115
7125
|
if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
|
|
7116
7126
|
var _pseudos, _key;
|
|
@@ -7278,7 +7288,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7278
7288
|
if (accept) {
|
|
7279
7289
|
var accepted = accept[keyInit];
|
|
7280
7290
|
if ((accepted === "style" || accepted === "textStyle") && valInit && typeof valInit == "object") {
|
|
7281
|
-
viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.
|
|
7291
|
+
viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClass);
|
|
7282
7292
|
continue;
|
|
7283
7293
|
}
|
|
7284
7294
|
}
|
|
@@ -7939,7 +7949,7 @@ var require_Theme_native = __commonJS({
|
|
|
7939
7949
|
function getThemedChildren(themeState, children, props) {
|
|
7940
7950
|
var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, stateRef = arguments.length > 4 ? arguments[4] : void 0, { themeManager, isNewTheme } = themeState;
|
|
7941
7951
|
if (!themeManager) return children;
|
|
7942
|
-
var { shallow, forceClassName } = props, shouldRenderChildrenWithTheme = isNewTheme || isRoot ||
|
|
7952
|
+
var { shallow, forceClassName } = props, shouldRenderChildrenWithTheme = isNewTheme || isRoot || "inverse" in props || "name" in props || "reset" in props || "forceClassName" in props || stateRef.current.hasEverThemed;
|
|
7943
7953
|
if (shouldRenderChildrenWithTheme && (stateRef.current.hasEverThemed = !0), !shouldRenderChildrenWithTheme) return children;
|
|
7944
7954
|
process.env.NODE_ENV === "development" && shouldRenderChildrenWithTheme && props.debug === "verbose" && (0, import_log.log)(`adding theme: isRoot ${isRoot}, inverse ${"inverse" in props}, isNewTheme ${isNewTheme}, hasEver ${stateRef.current.hasEverThemed}`, props);
|
|
7945
7955
|
var next = children;
|
|
@@ -7963,7 +7973,7 @@ var require_Theme_native = __commonJS({
|
|
|
7963
7973
|
function wrapThemeElements(param) {
|
|
7964
7974
|
var { children, themeState, forceClassName, isRoot } = param;
|
|
7965
7975
|
if (isRoot && forceClassName === !1) return children;
|
|
7966
|
-
var inverse = themeState.inversed, requiresExtraWrapper = inverse
|
|
7976
|
+
var inverse = themeState.inversed, requiresExtraWrapper = typeof inverse == "boolean" || forceClassName, { className, style } = getThemeClassNameAndStyle(themeState, isRoot), themedChildren = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
|
|
7967
7977
|
className: `${className} _dsp_contents is_Theme`,
|
|
7968
7978
|
style,
|
|
7969
7979
|
children
|
|
@@ -8065,13 +8075,13 @@ var require_themeable_native = __commonJS({
|
|
|
8065
8075
|
...rest,
|
|
8066
8076
|
"data-disable-theme": !0
|
|
8067
8077
|
})
|
|
8068
|
-
),
|
|
8069
|
-
componentName: componentName || (staticConfig == null ? void 0 : staticConfig.componentName)
|
|
8070
|
-
|
|
8078
|
+
), filteredProps = {
|
|
8079
|
+
componentName: componentName || (staticConfig == null ? void 0 : staticConfig.componentName)
|
|
8080
|
+
};
|
|
8081
|
+
"debug" in props && (filteredProps.debug = props.debug), "theme" in props && (filteredProps.name = props.theme), "themeInverse" in props && (filteredProps.inverse = props.themeInverse), "themeReset" in props && (filteredProps.reset = themeReset);
|
|
8082
|
+
var contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Theme.Theme, {
|
|
8071
8083
|
"disable-child-theme": !0,
|
|
8072
|
-
|
|
8073
|
-
inverse: themeInverse,
|
|
8074
|
-
reset: themeReset,
|
|
8084
|
+
...filteredProps,
|
|
8075
8085
|
children: element
|
|
8076
8086
|
});
|
|
8077
8087
|
if (context) {
|
|
@@ -8139,75 +8149,6 @@ var require_wrapStyleTags_native = __commonJS({
|
|
|
8139
8149
|
}
|
|
8140
8150
|
});
|
|
8141
8151
|
|
|
8142
|
-
// ../../core/web/dist/cjs/hooks/useDidHydrateOnce.native.js
|
|
8143
|
-
var require_useDidHydrateOnce_native = __commonJS({
|
|
8144
|
-
"../../core/web/dist/cjs/hooks/useDidHydrateOnce.native.js"(exports2, module2) {
|
|
8145
|
-
"use strict";
|
|
8146
|
-
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
8147
|
-
for (var name in all) __defProp2(target, name, {
|
|
8148
|
-
get: all[name],
|
|
8149
|
-
enumerable: !0
|
|
8150
|
-
});
|
|
8151
|
-
}, __copyProps2 = function(to, from, except, desc) {
|
|
8152
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
8153
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
8154
|
-
for (var _loop = function() {
|
|
8155
|
-
var key = _step.value;
|
|
8156
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
8157
|
-
get: function() {
|
|
8158
|
-
return from[key];
|
|
8159
|
-
},
|
|
8160
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
8161
|
-
});
|
|
8162
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
8163
|
-
} catch (err) {
|
|
8164
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
8165
|
-
} finally {
|
|
8166
|
-
try {
|
|
8167
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
8168
|
-
} finally {
|
|
8169
|
-
if (_didIteratorError)
|
|
8170
|
-
throw _iteratorError;
|
|
8171
|
-
}
|
|
8172
|
-
}
|
|
8173
|
-
return to;
|
|
8174
|
-
}, __toESM2 = function(mod, isNodeMode, target) {
|
|
8175
|
-
return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
8176
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
8177
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
8178
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
8179
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
8180
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
8181
|
-
value: mod,
|
|
8182
|
-
enumerable: !0
|
|
8183
|
-
}) : target,
|
|
8184
|
-
mod
|
|
8185
|
-
);
|
|
8186
|
-
}, __toCommonJS2 = function(mod) {
|
|
8187
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
8188
|
-
value: !0
|
|
8189
|
-
}), mod);
|
|
8190
|
-
}, useDidHydrateOnce_exports = {};
|
|
8191
|
-
__export2(useDidHydrateOnce_exports, {
|
|
8192
|
-
useDidHydrateOnce: function() {
|
|
8193
|
-
return useDidHydrateOnce;
|
|
8194
|
-
},
|
|
8195
|
-
useDidHydrateOnceRoot: function() {
|
|
8196
|
-
return useDidHydrateOnceRoot;
|
|
8197
|
-
}
|
|
8198
|
-
});
|
|
8199
|
-
module2.exports = __toCommonJS2(useDidHydrateOnce_exports);
|
|
8200
|
-
var import_react3 = __toESM2(require("react")), import_config = require_config_native();
|
|
8201
|
-
function useDidHydrateOnceRoot() {
|
|
8202
|
-
return !0;
|
|
8203
|
-
}
|
|
8204
|
-
var last = Date.now();
|
|
8205
|
-
function useDidHydrateOnce() {
|
|
8206
|
-
return !0;
|
|
8207
|
-
}
|
|
8208
|
-
}
|
|
8209
|
-
});
|
|
8210
|
-
|
|
8211
8152
|
// ../../core/web/dist/cjs/hooks/useComponentState.native.js
|
|
8212
8153
|
var require_useComponentState_native = __commonJS({
|
|
8213
8154
|
"../../core/web/dist/cjs/hooks/useComponentState.native.js"(exports2, module2) {
|
|
@@ -8251,7 +8192,7 @@ var require_useComponentState_native = __commonJS({
|
|
|
8251
8192
|
}
|
|
8252
8193
|
});
|
|
8253
8194
|
module2.exports = __toCommonJS2(useComponentState_exports);
|
|
8254
|
-
var
|
|
8195
|
+
var import_constants4 = require_index_native6(), import_react3 = require("react"), import_defaultComponentState = require_defaultComponentState_native(), import_createShallowSetState = require_createShallowSetState_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), useComponentState = function(props, param, staticConfig, config) {
|
|
8255
8196
|
var { animationDriver, groups } = param, _animationDriver_usePresence, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = (0, import_react3.useRef)(void 0);
|
|
8256
8197
|
stateRef.current || (stateRef.current = {});
|
|
8257
8198
|
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars, curStateRef = stateRef.current, willBeAnimatedClient = function() {
|
|
@@ -8259,20 +8200,22 @@ var require_useComponentState_native = __commonJS({
|
|
|
8259
8200
|
return !!(next || curStateRef.hasAnimated);
|
|
8260
8201
|
}(), willBeAnimated = !import_constants4.isServer && willBeAnimatedClient;
|
|
8261
8202
|
willBeAnimated && !curStateRef.hasAnimated && (curStateRef.hasAnimated = !0);
|
|
8262
|
-
var presence = willBeAnimated && props.animatePresence !== !1 && (animationDriver == null || (_animationDriver_usePresence = animationDriver.usePresence) === null || _animationDriver_usePresence === void 0 ? void 0 : _animationDriver_usePresence.call(animationDriver)) || null, presenceState = presence == null ? void 0 : presence[2], isExiting = (presenceState == null ? void 0 : presenceState.isPresent) === !1, isEntering = (presenceState == null ? void 0 : presenceState.isPresent) === !0 && presenceState.initial !== !1, hasEnterStyle = !!props.enterStyle,
|
|
8203
|
+
var { disableClassName } = props, presence = willBeAnimated && props.animatePresence !== !1 && (animationDriver == null || (_animationDriver_usePresence = animationDriver.usePresence) === null || _animationDriver_usePresence === void 0 ? void 0 : _animationDriver_usePresence.call(animationDriver)) || null, presenceState = presence == null ? void 0 : presence[2], isExiting = (presenceState == null ? void 0 : presenceState.isPresent) === !1, isEntering = (presenceState == null ? void 0 : presenceState.isPresent) === !0 && presenceState.initial !== !1, hasEnterStyle = !!props.enterStyle, hasAnimationThatNeedsHydrate = hasAnimationProp && ((animationDriver == null ? void 0 : animationDriver.isReactNative) || !supportsCSSVars), hasEnterState = hasEnterStyle || isEntering, shouldEnter = hasEnterState || hasAnimationThatNeedsHydrate || // disableClassName doesnt work server side, only client, so needs hydrate
|
|
8204
|
+
// this is just for a better ux, supports css variables for light/dark, media queries, etc
|
|
8205
|
+
disableClassName, initialState = shouldEnter ? (
|
|
8263
8206
|
// on the very first render we switch all spring animation drivers to css rendering
|
|
8264
8207
|
// this is because we need to use css variables, which they don't support to do proper SSR
|
|
8265
8208
|
// without flickers of the wrong colors.
|
|
8266
8209
|
// but once we do that initial hydration and we are in client side rendering mode,
|
|
8267
8210
|
// we can avoid the extra re-render on mount
|
|
8268
|
-
|
|
8211
|
+
import_defaultComponentState.defaultComponentState
|
|
8269
8212
|
) : import_defaultComponentState.defaultComponentStateMounted, disabled = isDisabled(props);
|
|
8270
8213
|
disabled != null && (initialState.disabled = disabled);
|
|
8271
8214
|
var states = (0, import_react3.useState)(initialState), state = props.forceStyle ? {
|
|
8272
8215
|
...states[0],
|
|
8273
8216
|
[props.forceStyle]: !0
|
|
8274
|
-
} : states[0], setState = states[1], isHydrated = state.unmounted === !1
|
|
8275
|
-
import_constants4.isWeb &&
|
|
8217
|
+
} : states[0], setState = states[1], isHydrated = state.unmounted === !1, isAnimated = willBeAnimated;
|
|
8218
|
+
import_constants4.isWeb && hasAnimationThatNeedsHydrate && !staticConfig.isHOC && state.unmounted === !0 && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (state.disabled = disabled, disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), setState({
|
|
8276
8219
|
...state
|
|
8277
8220
|
}));
|
|
8278
8221
|
var setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled, !1, props.debug);
|
|
@@ -8283,10 +8226,10 @@ var require_useComponentState_native = __commonJS({
|
|
|
8283
8226
|
var exv = exitVariant ?? enterExitVariant, env = enterVariant ?? enterExitVariant;
|
|
8284
8227
|
state.unmounted && env && staticConfig.variants[env] ? (process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn(`Animating presence ENTER "${env}"`), props[env] = !0) : isExiting && exv && (process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn(`Animating presence EXIT "${exv}"`), props[exv] = exitVariant !== enterExitVariant);
|
|
8285
8228
|
}
|
|
8286
|
-
var
|
|
8287
|
-
if (import_constants4.isWeb) {
|
|
8288
|
-
var
|
|
8289
|
-
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (
|
|
8229
|
+
var noClass = !import_constants4.isWeb || !!props.forceStyle;
|
|
8230
|
+
if (import_constants4.isWeb && (!import_constants4.isServer || isHydrated)) {
|
|
8231
|
+
var isAnimatedAndHydrated = isAnimated && !supportsCSSVars, isClassNameDisabled = !staticConfig.acceptsClassName && (config.disableSSR || !state.unmounted), isDisabledManually = disableClassName && !state.unmounted;
|
|
8232
|
+
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (noClass = !0, process.env.NODE_ENV === "development" && props.debug && (0, import_log.log)("avoiding className", {
|
|
8290
8233
|
isAnimatedAndHydrated,
|
|
8291
8234
|
isDisabledManually,
|
|
8292
8235
|
isClassNameDisabled
|
|
@@ -8335,7 +8278,7 @@ var require_useComponentState_native = __commonJS({
|
|
|
8335
8278
|
presenceState,
|
|
8336
8279
|
setState,
|
|
8337
8280
|
setStateShallow,
|
|
8338
|
-
|
|
8281
|
+
noClass,
|
|
8339
8282
|
state,
|
|
8340
8283
|
stateRef,
|
|
8341
8284
|
supportsCSSVars,
|
|
@@ -8682,7 +8625,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8682
8625
|
]), !1)
|
|
8683
8626
|
var timer;
|
|
8684
8627
|
process.env.NODE_ENV === "development" && time && time`start (ignore)`, process.env.NODE_ENV === "development" && time && time`did-finish-ssr`, process.env.NODE_ENV === "development" && time && time`stateref`;
|
|
8685
|
-
var animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, { curStateRef, disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, setStateShallow,
|
|
8628
|
+
var animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, { curStateRef, disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, setStateShallow, noClass, state, stateRef, supportsCSSVars, willBeAnimated, willBeAnimatedClient } = (0, import_useComponentState.useComponentState)(props, componentContext, staticConfig, config);
|
|
8686
8629
|
process.env.NODE_ENV === "development" && time && time`use-state`;
|
|
8687
8630
|
var hasTextAncestor = !!(import_constants4.isWeb && isText && componentContext.inText);
|
|
8688
8631
|
process.env.NODE_ENV === "development" && time && time`use-context`;
|
|
@@ -8699,11 +8642,10 @@ var require_createComponent_native = __commonJS({
|
|
|
8699
8642
|
if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "theme" in props && (themeStateProps.name = props.theme), typeof curStateRef.isListeningToTheme == "boolean" && (themeStateProps.shouldUpdate = function() {
|
|
8700
8643
|
return stateRef.current.isListeningToTheme;
|
|
8701
8644
|
}), themeStateProps.deopt = willBeAnimated, process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
|
|
8702
|
-
var name = `${componentName2 || (Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "[Unnamed Component]"}`, type = (hasEnterStyle ? "(hasEnter)" : " ") + (isAnimated ? "(animated)" : " ") + (isReactNative ? "(rnw)" : " ") + (
|
|
8645
|
+
var name = `${componentName2 || (Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "[Unnamed Component]"}`, type = (hasEnterStyle ? "(hasEnter)" : " ") + (isAnimated ? "(animated)" : " ") + (isReactNative ? "(rnw)" : " ") + (noClass ? "(noClass)" : " ") + (state.press || state.pressIn ? "(PRESSED)" : " ") + (state.hover ? "(HOVERED)" : " ") + (state.focus ? "(FOCUSED)" : " ") + ((presenceState == null ? void 0 : presenceState.isPresent) === !1 ? "(EXIT)" : ""), dataIs = propsIn["data-is"] || "", banner = `${internalID} ${name}${dataIs ? ` ${dataIs}` : ""} ${type}`;
|
|
8703
8646
|
if (console.info(`%c ${banner} (hydrated: ${isHydrated}) (unmounted: ${state.unmounted})`, "background: green; color: white;"), import_constants4.isServer) (0, import_log.log)({
|
|
8704
|
-
|
|
8647
|
+
noClass,
|
|
8705
8648
|
isAnimated,
|
|
8706
|
-
shouldAvoidClasses,
|
|
8707
8649
|
isWeb: import_constants4.isWeb,
|
|
8708
8650
|
supportsCSSVars
|
|
8709
8651
|
});
|
|
@@ -8732,14 +8674,14 @@ var require_createComponent_native = __commonJS({
|
|
|
8732
8674
|
elementType = Component || elementType;
|
|
8733
8675
|
var isStringElement = typeof elementType == "string";
|
|
8734
8676
|
process.env.NODE_ENV === "development" && time && time`theme`;
|
|
8735
|
-
var mediaState3 = (0, import_useMedia.useMedia)(
|
|
8677
|
+
var mediaState3 = (0, import_useMedia.useMedia)(componentContext, debugProp);
|
|
8736
8678
|
(0, import_createVariable.setDidGetVariableValue)(!1), process.env.NODE_ENV === "development" && time && time`media`;
|
|
8737
8679
|
var resolveValues = (
|
|
8738
8680
|
// if HOC + mounted + has animation prop, resolve as value so it passes non-variable to child
|
|
8739
8681
|
isAnimated && !supportsCSSVars || isHOC && state.unmounted == !1 && hasAnimationProp ? "value" : "auto"
|
|
8740
8682
|
), styleProps = {
|
|
8741
8683
|
mediaState: mediaState3,
|
|
8742
|
-
|
|
8684
|
+
noClass,
|
|
8743
8685
|
resolveValues,
|
|
8744
8686
|
isExiting,
|
|
8745
8687
|
isAnimated,
|
|
@@ -8751,7 +8693,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8751
8693
|
(_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
|
|
8752
8694
|
}
|
|
8753
8695
|
process.env.NODE_ENV === "development" && time && time`split-styles`, curStateRef.isListeningToTheme = splitStyles.dynamicThemeAccess;
|
|
8754
|
-
var hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys ||
|
|
8696
|
+
var hasRuntimeMediaKeys = splitStyles.hasMedia && splitStyles.hasMedia !== !0, shouldListenForMedia = (0, import_createVariable.didGetVariableValue)() || hasRuntimeMediaKeys || noClass && splitStyles.hasMedia === !0, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
|
|
8755
8697
|
process.env.NODE_ENV === "development" && debugProp === "verbose" && console.info("useMedia() createComponent", shouldListenForMedia, mediaListeningKeys), (0, import_useMedia.setMediaShouldUpdate)(stateRef, shouldListenForMedia, mediaListeningKeys);
|
|
8756
8698
|
var { viewProps: viewPropsIn, pseudos, style: splitStylesStyle, classNames, space } = splitStyles, propsWithAnimation = props, {
|
|
8757
8699
|
asChild,
|
|
@@ -8833,23 +8775,20 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8833
8775
|
}
|
|
8834
8776
|
}), import_react3.default.useEffect(function() {
|
|
8835
8777
|
if (!disabled) {
|
|
8778
|
+
var tm;
|
|
8836
8779
|
if (state.unmounted === !0 && hasEnterStyle) {
|
|
8837
8780
|
setStateShallow({
|
|
8838
8781
|
unmounted: "should-enter"
|
|
8839
8782
|
});
|
|
8840
8783
|
return;
|
|
8841
8784
|
}
|
|
8842
|
-
|
|
8843
|
-
|
|
8844
|
-
animationDriver != null && animationDriver.supportsCSSVars ? tm = setTimeout(function() {
|
|
8845
|
-
setStateShallow({
|
|
8846
|
-
unmounted: !1
|
|
8847
|
-
});
|
|
8848
|
-
}) : setStateShallow({
|
|
8785
|
+
if (state.unmounted) return tm = setTimeout(function() {
|
|
8786
|
+
setStateShallow({
|
|
8849
8787
|
unmounted: !1
|
|
8850
8788
|
});
|
|
8851
|
-
|
|
8852
|
-
|
|
8789
|
+
}), function() {
|
|
8790
|
+
return clearTimeout(tm);
|
|
8791
|
+
};
|
|
8853
8792
|
var dispose = (0, import_subscribeToContextGroup.subscribeToContextGroup)({
|
|
8854
8793
|
disabled,
|
|
8855
8794
|
componentContext,
|
|
@@ -8872,7 +8811,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8872
8811
|
...mediaGroups
|
|
8873
8812
|
]).join("") : 0
|
|
8874
8813
|
]);
|
|
8875
|
-
var runtimePressStyle = !disabled &&
|
|
8814
|
+
var runtimePressStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusStyle), runtimeFocusVisibleStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusVisibleStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || runtimeFocusVisibleStyle || onFocus || onBlur), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick || pseudos != null && pseudos.focusVisibleStyle), runtimeHoverStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = !!(groupName || runtimeHoverStyle || onHoverIn || onHoverOut), attachHover = import_constants4.isWeb && !!(groupName || needsHoverState || onMouseEnter || onMouseLeave), shouldAttach = !disabled && !props.asChild && !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(groupName || runtimePressStyle);
|
|
8876
8815
|
process.env.NODE_ENV === "development" && time && time`events-setup`, process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)("\u{1FAA9} events()", {
|
|
8877
8816
|
runtimeFocusStyle,
|
|
8878
8817
|
runtimePressStyle,
|
|
@@ -9041,8 +8980,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9041
8980
|
mediaListeningKeys,
|
|
9042
8981
|
pseudos,
|
|
9043
8982
|
shouldAttach,
|
|
9044
|
-
|
|
9045
|
-
shouldForcePseudo,
|
|
8983
|
+
noClass,
|
|
9046
8984
|
shouldListenForMedia,
|
|
9047
8985
|
splitStyles,
|
|
9048
8986
|
splitStylesStyle,
|
|
@@ -10911,22 +10849,14 @@ var require_index_native13 = __commonJS({
|
|
|
10911
10849
|
},
|
|
10912
10850
|
useDidFinishSSR: function() {
|
|
10913
10851
|
return useDidFinishSSR2;
|
|
10914
|
-
},
|
|
10915
|
-
useDidFinishSSRSync: function() {
|
|
10916
|
-
return useDidFinishSSRSync;
|
|
10917
10852
|
}
|
|
10918
10853
|
});
|
|
10919
10854
|
module2.exports = __toCommonJS2(src_exports2);
|
|
10920
10855
|
var React4 = __toESM2(require("react"));
|
|
10921
|
-
function useDidFinishSSR2(value
|
|
10856
|
+
function useDidFinishSSR2(value) {
|
|
10922
10857
|
return value ?? !0;
|
|
10923
10858
|
var cur, setCur;
|
|
10924
10859
|
}
|
|
10925
|
-
function useDidFinishSSRSync(value) {
|
|
10926
|
-
return useDidFinishSSR2(value, {
|
|
10927
|
-
sync: !0
|
|
10928
|
-
});
|
|
10929
|
-
}
|
|
10930
10860
|
function useClientValue(value) {
|
|
10931
10861
|
var done = useDidFinishSSR2();
|
|
10932
10862
|
return done ? typeof value == "function" ? value() : value : void 0;
|
|
@@ -11122,7 +11052,7 @@ var require_useProps_native = __commonJS({
|
|
|
11122
11052
|
mediaState: mediaState3,
|
|
11123
11053
|
noSkip: !0,
|
|
11124
11054
|
noMergeStyle: !0,
|
|
11125
|
-
|
|
11055
|
+
noClass: !0,
|
|
11126
11056
|
resolveValues: "auto",
|
|
11127
11057
|
...opts
|
|
11128
11058
|
}, null, componentContext), { mediaGroups, pseudoGroups } = splitStyles;
|
|
@@ -11493,10 +11423,10 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
11493
11423
|
}
|
|
11494
11424
|
});
|
|
11495
11425
|
module2.exports = __toCommonJS2(TamaguiProvider_exports);
|
|
11496
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(),
|
|
11426
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), import_ThemeProvider = require_ThemeProvider_native();
|
|
11497
11427
|
function TamaguiProvider2(param) {
|
|
11498
11428
|
var { children, disableInjectCSS, config, className, defaultTheme, disableRootThemeClass, reset, themeClassNameOnRoot } = param;
|
|
11499
|
-
return
|
|
11429
|
+
return process.env.TAMAGUI_REACT_19 || import_constants4.isClient && (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
11500
11430
|
if (config && !disableInjectCSS) {
|
|
11501
11431
|
var style = document.createElement("style");
|
|
11502
11432
|
return style.appendChild(document.createTextNode(config.getCSS())), document.head.appendChild(style), function() {
|
|
@@ -11654,6 +11584,9 @@ var require_index_native14 = __commonJS({
|
|
|
11654
11584
|
}), mod);
|
|
11655
11585
|
}, src_exports2 = {};
|
|
11656
11586
|
__export2(src_exports2, {
|
|
11587
|
+
_disableMediaTouch: function() {
|
|
11588
|
+
return import_useMedia._disableMediaTouch;
|
|
11589
|
+
},
|
|
11657
11590
|
configureMedia: function() {
|
|
11658
11591
|
return import_useMedia.configureMedia;
|
|
11659
11592
|
},
|
|
@@ -15596,9 +15529,9 @@ var require_index_native25 = __commonJS({
|
|
|
15596
15529
|
}
|
|
15597
15530
|
});
|
|
15598
15531
|
|
|
15599
|
-
// ../
|
|
15600
|
-
var
|
|
15601
|
-
"../
|
|
15532
|
+
// ../portal/dist/cjs/GorhomPortal.native.js
|
|
15533
|
+
var require_GorhomPortal_native = __commonJS({
|
|
15534
|
+
"../portal/dist/cjs/GorhomPortal.native.js"(exports2, module2) {
|
|
15602
15535
|
"use strict";
|
|
15603
15536
|
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
15604
15537
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -15644,112 +15577,277 @@ var require_Adapt_native = __commonJS({
|
|
|
15644
15577
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
15645
15578
|
value: !0
|
|
15646
15579
|
}), mod);
|
|
15647
|
-
},
|
|
15648
|
-
__export2(
|
|
15649
|
-
|
|
15650
|
-
return
|
|
15580
|
+
}, GorhomPortal_exports = {};
|
|
15581
|
+
__export2(GorhomPortal_exports, {
|
|
15582
|
+
ACTIONS: function() {
|
|
15583
|
+
return ACTIONS;
|
|
15651
15584
|
},
|
|
15652
|
-
|
|
15653
|
-
return
|
|
15585
|
+
INITIAL_STATE: function() {
|
|
15586
|
+
return INITIAL_STATE;
|
|
15587
|
+
},
|
|
15588
|
+
PortalHost: function() {
|
|
15589
|
+
return PortalHost;
|
|
15590
|
+
},
|
|
15591
|
+
PortalItem: function() {
|
|
15592
|
+
return PortalItem;
|
|
15654
15593
|
},
|
|
15655
|
-
|
|
15656
|
-
return
|
|
15594
|
+
PortalProvider: function() {
|
|
15595
|
+
return PortalProvider2;
|
|
15657
15596
|
},
|
|
15658
|
-
|
|
15659
|
-
return
|
|
15597
|
+
usePortal: function() {
|
|
15598
|
+
return usePortal;
|
|
15660
15599
|
}
|
|
15661
15600
|
});
|
|
15662
|
-
module2.exports = __toCommonJS2(
|
|
15663
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"),
|
|
15664
|
-
|
|
15665
|
-
|
|
15666
|
-
return
|
|
15667
|
-
}
|
|
15668
|
-
|
|
15669
|
-
|
|
15670
|
-
|
|
15671
|
-
|
|
15672
|
-
|
|
15673
|
-
|
|
15674
|
-
|
|
15675
|
-
|
|
15676
|
-
|
|
15677
|
-
|
|
15678
|
-
|
|
15679
|
-
|
|
15680
|
-
|
|
15681
|
-
return
|
|
15682
|
-
}
|
|
15683
|
-
|
|
15684
|
-
|
|
15601
|
+
module2.exports = __toCommonJS2(GorhomPortal_exports);
|
|
15602
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_start_transition = require_index_native9(), import_react3 = __toESM2(require("react")), import_react_dom = require("react-dom"), ACTIONS = /* @__PURE__ */ function(ACTIONS2) {
|
|
15603
|
+
return ACTIONS2[ACTIONS2.REGISTER_HOST = 0] = "REGISTER_HOST", ACTIONS2[ACTIONS2.DEREGISTER_HOST = 1] = "DEREGISTER_HOST", ACTIONS2[ACTIONS2.ADD_UPDATE_PORTAL = 2] = "ADD_UPDATE_PORTAL", ACTIONS2[ACTIONS2.REMOVE_PORTAL = 3] = "REMOVE_PORTAL", ACTIONS2;
|
|
15604
|
+
}(ACTIONS || {}), INITIAL_STATE = {}, registerHost = function(state, hostName) {
|
|
15605
|
+
return hostName in state || (state[hostName] = []), state;
|
|
15606
|
+
}, deregisterHost = function(state, hostName) {
|
|
15607
|
+
return delete state[hostName], state;
|
|
15608
|
+
}, addUpdatePortal = function(state, hostName, portalName, node) {
|
|
15609
|
+
hostName in state || (state = registerHost(state, hostName));
|
|
15610
|
+
var index = state[hostName].findIndex(function(item) {
|
|
15611
|
+
return item.name === portalName;
|
|
15612
|
+
});
|
|
15613
|
+
return index !== -1 ? state[hostName][index].node = node : state[hostName].push({
|
|
15614
|
+
name: portalName,
|
|
15615
|
+
node
|
|
15616
|
+
}), state;
|
|
15617
|
+
}, removePortal = function(state, hostName, portalName) {
|
|
15618
|
+
if (!(hostName in state)) return console.info(`Failed to remove portal '${portalName}', '${hostName}' was not registered!`), state;
|
|
15619
|
+
var index = state[hostName].findIndex(function(item) {
|
|
15620
|
+
return item.name === portalName;
|
|
15621
|
+
});
|
|
15622
|
+
return index !== -1 && state[hostName].splice(index, 1), state;
|
|
15623
|
+
}, reducer = function(state, action) {
|
|
15624
|
+
var { type } = action;
|
|
15625
|
+
switch (type) {
|
|
15626
|
+
case 0:
|
|
15627
|
+
return registerHost({
|
|
15628
|
+
...state
|
|
15629
|
+
}, action.hostName);
|
|
15630
|
+
case 1:
|
|
15631
|
+
return deregisterHost({
|
|
15632
|
+
...state
|
|
15633
|
+
}, action.hostName);
|
|
15634
|
+
case 2:
|
|
15635
|
+
return addUpdatePortal({
|
|
15636
|
+
...state
|
|
15637
|
+
}, action.hostName, action.portalName, action.node);
|
|
15638
|
+
case 3:
|
|
15639
|
+
return removePortal({
|
|
15640
|
+
...state
|
|
15641
|
+
}, action.hostName, action.portalName);
|
|
15642
|
+
default:
|
|
15643
|
+
return state;
|
|
15644
|
+
}
|
|
15645
|
+
}, PortalStateContext = /* @__PURE__ */ (0, import_react3.createContext)(null), PortalDispatchContext = /* @__PURE__ */ (0, import_react3.createContext)(null), usePortalState = function(hostName) {
|
|
15646
|
+
var state = (0, import_react3.useContext)(PortalStateContext);
|
|
15647
|
+
if (state === null) throw new Error("'PortalStateContext' cannot be null, please add 'PortalProvider' to the root component.");
|
|
15648
|
+
return state[hostName] || [];
|
|
15649
|
+
}, usePortal = function() {
|
|
15650
|
+
var hostName = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "root", dispatch = (0, import_react3.useContext)(PortalDispatchContext);
|
|
15651
|
+
if (dispatch === null) throw new Error("'PortalDispatchContext' cannot be null, please add 'PortalProvider' to the root component.");
|
|
15652
|
+
var registerHost2 = (0, import_react3.useCallback)(function() {
|
|
15653
|
+
dispatch({
|
|
15654
|
+
type: 0,
|
|
15655
|
+
hostName
|
|
15656
|
+
});
|
|
15657
|
+
}, []), deregisterHost2 = (0, import_react3.useCallback)(function() {
|
|
15658
|
+
dispatch({
|
|
15659
|
+
type: 1,
|
|
15660
|
+
hostName
|
|
15661
|
+
});
|
|
15662
|
+
}, []), addUpdatePortal2 = (0, import_react3.useCallback)(function(name, node) {
|
|
15663
|
+
dispatch({
|
|
15664
|
+
type: 2,
|
|
15665
|
+
hostName,
|
|
15666
|
+
portalName: name,
|
|
15667
|
+
node
|
|
15668
|
+
});
|
|
15669
|
+
}, []), removePortal2 = (0, import_react3.useCallback)(function(name) {
|
|
15670
|
+
dispatch({
|
|
15671
|
+
type: 3,
|
|
15672
|
+
hostName,
|
|
15673
|
+
portalName: name
|
|
15674
|
+
});
|
|
15675
|
+
}, []);
|
|
15685
15676
|
return {
|
|
15686
|
-
|
|
15687
|
-
|
|
15677
|
+
registerHost: registerHost2,
|
|
15678
|
+
deregisterHost: deregisterHost2,
|
|
15679
|
+
addPortal: addUpdatePortal2,
|
|
15680
|
+
updatePortal: addUpdatePortal2,
|
|
15681
|
+
removePortal: removePortal2
|
|
15688
15682
|
};
|
|
15689
|
-
},
|
|
15690
|
-
var {
|
|
15691
|
-
|
|
15692
|
-
|
|
15693
|
-
|
|
15694
|
-
|
|
15695
|
-
context == null || context.setWhen(null);
|
|
15683
|
+
}, PortalProviderComponent = function(param) {
|
|
15684
|
+
var { rootHostName = "root", shouldAddRootHost = !0, children } = param, [state, dispatch] = (0, import_react3.useReducer)(reducer, INITIAL_STATE), transitionDispatch = (0, import_react3.useMemo)(function() {
|
|
15685
|
+
var next = function(value) {
|
|
15686
|
+
(0, import_start_transition.startTransition)(function() {
|
|
15687
|
+
dispatch(value);
|
|
15688
|
+
});
|
|
15696
15689
|
};
|
|
15690
|
+
return next;
|
|
15697
15691
|
}, [
|
|
15698
|
-
|
|
15699
|
-
|
|
15700
|
-
|
|
15701
|
-
|
|
15702
|
-
|
|
15703
|
-
|
|
15704
|
-
|
|
15705
|
-
|
|
15706
|
-
|
|
15707
|
-
|
|
15708
|
-
|
|
15709
|
-
|
|
15710
|
-
|
|
15711
|
-
|
|
15712
|
-
|
|
15713
|
-
|
|
15714
|
-
|
|
15715
|
-
|
|
15716
|
-
|
|
15717
|
-
|
|
15718
|
-
|
|
15719
|
-
|
|
15720
|
-
|
|
15721
|
-
|
|
15722
|
-
|
|
15723
|
-
|
|
15724
|
-
|
|
15725
|
-
|
|
15726
|
-
|
|
15727
|
-
|
|
15728
|
-
|
|
15729
|
-
|
|
15730
|
-
|
|
15731
|
-
|
|
15732
|
-
}
|
|
15733
|
-
|
|
15734
|
-
|
|
15735
|
-
|
|
15736
|
-
}
|
|
15737
|
-
return
|
|
15738
|
-
|
|
15739
|
-
|
|
15692
|
+
dispatch
|
|
15693
|
+
]);
|
|
15694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalDispatchContext.Provider, {
|
|
15695
|
+
value: transitionDispatch,
|
|
15696
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(PortalStateContext.Provider, {
|
|
15697
|
+
value: state,
|
|
15698
|
+
children: [
|
|
15699
|
+
children,
|
|
15700
|
+
shouldAddRootHost && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalHost, {
|
|
15701
|
+
name: rootHostName
|
|
15702
|
+
})
|
|
15703
|
+
]
|
|
15704
|
+
})
|
|
15705
|
+
});
|
|
15706
|
+
}, PortalProvider2 = /* @__PURE__ */ (0, import_react3.memo)(PortalProviderComponent);
|
|
15707
|
+
PortalProvider2.displayName = "PortalProvider";
|
|
15708
|
+
var defaultRenderer = function(children) {
|
|
15709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
15710
|
+
children
|
|
15711
|
+
});
|
|
15712
|
+
}, PortalHost = /* @__PURE__ */ (0, import_react3.memo)(function(props) {
|
|
15713
|
+
return import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalHostWeb, {
|
|
15714
|
+
...props
|
|
15715
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalHostNonNative, {
|
|
15716
|
+
...props
|
|
15717
|
+
});
|
|
15718
|
+
}), allPortalHosts = /* @__PURE__ */ new Map();
|
|
15719
|
+
function PortalHostWeb(props) {
|
|
15720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
|
|
15721
|
+
style: {
|
|
15722
|
+
display: "contents"
|
|
15723
|
+
},
|
|
15724
|
+
ref: function(node) {
|
|
15725
|
+
node ? allPortalHosts.set(props.name, node) : allPortalHosts.delete(props.name);
|
|
15726
|
+
}
|
|
15727
|
+
});
|
|
15728
|
+
}
|
|
15729
|
+
function PortalHostNonNative(props) {
|
|
15730
|
+
var { name, forwardProps, render = defaultRenderer } = props, state = usePortalState(name), { registerHost: registerHost2, deregisterHost: deregisterHost2 } = usePortal(props.name);
|
|
15731
|
+
return (0, import_react3.useEffect)(function() {
|
|
15732
|
+
if (!(typeof window > "u")) return registerHost2(), function() {
|
|
15733
|
+
deregisterHost2();
|
|
15734
|
+
};
|
|
15735
|
+
}, []), render(forwardProps ? state.map(function(item) {
|
|
15736
|
+
var next = item.node, { children, ...restForwardProps } = forwardProps;
|
|
15737
|
+
return forwardProps ? import_react3.default.Children.map(next, function(child) {
|
|
15738
|
+
return /* @__PURE__ */ import_react3.default.isValidElement(child) ? /* @__PURE__ */ import_react3.default.cloneElement(child, {
|
|
15739
|
+
key: child.key,
|
|
15740
|
+
...restForwardProps
|
|
15741
|
+
}) : child;
|
|
15742
|
+
}) : next;
|
|
15743
|
+
}) : state.map(function(item) {
|
|
15744
|
+
return item.node;
|
|
15745
|
+
}));
|
|
15746
|
+
}
|
|
15747
|
+
var PortalItem = /* @__PURE__ */ (0, import_react3.memo)(function(props) {
|
|
15748
|
+
return import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalItemWeb, {
|
|
15749
|
+
...props
|
|
15750
|
+
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(NonNativePortalComponent, {
|
|
15751
|
+
...props
|
|
15752
|
+
});
|
|
15753
|
+
}), PortalItemWeb = function(props) {
|
|
15754
|
+
if (!props.hostName) throw new Error("No name");
|
|
15755
|
+
var hostNode = allPortalHosts.get(props.hostName);
|
|
15756
|
+
return hostNode ? /* @__PURE__ */ (0, import_react_dom.createPortal)(props.children, hostNode) : null;
|
|
15757
|
+
}, NonNativePortalComponent = function(props) {
|
|
15758
|
+
var { name: _providedName, hostName, handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passthrough } = props, { addPortal: addUpdatePortal2, removePortal: removePortal2 } = usePortal(hostName), id = (0, import_react3.useId)(), name = _providedName || id, handleOnMount = (0, import_core12.useEvent)(function() {
|
|
15759
|
+
_providedHandleOnMount ? _providedHandleOnMount(function() {
|
|
15760
|
+
return addUpdatePortal2(name, children);
|
|
15761
|
+
}) : addUpdatePortal2(name, children);
|
|
15762
|
+
}), handleOnUnmount = (0, import_core12.useEvent)(function() {
|
|
15763
|
+
_providedHandleOnUnmount ? _providedHandleOnUnmount(function() {
|
|
15764
|
+
return removePortal2(name);
|
|
15765
|
+
}) : removePortal2(name);
|
|
15766
|
+
}), handleOnUpdate = (0, import_core12.useEvent)(function() {
|
|
15767
|
+
_providedHandleOnUpdate ? _providedHandleOnUpdate(function() {
|
|
15768
|
+
return addUpdatePortal2(name, children);
|
|
15769
|
+
}) : addUpdatePortal2(name, children);
|
|
15770
|
+
});
|
|
15771
|
+
return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
15772
|
+
if (!passthrough) return handleOnMount(), function() {
|
|
15773
|
+
handleOnUnmount();
|
|
15774
|
+
};
|
|
15775
|
+
}, []), (0, import_react3.useEffect)(function() {
|
|
15776
|
+
passthrough || handleOnUpdate();
|
|
15777
|
+
}, [
|
|
15778
|
+
children
|
|
15779
|
+
]), passthrough ? children : null;
|
|
15780
|
+
};
|
|
15781
|
+
}
|
|
15782
|
+
});
|
|
15783
|
+
|
|
15784
|
+
// ../portal/dist/cjs/useStackedZIndex.native.js
|
|
15785
|
+
var require_useStackedZIndex_native = __commonJS({
|
|
15786
|
+
"../portal/dist/cjs/useStackedZIndex.native.js"(exports2, module2) {
|
|
15787
|
+
"use strict";
|
|
15788
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
15789
|
+
for (var name in all) __defProp2(target, name, {
|
|
15790
|
+
get: all[name],
|
|
15791
|
+
enumerable: !0
|
|
15792
|
+
});
|
|
15793
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
15794
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
15795
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
15796
|
+
for (var _loop = function() {
|
|
15797
|
+
var key = _step.value;
|
|
15798
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
15799
|
+
get: function() {
|
|
15800
|
+
return from[key];
|
|
15801
|
+
},
|
|
15802
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
15803
|
+
});
|
|
15804
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
15805
|
+
} catch (err) {
|
|
15806
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
15807
|
+
} finally {
|
|
15808
|
+
try {
|
|
15809
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
15810
|
+
} finally {
|
|
15811
|
+
if (_didIteratorError)
|
|
15812
|
+
throw _iteratorError;
|
|
15813
|
+
}
|
|
15814
|
+
}
|
|
15815
|
+
return to;
|
|
15740
15816
|
}, __toCommonJS2 = function(mod) {
|
|
15741
15817
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
15742
15818
|
value: !0
|
|
15743
15819
|
}), mod);
|
|
15744
|
-
},
|
|
15745
|
-
|
|
15746
|
-
|
|
15820
|
+
}, useStackedZIndex_exports = {};
|
|
15821
|
+
__export2(useStackedZIndex_exports, {
|
|
15822
|
+
useStackedZIndex: function() {
|
|
15823
|
+
return useStackedZIndex;
|
|
15824
|
+
}
|
|
15825
|
+
});
|
|
15826
|
+
module2.exports = __toCommonJS2(useStackedZIndex_exports);
|
|
15827
|
+
var import_react3 = require("react"), CurrentPortalZIndices = {}, useStackedZIndex = function(props) {
|
|
15828
|
+
var { stackZIndex, zIndex: zIndexProp = 1e3 } = props, zIndex = function() {
|
|
15829
|
+
if (stackZIndex) {
|
|
15830
|
+
var highest = Object.values(CurrentPortalZIndices).reduce(function(acc, cur) {
|
|
15831
|
+
return Math.max(acc, cur);
|
|
15832
|
+
}, 0);
|
|
15833
|
+
return Math.max(stackZIndex, highest + 1);
|
|
15834
|
+
}
|
|
15835
|
+
if (zIndexProp) return zIndexProp;
|
|
15836
|
+
}(), id = (0, import_react3.useId)();
|
|
15837
|
+
return (0, import_react3.useEffect)(function() {
|
|
15838
|
+
if (typeof zIndex == "number") return CurrentPortalZIndices[id] = zIndex, function() {
|
|
15839
|
+
delete CurrentPortalZIndices[id];
|
|
15840
|
+
};
|
|
15841
|
+
}, [
|
|
15842
|
+
zIndex
|
|
15843
|
+
]), zIndex;
|
|
15844
|
+
};
|
|
15747
15845
|
}
|
|
15748
15846
|
});
|
|
15749
15847
|
|
|
15750
|
-
//
|
|
15751
|
-
var
|
|
15752
|
-
"
|
|
15848
|
+
// ../portal/dist/cjs/Portal.native.js
|
|
15849
|
+
var require_Portal_native = __commonJS({
|
|
15850
|
+
"../portal/dist/cjs/Portal.native.js"(exports2, module2) {
|
|
15753
15851
|
"use strict";
|
|
15754
15852
|
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
15755
15853
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -15795,129 +15893,71 @@ var require_create_context_native = __commonJS({
|
|
|
15795
15893
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
15796
15894
|
value: !0
|
|
15797
15895
|
}), mod);
|
|
15798
|
-
},
|
|
15799
|
-
__export2(
|
|
15800
|
-
|
|
15801
|
-
return
|
|
15802
|
-
},
|
|
15803
|
-
createContextScope: function() {
|
|
15804
|
-
return createContextScope;
|
|
15896
|
+
}, Portal_native_exports = {};
|
|
15897
|
+
__export2(Portal_native_exports, {
|
|
15898
|
+
Portal: function() {
|
|
15899
|
+
return Portal;
|
|
15805
15900
|
}
|
|
15806
15901
|
});
|
|
15807
|
-
module2.exports = __toCommonJS2(
|
|
15808
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), React4 = __toESM2(require("react"));
|
|
15809
|
-
|
|
15810
|
-
|
|
15811
|
-
|
|
15812
|
-
|
|
15813
|
-
|
|
15814
|
-
|
|
15815
|
-
|
|
15816
|
-
|
|
15817
|
-
|
|
15818
|
-
|
|
15819
|
-
|
|
15820
|
-
|
|
15821
|
-
|
|
15822
|
-
|
|
15823
|
-
|
|
15824
|
-
|
|
15825
|
-
|
|
15826
|
-
|
|
15827
|
-
|
|
15828
|
-
|
|
15829
|
-
|
|
15830
|
-
|
|
15831
|
-
function
|
|
15832
|
-
var
|
|
15833
|
-
|
|
15834
|
-
var
|
|
15835
|
-
|
|
15836
|
-
|
|
15837
|
-
|
|
15838
|
-
|
|
15839
|
-
|
|
15840
|
-
|
|
15841
|
-
return context;
|
|
15842
|
-
}, Object.values(context));
|
|
15843
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Context.Provider, {
|
|
15844
|
-
value,
|
|
15845
|
-
children
|
|
15902
|
+
module2.exports = __toCommonJS2(Portal_native_exports);
|
|
15903
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_stacks3 = require_index_native21(), React4 = __toESM2(require("react")), import_react_native4 = require("react-native"), import_GorhomPortal = require_GorhomPortal_native(), import_useStackedZIndex = require_useStackedZIndex_native(), _global, isFabric = (_global = global) === null || _global === void 0 ? void 0 : _global.nativeFabricUIManager, createPortal;
|
|
15904
|
+
isFabric ? createPortal = require("react-native/Libraries/Renderer/shims/ReactFabric").createPortal : createPortal = require("react-native/Libraries/Renderer/shims/ReactNative").createPortal;
|
|
15905
|
+
var Portal = function(propsIn) {
|
|
15906
|
+
var { stackZIndex, ...props } = propsIn, rootTag = React4.useContext(import_react_native4.RootTagContext), zIndex = (0, import_useStackedZIndex.useStackedZIndex)(propsIn), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, {
|
|
15907
|
+
pointerEvents: "box-none",
|
|
15908
|
+
fullscreen: !0,
|
|
15909
|
+
position: "absolute",
|
|
15910
|
+
maxWidth: "100%",
|
|
15911
|
+
...props,
|
|
15912
|
+
zIndex
|
|
15913
|
+
});
|
|
15914
|
+
return process.env.TAMAGUI_USE_NATIVE_PORTAL === "false" || import_react_native4.Platform.OS === "android" || !rootTag ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_GorhomPortal.PortalItem, {
|
|
15915
|
+
hostName: "root",
|
|
15916
|
+
children: contents
|
|
15917
|
+
}) : createPortal(contents, rootTag);
|
|
15918
|
+
};
|
|
15919
|
+
}
|
|
15920
|
+
});
|
|
15921
|
+
|
|
15922
|
+
// ../portal/dist/cjs/PortalProps.native.js
|
|
15923
|
+
var require_PortalProps_native = __commonJS({
|
|
15924
|
+
"../portal/dist/cjs/PortalProps.native.js"(exports2, module2) {
|
|
15925
|
+
"use strict";
|
|
15926
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
15927
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
15928
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
15929
|
+
for (var _loop = function() {
|
|
15930
|
+
var key = _step.value;
|
|
15931
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
15932
|
+
get: function() {
|
|
15933
|
+
return from[key];
|
|
15934
|
+
},
|
|
15935
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
15846
15936
|
});
|
|
15937
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
15938
|
+
} catch (err) {
|
|
15939
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
15940
|
+
} finally {
|
|
15941
|
+
try {
|
|
15942
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
15943
|
+
} finally {
|
|
15944
|
+
if (_didIteratorError)
|
|
15945
|
+
throw _iteratorError;
|
|
15847
15946
|
}
|
|
15848
|
-
function useContext(consumerName, scope, options) {
|
|
15849
|
-
var _scope_scopeName, Context = (scope == null || (_scope_scopeName = scope[scopeName]) === null || _scope_scopeName === void 0 ? void 0 : _scope_scopeName[index]) || BaseContext, context = React4.useContext(Context);
|
|
15850
|
-
if (context) return context;
|
|
15851
|
-
if (defaultContext !== void 0) return defaultContext;
|
|
15852
|
-
var missingContextMessage = `\`${consumerName}\` must be used within \`${rootComponentName}\``;
|
|
15853
|
-
if (options != null && options.fallback) return (options == null ? void 0 : options.warn) !== !1 && console.warn(missingContextMessage), options.fallback;
|
|
15854
|
-
throw new Error(missingContextMessage);
|
|
15855
|
-
}
|
|
15856
|
-
return Provider.displayName = `${rootComponentName}Provider`, [
|
|
15857
|
-
Provider,
|
|
15858
|
-
useContext
|
|
15859
|
-
];
|
|
15860
15947
|
}
|
|
15861
|
-
|
|
15862
|
-
|
|
15863
|
-
|
|
15864
|
-
|
|
15865
|
-
|
|
15866
|
-
|
|
15867
|
-
|
|
15868
|
-
return {
|
|
15869
|
-
[`__scope${scopeName}`]: {
|
|
15870
|
-
...scope,
|
|
15871
|
-
[scopeName]: contexts
|
|
15872
|
-
}
|
|
15873
|
-
};
|
|
15874
|
-
}, [
|
|
15875
|
-
scope,
|
|
15876
|
-
contexts
|
|
15877
|
-
]);
|
|
15878
|
-
};
|
|
15879
|
-
};
|
|
15880
|
-
return createScope.scopeName = scopeName, [
|
|
15881
|
-
createContext2,
|
|
15882
|
-
composeContextScopes(createScope, ...createContextScopeDeps)
|
|
15883
|
-
];
|
|
15884
|
-
}
|
|
15885
|
-
function composeContextScopes() {
|
|
15886
|
-
for (var _len = arguments.length, scopes = new Array(_len), _key = 0; _key < _len; _key++) scopes[_key] = arguments[_key];
|
|
15887
|
-
var baseScope = scopes[0];
|
|
15888
|
-
if (scopes.length === 1) return baseScope;
|
|
15889
|
-
var createScope = function() {
|
|
15890
|
-
var scopeHooks = scopes.map(function(createScope22) {
|
|
15891
|
-
return {
|
|
15892
|
-
useScope: createScope22(),
|
|
15893
|
-
scopeName: createScope22.scopeName
|
|
15894
|
-
};
|
|
15895
|
-
});
|
|
15896
|
-
return function(overrideScopes) {
|
|
15897
|
-
var nextScopes = scopeHooks.reduce(function(nextScopes2, param) {
|
|
15898
|
-
var { useScope, scopeName } = param, scopeProps = useScope(overrideScopes), currentScope = scopeProps[`__scope${scopeName}`];
|
|
15899
|
-
return {
|
|
15900
|
-
...nextScopes2,
|
|
15901
|
-
...currentScope
|
|
15902
|
-
};
|
|
15903
|
-
}, {});
|
|
15904
|
-
return React4.useMemo(function() {
|
|
15905
|
-
return {
|
|
15906
|
-
[`__scope${baseScope.scopeName}`]: nextScopes
|
|
15907
|
-
};
|
|
15908
|
-
}, [
|
|
15909
|
-
nextScopes
|
|
15910
|
-
]);
|
|
15911
|
-
};
|
|
15912
|
-
};
|
|
15913
|
-
return createScope.scopeName = baseScope.scopeName, createScope;
|
|
15914
|
-
}
|
|
15948
|
+
return to;
|
|
15949
|
+
}, __toCommonJS2 = function(mod) {
|
|
15950
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
15951
|
+
value: !0
|
|
15952
|
+
}), mod);
|
|
15953
|
+
}, PortalProps_exports = {};
|
|
15954
|
+
module2.exports = __toCommonJS2(PortalProps_exports);
|
|
15915
15955
|
}
|
|
15916
15956
|
});
|
|
15917
15957
|
|
|
15918
|
-
//
|
|
15919
|
-
var
|
|
15920
|
-
"
|
|
15958
|
+
// ../portal/dist/cjs/index.native.js
|
|
15959
|
+
var require_index_native26 = __commonJS({
|
|
15960
|
+
"../portal/dist/cjs/index.native.js"(exports2, module2) {
|
|
15921
15961
|
"use strict";
|
|
15922
15962
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
15923
15963
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
@@ -15950,15 +15990,17 @@ var require_index_native27 = __commonJS({
|
|
|
15950
15990
|
}), mod);
|
|
15951
15991
|
}, src_exports2 = {};
|
|
15952
15992
|
module2.exports = __toCommonJS2(src_exports2);
|
|
15953
|
-
__reExport2(src_exports2,
|
|
15993
|
+
__reExport2(src_exports2, require_Portal_native(), module2.exports);
|
|
15994
|
+
__reExport2(src_exports2, require_PortalProps_native(), module2.exports);
|
|
15995
|
+
__reExport2(src_exports2, require_GorhomPortal_native(), module2.exports);
|
|
15954
15996
|
}
|
|
15955
15997
|
});
|
|
15956
15998
|
|
|
15957
|
-
//
|
|
15958
|
-
var
|
|
15959
|
-
"
|
|
15999
|
+
// ../adapt/dist/cjs/Adapt.native.js
|
|
16000
|
+
var require_Adapt_native = __commonJS({
|
|
16001
|
+
"../adapt/dist/cjs/Adapt.native.js"(exports2, module2) {
|
|
15960
16002
|
"use strict";
|
|
15961
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
16003
|
+
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
15962
16004
|
for (var name in all) __defProp2(target, name, {
|
|
15963
16005
|
get: all[name],
|
|
15964
16006
|
enumerable: !0
|
|
@@ -15986,25 +16028,151 @@ var require_AriaHidden_native = __commonJS({
|
|
|
15986
16028
|
}
|
|
15987
16029
|
}
|
|
15988
16030
|
return to;
|
|
16031
|
+
}, __toESM2 = function(mod, isNodeMode, target) {
|
|
16032
|
+
return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
16033
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
16034
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
16035
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
16036
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
16037
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
16038
|
+
value: mod,
|
|
16039
|
+
enumerable: !0
|
|
16040
|
+
}) : target,
|
|
16041
|
+
mod
|
|
16042
|
+
);
|
|
15989
16043
|
}, __toCommonJS2 = function(mod) {
|
|
15990
16044
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
15991
16045
|
value: !0
|
|
15992
16046
|
}), mod);
|
|
15993
|
-
},
|
|
15994
|
-
__export2(
|
|
15995
|
-
|
|
15996
|
-
return
|
|
16047
|
+
}, Adapt_exports = {};
|
|
16048
|
+
__export2(Adapt_exports, {
|
|
16049
|
+
Adapt: function() {
|
|
16050
|
+
return Adapt;
|
|
16051
|
+
},
|
|
16052
|
+
AdaptContents: function() {
|
|
16053
|
+
return AdaptContents;
|
|
16054
|
+
},
|
|
16055
|
+
AdaptContext: function() {
|
|
16056
|
+
return AdaptContext;
|
|
16057
|
+
},
|
|
16058
|
+
AdaptParent: function() {
|
|
16059
|
+
return AdaptParent;
|
|
16060
|
+
},
|
|
16061
|
+
AdaptPortalContents: function() {
|
|
16062
|
+
return AdaptPortalContents;
|
|
16063
|
+
},
|
|
16064
|
+
useAdaptContext: function() {
|
|
16065
|
+
return useAdaptContext;
|
|
16066
|
+
},
|
|
16067
|
+
useAdaptIsActive: function() {
|
|
16068
|
+
return useAdaptIsActive;
|
|
15997
16069
|
}
|
|
15998
16070
|
});
|
|
15999
|
-
module2.exports = __toCommonJS2(
|
|
16000
|
-
var
|
|
16071
|
+
module2.exports = __toCommonJS2(Adapt_exports);
|
|
16072
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_helpers = require_index_native7(), import_portal2 = require_index_native26(), import_react3 = __toESM2(require("react")), CurrentAdaptContextScope = /* @__PURE__ */ (0, import_react3.createContext)(""), AdaptContext = (0, import_core12.createStyledContext)({
|
|
16073
|
+
Contents: null,
|
|
16074
|
+
scopeName: "",
|
|
16075
|
+
portalName: "",
|
|
16076
|
+
platform: null,
|
|
16077
|
+
setPlatform: null,
|
|
16078
|
+
when: null,
|
|
16079
|
+
setChildren: null,
|
|
16080
|
+
setWhen: null
|
|
16081
|
+
}), ProvideAdaptContext = function(param) {
|
|
16082
|
+
var { children, ...context } = param, scope = context.scopeName || "";
|
|
16083
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CurrentAdaptContextScope.Provider, {
|
|
16084
|
+
value: scope,
|
|
16085
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AdaptContext.Provider, {
|
|
16086
|
+
scope,
|
|
16087
|
+
...context,
|
|
16088
|
+
children
|
|
16089
|
+
})
|
|
16090
|
+
});
|
|
16091
|
+
}, useAdaptContext = function() {
|
|
16092
|
+
var scope = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", contextScope = (0, import_react3.useContext)(CurrentAdaptContextScope), context = AdaptContext.useStyledContext(scope === "" && contextScope || scope);
|
|
16093
|
+
return context;
|
|
16094
|
+
}, AdaptPortals = /* @__PURE__ */ new Map(), AdaptParent = function(param) {
|
|
16095
|
+
var { children, Contents, scope, portal } = param, portalName = `AdaptPortal${scope}`, id = (0, import_react3.useId)(), FinalContents = Contents || AdaptPortals.get(id);
|
|
16096
|
+
FinalContents || (FinalContents = function() {
|
|
16097
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, {
|
|
16098
|
+
name: portalName,
|
|
16099
|
+
forwardProps: typeof portal == "boolean" || portal == null ? void 0 : portal.forwardProps
|
|
16100
|
+
});
|
|
16101
|
+
}, AdaptPortals.set(id, FinalContents)), (0, import_react3.useEffect)(function() {
|
|
16102
|
+
return function() {
|
|
16103
|
+
AdaptPortals.delete(id);
|
|
16104
|
+
};
|
|
16105
|
+
}, []);
|
|
16106
|
+
var [when, setWhen] = import_react3.default.useState(null), [platform2, setPlatform] = import_react3.default.useState(null), [children2, setChildren] = import_react3.default.useState(null);
|
|
16107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProvideAdaptContext, {
|
|
16108
|
+
Contents: FinalContents,
|
|
16109
|
+
when,
|
|
16110
|
+
platform: platform2,
|
|
16111
|
+
setPlatform,
|
|
16112
|
+
setWhen,
|
|
16113
|
+
setChildren,
|
|
16114
|
+
portalName,
|
|
16115
|
+
scopeName: scope,
|
|
16116
|
+
children
|
|
16117
|
+
});
|
|
16118
|
+
}, AdaptContents = function(param) {
|
|
16119
|
+
var { scope, ...rest } = param, context = useAdaptContext(scope);
|
|
16120
|
+
if (!(context != null && context.Contents)) throw new Error(process.env.NODE_ENV === "production" ? "tamagui.dev/docs/intro/errors#warning-002" : "You're rendering a Tamagui <Adapt /> component without nesting it inside a parent that is able to adapt.");
|
|
16121
|
+
return /* @__PURE__ */ import_react3.default.createElement(context.Contents, {
|
|
16122
|
+
...rest,
|
|
16123
|
+
key: "stable"
|
|
16124
|
+
});
|
|
16125
|
+
};
|
|
16126
|
+
AdaptContents.shouldForwardSpace = !0;
|
|
16127
|
+
var Adapt = (0, import_helpers.withStaticProperties)(function(props) {
|
|
16128
|
+
var { platform: platform2, when, children, scope } = props, context = useAdaptContext(scope), scopeName = scope ?? context.scopeName, enabled = useAdaptIsActiveGiven(props);
|
|
16129
|
+
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
16130
|
+
context == null || context.setWhen(when || enabled), context == null || context.setPlatform(platform2 || null);
|
|
16131
|
+
}, [
|
|
16132
|
+
when,
|
|
16133
|
+
platform2,
|
|
16134
|
+
context,
|
|
16135
|
+
enabled
|
|
16136
|
+
]), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
16137
|
+
return function() {
|
|
16138
|
+
context == null || context.setWhen(null);
|
|
16139
|
+
};
|
|
16140
|
+
}, []);
|
|
16141
|
+
var output;
|
|
16142
|
+
if (typeof children == "function") {
|
|
16143
|
+
var Component = context == null ? void 0 : context.Contents;
|
|
16144
|
+
output = children(Component ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Component, {}) : null);
|
|
16145
|
+
} else output = children;
|
|
16146
|
+
return (0, import_react3.useEffect)(function() {
|
|
16147
|
+
typeof children == "function" && output !== void 0 && (context == null || context.setChildren(output));
|
|
16148
|
+
}, [
|
|
16149
|
+
output
|
|
16150
|
+
]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CurrentAdaptContextScope.Provider, {
|
|
16151
|
+
value: scopeName,
|
|
16152
|
+
children: enabled ? output : null
|
|
16153
|
+
});
|
|
16154
|
+
}, {
|
|
16155
|
+
Contents: AdaptContents
|
|
16156
|
+
}), AdaptPortalContents = function(props) {
|
|
16157
|
+
var { portalName } = useAdaptContext(props.scope);
|
|
16158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
|
|
16159
|
+
// passthrough={!isWeb && !isActive}
|
|
16160
|
+
hostName: portalName,
|
|
16161
|
+
children: props.children
|
|
16162
|
+
});
|
|
16163
|
+
}, useAdaptIsActiveGiven = function(param) {
|
|
16164
|
+
var { when, platform: platform2 } = param, media = (0, import_core12.useMedia)(), enabled = !1;
|
|
16165
|
+
return platform2 === "touch" && (enabled = import_constants4.isTouchable), platform2 === "native" && (enabled = !import_constants4.isWeb), platform2 === "web" && (enabled = import_constants4.isWeb), platform2 === "ios" && (enabled = import_constants4.isIos), platform2 === "android" && (enabled = import_constants4.isAndroid), when && typeof when == "string" && !media[when] && (enabled = !1), enabled;
|
|
16166
|
+
}, useAdaptIsActive = function(scope) {
|
|
16167
|
+
var props = useAdaptContext(scope);
|
|
16168
|
+
return useAdaptIsActiveGiven(props);
|
|
16001
16169
|
};
|
|
16002
16170
|
}
|
|
16003
16171
|
});
|
|
16004
16172
|
|
|
16005
|
-
//
|
|
16006
|
-
var
|
|
16007
|
-
"
|
|
16173
|
+
// ../adapt/dist/cjs/index.native.js
|
|
16174
|
+
var require_index_native27 = __commonJS({
|
|
16175
|
+
"../adapt/dist/cjs/index.native.js"(exports2, module2) {
|
|
16008
16176
|
"use strict";
|
|
16009
16177
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
16010
16178
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
@@ -16037,13 +16205,13 @@ var require_index_native28 = __commonJS({
|
|
|
16037
16205
|
}), mod);
|
|
16038
16206
|
}, src_exports2 = {};
|
|
16039
16207
|
module2.exports = __toCommonJS2(src_exports2);
|
|
16040
|
-
__reExport2(src_exports2,
|
|
16208
|
+
__reExport2(src_exports2, require_Adapt_native(), module2.exports);
|
|
16041
16209
|
}
|
|
16042
16210
|
});
|
|
16043
16211
|
|
|
16044
|
-
//
|
|
16045
|
-
var
|
|
16046
|
-
"
|
|
16212
|
+
// ../../core/create-context/dist/cjs/create-context.native.js
|
|
16213
|
+
var require_create_context_native = __commonJS({
|
|
16214
|
+
"../../core/create-context/dist/cjs/create-context.native.js"(exports2, module2) {
|
|
16047
16215
|
"use strict";
|
|
16048
16216
|
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
16049
16217
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -16089,27 +16257,129 @@ var require_Dismissable_native = __commonJS({
|
|
|
16089
16257
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
16090
16258
|
value: !0
|
|
16091
16259
|
}), mod);
|
|
16092
|
-
},
|
|
16093
|
-
__export2(
|
|
16094
|
-
|
|
16095
|
-
return
|
|
16260
|
+
}, create_context_exports = {};
|
|
16261
|
+
__export2(create_context_exports, {
|
|
16262
|
+
createContext: function() {
|
|
16263
|
+
return createContext;
|
|
16096
16264
|
},
|
|
16097
|
-
|
|
16098
|
-
return
|
|
16265
|
+
createContextScope: function() {
|
|
16266
|
+
return createContextScope;
|
|
16099
16267
|
}
|
|
16100
16268
|
});
|
|
16101
|
-
module2.exports = __toCommonJS2(
|
|
16102
|
-
var
|
|
16103
|
-
|
|
16104
|
-
|
|
16105
|
-
|
|
16106
|
-
|
|
16269
|
+
module2.exports = __toCommonJS2(create_context_exports);
|
|
16270
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), React4 = __toESM2(require("react"));
|
|
16271
|
+
function createContext(rootComponentName, defaultContext) {
|
|
16272
|
+
var Context = /* @__PURE__ */ React4.createContext(defaultContext);
|
|
16273
|
+
function Provider(props) {
|
|
16274
|
+
var { children, ...context } = props, value = React4.useMemo(function() {
|
|
16275
|
+
return context;
|
|
16276
|
+
}, Object.values(context));
|
|
16277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Context.Provider, {
|
|
16278
|
+
value,
|
|
16279
|
+
children
|
|
16280
|
+
});
|
|
16281
|
+
}
|
|
16282
|
+
function useContext(consumerName) {
|
|
16283
|
+
var context = React4.useContext(Context);
|
|
16284
|
+
if (context) return context;
|
|
16285
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
16286
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
16287
|
+
}
|
|
16288
|
+
return Provider.displayName = `${rootComponentName}Provider`, [
|
|
16289
|
+
Provider,
|
|
16290
|
+
useContext
|
|
16291
|
+
];
|
|
16292
|
+
}
|
|
16293
|
+
function createContextScope(scopeName) {
|
|
16294
|
+
var createContextScopeDeps = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], defaultContexts = [];
|
|
16295
|
+
function createContext2(rootComponentName, defaultContext) {
|
|
16296
|
+
var BaseContext = /* @__PURE__ */ React4.createContext(defaultContext), index = defaultContexts.length;
|
|
16297
|
+
defaultContexts = [
|
|
16298
|
+
...defaultContexts,
|
|
16299
|
+
defaultContext
|
|
16300
|
+
];
|
|
16301
|
+
function Provider(props) {
|
|
16302
|
+
var _scope_scopeName, { scope, children, ...context } = props, Context = (scope == null || (_scope_scopeName = scope[scopeName]) === null || _scope_scopeName === void 0 ? void 0 : _scope_scopeName[index]) || BaseContext, value = React4.useMemo(function() {
|
|
16303
|
+
return context;
|
|
16304
|
+
}, Object.values(context));
|
|
16305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Context.Provider, {
|
|
16306
|
+
value,
|
|
16307
|
+
children
|
|
16308
|
+
});
|
|
16309
|
+
}
|
|
16310
|
+
function useContext(consumerName, scope, options) {
|
|
16311
|
+
var _scope_scopeName, Context = (scope == null || (_scope_scopeName = scope[scopeName]) === null || _scope_scopeName === void 0 ? void 0 : _scope_scopeName[index]) || BaseContext, context = React4.useContext(Context);
|
|
16312
|
+
if (context) return context;
|
|
16313
|
+
if (defaultContext !== void 0) return defaultContext;
|
|
16314
|
+
var missingContextMessage = `\`${consumerName}\` must be used within \`${rootComponentName}\``;
|
|
16315
|
+
if (options != null && options.fallback) return (options == null ? void 0 : options.warn) !== !1 && console.warn(missingContextMessage), options.fallback;
|
|
16316
|
+
throw new Error(missingContextMessage);
|
|
16317
|
+
}
|
|
16318
|
+
return Provider.displayName = `${rootComponentName}Provider`, [
|
|
16319
|
+
Provider,
|
|
16320
|
+
useContext
|
|
16321
|
+
];
|
|
16322
|
+
}
|
|
16323
|
+
var createScope = function() {
|
|
16324
|
+
var scopeContexts = defaultContexts.map(function(defaultContext) {
|
|
16325
|
+
return /* @__PURE__ */ React4.createContext(defaultContext);
|
|
16326
|
+
});
|
|
16327
|
+
return function(scope) {
|
|
16328
|
+
var contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
|
16329
|
+
return React4.useMemo(function() {
|
|
16330
|
+
return {
|
|
16331
|
+
[`__scope${scopeName}`]: {
|
|
16332
|
+
...scope,
|
|
16333
|
+
[scopeName]: contexts
|
|
16334
|
+
}
|
|
16335
|
+
};
|
|
16336
|
+
}, [
|
|
16337
|
+
scope,
|
|
16338
|
+
contexts
|
|
16339
|
+
]);
|
|
16340
|
+
};
|
|
16341
|
+
};
|
|
16342
|
+
return createScope.scopeName = scopeName, [
|
|
16343
|
+
createContext2,
|
|
16344
|
+
composeContextScopes(createScope, ...createContextScopeDeps)
|
|
16345
|
+
];
|
|
16346
|
+
}
|
|
16347
|
+
function composeContextScopes() {
|
|
16348
|
+
for (var _len = arguments.length, scopes = new Array(_len), _key = 0; _key < _len; _key++) scopes[_key] = arguments[_key];
|
|
16349
|
+
var baseScope = scopes[0];
|
|
16350
|
+
if (scopes.length === 1) return baseScope;
|
|
16351
|
+
var createScope = function() {
|
|
16352
|
+
var scopeHooks = scopes.map(function(createScope22) {
|
|
16353
|
+
return {
|
|
16354
|
+
useScope: createScope22(),
|
|
16355
|
+
scopeName: createScope22.scopeName
|
|
16356
|
+
};
|
|
16357
|
+
});
|
|
16358
|
+
return function(overrideScopes) {
|
|
16359
|
+
var nextScopes = scopeHooks.reduce(function(nextScopes2, param) {
|
|
16360
|
+
var { useScope, scopeName } = param, scopeProps = useScope(overrideScopes), currentScope = scopeProps[`__scope${scopeName}`];
|
|
16361
|
+
return {
|
|
16362
|
+
...nextScopes2,
|
|
16363
|
+
...currentScope
|
|
16364
|
+
};
|
|
16365
|
+
}, {});
|
|
16366
|
+
return React4.useMemo(function() {
|
|
16367
|
+
return {
|
|
16368
|
+
[`__scope${baseScope.scopeName}`]: nextScopes
|
|
16369
|
+
};
|
|
16370
|
+
}, [
|
|
16371
|
+
nextScopes
|
|
16372
|
+
]);
|
|
16373
|
+
};
|
|
16374
|
+
};
|
|
16375
|
+
return createScope.scopeName = baseScope.scopeName, createScope;
|
|
16376
|
+
}
|
|
16107
16377
|
}
|
|
16108
|
-
});
|
|
16109
|
-
|
|
16110
|
-
//
|
|
16111
|
-
var
|
|
16112
|
-
"
|
|
16378
|
+
});
|
|
16379
|
+
|
|
16380
|
+
// ../../core/create-context/dist/cjs/index.native.js
|
|
16381
|
+
var require_index_native28 = __commonJS({
|
|
16382
|
+
"../../core/create-context/dist/cjs/index.native.js"(exports2, module2) {
|
|
16113
16383
|
"use strict";
|
|
16114
16384
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
16115
16385
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
@@ -16142,15 +16412,15 @@ var require_index_native29 = __commonJS({
|
|
|
16142
16412
|
}), mod);
|
|
16143
16413
|
}, src_exports2 = {};
|
|
16144
16414
|
module2.exports = __toCommonJS2(src_exports2);
|
|
16145
|
-
__reExport2(src_exports2,
|
|
16415
|
+
__reExport2(src_exports2, require_create_context_native(), module2.exports);
|
|
16146
16416
|
}
|
|
16147
16417
|
});
|
|
16148
16418
|
|
|
16149
|
-
//
|
|
16150
|
-
var
|
|
16151
|
-
"
|
|
16419
|
+
// ../../core/aria-hidden/dist/cjs/AriaHidden.native.js
|
|
16420
|
+
var require_AriaHidden_native = __commonJS({
|
|
16421
|
+
"../../core/aria-hidden/dist/cjs/AriaHidden.native.js"(exports2, module2) {
|
|
16152
16422
|
"use strict";
|
|
16153
|
-
var
|
|
16423
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
16154
16424
|
for (var name in all) __defProp2(target, name, {
|
|
16155
16425
|
get: all[name],
|
|
16156
16426
|
enumerable: !0
|
|
@@ -16178,38 +16448,25 @@ var require_FocusScope_native = __commonJS({
|
|
|
16178
16448
|
}
|
|
16179
16449
|
}
|
|
16180
16450
|
return to;
|
|
16181
|
-
}, __toESM2 = function(mod, isNodeMode, target) {
|
|
16182
|
-
return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
16183
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
16184
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
16185
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
16186
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
16187
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
16188
|
-
value: mod,
|
|
16189
|
-
enumerable: !0
|
|
16190
|
-
}) : target,
|
|
16191
|
-
mod
|
|
16192
|
-
);
|
|
16193
16451
|
}, __toCommonJS2 = function(mod) {
|
|
16194
16452
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
16195
16453
|
value: !0
|
|
16196
16454
|
}), mod);
|
|
16197
|
-
},
|
|
16198
|
-
__export2(
|
|
16199
|
-
|
|
16200
|
-
return
|
|
16455
|
+
}, AriaHidden_native_exports = {};
|
|
16456
|
+
__export2(AriaHidden_native_exports, {
|
|
16457
|
+
hideOthers: function() {
|
|
16458
|
+
return hideOthers;
|
|
16201
16459
|
}
|
|
16202
16460
|
});
|
|
16203
|
-
module2.exports = __toCommonJS2(
|
|
16204
|
-
var
|
|
16205
|
-
|
|
16206
|
-
});
|
|
16461
|
+
module2.exports = __toCommonJS2(AriaHidden_native_exports);
|
|
16462
|
+
var hideOthers = function() {
|
|
16463
|
+
};
|
|
16207
16464
|
}
|
|
16208
16465
|
});
|
|
16209
16466
|
|
|
16210
|
-
//
|
|
16211
|
-
var
|
|
16212
|
-
"
|
|
16467
|
+
// ../../core/aria-hidden/dist/cjs/index.native.js
|
|
16468
|
+
var require_index_native29 = __commonJS({
|
|
16469
|
+
"../../core/aria-hidden/dist/cjs/index.native.js"(exports2, module2) {
|
|
16213
16470
|
"use strict";
|
|
16214
16471
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
16215
16472
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
@@ -16242,13 +16499,13 @@ var require_index_native30 = __commonJS({
|
|
|
16242
16499
|
}), mod);
|
|
16243
16500
|
}, src_exports2 = {};
|
|
16244
16501
|
module2.exports = __toCommonJS2(src_exports2);
|
|
16245
|
-
__reExport2(src_exports2,
|
|
16502
|
+
__reExport2(src_exports2, require_AriaHidden_native(), module2.exports);
|
|
16246
16503
|
}
|
|
16247
16504
|
});
|
|
16248
16505
|
|
|
16249
|
-
// ../
|
|
16250
|
-
var
|
|
16251
|
-
"../
|
|
16506
|
+
// ../dismissable/dist/cjs/Dismissable.native.js
|
|
16507
|
+
var require_Dismissable_native = __commonJS({
|
|
16508
|
+
"../dismissable/dist/cjs/Dismissable.native.js"(exports2, module2) {
|
|
16252
16509
|
"use strict";
|
|
16253
16510
|
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
16254
16511
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -16294,195 +16551,29 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
16294
16551
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
16295
16552
|
value: !0
|
|
16296
16553
|
}), mod);
|
|
16297
|
-
},
|
|
16298
|
-
__export2(
|
|
16299
|
-
|
|
16300
|
-
return
|
|
16301
|
-
},
|
|
16302
|
-
INITIAL_STATE: function() {
|
|
16303
|
-
return INITIAL_STATE;
|
|
16304
|
-
},
|
|
16305
|
-
PortalHost: function() {
|
|
16306
|
-
return PortalHost;
|
|
16307
|
-
},
|
|
16308
|
-
PortalItem: function() {
|
|
16309
|
-
return PortalItem;
|
|
16310
|
-
},
|
|
16311
|
-
PortalProvider: function() {
|
|
16312
|
-
return PortalProvider2;
|
|
16554
|
+
}, Dismissable_native_exports = {};
|
|
16555
|
+
__export2(Dismissable_native_exports, {
|
|
16556
|
+
Dismissable: function() {
|
|
16557
|
+
return Dismissable;
|
|
16313
16558
|
},
|
|
16314
|
-
|
|
16315
|
-
return
|
|
16559
|
+
DismissableBranch: function() {
|
|
16560
|
+
return DismissableBranch;
|
|
16316
16561
|
}
|
|
16317
16562
|
});
|
|
16318
|
-
module2.exports = __toCommonJS2(
|
|
16319
|
-
var
|
|
16320
|
-
return
|
|
16321
|
-
}
|
|
16322
|
-
return
|
|
16323
|
-
}
|
|
16324
|
-
return delete state[hostName], state;
|
|
16325
|
-
}, addUpdatePortal = function(state, hostName, portalName, node) {
|
|
16326
|
-
hostName in state || (state = registerHost(state, hostName));
|
|
16327
|
-
var index = state[hostName].findIndex(function(item) {
|
|
16328
|
-
return item.name === portalName;
|
|
16329
|
-
});
|
|
16330
|
-
return index !== -1 ? state[hostName][index].node = node : state[hostName].push({
|
|
16331
|
-
name: portalName,
|
|
16332
|
-
node
|
|
16333
|
-
}), state;
|
|
16334
|
-
}, removePortal = function(state, hostName, portalName) {
|
|
16335
|
-
if (!(hostName in state)) return console.info(`Failed to remove portal '${portalName}', '${hostName}' was not registered!`), state;
|
|
16336
|
-
var index = state[hostName].findIndex(function(item) {
|
|
16337
|
-
return item.name === portalName;
|
|
16338
|
-
});
|
|
16339
|
-
return index !== -1 && state[hostName].splice(index, 1), state;
|
|
16340
|
-
}, reducer = function(state, action) {
|
|
16341
|
-
var { type } = action;
|
|
16342
|
-
switch (type) {
|
|
16343
|
-
case 0:
|
|
16344
|
-
return registerHost({
|
|
16345
|
-
...state
|
|
16346
|
-
}, action.hostName);
|
|
16347
|
-
case 1:
|
|
16348
|
-
return deregisterHost({
|
|
16349
|
-
...state
|
|
16350
|
-
}, action.hostName);
|
|
16351
|
-
case 2:
|
|
16352
|
-
return addUpdatePortal({
|
|
16353
|
-
...state
|
|
16354
|
-
}, action.hostName, action.portalName, action.node);
|
|
16355
|
-
case 3:
|
|
16356
|
-
return removePortal({
|
|
16357
|
-
...state
|
|
16358
|
-
}, action.hostName, action.portalName);
|
|
16359
|
-
default:
|
|
16360
|
-
return state;
|
|
16361
|
-
}
|
|
16362
|
-
}, PortalStateContext = /* @__PURE__ */ (0, import_react3.createContext)(null), PortalDispatchContext = /* @__PURE__ */ (0, import_react3.createContext)(null), usePortalState = function(hostName) {
|
|
16363
|
-
var state = (0, import_react3.useContext)(PortalStateContext);
|
|
16364
|
-
if (state === null) throw new Error("'PortalStateContext' cannot be null, please add 'PortalProvider' to the root component.");
|
|
16365
|
-
return state[hostName] || [];
|
|
16366
|
-
}, usePortal = function() {
|
|
16367
|
-
var hostName = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "root", dispatch = (0, import_react3.useContext)(PortalDispatchContext);
|
|
16368
|
-
if (dispatch === null) throw new Error("'PortalDispatchContext' cannot be null, please add 'PortalProvider' to the root component.");
|
|
16369
|
-
var registerHost2 = (0, import_react3.useCallback)(function() {
|
|
16370
|
-
dispatch({
|
|
16371
|
-
type: 0,
|
|
16372
|
-
hostName
|
|
16373
|
-
});
|
|
16374
|
-
}, []), deregisterHost2 = (0, import_react3.useCallback)(function() {
|
|
16375
|
-
dispatch({
|
|
16376
|
-
type: 1,
|
|
16377
|
-
hostName
|
|
16378
|
-
});
|
|
16379
|
-
}, []), addUpdatePortal2 = (0, import_react3.useCallback)(function(name, node) {
|
|
16380
|
-
dispatch({
|
|
16381
|
-
type: 2,
|
|
16382
|
-
hostName,
|
|
16383
|
-
portalName: name,
|
|
16384
|
-
node
|
|
16385
|
-
});
|
|
16386
|
-
}, []), removePortal2 = (0, import_react3.useCallback)(function(name) {
|
|
16387
|
-
dispatch({
|
|
16388
|
-
type: 3,
|
|
16389
|
-
hostName,
|
|
16390
|
-
portalName: name
|
|
16391
|
-
});
|
|
16392
|
-
}, []);
|
|
16393
|
-
return {
|
|
16394
|
-
registerHost: registerHost2,
|
|
16395
|
-
deregisterHost: deregisterHost2,
|
|
16396
|
-
addPortal: addUpdatePortal2,
|
|
16397
|
-
updatePortal: addUpdatePortal2,
|
|
16398
|
-
removePortal: removePortal2
|
|
16399
|
-
};
|
|
16400
|
-
}, PortalProviderComponent = function(param) {
|
|
16401
|
-
var { rootHostName = "root", shouldAddRootHost = !0, children } = param, [state, dispatch] = (0, import_react3.useReducer)(reducer, INITIAL_STATE), transitionDispatch = (0, import_react3.useMemo)(function() {
|
|
16402
|
-
var next = function(value) {
|
|
16403
|
-
(0, import_start_transition.startTransition)(function() {
|
|
16404
|
-
dispatch(value);
|
|
16405
|
-
});
|
|
16406
|
-
};
|
|
16407
|
-
return next;
|
|
16408
|
-
}, [
|
|
16409
|
-
dispatch
|
|
16410
|
-
]);
|
|
16411
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalDispatchContext.Provider, {
|
|
16412
|
-
value: transitionDispatch,
|
|
16413
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(PortalStateContext.Provider, {
|
|
16414
|
-
value: state,
|
|
16415
|
-
children: [
|
|
16416
|
-
children,
|
|
16417
|
-
shouldAddRootHost && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalHost, {
|
|
16418
|
-
name: rootHostName
|
|
16419
|
-
})
|
|
16420
|
-
]
|
|
16421
|
-
})
|
|
16422
|
-
});
|
|
16423
|
-
}, PortalProvider2 = /* @__PURE__ */ (0, import_react3.memo)(PortalProviderComponent);
|
|
16424
|
-
PortalProvider2.displayName = "PortalProvider";
|
|
16425
|
-
var defaultRenderer = function(children) {
|
|
16426
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
16427
|
-
children
|
|
16428
|
-
});
|
|
16429
|
-
}, PortalHostComponent = function(props) {
|
|
16430
|
-
var { name, forwardProps, render = defaultRenderer } = props, state = usePortalState(name), { registerHost: registerHost2, deregisterHost: deregisterHost2 } = usePortal(props.name);
|
|
16431
|
-
return (0, import_react3.useEffect)(function() {
|
|
16432
|
-
if (!(typeof window > "u")) return registerHost2(), function() {
|
|
16433
|
-
deregisterHost2();
|
|
16434
|
-
};
|
|
16435
|
-
}, []), render(forwardProps ? state.map(function(item) {
|
|
16436
|
-
var next = item.node;
|
|
16437
|
-
return forwardProps ? import_react3.default.Children.map(next, function(child) {
|
|
16438
|
-
return /* @__PURE__ */ import_react3.default.isValidElement(child) ? /* @__PURE__ */ import_react3.default.cloneElement(child, {
|
|
16439
|
-
key: child.key,
|
|
16440
|
-
...forwardProps
|
|
16441
|
-
}) : child;
|
|
16442
|
-
}) : next;
|
|
16443
|
-
}) : state.map(function(item) {
|
|
16444
|
-
return item.node;
|
|
16445
|
-
}));
|
|
16446
|
-
}, PortalHost = /* @__PURE__ */ (0, import_react3.memo)(PortalHostComponent);
|
|
16447
|
-
PortalHost.displayName = "PortalHost";
|
|
16448
|
-
var PortalComponent = function(props) {
|
|
16449
|
-
var { name: _providedName, hostName, handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children } = props, { addPortal: addUpdatePortal2, removePortal: removePortal2 } = usePortal(hostName), id = (0, import_react3.useId)(), name = _providedName || id, handleOnMount = (0, import_core12.useEvent)(function() {
|
|
16450
|
-
_providedHandleOnMount ? _providedHandleOnMount(function() {
|
|
16451
|
-
return addUpdatePortal2(name, children);
|
|
16452
|
-
}) : addUpdatePortal2(name, children);
|
|
16453
|
-
}), handleOnUnmount = (0, import_core12.useEvent)(function() {
|
|
16454
|
-
_providedHandleOnUnmount ? _providedHandleOnUnmount(function() {
|
|
16455
|
-
return removePortal2(name);
|
|
16456
|
-
}) : removePortal2(name);
|
|
16457
|
-
}), handleOnUpdate = (0, import_core12.useEvent)(function() {
|
|
16458
|
-
_providedHandleOnUpdate ? _providedHandleOnUpdate(function() {
|
|
16459
|
-
return addUpdatePortal2(name, children);
|
|
16460
|
-
}) : addUpdatePortal2(name, children);
|
|
16461
|
-
});
|
|
16462
|
-
return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
16463
|
-
return handleOnMount(), function() {
|
|
16464
|
-
handleOnUnmount();
|
|
16465
|
-
};
|
|
16466
|
-
}, []), (0, import_react3.useEffect)(function() {
|
|
16467
|
-
handleOnUpdate();
|
|
16468
|
-
}, [
|
|
16469
|
-
children
|
|
16470
|
-
]), null;
|
|
16471
|
-
}, PortalItem = /* @__PURE__ */ (0, import_react3.memo)(PortalComponent);
|
|
16472
|
-
PortalItem.displayName = "Portal";
|
|
16563
|
+
module2.exports = __toCommonJS2(Dismissable_native_exports);
|
|
16564
|
+
var import_react3 = __toESM2(require("react")), Dismissable = /* @__PURE__ */ import_react3.default.forwardRef(function(props, _ref) {
|
|
16565
|
+
return props.children;
|
|
16566
|
+
}), DismissableBranch = /* @__PURE__ */ import_react3.default.forwardRef(function(props, _ref) {
|
|
16567
|
+
return props.children;
|
|
16568
|
+
});
|
|
16473
16569
|
}
|
|
16474
16570
|
});
|
|
16475
16571
|
|
|
16476
|
-
// ../
|
|
16477
|
-
var
|
|
16478
|
-
"../
|
|
16572
|
+
// ../dismissable/dist/cjs/index.native.js
|
|
16573
|
+
var require_index_native30 = __commonJS({
|
|
16574
|
+
"../dismissable/dist/cjs/index.native.js"(exports2, module2) {
|
|
16479
16575
|
"use strict";
|
|
16480
|
-
var
|
|
16481
|
-
for (var name in all) __defProp2(target, name, {
|
|
16482
|
-
get: all[name],
|
|
16483
|
-
enumerable: !0
|
|
16484
|
-
});
|
|
16485
|
-
}, __copyProps2 = function(to, from, except, desc) {
|
|
16576
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
16486
16577
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
16487
16578
|
if (from && typeof from == "object" || typeof from == "function") try {
|
|
16488
16579
|
for (var _loop = function() {
|
|
@@ -16505,53 +16596,28 @@ var require_Portal_native = __commonJS({
|
|
|
16505
16596
|
}
|
|
16506
16597
|
}
|
|
16507
16598
|
return to;
|
|
16508
|
-
},
|
|
16509
|
-
return target
|
|
16510
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
16511
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
16512
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
16513
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
16514
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
16515
|
-
value: mod,
|
|
16516
|
-
enumerable: !0
|
|
16517
|
-
}) : target,
|
|
16518
|
-
mod
|
|
16519
|
-
);
|
|
16599
|
+
}, __reExport2 = function(target, mod, secondTarget) {
|
|
16600
|
+
return __copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default");
|
|
16520
16601
|
}, __toCommonJS2 = function(mod) {
|
|
16521
16602
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
16522
16603
|
value: !0
|
|
16523
16604
|
}), mod);
|
|
16524
|
-
},
|
|
16525
|
-
|
|
16526
|
-
|
|
16527
|
-
return Portal;
|
|
16528
|
-
}
|
|
16529
|
-
});
|
|
16530
|
-
module2.exports = __toCommonJS2(Portal_native_exports);
|
|
16531
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_stacks3 = require_index_native21(), React4 = __toESM2(require("react")), import_react_native4 = require("react-native"), import_GorhomPortal = require_GorhomPortal_native(), _global, isFabric = (_global = global) === null || _global === void 0 ? void 0 : _global.nativeFabricUIManager, createPortal;
|
|
16532
|
-
isFabric ? createPortal = require("react-native/Libraries/Renderer/shims/ReactFabric").createPortal : createPortal = require("react-native/Libraries/Renderer/shims/ReactNative").createPortal;
|
|
16533
|
-
var Portal = function(props) {
|
|
16534
|
-
var rootTag = React4.useContext(import_react_native4.RootTagContext), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, {
|
|
16535
|
-
pointerEvents: "box-none",
|
|
16536
|
-
fullscreen: !0,
|
|
16537
|
-
position: "absolute",
|
|
16538
|
-
maxWidth: "100%",
|
|
16539
|
-
zIndex: 1e5,
|
|
16540
|
-
...props
|
|
16541
|
-
});
|
|
16542
|
-
return process.env.TAMAGUI_USE_NATIVE_PORTAL === "false" || import_react_native4.Platform.OS === "android" || !rootTag ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_GorhomPortal.PortalItem, {
|
|
16543
|
-
hostName: "root",
|
|
16544
|
-
children: contents
|
|
16545
|
-
}) : createPortal(contents, rootTag);
|
|
16546
|
-
};
|
|
16605
|
+
}, src_exports2 = {};
|
|
16606
|
+
module2.exports = __toCommonJS2(src_exports2);
|
|
16607
|
+
__reExport2(src_exports2, require_Dismissable_native(), module2.exports);
|
|
16547
16608
|
}
|
|
16548
16609
|
});
|
|
16549
16610
|
|
|
16550
|
-
// ../
|
|
16551
|
-
var
|
|
16552
|
-
"../
|
|
16611
|
+
// ../focus-scope/dist/cjs/FocusScope.native.js
|
|
16612
|
+
var require_FocusScope_native = __commonJS({
|
|
16613
|
+
"../focus-scope/dist/cjs/FocusScope.native.js"(exports2, module2) {
|
|
16553
16614
|
"use strict";
|
|
16554
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty,
|
|
16615
|
+
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
16616
|
+
for (var name in all) __defProp2(target, name, {
|
|
16617
|
+
get: all[name],
|
|
16618
|
+
enumerable: !0
|
|
16619
|
+
});
|
|
16620
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
16555
16621
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
16556
16622
|
if (from && typeof from == "object" || typeof from == "function") try {
|
|
16557
16623
|
for (var _loop = function() {
|
|
@@ -16574,18 +16640,38 @@ var require_PortalProps_native = __commonJS({
|
|
|
16574
16640
|
}
|
|
16575
16641
|
}
|
|
16576
16642
|
return to;
|
|
16643
|
+
}, __toESM2 = function(mod, isNodeMode, target) {
|
|
16644
|
+
return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
16645
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
16646
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
16647
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
16648
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
16649
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
16650
|
+
value: mod,
|
|
16651
|
+
enumerable: !0
|
|
16652
|
+
}) : target,
|
|
16653
|
+
mod
|
|
16654
|
+
);
|
|
16577
16655
|
}, __toCommonJS2 = function(mod) {
|
|
16578
16656
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
16579
16657
|
value: !0
|
|
16580
16658
|
}), mod);
|
|
16581
|
-
},
|
|
16582
|
-
|
|
16659
|
+
}, FocusScope_native_exports = {};
|
|
16660
|
+
__export2(FocusScope_native_exports, {
|
|
16661
|
+
FocusScope: function() {
|
|
16662
|
+
return FocusScope;
|
|
16663
|
+
}
|
|
16664
|
+
});
|
|
16665
|
+
module2.exports = __toCommonJS2(FocusScope_native_exports);
|
|
16666
|
+
var import_react3 = __toESM2(require("react")), FocusScope = /* @__PURE__ */ import_react3.default.forwardRef(function(props, _ref) {
|
|
16667
|
+
return props.children;
|
|
16668
|
+
});
|
|
16583
16669
|
}
|
|
16584
16670
|
});
|
|
16585
16671
|
|
|
16586
|
-
// ../
|
|
16672
|
+
// ../focus-scope/dist/cjs/index.native.js
|
|
16587
16673
|
var require_index_native31 = __commonJS({
|
|
16588
|
-
"../
|
|
16674
|
+
"../focus-scope/dist/cjs/index.native.js"(exports2, module2) {
|
|
16589
16675
|
"use strict";
|
|
16590
16676
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
16591
16677
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
@@ -16618,9 +16704,7 @@ var require_index_native31 = __commonJS({
|
|
|
16618
16704
|
}), mod);
|
|
16619
16705
|
}, src_exports2 = {};
|
|
16620
16706
|
module2.exports = __toCommonJS2(src_exports2);
|
|
16621
|
-
__reExport2(src_exports2,
|
|
16622
|
-
__reExport2(src_exports2, require_PortalProps_native(), module2.exports);
|
|
16623
|
-
__reExport2(src_exports2, require_GorhomPortal_native(), module2.exports);
|
|
16707
|
+
__reExport2(src_exports2, require_FocusScope_native(), module2.exports);
|
|
16624
16708
|
}
|
|
16625
16709
|
});
|
|
16626
16710
|
|
|
@@ -16820,7 +16904,7 @@ var require_SheetContext_native = __commonJS({
|
|
|
16820
16904
|
}
|
|
16821
16905
|
});
|
|
16822
16906
|
module2.exports = __toCommonJS2(SheetContext_exports);
|
|
16823
|
-
var import_create_context =
|
|
16907
|
+
var import_create_context = require_index_native28(), import_constants4 = require_constants_native3(), [createSheetContext, createSheetScope2] = (0, import_create_context.createContextScope)(import_constants4.SHEET_NAME), [SheetProvider, useSheetContext] = createSheetContext(import_constants4.SHEET_NAME, {});
|
|
16824
16908
|
}
|
|
16825
16909
|
});
|
|
16826
16910
|
|
|
@@ -17163,29 +17247,42 @@ var require_nativeSheet_native = __commonJS({
|
|
|
17163
17247
|
function getNativeSheet(platform2) {
|
|
17164
17248
|
return nativeSheets[platform2];
|
|
17165
17249
|
}
|
|
17166
|
-
function setupNativeSheet(platform2,
|
|
17250
|
+
function setupNativeSheet(platform2, RNIOSModal) {
|
|
17251
|
+
var { ModalSheetView, ModalSheetViewMainContent } = RNIOSModal;
|
|
17167
17252
|
platform2 === "ios" && (nativeSheets[platform2] = function(props) {
|
|
17168
17253
|
var state = (0, import_useSheetOpenState.useSheetOpenState)(props), providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state), { open, setOpen } = state, ref = (0, import_react3.useRef)();
|
|
17169
|
-
|
|
17170
|
-
|
|
17171
|
-
|
|
17254
|
+
(0, import_react3.useEffect)(function() {
|
|
17255
|
+
if (open) {
|
|
17256
|
+
var _ref_current;
|
|
17257
|
+
(_ref_current = ref.current) === null || _ref_current === void 0 || _ref_current.presentModal();
|
|
17258
|
+
} else {
|
|
17259
|
+
var _ref_current1;
|
|
17260
|
+
(_ref_current1 = ref.current) === null || _ref_current1 === void 0 || _ref_current1.dismissModal();
|
|
17261
|
+
}
|
|
17172
17262
|
}, [
|
|
17173
17263
|
open
|
|
17174
|
-
])
|
|
17264
|
+
]);
|
|
17265
|
+
function setOpenInternal(next) {
|
|
17266
|
+
var _props_onOpenChange;
|
|
17267
|
+
(_props_onOpenChange = props.onOpenChange) === null || _props_onOpenChange === void 0 || _props_onOpenChange.call(props, open), setOpen(next);
|
|
17268
|
+
}
|
|
17269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
17175
17270
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_SheetContext.SheetProvider, {
|
|
17176
17271
|
...providerProps,
|
|
17177
17272
|
onlyShowFrame: !0,
|
|
17178
17273
|
children: [
|
|
17179
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
17274
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ModalSheetView, {
|
|
17180
17275
|
ref,
|
|
17181
|
-
|
|
17182
|
-
return
|
|
17276
|
+
onModalDidDismiss: function() {
|
|
17277
|
+
return setOpenInternal(!1);
|
|
17183
17278
|
},
|
|
17184
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
17185
|
-
|
|
17186
|
-
|
|
17187
|
-
|
|
17188
|
-
|
|
17279
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ModalSheetViewMainContent, {
|
|
17280
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_native4.View, {
|
|
17281
|
+
style: {
|
|
17282
|
+
flex: 1
|
|
17283
|
+
},
|
|
17284
|
+
children: props.children
|
|
17285
|
+
})
|
|
17189
17286
|
})
|
|
17190
17287
|
}),
|
|
17191
17288
|
/* for some reason select triggers wont show on native if this isn't inside the actual tree not inside implementation... */
|
|
@@ -17379,10 +17476,10 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
17379
17476
|
}
|
|
17380
17477
|
});
|
|
17381
17478
|
module2.exports = __toCommonJS2(SheetImplementationCustom_exports);
|
|
17382
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"),
|
|
17479
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_animate_presence = require_index_native4(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_portal2 = require_index_native26(), import_react3 = __toESM2(require("react")), import_react_native4 = require("react-native"), import_contexts = require_contexts_native(), import_helpers = require_helpers_native(), import_SheetContext = require_SheetContext_native(), import_useSheetOpenState = require_useSheetOpenState_native(), import_useSheetProviderProps = require_useSheetProviderProps_native(), hiddenSize = 10000.1, sheetHiddenStyleSheet = null, relativeDimensionTo = import_constants4.isWeb ? "window" : "screen", SheetImplementationCustom = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
17383
17480
|
var parentSheet = import_react3.default.useContext(import_contexts.ParentSheetContext), { animation, animationConfig: animationConfigProp, modal = !1, zIndex = parentSheet.zIndex + 1, moveOnKeyboardChange = !1, unmountChildrenWhenHidden = !1, portalProps, containerComponent: ContainerComponent = import_react3.default.Fragment } = props, state = (0, import_useSheetOpenState.useSheetOpenState)(props), [overlayComponent, setOverlayComponent] = import_react3.default.useState(null), providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state, {
|
|
17384
17481
|
onOverlayComponent: setOverlayComponent
|
|
17385
|
-
}), { frameSize, setFrameSize, snapPoints, snapPointsMode, hasFit, position, setPosition, scrollBridge, screenSize, setMaxContentSize, maxSnapPoint } = providerProps, { open, controller, isHidden } = state, sheetRef = import_react3.default.useRef(null), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, sheetRef), animationConfig = function() {
|
|
17482
|
+
}), { frameSize, setFrameSize, snapPoints, snapPointsMode, hasFit, position, setPosition, scrollBridge, screenSize, setMaxContentSize, maxSnapPoint } = providerProps, { open, controller, isHidden } = state, sheetRef = import_react3.default.useRef(null), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, sheetRef, providerProps.contentRef), animationConfig = function() {
|
|
17386
17483
|
var [animationProp, animationPropConfig] = animation ? Array.isArray(animation) ? animation : [
|
|
17387
17484
|
animation
|
|
17388
17485
|
] : [];
|
|
@@ -17390,7 +17487,8 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
17390
17487
|
...(0, import_core12.getConfig)().animations.animations[animationProp],
|
|
17391
17488
|
...animationPropConfig
|
|
17392
17489
|
} : null);
|
|
17393
|
-
}(), [isShowingInnerSheet, setIsShowingInnerSheet] = import_react3.default.useState(!1), shouldHideParentSheet = !import_constants4.isWeb && modal && isShowingInnerSheet
|
|
17490
|
+
}(), [isShowingInnerSheet, setIsShowingInnerSheet] = import_react3.default.useState(!1), shouldHideParentSheet = !import_constants4.isWeb && modal && isShowingInnerSheet && // if not using weird portal limitation we dont need to hide parent sheet
|
|
17491
|
+
process.env.TAMAGUI_USE_NATIVE_PORTAL !== "false", sheetInsideSheet = import_react3.default.useContext(import_contexts.SheetInsideSheetContext), onInnerSheet = import_react3.default.useCallback(function(hasChild) {
|
|
17394
17492
|
setIsShowingInnerSheet(hasChild);
|
|
17395
17493
|
}, []), positions = import_react3.default.useMemo(function() {
|
|
17396
17494
|
return snapPoints.map(function(point) {
|
|
@@ -17403,11 +17501,11 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
17403
17501
|
snapPointsMode
|
|
17404
17502
|
]), { animationDriver } = (0, import_core12.useConfiguration)(), { useAnimatedNumber, useAnimatedNumberStyle, useAnimatedNumberReaction } = animationDriver, _animationDriver_View, AnimatedView = (_animationDriver_View = animationDriver.View) !== null && _animationDriver_View !== void 0 ? _animationDriver_View : import_core12.Stack;
|
|
17405
17503
|
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
17406
|
-
if (
|
|
17407
|
-
|
|
17504
|
+
if (sheetInsideSheet && open) return sheetInsideSheet(!0), function() {
|
|
17505
|
+
sheetInsideSheet(!1);
|
|
17408
17506
|
};
|
|
17409
17507
|
}, [
|
|
17410
|
-
|
|
17508
|
+
sheetInsideSheet,
|
|
17411
17509
|
open
|
|
17412
17510
|
]);
|
|
17413
17511
|
var nextParentContext = import_react3.default.useMemo(function() {
|
|
@@ -17576,7 +17674,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
17576
17674
|
}, [
|
|
17577
17675
|
open
|
|
17578
17676
|
]);
|
|
17579
|
-
var forcedContentHeight = hasFit ? void 0 : snapPointsMode === "percent" ? `${maxSnapPoint}${import_constants4.isWeb ? "dvh" : "%"}` : maxSnapPoint, contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_contexts.ParentSheetContext.Provider, {
|
|
17677
|
+
var forcedContentHeight = hasFit ? void 0 : snapPointsMode === "percent" ? `${maxSnapPoint}${import_constants4.isWeb ? "dvh" : "%"}` : maxSnapPoint, id = (0, import_react3.useId)(), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_contexts.ParentSheetContext.Provider, {
|
|
17580
17678
|
value: nextParentContext,
|
|
17581
17679
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_SheetContext.SheetProvider, {
|
|
17582
17680
|
...providerProps,
|
|
@@ -17616,30 +17714,30 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
17616
17714
|
width: "100%",
|
|
17617
17715
|
height: forcedContentHeight,
|
|
17618
17716
|
minHeight: forcedContentHeight,
|
|
17619
|
-
opacity,
|
|
17717
|
+
opacity: shouldHideParentSheet ? 0 : opacity,
|
|
17620
17718
|
...(shouldHideParentSheet || !open) && {
|
|
17621
17719
|
pointerEvents: "none"
|
|
17622
17720
|
}
|
|
17623
17721
|
},
|
|
17624
17722
|
animatedStyle
|
|
17625
17723
|
],
|
|
17626
|
-
children:
|
|
17724
|
+
children: (
|
|
17725
|
+
/* <AdaptProvider>{props.children}</AdaptProvider> */
|
|
17726
|
+
props.children
|
|
17727
|
+
)
|
|
17627
17728
|
})
|
|
17628
17729
|
]
|
|
17629
17730
|
})
|
|
17630
|
-
}),
|
|
17731
|
+
}), shouldMountChildren = unmountChildrenWhenHidden ? !opacity : !0;
|
|
17631
17732
|
if (modal) {
|
|
17632
17733
|
var modalContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
|
|
17633
|
-
zIndex,
|
|
17734
|
+
stackZIndex: zIndex,
|
|
17634
17735
|
...portalProps,
|
|
17635
17736
|
children: shouldMountChildren && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ContainerComponent, {
|
|
17636
17737
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
17637
17738
|
forceClassName: !0,
|
|
17638
17739
|
name: themeName,
|
|
17639
|
-
children:
|
|
17640
|
-
value: adaptContext,
|
|
17641
|
-
children: contents
|
|
17642
|
-
})
|
|
17740
|
+
children: contents
|
|
17643
17741
|
})
|
|
17644
17742
|
})
|
|
17645
17743
|
});
|
|
@@ -17852,6 +17950,8 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
17852
17950
|
ref: (0, import_compose_refs.composeRefs)(scrollRef, ref),
|
|
17853
17951
|
flex: 1,
|
|
17854
17952
|
scrollEventThrottle: 8,
|
|
17953
|
+
onResponderRelease: release,
|
|
17954
|
+
className: "_ovs-contain",
|
|
17855
17955
|
// scrollEnabled={scrollEnabled}
|
|
17856
17956
|
onScroll: function(e) {
|
|
17857
17957
|
var { y } = e.nativeEvent.contentOffset;
|
|
@@ -17899,14 +17999,8 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
17899
17999
|
// state.current.dys = state.current.dys.slice(-10)
|
|
17900
18000
|
// }
|
|
17901
18001
|
// }}
|
|
17902
|
-
onResponderRelease: release,
|
|
17903
|
-
className: "_ovs-contain",
|
|
17904
18002
|
...props,
|
|
17905
|
-
children
|
|
17906
|
-
return children;
|
|
17907
|
-
}, [
|
|
17908
|
-
children
|
|
17909
|
-
])
|
|
18003
|
+
children
|
|
17910
18004
|
});
|
|
17911
18005
|
});
|
|
17912
18006
|
}
|
|
@@ -18570,9 +18664,6 @@ var require_Dialog_native = __commonJS({
|
|
|
18570
18664
|
DialogPortalFrame: function() {
|
|
18571
18665
|
return DialogPortalFrame;
|
|
18572
18666
|
},
|
|
18573
|
-
DialogSheetContents: function() {
|
|
18574
|
-
return DialogSheetContents;
|
|
18575
|
-
},
|
|
18576
18667
|
DialogTitle: function() {
|
|
18577
18668
|
return DialogTitle;
|
|
18578
18669
|
},
|
|
@@ -18587,7 +18678,7 @@ var require_Dialog_native = __commonJS({
|
|
|
18587
18678
|
}
|
|
18588
18679
|
});
|
|
18589
18680
|
module2.exports = __toCommonJS2(Dialog_exports);
|
|
18590
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt =
|
|
18681
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native27(), import_animate_presence = require_index_native4(), import_aria_hidden = require_index_native29(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_create_context = require_index_native28(), import_dismissable = require_index_native30(), import_focus_scope = require_index_native31(), import_helpers = require_index_native7(), import_portal2 = require_index_native26(), import_remove_scroll = require_index_native32(), import_sheet = require_index_native34(), import_stacks3 = require_index_native21(), import_text2 = require_index_native23(), import_use_controllable_state = require_index_native10(), React4 = __toESM2(require("react")), DIALOG_NAME = "Dialog", [createDialogContext, createDialogScope] = (0, import_create_context.createContextScope)(DIALOG_NAME), [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME), TRIGGER_NAME = "DialogTrigger", DialogTriggerFrame = (0, import_core12.styled)(import_core12.View, {
|
|
18591
18682
|
name: TRIGGER_NAME
|
|
18592
18683
|
}), DialogTrigger = DialogTriggerFrame.styleable(function(props, forwardedRef) {
|
|
18593
18684
|
var { __scopeDialog, ...triggerProps } = props, isInsideButton = React4.useContext(import_stacks3.ButtonNestingContext), context = useDialogContext(TRIGGER_NAME, __scopeDialog), composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
@@ -18626,33 +18717,23 @@ var require_Dialog_native = __commonJS({
|
|
|
18626
18717
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
18627
18718
|
}
|
|
18628
18719
|
}), DialogPortalItem = function(props) {
|
|
18629
|
-
var themeName = (0, import_core12.useThemeName)(), context = useDialogContext(PORTAL_NAME, props.__scopeDialog);
|
|
18630
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
|
|
18631
|
-
hostName: props.hostName,
|
|
18632
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItemContent, {
|
|
18633
|
-
...props,
|
|
18634
|
-
themeName,
|
|
18635
|
-
context
|
|
18636
|
-
})
|
|
18637
|
-
});
|
|
18638
|
-
};
|
|
18639
|
-
function DialogPortalItemContent(props) {
|
|
18640
|
-
var { __scopeDialog, children, context, themeName, space, spaceDirection, separator } = props, childrenSpaced = children;
|
|
18720
|
+
var { __scopeDialog, children, space, spaceDirection, separator } = props, themeName = (0, import_core12.useThemeName)(), context = useDialogContext(PORTAL_NAME, props.__scopeDialog), childrenSpaced = children;
|
|
18641
18721
|
return (space || separator) && (childrenSpaced = (0, import_core12.spacedChildren)({
|
|
18642
18722
|
children,
|
|
18643
18723
|
separator,
|
|
18644
18724
|
space,
|
|
18645
18725
|
direction: spaceDirection
|
|
18646
|
-
})), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
18647
|
-
|
|
18648
|
-
|
|
18649
|
-
|
|
18650
|
-
|
|
18651
|
-
|
|
18726
|
+
})), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
18727
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogProvider, {
|
|
18728
|
+
scope: __scopeDialog,
|
|
18729
|
+
...context,
|
|
18730
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
18731
|
+
name: themeName,
|
|
18732
|
+
children: childrenSpaced
|
|
18733
|
+
})
|
|
18652
18734
|
})
|
|
18653
18735
|
});
|
|
18654
|
-
}
|
|
18655
|
-
var DialogPortal = function(props) {
|
|
18736
|
+
}, DialogPortal = function(props) {
|
|
18656
18737
|
var { __scopeDialog, forceMount, children, ...frameProps } = props, context = useDialogContext(PORTAL_NAME, __scopeDialog), isShowing = forceMount || context.open, [isFullyHidden, setIsFullyHidden] = React4.useState(!isShowing);
|
|
18657
18738
|
isShowing && isFullyHidden && setIsFullyHidden(!1);
|
|
18658
18739
|
var handleExitComplete = React4.useCallback(function() {
|
|
@@ -18660,8 +18741,8 @@ var require_Dialog_native = __commonJS({
|
|
|
18660
18741
|
}, []), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
|
|
18661
18742
|
onExitComplete: handleExitComplete,
|
|
18662
18743
|
children: isShowing ? children : null
|
|
18663
|
-
}),
|
|
18664
|
-
if (
|
|
18744
|
+
}), isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
18745
|
+
if (isAdapted) return children;
|
|
18665
18746
|
if (context.modal) {
|
|
18666
18747
|
if (isFullyHidden) return null;
|
|
18667
18748
|
var framedContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalProvider2, {
|
|
@@ -18682,10 +18763,7 @@ var require_Dialog_native = __commonJS({
|
|
|
18682
18763
|
})
|
|
18683
18764
|
});
|
|
18684
18765
|
}
|
|
18685
|
-
return
|
|
18686
|
-
__scopeDialog,
|
|
18687
|
-
children: framedContents
|
|
18688
|
-
});
|
|
18766
|
+
return framedContents;
|
|
18689
18767
|
}
|
|
18690
18768
|
return contents;
|
|
18691
18769
|
}, PassthroughTheme = function(param) {
|
|
@@ -18698,8 +18776,8 @@ var require_Dialog_native = __commonJS({
|
|
|
18698
18776
|
}, OVERLAY_NAME = "DialogOverlay", DialogOverlayFrame = (0, import_core12.styled)(import_sheet.Overlay, {
|
|
18699
18777
|
name: OVERLAY_NAME
|
|
18700
18778
|
}), DialogOverlay = DialogOverlayFrame.extractable(/* @__PURE__ */ React4.forwardRef(function(param, forwardedRef) {
|
|
18701
|
-
var { __scopeDialog, ...props } = param, portalContext = usePortalContext(OVERLAY_NAME, __scopeDialog), { forceMount = portalContext.forceMount, ...overlayProps } = props, context = useDialogContext(OVERLAY_NAME, __scopeDialog),
|
|
18702
|
-
return !forceMount && (!context.modal ||
|
|
18779
|
+
var { __scopeDialog, ...props } = param, portalContext = usePortalContext(OVERLAY_NAME, __scopeDialog), { forceMount = portalContext.forceMount, ...overlayProps } = props, context = useDialogContext(OVERLAY_NAME, __scopeDialog), isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
18780
|
+
return !forceMount && (!context.modal || isAdapted) ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogOverlayFrame, {
|
|
18703
18781
|
"data-state": getState(context.open),
|
|
18704
18782
|
// We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay.
|
|
18705
18783
|
pointerEvents: context.open ? "auto" : "none",
|
|
@@ -18819,17 +18897,18 @@ var require_Dialog_native = __commonJS({
|
|
|
18819
18897
|
}
|
|
18820
18898
|
});
|
|
18821
18899
|
}), DialogContentImpl = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
18822
|
-
var { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, context, ...contentProps } = props, contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef),
|
|
18900
|
+
var { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, context, ...contentProps } = props, contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
18901
|
+
if (isAdapted) return !import_constants4.isWeb && !context.open ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
|
|
18902
|
+
children: contentProps.children
|
|
18903
|
+
});
|
|
18904
|
+
var contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogContentFrame, {
|
|
18823
18905
|
id: context.contentId,
|
|
18824
18906
|
"aria-describedby": context.descriptionId,
|
|
18825
18907
|
"aria-labelledby": context.titleId,
|
|
18826
18908
|
"data-state": getState(context.open),
|
|
18827
18909
|
...contentProps
|
|
18828
18910
|
});
|
|
18829
|
-
return
|
|
18830
|
-
hostName: getSheetContentsName(context),
|
|
18831
|
-
children: contentProps.children
|
|
18832
|
-
}) : import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, {
|
|
18911
|
+
return import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, {
|
|
18833
18912
|
children: [
|
|
18834
18913
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dismissable.Dismissable, {
|
|
18835
18914
|
disableOutsidePointerEvents: context.open && disableOutsidePointerEvents,
|
|
@@ -18891,8 +18970,8 @@ var require_Dialog_native = __commonJS({
|
|
|
18891
18970
|
var { __scopeDialog, displayWhenAdapted, ...closeProps } = props, context = useDialogContext(CLOSE_NAME, __scopeDialog, {
|
|
18892
18971
|
warn: !1,
|
|
18893
18972
|
fallback: {}
|
|
18894
|
-
}),
|
|
18895
|
-
return
|
|
18973
|
+
}), isAdapted = (0, import_adapt.useAdaptIsActive)(), isInsideButton = React4.useContext(import_stacks3.ButtonNestingContext);
|
|
18974
|
+
return isAdapted && !displayWhenAdapted ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogCloseFrame, {
|
|
18896
18975
|
accessibilityLabel: "Dialog Close",
|
|
18897
18976
|
tag: isInsideButton ? "span" : "button",
|
|
18898
18977
|
...closeProps,
|
|
@@ -18949,7 +19028,7 @@ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it wi
|
|
|
18949
19028
|
}
|
|
18950
19029
|
return null;
|
|
18951
19030
|
}, Dialog = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
|
|
18952
|
-
var { __scopeDialog, children, open: openProp, defaultOpen = !1, onOpenChange, modal = !0, allowPinchZoom = !1, disableRemoveScroll = !1 } = props, baseId = React4.useId(), scopeId = `scope-${baseId}`, contentId = `content-${baseId}`, titleId = `title-${baseId}`, descriptionId = `description-${baseId}`, scopeKey = __scopeDialog ? Object.keys(__scopeDialog)[0] : scopeId,
|
|
19031
|
+
var { __scopeDialog, children, open: openProp, defaultOpen = !1, onOpenChange, modal = !0, allowPinchZoom = !1, disableRemoveScroll = !1 } = props, baseId = React4.useId(), scopeId = `scope-${baseId}`, contentId = `content-${baseId}`, titleId = `title-${baseId}`, descriptionId = `description-${baseId}`, scopeKey = __scopeDialog ? Object.keys(__scopeDialog)[0] : scopeId, adaptName = getAdaptName({
|
|
18953
19032
|
scopeKey,
|
|
18954
19033
|
contentId
|
|
18955
19034
|
}), triggerRef = React4.useRef(null), contentRef = React4.useRef(null), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
@@ -18974,28 +19053,22 @@ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it wi
|
|
|
18974
19053
|
onOpenChange: setOpen,
|
|
18975
19054
|
onOpenToggle,
|
|
18976
19055
|
modal,
|
|
18977
|
-
allowPinchZoom
|
|
18978
|
-
|
|
18979
|
-
|
|
18980
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, {
|
|
18981
|
-
forwardProps: props2,
|
|
18982
|
-
name: sheetContentsName
|
|
18983
|
-
});
|
|
18984
|
-
}, [
|
|
18985
|
-
sheetContentsName
|
|
18986
|
-
])
|
|
18987
|
-
});
|
|
19056
|
+
allowPinchZoom,
|
|
19057
|
+
disableRemoveScroll
|
|
19058
|
+
};
|
|
18988
19059
|
return React4.useImperativeHandle(ref, function() {
|
|
18989
19060
|
return {
|
|
18990
19061
|
open: setOpen
|
|
18991
19062
|
};
|
|
18992
19063
|
}, [
|
|
18993
19064
|
setOpen
|
|
18994
|
-
]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
19065
|
+
]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
|
|
19066
|
+
scope: adaptName,
|
|
19067
|
+
portal: {
|
|
19068
|
+
forwardProps: props
|
|
19069
|
+
},
|
|
18995
19070
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogProvider, {
|
|
18996
19071
|
...context,
|
|
18997
|
-
sheetBreakpoint: when,
|
|
18998
|
-
disableRemoveScroll,
|
|
18999
19072
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogSheetController, {
|
|
19000
19073
|
onOpenChange: setOpen,
|
|
19001
19074
|
__scopeDialog,
|
|
@@ -19013,34 +19086,22 @@ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it wi
|
|
|
19013
19086
|
Close: DialogClose,
|
|
19014
19087
|
Sheet: import_sheet.Sheet.Controlled,
|
|
19015
19088
|
Adapt: import_adapt.Adapt
|
|
19016
|
-
}),
|
|
19017
|
-
var { name, ...props } = param;
|
|
19018
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, {
|
|
19019
|
-
forwardProps: props,
|
|
19020
|
-
name
|
|
19021
|
-
});
|
|
19022
|
-
}, getSheetContentsName = function(param) {
|
|
19089
|
+
}), getAdaptName = function(param) {
|
|
19023
19090
|
var { scopeKey, contentId } = param;
|
|
19024
|
-
return `${scopeKey || contentId}
|
|
19091
|
+
return `${scopeKey || contentId}DialogAdapt`;
|
|
19025
19092
|
}, DialogSheetController = function(props) {
|
|
19026
|
-
var context = useDialogContext("DialogSheetController", props.__scopeDialog),
|
|
19093
|
+
var context = useDialogContext("DialogSheetController", props.__scopeDialog), isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
19027
19094
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_sheet.SheetController, {
|
|
19028
19095
|
onOpenChange: function(val) {
|
|
19029
|
-
if (
|
|
19096
|
+
if (isAdapted) {
|
|
19030
19097
|
var _props_onOpenChange;
|
|
19031
19098
|
(_props_onOpenChange = props.onOpenChange) === null || _props_onOpenChange === void 0 || _props_onOpenChange.call(props, val);
|
|
19032
19099
|
}
|
|
19033
19100
|
},
|
|
19034
19101
|
open: context.open,
|
|
19035
|
-
hidden:
|
|
19102
|
+
hidden: !isAdapted,
|
|
19036
19103
|
children: props.children
|
|
19037
19104
|
});
|
|
19038
|
-
}, useSheetBreakpointActive = function(context) {
|
|
19039
|
-
var media = (0, import_core12.useMedia)();
|
|
19040
|
-
return context.sheetBreakpoint ? context.sheetBreakpoint === !0 ? !0 : media[context.sheetBreakpoint] : !1;
|
|
19041
|
-
}, useShowDialogSheet = function(context) {
|
|
19042
|
-
var breakpointActive = useSheetBreakpointActive(context);
|
|
19043
|
-
return context.open === !1 ? !1 : breakpointActive;
|
|
19044
19105
|
};
|
|
19045
19106
|
}
|
|
19046
19107
|
});
|
|
@@ -19166,7 +19227,7 @@ var require_AlertDialog_native = __commonJS({
|
|
|
19166
19227
|
}
|
|
19167
19228
|
});
|
|
19168
19229
|
module2.exports = __toCommonJS2(AlertDialog_exports);
|
|
19169
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_create_context =
|
|
19230
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_create_context = require_index_native28(), import_dialog = require_index_native35(), import_helpers = require_index_native7(), import_use_controllable_state = require_index_native10(), React4 = __toESM2(require("react")), import_react_native4 = require("react-native"), ROOT_NAME = "AlertDialog", [createAlertDialogContext, createAlertDialogScope] = (0, import_create_context.createContextScope)(ROOT_NAME, [
|
|
19170
19231
|
import_dialog.createDialogScope
|
|
19171
19232
|
]), useDialogScope = (0, import_dialog.createDialogScope)(), TRIGGER_NAME = "AlertDialogTrigger", NativeAlertDialogTriggerFrame = (0, import_core12.styled)(import_core12.View, {
|
|
19172
19233
|
name: TRIGGER_NAME
|
|
@@ -19856,7 +19917,7 @@ var require_Avatar_native = __commonJS({
|
|
|
19856
19917
|
}
|
|
19857
19918
|
});
|
|
19858
19919
|
module2.exports = __toCommonJS2(Avatar_exports);
|
|
19859
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native17(), import_create_context =
|
|
19920
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native17(), import_create_context = require_index_native28(), import_helpers = require_index_native7(), import_image = require_index_native37(), import_shapes = require_index_native38(), import_stacks3 = require_index_native21(), React4 = __toESM2(require("react")), AVATAR_NAME = "Avatar", [createAvatarContext, createAvatarScope] = (0, import_create_context.createContextScope)(AVATAR_NAME), [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME), IMAGE_NAME = "AvatarImage", AvatarImage = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19860
19921
|
var _getShapeSize, { __scopeAvatar, src, onLoadingStatusChange = function() {
|
|
19861
19922
|
}, ...imageProps } = props, context = useAvatarContext(IMAGE_NAME, __scopeAvatar), [status, setStatus] = React4.useState("idle"), shapeSize = (0, import_core12.getVariableValue)((_getShapeSize = (0, import_shapes.getShapeSize)(
|
|
19862
19923
|
context.size,
|
|
@@ -21249,7 +21310,7 @@ var require_Label_native = __commonJS({
|
|
|
21249
21310
|
}
|
|
21250
21311
|
});
|
|
21251
21312
|
module2.exports = __toCommonJS2(Label_exports);
|
|
21252
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_create_context =
|
|
21313
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_create_context = require_index_native28(), import_focusable2 = require_index_native44(), import_get_button_sized2 = require_index_native20(), import_get_font_sized2 = require_index_native22(), import_text2 = require_index_native23(), import_web = require_index_native14(), React4 = __toESM2(require("react")), NAME = "Label", [LabelProvider, useLabelContextImpl] = (0, import_create_context.createContext)(NAME, {
|
|
21253
21314
|
id: void 0,
|
|
21254
21315
|
controlRef: {
|
|
21255
21316
|
current: null
|
|
@@ -22035,7 +22096,7 @@ var require_Form_native = __commonJS({
|
|
|
22035
22096
|
}
|
|
22036
22097
|
});
|
|
22037
22098
|
module2.exports = __toCommonJS2(Form_exports);
|
|
22038
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native17(), import_create_context =
|
|
22099
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native17(), import_create_context = require_index_native28(), import_helpers = require_index_native7(), FORM_NAME = "Form", FormFrame = (0, import_core12.styled)(import_core12.Stack, {
|
|
22039
22100
|
name: FORM_NAME,
|
|
22040
22101
|
tag: "form"
|
|
22041
22102
|
}), [createFormContext] = (0, import_create_context.createContextScope)(FORM_NAME), [FormProvider, useFormContext] = createFormContext(FORM_NAME), TRIGGER_NAME = "FormTrigger", FormTriggerFrame = (0, import_core12.styled)(import_core12.View, {
|
|
@@ -22277,7 +22338,7 @@ var require_Group_native = __commonJS({
|
|
|
22277
22338
|
}
|
|
22278
22339
|
});
|
|
22279
22340
|
module2.exports = __toCommonJS2(Group_exports);
|
|
22280
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native17(), import_create_context =
|
|
22341
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native17(), import_create_context = require_index_native28(), import_helpers = require_index_native7(), import_stacks3 = require_index_native21(), import_use_controllable_state = require_index_native10(), import_react3 = __toESM2(require("react")), import_react_native4 = require("react-native"), import_useIndexedChildren = require_useIndexedChildren_native(), GROUP_NAME = "Group", [createGroupContext, createGroupScope] = (0, import_create_context.createContextScope)(GROUP_NAME), [GroupProvider, useGroupContext] = createGroupContext(GROUP_NAME), GroupFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
|
|
22281
22342
|
name: "GroupFrame",
|
|
22282
22343
|
variants: {
|
|
22283
22344
|
unstyled: {
|
|
@@ -25225,7 +25286,7 @@ var require_Popover_native = __commonJS({
|
|
|
25225
25286
|
}
|
|
25226
25287
|
});
|
|
25227
25288
|
module2.exports = __toCommonJS2(Popover_exports);
|
|
25228
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_polyfill_dev = require_polyfill_dev(), import_adapt =
|
|
25289
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_polyfill_dev = require_polyfill_dev(), import_adapt = require_index_native27(), import_animate = require_index_native54(), import_animate_presence = require_index_native4(), import_aria_hidden = require_index_native29(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_floating = require_index_native55(), import_focus_scope = require_index_native31(), import_helpers = require_index_native7(), import_popper = require_index_native56(), import_portal2 = require_index_native26(), import_remove_scroll = require_index_native32(), import_sheet = require_index_native34(), import_stacks3 = require_index_native21(), import_use_controllable_state = require_index_native10(), React4 = __toESM2(require("react")), import_react_native4 = require("react-native"), import_useFloatingContext = require_useFloatingContext_native(), POPOVER_SCOPE = "PopoverScope", PopoverContext = (0, import_core12.createStyledContext)({}), usePopoverContext = PopoverContext.useStyledContext, PopoverAnchor = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
25229
25290
|
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
|
|
25230
25291
|
return React4.useEffect(function() {
|
|
25231
25292
|
return onCustomAnchorAdd(), function() {
|
|
@@ -25376,8 +25437,7 @@ var require_Popover_native = __commonJS({
|
|
|
25376
25437
|
scope: __scopePopover || POPOVER_SCOPE,
|
|
25377
25438
|
...popperContext,
|
|
25378
25439
|
children: childrenWithoutScrollView
|
|
25379
|
-
})), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
25380
|
-
hostName: `${context.id}PopoverContents`,
|
|
25440
|
+
})), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
25381
25441
|
children: content
|
|
25382
25442
|
});
|
|
25383
25443
|
}
|
|
@@ -25427,21 +25487,35 @@ var require_Popover_native = __commonJS({
|
|
|
25427
25487
|
})
|
|
25428
25488
|
});
|
|
25429
25489
|
}), PopoverArrow = import_popper.PopperArrow.styleable(function(props, forwardedRef) {
|
|
25430
|
-
var { __scopePopover, ...rest } = props,
|
|
25431
|
-
return
|
|
25490
|
+
var { __scopePopover, ...rest } = props, isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
25491
|
+
return isAdapted ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperArrow, {
|
|
25432
25492
|
__scopePopper: __scopePopover || POPOVER_SCOPE,
|
|
25433
25493
|
componentName: "PopoverArrow",
|
|
25434
25494
|
...rest,
|
|
25435
25495
|
ref: forwardedRef
|
|
25436
25496
|
});
|
|
25437
|
-
}), Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props,
|
|
25438
|
-
var
|
|
25439
|
-
|
|
25440
|
-
|
|
25441
|
-
|
|
25442
|
-
|
|
25443
|
-
|
|
25444
|
-
|
|
25497
|
+
}), Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
|
|
25498
|
+
var id = React4.useId();
|
|
25499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
|
|
25500
|
+
scope: `${id}PopoverContents`,
|
|
25501
|
+
portal: !0,
|
|
25502
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverInner, {
|
|
25503
|
+
ref,
|
|
25504
|
+
id,
|
|
25505
|
+
...props
|
|
25506
|
+
})
|
|
25507
|
+
});
|
|
25508
|
+
}), {
|
|
25509
|
+
Anchor: PopoverAnchor,
|
|
25510
|
+
Arrow: PopoverArrow,
|
|
25511
|
+
Trigger: PopoverTrigger,
|
|
25512
|
+
Content: PopoverContent,
|
|
25513
|
+
Close: PopoverClose,
|
|
25514
|
+
Adapt: import_adapt.Adapt,
|
|
25515
|
+
ScrollView: import_react_native4.ScrollView,
|
|
25516
|
+
Sheet: import_sheet.Sheet.Controlled
|
|
25517
|
+
}), PopoverInner = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
25518
|
+
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(), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
25445
25519
|
prop: openProp,
|
|
25446
25520
|
defaultProp: defaultOpen || !1,
|
|
25447
25521
|
onChange: function(val) {
|
|
@@ -25449,10 +25523,10 @@ var require_Popover_native = __commonJS({
|
|
|
25449
25523
|
}
|
|
25450
25524
|
}), handleOpenChange = (0, import_core12.useEvent)(function(val, via) {
|
|
25451
25525
|
viaRef.current = via, setOpen(val);
|
|
25452
|
-
}),
|
|
25526
|
+
}), isAdapted = (0, import_adapt.useAdaptIsActive)(), floatingContext = (0, import_useFloatingContext.useFloatingContext)({
|
|
25453
25527
|
open,
|
|
25454
25528
|
setOpen: handleOpenChange,
|
|
25455
|
-
disable:
|
|
25529
|
+
disable: isAdapted,
|
|
25456
25530
|
hoverable,
|
|
25457
25531
|
disableFocus
|
|
25458
25532
|
}), [anchorTo, setAnchorToRaw] = React4.useState(), setAnchorTo = (0, import_core12.createShallowSetState)(setAnchorToRaw);
|
|
@@ -25475,14 +25549,13 @@ var require_Popover_native = __commonJS({
|
|
|
25475
25549
|
});
|
|
25476
25550
|
var popoverContext = {
|
|
25477
25551
|
id,
|
|
25478
|
-
sheetBreakpoint,
|
|
25479
25552
|
contentId: React4.useId(),
|
|
25480
25553
|
triggerRef,
|
|
25481
25554
|
open,
|
|
25482
|
-
breakpointActive:
|
|
25555
|
+
breakpointActive: isAdapted,
|
|
25483
25556
|
onOpenChange: handleOpenChange,
|
|
25484
25557
|
onOpenToggle: (0, import_core12.useEvent)(function() {
|
|
25485
|
-
open &&
|
|
25558
|
+
open && isAdapted || setOpen(!open);
|
|
25486
25559
|
}),
|
|
25487
25560
|
hasCustomAnchor,
|
|
25488
25561
|
anchorTo,
|
|
@@ -25506,21 +25579,12 @@ var require_Popover_native = __commonJS({
|
|
|
25506
25579
|
})
|
|
25507
25580
|
})
|
|
25508
25581
|
});
|
|
25509
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
25582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
25510
25583
|
children: import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_floating.FloatingOverrideContext.Provider, {
|
|
25511
25584
|
value: floatingContext,
|
|
25512
25585
|
children: contents
|
|
25513
25586
|
}) : contents
|
|
25514
25587
|
});
|
|
25515
|
-
}), {
|
|
25516
|
-
Anchor: PopoverAnchor,
|
|
25517
|
-
Arrow: PopoverArrow,
|
|
25518
|
-
Trigger: PopoverTrigger,
|
|
25519
|
-
Content: PopoverContent,
|
|
25520
|
-
Close: PopoverClose,
|
|
25521
|
-
Adapt: import_adapt.Adapt,
|
|
25522
|
-
ScrollView: import_react_native4.ScrollView,
|
|
25523
|
-
Sheet: import_sheet.Sheet.Controlled
|
|
25524
25588
|
});
|
|
25525
25589
|
function getState(open) {
|
|
25526
25590
|
return open ? "open" : "closed";
|
|
@@ -25538,12 +25602,9 @@ var require_Popover_native = __commonJS({
|
|
|
25538
25602
|
hidden: breakpointActive === !1,
|
|
25539
25603
|
children: props.children
|
|
25540
25604
|
});
|
|
25541
|
-
}, useSheetBreakpointActive = function(breakpoint) {
|
|
25542
|
-
var media = (0, import_core12.useMedia)();
|
|
25543
|
-
return typeof breakpoint == "boolean" || !breakpoint ? !!breakpoint : media[breakpoint];
|
|
25544
25605
|
}, useShowPopoverSheet = function(context) {
|
|
25545
|
-
var
|
|
25546
|
-
return context.open === !1 ? !1 :
|
|
25606
|
+
var isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
25607
|
+
return context.open === !1 ? !1 : isAdapted;
|
|
25547
25608
|
};
|
|
25548
25609
|
}
|
|
25549
25610
|
});
|
|
@@ -25655,7 +25716,7 @@ var require_Progress_native = __commonJS({
|
|
|
25655
25716
|
}
|
|
25656
25717
|
});
|
|
25657
25718
|
module2.exports = __toCommonJS2(Progress_exports);
|
|
25658
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native17(), import_create_context =
|
|
25719
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native17(), import_create_context = require_index_native28(), import_get_token2 = require_index_native19(), import_helpers = require_index_native7(), import_stacks3 = require_index_native21(), React4 = __toESM2(require("react")), PROGRESS_NAME = "Progress", [createProgressContext, createProgressScope] = (0, import_create_context.createContextScope)(PROGRESS_NAME), [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME), INDICATOR_NAME = "ProgressIndicator", ProgressIndicatorFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
|
|
25659
25720
|
name: INDICATOR_NAME,
|
|
25660
25721
|
variants: {
|
|
25661
25722
|
unstyled: {
|
|
@@ -27052,7 +27113,7 @@ var require_context_native = __commonJS({
|
|
|
27052
27113
|
}
|
|
27053
27114
|
});
|
|
27054
27115
|
module2.exports = __toCommonJS2(context_exports);
|
|
27055
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_create_context =
|
|
27116
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_create_context = require_index_native28(), import_constants4 = require_constants_native4(), [createSelectContext, createSelectScope] = (0, import_create_context.createContextScope)(import_constants4.SELECT_NAME), [SelectProvider, useSelectContext] = createSelectContext(import_constants4.SELECT_NAME), [createSelectItemParentContext, createSelectItemParentScope] = (0, import_create_context.createContextScope)(import_constants4.SELECT_NAME), [SelectItemParentProvider, useSelectItemParentContext] = createSelectContext(import_constants4.SELECT_NAME), ForwardSelectContext = function(param) {
|
|
27056
27117
|
var { __scopeSelect, context, itemContext, children } = param;
|
|
27057
27118
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectProvider, {
|
|
27058
27119
|
isInSheet: !0,
|
|
@@ -27585,7 +27646,7 @@ var require_SelectTrigger_native = __commonJS({
|
|
|
27585
27646
|
var require_SelectViewport_native = __commonJS({
|
|
27586
27647
|
"../select/dist/cjs/SelectViewport.native.js"(exports2, module2) {
|
|
27587
27648
|
"use strict";
|
|
27588
|
-
var
|
|
27649
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
27589
27650
|
for (var name in all) __defProp2(target, name, {
|
|
27590
27651
|
get: all[name],
|
|
27591
27652
|
enumerable: !0
|
|
@@ -27613,18 +27674,6 @@ var require_SelectViewport_native = __commonJS({
|
|
|
27613
27674
|
}
|
|
27614
27675
|
}
|
|
27615
27676
|
return to;
|
|
27616
|
-
}, __toESM2 = function(mod, isNodeMode, target) {
|
|
27617
|
-
return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
27618
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
27619
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
27620
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
27621
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27622
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
27623
|
-
value: mod,
|
|
27624
|
-
enumerable: !0
|
|
27625
|
-
}) : target,
|
|
27626
|
-
mod
|
|
27627
|
-
);
|
|
27628
27677
|
}, __toCommonJS2 = function(mod) {
|
|
27629
27678
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
27630
27679
|
value: !0
|
|
@@ -27636,18 +27685,17 @@ var require_SelectViewport_native = __commonJS({
|
|
|
27636
27685
|
}
|
|
27637
27686
|
});
|
|
27638
27687
|
module2.exports = __toCommonJS2(SelectViewport_native_exports);
|
|
27639
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt =
|
|
27640
|
-
var { __scopeSelect, children } = props, context = (0, import_context.useSelectContext)(import_constants4.VIEWPORT_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(import_constants4.VIEWPORT_NAME, __scopeSelect), themeName = (0, import_core12.useThemeName)(), adaptContext =
|
|
27641
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
27642
|
-
hostName: `${context.scopeKey}SheetContents`,
|
|
27688
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native27(), import_core12 = require_index_native17(), import_constants4 = require_constants_native4(), import_context = require_context_native(), SelectViewport = function(props) {
|
|
27689
|
+
var { __scopeSelect, children } = props, context = (0, import_context.useSelectContext)(import_constants4.VIEWPORT_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(import_constants4.VIEWPORT_NAME, __scopeSelect), themeName = (0, import_core12.useThemeName)(), adaptContext = (0, import_adapt.useAdaptContext)();
|
|
27690
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
27643
27691
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
27644
27692
|
name: themeName,
|
|
27645
27693
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.ForwardSelectContext, {
|
|
27646
27694
|
__scopeSelect,
|
|
27647
27695
|
itemContext: itemParentContext,
|
|
27648
27696
|
context,
|
|
27649
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.
|
|
27650
|
-
|
|
27697
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptContext.Provider, {
|
|
27698
|
+
...adaptContext,
|
|
27651
27699
|
children
|
|
27652
27700
|
})
|
|
27653
27701
|
})
|
|
@@ -27696,19 +27744,13 @@ var require_useSelectBreakpointActive_native = __commonJS({
|
|
|
27696
27744
|
}), mod);
|
|
27697
27745
|
}, useSelectBreakpointActive_exports = {};
|
|
27698
27746
|
__export2(useSelectBreakpointActive_exports, {
|
|
27699
|
-
useSelectBreakpointActive: function() {
|
|
27700
|
-
return useSelectBreakpointActive;
|
|
27701
|
-
},
|
|
27702
27747
|
useShowSelectSheet: function() {
|
|
27703
27748
|
return useShowSelectSheet;
|
|
27704
27749
|
}
|
|
27705
27750
|
});
|
|
27706
27751
|
module2.exports = __toCommonJS2(useSelectBreakpointActive_exports);
|
|
27707
|
-
var
|
|
27708
|
-
var
|
|
27709
|
-
return sheetBreakpoint ? sheetBreakpoint === !0 ? !0 : sheetBreakpoint ? media[sheetBreakpoint] : !1 : !1;
|
|
27710
|
-
}, useShowSelectSheet = function(context) {
|
|
27711
|
-
var breakpointActive = useSelectBreakpointActive(context.sheetBreakpoint);
|
|
27752
|
+
var import_adapt = require_index_native27(), useShowSelectSheet = function(context) {
|
|
27753
|
+
var breakpointActive = (0, import_adapt.useAdaptIsActive)();
|
|
27712
27754
|
return context.open === !1 ? !1 : breakpointActive;
|
|
27713
27755
|
};
|
|
27714
27756
|
}
|
|
@@ -27778,7 +27820,7 @@ var require_Select_native = __commonJS({
|
|
|
27778
27820
|
}
|
|
27779
27821
|
});
|
|
27780
27822
|
module2.exports = __toCommonJS2(Select_exports);
|
|
27781
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt =
|
|
27823
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native27(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_focusable2 = require_index_native44(), import_get_token2 = require_index_native19(), import_helpers = require_index_native7(), import_list_item = require_index_native53(), import_separator = require_index_native62(), import_sheet = require_index_native34(), import_stacks3 = require_index_native21(), import_text2 = require_index_native23(), import_use_controllable_state = require_index_native10(), import_use_debounce = require_index_native63(), React4 = __toESM2(require("react")), import_context = require_context_native(), import_SelectContent = require_SelectContent_native(), import_SelectImpl = require_SelectImpl_native(), import_SelectItem = require_SelectItem_native(), import_SelectItemText = require_SelectItemText_native(), import_SelectScrollButton = require_SelectScrollButton_native(), import_SelectTrigger = require_SelectTrigger_native(), import_SelectViewport = require_SelectViewport_native(), import_useSelectBreakpointActive = require_useSelectBreakpointActive_native(), VALUE_NAME = "SelectValue", SelectValueFrame = (0, import_core12.styled)(import_text2.SizableText, {
|
|
27782
27824
|
name: VALUE_NAME,
|
|
27783
27825
|
userSelect: "none"
|
|
27784
27826
|
}), SelectValue = SelectValueFrame.styleable(function(param, forwardedRef) {
|
|
@@ -27912,13 +27954,13 @@ var require_Select_native = __commonJS({
|
|
|
27912
27954
|
var SelectSeparator = (0, import_core12.styled)(import_separator.Separator, {
|
|
27913
27955
|
name: "SelectSeparator"
|
|
27914
27956
|
}), SelectSheetController = function(props) {
|
|
27915
|
-
var context = (0, import_context.useSelectContext)("SelectSheetController", props.__scopeSelect), showSheet = (0, import_useSelectBreakpointActive.useShowSelectSheet)(context),
|
|
27957
|
+
var context = (0, import_context.useSelectContext)("SelectSheetController", props.__scopeSelect), showSheet = (0, import_useSelectBreakpointActive.useShowSelectSheet)(context), isAdapted = (0, import_adapt.useAdaptIsActive)(), getShowSheet = (0, import_core12.useGet)(showSheet);
|
|
27916
27958
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_sheet.SheetController, {
|
|
27917
27959
|
onOpenChange: function(val) {
|
|
27918
27960
|
getShowSheet() && props.onOpenChange(val);
|
|
27919
27961
|
},
|
|
27920
27962
|
open: context.open,
|
|
27921
|
-
hidden:
|
|
27963
|
+
hidden: isAdapted === !1,
|
|
27922
27964
|
children: props.children
|
|
27923
27965
|
});
|
|
27924
27966
|
}, SelectSheetImpl = function(props) {
|
|
@@ -27926,15 +27968,50 @@ var require_Select_native = __commonJS({
|
|
|
27926
27968
|
children: props.children
|
|
27927
27969
|
});
|
|
27928
27970
|
}, Select = (0, import_helpers.withStaticProperties)(function(props) {
|
|
27929
|
-
var
|
|
27930
|
-
|
|
27931
|
-
|
|
27932
|
-
|
|
27933
|
-
|
|
27934
|
-
|
|
27935
|
-
|
|
27936
|
-
|
|
27937
|
-
})
|
|
27971
|
+
var internalId = React4.useId(), _Object_keys_, scopeKey = props.__scopeSelect && (_Object_keys_ = Object.keys(props.__scopeSelect)[0]) !== null && _Object_keys_ !== void 0 ? _Object_keys_ : internalId;
|
|
27972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
|
|
27973
|
+
scope: `${scopeKey}SheetContents`,
|
|
27974
|
+
portal: !0,
|
|
27975
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectInner, {
|
|
27976
|
+
scopeKey,
|
|
27977
|
+
...props
|
|
27978
|
+
})
|
|
27979
|
+
});
|
|
27980
|
+
}, {
|
|
27981
|
+
Adapt: import_adapt.Adapt,
|
|
27982
|
+
Content: import_SelectContent.SelectContent,
|
|
27983
|
+
Group: SelectGroup,
|
|
27984
|
+
Icon: SelectIcon,
|
|
27985
|
+
Item: import_SelectItem.SelectItem,
|
|
27986
|
+
ItemIndicator: SelectItemIndicator,
|
|
27987
|
+
ItemText: import_SelectItemText.SelectItemText,
|
|
27988
|
+
Label: SelectLabel,
|
|
27989
|
+
ScrollDownButton: import_SelectScrollButton.SelectScrollDownButton,
|
|
27990
|
+
ScrollUpButton: import_SelectScrollButton.SelectScrollUpButton,
|
|
27991
|
+
Trigger: import_SelectTrigger.SelectTrigger,
|
|
27992
|
+
Value: SelectValue,
|
|
27993
|
+
Viewport: import_SelectViewport.SelectViewport,
|
|
27994
|
+
Sheet: import_sheet.Sheet.Controlled
|
|
27995
|
+
});
|
|
27996
|
+
function useEmitter() {
|
|
27997
|
+
var listeners = React4.useRef();
|
|
27998
|
+
listeners.current || (listeners.current = /* @__PURE__ */ new Set());
|
|
27999
|
+
var emit = function(value) {
|
|
28000
|
+
listeners.current.forEach(function(l) {
|
|
28001
|
+
return l(value);
|
|
28002
|
+
});
|
|
28003
|
+
}, subscribe = React4.useCallback(function(listener) {
|
|
28004
|
+
return listeners.current.add(listener), function() {
|
|
28005
|
+
listeners.current.delete(listener);
|
|
28006
|
+
};
|
|
28007
|
+
}, []);
|
|
28008
|
+
return [
|
|
28009
|
+
emit,
|
|
28010
|
+
subscribe
|
|
28011
|
+
];
|
|
28012
|
+
}
|
|
28013
|
+
function SelectInner(props) {
|
|
28014
|
+
var { __scopeSelect, native, children, open: openProp, defaultOpen, onOpenChange, value: valueProp, defaultValue, onValueChange, disablePreventBodyScroll, size: sizeProp = "$true", onActiveChange, dir, id } = props, isAdapted = (0, import_adapt.useAdaptIsActive)(), SelectImpl = isAdapted || !import_constants4.isWeb ? SelectSheetImpl : import_SelectImpl.SelectInlineImpl, forceUpdate = React4.useReducer(function() {
|
|
27938
28015
|
return {};
|
|
27939
28016
|
}, {})[1], [selectedItem, setSelectedItem] = React4.useState(null), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
27940
28017
|
prop: openProp,
|
|
@@ -27976,100 +28053,64 @@ var require_Select_native = __commonJS({
|
|
|
27976
28053
|
return prev !== index ? (typeof index == "number" && emitActiveIndex(index), index) : prev;
|
|
27977
28054
|
});
|
|
27978
28055
|
}, 1, {}, []);
|
|
27979
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
27980
|
-
|
|
28056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.SelectItemParentProvider, {
|
|
28057
|
+
scope: __scopeSelect,
|
|
28058
|
+
initialValue: React4.useMemo(function() {
|
|
28059
|
+
return value;
|
|
28060
|
+
}, [
|
|
28061
|
+
open
|
|
28062
|
+
]),
|
|
28063
|
+
size: sizeProp,
|
|
28064
|
+
activeIndexSubscribe,
|
|
28065
|
+
valueSubscribe,
|
|
28066
|
+
setOpen,
|
|
28067
|
+
id,
|
|
28068
|
+
onChange: React4.useCallback(function(val) {
|
|
28069
|
+
setValue(val), emitValue(val);
|
|
28070
|
+
}, []),
|
|
28071
|
+
onActiveChange: (0, import_core12.useEvent)(function() {
|
|
28072
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
|
|
28073
|
+
onActiveChange == null || onActiveChange(...args);
|
|
28074
|
+
}),
|
|
28075
|
+
setSelectedIndex,
|
|
28076
|
+
setValueAtIndex: React4.useCallback(function(index, value2) {
|
|
28077
|
+
listContentRef.current[index] = value2;
|
|
28078
|
+
}, []),
|
|
28079
|
+
shouldRenderWebNative,
|
|
28080
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.SelectProvider, {
|
|
27981
28081
|
scope: __scopeSelect,
|
|
27982
|
-
|
|
27983
|
-
|
|
27984
|
-
|
|
27985
|
-
|
|
27986
|
-
|
|
27987
|
-
|
|
27988
|
-
|
|
27989
|
-
|
|
27990
|
-
|
|
27991
|
-
|
|
27992
|
-
|
|
27993
|
-
|
|
27994
|
-
|
|
27995
|
-
|
|
27996
|
-
|
|
27997
|
-
|
|
27998
|
-
|
|
27999
|
-
|
|
28000
|
-
|
|
28001
|
-
|
|
28002
|
-
|
|
28003
|
-
|
|
28004
|
-
|
|
28005
|
-
|
|
28006
|
-
|
|
28007
|
-
|
|
28008
|
-
|
|
28009
|
-
fallback: !1,
|
|
28010
|
-
selectedItem,
|
|
28011
|
-
setSelectedItem,
|
|
28012
|
-
forceUpdate,
|
|
28013
|
-
valueNode,
|
|
28014
|
-
onValueNodeChange: setValueNode,
|
|
28015
|
-
scopeKey,
|
|
28016
|
-
sheetBreakpoint,
|
|
28017
|
-
activeIndex,
|
|
28018
|
-
selectedIndex,
|
|
28019
|
-
setActiveIndex: setActiveIndexDebounced,
|
|
28020
|
-
value,
|
|
28021
|
-
open,
|
|
28022
|
-
native,
|
|
28023
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectSheetController, {
|
|
28024
|
-
onOpenChange: setOpen,
|
|
28025
|
-
__scopeSelect,
|
|
28026
|
-
children: shouldRenderWebNative ? children : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectImpl, {
|
|
28027
|
-
activeIndexRef,
|
|
28028
|
-
listContentRef,
|
|
28029
|
-
selectedIndexRef,
|
|
28030
|
-
...props,
|
|
28031
|
-
open,
|
|
28032
|
-
value,
|
|
28033
|
-
children
|
|
28034
|
-
})
|
|
28082
|
+
disablePreventBodyScroll,
|
|
28083
|
+
dir,
|
|
28084
|
+
blockSelection: !1,
|
|
28085
|
+
fallback: !1,
|
|
28086
|
+
selectedItem,
|
|
28087
|
+
setSelectedItem,
|
|
28088
|
+
forceUpdate,
|
|
28089
|
+
valueNode,
|
|
28090
|
+
onValueNodeChange: setValueNode,
|
|
28091
|
+
scopeKey: props.scopeKey,
|
|
28092
|
+
activeIndex,
|
|
28093
|
+
selectedIndex,
|
|
28094
|
+
setActiveIndex: setActiveIndexDebounced,
|
|
28095
|
+
value,
|
|
28096
|
+
open,
|
|
28097
|
+
native,
|
|
28098
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectSheetController, {
|
|
28099
|
+
onOpenChange: setOpen,
|
|
28100
|
+
__scopeSelect,
|
|
28101
|
+
children: shouldRenderWebNative ? children : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectImpl, {
|
|
28102
|
+
activeIndexRef,
|
|
28103
|
+
listContentRef,
|
|
28104
|
+
selectedIndexRef,
|
|
28105
|
+
...props,
|
|
28106
|
+
open,
|
|
28107
|
+
value,
|
|
28108
|
+
children
|
|
28035
28109
|
})
|
|
28036
28110
|
})
|
|
28037
28111
|
})
|
|
28038
28112
|
});
|
|
28039
|
-
}, {
|
|
28040
|
-
Adapt: import_adapt.Adapt,
|
|
28041
|
-
Content: import_SelectContent.SelectContent,
|
|
28042
|
-
Group: SelectGroup,
|
|
28043
|
-
Icon: SelectIcon,
|
|
28044
|
-
Item: import_SelectItem.SelectItem,
|
|
28045
|
-
ItemIndicator: SelectItemIndicator,
|
|
28046
|
-
ItemText: import_SelectItemText.SelectItemText,
|
|
28047
|
-
Label: SelectLabel,
|
|
28048
|
-
ScrollDownButton: import_SelectScrollButton.SelectScrollDownButton,
|
|
28049
|
-
ScrollUpButton: import_SelectScrollButton.SelectScrollUpButton,
|
|
28050
|
-
Trigger: import_SelectTrigger.SelectTrigger,
|
|
28051
|
-
Value: SelectValue,
|
|
28052
|
-
Viewport: import_SelectViewport.SelectViewport,
|
|
28053
|
-
Sheet: import_sheet.Sheet.Controlled
|
|
28054
|
-
});
|
|
28055
|
-
function useEmitter() {
|
|
28056
|
-
var listeners = React4.useRef();
|
|
28057
|
-
listeners.current || (listeners.current = /* @__PURE__ */ new Set());
|
|
28058
|
-
var emit = function(value) {
|
|
28059
|
-
listeners.current.forEach(function(l) {
|
|
28060
|
-
return l(value);
|
|
28061
|
-
});
|
|
28062
|
-
}, subscribe = React4.useCallback(function(listener) {
|
|
28063
|
-
return listeners.current.add(listener), function() {
|
|
28064
|
-
listeners.current.delete(listener);
|
|
28065
|
-
};
|
|
28066
|
-
}, []);
|
|
28067
|
-
return [
|
|
28068
|
-
emit,
|
|
28069
|
-
subscribe
|
|
28070
|
-
];
|
|
28071
28113
|
}
|
|
28072
|
-
Select.displayName = import_constants22.SELECT_NAME;
|
|
28073
28114
|
}
|
|
28074
28115
|
});
|
|
28075
28116
|
|
|
@@ -28183,7 +28224,7 @@ var require_constants_native5 = __commonJS({
|
|
|
28183
28224
|
}
|
|
28184
28225
|
});
|
|
28185
28226
|
module2.exports = __toCommonJS2(constants_exports);
|
|
28186
|
-
var import_create_context =
|
|
28227
|
+
var import_create_context = require_index_native28(), SLIDER_NAME = "Slider", [createSliderContext, createSliderScope] = (0, import_create_context.createContextScope)(SLIDER_NAME), [SliderProvider, useSliderContext] = createSliderContext(SLIDER_NAME), [SliderOrientationProvider, useSliderOrientationContext] = createSliderContext(SLIDER_NAME, {
|
|
28187
28228
|
startEdge: "left",
|
|
28188
28229
|
endEdge: "right",
|
|
28189
28230
|
sizeProp: "width",
|
|
@@ -31173,7 +31214,7 @@ __export(src_exports, {
|
|
|
31173
31214
|
});
|
|
31174
31215
|
module.exports = __toCommonJS(src_exports);
|
|
31175
31216
|
__reExport(src_exports, __toESM(require_index_native25()), module.exports);
|
|
31176
|
-
__reExport(src_exports, __toESM(
|
|
31217
|
+
__reExport(src_exports, __toESM(require_index_native27()), module.exports);
|
|
31177
31218
|
__reExport(src_exports, __toESM(require_index_native36()), module.exports);
|
|
31178
31219
|
__reExport(src_exports, __toESM(require_index_native4()), module.exports);
|
|
31179
31220
|
__reExport(src_exports, __toESM(require_index_native39()), module.exports);
|
|
@@ -31181,7 +31222,7 @@ __reExport(src_exports, __toESM(require_index_native42()), module.exports);
|
|
|
31181
31222
|
__reExport(src_exports, __toESM(require_index_native43()), module.exports);
|
|
31182
31223
|
__reExport(src_exports, __toESM(require_index_native48()), module.exports);
|
|
31183
31224
|
__reExport(src_exports, __toESM(require_index_native11()), module.exports);
|
|
31184
|
-
__reExport(src_exports, __toESM(
|
|
31225
|
+
__reExport(src_exports, __toESM(require_index_native28()), module.exports);
|
|
31185
31226
|
__reExport(src_exports, __toESM(require_index_native35()), module.exports);
|
|
31186
31227
|
__reExport(src_exports, __toESM(require_index_native40()), module.exports);
|
|
31187
31228
|
__reExport(src_exports, __toESM(require_index_native49()), module.exports);
|
|
@@ -31194,7 +31235,7 @@ __reExport(src_exports, __toESM(require_index_native45()), module.exports);
|
|
|
31194
31235
|
__reExport(src_exports, __toESM(require_index_native53()), module.exports);
|
|
31195
31236
|
__reExport(src_exports, __toESM(require_index_native57()), module.exports);
|
|
31196
31237
|
__reExport(src_exports, __toESM(require_index_native56()), module.exports);
|
|
31197
|
-
__reExport(src_exports, __toESM(
|
|
31238
|
+
__reExport(src_exports, __toESM(require_index_native26()), module.exports);
|
|
31198
31239
|
__reExport(src_exports, __toESM(require_index_native58()), module.exports);
|
|
31199
31240
|
__reExport(src_exports, __toESM(require_index_native61()), module.exports);
|
|
31200
31241
|
__reExport(src_exports, __toESM(require_index_native33()), module.exports);
|
|
@@ -31274,7 +31315,7 @@ Expected a subset of: ${expected.join(", ")}
|
|
|
31274
31315
|
};
|
|
31275
31316
|
|
|
31276
31317
|
// src/views/TamaguiProvider.tsx
|
|
31277
|
-
var import_jsx_runtime = require("react/jsx-runtime"), import_core2 = __toESM(require_index_native17()), import_portal = __toESM(
|
|
31318
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_core2 = __toESM(require_index_native17()), import_portal = __toESM(require_index_native26()), TamaguiProvider = function(param) {
|
|
31278
31319
|
var { children, ...props } = param;
|
|
31279
31320
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.TamaguiProvider, {
|
|
31280
31321
|
...props,
|