tamagui 1.130.8 → 1.131.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +11 -11
- package/dist/cjs/views/Input.cjs +1 -1
- package/dist/cjs/views/TextArea.cjs +2 -2
- package/dist/native.js +575 -470
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +575 -470
- package/dist/test.native.js.map +3 -3
- package/package.json +55 -55
package/dist/test.native.js
CHANGED
|
@@ -3041,7 +3041,7 @@ var require_useMedia_native = __commonJS({
|
|
|
3041
3041
|
internalRef.current || (internalRef.current = {
|
|
3042
3042
|
keys: /* @__PURE__ */ new Set()
|
|
3043
3043
|
});
|
|
3044
|
-
var { keys, lastState =
|
|
3044
|
+
var { keys, lastState = mediaState3 } = internalRef.current;
|
|
3045
3045
|
keys.size && keys.clear();
|
|
3046
3046
|
var state = (0, import_react3.useSyncExternalStore)(subscribe, function() {
|
|
3047
3047
|
if (componentState != null && componentState.enabled) return internalRef.current.lastState = mediaState3, mediaState3;
|
|
@@ -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
|
}
|
|
@@ -13722,10 +13727,10 @@ var require_Collection_native = __commonJS({
|
|
|
13722
13727
|
current: void 0
|
|
13723
13728
|
},
|
|
13724
13729
|
itemMap: /* @__PURE__ */ new Map()
|
|
13725
|
-
}), CollectionProvider = function(props) {
|
|
13726
|
-
var {
|
|
13730
|
+
}, "Toast"), CollectionProvider = function(props) {
|
|
13731
|
+
var { scope, children } = props, ref = import_react3.default.useRef(void 0), itemMap = import_react3.default.useRef(/* @__PURE__ */ new Map()).current;
|
|
13727
13732
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CollectionProviderImpl, {
|
|
13728
|
-
scope
|
|
13733
|
+
scope,
|
|
13729
13734
|
itemMap,
|
|
13730
13735
|
collectionRef: ref,
|
|
13731
13736
|
children
|
|
@@ -13733,7 +13738,7 @@ var require_Collection_native = __commonJS({
|
|
|
13733
13738
|
};
|
|
13734
13739
|
CollectionProvider.displayName = "CollectionProvider";
|
|
13735
13740
|
var COLLECTION_SLOT_NAME = name + "CollectionSlot", CollectionSlot = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
13736
|
-
var {
|
|
13741
|
+
var { scope, children } = props, context = useCollectionContext(scope), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.collectionRef);
|
|
13737
13742
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Slot, {
|
|
13738
13743
|
ref: composedRefs,
|
|
13739
13744
|
children
|
|
@@ -13741,7 +13746,7 @@ var require_Collection_native = __commonJS({
|
|
|
13741
13746
|
});
|
|
13742
13747
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
13743
13748
|
var ITEM_SLOT_NAME = name + "CollectionItemSlot", ITEM_DATA_ATTR = "data-collection-item", CollectionItemSlot = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
13744
|
-
var {
|
|
13749
|
+
var { scope, children, ...itemData } = props, ref = import_react3.default.useRef(void 0), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), context = useCollectionContext(scope);
|
|
13745
13750
|
return import_react3.default.useEffect(function() {
|
|
13746
13751
|
return context.itemMap.set(ref, {
|
|
13747
13752
|
ref,
|
|
@@ -13756,8 +13761,8 @@ var require_Collection_native = __commonJS({
|
|
|
13756
13761
|
});
|
|
13757
13762
|
});
|
|
13758
13763
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
13759
|
-
function useCollection(
|
|
13760
|
-
var context = useCollectionContext(
|
|
13764
|
+
function useCollection(scope) {
|
|
13765
|
+
var context = useCollectionContext(scope), getItems = import_react3.default.useCallback(function() {
|
|
13761
13766
|
if (!import_constants4.isWeb) return [];
|
|
13762
13767
|
var collectionNode = context.collectionRef.current;
|
|
13763
13768
|
if (!collectionNode) return [];
|
|
@@ -15267,7 +15272,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15267
15272
|
], [Collection, useCollection] = (0, import_collection.createCollection)(ACCORDION_NAME), ACCORDION_CONTEXT = "Accordion", AccordionComponent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
15268
15273
|
var { type, ...accordionProps } = props, singleProps = accordionProps, multipleProps = accordionProps;
|
|
15269
15274
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Collection.Provider, {
|
|
15270
|
-
|
|
15275
|
+
scope: props.__scopeAccordion || ACCORDION_CONTEXT,
|
|
15271
15276
|
children: type === "multiple" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionImplMultiple, {
|
|
15272
15277
|
...multipleProps,
|
|
15273
15278
|
ref: forwardedRef
|
|
@@ -15403,7 +15408,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15403
15408
|
direction: dir,
|
|
15404
15409
|
orientation,
|
|
15405
15410
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Collection.Slot, {
|
|
15406
|
-
|
|
15411
|
+
scope: __scopeAccordion || ACCORDION_CONTEXT,
|
|
15407
15412
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, {
|
|
15408
15413
|
"data-orientation": orientation,
|
|
15409
15414
|
ref: composedRef,
|
|
@@ -15474,7 +15479,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15474
15479
|
}), AccordionTrigger = AccordionTriggerFrame.styleable(function(props, forwardedRef) {
|
|
15475
15480
|
var { __scopeAccordion, ...triggerProps } = props, accordionContext = useAccordionContext(__scopeAccordion), itemContext = useAccordionItemContext(__scopeAccordion), collapsibleContext = useAccordionCollapsibleContext(__scopeAccordion);
|
|
15476
15481
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Collection.ItemSlot, {
|
|
15477
|
-
|
|
15482
|
+
scope: __scopeAccordion || ACCORDION_CONTEXT,
|
|
15478
15483
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionTriggerFrame, {
|
|
15479
15484
|
// @ts-ignore
|
|
15480
15485
|
__scopeCollapsible: __scopeAccordion || ACCORDION_CONTEXT,
|
|
@@ -16058,7 +16063,7 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
16058
16063
|
});
|
|
16059
16064
|
});
|
|
16060
16065
|
function PortalHostWeb(props) {
|
|
16061
|
-
return (0,
|
|
16066
|
+
return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
16062
16067
|
return function() {
|
|
16063
16068
|
import_constants22.allPortalHosts.delete(props.name);
|
|
16064
16069
|
};
|
|
@@ -16080,7 +16085,7 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
16080
16085
|
}
|
|
16081
16086
|
function PortalHostNonNative(props) {
|
|
16082
16087
|
var { name, forwardProps, render = defaultRenderer } = props, state = usePortalState(name), { registerHost: registerHost2, deregisterHost: deregisterHost2 } = usePortal(props.name);
|
|
16083
|
-
return (0,
|
|
16088
|
+
return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
16084
16089
|
if (!(typeof window > "u")) return registerHost2(), function() {
|
|
16085
16090
|
deregisterHost2();
|
|
16086
16091
|
};
|
|
@@ -16482,7 +16487,7 @@ var require_Adapt_native = __commonJS({
|
|
|
16482
16487
|
}
|
|
16483
16488
|
});
|
|
16484
16489
|
module2.exports = __toCommonJS2(Adapt_exports);
|
|
16485
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"),
|
|
16490
|
+
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
16491
|
Contents: null,
|
|
16487
16492
|
scopeName: "",
|
|
16488
16493
|
portalName: "",
|
|
@@ -16493,42 +16498,56 @@ var require_Adapt_native = __commonJS({
|
|
|
16493
16498
|
setChildren: null,
|
|
16494
16499
|
setWhen: function() {
|
|
16495
16500
|
}
|
|
16496
|
-
}), ProvideAdaptContext = function(param) {
|
|
16497
|
-
var { children, ...context } = param, scope = context.scopeName || "";
|
|
16498
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
16499
|
-
value:
|
|
16501
|
+
}), LastAdaptContextScope = /* @__PURE__ */ (0, import_react3.createContext)(""), ProvideAdaptContext = function(param) {
|
|
16502
|
+
var { children, ...context } = param, scope = context.scopeName || "", lastScope = (0, import_react3.useContext)(LastAdaptContextScope);
|
|
16503
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(LastAdaptContextScope.Provider, {
|
|
16504
|
+
value: lastScope || context.lastScope || "",
|
|
16500
16505
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AdaptContext.Provider, {
|
|
16501
16506
|
scope,
|
|
16507
|
+
lastScope: lastScope || context.lastScope,
|
|
16502
16508
|
...context,
|
|
16503
16509
|
children
|
|
16504
16510
|
})
|
|
16505
16511
|
});
|
|
16506
|
-
}, useAdaptContext = function() {
|
|
16507
|
-
var
|
|
16508
|
-
return
|
|
16512
|
+
}, useAdaptContext = function(scope) {
|
|
16513
|
+
var lastScope = (0, import_react3.useContext)(LastAdaptContextScope), adaptScope = scope ?? lastScope;
|
|
16514
|
+
return AdaptContext.useStyledContext(adaptScope);
|
|
16509
16515
|
}, 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);
|
|
16516
|
+
var { children, Contents, scope, portal } = param, id = (0, import_react3.useId)(), portalName = `AdaptPortal${scope}${id}`, FinalContents = (0, import_react3.useMemo)(function() {
|
|
16517
|
+
if (Contents) return Contents;
|
|
16518
|
+
if (AdaptPortals.has(portalName)) return AdaptPortals.get(portalName);
|
|
16519
|
+
var element = function() {
|
|
16520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalHost, {
|
|
16521
|
+
name: portalName,
|
|
16522
|
+
forwardProps: typeof portal == "boolean" || portal == null ? void 0 : portal.forwardProps
|
|
16523
|
+
}, id);
|
|
16519
16524
|
};
|
|
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,
|
|
16525
|
+
return AdaptPortals.set(portalName, element), element;
|
|
16526
|
+
}, [
|
|
16529
16527
|
portalName,
|
|
16530
|
-
|
|
16531
|
-
|
|
16528
|
+
Contents
|
|
16529
|
+
]);
|
|
16530
|
+
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
16531
|
+
return AdaptPortals.set(portalName, FinalContents), function() {
|
|
16532
|
+
AdaptPortals.delete(portalName);
|
|
16533
|
+
};
|
|
16534
|
+
}, [
|
|
16535
|
+
portalName
|
|
16536
|
+
]);
|
|
16537
|
+
var [when, setWhen] = import_react3.default.useState(null), [platform2, setPlatform] = import_react3.default.useState(null), [children2, setChildren] = import_react3.default.useState(null);
|
|
16538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(LastAdaptContextScope, {
|
|
16539
|
+
value: scope,
|
|
16540
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProvideAdaptContext, {
|
|
16541
|
+
Contents: FinalContents,
|
|
16542
|
+
when,
|
|
16543
|
+
platform: platform2,
|
|
16544
|
+
setPlatform,
|
|
16545
|
+
setWhen,
|
|
16546
|
+
setChildren,
|
|
16547
|
+
portalName,
|
|
16548
|
+
scopeName: scope,
|
|
16549
|
+
children
|
|
16550
|
+
})
|
|
16532
16551
|
});
|
|
16533
16552
|
}, AdaptContents = function(param) {
|
|
16534
16553
|
var { scope, ...rest } = param, context = useAdaptContext(scope);
|
|
@@ -16540,7 +16559,7 @@ var require_Adapt_native = __commonJS({
|
|
|
16540
16559
|
};
|
|
16541
16560
|
AdaptContents.shouldForwardSpace = !0;
|
|
16542
16561
|
var Adapt = (0, import_helpers.withStaticProperties)(function(props) {
|
|
16543
|
-
var { platform: platform2, when, children, scope } = props, context = useAdaptContext(scope),
|
|
16562
|
+
var { platform: platform2, when, children, scope } = props, context = useAdaptContext(scope), enabled = useAdaptIsActiveGiven(props);
|
|
16544
16563
|
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
16545
16564
|
var _context_setWhen, _context_setPlatform;
|
|
16546
16565
|
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 +16585,7 @@ var require_Adapt_native = __commonJS({
|
|
|
16566
16585
|
}, [
|
|
16567
16586
|
output
|
|
16568
16587
|
]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_z_index_stack2.StackZIndexContext, {
|
|
16569
|
-
children:
|
|
16570
|
-
value: scopeName,
|
|
16571
|
-
children: enabled ? output : null
|
|
16572
|
-
})
|
|
16588
|
+
children: enabled ? output : null
|
|
16573
16589
|
});
|
|
16574
16590
|
}, {
|
|
16575
16591
|
Contents: AdaptContents
|
|
@@ -16583,6 +16599,7 @@ var require_Adapt_native = __commonJS({
|
|
|
16583
16599
|
}, useAdaptIsActiveGiven = function(param) {
|
|
16584
16600
|
var { when, platform: platform2 } = param, media = (0, import_core12.useMedia)();
|
|
16585
16601
|
if (when == null && platform2 == null) return !1;
|
|
16602
|
+
if (when === !0) return !0;
|
|
16586
16603
|
var enabled = !1;
|
|
16587
16604
|
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
16605
|
}, useAdaptIsActive = function(scope) {
|
|
@@ -16631,6 +16648,93 @@ var require_index_native31 = __commonJS({
|
|
|
16631
16648
|
}
|
|
16632
16649
|
});
|
|
16633
16650
|
|
|
16651
|
+
// ../../core/aria-hidden/dist/cjs/AriaHidden.native.js
|
|
16652
|
+
var require_AriaHidden_native = __commonJS({
|
|
16653
|
+
"../../core/aria-hidden/dist/cjs/AriaHidden.native.js"(exports2, module2) {
|
|
16654
|
+
"use strict";
|
|
16655
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
16656
|
+
for (var name in all) __defProp2(target, name, {
|
|
16657
|
+
get: all[name],
|
|
16658
|
+
enumerable: !0
|
|
16659
|
+
});
|
|
16660
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
16661
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
16662
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
16663
|
+
for (var _loop = function() {
|
|
16664
|
+
var key = _step.value;
|
|
16665
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
16666
|
+
get: function() {
|
|
16667
|
+
return from[key];
|
|
16668
|
+
},
|
|
16669
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
16670
|
+
});
|
|
16671
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
16672
|
+
} catch (err) {
|
|
16673
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
16674
|
+
} finally {
|
|
16675
|
+
try {
|
|
16676
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
16677
|
+
} finally {
|
|
16678
|
+
if (_didIteratorError)
|
|
16679
|
+
throw _iteratorError;
|
|
16680
|
+
}
|
|
16681
|
+
}
|
|
16682
|
+
return to;
|
|
16683
|
+
}, __toCommonJS2 = function(mod) {
|
|
16684
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
16685
|
+
value: !0
|
|
16686
|
+
}), mod);
|
|
16687
|
+
}, AriaHidden_native_exports = {};
|
|
16688
|
+
__export2(AriaHidden_native_exports, {
|
|
16689
|
+
hideOthers: function() {
|
|
16690
|
+
return hideOthers;
|
|
16691
|
+
}
|
|
16692
|
+
});
|
|
16693
|
+
module2.exports = __toCommonJS2(AriaHidden_native_exports);
|
|
16694
|
+
var hideOthers = function() {
|
|
16695
|
+
};
|
|
16696
|
+
}
|
|
16697
|
+
});
|
|
16698
|
+
|
|
16699
|
+
// ../../core/aria-hidden/dist/cjs/index.native.js
|
|
16700
|
+
var require_index_native32 = __commonJS({
|
|
16701
|
+
"../../core/aria-hidden/dist/cjs/index.native.js"(exports2, module2) {
|
|
16702
|
+
"use strict";
|
|
16703
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
16704
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
16705
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
16706
|
+
for (var _loop = function() {
|
|
16707
|
+
var key = _step.value;
|
|
16708
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
16709
|
+
get: function() {
|
|
16710
|
+
return from[key];
|
|
16711
|
+
},
|
|
16712
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
16713
|
+
});
|
|
16714
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
16715
|
+
} catch (err) {
|
|
16716
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
16717
|
+
} finally {
|
|
16718
|
+
try {
|
|
16719
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
16720
|
+
} finally {
|
|
16721
|
+
if (_didIteratorError)
|
|
16722
|
+
throw _iteratorError;
|
|
16723
|
+
}
|
|
16724
|
+
}
|
|
16725
|
+
return to;
|
|
16726
|
+
}, __reExport2 = function(target, mod, secondTarget) {
|
|
16727
|
+
return __copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default");
|
|
16728
|
+
}, __toCommonJS2 = function(mod) {
|
|
16729
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
16730
|
+
value: !0
|
|
16731
|
+
}), mod);
|
|
16732
|
+
}, index_exports2 = {};
|
|
16733
|
+
module2.exports = __toCommonJS2(index_exports2);
|
|
16734
|
+
__reExport2(index_exports2, require_AriaHidden_native(), module2.exports);
|
|
16735
|
+
}
|
|
16736
|
+
});
|
|
16737
|
+
|
|
16634
16738
|
// ../../core/create-context/dist/cjs/create-context.native.js
|
|
16635
16739
|
var require_create_context_native = __commonJS({
|
|
16636
16740
|
"../../core/create-context/dist/cjs/create-context.native.js"(exports2, module2) {
|
|
@@ -16800,7 +16904,7 @@ var require_create_context_native = __commonJS({
|
|
|
16800
16904
|
});
|
|
16801
16905
|
|
|
16802
16906
|
// ../../core/create-context/dist/cjs/index.native.js
|
|
16803
|
-
var
|
|
16907
|
+
var require_index_native33 = __commonJS({
|
|
16804
16908
|
"../../core/create-context/dist/cjs/index.native.js"(exports2, module2) {
|
|
16805
16909
|
"use strict";
|
|
16806
16910
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
@@ -16838,93 +16942,6 @@ var require_index_native32 = __commonJS({
|
|
|
16838
16942
|
}
|
|
16839
16943
|
});
|
|
16840
16944
|
|
|
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
16945
|
// ../dismissable/dist/cjs/Dismissable.native.js
|
|
16929
16946
|
var require_Dismissable_native = __commonJS({
|
|
16930
16947
|
"../dismissable/dist/cjs/Dismissable.native.js"(exports2, module2) {
|
|
@@ -17155,7 +17172,7 @@ var require_FocusScopeController_native = __commonJS({
|
|
|
17155
17172
|
}
|
|
17156
17173
|
});
|
|
17157
17174
|
module2.exports = __toCommonJS2(FocusScopeController_exports);
|
|
17158
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_create_context =
|
|
17175
|
+
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
17176
|
function FocusScopeController(props) {
|
|
17160
17177
|
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
17178
|
return {
|
|
@@ -17426,7 +17443,7 @@ var require_SheetContext_native = __commonJS({
|
|
|
17426
17443
|
}
|
|
17427
17444
|
});
|
|
17428
17445
|
module2.exports = __toCommonJS2(SheetContext_exports);
|
|
17429
|
-
var import_create_context =
|
|
17446
|
+
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
17447
|
}
|
|
17431
17448
|
});
|
|
17432
17449
|
|
|
@@ -18112,7 +18129,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18112
18129
|
if (isScrolled) return previouslyScrolling = !0, !1;
|
|
18113
18130
|
if (isNearTop && hasScrollView.current && isDraggingUp) return !1;
|
|
18114
18131
|
}
|
|
18115
|
-
return Math.abs(dy) >
|
|
18132
|
+
return Math.abs(dy) > 10;
|
|
18116
18133
|
}
|
|
18117
18134
|
var granted = getShouldSet();
|
|
18118
18135
|
return granted && scrollBridge.setParentDragging(!0), granted;
|
|
@@ -18581,7 +18598,8 @@ var require_SheetScrollView_native = __commonJS({
|
|
|
18581
18598
|
state.current.isScrolling = !0, scrollBridge.scrollLock = !0, setScrollEnabled(!0);
|
|
18582
18599
|
return;
|
|
18583
18600
|
}
|
|
18584
|
-
|
|
18601
|
+
var isDraggingUpFromTopOnFirstScroll = !state.current.isScrolling && dy > 0 && scrollBridge.y === 0;
|
|
18602
|
+
if (!isDraggingUpFromTopOnFirstScroll && scrollBridge.y >= 0) return;
|
|
18585
18603
|
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
18604
|
}
|
|
18587
18605
|
},
|
|
@@ -18789,6 +18807,7 @@ var require_createSheet_native = __commonJS({
|
|
|
18789
18807
|
!disableHideBottomOverflow && // @ts-ignore
|
|
18790
18808
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Frame, {
|
|
18791
18809
|
...props,
|
|
18810
|
+
"data-testid": "ensure-sheet-cover-not-overlapping",
|
|
18792
18811
|
componentName: "SheetCover",
|
|
18793
18812
|
// biome-ignore lint/correctness/noChildrenProp: <explanation>
|
|
18794
18813
|
children: null,
|
|
@@ -19246,6 +19265,9 @@ var require_Dialog_native = __commonJS({
|
|
|
19246
19265
|
DialogContent: function() {
|
|
19247
19266
|
return DialogContent;
|
|
19248
19267
|
},
|
|
19268
|
+
DialogContext: function() {
|
|
19269
|
+
return DialogContext;
|
|
19270
|
+
},
|
|
19249
19271
|
DialogDescription: function() {
|
|
19250
19272
|
return DialogDescription;
|
|
19251
19273
|
},
|
|
@@ -19261,6 +19283,9 @@ var require_Dialog_native = __commonJS({
|
|
|
19261
19283
|
DialogPortalFrame: function() {
|
|
19262
19284
|
return DialogPortalFrame;
|
|
19263
19285
|
},
|
|
19286
|
+
DialogProvider: function() {
|
|
19287
|
+
return DialogProvider;
|
|
19288
|
+
},
|
|
19264
19289
|
DialogTitle: function() {
|
|
19265
19290
|
return DialogTitle;
|
|
19266
19291
|
},
|
|
@@ -19270,15 +19295,19 @@ var require_Dialog_native = __commonJS({
|
|
|
19270
19295
|
DialogWarningProvider: function() {
|
|
19271
19296
|
return DialogWarningProvider;
|
|
19272
19297
|
},
|
|
19273
|
-
|
|
19274
|
-
return
|
|
19298
|
+
useDialogContext: function() {
|
|
19299
|
+
return useDialogContext;
|
|
19275
19300
|
}
|
|
19276
19301
|
});
|
|
19277
19302
|
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
|
-
|
|
19303
|
+
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)(
|
|
19304
|
+
// since we always provide this we can avoid setting here
|
|
19305
|
+
{},
|
|
19306
|
+
"Dialog__"
|
|
19307
|
+
), { useStyledContext: useDialogContext, Provider: DialogProvider } = DialogContext, DialogTriggerFrame = (0, import_core12.styled)(import_core12.View, {
|
|
19308
|
+
name: "DialogTrigger"
|
|
19280
19309
|
}), DialogTrigger = DialogTriggerFrame.styleable(function(props, forwardedRef) {
|
|
19281
|
-
var {
|
|
19310
|
+
var { scope, ...triggerProps } = props, isInsideButton = React4.useContext(import_stacks3.ButtonNestingContext), context = useDialogContext(scope), composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
19282
19311
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.ButtonNestingContext.Provider, {
|
|
19283
19312
|
value: !0,
|
|
19284
19313
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogTriggerFrame, {
|
|
@@ -19292,8 +19321,6 @@ var require_Dialog_native = __commonJS({
|
|
|
19292
19321
|
onPress: (0, import_helpers.composeEventHandlers)(props.onPress, context.onOpenToggle)
|
|
19293
19322
|
})
|
|
19294
19323
|
});
|
|
19295
|
-
}), PORTAL_NAME = "DialogPortal", [PortalProvider2, usePortalContext] = createDialogContext(PORTAL_NAME, {
|
|
19296
|
-
forceMount: void 0
|
|
19297
19324
|
}), DialogPortalFrame = (0, import_core12.styled)(import_stacks3.YStack, {
|
|
19298
19325
|
pointerEvents: "none",
|
|
19299
19326
|
variants: {
|
|
@@ -19312,73 +19339,70 @@ var require_Dialog_native = __commonJS({
|
|
|
19312
19339
|
defaultVariants: {
|
|
19313
19340
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
19314
19341
|
}
|
|
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
|
-
})
|
|
19342
|
+
}), needsRepropagation = import_constants4.isAndroid || import_constants4.isIos && !import_portal2.USE_NATIVE_PORTAL, DialogPortalItem = function(param) {
|
|
19343
|
+
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, {
|
|
19344
|
+
name: themeName,
|
|
19345
|
+
children
|
|
19330
19346
|
});
|
|
19331
|
-
return
|
|
19347
|
+
return needsRepropagation && (content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.ProvideAdaptContext, {
|
|
19348
|
+
...adaptContext,
|
|
19349
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogProvider, {
|
|
19350
|
+
...context,
|
|
19351
|
+
children: content
|
|
19352
|
+
})
|
|
19353
|
+
})), isAdapted ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
19354
|
+
scope: context.adaptScope,
|
|
19332
19355
|
children: content
|
|
19333
19356
|
}) : context.modal ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
|
|
19334
|
-
hostName: context.modal ? "root" : context.
|
|
19357
|
+
hostName: context.modal ? "root" : context.adaptScope,
|
|
19335
19358
|
children: content
|
|
19336
19359
|
}) : content;
|
|
19337
19360
|
}, DialogPortal = function(props) {
|
|
19338
|
-
var {
|
|
19361
|
+
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
19362
|
isShowing && isFullyHidden && setIsFullyHidden(!1);
|
|
19340
19363
|
var handleExitComplete = React4.useCallback(function() {
|
|
19341
19364
|
setIsFullyHidden(!0);
|
|
19342
19365
|
}, []), zIndex = (0, import_core12.getExpandedShorthand)("zIndex", props), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_z_index_stack2.StackZIndexContext, {
|
|
19343
19366
|
zIndex: (0, import_portal2.resolveViewZIndex)(zIndex),
|
|
19344
19367
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
|
|
19368
|
+
passThrough: isAdapted,
|
|
19345
19369
|
onExitComplete: handleExitComplete,
|
|
19346
19370
|
children: isShowing || isAdapted ? children : null
|
|
19347
19371
|
})
|
|
19348
19372
|
});
|
|
19349
19373
|
if (isFullyHidden && !isAdapted) return null;
|
|
19350
|
-
var framedContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
19351
|
-
|
|
19352
|
-
|
|
19353
|
-
|
|
19354
|
-
|
|
19355
|
-
...frameProps,
|
|
19356
|
-
children: contents
|
|
19357
|
-
})
|
|
19374
|
+
var framedContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalFrame, {
|
|
19375
|
+
// passThrough={isAdapted}
|
|
19376
|
+
pointerEvents: isShowing ? "auto" : "none",
|
|
19377
|
+
...frameProps,
|
|
19378
|
+
children: contents
|
|
19358
19379
|
});
|
|
19359
19380
|
return import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
|
|
19360
19381
|
zIndex,
|
|
19361
19382
|
// set to 1000 which "boosts" it 1000 above baseline for current context
|
|
19362
19383
|
// this makes sure its above (this first 1k) popovers on the same layer
|
|
19363
19384
|
stackZIndex: 1e3,
|
|
19385
|
+
passThrough: isAdapted,
|
|
19364
19386
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PassthroughTheme, {
|
|
19387
|
+
passThrough: isAdapted,
|
|
19365
19388
|
children: framedContents
|
|
19366
19389
|
})
|
|
19367
19390
|
}) : isAdapted ? framedContents : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
|
|
19368
|
-
|
|
19391
|
+
context,
|
|
19369
19392
|
children: framedContents
|
|
19370
19393
|
});
|
|
19371
19394
|
}, PassthroughTheme = function(param) {
|
|
19372
|
-
var { children } = param, themeName = (0, import_core12.useThemeName)();
|
|
19395
|
+
var { children, passThrough } = param, themeName = (0, import_core12.useThemeName)();
|
|
19373
19396
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
19397
|
+
passThrough,
|
|
19374
19398
|
name: themeName,
|
|
19375
19399
|
forceClassName: !0,
|
|
19376
19400
|
children
|
|
19377
19401
|
});
|
|
19378
19402
|
}, OVERLAY_NAME = "DialogOverlay", DialogOverlayFrame = (0, import_core12.styled)(import_sheet.Overlay, {
|
|
19379
19403
|
name: OVERLAY_NAME
|
|
19380
|
-
}), DialogOverlay = DialogOverlayFrame.
|
|
19381
|
-
var {
|
|
19404
|
+
}), DialogOverlay = DialogOverlayFrame.styleable(function(param, forwardedRef) {
|
|
19405
|
+
var { scope, ...props } = param, context = useDialogContext(scope), { forceMount = context.forceMount, ...overlayProps } = props, isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
|
|
19382
19406
|
return !forceMount && (!context.modal || isAdapted) ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogOverlayFrame, {
|
|
19383
19407
|
"data-state": getState(context.open),
|
|
19384
19408
|
// TODO: this will be apply for v2
|
|
@@ -19391,7 +19415,7 @@ var require_Dialog_native = __commonJS({
|
|
|
19391
19415
|
...overlayProps,
|
|
19392
19416
|
ref: forwardedRef
|
|
19393
19417
|
});
|
|
19394
|
-
})
|
|
19418
|
+
}), CONTENT_NAME = "DialogContent", DialogContentFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
|
|
19395
19419
|
name: CONTENT_NAME,
|
|
19396
19420
|
tag: "dialog",
|
|
19397
19421
|
variants: {
|
|
@@ -19415,8 +19439,8 @@ var require_Dialog_native = __commonJS({
|
|
|
19415
19439
|
size: "$true",
|
|
19416
19440
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
19417
19441
|
}
|
|
19418
|
-
}), DialogContent = DialogContentFrame.
|
|
19419
|
-
var {
|
|
19442
|
+
}), DialogContent = DialogContentFrame.styleable(function(param, forwardedRef) {
|
|
19443
|
+
var { scope, ...props } = param, context = useDialogContext(scope), { forceMount = context.forceMount, ...contentProps } = props, contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
19420
19444
|
children: context.modal ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogContentModal, {
|
|
19421
19445
|
context,
|
|
19422
19446
|
...contentProps,
|
|
@@ -19435,7 +19459,7 @@ var require_Dialog_native = __commonJS({
|
|
|
19435
19459
|
children: contents
|
|
19436
19460
|
})
|
|
19437
19461
|
});
|
|
19438
|
-
})
|
|
19462
|
+
}), DialogContentModal = /* @__PURE__ */ React4.forwardRef(function(param, forwardedRef) {
|
|
19439
19463
|
var { children, context, ...props } = param, contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.contentRef, contentRef);
|
|
19440
19464
|
return React4.useEffect(function() {
|
|
19441
19465
|
if (import_constants4.isWeb && context.open) {
|
|
@@ -19499,11 +19523,12 @@ var require_Dialog_native = __commonJS({
|
|
|
19499
19523
|
}
|
|
19500
19524
|
});
|
|
19501
19525
|
}), DialogContentImpl = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19502
|
-
var {
|
|
19526
|
+
var { trapFocus, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, context, ...contentProps } = props, contentRef = React4.useRef(
|
|
19503
19527
|
// TODO react 19 type workaround
|
|
19504
19528
|
void 0
|
|
19505
|
-
), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
19529
|
+
), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
|
|
19506
19530
|
if (isAdapted) return !import_constants4.isWeb && !context.open ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
|
|
19531
|
+
context,
|
|
19507
19532
|
children: contentProps.children
|
|
19508
19533
|
});
|
|
19509
19534
|
var contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogContentFrame, {
|
|
@@ -19544,7 +19569,7 @@ var require_Dialog_native = __commonJS({
|
|
|
19544
19569
|
}), DialogTitleFrame = (0, import_core12.styled)(import_text2.H2, {
|
|
19545
19570
|
name: "DialogTitle"
|
|
19546
19571
|
}), DialogTitle = DialogTitleFrame.styleable(function(props, forwardedRef) {
|
|
19547
|
-
var {
|
|
19572
|
+
var { scope, ...titleProps } = props, context = useDialogContext(scope);
|
|
19548
19573
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogTitleFrame, {
|
|
19549
19574
|
id: context.titleId,
|
|
19550
19575
|
...titleProps,
|
|
@@ -19552,8 +19577,8 @@ var require_Dialog_native = __commonJS({
|
|
|
19552
19577
|
});
|
|
19553
19578
|
}), DialogDescriptionFrame = (0, import_core12.styled)(import_text2.Paragraph, {
|
|
19554
19579
|
name: "DialogDescription"
|
|
19555
|
-
}),
|
|
19556
|
-
var {
|
|
19580
|
+
}), DialogDescription = DialogDescriptionFrame.styleable(function(props, forwardedRef) {
|
|
19581
|
+
var { scope, ...descriptionProps } = props, context = useDialogContext(scope);
|
|
19557
19582
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogDescriptionFrame, {
|
|
19558
19583
|
id: context.descriptionId,
|
|
19559
19584
|
...descriptionProps,
|
|
@@ -19563,10 +19588,7 @@ var require_Dialog_native = __commonJS({
|
|
|
19563
19588
|
name: CLOSE_NAME,
|
|
19564
19589
|
tag: "button"
|
|
19565
19590
|
}), 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);
|
|
19591
|
+
var { scope, displayWhenAdapted, ...closeProps } = props, context = useDialogContext(scope), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope), isInsideButton = React4.useContext(import_stacks3.ButtonNestingContext);
|
|
19570
19592
|
return isAdapted && !displayWhenAdapted ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogCloseFrame, {
|
|
19571
19593
|
accessibilityLabel: "Dialog Close",
|
|
19572
19594
|
tag: isInsideButton ? "span" : "button",
|
|
@@ -19585,10 +19607,7 @@ var require_Dialog_native = __commonJS({
|
|
|
19585
19607
|
titleName: "DialogTitle",
|
|
19586
19608
|
docsSlug: "dialog"
|
|
19587
19609
|
}), 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)({
|
|
19610
|
+
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
19611
|
prop: openProp,
|
|
19593
19612
|
defaultProp: defaultOpen,
|
|
19594
19613
|
onChange: onOpenChange
|
|
@@ -19598,9 +19617,9 @@ var require_Dialog_native = __commonJS({
|
|
|
19598
19617
|
});
|
|
19599
19618
|
}, [
|
|
19600
19619
|
setOpen
|
|
19601
|
-
]), context = {
|
|
19602
|
-
|
|
19603
|
-
|
|
19620
|
+
]), adaptScope = `DialogAdapt${scope}`, context = {
|
|
19621
|
+
dialogScope: scope,
|
|
19622
|
+
adaptScope,
|
|
19604
19623
|
triggerRef,
|
|
19605
19624
|
contentRef,
|
|
19606
19625
|
contentId,
|
|
@@ -19610,8 +19629,7 @@ var require_Dialog_native = __commonJS({
|
|
|
19610
19629
|
onOpenChange: setOpen,
|
|
19611
19630
|
onOpenToggle,
|
|
19612
19631
|
modal,
|
|
19613
|
-
disableRemoveScroll
|
|
19614
|
-
adaptName
|
|
19632
|
+
disableRemoveScroll
|
|
19615
19633
|
};
|
|
19616
19634
|
return React4.useImperativeHandle(ref, function() {
|
|
19617
19635
|
return {
|
|
@@ -19620,15 +19638,16 @@ var require_Dialog_native = __commonJS({
|
|
|
19620
19638
|
}, [
|
|
19621
19639
|
setOpen
|
|
19622
19640
|
]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
|
|
19623
|
-
scope:
|
|
19641
|
+
scope: adaptScope,
|
|
19624
19642
|
portal: {
|
|
19625
19643
|
forwardProps: props
|
|
19626
19644
|
},
|
|
19627
19645
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogProvider, {
|
|
19646
|
+
scope,
|
|
19628
19647
|
...context,
|
|
19629
19648
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogSheetController, {
|
|
19630
19649
|
onOpenChange: setOpen,
|
|
19631
|
-
|
|
19650
|
+
scope,
|
|
19632
19651
|
children
|
|
19633
19652
|
})
|
|
19634
19653
|
})
|
|
@@ -19644,11 +19663,8 @@ var require_Dialog_native = __commonJS({
|
|
|
19644
19663
|
Sheet: import_sheet.Sheet.Controlled,
|
|
19645
19664
|
FocusScope: import_focus_scope.FocusScopeController,
|
|
19646
19665
|
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)();
|
|
19666
|
+
}), DialogSheetController = function(props) {
|
|
19667
|
+
var context = useDialogContext(props.scope), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
|
|
19652
19668
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_sheet.SheetController, {
|
|
19653
19669
|
onOpenChange: function(val) {
|
|
19654
19670
|
if (isAdapted) {
|
|
@@ -19779,15 +19795,12 @@ var require_AlertDialog_native = __commonJS({
|
|
|
19779
19795
|
},
|
|
19780
19796
|
AlertDialogTrigger: function() {
|
|
19781
19797
|
return AlertDialogTrigger;
|
|
19782
|
-
},
|
|
19783
|
-
createAlertDialogScope: function() {
|
|
19784
|
-
return createAlertDialogScope;
|
|
19785
19798
|
}
|
|
19786
19799
|
});
|
|
19787
19800
|
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
|
-
|
|
19801
|
+
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) {
|
|
19802
|
+
return AlertScopePrefix + scope;
|
|
19803
|
+
}, ROOT_NAME = "AlertDialog", TRIGGER_NAME = "AlertDialogTrigger", NativeAlertDialogTriggerFrame = (0, import_core12.styled)(import_core12.View, {
|
|
19791
19804
|
name: TRIGGER_NAME
|
|
19792
19805
|
}), AlertDialogTrigger = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19793
19806
|
if (props.__native) {
|
|
@@ -19797,46 +19810,40 @@ var require_AlertDialog_native = __commonJS({
|
|
|
19797
19810
|
onPress: (0, import_helpers.composeEventHandlers)(onPress, __onPress)
|
|
19798
19811
|
});
|
|
19799
19812
|
}
|
|
19800
|
-
var {
|
|
19813
|
+
var { scope, ...triggerProps } = props;
|
|
19801
19814
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogTrigger, {
|
|
19802
|
-
|
|
19815
|
+
scope: getAlertDialogScope(scope),
|
|
19803
19816
|
...triggerProps,
|
|
19804
19817
|
ref: forwardedRef
|
|
19805
19818
|
});
|
|
19806
|
-
})
|
|
19807
|
-
|
|
19808
|
-
var PORTAL_NAME = "AlertDialogPortal", AlertDialogPortal = function(props) {
|
|
19809
|
-
var { __scopeAlertDialog, ...portalProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
19819
|
+
}), AlertDialogPortal = function(props) {
|
|
19820
|
+
var { scope, ...portalProps } = props;
|
|
19810
19821
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogPortal, {
|
|
19811
|
-
|
|
19822
|
+
scope: getAlertDialogScope(scope),
|
|
19812
19823
|
...portalProps
|
|
19813
19824
|
});
|
|
19814
|
-
}
|
|
19815
|
-
AlertDialogPortal.displayName = PORTAL_NAME;
|
|
19816
|
-
var OVERLAY_NAME = "AlertDialogOverlay", AlertDialogOverlayFrame = (0, import_core12.styled)(import_dialog.DialogOverlayFrame, {
|
|
19825
|
+
}, OVERLAY_NAME = "AlertDialogOverlay", AlertDialogOverlayFrame = (0, import_core12.styled)(import_dialog.DialogOverlayFrame, {
|
|
19817
19826
|
name: OVERLAY_NAME
|
|
19818
19827
|
}), AlertDialogOverlay = AlertDialogOverlayFrame.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19819
|
-
var {
|
|
19828
|
+
var { scope, ...overlayProps } = props;
|
|
19820
19829
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogOverlay, {
|
|
19821
|
-
|
|
19830
|
+
scope: getAlertDialogScope(scope),
|
|
19822
19831
|
...overlayProps,
|
|
19823
19832
|
ref: forwardedRef
|
|
19824
19833
|
});
|
|
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);
|
|
19834
|
+
})), CONTENT_NAME = "AlertDialogContent", { Provider: AlertDialogContextProvider, useStyledContext: useAlertDialogContentContext } = (0, import_core12.createStyledContext)({}, "AlertDialogContext"), AlertDialogContent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19835
|
+
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
19836
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogWarningProvider, {
|
|
19830
19837
|
contentName: CONTENT_NAME,
|
|
19831
19838
|
titleName: TITLE_NAME,
|
|
19832
19839
|
docsSlug: "alert-dialog",
|
|
19833
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
19834
|
-
scope
|
|
19840
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AlertDialogContextProvider, {
|
|
19841
|
+
scope,
|
|
19835
19842
|
cancelRef,
|
|
19836
19843
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_dialog.DialogContent, {
|
|
19837
19844
|
// @ts-ignore
|
|
19838
19845
|
role: "alertdialog",
|
|
19839
|
-
|
|
19846
|
+
scope: dialogScope,
|
|
19840
19847
|
...contentProps,
|
|
19841
19848
|
ref: composedRefs,
|
|
19842
19849
|
onOpenAutoFocus: (0, import_helpers.composeEventHandlers)(contentProps.onOpenAutoFocus, function(event) {
|
|
@@ -19868,46 +19875,36 @@ var require_AlertDialog_native = __commonJS({
|
|
|
19868
19875
|
})
|
|
19869
19876
|
})
|
|
19870
19877
|
});
|
|
19871
|
-
})
|
|
19872
|
-
|
|
19873
|
-
var TITLE_NAME = "AlertDialogTitle", AlertDialogTitle = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19874
|
-
var { __scopeAlertDialog, ...titleProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
19878
|
+
}), TITLE_NAME = "AlertDialogTitle", AlertDialogTitle = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19879
|
+
var { scope, ...titleProps } = props;
|
|
19875
19880
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogTitle, {
|
|
19876
|
-
|
|
19881
|
+
scope: getAlertDialogScope(scope),
|
|
19877
19882
|
...titleProps,
|
|
19878
19883
|
ref: forwardedRef
|
|
19879
19884
|
});
|
|
19880
|
-
})
|
|
19881
|
-
|
|
19882
|
-
var DESCRIPTION_NAME = "AlertDialogDescription", AlertDialogDescription = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19883
|
-
var { __scopeAlertDialog, ...descriptionProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
19885
|
+
}), DESCRIPTION_NAME = "AlertDialogDescription", AlertDialogDescription = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19886
|
+
var { scope, ...descriptionProps } = props;
|
|
19884
19887
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogDescription, {
|
|
19885
|
-
|
|
19888
|
+
scope: getAlertDialogScope(scope),
|
|
19886
19889
|
...descriptionProps,
|
|
19887
19890
|
ref: forwardedRef
|
|
19888
19891
|
});
|
|
19889
|
-
})
|
|
19890
|
-
|
|
19891
|
-
var ACTION_NAME = "AlertDialogAction", AlertDialogAction = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19892
|
-
var { __scopeAlertDialog, ...actionProps } = props, dialogScope = useDialogScope(__scopeAlertDialog);
|
|
19892
|
+
}), ACTION_NAME = "AlertDialogAction", AlertDialogAction = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19893
|
+
var { scope, ...actionProps } = props;
|
|
19893
19894
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogClose, {
|
|
19894
|
-
|
|
19895
|
+
scope: getAlertDialogScope(scope),
|
|
19895
19896
|
...actionProps,
|
|
19896
19897
|
ref: forwardedRef
|
|
19897
19898
|
});
|
|
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);
|
|
19899
|
+
}), CANCEL_NAME = "AlertDialogCancel", AlertDialogCancel = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
19900
|
+
var { scope, ...cancelProps } = props, { cancelRef } = useAlertDialogContentContext(scope), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, cancelRef);
|
|
19902
19901
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.DialogClose, {
|
|
19903
|
-
|
|
19902
|
+
scope: getAlertDialogScope(scope),
|
|
19904
19903
|
...cancelProps,
|
|
19905
19904
|
ref
|
|
19906
19905
|
});
|
|
19907
|
-
})
|
|
19908
|
-
|
|
19909
|
-
var AlertDialogInner = function(props) {
|
|
19910
|
-
var { __scopeAlertDialog, native, ...alertDialogProps } = props, dialogScope = useDialogScope(__scopeAlertDialog), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
19906
|
+
}), AlertDialogInner = function(props) {
|
|
19907
|
+
var { scope, native, ...alertDialogProps } = props, dialogScope = getAlertDialogScope(scope), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
19911
19908
|
prop: props.open,
|
|
19912
19909
|
defaultProp: props.defaultOpen || !1,
|
|
19913
19910
|
onChange: props.onOpenChange,
|
|
@@ -19953,7 +19950,7 @@ var require_AlertDialog_native = __commonJS({
|
|
|
19953
19950
|
setOpen(!0);
|
|
19954
19951
|
}
|
|
19955
19952
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_dialog.Dialog, {
|
|
19956
|
-
|
|
19953
|
+
scope: dialogScope,
|
|
19957
19954
|
...alertDialogProps,
|
|
19958
19955
|
modal: !0
|
|
19959
19956
|
});
|
|
@@ -20444,7 +20441,7 @@ var require_Avatar_native = __commonJS({
|
|
|
20444
20441
|
}
|
|
20445
20442
|
});
|
|
20446
20443
|
module2.exports = __toCommonJS2(Avatar_exports);
|
|
20447
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context =
|
|
20444
|
+
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
20445
|
var _getShapeSize, { __scopeAvatar, src, onLoadingStatusChange = function() {
|
|
20449
20446
|
}, ...imageProps } = props, context = useAvatarContext(IMAGE_NAME, __scopeAvatar), [status, setStatus] = React4.useState("idle"), shapeSize = (0, import_core12.getVariableValue)((_getShapeSize = (0, import_shapes.getShapeSize)(
|
|
20450
20447
|
context.size,
|
|
@@ -21826,7 +21823,7 @@ var require_Label_native = __commonJS({
|
|
|
21826
21823
|
}
|
|
21827
21824
|
});
|
|
21828
21825
|
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 =
|
|
21826
|
+
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
21827
|
id: void 0,
|
|
21831
21828
|
controlRef: {
|
|
21832
21829
|
current: null
|
|
@@ -22625,7 +22622,7 @@ var require_Form_native = __commonJS({
|
|
|
22625
22622
|
}
|
|
22626
22623
|
});
|
|
22627
22624
|
module2.exports = __toCommonJS2(Form_exports);
|
|
22628
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context =
|
|
22625
|
+
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
22626
|
name: FORM_NAME,
|
|
22630
22627
|
tag: "form"
|
|
22631
22628
|
}), [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 +22864,7 @@ var require_Group_native = __commonJS({
|
|
|
22867
22864
|
}
|
|
22868
22865
|
});
|
|
22869
22866
|
module2.exports = __toCommonJS2(Group_exports);
|
|
22870
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context =
|
|
22867
|
+
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
22868
|
name: "GroupFrame",
|
|
22872
22869
|
variants: {
|
|
22873
22870
|
unstyled: {
|
|
@@ -23815,17 +23812,20 @@ var require_Popper_native = __commonJS({
|
|
|
23815
23812
|
PopperArrow: function() {
|
|
23816
23813
|
return PopperArrow;
|
|
23817
23814
|
},
|
|
23815
|
+
PopperArrowFrame: function() {
|
|
23816
|
+
return PopperArrowFrame;
|
|
23817
|
+
},
|
|
23818
23818
|
PopperContent: function() {
|
|
23819
23819
|
return PopperContent;
|
|
23820
23820
|
},
|
|
23821
23821
|
PopperContentFrame: function() {
|
|
23822
23822
|
return PopperContentFrame;
|
|
23823
23823
|
},
|
|
23824
|
-
|
|
23825
|
-
return
|
|
23824
|
+
PopperContextFast: function() {
|
|
23825
|
+
return PopperContextFast;
|
|
23826
23826
|
},
|
|
23827
|
-
|
|
23828
|
-
return
|
|
23827
|
+
PopperContextSlow: function() {
|
|
23828
|
+
return PopperContextSlow;
|
|
23829
23829
|
},
|
|
23830
23830
|
PopperPositionContext: function() {
|
|
23831
23831
|
return PopperPositionContext;
|
|
@@ -23833,20 +23833,59 @@ var require_Popper_native = __commonJS({
|
|
|
23833
23833
|
PopperProvider: function() {
|
|
23834
23834
|
return PopperProvider;
|
|
23835
23835
|
},
|
|
23836
|
+
PopperProviderFast: function() {
|
|
23837
|
+
return PopperProviderFast;
|
|
23838
|
+
},
|
|
23839
|
+
PopperProviderSlow: function() {
|
|
23840
|
+
return PopperProviderSlow;
|
|
23841
|
+
},
|
|
23836
23842
|
setupPopper: function() {
|
|
23837
23843
|
return setupPopper;
|
|
23838
23844
|
},
|
|
23839
23845
|
usePopperContext: function() {
|
|
23840
23846
|
return usePopperContext;
|
|
23841
23847
|
},
|
|
23842
|
-
|
|
23843
|
-
return
|
|
23848
|
+
usePopperContextSlow: function() {
|
|
23849
|
+
return usePopperContextSlow;
|
|
23844
23850
|
}
|
|
23845
23851
|
});
|
|
23846
23852
|
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
|
-
|
|
23853
|
+
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)(
|
|
23854
|
+
// since we always provide this we can avoid setting here
|
|
23855
|
+
{},
|
|
23856
|
+
"Popper__"
|
|
23857
|
+
), PopperPositionContext = import_core12.createStyledContext, { useStyledContext: usePopperContext, Provider: PopperProviderFast } = PopperContextFast, PopperContextSlow = (0, import_core12.createStyledContext)(
|
|
23858
|
+
// since we always provide this we can avoid setting here
|
|
23859
|
+
{},
|
|
23860
|
+
"PopperSlow__"
|
|
23861
|
+
), { useStyledContext: usePopperContextSlow, Provider: PopperProviderSlow } = PopperContextSlow, PopperProvider = function(param) {
|
|
23862
|
+
var { scope, children, ...context } = param, slowContext = getContextSlow(context);
|
|
23863
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperProviderFast, {
|
|
23864
|
+
scope,
|
|
23865
|
+
...context,
|
|
23866
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperProviderSlow, {
|
|
23867
|
+
scope,
|
|
23868
|
+
...slowContext,
|
|
23869
|
+
children
|
|
23870
|
+
})
|
|
23871
|
+
});
|
|
23872
|
+
};
|
|
23873
|
+
function getContextSlow(context) {
|
|
23874
|
+
return {
|
|
23875
|
+
refs: context.refs,
|
|
23876
|
+
size: context.size,
|
|
23877
|
+
arrowRef: context.arrowRef,
|
|
23878
|
+
arrowStyle: context.arrowStyle,
|
|
23879
|
+
onArrowSize: context.onArrowSize,
|
|
23880
|
+
hasFloating: context.hasFloating,
|
|
23881
|
+
strategy: context.strategy,
|
|
23882
|
+
update: context.update,
|
|
23883
|
+
context: context.context,
|
|
23884
|
+
getFloatingProps: context.getFloatingProps,
|
|
23885
|
+
getReferenceProps: context.getFloatingProps
|
|
23886
|
+
};
|
|
23887
|
+
}
|
|
23888
|
+
var checkFloating = {
|
|
23850
23889
|
name: "checkFloating",
|
|
23851
23890
|
fn(data) {
|
|
23852
23891
|
return {
|
|
@@ -23860,7 +23899,7 @@ var require_Popper_native = __commonJS({
|
|
|
23860
23899
|
Object.assign(setupOptions, options);
|
|
23861
23900
|
}
|
|
23862
23901
|
function Popper(props) {
|
|
23863
|
-
var _middlewareData_checkFloating, { children, size: size2, strategy = "absolute", placement = "bottom", stayInFrame, allowFlip, offset: offset2, disableRTL, resize, passThrough, open,
|
|
23902
|
+
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
23903
|
open: passThrough ? !1 : open || !0,
|
|
23865
23904
|
strategy,
|
|
23866
23905
|
placement,
|
|
@@ -23909,31 +23948,39 @@ var require_Popper_native = __commonJS({
|
|
|
23909
23948
|
arrowRef: setArrow,
|
|
23910
23949
|
arrowStyle: middlewareData.arrow,
|
|
23911
23950
|
onArrowSize: setArrowSize,
|
|
23912
|
-
scope: __scopePopper,
|
|
23913
23951
|
hasFloating: (_middlewareData_checkFloating = middlewareData.checkFloating) === null || _middlewareData_checkFloating === void 0 ? void 0 : _middlewareData_checkFloating.hasFloating,
|
|
23914
23952
|
...floating
|
|
23915
23953
|
};
|
|
23916
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
23917
|
-
|
|
23918
|
-
|
|
23919
|
-
|
|
23920
|
-
children
|
|
23921
|
-
})
|
|
23954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperProvider, {
|
|
23955
|
+
scope,
|
|
23956
|
+
...popperContext,
|
|
23957
|
+
children
|
|
23922
23958
|
});
|
|
23923
23959
|
}
|
|
23924
23960
|
var PopperAnchor = import_stacks3.YStack.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
23925
|
-
var { virtualRef,
|
|
23961
|
+
var { virtualRef, scope, ...anchorProps } = props, { getReferenceProps, refs, update } = usePopperContextSlow(scope), ref = React4.useRef(null);
|
|
23926
23962
|
React4.useEffect(function() {
|
|
23927
23963
|
virtualRef && refs.setReference(virtualRef.current);
|
|
23928
23964
|
}, [
|
|
23929
23965
|
virtualRef
|
|
23930
23966
|
]);
|
|
23931
|
-
var stackProps =
|
|
23932
|
-
ref: composedRefs,
|
|
23933
|
-
...anchorProps
|
|
23934
|
-
};
|
|
23967
|
+
var stackProps = anchorProps, refProps = getReferenceProps ? getReferenceProps(stackProps) : null, composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref);
|
|
23935
23968
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
23936
|
-
...
|
|
23969
|
+
...refProps,
|
|
23970
|
+
ref: composedRefs,
|
|
23971
|
+
// this helps us with handling scoped poppers with many different targets
|
|
23972
|
+
// basically we wait for mouseEnter to ever set a reference and remove it on leave
|
|
23973
|
+
// otherwise floating ui gets confused by having >1 reference
|
|
23974
|
+
onMouseEnter: function(e) {
|
|
23975
|
+
ref.current instanceof HTMLElement && (refs.setReference(ref.current), setTimeout(function() {
|
|
23976
|
+
var _refProps_onPointerEnter;
|
|
23977
|
+
(_refProps_onPointerEnter = refProps.onPointerEnter) === null || _refProps_onPointerEnter === void 0 || _refProps_onPointerEnter.call(refProps, e), update();
|
|
23978
|
+
}));
|
|
23979
|
+
},
|
|
23980
|
+
onMouseLeave: function(e) {
|
|
23981
|
+
var _refProps_onMouseLeave;
|
|
23982
|
+
refProps == null || (_refProps_onMouseLeave = refProps.onMouseLeave) === null || _refProps_onMouseLeave === void 0 || _refProps_onMouseLeave.call(refProps, e), refs.setReference(null);
|
|
23983
|
+
}
|
|
23937
23984
|
});
|
|
23938
23985
|
})), PopperContentFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
|
|
23939
23986
|
name: "PopperContent",
|
|
@@ -23960,7 +24007,7 @@ var require_Popper_native = __commonJS({
|
|
|
23960
24007
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
23961
24008
|
}
|
|
23962
24009
|
}), PopperContent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
23963
|
-
var {
|
|
24010
|
+
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
24011
|
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
23965
24012
|
needsMeasure && x && y && setNeedsMeasure(!1);
|
|
23966
24013
|
}, [
|
|
@@ -23978,9 +24025,9 @@ var require_Popper_native = __commonJS({
|
|
|
23978
24025
|
position: strategy,
|
|
23979
24026
|
opacity: 1,
|
|
23980
24027
|
...enableAnimationForPositionChange && {
|
|
23981
|
-
// apply animation but disable it on initial render to avoid animating from 0 to the first position
|
|
23982
24028
|
animation: rest.animation,
|
|
23983
24029
|
animateOnly: needsMeasure ? [] : rest.animateOnly,
|
|
24030
|
+
// apply animation but disable it on initial render to avoid animating from 0 to the first position
|
|
23984
24031
|
animatePresence: !1
|
|
23985
24032
|
},
|
|
23986
24033
|
...hide2 && {
|
|
@@ -23988,7 +24035,7 @@ var require_Popper_native = __commonJS({
|
|
|
23988
24035
|
animateOnly: []
|
|
23989
24036
|
}
|
|
23990
24037
|
}, { style, ...floatingProps } = getFloatingProps ? getFloatingProps(frameProps) : frameProps;
|
|
23991
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.
|
|
24038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
23992
24039
|
passThrough,
|
|
23993
24040
|
ref: contentRefs,
|
|
23994
24041
|
...passThrough ? null : floatingProps,
|
|
@@ -24041,8 +24088,8 @@ var require_Popper_native = __commonJS({
|
|
|
24041
24088
|
right: "left",
|
|
24042
24089
|
bottom: "top",
|
|
24043
24090
|
left: "right"
|
|
24044
|
-
}, PopperArrow =
|
|
24045
|
-
var _context_arrowStyle, _context_arrowStyle1, {
|
|
24091
|
+
}, PopperArrow = /* @__PURE__ */ React4.forwardRef(function(propsIn, forwardedRef) {
|
|
24092
|
+
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
24093
|
shift: -2,
|
|
24047
24094
|
bounds: [
|
|
24048
24095
|
2
|
|
@@ -24272,8 +24319,12 @@ var require_Popover_native = __commonJS({
|
|
|
24272
24319
|
}
|
|
24273
24320
|
});
|
|
24274
24321
|
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
|
-
|
|
24322
|
+
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)(
|
|
24323
|
+
// since we always provide this we can avoid setting here
|
|
24324
|
+
{},
|
|
24325
|
+
"Popover__"
|
|
24326
|
+
), usePopoverContext = PopoverContext.useStyledContext, PopoverAnchor = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24327
|
+
var { scope, ...rest } = props, context = usePopoverContext(scope), { onCustomAnchorAdd, onCustomAnchorRemove } = context || {};
|
|
24277
24328
|
return React4.useEffect(function() {
|
|
24278
24329
|
return onCustomAnchorAdd(), function() {
|
|
24279
24330
|
return onCustomAnchorRemove();
|
|
@@ -24282,12 +24333,12 @@ var require_Popover_native = __commonJS({
|
|
|
24282
24333
|
onCustomAnchorAdd,
|
|
24283
24334
|
onCustomAnchorRemove
|
|
24284
24335
|
]), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperAnchor, {
|
|
24285
|
-
|
|
24336
|
+
scope,
|
|
24286
24337
|
...rest,
|
|
24287
24338
|
ref: forwardedRef
|
|
24288
24339
|
});
|
|
24289
24340
|
}), PopoverTrigger = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24290
|
-
var {
|
|
24341
|
+
var { scope, ...rest } = props, context = usePopoverContext(scope), anchorTo = context.anchorTo, composedTriggerRef = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.triggerRef);
|
|
24291
24342
|
if (!props.children) return null;
|
|
24292
24343
|
var trigger = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.View, {
|
|
24293
24344
|
"aria-expanded": context.open,
|
|
@@ -24326,12 +24377,14 @@ var require_Popover_native = __commonJS({
|
|
|
24326
24377
|
...virtualRef && {
|
|
24327
24378
|
virtualRef
|
|
24328
24379
|
},
|
|
24329
|
-
|
|
24380
|
+
scope,
|
|
24330
24381
|
asChild: rest.asChild,
|
|
24331
24382
|
children: trigger
|
|
24332
24383
|
});
|
|
24333
|
-
}),
|
|
24334
|
-
|
|
24384
|
+
}), PopoverContentFrame = (0, import_core12.styled)(import_popper.PopperContentFrame, {
|
|
24385
|
+
name: "Popover"
|
|
24386
|
+
}), PopoverContent = PopoverContentFrame.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24387
|
+
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
24388
|
if (context.open && isFullyHidden && setIsFullyHidden(!1), React4.useEffect(function() {
|
|
24336
24389
|
if (context.open) {
|
|
24337
24390
|
var content = contentRef.current;
|
|
@@ -24343,17 +24396,18 @@ var require_Popover_native = __commonJS({
|
|
|
24343
24396
|
var _contentImplProps_pointerEvents;
|
|
24344
24397
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverPortal, {
|
|
24345
24398
|
passThrough: context.breakpointActive,
|
|
24346
|
-
|
|
24399
|
+
context,
|
|
24347
24400
|
zIndex,
|
|
24348
24401
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Stack, {
|
|
24349
24402
|
passThrough: context.breakpointActive,
|
|
24350
24403
|
pointerEvents: context.open ? (_contentImplProps_pointerEvents = contentImplProps.pointerEvents) !== null && _contentImplProps_pointerEvents !== void 0 ? _contentImplProps_pointerEvents : "auto" : "none",
|
|
24351
24404
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContentImpl, {
|
|
24352
24405
|
...contentImplProps,
|
|
24406
|
+
context,
|
|
24353
24407
|
enableRemoveScroll,
|
|
24354
24408
|
ref: composedRefs,
|
|
24355
24409
|
setIsFullyHidden,
|
|
24356
|
-
|
|
24410
|
+
scope,
|
|
24357
24411
|
// we make sure we're not trapping once it's been closed
|
|
24358
24412
|
// (closed !== unmounted when animating out)
|
|
24359
24413
|
trapFocus: trapFocus ?? context.open,
|
|
@@ -24379,7 +24433,7 @@ var require_Popover_native = __commonJS({
|
|
|
24379
24433
|
})
|
|
24380
24434
|
});
|
|
24381
24435
|
})), useParentContexts = function(scope) {
|
|
24382
|
-
var popperContext = (0, import_popper.usePopperContext)(scope
|
|
24436
|
+
var context = usePopoverContext(scope), popperContext = (0, import_popper.usePopperContext)(scope), adaptContext = (0, import_adapt.useAdaptContext)(context.adaptScope);
|
|
24383
24437
|
return {
|
|
24384
24438
|
popperContext,
|
|
24385
24439
|
adaptContext,
|
|
@@ -24387,9 +24441,9 @@ var require_Popover_native = __commonJS({
|
|
|
24387
24441
|
};
|
|
24388
24442
|
};
|
|
24389
24443
|
function RepropagateParentContexts(param) {
|
|
24390
|
-
var { adaptContext, children, context, popperContext
|
|
24391
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.
|
|
24392
|
-
scope,
|
|
24444
|
+
var { adaptContext, children, context, popperContext } = param;
|
|
24445
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperProvider, {
|
|
24446
|
+
scope: context.popoverScope,
|
|
24393
24447
|
...popperContext,
|
|
24394
24448
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
|
|
24395
24449
|
...context,
|
|
@@ -24401,40 +24455,40 @@ var require_Popover_native = __commonJS({
|
|
|
24401
24455
|
});
|
|
24402
24456
|
}
|
|
24403
24457
|
var PortalAdaptSafe = function(param) {
|
|
24404
|
-
var { children,
|
|
24458
|
+
var { children, context } = param;
|
|
24405
24459
|
if (needsRepropagation) {
|
|
24406
|
-
var
|
|
24460
|
+
var parentContexts = useParentContexts(context.popoverScope);
|
|
24407
24461
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
24462
|
+
scope: context.adaptScope,
|
|
24408
24463
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RepropagateParentContexts, {
|
|
24409
|
-
scope,
|
|
24410
24464
|
...parentContexts,
|
|
24411
24465
|
children
|
|
24412
24466
|
})
|
|
24413
24467
|
});
|
|
24414
24468
|
}
|
|
24415
24469
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
24470
|
+
scope: context.adaptScope,
|
|
24416
24471
|
children
|
|
24417
24472
|
});
|
|
24418
24473
|
};
|
|
24419
|
-
function PopoverPortal(
|
|
24420
|
-
var
|
|
24474
|
+
function PopoverPortal(param) {
|
|
24475
|
+
var { context, zIndex, passThrough, children } = param, themeName = (0, import_core12.useThemeName)(), content = children;
|
|
24421
24476
|
if (needsRepropagation) {
|
|
24422
|
-
var parentContexts = useParentContexts(
|
|
24477
|
+
var parentContexts = useParentContexts(context.popoverScope);
|
|
24423
24478
|
content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(RepropagateParentContexts, {
|
|
24424
|
-
scope,
|
|
24425
24479
|
...parentContexts,
|
|
24426
24480
|
children: content
|
|
24427
24481
|
});
|
|
24428
24482
|
}
|
|
24429
24483
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
|
|
24430
|
-
passThrough
|
|
24484
|
+
passThrough,
|
|
24431
24485
|
stackZIndex: !0,
|
|
24432
24486
|
zIndex,
|
|
24433
24487
|
children: (
|
|
24434
24488
|
/* forceClassName avoids forced re-mount renders for some reason... see the HeadMenu as you change tints a few times */
|
|
24435
24489
|
/* without this you'll see the site menu re-rendering. It must be something in wrapping children in Theme */
|
|
24436
24490
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
24437
|
-
passThrough
|
|
24491
|
+
passThrough,
|
|
24438
24492
|
contain: !0,
|
|
24439
24493
|
forceClassName: !0,
|
|
24440
24494
|
name: themeName,
|
|
@@ -24447,7 +24501,7 @@ var require_Popover_native = __commonJS({
|
|
|
24447
24501
|
});
|
|
24448
24502
|
}
|
|
24449
24503
|
var PopoverContentImpl = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24450
|
-
var { trapFocus,
|
|
24504
|
+
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
24505
|
setIsFullyHidden == null || setIsFullyHidden(!0);
|
|
24452
24506
|
}, [
|
|
24453
24507
|
setIsFullyHidden
|
|
@@ -24463,19 +24517,20 @@ var require_Popover_native = __commonJS({
|
|
|
24463
24517
|
lazyMount,
|
|
24464
24518
|
passThrough: context.breakpointActive,
|
|
24465
24519
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContent, {
|
|
24466
|
-
|
|
24520
|
+
scope,
|
|
24467
24521
|
"data-state": getState(open),
|
|
24468
24522
|
id: context.contentId,
|
|
24469
24523
|
ref: forwardedRef,
|
|
24470
24524
|
passThrough: context.breakpointActive,
|
|
24471
24525
|
...contentProps,
|
|
24472
24526
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalAdaptSafe, {
|
|
24527
|
+
context,
|
|
24473
24528
|
children: contents
|
|
24474
24529
|
})
|
|
24475
24530
|
}, context.contentId)
|
|
24476
24531
|
});
|
|
24477
24532
|
}), PopoverClose = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24478
|
-
var {
|
|
24533
|
+
var { scope, ...rest } = props, context = usePopoverContext(scope);
|
|
24479
24534
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, {
|
|
24480
24535
|
...rest,
|
|
24481
24536
|
ref: forwardedRef,
|
|
@@ -24485,16 +24540,16 @@ var require_Popover_native = __commonJS({
|
|
|
24485
24540
|
return context == null || (_context_onOpenChange = context.onOpenChange) === null || _context_onOpenChange === void 0 ? void 0 : _context_onOpenChange.call(context, !1, "press");
|
|
24486
24541
|
})
|
|
24487
24542
|
});
|
|
24488
|
-
}), PopoverArrow = import_popper.
|
|
24489
|
-
var {
|
|
24543
|
+
}), PopoverArrow = import_popper.PopperArrowFrame.styleable(function(props, forwardedRef) {
|
|
24544
|
+
var { scope, ...rest } = props, context = usePopoverContext(scope), isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
|
|
24490
24545
|
return isAdapted ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperArrow, {
|
|
24491
|
-
|
|
24546
|
+
scope,
|
|
24492
24547
|
componentName: "PopoverArrow",
|
|
24493
24548
|
...rest,
|
|
24494
24549
|
ref: forwardedRef
|
|
24495
24550
|
});
|
|
24496
|
-
}), PopoverScrollView = /* @__PURE__ */ React4.forwardRef(function(
|
|
24497
|
-
var context = usePopoverContext(
|
|
24551
|
+
}), PopoverScrollView = /* @__PURE__ */ React4.forwardRef(function(param, ref) {
|
|
24552
|
+
var { scope, ...props } = param, context = usePopoverContext(scope);
|
|
24498
24553
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_scroll_view.ScrollView, {
|
|
24499
24554
|
ref,
|
|
24500
24555
|
// when adapted, no pointer events!
|
|
@@ -24503,14 +24558,16 @@ var require_Popover_native = __commonJS({
|
|
|
24503
24558
|
passThrough: context.breakpointActive,
|
|
24504
24559
|
...props
|
|
24505
24560
|
});
|
|
24506
|
-
}), Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(
|
|
24507
|
-
var id = React4.useId()
|
|
24561
|
+
}), DEFAULT_SCOPE = "", Popover = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ React4.forwardRef(function(param, ref) {
|
|
24562
|
+
var { scope = DEFAULT_SCOPE, ...props } = param, id = React4.useId(), adaptScope = `PopoverAdapt${scope}`;
|
|
24508
24563
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
|
|
24509
|
-
scope:
|
|
24564
|
+
scope: adaptScope,
|
|
24510
24565
|
portal: !0,
|
|
24511
24566
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverInner, {
|
|
24567
|
+
adaptScope,
|
|
24512
24568
|
ref,
|
|
24513
24569
|
id,
|
|
24570
|
+
scope,
|
|
24514
24571
|
...props
|
|
24515
24572
|
})
|
|
24516
24573
|
});
|
|
@@ -24525,7 +24582,7 @@ var require_Popover_native = __commonJS({
|
|
|
24525
24582
|
Sheet: import_sheet.Sheet.Controlled,
|
|
24526
24583
|
FocusScope: import_focus_scope.FocusScopeController
|
|
24527
24584
|
}), PopoverInner = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24528
|
-
var { children, open: openProp, defaultOpen, onOpenChange,
|
|
24585
|
+
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
24586
|
prop: keepChildrenMountedProp,
|
|
24530
24587
|
defaultProp: !1,
|
|
24531
24588
|
transition: keepChildrenMountedProp === "lazy"
|
|
@@ -24537,7 +24594,7 @@ var require_Popover_native = __commonJS({
|
|
|
24537
24594
|
}
|
|
24538
24595
|
}), handleOpenChange = (0, import_core12.useEvent)(function(val, via) {
|
|
24539
24596
|
viaRef.current = via, setOpen(val);
|
|
24540
|
-
}), isAdapted = (0, import_adapt.useAdaptIsActive)(), floatingContext = (0, import_useFloatingContext.useFloatingContext)({
|
|
24597
|
+
}), isAdapted = (0, import_adapt.useAdaptIsActive)(adaptScope), floatingContext = (0, import_useFloatingContext.useFloatingContext)({
|
|
24541
24598
|
open,
|
|
24542
24599
|
setOpen: handleOpenChange,
|
|
24543
24600
|
disable: isAdapted,
|
|
@@ -24562,6 +24619,8 @@ var require_Popover_native = __commonJS({
|
|
|
24562
24619
|
};
|
|
24563
24620
|
});
|
|
24564
24621
|
var popoverContext = {
|
|
24622
|
+
popoverScope: scope,
|
|
24623
|
+
adaptScope,
|
|
24565
24624
|
id,
|
|
24566
24625
|
contentId: React4.useId(),
|
|
24567
24626
|
triggerRef,
|
|
@@ -24582,22 +24641,23 @@ var require_Popover_native = __commonJS({
|
|
|
24582
24641
|
keepChildrenMounted
|
|
24583
24642
|
}, memoizedChildren = React4.useMemo(function() {
|
|
24584
24643
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
|
|
24585
|
-
scope
|
|
24644
|
+
scope,
|
|
24586
24645
|
...popoverContext,
|
|
24587
24646
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverSheetController, {
|
|
24647
|
+
context: popoverContext,
|
|
24588
24648
|
onOpenChange: setOpen,
|
|
24589
24649
|
children
|
|
24590
24650
|
})
|
|
24591
24651
|
});
|
|
24592
24652
|
}, [
|
|
24593
|
-
|
|
24653
|
+
scope,
|
|
24594
24654
|
setOpen,
|
|
24595
24655
|
children,
|
|
24596
24656
|
...Object.values(popoverContext)
|
|
24597
24657
|
]), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.Popper, {
|
|
24598
24658
|
open,
|
|
24599
24659
|
passThrough: isAdapted,
|
|
24600
|
-
|
|
24660
|
+
scope,
|
|
24601
24661
|
stayInFrame: !0,
|
|
24602
24662
|
...restProps,
|
|
24603
24663
|
children: memoizedChildren
|
|
@@ -24613,7 +24673,7 @@ var require_Popover_native = __commonJS({
|
|
|
24613
24673
|
return open ? "open" : "closed";
|
|
24614
24674
|
}
|
|
24615
24675
|
var PopoverSheetController = function(param) {
|
|
24616
|
-
var {
|
|
24676
|
+
var { context, ...props } = param, showSheet = useShowPopoverSheet(context), breakpointActive = context.breakpointActive, getShowSheet = (0, import_core12.useGet)(showSheet);
|
|
24617
24677
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_sheet.SheetController, {
|
|
24618
24678
|
onOpenChange: function(val) {
|
|
24619
24679
|
if (getShowSheet()) {
|
|
@@ -24626,7 +24686,7 @@ var require_Popover_native = __commonJS({
|
|
|
24626
24686
|
children: props.children
|
|
24627
24687
|
});
|
|
24628
24688
|
}, useShowPopoverSheet = function(context) {
|
|
24629
|
-
var isAdapted = (0, import_adapt.useAdaptIsActive)();
|
|
24689
|
+
var isAdapted = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
|
|
24630
24690
|
return context.open === !1 ? !1 : isAdapted;
|
|
24631
24691
|
};
|
|
24632
24692
|
}
|
|
@@ -24739,7 +24799,7 @@ var require_Progress_native = __commonJS({
|
|
|
24739
24799
|
}
|
|
24740
24800
|
});
|
|
24741
24801
|
module2.exports = __toCommonJS2(Progress_exports);
|
|
24742
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_core12 = require_index_native20(), import_create_context =
|
|
24802
|
+
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
24803
|
name: INDICATOR_NAME,
|
|
24744
24804
|
variants: {
|
|
24745
24805
|
unstyled: {
|
|
@@ -25717,7 +25777,7 @@ var require_RadioGroupStyledContext_native = __commonJS({
|
|
|
25717
25777
|
var import_core12 = require_index_native20(), RadioGroupStyledContext = (0, import_core12.createStyledContext)({
|
|
25718
25778
|
size: "$true",
|
|
25719
25779
|
scaleIcon: 1
|
|
25720
|
-
});
|
|
25780
|
+
}, "RadioGroup");
|
|
25721
25781
|
}
|
|
25722
25782
|
});
|
|
25723
25783
|
|
|
@@ -26004,71 +26064,6 @@ var require_index_native66 = __commonJS({
|
|
|
26004
26064
|
}
|
|
26005
26065
|
});
|
|
26006
26066
|
|
|
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
26067
|
// ../select/dist/cjs/context.native.js
|
|
26073
26068
|
var require_context_native2 = __commonJS({
|
|
26074
26069
|
"../select/dist/cjs/context.native.js"(exports2, module2) {
|
|
@@ -26116,18 +26111,6 @@ var require_context_native2 = __commonJS({
|
|
|
26116
26111
|
SelectProvider: function() {
|
|
26117
26112
|
return SelectProvider;
|
|
26118
26113
|
},
|
|
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
26114
|
useSelectContext: function() {
|
|
26132
26115
|
return useSelectContext;
|
|
26133
26116
|
},
|
|
@@ -26136,14 +26119,14 @@ var require_context_native2 = __commonJS({
|
|
|
26136
26119
|
}
|
|
26137
26120
|
});
|
|
26138
26121
|
module2.exports = __toCommonJS2(context_exports);
|
|
26139
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"),
|
|
26140
|
-
var {
|
|
26122
|
+
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) {
|
|
26123
|
+
var { context, itemContext, children } = param;
|
|
26141
26124
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectProvider, {
|
|
26142
26125
|
isInSheet: !0,
|
|
26143
|
-
scope:
|
|
26126
|
+
scope: context.scopeName,
|
|
26144
26127
|
...context,
|
|
26145
26128
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemParentProvider, {
|
|
26146
|
-
scope:
|
|
26129
|
+
scope: context.scopeName,
|
|
26147
26130
|
...itemContext,
|
|
26148
26131
|
children
|
|
26149
26132
|
})
|
|
@@ -26314,13 +26297,13 @@ var require_SelectItem_native = __commonJS({
|
|
|
26314
26297
|
}
|
|
26315
26298
|
});
|
|
26316
26299
|
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 {
|
|
26300
|
+
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) {
|
|
26301
|
+
var { scope, value, disabled = !1, textValue: textValueProp, index, ...restProps } = props, { props: listItemProps } = (0, import_list_item.useListItem)({
|
|
26319
26302
|
...!props.unstyled && {
|
|
26320
26303
|
ellipse: !0
|
|
26321
26304
|
},
|
|
26322
26305
|
...restProps
|
|
26323
|
-
}), context = (0, import_context.useSelectItemParentContext)(
|
|
26306
|
+
}), 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
26307
|
React4.useEffect(function() {
|
|
26325
26308
|
return activeIndexSubscribe(function(i) {
|
|
26326
26309
|
var isActive = index === i;
|
|
@@ -26377,7 +26360,7 @@ var require_SelectItem_native = __commonJS({
|
|
|
26377
26360
|
handleSelect
|
|
26378
26361
|
]);
|
|
26379
26362
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemContextProvider, {
|
|
26380
|
-
scope
|
|
26363
|
+
scope,
|
|
26381
26364
|
value,
|
|
26382
26365
|
textId: textId || "",
|
|
26383
26366
|
isSelected,
|
|
@@ -26494,16 +26477,16 @@ var require_SelectItemText_native = __commonJS({
|
|
|
26494
26477
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
26495
26478
|
}
|
|
26496
26479
|
}), SelectItemText = SelectItemTextFrame.styleable(function(props, forwardedRef) {
|
|
26497
|
-
var {
|
|
26480
|
+
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
26481
|
return contents.current = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemTextFrame, {
|
|
26499
26482
|
className,
|
|
26500
26483
|
size: itemParentContext.size,
|
|
26501
26484
|
id: itemContext.textId,
|
|
26502
26485
|
...itemTextProps,
|
|
26503
26486
|
ref: composedRefs
|
|
26504
|
-
}),
|
|
26487
|
+
}), (0, import_core12.useIsomorphicLayoutEffect)(function() {
|
|
26505
26488
|
itemParentContext.initialValue === itemContext.value && !context.selectedIndex && context.setSelectedItem(contents.current);
|
|
26506
|
-
}, []),
|
|
26489
|
+
}, []), (0, import_core12.useIsomorphicLayoutEffect)(function() {
|
|
26507
26490
|
return itemParentContext.valueSubscribe(function(val) {
|
|
26508
26491
|
val === itemContext.value && context.setSelectedItem(contents.current);
|
|
26509
26492
|
});
|
|
@@ -26628,7 +26611,7 @@ var require_SelectTrigger_native = __commonJS({
|
|
|
26628
26611
|
});
|
|
26629
26612
|
module2.exports = __toCommonJS2(SelectTrigger_exports);
|
|
26630
26613
|
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, {
|
|
26614
|
+
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
26615
|
return itemParentContext.shouldRenderWebNative ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_list_item.ListItem, {
|
|
26633
26616
|
componentName: TRIGGER_NAME,
|
|
26634
26617
|
unstyled,
|
|
@@ -26665,6 +26648,71 @@ var require_SelectTrigger_native = __commonJS({
|
|
|
26665
26648
|
}
|
|
26666
26649
|
});
|
|
26667
26650
|
|
|
26651
|
+
// ../select/dist/cjs/constants.native.js
|
|
26652
|
+
var require_constants_native5 = __commonJS({
|
|
26653
|
+
"../select/dist/cjs/constants.native.js"(exports2, module2) {
|
|
26654
|
+
"use strict";
|
|
26655
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
26656
|
+
for (var name in all) __defProp2(target, name, {
|
|
26657
|
+
get: all[name],
|
|
26658
|
+
enumerable: !0
|
|
26659
|
+
});
|
|
26660
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
26661
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
26662
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
26663
|
+
for (var _loop = function() {
|
|
26664
|
+
var key = _step.value;
|
|
26665
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
26666
|
+
get: function() {
|
|
26667
|
+
return from[key];
|
|
26668
|
+
},
|
|
26669
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
26670
|
+
});
|
|
26671
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
26672
|
+
} catch (err) {
|
|
26673
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
26674
|
+
} finally {
|
|
26675
|
+
try {
|
|
26676
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
26677
|
+
} finally {
|
|
26678
|
+
if (_didIteratorError)
|
|
26679
|
+
throw _iteratorError;
|
|
26680
|
+
}
|
|
26681
|
+
}
|
|
26682
|
+
return to;
|
|
26683
|
+
}, __toCommonJS2 = function(mod) {
|
|
26684
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
26685
|
+
value: !0
|
|
26686
|
+
}), mod);
|
|
26687
|
+
}, constants_exports = {};
|
|
26688
|
+
__export2(constants_exports, {
|
|
26689
|
+
FALLBACK_THRESHOLD: function() {
|
|
26690
|
+
return FALLBACK_THRESHOLD;
|
|
26691
|
+
},
|
|
26692
|
+
MIN_HEIGHT: function() {
|
|
26693
|
+
return MIN_HEIGHT;
|
|
26694
|
+
},
|
|
26695
|
+
SCROLL_ARROW_THRESHOLD: function() {
|
|
26696
|
+
return SCROLL_ARROW_THRESHOLD;
|
|
26697
|
+
},
|
|
26698
|
+
SCROLL_ARROW_VELOCITY: function() {
|
|
26699
|
+
return SCROLL_ARROW_VELOCITY;
|
|
26700
|
+
},
|
|
26701
|
+
SELECT_NAME: function() {
|
|
26702
|
+
return SELECT_NAME;
|
|
26703
|
+
},
|
|
26704
|
+
VIEWPORT_NAME: function() {
|
|
26705
|
+
return VIEWPORT_NAME;
|
|
26706
|
+
},
|
|
26707
|
+
WINDOW_PADDING: function() {
|
|
26708
|
+
return WINDOW_PADDING;
|
|
26709
|
+
}
|
|
26710
|
+
});
|
|
26711
|
+
module2.exports = __toCommonJS2(constants_exports);
|
|
26712
|
+
var SELECT_NAME = "Select", WINDOW_PADDING = 8, SCROLL_ARROW_VELOCITY = 8, SCROLL_ARROW_THRESHOLD = 8, MIN_HEIGHT = 80, FALLBACK_THRESHOLD = 16, VIEWPORT_NAME = "SelectViewport";
|
|
26713
|
+
}
|
|
26714
|
+
});
|
|
26715
|
+
|
|
26668
26716
|
// ../select/dist/cjs/SelectViewport.native.js
|
|
26669
26717
|
var require_SelectViewport_native = __commonJS({
|
|
26670
26718
|
"../select/dist/cjs/SelectViewport.native.js"(exports2, module2) {
|
|
@@ -26709,12 +26757,12 @@ var require_SelectViewport_native = __commonJS({
|
|
|
26709
26757
|
});
|
|
26710
26758
|
module2.exports = __toCommonJS2(SelectViewport_native_exports);
|
|
26711
26759
|
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 {
|
|
26760
|
+
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
26761
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
26762
|
+
scope: context.adaptScope,
|
|
26714
26763
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
26715
26764
|
name: themeName,
|
|
26716
26765
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.ForwardSelectContext, {
|
|
26717
|
-
__scopeSelect,
|
|
26718
26766
|
itemContext: itemParentContext,
|
|
26719
26767
|
context,
|
|
26720
26768
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptContext.Provider, {
|
|
@@ -26773,7 +26821,7 @@ var require_useSelectBreakpointActive_native = __commonJS({
|
|
|
26773
26821
|
});
|
|
26774
26822
|
module2.exports = __toCommonJS2(useSelectBreakpointActive_exports);
|
|
26775
26823
|
var import_adapt = require_index_native31(), useShowSelectSheet = function(context) {
|
|
26776
|
-
var breakpointActive = (0, import_adapt.useAdaptIsActive)();
|
|
26824
|
+
var breakpointActive = (0, import_adapt.useAdaptIsActive)(context.adaptScope);
|
|
26777
26825
|
return context.open === !1 ? !1 : breakpointActive;
|
|
26778
26826
|
};
|
|
26779
26827
|
}
|
|
@@ -26847,7 +26895,7 @@ var require_Select_native = __commonJS({
|
|
|
26847
26895
|
name: VALUE_NAME,
|
|
26848
26896
|
userSelect: "none"
|
|
26849
26897
|
}), SelectValue = SelectValueFrame.styleable(function(param, forwardedRef) {
|
|
26850
|
-
var {
|
|
26898
|
+
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
26899
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectValueFrame, {
|
|
26852
26900
|
...!props.unstyled && {
|
|
26853
26901
|
size: itemParentContext.size,
|
|
@@ -26878,18 +26926,18 @@ var require_Select_native = __commonJS({
|
|
|
26878
26926
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_text2.Paragraph, {
|
|
26879
26927
|
children: "\u25BC"
|
|
26880
26928
|
})
|
|
26881
|
-
}),
|
|
26882
|
-
name:
|
|
26929
|
+
}), SelectItemIndicatorFrame = (0, import_core12.styled)(import_stacks3.XStack, {
|
|
26930
|
+
name: "SelectItemIndicator"
|
|
26883
26931
|
}), SelectItemIndicator = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
26884
|
-
var {
|
|
26932
|
+
var { scope, ...itemIndicatorProps } = props, context = (0, import_context.useSelectItemParentContext)(scope), itemContext = (0, import_SelectItem.useSelectItemContext)(scope);
|
|
26885
26933
|
return context.shouldRenderWebNative ? null : itemContext.isSelected ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemIndicatorFrame, {
|
|
26886
26934
|
"aria-hidden": !0,
|
|
26887
26935
|
...itemIndicatorProps,
|
|
26888
26936
|
ref: forwardedRef
|
|
26889
26937
|
}) : null;
|
|
26890
|
-
})
|
|
26891
|
-
|
|
26892
|
-
|
|
26938
|
+
}), GROUP_NAME = "SelectGroup", { Provider: SelectGroupContextProvider, useStyledContext: useSelectGroupContext } = (0, import_core12.createStyledContext)({
|
|
26939
|
+
id: ""
|
|
26940
|
+
}, "SelectGroup"), SelectGroupFrame = (0, import_core12.styled)(import_stacks3.YStack, {
|
|
26893
26941
|
name: GROUP_NAME,
|
|
26894
26942
|
width: "100%"
|
|
26895
26943
|
}), NativeSelectTextFrame = (0, import_core12.styled)(import_text2.SizableText, {
|
|
@@ -26925,7 +26973,7 @@ var require_Select_native = __commonJS({
|
|
|
26925
26973
|
size: "$2"
|
|
26926
26974
|
}
|
|
26927
26975
|
}), SelectGroup = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
26928
|
-
var {
|
|
26976
|
+
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
26977
|
return itemParentContext.shouldRenderWebNative ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(NativeSelectFrame, {
|
|
26930
26978
|
asChild: !0,
|
|
26931
26979
|
size: size2,
|
|
@@ -26955,14 +27003,14 @@ var require_Select_native = __commonJS({
|
|
|
26955
27003
|
});
|
|
26956
27004
|
}();
|
|
26957
27005
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectGroupContextProvider, {
|
|
26958
|
-
scope
|
|
27006
|
+
scope,
|
|
26959
27007
|
id: groupId || "",
|
|
26960
27008
|
children: content
|
|
26961
27009
|
});
|
|
26962
27010
|
});
|
|
26963
27011
|
SelectGroup.displayName = GROUP_NAME;
|
|
26964
27012
|
var LABEL_NAME = "SelectLabel", SelectLabel = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
26965
|
-
var {
|
|
27013
|
+
var { scope, ...labelProps } = props, context = (0, import_context.useSelectItemParentContext)(scope), groupContext = useSelectGroupContext(scope);
|
|
26966
27014
|
return context.shouldRenderWebNative ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_list_item.ListItem, {
|
|
26967
27015
|
tag: "div",
|
|
26968
27016
|
componentName: LABEL_NAME,
|
|
@@ -26977,7 +27025,7 @@ var require_Select_native = __commonJS({
|
|
|
26977
27025
|
var SelectSeparator = (0, import_core12.styled)(import_separator.Separator, {
|
|
26978
27026
|
name: "SelectSeparator"
|
|
26979
27027
|
}), SelectSheetController = function(props) {
|
|
26980
|
-
var context = (0, import_context.useSelectContext)(
|
|
27028
|
+
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
27029
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_sheet.SheetController, {
|
|
26982
27030
|
onOpenChange: function(val) {
|
|
26983
27031
|
getShowSheet() && props.onOpenChange(val);
|
|
@@ -26991,12 +27039,13 @@ var require_Select_native = __commonJS({
|
|
|
26991
27039
|
children: props.children
|
|
26992
27040
|
});
|
|
26993
27041
|
}, Select = (0, import_helpers.withStaticProperties)(function(props) {
|
|
26994
|
-
var
|
|
27042
|
+
var adaptScope = `AdaptSelect${props.scope || ""}`;
|
|
26995
27043
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParent, {
|
|
26996
|
-
scope:
|
|
27044
|
+
scope: adaptScope,
|
|
26997
27045
|
portal: !0,
|
|
26998
27046
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectInner, {
|
|
26999
|
-
|
|
27047
|
+
scope: props.scope,
|
|
27048
|
+
adaptScope,
|
|
27000
27049
|
...props
|
|
27001
27050
|
})
|
|
27002
27051
|
});
|
|
@@ -27035,7 +27084,7 @@ var require_Select_native = __commonJS({
|
|
|
27035
27084
|
];
|
|
27036
27085
|
}
|
|
27037
27086
|
function SelectInner(props) {
|
|
27038
|
-
var {
|
|
27087
|
+
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
27088
|
return {};
|
|
27040
27089
|
}, {})[1], [selectedItem, setSelectedItem] = React4.useState(null), [open, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
27041
27090
|
prop: openProp,
|
|
@@ -27078,7 +27127,9 @@ var require_Select_native = __commonJS({
|
|
|
27078
27127
|
});
|
|
27079
27128
|
}, 1, {}, []);
|
|
27080
27129
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.SelectItemParentProvider, {
|
|
27081
|
-
|
|
27130
|
+
scopeName: scope,
|
|
27131
|
+
scope,
|
|
27132
|
+
adaptScope,
|
|
27082
27133
|
initialValue: React4.useMemo(function() {
|
|
27083
27134
|
return value;
|
|
27084
27135
|
}, [
|
|
@@ -27092,9 +27143,8 @@ var require_Select_native = __commonJS({
|
|
|
27092
27143
|
onChange: React4.useCallback(function(val) {
|
|
27093
27144
|
setValue(val), emitValue(val);
|
|
27094
27145
|
}, []),
|
|
27095
|
-
onActiveChange: (0, import_core12.useEvent)(function() {
|
|
27096
|
-
|
|
27097
|
-
onActiveChange == null || onActiveChange(...args);
|
|
27146
|
+
onActiveChange: (0, import_core12.useEvent)(function(value2, index) {
|
|
27147
|
+
onActiveChange == null || onActiveChange(value2, index);
|
|
27098
27148
|
}),
|
|
27099
27149
|
setSelectedIndex,
|
|
27100
27150
|
setValueAtIndex: React4.useCallback(function(index, value2) {
|
|
@@ -27102,7 +27152,9 @@ var require_Select_native = __commonJS({
|
|
|
27102
27152
|
}, []),
|
|
27103
27153
|
shouldRenderWebNative,
|
|
27104
27154
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.SelectProvider, {
|
|
27105
|
-
scope
|
|
27155
|
+
scope,
|
|
27156
|
+
scopeName: scope,
|
|
27157
|
+
adaptScope,
|
|
27106
27158
|
disablePreventBodyScroll,
|
|
27107
27159
|
dir,
|
|
27108
27160
|
blockSelection: !1,
|
|
@@ -27112,7 +27164,6 @@ var require_Select_native = __commonJS({
|
|
|
27112
27164
|
forceUpdate,
|
|
27113
27165
|
valueNode,
|
|
27114
27166
|
onValueNodeChange: setValueNode,
|
|
27115
|
-
scopeKey: props.scopeKey,
|
|
27116
27167
|
activeIndex,
|
|
27117
27168
|
selectedIndex,
|
|
27118
27169
|
setActiveIndex: setActiveIndexDebounced,
|
|
@@ -27121,7 +27172,7 @@ var require_Select_native = __commonJS({
|
|
|
27121
27172
|
native,
|
|
27122
27173
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectSheetController, {
|
|
27123
27174
|
onOpenChange: setOpen,
|
|
27124
|
-
|
|
27175
|
+
scope,
|
|
27125
27176
|
children: shouldRenderWebNative ? children : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectImpl, {
|
|
27126
27177
|
activeIndexRef,
|
|
27127
27178
|
listContentRef,
|
|
@@ -30057,6 +30108,71 @@ var require_index_native74 = __commonJS({
|
|
|
30057
30108
|
}
|
|
30058
30109
|
});
|
|
30059
30110
|
|
|
30111
|
+
// ../../core/use-window-dimensions/dist/cjs/helpers.native.js
|
|
30112
|
+
var require_helpers_native4 = __commonJS({
|
|
30113
|
+
"../../core/use-window-dimensions/dist/cjs/helpers.native.js"(exports2, module2) {
|
|
30114
|
+
"use strict";
|
|
30115
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
30116
|
+
for (var name in all) __defProp2(target, name, {
|
|
30117
|
+
get: all[name],
|
|
30118
|
+
enumerable: !0
|
|
30119
|
+
});
|
|
30120
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
30121
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
30122
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
30123
|
+
for (var _loop = function() {
|
|
30124
|
+
var key = _step.value;
|
|
30125
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
30126
|
+
get: function() {
|
|
30127
|
+
return from[key];
|
|
30128
|
+
},
|
|
30129
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
30130
|
+
});
|
|
30131
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
30132
|
+
} catch (err) {
|
|
30133
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
30134
|
+
} finally {
|
|
30135
|
+
try {
|
|
30136
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
30137
|
+
} finally {
|
|
30138
|
+
if (_didIteratorError)
|
|
30139
|
+
throw _iteratorError;
|
|
30140
|
+
}
|
|
30141
|
+
}
|
|
30142
|
+
return to;
|
|
30143
|
+
}, __toCommonJS2 = function(mod) {
|
|
30144
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
30145
|
+
value: !0
|
|
30146
|
+
}), mod);
|
|
30147
|
+
}, helpers_native_exports = {};
|
|
30148
|
+
__export2(helpers_native_exports, {
|
|
30149
|
+
getWindowSize: function() {
|
|
30150
|
+
return getWindowSize;
|
|
30151
|
+
},
|
|
30152
|
+
subscribe: function() {
|
|
30153
|
+
return subscribe;
|
|
30154
|
+
}
|
|
30155
|
+
});
|
|
30156
|
+
module2.exports = __toCommonJS2(helpers_native_exports);
|
|
30157
|
+
var import_react_native4 = require_fake_react_native();
|
|
30158
|
+
function getWindowSize() {
|
|
30159
|
+
return import_react_native4.Dimensions.get("window");
|
|
30160
|
+
}
|
|
30161
|
+
var cbs = /* @__PURE__ */ new Set();
|
|
30162
|
+
import_react_native4.Dimensions.addEventListener("change", function(param) {
|
|
30163
|
+
var { window: window2 } = param;
|
|
30164
|
+
cbs.forEach(function(cb) {
|
|
30165
|
+
return cb(window2);
|
|
30166
|
+
});
|
|
30167
|
+
});
|
|
30168
|
+
function subscribe(cb) {
|
|
30169
|
+
return cbs.add(cb), function() {
|
|
30170
|
+
return cbs.delete(cb);
|
|
30171
|
+
};
|
|
30172
|
+
}
|
|
30173
|
+
}
|
|
30174
|
+
});
|
|
30175
|
+
|
|
30060
30176
|
// ../../core/use-window-dimensions/dist/cjs/index.native.js
|
|
30061
30177
|
var require_index_native75 = __commonJS({
|
|
30062
30178
|
"../../core/use-window-dimensions/dist/cjs/index.native.js"(exports2, module2) {
|
|
@@ -30115,30 +30231,19 @@ var require_index_native75 = __commonJS({
|
|
|
30115
30231
|
}
|
|
30116
30232
|
});
|
|
30117
30233
|
module2.exports = __toCommonJS2(index_exports2);
|
|
30118
|
-
var import_react3 = __toESM2(require("react")), import_constants4 = require_index_native6(),
|
|
30119
|
-
|
|
30120
|
-
|
|
30234
|
+
var import_react3 = __toESM2(require("react")), import_constants4 = require_index_native6(), import_helpers = require_helpers_native4(), initialValue = {
|
|
30235
|
+
width: 800,
|
|
30236
|
+
height: 600,
|
|
30237
|
+
scale: 1,
|
|
30238
|
+
fontScale: 1
|
|
30121
30239
|
};
|
|
30122
30240
|
function configureInitialWindowDimensions(next) {
|
|
30123
30241
|
Object.assign(initialValue, next);
|
|
30124
30242
|
}
|
|
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
30243
|
function useWindowDimensions() {
|
|
30137
30244
|
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");
|
|
30245
|
+
return import_react3.default.useSyncExternalStore(import_helpers.subscribe, import_helpers.getWindowSize, function() {
|
|
30246
|
+
return import_constants4.isWeb ? serverValue : (0, import_helpers.getWindowSize)();
|
|
30142
30247
|
});
|
|
30143
30248
|
}
|
|
30144
30249
|
}
|
|
@@ -30349,7 +30454,7 @@ __reExport(index_exports, __toESM(require_index_native46()), module.exports);
|
|
|
30349
30454
|
__reExport(index_exports, __toESM(require_index_native47()), module.exports);
|
|
30350
30455
|
__reExport(index_exports, __toESM(require_index_native52()), module.exports);
|
|
30351
30456
|
__reExport(index_exports, __toESM(require_index_native11()), module.exports);
|
|
30352
|
-
__reExport(index_exports, __toESM(
|
|
30457
|
+
__reExport(index_exports, __toESM(require_index_native33()), module.exports);
|
|
30353
30458
|
__reExport(index_exports, __toESM(require_index_native39()), module.exports);
|
|
30354
30459
|
__reExport(index_exports, __toESM(require_index_native44()), module.exports);
|
|
30355
30460
|
__reExport(index_exports, __toESM(require_index_native53()), module.exports);
|