tamagui 1.130.8 → 1.131.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +11 -11
- package/dist/cjs/views/Input.cjs +1 -1
- package/dist/cjs/views/TextArea.cjs +2 -2
- package/dist/native.js +596 -483
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +596 -483
- package/dist/test.native.js.map +3 -3
- package/package.json +55 -55
package/dist/native.js
CHANGED
|
@@ -3222,22 +3222,22 @@ var require_useMedia_native = __commonJS({
|
|
|
3222
3222
|
listeners.delete(subscriber);
|
|
3223
3223
|
};
|
|
3224
3224
|
}
|
|
3225
|
-
function useMedia3(
|
|
3226
|
-
var componentState =
|
|
3225
|
+
function useMedia3(componentContext, debug) {
|
|
3226
|
+
var componentState = componentContext ? States.get(componentContext) : null, internalRef = (0, import_react3.useRef)(null);
|
|
3227
3227
|
internalRef.current || (internalRef.current = {
|
|
3228
|
-
keys: /* @__PURE__ */ new Set()
|
|
3229
|
-
|
|
3230
|
-
|
|
3228
|
+
keys: /* @__PURE__ */ new Set(),
|
|
3229
|
+
lastState: mediaState3
|
|
3230
|
+
}), internalRef.current.pendingState && (internalRef.current.lastState = internalRef.current.pendingState, internalRef.current.pendingState = void 0);
|
|
3231
|
+
var { keys } = internalRef.current;
|
|
3231
3232
|
keys.size && keys.clear();
|
|
3232
3233
|
var state = (0, import_react3.useSyncExternalStore)(subscribe, function() {
|
|
3233
|
-
|
|
3234
|
-
var curKeys = (componentState == null ? void 0 : componentState.keys) || keys;
|
|
3234
|
+
var curKeys = (componentState == null ? void 0 : componentState.keys) || keys, { lastState, pendingState } = internalRef.current;
|
|
3235
3235
|
if (!curKeys.size) return lastState;
|
|
3236
3236
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
3237
3237
|
try {
|
|
3238
3238
|
for (var _iterator = curKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
3239
3239
|
var key = _step.value;
|
|
3240
|
-
if (mediaState3[key] !== lastState[key]) return process.env.NODE_ENV === "development" && debug && console.warn("useMedia() \u270D\uFE0F", key, lastState[key], "=>", mediaState3[key]), internalRef.current.lastState = mediaState3, mediaState3;
|
|
3240
|
+
if (mediaState3[key] !== (pendingState || lastState)[key]) return process.env.NODE_ENV === "development" && debug && console.warn("useMedia() \u270D\uFE0F", key, lastState[key], "=>", mediaState3[key]), componentContext != null && componentContext.mediaEmit ? (componentContext.mediaEmit(mediaState3), internalRef.current.pendingState = mediaState3, lastState) : (internalRef.current.lastState = mediaState3, mediaState3);
|
|
3241
3241
|
}
|
|
3242
3242
|
} catch (err) {
|
|
3243
3243
|
_didIteratorError = !0, _iteratorError = err;
|
|
@@ -3816,13 +3816,15 @@ var require_createStyledContext_native = __commonJS({
|
|
|
3816
3816
|
module2.exports = __toCommonJS2(createStyledContext_exports);
|
|
3817
3817
|
var import_jsx_runtime6 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_objectIdentityKey = require_objectIdentityKey_native(), createReactContext = import_react3.default[Math.random(), "createContext"];
|
|
3818
3818
|
function createStyledContext2(defaultValues) {
|
|
3819
|
-
var OGContext = createReactContext(defaultValues), OGProvider2 = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map();
|
|
3819
|
+
var namespace = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", OGContext = createReactContext(defaultValues), OGProvider2 = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map(), LastScopeInNamespace = createReactContext(namespace);
|
|
3820
3820
|
function getOrCreateScopedContext(scope) {
|
|
3821
3821
|
var ScopedContext = scopedContexts.get(scope);
|
|
3822
3822
|
return ScopedContext || (ScopedContext = createReactContext(defaultValues), scopedContexts.set(scope, ScopedContext)), ScopedContext;
|
|
3823
3823
|
}
|
|
3824
|
-
var
|
|
3825
|
-
|
|
3824
|
+
var getNamespacedScope = function(scope) {
|
|
3825
|
+
return namespace ? `${namespace}--${scope}` : scope;
|
|
3826
|
+
}, Provider = function(param) {
|
|
3827
|
+
var { children, scope: scopeIn, ...values } = param, scope = getNamespacedScope(scopeIn), next = import_react3.default.useMemo(function() {
|
|
3826
3828
|
return {
|
|
3827
3829
|
// this ! is a workaround for ts error
|
|
3828
3830
|
...defaultValues,
|
|
@@ -3831,13 +3833,16 @@ var require_createStyledContext_native = __commonJS({
|
|
|
3831
3833
|
}, [
|
|
3832
3834
|
(0, import_objectIdentityKey.objectIdentityKey)(values)
|
|
3833
3835
|
]), Provider22 = OGProvider2;
|
|
3834
|
-
return scope && (Provider22 = getOrCreateScopedContext(scope).Provider), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
3835
|
-
value:
|
|
3836
|
-
children
|
|
3836
|
+
return scope && (Provider22 = getOrCreateScopedContext(scope).Provider), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(LastScopeInNamespace.Provider, {
|
|
3837
|
+
value: scope,
|
|
3838
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Provider22, {
|
|
3839
|
+
value: next,
|
|
3840
|
+
children
|
|
3841
|
+
})
|
|
3837
3842
|
});
|
|
3838
|
-
}, useStyledContext = function(
|
|
3839
|
-
var context = scope ? getOrCreateScopedContext(scope) : OGContext;
|
|
3840
|
-
return
|
|
3843
|
+
}, useStyledContext = function() {
|
|
3844
|
+
var scopeIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", lastScopeInNamespace = (0, import_react3.useContext)(LastScopeInNamespace), scope = namespace ? scopeIn ? getNamespacedScope(scopeIn) : lastScopeInNamespace : scopeIn, context = scope ? getOrCreateScopedContext(scope) : OGContext, value = import_react3.default.useContext(context);
|
|
3845
|
+
return value;
|
|
3841
3846
|
};
|
|
3842
3847
|
return Context.Provider = Provider, Context.props = defaultValues, Context.context = OGContext, Context.useStyledContext = useStyledContext, Context;
|
|
3843
3848
|
}
|
|
@@ -8637,7 +8642,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8637
8642
|
}
|
|
8638
8643
|
});
|
|
8639
8644
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
8640
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_is_equal_shallow = require_index_native12(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_GroupContext = require_GroupContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_getShorthandValue = require_getShorthandValue_native(), import_getSplitStyles = require_getSplitStyles_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_setElementProps = require_setElementProps_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_themeable = require_themeable_native(), import_wrapStyleTags = require_wrapStyleTags_native(), import_useComponentState = require_useComponentState_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(), time2, NextState = /* @__PURE__ */ new WeakMap(), debugKeyListeners, startVisualizer, componentSetStates = /* @__PURE__ */ new Set(), avoidReRenderKeys = /* @__PURE__ */ new Set([
|
|
8645
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_is_equal_shallow = require_index_native12(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_GroupContext = require_GroupContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_getShorthandValue = require_getShorthandValue_native(), import_getSplitStyles = require_getSplitStyles_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_setElementProps = require_setElementProps_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_themeable = require_themeable_native(), import_wrapStyleTags = require_wrapStyleTags_native(), import_useComponentState = require_useComponentState_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(), time2, NextState = /* @__PURE__ */ new WeakMap(), NextMedia = /* @__PURE__ */ new WeakMap(), debugKeyListeners, startVisualizer, componentSetStates = /* @__PURE__ */ new Set(), avoidReRenderKeys = /* @__PURE__ */ new Set([
|
|
8641
8646
|
"hover",
|
|
8642
8647
|
"press",
|
|
8643
8648
|
"pressIn",
|
|
@@ -8853,6 +8858,18 @@ var require_createComponent_native = __commonJS({
|
|
|
8853
8858
|
}
|
|
8854
8859
|
if (splitStyles && (hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
|
|
8855
8860
|
var useStyleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
|
|
8861
|
+
componentContext.mediaEmit = function(next) {
|
|
8862
|
+
NextMedia.set(stateRef, next), updateStyleListener();
|
|
8863
|
+
};
|
|
8864
|
+
var updateStyleListener = function() {
|
|
8865
|
+
var updatedState = NextState.get(stateRef) || state, mediaState22 = NextMedia.get(stateRef), { group, hasDynGroupChildren, unmounted, animation, ...childrenGroupState } = updatedState;
|
|
8866
|
+
groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState);
|
|
8867
|
+
var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, mediaState22 ? {
|
|
8868
|
+
...styleProps,
|
|
8869
|
+
mediaState: mediaState22
|
|
8870
|
+
} : styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp);
|
|
8871
|
+
useStyleListener == null || useStyleListener((nextStyles == null ? void 0 : nextStyles.style) || {});
|
|
8872
|
+
};
|
|
8856
8873
|
stateRef.current.setStateShallow = function(nextOrGetNext) {
|
|
8857
8874
|
var prev = NextState.get(stateRef) || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
|
|
8858
8875
|
if (!(next === prev || (0, import_is_equal_shallow.isEqualShallow)(prev, next))) {
|
|
@@ -8867,11 +8884,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8867
8884
|
NextState.set(stateRef, updatedState), process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile" && (console.groupCollapsed("[\u26A1\uFE0F] avoid setState", next, {
|
|
8868
8885
|
updatedState,
|
|
8869
8886
|
props
|
|
8870
|
-
}), console.info(stateRef.current.host), console.groupEnd());
|
|
8871
|
-
var { group, hasDynGroupChildren, unmounted, animation, ...childrenGroupState } = updatedState;
|
|
8872
|
-
groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState);
|
|
8873
|
-
var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp);
|
|
8874
|
-
useStyleListener == null || useStyleListener((nextStyles == null ? void 0 : nextStyles.style) || {});
|
|
8887
|
+
}), console.info(stateRef.current.host), console.groupEnd()), updateStyleListener();
|
|
8875
8888
|
} else process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile" && console.info("[\u{1F40C}] re-render", {
|
|
8876
8889
|
canAvoidReRender,
|
|
8877
8890
|
next
|
|
@@ -14300,10 +14313,10 @@ var require_Collection_native = __commonJS({
|
|
|
14300
14313
|
current: void 0
|
|
14301
14314
|
},
|
|
14302
14315
|
itemMap: /* @__PURE__ */ new Map()
|
|
14303
|
-
}), CollectionProvider = function(props) {
|
|
14304
|
-
var {
|
|
14316
|
+
}, "Toast"), CollectionProvider = function(props) {
|
|
14317
|
+
var { scope, children } = props, ref = import_react3.default.useRef(void 0), itemMap = import_react3.default.useRef(/* @__PURE__ */ new Map()).current;
|
|
14305
14318
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CollectionProviderImpl, {
|
|
14306
|
-
scope
|
|
14319
|
+
scope,
|
|
14307
14320
|
itemMap,
|
|
14308
14321
|
collectionRef: ref,
|
|
14309
14322
|
children
|
|
@@ -14311,7 +14324,7 @@ var require_Collection_native = __commonJS({
|
|
|
14311
14324
|
};
|
|
14312
14325
|
CollectionProvider.displayName = "CollectionProvider";
|
|
14313
14326
|
var COLLECTION_SLOT_NAME = name + "CollectionSlot", CollectionSlot = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
14314
|
-
var {
|
|
14327
|
+
var { scope, children } = props, context = useCollectionContext(scope), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);
|
|
14315
14328
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Slot, {
|
|
14316
14329
|
ref: composedRefs,
|
|
14317
14330
|
children
|
|
@@ -14319,7 +14332,7 @@ var require_Collection_native = __commonJS({
|
|
|
14319
14332
|
});
|
|
14320
14333
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
14321
14334
|
var ITEM_SLOT_NAME = name + "CollectionItemSlot", ITEM_DATA_ATTR = "data-collection-item", CollectionItemSlot = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
14322
|
-
var {
|
|
14335
|
+
var { scope, children, ...itemData } = props, ref = import_react3.default.useRef(void 0), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), context = useCollectionContext(scope);
|
|
14323
14336
|
return import_react3.default.useEffect(function() {
|
|
14324
14337
|
return context.itemMap.set(ref, {
|
|
14325
14338
|
ref,
|
|
@@ -14334,8 +14347,8 @@ var require_Collection_native = __commonJS({
|
|
|
14334
14347
|
});
|
|
14335
14348
|
});
|
|
14336
14349
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
14337
|
-
function useCollection(
|
|
14338
|
-
var context = useCollectionContext(
|
|
14350
|
+
function useCollection(scope) {
|
|
14351
|
+
var context = useCollectionContext(scope), getItems = import_react3.default.useCallback(function() {
|
|
14339
14352
|
if (!import_constants4.isWeb) return [];
|
|
14340
14353
|
var collectionNode = context.collectionRef.current;
|
|
14341
14354
|
if (!collectionNode) return [];
|
|
@@ -15852,7 +15865,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15852
15865
|
], [Collection, useCollection] = (0, import_collection.createCollection)(ACCORDION_NAME), ACCORDION_CONTEXT = "Accordion", AccordionComponent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
15853
15866
|
var { type, ...accordionProps } = props, singleProps = accordionProps, multipleProps = accordionProps;
|
|
15854
15867
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Collection.Provider, {
|
|
15855
|
-
|
|
15868
|
+
scope: props.__scopeAccordion || ACCORDION_CONTEXT,
|
|
15856
15869
|
children: type === "multiple" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionImplMultiple, {
|
|
15857
15870
|
...multipleProps,
|
|
15858
15871
|
ref: forwardedRef
|
|
@@ -15988,7 +16001,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15988
16001
|
direction: dir,
|
|
15989
16002
|
orientation,
|
|
15990
16003
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Collection.Slot, {
|
|
15991
|
-
|
|
16004
|
+
scope: __scopeAccordion || ACCORDION_CONTEXT,
|
|
15992
16005
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, {
|
|
15993
16006
|
"data-orientation": orientation,
|
|
15994
16007
|
ref: composedRef,
|
|
@@ -16059,7 +16072,7 @@ var require_Accordion_native = __commonJS({
|
|
|
16059
16072
|
}), AccordionTrigger = AccordionTriggerFrame.styleable(function(props, forwardedRef) {
|
|
16060
16073
|
var { __scopeAccordion, ...triggerProps } = props, accordionContext = useAccordionContext(__scopeAccordion), itemContext = useAccordionItemContext(__scopeAccordion), collapsibleContext = useAccordionCollapsibleContext(__scopeAccordion);
|
|
16061
16074
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Collection.ItemSlot, {
|
|
16062
|
-
|
|
16075
|
+
scope: __scopeAccordion || ACCORDION_CONTEXT,
|
|
16063
16076
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionTriggerFrame, {
|
|
16064
16077
|
// @ts-ignore
|
|
16065
16078
|
__scopeCollapsible: __scopeAccordion || ACCORDION_CONTEXT,
|
|
@@ -16643,7 +16656,7 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
16643
16656
|
});
|
|
16644
16657
|
});
|
|
16645
16658
|
function PortalHostWeb(props) {
|
|
16646
|
-
return (0,
|
|
16659
|
+
return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
16647
16660
|
return function() {
|
|
16648
16661
|
import_constants22.allPortalHosts.delete(props.name);
|
|
16649
16662
|
};
|
|
@@ -16665,7 +16678,7 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
16665
16678
|
}
|
|
16666
16679
|
function PortalHostNonNative(props) {
|
|
16667
16680
|
var { name, forwardProps, render = defaultRenderer } = props, state = usePortalState(name), { registerHost: registerHost2, deregisterHost: deregisterHost2 } = usePortal(props.name);
|
|
16668
|
-
return (0,
|
|
16681
|
+
return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
16669
16682
|
if (!(typeof window > "u")) return registerHost2(), function() {
|
|
16670
16683
|
deregisterHost2();
|
|
16671
16684
|
};
|
|
@@ -17067,7 +17080,7 @@ var require_Adapt_native = __commonJS({
|
|
|
17067
17080
|
}
|
|
17068
17081
|
});
|
|
17069
17082
|
module2.exports = __toCommonJS2(Adapt_exports);
|
|
17070
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"),
|
|
17083
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_helpers = require_index_native7(), import_portal2 = require_index_native30(), import_z_index_stack2 = require_index_native29(), import_react3 = __toESM2(require("react")), AdaptContext = (0, import_core12.createStyledContext)({
|
|
17071
17084
|
Contents: null,
|
|
17072
17085
|
scopeName: "",
|
|
17073
17086
|
portalName: "",
|
|
@@ -17078,42 +17091,56 @@ var require_Adapt_native = __commonJS({
|
|
|
17078
17091
|
setChildren: null,
|
|
17079
17092
|
setWhen: function() {
|
|
17080
17093
|
}
|
|
17081
|
-
}), ProvideAdaptContext = function(param) {
|
|
17082
|
-
var { children, ...context } = param, scope = context.scopeName || "";
|
|
17083
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
17084
|
-
value:
|
|
17094
|
+
}), LastAdaptContextScope = /* @__PURE__ */ (0, import_react3.createContext)(""), ProvideAdaptContext = function(param) {
|
|
17095
|
+
var { children, ...context } = param, scope = context.scopeName || "", lastScope = (0, import_react3.useContext)(LastAdaptContextScope);
|
|
17096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(LastAdaptContextScope.Provider, {
|
|
17097
|
+
value: lastScope || context.lastScope || "",
|
|
17085
17098
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AdaptContext.Provider, {
|
|
17086
17099
|
scope,
|
|
17100
|
+
lastScope: lastScope || context.lastScope,
|
|
17087
17101
|
...context,
|
|
17088
17102
|
children
|
|
17089
17103
|
})
|
|
17090
17104
|
});
|
|
17091
|
-
}, useAdaptContext = function() {
|
|
17092
|
-
var
|
|
17093
|
-
return
|
|
17105
|
+
}, useAdaptContext = function(scope) {
|
|
17106
|
+
var lastScope = (0, import_react3.useContext)(LastAdaptContextScope), adaptScope = scope ?? lastScope;
|
|
17107
|
+
return AdaptContext.useStyledContext(adaptScope);
|
|
17094
17108
|
}, AdaptPortals = /* @__PURE__ */ new Map(), AdaptParent = function(param) {
|
|
17095
|
-
var { children, Contents, scope, portal } = param, portalName = `AdaptPortal${scope}`,
|
|
17096
|
-
|
|
17097
|
-
|
|
17098
|
-
|
|
17099
|
-
|
|
17100
|
-
|
|
17101
|
-
|
|
17102
|
-
|
|
17103
|
-
AdaptPortals.delete(id);
|
|
17109
|
+
var { children, Contents, scope, portal } = param, id = (0, import_react3.useId)(), portalName = `AdaptPortal${scope}${id}`, FinalContents = (0, import_react3.useMemo)(function() {
|
|
17110
|
+
if (Contents) return Contents;
|
|
17111
|
+
if (AdaptPortals.has(portalName)) return AdaptPortals.get(portalName);
|
|
17112
|
+
var element = function() {
|
|
17113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, {
|
|
17114
|
+
name: portalName,
|
|
17115
|
+
forwardProps: typeof portal == "boolean" || portal == null ? void 0 : portal.forwardProps
|
|
17116
|
+
}, id);
|
|
17104
17117
|
};
|
|
17105
|
-
|
|
17106
|
-
|
|
17107
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProvideAdaptContext, {
|
|
17108
|
-
Contents: FinalContents,
|
|
17109
|
-
when,
|
|
17110
|
-
platform: platform2,
|
|
17111
|
-
setPlatform,
|
|
17112
|
-
setWhen,
|
|
17113
|
-
setChildren,
|
|
17118
|
+
return AdaptPortals.set(portalName, element), element;
|
|
17119
|
+
}, [
|
|
17114
17120
|
portalName,
|
|
17115
|
-
|
|
17116
|
-
|
|
17121
|
+
Contents
|
|
17122
|
+
]);
|
|
17123
|
+
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
17124
|
+
return AdaptPortals.set(portalName, FinalContents), function() {
|
|
17125
|
+
AdaptPortals.delete(portalName);
|
|
17126
|
+
};
|
|
17127
|
+
}, [
|
|
17128
|
+
portalName
|
|
17129
|
+
]);
|
|
17130
|
+
var [when, setWhen] = import_react3.default.useState(null), [platform2, setPlatform] = import_react3.default.useState(null), [children2, setChildren] = import_react3.default.useState(null);
|
|
17131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(LastAdaptContextScope, {
|
|
17132
|
+
value: scope,
|
|
17133
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProvideAdaptContext, {
|
|
17134
|
+
Contents: FinalContents,
|
|
17135
|
+
when,
|
|
17136
|
+
platform: platform2,
|
|
17137
|
+
setPlatform,
|
|
17138
|
+
setWhen,
|
|
17139
|
+
setChildren,
|
|
17140
|
+
portalName,
|
|
17141
|
+
scopeName: scope,
|
|
17142
|
+
children
|
|
17143
|
+
})
|
|
17117
17144
|
});
|
|
17118
17145
|
}, AdaptContents = function(param) {
|
|
17119
17146
|
var { scope, ...rest } = param, context = useAdaptContext(scope);
|
|
@@ -17125,7 +17152,7 @@ var require_Adapt_native = __commonJS({
|
|
|
17125
17152
|
};
|
|
17126
17153
|
AdaptContents.shouldForwardSpace = !0;
|
|
17127
17154
|
var Adapt = (0, import_helpers.withStaticProperties)(function(props) {
|
|
17128
|
-
var { platform: platform2, when, children, scope } = props, context = useAdaptContext(scope),
|
|
17155
|
+
var { platform: platform2, when, children, scope } = props, context = useAdaptContext(scope), enabled = useAdaptIsActiveGiven(props);
|
|
17129
17156
|
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
17130
17157
|
var _context_setWhen, _context_setPlatform;
|
|
17131
17158
|
context == null || (_context_setWhen = context.setWhen) === null || _context_setWhen === void 0 || _context_setWhen.call(context, when || enabled), context == null || (_context_setPlatform = context.setPlatform) === null || _context_setPlatform === void 0 || _context_setPlatform.call(context, platform2 || null);
|
|
@@ -17151,10 +17178,7 @@ var require_Adapt_native = __commonJS({
|
|
|
17151
17178
|
}, [
|
|
17152
17179
|
output
|
|
17153
17180
|
]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_z_index_stack2.StackZIndexContext, {
|
|
17154
|
-
children:
|
|
17155
|
-
value: scopeName,
|
|
17156
|
-
children: enabled ? output : null
|
|
17157
|
-
})
|
|
17181
|
+
children: enabled ? output : null
|
|
17158
17182
|
});
|
|
17159
17183
|
}, {
|
|
17160
17184
|
Contents: AdaptContents
|
|
@@ -17168,6 +17192,7 @@ var require_Adapt_native = __commonJS({
|
|
|
17168
17192
|
}, useAdaptIsActiveGiven = function(param) {
|
|
17169
17193
|
var { when, platform: platform2 } = param, media = (0, import_core12.useMedia)();
|
|
17170
17194
|
if (when == null && platform2 == null) return !1;
|
|
17195
|
+
if (when === !0) return !0;
|
|
17171
17196
|
var enabled = !1;
|
|
17172
17197
|
return platform2 === "touch" ? enabled = import_constants4.isTouchable : platform2 === "native" ? enabled = !import_constants4.isWeb : platform2 === "web" ? enabled = import_constants4.isWeb : platform2 === "ios" ? enabled = import_constants4.isIos : platform2 === "android" && (enabled = import_constants4.isAndroid), platform2 && enabled == !1 ? !1 : (when && typeof when == "string" && (enabled = media[when]), enabled);
|
|
17173
17198
|
}, useAdaptIsActive = function(scope) {
|
|
@@ -17216,6 +17241,93 @@ var require_index_native31 = __commonJS({
|
|
|
17216
17241
|
}
|
|
17217
17242
|
});
|
|
17218
17243
|
|
|
17244
|
+
// ../../core/aria-hidden/dist/cjs/AriaHidden.native.js
|
|
17245
|
+
var require_AriaHidden_native = __commonJS({
|
|
17246
|
+
"../../core/aria-hidden/dist/cjs/AriaHidden.native.js"(exports2, module2) {
|
|
17247
|
+
"use strict";
|
|
17248
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
17249
|
+
for (var name in all) __defProp2(target, name, {
|
|
17250
|
+
get: all[name],
|
|
17251
|
+
enumerable: !0
|
|
17252
|
+
});
|
|
17253
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
17254
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
17255
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
17256
|
+
for (var _loop = function() {
|
|
17257
|
+
var key = _step.value;
|
|
17258
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
17259
|
+
get: function() {
|
|
17260
|
+
return from[key];
|
|
17261
|
+
},
|
|
17262
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
17263
|
+
});
|
|
17264
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
17265
|
+
} catch (err) {
|
|
17266
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
17267
|
+
} finally {
|
|
17268
|
+
try {
|
|
17269
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
17270
|
+
} finally {
|
|
17271
|
+
if (_didIteratorError)
|
|
17272
|
+
throw _iteratorError;
|
|
17273
|
+
}
|
|
17274
|
+
}
|
|
17275
|
+
return to;
|
|
17276
|
+
}, __toCommonJS2 = function(mod) {
|
|
17277
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
17278
|
+
value: !0
|
|
17279
|
+
}), mod);
|
|
17280
|
+
}, AriaHidden_native_exports = {};
|
|
17281
|
+
__export2(AriaHidden_native_exports, {
|
|
17282
|
+
hideOthers: function() {
|
|
17283
|
+
return hideOthers;
|
|
17284
|
+
}
|
|
17285
|
+
});
|
|
17286
|
+
module2.exports = __toCommonJS2(AriaHidden_native_exports);
|
|
17287
|
+
var hideOthers = function() {
|
|
17288
|
+
};
|
|
17289
|
+
}
|
|
17290
|
+
});
|
|
17291
|
+
|
|
17292
|
+
// ../../core/aria-hidden/dist/cjs/index.native.js
|
|
17293
|
+
var require_index_native32 = __commonJS({
|
|
17294
|
+
"../../core/aria-hidden/dist/cjs/index.native.js"(exports2, module2) {
|
|
17295
|
+
"use strict";
|
|
17296
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
17297
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
17298
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
17299
|
+
for (var _loop = function() {
|
|
17300
|
+
var key = _step.value;
|
|
17301
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
17302
|
+
get: function() {
|
|
17303
|
+
return from[key];
|
|
17304
|
+
},
|
|
17305
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
17306
|
+
});
|
|
17307
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
17308
|
+
} catch (err) {
|
|
17309
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
17310
|
+
} finally {
|
|
17311
|
+
try {
|
|
17312
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
17313
|
+
} finally {
|
|
17314
|
+
if (_didIteratorError)
|
|
17315
|
+
throw _iteratorError;
|
|
17316
|
+
}
|
|
17317
|
+
}
|
|
17318
|
+
return to;
|
|
17319
|
+
}, __reExport2 = function(target, mod, secondTarget) {
|
|
17320
|
+
return __copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default");
|
|
17321
|
+
}, __toCommonJS2 = function(mod) {
|
|
17322
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
17323
|
+
value: !0
|
|
17324
|
+
}), mod);
|
|
17325
|
+
}, index_exports2 = {};
|
|
17326
|
+
module2.exports = __toCommonJS2(index_exports2);
|
|
17327
|
+
__reExport2(index_exports2, require_AriaHidden_native(), module2.exports);
|
|
17328
|
+
}
|
|
17329
|
+
});
|
|
17330
|
+
|
|
17219
17331
|
// ../../core/create-context/dist/cjs/create-context.native.js
|
|
17220
17332
|
var require_create_context_native = __commonJS({
|
|
17221
17333
|
"../../core/create-context/dist/cjs/create-context.native.js"(exports2, module2) {
|
|
@@ -17385,7 +17497,7 @@ var require_create_context_native = __commonJS({
|
|
|
17385
17497
|
});
|
|
17386
17498
|
|
|
17387
17499
|
// ../../core/create-context/dist/cjs/index.native.js
|
|
17388
|
-
var
|
|
17500
|
+
var require_index_native33 = __commonJS({
|
|
17389
17501
|
"../../core/create-context/dist/cjs/index.native.js"(exports2, module2) {
|
|
17390
17502
|
"use strict";
|
|
17391
17503
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
@@ -17423,93 +17535,6 @@ var require_index_native32 = __commonJS({
|
|
|
17423
17535
|
}
|
|
17424
17536
|
});
|
|
17425
17537
|
|
|
17426
|
-
// ../../core/aria-hidden/dist/cjs/AriaHidden.native.js
|
|
17427
|
-
var require_AriaHidden_native = __commonJS({
|
|
17428
|
-
"../../core/aria-hidden/dist/cjs/AriaHidden.native.js"(exports2, module2) {
|
|
17429
|
-
"use strict";
|
|
17430
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
17431
|
-
for (var name in all) __defProp2(target, name, {
|
|
17432
|
-
get: all[name],
|
|
17433
|
-
enumerable: !0
|
|
17434
|
-
});
|
|
17435
|
-
}, __copyProps2 = function(to, from, except, desc) {
|
|
17436
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
17437
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
17438
|
-
for (var _loop = function() {
|
|
17439
|
-
var key = _step.value;
|
|
17440
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
17441
|
-
get: function() {
|
|
17442
|
-
return from[key];
|
|
17443
|
-
},
|
|
17444
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
17445
|
-
});
|
|
17446
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
17447
|
-
} catch (err) {
|
|
17448
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
17449
|
-
} finally {
|
|
17450
|
-
try {
|
|
17451
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
17452
|
-
} finally {
|
|
17453
|
-
if (_didIteratorError)
|
|
17454
|
-
throw _iteratorError;
|
|
17455
|
-
}
|
|
17456
|
-
}
|
|
17457
|
-
return to;
|
|
17458
|
-
}, __toCommonJS2 = function(mod) {
|
|
17459
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
17460
|
-
value: !0
|
|
17461
|
-
}), mod);
|
|
17462
|
-
}, AriaHidden_native_exports = {};
|
|
17463
|
-
__export2(AriaHidden_native_exports, {
|
|
17464
|
-
hideOthers: function() {
|
|
17465
|
-
return hideOthers;
|
|
17466
|
-
}
|
|
17467
|
-
});
|
|
17468
|
-
module2.exports = __toCommonJS2(AriaHidden_native_exports);
|
|
17469
|
-
var hideOthers = function() {
|
|
17470
|
-
};
|
|
17471
|
-
}
|
|
17472
|
-
});
|
|
17473
|
-
|
|
17474
|
-
// ../../core/aria-hidden/dist/cjs/index.native.js
|
|
17475
|
-
var require_index_native33 = __commonJS({
|
|
17476
|
-
"../../core/aria-hidden/dist/cjs/index.native.js"(exports2, module2) {
|
|
17477
|
-
"use strict";
|
|
17478
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
17479
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
17480
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
17481
|
-
for (var _loop = function() {
|
|
17482
|
-
var key = _step.value;
|
|
17483
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
17484
|
-
get: function() {
|
|
17485
|
-
return from[key];
|
|
17486
|
-
},
|
|
17487
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
17488
|
-
});
|
|
17489
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
17490
|
-
} catch (err) {
|
|
17491
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
17492
|
-
} finally {
|
|
17493
|
-
try {
|
|
17494
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
17495
|
-
} finally {
|
|
17496
|
-
if (_didIteratorError)
|
|
17497
|
-
throw _iteratorError;
|
|
17498
|
-
}
|
|
17499
|
-
}
|
|
17500
|
-
return to;
|
|
17501
|
-
}, __reExport2 = function(target, mod, secondTarget) {
|
|
17502
|
-
return __copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default");
|
|
17503
|
-
}, __toCommonJS2 = function(mod) {
|
|
17504
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
17505
|
-
value: !0
|
|
17506
|
-
}), mod);
|
|
17507
|
-
}, index_exports2 = {};
|
|
17508
|
-
module2.exports = __toCommonJS2(index_exports2);
|
|
17509
|
-
__reExport2(index_exports2, require_AriaHidden_native(), module2.exports);
|
|
17510
|
-
}
|
|
17511
|
-
});
|
|
17512
|
-
|
|
17513
17538
|
// ../dismissable/dist/cjs/Dismissable.native.js
|
|
17514
17539
|
var require_Dismissable_native = __commonJS({
|
|
17515
17540
|
"../dismissable/dist/cjs/Dismissable.native.js"(exports2, module2) {
|
|
@@ -17740,7 +17765,7 @@ var require_FocusScopeController_native = __commonJS({
|
|
|
17740
17765
|
}
|
|
17741
17766
|
});
|
|
17742
17767
|
module2.exports = __toCommonJS2(FocusScopeController_exports);
|
|
17743
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_create_context =
|
|
17768
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_create_context = require_index_native33(), import_use_event = require_index_native8(), React4 = __toESM2(require("react")), FOCUS_SCOPE_CONTROLLER_NAME = "FocusScopeController", [createFocusScopeControllerContext, createFocusScopeControllerScope] = (0, import_create_context.createContextScope)(FOCUS_SCOPE_CONTROLLER_NAME), [FocusScopeControllerProvider, useFocusScopeControllerContext] = createFocusScopeControllerContext(FOCUS_SCOPE_CONTROLLER_NAME);
|
|
17744
17769
|
function FocusScopeController(props) {
|
|
17745
17770
|
var { __scopeFocusScope, children, enabled, loop, trapped, onMountAutoFocus, onUnmountAutoFocus, forceUnmount, focusOnIdle } = props, stableOnMountAutoFocus = (0, import_use_event.useEvent)(onMountAutoFocus), stableOnUnmountAutoFocus = (0, import_use_event.useEvent)(onUnmountAutoFocus), contextValue = React4.useMemo(function() {
|
|
17746
17771
|
return {
|
|
@@ -18011,7 +18036,7 @@ var require_SheetContext_native = __commonJS({
|
|
|
18011
18036
|
}
|
|
18012
18037
|
});
|
|
18013
18038
|
module2.exports = __toCommonJS2(SheetContext_exports);
|
|
18014
|
-
var import_create_context =
|
|
18039
|
+
var import_create_context = require_index_native33(), import_constants4 = require_constants_native4(), [createSheetContext, createSheetScope2] = (0, import_create_context.createContextScope)(import_constants4.SHEET_NAME), [SheetProvider, useSheetContext] = createSheetContext(import_constants4.SHEET_NAME, {});
|
|
18015
18040
|
}
|
|
18016
18041
|
});
|
|
18017
18042
|
|
|
@@ -18711,7 +18736,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18711
18736
|
if (isScrolled) return previouslyScrolling = !0, !1;
|
|
18712
18737
|
if (isNearTop && hasScrollView.current && isDraggingUp) return !1;
|
|
18713
18738
|
}
|
|
18714
|
-
return Math.abs(dy) >
|
|
18739
|
+
return Math.abs(dy) > 10;
|
|
18715
18740
|
}
|
|
18716
18741
|
var granted = getShouldSet();
|
|
18717
18742
|
return granted && scrollBridge.setParentDragging(!0), granted;
|
|
@@ -19180,7 +19205,8 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
19180
19205
|
state.current.isScrolling = !0, scrollBridge.scrollLock = !0, setScrollEnabled(!0);
|
|
19181
19206
|
return;
|
|
19182
19207
|
}
|
|
19183
|
-
|
|
19208
|
+
var isDraggingUpFromTopOnFirstScroll = !state.current.isScrolling && dy > 0 && scrollBridge.y === 0;
|
|
19209
|
+
if (!isDraggingUpFromTopOnFirstScroll && scrollBridge.y >= 0) return;
|
|
19184
19210
|
setScrollEnabled(!1), scrollBridge.drag(dragAt), state.current.dragAt = dragAt, state.current.dys.push(dy), state.current.dys.length > 100 && (state.current.dys = state.current.dys.slice(-10));
|
|
19185
19211
|
}
|
|
19186
19212
|
},
|
|
@@ -19388,6 +19414,7 @@ var require_createSheet_native = __commonJS({
|
|
|
19388
19414
|
!disableHideBottomOverflow && // @ts-ignore
|
|
19389
19415
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Frame, {
|
|
19390
19416
|
...props,
|
|
19417
|
+
"data-testid": "ensure-sheet-cover-not-overlapping",
|
|
19391
19418
|
componentName: "SheetCover",
|
|
19392
19419
|
// biome-ignore lint/correctness/noChildrenProp: <explanation>
|
|
19393
19420
|
children: null,
|
|
@@ -19845,6 +19872,9 @@ var require_Dialog_native = __commonJS({
|
|
|
19845
19872
|
DialogContent: function() {
|
|
19846
19873
|
return DialogContent;
|
|
19847
19874
|
},
|
|
19875
|
+
DialogContext: function() {
|
|
19876
|
+
return DialogContext;
|
|
19877
|
+
},
|
|
19848
19878
|
DialogDescription: function() {
|
|
19849
19879
|
return DialogDescription;
|
|
19850
19880
|
},
|
|
@@ -19860,6 +19890,9 @@ var require_Dialog_native = __commonJS({
|
|
|
19860
19890
|
DialogPortalFrame: function() {
|
|
19861
19891
|
return DialogPortalFrame;
|
|
19862
19892
|
},
|
|
19893
|
+
DialogProvider: function() {
|
|
19894
|
+
return DialogProvider;
|
|
19895
|
+
},
|
|
19863
19896
|
DialogTitle: function() {
|
|
19864
19897
|
return DialogTitle;
|
|
19865
19898
|
},
|
|
@@ -19869,15 +19902,19 @@ var require_Dialog_native = __commonJS({
|
|
|
19869
19902
|
DialogWarningProvider: function() {
|
|
19870
19903
|
return DialogWarningProvider;
|
|
19871
19904
|
},
|
|
19872
|
-
|
|
19873
|
-
return
|
|
19905
|
+
useDialogContext: function() {
|
|
19906
|
+
return useDialogContext;
|
|
19874
19907
|
}
|
|
19875
19908
|
});
|
|
19876
19909
|
module2.exports = __toCommonJS2(Dialog_exports);
|
|
19877
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native31(), import_animate_presence = require_index_native4(), import_aria_hidden =
|
|
19878
|
-
|
|
19910
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native31(), import_animate_presence = require_index_native4(), import_aria_hidden = require_index_native32(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_create_context = require_index_native33(), import_dismissable = require_index_native34(), import_focus_scope = require_index_native35(), import_helpers = require_index_native7(), import_portal2 = require_index_native30(), import_remove_scroll = require_index_native36(), import_sheet = require_index_native38(), import_stacks3 = require_index_native24(), import_text2 = require_index_native26(), import_use_controllable_state = require_index_native10(), import_z_index_stack2 = require_index_native29(), React4 = __toESM2(require("react")), DialogContext = (0, import_core12.createStyledContext)(
|
|
19911
|
+
// since we always provide this we can avoid setting here
|
|
19912
|
+
{},
|
|
19913
|
+
"Dialog__"
|
|
19914
|
+
), { useStyledContext: useDialogContext, Provider: DialogProvider } = DialogContext, DialogTriggerFrame = (0, import_core12.styled)(import_core12.View, {
|
|
19915
|
+
name: "DialogTrigger"
|
|
19879
19916
|
}), DialogTrigger = DialogTriggerFrame.styleable(function(props, forwardedRef) {
|
|
19880
|
-
var {
|
|
19917
|
+
var { scope, ...triggerProps } = props, isInsideButton = React4.useContext(import_stacks3.ButtonNestingContext), context = useDialogContext(scope), composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
19881
19918
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.ButtonNestingContext.Provider, {
|
|
19882
19919
|
value: !0,
|
|
19883
19920
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogTriggerFrame, {
|
|
@@ -19891,8 +19928,6 @@ var require_Dialog_native = __commonJS({
|
|
|
19891
19928
|
onPress: (0, import_helpers.composeEventHandlers)(props.onPress, context.onOpenToggle)
|
|
19892
19929
|
})
|
|
19893
19930
|
});
|
|
19894
|
-
}), PORTAL_NAME = "DialogPortal", [PortalProvider2, usePortalContext] = createDialogContext(PORTAL_NAME, {
|
|
19895
|
-
forceMount: void 0
|
|
19896
19931
|
}), DialogPortalFrame = (0, import_core12.styled)(import_stacks3.YStack, {
|
|
19897
19932
|
pointerEvents: "none",
|
|
19898
19933
|
variants: {
|
|
@@ -19911,73 +19946,70 @@ var require_Dialog_native = __commonJS({
|
|
|
19911
19946
|
defaultVariants: {
|
|
19912
19947
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
19913
19948
|
}
|
|
19914
|
-
}), DialogPortalItem = function(
|
|
19915
|
-
var {
|
|
19916
|
-
|
|
19917
|
-
children
|
|
19918
|
-
separator,
|
|
19919
|
-
space,
|
|
19920
|
-
direction: spaceDirection
|
|
19921
|
-
}));
|
|
19922
|
-
var content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogProvider, {
|
|
19923
|
-
scope: __scopeDialog,
|
|
19924
|
-
...context,
|
|
19925
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
19926
|
-
name: themeName,
|
|
19927
|
-
children: childrenSpaced
|
|
19928
|
-
})
|
|
19949
|
+
}), needsRepropagation = import_constants4.isAndroid || import_constants4.isIos && !import_portal2.USE_NATIVE_PORTAL, DialogPortalItem = function(param) {
|
|
19950
|
+
var { context, children } = param, themeName = (0, import_core12.useThemeName)(), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope), adaptContext = (0, import_adapt.useAdaptContext)(context.adaptScope), content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
19951
|
+
name: themeName,
|
|
19952
|
+
children
|
|
19929
19953
|
});
|
|
19930
|
-
return
|
|
19954
|
+
return needsRepropagation && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.ProvideAdaptContext, {
|
|
19955
|
+
...adaptContext,
|
|
19956
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogProvider, {
|
|
19957
|
+
...context,
|
|
19958
|
+
children: content
|
|
19959
|
+
})
|
|
19960
|
+
})), isAdapted ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
19961
|
+
scope: context.adaptScope,
|
|
19931
19962
|
children: content
|
|
19932
19963
|
}) : context.modal ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
|
|
19933
|
-
hostName: context.modal ? "root" : context.
|
|
19964
|
+
hostName: context.modal ? "root" : context.adaptScope,
|
|
19934
19965
|
children: content
|
|
19935
19966
|
}) : content;
|
|
19936
19967
|
}, DialogPortal = function(props) {
|
|
19937
|
-
var {
|
|
19968
|
+
var { scope, forceMount, children, ...frameProps } = props, context = useDialogContext(scope), isShowing = forceMount || context.open, [isFullyHidden, setIsFullyHidden] = React4.useState(!isShowing), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
|
|
19938
19969
|
isShowing && isFullyHidden && setIsFullyHidden(!1);
|
|
19939
19970
|
var handleExitComplete = React4.useCallback(function() {
|
|
19940
19971
|
setIsFullyHidden(!0);
|
|
19941
19972
|
}, []), zIndex = (0, import_core12.getExpandedShorthand)("zIndex", props), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_z_index_stack2.StackZIndexContext, {
|
|
19942
19973
|
zIndex: (0, import_portal2.resolveViewZIndex)(zIndex),
|
|
19943
19974
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
|
|
19975
|
+
passThrough: isAdapted,
|
|
19944
19976
|
onExitComplete: handleExitComplete,
|
|
19945
19977
|
children: isShowing || isAdapted ? children : null
|
|
19946
19978
|
})
|
|
19947
19979
|
});
|
|
19948
19980
|
if (isFullyHidden && !isAdapted) return null;
|
|
19949
|
-
var framedContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
19950
|
-
|
|
19951
|
-
|
|
19952
|
-
|
|
19953
|
-
|
|
19954
|
-
...frameProps,
|
|
19955
|
-
children: contents
|
|
19956
|
-
})
|
|
19981
|
+
var framedContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalFrame, {
|
|
19982
|
+
// passThrough={isAdapted}
|
|
19983
|
+
pointerEvents: isShowing ? "auto" : "none",
|
|
19984
|
+
...frameProps,
|
|
19985
|
+
children: contents
|
|
19957
19986
|
});
|
|
19958
19987
|
return import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
|
|
19959
19988
|
zIndex,
|
|
19960
19989
|
// set to 1000 which "boosts" it 1000 above baseline for current context
|
|
19961
19990
|
// this makes sure its above (this first 1k) popovers on the same layer
|
|
19962
19991
|
stackZIndex: 1e3,
|
|
19992
|
+
passThrough: isAdapted,
|
|
19963
19993
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PassthroughTheme, {
|
|
19994
|
+
passThrough: isAdapted,
|
|
19964
19995
|
children: framedContents
|
|
19965
19996
|
})
|
|
19966
19997
|
}) : isAdapted ? framedContents : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
|
|
19967
|
-
|
|
19998
|
+
context,
|
|
19968
19999
|
children: framedContents
|
|
19969
20000
|
});
|
|
19970
20001
|
}, PassthroughTheme = function(param) {
|
|
19971
|
-
var { children } = param, themeName = (0, import_core12.useThemeName)();
|
|
20002
|
+
var { children, passThrough } = param, themeName = (0, import_core12.useThemeName)();
|
|
19972
20003
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
20004
|
+
passThrough,
|
|
19973
20005
|
name: themeName,
|
|
19974
20006
|
forceClassName: !0,
|
|
19975
20007
|
children
|
|
19976
20008
|
});
|
|
19977
20009
|
}, OVERLAY_NAME = "DialogOverlay", DialogOverlayFrame = (0, import_core12.styled)(import_sheet.Overlay, {
|
|
19978
20010
|
name: OVERLAY_NAME
|
|
19979
|
-
}), DialogOverlay = DialogOverlayFrame.
|
|
19980
|
-
var {
|
|
20011
|
+
}), DialogOverlay = DialogOverlayFrame.styleable(function(param, forwardedRef) {
|
|
20012
|
+
var { scope, ...props } = param, context = useDialogContext(scope), { forceMount = context.forceMount, ...overlayProps } = props, isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
|
|
19981
20013
|
return !forceMount && (!context.modal || isAdapted) ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogOverlayFrame, {
|
|
19982
20014
|
"data-state": getState(context.open),
|
|
19983
20015
|
// TODO: this will be apply for v2
|
|
@@ -19990,7 +20022,7 @@ var require_Dialog_native = __commonJS({
|
|
|
19990
20022
|
...overlayProps,
|
|
19991
20023
|
ref: forwardedRef
|
|
19992
20024
|
});
|
|
19993
|
-
})
|
|
20025
|
+
}), CONTENT_NAME = "DialogContent", DialogContentFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
|
|
19994
20026
|
name: CONTENT_NAME,
|
|
19995
20027
|
tag: "dialog",
|
|
19996
20028
|
variants: {
|
|
@@ -20014,8 +20046,8 @@ var require_Dialog_native = __commonJS({
|
|
|
20014
20046
|
size: "$true",
|
|
20015
20047
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
20016
20048
|
}
|
|
20017
|
-
}), DialogContent = DialogContentFrame.
|
|
20018
|
-
var {
|
|
20049
|
+
}), DialogContent = DialogContentFrame.styleable(function(param, forwardedRef) {
|
|
20050
|
+
var { scope, ...props } = param, context = useDialogContext(scope), { forceMount = context.forceMount, ...contentProps } = props, contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
20019
20051
|
children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogContentModal, {
|
|
20020
20052
|
context,
|
|
20021
20053
|
...contentProps,
|
|
@@ -20034,7 +20066,7 @@ var require_Dialog_native = __commonJS({
|
|
|
20034
20066
|
children: contents
|
|
20035
20067
|
})
|
|
20036
20068
|
});
|
|
20037
|
-
})
|
|
20069
|
+
}), DialogContentModal = /* @__PURE__ */ React4.forwardRef(function(param, forwardedRef) {
|
|
20038
20070
|
var { children, context, ...props } = param, contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.contentRef, contentRef);
|
|
20039
20071
|
return React4.useEffect(function() {
|
|
20040
20072
|
if (import_constants4.isWeb && context.open) {
|
|
@@ -20098,11 +20130,12 @@ var require_Dialog_native = __commonJS({
|
|
|
20098
20130
|
}
|
|
20099
20131
|
});
|
|
20100
20132
|
}), DialogContentImpl = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
20101
|
-
var {
|
|
20133
|
+
var { trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, context, ...contentProps } = props, contentRef = React4.useRef(
|
|
20102
20134
|
// TODO react 19 type workaround
|
|
20103
20135
|
void 0
|
|
20104
|
-
), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
20136
|
+
), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
|
|
20105
20137
|
if (isAdapted) return !import_constants4.isWeb && !context.open ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
|
|
20138
|
+
context,
|
|
20106
20139
|
children: contentProps.children
|
|
20107
20140
|
});
|
|
20108
20141
|
var contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogContentFrame, {
|
|
@@ -20153,7 +20186,7 @@ var require_Dialog_native = __commonJS({
|
|
|
20153
20186
|
}), DialogTitleFrame = (0, import_core12.styled)(import_text2.H2, {
|
|
20154
20187
|
name: "DialogTitle"
|
|
20155
20188
|
}), DialogTitle = DialogTitleFrame.styleable(function(props, forwardedRef) {
|
|
20156
|
-
var {
|
|
20189
|
+
var { scope, ...titleProps } = props, context = useDialogContext(scope);
|
|
20157
20190
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogTitleFrame, {
|
|
20158
20191
|
id: context.titleId,
|
|
20159
20192
|
...titleProps,
|
|
@@ -20161,8 +20194,8 @@ var require_Dialog_native = __commonJS({
|
|
|
20161
20194
|
});
|
|
20162
20195
|
}), DialogDescriptionFrame = (0, import_core12.styled)(import_text2.Paragraph, {
|
|
20163
20196
|
name: "DialogDescription"
|
|
20164
|
-
}),
|
|
20165
|
-
var {
|
|
20197
|
+
}), DialogDescription = DialogDescriptionFrame.styleable(function(props, forwardedRef) {
|
|
20198
|
+
var { scope, ...descriptionProps } = props, context = useDialogContext(scope);
|
|
20166
20199
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogDescriptionFrame, {
|
|
20167
20200
|
id: context.descriptionId,
|
|
20168
20201
|
...descriptionProps,
|
|
@@ -20172,10 +20205,7 @@ var require_Dialog_native = __commonJS({
|
|
|
20172
20205
|
name: CLOSE_NAME,
|
|
20173
20206
|
tag: "button"
|
|
20174
20207
|
}), DialogClose = DialogCloseFrame.styleable(function(props, forwardedRef) {
|
|
20175
|
-
var {
|
|
20176
|
-
warn: !1,
|
|
20177
|
-
fallback: {}
|
|
20178
|
-
}), isAdapted = (0, import_adapt.useAdaptIsActive)(), isInsideButton = React4.useContext(import_stacks3.ButtonNestingContext);
|
|
20208
|
+
var { scope, displayWhenAdapted, ...closeProps } = props, context = useDialogContext(scope), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope), isInsideButton = React4.useContext(import_stacks3.ButtonNestingContext);
|
|
20179
20209
|
return isAdapted && !displayWhenAdapted ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogCloseFrame, {
|
|
20180
20210
|
accessibilityLabel: "Dialog Close",
|
|
20181
20211
|
tag: isInsideButton ? "span" : "button",
|
|
@@ -20231,10 +20261,7 @@ var require_Dialog_native = __commonJS({
|
|
|
20231
20261
|
}
|
|
20232
20262
|
return null;
|
|
20233
20263
|
}, Dialog = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
|
|
20234
|
-
var {
|
|
20235
|
-
scopeKey,
|
|
20236
|
-
contentId
|
|
20237
|
-
}), triggerRef = React4.useRef(null), contentRef = React4.useRef(null), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
20264
|
+
var { scope = "", children, open: openProp, defaultOpen = !1, onOpenChange, modal = !0, disableRemoveScroll = !1 } = props, baseId = React4.useId(), dialogId = `Dialog-${scope}-${baseId}`, contentId = `${dialogId}-content`, titleId = `${dialogId}-title`, descriptionId = `${dialogId}-description`, triggerRef = React4.useRef(null), contentRef = React4.useRef(null), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
20238
20265
|
prop: openProp,
|
|
20239
20266
|
defaultProp: defaultOpen,
|
|
20240
20267
|
onChange: onOpenChange
|
|
@@ -20244,9 +20271,9 @@ var require_Dialog_native = __commonJS({
|
|
|
20244
20271
|
});
|
|
20245
20272
|
}, [
|
|
20246
20273
|
setOpen
|
|
20247
|
-
]), context = {
|
|
20248
|
-
|
|
20249
|
-
|
|
20274
|
+
]), adaptScope = `DialogAdapt${scope}`, context = {
|
|
20275
|
+
dialogScope: scope,
|
|
20276
|
+
adaptScope,
|
|
20250
20277
|
triggerRef,
|
|
20251
20278
|
contentRef,
|
|
20252
20279
|
contentId,
|
|
@@ -20256,8 +20283,7 @@ var require_Dialog_native = __commonJS({
|
|
|
20256
20283
|
onOpenChange: setOpen,
|
|
20257
20284
|
onOpenToggle,
|
|
20258
20285
|
modal,
|
|
20259
|
-
disableRemoveScroll
|
|
20260
|
-
adaptName
|
|
20286
|
+
disableRemoveScroll
|
|
20261
20287
|
};
|
|
20262
20288
|
return React4.useImperativeHandle(ref, function() {
|
|
20263
20289
|
return {
|
|
@@ -20266,15 +20292,16 @@ var require_Dialog_native = __commonJS({
|
|
|
20266
20292
|
}, [
|
|
20267
20293
|
setOpen
|
|
20268
20294
|
]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
|
|
20269
|
-
scope:
|
|
20295
|
+
scope: adaptScope,
|
|
20270
20296
|
portal: {
|
|
20271
20297
|
forwardProps: props
|
|
20272
20298
|
},
|
|
20273
20299
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogProvider, {
|
|
20300
|
+
scope,
|
|
20274
20301
|
...context,
|
|
20275
20302
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogSheetController, {
|
|
20276
20303
|
onOpenChange: setOpen,
|
|
20277
|
-
|
|
20304
|
+
scope,
|
|
20278
20305
|
children
|
|
20279
20306
|
})
|
|
20280
20307
|
})
|
|
@@ -20290,11 +20317,8 @@ var require_Dialog_native = __commonJS({
|
|
|
20290
20317
|
Sheet: import_sheet.Sheet.Controlled,
|
|
20291
20318
|
FocusScope: import_focus_scope.FocusScopeController,
|
|
20292
20319
|
Adapt: import_adapt.Adapt
|
|
20293
|
-
}),
|
|
20294
|
-
var
|
|
20295
|
-
return `${scopeKey || contentId}DialogAdapt`;
|
|
20296
|
-
}, DialogSheetController = function(props) {
|
|
20297
|
-
var context = useDialogContext("DialogSheetController", props.__scopeDialog), isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
20320
|
+
}), DialogSheetController = function(props) {
|
|
20321
|
+
var context = useDialogContext(props.scope), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
|
|
20298
20322
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_sheet.SheetController, {
|
|
20299
20323
|
onOpenChange: function(val) {
|
|
20300
20324
|
if (isAdapted) {
|
|
@@ -20425,15 +20449,12 @@ var require_AlertDialog_native = __commonJS({
|
|
|
20425
20449
|
},
|
|
20426
20450
|
AlertDialogTrigger: function() {
|
|
20427
20451
|
return AlertDialogTrigger;
|
|
20428
|
-
},
|
|
20429
|
-
createAlertDialogScope: function() {
|
|
20430
|
-
return createAlertDialogScope;
|
|
20431
20452
|
}
|
|
20432
20453
|
});
|
|
20433
20454
|
module2.exports = __toCommonJS2(AlertDialog_exports);
|
|
20434
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native20(),
|
|
20435
|
-
|
|
20436
|
-
|
|
20455
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_dialog = require_index_native39(), import_helpers = require_index_native7(), import_use_controllable_state = require_index_native10(), React4 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), AlertScopePrefix = "Alert__", getAlertDialogScope = function(scope) {
|
|
20456
|
+
return AlertScopePrefix + scope;
|
|
20457
|
+
}, ROOT_NAME = "AlertDialog", TRIGGER_NAME = "AlertDialogTrigger", NativeAlertDialogTriggerFrame = (0, import_core12.styled)(import_core12.View, {
|
|
20437
20458
|
name: TRIGGER_NAME
|
|
20438
20459
|
}), AlertDialogTrigger = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
20439
20460
|
if (props.__native) {
|
|
@@ -20443,46 +20464,40 @@ var require_AlertDialog_native = __commonJS({
|
|
|
20443
20464
|
onPress: (0, import_helpers.composeEventHandlers)(onPress, __onPress)
|
|
20444
20465
|
});
|
|
20445
20466
|
}
|
|
20446
|
-
var {
|
|
20467
|
+
var { scope, ...triggerProps } = props;
|
|
20447
20468
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogTrigger, {
|
|
20448
|
-
|
|
20469
|
+
scope: getAlertDialogScope(scope),
|
|
20449
20470
|
...triggerProps,
|
|
20450
20471
|
ref: forwardedRef
|
|
20451
20472
|
});
|
|
20452
|
-
})
|
|
20453
|
-
|
|
20454
|
-
var PORTAL_NAME = "AlertDialogPortal", AlertDialogPortal = function(props) {
|
|
20455
|
-
var { __scopeAlertDialog, ...portalProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
20473
|
+
}), AlertDialogPortal = function(props) {
|
|
20474
|
+
var { scope, ...portalProps } = props;
|
|
20456
20475
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogPortal, {
|
|
20457
|
-
|
|
20476
|
+
scope: getAlertDialogScope(scope),
|
|
20458
20477
|
...portalProps
|
|
20459
20478
|
});
|
|
20460
|
-
}
|
|
20461
|
-
AlertDialogPortal.displayName = PORTAL_NAME;
|
|
20462
|
-
var OVERLAY_NAME = "AlertDialogOverlay", AlertDialogOverlayFrame = (0, import_core12.styled)(import_dialog.DialogOverlayFrame, {
|
|
20479
|
+
}, OVERLAY_NAME = "AlertDialogOverlay", AlertDialogOverlayFrame = (0, import_core12.styled)(import_dialog.DialogOverlayFrame, {
|
|
20463
20480
|
name: OVERLAY_NAME
|
|
20464
20481
|
}), AlertDialogOverlay = AlertDialogOverlayFrame.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
20465
|
-
var {
|
|
20482
|
+
var { scope, ...overlayProps } = props;
|
|
20466
20483
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogOverlay, {
|
|
20467
|
-
|
|
20484
|
+
scope: getAlertDialogScope(scope),
|
|
20468
20485
|
...overlayProps,
|
|
20469
20486
|
ref: forwardedRef
|
|
20470
20487
|
});
|
|
20471
|
-
}))
|
|
20472
|
-
|
|
20473
|
-
var CONTENT_NAME = "AlertDialogContent", [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME), AlertDialogContent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
20474
|
-
var { __scopeAlertDialog, children, ...contentProps } = props, dialogScope = useDialogScope(__scopeAlertDialog), contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), cancelRef = React4.useRef(null);
|
|
20488
|
+
})), CONTENT_NAME = "AlertDialogContent", { Provider: AlertDialogContextProvider, useStyledContext: useAlertDialogContentContext } = (0, import_core12.createStyledContext)({}, "AlertDialogContext"), AlertDialogContent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
20489
|
+
var { scope, children, ...contentProps } = props, dialogScope = getAlertDialogScope(scope), contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), cancelRef = React4.useRef(null);
|
|
20475
20490
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogWarningProvider, {
|
|
20476
20491
|
contentName: CONTENT_NAME,
|
|
20477
20492
|
titleName: TITLE_NAME,
|
|
20478
20493
|
docsSlug: "alert-dialog",
|
|
20479
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
20480
|
-
scope
|
|
20494
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AlertDialogContextProvider, {
|
|
20495
|
+
scope,
|
|
20481
20496
|
cancelRef,
|
|
20482
20497
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_dialog.DialogContent, {
|
|
20483
20498
|
// @ts-ignore
|
|
20484
20499
|
role: "alertdialog",
|
|
20485
|
-
|
|
20500
|
+
scope: dialogScope,
|
|
20486
20501
|
...contentProps,
|
|
20487
20502
|
ref: composedRefs,
|
|
20488
20503
|
onOpenAutoFocus: (0, import_helpers.composeEventHandlers)(contentProps.onOpenAutoFocus, function(event) {
|
|
@@ -20516,45 +20531,35 @@ var require_AlertDialog_native = __commonJS({
|
|
|
20516
20531
|
})
|
|
20517
20532
|
})
|
|
20518
20533
|
});
|
|
20519
|
-
})
|
|
20520
|
-
|
|
20521
|
-
var TITLE_NAME = "AlertDialogTitle", AlertDialogTitle = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
20522
|
-
var { __scopeAlertDialog, ...titleProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
20534
|
+
}), TITLE_NAME = "AlertDialogTitle", AlertDialogTitle = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
20535
|
+
var { scope, ...titleProps } = props;
|
|
20523
20536
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogTitle, {
|
|
20524
|
-
|
|
20537
|
+
scope: getAlertDialogScope(scope),
|
|
20525
20538
|
...titleProps,
|
|
20526
20539
|
ref: forwardedRef
|
|
20527
20540
|
});
|
|
20528
|
-
})
|
|
20529
|
-
|
|
20530
|
-
var DESCRIPTION_NAME = "AlertDialogDescription", AlertDialogDescription = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
20531
|
-
var { __scopeAlertDialog, ...descriptionProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
20541
|
+
}), DESCRIPTION_NAME = "AlertDialogDescription", AlertDialogDescription = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
20542
|
+
var { scope, ...descriptionProps } = props;
|
|
20532
20543
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogDescription, {
|
|
20533
|
-
|
|
20544
|
+
scope: getAlertDialogScope(scope),
|
|
20534
20545
|
...descriptionProps,
|
|
20535
20546
|
ref: forwardedRef
|
|
20536
20547
|
});
|
|
20537
|
-
})
|
|
20538
|
-
|
|
20539
|
-
var ACTION_NAME = "AlertDialogAction", AlertDialogAction = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
20540
|
-
var { __scopeAlertDialog, ...actionProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
20548
|
+
}), ACTION_NAME = "AlertDialogAction", AlertDialogAction = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
20549
|
+
var { scope, ...actionProps } = props;
|
|
20541
20550
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogClose, {
|
|
20542
|
-
|
|
20551
|
+
scope: getAlertDialogScope(scope),
|
|
20543
20552
|
...actionProps,
|
|
20544
20553
|
ref: forwardedRef
|
|
20545
20554
|
});
|
|
20546
|
-
})
|
|
20547
|
-
|
|
20548
|
-
var CANCEL_NAME = "AlertDialogCancel", AlertDialogCancel = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
20549
|
-
var { __scopeAlertDialog, ...cancelProps } = props, { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog), dialogScope = useDialogScope(__scopeAlertDialog), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, cancelRef);
|
|
20555
|
+
}), CANCEL_NAME = "AlertDialogCancel", AlertDialogCancel = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
20556
|
+
var { scope, ...cancelProps } = props, { cancelRef } = useAlertDialogContentContext(scope), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, cancelRef);
|
|
20550
20557
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogClose, {
|
|
20551
|
-
|
|
20558
|
+
scope: getAlertDialogScope(scope),
|
|
20552
20559
|
...cancelProps,
|
|
20553
20560
|
ref
|
|
20554
20561
|
});
|
|
20555
|
-
})
|
|
20556
|
-
AlertDialogCancel.displayName = CANCEL_NAME;
|
|
20557
|
-
var DescriptionWarning = function(param) {
|
|
20562
|
+
}), DescriptionWarning = function(param) {
|
|
20558
20563
|
var { contentRef } = param;
|
|
20559
20564
|
return process.env.NODE_ENV === "development" && React4.useEffect(function() {
|
|
20560
20565
|
var _contentRef_current;
|
|
@@ -20572,7 +20577,7 @@ var require_AlertDialog_native = __commonJS({
|
|
|
20572
20577
|
contentRef
|
|
20573
20578
|
]), null;
|
|
20574
20579
|
}, AlertDialogInner = function(props) {
|
|
20575
|
-
var {
|
|
20580
|
+
var { scope, native, ...alertDialogProps } = props, dialogScope = getAlertDialogScope(scope), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
20576
20581
|
prop: props.open,
|
|
20577
20582
|
defaultProp: props.defaultOpen || !1,
|
|
20578
20583
|
onChange: props.onOpenChange,
|
|
@@ -20618,7 +20623,7 @@ var require_AlertDialog_native = __commonJS({
|
|
|
20618
20623
|
setOpen(!0);
|
|
20619
20624
|
}
|
|
20620
20625
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.Dialog, {
|
|
20621
|
-
|
|
20626
|
+
scope: dialogScope,
|
|
20622
20627
|
...alertDialogProps,
|
|
20623
20628
|
modal: !0
|
|
20624
20629
|
});
|
|
@@ -21126,7 +21131,7 @@ var require_Avatar_native = __commonJS({
|
|
|
21126
21131
|
}
|
|
21127
21132
|
});
|
|
21128
21133
|
module2.exports = __toCommonJS2(Avatar_exports);
|
|
21129
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context =
|
|
21134
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context = require_index_native33(), import_helpers = require_index_native7(), import_image = require_index_native41(), import_shapes = require_index_native42(), import_stacks3 = require_index_native24(), React4 = __toESM2(require("react")), AVATAR_NAME = "Avatar", [createAvatarContext, createAvatarScope] = (0, import_create_context.createContextScope)(AVATAR_NAME), [AvatarProvider, useAvatarContext] = createAvatarContext(AVATAR_NAME), IMAGE_NAME = "AvatarImage", AvatarImage = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
21130
21135
|
var _getShapeSize, { __scopeAvatar, src, onLoadingStatusChange = function() {
|
|
21131
21136
|
}, ...imageProps } = props, context = useAvatarContext(IMAGE_NAME, __scopeAvatar), [status, setStatus] = React4.useState("idle"), shapeSize = (0, import_core12.getVariableValue)((_getShapeSize = (0, import_shapes.getShapeSize)(
|
|
21132
21137
|
context.size,
|
|
@@ -22512,7 +22517,7 @@ var require_Label_native = __commonJS({
|
|
|
22512
22517
|
}
|
|
22513
22518
|
});
|
|
22514
22519
|
module2.exports = __toCommonJS2(Label_exports);
|
|
22515
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_create_context =
|
|
22520
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_create_context = require_index_native33(), import_focusable2 = require_index_native48(), import_get_button_sized2 = require_index_native23(), import_get_font_sized2 = require_index_native25(), import_text2 = require_index_native26(), import_web = require_index_native15(), React4 = __toESM2(require("react")), NAME = "Label", [LabelProvider, useLabelContextImpl] = (0, import_create_context.createContext)(NAME, {
|
|
22516
22521
|
id: void 0,
|
|
22517
22522
|
controlRef: {
|
|
22518
22523
|
current: null
|
|
@@ -23311,7 +23316,7 @@ var require_Form_native = __commonJS({
|
|
|
23311
23316
|
}
|
|
23312
23317
|
});
|
|
23313
23318
|
module2.exports = __toCommonJS2(Form_exports);
|
|
23314
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context =
|
|
23319
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context = require_index_native33(), import_helpers = require_index_native7(), FORM_NAME = "Form", FormFrame = (0, import_core12.styled)(import_core12.Stack, {
|
|
23315
23320
|
name: FORM_NAME,
|
|
23316
23321
|
tag: "form"
|
|
23317
23322
|
}), [createFormContext] = (0, import_create_context.createContextScope)(FORM_NAME), [FormProvider, useFormContext] = createFormContext(FORM_NAME), TRIGGER_NAME = "FormTrigger", FormTriggerFrame = (0, import_core12.styled)(import_core12.View, {
|
|
@@ -23553,7 +23558,7 @@ var require_Group_native = __commonJS({
|
|
|
23553
23558
|
}
|
|
23554
23559
|
});
|
|
23555
23560
|
module2.exports = __toCommonJS2(Group_exports);
|
|
23556
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context =
|
|
23561
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context = require_index_native33(), import_helpers = require_index_native7(), import_stacks3 = require_index_native24(), import_use_controllable_state = require_index_native10(), import_react3 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), import_useIndexedChildren = require_useIndexedChildren_native(), GROUP_NAME = "Group", [createGroupContext, createGroupScope] = (0, import_create_context.createContextScope)(GROUP_NAME), [GroupProvider, useGroupContext] = createGroupContext(GROUP_NAME), GroupFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
|
|
23557
23562
|
name: "GroupFrame",
|
|
23558
23563
|
variants: {
|
|
23559
23564
|
unstyled: {
|
|
@@ -24501,17 +24506,20 @@ var require_Popper_native = __commonJS({
|
|
|
24501
24506
|
PopperArrow: function() {
|
|
24502
24507
|
return PopperArrow;
|
|
24503
24508
|
},
|
|
24509
|
+
PopperArrowFrame: function() {
|
|
24510
|
+
return PopperArrowFrame;
|
|
24511
|
+
},
|
|
24504
24512
|
PopperContent: function() {
|
|
24505
24513
|
return PopperContent;
|
|
24506
24514
|
},
|
|
24507
24515
|
PopperContentFrame: function() {
|
|
24508
24516
|
return PopperContentFrame;
|
|
24509
24517
|
},
|
|
24510
|
-
|
|
24511
|
-
return
|
|
24518
|
+
PopperContextFast: function() {
|
|
24519
|
+
return PopperContextFast;
|
|
24512
24520
|
},
|
|
24513
|
-
|
|
24514
|
-
return
|
|
24521
|
+
PopperContextSlow: function() {
|
|
24522
|
+
return PopperContextSlow;
|
|
24515
24523
|
},
|
|
24516
24524
|
PopperPositionContext: function() {
|
|
24517
24525
|
return PopperPositionContext;
|
|
@@ -24519,20 +24527,59 @@ var require_Popper_native = __commonJS({
|
|
|
24519
24527
|
PopperProvider: function() {
|
|
24520
24528
|
return PopperProvider;
|
|
24521
24529
|
},
|
|
24530
|
+
PopperProviderFast: function() {
|
|
24531
|
+
return PopperProviderFast;
|
|
24532
|
+
},
|
|
24533
|
+
PopperProviderSlow: function() {
|
|
24534
|
+
return PopperProviderSlow;
|
|
24535
|
+
},
|
|
24522
24536
|
setupPopper: function() {
|
|
24523
24537
|
return setupPopper;
|
|
24524
24538
|
},
|
|
24525
24539
|
usePopperContext: function() {
|
|
24526
24540
|
return usePopperContext;
|
|
24527
24541
|
},
|
|
24528
|
-
|
|
24529
|
-
return
|
|
24542
|
+
usePopperContextSlow: function() {
|
|
24543
|
+
return usePopperContextSlow;
|
|
24530
24544
|
}
|
|
24531
24545
|
});
|
|
24532
24546
|
module2.exports = __toCommonJS2(Popper_exports);
|
|
24533
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_floating = require_index_native58(), import_get_token2 = require_index_native22(), import_stacks3 = require_index_native24(), import_start_transition = require_index_native9(), React4 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(),
|
|
24534
|
-
|
|
24535
|
-
|
|
24547
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_floating = require_index_native58(), import_get_token2 = require_index_native22(), import_stacks3 = require_index_native24(), import_start_transition = require_index_native9(), React4 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), PopperContextFast = (0, import_core12.createStyledContext)(
|
|
24548
|
+
// since we always provide this we can avoid setting here
|
|
24549
|
+
{},
|
|
24550
|
+
"Popper__"
|
|
24551
|
+
), PopperPositionContext = import_core12.createStyledContext, { useStyledContext: usePopperContext, Provider: PopperProviderFast } = PopperContextFast, PopperContextSlow = (0, import_core12.createStyledContext)(
|
|
24552
|
+
// since we always provide this we can avoid setting here
|
|
24553
|
+
{},
|
|
24554
|
+
"PopperSlow__"
|
|
24555
|
+
), { useStyledContext: usePopperContextSlow, Provider: PopperProviderSlow } = PopperContextSlow, PopperProvider = function(param) {
|
|
24556
|
+
var { scope, children, ...context } = param, slowContext = getContextSlow(context);
|
|
24557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperProviderFast, {
|
|
24558
|
+
scope,
|
|
24559
|
+
...context,
|
|
24560
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperProviderSlow, {
|
|
24561
|
+
scope,
|
|
24562
|
+
...slowContext,
|
|
24563
|
+
children
|
|
24564
|
+
})
|
|
24565
|
+
});
|
|
24566
|
+
};
|
|
24567
|
+
function getContextSlow(context) {
|
|
24568
|
+
return {
|
|
24569
|
+
refs: context.refs,
|
|
24570
|
+
size: context.size,
|
|
24571
|
+
arrowRef: context.arrowRef,
|
|
24572
|
+
arrowStyle: context.arrowStyle,
|
|
24573
|
+
onArrowSize: context.onArrowSize,
|
|
24574
|
+
hasFloating: context.hasFloating,
|
|
24575
|
+
strategy: context.strategy,
|
|
24576
|
+
update: context.update,
|
|
24577
|
+
context: context.context,
|
|
24578
|
+
getFloatingProps: context.getFloatingProps,
|
|
24579
|
+
getReferenceProps: context.getFloatingProps
|
|
24580
|
+
};
|
|
24581
|
+
}
|
|
24582
|
+
var checkFloating = {
|
|
24536
24583
|
name: "checkFloating",
|
|
24537
24584
|
fn(data) {
|
|
24538
24585
|
return {
|
|
@@ -24546,7 +24593,7 @@ var require_Popper_native = __commonJS({
|
|
|
24546
24593
|
Object.assign(setupOptions, options);
|
|
24547
24594
|
}
|
|
24548
24595
|
function Popper(props) {
|
|
24549
|
-
var _middlewareData_checkFloating, { children, size: size2, strategy = "absolute", placement = "bottom", stayInFrame, allowFlip, offset: offset2, disableRTL, resize, passThrough, open,
|
|
24596
|
+
var _middlewareData_checkFloating, { children, size: size2, strategy = "absolute", placement = "bottom", stayInFrame, allowFlip, offset: offset2, disableRTL, resize, passThrough, open, scope } = props, [arrowEl, setArrow] = React4.useState(null), [arrowSize, setArrowSize] = React4.useState(0), offsetOptions = offset2 ?? arrowSize, floatingStyle = React4.useRef({}), floating = (0, import_floating.useFloating)({
|
|
24550
24597
|
open: passThrough ? !1 : open || !0,
|
|
24551
24598
|
strategy,
|
|
24552
24599
|
placement,
|
|
@@ -24595,31 +24642,39 @@ var require_Popper_native = __commonJS({
|
|
|
24595
24642
|
arrowRef: setArrow,
|
|
24596
24643
|
arrowStyle: middlewareData.arrow,
|
|
24597
24644
|
onArrowSize: setArrowSize,
|
|
24598
|
-
scope: __scopePopper,
|
|
24599
24645
|
hasFloating: (_middlewareData_checkFloating = middlewareData.checkFloating) === null || _middlewareData_checkFloating === void 0 ? void 0 : _middlewareData_checkFloating.hasFloating,
|
|
24600
24646
|
...floating
|
|
24601
24647
|
};
|
|
24602
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
24603
|
-
|
|
24604
|
-
|
|
24605
|
-
|
|
24606
|
-
children
|
|
24607
|
-
})
|
|
24648
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperProvider, {
|
|
24649
|
+
scope,
|
|
24650
|
+
...popperContext,
|
|
24651
|
+
children
|
|
24608
24652
|
});
|
|
24609
24653
|
}
|
|
24610
24654
|
var PopperAnchor = import_stacks3.YStack.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24611
|
-
var { virtualRef,
|
|
24655
|
+
var { virtualRef, scope, ...anchorProps } = props, context = usePopperContextSlow(scope), { getReferenceProps, refs, update } = context, ref = React4.useRef(null);
|
|
24612
24656
|
React4.useEffect(function() {
|
|
24613
24657
|
virtualRef && refs.setReference(virtualRef.current);
|
|
24614
24658
|
}, [
|
|
24615
24659
|
virtualRef
|
|
24616
24660
|
]);
|
|
24617
|
-
var stackProps =
|
|
24618
|
-
ref: composedRefs,
|
|
24619
|
-
...anchorProps
|
|
24620
|
-
};
|
|
24661
|
+
var stackProps = anchorProps, refProps = getReferenceProps ? getReferenceProps(stackProps) : null, composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref);
|
|
24621
24662
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
24622
|
-
...
|
|
24663
|
+
...refProps,
|
|
24664
|
+
ref: composedRefs,
|
|
24665
|
+
// this helps us with handling scoped poppers with many different targets
|
|
24666
|
+
// basically we wait for mouseEnter to ever set a reference and remove it on leave
|
|
24667
|
+
// otherwise floating ui gets confused by having >1 reference
|
|
24668
|
+
onMouseEnter: function(e) {
|
|
24669
|
+
ref.current instanceof HTMLElement && (refs.setReference(ref.current), setTimeout(function() {
|
|
24670
|
+
var _refProps_onPointerEnter;
|
|
24671
|
+
(_refProps_onPointerEnter = refProps.onPointerEnter) === null || _refProps_onPointerEnter === void 0 || _refProps_onPointerEnter.call(refProps, e), update();
|
|
24672
|
+
}));
|
|
24673
|
+
},
|
|
24674
|
+
onMouseLeave: function(e) {
|
|
24675
|
+
var _refProps_onMouseLeave;
|
|
24676
|
+
refProps == null || (_refProps_onMouseLeave = refProps.onMouseLeave) === null || _refProps_onMouseLeave === void 0 || _refProps_onMouseLeave.call(refProps, e);
|
|
24677
|
+
}
|
|
24623
24678
|
});
|
|
24624
24679
|
})), PopperContentFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
|
|
24625
24680
|
name: "PopperContent",
|
|
@@ -24646,7 +24701,7 @@ var require_Popper_native = __commonJS({
|
|
|
24646
24701
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
24647
24702
|
}
|
|
24648
24703
|
}), PopperContent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24649
|
-
var {
|
|
24704
|
+
var { scope, enableAnimationForPositionChange, children, passThrough, ...rest } = props, { strategy, placement, refs, x, y, getFloatingProps, size: size2 } = usePopperContext(scope), contentRefs = (0, import_compose_refs.useComposedRefs)(refs.setFloating, forwardedRef), [needsMeasure, setNeedsMeasure] = React4.useState(enableAnimationForPositionChange);
|
|
24650
24705
|
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
24651
24706
|
needsMeasure && x && y && setNeedsMeasure(!1);
|
|
24652
24707
|
}, [
|
|
@@ -24664,9 +24719,9 @@ var require_Popper_native = __commonJS({
|
|
|
24664
24719
|
position: strategy,
|
|
24665
24720
|
opacity: 1,
|
|
24666
24721
|
...enableAnimationForPositionChange && {
|
|
24667
|
-
// apply animation but disable it on initial render to avoid animating from 0 to the first position
|
|
24668
24722
|
animation: rest.animation,
|
|
24669
24723
|
animateOnly: needsMeasure ? [] : rest.animateOnly,
|
|
24724
|
+
// apply animation but disable it on initial render to avoid animating from 0 to the first position
|
|
24670
24725
|
animatePresence: !1
|
|
24671
24726
|
},
|
|
24672
24727
|
...hide2 && {
|
|
@@ -24674,7 +24729,7 @@ var require_Popper_native = __commonJS({
|
|
|
24674
24729
|
animateOnly: []
|
|
24675
24730
|
}
|
|
24676
24731
|
}, { style, ...floatingProps } = getFloatingProps ? getFloatingProps(frameProps) : frameProps;
|
|
24677
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.
|
|
24732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
24678
24733
|
passThrough,
|
|
24679
24734
|
ref: contentRefs,
|
|
24680
24735
|
...passThrough ? null : floatingProps,
|
|
@@ -24727,8 +24782,8 @@ var require_Popper_native = __commonJS({
|
|
|
24727
24782
|
right: "left",
|
|
24728
24783
|
bottom: "top",
|
|
24729
24784
|
left: "right"
|
|
24730
|
-
}, PopperArrow =
|
|
24731
|
-
var _context_arrowStyle, _context_arrowStyle1, {
|
|
24785
|
+
}, PopperArrow = /* @__PURE__ */ React4.forwardRef(function(propsIn, forwardedRef) {
|
|
24786
|
+
var _context_arrowStyle, _context_arrowStyle1, { scope, ...rest } = propsIn, props = (0, import_core12.useProps)(rest), { offset: offset2, size: sizeProp, borderWidth = 0, ...arrowProps } = props, context = usePopperContext(scope), sizeVal = typeof sizeProp == "number" ? sizeProp : (0, import_core12.getVariableValue)((0, import_get_token2.getSpace)(sizeProp ?? context.size, {
|
|
24732
24787
|
shift: -2,
|
|
24733
24788
|
bounds: [
|
|
24734
24789
|
2
|
|
@@ -24958,8 +25013,12 @@ var require_Popover_native = __commonJS({
|
|
|
24958
25013
|
}
|
|
24959
25014
|
});
|
|
24960
25015
|
module2.exports = __toCommonJS2(Popover_exports);
|
|
24961
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_polyfill_dev = require_polyfill_dev(), import_adapt = require_index_native31(), import_animate = require_index_native57(), import_animate_presence = require_index_native4(), import_aria_hidden =
|
|
24962
|
-
|
|
25016
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_polyfill_dev = require_polyfill_dev(), import_adapt = require_index_native31(), import_animate = require_index_native57(), import_animate_presence = require_index_native4(), import_aria_hidden = require_index_native32(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native20(), import_floating = require_index_native58(), import_focus_scope = require_index_native35(), import_helpers = require_index_native7(), import_popper = require_index_native59(), import_portal2 = require_index_native30(), import_remove_scroll = require_index_native36(), import_scroll_view = require_index_native37(), import_sheet = require_index_native38(), import_stacks3 = require_index_native24(), import_use_controllable_state = require_index_native10(), import_z_index_stack2 = require_index_native29(), React4 = __toESM2(require("react")), import_useFloatingContext = require_useFloatingContext_native(), needsRepropagation = import_constants4.isAndroid || import_constants4.isIos && !import_portal2.USE_NATIVE_PORTAL, PopoverContext = (0, import_core12.createStyledContext)(
|
|
25017
|
+
// since we always provide this we can avoid setting here
|
|
25018
|
+
{},
|
|
25019
|
+
"Popover__"
|
|
25020
|
+
), usePopoverContext = PopoverContext.useStyledContext, PopoverAnchor = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
25021
|
+
var { scope, ...rest } = props, context = usePopoverContext(scope), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
|
|
24963
25022
|
return React4.useEffect(function() {
|
|
24964
25023
|
return onCustomAnchorAdd(), function() {
|
|
24965
25024
|
return onCustomAnchorRemove();
|
|
@@ -24968,12 +25027,12 @@ var require_Popover_native = __commonJS({
|
|
|
24968
25027
|
onCustomAnchorAdd,
|
|
24969
25028
|
onCustomAnchorRemove
|
|
24970
25029
|
]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperAnchor, {
|
|
24971
|
-
|
|
25030
|
+
scope,
|
|
24972
25031
|
...rest,
|
|
24973
25032
|
ref: forwardedRef
|
|
24974
25033
|
});
|
|
24975
25034
|
}), PopoverTrigger = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24976
|
-
var {
|
|
25035
|
+
var { scope, ...rest } = props, context = usePopoverContext(scope), anchorTo = context.anchorTo, composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
24977
25036
|
if (!props.children) return null;
|
|
24978
25037
|
var trigger = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
24979
25038
|
"aria-expanded": context.open,
|
|
@@ -25012,12 +25071,14 @@ var require_Popover_native = __commonJS({
|
|
|
25012
25071
|
...virtualRef && {
|
|
25013
25072
|
virtualRef
|
|
25014
25073
|
},
|
|
25015
|
-
|
|
25074
|
+
scope,
|
|
25016
25075
|
asChild: rest.asChild,
|
|
25017
25076
|
children: trigger
|
|
25018
25077
|
});
|
|
25019
|
-
}),
|
|
25020
|
-
|
|
25078
|
+
}), PopoverContentFrame = (0, import_core12.styled)(import_popper.PopperContentFrame, {
|
|
25079
|
+
name: "Popover"
|
|
25080
|
+
}), PopoverContent = PopoverContentFrame.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
25081
|
+
var { trapFocus, enableRemoveScroll = !1, zIndex, scope, ...contentImplProps } = props, context = usePopoverContext(scope), contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isRightClickOutsideRef = React4.useRef(!1), [isFullyHidden, setIsFullyHidden] = React4.useState(!context.open);
|
|
25021
25082
|
if (context.open && isFullyHidden && setIsFullyHidden(!1), React4.useEffect(function() {
|
|
25022
25083
|
if (context.open) {
|
|
25023
25084
|
var content = contentRef.current;
|
|
@@ -25029,17 +25090,18 @@ var require_Popover_native = __commonJS({
|
|
|
25029
25090
|
var _contentImplProps_pointerEvents;
|
|
25030
25091
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverPortal, {
|
|
25031
25092
|
passThrough: context.breakpointActive,
|
|
25032
|
-
|
|
25093
|
+
context,
|
|
25033
25094
|
zIndex,
|
|
25034
25095
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Stack, {
|
|
25035
25096
|
passThrough: context.breakpointActive,
|
|
25036
25097
|
pointerEvents: context.open ? (_contentImplProps_pointerEvents = contentImplProps.pointerEvents) !== null && _contentImplProps_pointerEvents !== void 0 ? _contentImplProps_pointerEvents : "auto" : "none",
|
|
25037
25098
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContentImpl, {
|
|
25038
25099
|
...contentImplProps,
|
|
25100
|
+
context,
|
|
25039
25101
|
enableRemoveScroll,
|
|
25040
25102
|
ref: composedRefs,
|
|
25041
25103
|
setIsFullyHidden,
|
|
25042
|
-
|
|
25104
|
+
scope,
|
|
25043
25105
|
// we make sure we're not trapping once it's been closed
|
|
25044
25106
|
// (closed !== unmounted when animating out)
|
|
25045
25107
|
trapFocus: trapFocus ?? context.open,
|
|
@@ -25065,7 +25127,7 @@ var require_Popover_native = __commonJS({
|
|
|
25065
25127
|
})
|
|
25066
25128
|
});
|
|
25067
25129
|
})), useParentContexts = function(scope) {
|
|
25068
|
-
var popperContext = (0, import_popper.usePopperContext)(scope
|
|
25130
|
+
var context = usePopoverContext(scope), popperContext = (0, import_popper.usePopperContext)(scope), adaptContext = (0, import_adapt.useAdaptContext)(context.adaptScope);
|
|
25069
25131
|
return {
|
|
25070
25132
|
popperContext,
|
|
25071
25133
|
adaptContext,
|
|
@@ -25073,9 +25135,9 @@ var require_Popover_native = __commonJS({
|
|
|
25073
25135
|
};
|
|
25074
25136
|
};
|
|
25075
25137
|
function RepropagateParentContexts(param) {
|
|
25076
|
-
var { adaptContext, children, context, popperContext
|
|
25077
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.
|
|
25078
|
-
scope,
|
|
25138
|
+
var { adaptContext, children, context, popperContext } = param;
|
|
25139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperProvider, {
|
|
25140
|
+
scope: context.popoverScope,
|
|
25079
25141
|
...popperContext,
|
|
25080
25142
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
|
|
25081
25143
|
...context,
|
|
@@ -25087,40 +25149,40 @@ var require_Popover_native = __commonJS({
|
|
|
25087
25149
|
});
|
|
25088
25150
|
}
|
|
25089
25151
|
var PortalAdaptSafe = function(param) {
|
|
25090
|
-
var { children,
|
|
25152
|
+
var { children, context } = param;
|
|
25091
25153
|
if (needsRepropagation) {
|
|
25092
|
-
var
|
|
25154
|
+
var parentContexts = useParentContexts(context.popoverScope);
|
|
25093
25155
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
25156
|
+
scope: context.adaptScope,
|
|
25094
25157
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RepropagateParentContexts, {
|
|
25095
|
-
scope,
|
|
25096
25158
|
...parentContexts,
|
|
25097
25159
|
children
|
|
25098
25160
|
})
|
|
25099
25161
|
});
|
|
25100
25162
|
}
|
|
25101
25163
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
25164
|
+
scope: context.adaptScope,
|
|
25102
25165
|
children
|
|
25103
25166
|
});
|
|
25104
25167
|
};
|
|
25105
|
-
function PopoverPortal(
|
|
25106
|
-
var
|
|
25168
|
+
function PopoverPortal(param) {
|
|
25169
|
+
var { context, zIndex, passThrough, children } = param, themeName = (0, import_core12.useThemeName)(), content = children;
|
|
25107
25170
|
if (needsRepropagation) {
|
|
25108
|
-
var parentContexts = useParentContexts(
|
|
25171
|
+
var parentContexts = useParentContexts(context.popoverScope);
|
|
25109
25172
|
content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RepropagateParentContexts, {
|
|
25110
|
-
scope,
|
|
25111
25173
|
...parentContexts,
|
|
25112
25174
|
children: content
|
|
25113
25175
|
});
|
|
25114
25176
|
}
|
|
25115
25177
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
|
|
25116
|
-
passThrough
|
|
25178
|
+
passThrough,
|
|
25117
25179
|
stackZIndex: !0,
|
|
25118
25180
|
zIndex,
|
|
25119
25181
|
children: (
|
|
25120
25182
|
/* forceClassName avoids forced re-mount renders for some reason... see the HeadMenu as you change tints a few times */
|
|
25121
25183
|
/* without this you'll see the site menu re-rendering. It must be something in wrapping children in Theme */
|
|
25122
25184
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
25123
|
-
passThrough
|
|
25185
|
+
passThrough,
|
|
25124
25186
|
contain: !0,
|
|
25125
25187
|
forceClassName: !0,
|
|
25126
25188
|
name: themeName,
|
|
@@ -25133,7 +25195,7 @@ var require_Popover_native = __commonJS({
|
|
|
25133
25195
|
});
|
|
25134
25196
|
}
|
|
25135
25197
|
var PopoverContentImpl = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
25136
|
-
var { trapFocus,
|
|
25198
|
+
var { trapFocus, scope, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, disableFocusScope, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, children, enableRemoveScroll, freezeContentsWhenHidden, setIsFullyHidden, lazyMount, context, ...contentProps } = props, { open, keepChildrenMounted } = context, handleExitComplete = React4.useCallback(function() {
|
|
25137
25199
|
setIsFullyHidden == null || setIsFullyHidden(!0);
|
|
25138
25200
|
}, [
|
|
25139
25201
|
setIsFullyHidden
|
|
@@ -25149,19 +25211,20 @@ var require_Popover_native = __commonJS({
|
|
|
25149
25211
|
lazyMount,
|
|
25150
25212
|
passThrough: context.breakpointActive,
|
|
25151
25213
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContent, {
|
|
25152
|
-
|
|
25214
|
+
scope,
|
|
25153
25215
|
"data-state": getState(open),
|
|
25154
25216
|
id: context.contentId,
|
|
25155
25217
|
ref: forwardedRef,
|
|
25156
25218
|
passThrough: context.breakpointActive,
|
|
25157
25219
|
...contentProps,
|
|
25158
25220
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalAdaptSafe, {
|
|
25221
|
+
context,
|
|
25159
25222
|
children: contents
|
|
25160
25223
|
})
|
|
25161
25224
|
}, context.contentId)
|
|
25162
25225
|
});
|
|
25163
25226
|
}), PopoverClose = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
25164
|
-
var {
|
|
25227
|
+
var { scope, ...rest } = props, context = usePopoverContext(scope);
|
|
25165
25228
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, {
|
|
25166
25229
|
...rest,
|
|
25167
25230
|
ref: forwardedRef,
|
|
@@ -25171,16 +25234,16 @@ var require_Popover_native = __commonJS({
|
|
|
25171
25234
|
return context == null || (_context_onOpenChange = context.onOpenChange) === null || _context_onOpenChange === void 0 ? void 0 : _context_onOpenChange.call(context, !1, "press");
|
|
25172
25235
|
})
|
|
25173
25236
|
});
|
|
25174
|
-
}), PopoverArrow = import_popper.
|
|
25175
|
-
var {
|
|
25237
|
+
}), PopoverArrow = import_popper.PopperArrowFrame.styleable(function(props, forwardedRef) {
|
|
25238
|
+
var { scope, ...rest } = props, context = usePopoverContext(scope), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
|
|
25176
25239
|
return isAdapted ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperArrow, {
|
|
25177
|
-
|
|
25240
|
+
scope,
|
|
25178
25241
|
componentName: "PopoverArrow",
|
|
25179
25242
|
...rest,
|
|
25180
25243
|
ref: forwardedRef
|
|
25181
25244
|
});
|
|
25182
|
-
}), PopoverScrollView = /* @__PURE__ */ React4.forwardRef(function(
|
|
25183
|
-
var context = usePopoverContext(
|
|
25245
|
+
}), PopoverScrollView = /* @__PURE__ */ React4.forwardRef(function(param, ref) {
|
|
25246
|
+
var { scope, ...props } = param, context = usePopoverContext(scope);
|
|
25184
25247
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_scroll_view.ScrollView, {
|
|
25185
25248
|
ref,
|
|
25186
25249
|
// when adapted, no pointer events!
|
|
@@ -25189,14 +25252,16 @@ var require_Popover_native = __commonJS({
|
|
|
25189
25252
|
passThrough: context.breakpointActive,
|
|
25190
25253
|
...props
|
|
25191
25254
|
});
|
|
25192
|
-
}), Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(
|
|
25193
|
-
var id = React4.useId()
|
|
25255
|
+
}), DEFAULT_SCOPE = "", Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(param, ref) {
|
|
25256
|
+
var { scope = DEFAULT_SCOPE, ...props } = param, id = React4.useId(), adaptScope = `PopoverAdapt${scope}`;
|
|
25194
25257
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
|
|
25195
|
-
scope:
|
|
25258
|
+
scope: adaptScope,
|
|
25196
25259
|
portal: !0,
|
|
25197
25260
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverInner, {
|
|
25261
|
+
adaptScope,
|
|
25198
25262
|
ref,
|
|
25199
25263
|
id,
|
|
25264
|
+
scope,
|
|
25200
25265
|
...props
|
|
25201
25266
|
})
|
|
25202
25267
|
});
|
|
@@ -25211,7 +25276,7 @@ var require_Popover_native = __commonJS({
|
|
|
25211
25276
|
Sheet: import_sheet.Sheet.Controlled,
|
|
25212
25277
|
FocusScope: import_focus_scope.FocusScopeController
|
|
25213
25278
|
}), PopoverInner = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
25214
|
-
var { children, open: openProp, defaultOpen, onOpenChange,
|
|
25279
|
+
var { children, open: openProp, defaultOpen, onOpenChange, scope = DEFAULT_SCOPE, keepChildrenMounted: keepChildrenMountedProp, hoverable, disableFocus, id, adaptScope, ...restProps } = props, triggerRef = React4.useRef(null), [hasCustomAnchor, setHasCustomAnchor] = React4.useState(!1), viaRef = React4.useRef(void 0), [keepChildrenMounted] = (0, import_use_controllable_state.useControllableState)({
|
|
25215
25280
|
prop: keepChildrenMountedProp,
|
|
25216
25281
|
defaultProp: !1,
|
|
25217
25282
|
transition: keepChildrenMountedProp === "lazy"
|
|
@@ -25223,7 +25288,7 @@ var require_Popover_native = __commonJS({
|
|
|
25223
25288
|
}
|
|
25224
25289
|
}), handleOpenChange = (0, import_core12.useEvent)(function(val, via) {
|
|
25225
25290
|
viaRef.current = via, setOpen(val);
|
|
25226
|
-
}), isAdapted = (0, import_adapt.useAdaptIsActive)(), floatingContext = (0, import_useFloatingContext.useFloatingContext)({
|
|
25291
|
+
}), isAdapted = (0, import_adapt.useAdaptIsActive)(adaptScope), floatingContext = (0, import_useFloatingContext.useFloatingContext)({
|
|
25227
25292
|
open,
|
|
25228
25293
|
setOpen: handleOpenChange,
|
|
25229
25294
|
disable: isAdapted,
|
|
@@ -25248,6 +25313,8 @@ var require_Popover_native = __commonJS({
|
|
|
25248
25313
|
};
|
|
25249
25314
|
});
|
|
25250
25315
|
var popoverContext = {
|
|
25316
|
+
popoverScope: scope,
|
|
25317
|
+
adaptScope,
|
|
25251
25318
|
id,
|
|
25252
25319
|
contentId: React4.useId(),
|
|
25253
25320
|
triggerRef,
|
|
@@ -25268,22 +25335,23 @@ var require_Popover_native = __commonJS({
|
|
|
25268
25335
|
keepChildrenMounted
|
|
25269
25336
|
}, memoizedChildren = React4.useMemo(function() {
|
|
25270
25337
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
|
|
25271
|
-
scope
|
|
25338
|
+
scope,
|
|
25272
25339
|
...popoverContext,
|
|
25273
25340
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverSheetController, {
|
|
25341
|
+
context: popoverContext,
|
|
25274
25342
|
onOpenChange: setOpen,
|
|
25275
25343
|
children
|
|
25276
25344
|
})
|
|
25277
25345
|
});
|
|
25278
25346
|
}, [
|
|
25279
|
-
|
|
25347
|
+
scope,
|
|
25280
25348
|
setOpen,
|
|
25281
25349
|
children,
|
|
25282
25350
|
...Object.values(popoverContext)
|
|
25283
25351
|
]), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.Popper, {
|
|
25284
25352
|
open,
|
|
25285
25353
|
passThrough: isAdapted,
|
|
25286
|
-
|
|
25354
|
+
scope,
|
|
25287
25355
|
stayInFrame: !0,
|
|
25288
25356
|
...restProps,
|
|
25289
25357
|
children: memoizedChildren
|
|
@@ -25299,7 +25367,7 @@ var require_Popover_native = __commonJS({
|
|
|
25299
25367
|
return open ? "open" : "closed";
|
|
25300
25368
|
}
|
|
25301
25369
|
var PopoverSheetController = function(param) {
|
|
25302
|
-
var {
|
|
25370
|
+
var { context, ...props } = param, showSheet = useShowPopoverSheet(context), breakpointActive = context.breakpointActive, getShowSheet = (0, import_core12.useGet)(showSheet);
|
|
25303
25371
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_sheet.SheetController, {
|
|
25304
25372
|
onOpenChange: function(val) {
|
|
25305
25373
|
if (getShowSheet()) {
|
|
@@ -25312,7 +25380,7 @@ var require_Popover_native = __commonJS({
|
|
|
25312
25380
|
children: props.children
|
|
25313
25381
|
});
|
|
25314
25382
|
}, useShowPopoverSheet = function(context) {
|
|
25315
|
-
var isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
25383
|
+
var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
|
|
25316
25384
|
return context.open === !1 ? !1 : isAdapted;
|
|
25317
25385
|
};
|
|
25318
25386
|
}
|
|
@@ -25425,7 +25493,7 @@ var require_Progress_native = __commonJS({
|
|
|
25425
25493
|
}
|
|
25426
25494
|
});
|
|
25427
25495
|
module2.exports = __toCommonJS2(Progress_exports);
|
|
25428
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context =
|
|
25496
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context = require_index_native33(), import_get_token2 = require_index_native22(), import_helpers = require_index_native7(), import_stacks3 = require_index_native24(), React4 = __toESM2(require("react")), PROGRESS_NAME = "Progress", [createProgressContext, createProgressScope] = (0, import_create_context.createContextScope)(PROGRESS_NAME), [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME), INDICATOR_NAME = "ProgressIndicator", ProgressIndicatorFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
|
|
25429
25497
|
name: INDICATOR_NAME,
|
|
25430
25498
|
variants: {
|
|
25431
25499
|
unstyled: {
|
|
@@ -26403,7 +26471,7 @@ var require_RadioGroupStyledContext_native = __commonJS({
|
|
|
26403
26471
|
var import_core12 = require_index_native20(), RadioGroupStyledContext = (0, import_core12.createStyledContext)({
|
|
26404
26472
|
size: "$true",
|
|
26405
26473
|
scaleIcon: 1
|
|
26406
|
-
});
|
|
26474
|
+
}, "RadioGroup");
|
|
26407
26475
|
}
|
|
26408
26476
|
});
|
|
26409
26477
|
|
|
@@ -26690,71 +26758,6 @@ var require_index_native66 = __commonJS({
|
|
|
26690
26758
|
}
|
|
26691
26759
|
});
|
|
26692
26760
|
|
|
26693
|
-
// ../select/dist/cjs/constants.native.js
|
|
26694
|
-
var require_constants_native5 = __commonJS({
|
|
26695
|
-
"../select/dist/cjs/constants.native.js"(exports2, module2) {
|
|
26696
|
-
"use strict";
|
|
26697
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
26698
|
-
for (var name in all) __defProp2(target, name, {
|
|
26699
|
-
get: all[name],
|
|
26700
|
-
enumerable: !0
|
|
26701
|
-
});
|
|
26702
|
-
}, __copyProps2 = function(to, from, except, desc) {
|
|
26703
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
26704
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
26705
|
-
for (var _loop = function() {
|
|
26706
|
-
var key = _step.value;
|
|
26707
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
26708
|
-
get: function() {
|
|
26709
|
-
return from[key];
|
|
26710
|
-
},
|
|
26711
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
26712
|
-
});
|
|
26713
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
26714
|
-
} catch (err) {
|
|
26715
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
26716
|
-
} finally {
|
|
26717
|
-
try {
|
|
26718
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
26719
|
-
} finally {
|
|
26720
|
-
if (_didIteratorError)
|
|
26721
|
-
throw _iteratorError;
|
|
26722
|
-
}
|
|
26723
|
-
}
|
|
26724
|
-
return to;
|
|
26725
|
-
}, __toCommonJS2 = function(mod) {
|
|
26726
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
26727
|
-
value: !0
|
|
26728
|
-
}), mod);
|
|
26729
|
-
}, constants_exports = {};
|
|
26730
|
-
__export2(constants_exports, {
|
|
26731
|
-
FALLBACK_THRESHOLD: function() {
|
|
26732
|
-
return FALLBACK_THRESHOLD;
|
|
26733
|
-
},
|
|
26734
|
-
MIN_HEIGHT: function() {
|
|
26735
|
-
return MIN_HEIGHT;
|
|
26736
|
-
},
|
|
26737
|
-
SCROLL_ARROW_THRESHOLD: function() {
|
|
26738
|
-
return SCROLL_ARROW_THRESHOLD;
|
|
26739
|
-
},
|
|
26740
|
-
SCROLL_ARROW_VELOCITY: function() {
|
|
26741
|
-
return SCROLL_ARROW_VELOCITY;
|
|
26742
|
-
},
|
|
26743
|
-
SELECT_NAME: function() {
|
|
26744
|
-
return SELECT_NAME;
|
|
26745
|
-
},
|
|
26746
|
-
VIEWPORT_NAME: function() {
|
|
26747
|
-
return VIEWPORT_NAME;
|
|
26748
|
-
},
|
|
26749
|
-
WINDOW_PADDING: function() {
|
|
26750
|
-
return WINDOW_PADDING;
|
|
26751
|
-
}
|
|
26752
|
-
});
|
|
26753
|
-
module2.exports = __toCommonJS2(constants_exports);
|
|
26754
|
-
var SELECT_NAME = "Select", WINDOW_PADDING = 8, SCROLL_ARROW_VELOCITY = 8, SCROLL_ARROW_THRESHOLD = 8, MIN_HEIGHT = 80, FALLBACK_THRESHOLD = 16, VIEWPORT_NAME = "SelectViewport";
|
|
26755
|
-
}
|
|
26756
|
-
});
|
|
26757
|
-
|
|
26758
26761
|
// ../select/dist/cjs/context.native.js
|
|
26759
26762
|
var require_context_native2 = __commonJS({
|
|
26760
26763
|
"../select/dist/cjs/context.native.js"(exports2, module2) {
|
|
@@ -26802,18 +26805,6 @@ var require_context_native2 = __commonJS({
|
|
|
26802
26805
|
SelectProvider: function() {
|
|
26803
26806
|
return SelectProvider;
|
|
26804
26807
|
},
|
|
26805
|
-
createSelectContext: function() {
|
|
26806
|
-
return createSelectContext;
|
|
26807
|
-
},
|
|
26808
|
-
createSelectItemParentContext: function() {
|
|
26809
|
-
return createSelectItemParentContext;
|
|
26810
|
-
},
|
|
26811
|
-
createSelectItemParentScope: function() {
|
|
26812
|
-
return createSelectItemParentScope;
|
|
26813
|
-
},
|
|
26814
|
-
createSelectScope: function() {
|
|
26815
|
-
return createSelectScope;
|
|
26816
|
-
},
|
|
26817
26808
|
useSelectContext: function() {
|
|
26818
26809
|
return useSelectContext;
|
|
26819
26810
|
},
|
|
@@ -26822,14 +26813,14 @@ var require_context_native2 = __commonJS({
|
|
|
26822
26813
|
}
|
|
26823
26814
|
});
|
|
26824
26815
|
module2.exports = __toCommonJS2(context_exports);
|
|
26825
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"),
|
|
26826
|
-
var {
|
|
26816
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), { Provider: SelectProvider, useStyledContext: useSelectContext } = (0, import_core12.createStyledContext)(null, "Select"), { Provider: SelectItemParentProvider, useStyledContext: useSelectItemParentContext } = (0, import_core12.createStyledContext)(null, "SelectItem"), ForwardSelectContext = function(param) {
|
|
26817
|
+
var { context, itemContext, children } = param;
|
|
26827
26818
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectProvider, {
|
|
26828
26819
|
isInSheet: !0,
|
|
26829
|
-
scope:
|
|
26820
|
+
scope: context.scopeName,
|
|
26830
26821
|
...context,
|
|
26831
26822
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemParentProvider, {
|
|
26832
|
-
scope:
|
|
26823
|
+
scope: context.scopeName,
|
|
26833
26824
|
...itemContext,
|
|
26834
26825
|
children
|
|
26835
26826
|
})
|
|
@@ -27000,13 +26991,13 @@ var require_SelectItem_native = __commonJS({
|
|
|
27000
26991
|
}
|
|
27001
26992
|
});
|
|
27002
26993
|
module2.exports = __toCommonJS2(SelectItem_exports);
|
|
27003
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_list_item = require_index_native56(), React4 = __toESM2(require("react")), import_context = require_context_native2(), ITEM_NAME = "SelectItem",
|
|
27004
|
-
var {
|
|
26994
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_list_item = require_index_native56(), import_core12 = require_index_native20(), React4 = __toESM2(require("react")), import_context = require_context_native2(), ITEM_NAME = "SelectItem", { Provider: SelectItemContextProvider, useStyledContext: useSelectItemContext } = (0, import_core12.createStyledContext)(null, ITEM_NAME), SelectItem = import_list_item.ListItemFrame.styleable(function(props, forwardedRef) {
|
|
26995
|
+
var { scope, value, disabled = !1, textValue: textValueProp, index, ...restProps } = props, { props: listItemProps } = (0, import_list_item.useListItem)({
|
|
27005
26996
|
...!props.unstyled && {
|
|
27006
26997
|
ellipse: !0
|
|
27007
26998
|
},
|
|
27008
26999
|
...restProps
|
|
27009
|
-
}), context = (0, import_context.useSelectItemParentContext)(
|
|
27000
|
+
}), context = (0, import_context.useSelectItemParentContext)(scope), { setSelectedIndex, listRef, setOpen, onChange, activeIndexSubscribe, valueSubscribe, allowMouseUpRef, allowSelectRef, setValueAtIndex, selectTimeoutRef, dataRef, interactions, shouldRenderWebNative, size: size2, onActiveChange, initialValue } = context, [isSelected, setSelected] = React4.useState(initialValue === value);
|
|
27010
27001
|
React4.useEffect(function() {
|
|
27011
27002
|
return activeIndexSubscribe(function(i) {
|
|
27012
27003
|
var isActive = index === i;
|
|
@@ -27063,7 +27054,7 @@ var require_SelectItem_native = __commonJS({
|
|
|
27063
27054
|
handleSelect
|
|
27064
27055
|
]);
|
|
27065
27056
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemContextProvider, {
|
|
27066
|
-
scope
|
|
27057
|
+
scope,
|
|
27067
27058
|
value,
|
|
27068
27059
|
textId: textId || "",
|
|
27069
27060
|
isSelected,
|
|
@@ -27180,16 +27171,16 @@ var require_SelectItemText_native = __commonJS({
|
|
|
27180
27171
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
27181
27172
|
}
|
|
27182
27173
|
}), SelectItemText = SelectItemTextFrame.styleable(function(props, forwardedRef) {
|
|
27183
|
-
var {
|
|
27174
|
+
var { scope, className, ...itemTextProps } = props, context = (0, import_context.useSelectContext)(scope), itemParentContext = (0, import_context.useSelectItemParentContext)(scope), ref = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), itemContext = (0, import_SelectItem.useSelectItemContext)(scope), contents = React4.useRef(null);
|
|
27184
27175
|
return contents.current = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemTextFrame, {
|
|
27185
27176
|
className,
|
|
27186
27177
|
size: itemParentContext.size,
|
|
27187
27178
|
id: itemContext.textId,
|
|
27188
27179
|
...itemTextProps,
|
|
27189
27180
|
ref: composedRefs
|
|
27190
|
-
}),
|
|
27181
|
+
}), (0, import_core12.useIsomorphicLayoutEffect)(function() {
|
|
27191
27182
|
itemParentContext.initialValue === itemContext.value && !context.selectedIndex && context.setSelectedItem(contents.current);
|
|
27192
|
-
}, []),
|
|
27183
|
+
}, []), (0, import_core12.useIsomorphicLayoutEffect)(function() {
|
|
27193
27184
|
return itemParentContext.valueSubscribe(function(val) {
|
|
27194
27185
|
val === itemContext.value && context.setSelectedItem(contents.current);
|
|
27195
27186
|
});
|
|
@@ -27314,7 +27305,7 @@ var require_SelectTrigger_native = __commonJS({
|
|
|
27314
27305
|
});
|
|
27315
27306
|
module2.exports = __toCommonJS2(SelectTrigger_exports);
|
|
27316
27307
|
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_core12 = require_index_native20(), import_list_item = require_index_native56(), React4 = __toESM2(require("react")), import_context = require_context_native2(), TRIGGER_NAME = "SelectTrigger", isPointerCoarse = import_core12.isWeb && import_core12.isClient ? window.matchMedia("(pointer:coarse)").matches : !0, SelectTrigger = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
27317
|
-
var _context_floatingContext, {
|
|
27308
|
+
var _context_floatingContext, { scope, disabled = !1, unstyled = !1, ...triggerProps } = props, context = (0, import_context.useSelectContext)(scope), itemParentContext = (0, import_context.useSelectItemParentContext)(scope), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, (_context_floatingContext = context.floatingContext) === null || _context_floatingContext === void 0 ? void 0 : _context_floatingContext.refs.setReference);
|
|
27318
27309
|
return itemParentContext.shouldRenderWebNative ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_list_item.ListItem, {
|
|
27319
27310
|
componentName: TRIGGER_NAME,
|
|
27320
27311
|
unstyled,
|
|
@@ -27351,6 +27342,71 @@ var require_SelectTrigger_native = __commonJS({
|
|
|
27351
27342
|
}
|
|
27352
27343
|
});
|
|
27353
27344
|
|
|
27345
|
+
// ../select/dist/cjs/constants.native.js
|
|
27346
|
+
var require_constants_native5 = __commonJS({
|
|
27347
|
+
"../select/dist/cjs/constants.native.js"(exports2, module2) {
|
|
27348
|
+
"use strict";
|
|
27349
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
27350
|
+
for (var name in all) __defProp2(target, name, {
|
|
27351
|
+
get: all[name],
|
|
27352
|
+
enumerable: !0
|
|
27353
|
+
});
|
|
27354
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
27355
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
27356
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
27357
|
+
for (var _loop = function() {
|
|
27358
|
+
var key = _step.value;
|
|
27359
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
27360
|
+
get: function() {
|
|
27361
|
+
return from[key];
|
|
27362
|
+
},
|
|
27363
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
27364
|
+
});
|
|
27365
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
27366
|
+
} catch (err) {
|
|
27367
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
27368
|
+
} finally {
|
|
27369
|
+
try {
|
|
27370
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
27371
|
+
} finally {
|
|
27372
|
+
if (_didIteratorError)
|
|
27373
|
+
throw _iteratorError;
|
|
27374
|
+
}
|
|
27375
|
+
}
|
|
27376
|
+
return to;
|
|
27377
|
+
}, __toCommonJS2 = function(mod) {
|
|
27378
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
27379
|
+
value: !0
|
|
27380
|
+
}), mod);
|
|
27381
|
+
}, constants_exports = {};
|
|
27382
|
+
__export2(constants_exports, {
|
|
27383
|
+
FALLBACK_THRESHOLD: function() {
|
|
27384
|
+
return FALLBACK_THRESHOLD;
|
|
27385
|
+
},
|
|
27386
|
+
MIN_HEIGHT: function() {
|
|
27387
|
+
return MIN_HEIGHT;
|
|
27388
|
+
},
|
|
27389
|
+
SCROLL_ARROW_THRESHOLD: function() {
|
|
27390
|
+
return SCROLL_ARROW_THRESHOLD;
|
|
27391
|
+
},
|
|
27392
|
+
SCROLL_ARROW_VELOCITY: function() {
|
|
27393
|
+
return SCROLL_ARROW_VELOCITY;
|
|
27394
|
+
},
|
|
27395
|
+
SELECT_NAME: function() {
|
|
27396
|
+
return SELECT_NAME;
|
|
27397
|
+
},
|
|
27398
|
+
VIEWPORT_NAME: function() {
|
|
27399
|
+
return VIEWPORT_NAME;
|
|
27400
|
+
},
|
|
27401
|
+
WINDOW_PADDING: function() {
|
|
27402
|
+
return WINDOW_PADDING;
|
|
27403
|
+
}
|
|
27404
|
+
});
|
|
27405
|
+
module2.exports = __toCommonJS2(constants_exports);
|
|
27406
|
+
var SELECT_NAME = "Select", WINDOW_PADDING = 8, SCROLL_ARROW_VELOCITY = 8, SCROLL_ARROW_THRESHOLD = 8, MIN_HEIGHT = 80, FALLBACK_THRESHOLD = 16, VIEWPORT_NAME = "SelectViewport";
|
|
27407
|
+
}
|
|
27408
|
+
});
|
|
27409
|
+
|
|
27354
27410
|
// ../select/dist/cjs/SelectViewport.native.js
|
|
27355
27411
|
var require_SelectViewport_native = __commonJS({
|
|
27356
27412
|
"../select/dist/cjs/SelectViewport.native.js"(exports2, module2) {
|
|
@@ -27395,12 +27451,12 @@ var require_SelectViewport_native = __commonJS({
|
|
|
27395
27451
|
});
|
|
27396
27452
|
module2.exports = __toCommonJS2(SelectViewport_native_exports);
|
|
27397
27453
|
var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native31(), import_core12 = require_index_native20(), import_constants4 = require_constants_native5(), import_context = require_context_native2(), SelectViewport = function(props) {
|
|
27398
|
-
var {
|
|
27454
|
+
var { scope, children } = props, context = (0, import_context.useSelectContext)(scope), itemParentContext = (0, import_context.useSelectItemParentContext)(scope), themeName = (0, import_core12.useThemeName)(), adaptContext = (0, import_adapt.useAdaptContext)();
|
|
27399
27455
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
27456
|
+
scope: context.adaptScope,
|
|
27400
27457
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
27401
27458
|
name: themeName,
|
|
27402
27459
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.ForwardSelectContext, {
|
|
27403
|
-
__scopeSelect,
|
|
27404
27460
|
itemContext: itemParentContext,
|
|
27405
27461
|
context,
|
|
27406
27462
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptContext.Provider, {
|
|
@@ -27459,7 +27515,7 @@ var require_useSelectBreakpointActive_native = __commonJS({
|
|
|
27459
27515
|
});
|
|
27460
27516
|
module2.exports = __toCommonJS2(useSelectBreakpointActive_exports);
|
|
27461
27517
|
var import_adapt = require_index_native31(), useShowSelectSheet = function(context) {
|
|
27462
|
-
var breakpointActive = (0, import_adapt.useAdaptIsActive)();
|
|
27518
|
+
var breakpointActive = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
|
|
27463
27519
|
return context.open === !1 ? !1 : breakpointActive;
|
|
27464
27520
|
};
|
|
27465
27521
|
}
|
|
@@ -27533,7 +27589,7 @@ var require_Select_native = __commonJS({
|
|
|
27533
27589
|
name: VALUE_NAME,
|
|
27534
27590
|
userSelect: "none"
|
|
27535
27591
|
}), SelectValue = SelectValueFrame.styleable(function(param, forwardedRef) {
|
|
27536
|
-
var {
|
|
27592
|
+
var { scope, children: childrenProp, placeholder, ...props } = param, context = (0, import_context.useSelectContext)(scope), itemParentContext = (0, import_context.useSelectItemParentContext)(scope), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.onValueNodeChange), children = childrenProp ?? context.selectedItem, isEmptyValue = context.value == null || context.value === "", selectValueChildren = isEmptyValue ? placeholder ?? children : children;
|
|
27537
27593
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectValueFrame, {
|
|
27538
27594
|
...!props.unstyled && {
|
|
27539
27595
|
size: itemParentContext.size,
|
|
@@ -27564,18 +27620,18 @@ var require_Select_native = __commonJS({
|
|
|
27564
27620
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_text2.Paragraph, {
|
|
27565
27621
|
children: "\u25BC"
|
|
27566
27622
|
})
|
|
27567
|
-
}),
|
|
27568
|
-
name:
|
|
27623
|
+
}), SelectItemIndicatorFrame = (0, import_core12.styled)(import_stacks3.XStack, {
|
|
27624
|
+
name: "SelectItemIndicator"
|
|
27569
27625
|
}), SelectItemIndicator = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
27570
|
-
var {
|
|
27626
|
+
var { scope, ...itemIndicatorProps } = props, context = (0, import_context.useSelectItemParentContext)(scope), itemContext = (0, import_SelectItem.useSelectItemContext)(scope);
|
|
27571
27627
|
return context.shouldRenderWebNative ? null : itemContext.isSelected ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemIndicatorFrame, {
|
|
27572
27628
|
"aria-hidden": !0,
|
|
27573
27629
|
...itemIndicatorProps,
|
|
27574
27630
|
ref: forwardedRef
|
|
27575
27631
|
}) : null;
|
|
27576
|
-
})
|
|
27577
|
-
|
|
27578
|
-
|
|
27632
|
+
}), GROUP_NAME = "SelectGroup", { Provider: SelectGroupContextProvider, useStyledContext: useSelectGroupContext } = (0, import_core12.createStyledContext)({
|
|
27633
|
+
id: ""
|
|
27634
|
+
}, "SelectGroup"), SelectGroupFrame = (0, import_core12.styled)(import_stacks3.YStack, {
|
|
27579
27635
|
name: GROUP_NAME,
|
|
27580
27636
|
width: "100%"
|
|
27581
27637
|
}), NativeSelectTextFrame = (0, import_core12.styled)(import_text2.SizableText, {
|
|
@@ -27611,7 +27667,7 @@ var require_Select_native = __commonJS({
|
|
|
27611
27667
|
size: "$2"
|
|
27612
27668
|
}
|
|
27613
27669
|
}), SelectGroup = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
27614
|
-
var {
|
|
27670
|
+
var { scope, ...groupProps } = props, groupId = React4.useId(), context = (0, import_context.useSelectContext)(scope), itemParentContext = (0, import_context.useSelectItemParentContext)(scope), _itemParentContext_size, size2 = (_itemParentContext_size = itemParentContext.size) !== null && _itemParentContext_size !== void 0 ? _itemParentContext_size : "$true", nativeSelectRef = React4.useRef(null), content = function() {
|
|
27615
27671
|
return itemParentContext.shouldRenderWebNative ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(NativeSelectFrame, {
|
|
27616
27672
|
asChild: !0,
|
|
27617
27673
|
size: size2,
|
|
@@ -27641,14 +27697,14 @@ var require_Select_native = __commonJS({
|
|
|
27641
27697
|
});
|
|
27642
27698
|
}();
|
|
27643
27699
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectGroupContextProvider, {
|
|
27644
|
-
scope
|
|
27700
|
+
scope,
|
|
27645
27701
|
id: groupId || "",
|
|
27646
27702
|
children: content
|
|
27647
27703
|
});
|
|
27648
27704
|
});
|
|
27649
27705
|
SelectGroup.displayName = GROUP_NAME;
|
|
27650
27706
|
var LABEL_NAME = "SelectLabel", SelectLabel = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
27651
|
-
var {
|
|
27707
|
+
var { scope, ...labelProps } = props, context = (0, import_context.useSelectItemParentContext)(scope), groupContext = useSelectGroupContext(scope);
|
|
27652
27708
|
return context.shouldRenderWebNative ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_list_item.ListItem, {
|
|
27653
27709
|
tag: "div",
|
|
27654
27710
|
componentName: LABEL_NAME,
|
|
@@ -27663,7 +27719,7 @@ var require_Select_native = __commonJS({
|
|
|
27663
27719
|
var SelectSeparator = (0, import_core12.styled)(import_separator.Separator, {
|
|
27664
27720
|
name: "SelectSeparator"
|
|
27665
27721
|
}), SelectSheetController = function(props) {
|
|
27666
|
-
var context = (0, import_context.useSelectContext)(
|
|
27722
|
+
var context = (0, import_context.useSelectContext)(props.scope), showSheet = (0, import_useSelectBreakpointActive.useShowSelectSheet)(context), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope), getShowSheet = (0, import_core12.useGet)(showSheet);
|
|
27667
27723
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_sheet.SheetController, {
|
|
27668
27724
|
onOpenChange: function(val) {
|
|
27669
27725
|
getShowSheet() && props.onOpenChange(val);
|
|
@@ -27677,12 +27733,13 @@ var require_Select_native = __commonJS({
|
|
|
27677
27733
|
children: props.children
|
|
27678
27734
|
});
|
|
27679
27735
|
}, Select = (0, import_helpers.withStaticProperties)(function(props) {
|
|
27680
|
-
var
|
|
27736
|
+
var adaptScope = `AdaptSelect${props.scope || ""}`;
|
|
27681
27737
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
|
|
27682
|
-
scope:
|
|
27738
|
+
scope: adaptScope,
|
|
27683
27739
|
portal: !0,
|
|
27684
27740
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectInner, {
|
|
27685
|
-
|
|
27741
|
+
scope: props.scope,
|
|
27742
|
+
adaptScope,
|
|
27686
27743
|
...props
|
|
27687
27744
|
})
|
|
27688
27745
|
});
|
|
@@ -27721,7 +27778,7 @@ var require_Select_native = __commonJS({
|
|
|
27721
27778
|
];
|
|
27722
27779
|
}
|
|
27723
27780
|
function SelectInner(props) {
|
|
27724
|
-
var {
|
|
27781
|
+
var { scope = "", adaptScope, native, children, open: openProp, defaultOpen, onOpenChange, value: valueProp, defaultValue, onValueChange, disablePreventBodyScroll, size: sizeProp = "$true", onActiveChange, dir, id } = props, isAdapted = (0, import_adapt.useAdaptIsActive)(adaptScope), SelectImpl = isAdapted || !import_constants4.isWeb ? SelectSheetImpl : import_SelectImpl.SelectInlineImpl, forceUpdate = React4.useReducer(function() {
|
|
27725
27782
|
return {};
|
|
27726
27783
|
}, {})[1], [selectedItem, setSelectedItem] = React4.useState(null), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
27727
27784
|
prop: openProp,
|
|
@@ -27764,7 +27821,9 @@ var require_Select_native = __commonJS({
|
|
|
27764
27821
|
});
|
|
27765
27822
|
}, 1, {}, []);
|
|
27766
27823
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.SelectItemParentProvider, {
|
|
27767
|
-
|
|
27824
|
+
scopeName: scope,
|
|
27825
|
+
scope,
|
|
27826
|
+
adaptScope,
|
|
27768
27827
|
initialValue: React4.useMemo(function() {
|
|
27769
27828
|
return value;
|
|
27770
27829
|
}, [
|
|
@@ -27778,9 +27837,8 @@ var require_Select_native = __commonJS({
|
|
|
27778
27837
|
onChange: React4.useCallback(function(val) {
|
|
27779
27838
|
setValue(val), emitValue(val);
|
|
27780
27839
|
}, []),
|
|
27781
|
-
onActiveChange: (0, import_core12.useEvent)(function() {
|
|
27782
|
-
|
|
27783
|
-
onActiveChange == null || onActiveChange(...args);
|
|
27840
|
+
onActiveChange: (0, import_core12.useEvent)(function(value2, index) {
|
|
27841
|
+
onActiveChange == null || onActiveChange(value2, index);
|
|
27784
27842
|
}),
|
|
27785
27843
|
setSelectedIndex,
|
|
27786
27844
|
setValueAtIndex: React4.useCallback(function(index, value2) {
|
|
@@ -27788,7 +27846,9 @@ var require_Select_native = __commonJS({
|
|
|
27788
27846
|
}, []),
|
|
27789
27847
|
shouldRenderWebNative,
|
|
27790
27848
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.SelectProvider, {
|
|
27791
|
-
scope
|
|
27849
|
+
scope,
|
|
27850
|
+
scopeName: scope,
|
|
27851
|
+
adaptScope,
|
|
27792
27852
|
disablePreventBodyScroll,
|
|
27793
27853
|
dir,
|
|
27794
27854
|
blockSelection: !1,
|
|
@@ -27798,7 +27858,6 @@ var require_Select_native = __commonJS({
|
|
|
27798
27858
|
forceUpdate,
|
|
27799
27859
|
valueNode,
|
|
27800
27860
|
onValueNodeChange: setValueNode,
|
|
27801
|
-
scopeKey: props.scopeKey,
|
|
27802
27861
|
activeIndex,
|
|
27803
27862
|
selectedIndex,
|
|
27804
27863
|
setActiveIndex: setActiveIndexDebounced,
|
|
@@ -27807,7 +27866,7 @@ var require_Select_native = __commonJS({
|
|
|
27807
27866
|
native,
|
|
27808
27867
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectSheetController, {
|
|
27809
27868
|
onOpenChange: setOpen,
|
|
27810
|
-
|
|
27869
|
+
scope,
|
|
27811
27870
|
children: shouldRenderWebNative ? children : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectImpl, {
|
|
27812
27871
|
activeIndexRef,
|
|
27813
27872
|
listContentRef,
|
|
@@ -30748,6 +30807,71 @@ var require_index_native74 = __commonJS({
|
|
|
30748
30807
|
}
|
|
30749
30808
|
});
|
|
30750
30809
|
|
|
30810
|
+
// ../../core/use-window-dimensions/dist/cjs/helpers.native.js
|
|
30811
|
+
var require_helpers_native4 = __commonJS({
|
|
30812
|
+
"../../core/use-window-dimensions/dist/cjs/helpers.native.js"(exports2, module2) {
|
|
30813
|
+
"use strict";
|
|
30814
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
30815
|
+
for (var name in all) __defProp2(target, name, {
|
|
30816
|
+
get: all[name],
|
|
30817
|
+
enumerable: !0
|
|
30818
|
+
});
|
|
30819
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
30820
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
30821
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
30822
|
+
for (var _loop = function() {
|
|
30823
|
+
var key = _step.value;
|
|
30824
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
30825
|
+
get: function() {
|
|
30826
|
+
return from[key];
|
|
30827
|
+
},
|
|
30828
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
30829
|
+
});
|
|
30830
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
30831
|
+
} catch (err) {
|
|
30832
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
30833
|
+
} finally {
|
|
30834
|
+
try {
|
|
30835
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
30836
|
+
} finally {
|
|
30837
|
+
if (_didIteratorError)
|
|
30838
|
+
throw _iteratorError;
|
|
30839
|
+
}
|
|
30840
|
+
}
|
|
30841
|
+
return to;
|
|
30842
|
+
}, __toCommonJS2 = function(mod) {
|
|
30843
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
30844
|
+
value: !0
|
|
30845
|
+
}), mod);
|
|
30846
|
+
}, helpers_native_exports = {};
|
|
30847
|
+
__export2(helpers_native_exports, {
|
|
30848
|
+
getWindowSize: function() {
|
|
30849
|
+
return getWindowSize;
|
|
30850
|
+
},
|
|
30851
|
+
subscribe: function() {
|
|
30852
|
+
return subscribe;
|
|
30853
|
+
}
|
|
30854
|
+
});
|
|
30855
|
+
module2.exports = __toCommonJS2(helpers_native_exports);
|
|
30856
|
+
var import_react_native4 = require_fake_react_native();
|
|
30857
|
+
function getWindowSize() {
|
|
30858
|
+
return import_react_native4.Dimensions.get("window");
|
|
30859
|
+
}
|
|
30860
|
+
var cbs = /* @__PURE__ */ new Set();
|
|
30861
|
+
import_react_native4.Dimensions.addEventListener("change", function(param) {
|
|
30862
|
+
var { window: window2 } = param;
|
|
30863
|
+
cbs.forEach(function(cb) {
|
|
30864
|
+
return cb(window2);
|
|
30865
|
+
});
|
|
30866
|
+
});
|
|
30867
|
+
function subscribe(cb) {
|
|
30868
|
+
return cbs.add(cb), function() {
|
|
30869
|
+
return cbs.delete(cb);
|
|
30870
|
+
};
|
|
30871
|
+
}
|
|
30872
|
+
}
|
|
30873
|
+
});
|
|
30874
|
+
|
|
30751
30875
|
// ../../core/use-window-dimensions/dist/cjs/index.native.js
|
|
30752
30876
|
var require_index_native75 = __commonJS({
|
|
30753
30877
|
"../../core/use-window-dimensions/dist/cjs/index.native.js"(exports2, module2) {
|
|
@@ -30806,30 +30930,19 @@ var require_index_native75 = __commonJS({
|
|
|
30806
30930
|
}
|
|
30807
30931
|
});
|
|
30808
30932
|
module2.exports = __toCommonJS2(index_exports2);
|
|
30809
|
-
var import_react3 = __toESM2(require("react")), import_constants4 = require_index_native6(),
|
|
30810
|
-
|
|
30811
|
-
|
|
30933
|
+
var import_react3 = __toESM2(require("react")), import_constants4 = require_index_native6(), import_helpers = require_helpers_native4(), initialValue = {
|
|
30934
|
+
width: 800,
|
|
30935
|
+
height: 600,
|
|
30936
|
+
scale: 1,
|
|
30937
|
+
fontScale: 1
|
|
30812
30938
|
};
|
|
30813
30939
|
function configureInitialWindowDimensions(next) {
|
|
30814
30940
|
Object.assign(initialValue, next);
|
|
30815
30941
|
}
|
|
30816
|
-
import_react_native4.Dimensions.addEventListener("change", function() {
|
|
30817
|
-
cbs.forEach(function(cb) {
|
|
30818
|
-
return cb(window);
|
|
30819
|
-
});
|
|
30820
|
-
});
|
|
30821
|
-
var cbs = /* @__PURE__ */ new Set();
|
|
30822
|
-
function subscribe(cb) {
|
|
30823
|
-
return cbs.add(cb), function() {
|
|
30824
|
-
return cbs.delete(cb);
|
|
30825
|
-
};
|
|
30826
|
-
}
|
|
30827
30942
|
function useWindowDimensions() {
|
|
30828
30943
|
var { serverValue = initialValue } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
30829
|
-
return import_react3.default.useSyncExternalStore(subscribe, function() {
|
|
30830
|
-
return
|
|
30831
|
-
}, function() {
|
|
30832
|
-
return import_constants4.isWeb ? serverValue : import_react_native4.Dimensions.get("window");
|
|
30944
|
+
return import_react3.default.useSyncExternalStore(import_helpers.subscribe, import_helpers.getWindowSize, function() {
|
|
30945
|
+
return import_constants4.isWeb ? serverValue : (0, import_helpers.getWindowSize)();
|
|
30833
30946
|
});
|
|
30834
30947
|
}
|
|
30835
30948
|
}
|
|
@@ -31040,7 +31153,7 @@ __reExport(index_exports, __toESM(require_index_native46()), module.exports);
|
|
|
31040
31153
|
__reExport(index_exports, __toESM(require_index_native47()), module.exports);
|
|
31041
31154
|
__reExport(index_exports, __toESM(require_index_native52()), module.exports);
|
|
31042
31155
|
__reExport(index_exports, __toESM(require_index_native11()), module.exports);
|
|
31043
|
-
__reExport(index_exports, __toESM(
|
|
31156
|
+
__reExport(index_exports, __toESM(require_index_native33()), module.exports);
|
|
31044
31157
|
__reExport(index_exports, __toESM(require_index_native39()), module.exports);
|
|
31045
31158
|
__reExport(index_exports, __toESM(require_index_native44()), module.exports);
|
|
31046
31159
|
__reExport(index_exports, __toESM(require_index_native53()), module.exports);
|