tamagui 1.65.4 → 1.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/index.native.js +2 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/views/Anchor.js +4 -4
- package/dist/cjs/views/Anchor.js.map +1 -1
- package/dist/cjs/views/Anchor.native.js +4 -4
- package/dist/cjs/views/Anchor.native.js.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/views/Anchor.js +3 -4
- package/dist/esm/views/Anchor.js.map +1 -1
- package/dist/jsx/index.js +2 -0
- package/dist/jsx/index.js.map +1 -1
- package/dist/jsx/index.native.js +2 -0
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/views/Anchor.js +3 -4
- package/dist/jsx/views/Anchor.js.map +1 -1
- package/dist/jsx/views/Anchor.native.js +3 -4
- package/dist/jsx/views/Anchor.native.js.map +1 -1
- package/dist/native.js +515 -466
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +470 -454
- package/dist/test.native.js.map +2 -2
- package/package.json +53 -53
- package/src/index.ts +1 -0
- package/src/views/Anchor.tsx +24 -26
- package/types/index.d.ts +1 -1
- package/types/index.d.ts.map +1 -1
- package/types/views/Anchor.d.ts +119 -2
- package/types/views/Anchor.d.ts.map +1 -1
- package/types/views/Input.d.ts +2 -2
package/dist/test.native.js
CHANGED
|
@@ -661,14 +661,14 @@ var require_useResponderEvents_native = __commonJS({
|
|
|
661
661
|
useResponderEvents: () => useResponderEvents
|
|
662
662
|
});
|
|
663
663
|
module2.exports = __toCommonJS2(useResponderEvents_exports);
|
|
664
|
-
var
|
|
664
|
+
var React2 = __toESM2(require("react")), ResponderSystem = __toESM2(require_ResponderSystem_native());
|
|
665
665
|
__reExport2(useResponderEvents_exports, require_utils_native(), module2.exports);
|
|
666
666
|
var emptyObject = {};
|
|
667
667
|
function useResponderEvents(hostRef, config = emptyObject) {
|
|
668
|
-
let id =
|
|
669
|
-
|
|
668
|
+
let id = React2.useId(), isAttachedRef = React2.useRef(!1);
|
|
669
|
+
React2.useEffect(() => (ResponderSystem.attachListeners(), () => {
|
|
670
670
|
ResponderSystem.removeNode(id);
|
|
671
|
-
}), [id]),
|
|
671
|
+
}), [id]), React2.useEffect(() => {
|
|
672
672
|
let {
|
|
673
673
|
onMoveShouldSetResponder,
|
|
674
674
|
onMoveShouldSetResponderCapture,
|
|
@@ -842,7 +842,7 @@ var require_index_native2 = __commonJS({
|
|
|
842
842
|
useIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect2
|
|
843
843
|
});
|
|
844
844
|
module2.exports = __toCommonJS2(index_native_exports);
|
|
845
|
-
var
|
|
845
|
+
var import_react2 = require("react"), isWeb6 = !1, isWindowDefined = !1, isServer2 = !1, isClient2 = !1, useIsomorphicLayoutEffect2 = import_react2.useLayoutEffect, isChrome2 = !1, isWebTouchable2 = !1, isTouchable2 = !0, isAndroid = !1, isIos = !1, currentPlatform = "native";
|
|
846
846
|
}
|
|
847
847
|
});
|
|
848
848
|
|
|
@@ -1152,6 +1152,7 @@ var require_config_native = __commonJS({
|
|
|
1152
1152
|
}, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), config_exports = {};
|
|
1153
1153
|
__export2(config_exports, {
|
|
1154
1154
|
configListeners: () => configListeners,
|
|
1155
|
+
devConfig: () => devConfig,
|
|
1155
1156
|
getConfig: () => getConfig3,
|
|
1156
1157
|
getFont: () => getFont,
|
|
1157
1158
|
getThemes: () => getThemes3,
|
|
@@ -1163,6 +1164,7 @@ var require_config_native = __commonJS({
|
|
|
1163
1164
|
setConfig: () => setConfig,
|
|
1164
1165
|
setConfigFont: () => setConfigFont,
|
|
1165
1166
|
setTokens: () => setTokens,
|
|
1167
|
+
setupDev: () => setupDev3,
|
|
1166
1168
|
updateConfig: () => updateConfig2,
|
|
1167
1169
|
useTokens: () => useTokens
|
|
1168
1170
|
});
|
|
@@ -1205,7 +1207,9 @@ var require_config_native = __commonJS({
|
|
|
1205
1207
|
return ((_b = (_a2 = conf2.fontsParsed[k]) == null ? void 0 : _a2.family) == null ? void 0 : _b.val) === name;
|
|
1206
1208
|
}
|
|
1207
1209
|
)) == null ? void 0 : _a[1]);
|
|
1208
|
-
};
|
|
1210
|
+
}, devConfig;
|
|
1211
|
+
function setupDev3(conf2) {
|
|
1212
|
+
}
|
|
1209
1213
|
}
|
|
1210
1214
|
});
|
|
1211
1215
|
|
|
@@ -2350,7 +2354,7 @@ var require_getVariantExtras_native = __commonJS({
|
|
|
2350
2354
|
tokens: conf.tokensParsed,
|
|
2351
2355
|
theme,
|
|
2352
2356
|
fontFamily,
|
|
2353
|
-
font: fonts[fontFamily],
|
|
2357
|
+
font: fonts[fontFamily] || fonts[styleState.conf.defaultFont],
|
|
2354
2358
|
// TODO do this in splitstlye
|
|
2355
2359
|
// we avoid passing in default props for media queries because that would confuse things like SizableText.size:
|
|
2356
2360
|
props: (0, import_createProxy.createProxy)(curProps, {
|
|
@@ -2564,9 +2568,9 @@ var require_propMapper_native = __commonJS({
|
|
|
2564
2568
|
case "lineHeight":
|
|
2565
2569
|
case "letterSpacing":
|
|
2566
2570
|
case "fontWeight": {
|
|
2567
|
-
let fam = fontFamily ||
|
|
2571
|
+
let defaultFont = conf.defaultFont || "$body", fam = fontFamily || defaultFont;
|
|
2568
2572
|
if (fam) {
|
|
2569
|
-
let
|
|
2573
|
+
let fontsParsed = context != null && context.language ? (0, import_getVariantExtras.getFontsForLanguage)(conf.fontsParsed, context.language) : conf.fontsParsed, font = fontsParsed[fam] || fontsParsed[defaultFont];
|
|
2570
2574
|
valOrVar = ((_b = font == null ? void 0 : font[fontShorthand[key] || key]) == null ? void 0 : _b[value]) || value, hasSet = !0;
|
|
2571
2575
|
}
|
|
2572
2576
|
break;
|
|
@@ -2782,7 +2786,7 @@ var require_ThemeManagerContext_native = __commonJS({
|
|
|
2782
2786
|
ThemeManagerContext: () => ThemeManagerContext
|
|
2783
2787
|
});
|
|
2784
2788
|
module2.exports = __toCommonJS2(ThemeManagerContext_exports);
|
|
2785
|
-
var
|
|
2789
|
+
var import_react2 = require("react"), ThemeManagerContext = (0, import_react2.createContext)(null);
|
|
2786
2790
|
}
|
|
2787
2791
|
});
|
|
2788
2792
|
|
|
@@ -2829,7 +2833,7 @@ var require_useTheme_native = __commonJS({
|
|
|
2829
2833
|
useThemeWithState: () => useThemeWithState
|
|
2830
2834
|
});
|
|
2831
2835
|
module2.exports = __toCommonJS2(useTheme_exports);
|
|
2832
|
-
var import_constants = require_index_native2(),
|
|
2836
|
+
var import_constants = require_index_native2(), import_react2 = require("react"), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_createProxy = require_createProxy_native(), import_ThemeManager = require_ThemeManager_native(), import_ThemeManagerContext = require_ThemeManagerContext_native(), import_getThemeUnwrapped = require_getThemeUnwrapped_native(), emptyProps = { name: null }, cached;
|
|
2833
2837
|
function getDefaultThemeProxied() {
|
|
2834
2838
|
if (cached)
|
|
2835
2839
|
return cached;
|
|
@@ -2840,7 +2844,7 @@ var require_useTheme_native = __commonJS({
|
|
|
2840
2844
|
let [_, theme] = useThemeWithState(props);
|
|
2841
2845
|
return theme || getDefaultThemeProxied();
|
|
2842
2846
|
}, useThemeWithState = (props) => {
|
|
2843
|
-
let keys = (0,
|
|
2847
|
+
let keys = (0, import_react2.useRef)([]), changedThemeState = useChangeThemeEffect(
|
|
2844
2848
|
props,
|
|
2845
2849
|
!1,
|
|
2846
2850
|
keys.current,
|
|
@@ -2851,7 +2855,7 @@ var require_useTheme_native = __commonJS({
|
|
|
2851
2855
|
), { themeManager, state } = changedThemeState, { theme, name, className } = state;
|
|
2852
2856
|
if (!theme)
|
|
2853
2857
|
throw "\u274C 1";
|
|
2854
|
-
let themeProxied = (0,
|
|
2858
|
+
let themeProxied = (0, import_react2.useMemo)(() => getThemeProxied(theme, themeManager, keys.current, props.debug), [theme, name, className, themeManager]);
|
|
2855
2859
|
return [changedThemeState, themeProxied];
|
|
2856
2860
|
};
|
|
2857
2861
|
function getThemeProxied(theme, themeManager, keys, debug) {
|
|
@@ -2888,7 +2892,7 @@ var require_useTheme_native = __commonJS({
|
|
|
2888
2892
|
let {
|
|
2889
2893
|
// @ts-expect-error internal use only
|
|
2890
2894
|
disable
|
|
2891
|
-
} = props, parentManager = (0,
|
|
2895
|
+
} = props, parentManager = (0, import_react2.useContext)(import_ThemeManagerContext.ThemeManagerContext);
|
|
2892
2896
|
if (disable) {
|
|
2893
2897
|
if (!parentManager)
|
|
2894
2898
|
throw "\u274C 2";
|
|
@@ -2898,7 +2902,7 @@ var require_useTheme_native = __commonJS({
|
|
|
2898
2902
|
themeManager: parentManager
|
|
2899
2903
|
};
|
|
2900
2904
|
}
|
|
2901
|
-
let [themeState, setThemeState] = (0,
|
|
2905
|
+
let [themeState, setThemeState] = (0, import_react2.useState)(createState), { state, mounted, isNewTheme, themeManager } = themeState, isInversingOnMount = !!(!themeState.mounted && props.inverse);
|
|
2902
2906
|
function getShouldUpdateTheme(manager = themeManager, nextState, prevState = state, forceShouldChange = !1) {
|
|
2903
2907
|
let forceUpdate = shouldUpdate == null ? void 0 : shouldUpdate();
|
|
2904
2908
|
if (!forceShouldChange && forceUpdate === !1)
|
|
@@ -2907,7 +2911,7 @@ var require_useTheme_native = __commonJS({
|
|
|
2907
2911
|
if (forceShouldChange || next && !(forceUpdate !== !0 && !manager.getStateShouldChange(next, prevState)))
|
|
2908
2912
|
return next;
|
|
2909
2913
|
}
|
|
2910
|
-
if (import_constants.isServer || (0,
|
|
2914
|
+
if (import_constants.isServer || (0, import_react2.useLayoutEffect)(() => {
|
|
2911
2915
|
if (props.inverse && !mounted) {
|
|
2912
2916
|
setThemeState({ ...themeState, mounted: !0 });
|
|
2913
2917
|
return;
|
|
@@ -3011,7 +3015,7 @@ var require_useMedia_native = __commonJS({
|
|
|
3011
3015
|
useMediaPropsActive: () => useMediaPropsActive3
|
|
3012
3016
|
});
|
|
3013
3017
|
module2.exports = __toCommonJS2(useMedia_exports);
|
|
3014
|
-
var import_constants = require_index_native2(),
|
|
3018
|
+
var import_constants = require_index_native2(), import_react2 = require("react"), import_config = require_config_native(), import_createProxy = require_createProxy_native(), import_matchMedia = require_matchMedia_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_useTheme = require_useTheme_native(), mediaState3 = {}, mediaQueryConfig3 = {}, getMedia3 = () => mediaState3, mediaKeys = /* @__PURE__ */ new Set(), isMediaKey = (key) => mediaKeys.has(key) || key[0] === "$" && (key.startsWith("$platform-") || key.startsWith("$theme-") || key.startsWith("$group-")), initState, getInitialMediaState = () => ((0, import_config.getConfig)().disableSSR ? mediaState3 : initState) || {}, defaultMediaImportance = Object.keys(import_pseudoDescriptors.pseudoDescriptors).length, mediaKeysOrdered, getMediaKeyImportance = (key) => (0, import_config.getConfig)().settings.mediaPropOrder ? defaultMediaImportance : mediaKeysOrdered.indexOf(key) + 100, dispose = /* @__PURE__ */ new Set(), mediaVersion = 0, configureMedia2 = (config) => {
|
|
3015
3019
|
let { media, mediaQueryDefaultActive } = config;
|
|
3016
3020
|
if (media) {
|
|
3017
3021
|
mediaVersion++;
|
|
@@ -3061,7 +3065,7 @@ var require_useMedia_native = __commonJS({
|
|
|
3061
3065
|
return listeners.add(subscriber), () => listeners.delete(subscriber);
|
|
3062
3066
|
}
|
|
3063
3067
|
function useMedia3(uid) {
|
|
3064
|
-
let internal = (0,
|
|
3068
|
+
let internal = (0, import_react2.useRef)(), state = (0, import_react2.useSyncExternalStore)(
|
|
3065
3069
|
subscribe,
|
|
3066
3070
|
() => {
|
|
3067
3071
|
if (!internal.current)
|
|
@@ -3082,7 +3086,7 @@ var require_useMedia_native = __commonJS({
|
|
|
3082
3086
|
}
|
|
3083
3087
|
function useMediaPropsActive3(props, opts) {
|
|
3084
3088
|
let media = useMedia3(), resolveAs = (opts == null ? void 0 : opts.resolveValues) || "none", theme = resolveAs ? (0, import_useTheme.useTheme)() : null, styleState = { theme }, shouldExpandShorthands = opts == null ? void 0 : opts.expandShorthands;
|
|
3085
|
-
return (0,
|
|
3089
|
+
return (0, import_react2.useMemo)(() => {
|
|
3086
3090
|
let config = (0, import_config.getConfig)(), next = {}, importancesUsed = {}, propNames = Object.keys(props), len = propNames.length;
|
|
3087
3091
|
for (let i = 0; i < len; i++) {
|
|
3088
3092
|
let key = propNames[i], val = props[key];
|
|
@@ -3227,7 +3231,7 @@ var require_compose_refs_native = __commonJS({
|
|
|
3227
3231
|
useComposedRefs: () => useComposedRefs
|
|
3228
3232
|
});
|
|
3229
3233
|
module2.exports = __toCommonJS2(compose_refs_exports);
|
|
3230
|
-
var
|
|
3234
|
+
var React2 = __toESM2(require("react"));
|
|
3231
3235
|
function setRef(ref, value) {
|
|
3232
3236
|
typeof ref == "function" ? ref(value) : ref && (ref.current = value);
|
|
3233
3237
|
}
|
|
@@ -3235,7 +3239,7 @@ var require_compose_refs_native = __commonJS({
|
|
|
3235
3239
|
return (node) => refs.forEach((ref) => setRef(ref, node));
|
|
3236
3240
|
}
|
|
3237
3241
|
function useComposedRefs(...refs) {
|
|
3238
|
-
return
|
|
3242
|
+
return React2.useCallback(composeRefs(...refs), refs);
|
|
3239
3243
|
}
|
|
3240
3244
|
}
|
|
3241
3245
|
});
|
|
@@ -3273,7 +3277,7 @@ var require_index_native7 = __commonJS({
|
|
|
3273
3277
|
useDidFinishSSR: () => useDidFinishSSR2
|
|
3274
3278
|
});
|
|
3275
3279
|
module2.exports = __toCommonJS2(src_exports2);
|
|
3276
|
-
var
|
|
3280
|
+
var import_react2 = require("react");
|
|
3277
3281
|
function useDidFinishSSR2(value) {
|
|
3278
3282
|
return value ?? !0;
|
|
3279
3283
|
}
|
|
@@ -3337,13 +3341,13 @@ var require_createStyledContext_native = __commonJS({
|
|
|
3337
3341
|
createStyledContext: () => createStyledContext2
|
|
3338
3342
|
});
|
|
3339
3343
|
module2.exports = __toCommonJS2(createStyledContext_exports);
|
|
3340
|
-
var
|
|
3344
|
+
var import_react2 = require("react"), import_objectIdentityKey = require_objectIdentityKey_native(), import_jsx_runtime6 = require("react/jsx-runtime");
|
|
3341
3345
|
function createStyledContext2(props) {
|
|
3342
|
-
let OGContext = (0,
|
|
3346
|
+
let OGContext = (0, import_react2.createContext)(props), OGProvider2 = OGContext.Provider, Context = OGContext, Provider = ({
|
|
3343
3347
|
children,
|
|
3344
3348
|
...values
|
|
3345
3349
|
}) => {
|
|
3346
|
-
let value = (0,
|
|
3350
|
+
let value = (0, import_react2.useMemo)(() => ({
|
|
3347
3351
|
...props,
|
|
3348
3352
|
...values
|
|
3349
3353
|
}), [(0, import_objectIdentityKey.objectIdentityKey)(values)]);
|
|
@@ -3663,7 +3667,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3663
3667
|
useSplitStyles: () => useSplitStyles
|
|
3664
3668
|
});
|
|
3665
3669
|
module2.exports = __toCommonJS2(getSplitStyles_exports);
|
|
3666
|
-
var import_constants = require_index_native2(), import_helpers = require_index_native4(),
|
|
3670
|
+
var import_constants = require_index_native2(), import_helpers = require_index_native4(), import_react2 = require("react"), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_getStylesAtomic = require_getStylesAtomic_native(), import_insertStyleRule = require_insertStyleRule_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), fontFamilyKey = "fontFamily", IS_STATIC = process.env.IS_STATIC === "is_static", conf, PROP_SPLIT = "-", getSplitStyles = (props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug) => {
|
|
3667
3671
|
var _a, _b, _c, _e, _f, _g;
|
|
3668
3672
|
conf = conf || (0, import_config.getConfig)();
|
|
3669
3673
|
let { shorthands } = conf, {
|
|
@@ -3747,7 +3751,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3747
3751
|
if (isStyleProp && props.asChild === "except-style")
|
|
3748
3752
|
continue;
|
|
3749
3753
|
let shouldPassProp = !isStyleProp || // is in parent variants
|
|
3750
|
-
isHOC && (parentStaticConfig == null ? void 0 : parentStaticConfig.variants) && keyInit in parentStaticConfig.variants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)),
|
|
3754
|
+
isHOC && (parentStaticConfig == null ? void 0 : parentStaticConfig.variants) && keyInit in parentStaticConfig.variants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = (_a = parentStaticConfig == null ? void 0 : parentStaticConfig.variants) == null ? void 0 : _a[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo || parentVariant || keyInit in skipProps));
|
|
3751
3755
|
if ((shouldPassProp || isHOCShouldPassThrough) && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo), !isVariant) || keyInit in skipProps)
|
|
3752
3756
|
continue;
|
|
3753
3757
|
if (isText && valInit && (keyInit === fontFamilyKey || keyInit === shorthands[fontFamilyKey]) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit), isValidStyleKeyInit && !variants && (valInitType === "number" || valInitType === "string" && valInit[0] !== "$")) {
|
|
@@ -3987,7 +3991,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3987
3991
|
for (let key in cur)
|
|
3988
3992
|
key in styleState.usedKeys || mergeStyle(styleState, key, cur[key]);
|
|
3989
3993
|
}
|
|
3990
|
-
var useInsertEffectCompat = import_constants.isWeb ?
|
|
3994
|
+
var useInsertEffectCompat = import_constants.isWeb ? import_react2.useInsertionEffect || import_constants.useIsomorphicLayoutEffect : () => {
|
|
3991
3995
|
}, useSplitStyles = (...args) => {
|
|
3992
3996
|
let res = getSplitStyles(...args);
|
|
3993
3997
|
return useInsertEffectCompat(() => {
|
|
@@ -4178,17 +4182,17 @@ var require_Theme_native = __commonJS({
|
|
|
4178
4182
|
wrapThemeElements: () => wrapThemeElements
|
|
4179
4183
|
});
|
|
4180
4184
|
module2.exports = __toCommonJS2(Theme_exports);
|
|
4181
|
-
var import_constants = require_index_native2(),
|
|
4185
|
+
var import_constants = require_index_native2(), import_react2 = __toESM2(require("react")), import_createVariable = require_createVariable_native(), import_ThemeManagerContext = require_ThemeManagerContext_native(), import_useTheme = require_useTheme_native(), import_ThemeDebug = require_ThemeDebug_native(), import_jsx_runtime6 = require("react/jsx-runtime"), Theme2 = (0, import_react2.forwardRef)(function(props, ref) {
|
|
4182
4186
|
if (props.disable)
|
|
4183
4187
|
return props.children;
|
|
4184
|
-
let isRoot = !!props._isRoot, disableDirectChildTheme = props["disable-child-theme"], themeState = (0, import_useTheme.useChangeThemeEffect)(props, isRoot), children = (0,
|
|
4185
|
-
let children2 = disableDirectChildTheme ?
|
|
4188
|
+
let isRoot = !!props._isRoot, disableDirectChildTheme = props["disable-child-theme"], themeState = (0, import_useTheme.useChangeThemeEffect)(props, isRoot), children = (0, import_react2.useMemo)(() => {
|
|
4189
|
+
let children2 = disableDirectChildTheme ? import_react2.Children.map(
|
|
4186
4190
|
props.children,
|
|
4187
|
-
(child) => (0,
|
|
4191
|
+
(child) => (0, import_react2.cloneElement)(child, { "data-disable-theme": !0 })
|
|
4188
4192
|
) : props.children;
|
|
4189
4193
|
if (ref)
|
|
4190
4194
|
try {
|
|
4191
|
-
|
|
4195
|
+
import_react2.default.Children.only(children2), children2 = (0, import_react2.cloneElement)(children2, { ref });
|
|
4192
4196
|
} catch {
|
|
4193
4197
|
}
|
|
4194
4198
|
return children2;
|
|
@@ -4197,11 +4201,11 @@ var require_Theme_native = __commonJS({
|
|
|
4197
4201
|
});
|
|
4198
4202
|
Theme2.avoidForwardRef = !0;
|
|
4199
4203
|
function useThemedChildren(themeState, children, props, isRoot = !1) {
|
|
4200
|
-
let { themeManager, isNewTheme } = themeState, { shallow, forceClassName } = props, hasEverThemed = (0,
|
|
4204
|
+
let { themeManager, isNewTheme } = themeState, { shallow, forceClassName } = props, hasEverThemed = (0, import_react2.useRef)(!1);
|
|
4201
4205
|
if (isNewTheme && (hasEverThemed.current = !0), !(isNewTheme || props.inverse || hasEverThemed.current || forceClassName || isRoot))
|
|
4202
4206
|
return children;
|
|
4203
4207
|
let next = children;
|
|
4204
|
-
shallow && themeManager && (next =
|
|
4208
|
+
shallow && themeManager && (next = import_react2.Children.toArray(children).map((child) => (0, import_react2.isValidElement)(child) ? (0, import_react2.cloneElement)(
|
|
4205
4209
|
child,
|
|
4206
4210
|
void 0,
|
|
4207
4211
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Theme2, { name: themeManager.state.parentName, children: child.props.children })
|
|
@@ -4265,10 +4269,10 @@ var require_themeable_native = __commonJS({
|
|
|
4265
4269
|
themeable: () => themeable3
|
|
4266
4270
|
});
|
|
4267
4271
|
module2.exports = __toCommonJS2(themeable_exports);
|
|
4268
|
-
var
|
|
4272
|
+
var import_react2 = __toESM2(require("react")), import_Theme = require_Theme_native(), import_jsx_runtime6 = require("react/jsx-runtime");
|
|
4269
4273
|
function themeable3(component, staticConfig) {
|
|
4270
|
-
let withTheme = (0,
|
|
4271
|
-
let { themeInverse, theme, componentName, themeReset, ...rest } = props, element =
|
|
4274
|
+
let withTheme = (0, import_react2.forwardRef)(function(props, ref) {
|
|
4275
|
+
let { themeInverse, theme, componentName, themeReset, ...rest } = props, element = import_react2.default.createElement(component, {
|
|
4272
4276
|
...rest,
|
|
4273
4277
|
ref,
|
|
4274
4278
|
"data-disable-theme": !0
|
|
@@ -4334,11 +4338,11 @@ var require_Slot_native = __commonJS({
|
|
|
4334
4338
|
Slottable: () => Slottable
|
|
4335
4339
|
});
|
|
4336
4340
|
module2.exports = __toCommonJS2(Slot_exports);
|
|
4337
|
-
var import_compose_refs = require_index_native6(), import_constants = require_index_native2(), import_helpers = require_index_native4(),
|
|
4341
|
+
var import_compose_refs = require_index_native6(), import_constants = require_index_native2(), import_helpers = require_index_native4(), import_react2 = require("react"), import_jsx_runtime6 = require("react/jsx-runtime"), Slot = (0, import_react2.forwardRef)(function(props, forwardedRef) {
|
|
4338
4342
|
let { children, ...slotProps } = props;
|
|
4339
|
-
if ((0,
|
|
4343
|
+
if ((0, import_react2.isValidElement)(children)) {
|
|
4340
4344
|
let mergedProps = mergeSlotProps(children, slotProps);
|
|
4341
|
-
return (0,
|
|
4345
|
+
return (0, import_react2.cloneElement)(
|
|
4342
4346
|
children,
|
|
4343
4347
|
children.type.avoidForwardRef ? mergedProps : {
|
|
4344
4348
|
...mergedProps,
|
|
@@ -4346,7 +4350,7 @@ var require_Slot_native = __commonJS({
|
|
|
4346
4350
|
}
|
|
4347
4351
|
);
|
|
4348
4352
|
}
|
|
4349
|
-
return
|
|
4353
|
+
return import_react2.Children.count(children) > 1 ? import_react2.Children.only(null) : null;
|
|
4350
4354
|
}), Slottable = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children }), pressMap = import_constants.isWeb ? {
|
|
4351
4355
|
onPress: "onClick",
|
|
4352
4356
|
onPressOut: "onMouseUp",
|
|
@@ -4395,7 +4399,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4395
4399
|
spacedChildren: () => spacedChildren2
|
|
4396
4400
|
});
|
|
4397
4401
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
4398
|
-
var import_compose_refs = require_index_native6(), import_constants = require_index_native2(), import_helpers = require_index_native4(), import_use_did_finish_ssr = require_index_native7(),
|
|
4402
|
+
var import_compose_refs = require_index_native6(), import_constants = require_index_native2(), import_helpers = require_index_native4(), import_use_did_finish_ssr = require_index_native7(), import_react2 = __toESM2(require("react")), import_config = require_config_native(), import_constants2 = require_constants_native(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_createShallowSetState = require_createShallowSetState_native(), import_getSplitStyles = require_getSplitStyles_native(), import_mergeProps = require_mergeProps_native(), import_proxyThemeVariables = require_proxyThemeVariables_native(), import_themeable = require_themeable_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native(), import_setupHooks = require_setupHooks_native(), import_Slot = require_Slot_native(), import_Theme = require_Theme_native(), import_ThemeDebug = require_ThemeDebug_native(), import_jsx_runtime6 = require("react/jsx-runtime"), tamaguiConfig, AnimatedText, AnimatedView, initialTheme, mouseUps = /* @__PURE__ */ new Set();
|
|
4399
4403
|
if (typeof document < "u") {
|
|
4400
4404
|
let cancelTouches = () => {
|
|
4401
4405
|
mouseUps.forEach((x) => x()), mouseUps.clear();
|
|
@@ -4419,7 +4423,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4419
4423
|
isHOC,
|
|
4420
4424
|
validStyles: validStyles2 = {},
|
|
4421
4425
|
variants = {}
|
|
4422
|
-
} = staticConfig, defaultComponentClassName = `is_${staticConfig.componentName}`, defaultProps = staticConfig.defaultProps, component = (0,
|
|
4426
|
+
} = staticConfig, defaultComponentClassName = `is_${staticConfig.componentName}`, defaultProps = staticConfig.defaultProps, component = (0, import_react2.forwardRef)((propsIn, forwardedRef) => {
|
|
4423
4427
|
var _a2, _b, _c, _d, _g, _h, _i, _j, _k;
|
|
4424
4428
|
if (!hasSetupBaseViews) {
|
|
4425
4429
|
hasSetupBaseViews = !0;
|
|
@@ -4427,9 +4431,9 @@ var require_createComponent_native = __commonJS({
|
|
|
4427
4431
|
baseViews && (BaseText = baseViews.Text, BaseView = baseViews.View);
|
|
4428
4432
|
}
|
|
4429
4433
|
propsIn["data-test-renders"] && (propsIn["data-test-renders"].current ??= 0, propsIn["data-test-renders"].current += 1);
|
|
4430
|
-
let componentContext = (0,
|
|
4434
|
+
let componentContext = (0, import_react2.useContext)(import_ComponentContext.ComponentContext), styledContextProps, overriddenContextProps, contextValue, { context } = staticConfig;
|
|
4431
4435
|
if (context) {
|
|
4432
|
-
contextValue = (0,
|
|
4436
|
+
contextValue = (0, import_react2.useContext)(context);
|
|
4433
4437
|
let { inverseShorthands } = (0, import_config.getConfig)();
|
|
4434
4438
|
for (let key in context.props) {
|
|
4435
4439
|
let propVal = (
|
|
@@ -4441,16 +4445,16 @@ var require_createComponent_native = __commonJS({
|
|
|
4441
4445
|
}
|
|
4442
4446
|
let curDefaultProps = styledContextProps ? { ...defaultProps, ...styledContextProps } : defaultProps, props;
|
|
4443
4447
|
curDefaultProps ? props = (0, import_mergeProps.mergeProps)(curDefaultProps, propsIn) : props = propsIn;
|
|
4444
|
-
let debugProp = props.debug, componentName = props.componentName || staticConfig.componentName, isHydrated = config != null && config.disableSSR ? !0 : (0, import_use_did_finish_ssr.useDidFinishSSR)(), stateRef = (0,
|
|
4448
|
+
let debugProp = props.debug, componentName = props.componentName || staticConfig.componentName, isHydrated = config != null && config.disableSSR ? !0 : (0, import_use_did_finish_ssr.useDidFinishSSR)(), stateRef = (0, import_react2.useRef)(
|
|
4445
4449
|
void 0
|
|
4446
4450
|
);
|
|
4447
4451
|
stateRef.current ||= {};
|
|
4448
|
-
let hostRef = (0,
|
|
4452
|
+
let hostRef = (0, import_react2.useRef)(null), animationsConfig = componentContext.animationDriver, useAnimations = animationsConfig == null ? void 0 : animationsConfig.useAnimations, hasAnimationProp = !!(props.animation || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationsConfig == null ? void 0 : animationsConfig.supportsCSSVars, willBeAnimated = (() => {
|
|
4449
4453
|
if (import_constants.isServer && !supportsCSSVars)
|
|
4450
4454
|
return !1;
|
|
4451
4455
|
let curState = stateRef.current;
|
|
4452
4456
|
return !!(hasAnimationProp && !isHOC && useAnimations || curState.hasAnimated);
|
|
4453
|
-
})(), usePresence = animationsConfig == null ? void 0 : animationsConfig.usePresence, presence = willBeAnimated && (usePresence == null ? void 0 : usePresence()) || null, hasEnterStyle = !!props.enterStyle, needsMount = !!((!import_constants.isWeb || import_constants.isClient) && willBeAnimated), initialState = willBeAnimated ? supportsCSSVars ? import_defaultComponentState.defaultComponentStateShouldEnter : import_defaultComponentState.defaultComponentState : import_defaultComponentState.defaultComponentStateMounted, states = (0,
|
|
4457
|
+
})(), usePresence = animationsConfig == null ? void 0 : animationsConfig.usePresence, presence = willBeAnimated && (usePresence == null ? void 0 : usePresence()) || null, hasEnterStyle = !!props.enterStyle, needsMount = !!((!import_constants.isWeb || import_constants.isClient) && willBeAnimated), initialState = willBeAnimated ? supportsCSSVars ? import_defaultComponentState.defaultComponentStateShouldEnter : import_defaultComponentState.defaultComponentState : import_defaultComponentState.defaultComponentStateMounted, states = (0, import_react2.useState)(initialState), state = propsIn.forceStyle ? { ...states[0], [propsIn.forceStyle]: !0 } : states[0], setState = states[1], setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState), groupName = props.group, groupClassName = groupName ? `t_group_${props.group}` : "";
|
|
4454
4458
|
if (groupName) {
|
|
4455
4459
|
let groupContextState = componentContext.groups.state, og = setStateShallow;
|
|
4456
4460
|
setStateShallow = (state2) => {
|
|
@@ -4586,7 +4590,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4586
4590
|
press: !1,
|
|
4587
4591
|
pressIn: !1
|
|
4588
4592
|
}), shouldSetMounted = needsMount && state.unmounted, { pseudoGroups, mediaGroups } = splitStyles;
|
|
4589
|
-
(0,
|
|
4593
|
+
(0, import_react2.useEffect)(() => {
|
|
4590
4594
|
if (shouldSetMounted) {
|
|
4591
4595
|
let unmounted = state.unmounted === !0 && hasEnterStyle ? "should-enter" : !1;
|
|
4592
4596
|
setStateShallow({
|
|
@@ -4683,8 +4687,8 @@ var require_createComponent_native = __commonJS({
|
|
|
4683
4687
|
onLongPress,
|
|
4684
4688
|
onPressIn,
|
|
4685
4689
|
onPressOut
|
|
4686
|
-
})), content = (0,
|
|
4687
|
-
let subGroupContext = (0,
|
|
4690
|
+
})), content = (0, import_react2.createElement)(elementType, viewProps, content);
|
|
4691
|
+
let subGroupContext = (0, import_react2.useMemo)(() => {
|
|
4688
4692
|
if (groupName)
|
|
4689
4693
|
return {
|
|
4690
4694
|
...componentContext.groups,
|
|
@@ -4715,13 +4719,14 @@ var require_createComponent_native = __commonJS({
|
|
|
4715
4719
|
});
|
|
4716
4720
|
staticConfig.componentName && (component.displayName = staticConfig.componentName);
|
|
4717
4721
|
let res = component;
|
|
4718
|
-
(process.env.TAMAGUI_MEMO_ALL || staticConfig.memo) && (res = (0,
|
|
4722
|
+
(process.env.TAMAGUI_MEMO_ALL || staticConfig.memo) && (res = (0, import_react2.memo)(res)), res.staticConfig = staticConfig;
|
|
4719
4723
|
function extendStyledConfig(extended) {
|
|
4720
4724
|
return {
|
|
4721
4725
|
...staticConfig,
|
|
4722
4726
|
...extended,
|
|
4723
4727
|
neverFlatten: !0,
|
|
4724
|
-
isHOC: !0
|
|
4728
|
+
isHOC: !0,
|
|
4729
|
+
isStyledHOC: !1
|
|
4725
4730
|
};
|
|
4726
4731
|
}
|
|
4727
4732
|
function extractable(Component2, extended) {
|
|
@@ -4731,7 +4736,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4731
4736
|
var _a2;
|
|
4732
4737
|
let ComponentForwardedRef = ((_a2 = Component2.render) == null ? void 0 : _a2.length) === 2 ? Component2 : (
|
|
4733
4738
|
// memo because theme changes otherwise would always re-render
|
|
4734
|
-
(0,
|
|
4739
|
+
(0, import_react2.memo)((0, import_react2.forwardRef)(Component2))
|
|
4735
4740
|
), extendedConfig = extendStyledConfig(extended), out = (0, import_themeable.themeable)(ComponentForwardedRef, extendedConfig);
|
|
4736
4741
|
return out.staticConfig = extendedConfig, out.styleable = styleable, out;
|
|
4737
4742
|
}
|
|
@@ -4789,19 +4794,19 @@ var require_createComponent_native = __commonJS({
|
|
|
4789
4794
|
let { isZStack, children, space, direction, spaceFlex, separator } = props, hasSpace = !!(space || spaceFlex), hasSeparator = separator != null;
|
|
4790
4795
|
if (!(hasSpace || hasSeparator || isZStack))
|
|
4791
4796
|
return children;
|
|
4792
|
-
let childrenList =
|
|
4797
|
+
let childrenList = import_react2.Children.toArray(children);
|
|
4793
4798
|
if (childrenList.length <= 1 && !isZStack && !((_b = (_a = childrenList[0]) == null ? void 0 : _a.type) != null && _b.shouldForwardSpace))
|
|
4794
4799
|
return childrenList;
|
|
4795
4800
|
let final = [];
|
|
4796
4801
|
for (let [index, child] of childrenList.entries()) {
|
|
4797
4802
|
let isEmpty = child == null || Array.isArray(child) && child.length === 0;
|
|
4798
|
-
if (!isEmpty &&
|
|
4803
|
+
if (!isEmpty && import_react2.default.isValidElement(child) && (_c = child.type) != null && _c.shouldForwardSpace && (child = import_react2.default.cloneElement(child, {
|
|
4799
4804
|
space,
|
|
4800
4805
|
spaceFlex,
|
|
4801
4806
|
separator,
|
|
4802
4807
|
key: child.key
|
|
4803
4808
|
})), isEmpty || !child || child.key && !isZStack ? final.push(child) : final.push(
|
|
4804
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
4809
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react2.Fragment, { children: isZStack ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AbsoluteFill, { children: child }) : child }, index)
|
|
4805
4810
|
), isUnspaced(child) && index === 0 || isZStack)
|
|
4806
4811
|
continue;
|
|
4807
4812
|
let next = childrenList[index + 1];
|
|
@@ -4813,7 +4818,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4813
4818
|
spaceFlex
|
|
4814
4819
|
})
|
|
4815
4820
|
), final.push(
|
|
4816
|
-
|
|
4821
|
+
import_react2.default.isValidElement(separator) ? import_react2.default.cloneElement(separator, { key: `sep_${index}` }) : separator
|
|
4817
4822
|
), hasSpace && final.push(
|
|
4818
4823
|
createSpacer({
|
|
4819
4824
|
key: `_${index}01tmgui`,
|
|
@@ -5525,7 +5530,7 @@ var require_styled_native = __commonJS({
|
|
|
5525
5530
|
}), parentStaticConfig && (parentStaticConfig.isHOC && !parentStaticConfig.isStyledHOC || (defaultProps = {
|
|
5526
5531
|
...parentStaticConfig.defaultProps,
|
|
5527
5532
|
...defaultProps
|
|
5528
|
-
}
|
|
5533
|
+
}, parentStaticConfig.variants && (variants = (0, import_mergeVariants.mergeVariants)(parentStaticConfig.variants, variants)))), parentStaticConfig != null && parentStaticConfig.isHOC && name && (defaultProps.componentName = name);
|
|
5529
5534
|
let isText = !!(staticExtractionOptions != null && staticExtractionOptions.isText || parentStaticConfig != null && parentStaticConfig.isText), acceptsClassName = acceptsClassNameProp ?? (isPlainStyledComponent || isReactNative || (parentStaticConfig == null ? void 0 : parentStaticConfig.isHOC) && (parentStaticConfig == null ? void 0 : parentStaticConfig.acceptsClassName)), conf = {
|
|
5530
5535
|
...parentStaticConfig,
|
|
5531
5536
|
...staticExtractionOptions,
|
|
@@ -5679,7 +5684,7 @@ var require_isTamaguiElement_native = __commonJS({
|
|
|
5679
5684
|
isTamaguiElement: () => isTamaguiElement2
|
|
5680
5685
|
});
|
|
5681
5686
|
module2.exports = __toCommonJS2(isTamaguiElement_exports);
|
|
5682
|
-
var
|
|
5687
|
+
var import_react2 = require("react"), import_isTamaguiComponent = require_isTamaguiComponent_native(), isTamaguiElement2 = (child, name) => (0, import_react2.isValidElement)(child) && (0, import_isTamaguiComponent.isTamaguiComponent)(child.type, name);
|
|
5683
5688
|
}
|
|
5684
5689
|
});
|
|
5685
5690
|
|
|
@@ -5700,11 +5705,11 @@ var require_withStaticProperties_native = __commonJS({
|
|
|
5700
5705
|
withStaticProperties: () => withStaticProperties2
|
|
5701
5706
|
});
|
|
5702
5707
|
module2.exports = __toCommonJS2(withStaticProperties_exports);
|
|
5703
|
-
var
|
|
5708
|
+
var import_react2 = require("react"), Decorated = Symbol(), withStaticProperties2 = function(component, staticProps) {
|
|
5704
5709
|
let next = (() => {
|
|
5705
5710
|
if (component[Decorated]) {
|
|
5706
|
-
let _ = (0,
|
|
5707
|
-
(props, ref) => (0,
|
|
5711
|
+
let _ = (0, import_react2.forwardRef)(
|
|
5712
|
+
(props, ref) => (0, import_react2.createElement)(component, { ...props, ref })
|
|
5708
5713
|
);
|
|
5709
5714
|
for (let key in component) {
|
|
5710
5715
|
let v = component[key];
|
|
@@ -5735,9 +5740,9 @@ var require_useThemeName_native = __commonJS({
|
|
|
5735
5740
|
useThemeName: () => useThemeName2
|
|
5736
5741
|
});
|
|
5737
5742
|
module2.exports = __toCommonJS2(useThemeName_exports);
|
|
5738
|
-
var import_constants = require_index_native2(),
|
|
5743
|
+
var import_constants = require_index_native2(), import_react2 = require("react"), import_ThemeManagerContext = require_ThemeManagerContext_native();
|
|
5739
5744
|
function useThemeName2(opts) {
|
|
5740
|
-
let manager = (0,
|
|
5745
|
+
let manager = (0, import_react2.useContext)(import_ThemeManagerContext.ThemeManagerContext), [name, setName] = (0, import_react2.useState)((manager == null ? void 0 : manager.state.name) || "");
|
|
5741
5746
|
return (0, import_constants.useIsomorphicLayoutEffect)(() => {
|
|
5742
5747
|
if (manager)
|
|
5743
5748
|
return setName(manager.state.name), manager.onChangeTheme((next, manager2) => {
|
|
@@ -5766,9 +5771,9 @@ var require_useStyle_native = __commonJS({
|
|
|
5766
5771
|
useStyle: () => useStyle2
|
|
5767
5772
|
});
|
|
5768
5773
|
module2.exports = __toCommonJS2(useStyle_exports);
|
|
5769
|
-
var
|
|
5774
|
+
var import_react2 = require("react"), import_ComponentContext = require_ComponentContext_native(), import_defaultComponentState = require_defaultComponentState_native(), import_getSplitStyles = require_getSplitStyles_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native();
|
|
5770
5775
|
function useStyle2(base, style, options) {
|
|
5771
|
-
let isText = base.staticConfig.isText, componentContext = (0,
|
|
5776
|
+
let isText = base.staticConfig.isText, componentContext = (0, import_react2.useContext)(import_ComponentContext.ComponentContext), [themeState] = (0, import_useTheme.useThemeWithState)({}), media = (0, import_useMedia.useMedia)(), out = (0, import_getSplitStyles.useSplitStyles)(
|
|
5772
5777
|
style,
|
|
5773
5778
|
base.staticConfig,
|
|
5774
5779
|
themeState.state.theme,
|
|
@@ -5809,7 +5814,7 @@ var require_useAnimationDriver_native = __commonJS({
|
|
|
5809
5814
|
useAnimationDriver: () => useAnimationDriver
|
|
5810
5815
|
});
|
|
5811
5816
|
module2.exports = __toCommonJS2(useAnimationDriver_exports);
|
|
5812
|
-
var
|
|
5817
|
+
var import_react2 = require("react"), import_ComponentContext = require_ComponentContext_native(), import_getAnimationDriver = require_getAnimationDriver_native(), useAnimationDriver = () => (0, import_react2.useContext)(import_ComponentContext.ComponentContext).animationDriver ?? (0, import_getAnimationDriver.getAnimationDriver)();
|
|
5813
5818
|
}
|
|
5814
5819
|
});
|
|
5815
5820
|
|
|
@@ -5977,7 +5982,7 @@ var require_ThemeProvider_native = __commonJS({
|
|
|
5977
5982
|
ThemeProvider: () => ThemeProvider
|
|
5978
5983
|
});
|
|
5979
5984
|
module2.exports = __toCommonJS2(ThemeProvider_exports);
|
|
5980
|
-
var import_constants = require_index_native2(),
|
|
5985
|
+
var import_constants = require_index_native2(), import_react2 = require("react"), import_constants2 = require_constants_native(), import_Theme = require_Theme_native(), import_jsx_runtime6 = require("react/jsx-runtime"), ThemeProvider = (props) => (import_constants.isClient && (0, import_react2.useLayoutEffect)(() => {
|
|
5981
5986
|
if (props.disableRootThemeClass)
|
|
5982
5987
|
return;
|
|
5983
5988
|
let cn = `${import_constants2.THEME_CLASSNAME_PREFIX}${props.defaultTheme}`, target = props.themeClassNameOnRoot ? document.documentElement : document.body;
|
|
@@ -6014,8 +6019,8 @@ var require_FontLanguage_native = __commonJS({
|
|
|
6014
6019
|
FontLanguage: () => FontLanguage2
|
|
6015
6020
|
});
|
|
6016
6021
|
module2.exports = __toCommonJS2(FontLanguage_native_exports);
|
|
6017
|
-
var
|
|
6018
|
-
let language = (0,
|
|
6022
|
+
var import_react2 = require("react"), import_ComponentContext = require_ComponentContext_native(), import_jsx_runtime6 = require("react/jsx-runtime"), FontLanguage2 = ({ children, ...props }) => {
|
|
6023
|
+
let language = (0, import_react2.useMemo)(() => props, [JSON.stringify(props)]);
|
|
6019
6024
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, { language, children });
|
|
6020
6025
|
};
|
|
6021
6026
|
}
|
|
@@ -6045,14 +6050,14 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
6045
6050
|
TamaguiProvider: () => TamaguiProvider2
|
|
6046
6051
|
});
|
|
6047
6052
|
module2.exports = __toCommonJS2(TamaguiProvider_exports);
|
|
6048
|
-
var import_constants = require_index_native2(),
|
|
6053
|
+
var import_constants = require_index_native2(), React2 = __toESM2(require("react")), import_ComponentContext = require_ComponentContext_native(), import_useMedia = require_useMedia_native(), import_ThemeProvider = require_ThemeProvider_native(), import_jsx_runtime6 = require("react/jsx-runtime");
|
|
6049
6054
|
function TamaguiProvider2({
|
|
6050
6055
|
children,
|
|
6051
6056
|
disableInjectCSS,
|
|
6052
6057
|
config,
|
|
6053
6058
|
...themePropsProvider
|
|
6054
6059
|
}) {
|
|
6055
|
-
return import_constants.isWeb && import_constants.isServer || (0, import_useMedia.useMediaListeners)(config), import_constants.isClient &&
|
|
6060
|
+
return import_constants.isWeb && import_constants.isServer || (0, import_useMedia.useMediaListeners)(config), import_constants.isClient && React2.useLayoutEffect(() => {
|
|
6056
6061
|
if (document.documentElement.classList.contains("t_unmounted") && document.documentElement.classList.remove("t_unmounted"), disableInjectCSS)
|
|
6057
6062
|
return;
|
|
6058
6063
|
let style = document.createElement("style");
|
|
@@ -6111,12 +6116,12 @@ var require_useGet_native = __commonJS({
|
|
|
6111
6116
|
useGet: () => useGet2
|
|
6112
6117
|
});
|
|
6113
6118
|
module2.exports = __toCommonJS2(useGet_exports);
|
|
6114
|
-
var
|
|
6119
|
+
var import_react2 = require("react"), isWeb6 = !1, isClient2 = typeof window < "u", useIsomorphicLayoutEffect2 = !isWeb6 || isClient2 ? import_react2.useLayoutEffect : import_react2.useEffect;
|
|
6115
6120
|
function useGet2(currentValue, initialValue, forwardToFunction) {
|
|
6116
|
-
let curRef = (0,
|
|
6121
|
+
let curRef = (0, import_react2.useRef)(initialValue ?? currentValue);
|
|
6117
6122
|
return useIsomorphicLayoutEffect2(() => {
|
|
6118
6123
|
curRef.current = currentValue;
|
|
6119
|
-
}), (0,
|
|
6124
|
+
}), (0, import_react2.useCallback)(
|
|
6120
6125
|
forwardToFunction ? (...args) => {
|
|
6121
6126
|
var _a;
|
|
6122
6127
|
return (_a = curRef.current) == null ? void 0 : _a.apply(null, args);
|
|
@@ -6194,6 +6199,7 @@ var require_index_native9 = __commonJS({
|
|
|
6194
6199
|
mediaObjectToString: () => import_useMedia.mediaObjectToString,
|
|
6195
6200
|
mediaQueryConfig: () => import_useMedia.mediaQueryConfig,
|
|
6196
6201
|
mediaState: () => import_useMedia.mediaState,
|
|
6202
|
+
setupDev: () => import_config.setupDev,
|
|
6197
6203
|
updateConfig: () => import_config.updateConfig,
|
|
6198
6204
|
useMedia: () => import_useMedia.useMedia,
|
|
6199
6205
|
useMediaPropsActive: () => import_useMedia.useMediaPropsActive
|
|
@@ -6631,10 +6637,10 @@ var require_index_native11 = __commonJS({
|
|
|
6631
6637
|
useForceUpdate: () => useForceUpdate
|
|
6632
6638
|
});
|
|
6633
6639
|
module2.exports = __toCommonJS2(src_exports2);
|
|
6634
|
-
var
|
|
6640
|
+
var import_react2 = require("react"), isServerSide = !1, idFn = () => {
|
|
6635
6641
|
};
|
|
6636
6642
|
function useForceUpdate() {
|
|
6637
|
-
return isServerSide ? idFn : (0,
|
|
6643
|
+
return isServerSide ? idFn : (0, import_react2.useReducer)((x) => Math.random(), 0)[1];
|
|
6638
6644
|
}
|
|
6639
6645
|
}
|
|
6640
6646
|
});
|
|
@@ -6656,7 +6662,7 @@ var require_LayoutGroupContext_native = __commonJS({
|
|
|
6656
6662
|
LayoutGroupContext: () => LayoutGroupContext
|
|
6657
6663
|
});
|
|
6658
6664
|
module2.exports = __toCommonJS2(LayoutGroupContext_exports);
|
|
6659
|
-
var
|
|
6665
|
+
var import_react2 = require("react"), LayoutGroupContext = (0, import_react2.createContext)({});
|
|
6660
6666
|
}
|
|
6661
6667
|
});
|
|
6662
6668
|
|
|
@@ -6677,7 +6683,7 @@ var require_PresenceContext_native = __commonJS({
|
|
|
6677
6683
|
PresenceContext: () => PresenceContext
|
|
6678
6684
|
});
|
|
6679
6685
|
module2.exports = __toCommonJS2(PresenceContext_exports);
|
|
6680
|
-
var
|
|
6686
|
+
var import_react2 = require("react"), PresenceContext = (0, import_react2.createContext)(null);
|
|
6681
6687
|
}
|
|
6682
6688
|
});
|
|
6683
6689
|
|
|
@@ -6700,16 +6706,16 @@ var require_usePresence_native = __commonJS({
|
|
|
6700
6706
|
usePresence: () => usePresence
|
|
6701
6707
|
});
|
|
6702
6708
|
module2.exports = __toCommonJS2(usePresence_exports);
|
|
6703
|
-
var
|
|
6709
|
+
var import_react2 = require("react"), import_PresenceContext = require_PresenceContext_native();
|
|
6704
6710
|
function usePresence() {
|
|
6705
|
-
let context = (0,
|
|
6711
|
+
let context = (0, import_react2.useContext)(import_PresenceContext.PresenceContext);
|
|
6706
6712
|
if (!context)
|
|
6707
6713
|
return [!0, null, context];
|
|
6708
|
-
let { isPresent: isPresent2, onExitComplete, register } = context, id = (0,
|
|
6709
|
-
return (0,
|
|
6714
|
+
let { isPresent: isPresent2, onExitComplete, register } = context, id = (0, import_react2.useId)() || "";
|
|
6715
|
+
return (0, import_react2.useEffect)(() => register(id), [id, register]), !isPresent2 && onExitComplete ? [!1, () => onExitComplete == null ? void 0 : onExitComplete(id), context] : [!0, void 0, context];
|
|
6710
6716
|
}
|
|
6711
6717
|
function useIsPresent() {
|
|
6712
|
-
return isPresent((0,
|
|
6718
|
+
return isPresent((0, import_react2.useContext)(import_PresenceContext.PresenceContext));
|
|
6713
6719
|
}
|
|
6714
6720
|
function isPresent(context) {
|
|
6715
6721
|
return context === null ? !0 : context.isPresent;
|
|
@@ -6757,7 +6763,7 @@ var require_PresenceChild_native = __commonJS({
|
|
|
6757
6763
|
PresenceChild: () => PresenceChild
|
|
6758
6764
|
});
|
|
6759
6765
|
module2.exports = __toCommonJS2(PresenceChild_exports);
|
|
6760
|
-
var import_use_presence = require_index_native12(), import_web = require_index_native9(),
|
|
6766
|
+
var import_use_presence = require_index_native12(), import_web = require_index_native9(), React2 = __toESM2(require("react")), import_react2 = require("react"), import_jsx_runtime6 = require("react/jsx-runtime"), PresenceChild = ({
|
|
6761
6767
|
children,
|
|
6762
6768
|
initial,
|
|
6763
6769
|
isPresent,
|
|
@@ -6767,7 +6773,7 @@ var require_PresenceChild_native = __commonJS({
|
|
|
6767
6773
|
enterExitVariant,
|
|
6768
6774
|
presenceAffectsLayout
|
|
6769
6775
|
}) => {
|
|
6770
|
-
let presenceChildren =
|
|
6776
|
+
let presenceChildren = React2.useMemo(newChildrenMap, []), id = (0, import_react2.useId)() || "", context = React2.useMemo(
|
|
6771
6777
|
() => ({
|
|
6772
6778
|
id,
|
|
6773
6779
|
initial,
|
|
@@ -6792,7 +6798,7 @@ var require_PresenceChild_native = __commonJS({
|
|
|
6792
6798
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
6793
6799
|
presenceAffectsLayout ? void 0 : [isPresent, exitVariant, enterVariant]
|
|
6794
6800
|
);
|
|
6795
|
-
return
|
|
6801
|
+
return React2.useMemo(() => {
|
|
6796
6802
|
presenceChildren.forEach((_, key) => presenceChildren.set(key, !1));
|
|
6797
6803
|
}, [isPresent]), (0, import_web.useIsomorphicLayoutEffect)(() => {
|
|
6798
6804
|
!(isPresent || presenceChildren.size) && (onExitComplete == null || onExitComplete());
|
|
@@ -6828,7 +6834,7 @@ var require_AnimatePresence_native = __commonJS({
|
|
|
6828
6834
|
AnimatePresence: () => AnimatePresence
|
|
6829
6835
|
});
|
|
6830
6836
|
module2.exports = __toCommonJS2(AnimatePresence_exports);
|
|
6831
|
-
var import_use_force_update = require_index_native11(), import_web = require_index_native9(),
|
|
6837
|
+
var import_use_force_update = require_index_native11(), import_web = require_index_native9(), import_react2 = __toESM2(require("react")), import_LayoutGroupContext = require_LayoutGroupContext_native(), import_PresenceChild = require_PresenceChild_native(), import_jsx_runtime6 = require("react/jsx-runtime"), getChildKey = (child) => child.key || "", isDev = !0;
|
|
6832
6838
|
function updateChildLookup(children, allChildren) {
|
|
6833
6839
|
let seenChildren = isDev ? /* @__PURE__ */ new Set() : null;
|
|
6834
6840
|
children.forEach((child) => {
|
|
@@ -6840,9 +6846,9 @@ var require_AnimatePresence_native = __commonJS({
|
|
|
6840
6846
|
}
|
|
6841
6847
|
function onlyElements(children) {
|
|
6842
6848
|
let filtered = [];
|
|
6843
|
-
return
|
|
6844
|
-
(0,
|
|
6845
|
-
|
|
6849
|
+
return import_react2.Children.forEach(children, (child, index) => {
|
|
6850
|
+
(0, import_react2.isValidElement)(child) && (!child.key && import_react2.Children.count(children) > 1 ? filtered.push(
|
|
6851
|
+
import_react2.default.cloneElement(child, {
|
|
6846
6852
|
key: index
|
|
6847
6853
|
})
|
|
6848
6854
|
) : filtered.push(child));
|
|
@@ -6858,10 +6864,10 @@ var require_AnimatePresence_native = __commonJS({
|
|
|
6858
6864
|
exitBeforeEnter,
|
|
6859
6865
|
presenceAffectsLayout = !0
|
|
6860
6866
|
}) => {
|
|
6861
|
-
let forceRender = (0, import_use_force_update.useForceUpdate)(), isClientMounted = (0, import_web.useDidFinishSSR)(), forceRenderLayoutGroup = (0,
|
|
6867
|
+
let forceRender = (0, import_use_force_update.useForceUpdate)(), isClientMounted = (0, import_web.useDidFinishSSR)(), forceRenderLayoutGroup = (0, import_react2.useContext)(import_LayoutGroupContext.LayoutGroupContext).forceRender;
|
|
6862
6868
|
forceRenderLayoutGroup && (forceRender = forceRenderLayoutGroup);
|
|
6863
|
-
let isMounted = (0,
|
|
6864
|
-
(0,
|
|
6869
|
+
let isMounted = (0, import_react2.useRef)(!1), filteredChildren = onlyElements(children), childrenToRender = filteredChildren, exiting = /* @__PURE__ */ new Set(), presentChildren = (0, import_react2.useRef)(childrenToRender), allChildren = (0, import_react2.useRef)(/* @__PURE__ */ new Map()).current, isInitialRender = (0, import_react2.useRef)(!0);
|
|
6870
|
+
(0, import_react2.useEffect)(() => (isMounted.current = !0, () => {
|
|
6865
6871
|
isMounted.current = !1, isInitialRender.current = !0, allChildren.clear(), exiting.clear();
|
|
6866
6872
|
}), []), (0, import_web.useIsomorphicLayoutEffect)(() => {
|
|
6867
6873
|
isInitialRender.current = !1, updateChildLookup(filteredChildren, allChildren), presentChildren.current = childrenToRender;
|
|
@@ -6935,7 +6941,7 @@ var require_AnimatePresence_native = __commonJS({
|
|
|
6935
6941
|
},
|
|
6936
6942
|
getChildKey(child)
|
|
6937
6943
|
);
|
|
6938
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: exiting.size ? childrenToRender : childrenToRender.map((child) => (0,
|
|
6944
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: exiting.size ? childrenToRender : childrenToRender.map((child) => (0, import_react2.cloneElement)(child)) });
|
|
6939
6945
|
};
|
|
6940
6946
|
AnimatePresence.displayName = "AnimatePresence";
|
|
6941
6947
|
}
|
|
@@ -6998,15 +7004,15 @@ var require_create_context_native = __commonJS({
|
|
|
6998
7004
|
createContextScope: () => createContextScope
|
|
6999
7005
|
});
|
|
7000
7006
|
module2.exports = __toCommonJS2(create_context_exports);
|
|
7001
|
-
var
|
|
7007
|
+
var React2 = __toESM2(require("react")), import_jsx_runtime6 = require("react/jsx-runtime");
|
|
7002
7008
|
function createContext(rootComponentName, defaultContext) {
|
|
7003
|
-
let Context =
|
|
7009
|
+
let Context = React2.createContext(defaultContext);
|
|
7004
7010
|
function Provider(props) {
|
|
7005
|
-
let { children, ...context } = props, value =
|
|
7011
|
+
let { children, ...context } = props, value = React2.useMemo(() => context, Object.values(context));
|
|
7006
7012
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Context.Provider, { value, children });
|
|
7007
7013
|
}
|
|
7008
7014
|
function useContext(consumerName) {
|
|
7009
|
-
let context =
|
|
7015
|
+
let context = React2.useContext(Context);
|
|
7010
7016
|
if (context)
|
|
7011
7017
|
return context;
|
|
7012
7018
|
if (defaultContext !== void 0)
|
|
@@ -7018,17 +7024,17 @@ var require_create_context_native = __commonJS({
|
|
|
7018
7024
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
7019
7025
|
let defaultContexts = [];
|
|
7020
7026
|
function createContext2(rootComponentName, defaultContext) {
|
|
7021
|
-
let BaseContext =
|
|
7027
|
+
let BaseContext = React2.createContext(defaultContext), index = defaultContexts.length;
|
|
7022
7028
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
7023
7029
|
function Provider(props) {
|
|
7024
|
-
let { scope, children, ...context } = props, Context = (scope == null ? void 0 : scope[scopeName][index]) || BaseContext, value =
|
|
7030
|
+
let { scope, children, ...context } = props, Context = (scope == null ? void 0 : scope[scopeName][index]) || BaseContext, value = React2.useMemo(
|
|
7025
7031
|
() => context,
|
|
7026
7032
|
Object.values(context)
|
|
7027
7033
|
);
|
|
7028
7034
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Context.Provider, { value, children });
|
|
7029
7035
|
}
|
|
7030
7036
|
function useContext(consumerName, scope, options) {
|
|
7031
|
-
let Context = (scope == null ? void 0 : scope[scopeName][index]) || BaseContext, context =
|
|
7037
|
+
let Context = (scope == null ? void 0 : scope[scopeName][index]) || BaseContext, context = React2.useContext(Context);
|
|
7032
7038
|
if (context)
|
|
7033
7039
|
return context;
|
|
7034
7040
|
if (defaultContext !== void 0)
|
|
@@ -7041,10 +7047,10 @@ var require_create_context_native = __commonJS({
|
|
|
7041
7047
|
return Provider.displayName = `${rootComponentName}Provider`, [Provider, useContext];
|
|
7042
7048
|
}
|
|
7043
7049
|
let createScope = () => {
|
|
7044
|
-
let scopeContexts = defaultContexts.map((defaultContext) =>
|
|
7050
|
+
let scopeContexts = defaultContexts.map((defaultContext) => React2.createContext(defaultContext));
|
|
7045
7051
|
return function(scope) {
|
|
7046
7052
|
let contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
|
7047
|
-
return
|
|
7053
|
+
return React2.useMemo(
|
|
7048
7054
|
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
7049
7055
|
[scope, contexts]
|
|
7050
7056
|
);
|
|
@@ -7069,7 +7075,7 @@ var require_create_context_native = __commonJS({
|
|
|
7069
7075
|
let currentScope = useScope(overrideScopes)[`__scope${scopeName}`];
|
|
7070
7076
|
return { ...nextScopes2, ...currentScope };
|
|
7071
7077
|
}, {});
|
|
7072
|
-
return
|
|
7078
|
+
return React2.useMemo(
|
|
7073
7079
|
() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }),
|
|
7074
7080
|
[nextScopes]
|
|
7075
7081
|
);
|
|
@@ -7112,7 +7118,7 @@ var require_useControllableState_native = __commonJS({
|
|
|
7112
7118
|
useControllableState: () => useControllableState
|
|
7113
7119
|
});
|
|
7114
7120
|
module2.exports = __toCommonJS2(useControllableState_exports);
|
|
7115
|
-
var import_use_event = require_index_native8(),
|
|
7121
|
+
var import_use_event = require_index_native8(), import_react2 = require("react"), emptyCallbackFn = (_) => _();
|
|
7116
7122
|
function useControllableState({
|
|
7117
7123
|
prop,
|
|
7118
7124
|
defaultProp,
|
|
@@ -7121,12 +7127,12 @@ var require_useControllableState_native = __commonJS({
|
|
|
7121
7127
|
preventUpdate,
|
|
7122
7128
|
transition
|
|
7123
7129
|
}) {
|
|
7124
|
-
let [state, setState] = (0,
|
|
7125
|
-
(0,
|
|
7130
|
+
let [state, setState] = (0, import_react2.useState)(prop ?? defaultProp), previous = (0, import_react2.useRef)(state), propWins = strategy === "prop-wins" && prop !== void 0, value = propWins ? prop : state, onChangeCb = (0, import_use_event.useEvent)(onChange || idFn), transitionFn = transition ? import_react2.startTransition : emptyCallbackFn;
|
|
7131
|
+
(0, import_react2.useEffect)(() => {
|
|
7126
7132
|
prop !== void 0 && (previous.current = prop, transitionFn(() => {
|
|
7127
7133
|
setState(prop);
|
|
7128
7134
|
}));
|
|
7129
|
-
}, [prop]), (0,
|
|
7135
|
+
}, [prop]), (0, import_react2.useEffect)(() => {
|
|
7130
7136
|
propWins || state !== previous.current && (previous.current = state, onChangeCb(state));
|
|
7131
7137
|
}, [onChangeCb, state, propWins]);
|
|
7132
7138
|
let setter = (0, import_use_event.useEvent)((next) => {
|
|
@@ -7190,7 +7196,7 @@ var require_Collapsible_native = __commonJS({
|
|
|
7190
7196
|
createCollapsibleScope: () => createCollapsibleScope
|
|
7191
7197
|
});
|
|
7192
7198
|
module2.exports = __toCommonJS2(Collapsible_exports);
|
|
7193
|
-
var import_animate_presence = require_index_native13(), import_create_context = require_index_native14(), import_use_controllable_state = require_index_native15(), import_web = require_index_native9(),
|
|
7199
|
+
var import_animate_presence = require_index_native13(), import_create_context = require_index_native14(), import_use_controllable_state = require_index_native15(), import_web = require_index_native9(), React2 = __toESM2(require("react")), import_jsx_runtime6 = require("react/jsx-runtime"), COLLAPSIBLE_NAME = "Collapsible", [createCollapsibleContext, createCollapsibleScope] = (0, import_create_context.createContextScope)(COLLAPSIBLE_NAME), [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME), _Collapsible = React2.forwardRef(
|
|
7194
7200
|
(props, forwardedRef) => {
|
|
7195
7201
|
let {
|
|
7196
7202
|
__scopeCollapsible,
|
|
@@ -7209,9 +7215,9 @@ var require_Collapsible_native = __commonJS({
|
|
|
7209
7215
|
{
|
|
7210
7216
|
scope: __scopeCollapsible,
|
|
7211
7217
|
disabled,
|
|
7212
|
-
contentId:
|
|
7218
|
+
contentId: React2.useId(),
|
|
7213
7219
|
open,
|
|
7214
|
-
onOpenToggle:
|
|
7220
|
+
onOpenToggle: React2.useCallback(
|
|
7215
7221
|
() => setOpen((prevOpen) => !prevOpen),
|
|
7216
7222
|
[setOpen]
|
|
7217
7223
|
),
|
|
@@ -7308,33 +7314,33 @@ var require_Collection_native = __commonJS({
|
|
|
7308
7314
|
createCollection: () => createCollection
|
|
7309
7315
|
});
|
|
7310
7316
|
module2.exports = __toCommonJS2(Collection_exports);
|
|
7311
|
-
var import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_create_context = require_index_native14(),
|
|
7317
|
+
var import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_create_context = require_index_native14(), import_react2 = __toESM2(require("react")), import_jsx_runtime6 = require("react/jsx-runtime");
|
|
7312
7318
|
function createCollection(name) {
|
|
7313
7319
|
let PROVIDER_NAME = name + "CollectionProvider", [createCollectionContext, createCollectionScope] = (0, import_create_context.createContextScope)(PROVIDER_NAME), [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, {
|
|
7314
7320
|
collectionRef: { current: null },
|
|
7315
7321
|
itemMap: /* @__PURE__ */ new Map()
|
|
7316
7322
|
}), CollectionProvider = (props) => {
|
|
7317
|
-
let { scope, children } = props, ref =
|
|
7323
|
+
let { scope, children } = props, ref = import_react2.default.useRef(null), itemMap = import_react2.default.useRef(/* @__PURE__ */ new Map()).current;
|
|
7318
7324
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
7319
7325
|
};
|
|
7320
7326
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
7321
|
-
let COLLECTION_SLOT_NAME = name + "CollectionSlot", CollectionSlot =
|
|
7327
|
+
let COLLECTION_SLOT_NAME = name + "CollectionSlot", CollectionSlot = import_react2.default.forwardRef(
|
|
7322
7328
|
(props, forwardedRef) => {
|
|
7323
7329
|
let { scope, children } = props, context = useCollectionContext(COLLECTION_SLOT_NAME, scope), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);
|
|
7324
7330
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Slot, { ref: composedRefs, children });
|
|
7325
7331
|
}
|
|
7326
7332
|
);
|
|
7327
7333
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
7328
|
-
let ITEM_SLOT_NAME = name + "CollectionItemSlot", ITEM_DATA_ATTR = "data-collection-item", CollectionItemSlot =
|
|
7334
|
+
let ITEM_SLOT_NAME = name + "CollectionItemSlot", ITEM_DATA_ATTR = "data-collection-item", CollectionItemSlot = import_react2.default.forwardRef(
|
|
7329
7335
|
(props, forwardedRef) => {
|
|
7330
|
-
let { scope, children, ...itemData } = props, ref =
|
|
7331
|
-
return
|
|
7336
|
+
let { scope, children, ...itemData } = props, ref = import_react2.default.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
7337
|
+
return import_react2.default.useEffect(() => (context.itemMap.set(ref, { ref, ...itemData }), () => void context.itemMap.delete(ref))), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Slot, { [ITEM_DATA_ATTR]: "", ref: composedRefs, children });
|
|
7332
7338
|
}
|
|
7333
7339
|
);
|
|
7334
7340
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
7335
7341
|
function useCollection(scope) {
|
|
7336
7342
|
let context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
7337
|
-
return
|
|
7343
|
+
return import_react2.default.useCallback(() => {
|
|
7338
7344
|
if (!import_core12.isWeb)
|
|
7339
7345
|
return [];
|
|
7340
7346
|
let collectionNode = context.collectionRef.current;
|
|
@@ -7967,7 +7973,7 @@ var require_wrapChildrenInText_native = __commonJS({
|
|
|
7967
7973
|
wrapChildrenInText: () => wrapChildrenInText
|
|
7968
7974
|
});
|
|
7969
7975
|
module2.exports = __toCommonJS2(wrapChildrenInText_exports);
|
|
7970
|
-
var
|
|
7976
|
+
var import_react2 = __toESM2(require("react")), import_jsx_runtime6 = (
|
|
7971
7977
|
// so "data-disable-theme" is a hack to fix themeInverse, don't ask me why
|
|
7972
7978
|
require("react/jsx-runtime")
|
|
7973
7979
|
);
|
|
@@ -7991,7 +7997,7 @@ var require_wrapChildrenInText_native = __commonJS({
|
|
|
7991
7997
|
let props = {
|
|
7992
7998
|
...extraProps
|
|
7993
7999
|
};
|
|
7994
|
-
return color && (props.color = color), fontFamily && (props.fontFamily = fontFamily), fontSize && (props.fontSize = fontSize), fontWeight && (props.fontWeight = fontWeight), letterSpacing && (props.letterSpacing = letterSpacing), textAlign && (props.textAlign = textAlign), size && (props.size = size), fontStyle && (props.fontStyle = fontStyle), maxFontSizeMultiplier && (props.maxFontSizeMultiplier = maxFontSizeMultiplier),
|
|
8000
|
+
return color && (props.color = color), fontFamily && (props.fontFamily = fontFamily), fontSize && (props.fontSize = fontSize), fontWeight && (props.fontWeight = fontWeight), letterSpacing && (props.letterSpacing = letterSpacing), textAlign && (props.textAlign = textAlign), size && (props.size = size), fontStyle && (props.fontStyle = fontStyle), maxFontSizeMultiplier && (props.maxFontSizeMultiplier = maxFontSizeMultiplier), import_react2.default.Children.toArray(children).map((child, index) => typeof child == "string" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TextComponent, { ...props, ...textProps, children: child }, index) : child);
|
|
7995
8001
|
}
|
|
7996
8002
|
}
|
|
7997
8003
|
});
|
|
@@ -8055,12 +8061,12 @@ var require_useDirection_native = __commonJS({
|
|
|
8055
8061
|
useDirection: () => useDirection
|
|
8056
8062
|
});
|
|
8057
8063
|
module2.exports = __toCommonJS2(useDirection_exports);
|
|
8058
|
-
var
|
|
8064
|
+
var React2 = __toESM2(require("react")), import_jsx_runtime6 = require("react/jsx-runtime"), DirectionContext = React2.createContext(void 0), DirectionProvider = (props) => {
|
|
8059
8065
|
let { dir, children } = props;
|
|
8060
8066
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DirectionContext.Provider, { value: dir, children });
|
|
8061
8067
|
};
|
|
8062
8068
|
function useDirection(localDir) {
|
|
8063
|
-
let globalDir =
|
|
8069
|
+
let globalDir = React2.useContext(DirectionContext);
|
|
8064
8070
|
return localDir || globalDir || "ltr";
|
|
8065
8071
|
}
|
|
8066
8072
|
var Provider = DirectionProvider;
|
|
@@ -8107,10 +8113,10 @@ var require_Accordion_native = __commonJS({
|
|
|
8107
8113
|
createAccordionScope: () => createAccordionScope
|
|
8108
8114
|
});
|
|
8109
8115
|
module2.exports = __toCommonJS2(Accordion_exports);
|
|
8110
|
-
var import_collapsible = require_index_native16(), import_collection = require_index_native17(), import_create_context = require_index_native14(), import_stacks3 = require_index_native20(), import_text2 = require_index_native22(), import_use_controllable_state = require_index_native15(), import_use_direction = require_index_native23(), import_web = require_index_native9(),
|
|
8116
|
+
var import_collapsible = require_index_native16(), import_collection = require_index_native17(), import_create_context = require_index_native14(), import_stacks3 = require_index_native20(), import_text2 = require_index_native22(), import_use_controllable_state = require_index_native15(), import_use_direction = require_index_native23(), import_web = require_index_native9(), React2 = __toESM2(require("react")), import_jsx_runtime6 = require("react/jsx-runtime"), ACCORDION_NAME = "Accordion", ACCORDION_KEYS = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [Collection, useCollection, createCollectionScope] = (0, import_collection.createCollection)(ACCORDION_NAME), [createAccordionContext, createAccordionScope] = (0, import_create_context.createContextScope)(
|
|
8111
8117
|
ACCORDION_NAME,
|
|
8112
8118
|
[createCollectionScope, import_collapsible.createCollapsibleScope]
|
|
8113
|
-
), useCollapsibleScope = (0, import_collapsible.createCollapsibleScope)(), AccordionComponent =
|
|
8119
|
+
), useCollapsibleScope = (0, import_collapsible.createCollapsibleScope)(), AccordionComponent = React2.forwardRef((props, forwardedRef) => {
|
|
8114
8120
|
let { type, ...accordionProps } = props, singleProps = accordionProps, multipleProps = accordionProps;
|
|
8115
8121
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Collection.Provider, { scope: props.__scopeAccordion, children: type === "multiple" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionImplMultiple, { ...multipleProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionImplSingle, { ...singleProps, ref: forwardedRef }) });
|
|
8116
8122
|
});
|
|
@@ -8127,7 +8133,7 @@ var require_Accordion_native = __commonJS({
|
|
|
8127
8133
|
) : null;
|
|
8128
8134
|
}
|
|
8129
8135
|
};
|
|
8130
|
-
var [AccordionValueProvider, useAccordionValueContext] = createAccordionContext(ACCORDION_NAME), [AccordionCollapsibleProvider, useAccordionCollapsibleContext] = createAccordionContext(ACCORDION_NAME, { collapsible: !1 }), AccordionImplSingle =
|
|
8136
|
+
var [AccordionValueProvider, useAccordionValueContext] = createAccordionContext(ACCORDION_NAME), [AccordionCollapsibleProvider, useAccordionCollapsibleContext] = createAccordionContext(ACCORDION_NAME, { collapsible: !1 }), AccordionImplSingle = React2.forwardRef((props, forwardedRef) => {
|
|
8131
8137
|
let {
|
|
8132
8138
|
value: valueProp,
|
|
8133
8139
|
defaultValue,
|
|
@@ -8147,7 +8153,7 @@ var require_Accordion_native = __commonJS({
|
|
|
8147
8153
|
scope: props.__scopeAccordion,
|
|
8148
8154
|
value: value ? [value] : [],
|
|
8149
8155
|
onItemOpen: setValue,
|
|
8150
|
-
onItemClose:
|
|
8156
|
+
onItemClose: React2.useCallback(
|
|
8151
8157
|
() => collapsible && setValue(""),
|
|
8152
8158
|
[setValue, collapsible]
|
|
8153
8159
|
),
|
|
@@ -8161,7 +8167,7 @@ var require_Accordion_native = __commonJS({
|
|
|
8161
8167
|
)
|
|
8162
8168
|
}
|
|
8163
8169
|
);
|
|
8164
|
-
}), AccordionImplMultiple =
|
|
8170
|
+
}), AccordionImplMultiple = React2.forwardRef((props, forwardedRef) => {
|
|
8165
8171
|
let {
|
|
8166
8172
|
value: valueProp,
|
|
8167
8173
|
defaultValue,
|
|
@@ -8172,10 +8178,10 @@ var require_Accordion_native = __commonJS({
|
|
|
8172
8178
|
prop: valueProp,
|
|
8173
8179
|
defaultProp: defaultValue || [],
|
|
8174
8180
|
onChange: onValueChange
|
|
8175
|
-
}), handleItemOpen =
|
|
8181
|
+
}), handleItemOpen = React2.useCallback(
|
|
8176
8182
|
(itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]),
|
|
8177
8183
|
[setValue]
|
|
8178
|
-
), handleItemClose =
|
|
8184
|
+
), handleItemClose = React2.useCallback(
|
|
8179
8185
|
(itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)),
|
|
8180
8186
|
[setValue]
|
|
8181
8187
|
);
|
|
@@ -8189,7 +8195,7 @@ var require_Accordion_native = __commonJS({
|
|
|
8189
8195
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionImpl, { ...accordionMultipleProps, ref: forwardedRef }) })
|
|
8190
8196
|
}
|
|
8191
8197
|
);
|
|
8192
|
-
}), [AccordionImplProvider, useAccordionContext] = createAccordionContext(ACCORDION_NAME), AccordionImpl =
|
|
8198
|
+
}), [AccordionImplProvider, useAccordionContext] = createAccordionContext(ACCORDION_NAME), AccordionImpl = React2.forwardRef(
|
|
8193
8199
|
(props, forwardedRef) => {
|
|
8194
8200
|
let {
|
|
8195
8201
|
__scopeAccordion,
|
|
@@ -8197,7 +8203,7 @@ var require_Accordion_native = __commonJS({
|
|
|
8197
8203
|
dir,
|
|
8198
8204
|
orientation = "vertical",
|
|
8199
8205
|
...accordionProps
|
|
8200
|
-
} = props, accordionRef =
|
|
8206
|
+
} = props, accordionRef = React2.useRef(null), composedRef = (0, import_web.useComposedRefs)(accordionRef, forwardedRef), getItems = useCollection(__scopeAccordion), isDirectionLTR = (0, import_use_direction.useDirection)(dir) === "ltr", handleKeyDown = (0, import_web.composeEventHandlers)(
|
|
8201
8207
|
props.onKeyDown,
|
|
8202
8208
|
(event) => {
|
|
8203
8209
|
var _a;
|
|
@@ -8262,9 +8268,9 @@ var require_Accordion_native = __commonJS({
|
|
|
8262
8268
|
}
|
|
8263
8269
|
);
|
|
8264
8270
|
}
|
|
8265
|
-
), ITEM_NAME = "AccordionItem", [AccordionItemProvider, useAccordionItemContext] = createAccordionContext(ITEM_NAME), AccordionItem =
|
|
8271
|
+
), ITEM_NAME = "AccordionItem", [AccordionItemProvider, useAccordionItemContext] = createAccordionContext(ITEM_NAME), AccordionItem = React2.forwardRef(
|
|
8266
8272
|
(props, forwardedRef) => {
|
|
8267
|
-
let { __scopeAccordion, value, ...accordionItemProps } = props, accordionContext = useAccordionContext(ITEM_NAME, __scopeAccordion), valueContext = useAccordionValueContext(ITEM_NAME, __scopeAccordion), collapsibleScope = useCollapsibleScope(__scopeAccordion), triggerId =
|
|
8273
|
+
let { __scopeAccordion, value, ...accordionItemProps } = props, accordionContext = useAccordionContext(ITEM_NAME, __scopeAccordion), valueContext = useAccordionValueContext(ITEM_NAME, __scopeAccordion), collapsibleScope = useCollapsibleScope(__scopeAccordion), triggerId = React2.useId(), open = value && valueContext.value.includes(value) || !1, disabled = accordionContext.disabled || props.disabled;
|
|
8268
8274
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
8269
8275
|
AccordionItemProvider,
|
|
8270
8276
|
{
|
|
@@ -8292,7 +8298,7 @@ var require_Accordion_native = __commonJS({
|
|
|
8292
8298
|
}
|
|
8293
8299
|
);
|
|
8294
8300
|
AccordionItem.displayName = ITEM_NAME;
|
|
8295
|
-
var HEADER_NAME = "AccordionHeader", AccordionHeader =
|
|
8301
|
+
var HEADER_NAME = "AccordionHeader", AccordionHeader = React2.forwardRef(
|
|
8296
8302
|
(props, forwardedRef) => {
|
|
8297
8303
|
let { __scopeAccordion, ...headerProps } = props, accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion), itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion);
|
|
8298
8304
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -8421,19 +8427,19 @@ var require_Adapt_native = __commonJS({
|
|
|
8421
8427
|
useAdaptParent: () => useAdaptParent
|
|
8422
8428
|
});
|
|
8423
8429
|
module2.exports = __toCommonJS2(Adapt_exports);
|
|
8424
|
-
var import_core12 = require_index_native10(),
|
|
8425
|
-
let context = (0,
|
|
8430
|
+
var import_core12 = require_index_native10(), import_react2 = require("react"), import_jsx_runtime6 = require("react/jsx-runtime"), AdaptParentContext = (0, import_react2.createContext)(null), AdaptContents = (props) => {
|
|
8431
|
+
let context = (0, import_react2.useContext)(AdaptParentContext);
|
|
8426
8432
|
if (!(context != null && context.Contents))
|
|
8427
8433
|
throw new Error("Adapt not supported by this component");
|
|
8428
|
-
return (0,
|
|
8434
|
+
return (0, import_react2.createElement)(context.Contents, props);
|
|
8429
8435
|
};
|
|
8430
8436
|
AdaptContents.shouldForwardSpace = !0;
|
|
8431
8437
|
var useAdaptParent = ({
|
|
8432
8438
|
Contents
|
|
8433
8439
|
}) => {
|
|
8434
|
-
let [when, setWhen] = (0,
|
|
8440
|
+
let [when, setWhen] = (0, import_react2.useState)(null);
|
|
8435
8441
|
return {
|
|
8436
|
-
AdaptProvider: (0,
|
|
8442
|
+
AdaptProvider: (0, import_react2.useMemo)(() => {
|
|
8437
8443
|
let context = {
|
|
8438
8444
|
Contents,
|
|
8439
8445
|
setWhen
|
|
@@ -8447,7 +8453,7 @@ var require_Adapt_native = __commonJS({
|
|
|
8447
8453
|
};
|
|
8448
8454
|
}, Adapt = (0, import_core12.withStaticProperties)(
|
|
8449
8455
|
function({ platform, when, children }) {
|
|
8450
|
-
let context = (0,
|
|
8456
|
+
let context = (0, import_react2.useContext)(AdaptParentContext), media = (0, import_core12.useMedia)(), enabled = !platform;
|
|
8451
8457
|
return platform === "touch" && (enabled = import_core12.isTouchable), platform === "native" && (enabled = !import_core12.isWeb), platform === "web" && (enabled = import_core12.isWeb), when && !media[when] && (enabled = !1), (0, import_core12.useIsomorphicLayoutEffect)(() => {
|
|
8452
8458
|
enabled && (context == null || context.setWhen(when || enabled));
|
|
8453
8459
|
}, [when, context, enabled]), enabled ? children : null;
|
|
@@ -8529,7 +8535,7 @@ var require_Dismissable_native = __commonJS({
|
|
|
8529
8535
|
DismissableBranch: () => DismissableBranch
|
|
8530
8536
|
});
|
|
8531
8537
|
module2.exports = __toCommonJS2(Dismissable_native_exports);
|
|
8532
|
-
var
|
|
8538
|
+
var import_react2 = require("react"), Dismissable = (0, import_react2.forwardRef)((props, _ref) => props.children), DismissableBranch = (0, import_react2.forwardRef)((props, _ref) => props.children);
|
|
8533
8539
|
}
|
|
8534
8540
|
});
|
|
8535
8541
|
|
|
@@ -8565,7 +8571,7 @@ var require_FocusScope_native = __commonJS({
|
|
|
8565
8571
|
FocusScope: () => FocusScope
|
|
8566
8572
|
});
|
|
8567
8573
|
module2.exports = __toCommonJS2(FocusScope_native_exports);
|
|
8568
|
-
var
|
|
8574
|
+
var import_react2 = require("react"), FocusScope = (0, import_react2.forwardRef)((props, _ref) => props.children);
|
|
8569
8575
|
}
|
|
8570
8576
|
});
|
|
8571
8577
|
|
|
@@ -8613,7 +8619,7 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
8613
8619
|
usePortal: () => usePortal
|
|
8614
8620
|
});
|
|
8615
8621
|
module2.exports = __toCommonJS2(GorhomPortal_exports);
|
|
8616
|
-
var import_core12 = require_index_native10(),
|
|
8622
|
+
var import_core12 = require_index_native10(), import_react2 = __toESM2(require("react")), import_jsx_runtime6 = require("react/jsx-runtime"), ACTIONS = /* @__PURE__ */ ((ACTIONS2) => (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))(ACTIONS || {}), INITIAL_STATE = {}, registerHost = (state, hostName) => (hostName in state || (state[hostName] = []), state), deregisterHost = (state, hostName) => (delete state[hostName], state), addUpdatePortal = (state, hostName, portalName, node) => {
|
|
8617
8623
|
hostName in state || (state = registerHost(state, hostName));
|
|
8618
8624
|
let index = state[hostName].findIndex((item) => item.name === portalName);
|
|
8619
8625
|
return index !== -1 ? state[hostName][index].node = node : state[hostName].push({
|
|
@@ -8650,37 +8656,37 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
8650
8656
|
default:
|
|
8651
8657
|
return state;
|
|
8652
8658
|
}
|
|
8653
|
-
}, PortalStateContext = (0,
|
|
8654
|
-
let state = (0,
|
|
8659
|
+
}, PortalStateContext = (0, import_react2.createContext)(null), PortalDispatchContext = (0, import_react2.createContext)(null), usePortalState = (hostName) => {
|
|
8660
|
+
let state = (0, import_react2.useContext)(PortalStateContext);
|
|
8655
8661
|
if (state === null)
|
|
8656
8662
|
throw new Error(
|
|
8657
8663
|
"'PortalStateContext' cannot be null, please add 'PortalProvider' to the root component."
|
|
8658
8664
|
);
|
|
8659
8665
|
return state[hostName] || [];
|
|
8660
8666
|
}, usePortal = (hostName = "root") => {
|
|
8661
|
-
let dispatch = (0,
|
|
8667
|
+
let dispatch = (0, import_react2.useContext)(PortalDispatchContext);
|
|
8662
8668
|
if (dispatch === null)
|
|
8663
8669
|
throw new Error(
|
|
8664
8670
|
"'PortalDispatchContext' cannot be null, please add 'PortalProvider' to the root component."
|
|
8665
8671
|
);
|
|
8666
|
-
let registerHost2 = (0,
|
|
8672
|
+
let registerHost2 = (0, import_react2.useCallback)(() => {
|
|
8667
8673
|
dispatch({
|
|
8668
8674
|
type: 0,
|
|
8669
8675
|
hostName
|
|
8670
8676
|
});
|
|
8671
|
-
}, []), deregisterHost2 = (0,
|
|
8677
|
+
}, []), deregisterHost2 = (0, import_react2.useCallback)(() => {
|
|
8672
8678
|
dispatch({
|
|
8673
8679
|
type: 1,
|
|
8674
8680
|
hostName
|
|
8675
8681
|
});
|
|
8676
|
-
}, []), addUpdatePortal2 = (0,
|
|
8682
|
+
}, []), addUpdatePortal2 = (0, import_react2.useCallback)((name, node) => {
|
|
8677
8683
|
dispatch({
|
|
8678
8684
|
type: 2,
|
|
8679
8685
|
hostName,
|
|
8680
8686
|
portalName: name,
|
|
8681
8687
|
node
|
|
8682
8688
|
});
|
|
8683
|
-
}, []), removePortal2 = (0,
|
|
8689
|
+
}, []), removePortal2 = (0, import_react2.useCallback)((name) => {
|
|
8684
8690
|
dispatch({
|
|
8685
8691
|
type: 3,
|
|
8686
8692
|
hostName,
|
|
@@ -8699,8 +8705,8 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
8699
8705
|
shouldAddRootHost = !0,
|
|
8700
8706
|
children
|
|
8701
8707
|
}) => {
|
|
8702
|
-
let [state, dispatch] = (0,
|
|
8703
|
-
(0,
|
|
8708
|
+
let [state, dispatch] = (0, import_react2.useReducer)(reducer, INITIAL_STATE), transitionDispatch = (0, import_react2.useMemo)(() => (value) => {
|
|
8709
|
+
(0, import_react2.startTransition)(() => {
|
|
8704
8710
|
dispatch(value);
|
|
8705
8711
|
});
|
|
8706
8712
|
}, [dispatch]);
|
|
@@ -8708,11 +8714,11 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
8708
8714
|
children,
|
|
8709
8715
|
shouldAddRootHost && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalHost, { name: rootHostName })
|
|
8710
8716
|
] }) });
|
|
8711
|
-
}, PortalProvider2 = (0,
|
|
8717
|
+
}, PortalProvider2 = (0, import_react2.memo)(PortalProviderComponent);
|
|
8712
8718
|
PortalProvider2.displayName = "PortalProvider";
|
|
8713
8719
|
var defaultRenderer = (children) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children }), PortalHostComponent = (props) => {
|
|
8714
8720
|
let { name, forwardProps, render = defaultRenderer } = props, isServer2 = !(0, import_core12.useDidFinishSSR)(), state = usePortalState(name), { registerHost: registerHost2, deregisterHost: deregisterHost2 } = usePortal(props.name);
|
|
8715
|
-
return (0,
|
|
8721
|
+
return (0, import_react2.useEffect)(() => {
|
|
8716
8722
|
if (!isServer2)
|
|
8717
8723
|
return registerHost2(), () => {
|
|
8718
8724
|
deregisterHost2();
|
|
@@ -8720,10 +8726,10 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
8720
8726
|
}, [isServer2]), render(
|
|
8721
8727
|
forwardProps ? state.map((item) => {
|
|
8722
8728
|
let next = item.node;
|
|
8723
|
-
return forwardProps ?
|
|
8729
|
+
return forwardProps ? import_react2.default.Children.map(next, (child) => import_react2.default.isValidElement(child) ? import_react2.default.cloneElement(child, { key: child.key, ...forwardProps }) : child) : next;
|
|
8724
8730
|
}) : state.map((item) => item.node)
|
|
8725
8731
|
);
|
|
8726
|
-
}, PortalHost = (0,
|
|
8732
|
+
}, PortalHost = (0, import_react2.memo)(PortalHostComponent);
|
|
8727
8733
|
PortalHost.displayName = "PortalHost";
|
|
8728
8734
|
var PortalComponent = (props) => {
|
|
8729
8735
|
let {
|
|
@@ -8733,7 +8739,7 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
8733
8739
|
handleOnUnmount: _providedHandleOnUnmount,
|
|
8734
8740
|
handleOnUpdate: _providedHandleOnUpdate,
|
|
8735
8741
|
children
|
|
8736
|
-
} = props, { addPortal: addUpdatePortal2, removePortal: removePortal2 } = usePortal(hostName), id = (0,
|
|
8742
|
+
} = props, { addPortal: addUpdatePortal2, removePortal: removePortal2 } = usePortal(hostName), id = (0, import_react2.useId)(), name = _providedName || id, handleOnMount = (0, import_core12.useEvent)(() => {
|
|
8737
8743
|
_providedHandleOnMount ? _providedHandleOnMount(() => addUpdatePortal2(name, children)) : addUpdatePortal2(name, children);
|
|
8738
8744
|
}), handleOnUnmount = (0, import_core12.useEvent)(() => {
|
|
8739
8745
|
_providedHandleOnUnmount ? _providedHandleOnUnmount(() => removePortal2(name)) : removePortal2(name);
|
|
@@ -8742,10 +8748,10 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
8742
8748
|
});
|
|
8743
8749
|
return (0, import_core12.useIsomorphicLayoutEffect)(() => (handleOnMount(), () => {
|
|
8744
8750
|
handleOnUnmount();
|
|
8745
|
-
}), []), (0,
|
|
8751
|
+
}), []), (0, import_react2.useEffect)(() => {
|
|
8746
8752
|
handleOnUpdate();
|
|
8747
8753
|
}, [children]), null;
|
|
8748
|
-
}, PortalItem = (0,
|
|
8754
|
+
}, PortalItem = (0, import_react2.memo)(PortalComponent);
|
|
8749
8755
|
PortalItem.displayName = "Portal";
|
|
8750
8756
|
}
|
|
8751
8757
|
});
|
|
@@ -8774,10 +8780,10 @@ var require_Portal_native = __commonJS({
|
|
|
8774
8780
|
Portal: () => Portal
|
|
8775
8781
|
});
|
|
8776
8782
|
module2.exports = __toCommonJS2(Portal_native_exports);
|
|
8777
|
-
var import_stacks3 = require_index_native20(),
|
|
8783
|
+
var import_stacks3 = require_index_native20(), React2 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), import_GorhomPortal = require_GorhomPortal_native(), import_jsx_runtime6 = require("react/jsx-runtime"), isFabric = global == null ? void 0 : global.nativeFabricUIManager, createPortal;
|
|
8778
8784
|
isFabric ? createPortal = require_fake_react_native().createPortal : createPortal = require_fake_react_native().createPortal;
|
|
8779
8785
|
var Portal = (props) => {
|
|
8780
|
-
let rootTag =
|
|
8786
|
+
let rootTag = React2.useContext(import_react_native4.RootTagContext), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
8781
8787
|
import_stacks3.YStack,
|
|
8782
8788
|
{
|
|
8783
8789
|
pointerEvents: "box-none",
|
|
@@ -8931,15 +8937,15 @@ var require_useSheetController_native = __commonJS({
|
|
|
8931
8937
|
useSheetController: () => useSheetController
|
|
8932
8938
|
});
|
|
8933
8939
|
module2.exports = __toCommonJS2(useSheetController_exports);
|
|
8934
|
-
var
|
|
8935
|
-
let controller = (0,
|
|
8940
|
+
var import_react2 = require("react"), useSheetController = () => {
|
|
8941
|
+
let controller = (0, import_react2.useContext)(SheetControllerContext), isHidden = controller == null ? void 0 : controller.hidden, isShowingNonSheet = isHidden && (controller == null ? void 0 : controller.open);
|
|
8936
8942
|
return {
|
|
8937
8943
|
controller,
|
|
8938
8944
|
isHidden,
|
|
8939
8945
|
isShowingNonSheet,
|
|
8940
8946
|
disableDrag: controller == null ? void 0 : controller.disableDrag
|
|
8941
8947
|
};
|
|
8942
|
-
}, SheetControllerContext = (0,
|
|
8948
|
+
}, SheetControllerContext = (0, import_react2.createContext)(
|
|
8943
8949
|
null
|
|
8944
8950
|
);
|
|
8945
8951
|
}
|
|
@@ -9000,11 +9006,11 @@ var require_index_native31 = __commonJS({
|
|
|
9000
9006
|
useConstant: () => useConstant
|
|
9001
9007
|
});
|
|
9002
9008
|
module2.exports = __toCommonJS2(src_exports2);
|
|
9003
|
-
var
|
|
9009
|
+
var import_react2 = require("react");
|
|
9004
9010
|
function useConstant(fn) {
|
|
9005
9011
|
if (typeof document > "u")
|
|
9006
|
-
return (0,
|
|
9007
|
-
let ref = (0,
|
|
9012
|
+
return (0, import_react2.useMemo)(() => fn(), []);
|
|
9013
|
+
let ref = (0, import_react2.useRef)();
|
|
9008
9014
|
return ref.current || (ref.current = { v: fn() }), ref.current.v;
|
|
9009
9015
|
}
|
|
9010
9016
|
}
|
|
@@ -9034,9 +9040,9 @@ var require_useSheetProviderProps_native = __commonJS({
|
|
|
9034
9040
|
useSheetProviderProps: () => useSheetProviderProps
|
|
9035
9041
|
});
|
|
9036
9042
|
module2.exports = __toCommonJS2(useSheetProviderProps_exports);
|
|
9037
|
-
var import_core12 = require_index_native10(), import_use_constant = require_index_native31(), import_use_controllable_state = require_index_native15(),
|
|
9043
|
+
var import_core12 = require_index_native10(), import_use_constant = require_index_native31(), import_use_controllable_state = require_index_native15(), import_react2 = __toESM2(require("react"));
|
|
9038
9044
|
function useSheetProviderProps(props, state, options = {}) {
|
|
9039
|
-
let contentRef =
|
|
9045
|
+
let contentRef = import_react2.default.useRef(null), [frameSize, setFrameSize] = (0, import_react2.useState)(0), [maxContentSize, setMaxContentSize] = (0, import_react2.useState)(0), snapPointsMode = props.snapPointsMode ?? "percent", snapPointsProp = props.snapPoints ?? (snapPointsMode === "percent" ? [80] : snapPointsMode === "constant" ? [256] : ["fit"]), hasFit = snapPointsProp[0] === "fit", snapPoints = (0, import_react2.useMemo)(
|
|
9040
9046
|
() => props.dismissOnSnapToBottom ? [...snapPointsProp, 0] : snapPointsProp,
|
|
9041
9047
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
9042
9048
|
[JSON.stringify(snapPointsProp), props.dismissOnSnapToBottom]
|
|
@@ -9046,7 +9052,7 @@ var require_useSheetProviderProps_native = __commonJS({
|
|
|
9046
9052
|
onChange: props.onPositionChange,
|
|
9047
9053
|
strategy: "most-recent-wins",
|
|
9048
9054
|
transition: !0
|
|
9049
|
-
}), position = state.open === !1 ? -1 : position_, { open } = state, setPosition = (0,
|
|
9055
|
+
}), position = state.open === !1 ? -1 : position_, { open } = state, setPosition = (0, import_react2.useCallback)(
|
|
9050
9056
|
(next) => {
|
|
9051
9057
|
props.dismissOnSnapToBottom && next === snapPoints.length - 1 ? state.setOpen(!1) : setPositionImmediate(next);
|
|
9052
9058
|
},
|
|
@@ -9054,7 +9060,7 @@ var require_useSheetProviderProps_native = __commonJS({
|
|
|
9054
9060
|
);
|
|
9055
9061
|
open && props.dismissOnSnapToBottom && position === snapPoints.length - 1 && setPositionImmediate(0);
|
|
9056
9062
|
let shouldSetPositionOpen = open && position < 0;
|
|
9057
|
-
if ((0,
|
|
9063
|
+
if ((0, import_react2.useEffect)(() => {
|
|
9058
9064
|
shouldSetPositionOpen && setPosition(0);
|
|
9059
9065
|
}, [setPosition, shouldSetPositionOpen]), !(0, import_core12.useAnimationDriver)())
|
|
9060
9066
|
throw new Error("Must set animations in tamagui.config.ts");
|
|
@@ -9117,7 +9123,7 @@ var require_nativeSheet_native = __commonJS({
|
|
|
9117
9123
|
setupNativeSheet: () => setupNativeSheet2
|
|
9118
9124
|
});
|
|
9119
9125
|
module2.exports = __toCommonJS2(nativeSheet_exports);
|
|
9120
|
-
var import_stacks3 = require_index_native20(),
|
|
9126
|
+
var import_stacks3 = require_index_native20(), import_react2 = require("react"), import_react_native4 = require_fake_react_native(), import_SheetContext = require_SheetContext_native(), import_useSheetOpenState = require_useSheetOpenState_native(), import_useSheetProviderProps = require_useSheetProviderProps_native(), import_jsx_runtime6 = require("react/jsx-runtime"), nativeSheets = {
|
|
9121
9127
|
ios: null
|
|
9122
9128
|
};
|
|
9123
9129
|
function getNativeSheet(platform) {
|
|
@@ -9125,8 +9131,8 @@ var require_nativeSheet_native = __commonJS({
|
|
|
9125
9131
|
}
|
|
9126
9132
|
function setupNativeSheet2(platform, Implementation) {
|
|
9127
9133
|
platform === "ios" && (nativeSheets[platform] = (props) => {
|
|
9128
|
-
let state = (0, import_useSheetOpenState.useSheetOpenState)(props), providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state), { open, setOpen } = state, ref = (0,
|
|
9129
|
-
return (0,
|
|
9134
|
+
let state = (0, import_useSheetOpenState.useSheetOpenState)(props), providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state), { open, setOpen } = state, ref = (0, import_react2.useRef)();
|
|
9135
|
+
return (0, import_react2.useEffect)(() => {
|
|
9130
9136
|
var _a;
|
|
9131
9137
|
(_a = ref.current) == null || _a.setVisibility(open);
|
|
9132
9138
|
}, [open]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_SheetContext.SheetProvider, { ...providerProps, onlyShowFrame: !0, children: [
|
|
@@ -9165,9 +9171,9 @@ var require_useKeyboardVisible_native = __commonJS({
|
|
|
9165
9171
|
useKeyboardVisible: () => useKeyboardVisible2
|
|
9166
9172
|
});
|
|
9167
9173
|
module2.exports = __toCommonJS2(useKeyboardVisible_exports);
|
|
9168
|
-
var
|
|
9169
|
-
let [isKeyboardVisible, setKeyboardVisible] = (0,
|
|
9170
|
-
return (0,
|
|
9174
|
+
var import_react2 = require("react"), import_react_native4 = require_fake_react_native(), useKeyboardVisible2 = () => {
|
|
9175
|
+
let [isKeyboardVisible, setKeyboardVisible] = (0, import_react2.useState)(!1);
|
|
9176
|
+
return (0, import_react2.useEffect)(() => {
|
|
9171
9177
|
let keyboardDidShowListener = import_react_native4.Keyboard.addListener("keyboardDidShow", () => {
|
|
9172
9178
|
setKeyboardVisible(!0);
|
|
9173
9179
|
}), keyboardDidHideListener = import_react_native4.Keyboard.addListener("keyboardDidHide", () => {
|
|
@@ -9220,9 +9226,9 @@ var require_contexts_native = __commonJS({
|
|
|
9220
9226
|
SheetInsideSheetContext: () => SheetInsideSheetContext
|
|
9221
9227
|
});
|
|
9222
9228
|
module2.exports = __toCommonJS2(contexts_exports);
|
|
9223
|
-
var
|
|
9229
|
+
var import_react2 = require("react"), ParentSheetContext = (0, import_react2.createContext)({
|
|
9224
9230
|
zIndex: 1e5
|
|
9225
|
-
}), SheetInsideSheetContext = (0,
|
|
9231
|
+
}), SheetInsideSheetContext = (0, import_react2.createContext)(null);
|
|
9226
9232
|
}
|
|
9227
9233
|
});
|
|
9228
9234
|
|
|
@@ -9270,9 +9276,9 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9270
9276
|
SheetImplementationCustom: () => SheetImplementationCustom
|
|
9271
9277
|
});
|
|
9272
9278
|
module2.exports = __toCommonJS2(SheetImplementationCustom_exports);
|
|
9273
|
-
var import_adapt = require_index_native25(), import_animate_presence = require_index_native13(), import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_portal2 = require_index_native29(), import_use_keyboard_visible = require_index_native32(),
|
|
9274
|
-
(0,
|
|
9275
|
-
let parentSheet = (0,
|
|
9279
|
+
var import_adapt = require_index_native25(), import_animate_presence = require_index_native13(), import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_portal2 = require_index_native29(), import_use_keyboard_visible = require_index_native32(), import_react2 = require("react"), import_react_native4 = require_fake_react_native(), import_constants = require_constants_native2(), 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(), import_jsx_runtime6 = require("react/jsx-runtime"), hiddenSize = 10000.1, SheetImplementationCustom = (0, import_core12.themeable)(
|
|
9280
|
+
(0, import_react2.forwardRef)(function(props, forwardedRef) {
|
|
9281
|
+
let parentSheet = (0, import_react2.useContext)(import_contexts.ParentSheetContext), {
|
|
9276
9282
|
animation,
|
|
9277
9283
|
animationConfig: animationConfigProp,
|
|
9278
9284
|
modal = !1,
|
|
@@ -9280,7 +9286,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9280
9286
|
moveOnKeyboardChange = !1,
|
|
9281
9287
|
unmountChildrenWhenHidden = !1,
|
|
9282
9288
|
portalProps
|
|
9283
|
-
} = props, keyboardIsVisible = (0, import_use_keyboard_visible.useKeyboardVisible)(), state = (0, import_useSheetOpenState.useSheetOpenState)(props), [overlayComponent, setOverlayComponent] = (0,
|
|
9289
|
+
} = props, keyboardIsVisible = (0, import_use_keyboard_visible.useKeyboardVisible)(), state = (0, import_useSheetOpenState.useSheetOpenState)(props), [overlayComponent, setOverlayComponent] = (0, import_react2.useState)(null), providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state, {
|
|
9284
9290
|
onOverlayComponent: setOverlayComponent
|
|
9285
9291
|
}), {
|
|
9286
9292
|
frameSize,
|
|
@@ -9294,15 +9300,15 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9294
9300
|
screenSize,
|
|
9295
9301
|
setMaxContentSize,
|
|
9296
9302
|
maxSnapPoint
|
|
9297
|
-
} = providerProps, { open, controller, isHidden } = state, sheetRef = (0,
|
|
9303
|
+
} = providerProps, { open, controller, isHidden } = state, sheetRef = (0, import_react2.useRef)(null), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, sheetRef), animationConfig = (() => {
|
|
9298
9304
|
let [animationProp, animationPropConfig] = animation ? Array.isArray(animation) ? animation : [animation] : [];
|
|
9299
9305
|
return animationConfigProp ?? (animationProp ? {
|
|
9300
9306
|
...(0, import_core12.getConfig)().animations.animations[animationProp],
|
|
9301
9307
|
...animationPropConfig
|
|
9302
9308
|
} : null);
|
|
9303
|
-
})(), [isShowingInnerSheet, setIsShowingInnerSheet] = (0,
|
|
9309
|
+
})(), [isShowingInnerSheet, setIsShowingInnerSheet] = (0, import_react2.useState)(!1), shouldHideParentSheet = !import_core12.isWeb && modal && isShowingInnerSheet, parentSheetContext = (0, import_react2.useContext)(import_contexts.SheetInsideSheetContext), onInnerSheet = (0, import_react2.useCallback)((hasChild) => {
|
|
9304
9310
|
setIsShowingInnerSheet(hasChild);
|
|
9305
|
-
}, []), positions = (0,
|
|
9311
|
+
}, []), positions = (0, import_react2.useMemo)(
|
|
9306
9312
|
() => snapPoints.map(
|
|
9307
9313
|
(point) => getYPositions(snapPointsMode, point, screenSize, frameSize)
|
|
9308
9314
|
),
|
|
@@ -9314,18 +9320,18 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9314
9320
|
parentSheetContext(!1);
|
|
9315
9321
|
};
|
|
9316
9322
|
}, [parentSheetContext, open]);
|
|
9317
|
-
let nextParentContext = (0,
|
|
9323
|
+
let nextParentContext = (0, import_react2.useMemo)(
|
|
9318
9324
|
() => ({
|
|
9319
9325
|
zIndex
|
|
9320
9326
|
}),
|
|
9321
9327
|
[zIndex]
|
|
9322
|
-
), animatedNumber = useAnimatedNumber(hiddenSize), at = (0,
|
|
9328
|
+
), animatedNumber = useAnimatedNumber(hiddenSize), at = (0, import_react2.useRef)(hiddenSize);
|
|
9323
9329
|
useAnimatedNumberReaction(
|
|
9324
9330
|
{
|
|
9325
9331
|
value: animatedNumber,
|
|
9326
9332
|
hostRef: sheetRef
|
|
9327
9333
|
},
|
|
9328
|
-
(0,
|
|
9334
|
+
(0, import_react2.useCallback)((value) => {
|
|
9329
9335
|
driver.isReactNative && (at.current = value, scrollBridge.paneY = value);
|
|
9330
9336
|
}, [])
|
|
9331
9337
|
);
|
|
@@ -9359,7 +9365,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9359
9365
|
}, [hasntMeasured, screenSize]), (0, import_core12.useIsomorphicLayoutEffect)(() => {
|
|
9360
9366
|
!frameSize || !screenSize || isHidden || hasntMeasured && !open || animateTo(position);
|
|
9361
9367
|
}, [isHidden, frameSize, screenSize, open, position]);
|
|
9362
|
-
let disableDrag = props.disableDrag ?? (controller == null ? void 0 : controller.disableDrag), themeName = (0, import_core12.useThemeName)(), panResponder = (0,
|
|
9368
|
+
let disableDrag = props.disableDrag ?? (controller == null ? void 0 : controller.disableDrag), themeName = (0, import_core12.useThemeName)(), panResponder = (0, import_react2.useMemo)(
|
|
9363
9369
|
() => {
|
|
9364
9370
|
if (disableDrag || !frameSize || isShowingInnerSheet)
|
|
9365
9371
|
return;
|
|
@@ -9406,14 +9412,14 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9406
9412
|
},
|
|
9407
9413
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
9408
9414
|
[disableDrag, isShowingInnerSheet, animateTo, frameSize, positions, setPosition]
|
|
9409
|
-
), handleAnimationViewLayout = (0,
|
|
9415
|
+
), handleAnimationViewLayout = (0, import_react2.useCallback)(
|
|
9410
9416
|
(e) => {
|
|
9411
9417
|
var _a;
|
|
9412
9418
|
let next = (_a = e.nativeEvent) == null ? void 0 : _a.layout.height;
|
|
9413
9419
|
next && setFrameSize(next);
|
|
9414
9420
|
},
|
|
9415
9421
|
[keyboardIsVisible]
|
|
9416
|
-
), handleMaxContentViewLayout = (0,
|
|
9422
|
+
), handleMaxContentViewLayout = (0, import_react2.useCallback)(
|
|
9417
9423
|
(e) => {
|
|
9418
9424
|
var _a;
|
|
9419
9425
|
let next = (_a = e.nativeEvent) == null ? void 0 : _a.layout.height;
|
|
@@ -9425,8 +9431,8 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9425
9431
|
return {
|
|
9426
9432
|
transform: [{ translateY: frameSize === 0 ? hiddenSize : val }]
|
|
9427
9433
|
};
|
|
9428
|
-
}), sizeBeforeKeyboard = (0,
|
|
9429
|
-
(0,
|
|
9434
|
+
}), sizeBeforeKeyboard = (0, import_react2.useRef)(null);
|
|
9435
|
+
(0, import_react2.useEffect)(() => {
|
|
9430
9436
|
if (import_core12.isWeb || !moveOnKeyboardChange)
|
|
9431
9437
|
return;
|
|
9432
9438
|
let keyboardDidShowListener = import_react_native4.Keyboard.addListener("keyboardDidShow", (e) => {
|
|
@@ -9440,8 +9446,8 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9440
9446
|
keyboardDidHideListener.remove(), keyboardDidShowListener.remove();
|
|
9441
9447
|
};
|
|
9442
9448
|
}, [moveOnKeyboardChange]);
|
|
9443
|
-
let [opacity, setOpacity] = (0,
|
|
9444
|
-
open && opacity === 0 && setOpacity(1), (0,
|
|
9449
|
+
let [opacity, setOpacity] = (0, import_react2.useState)(open ? 1 : 0);
|
|
9450
|
+
open && opacity === 0 && setOpacity(1), (0, import_react2.useEffect)(() => {
|
|
9445
9451
|
if (!open) {
|
|
9446
9452
|
let tm = setTimeout(() => {
|
|
9447
9453
|
setOpacity(0);
|
|
@@ -9490,7 +9496,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9490
9496
|
children: props.children
|
|
9491
9497
|
}
|
|
9492
9498
|
)
|
|
9493
|
-
] }) }), adaptContext = (0,
|
|
9499
|
+
] }) }), adaptContext = (0, import_react2.useContext)(import_adapt.AdaptParentContext), shouldMountChildren = !!(opacity || !unmountChildrenWhenHidden);
|
|
9494
9500
|
if (modal) {
|
|
9495
9501
|
let modalContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, { zIndex, ...portalProps, children: shouldMountChildren && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, { forceClassName: !0, name: themeName, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParentContext.Provider, { value: adaptContext, children: contents }) }) });
|
|
9496
9502
|
return import_core12.isWeb ? modalContents : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_contexts.SheetInsideSheetContext.Provider, { value: onInnerSheet, children: modalContents });
|
|
@@ -9587,9 +9593,9 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
9587
9593
|
SheetScrollView: () => SheetScrollView
|
|
9588
9594
|
});
|
|
9589
9595
|
module2.exports = __toCommonJS2(SheetScrollView_exports);
|
|
9590
|
-
var import_core12 = require_index_native10(), import_scroll_view = require_index_native33(),
|
|
9596
|
+
var import_core12 = require_index_native10(), import_scroll_view = require_index_native33(), import_react2 = require("react"), import_SheetContext = require_SheetContext_native(), import_jsx_runtime6 = require("react/jsx-runtime"), SHEET_SCROLL_VIEW_NAME = "SheetScrollView", SheetScrollView = (0, import_react2.forwardRef)(
|
|
9591
9597
|
({ __scopeSheet, children, ...props }, ref) => {
|
|
9592
|
-
let context = (0, import_SheetContext.useSheetContext)(SHEET_SCROLL_VIEW_NAME, __scopeSheet), { scrollBridge } = context, scrollRef = (0,
|
|
9598
|
+
let context = (0, import_SheetContext.useSheetContext)(SHEET_SCROLL_VIEW_NAME, __scopeSheet), { scrollBridge } = context, scrollRef = (0, import_react2.useRef)(null), state = (0, import_react2.useRef)({
|
|
9593
9599
|
lastPageY: 0,
|
|
9594
9600
|
dragAt: 0,
|
|
9595
9601
|
dys: [],
|
|
@@ -9625,7 +9631,7 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
9625
9631
|
onResponderRelease: release,
|
|
9626
9632
|
className: "_ovs-contain",
|
|
9627
9633
|
...props,
|
|
9628
|
-
children: (0,
|
|
9634
|
+
children: (0, import_react2.useMemo)(() => children, [children])
|
|
9629
9635
|
}
|
|
9630
9636
|
);
|
|
9631
9637
|
}
|
|
@@ -9693,7 +9699,7 @@ var require_createSheet_native = __commonJS({
|
|
|
9693
9699
|
createSheet: () => createSheet
|
|
9694
9700
|
});
|
|
9695
9701
|
module2.exports = __toCommonJS2(createSheet_exports);
|
|
9696
|
-
var import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_remove_scroll = require_index_native30(),
|
|
9702
|
+
var import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_remove_scroll = require_index_native30(), import_react2 = require("react"), import_react_native4 = require_fake_react_native(), import_constants = require_constants_native2(), import_nativeSheet = require_nativeSheet_native(), import_SheetContext = require_SheetContext_native(), import_SheetImplementationCustom = require_SheetImplementationCustom_native(), import_SheetScrollView = require_SheetScrollView_native(), import_useSheetController = require_useSheetController_native(), import_useSheetOffscreenSize = require_useSheetOffscreenSize_native(), import_jsx_runtime6 = (
|
|
9697
9703
|
// @ts-ignore
|
|
9698
9704
|
require("react/jsx-runtime")
|
|
9699
9705
|
);
|
|
@@ -9714,8 +9720,8 @@ var require_createSheet_native = __commonJS({
|
|
|
9714
9720
|
);
|
|
9715
9721
|
}
|
|
9716
9722
|
), SheetOverlay = Overlay.extractable(
|
|
9717
|
-
(0,
|
|
9718
|
-
let { __scopeSheet, ...props } = propsIn, context = (0, import_SheetContext.useSheetContext)(import_constants.SHEET_OVERLAY_NAME, __scopeSheet), element = (0,
|
|
9723
|
+
(0, import_react2.memo)((propsIn) => {
|
|
9724
|
+
let { __scopeSheet, ...props } = propsIn, context = (0, import_SheetContext.useSheetContext)(import_constants.SHEET_OVERLAY_NAME, __scopeSheet), element = (0, import_react2.useMemo)(
|
|
9719
9725
|
() => (
|
|
9720
9726
|
// @ts-ignore
|
|
9721
9727
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -9739,7 +9745,7 @@ var require_createSheet_native = __commonJS({
|
|
|
9739
9745
|
}, [element]), context.onlyShowFrame, null;
|
|
9740
9746
|
})
|
|
9741
9747
|
), SheetFrame = Frame.extractable(
|
|
9742
|
-
(0,
|
|
9748
|
+
(0, import_react2.forwardRef)(
|
|
9743
9749
|
({
|
|
9744
9750
|
__scopeSheet,
|
|
9745
9751
|
adjustPaddingForOffscreenContent,
|
|
@@ -9747,7 +9753,7 @@ var require_createSheet_native = __commonJS({
|
|
|
9747
9753
|
children,
|
|
9748
9754
|
...props
|
|
9749
9755
|
}, forwardedRef) => {
|
|
9750
|
-
let context = (0, import_SheetContext.useSheetContext)(import_constants.SHEET_NAME, __scopeSheet), { hasFit, removeScrollEnabled, frameSize, contentRef } = context, composedContentRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), offscreenSize = (0, import_useSheetOffscreenSize.useSheetOffscreenSize)(context), sheetContents = (0,
|
|
9756
|
+
let context = (0, import_SheetContext.useSheetContext)(import_constants.SHEET_NAME, __scopeSheet), { hasFit, removeScrollEnabled, frameSize, contentRef } = context, composedContentRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), offscreenSize = (0, import_useSheetOffscreenSize.useSheetOffscreenSize)(context), sheetContents = (0, import_react2.useMemo)(() => (
|
|
9751
9757
|
// @ts-ignore
|
|
9752
9758
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
9753
9759
|
Frame,
|
|
@@ -9796,7 +9802,7 @@ var require_createSheet_native = __commonJS({
|
|
|
9796
9802
|
] });
|
|
9797
9803
|
}
|
|
9798
9804
|
)
|
|
9799
|
-
), Sheet = (0,
|
|
9805
|
+
), Sheet = (0, import_react2.forwardRef)(function(props, ref) {
|
|
9800
9806
|
let hydrated = (0, import_core12.useDidFinishSSR)(), { isShowingNonSheet } = (0, import_useSheetController.useSheetController)(), SheetImplementation = import_SheetImplementationCustom.SheetImplementationCustom;
|
|
9801
9807
|
if (props.native && import_react_native4.Platform.OS === "ios") {
|
|
9802
9808
|
let impl = (0, import_nativeSheet.getNativeSheet)("ios");
|
|
@@ -9976,12 +9982,12 @@ var require_SheetController_native = __commonJS({
|
|
|
9976
9982
|
SheetController: () => SheetController
|
|
9977
9983
|
});
|
|
9978
9984
|
module2.exports = __toCommonJS2(SheetController_exports);
|
|
9979
|
-
var import_core12 = require_index_native10(),
|
|
9985
|
+
var import_core12 = require_index_native10(), import_react2 = require("react"), import_useSheetController = require_useSheetController_native(), import_jsx_runtime6 = require("react/jsx-runtime"), SheetController = ({
|
|
9980
9986
|
children,
|
|
9981
9987
|
onOpenChange: onOpenChangeProp,
|
|
9982
9988
|
...value
|
|
9983
9989
|
}) => {
|
|
9984
|
-
let onOpenChange = (0, import_core12.useEvent)(onOpenChangeProp), memoValue = (0,
|
|
9990
|
+
let onOpenChange = (0, import_core12.useEvent)(onOpenChangeProp), memoValue = (0, import_react2.useMemo)(
|
|
9985
9991
|
() => ({
|
|
9986
9992
|
open: value.open,
|
|
9987
9993
|
hidden: value.hidden,
|
|
@@ -10057,9 +10063,9 @@ var require_Dialog_native = __commonJS({
|
|
|
10057
10063
|
createDialogScope: () => createDialogScope
|
|
10058
10064
|
});
|
|
10059
10065
|
module2.exports = __toCommonJS2(Dialog_exports);
|
|
10060
|
-
var import_adapt = require_index_native25(), import_animate_presence = require_index_native13(), import_aria_hidden = require_index_native26(), import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_create_context = require_index_native14(), import_dismissable = require_index_native27(), import_focus_scope = require_index_native28(), import_portal2 = require_index_native29(), import_remove_scroll = require_index_native30(), import_sheet = require_index_native34(), import_stacks3 = require_index_native20(), import_text2 = require_index_native22(), import_use_controllable_state = require_index_native15(),
|
|
10066
|
+
var import_adapt = require_index_native25(), import_animate_presence = require_index_native13(), import_aria_hidden = require_index_native26(), import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_create_context = require_index_native14(), import_dismissable = require_index_native27(), import_focus_scope = require_index_native28(), import_portal2 = require_index_native29(), import_remove_scroll = require_index_native30(), import_sheet = require_index_native34(), import_stacks3 = require_index_native20(), import_text2 = require_index_native22(), import_use_controllable_state = require_index_native15(), React2 = __toESM2(require("react")), import_jsx_runtime6 = require("react/jsx-runtime"), 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, {
|
|
10061
10067
|
name: TRIGGER_NAME
|
|
10062
|
-
}), DialogTrigger =
|
|
10068
|
+
}), DialogTrigger = React2.forwardRef(
|
|
10063
10069
|
(props, forwardedRef) => {
|
|
10064
10070
|
let { __scopeDialog, ...triggerProps } = props, context = useDialogContext(TRIGGER_NAME, __scopeDialog), composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
10065
10071
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -10123,7 +10129,7 @@ var require_Dialog_native = __commonJS({
|
|
|
10123
10129
|
})), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogProvider, { scope: __scopeDialog, ...context, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, { name: themeName, children: childrenSpaced }) });
|
|
10124
10130
|
}
|
|
10125
10131
|
var DialogPortal = (props) => {
|
|
10126
|
-
let { __scopeDialog, forceMount, children, ...frameProps } = props, context = useDialogContext(PORTAL_NAME, __scopeDialog), isShowing = forceMount || context.open, [isFullyHidden, setIsFullyHidden] =
|
|
10132
|
+
let { __scopeDialog, forceMount, children, ...frameProps } = props, context = useDialogContext(PORTAL_NAME, __scopeDialog), isShowing = forceMount || context.open, [isFullyHidden, setIsFullyHidden] = React2.useState(!isShowing);
|
|
10127
10133
|
isShowing && isFullyHidden && setIsFullyHidden(!1);
|
|
10128
10134
|
let contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
10129
10135
|
import_animate_presence.AnimatePresence,
|
|
@@ -10140,7 +10146,7 @@ var require_Dialog_native = __commonJS({
|
|
|
10140
10146
|
var OVERLAY_NAME = "DialogOverlay", DialogOverlayFrame = (0, import_core12.styled)(import_sheet.Overlay, {
|
|
10141
10147
|
name: OVERLAY_NAME
|
|
10142
10148
|
}), DialogOverlay = DialogOverlayFrame.extractable(
|
|
10143
|
-
|
|
10149
|
+
React2.forwardRef(
|
|
10144
10150
|
({ __scopeDialog, ...props }, forwardedRef) => {
|
|
10145
10151
|
let portalContext = usePortalContext(OVERLAY_NAME, __scopeDialog), { forceMount = portalContext.forceMount, ...overlayProps } = props, context = useDialogContext(OVERLAY_NAME, __scopeDialog), showSheet = useShowDialogSheet(context);
|
|
10146
10152
|
return !forceMount && (!context.modal || showSheet) ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogOverlayImpl, { context, ...overlayProps, ref: forwardedRef });
|
|
@@ -10148,7 +10154,7 @@ var require_Dialog_native = __commonJS({
|
|
|
10148
10154
|
)
|
|
10149
10155
|
);
|
|
10150
10156
|
DialogOverlay.displayName = OVERLAY_NAME;
|
|
10151
|
-
var DialogOverlayImpl =
|
|
10157
|
+
var DialogOverlayImpl = React2.forwardRef(
|
|
10152
10158
|
(props, forwardedRef) => {
|
|
10153
10159
|
let { context, ...overlayProps } = props;
|
|
10154
10160
|
return (
|
|
@@ -10188,7 +10194,7 @@ var require_Dialog_native = __commonJS({
|
|
|
10188
10194
|
unstyled: !1
|
|
10189
10195
|
}
|
|
10190
10196
|
}), DialogContent = DialogContentFrame.extractable(
|
|
10191
|
-
|
|
10197
|
+
React2.forwardRef(
|
|
10192
10198
|
({ __scopeDialog, ...props }, forwardedRef) => {
|
|
10193
10199
|
let portalContext = usePortalContext(CONTENT_NAME, __scopeDialog), { forceMount = portalContext.forceMount, ...contentProps } = props, context = useDialogContext(CONTENT_NAME, __scopeDialog), contents = context.modal ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogContentModal, { context, ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogContentNonModal, { context, ...contentProps, ref: forwardedRef });
|
|
10194
10200
|
return !import_core12.isWeb || context.disableRemoveScroll ? contents : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -10206,10 +10212,10 @@ var require_Dialog_native = __commonJS({
|
|
|
10206
10212
|
)
|
|
10207
10213
|
);
|
|
10208
10214
|
DialogContent.displayName = CONTENT_NAME;
|
|
10209
|
-
var DialogContentModal =
|
|
10215
|
+
var DialogContentModal = React2.forwardRef(
|
|
10210
10216
|
({ children, context, ...props }, forwardedRef) => {
|
|
10211
|
-
let contentRef =
|
|
10212
|
-
return import_core12.isWeb &&
|
|
10217
|
+
let contentRef = React2.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.contentRef, contentRef);
|
|
10218
|
+
return import_core12.isWeb && React2.useEffect(() => {
|
|
10213
10219
|
if (!context.open)
|
|
10214
10220
|
return;
|
|
10215
10221
|
let content = contentRef.current;
|
|
@@ -10241,9 +10247,9 @@ var require_Dialog_native = __commonJS({
|
|
|
10241
10247
|
}
|
|
10242
10248
|
);
|
|
10243
10249
|
}
|
|
10244
|
-
), DialogContentNonModal =
|
|
10250
|
+
), DialogContentNonModal = React2.forwardRef(
|
|
10245
10251
|
(props, forwardedRef) => {
|
|
10246
|
-
let hasInteractedOutsideRef =
|
|
10252
|
+
let hasInteractedOutsideRef = React2.useRef(!1);
|
|
10247
10253
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
10248
10254
|
DialogContentImpl,
|
|
10249
10255
|
{
|
|
@@ -10264,7 +10270,7 @@ var require_Dialog_native = __commonJS({
|
|
|
10264
10270
|
}
|
|
10265
10271
|
);
|
|
10266
10272
|
}
|
|
10267
|
-
), DialogContentImpl =
|
|
10273
|
+
), DialogContentImpl = React2.forwardRef(
|
|
10268
10274
|
(props, forwardedRef) => {
|
|
10269
10275
|
let {
|
|
10270
10276
|
__scopeDialog,
|
|
@@ -10278,7 +10284,7 @@ var require_Dialog_native = __commonJS({
|
|
|
10278
10284
|
onInteractOutside,
|
|
10279
10285
|
context,
|
|
10280
10286
|
...contentProps
|
|
10281
|
-
} = props, contentRef =
|
|
10287
|
+
} = props, contentRef = React2.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), showSheet = useShowDialogSheet(context), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
10282
10288
|
DialogContentFrame,
|
|
10283
10289
|
{
|
|
10284
10290
|
id: context.contentId,
|
|
@@ -10319,7 +10325,7 @@ var require_Dialog_native = __commonJS({
|
|
|
10319
10325
|
}
|
|
10320
10326
|
), TITLE_NAME = "DialogTitle", DialogTitleFrame = (0, import_core12.styled)(import_text2.H2, {
|
|
10321
10327
|
name: TITLE_NAME
|
|
10322
|
-
}), DialogTitle =
|
|
10328
|
+
}), DialogTitle = React2.forwardRef(
|
|
10323
10329
|
(props, forwardedRef) => {
|
|
10324
10330
|
let { __scopeDialog, ...titleProps } = props, context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
10325
10331
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogTitleFrame, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
@@ -10328,7 +10334,7 @@ var require_Dialog_native = __commonJS({
|
|
|
10328
10334
|
DialogTitle.displayName = TITLE_NAME;
|
|
10329
10335
|
var DialogDescriptionFrame = (0, import_core12.styled)(import_text2.Paragraph, {
|
|
10330
10336
|
name: "DialogDescription"
|
|
10331
|
-
}), DESCRIPTION_NAME = "DialogDescription", DialogDescription =
|
|
10337
|
+
}), DESCRIPTION_NAME = "DialogDescription", DialogDescription = React2.forwardRef((props, forwardedRef) => {
|
|
10332
10338
|
let { __scopeDialog, ...descriptionProps } = props, context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
10333
10339
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
10334
10340
|
DialogDescriptionFrame,
|
|
@@ -10381,7 +10387,7 @@ var require_Dialog_native = __commonJS({
|
|
|
10381
10387
|
titleName: TITLE_NAME,
|
|
10382
10388
|
docsSlug: "dialog"
|
|
10383
10389
|
}), Dialog = (0, import_core12.withStaticProperties)(
|
|
10384
|
-
|
|
10390
|
+
React2.forwardRef(function(props, ref) {
|
|
10385
10391
|
let {
|
|
10386
10392
|
__scopeDialog,
|
|
10387
10393
|
children,
|
|
@@ -10391,11 +10397,11 @@ var require_Dialog_native = __commonJS({
|
|
|
10391
10397
|
modal = !0,
|
|
10392
10398
|
allowPinchZoom = !1,
|
|
10393
10399
|
disableRemoveScroll = !1
|
|
10394
|
-
} = props, baseId =
|
|
10400
|
+
} = props, baseId = React2.useId(), scopeId = `scope-${baseId}`, contentId = `content-${baseId}`, titleId = `title-${baseId}`, descriptionId = `description-${baseId}`, scopeKey = __scopeDialog ? Object.keys(__scopeDialog)[0] : scopeId, sheetContentsName = getSheetContentsName({ scopeKey, contentId }), triggerRef = React2.useRef(null), contentRef = React2.useRef(null), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
10395
10401
|
prop: openProp,
|
|
10396
10402
|
defaultProp: defaultOpen,
|
|
10397
10403
|
onChange: onOpenChange
|
|
10398
|
-
}), onOpenToggle =
|
|
10404
|
+
}), onOpenToggle = React2.useCallback(() => {
|
|
10399
10405
|
setOpen((prevOpen) => !prevOpen);
|
|
10400
10406
|
}, [setOpen]), context = {
|
|
10401
10407
|
scope: __scopeDialog,
|
|
@@ -10411,12 +10417,12 @@ var require_Dialog_native = __commonJS({
|
|
|
10411
10417
|
modal,
|
|
10412
10418
|
allowPinchZoom
|
|
10413
10419
|
}, { when, AdaptProvider } = (0, import_adapt.useAdaptParent)({
|
|
10414
|
-
Contents:
|
|
10420
|
+
Contents: React2.useCallback(
|
|
10415
10421
|
(props2) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, { forwardProps: props2, name: sheetContentsName }),
|
|
10416
10422
|
[sheetContentsName]
|
|
10417
10423
|
)
|
|
10418
10424
|
});
|
|
10419
|
-
return
|
|
10425
|
+
return React2.useImperativeHandle(
|
|
10420
10426
|
ref,
|
|
10421
10427
|
() => ({
|
|
10422
10428
|
open: setOpen
|
|
@@ -10522,11 +10528,11 @@ var require_AlertDialog_native = __commonJS({
|
|
|
10522
10528
|
createAlertDialogScope: () => createAlertDialogScope
|
|
10523
10529
|
});
|
|
10524
10530
|
module2.exports = __toCommonJS2(AlertDialog_exports);
|
|
10525
|
-
var import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_create_context = require_index_native14(), import_dialog = require_index_native35(), import_use_controllable_state = require_index_native15(),
|
|
10531
|
+
var import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_create_context = require_index_native14(), import_dialog = require_index_native35(), import_use_controllable_state = require_index_native15(), React2 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), import_jsx_runtime6 = require("react/jsx-runtime"), ROOT_NAME = "AlertDialog", [createAlertDialogContext, createAlertDialogScope] = (0, import_create_context.createContextScope)(ROOT_NAME, [
|
|
10526
10532
|
import_dialog.createDialogScope
|
|
10527
10533
|
]), useDialogScope = (0, import_dialog.createDialogScope)(), TRIGGER_NAME = "AlertDialogTrigger", NativeAlertDialogTriggerFrame = (0, import_core12.styled)(import_core12.View, {
|
|
10528
10534
|
name: TRIGGER_NAME
|
|
10529
|
-
}), AlertDialogTrigger =
|
|
10535
|
+
}), AlertDialogTrigger = React2.forwardRef(
|
|
10530
10536
|
(props, forwardedRef) => {
|
|
10531
10537
|
if (props.__native) {
|
|
10532
10538
|
let { __native, onPress, __onPress, ...rest } = props;
|
|
@@ -10551,7 +10557,7 @@ var require_AlertDialog_native = __commonJS({
|
|
|
10551
10557
|
var OVERLAY_NAME = "AlertDialogOverlay", AlertDialogOverlayFrame = (0, import_core12.styled)(import_dialog.DialogOverlayFrame, {
|
|
10552
10558
|
name: OVERLAY_NAME
|
|
10553
10559
|
}), AlertDialogOverlay = AlertDialogOverlayFrame.extractable(
|
|
10554
|
-
|
|
10560
|
+
React2.forwardRef(
|
|
10555
10561
|
(props, forwardedRef) => {
|
|
10556
10562
|
let { __scopeAlertDialog, ...overlayProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
10557
10563
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogOverlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });
|
|
@@ -10559,9 +10565,9 @@ var require_AlertDialog_native = __commonJS({
|
|
|
10559
10565
|
)
|
|
10560
10566
|
);
|
|
10561
10567
|
AlertDialogOverlay.displayName = OVERLAY_NAME;
|
|
10562
|
-
var CONTENT_NAME = "AlertDialogContent", [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME), AlertDialogContent =
|
|
10568
|
+
var CONTENT_NAME = "AlertDialogContent", [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME), AlertDialogContent = React2.forwardRef(
|
|
10563
10569
|
(props, forwardedRef) => {
|
|
10564
|
-
let { __scopeAlertDialog, children, ...contentProps } = props, dialogScope = useDialogScope(__scopeAlertDialog), contentRef =
|
|
10570
|
+
let { __scopeAlertDialog, children, ...contentProps } = props, dialogScope = useDialogScope(__scopeAlertDialog), contentRef = React2.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), cancelRef = React2.useRef(null);
|
|
10565
10571
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
10566
10572
|
import_dialog.DialogWarningProvider,
|
|
10567
10573
|
{
|
|
@@ -10595,26 +10601,26 @@ var require_AlertDialog_native = __commonJS({
|
|
|
10595
10601
|
}
|
|
10596
10602
|
);
|
|
10597
10603
|
AlertDialogContent.displayName = CONTENT_NAME;
|
|
10598
|
-
var TITLE_NAME = "AlertDialogTitle", AlertDialogTitle =
|
|
10604
|
+
var TITLE_NAME = "AlertDialogTitle", AlertDialogTitle = React2.forwardRef(
|
|
10599
10605
|
(props, forwardedRef) => {
|
|
10600
10606
|
let { __scopeAlertDialog, ...titleProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
10601
10607
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogTitle, { ...dialogScope, ...titleProps, ref: forwardedRef });
|
|
10602
10608
|
}
|
|
10603
10609
|
);
|
|
10604
10610
|
AlertDialogTitle.displayName = TITLE_NAME;
|
|
10605
|
-
var DESCRIPTION_NAME = "AlertDialogDescription", AlertDialogDescription =
|
|
10611
|
+
var DESCRIPTION_NAME = "AlertDialogDescription", AlertDialogDescription = React2.forwardRef((props, forwardedRef) => {
|
|
10606
10612
|
let { __scopeAlertDialog, ...descriptionProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
10607
10613
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogDescription, { ...dialogScope, ...descriptionProps, ref: forwardedRef });
|
|
10608
10614
|
});
|
|
10609
10615
|
AlertDialogDescription.displayName = DESCRIPTION_NAME;
|
|
10610
|
-
var ACTION_NAME = "AlertDialogAction", AlertDialogAction =
|
|
10616
|
+
var ACTION_NAME = "AlertDialogAction", AlertDialogAction = React2.forwardRef(
|
|
10611
10617
|
(props, forwardedRef) => {
|
|
10612
10618
|
let { __scopeAlertDialog, ...actionProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
10613
10619
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogClose, { ...dialogScope, ...actionProps, ref: forwardedRef });
|
|
10614
10620
|
}
|
|
10615
10621
|
);
|
|
10616
10622
|
AlertDialogAction.displayName = ACTION_NAME;
|
|
10617
|
-
var CANCEL_NAME = "AlertDialogCancel", AlertDialogCancel =
|
|
10623
|
+
var CANCEL_NAME = "AlertDialogCancel", AlertDialogCancel = React2.forwardRef(
|
|
10618
10624
|
(props, forwardedRef) => {
|
|
10619
10625
|
let { __scopeAlertDialog, ...cancelProps } = props, { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog), dialogScope = useDialogScope(__scopeAlertDialog), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, cancelRef);
|
|
10620
10626
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogClose, { ...dialogScope, ...cancelProps, ref });
|
|
@@ -10630,13 +10636,13 @@ var require_AlertDialog_native = __commonJS({
|
|
|
10630
10636
|
onChange: props.onOpenChange,
|
|
10631
10637
|
transition: !0
|
|
10632
10638
|
}), triggerElement = null, title = "", description = "", buttons = [];
|
|
10633
|
-
if (forEachChildDeep(
|
|
10634
|
-
if (!
|
|
10639
|
+
if (forEachChildDeep(React2.Children.toArray(props.children), (child) => {
|
|
10640
|
+
if (!React2.isValidElement(child))
|
|
10635
10641
|
return !1;
|
|
10636
10642
|
let name = (0, import_core12.isTamaguiElement)(child) ? child.type.staticConfig.componentName : child.type.displayName;
|
|
10637
10643
|
switch (name) {
|
|
10638
10644
|
case TRIGGER_NAME:
|
|
10639
|
-
return triggerElement =
|
|
10645
|
+
return triggerElement = React2.cloneElement(child, {
|
|
10640
10646
|
__native: !0
|
|
10641
10647
|
}), !1;
|
|
10642
10648
|
case TITLE_NAME:
|
|
@@ -10663,7 +10669,7 @@ var require_AlertDialog_native = __commonJS({
|
|
|
10663
10669
|
}), (0, import_core12.useIsomorphicLayoutEffect)(() => {
|
|
10664
10670
|
!open || !native || (title || description) && import_react_native4.Alert.alert(title, description, buttons);
|
|
10665
10671
|
}, [native, open]), native)
|
|
10666
|
-
return
|
|
10672
|
+
return React2.cloneElement(triggerElement, {
|
|
10667
10673
|
__onPress: () => {
|
|
10668
10674
|
setOpen(!0);
|
|
10669
10675
|
}
|
|
@@ -10673,11 +10679,11 @@ var require_AlertDialog_native = __commonJS({
|
|
|
10673
10679
|
};
|
|
10674
10680
|
function forEachChildDeep(children, onChild) {
|
|
10675
10681
|
for (let child of children)
|
|
10676
|
-
|
|
10682
|
+
React2.isValidElement(child) && onChild(child) && child.props.children && forEachChildDeep(React2.Children.toArray(child.props.children), onChild);
|
|
10677
10683
|
}
|
|
10678
10684
|
function getStringChildren(child) {
|
|
10679
10685
|
let string = "";
|
|
10680
|
-
return forEachChildDeep(
|
|
10686
|
+
return forEachChildDeep(React2.Children.toArray(child), (child2) => typeof child2.props.children == "string" ? (string = child2.props.children, !1) : !0), string;
|
|
10681
10687
|
}
|
|
10682
10688
|
var AlertDialog = (0, import_core12.withStaticProperties)(AlertDialogInner, {
|
|
10683
10689
|
Trigger: AlertDialogTrigger,
|
|
@@ -10725,7 +10731,7 @@ var require_Image_native = __commonJS({
|
|
|
10725
10731
|
Image: () => Image
|
|
10726
10732
|
});
|
|
10727
10733
|
module2.exports = __toCommonJS2(Image_exports);
|
|
10728
|
-
var import_core12 = require_index_native10(),
|
|
10734
|
+
var import_core12 = require_index_native10(), import_react2 = require("react"), import_react_native4 = require_fake_react_native(), import_jsx_runtime6 = require("react/jsx-runtime");
|
|
10729
10735
|
(0, import_core12.setupReactNative)({
|
|
10730
10736
|
Image: import_react_native4.Image
|
|
10731
10737
|
});
|
|
@@ -10734,7 +10740,7 @@ var require_Image_native = __commonJS({
|
|
|
10734
10740
|
position: "relative",
|
|
10735
10741
|
source: { uri: "" }
|
|
10736
10742
|
}), Image = StyledImage.extractable(
|
|
10737
|
-
(0,
|
|
10743
|
+
(0, import_react2.forwardRef)((inProps, ref) => {
|
|
10738
10744
|
let props = (0, import_core12.useProps)(inProps), { src, source, ...rest } = props, finalSource = typeof src == "string" ? { uri: src, ...import_core12.isWeb && { width: props.width, height: props.height } } : source ?? src;
|
|
10739
10745
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StyledImage, { ref, source: finalSource, ...rest });
|
|
10740
10746
|
})
|
|
@@ -10894,20 +10900,20 @@ var require_Avatar_native = __commonJS({
|
|
|
10894
10900
|
createAvatarScope: () => createAvatarScope
|
|
10895
10901
|
});
|
|
10896
10902
|
module2.exports = __toCommonJS2(Avatar_exports);
|
|
10897
|
-
var import_core12 = require_index_native10(), import_create_context = require_index_native14(), import_image = require_index_native37(), import_shapes = require_index_native38(), import_stacks3 = require_index_native20(),
|
|
10903
|
+
var import_core12 = require_index_native10(), import_create_context = require_index_native14(), import_image = require_index_native37(), import_shapes = require_index_native38(), import_stacks3 = require_index_native20(), React2 = __toESM2(require("react")), import_jsx_runtime6 = require("react/jsx-runtime"), AVATAR_NAME = "Avatar", [createAvatarContext, createAvatarScope] = (0, import_create_context.createContextScope)(AVATAR_NAME), [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME), IMAGE_NAME = "AvatarImage", AvatarImage = React2.forwardRef(
|
|
10898
10904
|
(props, forwardedRef) => {
|
|
10899
10905
|
var _a;
|
|
10900
10906
|
let { __scopeAvatar, src, onLoadingStatusChange = () => {
|
|
10901
|
-
}, ...imageProps } = props, context = useAvatarContext(IMAGE_NAME, __scopeAvatar), [status, setStatus] =
|
|
10907
|
+
}, ...imageProps } = props, context = useAvatarContext(IMAGE_NAME, __scopeAvatar), [status, setStatus] = React2.useState("idle"), shapeSize = (0, import_core12.getVariableValue)(
|
|
10902
10908
|
(_a = (0, import_shapes.getShapeSize)(
|
|
10903
10909
|
context.size,
|
|
10904
10910
|
// @ts-expect-error
|
|
10905
10911
|
{ tokens: (0, import_core12.getTokens)() }
|
|
10906
10912
|
)) == null ? void 0 : _a.width
|
|
10907
10913
|
);
|
|
10908
|
-
return
|
|
10914
|
+
return React2.useEffect(() => {
|
|
10909
10915
|
setStatus("idle");
|
|
10910
|
-
}, [JSON.stringify(src)]),
|
|
10916
|
+
}, [JSON.stringify(src)]), React2.useEffect(() => {
|
|
10911
10917
|
onLoadingStatusChange(status), context.onImageLoadingStatusChange(status);
|
|
10912
10918
|
}, [status]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, { fullscreen: !0, zIndex: 1, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
10913
10919
|
import_image.Image,
|
|
@@ -10937,10 +10943,10 @@ var require_Avatar_native = __commonJS({
|
|
|
10937
10943
|
fullscreen: !0,
|
|
10938
10944
|
zIndex: 0
|
|
10939
10945
|
}), AvatarFallback = AvatarFallbackFrame.extractable(
|
|
10940
|
-
|
|
10946
|
+
React2.forwardRef(
|
|
10941
10947
|
(props, forwardedRef) => {
|
|
10942
|
-
let { __scopeAvatar, delayMs, ...fallbackProps } = props, context = useAvatarContext(FALLBACK_NAME, __scopeAvatar), [canRender, setCanRender] =
|
|
10943
|
-
return
|
|
10948
|
+
let { __scopeAvatar, delayMs, ...fallbackProps } = props, context = useAvatarContext(FALLBACK_NAME, __scopeAvatar), [canRender, setCanRender] = React2.useState(delayMs === void 0);
|
|
10949
|
+
return React2.useEffect(() => {
|
|
10944
10950
|
if (delayMs !== void 0) {
|
|
10945
10951
|
let timerId = setTimeout(() => setCanRender(!0), delayMs);
|
|
10946
10952
|
return () => clearTimeout(timerId);
|
|
@@ -10955,9 +10961,9 @@ var require_Avatar_native = __commonJS({
|
|
|
10955
10961
|
position: "relative",
|
|
10956
10962
|
overflow: "hidden"
|
|
10957
10963
|
}), Avatar = (0, import_core12.withStaticProperties)(
|
|
10958
|
-
|
|
10964
|
+
React2.forwardRef(
|
|
10959
10965
|
(props, forwardedRef) => {
|
|
10960
|
-
let { __scopeAvatar, size = "$true", ...avatarProps } = props, [imageLoadingStatus, setImageLoadingStatus] =
|
|
10966
|
+
let { __scopeAvatar, size = "$true", ...avatarProps } = props, [imageLoadingStatus, setImageLoadingStatus] = React2.useState("idle");
|
|
10961
10967
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
10962
10968
|
AvatarProvider,
|
|
10963
10969
|
{
|
|
@@ -11110,14 +11116,14 @@ var require_useGetThemedIcon_native = __commonJS({
|
|
|
11110
11116
|
useGetThemedIcon: () => useGetThemedIcon
|
|
11111
11117
|
});
|
|
11112
11118
|
module2.exports = __toCommonJS2(useGetThemedIcon_exports);
|
|
11113
|
-
var
|
|
11119
|
+
var import_react2 = require("react"), import_useCurrentColor = require_useCurrentColor_native(), useGetThemedIcon = (props) => {
|
|
11114
11120
|
let color = (0, import_useCurrentColor.useCurrentColor)(props.color);
|
|
11115
|
-
return (el) => el && ((0,
|
|
11121
|
+
return (el) => el && ((0, import_react2.isValidElement)(el) ? (0, import_react2.cloneElement)(el, {
|
|
11116
11122
|
...props,
|
|
11117
11123
|
color,
|
|
11118
11124
|
// @ts-expect-error
|
|
11119
11125
|
...el.props
|
|
11120
|
-
}) : (0,
|
|
11126
|
+
}) : (0, import_react2.createElement)(el, props));
|
|
11121
11127
|
};
|
|
11122
11128
|
}
|
|
11123
11129
|
});
|
|
@@ -11164,7 +11170,7 @@ var require_Button_native = __commonJS({
|
|
|
11164
11170
|
useButton: () => useButton
|
|
11165
11171
|
});
|
|
11166
11172
|
module2.exports = __toCommonJS2(Button_exports);
|
|
11167
|
-
var import_font_size = require_index_native40(), import_get_button_sized2 = require_index_native19(), import_helpers_tamagui = require_index_native41(), import_stacks3 = require_index_native20(), import_text2 = require_index_native22(), import_web = require_index_native9(),
|
|
11173
|
+
var import_font_size = require_index_native40(), import_get_button_sized2 = require_index_native19(), import_helpers_tamagui = require_index_native41(), import_stacks3 = require_index_native20(), import_text2 = require_index_native22(), import_web = require_index_native9(), import_react2 = require("react"), import_jsx_runtime6 = require("react/jsx-runtime"), ButtonContext = (0, import_web.createStyledContext)({}), BUTTON_NAME = "Button", ButtonFrame = (0, import_web.styled)(import_stacks3.ThemeableStack, {
|
|
11168
11174
|
name: BUTTON_NAME,
|
|
11169
11175
|
tag: "button",
|
|
11170
11176
|
context: ButtonContext,
|
|
@@ -11243,7 +11249,7 @@ var require_Button_native = __commonJS({
|
|
|
11243
11249
|
unstyled: !1
|
|
11244
11250
|
}
|
|
11245
11251
|
}), ButtonIcon = (props) => {
|
|
11246
|
-
let { children, scaleIcon = 1 } = props, { size, color } = (0,
|
|
11252
|
+
let { children, scaleIcon = 1 } = props, { size, color } = (0, import_react2.useContext)(ButtonContext), iconSize = (typeof size == "number" ? size * 0.5 : (0, import_font_size.getFontSize)(size)) * scaleIcon;
|
|
11247
11253
|
return (0, import_helpers_tamagui.useGetThemedIcon)({ size: iconSize, color })(children);
|
|
11248
11254
|
}, ButtonComponent = ButtonFrame.styleable(function(props, ref) {
|
|
11249
11255
|
let { props: buttonProps } = useButton(props);
|
|
@@ -11264,7 +11270,7 @@ var require_Button_native = __commonJS({
|
|
|
11264
11270
|
}, Button2 = (0, import_web.withStaticProperties)(ButtonComponent, {
|
|
11265
11271
|
Text: ButtonText,
|
|
11266
11272
|
Icon: ButtonIcon
|
|
11267
|
-
}), ButtonNestingContext = (0,
|
|
11273
|
+
}), ButtonNestingContext = (0, import_react2.createContext)(!1);
|
|
11268
11274
|
function useButton(propsIn, { Text: Text3 = Button2.Text } = { Text: Button2.Text }) {
|
|
11269
11275
|
let {
|
|
11270
11276
|
children,
|
|
@@ -11287,7 +11293,7 @@ var require_Button_native = __commonJS({
|
|
|
11287
11293
|
textAlign,
|
|
11288
11294
|
textProps,
|
|
11289
11295
|
...rest
|
|
11290
|
-
} = propsIn, isNested = (0,
|
|
11296
|
+
} = propsIn, isNested = (0, import_react2.useContext)(ButtonNestingContext), propsActive = (0, import_web.useProps)(propsIn), size = propsActive.size || (propsActive.unstyled ? void 0 : "$true"), iconSize = (typeof size == "number" ? size * 0.5 : (0, import_font_size.getFontSize)(size)) * scaleIcon, getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({ size: iconSize, color }), [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon), spaceSize = propsActive.space ?? (0, import_web.getVariableValue)(iconSize) * scaleSpace, contents = (0, import_text2.wrapChildrenInText)(
|
|
11291
11297
|
Text3,
|
|
11292
11298
|
propsActive,
|
|
11293
11299
|
Text3 === ButtonText && propsIn.unstyled !== !0 ? {
|
|
@@ -11509,13 +11515,13 @@ var require_focusableInputHOC_native = __commonJS({
|
|
|
11509
11515
|
useFocusable: () => useFocusable2
|
|
11510
11516
|
});
|
|
11511
11517
|
module2.exports = __toCommonJS2(focusableInputHOC_exports);
|
|
11512
|
-
var import_compose_refs = require_index_native6(), import_web = require_index_native9(),
|
|
11518
|
+
var import_compose_refs = require_index_native6(), import_web = require_index_native9(), import_react2 = require("react"), import_registerFocusable = require_registerFocusable_native(), import_jsx_runtime6 = require("react/jsx-runtime");
|
|
11513
11519
|
function useFocusable2({
|
|
11514
11520
|
isInput,
|
|
11515
11521
|
props,
|
|
11516
11522
|
ref
|
|
11517
11523
|
}) {
|
|
11518
|
-
let { id, onChangeText, value, defaultValue } = props, inputValue = (0,
|
|
11524
|
+
let { id, onChangeText, value, defaultValue } = props, inputValue = (0, import_react2.useRef)(value || defaultValue || ""), unregisterFocusable = (0, import_react2.useRef)(), inputRef = (0, import_react2.useCallback)(
|
|
11519
11525
|
(input) => {
|
|
11520
11526
|
var _a;
|
|
11521
11527
|
id && input && ((_a = unregisterFocusable.current) == null || _a.call(unregisterFocusable), unregisterFocusable.current = (0, import_registerFocusable.registerFocusable)(id, {
|
|
@@ -11530,7 +11536,7 @@ var require_focusableInputHOC_native = __commonJS({
|
|
|
11530
11536
|
},
|
|
11531
11537
|
[isInput, id]
|
|
11532
11538
|
), combinedRefs = (0, import_compose_refs.composeRefs)(ref, inputRef);
|
|
11533
|
-
return (0,
|
|
11539
|
+
return (0, import_react2.useEffect)(() => () => {
|
|
11534
11540
|
var _a;
|
|
11535
11541
|
(_a = unregisterFocusable.current) == null || _a.call(unregisterFocusable);
|
|
11536
11542
|
}, []), {
|
|
@@ -11614,7 +11620,7 @@ var require_Label_native = __commonJS({
|
|
|
11614
11620
|
useLabelContext: () => useLabelContext
|
|
11615
11621
|
});
|
|
11616
11622
|
module2.exports = __toCommonJS2(Label_exports);
|
|
11617
|
-
var import_compose_refs = require_index_native6(), import_create_context = require_index_native14(), import_focusable2 = require_index_native44(), import_get_button_sized2 = require_index_native19(), import_get_font_sized2 = require_index_native21(), import_text2 = require_index_native22(), import_web = require_index_native9(),
|
|
11623
|
+
var import_compose_refs = require_index_native6(), import_create_context = require_index_native14(), import_focusable2 = require_index_native44(), import_get_button_sized2 = require_index_native19(), import_get_font_sized2 = require_index_native21(), import_text2 = require_index_native22(), import_web = require_index_native9(), React2 = __toESM2(require("react")), import_jsx_runtime6 = require("react/jsx-runtime"), NAME = "Label", [LabelProvider, useLabelContextImpl] = (0, import_create_context.createContext)(NAME, {
|
|
11618
11624
|
id: void 0,
|
|
11619
11625
|
controlRef: { current: null }
|
|
11620
11626
|
}), LabelFrame = (0, import_web.styled)(import_text2.SizableText, {
|
|
@@ -11648,10 +11654,10 @@ var require_Label_native = __commonJS({
|
|
|
11648
11654
|
defaultVariants: {
|
|
11649
11655
|
unstyled: !1
|
|
11650
11656
|
}
|
|
11651
|
-
}), LabelComponent =
|
|
11657
|
+
}), LabelComponent = React2.forwardRef(
|
|
11652
11658
|
(props, forwardedRef) => {
|
|
11653
|
-
let { htmlFor, id: idProp, ...labelProps } = props, controlRef =
|
|
11654
|
-
return import_web.isWeb &&
|
|
11659
|
+
let { htmlFor, id: idProp, ...labelProps } = props, controlRef = React2.useRef(null), ref = React2.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), backupId = React2.useId(), id = idProp ?? backupId;
|
|
11660
|
+
return import_web.isWeb && React2.useEffect(() => {
|
|
11655
11661
|
if (htmlFor) {
|
|
11656
11662
|
let element = document.getElementById(htmlFor);
|
|
11657
11663
|
if (ref.current && element) {
|
|
@@ -11697,7 +11703,7 @@ var require_Label_native = __commonJS({
|
|
|
11697
11703
|
neverFlatten: !0
|
|
11698
11704
|
}), useLabelContext = (element) => {
|
|
11699
11705
|
let context = useLabelContextImpl("LabelConsumer"), { controlRef } = context;
|
|
11700
|
-
return
|
|
11706
|
+
return React2.useEffect(() => {
|
|
11701
11707
|
element && (controlRef.current = element);
|
|
11702
11708
|
}, [element, controlRef]), context.id;
|
|
11703
11709
|
};
|
|
@@ -11736,10 +11742,10 @@ var require_index_native46 = __commonJS({
|
|
|
11736
11742
|
usePrevious: () => usePrevious
|
|
11737
11743
|
});
|
|
11738
11744
|
module2.exports = __toCommonJS2(src_exports2);
|
|
11739
|
-
var
|
|
11745
|
+
var import_react2 = require("react");
|
|
11740
11746
|
function usePrevious(value) {
|
|
11741
|
-
let ref = (0,
|
|
11742
|
-
return (0,
|
|
11747
|
+
let ref = (0, import_react2.useRef)({ value, previous: value });
|
|
11748
|
+
return (0, import_react2.useMemo)(() => (ref.current.value !== value && (ref.current.previous = ref.current.value, ref.current.value = value), ref.current.previous), [value]);
|
|
11743
11749
|
}
|
|
11744
11750
|
}
|
|
11745
11751
|
});
|
|
@@ -11774,7 +11780,7 @@ var require_Checkbox_native = __commonJS({
|
|
|
11774
11780
|
isIndeterminate: () => isIndeterminate
|
|
11775
11781
|
});
|
|
11776
11782
|
module2.exports = __toCommonJS2(Checkbox_exports);
|
|
11777
|
-
var import_core12 = require_index_native10(), import_create_context = require_index_native14(), import_focusable2 = require_index_native44(), import_font_size = require_index_native40(), import_get_token2 = require_index_native18(), import_helpers_tamagui = require_index_native41(), import_label = require_index_native45(), import_stacks3 = require_index_native20(), import_use_controllable_state = require_index_native15(), import_use_previous = require_index_native46(),
|
|
11783
|
+
var import_core12 = require_index_native10(), import_create_context = require_index_native14(), import_focusable2 = require_index_native44(), import_font_size = require_index_native40(), import_get_token2 = require_index_native18(), import_helpers_tamagui = require_index_native41(), import_label = require_index_native45(), import_stacks3 = require_index_native20(), import_use_controllable_state = require_index_native15(), import_use_previous = require_index_native46(), React2 = __toESM2(require("react")), import_jsx_runtime6 = require("react/jsx-runtime"), CheckboxStyledContext = (0, import_core12.createStyledContext)({
|
|
11778
11784
|
size: "$true",
|
|
11779
11785
|
scaleIcon: 1
|
|
11780
11786
|
});
|
|
@@ -11785,8 +11791,8 @@ var require_Checkbox_native = __commonJS({
|
|
|
11785
11791
|
return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
|
|
11786
11792
|
}
|
|
11787
11793
|
var BubbleInput = (props) => {
|
|
11788
|
-
let { checked, bubbles = !0, control, isHidden, ...inputProps } = props, ref =
|
|
11789
|
-
return
|
|
11794
|
+
let { checked, bubbles = !0, control, isHidden, ...inputProps } = props, ref = React2.useRef(null), prevChecked = (0, import_use_previous.usePrevious)(checked);
|
|
11795
|
+
return React2.useEffect(() => {
|
|
11790
11796
|
let input = ref.current, inputProto = window.HTMLInputElement.prototype, setChecked = Object.getOwnPropertyDescriptor(
|
|
11791
11797
|
inputProto,
|
|
11792
11798
|
"checked"
|
|
@@ -11824,7 +11830,7 @@ var require_Checkbox_native = __commonJS({
|
|
|
11824
11830
|
name: INDICATOR_NAME,
|
|
11825
11831
|
context: CheckboxStyledContext
|
|
11826
11832
|
}), CheckboxIndicator = CheckboxIndicatorFrame.extractable(
|
|
11827
|
-
|
|
11833
|
+
React2.forwardRef(
|
|
11828
11834
|
(props, forwardedRef) => {
|
|
11829
11835
|
let {
|
|
11830
11836
|
__scopeCheckbox,
|
|
@@ -11832,7 +11838,7 @@ var require_Checkbox_native = __commonJS({
|
|
|
11832
11838
|
forceMount,
|
|
11833
11839
|
disablePassStyles,
|
|
11834
11840
|
...indicatorProps
|
|
11835
|
-
} = props, context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox), styledContext =
|
|
11841
|
+
} = props, context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox), styledContext = React2.useContext(CheckboxStyledContext), iconSize = (typeof styledContext.size == "number" ? styledContext.size * 0.65 : (0, import_font_size.getFontSize)(styledContext.size)) * styledContext.scaleIcon, theme = (0, import_core12.useTheme)(), getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({ size: iconSize, color: theme.color }), children = React2.Children.toArray(childrenProp).map((child) => disablePassStyles || !React2.isValidElement(child) ? child : getThemedIcon(child));
|
|
11836
11842
|
return forceMount || isIndeterminate(context.state) || context.state === !0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
11837
11843
|
CheckboxIndicatorFrame,
|
|
11838
11844
|
{
|
|
@@ -11867,7 +11873,10 @@ var require_Checkbox_native = __commonJS({
|
|
|
11867
11873
|
borderColor: "$borderColorHover"
|
|
11868
11874
|
},
|
|
11869
11875
|
focusStyle: {
|
|
11870
|
-
borderColor: "$borderColorFocus"
|
|
11876
|
+
borderColor: "$borderColorFocus",
|
|
11877
|
+
outlineStyle: "solid",
|
|
11878
|
+
outlineWidth: 2,
|
|
11879
|
+
outlineColor: "$borderColorFocus"
|
|
11871
11880
|
}
|
|
11872
11881
|
}
|
|
11873
11882
|
},
|
|
@@ -11881,7 +11890,7 @@ var require_Checkbox_native = __commonJS({
|
|
|
11881
11890
|
unstyled: !1
|
|
11882
11891
|
}
|
|
11883
11892
|
}), [createCheckboxContext, createCheckboxScope] = (0, import_create_context.createContextScope)(CHECKBOX_NAME), [CheckboxProvider, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME), CheckboxComponent = CheckboxFrame.extractable(
|
|
11884
|
-
|
|
11893
|
+
React2.forwardRef(function(props, forwardedRef) {
|
|
11885
11894
|
let {
|
|
11886
11895
|
__scopeCheckbox,
|
|
11887
11896
|
labelledBy: ariaLabelledby,
|
|
@@ -11897,16 +11906,16 @@ var require_Checkbox_native = __commonJS({
|
|
|
11897
11906
|
native,
|
|
11898
11907
|
scaleIcon,
|
|
11899
11908
|
...checkboxProps
|
|
11900
|
-
} = props, [button, setButton] =
|
|
11909
|
+
} = props, [button, setButton] = React2.useState(null), composedRefs = (0, import_core12.useComposedRefs)(forwardedRef, (node) => setButton(node)), hasConsumerStoppedPropagationRef = React2.useRef(!1), propsActive = (0, import_core12.useProps)(props), isFormControl = import_core12.isWeb ? button ? !!button.closest("form") : !0 : !1, [checked = !1, setChecked] = (0, import_use_controllable_state.useControllableState)({
|
|
11901
11910
|
prop: checkedProp,
|
|
11902
11911
|
defaultProp: defaultChecked,
|
|
11903
11912
|
onChange: onCheckedChange
|
|
11904
|
-
}), styledContext =
|
|
11913
|
+
}), styledContext = React2.useContext(CheckboxStyledContext), adjustedSize = (0, import_core12.getVariableValue)(
|
|
11905
11914
|
(0, import_get_token2.getSize)(propsActive.size ?? (styledContext == null ? void 0 : styledContext.size) ?? "$true", {
|
|
11906
11915
|
shift: sizeAdjust
|
|
11907
11916
|
})
|
|
11908
11917
|
), size = scaleSize ? Math.round(adjustedSize * scaleSize) : adjustedSize, labelId = (0, import_label.useLabelContext)(button), labelledBy = ariaLabelledby || labelId;
|
|
11909
|
-
return
|
|
11918
|
+
return React2.useEffect(() => {
|
|
11910
11919
|
if (props.id)
|
|
11911
11920
|
return (0, import_focusable2.registerFocusable)(props.id, {
|
|
11912
11921
|
focusAndSelect: () => {
|
|
@@ -12026,7 +12035,7 @@ var require_Form_native = __commonJS({
|
|
|
12026
12035
|
useFormContext: () => useFormContext
|
|
12027
12036
|
});
|
|
12028
12037
|
module2.exports = __toCommonJS2(Form_exports);
|
|
12029
|
-
var import_core12 = require_index_native10(), import_create_context = require_index_native14(),
|
|
12038
|
+
var import_core12 = require_index_native10(), import_create_context = require_index_native14(), import_react2 = require("react"), import_jsx_runtime6 = require("react/jsx-runtime"), FORM_NAME = "Form", FormFrame = (0, import_core12.styled)(import_core12.Stack, {
|
|
12030
12039
|
name: FORM_NAME,
|
|
12031
12040
|
tag: "form"
|
|
12032
12041
|
}), [createFormContext] = (0, import_create_context.createContextScope)(FORM_NAME), [FormProvider, useFormContext] = createFormContext(FORM_NAME), TRIGGER_NAME = "FormTrigger", FormTriggerFrame = (0, import_core12.styled)(import_core12.Stack, {
|
|
@@ -12039,7 +12048,7 @@ var require_Form_native = __commonJS({
|
|
|
12039
12048
|
{
|
|
12040
12049
|
tag: "button",
|
|
12041
12050
|
...triggerProps,
|
|
12042
|
-
children: triggerProps.asChild ? (0,
|
|
12051
|
+
children: triggerProps.asChild ? (0, import_react2.cloneElement)(children, { disabled: triggerProps.disabled }) : children,
|
|
12043
12052
|
ref: forwardedRef,
|
|
12044
12053
|
onPress: (0, import_core12.composeEventHandlers)(props.onPress, context.onSubmit)
|
|
12045
12054
|
}
|
|
@@ -12142,7 +12151,7 @@ var require_use_sync_external_store_shim_native_development = __commonJS({
|
|
|
12142
12151
|
(function() {
|
|
12143
12152
|
"use strict";
|
|
12144
12153
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
12145
|
-
var
|
|
12154
|
+
var React2 = require("react"), ReactSharedInternals = React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
12146
12155
|
function error(format) {
|
|
12147
12156
|
{
|
|
12148
12157
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++)
|
|
@@ -12163,9 +12172,9 @@ var require_use_sync_external_store_shim_native_development = __commonJS({
|
|
|
12163
12172
|
function is(x, y) {
|
|
12164
12173
|
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
12165
12174
|
}
|
|
12166
|
-
var objectIs = typeof Object.is == "function" ? Object.is : is, useState =
|
|
12175
|
+
var objectIs = typeof Object.is == "function" ? Object.is : is, useState = React2.useState, useEffect = React2.useEffect, useLayoutEffect = React2.useLayoutEffect, useDebugValue2 = React2.useDebugValue, didWarnOld18Alpha = !1, didWarnUncachedGetSnapshot = !1;
|
|
12167
12176
|
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
|
12168
|
-
didWarnOld18Alpha ||
|
|
12177
|
+
didWarnOld18Alpha || React2.startTransition !== void 0 && (didWarnOld18Alpha = !0, error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
|
|
12169
12178
|
var value = getSnapshot();
|
|
12170
12179
|
if (!didWarnUncachedGetSnapshot) {
|
|
12171
12180
|
var cachedValue = getSnapshot();
|
|
@@ -12202,7 +12211,7 @@ var require_use_sync_external_store_shim_native_development = __commonJS({
|
|
|
12202
12211
|
return !0;
|
|
12203
12212
|
}
|
|
12204
12213
|
}
|
|
12205
|
-
var shim = useSyncExternalStore, useSyncExternalStore$1 =
|
|
12214
|
+
var shim = useSyncExternalStore, useSyncExternalStore$1 = React2.useSyncExternalStore !== void 0 ? React2.useSyncExternalStore : shim;
|
|
12206
12215
|
exports.useSyncExternalStore = useSyncExternalStore$1, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
12207
12216
|
})();
|
|
12208
12217
|
}
|
|
@@ -12223,11 +12232,11 @@ var require_with_selector_development = __commonJS({
|
|
|
12223
12232
|
(function() {
|
|
12224
12233
|
"use strict";
|
|
12225
12234
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
12226
|
-
var
|
|
12235
|
+
var React2 = require("react"), shim = require_index_native49();
|
|
12227
12236
|
function is(x, y) {
|
|
12228
12237
|
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
12229
12238
|
}
|
|
12230
|
-
var objectIs = typeof Object.is == "function" ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef =
|
|
12239
|
+
var objectIs = typeof Object.is == "function" ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef = React2.useRef, useEffect = React2.useEffect, useMemo = React2.useMemo, useDebugValue2 = React2.useDebugValue;
|
|
12231
12240
|
function useSyncExternalStoreWithSelector2(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
12232
12241
|
var instRef = useRef(null), inst;
|
|
12233
12242
|
instRef.current === null ? (inst = {
|
|
@@ -12349,13 +12358,13 @@ var require_dist = __commonJS({
|
|
|
12349
12358
|
useTreeState: () => useTreeState
|
|
12350
12359
|
});
|
|
12351
12360
|
module2.exports = __toCommonJS2(src_exports2);
|
|
12352
|
-
var React3 = __toESM2(require("react")),
|
|
12361
|
+
var React3 = __toESM2(require("react")), React2 = __toESM2(require("react")), PrerenderContext = React2.createContext(!1);
|
|
12353
12362
|
PrerenderContext.displayName = "PrerenderContext";
|
|
12354
|
-
var MaxIndexContext =
|
|
12363
|
+
var MaxIndexContext = React2.createContext([]);
|
|
12355
12364
|
MaxIndexContext.displayName = "MaxIndexContext";
|
|
12356
|
-
var IndexContext =
|
|
12365
|
+
var IndexContext = React2.createContext(null);
|
|
12357
12366
|
IndexContext.displayName = "IndexContext";
|
|
12358
|
-
var TreeStateContext =
|
|
12367
|
+
var TreeStateContext = React2.createContext(null);
|
|
12359
12368
|
TreeStateContext.displayName = "TreeStateContext";
|
|
12360
12369
|
var React22 = __toESM2(require("react")), import_performant_array_to_tree = require_arrayToTree_min(), isServer2 = typeof window > "u", useIsomorphicLayoutEffect2 = isServer2 ? React22.useEffect : React22.useLayoutEffect;
|
|
12361
12370
|
function parseIndexPath(indexPathString) {
|
|
@@ -12437,27 +12446,27 @@ var require_dist = __commonJS({
|
|
|
12437
12446
|
) : child
|
|
12438
12447
|
));
|
|
12439
12448
|
}
|
|
12440
|
-
var
|
|
12449
|
+
var React4 = __toESM2(require("react"));
|
|
12441
12450
|
function useRovingIndex({
|
|
12442
12451
|
contain = !0,
|
|
12443
12452
|
defaultIndex = 0,
|
|
12444
12453
|
maxIndex = 1 / 0,
|
|
12445
12454
|
wrap = !1
|
|
12446
12455
|
}) {
|
|
12447
|
-
let [activeIndex, setLocalActiveIndex] =
|
|
12456
|
+
let [activeIndex, setLocalActiveIndex] = React4.useState(defaultIndex), getNextIndex = React4.useCallback(
|
|
12448
12457
|
(nextIndex) => wrap ? (nextIndex % maxIndex + maxIndex) % maxIndex : contain ? nextIndex > maxIndex ? maxIndex : nextIndex < 0 ? 0 : nextIndex : nextIndex,
|
|
12449
12458
|
[maxIndex, wrap]
|
|
12450
|
-
), moveActiveIndex =
|
|
12459
|
+
), moveActiveIndex = React4.useCallback(
|
|
12451
12460
|
(amountToMove) => {
|
|
12452
12461
|
setLocalActiveIndex((currentIndex) => getNextIndex(currentIndex + amountToMove));
|
|
12453
12462
|
},
|
|
12454
12463
|
[getNextIndex]
|
|
12455
|
-
), setActiveIndex =
|
|
12464
|
+
), setActiveIndex = React4.useCallback(
|
|
12456
12465
|
(nextIndex) => {
|
|
12457
12466
|
setLocalActiveIndex(getNextIndex(nextIndex));
|
|
12458
12467
|
},
|
|
12459
12468
|
[getNextIndex]
|
|
12460
|
-
), moveBackward =
|
|
12469
|
+
), moveBackward = React4.useCallback(() => moveActiveIndex(-1), [moveActiveIndex]), moveForward = React4.useCallback(() => moveActiveIndex(1), [moveActiveIndex]);
|
|
12461
12470
|
return {
|
|
12462
12471
|
activeIndex,
|
|
12463
12472
|
moveActiveIndex,
|
|
@@ -12561,7 +12570,7 @@ var require_Group_native = __commonJS({
|
|
|
12561
12570
|
useGroupItem: () => useGroupItem
|
|
12562
12571
|
});
|
|
12563
12572
|
module2.exports = __toCommonJS2(Group_exports);
|
|
12564
|
-
var import_core12 = require_index_native10(), import_create_context = require_index_native14(), import_stacks3 = require_index_native20(), import_use_controllable_state = require_index_native15(),
|
|
12573
|
+
var import_core12 = require_index_native10(), import_create_context = require_index_native14(), import_stacks3 = require_index_native20(), import_use_controllable_state = require_index_native15(), import_react2 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), import_reforest = require_dist(), import_jsx_runtime6 = require("react/jsx-runtime"), 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, {
|
|
12565
12574
|
name: "GroupFrame",
|
|
12566
12575
|
variants: {
|
|
12567
12576
|
unstyled: {
|
|
@@ -12580,7 +12589,7 @@ var require_Group_native = __commonJS({
|
|
|
12580
12589
|
});
|
|
12581
12590
|
function createGroup(verticalDefault) {
|
|
12582
12591
|
return (0, import_core12.withStaticProperties)(
|
|
12583
|
-
(0,
|
|
12592
|
+
(0, import_react2.forwardRef)((props, ref) => {
|
|
12584
12593
|
let activeProps = (0, import_core12.useProps)(props), {
|
|
12585
12594
|
__scopeGroup,
|
|
12586
12595
|
children: childrenProp,
|
|
@@ -12598,8 +12607,8 @@ var require_Group_native = __commonJS({
|
|
|
12598
12607
|
...restProps
|
|
12599
12608
|
} = (0, import_core12.getExpandedShorthands)(activeProps), vertical = orientation === "vertical", [itemChildrenCount, setItemChildrenCount] = (0, import_use_controllable_state.useControllableState)({
|
|
12600
12609
|
defaultProp: forceUseItem ? 1 : 0
|
|
12601
|
-
}), isUsingItems = itemChildrenCount > 0, radius = borderRadius ?? (size ? (0, import_core12.getVariableValue)((0, import_core12.getTokens)().radius[size]) - 1 : void 0), disablePassBorderRadius = disablePassBorderRadiusProp ?? radius === void 0, childrenArray =
|
|
12602
|
-
if (!(0,
|
|
12610
|
+
}), isUsingItems = itemChildrenCount > 0, radius = borderRadius ?? (size ? (0, import_core12.getVariableValue)((0, import_core12.getTokens)().radius[size]) - 1 : void 0), disablePassBorderRadius = disablePassBorderRadiusProp ?? radius === void 0, childrenArray = import_react2.Children.toArray(childrenProp), children = isUsingItems ? import_react2.Children.toArray(childrenProp).filter(import_react2.isValidElement) : childrenArray.map((child, i) => {
|
|
12611
|
+
if (!(0, import_react2.isValidElement)(child))
|
|
12603
12612
|
return child;
|
|
12604
12613
|
let disabled = child.props.disabled ?? disabledProp, isFirst = i === 0, isLast = i === childrenArray.length - 1, radiusStyles = disablePassBorderRadius === !0 ? null : getBorderRadius({
|
|
12605
12614
|
isFirst,
|
|
@@ -12620,10 +12629,10 @@ var require_Group_native = __commonJS({
|
|
|
12620
12629
|
space,
|
|
12621
12630
|
children
|
|
12622
12631
|
})
|
|
12623
|
-
), onItemMount =
|
|
12632
|
+
), onItemMount = import_react2.default.useCallback(
|
|
12624
12633
|
() => setItemChildrenCount((prev) => prev + 1),
|
|
12625
12634
|
[]
|
|
12626
|
-
), onItemUnmount =
|
|
12635
|
+
), onItemUnmount = import_react2.default.useCallback(
|
|
12627
12636
|
() => setItemChildrenCount((prev) => prev - 1),
|
|
12628
12637
|
[]
|
|
12629
12638
|
);
|
|
@@ -12659,11 +12668,11 @@ var require_Group_native = __commonJS({
|
|
|
12659
12668
|
var GroupItem = (props) => {
|
|
12660
12669
|
var _a;
|
|
12661
12670
|
let { __scopeGroup, children, forcePlacement } = props, groupItemProps = useGroupItem(
|
|
12662
|
-
{ disabled: (0,
|
|
12671
|
+
{ disabled: (0, import_react2.isValidElement)(children) ? children.props.disabled : void 0 },
|
|
12663
12672
|
forcePlacement,
|
|
12664
12673
|
__scopeGroup
|
|
12665
12674
|
);
|
|
12666
|
-
return (0,
|
|
12675
|
+
return (0, import_react2.isValidElement)(children) ? (0, import_core12.isTamaguiElement)(children) ? import_react2.default.cloneElement(children, groupItemProps) : import_react2.default.cloneElement(children, {
|
|
12667
12676
|
style: {
|
|
12668
12677
|
...(_a = children.props) == null ? void 0 : _a.style,
|
|
12669
12678
|
...groupItemProps
|
|
@@ -12671,7 +12680,7 @@ var require_Group_native = __commonJS({
|
|
|
12671
12680
|
}) : children;
|
|
12672
12681
|
}, useGroupItem = (childrenProps, forcePlacement, __scopeGroup) => {
|
|
12673
12682
|
let treeIndex = (0, import_reforest.useIndex)(), context = useGroupContext("GroupItem", __scopeGroup);
|
|
12674
|
-
if (
|
|
12683
|
+
if (import_react2.default.useEffect(() => (context.onItemMount(), () => {
|
|
12675
12684
|
context.onItemUnmount();
|
|
12676
12685
|
}), []), !treeIndex)
|
|
12677
12686
|
throw Error("<Group.Item/> should only be used within a <Group/>");
|
|
@@ -12714,7 +12723,7 @@ var require_Group_native = __commonJS({
|
|
|
12714
12723
|
borderBottomRightRadius: isLast && disable !== "bottom" && disable !== "end" ? radius : 0
|
|
12715
12724
|
}), cloneElementWithPropOrder = (child, props) => {
|
|
12716
12725
|
let next = (0, import_core12.mergeProps)(child.props, props, (0, import_core12.getConfig)().shorthands);
|
|
12717
|
-
return
|
|
12726
|
+
return import_react2.default.cloneElement({ ...child, props: null }, next);
|
|
12718
12727
|
};
|
|
12719
12728
|
}
|
|
12720
12729
|
});
|
|
@@ -13040,9 +13049,9 @@ var require_useFloating_native = __commonJS({
|
|
|
13040
13049
|
useFloating: () => useFloating2
|
|
13041
13050
|
});
|
|
13042
13051
|
module2.exports = __toCommonJS2(useFloating_exports);
|
|
13043
|
-
var
|
|
13052
|
+
var import_react2 = require("react"), Floating = __toESM2(require_Floating_native()), FloatingOverrideContext2 = (0, import_react2.createContext)(null), useFloating2 = (props) => {
|
|
13044
13053
|
var _a;
|
|
13045
|
-
return (_a = (0,
|
|
13054
|
+
return (_a = (0, import_react2.useContext)(FloatingOverrideContext2) || Floating.useFloating) == null ? void 0 : _a(props);
|
|
13046
13055
|
};
|
|
13047
13056
|
}
|
|
13048
13057
|
});
|
|
@@ -13100,7 +13109,7 @@ var require_Popper_native = __commonJS({
|
|
|
13100
13109
|
usePopperContext: () => usePopperContext
|
|
13101
13110
|
});
|
|
13102
13111
|
module2.exports = __toCommonJS2(Popper_exports);
|
|
13103
|
-
var import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_floating = require_index_native53(), import_get_token2 = require_index_native18(), import_stacks3 = require_index_native20(),
|
|
13112
|
+
var import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_floating = require_index_native53(), import_get_token2 = require_index_native18(), import_stacks3 = require_index_native20(), React2 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), import_jsx_runtime6 = require("react/jsx-runtime"), PopperContext = (0, import_core12.createStyledContext)({}), usePopperContext = () => React2.useContext(PopperContext);
|
|
13104
13113
|
function Popper(props) {
|
|
13105
13114
|
let {
|
|
13106
13115
|
children,
|
|
@@ -13110,11 +13119,11 @@ var require_Popper_native = __commonJS({
|
|
|
13110
13119
|
stayInFrame,
|
|
13111
13120
|
allowFlip,
|
|
13112
13121
|
offset
|
|
13113
|
-
} = props, [isMounted, setIsMounted] =
|
|
13122
|
+
} = props, [isMounted, setIsMounted] = React2.useState(!1);
|
|
13114
13123
|
(0, import_core12.useIsomorphicLayoutEffect)(() => {
|
|
13115
13124
|
setIsMounted(!0);
|
|
13116
13125
|
}, []);
|
|
13117
|
-
let [anchorRef, setAnchorRef] =
|
|
13126
|
+
let [anchorRef, setAnchorRef] = React2.useState(), [arrowEl, setArrow] = React2.useState(null), [arrowSize, setArrowSize] = React2.useState(0), offsetOptions = offset ?? arrowSize, floating = (0, import_floating.useFloating)({
|
|
13118
13127
|
strategy,
|
|
13119
13128
|
placement,
|
|
13120
13129
|
sameScrollView: !1,
|
|
@@ -13139,8 +13148,8 @@ var require_Popper_native = __commonJS({
|
|
|
13139
13148
|
return (0, import_floating.autoUpdate)(refs.reference.current, refs.floating.current, floating.update);
|
|
13140
13149
|
}, [open, floating.update, refs.floating, refs.reference]);
|
|
13141
13150
|
else {
|
|
13142
|
-
let dimensions = (0, import_react_native4.useWindowDimensions)(), [keyboardOpen, setKeyboardOpen] =
|
|
13143
|
-
|
|
13151
|
+
let dimensions = (0, import_react_native4.useWindowDimensions)(), [keyboardOpen, setKeyboardOpen] = React2.useState(!1);
|
|
13152
|
+
React2.useEffect(() => {
|
|
13144
13153
|
let showSubscription = import_react_native4.Keyboard.addListener("keyboardDidShow", () => {
|
|
13145
13154
|
setKeyboardOpen(!0);
|
|
13146
13155
|
}), hideSubscription = import_react_native4.Keyboard.addListener("keyboardDidHide", () => {
|
|
@@ -13165,8 +13174,8 @@ var require_Popper_native = __commonJS({
|
|
|
13165
13174
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperContext.Provider, { ...popperContext, children });
|
|
13166
13175
|
}
|
|
13167
13176
|
var PopperAnchor = import_stacks3.YStack.extractable(
|
|
13168
|
-
|
|
13169
|
-
let { virtualRef, ...anchorProps } = props, { anchorRef, getReferenceProps } = usePopperContext(), ref =
|
|
13177
|
+
React2.forwardRef(function(props, forwardedRef) {
|
|
13178
|
+
let { virtualRef, ...anchorProps } = props, { anchorRef, getReferenceProps } = usePopperContext(), ref = React2.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref, anchorRef);
|
|
13170
13179
|
if (virtualRef)
|
|
13171
13180
|
return null;
|
|
13172
13181
|
let stackProps = {
|
|
@@ -13201,9 +13210,9 @@ var require_Popper_native = __commonJS({
|
|
|
13201
13210
|
defaultVariants: {
|
|
13202
13211
|
unstyled: !1
|
|
13203
13212
|
}
|
|
13204
|
-
}), PopperContent =
|
|
13213
|
+
}), PopperContent = React2.forwardRef(
|
|
13205
13214
|
function(props, forwardedRef) {
|
|
13206
|
-
let { strategy, placement, refs, x, y, getFloatingProps, size, isMounted, update } = usePopperContext(), contentRefs = (0, import_compose_refs.useComposedRefs)(refs.setFloating, forwardedRef), contents =
|
|
13215
|
+
let { strategy, placement, refs, x, y, getFloatingProps, size, isMounted, update } = usePopperContext(), contentRefs = (0, import_compose_refs.useComposedRefs)(refs.setFloating, forwardedRef), contents = React2.useMemo(() => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
13207
13216
|
PopperContentFrame,
|
|
13208
13217
|
{
|
|
13209
13218
|
"data-placement": placement,
|
|
@@ -13331,20 +13340,20 @@ var require_dist2 = __commonJS({
|
|
|
13331
13340
|
function _interopDefault(ex) {
|
|
13332
13341
|
return ex && typeof ex == "object" && "default" in ex ? ex.default : ex;
|
|
13333
13342
|
}
|
|
13334
|
-
var
|
|
13343
|
+
var React2 = require("react"), React__default = _interopDefault(React2);
|
|
13335
13344
|
function Suspender(_ref) {
|
|
13336
|
-
var freeze = _ref.freeze, children = _ref.children, promiseCache =
|
|
13345
|
+
var freeze = _ref.freeze, children = _ref.children, promiseCache = React2.useRef({}).current;
|
|
13337
13346
|
if (freeze && !promiseCache.promise)
|
|
13338
13347
|
throw promiseCache.promise = new Promise(function(resolve) {
|
|
13339
13348
|
promiseCache.resolve = resolve;
|
|
13340
13349
|
}), promiseCache.promise;
|
|
13341
13350
|
if (freeze)
|
|
13342
13351
|
throw promiseCache.promise;
|
|
13343
|
-
return promiseCache.promise && (promiseCache.resolve(), promiseCache.promise = void 0), React__default.createElement(
|
|
13352
|
+
return promiseCache.promise && (promiseCache.resolve(), promiseCache.promise = void 0), React__default.createElement(React2.Fragment, null, children);
|
|
13344
13353
|
}
|
|
13345
13354
|
function Freeze(_ref2) {
|
|
13346
13355
|
var freeze = _ref2.freeze, children = _ref2.children, _ref2$placeholder = _ref2.placeholder, placeholder = _ref2$placeholder === void 0 ? null : _ref2$placeholder;
|
|
13347
|
-
return React__default.createElement(
|
|
13356
|
+
return React__default.createElement(React2.Suspense, {
|
|
13348
13357
|
fallback: placeholder
|
|
13349
13358
|
}, React__default.createElement(Suspender, {
|
|
13350
13359
|
freeze
|
|
@@ -13371,7 +13380,7 @@ var require_useFloatingContext_native = __commonJS({
|
|
|
13371
13380
|
useFloatingContext: () => useFloatingContext
|
|
13372
13381
|
});
|
|
13373
13382
|
module2.exports = __toCommonJS2(useFloatingContext_native_exports);
|
|
13374
|
-
var
|
|
13383
|
+
var import_react2 = require("react"), useFloatingContext = () => (0, import_react2.useCallback)(() => {
|
|
13375
13384
|
}, []);
|
|
13376
13385
|
}
|
|
13377
13386
|
});
|
|
@@ -13407,12 +13416,12 @@ var require_Popover_native = __commonJS({
|
|
|
13407
13416
|
usePopoverContext: () => usePopoverContext
|
|
13408
13417
|
});
|
|
13409
13418
|
module2.exports = __toCommonJS2(Popover_exports);
|
|
13410
|
-
var import_polyfill_dev = require_polyfill_dev(), import_adapt = require_index_native25(), import_animate = require_index_native52(), import_aria_hidden = require_index_native26(), import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_floating = require_index_native53(), import_focus_scope = require_index_native28(), import_popper = require_index_native54(), import_portal2 = require_index_native29(), import_remove_scroll = require_index_native30(), import_sheet = require_index_native34(), import_stacks3 = require_index_native20(), import_use_controllable_state = require_index_native15(),
|
|
13419
|
+
var import_polyfill_dev = require_polyfill_dev(), import_adapt = require_index_native25(), import_animate = require_index_native52(), import_aria_hidden = require_index_native26(), import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_floating = require_index_native53(), import_focus_scope = require_index_native28(), import_popper = require_index_native54(), import_portal2 = require_index_native29(), import_remove_scroll = require_index_native30(), import_sheet = require_index_native34(), import_stacks3 = require_index_native20(), import_use_controllable_state = require_index_native15(), React2 = __toESM2(require("react")), import_react_freeze = require_dist2(), import_react_native4 = require_fake_react_native(), import_useFloatingContext = require_useFloatingContext_native(), import_jsx_runtime6 = require("react/jsx-runtime"), PopoverContext = (0, import_core12.createStyledContext)({}), usePopoverContext = () => React2.useContext(PopoverContext), PopoverAnchor = React2.forwardRef(
|
|
13411
13420
|
function(props, forwardedRef) {
|
|
13412
13421
|
let context = usePopoverContext(), { onCustomAnchorAdd, onCustomAnchorRemove } = context;
|
|
13413
|
-
return
|
|
13422
|
+
return React2.useEffect(() => (onCustomAnchorAdd(), () => onCustomAnchorRemove()), [onCustomAnchorAdd, onCustomAnchorRemove]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperAnchor, { ...props, ref: forwardedRef });
|
|
13414
13423
|
}
|
|
13415
|
-
), PopoverTrigger =
|
|
13424
|
+
), PopoverTrigger = React2.forwardRef(
|
|
13416
13425
|
function(props, forwardedRef) {
|
|
13417
13426
|
let context = usePopoverContext(), composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef), trigger = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
13418
13427
|
import_core12.View,
|
|
@@ -13428,7 +13437,7 @@ var require_Popover_native = __commonJS({
|
|
|
13428
13437
|
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperAnchor, { asChild: !0, children: trigger });
|
|
13429
13438
|
}
|
|
13430
13439
|
), PopoverContent = import_popper.PopperContentFrame.extractable(
|
|
13431
|
-
|
|
13440
|
+
React2.forwardRef(
|
|
13432
13441
|
function(props, forwardedRef) {
|
|
13433
13442
|
let {
|
|
13434
13443
|
allowPinchZoom,
|
|
@@ -13436,8 +13445,8 @@ var require_Popover_native = __commonJS({
|
|
|
13436
13445
|
disableRemoveScroll = !0,
|
|
13437
13446
|
zIndex,
|
|
13438
13447
|
...contentImplProps
|
|
13439
|
-
} = props, context = usePopoverContext(), contentRef =
|
|
13440
|
-
return
|
|
13448
|
+
} = props, context = usePopoverContext(), contentRef = React2.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isRightClickOutsideRef = React2.useRef(!1);
|
|
13449
|
+
return React2.useEffect(() => {
|
|
13441
13450
|
if (!context.open)
|
|
13442
13451
|
return;
|
|
13443
13452
|
let content = contentRef.current;
|
|
@@ -13489,7 +13498,7 @@ var require_Popover_native = __commonJS({
|
|
|
13489
13498
|
contents
|
|
13490
13499
|
] }) });
|
|
13491
13500
|
}
|
|
13492
|
-
var PopoverContentImpl =
|
|
13501
|
+
var PopoverContentImpl = React2.forwardRef(function(props, forwardedRef) {
|
|
13493
13502
|
let {
|
|
13494
13503
|
trapFocus,
|
|
13495
13504
|
onOpenAutoFocus,
|
|
@@ -13504,11 +13513,11 @@ var require_Popover_native = __commonJS({
|
|
|
13504
13513
|
disableRemoveScroll,
|
|
13505
13514
|
freezeContentsWhenHidden,
|
|
13506
13515
|
...contentProps
|
|
13507
|
-
} = props, context = usePopoverContext(), { open, keepChildrenMounted } = context, popperContext = (0, import_popper.usePopperContext)(), [isFullyHidden, setIsFullyHidden] =
|
|
13516
|
+
} = props, context = usePopoverContext(), { open, keepChildrenMounted } = context, popperContext = (0, import_popper.usePopperContext)(), [isFullyHidden, setIsFullyHidden] = React2.useState(!context.open), contents = React2.useMemo(() => import_core12.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: { display: "contents" }, children }) : children, [children]);
|
|
13508
13517
|
if (open && isFullyHidden && setIsFullyHidden(!1), !keepChildrenMounted && isFullyHidden)
|
|
13509
13518
|
return null;
|
|
13510
13519
|
if (context.breakpointActive) {
|
|
13511
|
-
let childrenWithoutScrollView =
|
|
13520
|
+
let childrenWithoutScrollView = React2.Children.toArray(children).map((child) => React2.isValidElement(child) && child.type === import_react_native4.ScrollView ? child.props.children : child), content = childrenWithoutScrollView;
|
|
13512
13521
|
return (import_react_native4.Platform.OS === "android" || import_react_native4.Platform.OS === "ios") && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, { ...popperContext, children: childrenWithoutScrollView })), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, { hostName: `${context.id}PopoverContents`, children: content });
|
|
13513
13522
|
}
|
|
13514
13523
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -13561,9 +13570,9 @@ var require_Popover_native = __commonJS({
|
|
|
13561
13570
|
}
|
|
13562
13571
|
);
|
|
13563
13572
|
}), FreezeToLastContents = (props) => {
|
|
13564
|
-
let last =
|
|
13573
|
+
let last = React2.useRef();
|
|
13565
13574
|
return props.freeze || (last.current = props.children), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_freeze.Freeze, { placeholder: last.current, ...props });
|
|
13566
|
-
}, PopoverClose =
|
|
13575
|
+
}, PopoverClose = React2.forwardRef(
|
|
13567
13576
|
function(props, forwardedRef) {
|
|
13568
13577
|
let context = usePopoverContext();
|
|
13569
13578
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -13579,7 +13588,7 @@ var require_Popover_native = __commonJS({
|
|
|
13579
13588
|
}
|
|
13580
13589
|
);
|
|
13581
13590
|
}
|
|
13582
|
-
), PopoverArrow =
|
|
13591
|
+
), PopoverArrow = React2.forwardRef(
|
|
13583
13592
|
function(props, forwardedRef) {
|
|
13584
13593
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperArrow, { componentName: "PopoverArrow", ...props, ref: forwardedRef });
|
|
13585
13594
|
}
|
|
@@ -13592,16 +13601,16 @@ var require_Popover_native = __commonJS({
|
|
|
13592
13601
|
onOpenChange,
|
|
13593
13602
|
keepChildrenMounted,
|
|
13594
13603
|
...restProps
|
|
13595
|
-
} = props, id =
|
|
13596
|
-
Contents:
|
|
13597
|
-
}), sheetBreakpoint = when, triggerRef =
|
|
13604
|
+
} = props, id = React2.useId(), { when, AdaptProvider } = (0, import_adapt.useAdaptParent)({
|
|
13605
|
+
Contents: React2.useCallback(() => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, { name: `${id}PopoverContents` }), [])
|
|
13606
|
+
}), sheetBreakpoint = when, triggerRef = React2.useRef(null), [hasCustomAnchor, setHasCustomAnchor] = React2.useState(!1), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
13598
13607
|
prop: openProp,
|
|
13599
13608
|
defaultProp: defaultOpen || !1,
|
|
13600
13609
|
onChange: onOpenChange
|
|
13601
13610
|
}), breakpointActive = useSheetBreakpointActive(sheetBreakpoint), floatingContext = (0, import_useFloatingContext.useFloatingContext)({ open, setOpen, breakpointActive }), popoverContext = {
|
|
13602
13611
|
id,
|
|
13603
13612
|
sheetBreakpoint,
|
|
13604
|
-
contentId:
|
|
13613
|
+
contentId: React2.useId(),
|
|
13605
13614
|
triggerRef,
|
|
13606
13615
|
open,
|
|
13607
13616
|
breakpointActive,
|
|
@@ -13610,8 +13619,8 @@ var require_Popover_native = __commonJS({
|
|
|
13610
13619
|
open && breakpointActive || setOpen(!open);
|
|
13611
13620
|
}),
|
|
13612
13621
|
hasCustomAnchor,
|
|
13613
|
-
onCustomAnchorAdd:
|
|
13614
|
-
onCustomAnchorRemove:
|
|
13622
|
+
onCustomAnchorAdd: React2.useCallback(() => setHasCustomAnchor(!0), []),
|
|
13623
|
+
onCustomAnchorRemove: React2.useCallback(() => setHasCustomAnchor(!1), []),
|
|
13615
13624
|
keepChildrenMounted
|
|
13616
13625
|
}, contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.Popper, { stayInFrame: !0, ...restProps, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, { ...popoverContext, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverSheetController, { onOpenChange: setOpen, children }) }) });
|
|
13617
13626
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AdaptProvider, { children: import_core12.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_floating.FloatingOverrideContext.Provider, { value: floatingContext, children: contents }) : contents });
|
|
@@ -13697,7 +13706,7 @@ var require_Progress_native = __commonJS({
|
|
|
13697
13706
|
createProgressScope: () => createProgressScope
|
|
13698
13707
|
});
|
|
13699
13708
|
module2.exports = __toCommonJS2(Progress_exports);
|
|
13700
|
-
var import_core12 = require_index_native10(), import_create_context = require_index_native14(), import_get_token2 = require_index_native18(), import_stacks3 = require_index_native20(),
|
|
13709
|
+
var import_core12 = require_index_native10(), import_create_context = require_index_native14(), import_get_token2 = require_index_native18(), import_stacks3 = require_index_native20(), React2 = __toESM2(require("react")), import_jsx_runtime6 = require("react/jsx-runtime"), 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, {
|
|
13701
13710
|
name: INDICATOR_NAME,
|
|
13702
13711
|
variants: {
|
|
13703
13712
|
unstyled: {
|
|
@@ -13778,7 +13787,7 @@ var require_Progress_native = __commonJS({
|
|
|
13778
13787
|
getValueLabel = defaultGetValueLabel,
|
|
13779
13788
|
size = "$true",
|
|
13780
13789
|
...progressProps
|
|
13781
|
-
} = props, max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX, value = isValidValueNumber(valueProp, max) ? valueProp : null, valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0, [width, setWidth] =
|
|
13790
|
+
} = props, max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX, value = isValidValueNumber(valueProp, max) ? valueProp : null, valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0, [width, setWidth] = React2.useState(0);
|
|
13782
13791
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProgressProvider, { scope: __scopeProgress, value, max, width, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
13783
13792
|
ProgressFrame,
|
|
13784
13793
|
{
|
|
@@ -13849,7 +13858,7 @@ var require_RadioGroup_native = __commonJS({
|
|
|
13849
13858
|
createRadioGroupScope: () => createRadioGroupScope
|
|
13850
13859
|
});
|
|
13851
13860
|
module2.exports = __toCommonJS2(RadioGroup_exports);
|
|
13852
|
-
var import_core12 = require_index_native10(), import_create_context = require_index_native14(), import_focusable2 = require_index_native44(), import_get_token2 = require_index_native18(), import_label = require_index_native45(), import_stacks3 = require_index_native20(), import_use_controllable_state = require_index_native15(), import_use_previous = require_index_native46(),
|
|
13861
|
+
var import_core12 = require_index_native10(), import_create_context = require_index_native14(), import_focusable2 = require_index_native44(), import_get_token2 = require_index_native18(), import_label = require_index_native45(), import_stacks3 = require_index_native20(), import_use_controllable_state = require_index_native15(), import_use_previous = require_index_native46(), React2 = __toESM2(require("react")), import_jsx_runtime6 = require("react/jsx-runtime"), RADIO_GROUP_NAME = "RadioGroup", ARROW_KEYS = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], [createRadioGroupContext, createRadioGroupScope] = (0, import_create_context.createContextScope)(RADIO_GROUP_NAME), [RadioGroupProvider, useRadioGroupContext] = createRadioGroupContext(RADIO_GROUP_NAME), getState = (checked) => checked ? "checked" : "unchecked", RADIO_GROUP_INDICATOR_NAME = "RadioGroupIndicator", RadioIndicatorFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
|
|
13853
13862
|
name: RADIO_GROUP_INDICATOR_NAME,
|
|
13854
13863
|
variants: {
|
|
13855
13864
|
unstyled: {
|
|
@@ -13866,7 +13875,7 @@ var require_RadioGroup_native = __commonJS({
|
|
|
13866
13875
|
unstyled: !1
|
|
13867
13876
|
}
|
|
13868
13877
|
}), RadioIndicator = RadioIndicatorFrame.extractable(
|
|
13869
|
-
|
|
13878
|
+
React2.forwardRef(
|
|
13870
13879
|
(props, forwardedRef) => {
|
|
13871
13880
|
let { __scopeRadioGroupItem, forceMount, disabled, ...indicatorProps } = props, { checked } = useRadioGroupItemContext(
|
|
13872
13881
|
RADIO_GROUP_INDICATOR_NAME,
|
|
@@ -13905,7 +13914,10 @@ var require_RadioGroup_native = __commonJS({
|
|
|
13905
13914
|
},
|
|
13906
13915
|
focusStyle: {
|
|
13907
13916
|
borderColor: "$borderColorHover",
|
|
13908
|
-
backgroundColor: "$backgroundHover"
|
|
13917
|
+
backgroundColor: "$backgroundHover",
|
|
13918
|
+
outlineStyle: "solid",
|
|
13919
|
+
outlineWidth: 2,
|
|
13920
|
+
outlineColor: "$borderColorFocus"
|
|
13909
13921
|
},
|
|
13910
13922
|
pressStyle: {
|
|
13911
13923
|
borderColor: "$borderColorFocus",
|
|
@@ -13929,7 +13941,7 @@ var require_RadioGroup_native = __commonJS({
|
|
|
13929
13941
|
unstyled: !1
|
|
13930
13942
|
}
|
|
13931
13943
|
}), RadioGroupItem = RadioGroupItemFrame.extractable(
|
|
13932
|
-
|
|
13944
|
+
React2.forwardRef(
|
|
13933
13945
|
(props, forwardedRef) => {
|
|
13934
13946
|
let {
|
|
13935
13947
|
__scopeRadioGroup,
|
|
@@ -13945,8 +13957,8 @@ var require_RadioGroup_native = __commonJS({
|
|
|
13945
13957
|
name,
|
|
13946
13958
|
native,
|
|
13947
13959
|
accentColor
|
|
13948
|
-
} = useRadioGroupContext(RADIO_GROUP_ITEM_NAME, __scopeRadioGroup), [button, setButton] =
|
|
13949
|
-
|
|
13960
|
+
} = useRadioGroupContext(RADIO_GROUP_ITEM_NAME, __scopeRadioGroup), [button, setButton] = React2.useState(null), hasConsumerStoppedPropagationRef = React2.useRef(!1), ref = React2.useRef(null), composedRefs = (0, import_core12.useComposedRefs)(forwardedRef, (node) => setButton(node), ref), isArrowKeyPressedRef = React2.useRef(!1), isFormControl = import_core12.isWeb ? button ? !!button.closest("form") : !0 : !1, checked = groupValue === value, labelId = (0, import_label.useLabelContext)(button), labelledBy = ariaLabelledby || labelId;
|
|
13961
|
+
React2.useEffect(() => {
|
|
13950
13962
|
if (import_core12.isWeb) {
|
|
13951
13963
|
let handleKeyDown = (event) => {
|
|
13952
13964
|
ARROW_KEYS.includes(event.key) && (isArrowKeyPressedRef.current = !0);
|
|
@@ -13957,7 +13969,7 @@ var require_RadioGroup_native = __commonJS({
|
|
|
13957
13969
|
document.removeEventListener("keydown", handleKeyDown), document.removeEventListener("keyup", handleKeyUp);
|
|
13958
13970
|
};
|
|
13959
13971
|
}
|
|
13960
|
-
}, []),
|
|
13972
|
+
}, []), React2.useEffect(() => {
|
|
13961
13973
|
if (props.id)
|
|
13962
13974
|
return (0, import_focusable2.registerFocusable)(props.id, {
|
|
13963
13975
|
focusAndSelect: () => {
|
|
@@ -14032,8 +14044,8 @@ var require_RadioGroup_native = __commonJS({
|
|
|
14032
14044
|
}
|
|
14033
14045
|
)
|
|
14034
14046
|
), BubbleInput = (props) => {
|
|
14035
|
-
let { checked, bubbles = !0, control, isHidden, accentColor, ...inputProps } = props, ref =
|
|
14036
|
-
return
|
|
14047
|
+
let { checked, bubbles = !0, control, isHidden, accentColor, ...inputProps } = props, ref = React2.useRef(null), prevChecked = (0, import_use_previous.usePrevious)(checked);
|
|
14048
|
+
return React2.useEffect(() => {
|
|
14037
14049
|
let input = ref.current, inputProto = window.HTMLInputElement.prototype, setChecked = Object.getOwnPropertyDescriptor(
|
|
14038
14050
|
inputProto,
|
|
14039
14051
|
"checked"
|
|
@@ -14082,7 +14094,7 @@ var require_RadioGroup_native = __commonJS({
|
|
|
14082
14094
|
}
|
|
14083
14095
|
}), RadioGroup = (0, import_core12.withStaticProperties)(
|
|
14084
14096
|
RadioGroupFrame.extractable(
|
|
14085
|
-
|
|
14097
|
+
React2.forwardRef(
|
|
14086
14098
|
(props, forwardedRef) => {
|
|
14087
14099
|
let {
|
|
14088
14100
|
__scopeRadioGroup,
|
|
@@ -14345,7 +14357,7 @@ var require_SelectItem_native = __commonJS({
|
|
|
14345
14357
|
useSelectItemContext: () => useSelectItemContext
|
|
14346
14358
|
});
|
|
14347
14359
|
module2.exports = __toCommonJS2(SelectItem_exports);
|
|
14348
|
-
var import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_list_item = require_index_native51(),
|
|
14360
|
+
var import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_list_item = require_index_native51(), React2 = __toESM2(require("react")), import_context = require_context_native(), import_jsx_runtime6 = require("react/jsx-runtime"), ITEM_NAME = "SelectItem", [SelectItemContextProvider, useSelectItemContext] = (0, import_context.createSelectContext)(ITEM_NAME), SelectItem = React2.forwardRef(
|
|
14349
14361
|
(props, forwardedRef) => {
|
|
14350
14362
|
let {
|
|
14351
14363
|
__scopeSelect,
|
|
@@ -14370,13 +14382,13 @@ var require_SelectItem_native = __commonJS({
|
|
|
14370
14382
|
shouldRenderWebNative,
|
|
14371
14383
|
size,
|
|
14372
14384
|
initialValue
|
|
14373
|
-
} = context, [isSelected, setSelected] =
|
|
14374
|
-
|
|
14385
|
+
} = context, [isSelected, setSelected] = React2.useState(initialValue === value), [isActive, setActive] = React2.useState(!1);
|
|
14386
|
+
React2.useEffect(() => activeIndexSubscribe((i) => {
|
|
14375
14387
|
setActive(index === i);
|
|
14376
|
-
}), [index]),
|
|
14388
|
+
}), [index]), React2.useEffect(() => valueSubscribe((val) => {
|
|
14377
14389
|
setSelected(val === value);
|
|
14378
14390
|
}), [value]);
|
|
14379
|
-
let textId =
|
|
14391
|
+
let textId = React2.useId(), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, (node) => {
|
|
14380
14392
|
import_core12.isWeb && node instanceof HTMLElement && listRef && (listRef.current[index] = node);
|
|
14381
14393
|
});
|
|
14382
14394
|
(0, import_core12.useIsomorphicLayoutEffect)(() => {
|
|
@@ -14502,7 +14514,7 @@ var require_SelectTrigger_native = __commonJS({
|
|
|
14502
14514
|
SelectTrigger: () => SelectTrigger
|
|
14503
14515
|
});
|
|
14504
14516
|
module2.exports = __toCommonJS2(SelectTrigger_exports);
|
|
14505
|
-
var import_compose_refs = require_index_native6(), import_list_item = require_index_native51(),
|
|
14517
|
+
var import_compose_refs = require_index_native6(), import_list_item = require_index_native51(), React2 = __toESM2(require("react")), import_context = require_context_native(), import_jsx_runtime6 = require("react/jsx-runtime"), TRIGGER_NAME = "SelectTrigger", SelectTrigger = React2.forwardRef(
|
|
14506
14518
|
function(props, forwardedRef) {
|
|
14507
14519
|
var _a;
|
|
14508
14520
|
let { __scopeSelect, disabled = !1, unstyled = !1, ...triggerProps } = props, context = (0, import_context.useSelectContext)(TRIGGER_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(TRIGGER_NAME, __scopeSelect), composedRefs = (0, import_compose_refs.useComposedRefs)(
|
|
@@ -14569,8 +14581,8 @@ var require_SelectViewport_native = __commonJS({
|
|
|
14569
14581
|
SelectViewport: () => SelectViewport
|
|
14570
14582
|
});
|
|
14571
14583
|
module2.exports = __toCommonJS2(SelectViewport_native_exports);
|
|
14572
|
-
var import_adapt = require_index_native25(), import_core12 = require_index_native10(), import_portal2 = require_index_native29(),
|
|
14573
|
-
let { __scopeSelect, children } = props, context = (0, import_context.useSelectContext)(import_constants.VIEWPORT_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(import_constants.VIEWPORT_NAME, __scopeSelect), themeName = (0, import_core12.useThemeName)(), adaptContext =
|
|
14584
|
+
var import_adapt = require_index_native25(), import_core12 = require_index_native10(), import_portal2 = require_index_native29(), React2 = __toESM2(require("react")), import_constants = require_constants_native3(), import_context = require_context_native(), import_jsx_runtime6 = require("react/jsx-runtime"), SelectViewport = (props) => {
|
|
14585
|
+
let { __scopeSelect, children } = props, context = (0, import_context.useSelectContext)(import_constants.VIEWPORT_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(import_constants.VIEWPORT_NAME, __scopeSelect), themeName = (0, import_core12.useThemeName)(), adaptContext = React2.useContext(import_adapt.AdaptParentContext);
|
|
14574
14586
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, { hostName: `${context.scopeKey}SheetContents`, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, { name: themeName, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
14575
14587
|
import_context.ForwardSelectContext,
|
|
14576
14588
|
{
|
|
@@ -14641,7 +14653,7 @@ var require_Select_native = __commonJS({
|
|
|
14641
14653
|
SelectSeparator: () => SelectSeparator
|
|
14642
14654
|
});
|
|
14643
14655
|
module2.exports = __toCommonJS2(Select_exports);
|
|
14644
|
-
var import_adapt = require_index_native25(), import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_get_token2 = require_index_native18(), import_list_item = require_index_native51(), import_portal2 = require_index_native29(), import_separator = require_index_native58(), import_sheet = require_index_native34(), import_stacks3 = require_index_native20(), import_text2 = require_index_native22(), import_use_controllable_state = require_index_native15(),
|
|
14656
|
+
var import_adapt = require_index_native25(), import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_get_token2 = require_index_native18(), import_list_item = require_index_native51(), import_portal2 = require_index_native29(), import_separator = require_index_native58(), import_sheet = require_index_native34(), import_stacks3 = require_index_native20(), import_text2 = require_index_native22(), import_use_controllable_state = require_index_native15(), React2 = __toESM2(require("react")), import_constants = require_constants_native3(), import_context = require_context_native(), import_SelectContent = require_SelectContent_native(), import_SelectImpl = require_SelectImpl_native(), import_SelectItem = require_SelectItem_native(), import_SelectScrollButton = require_SelectScrollButton_native(), import_SelectTrigger = require_SelectTrigger_native(), import_SelectViewport = require_SelectViewport_native(), import_useSelectBreakpointActive = require_useSelectBreakpointActive_native(), import_jsx_runtime6 = require("react/jsx-runtime"), VALUE_NAME = "SelectValue", SelectValueFrame = (0, import_core12.styled)(import_text2.SizableText, {
|
|
14645
14657
|
name: VALUE_NAME,
|
|
14646
14658
|
userSelect: "none"
|
|
14647
14659
|
}), SelectValue = SelectValueFrame.styleable(function({
|
|
@@ -14666,7 +14678,7 @@ var require_Select_native = __commonJS({
|
|
|
14666
14678
|
);
|
|
14667
14679
|
});
|
|
14668
14680
|
function unwrapSelectItem(selectValueChildren) {
|
|
14669
|
-
return
|
|
14681
|
+
return React2.Children.map(selectValueChildren, (child) => {
|
|
14670
14682
|
var _a, _b, _c;
|
|
14671
14683
|
if (child) {
|
|
14672
14684
|
if (((_b = (_a = child.type) == null ? void 0 : _a.staticConfig) == null ? void 0 : _b.componentName) === ITEM_TEXT_NAME)
|
|
@@ -14696,9 +14708,9 @@ var require_Select_native = __commonJS({
|
|
|
14696
14708
|
defaultVariants: {
|
|
14697
14709
|
unstyled: !1
|
|
14698
14710
|
}
|
|
14699
|
-
}), SelectItemText =
|
|
14711
|
+
}), SelectItemText = React2.forwardRef(
|
|
14700
14712
|
(props, forwardedRef) => {
|
|
14701
|
-
let { __scopeSelect, className, ...itemTextProps } = props, context = (0, import_context.useSelectContext)(ITEM_TEXT_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(ITEM_TEXT_NAME, __scopeSelect), ref =
|
|
14713
|
+
let { __scopeSelect, className, ...itemTextProps } = props, context = (0, import_context.useSelectContext)(ITEM_TEXT_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(ITEM_TEXT_NAME, __scopeSelect), ref = React2.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), itemContext = (0, import_SelectItem.useSelectItemContext)(ITEM_TEXT_NAME, __scopeSelect), contents = React2.useMemo(
|
|
14702
14714
|
() => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
14703
14715
|
SelectItemTextFrame,
|
|
14704
14716
|
{
|
|
@@ -14712,9 +14724,9 @@ var require_Select_native = __commonJS({
|
|
|
14712
14724
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
14713
14725
|
[props, itemParentContext.size, className, itemContext.textId]
|
|
14714
14726
|
);
|
|
14715
|
-
return
|
|
14727
|
+
return React2.useEffect(() => {
|
|
14716
14728
|
itemParentContext.initialValue === itemContext.value && !context.selectedIndex && context.setSelectedItem(contents);
|
|
14717
|
-
}, []),
|
|
14729
|
+
}, []), React2.useEffect(() => itemParentContext.valueSubscribe((val) => {
|
|
14718
14730
|
val === itemContext.value && context.setSelectedItem(contents);
|
|
14719
14731
|
}), [itemContext.value]), itemParentContext.shouldRenderWebNative ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: props.children }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: contents });
|
|
14720
14732
|
}
|
|
@@ -14722,7 +14734,7 @@ var require_Select_native = __commonJS({
|
|
|
14722
14734
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
14723
14735
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator", SelectItemIndicatorFrame = (0, import_core12.styled)(import_stacks3.XStack, {
|
|
14724
14736
|
name: ITEM_TEXT_NAME
|
|
14725
|
-
}), SelectItemIndicator =
|
|
14737
|
+
}), SelectItemIndicator = React2.forwardRef(
|
|
14726
14738
|
(props, forwardedRef) => {
|
|
14727
14739
|
let { __scopeSelect, ...itemIndicatorProps } = props, context = (0, import_context.useSelectItemParentContext)(ITEM_INDICATOR_NAME, __scopeSelect), itemContext = (0, import_SelectItem.useSelectItemContext)(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
14728
14740
|
return context.shouldRenderWebNative ? null : itemContext.isSelected ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemIndicatorFrame, { "aria-hidden": !0, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
@@ -14764,9 +14776,9 @@ var require_Select_native = __commonJS({
|
|
|
14764
14776
|
defaultVariants: {
|
|
14765
14777
|
size: "$2"
|
|
14766
14778
|
}
|
|
14767
|
-
}), SelectGroup =
|
|
14779
|
+
}), SelectGroup = React2.forwardRef(
|
|
14768
14780
|
(props, forwardedRef) => {
|
|
14769
|
-
let { __scopeSelect, ...groupProps } = props, groupId =
|
|
14781
|
+
let { __scopeSelect, ...groupProps } = props, groupId = React2.useId(), context = (0, import_context.useSelectContext)(GROUP_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(GROUP_NAME, __scopeSelect), size = itemParentContext.size ?? "$true", nativeSelectRef = React2.useRef(null), content = function() {
|
|
14770
14782
|
return itemParentContext.shouldRenderWebNative ? (
|
|
14771
14783
|
// @ts-expect-error until we support typing based on tag
|
|
14772
14784
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(NativeSelectFrame, { asChild: !0, size, value: context.value, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -14799,7 +14811,7 @@ var require_Select_native = __commonJS({
|
|
|
14799
14811
|
}
|
|
14800
14812
|
);
|
|
14801
14813
|
SelectGroup.displayName = GROUP_NAME;
|
|
14802
|
-
var LABEL_NAME = "SelectLabel", SelectLabel =
|
|
14814
|
+
var LABEL_NAME = "SelectLabel", SelectLabel = React2.forwardRef(
|
|
14803
14815
|
(props, forwardedRef) => {
|
|
14804
14816
|
let { __scopeSelect, ...labelProps } = props, context = (0, import_context.useSelectItemParentContext)(LABEL_NAME, __scopeSelect), groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
14805
14817
|
return context.shouldRenderWebNative ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -14844,14 +14856,15 @@ var require_Select_native = __commonJS({
|
|
|
14844
14856
|
value: valueProp,
|
|
14845
14857
|
defaultValue,
|
|
14846
14858
|
onValueChange,
|
|
14859
|
+
disablePreventBodyScroll,
|
|
14847
14860
|
size: sizeProp = "$true",
|
|
14848
14861
|
dir
|
|
14849
|
-
} = props, id =
|
|
14850
|
-
Contents:
|
|
14862
|
+
} = props, id = React2.useId(), scopeKey = __scopeSelect ? Object.keys(__scopeSelect)[0] ?? id : id, { when, AdaptProvider } = (0, import_adapt.useAdaptParent)({
|
|
14863
|
+
Contents: React2.useCallback(
|
|
14851
14864
|
() => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, { name: `${scopeKey}SheetContents` }),
|
|
14852
14865
|
[scopeKey]
|
|
14853
14866
|
)
|
|
14854
|
-
}), sheetBreakpoint = when, SelectImpl = (0, import_useSelectBreakpointActive.useSelectBreakpointActive)(sheetBreakpoint) || !import_core12.isWeb ? SelectSheetImpl : import_SelectImpl.SelectInlineImpl, forceUpdate =
|
|
14867
|
+
}), sheetBreakpoint = when, SelectImpl = (0, import_useSelectBreakpointActive.useSelectBreakpointActive)(sheetBreakpoint) || !import_core12.isWeb ? SelectSheetImpl : import_SelectImpl.SelectInlineImpl, forceUpdate = React2.useReducer(() => ({}), {})[1], [selectedItem, setSelectedItem] = React2.useState(null), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
14855
14868
|
prop: openProp,
|
|
14856
14869
|
defaultProp: defaultOpen || !1,
|
|
14857
14870
|
onChange: onOpenChange
|
|
@@ -14861,10 +14874,10 @@ var require_Select_native = __commonJS({
|
|
|
14861
14874
|
onChange: onValueChange,
|
|
14862
14875
|
transition: !0
|
|
14863
14876
|
});
|
|
14864
|
-
|
|
14877
|
+
React2.useEffect(() => {
|
|
14865
14878
|
open && emitValue(value);
|
|
14866
14879
|
}, [open]);
|
|
14867
|
-
let [activeIndex, setActiveIndex] =
|
|
14880
|
+
let [activeIndex, setActiveIndex] = React2.useState(0), [emitValue, valueSubscribe] = useEmitter(), [emitActiveIndex, activeIndexSubscribe] = useEmitter(), selectedIndexRef = React2.useRef(null), activeIndexRef = React2.useRef(null), listContentRef = React2.useRef([]), [selectedIndex, setSelectedIndex] = React2.useState(0), [valueNode, setValueNode] = React2.useState(null);
|
|
14868
14881
|
(0, import_core12.useIsomorphicLayoutEffect)(() => {
|
|
14869
14882
|
selectedIndexRef.current = selectedIndex, activeIndexRef.current = activeIndex;
|
|
14870
14883
|
});
|
|
@@ -14873,16 +14886,16 @@ var require_Select_native = __commonJS({
|
|
|
14873
14886
|
import_context.SelectItemParentProvider,
|
|
14874
14887
|
{
|
|
14875
14888
|
scope: __scopeSelect,
|
|
14876
|
-
initialValue:
|
|
14889
|
+
initialValue: React2.useMemo(() => value, []),
|
|
14877
14890
|
size: sizeProp,
|
|
14878
14891
|
activeIndexSubscribe,
|
|
14879
14892
|
valueSubscribe,
|
|
14880
14893
|
setOpen,
|
|
14881
|
-
onChange:
|
|
14894
|
+
onChange: React2.useCallback((val) => {
|
|
14882
14895
|
setValue(val), emitValue(val);
|
|
14883
14896
|
}, []),
|
|
14884
14897
|
setSelectedIndex,
|
|
14885
|
-
setValueAtIndex:
|
|
14898
|
+
setValueAtIndex: React2.useCallback((index, value2) => {
|
|
14886
14899
|
listContentRef.current[index] = value2;
|
|
14887
14900
|
}, []),
|
|
14888
14901
|
shouldRenderWebNative,
|
|
@@ -14890,6 +14903,7 @@ var require_Select_native = __commonJS({
|
|
|
14890
14903
|
import_context.SelectProvider,
|
|
14891
14904
|
{
|
|
14892
14905
|
scope: __scopeSelect,
|
|
14906
|
+
disablePreventBodyScroll,
|
|
14893
14907
|
dir,
|
|
14894
14908
|
blockSelection: !1,
|
|
14895
14909
|
fallback: !1,
|
|
@@ -14902,7 +14916,7 @@ var require_Select_native = __commonJS({
|
|
|
14902
14916
|
sheetBreakpoint,
|
|
14903
14917
|
activeIndex,
|
|
14904
14918
|
selectedIndex,
|
|
14905
|
-
setActiveIndex:
|
|
14919
|
+
setActiveIndex: React2.useCallback((index) => {
|
|
14906
14920
|
setActiveIndex(index), typeof index == "number" && emitActiveIndex(index);
|
|
14907
14921
|
}, []),
|
|
14908
14922
|
value,
|
|
@@ -14943,11 +14957,11 @@ var require_Select_native = __commonJS({
|
|
|
14943
14957
|
}
|
|
14944
14958
|
);
|
|
14945
14959
|
function useEmitter() {
|
|
14946
|
-
let listeners =
|
|
14960
|
+
let listeners = React2.useRef();
|
|
14947
14961
|
listeners.current || (listeners.current = /* @__PURE__ */ new Set());
|
|
14948
14962
|
let emit = (value) => {
|
|
14949
14963
|
listeners.current.forEach((l) => l(value));
|
|
14950
|
-
}, subscribe =
|
|
14964
|
+
}, subscribe = React2.useCallback((listener) => (listeners.current.add(listener), () => {
|
|
14951
14965
|
listeners.current.delete(listener);
|
|
14952
14966
|
}), []);
|
|
14953
14967
|
return [emit, subscribe];
|
|
@@ -15110,7 +15124,7 @@ var require_SliderImpl_native = __commonJS({
|
|
|
15110
15124
|
SliderImpl: () => SliderImpl
|
|
15111
15125
|
});
|
|
15112
15126
|
module2.exports = __toCommonJS2(SliderImpl_exports);
|
|
15113
|
-
var import_core12 = require_index_native10(), import_get_token2 = require_index_native18(), import_stacks3 = require_index_native20(),
|
|
15127
|
+
var import_core12 = require_index_native10(), import_get_token2 = require_index_native18(), import_stacks3 = require_index_native20(), React2 = __toESM2(require("react")), import_constants = require_constants_native4(), import_jsx_runtime6 = require("react/jsx-runtime"), DirectionalYStack2 = (0, import_core12.styled)(import_stacks3.YStack, {
|
|
15114
15128
|
variants: {
|
|
15115
15129
|
orientation: {
|
|
15116
15130
|
horizontal: {},
|
|
@@ -15135,7 +15149,7 @@ var require_SliderImpl_native = __commonJS({
|
|
|
15135
15149
|
};
|
|
15136
15150
|
}
|
|
15137
15151
|
}
|
|
15138
|
-
}), SliderImpl =
|
|
15152
|
+
}), SliderImpl = React2.forwardRef(
|
|
15139
15153
|
(props, forwardedRef) => {
|
|
15140
15154
|
let {
|
|
15141
15155
|
__scopeSlider,
|
|
@@ -15215,7 +15229,7 @@ var require_Slider_native = __commonJS({
|
|
|
15215
15229
|
Track: () => Track
|
|
15216
15230
|
});
|
|
15217
15231
|
module2.exports = __toCommonJS2(Slider_exports);
|
|
15218
|
-
var import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_get_token2 = require_index_native18(), import_helpers = require_index_native4(), import_stacks3 = require_index_native20(), import_use_controllable_state = require_index_native15(), import_use_direction = require_index_native23(),
|
|
15232
|
+
var import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_get_token2 = require_index_native18(), import_helpers = require_index_native4(), import_stacks3 = require_index_native20(), import_use_controllable_state = require_index_native15(), import_use_direction = require_index_native23(), React2 = __toESM2(require("react")), import_constants = require_constants_native4(), import_helpers2 = require_helpers_native2(), import_SliderImpl = require_SliderImpl_native(), import_jsx_runtime6 = require("react/jsx-runtime"), SliderHorizontal = React2.forwardRef(
|
|
15219
15233
|
(props, forwardedRef) => {
|
|
15220
15234
|
let {
|
|
15221
15235
|
min,
|
|
@@ -15226,7 +15240,7 @@ var require_Slider_native = __commonJS({
|
|
|
15226
15240
|
onStepKeyDown,
|
|
15227
15241
|
onSlideEnd,
|
|
15228
15242
|
...sliderProps
|
|
15229
|
-
} = props, direction = (0, import_use_direction.useDirection)(dir), isDirectionLTR = direction === "ltr", sliderRef =
|
|
15243
|
+
} = props, direction = (0, import_use_direction.useDirection)(dir), isDirectionLTR = direction === "ltr", sliderRef = React2.useRef(null), [state, setState_] = React2.useState(() => ({ size: 0, offset: 0 })), setState = (0, import_core12.createShallowSetState)(setState_);
|
|
15230
15244
|
function getValueFromPointer(pointerPosition) {
|
|
15231
15245
|
let input = [0, state.size];
|
|
15232
15246
|
return (0, import_helpers2.linearScale)(input, isDirectionLTR ? [min, max] : [max, min])(pointerPosition);
|
|
@@ -15280,7 +15294,7 @@ var require_Slider_native = __commonJS({
|
|
|
15280
15294
|
}
|
|
15281
15295
|
);
|
|
15282
15296
|
function useOnDebouncedWindowResize(callback, amt = 200) {
|
|
15283
|
-
|
|
15297
|
+
React2.useEffect(() => {
|
|
15284
15298
|
let last, onResize = () => {
|
|
15285
15299
|
clearTimeout(last), last = setTimeout(callback, amt);
|
|
15286
15300
|
};
|
|
@@ -15289,7 +15303,7 @@ var require_Slider_native = __commonJS({
|
|
|
15289
15303
|
};
|
|
15290
15304
|
}, []);
|
|
15291
15305
|
}
|
|
15292
|
-
var SliderVertical =
|
|
15306
|
+
var SliderVertical = React2.forwardRef(
|
|
15293
15307
|
(props, forwardedRef) => {
|
|
15294
15308
|
let {
|
|
15295
15309
|
min,
|
|
@@ -15299,7 +15313,7 @@ var require_Slider_native = __commonJS({
|
|
|
15299
15313
|
onStepKeyDown,
|
|
15300
15314
|
onSlideEnd,
|
|
15301
15315
|
...sliderProps
|
|
15302
|
-
} = props, [state, setState_] =
|
|
15316
|
+
} = props, [state, setState_] = React2.useState(() => ({ size: 0, offset: 0 })), setState = (0, import_core12.createShallowSetState)(setState_), sliderRef = React2.useRef(null);
|
|
15303
15317
|
function getValueFromPointer(pointerPosition) {
|
|
15304
15318
|
let input = [0, state.size];
|
|
15305
15319
|
return (0, import_helpers2.linearScale)(input, [max, min])(pointerPosition);
|
|
@@ -15367,7 +15381,7 @@ var require_Slider_native = __commonJS({
|
|
|
15367
15381
|
defaultVariants: {
|
|
15368
15382
|
unstyled: !1
|
|
15369
15383
|
}
|
|
15370
|
-
}), SliderTrack =
|
|
15384
|
+
}), SliderTrack = React2.forwardRef(
|
|
15371
15385
|
(props, forwardedRef) => {
|
|
15372
15386
|
let { __scopeSlider, ...trackProps } = props, context = (0, import_constants.useSliderContext)(TRACK_NAME, __scopeSlider);
|
|
15373
15387
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -15388,9 +15402,9 @@ var require_Slider_native = __commonJS({
|
|
|
15388
15402
|
name: "SliderTrackActive",
|
|
15389
15403
|
backgroundColor: "$background",
|
|
15390
15404
|
position: "absolute"
|
|
15391
|
-
}), SliderTrackActive =
|
|
15405
|
+
}), SliderTrackActive = React2.forwardRef(
|
|
15392
15406
|
(props, forwardedRef) => {
|
|
15393
|
-
let { __scopeSlider, ...rangeProps } = props, context = (0, import_constants.useSliderContext)(RANGE_NAME, __scopeSlider), orientation = (0, import_constants.useSliderOrientationContext)(RANGE_NAME, __scopeSlider), ref =
|
|
15407
|
+
let { __scopeSlider, ...rangeProps } = props, context = (0, import_constants.useSliderContext)(RANGE_NAME, __scopeSlider), orientation = (0, import_constants.useSliderOrientationContext)(RANGE_NAME, __scopeSlider), ref = React2.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), valuesCount = context.values.length, percentages = context.values.map(
|
|
15394
15408
|
(value) => (0, import_helpers2.convertValueToPercentage)(value, context.min, context.max)
|
|
15395
15409
|
), offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0, offsetEnd = 100 - Math.max(...percentages);
|
|
15396
15410
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -15448,11 +15462,11 @@ var require_Slider_native = __commonJS({
|
|
|
15448
15462
|
unstyled: !1
|
|
15449
15463
|
}
|
|
15450
15464
|
}), SliderThumb = SliderThumbFrame.styleable(function(props, forwardedRef) {
|
|
15451
|
-
let { __scopeSlider, index, size: sizeProp, ...thumbProps } = props, context = (0, import_constants.useSliderContext)(THUMB_NAME, __scopeSlider), orientation = (0, import_constants.useSliderOrientationContext)(THUMB_NAME, __scopeSlider), [thumb, setThumb] =
|
|
15465
|
+
let { __scopeSlider, index, size: sizeProp, ...thumbProps } = props, context = (0, import_constants.useSliderContext)(THUMB_NAME, __scopeSlider), orientation = (0, import_constants.useSliderOrientationContext)(THUMB_NAME, __scopeSlider), [thumb, setThumb] = React2.useState(null), composedRefs = (0, import_compose_refs.useComposedRefs)(
|
|
15452
15466
|
forwardedRef,
|
|
15453
15467
|
(node) => setThumb(node)
|
|
15454
|
-
), value = context.values[index], percent = value === void 0 ? 0 : (0, import_helpers2.convertValueToPercentage)(value, context.min, context.max), label = (0, import_helpers2.getLabel)(index, context.values.length), sizeIn = sizeProp ?? context.size ?? "$true", [size, setSize] =
|
|
15455
|
-
|
|
15468
|
+
), value = context.values[index], percent = value === void 0 ? 0 : (0, import_helpers2.convertValueToPercentage)(value, context.min, context.max), label = (0, import_helpers2.getLabel)(index, context.values.length), sizeIn = sizeProp ?? context.size ?? "$true", [size, setSize] = React2.useState(() => (0, import_core12.getVariableValue)(getThumbSize(sizeIn).width)), thumbInBoundsOffset = size ? (0, import_helpers2.getThumbInBoundsOffset)(size, percent, orientation.direction) : 0;
|
|
15469
|
+
React2.useEffect(() => {
|
|
15456
15470
|
if (thumb)
|
|
15457
15471
|
return context.thumbs.add(thumb), () => {
|
|
15458
15472
|
context.thumbs.delete(thumb);
|
|
@@ -15501,7 +15515,7 @@ var require_Slider_native = __commonJS({
|
|
|
15501
15515
|
})
|
|
15502
15516
|
}
|
|
15503
15517
|
);
|
|
15504
|
-
}), SliderComponent =
|
|
15518
|
+
}), SliderComponent = React2.forwardRef(
|
|
15505
15519
|
(props, forwardedRef) => {
|
|
15506
15520
|
let {
|
|
15507
15521
|
name,
|
|
@@ -15520,7 +15534,7 @@ var require_Slider_native = __commonJS({
|
|
|
15520
15534
|
onSlideMove,
|
|
15521
15535
|
onSlideStart,
|
|
15522
15536
|
...sliderProps
|
|
15523
|
-
} = props, sliderRef =
|
|
15537
|
+
} = props, sliderRef = React2.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(sliderRef, forwardedRef), thumbRefs = React2.useRef(/* @__PURE__ */ new Set()), valueIndexToChangeRef = React2.useRef(0), isHorizontal = orientation === "horizontal", [values = [], setValues] = (0, import_use_controllable_state.useControllableState)({
|
|
15524
15538
|
prop: value,
|
|
15525
15539
|
defaultProp: defaultValue,
|
|
15526
15540
|
transition: !0,
|
|
@@ -15529,7 +15543,7 @@ var require_Slider_native = __commonJS({
|
|
|
15529
15543
|
import_core12.isWeb && ((_a = [...thumbRefs.current][valueIndexToChangeRef.current]) == null || _a.focus()), onValueChange(value2);
|
|
15530
15544
|
}
|
|
15531
15545
|
});
|
|
15532
|
-
import_core12.isWeb &&
|
|
15546
|
+
import_core12.isWeb && React2.useEffect(() => {
|
|
15533
15547
|
let node = sliderRef.current;
|
|
15534
15548
|
if (!node)
|
|
15535
15549
|
return;
|
|
@@ -15654,7 +15668,7 @@ var require_createSwitch_native = __commonJS({
|
|
|
15654
15668
|
createSwitch: () => createSwitch
|
|
15655
15669
|
});
|
|
15656
15670
|
module2.exports = __toCommonJS2(createSwitch_exports);
|
|
15657
|
-
var import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_focusable2 = require_index_native44(), import_get_token2 = require_index_native18(), import_label = require_index_native45(), import_use_controllable_state = require_index_native15(), import_use_previous = require_index_native46(),
|
|
15671
|
+
var import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_focusable2 = require_index_native44(), import_get_token2 = require_index_native18(), import_label = require_index_native45(), import_use_controllable_state = require_index_native15(), import_use_previous = require_index_native46(), React2 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), import_jsx_runtime6 = (
|
|
15658
15672
|
// @ts-ignore
|
|
15659
15673
|
require("react/jsx-runtime")
|
|
15660
15674
|
), SwitchContext = (0, import_core12.createStyledContext)({
|
|
@@ -15666,7 +15680,7 @@ var require_createSwitch_native = __commonJS({
|
|
|
15666
15680
|
});
|
|
15667
15681
|
function createSwitch({ Frame, Thumb, acceptsUnstyled }) {
|
|
15668
15682
|
let SwitchThumb = Thumb.styleable(function(props, forwardedRef) {
|
|
15669
|
-
let { size: sizeProp, ...thumbProps } = props, { disabled, checked, unstyled, frameWidth } =
|
|
15683
|
+
let { size: sizeProp, ...thumbProps } = props, { disabled, checked, unstyled, frameWidth } = React2.useContext(SwitchContext), [thumbWidth, setThumbWidth] = React2.useState(0), initialChecked = React2.useRef(checked).current, distance = frameWidth - thumbWidth;
|
|
15670
15684
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
15671
15685
|
Thumb,
|
|
15672
15686
|
{
|
|
@@ -15687,8 +15701,8 @@ var require_createSwitch_native = __commonJS({
|
|
|
15687
15701
|
}
|
|
15688
15702
|
);
|
|
15689
15703
|
}), SwitchComponent = Frame.extractable(
|
|
15690
|
-
|
|
15691
|
-
let styledContext =
|
|
15704
|
+
React2.forwardRef(function(propsIn, forwardedRef) {
|
|
15705
|
+
let styledContext = React2.useContext(SwitchContext), props = (0, import_core12.useProps)(propsIn), {
|
|
15692
15706
|
labeledBy: ariaLabelledby,
|
|
15693
15707
|
name,
|
|
15694
15708
|
checked: checkedProp,
|
|
@@ -15707,7 +15721,7 @@ var require_createSwitch_native = __commonJS({
|
|
|
15707
15721
|
for (let key in switchProps)
|
|
15708
15722
|
(key === "borderWidth" || key === "borderLeftWidth") && (_ = switchProps[key]);
|
|
15709
15723
|
return acceptsUnstyled && _ === void 0 && unstyled === !1 && (_ = 2), typeof _ == "string" && (_ = (0, import_core12.getVariableValue)((0, import_get_token2.getSize)(_))), +_;
|
|
15710
|
-
})(), native = Array.isArray(nativeProp) ? nativeProp : [nativeProp], shouldRenderMobileNative = !import_core12.isWeb && nativeProp === !0 || !import_core12.isWeb && native.includes("mobile") || native.includes("android") && import_react_native4.Platform.OS === "android" || native.includes("ios") && import_react_native4.Platform.OS === "ios", [button, setButton] =
|
|
15724
|
+
})(), native = Array.isArray(nativeProp) ? nativeProp : [nativeProp], shouldRenderMobileNative = !import_core12.isWeb && nativeProp === !0 || !import_core12.isWeb && native.includes("mobile") || native.includes("android") && import_react_native4.Platform.OS === "android" || native.includes("ios") && import_react_native4.Platform.OS === "ios", [button, setButton] = React2.useState(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, (node) => setButton(node)), labelId = (0, import_label.useLabelContext)(button), labelledBy = ariaLabelledby || labelId, hasConsumerStoppedPropagationRef = React2.useRef(!1), isFormControl = import_core12.isWeb ? button ? !!button.closest("form") : !0 : !1, [frameWidth, setFrameWidth] = React2.useState(0), [checked = !1, setChecked] = (0, import_use_controllable_state.useControllableState)({
|
|
15711
15725
|
prop: checkedProp,
|
|
15712
15726
|
defaultProp: defaultChecked || !1,
|
|
15713
15727
|
onChange: onCheckedChange,
|
|
@@ -15720,7 +15734,7 @@ var require_createSwitch_native = __commonJS({
|
|
|
15720
15734
|
onValueChange: onCheckedChange,
|
|
15721
15735
|
...nativeProps
|
|
15722
15736
|
}
|
|
15723
|
-
) : (import_core12.isWeb ||
|
|
15737
|
+
) : (import_core12.isWeb || React2.useEffect(() => {
|
|
15724
15738
|
if (props.id)
|
|
15725
15739
|
return (0, import_focusable2.registerFocusable)(props.id, {
|
|
15726
15740
|
focus: () => {
|
|
@@ -15776,8 +15790,8 @@ var require_createSwitch_native = __commonJS({
|
|
|
15776
15790
|
] }));
|
|
15777
15791
|
})
|
|
15778
15792
|
), BubbleInput = (props) => {
|
|
15779
|
-
let { control, checked, bubbles = !0, ...inputProps } = props, ref =
|
|
15780
|
-
return
|
|
15793
|
+
let { control, checked, bubbles = !0, ...inputProps } = props, ref = React2.useRef(null), prevChecked = (0, import_use_previous.usePrevious)(checked);
|
|
15794
|
+
return React2.useEffect(() => {
|
|
15781
15795
|
let input = ref.current, inputProto = window.HTMLInputElement.prototype, setChecked = Object.getOwnPropertyDescriptor(
|
|
15782
15796
|
inputProto,
|
|
15783
15797
|
"checked"
|
|
@@ -15949,12 +15963,12 @@ var require_RovingFocusGroup_native = __commonJS({
|
|
|
15949
15963
|
createRovingFocusGroupScope: () => createRovingFocusGroupScope
|
|
15950
15964
|
});
|
|
15951
15965
|
module2.exports = __toCommonJS2(RovingFocusGroup_native_exports);
|
|
15952
|
-
var import_core12 = require_index_native10(),
|
|
15966
|
+
var import_core12 = require_index_native10(), import_react2 = __toESM2(require("react")), import_jsx_runtime6 = require("react/jsx-runtime"), ITEM_NAME = "RovingFocusGroupItem", RovingFocusGroupItem = import_react2.default.forwardRef(
|
|
15953
15967
|
({ children, ...props }, _ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Stack, { ...props, children })
|
|
15954
15968
|
);
|
|
15955
15969
|
RovingFocusGroupItem.displayName = ITEM_NAME;
|
|
15956
15970
|
var GROUP_NAME = "RovingFocusGroup", RovingFocusGroup = (0, import_core12.withStaticProperties)(
|
|
15957
|
-
|
|
15971
|
+
import_react2.default.forwardRef(({ children, ...props }, _ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Stack, { ...props, children })),
|
|
15958
15972
|
{
|
|
15959
15973
|
Item: RovingFocusGroupItem
|
|
15960
15974
|
}
|
|
@@ -16003,11 +16017,11 @@ var require_Tabs_native = __commonJS({
|
|
|
16003
16017
|
Tabs: () => Tabs
|
|
16004
16018
|
});
|
|
16005
16019
|
module2.exports = __toCommonJS2(Tabs_exports);
|
|
16006
|
-
var import_create_context = require_index_native14(), import_get_button_sized2 = require_index_native19(), import_group = require_index_native50(), import_roving_focus = require_index_native62(), import_stacks3 = require_index_native20(), import_use_controllable_state = require_index_native15(), import_use_direction = require_index_native23(), import_web = require_index_native9(),
|
|
16020
|
+
var import_create_context = require_index_native14(), import_get_button_sized2 = require_index_native19(), import_group = require_index_native50(), import_roving_focus = require_index_native62(), import_stacks3 = require_index_native20(), import_use_controllable_state = require_index_native15(), import_use_direction = require_index_native23(), import_web = require_index_native9(), React2 = __toESM2(require("react")), import_jsx_runtime6 = require("react/jsx-runtime"), TAB_LIST_NAME = "TabsList", TabsListFrame = (0, import_web.styled)(import_group.Group, {
|
|
16007
16021
|
name: TAB_LIST_NAME,
|
|
16008
16022
|
focusable: !0
|
|
16009
16023
|
}), TabsList = TabsListFrame.extractable(
|
|
16010
|
-
|
|
16024
|
+
React2.forwardRef(
|
|
16011
16025
|
(props, forwardedRef) => {
|
|
16012
16026
|
let { __scopeTabs, loop = !0, children, ...listProps } = props, context = useTabsContext(TAB_LIST_NAME, __scopeTabs), rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
|
|
16013
16027
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -16072,7 +16086,7 @@ var require_Tabs_native = __commonJS({
|
|
|
16072
16086
|
unstyled: !1
|
|
16073
16087
|
}
|
|
16074
16088
|
}), TabsTrigger = TabsTriggerFrame.extractable(
|
|
16075
|
-
|
|
16089
|
+
React2.forwardRef(
|
|
16076
16090
|
(props, forwardedRef) => {
|
|
16077
16091
|
let {
|
|
16078
16092
|
__scopeTabs,
|
|
@@ -16080,8 +16094,8 @@ var require_Tabs_native = __commonJS({
|
|
|
16080
16094
|
disabled = !1,
|
|
16081
16095
|
onInteraction,
|
|
16082
16096
|
...triggerProps
|
|
16083
|
-
} = props, context = useTabsContext(TRIGGER_NAME, __scopeTabs), rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs), triggerId = makeTriggerId(context.baseId, value), contentId = makeContentId(context.baseId, value), isSelected = value === context.value, [layout, setLayout] =
|
|
16084
|
-
return
|
|
16097
|
+
} = props, context = useTabsContext(TRIGGER_NAME, __scopeTabs), rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs), triggerId = makeTriggerId(context.baseId, value), contentId = makeContentId(context.baseId, value), isSelected = value === context.value, [layout, setLayout] = React2.useState(null), triggerRef = React2.useRef(null), groupItemProps = (0, import_group.useGroupItem)({ disabled });
|
|
16098
|
+
return React2.useEffect(() => (context.registerTrigger(), () => context.unregisterTrigger()), []), React2.useEffect(() => {
|
|
16085
16099
|
if (!triggerRef.current || !import_web.isWeb)
|
|
16086
16100
|
return;
|
|
16087
16101
|
function getTriggerSize() {
|
|
@@ -16097,7 +16111,7 @@ var require_Tabs_native = __commonJS({
|
|
|
16097
16111
|
return observer.observe(triggerRef.current), () => {
|
|
16098
16112
|
triggerRef.current && observer.unobserve(triggerRef.current);
|
|
16099
16113
|
};
|
|
16100
|
-
}, [context.triggersCount]),
|
|
16114
|
+
}, [context.triggersCount]), React2.useEffect(() => {
|
|
16101
16115
|
isSelected && layout && (onInteraction == null || onInteraction("select", layout));
|
|
16102
16116
|
}, [isSelected, value, layout]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_web.Theme, { name: isSelected ? "active" : null, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
16103
16117
|
import_roving_focus.RovingFocusGroup.Item,
|
|
@@ -16161,7 +16175,7 @@ var require_Tabs_native = __commonJS({
|
|
|
16161
16175
|
var CONTENT_NAME = "TabsContent", TabsContentFrame = (0, import_web.styled)(import_stacks3.ThemeableStack, {
|
|
16162
16176
|
name: CONTENT_NAME
|
|
16163
16177
|
}), TabsContent = TabsContentFrame.extractable(
|
|
16164
|
-
|
|
16178
|
+
React2.forwardRef(
|
|
16165
16179
|
(props, forwardedRef) => {
|
|
16166
16180
|
let { __scopeTabs, value, forceMount, children, ...contentProps } = props, context = useTabsContext(CONTENT_NAME, __scopeTabs), isSelected = value === context.value, show = forceMount || isSelected, triggerId = makeTriggerId(context.baseId, value), contentId = makeContentId(context.baseId, value);
|
|
16167
16181
|
return show ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -16190,7 +16204,7 @@ var require_Tabs_native = __commonJS({
|
|
|
16190
16204
|
name: TABS_NAME
|
|
16191
16205
|
}), Tabs = (0, import_web.withStaticProperties)(
|
|
16192
16206
|
TabsFrame.extractable(
|
|
16193
|
-
|
|
16207
|
+
React2.forwardRef(
|
|
16194
16208
|
(props, forwardedRef) => {
|
|
16195
16209
|
let {
|
|
16196
16210
|
__scopeTabs,
|
|
@@ -16206,12 +16220,12 @@ var require_Tabs_native = __commonJS({
|
|
|
16206
16220
|
prop: valueProp,
|
|
16207
16221
|
onChange: onValueChange,
|
|
16208
16222
|
defaultProp: defaultValue ?? ""
|
|
16209
|
-
}), [triggersCount, setTriggersCount] =
|
|
16223
|
+
}), [triggersCount, setTriggersCount] = React2.useState(0), registerTrigger = (0, import_web.useEvent)(() => setTriggersCount((v) => v + 1)), unregisterTrigger = (0, import_web.useEvent)(() => setTriggersCount((v) => v - 1));
|
|
16210
16224
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
16211
16225
|
TabsProvider,
|
|
16212
16226
|
{
|
|
16213
16227
|
scope: __scopeTabs,
|
|
16214
|
-
baseId:
|
|
16228
|
+
baseId: React2.useId(),
|
|
16215
16229
|
value,
|
|
16216
16230
|
onChange: setValue,
|
|
16217
16231
|
orientation,
|
|
@@ -16288,7 +16302,7 @@ var require_mutateTheme_native = __commonJS({
|
|
|
16288
16302
|
mutateThemes: () => mutateThemes2
|
|
16289
16303
|
});
|
|
16290
16304
|
module2.exports = __toCommonJS2(mutateTheme_exports);
|
|
16291
|
-
var import_constants = require_index_native2(), import_web = require_index_native9(),
|
|
16305
|
+
var import_constants = require_index_native2(), import_web = require_index_native9(), import_react2 = require("react");
|
|
16292
16306
|
function mutateThemes2({
|
|
16293
16307
|
themes,
|
|
16294
16308
|
batch,
|
|
@@ -16309,7 +16323,7 @@ var require_mutateTheme_native = __commonJS({
|
|
|
16309
16323
|
res && (allThemesProxied[name] = res.theme, allThemesRaw[name] = res.themeRaw);
|
|
16310
16324
|
}
|
|
16311
16325
|
let cssRules = insertCSS ? insertThemeCSS(allThemesRaw, batch) : [];
|
|
16312
|
-
return (0,
|
|
16326
|
+
return (0, import_react2.startTransition)(() => {
|
|
16313
16327
|
for (let themeName in allThemesProxied) {
|
|
16314
16328
|
let theme = allThemesProxied[themeName];
|
|
16315
16329
|
updateThemeConfig(themeName, theme), notifyThemeManagersOfUpdate(themeName, theme);
|
|
@@ -16486,7 +16500,7 @@ var require_Toggle_native = __commonJS({
|
|
|
16486
16500
|
ToggleFrame: () => ToggleFrame
|
|
16487
16501
|
});
|
|
16488
16502
|
module2.exports = __toCommonJS2(Toggle_exports);
|
|
16489
|
-
var import_stacks3 = require_index_native20(), import_use_controllable_state = require_index_native15(), import_web = require_index_native9(),
|
|
16503
|
+
var import_stacks3 = require_index_native20(), import_use_controllable_state = require_index_native15(), import_web = require_index_native9(), React2 = __toESM2(require("react")), import_jsx_runtime6 = require("react/jsx-runtime"), NAME = "Toggle", ToggleFrame = (0, import_web.styled)(import_stacks3.ThemeableStack, {
|
|
16490
16504
|
name: NAME,
|
|
16491
16505
|
tag: "button",
|
|
16492
16506
|
variants: {
|
|
@@ -16541,7 +16555,7 @@ var require_Toggle_native = __commonJS({
|
|
|
16541
16555
|
unstyled: !1
|
|
16542
16556
|
}
|
|
16543
16557
|
}), Toggle = ToggleFrame.extractable(
|
|
16544
|
-
|
|
16558
|
+
React2.forwardRef((props, forwardedRef) => {
|
|
16545
16559
|
let {
|
|
16546
16560
|
pressed: pressedProp,
|
|
16547
16561
|
defaultPressed = !1,
|
|
@@ -16597,11 +16611,11 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
16597
16611
|
createToggleGroupScope: () => createToggleGroupScope
|
|
16598
16612
|
});
|
|
16599
16613
|
module2.exports = __toCommonJS2(ToggleGroup_exports);
|
|
16600
|
-
var import_create_context = require_index_native14(), import_focusable2 = require_index_native44(), import_font_size = require_index_native40(), import_get_token2 = require_index_native18(), import_group = require_index_native50(), import_helpers_tamagui = require_index_native41(), import_roving_focus = require_index_native62(), import_use_controllable_state = require_index_native15(), import_use_direction = require_index_native23(), import_web = require_index_native9(),
|
|
16614
|
+
var import_create_context = require_index_native14(), import_focusable2 = require_index_native44(), import_font_size = require_index_native40(), import_get_token2 = require_index_native18(), import_group = require_index_native50(), import_helpers_tamagui = require_index_native41(), import_roving_focus = require_index_native62(), import_use_controllable_state = require_index_native15(), import_use_direction = require_index_native23(), import_web = require_index_native9(), import_react2 = __toESM2(require("react")), import_Toggle = require_Toggle_native(), import_jsx_runtime6 = require("react/jsx-runtime"), TOGGLE_GROUP_NAME = "ToggleGroup", [createToggleGroupContext, createToggleGroupScope] = (0, import_create_context.createContextScope)(
|
|
16601
16615
|
TOGGLE_GROUP_NAME,
|
|
16602
16616
|
[import_roving_focus.createRovingFocusGroupScope]
|
|
16603
16617
|
), TOGGLE_GROUP_ITEM_NAME = "ToggleGroupItem", [createToggleGroupItemContext, createToggleGroupItemScope] = (0, import_create_context.createContextScope)(TOGGLE_GROUP_ITEM_NAME), [ToggleGroupItemProvider, useToggleGroupItemContext] = createToggleGroupContext(TOGGLE_GROUP_NAME), useToggleGroupItemScope = createToggleGroupItemScope(), ToggleGroupItem = import_Toggle.ToggleFrame.extractable(
|
|
16604
|
-
|
|
16618
|
+
import_react2.default.forwardRef(
|
|
16605
16619
|
(props, forwardedRef) => {
|
|
16606
16620
|
let valueContext = useToggleGroupValueContext(
|
|
16607
16621
|
TOGGLE_GROUP_ITEM_NAME,
|
|
@@ -16609,13 +16623,13 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
16609
16623
|
), context = useToggleGroupContext(
|
|
16610
16624
|
TOGGLE_GROUP_ITEM_NAME,
|
|
16611
16625
|
props.__scopeToggleGroup
|
|
16612
|
-
), __scopeToggleGroup = props.__scopeToggleGroup, rovingFocusGroupScope = useRovingFocusGroupScope(props.__scopeToggleGroup), pressed = valueContext.value.includes(props.value), disabled = context.disabled || props.disabled || !1, ref =
|
|
16626
|
+
), __scopeToggleGroup = props.__scopeToggleGroup, rovingFocusGroupScope = useRovingFocusGroupScope(props.__scopeToggleGroup), pressed = valueContext.value.includes(props.value), disabled = context.disabled || props.disabled || !1, ref = import_react2.default.useRef(null), groupItemProps = (0, import_group.useGroupItem)({ disabled }), size = props.size ?? context.size, sizeProps = props.unstyled ? {} : {
|
|
16613
16627
|
width: void 0,
|
|
16614
16628
|
height: void 0,
|
|
16615
16629
|
padding: (0, import_web.getVariableValue)(size) * 0.6
|
|
16616
16630
|
};
|
|
16617
16631
|
props.unstyled || (props.orientation === "horizontal" ? sizeProps.height = (0, import_web.getVariableValue)(size) * 2.4 : sizeProps.width = (0, import_web.getVariableValue)(size) * 2.4);
|
|
16618
|
-
let iconSize = (typeof size == "number" ? size * 0.7 : (0, import_font_size.getFontSize)(size)) * 1.2, theme = (0, import_web.useTheme)(), getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({ size: iconSize, color: theme.color }), children =
|
|
16632
|
+
let iconSize = (typeof size == "number" ? size * 0.7 : (0, import_font_size.getFontSize)(size)) * 1.2, theme = (0, import_web.useTheme)(), getThemedIcon = (0, import_helpers_tamagui.useGetThemedIcon)({ size: iconSize, color: theme.color }), children = import_react2.default.Children.toArray(props.children).map((child) => props.disablePassStyles || !import_react2.default.isValidElement(child) ? child : getThemedIcon(child)), commonProps = { ...props, pressed, disabled, ...sizeProps, children };
|
|
16619
16633
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ToggleGroupItemProvider, { scope: __scopeToggleGroup, children: context.rovingFocus ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
16620
16634
|
import_roving_focus.RovingFocusGroup.Item,
|
|
16621
16635
|
{
|
|
@@ -16656,7 +16670,7 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
16656
16670
|
);
|
|
16657
16671
|
ToggleGroupItem.displayName = TOGGLE_GROUP_ITEM_NAME;
|
|
16658
16672
|
var ToggleGroupItemImpl = import_Toggle.ToggleFrame.extractable(
|
|
16659
|
-
|
|
16673
|
+
import_react2.default.forwardRef(
|
|
16660
16674
|
(props, forwardedRef) => {
|
|
16661
16675
|
let { __scopeToggleGroup, value, ...itemProps } = props, valueContext = useToggleGroupValueContext(
|
|
16662
16676
|
TOGGLE_GROUP_ITEM_NAME,
|
|
@@ -16678,9 +16692,9 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
16678
16692
|
}
|
|
16679
16693
|
)
|
|
16680
16694
|
), useRovingFocusGroupScope = (0, import_roving_focus.createRovingFocusGroupScope)(), ToggleGroup = (0, import_web.withStaticProperties)(
|
|
16681
|
-
|
|
16695
|
+
import_react2.default.forwardRef((props, forwardedRef) => {
|
|
16682
16696
|
let { type, ...toggleGroupProps } = props;
|
|
16683
|
-
if (import_web.isWeb ||
|
|
16697
|
+
if (import_web.isWeb || import_react2.default.useEffect(() => {
|
|
16684
16698
|
if (props.id)
|
|
16685
16699
|
return (0, import_focusable2.registerFocusable)(props.id, {
|
|
16686
16700
|
// TODO: would be nice to focus on the first child later - could be done with reforest
|
|
@@ -16699,7 +16713,7 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
16699
16713
|
}
|
|
16700
16714
|
);
|
|
16701
16715
|
ToggleGroup.displayName = TOGGLE_GROUP_NAME;
|
|
16702
|
-
var [ToggleGroupValueProvider, useToggleGroupValueContext] = createToggleGroupContext(TOGGLE_GROUP_NAME), ToggleGroupImplSingle =
|
|
16716
|
+
var [ToggleGroupValueProvider, useToggleGroupValueContext] = createToggleGroupContext(TOGGLE_GROUP_NAME), ToggleGroupImplSingle = import_react2.default.forwardRef((props, forwardedRef) => {
|
|
16703
16717
|
let {
|
|
16704
16718
|
value: valueProp,
|
|
16705
16719
|
defaultValue,
|
|
@@ -16720,14 +16734,14 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
16720
16734
|
value: value ? [value] : [],
|
|
16721
16735
|
defaultValue: value,
|
|
16722
16736
|
onItemActivate: setValue,
|
|
16723
|
-
onItemDeactivate:
|
|
16737
|
+
onItemDeactivate: import_react2.default.useCallback(
|
|
16724
16738
|
() => disableDeactivation ? null : setValue(""),
|
|
16725
16739
|
[setValue, disableDeactivation]
|
|
16726
16740
|
),
|
|
16727
16741
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ToggleGroupImpl, { ...toggleGroupSingleProps, ref: forwardedRef })
|
|
16728
16742
|
}
|
|
16729
16743
|
);
|
|
16730
|
-
}), ToggleGroupImplMultiple =
|
|
16744
|
+
}), ToggleGroupImplMultiple = import_react2.default.forwardRef((props, forwardedRef) => {
|
|
16731
16745
|
let {
|
|
16732
16746
|
value: valueProp,
|
|
16733
16747
|
defaultValue,
|
|
@@ -16738,10 +16752,10 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
16738
16752
|
prop: valueProp,
|
|
16739
16753
|
defaultProp: defaultValue,
|
|
16740
16754
|
onChange: onValueChange
|
|
16741
|
-
}), handleButtonActivate =
|
|
16755
|
+
}), handleButtonActivate = import_react2.default.useCallback(
|
|
16742
16756
|
(itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]),
|
|
16743
16757
|
[setValue]
|
|
16744
|
-
), handleButtonDeactivate =
|
|
16758
|
+
), handleButtonDeactivate = import_react2.default.useCallback(
|
|
16745
16759
|
(itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)),
|
|
16746
16760
|
[setValue]
|
|
16747
16761
|
);
|
|
@@ -16782,7 +16796,7 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
16782
16796
|
unstyled: !1
|
|
16783
16797
|
}
|
|
16784
16798
|
}), ToggleGroupImpl = ToggleGroupImplElementFrame.extractable(
|
|
16785
|
-
|
|
16799
|
+
import_react2.default.forwardRef(
|
|
16786
16800
|
(props, forwardedRef) => {
|
|
16787
16801
|
let {
|
|
16788
16802
|
__scopeToggleGroup,
|
|
@@ -16949,7 +16963,7 @@ var require_index_native67 = __commonJS({
|
|
|
16949
16963
|
useDebounceValue: () => useDebounceValue
|
|
16950
16964
|
});
|
|
16951
16965
|
module2.exports = __toCommonJS2(src_exports2);
|
|
16952
|
-
var
|
|
16966
|
+
var import_react2 = require("react");
|
|
16953
16967
|
function debounce(func, wait, leading) {
|
|
16954
16968
|
let timeout, isCancelled = !1;
|
|
16955
16969
|
function debounced() {
|
|
@@ -16965,15 +16979,15 @@ var require_index_native67 = __commonJS({
|
|
|
16965
16979
|
}
|
|
16966
16980
|
var defaultOpts = { leading: !1 };
|
|
16967
16981
|
function useDebounce(fn, wait, options = defaultOpts, mountArgs = []) {
|
|
16968
|
-
let dbEffect = (0,
|
|
16969
|
-
return (0,
|
|
16982
|
+
let dbEffect = (0, import_react2.useRef)(null);
|
|
16983
|
+
return (0, import_react2.useEffect)(() => () => {
|
|
16970
16984
|
var _a;
|
|
16971
16985
|
(_a = dbEffect.current) == null || _a.cancel();
|
|
16972
|
-
}, []), (0,
|
|
16986
|
+
}, []), (0, import_react2.useMemo)(() => (dbEffect.current = debounce(fn, wait, options.leading), dbEffect.current), [options.leading, ...mountArgs]);
|
|
16973
16987
|
}
|
|
16974
16988
|
function useDebounceValue(val, amt = 0) {
|
|
16975
|
-
let [state, setState] = (0,
|
|
16976
|
-
return (0,
|
|
16989
|
+
let [state, setState] = (0, import_react2.useState)(val);
|
|
16990
|
+
return (0, import_react2.useEffect)(() => {
|
|
16977
16991
|
let tm = setTimeout(() => {
|
|
16978
16992
|
setState((prev) => prev === val ? prev : val);
|
|
16979
16993
|
}, amt);
|
|
@@ -17003,7 +17017,7 @@ var require_index_native68 = __commonJS({
|
|
|
17003
17017
|
useWindowDimensions: () => useWindowDimensions
|
|
17004
17018
|
});
|
|
17005
17019
|
module2.exports = __toCommonJS2(src_exports2);
|
|
17006
|
-
var import_constants = require_index_native2(),
|
|
17020
|
+
var import_constants = require_index_native2(), import_react2 = require("react"), import_react_native4 = require_fake_react_native(), initialValue = {
|
|
17007
17021
|
height: 800,
|
|
17008
17022
|
width: 600
|
|
17009
17023
|
};
|
|
@@ -17020,7 +17034,7 @@ var require_index_native68 = __commonJS({
|
|
|
17020
17034
|
function useWindowDimensions({
|
|
17021
17035
|
serverValue = initialValue
|
|
17022
17036
|
} = {}) {
|
|
17023
|
-
return (0,
|
|
17037
|
+
return (0, import_react2.useSyncExternalStore)(
|
|
17024
17038
|
subscribe,
|
|
17025
17039
|
() => import_react_native4.Dimensions.get("window"),
|
|
17026
17040
|
() => import_constants.isWeb ? serverValue : import_react_native4.Dimensions.get("window")
|
|
@@ -17158,6 +17172,7 @@ __export(src_exports, {
|
|
|
17158
17172
|
mediaObjectToString: () => import_core11.mediaObjectToString,
|
|
17159
17173
|
mediaQueryConfig: () => import_core11.mediaQueryConfig,
|
|
17160
17174
|
mediaState: () => import_core11.mediaState,
|
|
17175
|
+
setupDev: () => import_core11.setupDev,
|
|
17161
17176
|
setupReactNative: () => import_core11.setupReactNative,
|
|
17162
17177
|
spacedChildren: () => import_core11.spacedChildren,
|
|
17163
17178
|
styled: () => import_core11.styled,
|
|
@@ -17227,12 +17242,12 @@ var import_core = __toESM(require_index_native10()), createTamagui = import_core
|
|
|
17227
17242
|
var import_core2 = __toESM(require_index_native10()), import_portal = __toESM(require_index_native29()), import_jsx_runtime = require("react/jsx-runtime"), TamaguiProvider = ({ children, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core2.TamaguiProvider, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_portal.PortalProvider, { shouldAddRootHost: !0, children }) });
|
|
17228
17243
|
|
|
17229
17244
|
// src/views/Anchor.tsx
|
|
17230
|
-
var import_core3 = __toESM(require_index_native10()), import_text = __toESM(require_index_native22()),
|
|
17245
|
+
var import_core3 = __toESM(require_index_native10()), import_text = __toESM(require_index_native22()), import_react_native = __toESM(require_fake_react_native()), import_jsx_runtime2 = require("react/jsx-runtime"), AnchorFrame = (0, import_core3.styled)(import_text.SizableText, {
|
|
17231
17246
|
name: "Anchor",
|
|
17232
17247
|
tag: "a",
|
|
17233
17248
|
accessibilityRole: "link"
|
|
17234
|
-
}), Anchor = AnchorFrame.
|
|
17235
|
-
(
|
|
17249
|
+
}), Anchor = AnchorFrame.styleable(
|
|
17250
|
+
({ href, target, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
17236
17251
|
AnchorFrame,
|
|
17237
17252
|
{
|
|
17238
17253
|
...props,
|
|
@@ -17247,7 +17262,7 @@ var import_core3 = __toESM(require_index_native10()), import_text = __toESM(requ
|
|
|
17247
17262
|
},
|
|
17248
17263
|
ref
|
|
17249
17264
|
}
|
|
17250
|
-
)
|
|
17265
|
+
)
|
|
17251
17266
|
);
|
|
17252
17267
|
|
|
17253
17268
|
// src/views/EnsureFlexed.tsx
|
|
@@ -17417,9 +17432,9 @@ var import_core8 = __toESM(require_index_native10()), Section = (0, import_core8
|
|
|
17417
17432
|
});
|
|
17418
17433
|
|
|
17419
17434
|
// src/views/Spinner.tsx
|
|
17420
|
-
var import_core9 = __toESM(require_index_native10()), import_stacks2 = __toESM(require_index_native20()),
|
|
17435
|
+
var import_core9 = __toESM(require_index_native10()), import_stacks2 = __toESM(require_index_native20()), React = __toESM(require("react")), import_react_native3 = __toESM(require_fake_react_native()), import_jsx_runtime4 = require("react/jsx-runtime"), Spinner = import_stacks2.YStack.extractable(
|
|
17421
17436
|
(0, import_core9.themeable)(
|
|
17422
|
-
|
|
17437
|
+
React.forwardRef((props, ref) => {
|
|
17423
17438
|
let { size, color: colorProp, ...stackProps } = props, theme = (0, import_core9.useTheme)(), color = colorProp;
|
|
17424
17439
|
return color && color[0] === "$" && (color = (0, import_core9.variableToString)(theme[color])), /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_stacks2.YStack, { ref, ...stackProps, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native3.ActivityIndicator, { size, color }) });
|
|
17425
17440
|
}),
|
|
@@ -17521,6 +17536,7 @@ var import_core11 = __toESM(require_index_native10());
|
|
|
17521
17536
|
mediaObjectToString,
|
|
17522
17537
|
mediaQueryConfig,
|
|
17523
17538
|
mediaState,
|
|
17539
|
+
setupDev,
|
|
17524
17540
|
setupReactNative,
|
|
17525
17541
|
spacedChildren,
|
|
17526
17542
|
styled,
|