@sendbird/uikit-react-native-foundation 3.7.6 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/assets/bundle-icons.js.map +1 -1
- package/lib/commonjs/assets/icon/icon-thread.png +0 -0
- package/lib/commonjs/assets/icon/icon-thread@2x.png +0 -0
- package/lib/commonjs/assets/icon/icon-thread@3x.png +0 -0
- package/lib/commonjs/assets/icon/index.js +1 -2
- package/lib/commonjs/assets/icon/index.js.map +1 -1
- package/lib/commonjs/components/Box/index.js +8 -10
- package/lib/commonjs/components/Box/index.js.map +1 -1
- package/lib/commonjs/components/Divider/index.js +6 -8
- package/lib/commonjs/components/Divider/index.js.map +1 -1
- package/lib/commonjs/components/Icon/index.js +36 -18
- package/lib/commonjs/components/Icon/index.js.map +1 -1
- package/lib/commonjs/components/Image/FastImageInternal.js +1 -2
- package/lib/commonjs/components/Image/FastImageInternal.js.map +1 -1
- package/lib/commonjs/components/Image/Image.fastimage.js +14 -17
- package/lib/commonjs/components/Image/Image.fastimage.js.map +1 -1
- package/lib/commonjs/components/Image/Image.reactnative.js +10 -12
- package/lib/commonjs/components/Image/Image.reactnative.js.map +1 -1
- package/lib/commonjs/components/Image/index.js +1 -2
- package/lib/commonjs/components/Image/index.js.map +1 -1
- package/lib/commonjs/components/ImageWithPlaceholder/index.js +5 -7
- package/lib/commonjs/components/ImageWithPlaceholder/index.js.map +1 -1
- package/lib/commonjs/components/Modal/index.js +28 -37
- package/lib/commonjs/components/Modal/index.js.map +1 -1
- package/lib/commonjs/components/PressBox/index.js +17 -20
- package/lib/commonjs/components/PressBox/index.js.map +1 -1
- package/lib/commonjs/components/ProgressBar/index.js +24 -16
- package/lib/commonjs/components/ProgressBar/index.js.map +1 -1
- package/lib/commonjs/components/RegexText/index.js +11 -14
- package/lib/commonjs/components/RegexText/index.js.map +1 -1
- package/lib/commonjs/components/Switch/index.js +19 -19
- package/lib/commonjs/components/Switch/index.js.map +1 -1
- package/lib/commonjs/components/Text/index.js +46 -29
- package/lib/commonjs/components/Text/index.js.map +1 -1
- package/lib/commonjs/components/TextInput/index.js +38 -18
- package/lib/commonjs/components/TextInput/index.js.map +1 -1
- package/lib/commonjs/components/VideoThumbnail/index.js +11 -13
- package/lib/commonjs/components/VideoThumbnail/index.js.map +1 -1
- package/lib/commonjs/index.js +3 -3
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/styles/HeaderStyleContext.js +8 -10
- package/lib/commonjs/styles/HeaderStyleContext.js.map +1 -1
- package/lib/commonjs/styles/createScaleFactor.js +3 -6
- package/lib/commonjs/styles/createScaleFactor.js.map +1 -1
- package/lib/commonjs/styles/createSelectByColorScheme.js +1 -2
- package/lib/commonjs/styles/createSelectByColorScheme.js.map +1 -1
- package/lib/commonjs/styles/createStyleSheet.js +9 -4
- package/lib/commonjs/styles/createStyleSheet.js.map +1 -1
- package/lib/commonjs/styles/createTypography.js +2 -5
- package/lib/commonjs/styles/createTypography.js.map +1 -1
- package/lib/commonjs/styles/getDefaultHeaderHeight.js +1 -2
- package/lib/commonjs/styles/getDefaultHeaderHeight.js.map +1 -1
- package/lib/commonjs/styles/useHeaderStyle.js +1 -2
- package/lib/commonjs/styles/useHeaderStyle.js.map +1 -1
- package/lib/commonjs/theme/DarkUIKitTheme.js +2 -3
- package/lib/commonjs/theme/DarkUIKitTheme.js.map +1 -1
- package/lib/commonjs/theme/LightUIKitTheme.js +2 -3
- package/lib/commonjs/theme/LightUIKitTheme.js.map +1 -1
- package/lib/commonjs/theme/Palette.js +1 -2
- package/lib/commonjs/theme/Palette.js.map +1 -1
- package/lib/commonjs/theme/UIKitThemeContext.js +2 -3
- package/lib/commonjs/theme/UIKitThemeContext.js.map +1 -1
- package/lib/commonjs/theme/UIKitThemeProvider.js +6 -8
- package/lib/commonjs/theme/UIKitThemeProvider.js.map +1 -1
- package/lib/commonjs/theme/createTheme.js +11 -13
- package/lib/commonjs/theme/createTheme.js.map +1 -1
- package/lib/commonjs/theme/useUIKitTheme.js +2 -3
- package/lib/commonjs/theme/useUIKitTheme.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/ui/ActionMenu/index.js +17 -17
- package/lib/commonjs/ui/ActionMenu/index.js.map +1 -1
- package/lib/commonjs/ui/Alert/index.js +23 -29
- package/lib/commonjs/ui/Alert/index.js.map +1 -1
- package/lib/commonjs/ui/Avatar/AvatarGroup.js +13 -15
- package/lib/commonjs/ui/Avatar/AvatarGroup.js.map +1 -1
- package/lib/commonjs/ui/Avatar/AvatarIcon.js +8 -10
- package/lib/commonjs/ui/Avatar/AvatarIcon.js.map +1 -1
- package/lib/commonjs/ui/Avatar/AvatarStack.js +13 -15
- package/lib/commonjs/ui/Avatar/AvatarStack.js.map +1 -1
- package/lib/commonjs/ui/Avatar/index.js +14 -17
- package/lib/commonjs/ui/Avatar/index.js.map +1 -1
- package/lib/commonjs/ui/Badge/index.js +10 -12
- package/lib/commonjs/ui/Badge/index.js.map +1 -1
- package/lib/commonjs/ui/BottomSheet/index.js +30 -39
- package/lib/commonjs/ui/BottomSheet/index.js.map +1 -1
- package/lib/commonjs/ui/Button/index.js +19 -23
- package/lib/commonjs/ui/Button/index.js.map +1 -1
- package/lib/commonjs/ui/ChannelFrozenBanner/index.js +8 -10
- package/lib/commonjs/ui/ChannelFrozenBanner/index.js.map +1 -1
- package/lib/commonjs/ui/Dialog/DialogBox.js +6 -8
- package/lib/commonjs/ui/Dialog/DialogBox.js.map +1 -1
- package/lib/commonjs/ui/Dialog/DialogSheet.js +23 -22
- package/lib/commonjs/ui/Dialog/DialogSheet.js.map +1 -1
- package/lib/commonjs/ui/Dialog/index.js +11 -12
- package/lib/commonjs/ui/Dialog/index.js.map +1 -1
- package/lib/commonjs/ui/GroupChannelMessage/Message.admin.js +2 -3
- package/lib/commonjs/ui/GroupChannelMessage/Message.admin.js.map +1 -1
- package/lib/commonjs/ui/GroupChannelMessage/Message.file.image.js +2 -3
- package/lib/commonjs/ui/GroupChannelMessage/Message.file.image.js.map +1 -1
- package/lib/commonjs/ui/GroupChannelMessage/Message.file.js +6 -8
- package/lib/commonjs/ui/GroupChannelMessage/Message.file.js.map +1 -1
- package/lib/commonjs/ui/GroupChannelMessage/Message.file.video.js +2 -3
- package/lib/commonjs/ui/GroupChannelMessage/Message.file.video.js.map +1 -1
- package/lib/commonjs/ui/GroupChannelMessage/Message.file.voice.js +8 -9
- package/lib/commonjs/ui/GroupChannelMessage/Message.file.voice.js.map +1 -1
- package/lib/commonjs/ui/GroupChannelMessage/Message.unknown.js +5 -7
- package/lib/commonjs/ui/GroupChannelMessage/Message.unknown.js.map +1 -1
- package/lib/commonjs/ui/GroupChannelMessage/Message.user.js +8 -12
- package/lib/commonjs/ui/GroupChannelMessage/Message.user.js.map +1 -1
- package/lib/commonjs/ui/GroupChannelMessage/Message.user.og.js +16 -20
- package/lib/commonjs/ui/GroupChannelMessage/Message.user.og.js.map +1 -1
- package/lib/commonjs/ui/GroupChannelMessage/MessageBubbleWithText.js +28 -24
- package/lib/commonjs/ui/GroupChannelMessage/MessageBubbleWithText.js.map +1 -1
- package/lib/commonjs/ui/GroupChannelMessage/MessageContainer.js +29 -31
- package/lib/commonjs/ui/GroupChannelMessage/MessageContainer.js.map +1 -1
- package/lib/commonjs/ui/GroupChannelMessage/MessageOpenGraph.js +38 -43
- package/lib/commonjs/ui/GroupChannelMessage/MessageOpenGraph.js.map +1 -1
- package/lib/commonjs/ui/GroupChannelMessage/index.js +2 -3
- package/lib/commonjs/ui/GroupChannelMessage/index.js.map +1 -1
- package/lib/commonjs/ui/GroupChannelPreview/index.js +55 -61
- package/lib/commonjs/ui/GroupChannelPreview/index.js.map +1 -1
- package/lib/commonjs/ui/Header/index.js +45 -56
- package/lib/commonjs/ui/Header/index.js.map +1 -1
- package/lib/commonjs/ui/LoadingSpinner/index.js +14 -18
- package/lib/commonjs/ui/LoadingSpinner/index.js.map +1 -1
- package/lib/commonjs/ui/MenuBar/index.js +23 -21
- package/lib/commonjs/ui/MenuBar/index.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelMessage/Message.admin.js +2 -3
- package/lib/commonjs/ui/OpenChannelMessage/Message.admin.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelMessage/Message.file.image.js +2 -3
- package/lib/commonjs/ui/OpenChannelMessage/Message.file.image.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelMessage/Message.file.js +6 -8
- package/lib/commonjs/ui/OpenChannelMessage/Message.file.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelMessage/Message.file.video.js +2 -3
- package/lib/commonjs/ui/OpenChannelMessage/Message.file.video.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelMessage/Message.unknown.js +6 -8
- package/lib/commonjs/ui/OpenChannelMessage/Message.unknown.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelMessage/Message.user.js +28 -20
- package/lib/commonjs/ui/OpenChannelMessage/Message.user.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelMessage/Message.user.og.js +54 -49
- package/lib/commonjs/ui/OpenChannelMessage/Message.user.og.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelMessage/MessageContainer.js +16 -19
- package/lib/commonjs/ui/OpenChannelMessage/MessageContainer.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelMessage/index.js +2 -3
- package/lib/commonjs/ui/OpenChannelMessage/index.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelPreview/index.js +25 -30
- package/lib/commonjs/ui/OpenChannelPreview/index.js.map +1 -1
- package/lib/commonjs/ui/OutlinedButton/index.js +7 -9
- package/lib/commonjs/ui/OutlinedButton/index.js.map +1 -1
- package/lib/commonjs/ui/Placeholder/index.js +9 -11
- package/lib/commonjs/ui/Placeholder/index.js.map +1 -1
- package/lib/commonjs/ui/ProfileCard/index.js +11 -12
- package/lib/commonjs/ui/ProfileCard/index.js.map +1 -1
- package/lib/commonjs/ui/Prompt/index.js +30 -37
- package/lib/commonjs/ui/Prompt/index.js.map +1 -1
- package/lib/commonjs/ui/Toast/index.js +21 -27
- package/lib/commonjs/ui/Toast/index.js.map +1 -1
- package/lib/commonjs/ui/TypingIndicatorBubble/index.js +25 -32
- package/lib/commonjs/ui/TypingIndicatorBubble/index.js.map +1 -1
- package/lib/module/assets/bundle-icons.js.map +1 -1
- package/lib/module/assets/icon/icon-thread.png +0 -0
- package/lib/module/assets/icon/icon-thread@2x.png +0 -0
- package/lib/module/assets/icon/icon-thread@3x.png +0 -0
- package/lib/module/assets/icon/index.js.map +1 -1
- package/lib/module/components/Box/index.js +6 -7
- package/lib/module/components/Box/index.js.map +1 -1
- package/lib/module/components/Divider/index.js +4 -5
- package/lib/module/components/Divider/index.js.map +1 -1
- package/lib/module/components/Icon/index.js +35 -16
- package/lib/module/components/Icon/index.js.map +1 -1
- package/lib/module/components/Image/FastImageInternal.js.map +1 -1
- package/lib/module/components/Image/Image.fastimage.js +12 -14
- package/lib/module/components/Image/Image.fastimage.js.map +1 -1
- package/lib/module/components/Image/Image.reactnative.js +8 -9
- package/lib/module/components/Image/Image.reactnative.js.map +1 -1
- package/lib/module/components/Image/index.js.map +1 -1
- package/lib/module/components/ImageWithPlaceholder/index.js +1 -2
- package/lib/module/components/ImageWithPlaceholder/index.js.map +1 -1
- package/lib/module/components/Modal/index.js +24 -32
- package/lib/module/components/Modal/index.js.map +1 -1
- package/lib/module/components/PressBox/index.js +10 -12
- package/lib/module/components/PressBox/index.js.map +1 -1
- package/lib/module/components/ProgressBar/index.js +21 -12
- package/lib/module/components/ProgressBar/index.js.map +1 -1
- package/lib/module/components/RegexText/index.js +9 -11
- package/lib/module/components/RegexText/index.js.map +1 -1
- package/lib/module/components/Switch/index.js +16 -15
- package/lib/module/components/Switch/index.js.map +1 -1
- package/lib/module/components/Text/index.js +45 -27
- package/lib/module/components/Text/index.js.map +1 -1
- package/lib/module/components/TextInput/index.js +37 -16
- package/lib/module/components/TextInput/index.js.map +1 -1
- package/lib/module/components/VideoThumbnail/index.js +8 -10
- package/lib/module/components/VideoThumbnail/index.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/styles/HeaderStyleContext.js +6 -7
- package/lib/module/styles/HeaderStyleContext.js.map +1 -1
- package/lib/module/styles/createScaleFactor.js +1 -2
- package/lib/module/styles/createScaleFactor.js.map +1 -1
- package/lib/module/styles/createSelectByColorScheme.js.map +1 -1
- package/lib/module/styles/createStyleSheet.js +8 -2
- package/lib/module/styles/createStyleSheet.js.map +1 -1
- package/lib/module/styles/createTypography.js +1 -3
- package/lib/module/styles/createTypography.js.map +1 -1
- package/lib/module/styles/getDefaultHeaderHeight.js.map +1 -1
- package/lib/module/styles/useHeaderStyle.js.map +1 -1
- package/lib/module/theme/DarkUIKitTheme.js.map +1 -1
- package/lib/module/theme/LightUIKitTheme.js.map +1 -1
- package/lib/module/theme/Palette.js.map +1 -1
- package/lib/module/theme/UIKitThemeContext.js.map +1 -1
- package/lib/module/theme/UIKitThemeProvider.js +4 -5
- package/lib/module/theme/UIKitThemeProvider.js.map +1 -1
- package/lib/module/theme/createTheme.js +9 -10
- package/lib/module/theme/createTheme.js.map +1 -1
- package/lib/module/theme/useUIKitTheme.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/ui/ActionMenu/index.js +13 -12
- package/lib/module/ui/ActionMenu/index.js.map +1 -1
- package/lib/module/ui/Alert/index.js +21 -26
- package/lib/module/ui/Alert/index.js.map +1 -1
- package/lib/module/ui/Avatar/AvatarGroup.js +11 -12
- package/lib/module/ui/Avatar/AvatarGroup.js.map +1 -1
- package/lib/module/ui/Avatar/AvatarIcon.js +6 -7
- package/lib/module/ui/Avatar/AvatarIcon.js.map +1 -1
- package/lib/module/ui/Avatar/AvatarStack.js +11 -12
- package/lib/module/ui/Avatar/AvatarStack.js.map +1 -1
- package/lib/module/ui/Avatar/index.js +10 -12
- package/lib/module/ui/Avatar/index.js.map +1 -1
- package/lib/module/ui/Badge/index.js +8 -9
- package/lib/module/ui/Badge/index.js.map +1 -1
- package/lib/module/ui/BottomSheet/index.js +28 -36
- package/lib/module/ui/BottomSheet/index.js.map +1 -1
- package/lib/module/ui/Button/index.js +17 -20
- package/lib/module/ui/Button/index.js.map +1 -1
- package/lib/module/ui/ChannelFrozenBanner/index.js +6 -7
- package/lib/module/ui/ChannelFrozenBanner/index.js.map +1 -1
- package/lib/module/ui/Dialog/DialogBox.js +4 -5
- package/lib/module/ui/Dialog/DialogBox.js.map +1 -1
- package/lib/module/ui/Dialog/DialogSheet.js +21 -19
- package/lib/module/ui/Dialog/DialogSheet.js.map +1 -1
- package/lib/module/ui/Dialog/index.js +8 -9
- package/lib/module/ui/Dialog/index.js.map +1 -1
- package/lib/module/ui/GroupChannelMessage/Message.admin.js.map +1 -1
- package/lib/module/ui/GroupChannelMessage/Message.file.image.js.map +1 -1
- package/lib/module/ui/GroupChannelMessage/Message.file.js +4 -5
- package/lib/module/ui/GroupChannelMessage/Message.file.js.map +1 -1
- package/lib/module/ui/GroupChannelMessage/Message.file.video.js.map +1 -1
- package/lib/module/ui/GroupChannelMessage/Message.file.voice.js +4 -4
- package/lib/module/ui/GroupChannelMessage/Message.file.voice.js.map +1 -1
- package/lib/module/ui/GroupChannelMessage/Message.unknown.js +3 -4
- package/lib/module/ui/GroupChannelMessage/Message.unknown.js.map +1 -1
- package/lib/module/ui/GroupChannelMessage/Message.user.js +6 -9
- package/lib/module/ui/GroupChannelMessage/Message.user.js.map +1 -1
- package/lib/module/ui/GroupChannelMessage/Message.user.og.js +14 -17
- package/lib/module/ui/GroupChannelMessage/Message.user.og.js.map +1 -1
- package/lib/module/ui/GroupChannelMessage/MessageBubbleWithText.js +26 -21
- package/lib/module/ui/GroupChannelMessage/MessageBubbleWithText.js.map +1 -1
- package/lib/module/ui/GroupChannelMessage/MessageContainer.js +27 -28
- package/lib/module/ui/GroupChannelMessage/MessageContainer.js.map +1 -1
- package/lib/module/ui/GroupChannelMessage/MessageOpenGraph.js +36 -40
- package/lib/module/ui/GroupChannelMessage/MessageOpenGraph.js.map +1 -1
- package/lib/module/ui/GroupChannelMessage/index.js.map +1 -1
- package/lib/module/ui/GroupChannelPreview/index.js +53 -58
- package/lib/module/ui/GroupChannelPreview/index.js.map +1 -1
- package/lib/module/ui/Header/index.js +44 -54
- package/lib/module/ui/Header/index.js.map +1 -1
- package/lib/module/ui/LoadingSpinner/index.js +10 -13
- package/lib/module/ui/LoadingSpinner/index.js.map +1 -1
- package/lib/module/ui/MenuBar/index.js +21 -18
- package/lib/module/ui/MenuBar/index.js.map +1 -1
- package/lib/module/ui/OpenChannelMessage/Message.admin.js.map +1 -1
- package/lib/module/ui/OpenChannelMessage/Message.file.image.js.map +1 -1
- package/lib/module/ui/OpenChannelMessage/Message.file.js +4 -5
- package/lib/module/ui/OpenChannelMessage/Message.file.js.map +1 -1
- package/lib/module/ui/OpenChannelMessage/Message.file.video.js.map +1 -1
- package/lib/module/ui/OpenChannelMessage/Message.unknown.js +4 -5
- package/lib/module/ui/OpenChannelMessage/Message.unknown.js.map +1 -1
- package/lib/module/ui/OpenChannelMessage/Message.user.js +26 -17
- package/lib/module/ui/OpenChannelMessage/Message.user.js.map +1 -1
- package/lib/module/ui/OpenChannelMessage/Message.user.og.js +52 -46
- package/lib/module/ui/OpenChannelMessage/Message.user.og.js.map +1 -1
- package/lib/module/ui/OpenChannelMessage/MessageContainer.js +14 -16
- package/lib/module/ui/OpenChannelMessage/MessageContainer.js.map +1 -1
- package/lib/module/ui/OpenChannelMessage/index.js.map +1 -1
- package/lib/module/ui/OpenChannelPreview/index.js +23 -27
- package/lib/module/ui/OpenChannelPreview/index.js.map +1 -1
- package/lib/module/ui/OutlinedButton/index.js +5 -6
- package/lib/module/ui/OutlinedButton/index.js.map +1 -1
- package/lib/module/ui/Placeholder/index.js +7 -8
- package/lib/module/ui/Placeholder/index.js.map +1 -1
- package/lib/module/ui/ProfileCard/index.js +9 -9
- package/lib/module/ui/ProfileCard/index.js.map +1 -1
- package/lib/module/ui/Prompt/index.js +26 -32
- package/lib/module/ui/Prompt/index.js.map +1 -1
- package/lib/module/ui/Toast/index.js +17 -22
- package/lib/module/ui/Toast/index.js.map +1 -1
- package/lib/module/ui/TypingIndicatorBubble/index.js +21 -27
- package/lib/module/ui/TypingIndicatorBubble/index.js.map +1 -1
- package/lib/typescript/src/components/Box/index.d.ts +12 -2
- package/lib/typescript/src/components/Icon/index.d.ts +2 -1
- package/lib/typescript/src/components/Text/index.d.ts +14 -2
- package/lib/typescript/src/components/TextInput/index.d.ts +2 -1
- package/package.json +3 -3
- package/src/assets/icon/icon-thread.png +0 -0
- package/src/assets/icon/icon-thread@2x.png +0 -0
- package/src/assets/icon/icon-thread@3x.png +0 -0
- package/src/components/Box/index.tsx +16 -5
- package/src/components/Icon/index.tsx +35 -3
- package/src/components/ProgressBar/index.tsx +23 -12
- package/src/components/Switch/index.tsx +10 -6
- package/src/components/Text/index.tsx +48 -7
- package/src/components/TextInput/index.tsx +39 -12
- package/src/styles/createStyleSheet.ts +8 -2
- package/src/ui/ActionMenu/index.tsx +3 -1
- package/src/ui/Alert/index.tsx +4 -4
- package/src/ui/Avatar/AvatarGroup.tsx +6 -6
- package/src/ui/Avatar/AvatarStack.tsx +3 -3
- package/src/ui/BottomSheet/index.tsx +5 -4
- package/src/ui/Button/index.tsx +1 -1
- package/src/ui/Dialog/DialogSheet.tsx +15 -12
- package/src/ui/GroupChannelMessage/Message.file.tsx +1 -1
- package/src/ui/GroupChannelMessage/Message.file.voice.tsx +1 -1
- package/src/ui/GroupChannelMessage/MessageBubbleWithText.tsx +5 -2
- package/src/ui/GroupChannelMessage/MessageContainer.tsx +7 -7
- package/src/ui/GroupChannelPreview/index.tsx +46 -48
- package/src/ui/Header/index.tsx +4 -5
- package/src/ui/MenuBar/index.tsx +9 -6
- package/src/ui/OpenChannelMessage/Message.file.tsx +1 -1
- package/src/ui/OpenChannelMessage/Message.user.og.tsx +43 -29
- package/src/ui/OpenChannelMessage/Message.user.tsx +46 -29
- package/src/ui/OpenChannelMessage/MessageContainer.tsx +4 -4
- package/src/ui/OpenChannelPreview/index.tsx +9 -9
- package/src/ui/ProfileCard/index.tsx +1 -0
- package/src/ui/Prompt/index.tsx +4 -5
- package/src/ui/Toast/index.tsx +1 -1
- package/src/ui/TypingIndicatorBubble/index.tsx +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { ReactNode, useEffect, useRef } from 'react';
|
|
2
|
-
import { Animated, Easing, StyleSheet, ViewStyle } from 'react-native';
|
|
2
|
+
import { Animated, Easing, I18nManager, StyleSheet, ViewStyle } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { NOOP } from '@sendbird/uikit-utils';
|
|
5
5
|
|
|
@@ -42,6 +42,14 @@ const ProgressBar = ({ current = 100, total = 100, trackColor, barColor, overlay
|
|
|
42
42
|
return NOOP;
|
|
43
43
|
}, [percent]);
|
|
44
44
|
|
|
45
|
+
const progressBarPosition = (() => {
|
|
46
|
+
if (I18nManager.isRTL && I18nManager.doLeftAndRightSwapInRTL) {
|
|
47
|
+
return { right: 0 };
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return { left: 0 };
|
|
51
|
+
})();
|
|
52
|
+
|
|
45
53
|
return (
|
|
46
54
|
<Box
|
|
47
55
|
height={36}
|
|
@@ -52,17 +60,20 @@ const ProgressBar = ({ current = 100, total = 100, trackColor, barColor, overlay
|
|
|
52
60
|
style={style}
|
|
53
61
|
>
|
|
54
62
|
<Animated.View
|
|
55
|
-
style={
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
style={[
|
|
64
|
+
progressBarPosition,
|
|
65
|
+
{
|
|
66
|
+
position: 'absolute',
|
|
67
|
+
width: progress.interpolate({
|
|
68
|
+
inputRange: [0, 1],
|
|
69
|
+
outputRange: ['0%', '100%'],
|
|
70
|
+
extrapolate: 'clamp',
|
|
71
|
+
}),
|
|
72
|
+
height: '100%',
|
|
73
|
+
opacity: 0.38,
|
|
74
|
+
backgroundColor: uiColors.bar,
|
|
75
|
+
},
|
|
76
|
+
]}
|
|
66
77
|
/>
|
|
67
78
|
<Box style={StyleSheet.absoluteFill}>{overlay}</Box>
|
|
68
79
|
</Box>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
|
-
import { Animated, Platform, Pressable } from 'react-native';
|
|
2
|
+
import { Animated, I18nManager, Platform, Pressable } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import createStyleSheet from '../../styles/createStyleSheet';
|
|
5
5
|
import useUIKitTheme from '../../theme/useUIKitTheme';
|
|
@@ -24,9 +24,12 @@ const Switch = ({
|
|
|
24
24
|
const { select, palette, colors } = useUIKitTheme();
|
|
25
25
|
const position = useRef(new Animated.Value(0)).current;
|
|
26
26
|
|
|
27
|
+
const start = I18nManager.isRTL ? styles.thumbOn.start : styles.thumbOff.start;
|
|
28
|
+
const end = I18nManager.isRTL ? styles.thumbOff.start : styles.thumbOn.start;
|
|
29
|
+
|
|
27
30
|
useEffect(() => {
|
|
28
31
|
const animation = Animated.timing(position, {
|
|
29
|
-
toValue: value ?
|
|
32
|
+
toValue: value ? end : start,
|
|
30
33
|
duration: 150,
|
|
31
34
|
useNativeDriver: false,
|
|
32
35
|
});
|
|
@@ -36,11 +39,12 @@ const Switch = ({
|
|
|
36
39
|
|
|
37
40
|
const createInterpolate = <T extends string>(offValue: T, onValue: T) => {
|
|
38
41
|
return position.interpolate({
|
|
39
|
-
inputRange: [styles.thumbOff.
|
|
40
|
-
outputRange: [offValue, onValue],
|
|
42
|
+
inputRange: [styles.thumbOff.start, styles.thumbOn.start],
|
|
43
|
+
outputRange: I18nManager.isRTL ? [onValue, offValue] : [offValue, onValue],
|
|
41
44
|
extrapolate: 'clamp',
|
|
42
45
|
});
|
|
43
46
|
};
|
|
47
|
+
|
|
44
48
|
const _trackColor = createInterpolate(inactiveTrackColor ?? colors.onBackground04, trackColor ?? palette.primary200);
|
|
45
49
|
const _thumbColor = createInterpolate(
|
|
46
50
|
inactiveThumbColor ?? palette.background300,
|
|
@@ -86,10 +90,10 @@ const styles = createStyleSheet({
|
|
|
86
90
|
}),
|
|
87
91
|
},
|
|
88
92
|
thumbOn: {
|
|
89
|
-
|
|
93
|
+
start: OFFSET.H / 2,
|
|
90
94
|
},
|
|
91
95
|
thumbOff: {
|
|
92
|
-
|
|
96
|
+
start: -OFFSET.H / 2,
|
|
93
97
|
},
|
|
94
98
|
});
|
|
95
99
|
|
|
@@ -1,19 +1,60 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Text as RNText, TextProps as RNTextProps } from 'react-native';
|
|
2
|
+
import { I18nManager, Text as RNText, TextProps as RNTextProps, StyleSheet, TextStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { isStartsWithRTL } from '@sendbird/uikit-utils';
|
|
3
5
|
|
|
4
6
|
import useUIKitTheme from '../../theme/useUIKitTheme';
|
|
5
7
|
import type { TypoName, UIKitTheme } from '../../types';
|
|
6
8
|
|
|
9
|
+
export interface RTLTextAlignSupportProps {
|
|
10
|
+
/**
|
|
11
|
+
* If `I18nManager.isRTL` is `true` and this value is enabled, the text will be aligned according to RTL if it starts in an RTL language.
|
|
12
|
+
* In the case of the `Text` component, the alignment value is calculated based on `I18nManager.doLeftAndRightSwapInRTL`.
|
|
13
|
+
* For the `TextInput` component, the alignment value is calculated as a physical alignment, unaffected by `I18nManager.doLeftAndRightSwapInRTL`.
|
|
14
|
+
*/
|
|
15
|
+
supportRTLAlign?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* If you want to enable `supportRTLAlign` but are using nested `Text` components that are not simple text under the `Text` component, pass the original text here.
|
|
18
|
+
*/
|
|
19
|
+
originalText?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
7
22
|
type TypographyProps = Partial<Record<TypoName, boolean>>;
|
|
8
|
-
export type TextProps = RNTextProps &
|
|
9
|
-
|
|
23
|
+
export type TextProps = RNTextProps &
|
|
24
|
+
TypographyProps & { color?: ((colors: UIKitTheme['colors']) => string) | string } & RTLTextAlignSupportProps;
|
|
25
|
+
|
|
26
|
+
const Text = ({ children, color, style, supportRTLAlign = true, originalText, ...props }: TextProps) => {
|
|
10
27
|
const { colors } = useUIKitTheme();
|
|
11
28
|
const typoStyle = useTypographyFilter(props);
|
|
29
|
+
|
|
30
|
+
const textStyle = StyleSheet.flatten([
|
|
31
|
+
{ color: typeof color === 'string' ? color : color?.(colors) ?? colors.text },
|
|
32
|
+
typoStyle,
|
|
33
|
+
style,
|
|
34
|
+
]) as TextStyle;
|
|
35
|
+
|
|
36
|
+
const textAlign = (() => {
|
|
37
|
+
if (textStyle.textAlign && textStyle.textAlign !== 'left' && textStyle.textAlign !== 'right') {
|
|
38
|
+
return textStyle.textAlign;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (I18nManager.isRTL && supportRTLAlign) {
|
|
42
|
+
if (
|
|
43
|
+
(originalText && isStartsWithRTL(originalText)) ||
|
|
44
|
+
(typeof children === 'string' && isStartsWithRTL(children))
|
|
45
|
+
) {
|
|
46
|
+
return I18nManager.doLeftAndRightSwapInRTL ? 'left' : 'right';
|
|
47
|
+
} else {
|
|
48
|
+
return I18nManager.doLeftAndRightSwapInRTL ? 'right' : 'left';
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (textStyle.textAlign) return textStyle.textAlign;
|
|
53
|
+
return undefined;
|
|
54
|
+
})();
|
|
55
|
+
|
|
12
56
|
return (
|
|
13
|
-
<RNText
|
|
14
|
-
style={[{ color: typeof color === 'string' ? color : color?.(colors) ?? colors.text }, typoStyle, style]}
|
|
15
|
-
{...props}
|
|
16
|
-
>
|
|
57
|
+
<RNText style={[textStyle, { textAlign }]} {...props}>
|
|
17
58
|
{children}
|
|
18
59
|
</RNText>
|
|
19
60
|
);
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TextInput as RNTextInput, TextInputProps } from 'react-native';
|
|
2
|
+
import { I18nManager, TextInput as RNTextInput, StyleSheet, TextInputProps, TextStyle } from 'react-native';
|
|
3
|
+
|
|
4
|
+
import { isStartsWithRTL } from '@sendbird/uikit-utils';
|
|
3
5
|
|
|
4
6
|
import createStyleSheet from '../../styles/createStyleSheet';
|
|
5
7
|
import useUIKitTheme from '../../theme/useUIKitTheme';
|
|
6
8
|
import type { UIKitTheme } from '../../types';
|
|
9
|
+
import { RTLTextAlignSupportProps } from '../Text';
|
|
7
10
|
|
|
8
|
-
type Props = {
|
|
11
|
+
type Props = {
|
|
12
|
+
variant?: keyof UIKitTheme['colors']['ui']['input'];
|
|
13
|
+
} & TextInputProps &
|
|
14
|
+
RTLTextAlignSupportProps;
|
|
9
15
|
const TextInput = React.forwardRef<RNTextInput, Props>(function TextInput(
|
|
10
|
-
{ children, style, variant = 'default', editable = true, ...props },
|
|
16
|
+
{ children, style, variant = 'default', editable = true, originalText, supportRTLAlign = true, ...props },
|
|
11
17
|
ref,
|
|
12
18
|
) {
|
|
13
19
|
const { typography, colors } = useUIKitTheme();
|
|
@@ -20,19 +26,40 @@ const TextInput = React.forwardRef<RNTextInput, Props>(function TextInput(
|
|
|
20
26
|
lineHeight: typography.body3.fontSize ? typography.body3.fontSize * 1.2 : undefined,
|
|
21
27
|
};
|
|
22
28
|
|
|
29
|
+
const textStyle = StyleSheet.flatten([
|
|
30
|
+
fontStyle,
|
|
31
|
+
styles.input,
|
|
32
|
+
{ color: inputStyle.text, backgroundColor: inputStyle.background },
|
|
33
|
+
underlineStyle,
|
|
34
|
+
style,
|
|
35
|
+
]) as TextStyle;
|
|
36
|
+
|
|
37
|
+
const textAlign = (() => {
|
|
38
|
+
if (textStyle.textAlign && textStyle.textAlign !== 'left' && textStyle.textAlign !== 'right') {
|
|
39
|
+
return textStyle.textAlign;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (I18nManager.isRTL && supportRTLAlign) {
|
|
43
|
+
const text = originalText || props.value || props.placeholder;
|
|
44
|
+
// Note: TextInput is not affected by doLeftAndRightSwapInRTL
|
|
45
|
+
if (text && isStartsWithRTL(text)) {
|
|
46
|
+
return 'right';
|
|
47
|
+
} else {
|
|
48
|
+
return 'left';
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (textStyle.textAlign) return textStyle.textAlign;
|
|
53
|
+
return undefined;
|
|
54
|
+
})();
|
|
55
|
+
|
|
23
56
|
return (
|
|
24
57
|
<RNTextInput
|
|
25
58
|
ref={ref}
|
|
26
59
|
editable={editable}
|
|
27
60
|
selectionColor={inputStyle.highlight}
|
|
28
61
|
placeholderTextColor={inputStyle.placeholder}
|
|
29
|
-
style={[
|
|
30
|
-
fontStyle,
|
|
31
|
-
styles.input,
|
|
32
|
-
{ color: inputStyle.text, backgroundColor: inputStyle.background },
|
|
33
|
-
underlineStyle,
|
|
34
|
-
style,
|
|
35
|
-
]}
|
|
62
|
+
style={[textStyle, { textAlign }]}
|
|
36
63
|
{...props}
|
|
37
64
|
>
|
|
38
65
|
{children}
|
|
@@ -45,8 +72,8 @@ const styles = createStyleSheet({
|
|
|
45
72
|
includeFontPadding: false,
|
|
46
73
|
paddingTop: 8,
|
|
47
74
|
paddingBottom: 8,
|
|
48
|
-
|
|
49
|
-
|
|
75
|
+
paddingStart: 16,
|
|
76
|
+
paddingEnd: 16,
|
|
50
77
|
},
|
|
51
78
|
});
|
|
52
79
|
|
|
@@ -35,6 +35,8 @@ const preProcessor: Partial<StylePreprocessor> = {
|
|
|
35
35
|
'paddingBottom': SCALE_FACTOR_WITH_DIMENSION_VALUE,
|
|
36
36
|
'paddingLeft': SCALE_FACTOR_WITH_DIMENSION_VALUE,
|
|
37
37
|
'paddingRight': SCALE_FACTOR_WITH_DIMENSION_VALUE,
|
|
38
|
+
'paddingStart': SCALE_FACTOR_WITH_DIMENSION_VALUE,
|
|
39
|
+
'paddingEnd': SCALE_FACTOR_WITH_DIMENSION_VALUE,
|
|
38
40
|
'margin': SCALE_FACTOR_WITH_DIMENSION_VALUE,
|
|
39
41
|
'marginVertical': SCALE_FACTOR_WITH_DIMENSION_VALUE,
|
|
40
42
|
'marginHorizontal': SCALE_FACTOR_WITH_DIMENSION_VALUE,
|
|
@@ -42,10 +44,14 @@ const preProcessor: Partial<StylePreprocessor> = {
|
|
|
42
44
|
'marginBottom': SCALE_FACTOR_WITH_DIMENSION_VALUE,
|
|
43
45
|
'marginLeft': SCALE_FACTOR_WITH_DIMENSION_VALUE,
|
|
44
46
|
'marginRight': SCALE_FACTOR_WITH_DIMENSION_VALUE,
|
|
45
|
-
'
|
|
46
|
-
'
|
|
47
|
+
'marginStart': SCALE_FACTOR_WITH_DIMENSION_VALUE,
|
|
48
|
+
'marginEnd': SCALE_FACTOR_WITH_DIMENSION_VALUE,
|
|
47
49
|
'top': SCALE_FACTOR_WITH_DIMENSION_VALUE,
|
|
48
50
|
'bottom': SCALE_FACTOR_WITH_DIMENSION_VALUE,
|
|
51
|
+
'left': SCALE_FACTOR_WITH_DIMENSION_VALUE,
|
|
52
|
+
'right': SCALE_FACTOR_WITH_DIMENSION_VALUE,
|
|
53
|
+
'start': SCALE_FACTOR_WITH_DIMENSION_VALUE,
|
|
54
|
+
'end': SCALE_FACTOR_WITH_DIMENSION_VALUE,
|
|
49
55
|
};
|
|
50
56
|
|
|
51
57
|
const preProcessorKeys = Object.keys(preProcessor);
|
|
@@ -58,7 +58,7 @@ const ActionMenu = ({ visible, onHide, onError, onDismiss, title, menuItems }: P
|
|
|
58
58
|
<LoadingSpinner
|
|
59
59
|
size={20}
|
|
60
60
|
color={colors.ui.dialog.default.none.highlight}
|
|
61
|
-
style={{ width: '10%',
|
|
61
|
+
style={{ width: '10%', marginStart: '4%' }}
|
|
62
62
|
/>
|
|
63
63
|
)}
|
|
64
64
|
</View>
|
|
@@ -110,8 +110,10 @@ const styles = createStyleSheet({
|
|
|
110
110
|
paddingHorizontal: 24,
|
|
111
111
|
paddingVertical: 20,
|
|
112
112
|
alignItems: 'center',
|
|
113
|
+
justifyContent: 'flex-start',
|
|
113
114
|
},
|
|
114
115
|
buttonContainer: {
|
|
116
|
+
alignItems: 'flex-start',
|
|
115
117
|
marginTop: 4,
|
|
116
118
|
marginBottom: 8,
|
|
117
119
|
},
|
package/src/ui/Alert/index.tsx
CHANGED
|
@@ -35,7 +35,7 @@ const Alert = ({ onDismiss, visible, onHide, title = '', message = '', buttons =
|
|
|
35
35
|
<DialogBox style={styles.container}>
|
|
36
36
|
{Boolean(title) && (
|
|
37
37
|
<View style={styles.titleContainer}>
|
|
38
|
-
<Text h1 color={colors.ui.dialog.default.none.text} numberOfLines={1}
|
|
38
|
+
<Text h1 color={colors.ui.dialog.default.none.text} numberOfLines={1}>
|
|
39
39
|
{title}
|
|
40
40
|
</Text>
|
|
41
41
|
</View>
|
|
@@ -91,15 +91,15 @@ const styles = createStyleSheet({
|
|
|
91
91
|
titleContainer: {
|
|
92
92
|
paddingBottom: 16,
|
|
93
93
|
paddingHorizontal: 24,
|
|
94
|
-
|
|
95
|
-
alignItems: 'center',
|
|
94
|
+
alignItems: 'flex-start',
|
|
96
95
|
},
|
|
97
96
|
messageContainer: {
|
|
98
97
|
paddingHorizontal: 24,
|
|
99
98
|
marginBottom: 12,
|
|
99
|
+
alignItems: 'flex-start',
|
|
100
100
|
},
|
|
101
101
|
button: {
|
|
102
|
-
|
|
102
|
+
marginStart: 8,
|
|
103
103
|
},
|
|
104
104
|
buttonContainer: {
|
|
105
105
|
flexDirection: 'row',
|
|
@@ -36,18 +36,18 @@ const AvatarGroup = ({ children, containerStyle, size = 56 }: Props) => {
|
|
|
36
36
|
if (childAmount === 1) return React.cloneElement(child as ReactElement, { size, containerStyle });
|
|
37
37
|
|
|
38
38
|
const top = getTopPoint(index, childAmount) * size;
|
|
39
|
-
const
|
|
39
|
+
const start = getStartPoint(index) * size;
|
|
40
40
|
const width = getWidthPoint(index, childAmount) * size;
|
|
41
41
|
const height = getHeightPoint(index, childAmount) * size;
|
|
42
|
-
const
|
|
42
|
+
const innerStart = -getInnerStart(index, childAmount) * size;
|
|
43
43
|
const innerTop = -getInnerTop(childAmount) * size;
|
|
44
44
|
|
|
45
45
|
return (
|
|
46
|
-
<View style={{ overflow: 'hidden', position: 'absolute', top,
|
|
46
|
+
<View style={{ overflow: 'hidden', position: 'absolute', top, start, width, height }}>
|
|
47
47
|
{React.cloneElement(child as ReactElement, {
|
|
48
48
|
size,
|
|
49
49
|
square: true,
|
|
50
|
-
containerStyle: {
|
|
50
|
+
containerStyle: { start: innerStart, top: innerTop },
|
|
51
51
|
})}
|
|
52
52
|
</View>
|
|
53
53
|
);
|
|
@@ -77,11 +77,11 @@ const getTopPoint = (idx: number, total: number) => {
|
|
|
77
77
|
if (idx === 0 || idx === 1) return -0.025;
|
|
78
78
|
return 0.525;
|
|
79
79
|
};
|
|
80
|
-
const
|
|
80
|
+
const getStartPoint = (idx: number) => {
|
|
81
81
|
if (idx === 0 || idx === 2) return -0.025;
|
|
82
82
|
return 0.525;
|
|
83
83
|
};
|
|
84
|
-
const
|
|
84
|
+
const getInnerStart = (idx: number, total: number) => {
|
|
85
85
|
if (total === 3 && idx === 0) return 0;
|
|
86
86
|
return 0.25;
|
|
87
87
|
};
|
|
@@ -52,7 +52,7 @@ const AvatarStack = ({
|
|
|
52
52
|
React.cloneElement(child as ReactElement, {
|
|
53
53
|
size: actualSize,
|
|
54
54
|
containerStyle: {
|
|
55
|
-
|
|
55
|
+
start: actualGap * index,
|
|
56
56
|
borderWidth: avatarStyles.borderWidth,
|
|
57
57
|
borderColor: avatarStyles.borderColor,
|
|
58
58
|
},
|
|
@@ -67,7 +67,7 @@ const AvatarStack = ({
|
|
|
67
67
|
style={[
|
|
68
68
|
avatarStyles,
|
|
69
69
|
{
|
|
70
|
-
|
|
70
|
+
start: actualGap * maxAvatar,
|
|
71
71
|
width: actualSize,
|
|
72
72
|
height: actualSize,
|
|
73
73
|
borderRadius: actualSize / 2,
|
|
@@ -93,7 +93,7 @@ const AvatarStack = ({
|
|
|
93
93
|
};
|
|
94
94
|
|
|
95
95
|
return (
|
|
96
|
-
<View style={[containerStyle, {
|
|
96
|
+
<View style={[containerStyle, { start: -avatarStyles.borderWidth, flexDirection: 'row', width: calculateWidth() }]}>
|
|
97
97
|
{renderAvatars()}
|
|
98
98
|
{renderRemainsCount()}
|
|
99
99
|
</View>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { TouchableOpacity, useWindowDimensions } from 'react-native';
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
import { useSafeAreaPadding } from '@sendbird/uikit-utils';
|
|
4
5
|
|
|
5
6
|
import type Icon from '../../components/Icon';
|
|
6
7
|
import Modal from '../../components/Modal';
|
|
@@ -28,7 +29,7 @@ type Props = {
|
|
|
28
29
|
const BottomSheet = ({ onDismiss, onHide, visible, sheetItems, HeaderComponent }: Props) => {
|
|
29
30
|
const { statusBarTranslucent } = useHeaderStyle();
|
|
30
31
|
const { width } = useWindowDimensions();
|
|
31
|
-
const
|
|
32
|
+
const safeArea = useSafeAreaPadding(['bottom', 'left', 'right']);
|
|
32
33
|
return (
|
|
33
34
|
<Modal
|
|
34
35
|
type={'slide'}
|
|
@@ -38,13 +39,13 @@ const BottomSheet = ({ onDismiss, onHide, visible, sheetItems, HeaderComponent }
|
|
|
38
39
|
visible={visible}
|
|
39
40
|
backgroundStyle={{ alignItems: 'center', justifyContent: 'flex-end' }}
|
|
40
41
|
>
|
|
41
|
-
<DialogSheet style={{ width, paddingBottom:
|
|
42
|
+
<DialogSheet style={{ width, paddingBottom: safeArea.paddingBottom }}>
|
|
42
43
|
{HeaderComponent && <HeaderComponent onClose={onHide} />}
|
|
43
44
|
{sheetItems.map(({ onPress, ...props }, idx) => (
|
|
44
45
|
<TouchableOpacity
|
|
45
46
|
activeOpacity={0.75}
|
|
46
47
|
key={props.title + idx}
|
|
47
|
-
style={{
|
|
48
|
+
style={{ paddingStart: safeArea.paddingStart, paddingEnd: safeArea.paddingEnd }}
|
|
48
49
|
disabled={props.disabled}
|
|
49
50
|
onPress={async () => {
|
|
50
51
|
await onHide();
|
package/src/ui/Button/index.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { StyleProp, View, ViewStyle } from 'react-native';
|
|
3
3
|
|
|
4
|
+
import Box from '../../components/Box';
|
|
4
5
|
import Icon from '../../components/Icon';
|
|
5
6
|
import Text from '../../components/Text';
|
|
6
7
|
import createStyleSheet from '../../styles/createStyleSheet';
|
|
@@ -38,14 +39,16 @@ const SheetItem = ({ icon, title, iconColor, titleColor, disabled = false }: She
|
|
|
38
39
|
containerStyle={styles.sheetItemIcon}
|
|
39
40
|
/>
|
|
40
41
|
)}
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
42
|
+
<Box flex={1} alignItems={'flex-start'}>
|
|
43
|
+
<Text
|
|
44
|
+
subtitle1
|
|
45
|
+
numberOfLines={1}
|
|
46
|
+
color={titleColor ?? (disabled ? colors.ui.dialog.default.none.blurred : colors.ui.dialog.default.none.text)}
|
|
47
|
+
style={styles.sheetItemText}
|
|
48
|
+
>
|
|
49
|
+
{title}
|
|
50
|
+
</Text>
|
|
51
|
+
</Box>
|
|
49
52
|
</View>
|
|
50
53
|
);
|
|
51
54
|
};
|
|
@@ -55,19 +58,19 @@ const styles = createStyleSheet({
|
|
|
55
58
|
overflow: 'hidden',
|
|
56
59
|
flexDirection: 'column',
|
|
57
60
|
width: '100%',
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
borderTopStartRadius: 8,
|
|
62
|
+
borderTopEndRadius: 8,
|
|
60
63
|
},
|
|
61
64
|
sheetItemContainer: {
|
|
62
65
|
flexDirection: 'row',
|
|
63
66
|
alignItems: 'center',
|
|
67
|
+
justifyContent: 'flex-start',
|
|
64
68
|
height: 48,
|
|
65
69
|
},
|
|
66
70
|
sheetItemIcon: {
|
|
67
|
-
|
|
71
|
+
marginStart: 16,
|
|
68
72
|
},
|
|
69
73
|
sheetItemText: {
|
|
70
|
-
flex: 1,
|
|
71
74
|
marginHorizontal: 24,
|
|
72
75
|
},
|
|
73
76
|
});
|
|
@@ -29,7 +29,7 @@ const FileMessage = (props: Props) => {
|
|
|
29
29
|
<Icon.File
|
|
30
30
|
fileType={fileType}
|
|
31
31
|
size={24}
|
|
32
|
-
containerStyle={{ backgroundColor: colors.background, padding: 2, borderRadius: 8,
|
|
32
|
+
containerStyle={{ backgroundColor: colors.background, padding: 2, borderRadius: 8, marginEnd: 8 }}
|
|
33
33
|
/>
|
|
34
34
|
<Text
|
|
35
35
|
body3
|
|
@@ -107,7 +107,7 @@ const VoiceFileMessage = (props: Props) => {
|
|
|
107
107
|
)}
|
|
108
108
|
<Text
|
|
109
109
|
body3
|
|
110
|
-
style={{ lineHeight: undefined,
|
|
110
|
+
style={{ lineHeight: undefined, marginStart: 6, opacity: 0.88 }}
|
|
111
111
|
color={uiColors.enabled.textVoicePlaytime}
|
|
112
112
|
>
|
|
113
113
|
{millsToMSS(state.currentTime === 0 ? state.duration : remainingTime)}
|
|
@@ -32,9 +32,12 @@ const MessageBubbleWithText = ({
|
|
|
32
32
|
const color = colors.ui.groupChannelMessage[variant];
|
|
33
33
|
return (
|
|
34
34
|
<Box backgroundColor={backgroundColor} style={styles.bubble}>
|
|
35
|
-
<Text body3 color={color.enabled.textMsg} suppressHighlighting>
|
|
35
|
+
<Text body3 color={color.enabled.textMsg} suppressHighlighting supportRTLAlign originalText={message.message}>
|
|
36
36
|
<RegexText
|
|
37
37
|
body3
|
|
38
|
+
suppressHighlighting
|
|
39
|
+
supportRTLAlign
|
|
40
|
+
originalText={message.message}
|
|
38
41
|
color={color.enabled.textMsg}
|
|
39
42
|
patterns={[
|
|
40
43
|
...regexTextPatterns,
|
|
@@ -59,7 +62,7 @@ const MessageBubbleWithText = ({
|
|
|
59
62
|
{renderRegexTextChildren(message)}
|
|
60
63
|
</RegexText>
|
|
61
64
|
{Boolean(message.updatedAt) && (
|
|
62
|
-
<Text body3 color={color.enabled.textEdited}>
|
|
65
|
+
<Text body3 color={color.enabled.textEdited} supportRTLAlign originalText={strings?.edited ?? ' (edited)'}>
|
|
63
66
|
{strings?.edited ?? ' (edited)'}
|
|
64
67
|
</Text>
|
|
65
68
|
)}
|
|
@@ -37,17 +37,17 @@ MessageContainer.Incoming = function MessageContainerIncoming({
|
|
|
37
37
|
return (
|
|
38
38
|
<Box flexDirection={'column'} justifyContent={'flex-start'} alignItems={'flex-start'}>
|
|
39
39
|
<Box flexDirection={'row'} justifyContent={'flex-start'} alignItems={'flex-end'}>
|
|
40
|
-
<Box width={26}
|
|
40
|
+
<Box width={26} marginEnd={12}>
|
|
41
41
|
{(message.isFileMessage() || message.isUserMessage()) && !groupedWithNext && (
|
|
42
42
|
<Pressable onPress={onPressAvatar}>
|
|
43
43
|
<Avatar size={26} uri={message.sender?.profileUrl} />
|
|
44
44
|
</Pressable>
|
|
45
45
|
)}
|
|
46
46
|
</Box>
|
|
47
|
-
<Box flexShrink={1}>
|
|
47
|
+
<Box flexShrink={1} alignItems={'flex-start'}>
|
|
48
48
|
{parentMessage}
|
|
49
49
|
{!groupedWithPrev && !parentMessage && (
|
|
50
|
-
<Box
|
|
50
|
+
<Box marginStart={12} marginBottom={4}>
|
|
51
51
|
{(message.isFileMessage() || message.isUserMessage()) && (
|
|
52
52
|
<Text caption1 color={color.enabled.textSenderName} numberOfLines={1}>
|
|
53
53
|
{strings?.senderName ?? message.sender.nickname}
|
|
@@ -58,7 +58,7 @@ MessageContainer.Incoming = function MessageContainerIncoming({
|
|
|
58
58
|
<Box flexDirection={'row'} alignItems={'flex-end'}>
|
|
59
59
|
<Box style={styles.bubble}>{children}</Box>
|
|
60
60
|
{!groupedWithNext && (
|
|
61
|
-
<Box
|
|
61
|
+
<Box marginStart={4}>
|
|
62
62
|
<Text caption4 color={color.enabled.textTime}>
|
|
63
63
|
{strings?.sentDate ?? getMessageTimeFormat(new Date(message.createdAt))}
|
|
64
64
|
</Text>
|
|
@@ -68,7 +68,7 @@ MessageContainer.Incoming = function MessageContainerIncoming({
|
|
|
68
68
|
</Box>
|
|
69
69
|
</Box>
|
|
70
70
|
<Box flexDirection={'row'} marginTop={4}>
|
|
71
|
-
<Box width={26}
|
|
71
|
+
<Box width={26} marginEnd={12} justifyContent={'flex-start'} />
|
|
72
72
|
{replyInfo}
|
|
73
73
|
</Box>
|
|
74
74
|
</Box>
|
|
@@ -92,9 +92,9 @@ MessageContainer.Outgoing = function MessageContainerOutgoing({
|
|
|
92
92
|
{parentMessage}
|
|
93
93
|
<Box flexDirection={'row'} justifyContent={'flex-end'} alignItems={'flex-end'}>
|
|
94
94
|
<Box flexDirection={'row'} alignItems={'flex-end'} justifyContent={'center'}>
|
|
95
|
-
{sendingStatus && <Box
|
|
95
|
+
{sendingStatus && <Box marginEnd={4}>{sendingStatus}</Box>}
|
|
96
96
|
{!groupedWithNext && (
|
|
97
|
-
<Box
|
|
97
|
+
<Box marginEnd={4}>
|
|
98
98
|
<Text caption4 color={color.enabled.textTime}>
|
|
99
99
|
{strings?.sentDate ?? getMessageTimeFormat(new Date(message.createdAt))}
|
|
100
100
|
</Text>
|