diff options
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/Dialog/index.web.tsx | 26 | ||||
-rw-r--r-- | src/components/Menu/index.web.tsx | 20 | ||||
-rw-r--r-- | src/components/dms/EmojiReactionPicker.web.tsx | 4 |
3 files changed, 24 insertions, 26 deletions
diff --git a/src/components/Dialog/index.web.tsx b/src/components/Dialog/index.web.tsx index 153954691..12bd8819b 100644 --- a/src/components/Dialog/index.web.tsx +++ b/src/components/Dialog/index.web.tsx @@ -1,17 +1,15 @@ import React, {useImperativeHandle} from 'react' import { FlatList, - FlatListProps, - StyleProp, + type FlatListProps, + type StyleProp, TouchableWithoutFeedback, View, - ViewStyle, + type ViewStyle, } from 'react-native' import {msg} from '@lingui/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' @@ -21,9 +19,9 @@ import {atoms as a, flatten, useBreakpoints, useTheme, web} from '#/alf' import {Button, ButtonIcon} from '#/components/Button' import {Context} from '#/components/Dialog/context' import { - DialogControlProps, - DialogInnerProps, - DialogOuterProps, + type DialogControlProps, + type DialogInnerProps, + type DialogOuterProps, } from '#/components/Dialog/types' import {TimesLarge_Stroke2_Corner0_Rounded as X} from '#/components/icons/Times' import {Portal} from '#/components/Portal' @@ -162,9 +160,9 @@ export function Inner({ const {close} = React.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" @@ -191,7 +189,7 @@ export function Inner({ !reduceMotionEnabled && a.zoom_fade_in, style, ])}> - <DismissableLayer + <DismissableLayer.DismissableLayer onInteractOutside={preventDefault} onFocusOutside={preventDefault} onDismiss={close} @@ -200,9 +198,9 @@ export function Inner({ <View style={[gtMobile ? a.p_2xl : a.p_xl, contentContainerStyle]}> {children} </View> - </DismissableLayer> + </DismissableLayer.DismissableLayer> </View> - </FocusScope> + </FocusScope.FocusScope> ) } diff --git a/src/components/Menu/index.web.tsx b/src/components/Menu/index.web.tsx index ae021dcf1..27678bf2f 100644 --- a/src/components/Menu/index.web.tsx +++ b/src/components/Menu/index.web.tsx @@ -1,12 +1,12 @@ import React from 'react' -import {Pressable, StyleProp, View, ViewStyle} from 'react-native' +import {Pressable, type StyleProp, View, type ViewStyle} from 'react-native' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import * as DropdownMenu from '@radix-ui/react-dropdown-menu' +import {DropdownMenu} from 'radix-ui' import {useA11y} from '#/state/a11y' import {atoms as a, flatten, useTheme, web} from '#/alf' -import * as Dialog from '#/components/Dialog' +import type * as Dialog from '#/components/Dialog' import {useInteractionState} from '#/components/hooks/useInteractionState' import { Context, @@ -15,13 +15,13 @@ import { useMenuItemContext, } from '#/components/Menu/context' import { - ContextType, - GroupProps, - ItemIconProps, - ItemProps, - ItemTextProps, - RadixPassThroughTriggerProps, - TriggerProps, + type ContextType, + type GroupProps, + type ItemIconProps, + type ItemProps, + type ItemTextProps, + type RadixPassThroughTriggerProps, + type TriggerProps, } from '#/components/Menu/types' import {Portal} from '#/components/Portal' import {Text} from '#/components/Typography' diff --git a/src/components/dms/EmojiReactionPicker.web.tsx b/src/components/dms/EmojiReactionPicker.web.tsx index d9e1c87f7..cdd3ce414 100644 --- a/src/components/dms/EmojiReactionPicker.web.tsx +++ b/src/components/dms/EmojiReactionPicker.web.tsx @@ -4,10 +4,10 @@ import {type ChatBskyConvoDefs} from '@atproto/api' import EmojiPicker from '@emoji-mart/react' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import * as DropdownMenu from '@radix-ui/react-dropdown-menu' +import {DropdownMenu} from 'radix-ui' import {useSession} from '#/state/session' -import {type Emoji} from '#/view/com/composer/text-input/web/EmojiPicker.web' +import {type Emoji} from '#/view/com/composer/text-input/web/EmojiPicker' import {useWebPreloadEmoji} from '#/view/com/composer/text-input/web/useWebPreloadEmoji' import {atoms as a, flatten, useTheme} from '#/alf' import {DotGrid_Stroke2_Corner0_Rounded as DotGridIcon} from '#/components/icons/DotGrid' |