Keep all radix dependencies aligned by using single package (#8219)
* keep all radix deps aligned by using single package * import directly from `radix-ui` or `radix-ui/internal` * prevent radix leaking into native build
This commit is contained in:
@@ -3,8 +3,7 @@ import {Pressable, useWindowDimensions, View} from 'react-native'
|
||||
import Picker from '@emoji-mart/react'
|
||||
import {msg} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {DismissableLayer} from '@radix-ui/react-dismissable-layer'
|
||||
import {FocusScope} from '@radix-ui/react-focus-scope'
|
||||
import {DismissableLayer, FocusScope} from 'radix-ui/internal'
|
||||
|
||||
import {textInputWebEmitter} from '#/view/com/composer/text-input/textInputWebEmitter'
|
||||
import {atoms as a, flatten} from '#/alf'
|
||||
@@ -121,7 +120,7 @@ export function EmojiPicker({state, close, pinToTop}: IProps) {
|
||||
|
||||
return (
|
||||
<Portal>
|
||||
<FocusScope
|
||||
<FocusScope.FocusScope
|
||||
loop
|
||||
trapped
|
||||
onUnmountAutoFocus={e => {
|
||||
@@ -154,7 +153,7 @@ export function EmojiPicker({state, close, pinToTop}: IProps) {
|
||||
},
|
||||
])}>
|
||||
<View style={[{position: 'absolute'}, position]}>
|
||||
<DismissableLayer
|
||||
<DismissableLayer.DismissableLayer
|
||||
onFocusOutside={evt => evt.preventDefault()}
|
||||
onDismiss={close}>
|
||||
<Picker
|
||||
@@ -164,7 +163,7 @@ export function EmojiPicker({state, close, pinToTop}: IProps) {
|
||||
onEmojiSelect={onInsert}
|
||||
autoFocus={true}
|
||||
/>
|
||||
</DismissableLayer>
|
||||
</DismissableLayer.DismissableLayer>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
@@ -175,7 +174,7 @@ export function EmojiPicker({state, close, pinToTop}: IProps) {
|
||||
onPress={close}
|
||||
style={[a.fixed, a.inset_0]}
|
||||
/>
|
||||
</FocusScope>
|
||||
</FocusScope.FocusScope>
|
||||
</Portal>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user