From 743dbe9db68def9f58c56906e68e7148aa35b406 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Fri, 22 May 2026 11:05:43 +0300 Subject: [PATCH] revert radix chage --- src/components/Dialog/index.web.tsx | 14 ++++++-------- src/components/FocusScope/index.web.tsx | 6 +++--- src/components/Lightbox/Lightbox.web.tsx | 9 ++++----- src/components/WelcomeModal.tsx | 9 ++++----- src/view/shell/Composer.web.tsx | 14 ++++++-------- 5 files changed, 23 insertions(+), 29 deletions(-) diff --git a/src/components/Dialog/index.web.tsx b/src/components/Dialog/index.web.tsx index e6364a2b86..9666e9a7a4 100644 --- a/src/components/Dialog/index.web.tsx +++ b/src/components/Dialog/index.web.tsx @@ -18,9 +18,7 @@ import { } from 'react-native' import {msg} from '@lingui/core/macro' import {useLingui} from '@lingui/react' -import {DismissableLayer} from '@radix-ui/react-dismissable-layer' -import {useFocusGuards} from '@radix-ui/react-focus-guards' -import {FocusScope} from '@radix-ui/react-focus-scope' +import {DismissableLayer, FocusGuards, FocusScope} from 'radix-ui/internal' import {RemoveScrollBar} from 'react-remove-scroll-bar' import {logger} from '#/logger' @@ -178,9 +176,9 @@ export function Inner({ const {close} = useContext(Context) const {gtMobile} = useBreakpoints() const {reduceMotionEnabled} = useA11y() - useFocusGuards() + FocusGuards.useFocusGuards() return ( - + - {children} - + - + ) } diff --git a/src/components/FocusScope/index.web.tsx b/src/components/FocusScope/index.web.tsx index 3fc8675d46..541cd72601 100644 --- a/src/components/FocusScope/index.web.tsx +++ b/src/components/FocusScope/index.web.tsx @@ -1,4 +1,4 @@ -import {FocusScope as RadixFocusScope} from '@radix-ui/react-focus-scope' +import {FocusScope as RadixFocusScope} from 'radix-ui/internal' /* * The web version of the FocusScope component is a proper implementation, we @@ -7,8 +7,8 @@ import {FocusScope as RadixFocusScope} from '@radix-ui/react-focus-scope' */ export function FocusScope({children}: {children: React.ReactNode}) { return ( - + {children} - + ) } diff --git a/src/components/Lightbox/Lightbox.web.tsx b/src/components/Lightbox/Lightbox.web.tsx index ed8abf5c75..641b2c3402 100644 --- a/src/components/Lightbox/Lightbox.web.tsx +++ b/src/components/Lightbox/Lightbox.web.tsx @@ -2,8 +2,7 @@ import {useCallback, useEffect, useRef, useState} from 'react' import {Pressable, StyleSheet, View} from 'react-native' import {Image} from 'expo-image' import {Trans, useLingui} from '@lingui/react/macro' -import {useFocusGuards} from '@radix-ui/react-focus-guards' -import {FocusScope} from '@radix-ui/react-focus-scope' +import {FocusGuards, FocusScope} from 'radix-ui/internal' import {RemoveScrollBar} from 'react-remove-scroll-bar' import {saveImageToMediaLibrary} from '#/lib/media/manip' @@ -67,7 +66,7 @@ function LightboxContainer({ handleBackgroundPress: () => void }) { const {t: l} = useLingui() - useFocusGuards() + FocusGuards.useFocusGuards() return ( - +
{children}
-
+
) } diff --git a/src/components/WelcomeModal.tsx b/src/components/WelcomeModal.tsx index 1cd3a792bc..4b3bc4ca99 100644 --- a/src/components/WelcomeModal.tsx +++ b/src/components/WelcomeModal.tsx @@ -4,8 +4,7 @@ import {ImageBackground} from 'expo-image' import {msg} from '@lingui/core/macro' import {useLingui} from '@lingui/react' import {Trans} from '@lingui/react/macro' -import {useFocusGuards} from '@radix-ui/react-focus-guards' -import {FocusScope} from '@radix-ui/react-focus-scope' +import {FocusGuards, FocusScope} from 'radix-ui/internal' import {useLoggedOutViewControls} from '#/state/shell/logged-out' import {Logo} from '#/view/icons/Logo' @@ -65,7 +64,7 @@ export function WelcomeModal({control}: WelcomeModalProps) { requestSwitchToAccount({requestedAccount: 'existing'}) } - useFocusGuards() + FocusGuards.useFocusGuards() return ( - + - + ) } diff --git a/src/view/shell/Composer.web.tsx b/src/view/shell/Composer.web.tsx index e4d26693db..d3232f492b 100644 --- a/src/view/shell/Composer.web.tsx +++ b/src/view/shell/Composer.web.tsx @@ -1,7 +1,5 @@ import {StyleSheet, View} from 'react-native' -import {DismissableLayer} from '@radix-ui/react-dismissable-layer' -import {useFocusGuards} from '@radix-ui/react-focus-guards' -import {FocusScope} from '@radix-ui/react-focus-scope' +import {DismissableLayer, FocusGuards, FocusScope} from 'radix-ui/internal' import {RemoveScrollBar} from 'react-remove-scroll-bar' import {useA11y} from '#/state/a11y' @@ -38,11 +36,11 @@ function Inner({state}: {state: ComposerOpts}) { const {gtMobile} = useBreakpoints() const {reduceMotionEnabled} = useA11y() - useFocusGuards() + FocusGuards.useFocusGuards() return ( - - + - - + + ) }