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/test.native.js
CHANGED
|
@@ -3036,22 +3036,22 @@ var require_useMedia_native = __commonJS({
|
|
|
3036
3036
|
listeners.delete(subscriber);
|
|
3037
3037
|
};
|
|
3038
3038
|
}
|
|
3039
|
-
function useMedia3(
|
|
3040
|
-
var componentState =
|
|
3039
|
+
function useMedia3(componentContext, debug) {
|
|
3040
|
+
var componentState = componentContext ? States.get(componentContext) : null, internalRef = (0, import_react3.useRef)(null);
|
|
3041
3041
|
internalRef.current || (internalRef.current = {
|
|
3042
|
-
keys: /* @__PURE__ */ new Set()
|
|
3043
|
-
|
|
3044
|
-
|
|
3042
|
+
keys: /* @__PURE__ */ new Set(),
|
|
3043
|
+
lastState: mediaState3
|
|
3044
|
+
}), internalRef.current.pendingState && (internalRef.current.lastState = internalRef.current.pendingState, internalRef.current.pendingState = void 0);
|
|
3045
|
+
var { keys } = internalRef.current;
|
|
3045
3046
|
keys.size && keys.clear();
|
|
3046
3047
|
var state = (0, import_react3.useSyncExternalStore)(subscribe, function() {
|
|
3047
|
-
|
|
3048
|
-
var curKeys = (componentState == null ? void 0 : componentState.keys) || keys;
|
|
3048
|
+
var curKeys = (componentState == null ? void 0 : componentState.keys) || keys, { lastState, pendingState } = internalRef.current;
|
|
3049
3049
|
if (!curKeys.size) return lastState;
|
|
3050
3050
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
3051
3051
|
try {
|
|
3052
3052
|
for (var _iterator = curKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
3053
3053
|
var key = _step.value;
|
|
3054
|
-
if (mediaState3[key] !== lastState[key]) return internalRef.current.lastState = mediaState3, mediaState3;
|
|
3054
|
+
if (mediaState3[key] !== (pendingState || lastState)[key]) return componentContext != null && componentContext.mediaEmit ? (componentContext.mediaEmit(mediaState3), internalRef.current.pendingState = mediaState3, lastState) : (internalRef.current.lastState = mediaState3, mediaState3);
|
|
3055
3055
|
}
|
|
3056
3056
|
} catch (err) {
|
|
3057
3057
|
_didIteratorError = !0, _iteratorError = err;
|
|
@@ -3557,13 +3557,15 @@ var require_createStyledContext_native = __commonJS({
|
|
|
3557
3557
|
module2.exports = __toCommonJS2(createStyledContext_exports);
|
|
3558
3558
|
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"];
|
|
3559
3559
|
function createStyledContext2(defaultValues) {
|
|
3560
|
-
var OGContext = createReactContext(defaultValues), OGProvider2 = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map();
|
|
3560
|
+
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);
|
|
3561
3561
|
function getOrCreateScopedContext(scope) {
|
|
3562
3562
|
var ScopedContext = scopedContexts.get(scope);
|
|
3563
3563
|
return ScopedContext || (ScopedContext = createReactContext(defaultValues), scopedContexts.set(scope, ScopedContext)), ScopedContext;
|
|
3564
3564
|
}
|
|
3565
|
-
var
|
|
3566
|
-
|
|
3565
|
+
var getNamespacedScope = function(scope) {
|
|
3566
|
+
return namespace ? `${namespace}--${scope}` : scope;
|
|
3567
|
+
}, Provider = function(param) {
|
|
3568
|
+
var { children, scope: scopeIn, ...values } = param, scope = getNamespacedScope(scopeIn), next = import_react3.default.useMemo(function() {
|
|
3567
3569
|
return {
|
|
3568
3570
|
// this ! is a workaround for ts error
|
|
3569
3571
|
...defaultValues,
|
|
@@ -3572,13 +3574,16 @@ var require_createStyledContext_native = __commonJS({
|
|
|
3572
3574
|
}, [
|
|
3573
3575
|
(0, import_objectIdentityKey.objectIdentityKey)(values)
|
|
3574
3576
|
]), Provider22 = OGProvider2;
|
|
3575
|
-
return scope && (Provider22 = getOrCreateScopedContext(scope).Provider), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
3576
|
-
value:
|
|
3577
|
-
children
|
|
3577
|
+
return scope && (Provider22 = getOrCreateScopedContext(scope).Provider), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(LastScopeInNamespace.Provider, {
|
|
3578
|
+
value: scope,
|
|
3579
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Provider22, {
|
|
3580
|
+
value: next,
|
|
3581
|
+
children
|
|
3582
|
+
})
|
|
3578
3583
|
});
|
|
3579
|
-
}, useStyledContext = function(
|
|
3580
|
-
var context = scope ? getOrCreateScopedContext(scope) : OGContext;
|
|
3581
|
-
return
|
|
3584
|
+
}, useStyledContext = function() {
|
|
3585
|
+
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);
|
|
3586
|
+
return value;
|
|
3582
3587
|
};
|
|
3583
3588
|
return Context.Provider = Provider, Context.props = defaultValues, Context.context = OGContext, Context.useStyledContext = useStyledContext, Context;
|
|
3584
3589
|
}
|
|
@@ -8216,7 +8221,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8216
8221
|
}
|
|
8217
8222
|
});
|
|
8218
8223
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
8219
|
-
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(), NextState = /* @__PURE__ */ new WeakMap(), componentSetStates = /* @__PURE__ */ new Set(), avoidReRenderKeys = /* @__PURE__ */ new Set([
|
|
8224
|
+
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(), NextState = /* @__PURE__ */ new WeakMap(), NextMedia = /* @__PURE__ */ new WeakMap(), componentSetStates = /* @__PURE__ */ new Set(), avoidReRenderKeys = /* @__PURE__ */ new Set([
|
|
8220
8225
|
"hover",
|
|
8221
8226
|
"press",
|
|
8222
8227
|
"pressIn",
|
|
@@ -8371,6 +8376,18 @@ var require_createComponent_native = __commonJS({
|
|
|
8371
8376
|
}
|
|
8372
8377
|
if (splitStyles && (hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
|
|
8373
8378
|
var useStyleListener = stateRef.current.useStyleListener, ogSetStateShallow = setStateShallow;
|
|
8379
|
+
componentContext.mediaEmit = function(next) {
|
|
8380
|
+
NextMedia.set(stateRef, next), updateStyleListener();
|
|
8381
|
+
};
|
|
8382
|
+
var updateStyleListener = function() {
|
|
8383
|
+
var updatedState = NextState.get(stateRef) || state, mediaState22 = NextMedia.get(stateRef), { group, hasDynGroupChildren, unmounted, animation, ...childrenGroupState } = updatedState;
|
|
8384
|
+
groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState);
|
|
8385
|
+
var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, mediaState22 ? {
|
|
8386
|
+
...styleProps,
|
|
8387
|
+
mediaState: mediaState22
|
|
8388
|
+
} : styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp);
|
|
8389
|
+
useStyleListener == null || useStyleListener((nextStyles == null ? void 0 : nextStyles.style) || {});
|
|
8390
|
+
};
|
|
8374
8391
|
stateRef.current.setStateShallow = function(nextOrGetNext) {
|
|
8375
8392
|
var prev = NextState.get(stateRef) || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
|
|
8376
8393
|
if (!(next === prev || (0, import_is_equal_shallow.isEqualShallow)(prev, next))) {
|
|
@@ -8382,11 +8399,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8382
8399
|
...prev,
|
|
8383
8400
|
...next
|
|
8384
8401
|
};
|
|
8385
|
-
NextState.set(stateRef, updatedState);
|
|
8386
|
-
var { group, hasDynGroupChildren, unmounted, animation, ...childrenGroupState } = updatedState;
|
|
8387
|
-
groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState);
|
|
8388
|
-
var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp);
|
|
8389
|
-
useStyleListener == null || useStyleListener((nextStyles == null ? void 0 : nextStyles.style) || {});
|
|
8402
|
+
NextState.set(stateRef, updatedState), updateStyleListener();
|
|
8390
8403
|
} else ogSetStateShallow(next);
|
|
8391
8404
|
}
|
|
8392
8405
|
}, setStateShallow = function(state2) {
|
|
@@ -13722,10 +13735,10 @@ var require_Collection_native = __commonJS({
|
|
|
13722
13735
|
current: void 0
|
|
13723
13736
|
},
|
|
13724
13737
|
itemMap: /* @__PURE__ */ new Map()
|
|
13725
|
-
}), CollectionProvider = function(props) {
|
|
13726
|
-
var {
|
|
13738
|
+
}, "Toast"), CollectionProvider = function(props) {
|
|
13739
|
+
var { scope, children } = props, ref = import_react3.default.useRef(void 0), itemMap = import_react3.default.useRef(/* @__PURE__ */ new Map()).current;
|
|
13727
13740
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CollectionProviderImpl, {
|
|
13728
|
-
scope
|
|
13741
|
+
scope,
|
|
13729
13742
|
itemMap,
|
|
13730
13743
|
collectionRef: ref,
|
|
13731
13744
|
children
|
|
@@ -13733,7 +13746,7 @@ var require_Collection_native = __commonJS({
|
|
|
13733
13746
|
};
|
|
13734
13747
|
CollectionProvider.displayName = "CollectionProvider";
|
|
13735
13748
|
var COLLECTION_SLOT_NAME = name + "CollectionSlot", CollectionSlot = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
13736
|
-
var {
|
|
13749
|
+
var { scope, children } = props, context = useCollectionContext(scope), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);
|
|
13737
13750
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Slot, {
|
|
13738
13751
|
ref: composedRefs,
|
|
13739
13752
|
children
|
|
@@ -13741,7 +13754,7 @@ var require_Collection_native = __commonJS({
|
|
|
13741
13754
|
});
|
|
13742
13755
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
13743
13756
|
var ITEM_SLOT_NAME = name + "CollectionItemSlot", ITEM_DATA_ATTR = "data-collection-item", CollectionItemSlot = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
13744
|
-
var {
|
|
13757
|
+
var { scope, children, ...itemData } = props, ref = import_react3.default.useRef(void 0), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), context = useCollectionContext(scope);
|
|
13745
13758
|
return import_react3.default.useEffect(function() {
|
|
13746
13759
|
return context.itemMap.set(ref, {
|
|
13747
13760
|
ref,
|
|
@@ -13756,8 +13769,8 @@ var require_Collection_native = __commonJS({
|
|
|
13756
13769
|
});
|
|
13757
13770
|
});
|
|
13758
13771
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
13759
|
-
function useCollection(
|
|
13760
|
-
var context = useCollectionContext(
|
|
13772
|
+
function useCollection(scope) {
|
|
13773
|
+
var context = useCollectionContext(scope), getItems = import_react3.default.useCallback(function() {
|
|
13761
13774
|
if (!import_constants4.isWeb) return [];
|
|
13762
13775
|
var collectionNode = context.collectionRef.current;
|
|
13763
13776
|
if (!collectionNode) return [];
|
|
@@ -15267,7 +15280,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15267
15280
|
], [Collection, useCollection] = (0, import_collection.createCollection)(ACCORDION_NAME), ACCORDION_CONTEXT = "Accordion", AccordionComponent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
15268
15281
|
var { type, ...accordionProps } = props, singleProps = accordionProps, multipleProps = accordionProps;
|
|
15269
15282
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Collection.Provider, {
|
|
15270
|
-
|
|
15283
|
+
scope: props.__scopeAccordion || ACCORDION_CONTEXT,
|
|
15271
15284
|
children: type === "multiple" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionImplMultiple, {
|
|
15272
15285
|
...multipleProps,
|
|
15273
15286
|
ref: forwardedRef
|
|
@@ -15403,7 +15416,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15403
15416
|
direction: dir,
|
|
15404
15417
|
orientation,
|
|
15405
15418
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Collection.Slot, {
|
|
15406
|
-
|
|
15419
|
+
scope: __scopeAccordion || ACCORDION_CONTEXT,
|
|
15407
15420
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, {
|
|
15408
15421
|
"data-orientation": orientation,
|
|
15409
15422
|
ref: composedRef,
|
|
@@ -15474,7 +15487,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15474
15487
|
}), AccordionTrigger = AccordionTriggerFrame.styleable(function(props, forwardedRef) {
|
|
15475
15488
|
var { __scopeAccordion, ...triggerProps } = props, accordionContext = useAccordionContext(__scopeAccordion), itemContext = useAccordionItemContext(__scopeAccordion), collapsibleContext = useAccordionCollapsibleContext(__scopeAccordion);
|
|
15476
15489
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Collection.ItemSlot, {
|
|
15477
|
-
|
|
15490
|
+
scope: __scopeAccordion || ACCORDION_CONTEXT,
|
|
15478
15491
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionTriggerFrame, {
|
|
15479
15492
|
// @ts-ignore
|
|
15480
15493
|
__scopeCollapsible: __scopeAccordion || ACCORDION_CONTEXT,
|
|
@@ -16058,7 +16071,7 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
16058
16071
|
});
|
|
16059
16072
|
});
|
|
16060
16073
|
function PortalHostWeb(props) {
|
|
16061
|
-
return (0,
|
|
16074
|
+
return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
16062
16075
|
return function() {
|
|
16063
16076
|
import_constants22.allPortalHosts.delete(props.name);
|
|
16064
16077
|
};
|
|
@@ -16080,7 +16093,7 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
16080
16093
|
}
|
|
16081
16094
|
function PortalHostNonNative(props) {
|
|
16082
16095
|
var { name, forwardProps, render = defaultRenderer } = props, state = usePortalState(name), { registerHost: registerHost2, deregisterHost: deregisterHost2 } = usePortal(props.name);
|
|
16083
|
-
return (0,
|
|
16096
|
+
return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
16084
16097
|
if (!(typeof window > "u")) return registerHost2(), function() {
|
|
16085
16098
|
deregisterHost2();
|
|
16086
16099
|
};
|
|
@@ -16482,7 +16495,7 @@ var require_Adapt_native = __commonJS({
|
|
|
16482
16495
|
}
|
|
16483
16496
|
});
|
|
16484
16497
|
module2.exports = __toCommonJS2(Adapt_exports);
|
|
16485
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"),
|
|
16498
|
+
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)({
|
|
16486
16499
|
Contents: null,
|
|
16487
16500
|
scopeName: "",
|
|
16488
16501
|
portalName: "",
|
|
@@ -16493,42 +16506,56 @@ var require_Adapt_native = __commonJS({
|
|
|
16493
16506
|
setChildren: null,
|
|
16494
16507
|
setWhen: function() {
|
|
16495
16508
|
}
|
|
16496
|
-
}), ProvideAdaptContext = function(param) {
|
|
16497
|
-
var { children, ...context } = param, scope = context.scopeName || "";
|
|
16498
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
16499
|
-
value:
|
|
16509
|
+
}), LastAdaptContextScope = /* @__PURE__ */ (0, import_react3.createContext)(""), ProvideAdaptContext = function(param) {
|
|
16510
|
+
var { children, ...context } = param, scope = context.scopeName || "", lastScope = (0, import_react3.useContext)(LastAdaptContextScope);
|
|
16511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(LastAdaptContextScope.Provider, {
|
|
16512
|
+
value: lastScope || context.lastScope || "",
|
|
16500
16513
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AdaptContext.Provider, {
|
|
16501
16514
|
scope,
|
|
16515
|
+
lastScope: lastScope || context.lastScope,
|
|
16502
16516
|
...context,
|
|
16503
16517
|
children
|
|
16504
16518
|
})
|
|
16505
16519
|
});
|
|
16506
|
-
}, useAdaptContext = function() {
|
|
16507
|
-
var
|
|
16508
|
-
return
|
|
16520
|
+
}, useAdaptContext = function(scope) {
|
|
16521
|
+
var lastScope = (0, import_react3.useContext)(LastAdaptContextScope), adaptScope = scope ?? lastScope;
|
|
16522
|
+
return AdaptContext.useStyledContext(adaptScope);
|
|
16509
16523
|
}, AdaptPortals = /* @__PURE__ */ new Map(), AdaptParent = function(param) {
|
|
16510
|
-
var { children, Contents, scope, portal } = param, portalName = `AdaptPortal${scope}`,
|
|
16511
|
-
|
|
16512
|
-
|
|
16513
|
-
|
|
16514
|
-
|
|
16515
|
-
|
|
16516
|
-
|
|
16517
|
-
|
|
16518
|
-
AdaptPortals.delete(id);
|
|
16524
|
+
var { children, Contents, scope, portal } = param, id = (0, import_react3.useId)(), portalName = `AdaptPortal${scope}${id}`, FinalContents = (0, import_react3.useMemo)(function() {
|
|
16525
|
+
if (Contents) return Contents;
|
|
16526
|
+
if (AdaptPortals.has(portalName)) return AdaptPortals.get(portalName);
|
|
16527
|
+
var element = function() {
|
|
16528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, {
|
|
16529
|
+
name: portalName,
|
|
16530
|
+
forwardProps: typeof portal == "boolean" || portal == null ? void 0 : portal.forwardProps
|
|
16531
|
+
}, id);
|
|
16519
16532
|
};
|
|
16520
|
-
|
|
16521
|
-
|
|
16522
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProvideAdaptContext, {
|
|
16523
|
-
Contents: FinalContents,
|
|
16524
|
-
when,
|
|
16525
|
-
platform: platform2,
|
|
16526
|
-
setPlatform,
|
|
16527
|
-
setWhen,
|
|
16528
|
-
setChildren,
|
|
16533
|
+
return AdaptPortals.set(portalName, element), element;
|
|
16534
|
+
}, [
|
|
16529
16535
|
portalName,
|
|
16530
|
-
|
|
16531
|
-
|
|
16536
|
+
Contents
|
|
16537
|
+
]);
|
|
16538
|
+
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
16539
|
+
return AdaptPortals.set(portalName, FinalContents), function() {
|
|
16540
|
+
AdaptPortals.delete(portalName);
|
|
16541
|
+
};
|
|
16542
|
+
}, [
|
|
16543
|
+
portalName
|
|
16544
|
+
]);
|
|
16545
|
+
var [when, setWhen] = import_react3.default.useState(null), [platform2, setPlatform] = import_react3.default.useState(null), [children2, setChildren] = import_react3.default.useState(null);
|
|
16546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(LastAdaptContextScope, {
|
|
16547
|
+
value: scope,
|
|
16548
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProvideAdaptContext, {
|
|
16549
|
+
Contents: FinalContents,
|
|
16550
|
+
when,
|
|
16551
|
+
platform: platform2,
|
|
16552
|
+
setPlatform,
|
|
16553
|
+
setWhen,
|
|
16554
|
+
setChildren,
|
|
16555
|
+
portalName,
|
|
16556
|
+
scopeName: scope,
|
|
16557
|
+
children
|
|
16558
|
+
})
|
|
16532
16559
|
});
|
|
16533
16560
|
}, AdaptContents = function(param) {
|
|
16534
16561
|
var { scope, ...rest } = param, context = useAdaptContext(scope);
|
|
@@ -16540,7 +16567,7 @@ var require_Adapt_native = __commonJS({
|
|
|
16540
16567
|
};
|
|
16541
16568
|
AdaptContents.shouldForwardSpace = !0;
|
|
16542
16569
|
var Adapt = (0, import_helpers.withStaticProperties)(function(props) {
|
|
16543
|
-
var { platform: platform2, when, children, scope } = props, context = useAdaptContext(scope),
|
|
16570
|
+
var { platform: platform2, when, children, scope } = props, context = useAdaptContext(scope), enabled = useAdaptIsActiveGiven(props);
|
|
16544
16571
|
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
16545
16572
|
var _context_setWhen, _context_setPlatform;
|
|
16546
16573
|
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);
|
|
@@ -16566,10 +16593,7 @@ var require_Adapt_native = __commonJS({
|
|
|
16566
16593
|
}, [
|
|
16567
16594
|
output
|
|
16568
16595
|
]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_z_index_stack2.StackZIndexContext, {
|
|
16569
|
-
children:
|
|
16570
|
-
value: scopeName,
|
|
16571
|
-
children: enabled ? output : null
|
|
16572
|
-
})
|
|
16596
|
+
children: enabled ? output : null
|
|
16573
16597
|
});
|
|
16574
16598
|
}, {
|
|
16575
16599
|
Contents: AdaptContents
|
|
@@ -16583,6 +16607,7 @@ var require_Adapt_native = __commonJS({
|
|
|
16583
16607
|
}, useAdaptIsActiveGiven = function(param) {
|
|
16584
16608
|
var { when, platform: platform2 } = param, media = (0, import_core12.useMedia)();
|
|
16585
16609
|
if (when == null && platform2 == null) return !1;
|
|
16610
|
+
if (when === !0) return !0;
|
|
16586
16611
|
var enabled = !1;
|
|
16587
16612
|
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);
|
|
16588
16613
|
}, useAdaptIsActive = function(scope) {
|
|
@@ -16631,6 +16656,93 @@ var require_index_native31 = __commonJS({
|
|
|
16631
16656
|
}
|
|
16632
16657
|
});
|
|
16633
16658
|
|
|
16659
|
+
// ../../core/aria-hidden/dist/cjs/AriaHidden.native.js
|
|
16660
|
+
var require_AriaHidden_native = __commonJS({
|
|
16661
|
+
"../../core/aria-hidden/dist/cjs/AriaHidden.native.js"(exports2, module2) {
|
|
16662
|
+
"use strict";
|
|
16663
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
16664
|
+
for (var name in all) __defProp2(target, name, {
|
|
16665
|
+
get: all[name],
|
|
16666
|
+
enumerable: !0
|
|
16667
|
+
});
|
|
16668
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
16669
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
16670
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
16671
|
+
for (var _loop = function() {
|
|
16672
|
+
var key = _step.value;
|
|
16673
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
16674
|
+
get: function() {
|
|
16675
|
+
return from[key];
|
|
16676
|
+
},
|
|
16677
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
16678
|
+
});
|
|
16679
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
16680
|
+
} catch (err) {
|
|
16681
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
16682
|
+
} finally {
|
|
16683
|
+
try {
|
|
16684
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
16685
|
+
} finally {
|
|
16686
|
+
if (_didIteratorError)
|
|
16687
|
+
throw _iteratorError;
|
|
16688
|
+
}
|
|
16689
|
+
}
|
|
16690
|
+
return to;
|
|
16691
|
+
}, __toCommonJS2 = function(mod) {
|
|
16692
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
16693
|
+
value: !0
|
|
16694
|
+
}), mod);
|
|
16695
|
+
}, AriaHidden_native_exports = {};
|
|
16696
|
+
__export2(AriaHidden_native_exports, {
|
|
16697
|
+
hideOthers: function() {
|
|
16698
|
+
return hideOthers;
|
|
16699
|
+
}
|
|
16700
|
+
});
|
|
16701
|
+
module2.exports = __toCommonJS2(AriaHidden_native_exports);
|
|
16702
|
+
var hideOthers = function() {
|
|
16703
|
+
};
|
|
16704
|
+
}
|
|
16705
|
+
});
|
|
16706
|
+
|
|
16707
|
+
// ../../core/aria-hidden/dist/cjs/index.native.js
|
|
16708
|
+
var require_index_native32 = __commonJS({
|
|
16709
|
+
"../../core/aria-hidden/dist/cjs/index.native.js"(exports2, module2) {
|
|
16710
|
+
"use strict";
|
|
16711
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
16712
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
16713
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
16714
|
+
for (var _loop = function() {
|
|
16715
|
+
var key = _step.value;
|
|
16716
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
16717
|
+
get: function() {
|
|
16718
|
+
return from[key];
|
|
16719
|
+
},
|
|
16720
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
16721
|
+
});
|
|
16722
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
16723
|
+
} catch (err) {
|
|
16724
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
16725
|
+
} finally {
|
|
16726
|
+
try {
|
|
16727
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
16728
|
+
} finally {
|
|
16729
|
+
if (_didIteratorError)
|
|
16730
|
+
throw _iteratorError;
|
|
16731
|
+
}
|
|
16732
|
+
}
|
|
16733
|
+
return to;
|
|
16734
|
+
}, __reExport2 = function(target, mod, secondTarget) {
|
|
16735
|
+
return __copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default");
|
|
16736
|
+
}, __toCommonJS2 = function(mod) {
|
|
16737
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
16738
|
+
value: !0
|
|
16739
|
+
}), mod);
|
|
16740
|
+
}, index_exports2 = {};
|
|
16741
|
+
module2.exports = __toCommonJS2(index_exports2);
|
|
16742
|
+
__reExport2(index_exports2, require_AriaHidden_native(), module2.exports);
|
|
16743
|
+
}
|
|
16744
|
+
});
|
|
16745
|
+
|
|
16634
16746
|
// ../../core/create-context/dist/cjs/create-context.native.js
|
|
16635
16747
|
var require_create_context_native = __commonJS({
|
|
16636
16748
|
"../../core/create-context/dist/cjs/create-context.native.js"(exports2, module2) {
|
|
@@ -16800,7 +16912,7 @@ var require_create_context_native = __commonJS({
|
|
|
16800
16912
|
});
|
|
16801
16913
|
|
|
16802
16914
|
// ../../core/create-context/dist/cjs/index.native.js
|
|
16803
|
-
var
|
|
16915
|
+
var require_index_native33 = __commonJS({
|
|
16804
16916
|
"../../core/create-context/dist/cjs/index.native.js"(exports2, module2) {
|
|
16805
16917
|
"use strict";
|
|
16806
16918
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
@@ -16838,93 +16950,6 @@ var require_index_native32 = __commonJS({
|
|
|
16838
16950
|
}
|
|
16839
16951
|
});
|
|
16840
16952
|
|
|
16841
|
-
// ../../core/aria-hidden/dist/cjs/AriaHidden.native.js
|
|
16842
|
-
var require_AriaHidden_native = __commonJS({
|
|
16843
|
-
"../../core/aria-hidden/dist/cjs/AriaHidden.native.js"(exports2, module2) {
|
|
16844
|
-
"use strict";
|
|
16845
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
16846
|
-
for (var name in all) __defProp2(target, name, {
|
|
16847
|
-
get: all[name],
|
|
16848
|
-
enumerable: !0
|
|
16849
|
-
});
|
|
16850
|
-
}, __copyProps2 = function(to, from, except, desc) {
|
|
16851
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
16852
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
16853
|
-
for (var _loop = function() {
|
|
16854
|
-
var key = _step.value;
|
|
16855
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
16856
|
-
get: function() {
|
|
16857
|
-
return from[key];
|
|
16858
|
-
},
|
|
16859
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
16860
|
-
});
|
|
16861
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
16862
|
-
} catch (err) {
|
|
16863
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
16864
|
-
} finally {
|
|
16865
|
-
try {
|
|
16866
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
16867
|
-
} finally {
|
|
16868
|
-
if (_didIteratorError)
|
|
16869
|
-
throw _iteratorError;
|
|
16870
|
-
}
|
|
16871
|
-
}
|
|
16872
|
-
return to;
|
|
16873
|
-
}, __toCommonJS2 = function(mod) {
|
|
16874
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
16875
|
-
value: !0
|
|
16876
|
-
}), mod);
|
|
16877
|
-
}, AriaHidden_native_exports = {};
|
|
16878
|
-
__export2(AriaHidden_native_exports, {
|
|
16879
|
-
hideOthers: function() {
|
|
16880
|
-
return hideOthers;
|
|
16881
|
-
}
|
|
16882
|
-
});
|
|
16883
|
-
module2.exports = __toCommonJS2(AriaHidden_native_exports);
|
|
16884
|
-
var hideOthers = function() {
|
|
16885
|
-
};
|
|
16886
|
-
}
|
|
16887
|
-
});
|
|
16888
|
-
|
|
16889
|
-
// ../../core/aria-hidden/dist/cjs/index.native.js
|
|
16890
|
-
var require_index_native33 = __commonJS({
|
|
16891
|
-
"../../core/aria-hidden/dist/cjs/index.native.js"(exports2, module2) {
|
|
16892
|
-
"use strict";
|
|
16893
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
16894
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
16895
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
16896
|
-
for (var _loop = function() {
|
|
16897
|
-
var key = _step.value;
|
|
16898
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
16899
|
-
get: function() {
|
|
16900
|
-
return from[key];
|
|
16901
|
-
},
|
|
16902
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
16903
|
-
});
|
|
16904
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
16905
|
-
} catch (err) {
|
|
16906
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
16907
|
-
} finally {
|
|
16908
|
-
try {
|
|
16909
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
16910
|
-
} finally {
|
|
16911
|
-
if (_didIteratorError)
|
|
16912
|
-
throw _iteratorError;
|
|
16913
|
-
}
|
|
16914
|
-
}
|
|
16915
|
-
return to;
|
|
16916
|
-
}, __reExport2 = function(target, mod, secondTarget) {
|
|
16917
|
-
return __copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default");
|
|
16918
|
-
}, __toCommonJS2 = function(mod) {
|
|
16919
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
16920
|
-
value: !0
|
|
16921
|
-
}), mod);
|
|
16922
|
-
}, index_exports2 = {};
|
|
16923
|
-
module2.exports = __toCommonJS2(index_exports2);
|
|
16924
|
-
__reExport2(index_exports2, require_AriaHidden_native(), module2.exports);
|
|
16925
|
-
}
|
|
16926
|
-
});
|
|
16927
|
-
|
|
16928
16953
|
// ../dismissable/dist/cjs/Dismissable.native.js
|
|
16929
16954
|
var require_Dismissable_native = __commonJS({
|
|
16930
16955
|
"../dismissable/dist/cjs/Dismissable.native.js"(exports2, module2) {
|
|
@@ -17155,7 +17180,7 @@ var require_FocusScopeController_native = __commonJS({
|
|
|
17155
17180
|
}
|
|
17156
17181
|
});
|
|
17157
17182
|
module2.exports = __toCommonJS2(FocusScopeController_exports);
|
|
17158
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_create_context =
|
|
17183
|
+
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);
|
|
17159
17184
|
function FocusScopeController(props) {
|
|
17160
17185
|
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() {
|
|
17161
17186
|
return {
|
|
@@ -17426,7 +17451,7 @@ var require_SheetContext_native = __commonJS({
|
|
|
17426
17451
|
}
|
|
17427
17452
|
});
|
|
17428
17453
|
module2.exports = __toCommonJS2(SheetContext_exports);
|
|
17429
|
-
var import_create_context =
|
|
17454
|
+
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, {});
|
|
17430
17455
|
}
|
|
17431
17456
|
});
|
|
17432
17457
|
|
|
@@ -18112,7 +18137,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18112
18137
|
if (isScrolled) return previouslyScrolling = !0, !1;
|
|
18113
18138
|
if (isNearTop && hasScrollView.current && isDraggingUp) return !1;
|
|
18114
18139
|
}
|
|
18115
|
-
return Math.abs(dy) >
|
|
18140
|
+
return Math.abs(dy) > 10;
|
|
18116
18141
|
}
|
|
18117
18142
|
var granted = getShouldSet();
|
|
18118
18143
|
return granted && scrollBridge.setParentDragging(!0), granted;
|
|
@@ -18581,7 +18606,8 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
18581
18606
|
state.current.isScrolling = !0, scrollBridge.scrollLock = !0, setScrollEnabled(!0);
|
|
18582
18607
|
return;
|
|
18583
18608
|
}
|
|
18584
|
-
|
|
18609
|
+
var isDraggingUpFromTopOnFirstScroll = !state.current.isScrolling && dy > 0 && scrollBridge.y === 0;
|
|
18610
|
+
if (!isDraggingUpFromTopOnFirstScroll && scrollBridge.y >= 0) return;
|
|
18585
18611
|
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));
|
|
18586
18612
|
}
|
|
18587
18613
|
},
|
|
@@ -18789,6 +18815,7 @@ var require_createSheet_native = __commonJS({
|
|
|
18789
18815
|
!disableHideBottomOverflow && // @ts-ignore
|
|
18790
18816
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Frame, {
|
|
18791
18817
|
...props,
|
|
18818
|
+
"data-testid": "ensure-sheet-cover-not-overlapping",
|
|
18792
18819
|
componentName: "SheetCover",
|
|
18793
18820
|
// biome-ignore lint/correctness/noChildrenProp: <explanation>
|
|
18794
18821
|
children: null,
|
|
@@ -19246,6 +19273,9 @@ var require_Dialog_native = __commonJS({
|
|
|
19246
19273
|
DialogContent: function() {
|
|
19247
19274
|
return DialogContent;
|
|
19248
19275
|
},
|
|
19276
|
+
DialogContext: function() {
|
|
19277
|
+
return DialogContext;
|
|
19278
|
+
},
|
|
19249
19279
|
DialogDescription: function() {
|
|
19250
19280
|
return DialogDescription;
|
|
19251
19281
|
},
|
|
@@ -19261,6 +19291,9 @@ var require_Dialog_native = __commonJS({
|
|
|
19261
19291
|
DialogPortalFrame: function() {
|
|
19262
19292
|
return DialogPortalFrame;
|
|
19263
19293
|
},
|
|
19294
|
+
DialogProvider: function() {
|
|
19295
|
+
return DialogProvider;
|
|
19296
|
+
},
|
|
19264
19297
|
DialogTitle: function() {
|
|
19265
19298
|
return DialogTitle;
|
|
19266
19299
|
},
|
|
@@ -19270,15 +19303,19 @@ var require_Dialog_native = __commonJS({
|
|
|
19270
19303
|
DialogWarningProvider: function() {
|
|
19271
19304
|
return DialogWarningProvider;
|
|
19272
19305
|
},
|
|
19273
|
-
|
|
19274
|
-
return
|
|
19306
|
+
useDialogContext: function() {
|
|
19307
|
+
return useDialogContext;
|
|
19275
19308
|
}
|
|
19276
19309
|
});
|
|
19277
19310
|
module2.exports = __toCommonJS2(Dialog_exports);
|
|
19278
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native31(), import_animate_presence = require_index_native4(), import_aria_hidden =
|
|
19279
|
-
|
|
19311
|
+
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)(
|
|
19312
|
+
// since we always provide this we can avoid setting here
|
|
19313
|
+
{},
|
|
19314
|
+
"Dialog__"
|
|
19315
|
+
), { useStyledContext: useDialogContext, Provider: DialogProvider } = DialogContext, DialogTriggerFrame = (0, import_core12.styled)(import_core12.View, {
|
|
19316
|
+
name: "DialogTrigger"
|
|
19280
19317
|
}), DialogTrigger = DialogTriggerFrame.styleable(function(props, forwardedRef) {
|
|
19281
|
-
var {
|
|
19318
|
+
var { scope, ...triggerProps } = props, isInsideButton = React4.useContext(import_stacks3.ButtonNestingContext), context = useDialogContext(scope), composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
19282
19319
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.ButtonNestingContext.Provider, {
|
|
19283
19320
|
value: !0,
|
|
19284
19321
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogTriggerFrame, {
|
|
@@ -19292,8 +19329,6 @@ var require_Dialog_native = __commonJS({
|
|
|
19292
19329
|
onPress: (0, import_helpers.composeEventHandlers)(props.onPress, context.onOpenToggle)
|
|
19293
19330
|
})
|
|
19294
19331
|
});
|
|
19295
|
-
}), PORTAL_NAME = "DialogPortal", [PortalProvider2, usePortalContext] = createDialogContext(PORTAL_NAME, {
|
|
19296
|
-
forceMount: void 0
|
|
19297
19332
|
}), DialogPortalFrame = (0, import_core12.styled)(import_stacks3.YStack, {
|
|
19298
19333
|
pointerEvents: "none",
|
|
19299
19334
|
variants: {
|
|
@@ -19312,73 +19347,70 @@ var require_Dialog_native = __commonJS({
|
|
|
19312
19347
|
defaultVariants: {
|
|
19313
19348
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
19314
19349
|
}
|
|
19315
|
-
}), DialogPortalItem = function(
|
|
19316
|
-
var {
|
|
19317
|
-
|
|
19318
|
-
children
|
|
19319
|
-
separator,
|
|
19320
|
-
space,
|
|
19321
|
-
direction: spaceDirection
|
|
19322
|
-
}));
|
|
19323
|
-
var content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogProvider, {
|
|
19324
|
-
scope: __scopeDialog,
|
|
19325
|
-
...context,
|
|
19326
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
19327
|
-
name: themeName,
|
|
19328
|
-
children: childrenSpaced
|
|
19329
|
-
})
|
|
19350
|
+
}), needsRepropagation = import_constants4.isAndroid || import_constants4.isIos && !import_portal2.USE_NATIVE_PORTAL, DialogPortalItem = function(param) {
|
|
19351
|
+
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, {
|
|
19352
|
+
name: themeName,
|
|
19353
|
+
children
|
|
19330
19354
|
});
|
|
19331
|
-
return
|
|
19355
|
+
return needsRepropagation && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.ProvideAdaptContext, {
|
|
19356
|
+
...adaptContext,
|
|
19357
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogProvider, {
|
|
19358
|
+
...context,
|
|
19359
|
+
children: content
|
|
19360
|
+
})
|
|
19361
|
+
})), isAdapted ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
19362
|
+
scope: context.adaptScope,
|
|
19332
19363
|
children: content
|
|
19333
19364
|
}) : context.modal ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
|
|
19334
|
-
hostName: context.modal ? "root" : context.
|
|
19365
|
+
hostName: context.modal ? "root" : context.adaptScope,
|
|
19335
19366
|
children: content
|
|
19336
19367
|
}) : content;
|
|
19337
19368
|
}, DialogPortal = function(props) {
|
|
19338
|
-
var {
|
|
19369
|
+
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);
|
|
19339
19370
|
isShowing && isFullyHidden && setIsFullyHidden(!1);
|
|
19340
19371
|
var handleExitComplete = React4.useCallback(function() {
|
|
19341
19372
|
setIsFullyHidden(!0);
|
|
19342
19373
|
}, []), zIndex = (0, import_core12.getExpandedShorthand)("zIndex", props), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_z_index_stack2.StackZIndexContext, {
|
|
19343
19374
|
zIndex: (0, import_portal2.resolveViewZIndex)(zIndex),
|
|
19344
19375
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
|
|
19376
|
+
passThrough: isAdapted,
|
|
19345
19377
|
onExitComplete: handleExitComplete,
|
|
19346
19378
|
children: isShowing || isAdapted ? children : null
|
|
19347
19379
|
})
|
|
19348
19380
|
});
|
|
19349
19381
|
if (isFullyHidden && !isAdapted) return null;
|
|
19350
|
-
var framedContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
19351
|
-
|
|
19352
|
-
|
|
19353
|
-
|
|
19354
|
-
|
|
19355
|
-
...frameProps,
|
|
19356
|
-
children: contents
|
|
19357
|
-
})
|
|
19382
|
+
var framedContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalFrame, {
|
|
19383
|
+
// passThrough={isAdapted}
|
|
19384
|
+
pointerEvents: isShowing ? "auto" : "none",
|
|
19385
|
+
...frameProps,
|
|
19386
|
+
children: contents
|
|
19358
19387
|
});
|
|
19359
19388
|
return import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
|
|
19360
19389
|
zIndex,
|
|
19361
19390
|
// set to 1000 which "boosts" it 1000 above baseline for current context
|
|
19362
19391
|
// this makes sure its above (this first 1k) popovers on the same layer
|
|
19363
19392
|
stackZIndex: 1e3,
|
|
19393
|
+
passThrough: isAdapted,
|
|
19364
19394
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PassthroughTheme, {
|
|
19395
|
+
passThrough: isAdapted,
|
|
19365
19396
|
children: framedContents
|
|
19366
19397
|
})
|
|
19367
19398
|
}) : isAdapted ? framedContents : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
|
|
19368
|
-
|
|
19399
|
+
context,
|
|
19369
19400
|
children: framedContents
|
|
19370
19401
|
});
|
|
19371
19402
|
}, PassthroughTheme = function(param) {
|
|
19372
|
-
var { children } = param, themeName = (0, import_core12.useThemeName)();
|
|
19403
|
+
var { children, passThrough } = param, themeName = (0, import_core12.useThemeName)();
|
|
19373
19404
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
19405
|
+
passThrough,
|
|
19374
19406
|
name: themeName,
|
|
19375
19407
|
forceClassName: !0,
|
|
19376
19408
|
children
|
|
19377
19409
|
});
|
|
19378
19410
|
}, OVERLAY_NAME = "DialogOverlay", DialogOverlayFrame = (0, import_core12.styled)(import_sheet.Overlay, {
|
|
19379
19411
|
name: OVERLAY_NAME
|
|
19380
|
-
}), DialogOverlay = DialogOverlayFrame.
|
|
19381
|
-
var {
|
|
19412
|
+
}), DialogOverlay = DialogOverlayFrame.styleable(function(param, forwardedRef) {
|
|
19413
|
+
var { scope, ...props } = param, context = useDialogContext(scope), { forceMount = context.forceMount, ...overlayProps } = props, isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
|
|
19382
19414
|
return !forceMount && (!context.modal || isAdapted) ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogOverlayFrame, {
|
|
19383
19415
|
"data-state": getState(context.open),
|
|
19384
19416
|
// TODO: this will be apply for v2
|
|
@@ -19391,7 +19423,7 @@ var require_Dialog_native = __commonJS({
|
|
|
19391
19423
|
...overlayProps,
|
|
19392
19424
|
ref: forwardedRef
|
|
19393
19425
|
});
|
|
19394
|
-
})
|
|
19426
|
+
}), CONTENT_NAME = "DialogContent", DialogContentFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
|
|
19395
19427
|
name: CONTENT_NAME,
|
|
19396
19428
|
tag: "dialog",
|
|
19397
19429
|
variants: {
|
|
@@ -19415,8 +19447,8 @@ var require_Dialog_native = __commonJS({
|
|
|
19415
19447
|
size: "$true",
|
|
19416
19448
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
19417
19449
|
}
|
|
19418
|
-
}), DialogContent = DialogContentFrame.
|
|
19419
|
-
var {
|
|
19450
|
+
}), DialogContent = DialogContentFrame.styleable(function(param, forwardedRef) {
|
|
19451
|
+
var { scope, ...props } = param, context = useDialogContext(scope), { forceMount = context.forceMount, ...contentProps } = props, contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
19420
19452
|
children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogContentModal, {
|
|
19421
19453
|
context,
|
|
19422
19454
|
...contentProps,
|
|
@@ -19435,7 +19467,7 @@ var require_Dialog_native = __commonJS({
|
|
|
19435
19467
|
children: contents
|
|
19436
19468
|
})
|
|
19437
19469
|
});
|
|
19438
|
-
})
|
|
19470
|
+
}), DialogContentModal = /* @__PURE__ */ React4.forwardRef(function(param, forwardedRef) {
|
|
19439
19471
|
var { children, context, ...props } = param, contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.contentRef, contentRef);
|
|
19440
19472
|
return React4.useEffect(function() {
|
|
19441
19473
|
if (import_constants4.isWeb && context.open) {
|
|
@@ -19499,11 +19531,12 @@ var require_Dialog_native = __commonJS({
|
|
|
19499
19531
|
}
|
|
19500
19532
|
});
|
|
19501
19533
|
}), DialogContentImpl = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19502
|
-
var {
|
|
19534
|
+
var { trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, context, ...contentProps } = props, contentRef = React4.useRef(
|
|
19503
19535
|
// TODO react 19 type workaround
|
|
19504
19536
|
void 0
|
|
19505
|
-
), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
19537
|
+
), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
|
|
19506
19538
|
if (isAdapted) return !import_constants4.isWeb && !context.open ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
|
|
19539
|
+
context,
|
|
19507
19540
|
children: contentProps.children
|
|
19508
19541
|
});
|
|
19509
19542
|
var contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogContentFrame, {
|
|
@@ -19544,7 +19577,7 @@ var require_Dialog_native = __commonJS({
|
|
|
19544
19577
|
}), DialogTitleFrame = (0, import_core12.styled)(import_text2.H2, {
|
|
19545
19578
|
name: "DialogTitle"
|
|
19546
19579
|
}), DialogTitle = DialogTitleFrame.styleable(function(props, forwardedRef) {
|
|
19547
|
-
var {
|
|
19580
|
+
var { scope, ...titleProps } = props, context = useDialogContext(scope);
|
|
19548
19581
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogTitleFrame, {
|
|
19549
19582
|
id: context.titleId,
|
|
19550
19583
|
...titleProps,
|
|
@@ -19552,8 +19585,8 @@ var require_Dialog_native = __commonJS({
|
|
|
19552
19585
|
});
|
|
19553
19586
|
}), DialogDescriptionFrame = (0, import_core12.styled)(import_text2.Paragraph, {
|
|
19554
19587
|
name: "DialogDescription"
|
|
19555
|
-
}),
|
|
19556
|
-
var {
|
|
19588
|
+
}), DialogDescription = DialogDescriptionFrame.styleable(function(props, forwardedRef) {
|
|
19589
|
+
var { scope, ...descriptionProps } = props, context = useDialogContext(scope);
|
|
19557
19590
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogDescriptionFrame, {
|
|
19558
19591
|
id: context.descriptionId,
|
|
19559
19592
|
...descriptionProps,
|
|
@@ -19563,10 +19596,7 @@ var require_Dialog_native = __commonJS({
|
|
|
19563
19596
|
name: CLOSE_NAME,
|
|
19564
19597
|
tag: "button"
|
|
19565
19598
|
}), DialogClose = DialogCloseFrame.styleable(function(props, forwardedRef) {
|
|
19566
|
-
var {
|
|
19567
|
-
warn: !1,
|
|
19568
|
-
fallback: {}
|
|
19569
|
-
}), isAdapted = (0, import_adapt.useAdaptIsActive)(), isInsideButton = React4.useContext(import_stacks3.ButtonNestingContext);
|
|
19599
|
+
var { scope, displayWhenAdapted, ...closeProps } = props, context = useDialogContext(scope), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope), isInsideButton = React4.useContext(import_stacks3.ButtonNestingContext);
|
|
19570
19600
|
return isAdapted && !displayWhenAdapted ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogCloseFrame, {
|
|
19571
19601
|
accessibilityLabel: "Dialog Close",
|
|
19572
19602
|
tag: isInsideButton ? "span" : "button",
|
|
@@ -19585,10 +19615,7 @@ var require_Dialog_native = __commonJS({
|
|
|
19585
19615
|
titleName: "DialogTitle",
|
|
19586
19616
|
docsSlug: "dialog"
|
|
19587
19617
|
}), Dialog = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(props, ref) {
|
|
19588
|
-
var {
|
|
19589
|
-
scopeKey,
|
|
19590
|
-
contentId
|
|
19591
|
-
}), triggerRef = React4.useRef(null), contentRef = React4.useRef(null), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
19618
|
+
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)({
|
|
19592
19619
|
prop: openProp,
|
|
19593
19620
|
defaultProp: defaultOpen,
|
|
19594
19621
|
onChange: onOpenChange
|
|
@@ -19598,9 +19625,9 @@ var require_Dialog_native = __commonJS({
|
|
|
19598
19625
|
});
|
|
19599
19626
|
}, [
|
|
19600
19627
|
setOpen
|
|
19601
|
-
]), context = {
|
|
19602
|
-
|
|
19603
|
-
|
|
19628
|
+
]), adaptScope = `DialogAdapt${scope}`, context = {
|
|
19629
|
+
dialogScope: scope,
|
|
19630
|
+
adaptScope,
|
|
19604
19631
|
triggerRef,
|
|
19605
19632
|
contentRef,
|
|
19606
19633
|
contentId,
|
|
@@ -19610,8 +19637,7 @@ var require_Dialog_native = __commonJS({
|
|
|
19610
19637
|
onOpenChange: setOpen,
|
|
19611
19638
|
onOpenToggle,
|
|
19612
19639
|
modal,
|
|
19613
|
-
disableRemoveScroll
|
|
19614
|
-
adaptName
|
|
19640
|
+
disableRemoveScroll
|
|
19615
19641
|
};
|
|
19616
19642
|
return React4.useImperativeHandle(ref, function() {
|
|
19617
19643
|
return {
|
|
@@ -19620,15 +19646,16 @@ var require_Dialog_native = __commonJS({
|
|
|
19620
19646
|
}, [
|
|
19621
19647
|
setOpen
|
|
19622
19648
|
]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
|
|
19623
|
-
scope:
|
|
19649
|
+
scope: adaptScope,
|
|
19624
19650
|
portal: {
|
|
19625
19651
|
forwardProps: props
|
|
19626
19652
|
},
|
|
19627
19653
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogProvider, {
|
|
19654
|
+
scope,
|
|
19628
19655
|
...context,
|
|
19629
19656
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogSheetController, {
|
|
19630
19657
|
onOpenChange: setOpen,
|
|
19631
|
-
|
|
19658
|
+
scope,
|
|
19632
19659
|
children
|
|
19633
19660
|
})
|
|
19634
19661
|
})
|
|
@@ -19644,11 +19671,8 @@ var require_Dialog_native = __commonJS({
|
|
|
19644
19671
|
Sheet: import_sheet.Sheet.Controlled,
|
|
19645
19672
|
FocusScope: import_focus_scope.FocusScopeController,
|
|
19646
19673
|
Adapt: import_adapt.Adapt
|
|
19647
|
-
}),
|
|
19648
|
-
var
|
|
19649
|
-
return `${scopeKey || contentId}DialogAdapt`;
|
|
19650
|
-
}, DialogSheetController = function(props) {
|
|
19651
|
-
var context = useDialogContext("DialogSheetController", props.__scopeDialog), isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
19674
|
+
}), DialogSheetController = function(props) {
|
|
19675
|
+
var context = useDialogContext(props.scope), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
|
|
19652
19676
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_sheet.SheetController, {
|
|
19653
19677
|
onOpenChange: function(val) {
|
|
19654
19678
|
if (isAdapted) {
|
|
@@ -19779,15 +19803,12 @@ var require_AlertDialog_native = __commonJS({
|
|
|
19779
19803
|
},
|
|
19780
19804
|
AlertDialogTrigger: function() {
|
|
19781
19805
|
return AlertDialogTrigger;
|
|
19782
|
-
},
|
|
19783
|
-
createAlertDialogScope: function() {
|
|
19784
|
-
return createAlertDialogScope;
|
|
19785
19806
|
}
|
|
19786
19807
|
});
|
|
19787
19808
|
module2.exports = __toCommonJS2(AlertDialog_exports);
|
|
19788
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_core12 = require_index_native20(),
|
|
19789
|
-
|
|
19790
|
-
|
|
19809
|
+
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) {
|
|
19810
|
+
return AlertScopePrefix + scope;
|
|
19811
|
+
}, ROOT_NAME = "AlertDialog", TRIGGER_NAME = "AlertDialogTrigger", NativeAlertDialogTriggerFrame = (0, import_core12.styled)(import_core12.View, {
|
|
19791
19812
|
name: TRIGGER_NAME
|
|
19792
19813
|
}), AlertDialogTrigger = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19793
19814
|
if (props.__native) {
|
|
@@ -19797,46 +19818,40 @@ var require_AlertDialog_native = __commonJS({
|
|
|
19797
19818
|
onPress: (0, import_helpers.composeEventHandlers)(onPress, __onPress)
|
|
19798
19819
|
});
|
|
19799
19820
|
}
|
|
19800
|
-
var {
|
|
19821
|
+
var { scope, ...triggerProps } = props;
|
|
19801
19822
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogTrigger, {
|
|
19802
|
-
|
|
19823
|
+
scope: getAlertDialogScope(scope),
|
|
19803
19824
|
...triggerProps,
|
|
19804
19825
|
ref: forwardedRef
|
|
19805
19826
|
});
|
|
19806
|
-
})
|
|
19807
|
-
|
|
19808
|
-
var PORTAL_NAME = "AlertDialogPortal", AlertDialogPortal = function(props) {
|
|
19809
|
-
var { __scopeAlertDialog, ...portalProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
19827
|
+
}), AlertDialogPortal = function(props) {
|
|
19828
|
+
var { scope, ...portalProps } = props;
|
|
19810
19829
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogPortal, {
|
|
19811
|
-
|
|
19830
|
+
scope: getAlertDialogScope(scope),
|
|
19812
19831
|
...portalProps
|
|
19813
19832
|
});
|
|
19814
|
-
}
|
|
19815
|
-
AlertDialogPortal.displayName = PORTAL_NAME;
|
|
19816
|
-
var OVERLAY_NAME = "AlertDialogOverlay", AlertDialogOverlayFrame = (0, import_core12.styled)(import_dialog.DialogOverlayFrame, {
|
|
19833
|
+
}, OVERLAY_NAME = "AlertDialogOverlay", AlertDialogOverlayFrame = (0, import_core12.styled)(import_dialog.DialogOverlayFrame, {
|
|
19817
19834
|
name: OVERLAY_NAME
|
|
19818
19835
|
}), AlertDialogOverlay = AlertDialogOverlayFrame.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19819
|
-
var {
|
|
19836
|
+
var { scope, ...overlayProps } = props;
|
|
19820
19837
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogOverlay, {
|
|
19821
|
-
|
|
19838
|
+
scope: getAlertDialogScope(scope),
|
|
19822
19839
|
...overlayProps,
|
|
19823
19840
|
ref: forwardedRef
|
|
19824
19841
|
});
|
|
19825
|
-
}))
|
|
19826
|
-
|
|
19827
|
-
var CONTENT_NAME = "AlertDialogContent", [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME), AlertDialogContent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19828
|
-
var { __scopeAlertDialog, children, ...contentProps } = props, dialogScope = useDialogScope(__scopeAlertDialog), contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), cancelRef = React4.useRef(null);
|
|
19842
|
+
})), CONTENT_NAME = "AlertDialogContent", { Provider: AlertDialogContextProvider, useStyledContext: useAlertDialogContentContext } = (0, import_core12.createStyledContext)({}, "AlertDialogContext"), AlertDialogContent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19843
|
+
var { scope, children, ...contentProps } = props, dialogScope = getAlertDialogScope(scope), contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), cancelRef = React4.useRef(null);
|
|
19829
19844
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogWarningProvider, {
|
|
19830
19845
|
contentName: CONTENT_NAME,
|
|
19831
19846
|
titleName: TITLE_NAME,
|
|
19832
19847
|
docsSlug: "alert-dialog",
|
|
19833
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
19834
|
-
scope
|
|
19848
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AlertDialogContextProvider, {
|
|
19849
|
+
scope,
|
|
19835
19850
|
cancelRef,
|
|
19836
19851
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_dialog.DialogContent, {
|
|
19837
19852
|
// @ts-ignore
|
|
19838
19853
|
role: "alertdialog",
|
|
19839
|
-
|
|
19854
|
+
scope: dialogScope,
|
|
19840
19855
|
...contentProps,
|
|
19841
19856
|
ref: composedRefs,
|
|
19842
19857
|
onOpenAutoFocus: (0, import_helpers.composeEventHandlers)(contentProps.onOpenAutoFocus, function(event) {
|
|
@@ -19868,46 +19883,36 @@ var require_AlertDialog_native = __commonJS({
|
|
|
19868
19883
|
})
|
|
19869
19884
|
})
|
|
19870
19885
|
});
|
|
19871
|
-
})
|
|
19872
|
-
|
|
19873
|
-
var TITLE_NAME = "AlertDialogTitle", AlertDialogTitle = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19874
|
-
var { __scopeAlertDialog, ...titleProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
19886
|
+
}), TITLE_NAME = "AlertDialogTitle", AlertDialogTitle = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19887
|
+
var { scope, ...titleProps } = props;
|
|
19875
19888
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogTitle, {
|
|
19876
|
-
|
|
19889
|
+
scope: getAlertDialogScope(scope),
|
|
19877
19890
|
...titleProps,
|
|
19878
19891
|
ref: forwardedRef
|
|
19879
19892
|
});
|
|
19880
|
-
})
|
|
19881
|
-
|
|
19882
|
-
var DESCRIPTION_NAME = "AlertDialogDescription", AlertDialogDescription = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19883
|
-
var { __scopeAlertDialog, ...descriptionProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
19893
|
+
}), DESCRIPTION_NAME = "AlertDialogDescription", AlertDialogDescription = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19894
|
+
var { scope, ...descriptionProps } = props;
|
|
19884
19895
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogDescription, {
|
|
19885
|
-
|
|
19896
|
+
scope: getAlertDialogScope(scope),
|
|
19886
19897
|
...descriptionProps,
|
|
19887
19898
|
ref: forwardedRef
|
|
19888
19899
|
});
|
|
19889
|
-
})
|
|
19890
|
-
|
|
19891
|
-
var ACTION_NAME = "AlertDialogAction", AlertDialogAction = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19892
|
-
var { __scopeAlertDialog, ...actionProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
19900
|
+
}), ACTION_NAME = "AlertDialogAction", AlertDialogAction = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19901
|
+
var { scope, ...actionProps } = props;
|
|
19893
19902
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogClose, {
|
|
19894
|
-
|
|
19903
|
+
scope: getAlertDialogScope(scope),
|
|
19895
19904
|
...actionProps,
|
|
19896
19905
|
ref: forwardedRef
|
|
19897
19906
|
});
|
|
19898
|
-
})
|
|
19899
|
-
|
|
19900
|
-
var CANCEL_NAME = "AlertDialogCancel", AlertDialogCancel = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19901
|
-
var { __scopeAlertDialog, ...cancelProps } = props, { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog), dialogScope = useDialogScope(__scopeAlertDialog), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, cancelRef);
|
|
19907
|
+
}), CANCEL_NAME = "AlertDialogCancel", AlertDialogCancel = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19908
|
+
var { scope, ...cancelProps } = props, { cancelRef } = useAlertDialogContentContext(scope), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, cancelRef);
|
|
19902
19909
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogClose, {
|
|
19903
|
-
|
|
19910
|
+
scope: getAlertDialogScope(scope),
|
|
19904
19911
|
...cancelProps,
|
|
19905
19912
|
ref
|
|
19906
19913
|
});
|
|
19907
|
-
})
|
|
19908
|
-
|
|
19909
|
-
var AlertDialogInner = function(props) {
|
|
19910
|
-
var { __scopeAlertDialog, native, ...alertDialogProps } = props, dialogScope = useDialogScope(__scopeAlertDialog), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
19914
|
+
}), AlertDialogInner = function(props) {
|
|
19915
|
+
var { scope, native, ...alertDialogProps } = props, dialogScope = getAlertDialogScope(scope), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
19911
19916
|
prop: props.open,
|
|
19912
19917
|
defaultProp: props.defaultOpen || !1,
|
|
19913
19918
|
onChange: props.onOpenChange,
|
|
@@ -19953,7 +19958,7 @@ var require_AlertDialog_native = __commonJS({
|
|
|
19953
19958
|
setOpen(!0);
|
|
19954
19959
|
}
|
|
19955
19960
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.Dialog, {
|
|
19956
|
-
|
|
19961
|
+
scope: dialogScope,
|
|
19957
19962
|
...alertDialogProps,
|
|
19958
19963
|
modal: !0
|
|
19959
19964
|
});
|
|
@@ -20444,7 +20449,7 @@ var require_Avatar_native = __commonJS({
|
|
|
20444
20449
|
}
|
|
20445
20450
|
});
|
|
20446
20451
|
module2.exports = __toCommonJS2(Avatar_exports);
|
|
20447
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context =
|
|
20452
|
+
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) {
|
|
20448
20453
|
var _getShapeSize, { __scopeAvatar, src, onLoadingStatusChange = function() {
|
|
20449
20454
|
}, ...imageProps } = props, context = useAvatarContext(IMAGE_NAME, __scopeAvatar), [status, setStatus] = React4.useState("idle"), shapeSize = (0, import_core12.getVariableValue)((_getShapeSize = (0, import_shapes.getShapeSize)(
|
|
20450
20455
|
context.size,
|
|
@@ -21826,7 +21831,7 @@ var require_Label_native = __commonJS({
|
|
|
21826
21831
|
}
|
|
21827
21832
|
});
|
|
21828
21833
|
module2.exports = __toCommonJS2(Label_exports);
|
|
21829
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_create_context =
|
|
21834
|
+
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, {
|
|
21830
21835
|
id: void 0,
|
|
21831
21836
|
controlRef: {
|
|
21832
21837
|
current: null
|
|
@@ -22625,7 +22630,7 @@ var require_Form_native = __commonJS({
|
|
|
22625
22630
|
}
|
|
22626
22631
|
});
|
|
22627
22632
|
module2.exports = __toCommonJS2(Form_exports);
|
|
22628
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context =
|
|
22633
|
+
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, {
|
|
22629
22634
|
name: FORM_NAME,
|
|
22630
22635
|
tag: "form"
|
|
22631
22636
|
}), [createFormContext] = (0, import_create_context.createContextScope)(FORM_NAME), [FormProvider, useFormContext] = createFormContext(FORM_NAME), TRIGGER_NAME = "FormTrigger", FormTriggerFrame = (0, import_core12.styled)(import_core12.View, {
|
|
@@ -22867,7 +22872,7 @@ var require_Group_native = __commonJS({
|
|
|
22867
22872
|
}
|
|
22868
22873
|
});
|
|
22869
22874
|
module2.exports = __toCommonJS2(Group_exports);
|
|
22870
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context =
|
|
22875
|
+
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, {
|
|
22871
22876
|
name: "GroupFrame",
|
|
22872
22877
|
variants: {
|
|
22873
22878
|
unstyled: {
|
|
@@ -23815,17 +23820,20 @@ var require_Popper_native = __commonJS({
|
|
|
23815
23820
|
PopperArrow: function() {
|
|
23816
23821
|
return PopperArrow;
|
|
23817
23822
|
},
|
|
23823
|
+
PopperArrowFrame: function() {
|
|
23824
|
+
return PopperArrowFrame;
|
|
23825
|
+
},
|
|
23818
23826
|
PopperContent: function() {
|
|
23819
23827
|
return PopperContent;
|
|
23820
23828
|
},
|
|
23821
23829
|
PopperContentFrame: function() {
|
|
23822
23830
|
return PopperContentFrame;
|
|
23823
23831
|
},
|
|
23824
|
-
|
|
23825
|
-
return
|
|
23832
|
+
PopperContextFast: function() {
|
|
23833
|
+
return PopperContextFast;
|
|
23826
23834
|
},
|
|
23827
|
-
|
|
23828
|
-
return
|
|
23835
|
+
PopperContextSlow: function() {
|
|
23836
|
+
return PopperContextSlow;
|
|
23829
23837
|
},
|
|
23830
23838
|
PopperPositionContext: function() {
|
|
23831
23839
|
return PopperPositionContext;
|
|
@@ -23833,20 +23841,59 @@ var require_Popper_native = __commonJS({
|
|
|
23833
23841
|
PopperProvider: function() {
|
|
23834
23842
|
return PopperProvider;
|
|
23835
23843
|
},
|
|
23844
|
+
PopperProviderFast: function() {
|
|
23845
|
+
return PopperProviderFast;
|
|
23846
|
+
},
|
|
23847
|
+
PopperProviderSlow: function() {
|
|
23848
|
+
return PopperProviderSlow;
|
|
23849
|
+
},
|
|
23836
23850
|
setupPopper: function() {
|
|
23837
23851
|
return setupPopper;
|
|
23838
23852
|
},
|
|
23839
23853
|
usePopperContext: function() {
|
|
23840
23854
|
return usePopperContext;
|
|
23841
23855
|
},
|
|
23842
|
-
|
|
23843
|
-
return
|
|
23856
|
+
usePopperContextSlow: function() {
|
|
23857
|
+
return usePopperContextSlow;
|
|
23844
23858
|
}
|
|
23845
23859
|
});
|
|
23846
23860
|
module2.exports = __toCommonJS2(Popper_exports);
|
|
23847
|
-
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(),
|
|
23848
|
-
|
|
23849
|
-
|
|
23861
|
+
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)(
|
|
23862
|
+
// since we always provide this we can avoid setting here
|
|
23863
|
+
{},
|
|
23864
|
+
"Popper__"
|
|
23865
|
+
), PopperPositionContext = import_core12.createStyledContext, { useStyledContext: usePopperContext, Provider: PopperProviderFast } = PopperContextFast, PopperContextSlow = (0, import_core12.createStyledContext)(
|
|
23866
|
+
// since we always provide this we can avoid setting here
|
|
23867
|
+
{},
|
|
23868
|
+
"PopperSlow__"
|
|
23869
|
+
), { useStyledContext: usePopperContextSlow, Provider: PopperProviderSlow } = PopperContextSlow, PopperProvider = function(param) {
|
|
23870
|
+
var { scope, children, ...context } = param, slowContext = getContextSlow(context);
|
|
23871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperProviderFast, {
|
|
23872
|
+
scope,
|
|
23873
|
+
...context,
|
|
23874
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperProviderSlow, {
|
|
23875
|
+
scope,
|
|
23876
|
+
...slowContext,
|
|
23877
|
+
children
|
|
23878
|
+
})
|
|
23879
|
+
});
|
|
23880
|
+
};
|
|
23881
|
+
function getContextSlow(context) {
|
|
23882
|
+
return {
|
|
23883
|
+
refs: context.refs,
|
|
23884
|
+
size: context.size,
|
|
23885
|
+
arrowRef: context.arrowRef,
|
|
23886
|
+
arrowStyle: context.arrowStyle,
|
|
23887
|
+
onArrowSize: context.onArrowSize,
|
|
23888
|
+
hasFloating: context.hasFloating,
|
|
23889
|
+
strategy: context.strategy,
|
|
23890
|
+
update: context.update,
|
|
23891
|
+
context: context.context,
|
|
23892
|
+
getFloatingProps: context.getFloatingProps,
|
|
23893
|
+
getReferenceProps: context.getFloatingProps
|
|
23894
|
+
};
|
|
23895
|
+
}
|
|
23896
|
+
var checkFloating = {
|
|
23850
23897
|
name: "checkFloating",
|
|
23851
23898
|
fn(data) {
|
|
23852
23899
|
return {
|
|
@@ -23860,7 +23907,7 @@ var require_Popper_native = __commonJS({
|
|
|
23860
23907
|
Object.assign(setupOptions, options);
|
|
23861
23908
|
}
|
|
23862
23909
|
function Popper(props) {
|
|
23863
|
-
var _middlewareData_checkFloating, { children, size: size2, strategy = "absolute", placement = "bottom", stayInFrame, allowFlip, offset: offset2, disableRTL, resize, passThrough, open,
|
|
23910
|
+
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)({
|
|
23864
23911
|
open: passThrough ? !1 : open || !0,
|
|
23865
23912
|
strategy,
|
|
23866
23913
|
placement,
|
|
@@ -23909,31 +23956,39 @@ var require_Popper_native = __commonJS({
|
|
|
23909
23956
|
arrowRef: setArrow,
|
|
23910
23957
|
arrowStyle: middlewareData.arrow,
|
|
23911
23958
|
onArrowSize: setArrowSize,
|
|
23912
|
-
scope: __scopePopper,
|
|
23913
23959
|
hasFloating: (_middlewareData_checkFloating = middlewareData.checkFloating) === null || _middlewareData_checkFloating === void 0 ? void 0 : _middlewareData_checkFloating.hasFloating,
|
|
23914
23960
|
...floating
|
|
23915
23961
|
};
|
|
23916
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
23917
|
-
|
|
23918
|
-
|
|
23919
|
-
|
|
23920
|
-
children
|
|
23921
|
-
})
|
|
23962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperProvider, {
|
|
23963
|
+
scope,
|
|
23964
|
+
...popperContext,
|
|
23965
|
+
children
|
|
23922
23966
|
});
|
|
23923
23967
|
}
|
|
23924
23968
|
var PopperAnchor = import_stacks3.YStack.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
23925
|
-
var { virtualRef,
|
|
23969
|
+
var { virtualRef, scope, ...anchorProps } = props, context = usePopperContextSlow(scope), { getReferenceProps, refs, update } = context, ref = React4.useRef(null);
|
|
23926
23970
|
React4.useEffect(function() {
|
|
23927
23971
|
virtualRef && refs.setReference(virtualRef.current);
|
|
23928
23972
|
}, [
|
|
23929
23973
|
virtualRef
|
|
23930
23974
|
]);
|
|
23931
|
-
var stackProps =
|
|
23932
|
-
ref: composedRefs,
|
|
23933
|
-
...anchorProps
|
|
23934
|
-
};
|
|
23975
|
+
var stackProps = anchorProps, refProps = getReferenceProps ? getReferenceProps(stackProps) : null, composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref);
|
|
23935
23976
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
23936
|
-
...
|
|
23977
|
+
...refProps,
|
|
23978
|
+
ref: composedRefs,
|
|
23979
|
+
// this helps us with handling scoped poppers with many different targets
|
|
23980
|
+
// basically we wait for mouseEnter to ever set a reference and remove it on leave
|
|
23981
|
+
// otherwise floating ui gets confused by having >1 reference
|
|
23982
|
+
onMouseEnter: function(e) {
|
|
23983
|
+
ref.current instanceof HTMLElement && (refs.setReference(ref.current), setTimeout(function() {
|
|
23984
|
+
var _refProps_onPointerEnter;
|
|
23985
|
+
(_refProps_onPointerEnter = refProps.onPointerEnter) === null || _refProps_onPointerEnter === void 0 || _refProps_onPointerEnter.call(refProps, e), update();
|
|
23986
|
+
}));
|
|
23987
|
+
},
|
|
23988
|
+
onMouseLeave: function(e) {
|
|
23989
|
+
var _refProps_onMouseLeave;
|
|
23990
|
+
refProps == null || (_refProps_onMouseLeave = refProps.onMouseLeave) === null || _refProps_onMouseLeave === void 0 || _refProps_onMouseLeave.call(refProps, e);
|
|
23991
|
+
}
|
|
23937
23992
|
});
|
|
23938
23993
|
})), PopperContentFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
|
|
23939
23994
|
name: "PopperContent",
|
|
@@ -23960,7 +24015,7 @@ var require_Popper_native = __commonJS({
|
|
|
23960
24015
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
23961
24016
|
}
|
|
23962
24017
|
}), PopperContent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
23963
|
-
var {
|
|
24018
|
+
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);
|
|
23964
24019
|
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
23965
24020
|
needsMeasure && x && y && setNeedsMeasure(!1);
|
|
23966
24021
|
}, [
|
|
@@ -23978,9 +24033,9 @@ var require_Popper_native = __commonJS({
|
|
|
23978
24033
|
position: strategy,
|
|
23979
24034
|
opacity: 1,
|
|
23980
24035
|
...enableAnimationForPositionChange && {
|
|
23981
|
-
// apply animation but disable it on initial render to avoid animating from 0 to the first position
|
|
23982
24036
|
animation: rest.animation,
|
|
23983
24037
|
animateOnly: needsMeasure ? [] : rest.animateOnly,
|
|
24038
|
+
// apply animation but disable it on initial render to avoid animating from 0 to the first position
|
|
23984
24039
|
animatePresence: !1
|
|
23985
24040
|
},
|
|
23986
24041
|
...hide2 && {
|
|
@@ -23988,7 +24043,7 @@ var require_Popper_native = __commonJS({
|
|
|
23988
24043
|
animateOnly: []
|
|
23989
24044
|
}
|
|
23990
24045
|
}, { style, ...floatingProps } = getFloatingProps ? getFloatingProps(frameProps) : frameProps;
|
|
23991
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.
|
|
24046
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
23992
24047
|
passThrough,
|
|
23993
24048
|
ref: contentRefs,
|
|
23994
24049
|
...passThrough ? null : floatingProps,
|
|
@@ -24041,8 +24096,8 @@ var require_Popper_native = __commonJS({
|
|
|
24041
24096
|
right: "left",
|
|
24042
24097
|
bottom: "top",
|
|
24043
24098
|
left: "right"
|
|
24044
|
-
}, PopperArrow =
|
|
24045
|
-
var _context_arrowStyle, _context_arrowStyle1, {
|
|
24099
|
+
}, PopperArrow = /* @__PURE__ */ React4.forwardRef(function(propsIn, forwardedRef) {
|
|
24100
|
+
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, {
|
|
24046
24101
|
shift: -2,
|
|
24047
24102
|
bounds: [
|
|
24048
24103
|
2
|
|
@@ -24272,8 +24327,12 @@ var require_Popover_native = __commonJS({
|
|
|
24272
24327
|
}
|
|
24273
24328
|
});
|
|
24274
24329
|
module2.exports = __toCommonJS2(Popover_exports);
|
|
24275
|
-
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 =
|
|
24276
|
-
|
|
24330
|
+
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)(
|
|
24331
|
+
// since we always provide this we can avoid setting here
|
|
24332
|
+
{},
|
|
24333
|
+
"Popover__"
|
|
24334
|
+
), usePopoverContext = PopoverContext.useStyledContext, PopoverAnchor = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24335
|
+
var { scope, ...rest } = props, context = usePopoverContext(scope), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
|
|
24277
24336
|
return React4.useEffect(function() {
|
|
24278
24337
|
return onCustomAnchorAdd(), function() {
|
|
24279
24338
|
return onCustomAnchorRemove();
|
|
@@ -24282,12 +24341,12 @@ var require_Popover_native = __commonJS({
|
|
|
24282
24341
|
onCustomAnchorAdd,
|
|
24283
24342
|
onCustomAnchorRemove
|
|
24284
24343
|
]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperAnchor, {
|
|
24285
|
-
|
|
24344
|
+
scope,
|
|
24286
24345
|
...rest,
|
|
24287
24346
|
ref: forwardedRef
|
|
24288
24347
|
});
|
|
24289
24348
|
}), PopoverTrigger = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24290
|
-
var {
|
|
24349
|
+
var { scope, ...rest } = props, context = usePopoverContext(scope), anchorTo = context.anchorTo, composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
24291
24350
|
if (!props.children) return null;
|
|
24292
24351
|
var trigger = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
24293
24352
|
"aria-expanded": context.open,
|
|
@@ -24326,12 +24385,14 @@ var require_Popover_native = __commonJS({
|
|
|
24326
24385
|
...virtualRef && {
|
|
24327
24386
|
virtualRef
|
|
24328
24387
|
},
|
|
24329
|
-
|
|
24388
|
+
scope,
|
|
24330
24389
|
asChild: rest.asChild,
|
|
24331
24390
|
children: trigger
|
|
24332
24391
|
});
|
|
24333
|
-
}),
|
|
24334
|
-
|
|
24392
|
+
}), PopoverContentFrame = (0, import_core12.styled)(import_popper.PopperContentFrame, {
|
|
24393
|
+
name: "Popover"
|
|
24394
|
+
}), PopoverContent = PopoverContentFrame.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24395
|
+
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);
|
|
24335
24396
|
if (context.open && isFullyHidden && setIsFullyHidden(!1), React4.useEffect(function() {
|
|
24336
24397
|
if (context.open) {
|
|
24337
24398
|
var content = contentRef.current;
|
|
@@ -24343,17 +24404,18 @@ var require_Popover_native = __commonJS({
|
|
|
24343
24404
|
var _contentImplProps_pointerEvents;
|
|
24344
24405
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverPortal, {
|
|
24345
24406
|
passThrough: context.breakpointActive,
|
|
24346
|
-
|
|
24407
|
+
context,
|
|
24347
24408
|
zIndex,
|
|
24348
24409
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Stack, {
|
|
24349
24410
|
passThrough: context.breakpointActive,
|
|
24350
24411
|
pointerEvents: context.open ? (_contentImplProps_pointerEvents = contentImplProps.pointerEvents) !== null && _contentImplProps_pointerEvents !== void 0 ? _contentImplProps_pointerEvents : "auto" : "none",
|
|
24351
24412
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContentImpl, {
|
|
24352
24413
|
...contentImplProps,
|
|
24414
|
+
context,
|
|
24353
24415
|
enableRemoveScroll,
|
|
24354
24416
|
ref: composedRefs,
|
|
24355
24417
|
setIsFullyHidden,
|
|
24356
|
-
|
|
24418
|
+
scope,
|
|
24357
24419
|
// we make sure we're not trapping once it's been closed
|
|
24358
24420
|
// (closed !== unmounted when animating out)
|
|
24359
24421
|
trapFocus: trapFocus ?? context.open,
|
|
@@ -24379,7 +24441,7 @@ var require_Popover_native = __commonJS({
|
|
|
24379
24441
|
})
|
|
24380
24442
|
});
|
|
24381
24443
|
})), useParentContexts = function(scope) {
|
|
24382
|
-
var popperContext = (0, import_popper.usePopperContext)(scope
|
|
24444
|
+
var context = usePopoverContext(scope), popperContext = (0, import_popper.usePopperContext)(scope), adaptContext = (0, import_adapt.useAdaptContext)(context.adaptScope);
|
|
24383
24445
|
return {
|
|
24384
24446
|
popperContext,
|
|
24385
24447
|
adaptContext,
|
|
@@ -24387,9 +24449,9 @@ var require_Popover_native = __commonJS({
|
|
|
24387
24449
|
};
|
|
24388
24450
|
};
|
|
24389
24451
|
function RepropagateParentContexts(param) {
|
|
24390
|
-
var { adaptContext, children, context, popperContext
|
|
24391
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.
|
|
24392
|
-
scope,
|
|
24452
|
+
var { adaptContext, children, context, popperContext } = param;
|
|
24453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperProvider, {
|
|
24454
|
+
scope: context.popoverScope,
|
|
24393
24455
|
...popperContext,
|
|
24394
24456
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
|
|
24395
24457
|
...context,
|
|
@@ -24401,40 +24463,40 @@ var require_Popover_native = __commonJS({
|
|
|
24401
24463
|
});
|
|
24402
24464
|
}
|
|
24403
24465
|
var PortalAdaptSafe = function(param) {
|
|
24404
|
-
var { children,
|
|
24466
|
+
var { children, context } = param;
|
|
24405
24467
|
if (needsRepropagation) {
|
|
24406
|
-
var
|
|
24468
|
+
var parentContexts = useParentContexts(context.popoverScope);
|
|
24407
24469
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
24470
|
+
scope: context.adaptScope,
|
|
24408
24471
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RepropagateParentContexts, {
|
|
24409
|
-
scope,
|
|
24410
24472
|
...parentContexts,
|
|
24411
24473
|
children
|
|
24412
24474
|
})
|
|
24413
24475
|
});
|
|
24414
24476
|
}
|
|
24415
24477
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
24478
|
+
scope: context.adaptScope,
|
|
24416
24479
|
children
|
|
24417
24480
|
});
|
|
24418
24481
|
};
|
|
24419
|
-
function PopoverPortal(
|
|
24420
|
-
var
|
|
24482
|
+
function PopoverPortal(param) {
|
|
24483
|
+
var { context, zIndex, passThrough, children } = param, themeName = (0, import_core12.useThemeName)(), content = children;
|
|
24421
24484
|
if (needsRepropagation) {
|
|
24422
|
-
var parentContexts = useParentContexts(
|
|
24485
|
+
var parentContexts = useParentContexts(context.popoverScope);
|
|
24423
24486
|
content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RepropagateParentContexts, {
|
|
24424
|
-
scope,
|
|
24425
24487
|
...parentContexts,
|
|
24426
24488
|
children: content
|
|
24427
24489
|
});
|
|
24428
24490
|
}
|
|
24429
24491
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
|
|
24430
|
-
passThrough
|
|
24492
|
+
passThrough,
|
|
24431
24493
|
stackZIndex: !0,
|
|
24432
24494
|
zIndex,
|
|
24433
24495
|
children: (
|
|
24434
24496
|
/* forceClassName avoids forced re-mount renders for some reason... see the HeadMenu as you change tints a few times */
|
|
24435
24497
|
/* without this you'll see the site menu re-rendering. It must be something in wrapping children in Theme */
|
|
24436
24498
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
24437
|
-
passThrough
|
|
24499
|
+
passThrough,
|
|
24438
24500
|
contain: !0,
|
|
24439
24501
|
forceClassName: !0,
|
|
24440
24502
|
name: themeName,
|
|
@@ -24447,7 +24509,7 @@ var require_Popover_native = __commonJS({
|
|
|
24447
24509
|
});
|
|
24448
24510
|
}
|
|
24449
24511
|
var PopoverContentImpl = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24450
|
-
var { trapFocus,
|
|
24512
|
+
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() {
|
|
24451
24513
|
setIsFullyHidden == null || setIsFullyHidden(!0);
|
|
24452
24514
|
}, [
|
|
24453
24515
|
setIsFullyHidden
|
|
@@ -24463,19 +24525,20 @@ var require_Popover_native = __commonJS({
|
|
|
24463
24525
|
lazyMount,
|
|
24464
24526
|
passThrough: context.breakpointActive,
|
|
24465
24527
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContent, {
|
|
24466
|
-
|
|
24528
|
+
scope,
|
|
24467
24529
|
"data-state": getState(open),
|
|
24468
24530
|
id: context.contentId,
|
|
24469
24531
|
ref: forwardedRef,
|
|
24470
24532
|
passThrough: context.breakpointActive,
|
|
24471
24533
|
...contentProps,
|
|
24472
24534
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalAdaptSafe, {
|
|
24535
|
+
context,
|
|
24473
24536
|
children: contents
|
|
24474
24537
|
})
|
|
24475
24538
|
}, context.contentId)
|
|
24476
24539
|
});
|
|
24477
24540
|
}), PopoverClose = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24478
|
-
var {
|
|
24541
|
+
var { scope, ...rest } = props, context = usePopoverContext(scope);
|
|
24479
24542
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, {
|
|
24480
24543
|
...rest,
|
|
24481
24544
|
ref: forwardedRef,
|
|
@@ -24485,16 +24548,16 @@ var require_Popover_native = __commonJS({
|
|
|
24485
24548
|
return context == null || (_context_onOpenChange = context.onOpenChange) === null || _context_onOpenChange === void 0 ? void 0 : _context_onOpenChange.call(context, !1, "press");
|
|
24486
24549
|
})
|
|
24487
24550
|
});
|
|
24488
|
-
}), PopoverArrow = import_popper.
|
|
24489
|
-
var {
|
|
24551
|
+
}), PopoverArrow = import_popper.PopperArrowFrame.styleable(function(props, forwardedRef) {
|
|
24552
|
+
var { scope, ...rest } = props, context = usePopoverContext(scope), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
|
|
24490
24553
|
return isAdapted ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperArrow, {
|
|
24491
|
-
|
|
24554
|
+
scope,
|
|
24492
24555
|
componentName: "PopoverArrow",
|
|
24493
24556
|
...rest,
|
|
24494
24557
|
ref: forwardedRef
|
|
24495
24558
|
});
|
|
24496
|
-
}), PopoverScrollView = /* @__PURE__ */ React4.forwardRef(function(
|
|
24497
|
-
var context = usePopoverContext(
|
|
24559
|
+
}), PopoverScrollView = /* @__PURE__ */ React4.forwardRef(function(param, ref) {
|
|
24560
|
+
var { scope, ...props } = param, context = usePopoverContext(scope);
|
|
24498
24561
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_scroll_view.ScrollView, {
|
|
24499
24562
|
ref,
|
|
24500
24563
|
// when adapted, no pointer events!
|
|
@@ -24503,14 +24566,16 @@ var require_Popover_native = __commonJS({
|
|
|
24503
24566
|
passThrough: context.breakpointActive,
|
|
24504
24567
|
...props
|
|
24505
24568
|
});
|
|
24506
|
-
}), Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(
|
|
24507
|
-
var id = React4.useId()
|
|
24569
|
+
}), DEFAULT_SCOPE = "", Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(param, ref) {
|
|
24570
|
+
var { scope = DEFAULT_SCOPE, ...props } = param, id = React4.useId(), adaptScope = `PopoverAdapt${scope}`;
|
|
24508
24571
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
|
|
24509
|
-
scope:
|
|
24572
|
+
scope: adaptScope,
|
|
24510
24573
|
portal: !0,
|
|
24511
24574
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverInner, {
|
|
24575
|
+
adaptScope,
|
|
24512
24576
|
ref,
|
|
24513
24577
|
id,
|
|
24578
|
+
scope,
|
|
24514
24579
|
...props
|
|
24515
24580
|
})
|
|
24516
24581
|
});
|
|
@@ -24525,7 +24590,7 @@ var require_Popover_native = __commonJS({
|
|
|
24525
24590
|
Sheet: import_sheet.Sheet.Controlled,
|
|
24526
24591
|
FocusScope: import_focus_scope.FocusScopeController
|
|
24527
24592
|
}), PopoverInner = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24528
|
-
var { children, open: openProp, defaultOpen, onOpenChange,
|
|
24593
|
+
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)({
|
|
24529
24594
|
prop: keepChildrenMountedProp,
|
|
24530
24595
|
defaultProp: !1,
|
|
24531
24596
|
transition: keepChildrenMountedProp === "lazy"
|
|
@@ -24537,7 +24602,7 @@ var require_Popover_native = __commonJS({
|
|
|
24537
24602
|
}
|
|
24538
24603
|
}), handleOpenChange = (0, import_core12.useEvent)(function(val, via) {
|
|
24539
24604
|
viaRef.current = via, setOpen(val);
|
|
24540
|
-
}), isAdapted = (0, import_adapt.useAdaptIsActive)(), floatingContext = (0, import_useFloatingContext.useFloatingContext)({
|
|
24605
|
+
}), isAdapted = (0, import_adapt.useAdaptIsActive)(adaptScope), floatingContext = (0, import_useFloatingContext.useFloatingContext)({
|
|
24541
24606
|
open,
|
|
24542
24607
|
setOpen: handleOpenChange,
|
|
24543
24608
|
disable: isAdapted,
|
|
@@ -24562,6 +24627,8 @@ var require_Popover_native = __commonJS({
|
|
|
24562
24627
|
};
|
|
24563
24628
|
});
|
|
24564
24629
|
var popoverContext = {
|
|
24630
|
+
popoverScope: scope,
|
|
24631
|
+
adaptScope,
|
|
24565
24632
|
id,
|
|
24566
24633
|
contentId: React4.useId(),
|
|
24567
24634
|
triggerRef,
|
|
@@ -24582,22 +24649,23 @@ var require_Popover_native = __commonJS({
|
|
|
24582
24649
|
keepChildrenMounted
|
|
24583
24650
|
}, memoizedChildren = React4.useMemo(function() {
|
|
24584
24651
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
|
|
24585
|
-
scope
|
|
24652
|
+
scope,
|
|
24586
24653
|
...popoverContext,
|
|
24587
24654
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverSheetController, {
|
|
24655
|
+
context: popoverContext,
|
|
24588
24656
|
onOpenChange: setOpen,
|
|
24589
24657
|
children
|
|
24590
24658
|
})
|
|
24591
24659
|
});
|
|
24592
24660
|
}, [
|
|
24593
|
-
|
|
24661
|
+
scope,
|
|
24594
24662
|
setOpen,
|
|
24595
24663
|
children,
|
|
24596
24664
|
...Object.values(popoverContext)
|
|
24597
24665
|
]), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.Popper, {
|
|
24598
24666
|
open,
|
|
24599
24667
|
passThrough: isAdapted,
|
|
24600
|
-
|
|
24668
|
+
scope,
|
|
24601
24669
|
stayInFrame: !0,
|
|
24602
24670
|
...restProps,
|
|
24603
24671
|
children: memoizedChildren
|
|
@@ -24613,7 +24681,7 @@ var require_Popover_native = __commonJS({
|
|
|
24613
24681
|
return open ? "open" : "closed";
|
|
24614
24682
|
}
|
|
24615
24683
|
var PopoverSheetController = function(param) {
|
|
24616
|
-
var {
|
|
24684
|
+
var { context, ...props } = param, showSheet = useShowPopoverSheet(context), breakpointActive = context.breakpointActive, getShowSheet = (0, import_core12.useGet)(showSheet);
|
|
24617
24685
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_sheet.SheetController, {
|
|
24618
24686
|
onOpenChange: function(val) {
|
|
24619
24687
|
if (getShowSheet()) {
|
|
@@ -24626,7 +24694,7 @@ var require_Popover_native = __commonJS({
|
|
|
24626
24694
|
children: props.children
|
|
24627
24695
|
});
|
|
24628
24696
|
}, useShowPopoverSheet = function(context) {
|
|
24629
|
-
var isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
24697
|
+
var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
|
|
24630
24698
|
return context.open === !1 ? !1 : isAdapted;
|
|
24631
24699
|
};
|
|
24632
24700
|
}
|
|
@@ -24739,7 +24807,7 @@ var require_Progress_native = __commonJS({
|
|
|
24739
24807
|
}
|
|
24740
24808
|
});
|
|
24741
24809
|
module2.exports = __toCommonJS2(Progress_exports);
|
|
24742
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context =
|
|
24810
|
+
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, {
|
|
24743
24811
|
name: INDICATOR_NAME,
|
|
24744
24812
|
variants: {
|
|
24745
24813
|
unstyled: {
|
|
@@ -25717,7 +25785,7 @@ var require_RadioGroupStyledContext_native = __commonJS({
|
|
|
25717
25785
|
var import_core12 = require_index_native20(), RadioGroupStyledContext = (0, import_core12.createStyledContext)({
|
|
25718
25786
|
size: "$true",
|
|
25719
25787
|
scaleIcon: 1
|
|
25720
|
-
});
|
|
25788
|
+
}, "RadioGroup");
|
|
25721
25789
|
}
|
|
25722
25790
|
});
|
|
25723
25791
|
|
|
@@ -26004,71 +26072,6 @@ var require_index_native66 = __commonJS({
|
|
|
26004
26072
|
}
|
|
26005
26073
|
});
|
|
26006
26074
|
|
|
26007
|
-
// ../select/dist/cjs/constants.native.js
|
|
26008
|
-
var require_constants_native5 = __commonJS({
|
|
26009
|
-
"../select/dist/cjs/constants.native.js"(exports2, module2) {
|
|
26010
|
-
"use strict";
|
|
26011
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
26012
|
-
for (var name in all) __defProp2(target, name, {
|
|
26013
|
-
get: all[name],
|
|
26014
|
-
enumerable: !0
|
|
26015
|
-
});
|
|
26016
|
-
}, __copyProps2 = function(to, from, except, desc) {
|
|
26017
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
26018
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
26019
|
-
for (var _loop = function() {
|
|
26020
|
-
var key = _step.value;
|
|
26021
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
26022
|
-
get: function() {
|
|
26023
|
-
return from[key];
|
|
26024
|
-
},
|
|
26025
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
26026
|
-
});
|
|
26027
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
26028
|
-
} catch (err) {
|
|
26029
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
26030
|
-
} finally {
|
|
26031
|
-
try {
|
|
26032
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
26033
|
-
} finally {
|
|
26034
|
-
if (_didIteratorError)
|
|
26035
|
-
throw _iteratorError;
|
|
26036
|
-
}
|
|
26037
|
-
}
|
|
26038
|
-
return to;
|
|
26039
|
-
}, __toCommonJS2 = function(mod) {
|
|
26040
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
26041
|
-
value: !0
|
|
26042
|
-
}), mod);
|
|
26043
|
-
}, constants_exports = {};
|
|
26044
|
-
__export2(constants_exports, {
|
|
26045
|
-
FALLBACK_THRESHOLD: function() {
|
|
26046
|
-
return FALLBACK_THRESHOLD;
|
|
26047
|
-
},
|
|
26048
|
-
MIN_HEIGHT: function() {
|
|
26049
|
-
return MIN_HEIGHT;
|
|
26050
|
-
},
|
|
26051
|
-
SCROLL_ARROW_THRESHOLD: function() {
|
|
26052
|
-
return SCROLL_ARROW_THRESHOLD;
|
|
26053
|
-
},
|
|
26054
|
-
SCROLL_ARROW_VELOCITY: function() {
|
|
26055
|
-
return SCROLL_ARROW_VELOCITY;
|
|
26056
|
-
},
|
|
26057
|
-
SELECT_NAME: function() {
|
|
26058
|
-
return SELECT_NAME;
|
|
26059
|
-
},
|
|
26060
|
-
VIEWPORT_NAME: function() {
|
|
26061
|
-
return VIEWPORT_NAME;
|
|
26062
|
-
},
|
|
26063
|
-
WINDOW_PADDING: function() {
|
|
26064
|
-
return WINDOW_PADDING;
|
|
26065
|
-
}
|
|
26066
|
-
});
|
|
26067
|
-
module2.exports = __toCommonJS2(constants_exports);
|
|
26068
|
-
var SELECT_NAME = "Select", WINDOW_PADDING = 8, SCROLL_ARROW_VELOCITY = 8, SCROLL_ARROW_THRESHOLD = 8, MIN_HEIGHT = 80, FALLBACK_THRESHOLD = 16, VIEWPORT_NAME = "SelectViewport";
|
|
26069
|
-
}
|
|
26070
|
-
});
|
|
26071
|
-
|
|
26072
26075
|
// ../select/dist/cjs/context.native.js
|
|
26073
26076
|
var require_context_native2 = __commonJS({
|
|
26074
26077
|
"../select/dist/cjs/context.native.js"(exports2, module2) {
|
|
@@ -26116,18 +26119,6 @@ var require_context_native2 = __commonJS({
|
|
|
26116
26119
|
SelectProvider: function() {
|
|
26117
26120
|
return SelectProvider;
|
|
26118
26121
|
},
|
|
26119
|
-
createSelectContext: function() {
|
|
26120
|
-
return createSelectContext;
|
|
26121
|
-
},
|
|
26122
|
-
createSelectItemParentContext: function() {
|
|
26123
|
-
return createSelectItemParentContext;
|
|
26124
|
-
},
|
|
26125
|
-
createSelectItemParentScope: function() {
|
|
26126
|
-
return createSelectItemParentScope;
|
|
26127
|
-
},
|
|
26128
|
-
createSelectScope: function() {
|
|
26129
|
-
return createSelectScope;
|
|
26130
|
-
},
|
|
26131
26122
|
useSelectContext: function() {
|
|
26132
26123
|
return useSelectContext;
|
|
26133
26124
|
},
|
|
@@ -26136,14 +26127,14 @@ var require_context_native2 = __commonJS({
|
|
|
26136
26127
|
}
|
|
26137
26128
|
});
|
|
26138
26129
|
module2.exports = __toCommonJS2(context_exports);
|
|
26139
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"),
|
|
26140
|
-
var {
|
|
26130
|
+
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) {
|
|
26131
|
+
var { context, itemContext, children } = param;
|
|
26141
26132
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectProvider, {
|
|
26142
26133
|
isInSheet: !0,
|
|
26143
|
-
scope:
|
|
26134
|
+
scope: context.scopeName,
|
|
26144
26135
|
...context,
|
|
26145
26136
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemParentProvider, {
|
|
26146
|
-
scope:
|
|
26137
|
+
scope: context.scopeName,
|
|
26147
26138
|
...itemContext,
|
|
26148
26139
|
children
|
|
26149
26140
|
})
|
|
@@ -26314,13 +26305,13 @@ var require_SelectItem_native = __commonJS({
|
|
|
26314
26305
|
}
|
|
26315
26306
|
});
|
|
26316
26307
|
module2.exports = __toCommonJS2(SelectItem_exports);
|
|
26317
|
-
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",
|
|
26318
|
-
var {
|
|
26308
|
+
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) {
|
|
26309
|
+
var { scope, value, disabled = !1, textValue: textValueProp, index, ...restProps } = props, { props: listItemProps } = (0, import_list_item.useListItem)({
|
|
26319
26310
|
...!props.unstyled && {
|
|
26320
26311
|
ellipse: !0
|
|
26321
26312
|
},
|
|
26322
26313
|
...restProps
|
|
26323
|
-
}), context = (0, import_context.useSelectItemParentContext)(
|
|
26314
|
+
}), 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);
|
|
26324
26315
|
React4.useEffect(function() {
|
|
26325
26316
|
return activeIndexSubscribe(function(i) {
|
|
26326
26317
|
var isActive = index === i;
|
|
@@ -26377,7 +26368,7 @@ var require_SelectItem_native = __commonJS({
|
|
|
26377
26368
|
handleSelect
|
|
26378
26369
|
]);
|
|
26379
26370
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemContextProvider, {
|
|
26380
|
-
scope
|
|
26371
|
+
scope,
|
|
26381
26372
|
value,
|
|
26382
26373
|
textId: textId || "",
|
|
26383
26374
|
isSelected,
|
|
@@ -26494,16 +26485,16 @@ var require_SelectItemText_native = __commonJS({
|
|
|
26494
26485
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
26495
26486
|
}
|
|
26496
26487
|
}), SelectItemText = SelectItemTextFrame.styleable(function(props, forwardedRef) {
|
|
26497
|
-
var {
|
|
26488
|
+
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);
|
|
26498
26489
|
return contents.current = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemTextFrame, {
|
|
26499
26490
|
className,
|
|
26500
26491
|
size: itemParentContext.size,
|
|
26501
26492
|
id: itemContext.textId,
|
|
26502
26493
|
...itemTextProps,
|
|
26503
26494
|
ref: composedRefs
|
|
26504
|
-
}),
|
|
26495
|
+
}), (0, import_core12.useIsomorphicLayoutEffect)(function() {
|
|
26505
26496
|
itemParentContext.initialValue === itemContext.value && !context.selectedIndex && context.setSelectedItem(contents.current);
|
|
26506
|
-
}, []),
|
|
26497
|
+
}, []), (0, import_core12.useIsomorphicLayoutEffect)(function() {
|
|
26507
26498
|
return itemParentContext.valueSubscribe(function(val) {
|
|
26508
26499
|
val === itemContext.value && context.setSelectedItem(contents.current);
|
|
26509
26500
|
});
|
|
@@ -26628,7 +26619,7 @@ var require_SelectTrigger_native = __commonJS({
|
|
|
26628
26619
|
});
|
|
26629
26620
|
module2.exports = __toCommonJS2(SelectTrigger_exports);
|
|
26630
26621
|
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) {
|
|
26631
|
-
var _context_floatingContext, {
|
|
26622
|
+
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);
|
|
26632
26623
|
return itemParentContext.shouldRenderWebNative ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_list_item.ListItem, {
|
|
26633
26624
|
componentName: TRIGGER_NAME,
|
|
26634
26625
|
unstyled,
|
|
@@ -26665,6 +26656,71 @@ var require_SelectTrigger_native = __commonJS({
|
|
|
26665
26656
|
}
|
|
26666
26657
|
});
|
|
26667
26658
|
|
|
26659
|
+
// ../select/dist/cjs/constants.native.js
|
|
26660
|
+
var require_constants_native5 = __commonJS({
|
|
26661
|
+
"../select/dist/cjs/constants.native.js"(exports2, module2) {
|
|
26662
|
+
"use strict";
|
|
26663
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
26664
|
+
for (var name in all) __defProp2(target, name, {
|
|
26665
|
+
get: all[name],
|
|
26666
|
+
enumerable: !0
|
|
26667
|
+
});
|
|
26668
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
26669
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
26670
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
26671
|
+
for (var _loop = function() {
|
|
26672
|
+
var key = _step.value;
|
|
26673
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
26674
|
+
get: function() {
|
|
26675
|
+
return from[key];
|
|
26676
|
+
},
|
|
26677
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
26678
|
+
});
|
|
26679
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
26680
|
+
} catch (err) {
|
|
26681
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
26682
|
+
} finally {
|
|
26683
|
+
try {
|
|
26684
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
26685
|
+
} finally {
|
|
26686
|
+
if (_didIteratorError)
|
|
26687
|
+
throw _iteratorError;
|
|
26688
|
+
}
|
|
26689
|
+
}
|
|
26690
|
+
return to;
|
|
26691
|
+
}, __toCommonJS2 = function(mod) {
|
|
26692
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
26693
|
+
value: !0
|
|
26694
|
+
}), mod);
|
|
26695
|
+
}, constants_exports = {};
|
|
26696
|
+
__export2(constants_exports, {
|
|
26697
|
+
FALLBACK_THRESHOLD: function() {
|
|
26698
|
+
return FALLBACK_THRESHOLD;
|
|
26699
|
+
},
|
|
26700
|
+
MIN_HEIGHT: function() {
|
|
26701
|
+
return MIN_HEIGHT;
|
|
26702
|
+
},
|
|
26703
|
+
SCROLL_ARROW_THRESHOLD: function() {
|
|
26704
|
+
return SCROLL_ARROW_THRESHOLD;
|
|
26705
|
+
},
|
|
26706
|
+
SCROLL_ARROW_VELOCITY: function() {
|
|
26707
|
+
return SCROLL_ARROW_VELOCITY;
|
|
26708
|
+
},
|
|
26709
|
+
SELECT_NAME: function() {
|
|
26710
|
+
return SELECT_NAME;
|
|
26711
|
+
},
|
|
26712
|
+
VIEWPORT_NAME: function() {
|
|
26713
|
+
return VIEWPORT_NAME;
|
|
26714
|
+
},
|
|
26715
|
+
WINDOW_PADDING: function() {
|
|
26716
|
+
return WINDOW_PADDING;
|
|
26717
|
+
}
|
|
26718
|
+
});
|
|
26719
|
+
module2.exports = __toCommonJS2(constants_exports);
|
|
26720
|
+
var SELECT_NAME = "Select", WINDOW_PADDING = 8, SCROLL_ARROW_VELOCITY = 8, SCROLL_ARROW_THRESHOLD = 8, MIN_HEIGHT = 80, FALLBACK_THRESHOLD = 16, VIEWPORT_NAME = "SelectViewport";
|
|
26721
|
+
}
|
|
26722
|
+
});
|
|
26723
|
+
|
|
26668
26724
|
// ../select/dist/cjs/SelectViewport.native.js
|
|
26669
26725
|
var require_SelectViewport_native = __commonJS({
|
|
26670
26726
|
"../select/dist/cjs/SelectViewport.native.js"(exports2, module2) {
|
|
@@ -26709,12 +26765,12 @@ var require_SelectViewport_native = __commonJS({
|
|
|
26709
26765
|
});
|
|
26710
26766
|
module2.exports = __toCommonJS2(SelectViewport_native_exports);
|
|
26711
26767
|
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) {
|
|
26712
|
-
var {
|
|
26768
|
+
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)();
|
|
26713
26769
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
26770
|
+
scope: context.adaptScope,
|
|
26714
26771
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
26715
26772
|
name: themeName,
|
|
26716
26773
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.ForwardSelectContext, {
|
|
26717
|
-
__scopeSelect,
|
|
26718
26774
|
itemContext: itemParentContext,
|
|
26719
26775
|
context,
|
|
26720
26776
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptContext.Provider, {
|
|
@@ -26773,7 +26829,7 @@ var require_useSelectBreakpointActive_native = __commonJS({
|
|
|
26773
26829
|
});
|
|
26774
26830
|
module2.exports = __toCommonJS2(useSelectBreakpointActive_exports);
|
|
26775
26831
|
var import_adapt = require_index_native31(), useShowSelectSheet = function(context) {
|
|
26776
|
-
var breakpointActive = (0, import_adapt.useAdaptIsActive)();
|
|
26832
|
+
var breakpointActive = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
|
|
26777
26833
|
return context.open === !1 ? !1 : breakpointActive;
|
|
26778
26834
|
};
|
|
26779
26835
|
}
|
|
@@ -26847,7 +26903,7 @@ var require_Select_native = __commonJS({
|
|
|
26847
26903
|
name: VALUE_NAME,
|
|
26848
26904
|
userSelect: "none"
|
|
26849
26905
|
}), SelectValue = SelectValueFrame.styleable(function(param, forwardedRef) {
|
|
26850
|
-
var {
|
|
26906
|
+
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;
|
|
26851
26907
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectValueFrame, {
|
|
26852
26908
|
...!props.unstyled && {
|
|
26853
26909
|
size: itemParentContext.size,
|
|
@@ -26878,18 +26934,18 @@ var require_Select_native = __commonJS({
|
|
|
26878
26934
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_text2.Paragraph, {
|
|
26879
26935
|
children: "\u25BC"
|
|
26880
26936
|
})
|
|
26881
|
-
}),
|
|
26882
|
-
name:
|
|
26937
|
+
}), SelectItemIndicatorFrame = (0, import_core12.styled)(import_stacks3.XStack, {
|
|
26938
|
+
name: "SelectItemIndicator"
|
|
26883
26939
|
}), SelectItemIndicator = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
26884
|
-
var {
|
|
26940
|
+
var { scope, ...itemIndicatorProps } = props, context = (0, import_context.useSelectItemParentContext)(scope), itemContext = (0, import_SelectItem.useSelectItemContext)(scope);
|
|
26885
26941
|
return context.shouldRenderWebNative ? null : itemContext.isSelected ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemIndicatorFrame, {
|
|
26886
26942
|
"aria-hidden": !0,
|
|
26887
26943
|
...itemIndicatorProps,
|
|
26888
26944
|
ref: forwardedRef
|
|
26889
26945
|
}) : null;
|
|
26890
|
-
})
|
|
26891
|
-
|
|
26892
|
-
|
|
26946
|
+
}), GROUP_NAME = "SelectGroup", { Provider: SelectGroupContextProvider, useStyledContext: useSelectGroupContext } = (0, import_core12.createStyledContext)({
|
|
26947
|
+
id: ""
|
|
26948
|
+
}, "SelectGroup"), SelectGroupFrame = (0, import_core12.styled)(import_stacks3.YStack, {
|
|
26893
26949
|
name: GROUP_NAME,
|
|
26894
26950
|
width: "100%"
|
|
26895
26951
|
}), NativeSelectTextFrame = (0, import_core12.styled)(import_text2.SizableText, {
|
|
@@ -26925,7 +26981,7 @@ var require_Select_native = __commonJS({
|
|
|
26925
26981
|
size: "$2"
|
|
26926
26982
|
}
|
|
26927
26983
|
}), SelectGroup = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
26928
|
-
var {
|
|
26984
|
+
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() {
|
|
26929
26985
|
return itemParentContext.shouldRenderWebNative ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(NativeSelectFrame, {
|
|
26930
26986
|
asChild: !0,
|
|
26931
26987
|
size: size2,
|
|
@@ -26955,14 +27011,14 @@ var require_Select_native = __commonJS({
|
|
|
26955
27011
|
});
|
|
26956
27012
|
}();
|
|
26957
27013
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectGroupContextProvider, {
|
|
26958
|
-
scope
|
|
27014
|
+
scope,
|
|
26959
27015
|
id: groupId || "",
|
|
26960
27016
|
children: content
|
|
26961
27017
|
});
|
|
26962
27018
|
});
|
|
26963
27019
|
SelectGroup.displayName = GROUP_NAME;
|
|
26964
27020
|
var LABEL_NAME = "SelectLabel", SelectLabel = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
26965
|
-
var {
|
|
27021
|
+
var { scope, ...labelProps } = props, context = (0, import_context.useSelectItemParentContext)(scope), groupContext = useSelectGroupContext(scope);
|
|
26966
27022
|
return context.shouldRenderWebNative ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_list_item.ListItem, {
|
|
26967
27023
|
tag: "div",
|
|
26968
27024
|
componentName: LABEL_NAME,
|
|
@@ -26977,7 +27033,7 @@ var require_Select_native = __commonJS({
|
|
|
26977
27033
|
var SelectSeparator = (0, import_core12.styled)(import_separator.Separator, {
|
|
26978
27034
|
name: "SelectSeparator"
|
|
26979
27035
|
}), SelectSheetController = function(props) {
|
|
26980
|
-
var context = (0, import_context.useSelectContext)(
|
|
27036
|
+
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);
|
|
26981
27037
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_sheet.SheetController, {
|
|
26982
27038
|
onOpenChange: function(val) {
|
|
26983
27039
|
getShowSheet() && props.onOpenChange(val);
|
|
@@ -26991,12 +27047,13 @@ var require_Select_native = __commonJS({
|
|
|
26991
27047
|
children: props.children
|
|
26992
27048
|
});
|
|
26993
27049
|
}, Select = (0, import_helpers.withStaticProperties)(function(props) {
|
|
26994
|
-
var
|
|
27050
|
+
var adaptScope = `AdaptSelect${props.scope || ""}`;
|
|
26995
27051
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
|
|
26996
|
-
scope:
|
|
27052
|
+
scope: adaptScope,
|
|
26997
27053
|
portal: !0,
|
|
26998
27054
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectInner, {
|
|
26999
|
-
|
|
27055
|
+
scope: props.scope,
|
|
27056
|
+
adaptScope,
|
|
27000
27057
|
...props
|
|
27001
27058
|
})
|
|
27002
27059
|
});
|
|
@@ -27035,7 +27092,7 @@ var require_Select_native = __commonJS({
|
|
|
27035
27092
|
];
|
|
27036
27093
|
}
|
|
27037
27094
|
function SelectInner(props) {
|
|
27038
|
-
var {
|
|
27095
|
+
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() {
|
|
27039
27096
|
return {};
|
|
27040
27097
|
}, {})[1], [selectedItem, setSelectedItem] = React4.useState(null), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
27041
27098
|
prop: openProp,
|
|
@@ -27078,7 +27135,9 @@ var require_Select_native = __commonJS({
|
|
|
27078
27135
|
});
|
|
27079
27136
|
}, 1, {}, []);
|
|
27080
27137
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.SelectItemParentProvider, {
|
|
27081
|
-
|
|
27138
|
+
scopeName: scope,
|
|
27139
|
+
scope,
|
|
27140
|
+
adaptScope,
|
|
27082
27141
|
initialValue: React4.useMemo(function() {
|
|
27083
27142
|
return value;
|
|
27084
27143
|
}, [
|
|
@@ -27092,9 +27151,8 @@ var require_Select_native = __commonJS({
|
|
|
27092
27151
|
onChange: React4.useCallback(function(val) {
|
|
27093
27152
|
setValue(val), emitValue(val);
|
|
27094
27153
|
}, []),
|
|
27095
|
-
onActiveChange: (0, import_core12.useEvent)(function() {
|
|
27096
|
-
|
|
27097
|
-
onActiveChange == null || onActiveChange(...args);
|
|
27154
|
+
onActiveChange: (0, import_core12.useEvent)(function(value2, index) {
|
|
27155
|
+
onActiveChange == null || onActiveChange(value2, index);
|
|
27098
27156
|
}),
|
|
27099
27157
|
setSelectedIndex,
|
|
27100
27158
|
setValueAtIndex: React4.useCallback(function(index, value2) {
|
|
@@ -27102,7 +27160,9 @@ var require_Select_native = __commonJS({
|
|
|
27102
27160
|
}, []),
|
|
27103
27161
|
shouldRenderWebNative,
|
|
27104
27162
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.SelectProvider, {
|
|
27105
|
-
scope
|
|
27163
|
+
scope,
|
|
27164
|
+
scopeName: scope,
|
|
27165
|
+
adaptScope,
|
|
27106
27166
|
disablePreventBodyScroll,
|
|
27107
27167
|
dir,
|
|
27108
27168
|
blockSelection: !1,
|
|
@@ -27112,7 +27172,6 @@ var require_Select_native = __commonJS({
|
|
|
27112
27172
|
forceUpdate,
|
|
27113
27173
|
valueNode,
|
|
27114
27174
|
onValueNodeChange: setValueNode,
|
|
27115
|
-
scopeKey: props.scopeKey,
|
|
27116
27175
|
activeIndex,
|
|
27117
27176
|
selectedIndex,
|
|
27118
27177
|
setActiveIndex: setActiveIndexDebounced,
|
|
@@ -27121,7 +27180,7 @@ var require_Select_native = __commonJS({
|
|
|
27121
27180
|
native,
|
|
27122
27181
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectSheetController, {
|
|
27123
27182
|
onOpenChange: setOpen,
|
|
27124
|
-
|
|
27183
|
+
scope,
|
|
27125
27184
|
children: shouldRenderWebNative ? children : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectImpl, {
|
|
27126
27185
|
activeIndexRef,
|
|
27127
27186
|
listContentRef,
|
|
@@ -30057,6 +30116,71 @@ var require_index_native74 = __commonJS({
|
|
|
30057
30116
|
}
|
|
30058
30117
|
});
|
|
30059
30118
|
|
|
30119
|
+
// ../../core/use-window-dimensions/dist/cjs/helpers.native.js
|
|
30120
|
+
var require_helpers_native4 = __commonJS({
|
|
30121
|
+
"../../core/use-window-dimensions/dist/cjs/helpers.native.js"(exports2, module2) {
|
|
30122
|
+
"use strict";
|
|
30123
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
30124
|
+
for (var name in all) __defProp2(target, name, {
|
|
30125
|
+
get: all[name],
|
|
30126
|
+
enumerable: !0
|
|
30127
|
+
});
|
|
30128
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
30129
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
30130
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
30131
|
+
for (var _loop = function() {
|
|
30132
|
+
var key = _step.value;
|
|
30133
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
30134
|
+
get: function() {
|
|
30135
|
+
return from[key];
|
|
30136
|
+
},
|
|
30137
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
30138
|
+
});
|
|
30139
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
30140
|
+
} catch (err) {
|
|
30141
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
30142
|
+
} finally {
|
|
30143
|
+
try {
|
|
30144
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
30145
|
+
} finally {
|
|
30146
|
+
if (_didIteratorError)
|
|
30147
|
+
throw _iteratorError;
|
|
30148
|
+
}
|
|
30149
|
+
}
|
|
30150
|
+
return to;
|
|
30151
|
+
}, __toCommonJS2 = function(mod) {
|
|
30152
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
30153
|
+
value: !0
|
|
30154
|
+
}), mod);
|
|
30155
|
+
}, helpers_native_exports = {};
|
|
30156
|
+
__export2(helpers_native_exports, {
|
|
30157
|
+
getWindowSize: function() {
|
|
30158
|
+
return getWindowSize;
|
|
30159
|
+
},
|
|
30160
|
+
subscribe: function() {
|
|
30161
|
+
return subscribe;
|
|
30162
|
+
}
|
|
30163
|
+
});
|
|
30164
|
+
module2.exports = __toCommonJS2(helpers_native_exports);
|
|
30165
|
+
var import_react_native4 = require_fake_react_native();
|
|
30166
|
+
function getWindowSize() {
|
|
30167
|
+
return import_react_native4.Dimensions.get("window");
|
|
30168
|
+
}
|
|
30169
|
+
var cbs = /* @__PURE__ */ new Set();
|
|
30170
|
+
import_react_native4.Dimensions.addEventListener("change", function(param) {
|
|
30171
|
+
var { window: window2 } = param;
|
|
30172
|
+
cbs.forEach(function(cb) {
|
|
30173
|
+
return cb(window2);
|
|
30174
|
+
});
|
|
30175
|
+
});
|
|
30176
|
+
function subscribe(cb) {
|
|
30177
|
+
return cbs.add(cb), function() {
|
|
30178
|
+
return cbs.delete(cb);
|
|
30179
|
+
};
|
|
30180
|
+
}
|
|
30181
|
+
}
|
|
30182
|
+
});
|
|
30183
|
+
|
|
30060
30184
|
// ../../core/use-window-dimensions/dist/cjs/index.native.js
|
|
30061
30185
|
var require_index_native75 = __commonJS({
|
|
30062
30186
|
"../../core/use-window-dimensions/dist/cjs/index.native.js"(exports2, module2) {
|
|
@@ -30115,30 +30239,19 @@ var require_index_native75 = __commonJS({
|
|
|
30115
30239
|
}
|
|
30116
30240
|
});
|
|
30117
30241
|
module2.exports = __toCommonJS2(index_exports2);
|
|
30118
|
-
var import_react3 = __toESM2(require("react")), import_constants4 = require_index_native6(),
|
|
30119
|
-
|
|
30120
|
-
|
|
30242
|
+
var import_react3 = __toESM2(require("react")), import_constants4 = require_index_native6(), import_helpers = require_helpers_native4(), initialValue = {
|
|
30243
|
+
width: 800,
|
|
30244
|
+
height: 600,
|
|
30245
|
+
scale: 1,
|
|
30246
|
+
fontScale: 1
|
|
30121
30247
|
};
|
|
30122
30248
|
function configureInitialWindowDimensions(next) {
|
|
30123
30249
|
Object.assign(initialValue, next);
|
|
30124
30250
|
}
|
|
30125
|
-
import_react_native4.Dimensions.addEventListener("change", function() {
|
|
30126
|
-
cbs.forEach(function(cb) {
|
|
30127
|
-
return cb(window);
|
|
30128
|
-
});
|
|
30129
|
-
});
|
|
30130
|
-
var cbs = /* @__PURE__ */ new Set();
|
|
30131
|
-
function subscribe(cb) {
|
|
30132
|
-
return cbs.add(cb), function() {
|
|
30133
|
-
return cbs.delete(cb);
|
|
30134
|
-
};
|
|
30135
|
-
}
|
|
30136
30251
|
function useWindowDimensions() {
|
|
30137
30252
|
var { serverValue = initialValue } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
30138
|
-
return import_react3.default.useSyncExternalStore(subscribe, function() {
|
|
30139
|
-
return
|
|
30140
|
-
}, function() {
|
|
30141
|
-
return import_constants4.isWeb ? serverValue : import_react_native4.Dimensions.get("window");
|
|
30253
|
+
return import_react3.default.useSyncExternalStore(import_helpers.subscribe, import_helpers.getWindowSize, function() {
|
|
30254
|
+
return import_constants4.isWeb ? serverValue : (0, import_helpers.getWindowSize)();
|
|
30142
30255
|
});
|
|
30143
30256
|
}
|
|
30144
30257
|
}
|
|
@@ -30349,7 +30462,7 @@ __reExport(index_exports, __toESM(require_index_native46()), module.exports);
|
|
|
30349
30462
|
__reExport(index_exports, __toESM(require_index_native47()), module.exports);
|
|
30350
30463
|
__reExport(index_exports, __toESM(require_index_native52()), module.exports);
|
|
30351
30464
|
__reExport(index_exports, __toESM(require_index_native11()), module.exports);
|
|
30352
|
-
__reExport(index_exports, __toESM(
|
|
30465
|
+
__reExport(index_exports, __toESM(require_index_native33()), module.exports);
|
|
30353
30466
|
__reExport(index_exports, __toESM(require_index_native39()), module.exports);
|
|
30354
30467
|
__reExport(index_exports, __toESM(require_index_native44()), module.exports);
|
|
30355
30468
|
__reExport(index_exports, __toESM(require_index_native53()), module.exports);
|