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