tamagui 1.126.3 → 1.126.4

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/native.js CHANGED
@@ -16939,8 +16939,9 @@ var require_Adapt_native = __commonJS({
16939
16939
  }, [
16940
16940
  when,
16941
16941
  platform2,
16942
- context,
16943
- enabled
16942
+ enabled,
16943
+ context.setWhen,
16944
+ context.setPlatform
16944
16945
  ]), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
16945
16946
  return function() {
16946
16947
  var _context_setWhen, _context_setPlatform;
@@ -19569,48 +19570,44 @@ var require_Dialog_native = __commonJS({
19569
19570
  });
19570
19571
  return isAdapted ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
19571
19572
  children: content
19572
- }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
19573
- hostName: context.adaptName,
19573
+ }) : context.modal ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
19574
+ hostName: context.modal ? "root" : context.adaptName,
19574
19575
  children: content
19575
- });
19576
+ }) : content;
19576
19577
  }, DialogPortal = function(props) {
19577
19578
  var { __scopeDialog, forceMount, children, ...frameProps } = props, context = useDialogContext(PORTAL_NAME, __scopeDialog), isShowing = forceMount || context.open, [isFullyHidden, setIsFullyHidden] = React4.useState(!isShowing), isAdapted = (0, import_adapt.useAdaptIsActive)();
19578
19579
  isShowing && isFullyHidden && setIsFullyHidden(!1);
19579
19580
  var handleExitComplete = React4.useCallback(function() {
19580
19581
  setIsFullyHidden(!0);
19581
- }, []), zIndex = (0, import_core12.getExpandedShorthand)("zIndex", props);
19582
- if (context.modal) {
19583
- var contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_z_index_stack2.StackZIndexContext, {
19584
- zIndex: (0, import_portal2.resolveViewZIndex)(zIndex),
19585
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
19586
- onExitComplete: handleExitComplete,
19587
- children: isShowing || isAdapted ? children : null
19588
- })
19589
- });
19590
- if (isFullyHidden && !isAdapted) return null;
19591
- var framedContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalProvider2, {
19592
- scope: __scopeDialog,
19593
- forceMount,
19594
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalFrame, {
19595
- pointerEvents: isShowing ? "auto" : "none",
19596
- ...frameProps,
19597
- children: contents
19598
- })
19599
- });
19600
- return import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
19601
- zIndex,
19602
- // set to 1000 which "boosts" it 1000 above baseline for current context
19603
- // this makes sure its above (this first 1k) popovers on the same layer
19604
- stackZIndex: 1e3,
19605
- children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PassthroughTheme, {
19606
- children: framedContents
19607
- })
19608
- }) : isAdapted ? framedContents : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
19609
- __scopeDialog,
19582
+ }, []), zIndex = (0, import_core12.getExpandedShorthand)("zIndex", props), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_z_index_stack2.StackZIndexContext, {
19583
+ zIndex: (0, import_portal2.resolveViewZIndex)(zIndex),
19584
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
19585
+ onExitComplete: handleExitComplete,
19586
+ children: isShowing || isAdapted ? children : null
19587
+ })
19588
+ });
19589
+ if (isFullyHidden && !isAdapted) return null;
19590
+ var framedContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PortalProvider2, {
19591
+ scope: __scopeDialog,
19592
+ forceMount,
19593
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalFrame, {
19594
+ pointerEvents: isShowing ? "auto" : "none",
19595
+ ...frameProps,
19596
+ children: contents
19597
+ })
19598
+ });
19599
+ return import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
19600
+ zIndex,
19601
+ // set to 1000 which "boosts" it 1000 above baseline for current context
19602
+ // this makes sure its above (this first 1k) popovers on the same layer
19603
+ stackZIndex: 1e3,
19604
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PassthroughTheme, {
19610
19605
  children: framedContents
19611
- });
19612
- }
19613
- return children;
19606
+ })
19607
+ }) : isAdapted ? framedContents : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogPortalItem, {
19608
+ __scopeDialog,
19609
+ children: framedContents
19610
+ });
19614
19611
  }, PassthroughTheme = function(param) {
19615
19612
  var { children } = param, themeName = (0, import_core12.useThemeName)();
19616
19613
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
@@ -19624,6 +19621,11 @@ var require_Dialog_native = __commonJS({
19624
19621
  var { __scopeDialog, ...props } = param, portalContext = usePortalContext(OVERLAY_NAME, __scopeDialog), { forceMount = portalContext.forceMount, ...overlayProps } = props, context = useDialogContext(OVERLAY_NAME, __scopeDialog), isAdapted = (0, import_adapt.useAdaptIsActive)();
19625
19622
  return !forceMount && (!context.modal || isAdapted) ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogOverlayFrame, {
19626
19623
  "data-state": getState(context.open),
19624
+ // TODO: this will be apply for v2
19625
+ // onPress={() => {
19626
+ // // if the overlay is pressed, close the dialog
19627
+ // context.onOpenChange(false)
19628
+ // }}
19627
19629
  // We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay.
19628
19630
  pointerEvents: context.open ? "auto" : "none",
19629
19631
  ...overlayProps,