tamagui 1.65.4 → 1.66.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/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/views/Anchor.js +3 -4
- package/dist/esm/views/Anchor.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 +471 -462
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +462 -453
- package/dist/test.native.js.map +2 -2
- package/package.json +52 -52
- package/src/views/Anchor.tsx +24 -26
- 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/native.js
CHANGED
|
@@ -669,14 +669,14 @@ var require_useResponderEvents_native = __commonJS({
|
|
|
669
669
|
useResponderEvents: () => useResponderEvents
|
|
670
670
|
});
|
|
671
671
|
module2.exports = __toCommonJS2(useResponderEvents_exports);
|
|
672
|
-
var
|
|
672
|
+
var React2 = __toESM2(require("react")), ResponderSystem = __toESM2(require_ResponderSystem_native());
|
|
673
673
|
__reExport2(useResponderEvents_exports, require_utils_native(), module2.exports);
|
|
674
674
|
var emptyObject = {};
|
|
675
675
|
function useResponderEvents(hostRef, config = emptyObject) {
|
|
676
|
-
let id =
|
|
677
|
-
|
|
676
|
+
let id = React2.useId(), isAttachedRef = React2.useRef(!1);
|
|
677
|
+
React2.useEffect(() => (ResponderSystem.attachListeners(), () => {
|
|
678
678
|
ResponderSystem.removeNode(id);
|
|
679
|
-
}), [id]),
|
|
679
|
+
}), [id]), React2.useEffect(() => {
|
|
680
680
|
let {
|
|
681
681
|
onMoveShouldSetResponder,
|
|
682
682
|
onMoveShouldSetResponderCapture,
|
|
@@ -688,9 +688,9 @@ var require_useResponderEvents_native = __commonJS({
|
|
|
688
688
|
onStartShouldSetResponderCapture
|
|
689
689
|
} = config, requiresResponderSystem = onMoveShouldSetResponder != null || onMoveShouldSetResponderCapture != null || onScrollShouldSetResponder != null || onScrollShouldSetResponderCapture != null || onSelectionChangeShouldSetResponder != null || onSelectionChangeShouldSetResponderCapture != null || onStartShouldSetResponder != null || onStartShouldSetResponderCapture != null, node = hostRef.current;
|
|
690
690
|
requiresResponderSystem ? (ResponderSystem.addNode(id, node, config), isAttachedRef.current = !0) : isAttachedRef.current && (ResponderSystem.removeNode(id), isAttachedRef.current = !1);
|
|
691
|
-
}, [config, hostRef, id]), process.env.NODE_ENV === "development" && (
|
|
691
|
+
}, [config, hostRef, id]), process.env.NODE_ENV === "development" && (React2.useDebugValue({
|
|
692
692
|
isResponder: hostRef.current === ResponderSystem.getResponderNode()
|
|
693
|
-
}),
|
|
693
|
+
}), React2.useDebugValue(config));
|
|
694
694
|
}
|
|
695
695
|
}
|
|
696
696
|
});
|
|
@@ -852,7 +852,7 @@ var require_index_native2 = __commonJS({
|
|
|
852
852
|
useIsomorphicLayoutEffect: () => useIsomorphicLayoutEffect2
|
|
853
853
|
});
|
|
854
854
|
module2.exports = __toCommonJS2(index_native_exports);
|
|
855
|
-
var
|
|
855
|
+
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";
|
|
856
856
|
}
|
|
857
857
|
});
|
|
858
858
|
|
|
@@ -2408,7 +2408,7 @@ var require_getVariantExtras_native = __commonJS({
|
|
|
2408
2408
|
tokens: conf.tokensParsed,
|
|
2409
2409
|
theme,
|
|
2410
2410
|
fontFamily,
|
|
2411
|
-
font: fonts[fontFamily],
|
|
2411
|
+
font: fonts[fontFamily] || fonts[styleState.conf.defaultFont],
|
|
2412
2412
|
// TODO do this in splitstlye
|
|
2413
2413
|
// we avoid passing in default props for media queries because that would confuse things like SizableText.size:
|
|
2414
2414
|
props: (0, import_createProxy.createProxy)(curProps, {
|
|
@@ -2634,9 +2634,9 @@ var require_propMapper_native = __commonJS({
|
|
|
2634
2634
|
case "lineHeight":
|
|
2635
2635
|
case "letterSpacing":
|
|
2636
2636
|
case "fontWeight": {
|
|
2637
|
-
let fam = fontFamily ||
|
|
2637
|
+
let defaultFont = conf.defaultFont || "$body", fam = fontFamily || defaultFont;
|
|
2638
2638
|
if (fam) {
|
|
2639
|
-
let
|
|
2639
|
+
let fontsParsed = context != null && context.language ? (0, import_getVariantExtras.getFontsForLanguage)(conf.fontsParsed, context.language) : conf.fontsParsed, font = fontsParsed[fam] || fontsParsed[defaultFont];
|
|
2640
2640
|
valOrVar = ((_b = font == null ? void 0 : font[fontShorthand[key] || key]) == null ? void 0 : _b[value]) || value, hasSet = !0;
|
|
2641
2641
|
}
|
|
2642
2642
|
break;
|
|
@@ -2865,7 +2865,7 @@ var require_ThemeManagerContext_native = __commonJS({
|
|
|
2865
2865
|
ThemeManagerContext: () => ThemeManagerContext
|
|
2866
2866
|
});
|
|
2867
2867
|
module2.exports = __toCommonJS2(ThemeManagerContext_exports);
|
|
2868
|
-
var
|
|
2868
|
+
var import_react2 = require("react"), ThemeManagerContext = (0, import_react2.createContext)(null);
|
|
2869
2869
|
}
|
|
2870
2870
|
});
|
|
2871
2871
|
|
|
@@ -2912,7 +2912,7 @@ var require_useTheme_native = __commonJS({
|
|
|
2912
2912
|
useThemeWithState: () => useThemeWithState
|
|
2913
2913
|
});
|
|
2914
2914
|
module2.exports = __toCommonJS2(useTheme_exports);
|
|
2915
|
-
var import_constants = require_index_native2(),
|
|
2915
|
+
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;
|
|
2916
2916
|
function getDefaultThemeProxied() {
|
|
2917
2917
|
if (cached)
|
|
2918
2918
|
return cached;
|
|
@@ -2923,7 +2923,7 @@ var require_useTheme_native = __commonJS({
|
|
|
2923
2923
|
let [_, theme] = useThemeWithState(props);
|
|
2924
2924
|
return theme || getDefaultThemeProxied();
|
|
2925
2925
|
}, useThemeWithState = (props) => {
|
|
2926
|
-
let keys = (0,
|
|
2926
|
+
let keys = (0, import_react2.useRef)([]), changedThemeState = useChangeThemeEffect(
|
|
2927
2927
|
props,
|
|
2928
2928
|
!1,
|
|
2929
2929
|
keys.current,
|
|
@@ -2942,7 +2942,7 @@ var require_useTheme_native = __commonJS({
|
|
|
2942
2942
|
props
|
|
2943
2943
|
)}. Themes given to tamagui are: ${Object.keys((0, import_config.getConfig)().themes)}`
|
|
2944
2944
|
) : "\u274C 1";
|
|
2945
|
-
let themeProxied = (0,
|
|
2945
|
+
let themeProxied = (0, import_react2.useMemo)(() => getThemeProxied(theme, themeManager, keys.current, props.debug), [theme, name, className, themeManager]);
|
|
2946
2946
|
return process.env.NODE_ENV === "development" && props.debug === "verbose" && (console.groupCollapsed(" \u{1F539} useTheme =>", name), console.log("returning state", changedThemeState, "from props", props), console.groupEnd()), [changedThemeState, themeProxied];
|
|
2947
2947
|
};
|
|
2948
2948
|
function getThemeProxied(theme, themeManager, keys, debug) {
|
|
@@ -2979,7 +2979,7 @@ var require_useTheme_native = __commonJS({
|
|
|
2979
2979
|
let {
|
|
2980
2980
|
// @ts-expect-error internal use only
|
|
2981
2981
|
disable
|
|
2982
|
-
} = props, parentManager = (0,
|
|
2982
|
+
} = props, parentManager = (0, import_react2.useContext)(import_ThemeManagerContext.ThemeManagerContext);
|
|
2983
2983
|
if (disable) {
|
|
2984
2984
|
if (!parentManager)
|
|
2985
2985
|
throw "\u274C 2";
|
|
@@ -2989,7 +2989,7 @@ var require_useTheme_native = __commonJS({
|
|
|
2989
2989
|
themeManager: parentManager
|
|
2990
2990
|
};
|
|
2991
2991
|
}
|
|
2992
|
-
let [themeState, setThemeState] = (0,
|
|
2992
|
+
let [themeState, setThemeState] = (0, import_react2.useState)(createState), { state, mounted, isNewTheme, themeManager } = themeState, isInversingOnMount = !!(!themeState.mounted && props.inverse);
|
|
2993
2993
|
function getShouldUpdateTheme(manager = themeManager, nextState, prevState = state, forceShouldChange = !1) {
|
|
2994
2994
|
let forceUpdate = shouldUpdate == null ? void 0 : shouldUpdate();
|
|
2995
2995
|
if (!forceShouldChange && forceUpdate === !1)
|
|
@@ -2998,7 +2998,7 @@ var require_useTheme_native = __commonJS({
|
|
|
2998
2998
|
if (forceShouldChange || next && !(forceUpdate !== !0 && !manager.getStateShouldChange(next, prevState)))
|
|
2999
2999
|
return next;
|
|
3000
3000
|
}
|
|
3001
|
-
if (import_constants.isServer || ((0,
|
|
3001
|
+
if (import_constants.isServer || ((0, import_react2.useLayoutEffect)(() => {
|
|
3002
3002
|
if (props.inverse && !mounted) {
|
|
3003
3003
|
setThemeState({ ...themeState, mounted: !0 });
|
|
3004
3004
|
return;
|
|
@@ -3029,7 +3029,7 @@ var require_useTheme_native = __commonJS({
|
|
|
3029
3029
|
props.name,
|
|
3030
3030
|
props.reset,
|
|
3031
3031
|
mounted
|
|
3032
|
-
]), process.env.NODE_ENV === "development" && props.debug !== "profile" && (0,
|
|
3032
|
+
]), process.env.NODE_ENV === "development" && props.debug !== "profile" && (0, import_react2.useEffect)(() => (globalThis.TamaguiThemeManagers ??= /* @__PURE__ */ new Set(), globalThis.TamaguiThemeManagers.add(themeManager), () => {
|
|
3033
3033
|
globalThis.TamaguiThemeManagers.delete(themeManager);
|
|
3034
3034
|
}), [themeManager])), isInversingOnMount) {
|
|
3035
3035
|
if (!parentManager)
|
|
@@ -3128,7 +3128,7 @@ var require_useMedia_native = __commonJS({
|
|
|
3128
3128
|
useMediaPropsActive: () => useMediaPropsActive3
|
|
3129
3129
|
});
|
|
3130
3130
|
module2.exports = __toCommonJS2(useMedia_exports);
|
|
3131
|
-
var import_constants = require_index_native2(),
|
|
3131
|
+
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 = (
|
|
3132
3132
|
// development only safeguard
|
|
3133
3133
|
process.env.NODE_ENV === "development" ? (0, import_createProxy.createProxy)(
|
|
3134
3134
|
{},
|
|
@@ -3195,7 +3195,7 @@ var require_useMedia_native = __commonJS({
|
|
|
3195
3195
|
return listeners.add(subscriber), () => listeners.delete(subscriber);
|
|
3196
3196
|
}
|
|
3197
3197
|
function useMedia3(uid) {
|
|
3198
|
-
let internal = (0,
|
|
3198
|
+
let internal = (0, import_react2.useRef)(), state = (0, import_react2.useSyncExternalStore)(
|
|
3199
3199
|
subscribe,
|
|
3200
3200
|
() => {
|
|
3201
3201
|
if (!internal.current)
|
|
@@ -3216,7 +3216,7 @@ var require_useMedia_native = __commonJS({
|
|
|
3216
3216
|
}
|
|
3217
3217
|
function useMediaPropsActive3(props, opts) {
|
|
3218
3218
|
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;
|
|
3219
|
-
return (0,
|
|
3219
|
+
return (0, import_react2.useMemo)(() => {
|
|
3220
3220
|
let config = (0, import_config.getConfig)(), next = {}, importancesUsed = {}, propNames = Object.keys(props), len = propNames.length;
|
|
3221
3221
|
for (let i = 0; i < len; i++) {
|
|
3222
3222
|
let key = propNames[i], val = props[key];
|
|
@@ -3361,7 +3361,7 @@ var require_compose_refs_native = __commonJS({
|
|
|
3361
3361
|
useComposedRefs: () => useComposedRefs
|
|
3362
3362
|
});
|
|
3363
3363
|
module2.exports = __toCommonJS2(compose_refs_exports);
|
|
3364
|
-
var
|
|
3364
|
+
var React2 = __toESM2(require("react"));
|
|
3365
3365
|
function setRef(ref, value) {
|
|
3366
3366
|
typeof ref == "function" ? ref(value) : ref && (ref.current = value);
|
|
3367
3367
|
}
|
|
@@ -3369,7 +3369,7 @@ var require_compose_refs_native = __commonJS({
|
|
|
3369
3369
|
return (node) => refs.forEach((ref) => setRef(ref, node));
|
|
3370
3370
|
}
|
|
3371
3371
|
function useComposedRefs(...refs) {
|
|
3372
|
-
return
|
|
3372
|
+
return React2.useCallback(composeRefs(...refs), refs);
|
|
3373
3373
|
}
|
|
3374
3374
|
}
|
|
3375
3375
|
});
|
|
@@ -3407,7 +3407,7 @@ var require_index_native7 = __commonJS({
|
|
|
3407
3407
|
useDidFinishSSR: () => useDidFinishSSR2
|
|
3408
3408
|
});
|
|
3409
3409
|
module2.exports = __toCommonJS2(src_exports2);
|
|
3410
|
-
var
|
|
3410
|
+
var import_react2 = require("react");
|
|
3411
3411
|
function useDidFinishSSR2(value) {
|
|
3412
3412
|
return value ?? !0;
|
|
3413
3413
|
}
|
|
@@ -3471,13 +3471,13 @@ var require_createStyledContext_native = __commonJS({
|
|
|
3471
3471
|
createStyledContext: () => createStyledContext2
|
|
3472
3472
|
});
|
|
3473
3473
|
module2.exports = __toCommonJS2(createStyledContext_exports);
|
|
3474
|
-
var
|
|
3474
|
+
var import_react2 = require("react"), import_objectIdentityKey = require_objectIdentityKey_native(), import_jsx_runtime6 = require("react/jsx-runtime");
|
|
3475
3475
|
function createStyledContext2(props) {
|
|
3476
|
-
let OGContext = (0,
|
|
3476
|
+
let OGContext = (0, import_react2.createContext)(props), OGProvider2 = OGContext.Provider, Context = OGContext, Provider = ({
|
|
3477
3477
|
children,
|
|
3478
3478
|
...values
|
|
3479
3479
|
}) => {
|
|
3480
|
-
let value = (0,
|
|
3480
|
+
let value = (0, import_react2.useMemo)(() => ({
|
|
3481
3481
|
...props,
|
|
3482
3482
|
...values
|
|
3483
3483
|
}), [(0, import_objectIdentityKey.objectIdentityKey)(values)]);
|
|
@@ -3797,7 +3797,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3797
3797
|
useSplitStyles: () => useSplitStyles
|
|
3798
3798
|
});
|
|
3799
3799
|
module2.exports = __toCommonJS2(getSplitStyles_exports);
|
|
3800
|
-
var import_constants = require_index_native2(), import_helpers = require_index_native4(),
|
|
3800
|
+
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) => {
|
|
3801
3801
|
var _a, _b, _c, _e, _f, _g;
|
|
3802
3802
|
conf = conf || (0, import_config.getConfig)();
|
|
3803
3803
|
let { shorthands } = conf, {
|
|
@@ -3890,7 +3890,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3890
3890
|
if (isStyleProp && props.asChild === "except-style")
|
|
3891
3891
|
continue;
|
|
3892
3892
|
let shouldPassProp = !isStyleProp || // is in parent variants
|
|
3893
|
-
isHOC && (parentStaticConfig == null ? void 0 : parentStaticConfig.variants) && keyInit in parentStaticConfig.variants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)),
|
|
3893
|
+
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)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
3894
3894
|
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(
|
|
3895
3895
|
`\u{1F539}\u{1F539}\u{1F539}\u{1F539} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""} \u{1F539}\u{1F539}\u{1F539}\u{1F539}`
|
|
3896
3896
|
), console.log({ isVariant, valInit, shouldPassProp }), import_constants.isClient && console.log({
|
|
@@ -4197,7 +4197,7 @@ current`, {
|
|
|
4197
4197
|
for (let key in cur)
|
|
4198
4198
|
key in styleState.usedKeys || mergeStyle(styleState, key, cur[key]);
|
|
4199
4199
|
}
|
|
4200
|
-
var useInsertEffectCompat = import_constants.isWeb ?
|
|
4200
|
+
var useInsertEffectCompat = import_constants.isWeb ? import_react2.useInsertionEffect || import_constants.useIsomorphicLayoutEffect : () => {
|
|
4201
4201
|
}, useSplitStyles = (...args) => {
|
|
4202
4202
|
let res = getSplitStyles(...args);
|
|
4203
4203
|
return useInsertEffectCompat(() => {
|
|
@@ -4388,17 +4388,17 @@ var require_Theme_native = __commonJS({
|
|
|
4388
4388
|
wrapThemeElements: () => wrapThemeElements
|
|
4389
4389
|
});
|
|
4390
4390
|
module2.exports = __toCommonJS2(Theme_exports);
|
|
4391
|
-
var import_constants = require_index_native2(),
|
|
4391
|
+
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) {
|
|
4392
4392
|
if (props.disable)
|
|
4393
4393
|
return props.children;
|
|
4394
|
-
let isRoot = !!props._isRoot, disableDirectChildTheme = props["disable-child-theme"], themeState = (0, import_useTheme.useChangeThemeEffect)(props, isRoot), children = (0,
|
|
4395
|
-
let children2 = disableDirectChildTheme ?
|
|
4394
|
+
let isRoot = !!props._isRoot, disableDirectChildTheme = props["disable-child-theme"], themeState = (0, import_useTheme.useChangeThemeEffect)(props, isRoot), children = (0, import_react2.useMemo)(() => {
|
|
4395
|
+
let children2 = disableDirectChildTheme ? import_react2.Children.map(
|
|
4396
4396
|
props.children,
|
|
4397
|
-
(child) => (0,
|
|
4397
|
+
(child) => (0, import_react2.cloneElement)(child, { "data-disable-theme": !0 })
|
|
4398
4398
|
) : props.children;
|
|
4399
4399
|
if (ref)
|
|
4400
4400
|
try {
|
|
4401
|
-
|
|
4401
|
+
import_react2.default.Children.only(children2), children2 = (0, import_react2.cloneElement)(children2, { ref });
|
|
4402
4402
|
} catch {
|
|
4403
4403
|
}
|
|
4404
4404
|
return process.env.NODE_ENV === "development" && props.debug === "visualize" && (children2 = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ThemeDebug.ThemeDebug, { themeState, themeProps: props, children: children2 })), children2;
|
|
@@ -4407,11 +4407,11 @@ var require_Theme_native = __commonJS({
|
|
|
4407
4407
|
});
|
|
4408
4408
|
Theme2.avoidForwardRef = !0;
|
|
4409
4409
|
function useThemedChildren(themeState, children, props, isRoot = !1) {
|
|
4410
|
-
let { themeManager, isNewTheme } = themeState, { shallow, forceClassName } = props, hasEverThemed = (0,
|
|
4410
|
+
let { themeManager, isNewTheme } = themeState, { shallow, forceClassName } = props, hasEverThemed = (0, import_react2.useRef)(!1);
|
|
4411
4411
|
if (isNewTheme && (hasEverThemed.current = !0), !(isNewTheme || props.inverse || hasEverThemed.current || forceClassName || isRoot))
|
|
4412
4412
|
return children;
|
|
4413
4413
|
let next = children;
|
|
4414
|
-
shallow && themeManager && (next =
|
|
4414
|
+
shallow && themeManager && (next = import_react2.Children.toArray(children).map((child) => (0, import_react2.isValidElement)(child) ? (0, import_react2.cloneElement)(
|
|
4415
4415
|
child,
|
|
4416
4416
|
void 0,
|
|
4417
4417
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Theme2, { name: themeManager.state.parentName, children: child.props.children })
|
|
@@ -4475,10 +4475,10 @@ var require_themeable_native = __commonJS({
|
|
|
4475
4475
|
themeable: () => themeable3
|
|
4476
4476
|
});
|
|
4477
4477
|
module2.exports = __toCommonJS2(themeable_exports);
|
|
4478
|
-
var
|
|
4478
|
+
var import_react2 = __toESM2(require("react")), import_Theme = require_Theme_native(), import_jsx_runtime6 = require("react/jsx-runtime");
|
|
4479
4479
|
function themeable3(component, staticConfig) {
|
|
4480
|
-
let withTheme = (0,
|
|
4481
|
-
let { themeInverse, theme, componentName, themeReset, ...rest } = props, element =
|
|
4480
|
+
let withTheme = (0, import_react2.forwardRef)(function(props, ref) {
|
|
4481
|
+
let { themeInverse, theme, componentName, themeReset, ...rest } = props, element = import_react2.default.createElement(component, {
|
|
4482
4482
|
...rest,
|
|
4483
4483
|
ref,
|
|
4484
4484
|
"data-disable-theme": !0
|
|
@@ -4544,11 +4544,11 @@ var require_Slot_native = __commonJS({
|
|
|
4544
4544
|
Slottable: () => Slottable
|
|
4545
4545
|
});
|
|
4546
4546
|
module2.exports = __toCommonJS2(Slot_exports);
|
|
4547
|
-
var import_compose_refs = require_index_native6(), import_constants = require_index_native2(), import_helpers = require_index_native4(),
|
|
4547
|
+
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) {
|
|
4548
4548
|
let { children, ...slotProps } = props;
|
|
4549
|
-
if ((0,
|
|
4549
|
+
if ((0, import_react2.isValidElement)(children)) {
|
|
4550
4550
|
let mergedProps = mergeSlotProps(children, slotProps);
|
|
4551
|
-
return (0,
|
|
4551
|
+
return (0, import_react2.cloneElement)(
|
|
4552
4552
|
children,
|
|
4553
4553
|
children.type.avoidForwardRef ? mergedProps : {
|
|
4554
4554
|
...mergedProps,
|
|
@@ -4556,7 +4556,7 @@ var require_Slot_native = __commonJS({
|
|
|
4556
4556
|
}
|
|
4557
4557
|
);
|
|
4558
4558
|
}
|
|
4559
|
-
return
|
|
4559
|
+
return import_react2.Children.count(children) > 1 ? import_react2.Children.only(null) : null;
|
|
4560
4560
|
}), Slottable = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children }), pressMap = import_constants.isWeb ? {
|
|
4561
4561
|
onPress: "onClick",
|
|
4562
4562
|
onPressOut: "onMouseUp",
|
|
@@ -4605,7 +4605,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4605
4605
|
spacedChildren: () => spacedChildren2
|
|
4606
4606
|
});
|
|
4607
4607
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
4608
|
-
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(),
|
|
4608
|
+
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, time, mouseUps = /* @__PURE__ */ new Set();
|
|
4609
4609
|
if (typeof document < "u") {
|
|
4610
4610
|
let cancelTouches = () => {
|
|
4611
4611
|
mouseUps.forEach((x) => x()), mouseUps.clear();
|
|
@@ -4635,7 +4635,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4635
4635
|
defaultProps,
|
|
4636
4636
|
defaultPropsKeyOrder: defaultProps ? Object.keys(defaultProps) : []
|
|
4637
4637
|
});
|
|
4638
|
-
let component = (0,
|
|
4638
|
+
let component = (0, import_react2.forwardRef)((propsIn, forwardedRef) => {
|
|
4639
4639
|
var _a2, _b, _c, _d, _g, _h, _i, _j, _k;
|
|
4640
4640
|
if (!hasSetupBaseViews) {
|
|
4641
4641
|
hasSetupBaseViews = !0;
|
|
@@ -4643,9 +4643,9 @@ var require_createComponent_native = __commonJS({
|
|
|
4643
4643
|
baseViews && (BaseText = baseViews.Text, BaseView = baseViews.View);
|
|
4644
4644
|
}
|
|
4645
4645
|
process.env.NODE_ENV === "test" && propsIn["data-test-renders"] && (propsIn["data-test-renders"].current ??= 0, propsIn["data-test-renders"].current += 1);
|
|
4646
|
-
let componentContext = (0,
|
|
4646
|
+
let componentContext = (0, import_react2.useContext)(import_ComponentContext.ComponentContext), styledContextProps, overriddenContextProps, contextValue, { context } = staticConfig;
|
|
4647
4647
|
if (context) {
|
|
4648
|
-
contextValue = (0,
|
|
4648
|
+
contextValue = (0, import_react2.useContext)(context);
|
|
4649
4649
|
let { inverseShorthands } = (0, import_config.getConfig)();
|
|
4650
4650
|
for (let key in context.props) {
|
|
4651
4651
|
let propVal = (
|
|
@@ -4661,18 +4661,18 @@ var require_createComponent_native = __commonJS({
|
|
|
4661
4661
|
process.env.NODE_ENV === "development" && time && time`start (ignore)`;
|
|
4662
4662
|
let isHydrated = config != null && config.disableSSR ? !0 : (0, import_use_did_finish_ssr.useDidFinishSSR)();
|
|
4663
4663
|
process.env.NODE_ENV === "development" && time && time`did-finish-ssr`;
|
|
4664
|
-
let stateRef = (0,
|
|
4664
|
+
let stateRef = (0, import_react2.useRef)(
|
|
4665
4665
|
void 0
|
|
4666
4666
|
);
|
|
4667
4667
|
stateRef.current ||= {}, process.env.NODE_ENV === "development" && time && time`stateref`;
|
|
4668
|
-
let hostRef = (0,
|
|
4668
|
+
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 = (() => {
|
|
4669
4669
|
if (import_constants.isServer && !supportsCSSVars)
|
|
4670
4670
|
return !1;
|
|
4671
4671
|
let curState = stateRef.current;
|
|
4672
4672
|
return !!(hasAnimationProp && !isHOC && useAnimations || curState.hasAnimated);
|
|
4673
4673
|
})(), 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);
|
|
4674
4674
|
process.env.NODE_ENV === "development" && time && time`pre-use-state`;
|
|
4675
|
-
let initialState = willBeAnimated ? supportsCSSVars ? import_defaultComponentState.defaultComponentStateShouldEnter : import_defaultComponentState.defaultComponentState : import_defaultComponentState.defaultComponentStateMounted, states = (0,
|
|
4675
|
+
let 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}` : "";
|
|
4676
4676
|
if (groupName) {
|
|
4677
4677
|
let groupContextState = componentContext.groups.state, og = setStateShallow;
|
|
4678
4678
|
setStateShallow = (state2) => {
|
|
@@ -4713,7 +4713,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4713
4713
|
debug: debugProp
|
|
4714
4714
|
}, isExiting = !state.unmounted && (presence == null ? void 0 : presence[0]) === !1;
|
|
4715
4715
|
if (process.env.NODE_ENV === "development") {
|
|
4716
|
-
let id = (0,
|
|
4716
|
+
let id = (0, import_react2.useId)();
|
|
4717
4717
|
if (debugProp && debugProp !== "profile") {
|
|
4718
4718
|
let name = `${componentName || (Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "[Unnamed Component]"}`, type = isAnimatedReactNative ? "(animated)" : isReactNative ? "(rnw)" : "", dataIs = propsIn["data-is"] || "", banner = `${name}${dataIs ? ` ${dataIs}` : ""} ${type} id ${id}`;
|
|
4719
4719
|
console.group(
|
|
@@ -4846,7 +4846,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
4846
4846
|
}
|
|
4847
4847
|
)), viewProps = nonTamaguiProps;
|
|
4848
4848
|
let composedRef = (0, import_compose_refs.useComposedRefs)(hostRef, forwardedRef);
|
|
4849
|
-
viewProps.ref = composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && import_constants.isWeb && !isHOC &&
|
|
4849
|
+
viewProps.ref = composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && import_constants.isWeb && !isHOC && import_react2.Children.toArray(props.children).forEach((item) => {
|
|
4850
4850
|
typeof item == "string" && item !== `
|
|
4851
4851
|
` && console.error(
|
|
4852
4852
|
`Unexpected text node: ${item}. A text node cannot be a child of a <View>.`
|
|
@@ -4856,7 +4856,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
4856
4856
|
press: !1,
|
|
4857
4857
|
pressIn: !1
|
|
4858
4858
|
}), shouldSetMounted = needsMount && state.unmounted, { pseudoGroups, mediaGroups } = splitStyles;
|
|
4859
|
-
(0,
|
|
4859
|
+
(0, import_react2.useEffect)(() => {
|
|
4860
4860
|
if (shouldSetMounted) {
|
|
4861
4861
|
let unmounted = state.unmounted === !0 && hasEnterStyle ? "should-enter" : !1;
|
|
4862
4862
|
setStateShallow({
|
|
@@ -4958,8 +4958,8 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
4958
4958
|
onPressIn,
|
|
4959
4959
|
onPressOut
|
|
4960
4960
|
})), process.env.NODE_ENV === "development" && time && time`spaced-as-child`, // in test mode disable perf unwrapping so react-testing-library finds Text properly
|
|
4961
|
-
process.env.NODE_ENV !== "test" && (elementType === BaseText || elementType === BaseView) ? (viewProps.children = content, content = elementType.render(viewProps, viewProps.ref)) : content = (0,
|
|
4962
|
-
let subGroupContext = (0,
|
|
4961
|
+
process.env.NODE_ENV !== "test" && (elementType === BaseText || elementType === BaseView) ? (viewProps.children = content, content = elementType.render(viewProps, viewProps.ref)) : content = (0, import_react2.createElement)(elementType, viewProps, content), process.env.NODE_ENV === "development" && time && time`create-element`;
|
|
4962
|
+
let subGroupContext = (0, import_react2.useMemo)(() => {
|
|
4963
4963
|
if (groupName)
|
|
4964
4964
|
return {
|
|
4965
4965
|
...componentContext.groups,
|
|
@@ -5027,13 +5027,14 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
5027
5027
|
});
|
|
5028
5028
|
staticConfig.componentName && (component.displayName = staticConfig.componentName);
|
|
5029
5029
|
let res = component;
|
|
5030
|
-
(process.env.TAMAGUI_MEMO_ALL || staticConfig.memo) && (res = (0,
|
|
5030
|
+
(process.env.TAMAGUI_MEMO_ALL || staticConfig.memo) && (res = (0, import_react2.memo)(res)), res.staticConfig = staticConfig;
|
|
5031
5031
|
function extendStyledConfig(extended) {
|
|
5032
5032
|
return {
|
|
5033
5033
|
...staticConfig,
|
|
5034
5034
|
...extended,
|
|
5035
5035
|
neverFlatten: !0,
|
|
5036
|
-
isHOC: !0
|
|
5036
|
+
isHOC: !0,
|
|
5037
|
+
isStyledHOC: !1
|
|
5037
5038
|
};
|
|
5038
5039
|
}
|
|
5039
5040
|
function extractable(Component2, extended) {
|
|
@@ -5043,7 +5044,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
5043
5044
|
var _a2;
|
|
5044
5045
|
let ComponentForwardedRef = ((_a2 = Component2.render) == null ? void 0 : _a2.length) === 2 ? Component2 : (
|
|
5045
5046
|
// memo because theme changes otherwise would always re-render
|
|
5046
|
-
(0,
|
|
5047
|
+
(0, import_react2.memo)((0, import_react2.forwardRef)(Component2))
|
|
5047
5048
|
), extendedConfig = extendStyledConfig(extended), out = (0, import_themeable.themeable)(ComponentForwardedRef, extendedConfig);
|
|
5048
5049
|
return out.staticConfig = extendedConfig, out.styleable = styleable, out;
|
|
5049
5050
|
}
|
|
@@ -5101,19 +5102,19 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
5101
5102
|
let { isZStack, children, space, direction, spaceFlex, separator } = props, hasSpace = !!(space || spaceFlex), hasSeparator = separator != null;
|
|
5102
5103
|
if (!(hasSpace || hasSeparator || isZStack))
|
|
5103
5104
|
return children;
|
|
5104
|
-
let childrenList =
|
|
5105
|
+
let childrenList = import_react2.Children.toArray(children);
|
|
5105
5106
|
if (childrenList.length <= 1 && !isZStack && !((_b = (_a = childrenList[0]) == null ? void 0 : _a.type) != null && _b.shouldForwardSpace))
|
|
5106
5107
|
return childrenList;
|
|
5107
5108
|
let final = [];
|
|
5108
5109
|
for (let [index, child] of childrenList.entries()) {
|
|
5109
5110
|
let isEmpty = child == null || Array.isArray(child) && child.length === 0;
|
|
5110
|
-
if (!isEmpty &&
|
|
5111
|
+
if (!isEmpty && import_react2.default.isValidElement(child) && (_c = child.type) != null && _c.shouldForwardSpace && (child = import_react2.default.cloneElement(child, {
|
|
5111
5112
|
space,
|
|
5112
5113
|
spaceFlex,
|
|
5113
5114
|
separator,
|
|
5114
5115
|
key: child.key
|
|
5115
5116
|
})), isEmpty || !child || child.key && !isZStack ? final.push(child) : final.push(
|
|
5116
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
5117
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react2.Fragment, { children: isZStack ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AbsoluteFill, { children: child }) : child }, index)
|
|
5117
5118
|
), isUnspaced(child) && index === 0 || isZStack)
|
|
5118
5119
|
continue;
|
|
5119
5120
|
let next = childrenList[index + 1];
|
|
@@ -5125,7 +5126,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
5125
5126
|
spaceFlex
|
|
5126
5127
|
})
|
|
5127
5128
|
), final.push(
|
|
5128
|
-
|
|
5129
|
+
import_react2.default.isValidElement(separator) ? import_react2.default.cloneElement(separator, { key: `sep_${index}` }) : separator
|
|
5129
5130
|
), hasSpace && final.push(
|
|
5130
5131
|
createSpacer({
|
|
5131
5132
|
key: `_${index}01tmgui`,
|
|
@@ -5854,7 +5855,7 @@ var require_styled_native = __commonJS({
|
|
|
5854
5855
|
}), parentStaticConfig && (parentStaticConfig.isHOC && !parentStaticConfig.isStyledHOC || (defaultProps = {
|
|
5855
5856
|
...parentStaticConfig.defaultProps,
|
|
5856
5857
|
...defaultProps
|
|
5857
|
-
}
|
|
5858
|
+
}, parentStaticConfig.variants && (variants = (0, import_mergeVariants.mergeVariants)(parentStaticConfig.variants, variants)))), parentStaticConfig != null && parentStaticConfig.isHOC && name && (defaultProps.componentName = name);
|
|
5858
5859
|
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 = {
|
|
5859
5860
|
...parentStaticConfig,
|
|
5860
5861
|
...staticExtractionOptions,
|
|
@@ -6008,7 +6009,7 @@ var require_isTamaguiElement_native = __commonJS({
|
|
|
6008
6009
|
isTamaguiElement: () => isTamaguiElement2
|
|
6009
6010
|
});
|
|
6010
6011
|
module2.exports = __toCommonJS2(isTamaguiElement_exports);
|
|
6011
|
-
var
|
|
6012
|
+
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);
|
|
6012
6013
|
}
|
|
6013
6014
|
});
|
|
6014
6015
|
|
|
@@ -6029,11 +6030,11 @@ var require_withStaticProperties_native = __commonJS({
|
|
|
6029
6030
|
withStaticProperties: () => withStaticProperties2
|
|
6030
6031
|
});
|
|
6031
6032
|
module2.exports = __toCommonJS2(withStaticProperties_exports);
|
|
6032
|
-
var
|
|
6033
|
+
var import_react2 = require("react"), Decorated = Symbol(), withStaticProperties2 = function(component, staticProps) {
|
|
6033
6034
|
let next = (() => {
|
|
6034
6035
|
if (component[Decorated]) {
|
|
6035
|
-
let _ = (0,
|
|
6036
|
-
(props, ref) => (0,
|
|
6036
|
+
let _ = (0, import_react2.forwardRef)(
|
|
6037
|
+
(props, ref) => (0, import_react2.createElement)(component, { ...props, ref })
|
|
6037
6038
|
);
|
|
6038
6039
|
for (let key in component) {
|
|
6039
6040
|
let v = component[key];
|
|
@@ -6064,9 +6065,9 @@ var require_useThemeName_native = __commonJS({
|
|
|
6064
6065
|
useThemeName: () => useThemeName2
|
|
6065
6066
|
});
|
|
6066
6067
|
module2.exports = __toCommonJS2(useThemeName_exports);
|
|
6067
|
-
var import_constants = require_index_native2(),
|
|
6068
|
+
var import_constants = require_index_native2(), import_react2 = require("react"), import_ThemeManagerContext = require_ThemeManagerContext_native();
|
|
6068
6069
|
function useThemeName2(opts) {
|
|
6069
|
-
let manager = (0,
|
|
6070
|
+
let manager = (0, import_react2.useContext)(import_ThemeManagerContext.ThemeManagerContext), [name, setName] = (0, import_react2.useState)((manager == null ? void 0 : manager.state.name) || "");
|
|
6070
6071
|
return (0, import_constants.useIsomorphicLayoutEffect)(() => {
|
|
6071
6072
|
if (manager)
|
|
6072
6073
|
return setName(manager.state.name), manager.onChangeTheme((next, manager2) => {
|
|
@@ -6095,9 +6096,9 @@ var require_useStyle_native = __commonJS({
|
|
|
6095
6096
|
useStyle: () => useStyle2
|
|
6096
6097
|
});
|
|
6097
6098
|
module2.exports = __toCommonJS2(useStyle_exports);
|
|
6098
|
-
var
|
|
6099
|
+
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();
|
|
6099
6100
|
function useStyle2(base, style, options) {
|
|
6100
|
-
let isText = base.staticConfig.isText, componentContext = (0,
|
|
6101
|
+
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)(
|
|
6101
6102
|
style,
|
|
6102
6103
|
base.staticConfig,
|
|
6103
6104
|
themeState.state.theme,
|
|
@@ -6138,7 +6139,7 @@ var require_useAnimationDriver_native = __commonJS({
|
|
|
6138
6139
|
useAnimationDriver: () => useAnimationDriver
|
|
6139
6140
|
});
|
|
6140
6141
|
module2.exports = __toCommonJS2(useAnimationDriver_exports);
|
|
6141
|
-
var
|
|
6142
|
+
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)();
|
|
6142
6143
|
}
|
|
6143
6144
|
});
|
|
6144
6145
|
|
|
@@ -6306,7 +6307,7 @@ var require_ThemeProvider_native = __commonJS({
|
|
|
6306
6307
|
ThemeProvider: () => ThemeProvider
|
|
6307
6308
|
});
|
|
6308
6309
|
module2.exports = __toCommonJS2(ThemeProvider_exports);
|
|
6309
|
-
var import_constants = require_index_native2(),
|
|
6310
|
+
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)(() => {
|
|
6310
6311
|
if (props.disableRootThemeClass)
|
|
6311
6312
|
return;
|
|
6312
6313
|
let cn = `${import_constants2.THEME_CLASSNAME_PREFIX}${props.defaultTheme}`, target = props.themeClassNameOnRoot ? document.documentElement : document.body;
|
|
@@ -6343,8 +6344,8 @@ var require_FontLanguage_native = __commonJS({
|
|
|
6343
6344
|
FontLanguage: () => FontLanguage2
|
|
6344
6345
|
});
|
|
6345
6346
|
module2.exports = __toCommonJS2(FontLanguage_native_exports);
|
|
6346
|
-
var
|
|
6347
|
-
let language = (0,
|
|
6347
|
+
var import_react2 = require("react"), import_ComponentContext = require_ComponentContext_native(), import_jsx_runtime6 = require("react/jsx-runtime"), FontLanguage2 = ({ children, ...props }) => {
|
|
6348
|
+
let language = (0, import_react2.useMemo)(() => props, [JSON.stringify(props)]);
|
|
6348
6349
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, { language, children });
|
|
6349
6350
|
};
|
|
6350
6351
|
}
|
|
@@ -6374,14 +6375,14 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
6374
6375
|
TamaguiProvider: () => TamaguiProvider2
|
|
6375
6376
|
});
|
|
6376
6377
|
module2.exports = __toCommonJS2(TamaguiProvider_exports);
|
|
6377
|
-
var import_constants = require_index_native2(),
|
|
6378
|
+
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");
|
|
6378
6379
|
function TamaguiProvider2({
|
|
6379
6380
|
children,
|
|
6380
6381
|
disableInjectCSS,
|
|
6381
6382
|
config,
|
|
6382
6383
|
...themePropsProvider
|
|
6383
6384
|
}) {
|
|
6384
|
-
return import_constants.isWeb && import_constants.isServer || (0, import_useMedia.useMediaListeners)(config), import_constants.isClient &&
|
|
6385
|
+
return import_constants.isWeb && import_constants.isServer || (0, import_useMedia.useMediaListeners)(config), import_constants.isClient && React2.useLayoutEffect(() => {
|
|
6385
6386
|
if (document.documentElement.classList.contains("t_unmounted") && document.documentElement.classList.remove("t_unmounted"), disableInjectCSS)
|
|
6386
6387
|
return;
|
|
6387
6388
|
let style = document.createElement("style");
|
|
@@ -6440,12 +6441,12 @@ var require_useGet_native = __commonJS({
|
|
|
6440
6441
|
useGet: () => useGet2
|
|
6441
6442
|
});
|
|
6442
6443
|
module2.exports = __toCommonJS2(useGet_exports);
|
|
6443
|
-
var
|
|
6444
|
+
var import_react2 = require("react"), isWeb6 = !1, isClient2 = typeof window < "u", useIsomorphicLayoutEffect2 = !isWeb6 || isClient2 ? import_react2.useLayoutEffect : import_react2.useEffect;
|
|
6444
6445
|
function useGet2(currentValue, initialValue, forwardToFunction) {
|
|
6445
|
-
let curRef = (0,
|
|
6446
|
+
let curRef = (0, import_react2.useRef)(initialValue ?? currentValue);
|
|
6446
6447
|
return useIsomorphicLayoutEffect2(() => {
|
|
6447
6448
|
curRef.current = currentValue;
|
|
6448
|
-
}), (0,
|
|
6449
|
+
}), (0, import_react2.useCallback)(
|
|
6449
6450
|
forwardToFunction ? (...args) => {
|
|
6450
6451
|
var _a;
|
|
6451
6452
|
return (_a = curRef.current) == null ? void 0 : _a.apply(null, args);
|
|
@@ -6960,10 +6961,10 @@ var require_index_native11 = __commonJS({
|
|
|
6960
6961
|
useForceUpdate: () => useForceUpdate
|
|
6961
6962
|
});
|
|
6962
6963
|
module2.exports = __toCommonJS2(src_exports2);
|
|
6963
|
-
var
|
|
6964
|
+
var import_react2 = require("react"), isServerSide = !1, idFn = () => {
|
|
6964
6965
|
};
|
|
6965
6966
|
function useForceUpdate() {
|
|
6966
|
-
return isServerSide ? idFn : (0,
|
|
6967
|
+
return isServerSide ? idFn : (0, import_react2.useReducer)((x) => Math.random(), 0)[1];
|
|
6967
6968
|
}
|
|
6968
6969
|
}
|
|
6969
6970
|
});
|
|
@@ -6985,7 +6986,7 @@ var require_LayoutGroupContext_native = __commonJS({
|
|
|
6985
6986
|
LayoutGroupContext: () => LayoutGroupContext
|
|
6986
6987
|
});
|
|
6987
6988
|
module2.exports = __toCommonJS2(LayoutGroupContext_exports);
|
|
6988
|
-
var
|
|
6989
|
+
var import_react2 = require("react"), LayoutGroupContext = (0, import_react2.createContext)({});
|
|
6989
6990
|
}
|
|
6990
6991
|
});
|
|
6991
6992
|
|
|
@@ -7006,7 +7007,7 @@ var require_PresenceContext_native = __commonJS({
|
|
|
7006
7007
|
PresenceContext: () => PresenceContext
|
|
7007
7008
|
});
|
|
7008
7009
|
module2.exports = __toCommonJS2(PresenceContext_exports);
|
|
7009
|
-
var
|
|
7010
|
+
var import_react2 = require("react"), PresenceContext = (0, import_react2.createContext)(null);
|
|
7010
7011
|
}
|
|
7011
7012
|
});
|
|
7012
7013
|
|
|
@@ -7029,16 +7030,16 @@ var require_usePresence_native = __commonJS({
|
|
|
7029
7030
|
usePresence: () => usePresence
|
|
7030
7031
|
});
|
|
7031
7032
|
module2.exports = __toCommonJS2(usePresence_exports);
|
|
7032
|
-
var
|
|
7033
|
+
var import_react2 = require("react"), import_PresenceContext = require_PresenceContext_native();
|
|
7033
7034
|
function usePresence() {
|
|
7034
|
-
let context = (0,
|
|
7035
|
+
let context = (0, import_react2.useContext)(import_PresenceContext.PresenceContext);
|
|
7035
7036
|
if (!context)
|
|
7036
7037
|
return [!0, null, context];
|
|
7037
|
-
let { isPresent: isPresent2, onExitComplete, register } = context, id = (0,
|
|
7038
|
-
return (0,
|
|
7038
|
+
let { isPresent: isPresent2, onExitComplete, register } = context, id = (0, import_react2.useId)() || "";
|
|
7039
|
+
return (0, import_react2.useEffect)(() => register(id), [id, register]), !isPresent2 && onExitComplete ? [!1, () => onExitComplete == null ? void 0 : onExitComplete(id), context] : [!0, void 0, context];
|
|
7039
7040
|
}
|
|
7040
7041
|
function useIsPresent() {
|
|
7041
|
-
return isPresent((0,
|
|
7042
|
+
return isPresent((0, import_react2.useContext)(import_PresenceContext.PresenceContext));
|
|
7042
7043
|
}
|
|
7043
7044
|
function isPresent(context) {
|
|
7044
7045
|
return context === null ? !0 : context.isPresent;
|
|
@@ -7086,7 +7087,7 @@ var require_PresenceChild_native = __commonJS({
|
|
|
7086
7087
|
PresenceChild: () => PresenceChild
|
|
7087
7088
|
});
|
|
7088
7089
|
module2.exports = __toCommonJS2(PresenceChild_exports);
|
|
7089
|
-
var import_use_presence = require_index_native12(), import_web = require_index_native9(),
|
|
7090
|
+
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 = ({
|
|
7090
7091
|
children,
|
|
7091
7092
|
initial,
|
|
7092
7093
|
isPresent,
|
|
@@ -7096,7 +7097,7 @@ var require_PresenceChild_native = __commonJS({
|
|
|
7096
7097
|
enterExitVariant,
|
|
7097
7098
|
presenceAffectsLayout
|
|
7098
7099
|
}) => {
|
|
7099
|
-
let presenceChildren =
|
|
7100
|
+
let presenceChildren = React2.useMemo(newChildrenMap, []), id = (0, import_react2.useId)() || "", context = React2.useMemo(
|
|
7100
7101
|
() => ({
|
|
7101
7102
|
id,
|
|
7102
7103
|
initial,
|
|
@@ -7121,7 +7122,7 @@ var require_PresenceChild_native = __commonJS({
|
|
|
7121
7122
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7122
7123
|
presenceAffectsLayout ? void 0 : [isPresent, exitVariant, enterVariant]
|
|
7123
7124
|
);
|
|
7124
|
-
return
|
|
7125
|
+
return React2.useMemo(() => {
|
|
7125
7126
|
presenceChildren.forEach((_, key) => presenceChildren.set(key, !1));
|
|
7126
7127
|
}, [isPresent]), (0, import_web.useIsomorphicLayoutEffect)(() => {
|
|
7127
7128
|
!(isPresent || presenceChildren.size) && (onExitComplete == null || onExitComplete());
|
|
@@ -7157,7 +7158,7 @@ var require_AnimatePresence_native = __commonJS({
|
|
|
7157
7158
|
AnimatePresence: () => AnimatePresence
|
|
7158
7159
|
});
|
|
7159
7160
|
module2.exports = __toCommonJS2(AnimatePresence_exports);
|
|
7160
|
-
var import_use_force_update = require_index_native11(), import_web = require_index_native9(),
|
|
7161
|
+
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 = process.env.NODE_ENV !== "production";
|
|
7161
7162
|
function updateChildLookup(children, allChildren) {
|
|
7162
7163
|
let seenChildren = isDev ? /* @__PURE__ */ new Set() : null;
|
|
7163
7164
|
children.forEach((child) => {
|
|
@@ -7169,9 +7170,9 @@ var require_AnimatePresence_native = __commonJS({
|
|
|
7169
7170
|
}
|
|
7170
7171
|
function onlyElements(children) {
|
|
7171
7172
|
let filtered = [];
|
|
7172
|
-
return
|
|
7173
|
-
(0,
|
|
7174
|
-
|
|
7173
|
+
return import_react2.Children.forEach(children, (child, index) => {
|
|
7174
|
+
(0, import_react2.isValidElement)(child) && (!child.key && import_react2.Children.count(children) > 1 ? (process.env.NODE_ENV === "development" && console.warn("No key given to AnimatePresence child, assigning index as key"), filtered.push(
|
|
7175
|
+
import_react2.default.cloneElement(child, {
|
|
7175
7176
|
key: index
|
|
7176
7177
|
})
|
|
7177
7178
|
)) : filtered.push(child));
|
|
@@ -7187,15 +7188,15 @@ var require_AnimatePresence_native = __commonJS({
|
|
|
7187
7188
|
exitBeforeEnter,
|
|
7188
7189
|
presenceAffectsLayout = !0
|
|
7189
7190
|
}) => {
|
|
7190
|
-
let forceRender = (0, import_use_force_update.useForceUpdate)(), isClientMounted = (0, import_web.useDidFinishSSR)(), forceRenderLayoutGroup = (0,
|
|
7191
|
+
let forceRender = (0, import_use_force_update.useForceUpdate)(), isClientMounted = (0, import_web.useDidFinishSSR)(), forceRenderLayoutGroup = (0, import_react2.useContext)(import_LayoutGroupContext.LayoutGroupContext).forceRender;
|
|
7191
7192
|
forceRenderLayoutGroup && (forceRender = forceRenderLayoutGroup);
|
|
7192
|
-
let isMounted = (0,
|
|
7193
|
-
(0,
|
|
7193
|
+
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);
|
|
7194
|
+
(0, import_react2.useEffect)(() => (isMounted.current = !0, () => {
|
|
7194
7195
|
isMounted.current = !1, isInitialRender.current = !0, allChildren.clear(), exiting.clear();
|
|
7195
7196
|
}), []), (0, import_web.useIsomorphicLayoutEffect)(() => {
|
|
7196
7197
|
isInitialRender.current = !1, updateChildLookup(filteredChildren, allChildren), presentChildren.current = childrenToRender;
|
|
7197
7198
|
});
|
|
7198
|
-
let hasWarned = process.env.NODE_ENV === "development" ? (0,
|
|
7199
|
+
let hasWarned = process.env.NODE_ENV === "development" ? (0, import_react2.useRef)(!1) : null;
|
|
7199
7200
|
if (isInitialRender.current)
|
|
7200
7201
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: childrenToRender.map((child) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
7201
7202
|
import_PresenceChild.PresenceChild,
|
|
@@ -7264,7 +7265,7 @@ var require_AnimatePresence_native = __commonJS({
|
|
|
7264
7265
|
},
|
|
7265
7266
|
getChildKey(child)
|
|
7266
7267
|
);
|
|
7267
|
-
}), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: exiting.size ? childrenToRender : childrenToRender.map((child) => (0,
|
|
7268
|
+
}), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children: exiting.size ? childrenToRender : childrenToRender.map((child) => (0, import_react2.cloneElement)(child)) });
|
|
7268
7269
|
};
|
|
7269
7270
|
AnimatePresence.displayName = "AnimatePresence";
|
|
7270
7271
|
}
|
|
@@ -7327,15 +7328,15 @@ var require_create_context_native = __commonJS({
|
|
|
7327
7328
|
createContextScope: () => createContextScope
|
|
7328
7329
|
});
|
|
7329
7330
|
module2.exports = __toCommonJS2(create_context_exports);
|
|
7330
|
-
var
|
|
7331
|
+
var React2 = __toESM2(require("react")), import_jsx_runtime6 = require("react/jsx-runtime");
|
|
7331
7332
|
function createContext(rootComponentName, defaultContext) {
|
|
7332
|
-
let Context =
|
|
7333
|
+
let Context = React2.createContext(defaultContext);
|
|
7333
7334
|
function Provider(props) {
|
|
7334
|
-
let { children, ...context } = props, value =
|
|
7335
|
+
let { children, ...context } = props, value = React2.useMemo(() => context, Object.values(context));
|
|
7335
7336
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Context.Provider, { value, children });
|
|
7336
7337
|
}
|
|
7337
7338
|
function useContext(consumerName) {
|
|
7338
|
-
let context =
|
|
7339
|
+
let context = React2.useContext(Context);
|
|
7339
7340
|
if (context)
|
|
7340
7341
|
return context;
|
|
7341
7342
|
if (defaultContext !== void 0)
|
|
@@ -7347,17 +7348,17 @@ var require_create_context_native = __commonJS({
|
|
|
7347
7348
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
7348
7349
|
let defaultContexts = [];
|
|
7349
7350
|
function createContext2(rootComponentName, defaultContext) {
|
|
7350
|
-
let BaseContext =
|
|
7351
|
+
let BaseContext = React2.createContext(defaultContext), index = defaultContexts.length;
|
|
7351
7352
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
7352
7353
|
function Provider(props) {
|
|
7353
|
-
let { scope, children, ...context } = props, Context = (scope == null ? void 0 : scope[scopeName][index]) || BaseContext, value =
|
|
7354
|
+
let { scope, children, ...context } = props, Context = (scope == null ? void 0 : scope[scopeName][index]) || BaseContext, value = React2.useMemo(
|
|
7354
7355
|
() => context,
|
|
7355
7356
|
Object.values(context)
|
|
7356
7357
|
);
|
|
7357
7358
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Context.Provider, { value, children });
|
|
7358
7359
|
}
|
|
7359
7360
|
function useContext(consumerName, scope, options) {
|
|
7360
|
-
let Context = (scope == null ? void 0 : scope[scopeName][index]) || BaseContext, context =
|
|
7361
|
+
let Context = (scope == null ? void 0 : scope[scopeName][index]) || BaseContext, context = React2.useContext(Context);
|
|
7361
7362
|
if (context)
|
|
7362
7363
|
return context;
|
|
7363
7364
|
if (defaultContext !== void 0)
|
|
@@ -7370,10 +7371,10 @@ var require_create_context_native = __commonJS({
|
|
|
7370
7371
|
return Provider.displayName = `${rootComponentName}Provider`, [Provider, useContext];
|
|
7371
7372
|
}
|
|
7372
7373
|
let createScope = () => {
|
|
7373
|
-
let scopeContexts = defaultContexts.map((defaultContext) =>
|
|
7374
|
+
let scopeContexts = defaultContexts.map((defaultContext) => React2.createContext(defaultContext));
|
|
7374
7375
|
return function(scope) {
|
|
7375
7376
|
let contexts = (scope == null ? void 0 : scope[scopeName]) || scopeContexts;
|
|
7376
|
-
return
|
|
7377
|
+
return React2.useMemo(
|
|
7377
7378
|
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
7378
7379
|
[scope, contexts]
|
|
7379
7380
|
);
|
|
@@ -7398,7 +7399,7 @@ var require_create_context_native = __commonJS({
|
|
|
7398
7399
|
let currentScope = useScope(overrideScopes)[`__scope${scopeName}`];
|
|
7399
7400
|
return { ...nextScopes2, ...currentScope };
|
|
7400
7401
|
}, {});
|
|
7401
|
-
return
|
|
7402
|
+
return React2.useMemo(
|
|
7402
7403
|
() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }),
|
|
7403
7404
|
[nextScopes]
|
|
7404
7405
|
);
|
|
@@ -7441,7 +7442,7 @@ var require_useControllableState_native = __commonJS({
|
|
|
7441
7442
|
useControllableState: () => useControllableState
|
|
7442
7443
|
});
|
|
7443
7444
|
module2.exports = __toCommonJS2(useControllableState_exports);
|
|
7444
|
-
var import_use_event = require_index_native8(),
|
|
7445
|
+
var import_use_event = require_index_native8(), import_react2 = require("react"), emptyCallbackFn = (_) => _();
|
|
7445
7446
|
function useControllableState({
|
|
7446
7447
|
prop,
|
|
7447
7448
|
defaultProp,
|
|
@@ -7450,12 +7451,12 @@ var require_useControllableState_native = __commonJS({
|
|
|
7450
7451
|
preventUpdate,
|
|
7451
7452
|
transition
|
|
7452
7453
|
}) {
|
|
7453
|
-
let [state, setState] = (0,
|
|
7454
|
-
(0,
|
|
7454
|
+
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;
|
|
7455
|
+
(0, import_react2.useEffect)(() => {
|
|
7455
7456
|
prop !== void 0 && (previous.current = prop, transitionFn(() => {
|
|
7456
7457
|
setState(prop);
|
|
7457
7458
|
}));
|
|
7458
|
-
}, [prop]), (0,
|
|
7459
|
+
}, [prop]), (0, import_react2.useEffect)(() => {
|
|
7459
7460
|
propWins || state !== previous.current && (previous.current = state, onChangeCb(state));
|
|
7460
7461
|
}, [onChangeCb, state, propWins]);
|
|
7461
7462
|
let setter = (0, import_use_event.useEvent)((next) => {
|
|
@@ -7519,7 +7520,7 @@ var require_Collapsible_native = __commonJS({
|
|
|
7519
7520
|
createCollapsibleScope: () => createCollapsibleScope
|
|
7520
7521
|
});
|
|
7521
7522
|
module2.exports = __toCommonJS2(Collapsible_exports);
|
|
7522
|
-
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(),
|
|
7523
|
+
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(
|
|
7523
7524
|
(props, forwardedRef) => {
|
|
7524
7525
|
let {
|
|
7525
7526
|
__scopeCollapsible,
|
|
@@ -7538,9 +7539,9 @@ var require_Collapsible_native = __commonJS({
|
|
|
7538
7539
|
{
|
|
7539
7540
|
scope: __scopeCollapsible,
|
|
7540
7541
|
disabled,
|
|
7541
|
-
contentId:
|
|
7542
|
+
contentId: React2.useId(),
|
|
7542
7543
|
open,
|
|
7543
|
-
onOpenToggle:
|
|
7544
|
+
onOpenToggle: React2.useCallback(
|
|
7544
7545
|
() => setOpen((prevOpen) => !prevOpen),
|
|
7545
7546
|
[setOpen]
|
|
7546
7547
|
),
|
|
@@ -7637,33 +7638,33 @@ var require_Collection_native = __commonJS({
|
|
|
7637
7638
|
createCollection: () => createCollection
|
|
7638
7639
|
});
|
|
7639
7640
|
module2.exports = __toCommonJS2(Collection_exports);
|
|
7640
|
-
var import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_create_context = require_index_native14(),
|
|
7641
|
+
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");
|
|
7641
7642
|
function createCollection(name) {
|
|
7642
7643
|
let PROVIDER_NAME = name + "CollectionProvider", [createCollectionContext, createCollectionScope] = (0, import_create_context.createContextScope)(PROVIDER_NAME), [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, {
|
|
7643
7644
|
collectionRef: { current: null },
|
|
7644
7645
|
itemMap: /* @__PURE__ */ new Map()
|
|
7645
7646
|
}), CollectionProvider = (props) => {
|
|
7646
|
-
let { scope, children } = props, ref =
|
|
7647
|
+
let { scope, children } = props, ref = import_react2.default.useRef(null), itemMap = import_react2.default.useRef(/* @__PURE__ */ new Map()).current;
|
|
7647
7648
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
7648
7649
|
};
|
|
7649
7650
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
7650
|
-
let COLLECTION_SLOT_NAME = name + "CollectionSlot", CollectionSlot =
|
|
7651
|
+
let COLLECTION_SLOT_NAME = name + "CollectionSlot", CollectionSlot = import_react2.default.forwardRef(
|
|
7651
7652
|
(props, forwardedRef) => {
|
|
7652
7653
|
let { scope, children } = props, context = useCollectionContext(COLLECTION_SLOT_NAME, scope), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);
|
|
7653
7654
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Slot, { ref: composedRefs, children });
|
|
7654
7655
|
}
|
|
7655
7656
|
);
|
|
7656
7657
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
7657
|
-
let ITEM_SLOT_NAME = name + "CollectionItemSlot", ITEM_DATA_ATTR = "data-collection-item", CollectionItemSlot =
|
|
7658
|
+
let ITEM_SLOT_NAME = name + "CollectionItemSlot", ITEM_DATA_ATTR = "data-collection-item", CollectionItemSlot = import_react2.default.forwardRef(
|
|
7658
7659
|
(props, forwardedRef) => {
|
|
7659
|
-
let { scope, children, ...itemData } = props, ref =
|
|
7660
|
-
return
|
|
7660
|
+
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);
|
|
7661
|
+
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 });
|
|
7661
7662
|
}
|
|
7662
7663
|
);
|
|
7663
7664
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
7664
7665
|
function useCollection(scope) {
|
|
7665
7666
|
let context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
7666
|
-
return
|
|
7667
|
+
return import_react2.default.useCallback(() => {
|
|
7667
7668
|
if (!import_core12.isWeb)
|
|
7668
7669
|
return [];
|
|
7669
7670
|
let collectionNode = context.collectionRef.current;
|
|
@@ -8305,7 +8306,7 @@ var require_wrapChildrenInText_native = __commonJS({
|
|
|
8305
8306
|
wrapChildrenInText: () => wrapChildrenInText
|
|
8306
8307
|
});
|
|
8307
8308
|
module2.exports = __toCommonJS2(wrapChildrenInText_exports);
|
|
8308
|
-
var
|
|
8309
|
+
var import_react2 = __toESM2(require("react")), import_jsx_runtime6 = (
|
|
8309
8310
|
// so "data-disable-theme" is a hack to fix themeInverse, don't ask me why
|
|
8310
8311
|
require("react/jsx-runtime")
|
|
8311
8312
|
);
|
|
@@ -8329,7 +8330,7 @@ var require_wrapChildrenInText_native = __commonJS({
|
|
|
8329
8330
|
let props = {
|
|
8330
8331
|
...extraProps
|
|
8331
8332
|
};
|
|
8332
|
-
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),
|
|
8333
|
+
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);
|
|
8333
8334
|
}
|
|
8334
8335
|
}
|
|
8335
8336
|
});
|
|
@@ -8393,12 +8394,12 @@ var require_useDirection_native = __commonJS({
|
|
|
8393
8394
|
useDirection: () => useDirection
|
|
8394
8395
|
});
|
|
8395
8396
|
module2.exports = __toCommonJS2(useDirection_exports);
|
|
8396
|
-
var
|
|
8397
|
+
var React2 = __toESM2(require("react")), import_jsx_runtime6 = require("react/jsx-runtime"), DirectionContext = React2.createContext(void 0), DirectionProvider = (props) => {
|
|
8397
8398
|
let { dir, children } = props;
|
|
8398
8399
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DirectionContext.Provider, { value: dir, children });
|
|
8399
8400
|
};
|
|
8400
8401
|
function useDirection(localDir) {
|
|
8401
|
-
let globalDir =
|
|
8402
|
+
let globalDir = React2.useContext(DirectionContext);
|
|
8402
8403
|
return localDir || globalDir || "ltr";
|
|
8403
8404
|
}
|
|
8404
8405
|
var Provider = DirectionProvider;
|
|
@@ -8445,10 +8446,10 @@ var require_Accordion_native = __commonJS({
|
|
|
8445
8446
|
createAccordionScope: () => createAccordionScope
|
|
8446
8447
|
});
|
|
8447
8448
|
module2.exports = __toCommonJS2(Accordion_exports);
|
|
8448
|
-
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(),
|
|
8449
|
+
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)(
|
|
8449
8450
|
ACCORDION_NAME,
|
|
8450
8451
|
[createCollectionScope, import_collapsible.createCollapsibleScope]
|
|
8451
|
-
), useCollapsibleScope = (0, import_collapsible.createCollapsibleScope)(), AccordionComponent =
|
|
8452
|
+
), useCollapsibleScope = (0, import_collapsible.createCollapsibleScope)(), AccordionComponent = React2.forwardRef((props, forwardedRef) => {
|
|
8452
8453
|
let { type, ...accordionProps } = props, singleProps = accordionProps, multipleProps = accordionProps;
|
|
8453
8454
|
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 }) });
|
|
8454
8455
|
});
|
|
@@ -8465,7 +8466,7 @@ var require_Accordion_native = __commonJS({
|
|
|
8465
8466
|
) : null;
|
|
8466
8467
|
}
|
|
8467
8468
|
};
|
|
8468
|
-
var [AccordionValueProvider, useAccordionValueContext] = createAccordionContext(ACCORDION_NAME), [AccordionCollapsibleProvider, useAccordionCollapsibleContext] = createAccordionContext(ACCORDION_NAME, { collapsible: !1 }), AccordionImplSingle =
|
|
8469
|
+
var [AccordionValueProvider, useAccordionValueContext] = createAccordionContext(ACCORDION_NAME), [AccordionCollapsibleProvider, useAccordionCollapsibleContext] = createAccordionContext(ACCORDION_NAME, { collapsible: !1 }), AccordionImplSingle = React2.forwardRef((props, forwardedRef) => {
|
|
8469
8470
|
let {
|
|
8470
8471
|
value: valueProp,
|
|
8471
8472
|
defaultValue,
|
|
@@ -8485,7 +8486,7 @@ var require_Accordion_native = __commonJS({
|
|
|
8485
8486
|
scope: props.__scopeAccordion,
|
|
8486
8487
|
value: value ? [value] : [],
|
|
8487
8488
|
onItemOpen: setValue,
|
|
8488
|
-
onItemClose:
|
|
8489
|
+
onItemClose: React2.useCallback(
|
|
8489
8490
|
() => collapsible && setValue(""),
|
|
8490
8491
|
[setValue, collapsible]
|
|
8491
8492
|
),
|
|
@@ -8499,7 +8500,7 @@ var require_Accordion_native = __commonJS({
|
|
|
8499
8500
|
)
|
|
8500
8501
|
}
|
|
8501
8502
|
);
|
|
8502
|
-
}), AccordionImplMultiple =
|
|
8503
|
+
}), AccordionImplMultiple = React2.forwardRef((props, forwardedRef) => {
|
|
8503
8504
|
let {
|
|
8504
8505
|
value: valueProp,
|
|
8505
8506
|
defaultValue,
|
|
@@ -8510,10 +8511,10 @@ var require_Accordion_native = __commonJS({
|
|
|
8510
8511
|
prop: valueProp,
|
|
8511
8512
|
defaultProp: defaultValue || [],
|
|
8512
8513
|
onChange: onValueChange
|
|
8513
|
-
}), handleItemOpen =
|
|
8514
|
+
}), handleItemOpen = React2.useCallback(
|
|
8514
8515
|
(itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]),
|
|
8515
8516
|
[setValue]
|
|
8516
|
-
), handleItemClose =
|
|
8517
|
+
), handleItemClose = React2.useCallback(
|
|
8517
8518
|
(itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)),
|
|
8518
8519
|
[setValue]
|
|
8519
8520
|
);
|
|
@@ -8527,7 +8528,7 @@ var require_Accordion_native = __commonJS({
|
|
|
8527
8528
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionCollapsibleProvider, { scope: props.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionImpl, { ...accordionMultipleProps, ref: forwardedRef }) })
|
|
8528
8529
|
}
|
|
8529
8530
|
);
|
|
8530
|
-
}), [AccordionImplProvider, useAccordionContext] = createAccordionContext(ACCORDION_NAME), AccordionImpl =
|
|
8531
|
+
}), [AccordionImplProvider, useAccordionContext] = createAccordionContext(ACCORDION_NAME), AccordionImpl = React2.forwardRef(
|
|
8531
8532
|
(props, forwardedRef) => {
|
|
8532
8533
|
let {
|
|
8533
8534
|
__scopeAccordion,
|
|
@@ -8535,7 +8536,7 @@ var require_Accordion_native = __commonJS({
|
|
|
8535
8536
|
dir,
|
|
8536
8537
|
orientation = "vertical",
|
|
8537
8538
|
...accordionProps
|
|
8538
|
-
} = props, accordionRef =
|
|
8539
|
+
} = 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)(
|
|
8539
8540
|
props.onKeyDown,
|
|
8540
8541
|
(event) => {
|
|
8541
8542
|
var _a;
|
|
@@ -8600,9 +8601,9 @@ var require_Accordion_native = __commonJS({
|
|
|
8600
8601
|
}
|
|
8601
8602
|
);
|
|
8602
8603
|
}
|
|
8603
|
-
), ITEM_NAME = "AccordionItem", [AccordionItemProvider, useAccordionItemContext] = createAccordionContext(ITEM_NAME), AccordionItem =
|
|
8604
|
+
), ITEM_NAME = "AccordionItem", [AccordionItemProvider, useAccordionItemContext] = createAccordionContext(ITEM_NAME), AccordionItem = React2.forwardRef(
|
|
8604
8605
|
(props, forwardedRef) => {
|
|
8605
|
-
let { __scopeAccordion, value, ...accordionItemProps } = props, accordionContext = useAccordionContext(ITEM_NAME, __scopeAccordion), valueContext = useAccordionValueContext(ITEM_NAME, __scopeAccordion), collapsibleScope = useCollapsibleScope(__scopeAccordion), triggerId =
|
|
8606
|
+
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;
|
|
8606
8607
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
8607
8608
|
AccordionItemProvider,
|
|
8608
8609
|
{
|
|
@@ -8630,7 +8631,7 @@ var require_Accordion_native = __commonJS({
|
|
|
8630
8631
|
}
|
|
8631
8632
|
);
|
|
8632
8633
|
AccordionItem.displayName = ITEM_NAME;
|
|
8633
|
-
var HEADER_NAME = "AccordionHeader", AccordionHeader =
|
|
8634
|
+
var HEADER_NAME = "AccordionHeader", AccordionHeader = React2.forwardRef(
|
|
8634
8635
|
(props, forwardedRef) => {
|
|
8635
8636
|
let { __scopeAccordion, ...headerProps } = props, accordionContext = useAccordionContext(ACCORDION_NAME, __scopeAccordion), itemContext = useAccordionItemContext(HEADER_NAME, __scopeAccordion);
|
|
8636
8637
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -8759,19 +8760,19 @@ var require_Adapt_native = __commonJS({
|
|
|
8759
8760
|
useAdaptParent: () => useAdaptParent
|
|
8760
8761
|
});
|
|
8761
8762
|
module2.exports = __toCommonJS2(Adapt_exports);
|
|
8762
|
-
var import_core12 = require_index_native10(),
|
|
8763
|
-
let context = (0,
|
|
8763
|
+
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) => {
|
|
8764
|
+
let context = (0, import_react2.useContext)(AdaptParentContext);
|
|
8764
8765
|
if (!(context != null && context.Contents))
|
|
8765
8766
|
throw new Error("Adapt not supported by this component");
|
|
8766
|
-
return (0,
|
|
8767
|
+
return (0, import_react2.createElement)(context.Contents, props);
|
|
8767
8768
|
};
|
|
8768
8769
|
AdaptContents.shouldForwardSpace = !0;
|
|
8769
8770
|
var useAdaptParent = ({
|
|
8770
8771
|
Contents
|
|
8771
8772
|
}) => {
|
|
8772
|
-
let [when, setWhen] = (0,
|
|
8773
|
+
let [when, setWhen] = (0, import_react2.useState)(null);
|
|
8773
8774
|
return {
|
|
8774
|
-
AdaptProvider: (0,
|
|
8775
|
+
AdaptProvider: (0, import_react2.useMemo)(() => {
|
|
8775
8776
|
let context = {
|
|
8776
8777
|
Contents,
|
|
8777
8778
|
setWhen
|
|
@@ -8785,7 +8786,7 @@ var require_Adapt_native = __commonJS({
|
|
|
8785
8786
|
};
|
|
8786
8787
|
}, Adapt = (0, import_core12.withStaticProperties)(
|
|
8787
8788
|
function({ platform, when, children }) {
|
|
8788
|
-
let context = (0,
|
|
8789
|
+
let context = (0, import_react2.useContext)(AdaptParentContext), media = (0, import_core12.useMedia)(), enabled = !platform;
|
|
8789
8790
|
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)(() => {
|
|
8790
8791
|
enabled && (context == null || context.setWhen(when || enabled));
|
|
8791
8792
|
}, [when, context, enabled]), enabled ? children : null;
|
|
@@ -8867,7 +8868,7 @@ var require_Dismissable_native = __commonJS({
|
|
|
8867
8868
|
DismissableBranch: () => DismissableBranch
|
|
8868
8869
|
});
|
|
8869
8870
|
module2.exports = __toCommonJS2(Dismissable_native_exports);
|
|
8870
|
-
var
|
|
8871
|
+
var import_react2 = require("react"), Dismissable = (0, import_react2.forwardRef)((props, _ref) => props.children), DismissableBranch = (0, import_react2.forwardRef)((props, _ref) => props.children);
|
|
8871
8872
|
}
|
|
8872
8873
|
});
|
|
8873
8874
|
|
|
@@ -8903,7 +8904,7 @@ var require_FocusScope_native = __commonJS({
|
|
|
8903
8904
|
FocusScope: () => FocusScope
|
|
8904
8905
|
});
|
|
8905
8906
|
module2.exports = __toCommonJS2(FocusScope_native_exports);
|
|
8906
|
-
var
|
|
8907
|
+
var import_react2 = require("react"), FocusScope = (0, import_react2.forwardRef)((props, _ref) => props.children);
|
|
8907
8908
|
}
|
|
8908
8909
|
});
|
|
8909
8910
|
|
|
@@ -8951,7 +8952,7 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
8951
8952
|
usePortal: () => usePortal
|
|
8952
8953
|
});
|
|
8953
8954
|
module2.exports = __toCommonJS2(GorhomPortal_exports);
|
|
8954
|
-
var import_core12 = require_index_native10(),
|
|
8955
|
+
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) => {
|
|
8955
8956
|
hostName in state || (state = registerHost(state, hostName));
|
|
8956
8957
|
let index = state[hostName].findIndex((item) => item.name === portalName);
|
|
8957
8958
|
return index !== -1 ? state[hostName][index].node = node : state[hostName].push({
|
|
@@ -8988,37 +8989,37 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
8988
8989
|
default:
|
|
8989
8990
|
return state;
|
|
8990
8991
|
}
|
|
8991
|
-
}, PortalStateContext = (0,
|
|
8992
|
-
let state = (0,
|
|
8992
|
+
}, PortalStateContext = (0, import_react2.createContext)(null), PortalDispatchContext = (0, import_react2.createContext)(null), usePortalState = (hostName) => {
|
|
8993
|
+
let state = (0, import_react2.useContext)(PortalStateContext);
|
|
8993
8994
|
if (state === null)
|
|
8994
8995
|
throw new Error(
|
|
8995
8996
|
"'PortalStateContext' cannot be null, please add 'PortalProvider' to the root component."
|
|
8996
8997
|
);
|
|
8997
8998
|
return state[hostName] || [];
|
|
8998
8999
|
}, usePortal = (hostName = "root") => {
|
|
8999
|
-
let dispatch = (0,
|
|
9000
|
+
let dispatch = (0, import_react2.useContext)(PortalDispatchContext);
|
|
9000
9001
|
if (dispatch === null)
|
|
9001
9002
|
throw new Error(
|
|
9002
9003
|
"'PortalDispatchContext' cannot be null, please add 'PortalProvider' to the root component."
|
|
9003
9004
|
);
|
|
9004
|
-
let registerHost2 = (0,
|
|
9005
|
+
let registerHost2 = (0, import_react2.useCallback)(() => {
|
|
9005
9006
|
dispatch({
|
|
9006
9007
|
type: 0,
|
|
9007
9008
|
hostName
|
|
9008
9009
|
});
|
|
9009
|
-
}, []), deregisterHost2 = (0,
|
|
9010
|
+
}, []), deregisterHost2 = (0, import_react2.useCallback)(() => {
|
|
9010
9011
|
dispatch({
|
|
9011
9012
|
type: 1,
|
|
9012
9013
|
hostName
|
|
9013
9014
|
});
|
|
9014
|
-
}, []), addUpdatePortal2 = (0,
|
|
9015
|
+
}, []), addUpdatePortal2 = (0, import_react2.useCallback)((name, node) => {
|
|
9015
9016
|
dispatch({
|
|
9016
9017
|
type: 2,
|
|
9017
9018
|
hostName,
|
|
9018
9019
|
portalName: name,
|
|
9019
9020
|
node
|
|
9020
9021
|
});
|
|
9021
|
-
}, []), removePortal2 = (0,
|
|
9022
|
+
}, []), removePortal2 = (0, import_react2.useCallback)((name) => {
|
|
9022
9023
|
dispatch({
|
|
9023
9024
|
type: 3,
|
|
9024
9025
|
hostName,
|
|
@@ -9037,8 +9038,8 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
9037
9038
|
shouldAddRootHost = !0,
|
|
9038
9039
|
children
|
|
9039
9040
|
}) => {
|
|
9040
|
-
let [state, dispatch] = (0,
|
|
9041
|
-
(0,
|
|
9041
|
+
let [state, dispatch] = (0, import_react2.useReducer)(reducer, INITIAL_STATE), transitionDispatch = (0, import_react2.useMemo)(() => (value) => {
|
|
9042
|
+
(0, import_react2.startTransition)(() => {
|
|
9042
9043
|
dispatch(value);
|
|
9043
9044
|
});
|
|
9044
9045
|
}, [dispatch]);
|
|
@@ -9046,11 +9047,11 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
9046
9047
|
children,
|
|
9047
9048
|
shouldAddRootHost && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalHost, { name: rootHostName })
|
|
9048
9049
|
] }) });
|
|
9049
|
-
}, PortalProvider2 = (0,
|
|
9050
|
+
}, PortalProvider2 = (0, import_react2.memo)(PortalProviderComponent);
|
|
9050
9051
|
PortalProvider2.displayName = "PortalProvider";
|
|
9051
9052
|
var defaultRenderer = (children) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children }), PortalHostComponent = (props) => {
|
|
9052
9053
|
let { name, forwardProps, render = defaultRenderer } = props, isServer2 = !(0, import_core12.useDidFinishSSR)(), state = usePortalState(name), { registerHost: registerHost2, deregisterHost: deregisterHost2 } = usePortal(props.name);
|
|
9053
|
-
return (0,
|
|
9054
|
+
return (0, import_react2.useEffect)(() => {
|
|
9054
9055
|
if (!isServer2)
|
|
9055
9056
|
return registerHost2(), () => {
|
|
9056
9057
|
deregisterHost2();
|
|
@@ -9058,10 +9059,10 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
9058
9059
|
}, [isServer2]), render(
|
|
9059
9060
|
forwardProps ? state.map((item) => {
|
|
9060
9061
|
let next = item.node;
|
|
9061
|
-
return forwardProps ?
|
|
9062
|
+
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;
|
|
9062
9063
|
}) : state.map((item) => item.node)
|
|
9063
9064
|
);
|
|
9064
|
-
}, PortalHost = (0,
|
|
9065
|
+
}, PortalHost = (0, import_react2.memo)(PortalHostComponent);
|
|
9065
9066
|
PortalHost.displayName = "PortalHost";
|
|
9066
9067
|
var PortalComponent = (props) => {
|
|
9067
9068
|
let {
|
|
@@ -9071,7 +9072,7 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
9071
9072
|
handleOnUnmount: _providedHandleOnUnmount,
|
|
9072
9073
|
handleOnUpdate: _providedHandleOnUpdate,
|
|
9073
9074
|
children
|
|
9074
|
-
} = props, { addPortal: addUpdatePortal2, removePortal: removePortal2 } = usePortal(hostName), id = (0,
|
|
9075
|
+
} = props, { addPortal: addUpdatePortal2, removePortal: removePortal2 } = usePortal(hostName), id = (0, import_react2.useId)(), name = _providedName || id, handleOnMount = (0, import_core12.useEvent)(() => {
|
|
9075
9076
|
_providedHandleOnMount ? _providedHandleOnMount(() => addUpdatePortal2(name, children)) : addUpdatePortal2(name, children);
|
|
9076
9077
|
}), handleOnUnmount = (0, import_core12.useEvent)(() => {
|
|
9077
9078
|
_providedHandleOnUnmount ? _providedHandleOnUnmount(() => removePortal2(name)) : removePortal2(name);
|
|
@@ -9080,10 +9081,10 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
9080
9081
|
});
|
|
9081
9082
|
return (0, import_core12.useIsomorphicLayoutEffect)(() => (handleOnMount(), () => {
|
|
9082
9083
|
handleOnUnmount();
|
|
9083
|
-
}), []), (0,
|
|
9084
|
+
}), []), (0, import_react2.useEffect)(() => {
|
|
9084
9085
|
handleOnUpdate();
|
|
9085
9086
|
}, [children]), null;
|
|
9086
|
-
}, PortalItem = (0,
|
|
9087
|
+
}, PortalItem = (0, import_react2.memo)(PortalComponent);
|
|
9087
9088
|
PortalItem.displayName = "Portal";
|
|
9088
9089
|
}
|
|
9089
9090
|
});
|
|
@@ -9112,10 +9113,10 @@ var require_Portal_native = __commonJS({
|
|
|
9112
9113
|
Portal: () => Portal
|
|
9113
9114
|
});
|
|
9114
9115
|
module2.exports = __toCommonJS2(Portal_native_exports);
|
|
9115
|
-
var import_stacks3 = require_index_native20(),
|
|
9116
|
+
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;
|
|
9116
9117
|
isFabric ? createPortal = require_fake_react_native().createPortal : createPortal = require_fake_react_native().createPortal;
|
|
9117
9118
|
var Portal = (props) => {
|
|
9118
|
-
let rootTag =
|
|
9119
|
+
let rootTag = React2.useContext(import_react_native4.RootTagContext), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
9119
9120
|
import_stacks3.YStack,
|
|
9120
9121
|
{
|
|
9121
9122
|
pointerEvents: "box-none",
|
|
@@ -9269,15 +9270,15 @@ var require_useSheetController_native = __commonJS({
|
|
|
9269
9270
|
useSheetController: () => useSheetController
|
|
9270
9271
|
});
|
|
9271
9272
|
module2.exports = __toCommonJS2(useSheetController_exports);
|
|
9272
|
-
var
|
|
9273
|
-
let controller = (0,
|
|
9273
|
+
var import_react2 = require("react"), useSheetController = () => {
|
|
9274
|
+
let controller = (0, import_react2.useContext)(SheetControllerContext), isHidden = controller == null ? void 0 : controller.hidden, isShowingNonSheet = isHidden && (controller == null ? void 0 : controller.open);
|
|
9274
9275
|
return {
|
|
9275
9276
|
controller,
|
|
9276
9277
|
isHidden,
|
|
9277
9278
|
isShowingNonSheet,
|
|
9278
9279
|
disableDrag: controller == null ? void 0 : controller.disableDrag
|
|
9279
9280
|
};
|
|
9280
|
-
}, SheetControllerContext = (0,
|
|
9281
|
+
}, SheetControllerContext = (0, import_react2.createContext)(
|
|
9281
9282
|
null
|
|
9282
9283
|
);
|
|
9283
9284
|
}
|
|
@@ -9338,11 +9339,11 @@ var require_index_native31 = __commonJS({
|
|
|
9338
9339
|
useConstant: () => useConstant
|
|
9339
9340
|
});
|
|
9340
9341
|
module2.exports = __toCommonJS2(src_exports2);
|
|
9341
|
-
var
|
|
9342
|
+
var import_react2 = require("react");
|
|
9342
9343
|
function useConstant(fn) {
|
|
9343
9344
|
if (typeof document > "u")
|
|
9344
|
-
return (0,
|
|
9345
|
-
let ref = (0,
|
|
9345
|
+
return (0, import_react2.useMemo)(() => fn(), []);
|
|
9346
|
+
let ref = (0, import_react2.useRef)();
|
|
9346
9347
|
return ref.current || (ref.current = { v: fn() }), ref.current.v;
|
|
9347
9348
|
}
|
|
9348
9349
|
}
|
|
@@ -9372,9 +9373,9 @@ var require_useSheetProviderProps_native = __commonJS({
|
|
|
9372
9373
|
useSheetProviderProps: () => useSheetProviderProps
|
|
9373
9374
|
});
|
|
9374
9375
|
module2.exports = __toCommonJS2(useSheetProviderProps_exports);
|
|
9375
|
-
var import_core12 = require_index_native10(), import_use_constant = require_index_native31(), import_use_controllable_state = require_index_native15(),
|
|
9376
|
+
var import_core12 = require_index_native10(), import_use_constant = require_index_native31(), import_use_controllable_state = require_index_native15(), import_react2 = __toESM2(require("react"));
|
|
9376
9377
|
function useSheetProviderProps(props, state, options = {}) {
|
|
9377
|
-
let contentRef =
|
|
9378
|
+
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)(
|
|
9378
9379
|
() => props.dismissOnSnapToBottom ? [...snapPointsProp, 0] : snapPointsProp,
|
|
9379
9380
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
9380
9381
|
[JSON.stringify(snapPointsProp), props.dismissOnSnapToBottom]
|
|
@@ -9384,7 +9385,7 @@ var require_useSheetProviderProps_native = __commonJS({
|
|
|
9384
9385
|
onChange: props.onPositionChange,
|
|
9385
9386
|
strategy: "most-recent-wins",
|
|
9386
9387
|
transition: !0
|
|
9387
|
-
}), position = state.open === !1 ? -1 : position_, { open } = state, setPosition = (0,
|
|
9388
|
+
}), position = state.open === !1 ? -1 : position_, { open } = state, setPosition = (0, import_react2.useCallback)(
|
|
9388
9389
|
(next) => {
|
|
9389
9390
|
props.dismissOnSnapToBottom && next === snapPoints.length - 1 ? state.setOpen(!1) : setPositionImmediate(next);
|
|
9390
9391
|
},
|
|
@@ -9413,7 +9414,7 @@ var require_useSheetProviderProps_native = __commonJS({
|
|
|
9413
9414
|
"\u26A0\uFE0F Invalid snapPoint given, snapPoints must be numeric values between 0 and 100 when snapPointsMode is percent"
|
|
9414
9415
|
)), open && props.dismissOnSnapToBottom && position === snapPoints.length - 1 && setPositionImmediate(0);
|
|
9415
9416
|
let shouldSetPositionOpen = open && position < 0;
|
|
9416
|
-
if ((0,
|
|
9417
|
+
if ((0, import_react2.useEffect)(() => {
|
|
9417
9418
|
shouldSetPositionOpen && setPosition(0);
|
|
9418
9419
|
}, [setPosition, shouldSetPositionOpen]), !(0, import_core12.useAnimationDriver)())
|
|
9419
9420
|
throw new Error("Must set animations in tamagui.config.ts");
|
|
@@ -9476,7 +9477,7 @@ var require_nativeSheet_native = __commonJS({
|
|
|
9476
9477
|
setupNativeSheet: () => setupNativeSheet2
|
|
9477
9478
|
});
|
|
9478
9479
|
module2.exports = __toCommonJS2(nativeSheet_exports);
|
|
9479
|
-
var import_stacks3 = require_index_native20(),
|
|
9480
|
+
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 = {
|
|
9480
9481
|
ios: null
|
|
9481
9482
|
};
|
|
9482
9483
|
function getNativeSheet(platform) {
|
|
@@ -9484,8 +9485,8 @@ var require_nativeSheet_native = __commonJS({
|
|
|
9484
9485
|
}
|
|
9485
9486
|
function setupNativeSheet2(platform, Implementation) {
|
|
9486
9487
|
platform === "ios" && (nativeSheets[platform] = (props) => {
|
|
9487
|
-
let state = (0, import_useSheetOpenState.useSheetOpenState)(props), providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state), { open, setOpen } = state, ref = (0,
|
|
9488
|
-
return (0,
|
|
9488
|
+
let state = (0, import_useSheetOpenState.useSheetOpenState)(props), providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state), { open, setOpen } = state, ref = (0, import_react2.useRef)();
|
|
9489
|
+
return (0, import_react2.useEffect)(() => {
|
|
9489
9490
|
var _a;
|
|
9490
9491
|
(_a = ref.current) == null || _a.setVisibility(open);
|
|
9491
9492
|
}, [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: [
|
|
@@ -9524,9 +9525,9 @@ var require_useKeyboardVisible_native = __commonJS({
|
|
|
9524
9525
|
useKeyboardVisible: () => useKeyboardVisible2
|
|
9525
9526
|
});
|
|
9526
9527
|
module2.exports = __toCommonJS2(useKeyboardVisible_exports);
|
|
9527
|
-
var
|
|
9528
|
-
let [isKeyboardVisible, setKeyboardVisible] = (0,
|
|
9529
|
-
return (0,
|
|
9528
|
+
var import_react2 = require("react"), import_react_native4 = require_fake_react_native(), useKeyboardVisible2 = () => {
|
|
9529
|
+
let [isKeyboardVisible, setKeyboardVisible] = (0, import_react2.useState)(!1);
|
|
9530
|
+
return (0, import_react2.useEffect)(() => {
|
|
9530
9531
|
let keyboardDidShowListener = import_react_native4.Keyboard.addListener("keyboardDidShow", () => {
|
|
9531
9532
|
setKeyboardVisible(!0);
|
|
9532
9533
|
}), keyboardDidHideListener = import_react_native4.Keyboard.addListener("keyboardDidHide", () => {
|
|
@@ -9579,9 +9580,9 @@ var require_contexts_native = __commonJS({
|
|
|
9579
9580
|
SheetInsideSheetContext: () => SheetInsideSheetContext
|
|
9580
9581
|
});
|
|
9581
9582
|
module2.exports = __toCommonJS2(contexts_exports);
|
|
9582
|
-
var
|
|
9583
|
+
var import_react2 = require("react"), ParentSheetContext = (0, import_react2.createContext)({
|
|
9583
9584
|
zIndex: 1e5
|
|
9584
|
-
}), SheetInsideSheetContext = (0,
|
|
9585
|
+
}), SheetInsideSheetContext = (0, import_react2.createContext)(null);
|
|
9585
9586
|
}
|
|
9586
9587
|
});
|
|
9587
9588
|
|
|
@@ -9629,9 +9630,9 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9629
9630
|
SheetImplementationCustom: () => SheetImplementationCustom
|
|
9630
9631
|
});
|
|
9631
9632
|
module2.exports = __toCommonJS2(SheetImplementationCustom_exports);
|
|
9632
|
-
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(),
|
|
9633
|
-
(0,
|
|
9634
|
-
let parentSheet = (0,
|
|
9633
|
+
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)(
|
|
9634
|
+
(0, import_react2.forwardRef)(function(props, forwardedRef) {
|
|
9635
|
+
let parentSheet = (0, import_react2.useContext)(import_contexts.ParentSheetContext), {
|
|
9635
9636
|
animation,
|
|
9636
9637
|
animationConfig: animationConfigProp,
|
|
9637
9638
|
modal = !1,
|
|
@@ -9639,7 +9640,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9639
9640
|
moveOnKeyboardChange = !1,
|
|
9640
9641
|
unmountChildrenWhenHidden = !1,
|
|
9641
9642
|
portalProps
|
|
9642
|
-
} = props, keyboardIsVisible = (0, import_use_keyboard_visible.useKeyboardVisible)(), state = (0, import_useSheetOpenState.useSheetOpenState)(props), [overlayComponent, setOverlayComponent] = (0,
|
|
9643
|
+
} = 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, {
|
|
9643
9644
|
onOverlayComponent: setOverlayComponent
|
|
9644
9645
|
}), {
|
|
9645
9646
|
frameSize,
|
|
@@ -9653,15 +9654,15 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9653
9654
|
screenSize,
|
|
9654
9655
|
setMaxContentSize,
|
|
9655
9656
|
maxSnapPoint
|
|
9656
|
-
} = providerProps, { open, controller, isHidden } = state, sheetRef = (0,
|
|
9657
|
+
} = providerProps, { open, controller, isHidden } = state, sheetRef = (0, import_react2.useRef)(null), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, sheetRef), animationConfig = (() => {
|
|
9657
9658
|
let [animationProp, animationPropConfig] = animation ? Array.isArray(animation) ? animation : [animation] : [];
|
|
9658
9659
|
return animationConfigProp ?? (animationProp ? {
|
|
9659
9660
|
...(0, import_core12.getConfig)().animations.animations[animationProp],
|
|
9660
9661
|
...animationPropConfig
|
|
9661
9662
|
} : null);
|
|
9662
|
-
})(), [isShowingInnerSheet, setIsShowingInnerSheet] = (0,
|
|
9663
|
+
})(), [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) => {
|
|
9663
9664
|
setIsShowingInnerSheet(hasChild);
|
|
9664
|
-
}, []), positions = (0,
|
|
9665
|
+
}, []), positions = (0, import_react2.useMemo)(
|
|
9665
9666
|
() => snapPoints.map(
|
|
9666
9667
|
(point) => getYPositions(snapPointsMode, point, screenSize, frameSize)
|
|
9667
9668
|
),
|
|
@@ -9673,18 +9674,18 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9673
9674
|
parentSheetContext(!1);
|
|
9674
9675
|
};
|
|
9675
9676
|
}, [parentSheetContext, open]);
|
|
9676
|
-
let nextParentContext = (0,
|
|
9677
|
+
let nextParentContext = (0, import_react2.useMemo)(
|
|
9677
9678
|
() => ({
|
|
9678
9679
|
zIndex
|
|
9679
9680
|
}),
|
|
9680
9681
|
[zIndex]
|
|
9681
|
-
), animatedNumber = useAnimatedNumber(hiddenSize), at = (0,
|
|
9682
|
+
), animatedNumber = useAnimatedNumber(hiddenSize), at = (0, import_react2.useRef)(hiddenSize);
|
|
9682
9683
|
useAnimatedNumberReaction(
|
|
9683
9684
|
{
|
|
9684
9685
|
value: animatedNumber,
|
|
9685
9686
|
hostRef: sheetRef
|
|
9686
9687
|
},
|
|
9687
|
-
(0,
|
|
9688
|
+
(0, import_react2.useCallback)((value) => {
|
|
9688
9689
|
driver.isReactNative && (at.current = value, scrollBridge.paneY = value);
|
|
9689
9690
|
}, [])
|
|
9690
9691
|
);
|
|
@@ -9718,7 +9719,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9718
9719
|
}, [hasntMeasured, screenSize]), (0, import_core12.useIsomorphicLayoutEffect)(() => {
|
|
9719
9720
|
!frameSize || !screenSize || isHidden || hasntMeasured && !open || animateTo(position);
|
|
9720
9721
|
}, [isHidden, frameSize, screenSize, open, position]);
|
|
9721
|
-
let disableDrag = props.disableDrag ?? (controller == null ? void 0 : controller.disableDrag), themeName = (0, import_core12.useThemeName)(), panResponder = (0,
|
|
9722
|
+
let disableDrag = props.disableDrag ?? (controller == null ? void 0 : controller.disableDrag), themeName = (0, import_core12.useThemeName)(), panResponder = (0, import_react2.useMemo)(
|
|
9722
9723
|
() => {
|
|
9723
9724
|
if (disableDrag || !frameSize || isShowingInnerSheet)
|
|
9724
9725
|
return;
|
|
@@ -9765,14 +9766,14 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9765
9766
|
},
|
|
9766
9767
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
9767
9768
|
[disableDrag, isShowingInnerSheet, animateTo, frameSize, positions, setPosition]
|
|
9768
|
-
), handleAnimationViewLayout = (0,
|
|
9769
|
+
), handleAnimationViewLayout = (0, import_react2.useCallback)(
|
|
9769
9770
|
(e) => {
|
|
9770
9771
|
var _a;
|
|
9771
9772
|
let next = (_a = e.nativeEvent) == null ? void 0 : _a.layout.height;
|
|
9772
9773
|
next && setFrameSize(next);
|
|
9773
9774
|
},
|
|
9774
9775
|
[keyboardIsVisible]
|
|
9775
|
-
), handleMaxContentViewLayout = (0,
|
|
9776
|
+
), handleMaxContentViewLayout = (0, import_react2.useCallback)(
|
|
9776
9777
|
(e) => {
|
|
9777
9778
|
var _a;
|
|
9778
9779
|
let next = (_a = e.nativeEvent) == null ? void 0 : _a.layout.height;
|
|
@@ -9784,8 +9785,8 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9784
9785
|
return {
|
|
9785
9786
|
transform: [{ translateY: frameSize === 0 ? hiddenSize : val }]
|
|
9786
9787
|
};
|
|
9787
|
-
}), sizeBeforeKeyboard = (0,
|
|
9788
|
-
(0,
|
|
9788
|
+
}), sizeBeforeKeyboard = (0, import_react2.useRef)(null);
|
|
9789
|
+
(0, import_react2.useEffect)(() => {
|
|
9789
9790
|
if (import_core12.isWeb || !moveOnKeyboardChange)
|
|
9790
9791
|
return;
|
|
9791
9792
|
let keyboardDidShowListener = import_react_native4.Keyboard.addListener("keyboardDidShow", (e) => {
|
|
@@ -9799,8 +9800,8 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9799
9800
|
keyboardDidHideListener.remove(), keyboardDidShowListener.remove();
|
|
9800
9801
|
};
|
|
9801
9802
|
}, [moveOnKeyboardChange]);
|
|
9802
|
-
let [opacity, setOpacity] = (0,
|
|
9803
|
-
open && opacity === 0 && setOpacity(1), (0,
|
|
9803
|
+
let [opacity, setOpacity] = (0, import_react2.useState)(open ? 1 : 0);
|
|
9804
|
+
open && opacity === 0 && setOpacity(1), (0, import_react2.useEffect)(() => {
|
|
9804
9805
|
if (!open) {
|
|
9805
9806
|
let tm = setTimeout(() => {
|
|
9806
9807
|
setOpacity(0);
|
|
@@ -9849,7 +9850,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
9849
9850
|
children: props.children
|
|
9850
9851
|
}
|
|
9851
9852
|
)
|
|
9852
|
-
] }) }), adaptContext = (0,
|
|
9853
|
+
] }) }), adaptContext = (0, import_react2.useContext)(import_adapt.AdaptParentContext), shouldMountChildren = !!(opacity || !unmountChildrenWhenHidden);
|
|
9853
9854
|
if (modal) {
|
|
9854
9855
|
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 }) }) });
|
|
9855
9856
|
return import_core12.isWeb ? modalContents : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_contexts.SheetInsideSheetContext.Provider, { value: onInnerSheet, children: modalContents });
|
|
@@ -9946,9 +9947,9 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
9946
9947
|
SheetScrollView: () => SheetScrollView
|
|
9947
9948
|
});
|
|
9948
9949
|
module2.exports = __toCommonJS2(SheetScrollView_exports);
|
|
9949
|
-
var import_core12 = require_index_native10(), import_scroll_view = require_index_native33(),
|
|
9950
|
+
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)(
|
|
9950
9951
|
({ __scopeSheet, children, ...props }, ref) => {
|
|
9951
|
-
let context = (0, import_SheetContext.useSheetContext)(SHEET_SCROLL_VIEW_NAME, __scopeSheet), { scrollBridge } = context, scrollRef = (0,
|
|
9952
|
+
let context = (0, import_SheetContext.useSheetContext)(SHEET_SCROLL_VIEW_NAME, __scopeSheet), { scrollBridge } = context, scrollRef = (0, import_react2.useRef)(null), state = (0, import_react2.useRef)({
|
|
9952
9953
|
lastPageY: 0,
|
|
9953
9954
|
dragAt: 0,
|
|
9954
9955
|
dys: [],
|
|
@@ -9984,7 +9985,7 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
9984
9985
|
onResponderRelease: release,
|
|
9985
9986
|
className: "_ovs-contain",
|
|
9986
9987
|
...props,
|
|
9987
|
-
children: (0,
|
|
9988
|
+
children: (0, import_react2.useMemo)(() => children, [children])
|
|
9988
9989
|
}
|
|
9989
9990
|
);
|
|
9990
9991
|
}
|
|
@@ -10052,7 +10053,7 @@ var require_createSheet_native = __commonJS({
|
|
|
10052
10053
|
createSheet: () => createSheet
|
|
10053
10054
|
});
|
|
10054
10055
|
module2.exports = __toCommonJS2(createSheet_exports);
|
|
10055
|
-
var import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_remove_scroll = require_index_native30(),
|
|
10056
|
+
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 = (
|
|
10056
10057
|
// @ts-ignore
|
|
10057
10058
|
require("react/jsx-runtime")
|
|
10058
10059
|
);
|
|
@@ -10073,8 +10074,8 @@ var require_createSheet_native = __commonJS({
|
|
|
10073
10074
|
);
|
|
10074
10075
|
}
|
|
10075
10076
|
), SheetOverlay = Overlay.extractable(
|
|
10076
|
-
(0,
|
|
10077
|
-
let { __scopeSheet, ...props } = propsIn, context = (0, import_SheetContext.useSheetContext)(import_constants.SHEET_OVERLAY_NAME, __scopeSheet), element = (0,
|
|
10077
|
+
(0, import_react2.memo)((propsIn) => {
|
|
10078
|
+
let { __scopeSheet, ...props } = propsIn, context = (0, import_SheetContext.useSheetContext)(import_constants.SHEET_OVERLAY_NAME, __scopeSheet), element = (0, import_react2.useMemo)(
|
|
10078
10079
|
() => (
|
|
10079
10080
|
// @ts-ignore
|
|
10080
10081
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -10098,7 +10099,7 @@ var require_createSheet_native = __commonJS({
|
|
|
10098
10099
|
}, [element]), context.onlyShowFrame, null;
|
|
10099
10100
|
})
|
|
10100
10101
|
), SheetFrame = Frame.extractable(
|
|
10101
|
-
(0,
|
|
10102
|
+
(0, import_react2.forwardRef)(
|
|
10102
10103
|
({
|
|
10103
10104
|
__scopeSheet,
|
|
10104
10105
|
adjustPaddingForOffscreenContent,
|
|
@@ -10106,7 +10107,7 @@ var require_createSheet_native = __commonJS({
|
|
|
10106
10107
|
children,
|
|
10107
10108
|
...props
|
|
10108
10109
|
}, forwardedRef) => {
|
|
10109
|
-
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,
|
|
10110
|
+
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)(() => (
|
|
10110
10111
|
// @ts-ignore
|
|
10111
10112
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
10112
10113
|
Frame,
|
|
@@ -10155,7 +10156,7 @@ var require_createSheet_native = __commonJS({
|
|
|
10155
10156
|
] });
|
|
10156
10157
|
}
|
|
10157
10158
|
)
|
|
10158
|
-
), Sheet = (0,
|
|
10159
|
+
), Sheet = (0, import_react2.forwardRef)(function(props, ref) {
|
|
10159
10160
|
let hydrated = (0, import_core12.useDidFinishSSR)(), { isShowingNonSheet } = (0, import_useSheetController.useSheetController)(), SheetImplementation = import_SheetImplementationCustom.SheetImplementationCustom;
|
|
10160
10161
|
if (props.native && import_react_native4.Platform.OS === "ios") {
|
|
10161
10162
|
let impl = (0, import_nativeSheet.getNativeSheet)("ios");
|
|
@@ -10335,12 +10336,12 @@ var require_SheetController_native = __commonJS({
|
|
|
10335
10336
|
SheetController: () => SheetController
|
|
10336
10337
|
});
|
|
10337
10338
|
module2.exports = __toCommonJS2(SheetController_exports);
|
|
10338
|
-
var import_core12 = require_index_native10(),
|
|
10339
|
+
var import_core12 = require_index_native10(), import_react2 = require("react"), import_useSheetController = require_useSheetController_native(), import_jsx_runtime6 = require("react/jsx-runtime"), SheetController = ({
|
|
10339
10340
|
children,
|
|
10340
10341
|
onOpenChange: onOpenChangeProp,
|
|
10341
10342
|
...value
|
|
10342
10343
|
}) => {
|
|
10343
|
-
let onOpenChange = (0, import_core12.useEvent)(onOpenChangeProp), memoValue = (0,
|
|
10344
|
+
let onOpenChange = (0, import_core12.useEvent)(onOpenChangeProp), memoValue = (0, import_react2.useMemo)(
|
|
10344
10345
|
() => ({
|
|
10345
10346
|
open: value.open,
|
|
10346
10347
|
hidden: value.hidden,
|
|
@@ -10416,9 +10417,9 @@ var require_Dialog_native = __commonJS({
|
|
|
10416
10417
|
createDialogScope: () => createDialogScope
|
|
10417
10418
|
});
|
|
10418
10419
|
module2.exports = __toCommonJS2(Dialog_exports);
|
|
10419
|
-
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(),
|
|
10420
|
+
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, {
|
|
10420
10421
|
name: TRIGGER_NAME
|
|
10421
|
-
}), DialogTrigger =
|
|
10422
|
+
}), DialogTrigger = React2.forwardRef(
|
|
10422
10423
|
(props, forwardedRef) => {
|
|
10423
10424
|
let { __scopeDialog, ...triggerProps } = props, context = useDialogContext(TRIGGER_NAME, __scopeDialog), composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
10424
10425
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -10482,7 +10483,7 @@ var require_Dialog_native = __commonJS({
|
|
|
10482
10483
|
})), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogProvider, { scope: __scopeDialog, ...context, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, { name: themeName, children: childrenSpaced }) });
|
|
10483
10484
|
}
|
|
10484
10485
|
var DialogPortal = (props) => {
|
|
10485
|
-
let { __scopeDialog, forceMount, children, ...frameProps } = props, context = useDialogContext(PORTAL_NAME, __scopeDialog), isShowing = forceMount || context.open, [isFullyHidden, setIsFullyHidden] =
|
|
10486
|
+
let { __scopeDialog, forceMount, children, ...frameProps } = props, context = useDialogContext(PORTAL_NAME, __scopeDialog), isShowing = forceMount || context.open, [isFullyHidden, setIsFullyHidden] = React2.useState(!isShowing);
|
|
10486
10487
|
isShowing && isFullyHidden && setIsFullyHidden(!1);
|
|
10487
10488
|
let contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
10488
10489
|
import_animate_presence.AnimatePresence,
|
|
@@ -10499,7 +10500,7 @@ var require_Dialog_native = __commonJS({
|
|
|
10499
10500
|
var OVERLAY_NAME = "DialogOverlay", DialogOverlayFrame = (0, import_core12.styled)(import_sheet.Overlay, {
|
|
10500
10501
|
name: OVERLAY_NAME
|
|
10501
10502
|
}), DialogOverlay = DialogOverlayFrame.extractable(
|
|
10502
|
-
|
|
10503
|
+
React2.forwardRef(
|
|
10503
10504
|
({ __scopeDialog, ...props }, forwardedRef) => {
|
|
10504
10505
|
let portalContext = usePortalContext(OVERLAY_NAME, __scopeDialog), { forceMount = portalContext.forceMount, ...overlayProps } = props, context = useDialogContext(OVERLAY_NAME, __scopeDialog), showSheet = useShowDialogSheet(context);
|
|
10505
10506
|
return !forceMount && (!context.modal || showSheet) ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogOverlayImpl, { context, ...overlayProps, ref: forwardedRef });
|
|
@@ -10507,7 +10508,7 @@ var require_Dialog_native = __commonJS({
|
|
|
10507
10508
|
)
|
|
10508
10509
|
);
|
|
10509
10510
|
DialogOverlay.displayName = OVERLAY_NAME;
|
|
10510
|
-
var DialogOverlayImpl =
|
|
10511
|
+
var DialogOverlayImpl = React2.forwardRef(
|
|
10511
10512
|
(props, forwardedRef) => {
|
|
10512
10513
|
let { context, ...overlayProps } = props;
|
|
10513
10514
|
return (
|
|
@@ -10547,7 +10548,7 @@ var require_Dialog_native = __commonJS({
|
|
|
10547
10548
|
unstyled: !1
|
|
10548
10549
|
}
|
|
10549
10550
|
}), DialogContent = DialogContentFrame.extractable(
|
|
10550
|
-
|
|
10551
|
+
React2.forwardRef(
|
|
10551
10552
|
({ __scopeDialog, ...props }, forwardedRef) => {
|
|
10552
10553
|
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 });
|
|
10553
10554
|
return !import_core12.isWeb || context.disableRemoveScroll ? contents : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -10565,10 +10566,10 @@ var require_Dialog_native = __commonJS({
|
|
|
10565
10566
|
)
|
|
10566
10567
|
);
|
|
10567
10568
|
DialogContent.displayName = CONTENT_NAME;
|
|
10568
|
-
var DialogContentModal =
|
|
10569
|
+
var DialogContentModal = React2.forwardRef(
|
|
10569
10570
|
({ children, context, ...props }, forwardedRef) => {
|
|
10570
|
-
let contentRef =
|
|
10571
|
-
return import_core12.isWeb &&
|
|
10571
|
+
let contentRef = React2.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.contentRef, contentRef);
|
|
10572
|
+
return import_core12.isWeb && React2.useEffect(() => {
|
|
10572
10573
|
if (!context.open)
|
|
10573
10574
|
return;
|
|
10574
10575
|
let content = contentRef.current;
|
|
@@ -10600,9 +10601,9 @@ var require_Dialog_native = __commonJS({
|
|
|
10600
10601
|
}
|
|
10601
10602
|
);
|
|
10602
10603
|
}
|
|
10603
|
-
), DialogContentNonModal =
|
|
10604
|
+
), DialogContentNonModal = React2.forwardRef(
|
|
10604
10605
|
(props, forwardedRef) => {
|
|
10605
|
-
let hasInteractedOutsideRef =
|
|
10606
|
+
let hasInteractedOutsideRef = React2.useRef(!1);
|
|
10606
10607
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
10607
10608
|
DialogContentImpl,
|
|
10608
10609
|
{
|
|
@@ -10623,7 +10624,7 @@ var require_Dialog_native = __commonJS({
|
|
|
10623
10624
|
}
|
|
10624
10625
|
);
|
|
10625
10626
|
}
|
|
10626
|
-
), DialogContentImpl =
|
|
10627
|
+
), DialogContentImpl = React2.forwardRef(
|
|
10627
10628
|
(props, forwardedRef) => {
|
|
10628
10629
|
let {
|
|
10629
10630
|
__scopeDialog,
|
|
@@ -10637,7 +10638,7 @@ var require_Dialog_native = __commonJS({
|
|
|
10637
10638
|
onInteractOutside,
|
|
10638
10639
|
context,
|
|
10639
10640
|
...contentProps
|
|
10640
|
-
} = props, contentRef =
|
|
10641
|
+
} = props, contentRef = React2.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), showSheet = useShowDialogSheet(context), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
10641
10642
|
DialogContentFrame,
|
|
10642
10643
|
{
|
|
10643
10644
|
id: context.contentId,
|
|
@@ -10687,7 +10688,7 @@ var require_Dialog_native = __commonJS({
|
|
|
10687
10688
|
}
|
|
10688
10689
|
), TITLE_NAME = "DialogTitle", DialogTitleFrame = (0, import_core12.styled)(import_text2.H2, {
|
|
10689
10690
|
name: TITLE_NAME
|
|
10690
|
-
}), DialogTitle =
|
|
10691
|
+
}), DialogTitle = React2.forwardRef(
|
|
10691
10692
|
(props, forwardedRef) => {
|
|
10692
10693
|
let { __scopeDialog, ...titleProps } = props, context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
10693
10694
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogTitleFrame, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
@@ -10696,7 +10697,7 @@ var require_Dialog_native = __commonJS({
|
|
|
10696
10697
|
DialogTitle.displayName = TITLE_NAME;
|
|
10697
10698
|
var DialogDescriptionFrame = (0, import_core12.styled)(import_text2.Paragraph, {
|
|
10698
10699
|
name: "DialogDescription"
|
|
10699
|
-
}), DESCRIPTION_NAME = "DialogDescription", DialogDescription =
|
|
10700
|
+
}), DESCRIPTION_NAME = "DialogDescription", DialogDescription = React2.forwardRef((props, forwardedRef) => {
|
|
10700
10701
|
let { __scopeDialog, ...descriptionProps } = props, context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
10701
10702
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
10702
10703
|
DialogDescriptionFrame,
|
|
@@ -10753,7 +10754,7 @@ var require_Dialog_native = __commonJS({
|
|
|
10753
10754
|
let titleWarningContext = useWarningContext(TITLE_WARNING_NAME), MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
|
|
10754
10755
|
|
|
10755
10756
|
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.`;
|
|
10756
|
-
|
|
10757
|
+
React2.useEffect(() => {
|
|
10757
10758
|
import_core12.isWeb && titleId && (document.getElementById(titleId) || console.warn(MESSAGE));
|
|
10758
10759
|
}, [MESSAGE, titleId]);
|
|
10759
10760
|
}
|
|
@@ -10764,7 +10765,7 @@ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it wi
|
|
|
10764
10765
|
}) => {
|
|
10765
10766
|
if (process.env.NODE_ENV === "development") {
|
|
10766
10767
|
let MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;
|
|
10767
|
-
|
|
10768
|
+
React2.useEffect(() => {
|
|
10768
10769
|
if (!import_core12.isWeb)
|
|
10769
10770
|
return;
|
|
10770
10771
|
let contentNode = contentRef.current;
|
|
@@ -10776,7 +10777,7 @@ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it wi
|
|
|
10776
10777
|
}
|
|
10777
10778
|
return null;
|
|
10778
10779
|
}, Dialog = (0, import_core12.withStaticProperties)(
|
|
10779
|
-
|
|
10780
|
+
React2.forwardRef(function(props, ref) {
|
|
10780
10781
|
let {
|
|
10781
10782
|
__scopeDialog,
|
|
10782
10783
|
children,
|
|
@@ -10786,11 +10787,11 @@ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it wi
|
|
|
10786
10787
|
modal = !0,
|
|
10787
10788
|
allowPinchZoom = !1,
|
|
10788
10789
|
disableRemoveScroll = !1
|
|
10789
|
-
} = props, baseId =
|
|
10790
|
+
} = 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)({
|
|
10790
10791
|
prop: openProp,
|
|
10791
10792
|
defaultProp: defaultOpen,
|
|
10792
10793
|
onChange: onOpenChange
|
|
10793
|
-
}), onOpenToggle =
|
|
10794
|
+
}), onOpenToggle = React2.useCallback(() => {
|
|
10794
10795
|
setOpen((prevOpen) => !prevOpen);
|
|
10795
10796
|
}, [setOpen]), context = {
|
|
10796
10797
|
scope: __scopeDialog,
|
|
@@ -10806,12 +10807,12 @@ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it wi
|
|
|
10806
10807
|
modal,
|
|
10807
10808
|
allowPinchZoom
|
|
10808
10809
|
}, { when, AdaptProvider } = (0, import_adapt.useAdaptParent)({
|
|
10809
|
-
Contents:
|
|
10810
|
+
Contents: React2.useCallback(
|
|
10810
10811
|
(props2) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, { forwardProps: props2, name: sheetContentsName }),
|
|
10811
10812
|
[sheetContentsName]
|
|
10812
10813
|
)
|
|
10813
10814
|
});
|
|
10814
|
-
return
|
|
10815
|
+
return React2.useImperativeHandle(
|
|
10815
10816
|
ref,
|
|
10816
10817
|
() => ({
|
|
10817
10818
|
open: setOpen
|
|
@@ -10917,11 +10918,11 @@ var require_AlertDialog_native = __commonJS({
|
|
|
10917
10918
|
createAlertDialogScope: () => createAlertDialogScope
|
|
10918
10919
|
});
|
|
10919
10920
|
module2.exports = __toCommonJS2(AlertDialog_exports);
|
|
10920
|
-
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(),
|
|
10921
|
+
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, [
|
|
10921
10922
|
import_dialog.createDialogScope
|
|
10922
10923
|
]), useDialogScope = (0, import_dialog.createDialogScope)(), TRIGGER_NAME = "AlertDialogTrigger", NativeAlertDialogTriggerFrame = (0, import_core12.styled)(import_core12.View, {
|
|
10923
10924
|
name: TRIGGER_NAME
|
|
10924
|
-
}), AlertDialogTrigger =
|
|
10925
|
+
}), AlertDialogTrigger = React2.forwardRef(
|
|
10925
10926
|
(props, forwardedRef) => {
|
|
10926
10927
|
if (props.__native) {
|
|
10927
10928
|
let { __native, onPress, __onPress, ...rest } = props;
|
|
@@ -10946,7 +10947,7 @@ var require_AlertDialog_native = __commonJS({
|
|
|
10946
10947
|
var OVERLAY_NAME = "AlertDialogOverlay", AlertDialogOverlayFrame = (0, import_core12.styled)(import_dialog.DialogOverlayFrame, {
|
|
10947
10948
|
name: OVERLAY_NAME
|
|
10948
10949
|
}), AlertDialogOverlay = AlertDialogOverlayFrame.extractable(
|
|
10949
|
-
|
|
10950
|
+
React2.forwardRef(
|
|
10950
10951
|
(props, forwardedRef) => {
|
|
10951
10952
|
let { __scopeAlertDialog, ...overlayProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
10952
10953
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogOverlay, { ...dialogScope, ...overlayProps, ref: forwardedRef });
|
|
@@ -10954,9 +10955,9 @@ var require_AlertDialog_native = __commonJS({
|
|
|
10954
10955
|
)
|
|
10955
10956
|
);
|
|
10956
10957
|
AlertDialogOverlay.displayName = OVERLAY_NAME;
|
|
10957
|
-
var CONTENT_NAME = "AlertDialogContent", [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME), AlertDialogContent =
|
|
10958
|
+
var CONTENT_NAME = "AlertDialogContent", [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME), AlertDialogContent = React2.forwardRef(
|
|
10958
10959
|
(props, forwardedRef) => {
|
|
10959
|
-
let { __scopeAlertDialog, children, ...contentProps } = props, dialogScope = useDialogScope(__scopeAlertDialog), contentRef =
|
|
10960
|
+
let { __scopeAlertDialog, children, ...contentProps } = props, dialogScope = useDialogScope(__scopeAlertDialog), contentRef = React2.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), cancelRef = React2.useRef(null);
|
|
10960
10961
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
10961
10962
|
import_dialog.DialogWarningProvider,
|
|
10962
10963
|
{
|
|
@@ -10990,33 +10991,33 @@ var require_AlertDialog_native = __commonJS({
|
|
|
10990
10991
|
}
|
|
10991
10992
|
);
|
|
10992
10993
|
AlertDialogContent.displayName = CONTENT_NAME;
|
|
10993
|
-
var TITLE_NAME = "AlertDialogTitle", AlertDialogTitle =
|
|
10994
|
+
var TITLE_NAME = "AlertDialogTitle", AlertDialogTitle = React2.forwardRef(
|
|
10994
10995
|
(props, forwardedRef) => {
|
|
10995
10996
|
let { __scopeAlertDialog, ...titleProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
10996
10997
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogTitle, { ...dialogScope, ...titleProps, ref: forwardedRef });
|
|
10997
10998
|
}
|
|
10998
10999
|
);
|
|
10999
11000
|
AlertDialogTitle.displayName = TITLE_NAME;
|
|
11000
|
-
var DESCRIPTION_NAME = "AlertDialogDescription", AlertDialogDescription =
|
|
11001
|
+
var DESCRIPTION_NAME = "AlertDialogDescription", AlertDialogDescription = React2.forwardRef((props, forwardedRef) => {
|
|
11001
11002
|
let { __scopeAlertDialog, ...descriptionProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
11002
11003
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogDescription, { ...dialogScope, ...descriptionProps, ref: forwardedRef });
|
|
11003
11004
|
});
|
|
11004
11005
|
AlertDialogDescription.displayName = DESCRIPTION_NAME;
|
|
11005
|
-
var ACTION_NAME = "AlertDialogAction", AlertDialogAction =
|
|
11006
|
+
var ACTION_NAME = "AlertDialogAction", AlertDialogAction = React2.forwardRef(
|
|
11006
11007
|
(props, forwardedRef) => {
|
|
11007
11008
|
let { __scopeAlertDialog, ...actionProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
11008
11009
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogClose, { ...dialogScope, ...actionProps, ref: forwardedRef });
|
|
11009
11010
|
}
|
|
11010
11011
|
);
|
|
11011
11012
|
AlertDialogAction.displayName = ACTION_NAME;
|
|
11012
|
-
var CANCEL_NAME = "AlertDialogCancel", AlertDialogCancel =
|
|
11013
|
+
var CANCEL_NAME = "AlertDialogCancel", AlertDialogCancel = React2.forwardRef(
|
|
11013
11014
|
(props, forwardedRef) => {
|
|
11014
11015
|
let { __scopeAlertDialog, ...cancelProps } = props, { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog), dialogScope = useDialogScope(__scopeAlertDialog), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, cancelRef);
|
|
11015
11016
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogClose, { ...dialogScope, ...cancelProps, ref });
|
|
11016
11017
|
}
|
|
11017
11018
|
);
|
|
11018
11019
|
AlertDialogCancel.displayName = CANCEL_NAME;
|
|
11019
|
-
var DescriptionWarning = ({ contentRef }) => (process.env.NODE_ENV === "development" &&
|
|
11020
|
+
var DescriptionWarning = ({ contentRef }) => (process.env.NODE_ENV === "development" && React2.useEffect(() => {
|
|
11020
11021
|
var _a;
|
|
11021
11022
|
import_core12.isWeb && (document.getElementById(
|
|
11022
11023
|
// @ts-ignore
|
|
@@ -11038,13 +11039,13 @@ var require_AlertDialog_native = __commonJS({
|
|
|
11038
11039
|
onChange: props.onOpenChange,
|
|
11039
11040
|
transition: !0
|
|
11040
11041
|
}), triggerElement = null, title = "", description = "", buttons = [];
|
|
11041
|
-
if (forEachChildDeep(
|
|
11042
|
-
if (!
|
|
11042
|
+
if (forEachChildDeep(React2.Children.toArray(props.children), (child) => {
|
|
11043
|
+
if (!React2.isValidElement(child))
|
|
11043
11044
|
return !1;
|
|
11044
11045
|
let name = (0, import_core12.isTamaguiElement)(child) ? child.type.staticConfig.componentName : child.type.displayName;
|
|
11045
11046
|
switch (name) {
|
|
11046
11047
|
case TRIGGER_NAME:
|
|
11047
|
-
return triggerElement =
|
|
11048
|
+
return triggerElement = React2.cloneElement(child, {
|
|
11048
11049
|
__native: !0
|
|
11049
11050
|
}), !1;
|
|
11050
11051
|
case TITLE_NAME:
|
|
@@ -11071,7 +11072,7 @@ var require_AlertDialog_native = __commonJS({
|
|
|
11071
11072
|
}), (0, import_core12.useIsomorphicLayoutEffect)(() => {
|
|
11072
11073
|
!open || !native || (title || description) && import_react_native4.Alert.alert(title, description, buttons);
|
|
11073
11074
|
}, [native, open]), native)
|
|
11074
|
-
return
|
|
11075
|
+
return React2.cloneElement(triggerElement, {
|
|
11075
11076
|
__onPress: () => {
|
|
11076
11077
|
setOpen(!0);
|
|
11077
11078
|
}
|
|
@@ -11081,11 +11082,11 @@ var require_AlertDialog_native = __commonJS({
|
|
|
11081
11082
|
};
|
|
11082
11083
|
function forEachChildDeep(children, onChild) {
|
|
11083
11084
|
for (let child of children)
|
|
11084
|
-
|
|
11085
|
+
React2.isValidElement(child) && onChild(child) && child.props.children && forEachChildDeep(React2.Children.toArray(child.props.children), onChild);
|
|
11085
11086
|
}
|
|
11086
11087
|
function getStringChildren(child) {
|
|
11087
11088
|
let string = "";
|
|
11088
|
-
return forEachChildDeep(
|
|
11089
|
+
return forEachChildDeep(React2.Children.toArray(child), (child2) => typeof child2.props.children == "string" ? (string = child2.props.children, !1) : !0), string;
|
|
11089
11090
|
}
|
|
11090
11091
|
var AlertDialog = (0, import_core12.withStaticProperties)(AlertDialogInner, {
|
|
11091
11092
|
Trigger: AlertDialogTrigger,
|
|
@@ -11133,7 +11134,7 @@ var require_Image_native = __commonJS({
|
|
|
11133
11134
|
Image: () => Image
|
|
11134
11135
|
});
|
|
11135
11136
|
module2.exports = __toCommonJS2(Image_exports);
|
|
11136
|
-
var import_core12 = require_index_native10(),
|
|
11137
|
+
var import_core12 = require_index_native10(), import_react2 = require("react"), import_react_native4 = require_fake_react_native(), import_jsx_runtime6 = require("react/jsx-runtime");
|
|
11137
11138
|
(0, import_core12.setupReactNative)({
|
|
11138
11139
|
Image: import_react_native4.Image
|
|
11139
11140
|
});
|
|
@@ -11142,7 +11143,7 @@ var require_Image_native = __commonJS({
|
|
|
11142
11143
|
position: "relative",
|
|
11143
11144
|
source: { uri: "" }
|
|
11144
11145
|
}), hasWarned = !1, Image = StyledImage.extractable(
|
|
11145
|
-
(0,
|
|
11146
|
+
(0, import_react2.forwardRef)((inProps, ref) => {
|
|
11146
11147
|
let props = (0, import_core12.useProps)(inProps), { src, source, ...rest } = props;
|
|
11147
11148
|
process.env.NODE_ENV === "development" && typeof src == "string" && (typeof props.width == "string" && props.width[0] !== "$" || typeof props.height == "string" && props.height[0] !== "$") && (hasWarned || (hasWarned = !0, console.warn(
|
|
11148
11149
|
'React Native expects a numerical width/height. If you want to use a percent you must define the "source" prop with width, height, and uri.'
|
|
@@ -11306,20 +11307,20 @@ var require_Avatar_native = __commonJS({
|
|
|
11306
11307
|
createAvatarScope: () => createAvatarScope
|
|
11307
11308
|
});
|
|
11308
11309
|
module2.exports = __toCommonJS2(Avatar_exports);
|
|
11309
|
-
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(),
|
|
11310
|
+
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(
|
|
11310
11311
|
(props, forwardedRef) => {
|
|
11311
11312
|
var _a;
|
|
11312
11313
|
let { __scopeAvatar, src, onLoadingStatusChange = () => {
|
|
11313
|
-
}, ...imageProps } = props, context = useAvatarContext(IMAGE_NAME, __scopeAvatar), [status, setStatus] =
|
|
11314
|
+
}, ...imageProps } = props, context = useAvatarContext(IMAGE_NAME, __scopeAvatar), [status, setStatus] = React2.useState("idle"), shapeSize = (0, import_core12.getVariableValue)(
|
|
11314
11315
|
(_a = (0, import_shapes.getShapeSize)(
|
|
11315
11316
|
context.size,
|
|
11316
11317
|
// @ts-expect-error
|
|
11317
11318
|
{ tokens: (0, import_core12.getTokens)() }
|
|
11318
11319
|
)) == null ? void 0 : _a.width
|
|
11319
11320
|
);
|
|
11320
|
-
return
|
|
11321
|
+
return React2.useEffect(() => {
|
|
11321
11322
|
setStatus("idle");
|
|
11322
|
-
}, [JSON.stringify(src)]),
|
|
11323
|
+
}, [JSON.stringify(src)]), React2.useEffect(() => {
|
|
11323
11324
|
onLoadingStatusChange(status), context.onImageLoadingStatusChange(status);
|
|
11324
11325
|
}, [status]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, { fullscreen: !0, zIndex: 1, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
11325
11326
|
import_image.Image,
|
|
@@ -11349,10 +11350,10 @@ var require_Avatar_native = __commonJS({
|
|
|
11349
11350
|
fullscreen: !0,
|
|
11350
11351
|
zIndex: 0
|
|
11351
11352
|
}), AvatarFallback = AvatarFallbackFrame.extractable(
|
|
11352
|
-
|
|
11353
|
+
React2.forwardRef(
|
|
11353
11354
|
(props, forwardedRef) => {
|
|
11354
|
-
let { __scopeAvatar, delayMs, ...fallbackProps } = props, context = useAvatarContext(FALLBACK_NAME, __scopeAvatar), [canRender, setCanRender] =
|
|
11355
|
-
return
|
|
11355
|
+
let { __scopeAvatar, delayMs, ...fallbackProps } = props, context = useAvatarContext(FALLBACK_NAME, __scopeAvatar), [canRender, setCanRender] = React2.useState(delayMs === void 0);
|
|
11356
|
+
return React2.useEffect(() => {
|
|
11356
11357
|
if (delayMs !== void 0) {
|
|
11357
11358
|
let timerId = setTimeout(() => setCanRender(!0), delayMs);
|
|
11358
11359
|
return () => clearTimeout(timerId);
|
|
@@ -11367,9 +11368,9 @@ var require_Avatar_native = __commonJS({
|
|
|
11367
11368
|
position: "relative",
|
|
11368
11369
|
overflow: "hidden"
|
|
11369
11370
|
}), Avatar = (0, import_core12.withStaticProperties)(
|
|
11370
|
-
|
|
11371
|
+
React2.forwardRef(
|
|
11371
11372
|
(props, forwardedRef) => {
|
|
11372
|
-
let { __scopeAvatar, size = "$true", ...avatarProps } = props, [imageLoadingStatus, setImageLoadingStatus] =
|
|
11373
|
+
let { __scopeAvatar, size = "$true", ...avatarProps } = props, [imageLoadingStatus, setImageLoadingStatus] = React2.useState("idle");
|
|
11373
11374
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
11374
11375
|
AvatarProvider,
|
|
11375
11376
|
{
|
|
@@ -11522,14 +11523,14 @@ var require_useGetThemedIcon_native = __commonJS({
|
|
|
11522
11523
|
useGetThemedIcon: () => useGetThemedIcon
|
|
11523
11524
|
});
|
|
11524
11525
|
module2.exports = __toCommonJS2(useGetThemedIcon_exports);
|
|
11525
|
-
var
|
|
11526
|
+
var import_react2 = require("react"), import_useCurrentColor = require_useCurrentColor_native(), useGetThemedIcon = (props) => {
|
|
11526
11527
|
let color = (0, import_useCurrentColor.useCurrentColor)(props.color);
|
|
11527
|
-
return (el) => el && ((0,
|
|
11528
|
+
return (el) => el && ((0, import_react2.isValidElement)(el) ? (0, import_react2.cloneElement)(el, {
|
|
11528
11529
|
...props,
|
|
11529
11530
|
color,
|
|
11530
11531
|
// @ts-expect-error
|
|
11531
11532
|
...el.props
|
|
11532
|
-
}) : (0,
|
|
11533
|
+
}) : (0, import_react2.createElement)(el, props));
|
|
11533
11534
|
};
|
|
11534
11535
|
}
|
|
11535
11536
|
});
|
|
@@ -11576,7 +11577,7 @@ var require_Button_native = __commonJS({
|
|
|
11576
11577
|
useButton: () => useButton
|
|
11577
11578
|
});
|
|
11578
11579
|
module2.exports = __toCommonJS2(Button_exports);
|
|
11579
|
-
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(),
|
|
11580
|
+
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, {
|
|
11580
11581
|
name: BUTTON_NAME,
|
|
11581
11582
|
tag: "button",
|
|
11582
11583
|
context: ButtonContext,
|
|
@@ -11655,7 +11656,7 @@ var require_Button_native = __commonJS({
|
|
|
11655
11656
|
unstyled: !1
|
|
11656
11657
|
}
|
|
11657
11658
|
}), ButtonIcon = (props) => {
|
|
11658
|
-
let { children, scaleIcon = 1 } = props, { size, color } = (0,
|
|
11659
|
+
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;
|
|
11659
11660
|
return (0, import_helpers_tamagui.useGetThemedIcon)({ size: iconSize, color })(children);
|
|
11660
11661
|
}, ButtonComponent = ButtonFrame.styleable(function(props, ref) {
|
|
11661
11662
|
let { props: buttonProps } = useButton(props);
|
|
@@ -11676,7 +11677,7 @@ var require_Button_native = __commonJS({
|
|
|
11676
11677
|
}, Button2 = (0, import_web.withStaticProperties)(ButtonComponent, {
|
|
11677
11678
|
Text: ButtonText,
|
|
11678
11679
|
Icon: ButtonIcon
|
|
11679
|
-
}), ButtonNestingContext = (0,
|
|
11680
|
+
}), ButtonNestingContext = (0, import_react2.createContext)(!1);
|
|
11680
11681
|
function useButton(propsIn, { Text: Text3 = Button2.Text } = { Text: Button2.Text }) {
|
|
11681
11682
|
let {
|
|
11682
11683
|
children,
|
|
@@ -11699,7 +11700,7 @@ var require_Button_native = __commonJS({
|
|
|
11699
11700
|
textAlign,
|
|
11700
11701
|
textProps,
|
|
11701
11702
|
...rest
|
|
11702
|
-
} = propsIn, isNested = (0,
|
|
11703
|
+
} = 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)(
|
|
11703
11704
|
Text3,
|
|
11704
11705
|
propsActive,
|
|
11705
11706
|
Text3 === ButtonText && propsIn.unstyled !== !0 ? {
|
|
@@ -11925,13 +11926,13 @@ var require_focusableInputHOC_native = __commonJS({
|
|
|
11925
11926
|
useFocusable: () => useFocusable2
|
|
11926
11927
|
});
|
|
11927
11928
|
module2.exports = __toCommonJS2(focusableInputHOC_exports);
|
|
11928
|
-
var import_compose_refs = require_index_native6(), import_web = require_index_native9(),
|
|
11929
|
+
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");
|
|
11929
11930
|
function useFocusable2({
|
|
11930
11931
|
isInput,
|
|
11931
11932
|
props,
|
|
11932
11933
|
ref
|
|
11933
11934
|
}) {
|
|
11934
|
-
let { id, onChangeText, value, defaultValue } = props, inputValue = (0,
|
|
11935
|
+
let { id, onChangeText, value, defaultValue } = props, inputValue = (0, import_react2.useRef)(value || defaultValue || ""), unregisterFocusable = (0, import_react2.useRef)(), inputRef = (0, import_react2.useCallback)(
|
|
11935
11936
|
(input) => {
|
|
11936
11937
|
var _a;
|
|
11937
11938
|
id && input && ((_a = unregisterFocusable.current) == null || _a.call(unregisterFocusable), unregisterFocusable.current = (0, import_registerFocusable.registerFocusable)(id, {
|
|
@@ -11946,7 +11947,7 @@ var require_focusableInputHOC_native = __commonJS({
|
|
|
11946
11947
|
},
|
|
11947
11948
|
[isInput, id]
|
|
11948
11949
|
), combinedRefs = (0, import_compose_refs.composeRefs)(ref, inputRef);
|
|
11949
|
-
return (0,
|
|
11950
|
+
return (0, import_react2.useEffect)(() => () => {
|
|
11950
11951
|
var _a;
|
|
11951
11952
|
(_a = unregisterFocusable.current) == null || _a.call(unregisterFocusable);
|
|
11952
11953
|
}, []), {
|
|
@@ -12030,7 +12031,7 @@ var require_Label_native = __commonJS({
|
|
|
12030
12031
|
useLabelContext: () => useLabelContext
|
|
12031
12032
|
});
|
|
12032
12033
|
module2.exports = __toCommonJS2(Label_exports);
|
|
12033
|
-
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(),
|
|
12034
|
+
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, {
|
|
12034
12035
|
id: void 0,
|
|
12035
12036
|
controlRef: { current: null }
|
|
12036
12037
|
}), LabelFrame = (0, import_web.styled)(import_text2.SizableText, {
|
|
@@ -12064,10 +12065,10 @@ var require_Label_native = __commonJS({
|
|
|
12064
12065
|
defaultVariants: {
|
|
12065
12066
|
unstyled: !1
|
|
12066
12067
|
}
|
|
12067
|
-
}), LabelComponent =
|
|
12068
|
+
}), LabelComponent = React2.forwardRef(
|
|
12068
12069
|
(props, forwardedRef) => {
|
|
12069
|
-
let { htmlFor, id: idProp, ...labelProps } = props, controlRef =
|
|
12070
|
-
return import_web.isWeb &&
|
|
12070
|
+
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;
|
|
12071
|
+
return import_web.isWeb && React2.useEffect(() => {
|
|
12071
12072
|
if (htmlFor) {
|
|
12072
12073
|
let element = document.getElementById(htmlFor);
|
|
12073
12074
|
if (ref.current && element) {
|
|
@@ -12113,7 +12114,7 @@ var require_Label_native = __commonJS({
|
|
|
12113
12114
|
neverFlatten: !0
|
|
12114
12115
|
}), useLabelContext = (element) => {
|
|
12115
12116
|
let context = useLabelContextImpl("LabelConsumer"), { controlRef } = context;
|
|
12116
|
-
return
|
|
12117
|
+
return React2.useEffect(() => {
|
|
12117
12118
|
element && (controlRef.current = element);
|
|
12118
12119
|
}, [element, controlRef]), context.id;
|
|
12119
12120
|
};
|
|
@@ -12152,10 +12153,10 @@ var require_index_native46 = __commonJS({
|
|
|
12152
12153
|
usePrevious: () => usePrevious
|
|
12153
12154
|
});
|
|
12154
12155
|
module2.exports = __toCommonJS2(src_exports2);
|
|
12155
|
-
var
|
|
12156
|
+
var import_react2 = require("react");
|
|
12156
12157
|
function usePrevious(value) {
|
|
12157
|
-
let ref = (0,
|
|
12158
|
-
return (0,
|
|
12158
|
+
let ref = (0, import_react2.useRef)({ value, previous: value });
|
|
12159
|
+
return (0, import_react2.useMemo)(() => (ref.current.value !== value && (ref.current.previous = ref.current.value, ref.current.value = value), ref.current.previous), [value]);
|
|
12159
12160
|
}
|
|
12160
12161
|
}
|
|
12161
12162
|
});
|
|
@@ -12190,7 +12191,7 @@ var require_Checkbox_native = __commonJS({
|
|
|
12190
12191
|
isIndeterminate: () => isIndeterminate
|
|
12191
12192
|
});
|
|
12192
12193
|
module2.exports = __toCommonJS2(Checkbox_exports);
|
|
12193
|
-
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(),
|
|
12194
|
+
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)({
|
|
12194
12195
|
size: "$true",
|
|
12195
12196
|
scaleIcon: 1
|
|
12196
12197
|
});
|
|
@@ -12201,8 +12202,8 @@ var require_Checkbox_native = __commonJS({
|
|
|
12201
12202
|
return isIndeterminate(checked) ? "indeterminate" : checked ? "checked" : "unchecked";
|
|
12202
12203
|
}
|
|
12203
12204
|
var BubbleInput = (props) => {
|
|
12204
|
-
let { checked, bubbles = !0, control, isHidden, ...inputProps } = props, ref =
|
|
12205
|
-
return
|
|
12205
|
+
let { checked, bubbles = !0, control, isHidden, ...inputProps } = props, ref = React2.useRef(null), prevChecked = (0, import_use_previous.usePrevious)(checked);
|
|
12206
|
+
return React2.useEffect(() => {
|
|
12206
12207
|
let input = ref.current, inputProto = window.HTMLInputElement.prototype, setChecked = Object.getOwnPropertyDescriptor(
|
|
12207
12208
|
inputProto,
|
|
12208
12209
|
"checked"
|
|
@@ -12240,7 +12241,7 @@ var require_Checkbox_native = __commonJS({
|
|
|
12240
12241
|
name: INDICATOR_NAME,
|
|
12241
12242
|
context: CheckboxStyledContext
|
|
12242
12243
|
}), CheckboxIndicator = CheckboxIndicatorFrame.extractable(
|
|
12243
|
-
|
|
12244
|
+
React2.forwardRef(
|
|
12244
12245
|
(props, forwardedRef) => {
|
|
12245
12246
|
let {
|
|
12246
12247
|
__scopeCheckbox,
|
|
@@ -12252,7 +12253,7 @@ var require_Checkbox_native = __commonJS({
|
|
|
12252
12253
|
process.env.NODE_ENV === "development" && !childrenProp && console.warn(
|
|
12253
12254
|
"Warning: You created a Checkbox.Indicator without passing an child prop for it to use as an icon."
|
|
12254
12255
|
);
|
|
12255
|
-
let context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox), styledContext =
|
|
12256
|
+
let 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));
|
|
12256
12257
|
return forceMount || isIndeterminate(context.state) || context.state === !0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
12257
12258
|
CheckboxIndicatorFrame,
|
|
12258
12259
|
{
|
|
@@ -12287,7 +12288,10 @@ var require_Checkbox_native = __commonJS({
|
|
|
12287
12288
|
borderColor: "$borderColorHover"
|
|
12288
12289
|
},
|
|
12289
12290
|
focusStyle: {
|
|
12290
|
-
borderColor: "$borderColorFocus"
|
|
12291
|
+
borderColor: "$borderColorFocus",
|
|
12292
|
+
outlineStyle: "solid",
|
|
12293
|
+
outlineWidth: 2,
|
|
12294
|
+
outlineColor: "$borderColorFocus"
|
|
12291
12295
|
}
|
|
12292
12296
|
}
|
|
12293
12297
|
},
|
|
@@ -12301,7 +12305,7 @@ var require_Checkbox_native = __commonJS({
|
|
|
12301
12305
|
unstyled: !1
|
|
12302
12306
|
}
|
|
12303
12307
|
}), [createCheckboxContext, createCheckboxScope] = (0, import_create_context.createContextScope)(CHECKBOX_NAME), [CheckboxProvider, useCheckboxContext] = createCheckboxContext(CHECKBOX_NAME), CheckboxComponent = CheckboxFrame.extractable(
|
|
12304
|
-
|
|
12308
|
+
React2.forwardRef(function(props, forwardedRef) {
|
|
12305
12309
|
let {
|
|
12306
12310
|
__scopeCheckbox,
|
|
12307
12311
|
labelledBy: ariaLabelledby,
|
|
@@ -12317,16 +12321,16 @@ var require_Checkbox_native = __commonJS({
|
|
|
12317
12321
|
native,
|
|
12318
12322
|
scaleIcon,
|
|
12319
12323
|
...checkboxProps
|
|
12320
|
-
} = props, [button, setButton] =
|
|
12324
|
+
} = 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)({
|
|
12321
12325
|
prop: checkedProp,
|
|
12322
12326
|
defaultProp: defaultChecked,
|
|
12323
12327
|
onChange: onCheckedChange
|
|
12324
|
-
}), styledContext =
|
|
12328
|
+
}), styledContext = React2.useContext(CheckboxStyledContext), adjustedSize = (0, import_core12.getVariableValue)(
|
|
12325
12329
|
(0, import_get_token2.getSize)(propsActive.size ?? (styledContext == null ? void 0 : styledContext.size) ?? "$true", {
|
|
12326
12330
|
shift: sizeAdjust
|
|
12327
12331
|
})
|
|
12328
12332
|
), size = scaleSize ? Math.round(adjustedSize * scaleSize) : adjustedSize, labelId = (0, import_label.useLabelContext)(button), labelledBy = ariaLabelledby || labelId;
|
|
12329
|
-
return
|
|
12333
|
+
return React2.useEffect(() => {
|
|
12330
12334
|
if (props.id)
|
|
12331
12335
|
return (0, import_focusable2.registerFocusable)(props.id, {
|
|
12332
12336
|
focusAndSelect: () => {
|
|
@@ -12446,7 +12450,7 @@ var require_Form_native = __commonJS({
|
|
|
12446
12450
|
useFormContext: () => useFormContext
|
|
12447
12451
|
});
|
|
12448
12452
|
module2.exports = __toCommonJS2(Form_exports);
|
|
12449
|
-
var import_core12 = require_index_native10(), import_create_context = require_index_native14(),
|
|
12453
|
+
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, {
|
|
12450
12454
|
name: FORM_NAME,
|
|
12451
12455
|
tag: "form"
|
|
12452
12456
|
}), [createFormContext] = (0, import_create_context.createContextScope)(FORM_NAME), [FormProvider, useFormContext] = createFormContext(FORM_NAME), TRIGGER_NAME = "FormTrigger", FormTriggerFrame = (0, import_core12.styled)(import_core12.Stack, {
|
|
@@ -12459,7 +12463,7 @@ var require_Form_native = __commonJS({
|
|
|
12459
12463
|
{
|
|
12460
12464
|
tag: "button",
|
|
12461
12465
|
...triggerProps,
|
|
12462
|
-
children: triggerProps.asChild ? (0,
|
|
12466
|
+
children: triggerProps.asChild ? (0, import_react2.cloneElement)(children, { disabled: triggerProps.disabled }) : children,
|
|
12463
12467
|
ref: forwardedRef,
|
|
12464
12468
|
onPress: (0, import_core12.composeEventHandlers)(props.onPress, context.onSubmit)
|
|
12465
12469
|
}
|
|
@@ -12595,7 +12599,7 @@ var require_use_sync_external_store_shim_native_development = __commonJS({
|
|
|
12595
12599
|
process.env.NODE_ENV !== "production" && function() {
|
|
12596
12600
|
"use strict";
|
|
12597
12601
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
12598
|
-
var
|
|
12602
|
+
var React2 = require("react"), ReactSharedInternals = React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
12599
12603
|
function error(format) {
|
|
12600
12604
|
{
|
|
12601
12605
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++)
|
|
@@ -12616,9 +12620,9 @@ var require_use_sync_external_store_shim_native_development = __commonJS({
|
|
|
12616
12620
|
function is(x, y) {
|
|
12617
12621
|
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
12618
12622
|
}
|
|
12619
|
-
var objectIs = typeof Object.is == "function" ? Object.is : is, useState =
|
|
12623
|
+
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;
|
|
12620
12624
|
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
|
12621
|
-
didWarnOld18Alpha ||
|
|
12625
|
+
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."));
|
|
12622
12626
|
var value = getSnapshot();
|
|
12623
12627
|
if (!didWarnUncachedGetSnapshot) {
|
|
12624
12628
|
var cachedValue = getSnapshot();
|
|
@@ -12655,7 +12659,7 @@ var require_use_sync_external_store_shim_native_development = __commonJS({
|
|
|
12655
12659
|
return !0;
|
|
12656
12660
|
}
|
|
12657
12661
|
}
|
|
12658
|
-
var shim = useSyncExternalStore, useSyncExternalStore$1 =
|
|
12662
|
+
var shim = useSyncExternalStore, useSyncExternalStore$1 = React2.useSyncExternalStore !== void 0 ? React2.useSyncExternalStore : shim;
|
|
12659
12663
|
exports.useSyncExternalStore = useSyncExternalStore$1, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
12660
12664
|
}();
|
|
12661
12665
|
}
|
|
@@ -12722,11 +12726,11 @@ var require_with_selector_development = __commonJS({
|
|
|
12722
12726
|
process.env.NODE_ENV !== "production" && function() {
|
|
12723
12727
|
"use strict";
|
|
12724
12728
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
12725
|
-
var
|
|
12729
|
+
var React2 = require("react"), shim = require_index_native49();
|
|
12726
12730
|
function is(x, y) {
|
|
12727
12731
|
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
12728
12732
|
}
|
|
12729
|
-
var objectIs = typeof Object.is == "function" ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef =
|
|
12733
|
+
var objectIs = typeof Object.is == "function" ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef = React2.useRef, useEffect = React2.useEffect, useMemo = React2.useMemo, useDebugValue2 = React2.useDebugValue;
|
|
12730
12734
|
function useSyncExternalStoreWithSelector2(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
12731
12735
|
var instRef = useRef(null), inst;
|
|
12732
12736
|
instRef.current === null ? (inst = {
|
|
@@ -12848,13 +12852,13 @@ var require_dist = __commonJS({
|
|
|
12848
12852
|
useTreeState: () => useTreeState
|
|
12849
12853
|
});
|
|
12850
12854
|
module2.exports = __toCommonJS2(src_exports2);
|
|
12851
|
-
var React3 = __toESM2(require("react")),
|
|
12855
|
+
var React3 = __toESM2(require("react")), React2 = __toESM2(require("react")), PrerenderContext = React2.createContext(!1);
|
|
12852
12856
|
PrerenderContext.displayName = "PrerenderContext";
|
|
12853
|
-
var MaxIndexContext =
|
|
12857
|
+
var MaxIndexContext = React2.createContext([]);
|
|
12854
12858
|
MaxIndexContext.displayName = "MaxIndexContext";
|
|
12855
|
-
var IndexContext =
|
|
12859
|
+
var IndexContext = React2.createContext(null);
|
|
12856
12860
|
IndexContext.displayName = "IndexContext";
|
|
12857
|
-
var TreeStateContext =
|
|
12861
|
+
var TreeStateContext = React2.createContext(null);
|
|
12858
12862
|
TreeStateContext.displayName = "TreeStateContext";
|
|
12859
12863
|
var React22 = __toESM2(require("react")), import_performant_array_to_tree = require_arrayToTree_min(), isServer2 = typeof window > "u", useIsomorphicLayoutEffect2 = isServer2 ? React22.useEffect : React22.useLayoutEffect;
|
|
12860
12864
|
function parseIndexPath(indexPathString) {
|
|
@@ -12936,27 +12940,27 @@ var require_dist = __commonJS({
|
|
|
12936
12940
|
) : child
|
|
12937
12941
|
));
|
|
12938
12942
|
}
|
|
12939
|
-
var
|
|
12943
|
+
var React4 = __toESM2(require("react"));
|
|
12940
12944
|
function useRovingIndex({
|
|
12941
12945
|
contain = !0,
|
|
12942
12946
|
defaultIndex = 0,
|
|
12943
12947
|
maxIndex = 1 / 0,
|
|
12944
12948
|
wrap = !1
|
|
12945
12949
|
}) {
|
|
12946
|
-
let [activeIndex, setLocalActiveIndex] =
|
|
12950
|
+
let [activeIndex, setLocalActiveIndex] = React4.useState(defaultIndex), getNextIndex = React4.useCallback(
|
|
12947
12951
|
(nextIndex) => wrap ? (nextIndex % maxIndex + maxIndex) % maxIndex : contain ? nextIndex > maxIndex ? maxIndex : nextIndex < 0 ? 0 : nextIndex : nextIndex,
|
|
12948
12952
|
[maxIndex, wrap]
|
|
12949
|
-
), moveActiveIndex =
|
|
12953
|
+
), moveActiveIndex = React4.useCallback(
|
|
12950
12954
|
(amountToMove) => {
|
|
12951
12955
|
setLocalActiveIndex((currentIndex) => getNextIndex(currentIndex + amountToMove));
|
|
12952
12956
|
},
|
|
12953
12957
|
[getNextIndex]
|
|
12954
|
-
), setActiveIndex =
|
|
12958
|
+
), setActiveIndex = React4.useCallback(
|
|
12955
12959
|
(nextIndex) => {
|
|
12956
12960
|
setLocalActiveIndex(getNextIndex(nextIndex));
|
|
12957
12961
|
},
|
|
12958
12962
|
[getNextIndex]
|
|
12959
|
-
), moveBackward =
|
|
12963
|
+
), moveBackward = React4.useCallback(() => moveActiveIndex(-1), [moveActiveIndex]), moveForward = React4.useCallback(() => moveActiveIndex(1), [moveActiveIndex]);
|
|
12960
12964
|
return {
|
|
12961
12965
|
activeIndex,
|
|
12962
12966
|
moveActiveIndex,
|
|
@@ -13060,7 +13064,7 @@ var require_Group_native = __commonJS({
|
|
|
13060
13064
|
useGroupItem: () => useGroupItem
|
|
13061
13065
|
});
|
|
13062
13066
|
module2.exports = __toCommonJS2(Group_exports);
|
|
13063
|
-
var import_core12 = require_index_native10(), import_create_context = require_index_native14(), import_stacks3 = require_index_native20(), import_use_controllable_state = require_index_native15(),
|
|
13067
|
+
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, {
|
|
13064
13068
|
name: "GroupFrame",
|
|
13065
13069
|
variants: {
|
|
13066
13070
|
unstyled: {
|
|
@@ -13079,7 +13083,7 @@ var require_Group_native = __commonJS({
|
|
|
13079
13083
|
});
|
|
13080
13084
|
function createGroup(verticalDefault) {
|
|
13081
13085
|
return (0, import_core12.withStaticProperties)(
|
|
13082
|
-
(0,
|
|
13086
|
+
(0, import_react2.forwardRef)((props, ref) => {
|
|
13083
13087
|
let activeProps = (0, import_core12.useProps)(props), {
|
|
13084
13088
|
__scopeGroup,
|
|
13085
13089
|
children: childrenProp,
|
|
@@ -13097,8 +13101,8 @@ var require_Group_native = __commonJS({
|
|
|
13097
13101
|
...restProps
|
|
13098
13102
|
} = (0, import_core12.getExpandedShorthands)(activeProps), vertical = orientation === "vertical", [itemChildrenCount, setItemChildrenCount] = (0, import_use_controllable_state.useControllableState)({
|
|
13099
13103
|
defaultProp: forceUseItem ? 1 : 0
|
|
13100
|
-
}), 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 =
|
|
13101
|
-
if (!(0,
|
|
13104
|
+
}), 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) => {
|
|
13105
|
+
if (!(0, import_react2.isValidElement)(child))
|
|
13102
13106
|
return child;
|
|
13103
13107
|
let disabled = child.props.disabled ?? disabledProp, isFirst = i === 0, isLast = i === childrenArray.length - 1, radiusStyles = disablePassBorderRadius === !0 ? null : getBorderRadius({
|
|
13104
13108
|
isFirst,
|
|
@@ -13119,10 +13123,10 @@ var require_Group_native = __commonJS({
|
|
|
13119
13123
|
space,
|
|
13120
13124
|
children
|
|
13121
13125
|
})
|
|
13122
|
-
), onItemMount =
|
|
13126
|
+
), onItemMount = import_react2.default.useCallback(
|
|
13123
13127
|
() => setItemChildrenCount((prev) => prev + 1),
|
|
13124
13128
|
[]
|
|
13125
|
-
), onItemUnmount =
|
|
13129
|
+
), onItemUnmount = import_react2.default.useCallback(
|
|
13126
13130
|
() => setItemChildrenCount((prev) => prev - 1),
|
|
13127
13131
|
[]
|
|
13128
13132
|
);
|
|
@@ -13158,11 +13162,11 @@ var require_Group_native = __commonJS({
|
|
|
13158
13162
|
var GroupItem = (props) => {
|
|
13159
13163
|
var _a;
|
|
13160
13164
|
let { __scopeGroup, children, forcePlacement } = props, groupItemProps = useGroupItem(
|
|
13161
|
-
{ disabled: (0,
|
|
13165
|
+
{ disabled: (0, import_react2.isValidElement)(children) ? children.props.disabled : void 0 },
|
|
13162
13166
|
forcePlacement,
|
|
13163
13167
|
__scopeGroup
|
|
13164
13168
|
);
|
|
13165
|
-
return (0,
|
|
13169
|
+
return (0, import_react2.isValidElement)(children) ? (0, import_core12.isTamaguiElement)(children) ? import_react2.default.cloneElement(children, groupItemProps) : import_react2.default.cloneElement(children, {
|
|
13166
13170
|
style: {
|
|
13167
13171
|
...(_a = children.props) == null ? void 0 : _a.style,
|
|
13168
13172
|
...groupItemProps
|
|
@@ -13170,7 +13174,7 @@ var require_Group_native = __commonJS({
|
|
|
13170
13174
|
}) : children;
|
|
13171
13175
|
}, useGroupItem = (childrenProps, forcePlacement, __scopeGroup) => {
|
|
13172
13176
|
let treeIndex = (0, import_reforest.useIndex)(), context = useGroupContext("GroupItem", __scopeGroup);
|
|
13173
|
-
if (
|
|
13177
|
+
if (import_react2.default.useEffect(() => (context.onItemMount(), () => {
|
|
13174
13178
|
context.onItemUnmount();
|
|
13175
13179
|
}), []), !treeIndex)
|
|
13176
13180
|
throw Error("<Group.Item/> should only be used within a <Group/>");
|
|
@@ -13213,7 +13217,7 @@ var require_Group_native = __commonJS({
|
|
|
13213
13217
|
borderBottomRightRadius: isLast && disable !== "bottom" && disable !== "end" ? radius : 0
|
|
13214
13218
|
}), cloneElementWithPropOrder = (child, props) => {
|
|
13215
13219
|
let next = (0, import_core12.mergeProps)(child.props, props, (0, import_core12.getConfig)().shorthands);
|
|
13216
|
-
return
|
|
13220
|
+
return import_react2.default.cloneElement({ ...child, props: null }, next);
|
|
13217
13221
|
};
|
|
13218
13222
|
}
|
|
13219
13223
|
});
|
|
@@ -13539,9 +13543,9 @@ var require_useFloating_native = __commonJS({
|
|
|
13539
13543
|
useFloating: () => useFloating2
|
|
13540
13544
|
});
|
|
13541
13545
|
module2.exports = __toCommonJS2(useFloating_exports);
|
|
13542
|
-
var
|
|
13546
|
+
var import_react2 = require("react"), Floating = __toESM2(require_Floating_native()), FloatingOverrideContext2 = (0, import_react2.createContext)(null), useFloating2 = (props) => {
|
|
13543
13547
|
var _a;
|
|
13544
|
-
return (_a = (0,
|
|
13548
|
+
return (_a = (0, import_react2.useContext)(FloatingOverrideContext2) || Floating.useFloating) == null ? void 0 : _a(props);
|
|
13545
13549
|
};
|
|
13546
13550
|
}
|
|
13547
13551
|
});
|
|
@@ -13599,7 +13603,7 @@ var require_Popper_native = __commonJS({
|
|
|
13599
13603
|
usePopperContext: () => usePopperContext
|
|
13600
13604
|
});
|
|
13601
13605
|
module2.exports = __toCommonJS2(Popper_exports);
|
|
13602
|
-
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(),
|
|
13606
|
+
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);
|
|
13603
13607
|
function Popper(props) {
|
|
13604
13608
|
let {
|
|
13605
13609
|
children,
|
|
@@ -13609,11 +13613,11 @@ var require_Popper_native = __commonJS({
|
|
|
13609
13613
|
stayInFrame,
|
|
13610
13614
|
allowFlip,
|
|
13611
13615
|
offset
|
|
13612
|
-
} = props, [isMounted, setIsMounted] =
|
|
13616
|
+
} = props, [isMounted, setIsMounted] = React2.useState(!1);
|
|
13613
13617
|
(0, import_core12.useIsomorphicLayoutEffect)(() => {
|
|
13614
13618
|
setIsMounted(!0);
|
|
13615
13619
|
}, []);
|
|
13616
|
-
let [anchorRef, setAnchorRef] =
|
|
13620
|
+
let [anchorRef, setAnchorRef] = React2.useState(), [arrowEl, setArrow] = React2.useState(null), [arrowSize, setArrowSize] = React2.useState(0), offsetOptions = offset ?? arrowSize, floating = (0, import_floating.useFloating)({
|
|
13617
13621
|
strategy,
|
|
13618
13622
|
placement,
|
|
13619
13623
|
sameScrollView: !1,
|
|
@@ -13638,8 +13642,8 @@ var require_Popper_native = __commonJS({
|
|
|
13638
13642
|
return (0, import_floating.autoUpdate)(refs.reference.current, refs.floating.current, floating.update);
|
|
13639
13643
|
}, [open, floating.update, refs.floating, refs.reference]);
|
|
13640
13644
|
else {
|
|
13641
|
-
let dimensions = (0, import_react_native4.useWindowDimensions)(), [keyboardOpen, setKeyboardOpen] =
|
|
13642
|
-
|
|
13645
|
+
let dimensions = (0, import_react_native4.useWindowDimensions)(), [keyboardOpen, setKeyboardOpen] = React2.useState(!1);
|
|
13646
|
+
React2.useEffect(() => {
|
|
13643
13647
|
let showSubscription = import_react_native4.Keyboard.addListener("keyboardDidShow", () => {
|
|
13644
13648
|
setKeyboardOpen(!0);
|
|
13645
13649
|
}), hideSubscription = import_react_native4.Keyboard.addListener("keyboardDidHide", () => {
|
|
@@ -13664,8 +13668,8 @@ var require_Popper_native = __commonJS({
|
|
|
13664
13668
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperContext.Provider, { ...popperContext, children });
|
|
13665
13669
|
}
|
|
13666
13670
|
var PopperAnchor = import_stacks3.YStack.extractable(
|
|
13667
|
-
|
|
13668
|
-
let { virtualRef, ...anchorProps } = props, { anchorRef, getReferenceProps } = usePopperContext(), ref =
|
|
13671
|
+
React2.forwardRef(function(props, forwardedRef) {
|
|
13672
|
+
let { virtualRef, ...anchorProps } = props, { anchorRef, getReferenceProps } = usePopperContext(), ref = React2.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref, anchorRef);
|
|
13669
13673
|
if (virtualRef)
|
|
13670
13674
|
return null;
|
|
13671
13675
|
let stackProps = {
|
|
@@ -13700,9 +13704,9 @@ var require_Popper_native = __commonJS({
|
|
|
13700
13704
|
defaultVariants: {
|
|
13701
13705
|
unstyled: !1
|
|
13702
13706
|
}
|
|
13703
|
-
}), PopperContent =
|
|
13707
|
+
}), PopperContent = React2.forwardRef(
|
|
13704
13708
|
function(props, forwardedRef) {
|
|
13705
|
-
let { strategy, placement, refs, x, y, getFloatingProps, size, isMounted, update } = usePopperContext(), contentRefs = (0, import_compose_refs.useComposedRefs)(refs.setFloating, forwardedRef), contents =
|
|
13709
|
+
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)(
|
|
13706
13710
|
PopperContentFrame,
|
|
13707
13711
|
{
|
|
13708
13712
|
"data-placement": placement,
|
|
@@ -13830,20 +13834,20 @@ var require_dist2 = __commonJS({
|
|
|
13830
13834
|
function _interopDefault(ex) {
|
|
13831
13835
|
return ex && typeof ex == "object" && "default" in ex ? ex.default : ex;
|
|
13832
13836
|
}
|
|
13833
|
-
var
|
|
13837
|
+
var React2 = require("react"), React__default = _interopDefault(React2);
|
|
13834
13838
|
function Suspender(_ref) {
|
|
13835
|
-
var freeze = _ref.freeze, children = _ref.children, promiseCache =
|
|
13839
|
+
var freeze = _ref.freeze, children = _ref.children, promiseCache = React2.useRef({}).current;
|
|
13836
13840
|
if (freeze && !promiseCache.promise)
|
|
13837
13841
|
throw promiseCache.promise = new Promise(function(resolve) {
|
|
13838
13842
|
promiseCache.resolve = resolve;
|
|
13839
13843
|
}), promiseCache.promise;
|
|
13840
13844
|
if (freeze)
|
|
13841
13845
|
throw promiseCache.promise;
|
|
13842
|
-
return promiseCache.promise && (promiseCache.resolve(), promiseCache.promise = void 0), React__default.createElement(
|
|
13846
|
+
return promiseCache.promise && (promiseCache.resolve(), promiseCache.promise = void 0), React__default.createElement(React2.Fragment, null, children);
|
|
13843
13847
|
}
|
|
13844
13848
|
function Freeze(_ref2) {
|
|
13845
13849
|
var freeze = _ref2.freeze, children = _ref2.children, _ref2$placeholder = _ref2.placeholder, placeholder = _ref2$placeholder === void 0 ? null : _ref2$placeholder;
|
|
13846
|
-
return React__default.createElement(
|
|
13850
|
+
return React__default.createElement(React2.Suspense, {
|
|
13847
13851
|
fallback: placeholder
|
|
13848
13852
|
}, React__default.createElement(Suspender, {
|
|
13849
13853
|
freeze
|
|
@@ -13870,7 +13874,7 @@ var require_useFloatingContext_native = __commonJS({
|
|
|
13870
13874
|
useFloatingContext: () => useFloatingContext
|
|
13871
13875
|
});
|
|
13872
13876
|
module2.exports = __toCommonJS2(useFloatingContext_native_exports);
|
|
13873
|
-
var
|
|
13877
|
+
var import_react2 = require("react"), useFloatingContext = () => (0, import_react2.useCallback)(() => {
|
|
13874
13878
|
}, []);
|
|
13875
13879
|
}
|
|
13876
13880
|
});
|
|
@@ -13906,12 +13910,12 @@ var require_Popover_native = __commonJS({
|
|
|
13906
13910
|
usePopoverContext: () => usePopoverContext
|
|
13907
13911
|
});
|
|
13908
13912
|
module2.exports = __toCommonJS2(Popover_exports);
|
|
13909
|
-
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(),
|
|
13913
|
+
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(
|
|
13910
13914
|
function(props, forwardedRef) {
|
|
13911
13915
|
let context = usePopoverContext(), { onCustomAnchorAdd, onCustomAnchorRemove } = context;
|
|
13912
|
-
return
|
|
13916
|
+
return React2.useEffect(() => (onCustomAnchorAdd(), () => onCustomAnchorRemove()), [onCustomAnchorAdd, onCustomAnchorRemove]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperAnchor, { ...props, ref: forwardedRef });
|
|
13913
13917
|
}
|
|
13914
|
-
), PopoverTrigger =
|
|
13918
|
+
), PopoverTrigger = React2.forwardRef(
|
|
13915
13919
|
function(props, forwardedRef) {
|
|
13916
13920
|
let context = usePopoverContext(), composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef), trigger = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
13917
13921
|
import_core12.View,
|
|
@@ -13927,7 +13931,7 @@ var require_Popover_native = __commonJS({
|
|
|
13927
13931
|
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperAnchor, { asChild: !0, children: trigger });
|
|
13928
13932
|
}
|
|
13929
13933
|
), PopoverContent = import_popper.PopperContentFrame.extractable(
|
|
13930
|
-
|
|
13934
|
+
React2.forwardRef(
|
|
13931
13935
|
function(props, forwardedRef) {
|
|
13932
13936
|
let {
|
|
13933
13937
|
allowPinchZoom,
|
|
@@ -13935,8 +13939,8 @@ var require_Popover_native = __commonJS({
|
|
|
13935
13939
|
disableRemoveScroll = !0,
|
|
13936
13940
|
zIndex,
|
|
13937
13941
|
...contentImplProps
|
|
13938
|
-
} = props, context = usePopoverContext(), contentRef =
|
|
13939
|
-
return
|
|
13942
|
+
} = props, context = usePopoverContext(), contentRef = React2.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isRightClickOutsideRef = React2.useRef(!1);
|
|
13943
|
+
return React2.useEffect(() => {
|
|
13940
13944
|
if (!context.open)
|
|
13941
13945
|
return;
|
|
13942
13946
|
let content = contentRef.current;
|
|
@@ -13988,7 +13992,7 @@ var require_Popover_native = __commonJS({
|
|
|
13988
13992
|
contents
|
|
13989
13993
|
] }) });
|
|
13990
13994
|
}
|
|
13991
|
-
var PopoverContentImpl =
|
|
13995
|
+
var PopoverContentImpl = React2.forwardRef(function(props, forwardedRef) {
|
|
13992
13996
|
let {
|
|
13993
13997
|
trapFocus,
|
|
13994
13998
|
onOpenAutoFocus,
|
|
@@ -14003,11 +14007,11 @@ var require_Popover_native = __commonJS({
|
|
|
14003
14007
|
disableRemoveScroll,
|
|
14004
14008
|
freezeContentsWhenHidden,
|
|
14005
14009
|
...contentProps
|
|
14006
|
-
} = props, context = usePopoverContext(), { open, keepChildrenMounted } = context, popperContext = (0, import_popper.usePopperContext)(), [isFullyHidden, setIsFullyHidden] =
|
|
14010
|
+
} = 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]);
|
|
14007
14011
|
if (open && isFullyHidden && setIsFullyHidden(!1), !keepChildrenMounted && isFullyHidden)
|
|
14008
14012
|
return null;
|
|
14009
14013
|
if (context.breakpointActive) {
|
|
14010
|
-
let childrenWithoutScrollView =
|
|
14014
|
+
let childrenWithoutScrollView = React2.Children.toArray(children).map((child) => React2.isValidElement(child) && child.type === import_react_native4.ScrollView ? child.props.children : child), content = childrenWithoutScrollView;
|
|
14011
14015
|
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 });
|
|
14012
14016
|
}
|
|
14013
14017
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -14060,9 +14064,9 @@ var require_Popover_native = __commonJS({
|
|
|
14060
14064
|
}
|
|
14061
14065
|
);
|
|
14062
14066
|
}), FreezeToLastContents = (props) => {
|
|
14063
|
-
let last =
|
|
14067
|
+
let last = React2.useRef();
|
|
14064
14068
|
return props.freeze || (last.current = props.children), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_freeze.Freeze, { placeholder: last.current, ...props });
|
|
14065
|
-
}, PopoverClose =
|
|
14069
|
+
}, PopoverClose = React2.forwardRef(
|
|
14066
14070
|
function(props, forwardedRef) {
|
|
14067
14071
|
let context = usePopoverContext();
|
|
14068
14072
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -14078,7 +14082,7 @@ var require_Popover_native = __commonJS({
|
|
|
14078
14082
|
}
|
|
14079
14083
|
);
|
|
14080
14084
|
}
|
|
14081
|
-
), PopoverArrow =
|
|
14085
|
+
), PopoverArrow = React2.forwardRef(
|
|
14082
14086
|
function(props, forwardedRef) {
|
|
14083
14087
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperArrow, { componentName: "PopoverArrow", ...props, ref: forwardedRef });
|
|
14084
14088
|
}
|
|
@@ -14091,16 +14095,16 @@ var require_Popover_native = __commonJS({
|
|
|
14091
14095
|
onOpenChange,
|
|
14092
14096
|
keepChildrenMounted,
|
|
14093
14097
|
...restProps
|
|
14094
|
-
} = props, id =
|
|
14095
|
-
Contents:
|
|
14096
|
-
}), sheetBreakpoint = when, triggerRef =
|
|
14098
|
+
} = props, id = React2.useId(), { when, AdaptProvider } = (0, import_adapt.useAdaptParent)({
|
|
14099
|
+
Contents: React2.useCallback(() => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, { name: `${id}PopoverContents` }), [])
|
|
14100
|
+
}), sheetBreakpoint = when, triggerRef = React2.useRef(null), [hasCustomAnchor, setHasCustomAnchor] = React2.useState(!1), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
14097
14101
|
prop: openProp,
|
|
14098
14102
|
defaultProp: defaultOpen || !1,
|
|
14099
14103
|
onChange: onOpenChange
|
|
14100
14104
|
}), breakpointActive = useSheetBreakpointActive(sheetBreakpoint), floatingContext = (0, import_useFloatingContext.useFloatingContext)({ open, setOpen, breakpointActive }), popoverContext = {
|
|
14101
14105
|
id,
|
|
14102
14106
|
sheetBreakpoint,
|
|
14103
|
-
contentId:
|
|
14107
|
+
contentId: React2.useId(),
|
|
14104
14108
|
triggerRef,
|
|
14105
14109
|
open,
|
|
14106
14110
|
breakpointActive,
|
|
@@ -14109,8 +14113,8 @@ var require_Popover_native = __commonJS({
|
|
|
14109
14113
|
open && breakpointActive || setOpen(!open);
|
|
14110
14114
|
}),
|
|
14111
14115
|
hasCustomAnchor,
|
|
14112
|
-
onCustomAnchorAdd:
|
|
14113
|
-
onCustomAnchorRemove:
|
|
14116
|
+
onCustomAnchorAdd: React2.useCallback(() => setHasCustomAnchor(!0), []),
|
|
14117
|
+
onCustomAnchorRemove: React2.useCallback(() => setHasCustomAnchor(!1), []),
|
|
14114
14118
|
keepChildrenMounted
|
|
14115
14119
|
}, 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 }) }) });
|
|
14116
14120
|
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 });
|
|
@@ -14196,7 +14200,7 @@ var require_Progress_native = __commonJS({
|
|
|
14196
14200
|
createProgressScope: () => createProgressScope
|
|
14197
14201
|
});
|
|
14198
14202
|
module2.exports = __toCommonJS2(Progress_exports);
|
|
14199
|
-
var import_core12 = require_index_native10(), import_create_context = require_index_native14(), import_get_token2 = require_index_native18(), import_stacks3 = require_index_native20(),
|
|
14203
|
+
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, {
|
|
14200
14204
|
name: INDICATOR_NAME,
|
|
14201
14205
|
variants: {
|
|
14202
14206
|
unstyled: {
|
|
@@ -14277,7 +14281,7 @@ var require_Progress_native = __commonJS({
|
|
|
14277
14281
|
getValueLabel = defaultGetValueLabel,
|
|
14278
14282
|
size = "$true",
|
|
14279
14283
|
...progressProps
|
|
14280
|
-
} = props, max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX, value = isValidValueNumber(valueProp, max) ? valueProp : null, valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0, [width, setWidth] =
|
|
14284
|
+
} = 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);
|
|
14281
14285
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProgressProvider, { scope: __scopeProgress, value, max, width, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
14282
14286
|
ProgressFrame,
|
|
14283
14287
|
{
|
|
@@ -14348,7 +14352,7 @@ var require_RadioGroup_native = __commonJS({
|
|
|
14348
14352
|
createRadioGroupScope: () => createRadioGroupScope
|
|
14349
14353
|
});
|
|
14350
14354
|
module2.exports = __toCommonJS2(RadioGroup_exports);
|
|
14351
|
-
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(),
|
|
14355
|
+
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, {
|
|
14352
14356
|
name: RADIO_GROUP_INDICATOR_NAME,
|
|
14353
14357
|
variants: {
|
|
14354
14358
|
unstyled: {
|
|
@@ -14365,7 +14369,7 @@ var require_RadioGroup_native = __commonJS({
|
|
|
14365
14369
|
unstyled: !1
|
|
14366
14370
|
}
|
|
14367
14371
|
}), RadioIndicator = RadioIndicatorFrame.extractable(
|
|
14368
|
-
|
|
14372
|
+
React2.forwardRef(
|
|
14369
14373
|
(props, forwardedRef) => {
|
|
14370
14374
|
let { __scopeRadioGroupItem, forceMount, disabled, ...indicatorProps } = props, { checked } = useRadioGroupItemContext(
|
|
14371
14375
|
RADIO_GROUP_INDICATOR_NAME,
|
|
@@ -14404,7 +14408,10 @@ var require_RadioGroup_native = __commonJS({
|
|
|
14404
14408
|
},
|
|
14405
14409
|
focusStyle: {
|
|
14406
14410
|
borderColor: "$borderColorHover",
|
|
14407
|
-
backgroundColor: "$backgroundHover"
|
|
14411
|
+
backgroundColor: "$backgroundHover",
|
|
14412
|
+
outlineStyle: "solid",
|
|
14413
|
+
outlineWidth: 2,
|
|
14414
|
+
outlineColor: "$borderColorFocus"
|
|
14408
14415
|
},
|
|
14409
14416
|
pressStyle: {
|
|
14410
14417
|
borderColor: "$borderColorFocus",
|
|
@@ -14428,7 +14435,7 @@ var require_RadioGroup_native = __commonJS({
|
|
|
14428
14435
|
unstyled: !1
|
|
14429
14436
|
}
|
|
14430
14437
|
}), RadioGroupItem = RadioGroupItemFrame.extractable(
|
|
14431
|
-
|
|
14438
|
+
React2.forwardRef(
|
|
14432
14439
|
(props, forwardedRef) => {
|
|
14433
14440
|
let {
|
|
14434
14441
|
__scopeRadioGroup,
|
|
@@ -14444,8 +14451,8 @@ var require_RadioGroup_native = __commonJS({
|
|
|
14444
14451
|
name,
|
|
14445
14452
|
native,
|
|
14446
14453
|
accentColor
|
|
14447
|
-
} = useRadioGroupContext(RADIO_GROUP_ITEM_NAME, __scopeRadioGroup), [button, setButton] =
|
|
14448
|
-
|
|
14454
|
+
} = 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;
|
|
14455
|
+
React2.useEffect(() => {
|
|
14449
14456
|
if (import_core12.isWeb) {
|
|
14450
14457
|
let handleKeyDown = (event) => {
|
|
14451
14458
|
ARROW_KEYS.includes(event.key) && (isArrowKeyPressedRef.current = !0);
|
|
@@ -14456,7 +14463,7 @@ var require_RadioGroup_native = __commonJS({
|
|
|
14456
14463
|
document.removeEventListener("keydown", handleKeyDown), document.removeEventListener("keyup", handleKeyUp);
|
|
14457
14464
|
};
|
|
14458
14465
|
}
|
|
14459
|
-
}, []),
|
|
14466
|
+
}, []), React2.useEffect(() => {
|
|
14460
14467
|
if (props.id)
|
|
14461
14468
|
return (0, import_focusable2.registerFocusable)(props.id, {
|
|
14462
14469
|
focusAndSelect: () => {
|
|
@@ -14531,8 +14538,8 @@ var require_RadioGroup_native = __commonJS({
|
|
|
14531
14538
|
}
|
|
14532
14539
|
)
|
|
14533
14540
|
), BubbleInput = (props) => {
|
|
14534
|
-
let { checked, bubbles = !0, control, isHidden, accentColor, ...inputProps } = props, ref =
|
|
14535
|
-
return
|
|
14541
|
+
let { checked, bubbles = !0, control, isHidden, accentColor, ...inputProps } = props, ref = React2.useRef(null), prevChecked = (0, import_use_previous.usePrevious)(checked);
|
|
14542
|
+
return React2.useEffect(() => {
|
|
14536
14543
|
let input = ref.current, inputProto = window.HTMLInputElement.prototype, setChecked = Object.getOwnPropertyDescriptor(
|
|
14537
14544
|
inputProto,
|
|
14538
14545
|
"checked"
|
|
@@ -14581,7 +14588,7 @@ var require_RadioGroup_native = __commonJS({
|
|
|
14581
14588
|
}
|
|
14582
14589
|
}), RadioGroup = (0, import_core12.withStaticProperties)(
|
|
14583
14590
|
RadioGroupFrame.extractable(
|
|
14584
|
-
|
|
14591
|
+
React2.forwardRef(
|
|
14585
14592
|
(props, forwardedRef) => {
|
|
14586
14593
|
let {
|
|
14587
14594
|
__scopeRadioGroup,
|
|
@@ -14844,7 +14851,7 @@ var require_SelectItem_native = __commonJS({
|
|
|
14844
14851
|
useSelectItemContext: () => useSelectItemContext
|
|
14845
14852
|
});
|
|
14846
14853
|
module2.exports = __toCommonJS2(SelectItem_exports);
|
|
14847
|
-
var import_compose_refs = require_index_native6(), import_core12 = require_index_native10(), import_list_item = require_index_native51(),
|
|
14854
|
+
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(
|
|
14848
14855
|
(props, forwardedRef) => {
|
|
14849
14856
|
let {
|
|
14850
14857
|
__scopeSelect,
|
|
@@ -14869,13 +14876,13 @@ var require_SelectItem_native = __commonJS({
|
|
|
14869
14876
|
shouldRenderWebNative,
|
|
14870
14877
|
size,
|
|
14871
14878
|
initialValue
|
|
14872
|
-
} = context, [isSelected, setSelected] =
|
|
14873
|
-
|
|
14879
|
+
} = context, [isSelected, setSelected] = React2.useState(initialValue === value), [isActive, setActive] = React2.useState(!1);
|
|
14880
|
+
React2.useEffect(() => activeIndexSubscribe((i) => {
|
|
14874
14881
|
setActive(index === i);
|
|
14875
|
-
}), [index]),
|
|
14882
|
+
}), [index]), React2.useEffect(() => valueSubscribe((val) => {
|
|
14876
14883
|
setSelected(val === value);
|
|
14877
14884
|
}), [value]);
|
|
14878
|
-
let textId =
|
|
14885
|
+
let textId = React2.useId(), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, (node) => {
|
|
14879
14886
|
import_core12.isWeb && node instanceof HTMLElement && listRef && (listRef.current[index] = node);
|
|
14880
14887
|
});
|
|
14881
14888
|
(0, import_core12.useIsomorphicLayoutEffect)(() => {
|
|
@@ -15001,7 +15008,7 @@ var require_SelectTrigger_native = __commonJS({
|
|
|
15001
15008
|
SelectTrigger: () => SelectTrigger
|
|
15002
15009
|
});
|
|
15003
15010
|
module2.exports = __toCommonJS2(SelectTrigger_exports);
|
|
15004
|
-
var import_compose_refs = require_index_native6(), import_list_item = require_index_native51(),
|
|
15011
|
+
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(
|
|
15005
15012
|
function(props, forwardedRef) {
|
|
15006
15013
|
var _a;
|
|
15007
15014
|
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)(
|
|
@@ -15068,8 +15075,8 @@ var require_SelectViewport_native = __commonJS({
|
|
|
15068
15075
|
SelectViewport: () => SelectViewport
|
|
15069
15076
|
});
|
|
15070
15077
|
module2.exports = __toCommonJS2(SelectViewport_native_exports);
|
|
15071
|
-
var import_adapt = require_index_native25(), import_core12 = require_index_native10(), import_portal2 = require_index_native29(),
|
|
15072
|
-
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 =
|
|
15078
|
+
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) => {
|
|
15079
|
+
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);
|
|
15073
15080
|
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)(
|
|
15074
15081
|
import_context.ForwardSelectContext,
|
|
15075
15082
|
{
|
|
@@ -15140,7 +15147,7 @@ var require_Select_native = __commonJS({
|
|
|
15140
15147
|
SelectSeparator: () => SelectSeparator
|
|
15141
15148
|
});
|
|
15142
15149
|
module2.exports = __toCommonJS2(Select_exports);
|
|
15143
|
-
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(),
|
|
15150
|
+
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, {
|
|
15144
15151
|
name: VALUE_NAME,
|
|
15145
15152
|
userSelect: "none"
|
|
15146
15153
|
}), SelectValue = SelectValueFrame.styleable(function({
|
|
@@ -15165,7 +15172,7 @@ var require_Select_native = __commonJS({
|
|
|
15165
15172
|
);
|
|
15166
15173
|
});
|
|
15167
15174
|
function unwrapSelectItem(selectValueChildren) {
|
|
15168
|
-
return
|
|
15175
|
+
return React2.Children.map(selectValueChildren, (child) => {
|
|
15169
15176
|
var _a, _b, _c;
|
|
15170
15177
|
if (child) {
|
|
15171
15178
|
if (((_b = (_a = child.type) == null ? void 0 : _a.staticConfig) == null ? void 0 : _b.componentName) === ITEM_TEXT_NAME)
|
|
@@ -15195,9 +15202,9 @@ var require_Select_native = __commonJS({
|
|
|
15195
15202
|
defaultVariants: {
|
|
15196
15203
|
unstyled: !1
|
|
15197
15204
|
}
|
|
15198
|
-
}), SelectItemText =
|
|
15205
|
+
}), SelectItemText = React2.forwardRef(
|
|
15199
15206
|
(props, forwardedRef) => {
|
|
15200
|
-
let { __scopeSelect, className, ...itemTextProps } = props, context = (0, import_context.useSelectContext)(ITEM_TEXT_NAME, __scopeSelect), itemParentContext = (0, import_context.useSelectItemParentContext)(ITEM_TEXT_NAME, __scopeSelect), ref =
|
|
15207
|
+
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(
|
|
15201
15208
|
() => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
15202
15209
|
SelectItemTextFrame,
|
|
15203
15210
|
{
|
|
@@ -15211,9 +15218,9 @@ var require_Select_native = __commonJS({
|
|
|
15211
15218
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
15212
15219
|
[props, itemParentContext.size, className, itemContext.textId]
|
|
15213
15220
|
);
|
|
15214
|
-
return
|
|
15221
|
+
return React2.useEffect(() => {
|
|
15215
15222
|
itemParentContext.initialValue === itemContext.value && !context.selectedIndex && context.setSelectedItem(contents);
|
|
15216
|
-
}, []),
|
|
15223
|
+
}, []), React2.useEffect(() => itemParentContext.valueSubscribe((val) => {
|
|
15217
15224
|
val === itemContext.value && context.setSelectedItem(contents);
|
|
15218
15225
|
}), [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 });
|
|
15219
15226
|
}
|
|
@@ -15221,7 +15228,7 @@ var require_Select_native = __commonJS({
|
|
|
15221
15228
|
SelectItemText.displayName = ITEM_TEXT_NAME;
|
|
15222
15229
|
var ITEM_INDICATOR_NAME = "SelectItemIndicator", SelectItemIndicatorFrame = (0, import_core12.styled)(import_stacks3.XStack, {
|
|
15223
15230
|
name: ITEM_TEXT_NAME
|
|
15224
|
-
}), SelectItemIndicator =
|
|
15231
|
+
}), SelectItemIndicator = React2.forwardRef(
|
|
15225
15232
|
(props, forwardedRef) => {
|
|
15226
15233
|
let { __scopeSelect, ...itemIndicatorProps } = props, context = (0, import_context.useSelectItemParentContext)(ITEM_INDICATOR_NAME, __scopeSelect), itemContext = (0, import_SelectItem.useSelectItemContext)(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
15227
15234
|
return context.shouldRenderWebNative ? null : itemContext.isSelected ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemIndicatorFrame, { "aria-hidden": !0, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
@@ -15263,9 +15270,9 @@ var require_Select_native = __commonJS({
|
|
|
15263
15270
|
defaultVariants: {
|
|
15264
15271
|
size: "$2"
|
|
15265
15272
|
}
|
|
15266
|
-
}), SelectGroup =
|
|
15273
|
+
}), SelectGroup = React2.forwardRef(
|
|
15267
15274
|
(props, forwardedRef) => {
|
|
15268
|
-
let { __scopeSelect, ...groupProps } = props, groupId =
|
|
15275
|
+
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() {
|
|
15269
15276
|
return itemParentContext.shouldRenderWebNative ? (
|
|
15270
15277
|
// @ts-expect-error until we support typing based on tag
|
|
15271
15278
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(NativeSelectFrame, { asChild: !0, size, value: context.value, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -15298,7 +15305,7 @@ var require_Select_native = __commonJS({
|
|
|
15298
15305
|
}
|
|
15299
15306
|
);
|
|
15300
15307
|
SelectGroup.displayName = GROUP_NAME;
|
|
15301
|
-
var LABEL_NAME = "SelectLabel", SelectLabel =
|
|
15308
|
+
var LABEL_NAME = "SelectLabel", SelectLabel = React2.forwardRef(
|
|
15302
15309
|
(props, forwardedRef) => {
|
|
15303
15310
|
let { __scopeSelect, ...labelProps } = props, context = (0, import_context.useSelectItemParentContext)(LABEL_NAME, __scopeSelect), groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
15304
15311
|
return context.shouldRenderWebNative ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -15343,14 +15350,15 @@ var require_Select_native = __commonJS({
|
|
|
15343
15350
|
value: valueProp,
|
|
15344
15351
|
defaultValue,
|
|
15345
15352
|
onValueChange,
|
|
15353
|
+
disablePreventBodyScroll,
|
|
15346
15354
|
size: sizeProp = "$true",
|
|
15347
15355
|
dir
|
|
15348
|
-
} = props, id =
|
|
15349
|
-
Contents:
|
|
15356
|
+
} = props, id = React2.useId(), scopeKey = __scopeSelect ? Object.keys(__scopeSelect)[0] ?? id : id, { when, AdaptProvider } = (0, import_adapt.useAdaptParent)({
|
|
15357
|
+
Contents: React2.useCallback(
|
|
15350
15358
|
() => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, { name: `${scopeKey}SheetContents` }),
|
|
15351
15359
|
[scopeKey]
|
|
15352
15360
|
)
|
|
15353
|
-
}), sheetBreakpoint = when, SelectImpl = (0, import_useSelectBreakpointActive.useSelectBreakpointActive)(sheetBreakpoint) || !import_core12.isWeb ? SelectSheetImpl : import_SelectImpl.SelectInlineImpl, forceUpdate =
|
|
15361
|
+
}), 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)({
|
|
15354
15362
|
prop: openProp,
|
|
15355
15363
|
defaultProp: defaultOpen || !1,
|
|
15356
15364
|
onChange: onOpenChange
|
|
@@ -15360,10 +15368,10 @@ var require_Select_native = __commonJS({
|
|
|
15360
15368
|
onChange: onValueChange,
|
|
15361
15369
|
transition: !0
|
|
15362
15370
|
});
|
|
15363
|
-
|
|
15371
|
+
React2.useEffect(() => {
|
|
15364
15372
|
open && emitValue(value);
|
|
15365
15373
|
}, [open]);
|
|
15366
|
-
let [activeIndex, setActiveIndex] =
|
|
15374
|
+
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);
|
|
15367
15375
|
(0, import_core12.useIsomorphicLayoutEffect)(() => {
|
|
15368
15376
|
selectedIndexRef.current = selectedIndex, activeIndexRef.current = activeIndex;
|
|
15369
15377
|
});
|
|
@@ -15372,16 +15380,16 @@ var require_Select_native = __commonJS({
|
|
|
15372
15380
|
import_context.SelectItemParentProvider,
|
|
15373
15381
|
{
|
|
15374
15382
|
scope: __scopeSelect,
|
|
15375
|
-
initialValue:
|
|
15383
|
+
initialValue: React2.useMemo(() => value, []),
|
|
15376
15384
|
size: sizeProp,
|
|
15377
15385
|
activeIndexSubscribe,
|
|
15378
15386
|
valueSubscribe,
|
|
15379
15387
|
setOpen,
|
|
15380
|
-
onChange:
|
|
15388
|
+
onChange: React2.useCallback((val) => {
|
|
15381
15389
|
setValue(val), emitValue(val);
|
|
15382
15390
|
}, []),
|
|
15383
15391
|
setSelectedIndex,
|
|
15384
|
-
setValueAtIndex:
|
|
15392
|
+
setValueAtIndex: React2.useCallback((index, value2) => {
|
|
15385
15393
|
listContentRef.current[index] = value2;
|
|
15386
15394
|
}, []),
|
|
15387
15395
|
shouldRenderWebNative,
|
|
@@ -15389,6 +15397,7 @@ var require_Select_native = __commonJS({
|
|
|
15389
15397
|
import_context.SelectProvider,
|
|
15390
15398
|
{
|
|
15391
15399
|
scope: __scopeSelect,
|
|
15400
|
+
disablePreventBodyScroll,
|
|
15392
15401
|
dir,
|
|
15393
15402
|
blockSelection: !1,
|
|
15394
15403
|
fallback: !1,
|
|
@@ -15401,7 +15410,7 @@ var require_Select_native = __commonJS({
|
|
|
15401
15410
|
sheetBreakpoint,
|
|
15402
15411
|
activeIndex,
|
|
15403
15412
|
selectedIndex,
|
|
15404
|
-
setActiveIndex:
|
|
15413
|
+
setActiveIndex: React2.useCallback((index) => {
|
|
15405
15414
|
setActiveIndex(index), typeof index == "number" && emitActiveIndex(index);
|
|
15406
15415
|
}, []),
|
|
15407
15416
|
value,
|
|
@@ -15442,11 +15451,11 @@ var require_Select_native = __commonJS({
|
|
|
15442
15451
|
}
|
|
15443
15452
|
);
|
|
15444
15453
|
function useEmitter() {
|
|
15445
|
-
let listeners =
|
|
15454
|
+
let listeners = React2.useRef();
|
|
15446
15455
|
listeners.current || (listeners.current = /* @__PURE__ */ new Set());
|
|
15447
15456
|
let emit = (value) => {
|
|
15448
15457
|
listeners.current.forEach((l) => l(value));
|
|
15449
|
-
}, subscribe =
|
|
15458
|
+
}, subscribe = React2.useCallback((listener) => (listeners.current.add(listener), () => {
|
|
15450
15459
|
listeners.current.delete(listener);
|
|
15451
15460
|
}), []);
|
|
15452
15461
|
return [emit, subscribe];
|
|
@@ -15609,7 +15618,7 @@ var require_SliderImpl_native = __commonJS({
|
|
|
15609
15618
|
SliderImpl: () => SliderImpl
|
|
15610
15619
|
});
|
|
15611
15620
|
module2.exports = __toCommonJS2(SliderImpl_exports);
|
|
15612
|
-
var import_core12 = require_index_native10(), import_get_token2 = require_index_native18(), import_stacks3 = require_index_native20(),
|
|
15621
|
+
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, {
|
|
15613
15622
|
variants: {
|
|
15614
15623
|
orientation: {
|
|
15615
15624
|
horizontal: {},
|
|
@@ -15634,7 +15643,7 @@ var require_SliderImpl_native = __commonJS({
|
|
|
15634
15643
|
};
|
|
15635
15644
|
}
|
|
15636
15645
|
}
|
|
15637
|
-
}), SliderImpl =
|
|
15646
|
+
}), SliderImpl = React2.forwardRef(
|
|
15638
15647
|
(props, forwardedRef) => {
|
|
15639
15648
|
let {
|
|
15640
15649
|
__scopeSlider,
|
|
@@ -15714,7 +15723,7 @@ var require_Slider_native = __commonJS({
|
|
|
15714
15723
|
Track: () => Track
|
|
15715
15724
|
});
|
|
15716
15725
|
module2.exports = __toCommonJS2(Slider_exports);
|
|
15717
|
-
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(),
|
|
15726
|
+
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(
|
|
15718
15727
|
(props, forwardedRef) => {
|
|
15719
15728
|
let {
|
|
15720
15729
|
min,
|
|
@@ -15725,7 +15734,7 @@ var require_Slider_native = __commonJS({
|
|
|
15725
15734
|
onStepKeyDown,
|
|
15726
15735
|
onSlideEnd,
|
|
15727
15736
|
...sliderProps
|
|
15728
|
-
} = props, direction = (0, import_use_direction.useDirection)(dir), isDirectionLTR = direction === "ltr", sliderRef =
|
|
15737
|
+
} = 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_);
|
|
15729
15738
|
function getValueFromPointer(pointerPosition) {
|
|
15730
15739
|
let input = [0, state.size];
|
|
15731
15740
|
return (0, import_helpers2.linearScale)(input, isDirectionLTR ? [min, max] : [max, min])(pointerPosition);
|
|
@@ -15779,7 +15788,7 @@ var require_Slider_native = __commonJS({
|
|
|
15779
15788
|
}
|
|
15780
15789
|
);
|
|
15781
15790
|
function useOnDebouncedWindowResize(callback, amt = 200) {
|
|
15782
|
-
|
|
15791
|
+
React2.useEffect(() => {
|
|
15783
15792
|
let last, onResize = () => {
|
|
15784
15793
|
clearTimeout(last), last = setTimeout(callback, amt);
|
|
15785
15794
|
};
|
|
@@ -15788,7 +15797,7 @@ var require_Slider_native = __commonJS({
|
|
|
15788
15797
|
};
|
|
15789
15798
|
}, []);
|
|
15790
15799
|
}
|
|
15791
|
-
var SliderVertical =
|
|
15800
|
+
var SliderVertical = React2.forwardRef(
|
|
15792
15801
|
(props, forwardedRef) => {
|
|
15793
15802
|
let {
|
|
15794
15803
|
min,
|
|
@@ -15798,7 +15807,7 @@ var require_Slider_native = __commonJS({
|
|
|
15798
15807
|
onStepKeyDown,
|
|
15799
15808
|
onSlideEnd,
|
|
15800
15809
|
...sliderProps
|
|
15801
|
-
} = props, [state, setState_] =
|
|
15810
|
+
} = props, [state, setState_] = React2.useState(() => ({ size: 0, offset: 0 })), setState = (0, import_core12.createShallowSetState)(setState_), sliderRef = React2.useRef(null);
|
|
15802
15811
|
function getValueFromPointer(pointerPosition) {
|
|
15803
15812
|
let input = [0, state.size];
|
|
15804
15813
|
return (0, import_helpers2.linearScale)(input, [max, min])(pointerPosition);
|
|
@@ -15866,7 +15875,7 @@ var require_Slider_native = __commonJS({
|
|
|
15866
15875
|
defaultVariants: {
|
|
15867
15876
|
unstyled: !1
|
|
15868
15877
|
}
|
|
15869
|
-
}), SliderTrack =
|
|
15878
|
+
}), SliderTrack = React2.forwardRef(
|
|
15870
15879
|
(props, forwardedRef) => {
|
|
15871
15880
|
let { __scopeSlider, ...trackProps } = props, context = (0, import_constants.useSliderContext)(TRACK_NAME, __scopeSlider);
|
|
15872
15881
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -15887,9 +15896,9 @@ var require_Slider_native = __commonJS({
|
|
|
15887
15896
|
name: "SliderTrackActive",
|
|
15888
15897
|
backgroundColor: "$background",
|
|
15889
15898
|
position: "absolute"
|
|
15890
|
-
}), SliderTrackActive =
|
|
15899
|
+
}), SliderTrackActive = React2.forwardRef(
|
|
15891
15900
|
(props, forwardedRef) => {
|
|
15892
|
-
let { __scopeSlider, ...rangeProps } = props, context = (0, import_constants.useSliderContext)(RANGE_NAME, __scopeSlider), orientation = (0, import_constants.useSliderOrientationContext)(RANGE_NAME, __scopeSlider), ref =
|
|
15901
|
+
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(
|
|
15893
15902
|
(value) => (0, import_helpers2.convertValueToPercentage)(value, context.min, context.max)
|
|
15894
15903
|
), offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0, offsetEnd = 100 - Math.max(...percentages);
|
|
15895
15904
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -15947,11 +15956,11 @@ var require_Slider_native = __commonJS({
|
|
|
15947
15956
|
unstyled: !1
|
|
15948
15957
|
}
|
|
15949
15958
|
}), SliderThumb = SliderThumbFrame.styleable(function(props, forwardedRef) {
|
|
15950
|
-
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] =
|
|
15959
|
+
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)(
|
|
15951
15960
|
forwardedRef,
|
|
15952
15961
|
(node) => setThumb(node)
|
|
15953
|
-
), 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] =
|
|
15954
|
-
|
|
15962
|
+
), 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;
|
|
15963
|
+
React2.useEffect(() => {
|
|
15955
15964
|
if (thumb)
|
|
15956
15965
|
return context.thumbs.add(thumb), () => {
|
|
15957
15966
|
context.thumbs.delete(thumb);
|
|
@@ -16000,7 +16009,7 @@ var require_Slider_native = __commonJS({
|
|
|
16000
16009
|
})
|
|
16001
16010
|
}
|
|
16002
16011
|
);
|
|
16003
|
-
}), SliderComponent =
|
|
16012
|
+
}), SliderComponent = React2.forwardRef(
|
|
16004
16013
|
(props, forwardedRef) => {
|
|
16005
16014
|
let {
|
|
16006
16015
|
name,
|
|
@@ -16019,7 +16028,7 @@ var require_Slider_native = __commonJS({
|
|
|
16019
16028
|
onSlideMove,
|
|
16020
16029
|
onSlideStart,
|
|
16021
16030
|
...sliderProps
|
|
16022
|
-
} = props, sliderRef =
|
|
16031
|
+
} = 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)({
|
|
16023
16032
|
prop: value,
|
|
16024
16033
|
defaultProp: defaultValue,
|
|
16025
16034
|
transition: !0,
|
|
@@ -16028,7 +16037,7 @@ var require_Slider_native = __commonJS({
|
|
|
16028
16037
|
import_core12.isWeb && ((_a = [...thumbRefs.current][valueIndexToChangeRef.current]) == null || _a.focus()), onValueChange(value2);
|
|
16029
16038
|
}
|
|
16030
16039
|
});
|
|
16031
|
-
import_core12.isWeb &&
|
|
16040
|
+
import_core12.isWeb && React2.useEffect(() => {
|
|
16032
16041
|
let node = sliderRef.current;
|
|
16033
16042
|
if (!node)
|
|
16034
16043
|
return;
|
|
@@ -16153,7 +16162,7 @@ var require_createSwitch_native = __commonJS({
|
|
|
16153
16162
|
createSwitch: () => createSwitch
|
|
16154
16163
|
});
|
|
16155
16164
|
module2.exports = __toCommonJS2(createSwitch_exports);
|
|
16156
|
-
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(),
|
|
16165
|
+
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 = (
|
|
16157
16166
|
// @ts-ignore
|
|
16158
16167
|
require("react/jsx-runtime")
|
|
16159
16168
|
), SwitchContext = (0, import_core12.createStyledContext)({
|
|
@@ -16165,7 +16174,7 @@ var require_createSwitch_native = __commonJS({
|
|
|
16165
16174
|
});
|
|
16166
16175
|
function createSwitch({ Frame, Thumb, acceptsUnstyled }) {
|
|
16167
16176
|
let SwitchThumb = Thumb.styleable(function(props, forwardedRef) {
|
|
16168
|
-
let { size: sizeProp, ...thumbProps } = props, { disabled, checked, unstyled, frameWidth } =
|
|
16177
|
+
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;
|
|
16169
16178
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
16170
16179
|
Thumb,
|
|
16171
16180
|
{
|
|
@@ -16186,8 +16195,8 @@ var require_createSwitch_native = __commonJS({
|
|
|
16186
16195
|
}
|
|
16187
16196
|
);
|
|
16188
16197
|
}), SwitchComponent = Frame.extractable(
|
|
16189
|
-
|
|
16190
|
-
let styledContext =
|
|
16198
|
+
React2.forwardRef(function(propsIn, forwardedRef) {
|
|
16199
|
+
let styledContext = React2.useContext(SwitchContext), props = (0, import_core12.useProps)(propsIn), {
|
|
16191
16200
|
labeledBy: ariaLabelledby,
|
|
16192
16201
|
name,
|
|
16193
16202
|
checked: checkedProp,
|
|
@@ -16206,7 +16215,7 @@ var require_createSwitch_native = __commonJS({
|
|
|
16206
16215
|
for (let key in switchProps)
|
|
16207
16216
|
(key === "borderWidth" || key === "borderLeftWidth") && (_ = switchProps[key]);
|
|
16208
16217
|
return acceptsUnstyled && _ === void 0 && unstyled === !1 && (_ = 2), typeof _ == "string" && (_ = (0, import_core12.getVariableValue)((0, import_get_token2.getSize)(_))), +_;
|
|
16209
|
-
})(), 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] =
|
|
16218
|
+
})(), 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)({
|
|
16210
16219
|
prop: checkedProp,
|
|
16211
16220
|
defaultProp: defaultChecked || !1,
|
|
16212
16221
|
onChange: onCheckedChange,
|
|
@@ -16219,7 +16228,7 @@ var require_createSwitch_native = __commonJS({
|
|
|
16219
16228
|
onValueChange: onCheckedChange,
|
|
16220
16229
|
...nativeProps
|
|
16221
16230
|
}
|
|
16222
|
-
) : (import_core12.isWeb ||
|
|
16231
|
+
) : (import_core12.isWeb || React2.useEffect(() => {
|
|
16223
16232
|
if (props.id)
|
|
16224
16233
|
return (0, import_focusable2.registerFocusable)(props.id, {
|
|
16225
16234
|
focus: () => {
|
|
@@ -16275,8 +16284,8 @@ var require_createSwitch_native = __commonJS({
|
|
|
16275
16284
|
] }));
|
|
16276
16285
|
})
|
|
16277
16286
|
), BubbleInput = (props) => {
|
|
16278
|
-
let { control, checked, bubbles = !0, ...inputProps } = props, ref =
|
|
16279
|
-
return
|
|
16287
|
+
let { control, checked, bubbles = !0, ...inputProps } = props, ref = React2.useRef(null), prevChecked = (0, import_use_previous.usePrevious)(checked);
|
|
16288
|
+
return React2.useEffect(() => {
|
|
16280
16289
|
let input = ref.current, inputProto = window.HTMLInputElement.prototype, setChecked = Object.getOwnPropertyDescriptor(
|
|
16281
16290
|
inputProto,
|
|
16282
16291
|
"checked"
|
|
@@ -16448,12 +16457,12 @@ var require_RovingFocusGroup_native = __commonJS({
|
|
|
16448
16457
|
createRovingFocusGroupScope: () => createRovingFocusGroupScope
|
|
16449
16458
|
});
|
|
16450
16459
|
module2.exports = __toCommonJS2(RovingFocusGroup_native_exports);
|
|
16451
|
-
var import_core12 = require_index_native10(),
|
|
16460
|
+
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(
|
|
16452
16461
|
({ children, ...props }, _ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Stack, { ...props, children })
|
|
16453
16462
|
);
|
|
16454
16463
|
RovingFocusGroupItem.displayName = ITEM_NAME;
|
|
16455
16464
|
var GROUP_NAME = "RovingFocusGroup", RovingFocusGroup = (0, import_core12.withStaticProperties)(
|
|
16456
|
-
|
|
16465
|
+
import_react2.default.forwardRef(({ children, ...props }, _ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Stack, { ...props, children })),
|
|
16457
16466
|
{
|
|
16458
16467
|
Item: RovingFocusGroupItem
|
|
16459
16468
|
}
|
|
@@ -16502,11 +16511,11 @@ var require_Tabs_native = __commonJS({
|
|
|
16502
16511
|
Tabs: () => Tabs
|
|
16503
16512
|
});
|
|
16504
16513
|
module2.exports = __toCommonJS2(Tabs_exports);
|
|
16505
|
-
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(),
|
|
16514
|
+
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, {
|
|
16506
16515
|
name: TAB_LIST_NAME,
|
|
16507
16516
|
focusable: !0
|
|
16508
16517
|
}), TabsList = TabsListFrame.extractable(
|
|
16509
|
-
|
|
16518
|
+
React2.forwardRef(
|
|
16510
16519
|
(props, forwardedRef) => {
|
|
16511
16520
|
let { __scopeTabs, loop = !0, children, ...listProps } = props, context = useTabsContext(TAB_LIST_NAME, __scopeTabs), rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
|
|
16512
16521
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -16571,7 +16580,7 @@ var require_Tabs_native = __commonJS({
|
|
|
16571
16580
|
unstyled: !1
|
|
16572
16581
|
}
|
|
16573
16582
|
}), TabsTrigger = TabsTriggerFrame.extractable(
|
|
16574
|
-
|
|
16583
|
+
React2.forwardRef(
|
|
16575
16584
|
(props, forwardedRef) => {
|
|
16576
16585
|
let {
|
|
16577
16586
|
__scopeTabs,
|
|
@@ -16579,8 +16588,8 @@ var require_Tabs_native = __commonJS({
|
|
|
16579
16588
|
disabled = !1,
|
|
16580
16589
|
onInteraction,
|
|
16581
16590
|
...triggerProps
|
|
16582
|
-
} = 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] =
|
|
16583
|
-
return
|
|
16591
|
+
} = 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 });
|
|
16592
|
+
return React2.useEffect(() => (context.registerTrigger(), () => context.unregisterTrigger()), []), React2.useEffect(() => {
|
|
16584
16593
|
if (!triggerRef.current || !import_web.isWeb)
|
|
16585
16594
|
return;
|
|
16586
16595
|
function getTriggerSize() {
|
|
@@ -16596,7 +16605,7 @@ var require_Tabs_native = __commonJS({
|
|
|
16596
16605
|
return observer.observe(triggerRef.current), () => {
|
|
16597
16606
|
triggerRef.current && observer.unobserve(triggerRef.current);
|
|
16598
16607
|
};
|
|
16599
|
-
}, [context.triggersCount]),
|
|
16608
|
+
}, [context.triggersCount]), React2.useEffect(() => {
|
|
16600
16609
|
isSelected && layout && (onInteraction == null || onInteraction("select", layout));
|
|
16601
16610
|
}, [isSelected, value, layout]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_web.Theme, { name: isSelected ? "active" : null, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
16602
16611
|
import_roving_focus.RovingFocusGroup.Item,
|
|
@@ -16660,7 +16669,7 @@ var require_Tabs_native = __commonJS({
|
|
|
16660
16669
|
var CONTENT_NAME = "TabsContent", TabsContentFrame = (0, import_web.styled)(import_stacks3.ThemeableStack, {
|
|
16661
16670
|
name: CONTENT_NAME
|
|
16662
16671
|
}), TabsContent = TabsContentFrame.extractable(
|
|
16663
|
-
|
|
16672
|
+
React2.forwardRef(
|
|
16664
16673
|
(props, forwardedRef) => {
|
|
16665
16674
|
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);
|
|
16666
16675
|
return show ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
@@ -16689,7 +16698,7 @@ var require_Tabs_native = __commonJS({
|
|
|
16689
16698
|
name: TABS_NAME
|
|
16690
16699
|
}), Tabs = (0, import_web.withStaticProperties)(
|
|
16691
16700
|
TabsFrame.extractable(
|
|
16692
|
-
|
|
16701
|
+
React2.forwardRef(
|
|
16693
16702
|
(props, forwardedRef) => {
|
|
16694
16703
|
let {
|
|
16695
16704
|
__scopeTabs,
|
|
@@ -16705,12 +16714,12 @@ var require_Tabs_native = __commonJS({
|
|
|
16705
16714
|
prop: valueProp,
|
|
16706
16715
|
onChange: onValueChange,
|
|
16707
16716
|
defaultProp: defaultValue ?? ""
|
|
16708
|
-
}), [triggersCount, setTriggersCount] =
|
|
16717
|
+
}), [triggersCount, setTriggersCount] = React2.useState(0), registerTrigger = (0, import_web.useEvent)(() => setTriggersCount((v) => v + 1)), unregisterTrigger = (0, import_web.useEvent)(() => setTriggersCount((v) => v - 1));
|
|
16709
16718
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
16710
16719
|
TabsProvider,
|
|
16711
16720
|
{
|
|
16712
16721
|
scope: __scopeTabs,
|
|
16713
|
-
baseId:
|
|
16722
|
+
baseId: React2.useId(),
|
|
16714
16723
|
value,
|
|
16715
16724
|
onChange: setValue,
|
|
16716
16725
|
orientation,
|
|
@@ -16787,7 +16796,7 @@ var require_mutateTheme_native = __commonJS({
|
|
|
16787
16796
|
mutateThemes: () => mutateThemes2
|
|
16788
16797
|
});
|
|
16789
16798
|
module2.exports = __toCommonJS2(mutateTheme_exports);
|
|
16790
|
-
var import_constants = require_index_native2(), import_web = require_index_native9(),
|
|
16799
|
+
var import_constants = require_index_native2(), import_web = require_index_native9(), import_react2 = require("react");
|
|
16791
16800
|
function mutateThemes2({
|
|
16792
16801
|
themes,
|
|
16793
16802
|
batch,
|
|
@@ -16808,7 +16817,7 @@ var require_mutateTheme_native = __commonJS({
|
|
|
16808
16817
|
res && (allThemesProxied[name] = res.theme, allThemesRaw[name] = res.themeRaw);
|
|
16809
16818
|
}
|
|
16810
16819
|
let cssRules = insertCSS ? insertThemeCSS(allThemesRaw, batch) : [];
|
|
16811
|
-
return (0,
|
|
16820
|
+
return (0, import_react2.startTransition)(() => {
|
|
16812
16821
|
for (let themeName in allThemesProxied) {
|
|
16813
16822
|
let theme = allThemesProxied[themeName];
|
|
16814
16823
|
updateThemeConfig(themeName, theme), notifyThemeManagersOfUpdate(themeName, theme);
|
|
@@ -16997,7 +17006,7 @@ var require_Toggle_native = __commonJS({
|
|
|
16997
17006
|
ToggleFrame: () => ToggleFrame
|
|
16998
17007
|
});
|
|
16999
17008
|
module2.exports = __toCommonJS2(Toggle_exports);
|
|
17000
|
-
var import_stacks3 = require_index_native20(), import_use_controllable_state = require_index_native15(), import_web = require_index_native9(),
|
|
17009
|
+
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, {
|
|
17001
17010
|
name: NAME,
|
|
17002
17011
|
tag: "button",
|
|
17003
17012
|
variants: {
|
|
@@ -17052,7 +17061,7 @@ var require_Toggle_native = __commonJS({
|
|
|
17052
17061
|
unstyled: !1
|
|
17053
17062
|
}
|
|
17054
17063
|
}), Toggle = ToggleFrame.extractable(
|
|
17055
|
-
|
|
17064
|
+
React2.forwardRef((props, forwardedRef) => {
|
|
17056
17065
|
let {
|
|
17057
17066
|
pressed: pressedProp,
|
|
17058
17067
|
defaultPressed = !1,
|
|
@@ -17108,11 +17117,11 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
17108
17117
|
createToggleGroupScope: () => createToggleGroupScope
|
|
17109
17118
|
});
|
|
17110
17119
|
module2.exports = __toCommonJS2(ToggleGroup_exports);
|
|
17111
|
-
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(),
|
|
17120
|
+
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)(
|
|
17112
17121
|
TOGGLE_GROUP_NAME,
|
|
17113
17122
|
[import_roving_focus.createRovingFocusGroupScope]
|
|
17114
17123
|
), 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(
|
|
17115
|
-
|
|
17124
|
+
import_react2.default.forwardRef(
|
|
17116
17125
|
(props, forwardedRef) => {
|
|
17117
17126
|
let valueContext = useToggleGroupValueContext(
|
|
17118
17127
|
TOGGLE_GROUP_ITEM_NAME,
|
|
@@ -17120,13 +17129,13 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
17120
17129
|
), context = useToggleGroupContext(
|
|
17121
17130
|
TOGGLE_GROUP_ITEM_NAME,
|
|
17122
17131
|
props.__scopeToggleGroup
|
|
17123
|
-
), __scopeToggleGroup = props.__scopeToggleGroup, rovingFocusGroupScope = useRovingFocusGroupScope(props.__scopeToggleGroup), pressed = valueContext.value.includes(props.value), disabled = context.disabled || props.disabled || !1, ref =
|
|
17132
|
+
), __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 ? {} : {
|
|
17124
17133
|
width: void 0,
|
|
17125
17134
|
height: void 0,
|
|
17126
17135
|
padding: (0, import_web.getVariableValue)(size) * 0.6
|
|
17127
17136
|
};
|
|
17128
17137
|
props.unstyled || (props.orientation === "horizontal" ? sizeProps.height = (0, import_web.getVariableValue)(size) * 2.4 : sizeProps.width = (0, import_web.getVariableValue)(size) * 2.4);
|
|
17129
|
-
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 =
|
|
17138
|
+
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 };
|
|
17130
17139
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ToggleGroupItemProvider, { scope: __scopeToggleGroup, children: context.rovingFocus ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
17131
17140
|
import_roving_focus.RovingFocusGroup.Item,
|
|
17132
17141
|
{
|
|
@@ -17167,7 +17176,7 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
17167
17176
|
);
|
|
17168
17177
|
ToggleGroupItem.displayName = TOGGLE_GROUP_ITEM_NAME;
|
|
17169
17178
|
var ToggleGroupItemImpl = import_Toggle.ToggleFrame.extractable(
|
|
17170
|
-
|
|
17179
|
+
import_react2.default.forwardRef(
|
|
17171
17180
|
(props, forwardedRef) => {
|
|
17172
17181
|
let { __scopeToggleGroup, value, ...itemProps } = props, valueContext = useToggleGroupValueContext(
|
|
17173
17182
|
TOGGLE_GROUP_ITEM_NAME,
|
|
@@ -17189,9 +17198,9 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
17189
17198
|
}
|
|
17190
17199
|
)
|
|
17191
17200
|
), useRovingFocusGroupScope = (0, import_roving_focus.createRovingFocusGroupScope)(), ToggleGroup = (0, import_web.withStaticProperties)(
|
|
17192
|
-
|
|
17201
|
+
import_react2.default.forwardRef((props, forwardedRef) => {
|
|
17193
17202
|
let { type, ...toggleGroupProps } = props;
|
|
17194
|
-
if (import_web.isWeb ||
|
|
17203
|
+
if (import_web.isWeb || import_react2.default.useEffect(() => {
|
|
17195
17204
|
if (props.id)
|
|
17196
17205
|
return (0, import_focusable2.registerFocusable)(props.id, {
|
|
17197
17206
|
// TODO: would be nice to focus on the first child later - could be done with reforest
|
|
@@ -17210,7 +17219,7 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
17210
17219
|
}
|
|
17211
17220
|
);
|
|
17212
17221
|
ToggleGroup.displayName = TOGGLE_GROUP_NAME;
|
|
17213
|
-
var [ToggleGroupValueProvider, useToggleGroupValueContext] = createToggleGroupContext(TOGGLE_GROUP_NAME), ToggleGroupImplSingle =
|
|
17222
|
+
var [ToggleGroupValueProvider, useToggleGroupValueContext] = createToggleGroupContext(TOGGLE_GROUP_NAME), ToggleGroupImplSingle = import_react2.default.forwardRef((props, forwardedRef) => {
|
|
17214
17223
|
let {
|
|
17215
17224
|
value: valueProp,
|
|
17216
17225
|
defaultValue,
|
|
@@ -17231,14 +17240,14 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
17231
17240
|
value: value ? [value] : [],
|
|
17232
17241
|
defaultValue: value,
|
|
17233
17242
|
onItemActivate: setValue,
|
|
17234
|
-
onItemDeactivate:
|
|
17243
|
+
onItemDeactivate: import_react2.default.useCallback(
|
|
17235
17244
|
() => disableDeactivation ? null : setValue(""),
|
|
17236
17245
|
[setValue, disableDeactivation]
|
|
17237
17246
|
),
|
|
17238
17247
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ToggleGroupImpl, { ...toggleGroupSingleProps, ref: forwardedRef })
|
|
17239
17248
|
}
|
|
17240
17249
|
);
|
|
17241
|
-
}), ToggleGroupImplMultiple =
|
|
17250
|
+
}), ToggleGroupImplMultiple = import_react2.default.forwardRef((props, forwardedRef) => {
|
|
17242
17251
|
let {
|
|
17243
17252
|
value: valueProp,
|
|
17244
17253
|
defaultValue,
|
|
@@ -17249,10 +17258,10 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
17249
17258
|
prop: valueProp,
|
|
17250
17259
|
defaultProp: defaultValue,
|
|
17251
17260
|
onChange: onValueChange
|
|
17252
|
-
}), handleButtonActivate =
|
|
17261
|
+
}), handleButtonActivate = import_react2.default.useCallback(
|
|
17253
17262
|
(itemValue) => setValue((prevValue = []) => [...prevValue, itemValue]),
|
|
17254
17263
|
[setValue]
|
|
17255
|
-
), handleButtonDeactivate =
|
|
17264
|
+
), handleButtonDeactivate = import_react2.default.useCallback(
|
|
17256
17265
|
(itemValue) => setValue((prevValue = []) => prevValue.filter((value2) => value2 !== itemValue)),
|
|
17257
17266
|
[setValue]
|
|
17258
17267
|
);
|
|
@@ -17293,7 +17302,7 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
17293
17302
|
unstyled: !1
|
|
17294
17303
|
}
|
|
17295
17304
|
}), ToggleGroupImpl = ToggleGroupImplElementFrame.extractable(
|
|
17296
|
-
|
|
17305
|
+
import_react2.default.forwardRef(
|
|
17297
17306
|
(props, forwardedRef) => {
|
|
17298
17307
|
let {
|
|
17299
17308
|
__scopeToggleGroup,
|
|
@@ -17460,7 +17469,7 @@ var require_index_native67 = __commonJS({
|
|
|
17460
17469
|
useDebounceValue: () => useDebounceValue
|
|
17461
17470
|
});
|
|
17462
17471
|
module2.exports = __toCommonJS2(src_exports2);
|
|
17463
|
-
var
|
|
17472
|
+
var import_react2 = require("react");
|
|
17464
17473
|
function debounce(func, wait, leading) {
|
|
17465
17474
|
let timeout, isCancelled = !1;
|
|
17466
17475
|
function debounced() {
|
|
@@ -17476,15 +17485,15 @@ var require_index_native67 = __commonJS({
|
|
|
17476
17485
|
}
|
|
17477
17486
|
var defaultOpts = { leading: !1 };
|
|
17478
17487
|
function useDebounce(fn, wait, options = defaultOpts, mountArgs = []) {
|
|
17479
|
-
let dbEffect = (0,
|
|
17480
|
-
return (0,
|
|
17488
|
+
let dbEffect = (0, import_react2.useRef)(null);
|
|
17489
|
+
return (0, import_react2.useEffect)(() => () => {
|
|
17481
17490
|
var _a;
|
|
17482
17491
|
(_a = dbEffect.current) == null || _a.cancel();
|
|
17483
|
-
}, []), (0,
|
|
17492
|
+
}, []), (0, import_react2.useMemo)(() => (dbEffect.current = debounce(fn, wait, options.leading), dbEffect.current), [options.leading, ...mountArgs]);
|
|
17484
17493
|
}
|
|
17485
17494
|
function useDebounceValue(val, amt = 0) {
|
|
17486
|
-
let [state, setState] = (0,
|
|
17487
|
-
return (0,
|
|
17495
|
+
let [state, setState] = (0, import_react2.useState)(val);
|
|
17496
|
+
return (0, import_react2.useEffect)(() => {
|
|
17488
17497
|
let tm = setTimeout(() => {
|
|
17489
17498
|
setState((prev) => prev === val ? prev : val);
|
|
17490
17499
|
}, amt);
|
|
@@ -17514,7 +17523,7 @@ var require_index_native68 = __commonJS({
|
|
|
17514
17523
|
useWindowDimensions: () => useWindowDimensions
|
|
17515
17524
|
});
|
|
17516
17525
|
module2.exports = __toCommonJS2(src_exports2);
|
|
17517
|
-
var import_constants = require_index_native2(),
|
|
17526
|
+
var import_constants = require_index_native2(), import_react2 = require("react"), import_react_native4 = require_fake_react_native(), initialValue = {
|
|
17518
17527
|
height: 800,
|
|
17519
17528
|
width: 600
|
|
17520
17529
|
};
|
|
@@ -17531,7 +17540,7 @@ var require_index_native68 = __commonJS({
|
|
|
17531
17540
|
function useWindowDimensions({
|
|
17532
17541
|
serverValue = initialValue
|
|
17533
17542
|
} = {}) {
|
|
17534
|
-
return (0,
|
|
17543
|
+
return (0, import_react2.useSyncExternalStore)(
|
|
17535
17544
|
subscribe,
|
|
17536
17545
|
() => import_react_native4.Dimensions.get("window"),
|
|
17537
17546
|
() => import_constants.isWeb ? serverValue : import_react_native4.Dimensions.get("window")
|
|
@@ -17784,12 +17793,12 @@ Expected a subset of: ${expected.join(", ")}
|
|
|
17784
17793
|
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 }) });
|
|
17785
17794
|
|
|
17786
17795
|
// src/views/Anchor.tsx
|
|
17787
|
-
var import_core3 = __toESM(require_index_native10()), import_text = __toESM(require_index_native22()),
|
|
17796
|
+
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, {
|
|
17788
17797
|
name: "Anchor",
|
|
17789
17798
|
tag: "a",
|
|
17790
17799
|
accessibilityRole: "link"
|
|
17791
|
-
}), Anchor = AnchorFrame.
|
|
17792
|
-
(
|
|
17800
|
+
}), Anchor = AnchorFrame.styleable(
|
|
17801
|
+
({ href, target, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
17793
17802
|
AnchorFrame,
|
|
17794
17803
|
{
|
|
17795
17804
|
...props,
|
|
@@ -17804,7 +17813,7 @@ var import_core3 = __toESM(require_index_native10()), import_text = __toESM(requ
|
|
|
17804
17813
|
},
|
|
17805
17814
|
ref
|
|
17806
17815
|
}
|
|
17807
|
-
)
|
|
17816
|
+
)
|
|
17808
17817
|
);
|
|
17809
17818
|
|
|
17810
17819
|
// src/views/EnsureFlexed.tsx
|
|
@@ -17974,9 +17983,9 @@ var import_core8 = __toESM(require_index_native10()), Section = (0, import_core8
|
|
|
17974
17983
|
});
|
|
17975
17984
|
|
|
17976
17985
|
// src/views/Spinner.tsx
|
|
17977
|
-
var import_core9 = __toESM(require_index_native10()), import_stacks2 = __toESM(require_index_native20()),
|
|
17986
|
+
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(
|
|
17978
17987
|
(0, import_core9.themeable)(
|
|
17979
|
-
|
|
17988
|
+
React.forwardRef((props, ref) => {
|
|
17980
17989
|
let { size, color: colorProp, ...stackProps } = props, theme = (0, import_core9.useTheme)(), color = colorProp;
|
|
17981
17990
|
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 }) });
|
|
17982
17991
|
}),
|