revert radix chage
This commit is contained in:
@@ -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 (
|
||||
<FocusScope loop asChild trapped>
|
||||
<FocusScope.FocusScope loop asChild trapped>
|
||||
<View
|
||||
role="dialog"
|
||||
aria-role="dialog"
|
||||
@@ -209,7 +207,7 @@ export function Inner({
|
||||
!reduceMotionEnabled && a.zoom_fade_in,
|
||||
style,
|
||||
])}>
|
||||
<DismissableLayer
|
||||
<DismissableLayer.DismissableLayer
|
||||
onInteractOutside={preventDefault}
|
||||
onFocusOutside={preventDefault}
|
||||
onDismiss={close}
|
||||
@@ -218,9 +216,9 @@ export function Inner({
|
||||
<View style={[gtMobile ? a.p_2xl : a.p_xl, contentContainerStyle]}>
|
||||
{children}
|
||||
</View>
|
||||
</DismissableLayer>
|
||||
</DismissableLayer.DismissableLayer>
|
||||
</View>
|
||||
</FocusScope>
|
||||
</FocusScope.FocusScope>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -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 (
|
||||
<RadixFocusScope loop asChild trapped>
|
||||
<RadixFocusScope.FocusScope loop asChild trapped>
|
||||
{children}
|
||||
</RadixFocusScope>
|
||||
</RadixFocusScope.FocusScope>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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 (
|
||||
<Pressable
|
||||
accessibilityHint={undefined}
|
||||
@@ -76,7 +75,7 @@ function LightboxContainer({
|
||||
style={[a.fixed, a.inset_0, a.z_10]}>
|
||||
<Backdrop />
|
||||
<RemoveScrollBar />
|
||||
<FocusScope loop trapped asChild>
|
||||
<FocusScope.FocusScope loop trapped asChild>
|
||||
<div
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
@@ -84,7 +83,7 @@ function LightboxContainer({
|
||||
style={{position: 'absolute', inset: 0}}>
|
||||
{children}
|
||||
</div>
|
||||
</FocusScope>
|
||||
</FocusScope.FocusScope>
|
||||
</Pressable>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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 (
|
||||
<View
|
||||
@@ -80,7 +79,7 @@ export function WelcomeModal({control}: WelcomeModalProps) {
|
||||
web({backdropFilter: 'blur(15px)'}),
|
||||
isExiting ? a.fade_out : a.fade_in,
|
||||
]}>
|
||||
<FocusScope asChild loop trapped>
|
||||
<FocusScope.FocusScope asChild loop trapped>
|
||||
<View
|
||||
style={flatten([
|
||||
{
|
||||
@@ -245,7 +244,7 @@ export function WelcomeModal({control}: WelcomeModalProps) {
|
||||
</Button>
|
||||
</ImageBackground>
|
||||
</View>
|
||||
</FocusScope>
|
||||
</FocusScope.FocusScope>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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 (
|
||||
<FocusScope loop trapped asChild>
|
||||
<DismissableLayer
|
||||
<FocusScope.FocusScope loop trapped asChild>
|
||||
<DismissableLayer.DismissableLayer
|
||||
role="dialog"
|
||||
aria-modal
|
||||
style={flatten([
|
||||
@@ -86,8 +84,8 @@ function Inner({state}: {state: ComposerOpts}) {
|
||||
openGallery={state.openGallery}
|
||||
/>
|
||||
</View>
|
||||
</DismissableLayer>
|
||||
</FocusScope>
|
||||
</DismissableLayer.DismissableLayer>
|
||||
</FocusScope.FocusScope>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user