@sendbird/uikit-react-native-foundation 2.4.1 → 2.5.0-rc.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/README.md +1 -1
- package/lib/commonjs/assets/bundle-icons.js +0 -3
- package/lib/commonjs/assets/bundle-icons.js.map +1 -1
- package/lib/commonjs/assets/icon/index.js.map +1 -1
- package/lib/commonjs/components/Box/index.js +0 -9
- package/lib/commonjs/components/Box/index.js.map +1 -1
- package/lib/commonjs/components/Divider/index.js +0 -7
- package/lib/commonjs/components/Divider/index.js.map +1 -1
- package/lib/commonjs/components/Icon/index.js +0 -9
- package/lib/commonjs/components/Icon/index.js.map +1 -1
- package/lib/commonjs/components/Image/Image.fastimage.js +8 -17
- package/lib/commonjs/components/Image/Image.fastimage.js.map +1 -1
- package/lib/commonjs/components/Image/Image.reactnative.js +0 -6
- package/lib/commonjs/components/Image/Image.reactnative.js.map +1 -1
- package/lib/commonjs/components/Image/index.js +0 -5
- package/lib/commonjs/components/Image/index.js.map +1 -1
- package/lib/commonjs/components/ImageWithPlaceholder/index.js +0 -15
- package/lib/commonjs/components/ImageWithPlaceholder/index.js.map +1 -1
- package/lib/commonjs/components/Modal/index.js +6 -24
- package/lib/commonjs/components/Modal/index.js.map +1 -1
- package/lib/commonjs/components/PressBox/index.js +0 -11
- package/lib/commonjs/components/PressBox/index.js.map +1 -1
- package/lib/commonjs/components/RegexText/index.js +2 -8
- package/lib/commonjs/components/RegexText/index.js.map +1 -1
- package/lib/commonjs/components/Switch/index.js +0 -14
- package/lib/commonjs/components/Switch/index.js.map +1 -1
- package/lib/commonjs/components/Text/index.js +0 -8
- package/lib/commonjs/components/Text/index.js.map +1 -1
- package/lib/commonjs/components/TextInput/index.js +0 -8
- package/lib/commonjs/components/TextInput/index.js.map +1 -1
- package/lib/commonjs/components/URLParsedText/index.js +0 -14
- package/lib/commonjs/components/URLParsedText/index.js.map +1 -1
- package/lib/commonjs/index.js +0 -49
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/styles/HeaderStyleContext.js +0 -9
- package/lib/commonjs/styles/HeaderStyleContext.js.map +1 -1
- package/lib/commonjs/styles/createScaleFactor.js +0 -6
- package/lib/commonjs/styles/createScaleFactor.js.map +1 -1
- package/lib/commonjs/styles/createSelectByColorScheme.js +0 -2
- package/lib/commonjs/styles/createSelectByColorScheme.js.map +1 -1
- package/lib/commonjs/styles/createStyleSheet.js +1 -6
- package/lib/commonjs/styles/createStyleSheet.js.map +1 -1
- package/lib/commonjs/styles/createTypography.js +0 -3
- package/lib/commonjs/styles/createTypography.js.map +1 -1
- package/lib/commonjs/styles/getDefaultHeaderHeight.js +0 -2
- package/lib/commonjs/styles/getDefaultHeaderHeight.js.map +1 -1
- package/lib/commonjs/styles/useHeaderStyle.js +0 -4
- package/lib/commonjs/styles/useHeaderStyle.js.map +1 -1
- package/lib/commonjs/theme/DarkUIKitTheme.js +0 -3
- package/lib/commonjs/theme/DarkUIKitTheme.js.map +1 -1
- package/lib/commonjs/theme/LightUIKitTheme.js +0 -3
- package/lib/commonjs/theme/LightUIKitTheme.js.map +1 -1
- package/lib/commonjs/theme/Palette.js.map +1 -1
- package/lib/commonjs/theme/UIKitThemeContext.js +0 -4
- package/lib/commonjs/theme/UIKitThemeContext.js.map +1 -1
- package/lib/commonjs/theme/UIKitThemeProvider.js +0 -6
- package/lib/commonjs/theme/UIKitThemeProvider.js.map +1 -1
- package/lib/commonjs/theme/createTheme.js +0 -13
- package/lib/commonjs/theme/createTheme.js.map +1 -1
- package/lib/commonjs/theme/useUIKitTheme.js +0 -5
- package/lib/commonjs/theme/useUIKitTheme.js.map +1 -1
- package/lib/commonjs/ui/ActionMenu/index.js +2 -20
- package/lib/commonjs/ui/ActionMenu/index.js.map +1 -1
- package/lib/commonjs/ui/Alert/index.js +0 -12
- package/lib/commonjs/ui/Alert/index.js.map +1 -1
- package/lib/commonjs/ui/Avatar/AvatarGroup.js +0 -17
- package/lib/commonjs/ui/Avatar/AvatarGroup.js.map +1 -1
- package/lib/commonjs/ui/Avatar/AvatarIcon.js +0 -8
- package/lib/commonjs/ui/Avatar/AvatarIcon.js.map +1 -1
- package/lib/commonjs/ui/Avatar/index.js +0 -15
- package/lib/commonjs/ui/Avatar/index.js.map +1 -1
- package/lib/commonjs/ui/Badge/index.js +0 -9
- package/lib/commonjs/ui/Badge/index.js.map +1 -1
- package/lib/commonjs/ui/BottomSheet/index.js +0 -10
- package/lib/commonjs/ui/BottomSheet/index.js.map +1 -1
- package/lib/commonjs/ui/Button/index.js +0 -11
- package/lib/commonjs/ui/Button/index.js.map +1 -1
- package/lib/commonjs/ui/ChannelFrozenBanner/index.js +0 -8
- package/lib/commonjs/ui/ChannelFrozenBanner/index.js.map +1 -1
- package/lib/commonjs/ui/Dialog/DialogBox.js +0 -7
- package/lib/commonjs/ui/Dialog/DialogBox.js.map +1 -1
- package/lib/commonjs/ui/Dialog/DialogSheet.js +0 -10
- package/lib/commonjs/ui/Dialog/DialogSheet.js.map +1 -1
- package/lib/commonjs/ui/Dialog/index.js +0 -30
- package/lib/commonjs/ui/Dialog/index.js.map +1 -1
- package/lib/commonjs/ui/GroupChannelPreview/index.js +1 -13
- package/lib/commonjs/ui/GroupChannelPreview/index.js.map +1 -1
- package/lib/commonjs/ui/Header/index.js +0 -24
- package/lib/commonjs/ui/Header/index.js.map +1 -1
- package/lib/commonjs/ui/LoadingSpinner/index.js +0 -12
- package/lib/commonjs/ui/LoadingSpinner/index.js.map +1 -1
- package/lib/commonjs/ui/MenuBar/index.js +0 -11
- package/lib/commonjs/ui/MenuBar/index.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelMessage/Message.admin.js +0 -7
- package/lib/commonjs/ui/OpenChannelMessage/Message.admin.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelMessage/Message.file.image.js +0 -10
- package/lib/commonjs/ui/OpenChannelMessage/Message.file.image.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelMessage/Message.file.js +0 -14
- package/lib/commonjs/ui/OpenChannelMessage/Message.file.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelMessage/Message.file.video.js +0 -16
- package/lib/commonjs/ui/OpenChannelMessage/Message.file.video.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelMessage/Message.unknown.js +0 -10
- package/lib/commonjs/ui/OpenChannelMessage/Message.unknown.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelMessage/Message.user.js +0 -14
- package/lib/commonjs/ui/OpenChannelMessage/Message.user.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelMessage/Message.user.og.js +0 -17
- package/lib/commonjs/ui/OpenChannelMessage/Message.user.og.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelMessage/MessageContainer.js +0 -21
- package/lib/commonjs/ui/OpenChannelMessage/MessageContainer.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelMessage/index.js +0 -9
- package/lib/commonjs/ui/OpenChannelMessage/index.js.map +1 -1
- package/lib/commonjs/ui/OpenChannelPreview/index.js +0 -12
- package/lib/commonjs/ui/OpenChannelPreview/index.js.map +1 -1
- package/lib/commonjs/ui/OutlinedButton/index.js +0 -8
- package/lib/commonjs/ui/OutlinedButton/index.js.map +1 -1
- package/lib/commonjs/ui/Placeholder/index.js +2 -13
- package/lib/commonjs/ui/Placeholder/index.js.map +1 -1
- package/lib/commonjs/ui/ProfileCard/index.js +0 -10
- package/lib/commonjs/ui/ProfileCard/index.js.map +1 -1
- package/lib/commonjs/ui/Prompt/index.js +3 -20
- package/lib/commonjs/ui/Prompt/index.js.map +1 -1
- package/lib/commonjs/ui/Toast/index.js +2 -23
- package/lib/commonjs/ui/Toast/index.js.map +1 -1
- package/lib/module/assets/bundle-icons.js +0 -3
- package/lib/module/assets/bundle-icons.js.map +1 -1
- package/lib/module/assets/icon/index.js.map +1 -1
- package/lib/module/components/Box/index.js +0 -4
- package/lib/module/components/Box/index.js.map +1 -1
- package/lib/module/components/Divider/index.js +0 -2
- package/lib/module/components/Divider/index.js.map +1 -1
- package/lib/module/components/Icon/index.js +0 -2
- package/lib/module/components/Icon/index.js.map +1 -1
- package/lib/module/components/Image/Image.fastimage.js +8 -15
- package/lib/module/components/Image/Image.fastimage.js.map +1 -1
- package/lib/module/components/Image/Image.reactnative.js +0 -3
- package/lib/module/components/Image/Image.reactnative.js.map +1 -1
- package/lib/module/components/Image/index.js +0 -3
- package/lib/module/components/Image/index.js.map +1 -1
- package/lib/module/components/ImageWithPlaceholder/index.js +0 -4
- package/lib/module/components/ImageWithPlaceholder/index.js.map +1 -1
- package/lib/module/components/Modal/index.js +6 -16
- package/lib/module/components/Modal/index.js.map +1 -1
- package/lib/module/components/PressBox/index.js +0 -5
- package/lib/module/components/PressBox/index.js.map +1 -1
- package/lib/module/components/RegexText/index.js +2 -4
- package/lib/module/components/RegexText/index.js.map +1 -1
- package/lib/module/components/Switch/index.js +0 -6
- package/lib/module/components/Switch/index.js.map +1 -1
- package/lib/module/components/Text/index.js +0 -4
- package/lib/module/components/Text/index.js.map +1 -1
- package/lib/module/components/TextInput/index.js +0 -1
- package/lib/module/components/TextInput/index.js.map +1 -1
- package/lib/module/components/URLParsedText/index.js +0 -5
- package/lib/module/components/URLParsedText/index.js.map +1 -1
- package/lib/module/index.js +5 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/styles/HeaderStyleContext.js.map +1 -1
- package/lib/module/styles/createScaleFactor.js +0 -3
- package/lib/module/styles/createScaleFactor.js.map +1 -1
- package/lib/module/styles/createSelectByColorScheme.js +0 -1
- package/lib/module/styles/createSelectByColorScheme.js.map +1 -1
- package/lib/module/styles/createStyleSheet.js +1 -4
- package/lib/module/styles/createStyleSheet.js.map +1 -1
- package/lib/module/styles/createTypography.js +0 -2
- package/lib/module/styles/createTypography.js.map +1 -1
- package/lib/module/styles/getDefaultHeaderHeight.js +0 -2
- package/lib/module/styles/getDefaultHeaderHeight.js.map +1 -1
- package/lib/module/styles/useHeaderStyle.js +0 -2
- 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 +0 -2
- package/lib/module/theme/UIKitThemeProvider.js.map +1 -1
- package/lib/module/theme/createTheme.js +0 -9
- package/lib/module/theme/createTheme.js.map +1 -1
- package/lib/module/theme/useUIKitTheme.js +0 -2
- package/lib/module/theme/useUIKitTheme.js.map +1 -1
- package/lib/module/ui/ActionMenu/index.js +2 -7
- package/lib/module/ui/ActionMenu/index.js.map +1 -1
- package/lib/module/ui/Alert/index.js +0 -2
- package/lib/module/ui/Alert/index.js.map +1 -1
- package/lib/module/ui/Avatar/AvatarGroup.js +0 -12
- package/lib/module/ui/Avatar/AvatarGroup.js.map +1 -1
- package/lib/module/ui/Avatar/AvatarIcon.js +0 -2
- package/lib/module/ui/Avatar/AvatarIcon.js.map +1 -1
- package/lib/module/ui/Avatar/index.js +0 -3
- package/lib/module/ui/Avatar/index.js.map +1 -1
- package/lib/module/ui/Badge/index.js +0 -2
- package/lib/module/ui/Badge/index.js.map +1 -1
- package/lib/module/ui/BottomSheet/index.js +0 -3
- package/lib/module/ui/BottomSheet/index.js.map +1 -1
- package/lib/module/ui/Button/index.js +0 -4
- package/lib/module/ui/Button/index.js.map +1 -1
- package/lib/module/ui/ChannelFrozenBanner/index.js +0 -2
- package/lib/module/ui/ChannelFrozenBanner/index.js.map +1 -1
- package/lib/module/ui/Dialog/DialogBox.js +0 -2
- package/lib/module/ui/Dialog/DialogBox.js.map +1 -1
- package/lib/module/ui/Dialog/DialogSheet.js +0 -3
- package/lib/module/ui/Dialog/DialogSheet.js.map +1 -1
- package/lib/module/ui/Dialog/index.js +0 -6
- package/lib/module/ui/Dialog/index.js.map +1 -1
- package/lib/module/ui/GroupChannelPreview/index.js +1 -3
- package/lib/module/ui/GroupChannelPreview/index.js.map +1 -1
- package/lib/module/ui/Header/index.js +0 -14
- package/lib/module/ui/Header/index.js.map +1 -1
- package/lib/module/ui/LoadingSpinner/index.js +0 -4
- package/lib/module/ui/LoadingSpinner/index.js.map +1 -1
- package/lib/module/ui/MenuBar/index.js +0 -2
- package/lib/module/ui/MenuBar/index.js.map +1 -1
- package/lib/module/ui/OpenChannelMessage/Message.admin.js +0 -2
- package/lib/module/ui/OpenChannelMessage/Message.admin.js.map +1 -1
- package/lib/module/ui/OpenChannelMessage/Message.file.image.js +0 -2
- package/lib/module/ui/OpenChannelMessage/Message.file.image.js.map +1 -1
- package/lib/module/ui/OpenChannelMessage/Message.file.js +0 -3
- package/lib/module/ui/OpenChannelMessage/Message.file.js.map +1 -1
- package/lib/module/ui/OpenChannelMessage/Message.file.video.js +0 -4
- package/lib/module/ui/OpenChannelMessage/Message.file.video.js.map +1 -1
- package/lib/module/ui/OpenChannelMessage/Message.unknown.js +0 -4
- package/lib/module/ui/OpenChannelMessage/Message.unknown.js.map +1 -1
- package/lib/module/ui/OpenChannelMessage/Message.user.js +0 -6
- package/lib/module/ui/OpenChannelMessage/Message.user.js.map +1 -1
- package/lib/module/ui/OpenChannelMessage/Message.user.og.js +0 -6
- package/lib/module/ui/OpenChannelMessage/Message.user.og.js.map +1 -1
- package/lib/module/ui/OpenChannelMessage/MessageContainer.js +0 -9
- 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 +0 -3
- package/lib/module/ui/OpenChannelPreview/index.js.map +1 -1
- package/lib/module/ui/OutlinedButton/index.js +0 -2
- package/lib/module/ui/OutlinedButton/index.js.map +1 -1
- package/lib/module/ui/Placeholder/index.js +2 -3
- package/lib/module/ui/Placeholder/index.js.map +1 -1
- package/lib/module/ui/ProfileCard/index.js +0 -2
- package/lib/module/ui/ProfileCard/index.js.map +1 -1
- package/lib/module/ui/Prompt/index.js +3 -6
- package/lib/module/ui/Prompt/index.js.map +1 -1
- package/lib/module/ui/Toast/index.js +2 -8
- package/lib/module/ui/Toast/index.js.map +1 -1
- package/lib/typescript/src/components/PressBox/index.d.ts +2 -1
- package/package.json +15 -9
- package/src/components/Image/Image.fastimage.tsx +17 -1
- package/src/components/PressBox/index.tsx +2 -1
- package/src/ui/GroupChannelPreview/index.tsx +7 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Modal","Text","createStyleSheet","useHeaderStyle","useUIKitTheme","Button","DialogBox","Alert","onDismiss","visible","onHide","title","message","buttons","text","statusBarTranslucent","colors","alignItems","justifyContent","styles","container","Boolean","titleContainer","ui","dialog","default","none","flex","messageContainer","buttonContainer","map","
|
|
1
|
+
{"version":3,"names":["React","View","Modal","Text","createStyleSheet","useHeaderStyle","useUIKitTheme","Button","DialogBox","Alert","_ref","onDismiss","visible","onHide","title","message","buttons","text","statusBarTranslucent","colors","createElement","onClose","backgroundStyle","alignItems","justifyContent","style","styles","container","Boolean","titleContainer","h1","color","ui","dialog","default","none","numberOfLines","flex","messageContainer","subtitle2","body3","buttonContainer","map","_ref2","index","onPress","key","variant","button","contentColor","destructive","highlight","paddingTop","paddingBottom","paddingHorizontal","flexDirection","marginBottom","marginLeft","padding"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\nimport { AlertButton, View } from 'react-native';\n\nimport Modal from '../../components/Modal';\nimport Text from '../../components/Text';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useHeaderStyle from '../../styles/useHeaderStyle';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\nimport Button from '../Button';\nimport DialogBox from '../Dialog/DialogBox';\n\nexport type AlertItem = {\n title?: string;\n message?: string;\n buttons?: AlertButton[];\n};\n\ntype Props = {\n visible: boolean;\n onHide: () => void;\n onDismiss?: () => void;\n} & AlertItem;\nconst Alert = ({ onDismiss, visible, onHide, title = '', message = '', buttons = [{ text: 'OK' }] }: Props) => {\n const { statusBarTranslucent } = useHeaderStyle();\n const { colors } = useUIKitTheme();\n\n return (\n <Modal\n onClose={onHide}\n onDismiss={onDismiss}\n statusBarTranslucent={statusBarTranslucent}\n visible={visible}\n backgroundStyle={{ alignItems: 'center', justifyContent: 'center' }}\n >\n <DialogBox style={styles.container}>\n {Boolean(title) && (\n <View style={styles.titleContainer}>\n <Text h1 color={colors.ui.dialog.default.none.text} numberOfLines={1} style={{ flex: 1 }}>\n {title}\n </Text>\n </View>\n )}\n\n <View style={styles.messageContainer}>\n {Boolean(message) && (\n <Text\n subtitle2={!title}\n body3={Boolean(title)}\n color={!title ? colors.ui.dialog.default.none.text : colors.ui.dialog.default.none.message}\n numberOfLines={3}\n >\n {message}\n </Text>\n )}\n </View>\n\n <View style={styles.buttonContainer}>\n {buttons.map(({ text = 'OK', style = 'default', onPress }, index) => {\n return (\n <Button\n key={text + index}\n variant={'text'}\n style={styles.button}\n onPress={async () => {\n try {\n onPress?.();\n } finally {\n onHide();\n }\n }}\n contentColor={\n style === 'destructive'\n ? colors.ui.dialog.default.none.destructive\n : colors.ui.dialog.default.none.highlight\n }\n >\n {text}\n </Button>\n );\n })}\n </View>\n </DialogBox>\n </Modal>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n paddingTop: 20,\n },\n titleContainer: {\n paddingBottom: 16,\n paddingHorizontal: 24,\n flexDirection: 'row',\n alignItems: 'center',\n },\n messageContainer: {\n paddingHorizontal: 24,\n marginBottom: 12,\n },\n button: {\n marginLeft: 8,\n },\n buttonContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'flex-end',\n padding: 12,\n },\n});\n\nexport default Alert;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAsBC,IAAI,QAAQ,cAAc;AAEhD,OAAOC,KAAK,MAAM,wBAAwB;AAC1C,OAAOC,IAAI,MAAM,uBAAuB;AACxC,OAAOC,gBAAgB,MAAM,+BAA+B;AAC5D,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAAOC,aA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AAc,EAAE;IACdwB,aAAa,EAAE,EAAE;IACjBC,iBAAiB,EAAE,EAAE;IACrBC,aAAa,EAAE,KAAK;IACpBhC,UAAU,EAAE;EACd,CAAC;EACDe,gBAAgB,EAAE;IAChBgB,iBAAiB,EAAE,EAAE;IACrBE,YAAY,EAAE;EAChB,CAAC;EACDR,MAAM,EAAE;IACNS,UAAU,EAAE;EACd,CAAC;EACDhB,eAAe,EAAE;IACfc,aAAa,EAAE,KAAK;IACpBhC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,UAAU;IAC1BkC,OAAO,EAAE;EACX;AACF,CAAC,CAAC;AAEF,eAAejD,KAAK"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
const MAX = 4;
|
|
4
|
-
|
|
5
4
|
const AvatarGroup = _ref => {
|
|
6
5
|
let {
|
|
7
6
|
children,
|
|
@@ -9,7 +8,6 @@ const AvatarGroup = _ref => {
|
|
|
9
8
|
size = 56
|
|
10
9
|
} = _ref;
|
|
11
10
|
const childAmount = React.Children.count(children);
|
|
12
|
-
|
|
13
11
|
if (childAmount === 0) {
|
|
14
12
|
return /*#__PURE__*/React.createElement(View, {
|
|
15
13
|
style: [containerStyle, {
|
|
@@ -21,10 +19,8 @@ const AvatarGroup = _ref => {
|
|
|
21
19
|
}]
|
|
22
20
|
});
|
|
23
21
|
}
|
|
24
|
-
|
|
25
22
|
const renderAvatars = () => {
|
|
26
23
|
var _React$Children$map;
|
|
27
|
-
|
|
28
24
|
return ((_React$Children$map = React.Children.map(children, (child, index) => {
|
|
29
25
|
if (index + 1 > MAX) return child;
|
|
30
26
|
if (! /*#__PURE__*/React.isValidElement(child)) return child;
|
|
@@ -57,7 +53,6 @@ const AvatarGroup = _ref => {
|
|
|
57
53
|
}));
|
|
58
54
|
})) === null || _React$Children$map === void 0 ? void 0 : _React$Children$map.slice(0, 4)) ?? [];
|
|
59
55
|
};
|
|
60
|
-
|
|
61
56
|
return /*#__PURE__*/React.createElement(View, {
|
|
62
57
|
style: [containerStyle, {
|
|
63
58
|
overflow: 'hidden',
|
|
@@ -67,17 +62,14 @@ const AvatarGroup = _ref => {
|
|
|
67
62
|
}]
|
|
68
63
|
}, renderAvatars());
|
|
69
64
|
};
|
|
70
|
-
|
|
71
65
|
const getHeightPoint = (_, total) => {
|
|
72
66
|
if (total === 2) return 1;
|
|
73
67
|
return 0.5;
|
|
74
68
|
};
|
|
75
|
-
|
|
76
69
|
const getWidthPoint = (idx, total) => {
|
|
77
70
|
if (total === 3 && idx === 0) return 1;
|
|
78
71
|
return 0.5;
|
|
79
72
|
};
|
|
80
|
-
|
|
81
73
|
const getTopPoint = (idx, total) => {
|
|
82
74
|
if (total === 2) return -0.025;
|
|
83
75
|
if (total === 3 && idx === 0) return -0.025;
|
|
@@ -85,21 +77,17 @@ const getTopPoint = (idx, total) => {
|
|
|
85
77
|
if (idx === 0 || idx === 1) return -0.025;
|
|
86
78
|
return 0.525;
|
|
87
79
|
};
|
|
88
|
-
|
|
89
80
|
const getLeftPoint = idx => {
|
|
90
81
|
if (idx === 0 || idx === 2) return -0.025;
|
|
91
82
|
return 0.525;
|
|
92
83
|
};
|
|
93
|
-
|
|
94
84
|
const getInnerLeft = (idx, total) => {
|
|
95
85
|
if (total === 3 && idx === 0) return 0;
|
|
96
86
|
return 0.25;
|
|
97
87
|
};
|
|
98
|
-
|
|
99
88
|
const getInnerTop = total => {
|
|
100
89
|
if (total === 2) return 0;
|
|
101
90
|
return 0.25;
|
|
102
91
|
};
|
|
103
|
-
|
|
104
92
|
export default AvatarGroup;
|
|
105
93
|
//# sourceMappingURL=AvatarGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","MAX","AvatarGroup","children","containerStyle","size","childAmount","Children","count","overflow","width","height","borderRadius","backgroundColor","renderAvatars","map","child","index","isValidElement","cloneElement","top","getTopPoint","left","getLeftPoint","getWidthPoint","getHeightPoint","innerLeft","getInnerLeft","innerTop","getInnerTop","position","square","slice","_","total","idx"],"sources":["AvatarGroup.tsx"],"sourcesContent":["import React, { ReactElement } from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\n\nconst MAX = 4;\n\ntype Props = React.PropsWithChildren<{\n size?: number;\n containerStyle?: StyleProp<ViewStyle>;\n}>;\nconst AvatarGroup = ({ children, containerStyle, size = 56 }: Props) => {\n const childAmount = React.Children.count(children);\n\n if (childAmount === 0) {\n return (\n <View\n style={[\n containerStyle,\n {\n overflow: 'hidden',\n width: size,\n height: size,\n borderRadius: size,\n backgroundColor: 'rgba(120,120,120,0.2)',\n },\n ]}\n />\n );\n }\n\n const renderAvatars = () => {\n return (\n React.Children.map(children, (child, index) => {\n if (index + 1 > MAX) return child;\n if (!React.isValidElement(child)) return child;\n\n if (childAmount === 1) return React.cloneElement(child as ReactElement, { size, containerStyle });\n\n const top = getTopPoint(index, childAmount) * size;\n const left = getLeftPoint(index) * size;\n const width = getWidthPoint(index, childAmount) * size;\n const height = getHeightPoint(index, childAmount) * size;\n const innerLeft = -getInnerLeft(index, childAmount) * size;\n const innerTop = -getInnerTop(childAmount) * size;\n\n return (\n <View style={{ overflow: 'hidden', position: 'absolute', top, left, width, height }}>\n {React.cloneElement(child as ReactElement, {\n size,\n square: true,\n containerStyle: { left: innerLeft, top: innerTop },\n })}\n </View>\n );\n })?.slice(0, 4) ?? []\n );\n };\n\n return (\n <View style={[containerStyle, { overflow: 'hidden', width: size, height: size, borderRadius: size }]}>\n {renderAvatars()}\n </View>\n );\n};\n\nconst getHeightPoint = (_: number, total: number) => {\n if (total === 2) return 1;\n return 0.5;\n};\nconst getWidthPoint = (idx: number, total: number) => {\n if (total === 3 && idx === 0) return 1;\n return 0.5;\n};\nconst getTopPoint = (idx: number, total: number) => {\n if (total === 2) return -0.025;\n if (total === 3 && idx === 0) return -0.025;\n if (total === 3 && idx !== 0) return 0.525;\n if (idx === 0 || idx === 1) return -0.025;\n return 0.525;\n};\nconst getLeftPoint = (idx: number) => {\n if (idx === 0 || idx === 2) return -0.025;\n return 0.525;\n};\nconst getInnerLeft = (idx: number, total: number) => {\n if (total === 3 && idx === 0) return 0;\n return 0.25;\n};\nconst getInnerTop = (total: number) => {\n if (total === 2) return 0;\n return 0.25;\n};\n\nexport default AvatarGroup;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"names":["React","View","MAX","AvatarGroup","_ref","children","containerStyle","size","childAmount","Children","count","createElement","style","overflow","width","height","borderRadius","backgroundColor","renderAvatars","_React$Children$map","map","child","index","isValidElement","cloneElement","top","getTopPoint","left","getLeftPoint","getWidthPoint","getHeightPoint","innerLeft","getInnerLeft","innerTop","getInnerTop","position","square","slice","_","total","idx"],"sources":["AvatarGroup.tsx"],"sourcesContent":["import React, { ReactElement } from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\n\nconst MAX = 4;\n\ntype Props = React.PropsWithChildren<{\n size?: number;\n containerStyle?: StyleProp<ViewStyle>;\n}>;\nconst AvatarGroup = ({ children, containerStyle, size = 56 }: Props) => {\n const childAmount = React.Children.count(children);\n\n if (childAmount === 0) {\n return (\n <View\n style={[\n containerStyle,\n {\n overflow: 'hidden',\n width: size,\n height: size,\n borderRadius: size,\n backgroundColor: 'rgba(120,120,120,0.2)',\n },\n ]}\n />\n );\n }\n\n const renderAvatars = () => {\n return (\n React.Children.map(children, (child, index) => {\n if (index + 1 > MAX) return child;\n if (!React.isValidElement(child)) return child;\n\n if (childAmount === 1) return React.cloneElement(child as ReactElement, { size, containerStyle });\n\n const top = getTopPoint(index, childAmount) * size;\n const left = getLeftPoint(index) * size;\n const width = getWidthPoint(index, childAmount) * size;\n const height = getHeightPoint(index, childAmount) * size;\n const innerLeft = -getInnerLeft(index, childAmount) * size;\n const innerTop = -getInnerTop(childAmount) * size;\n\n return (\n <View style={{ overflow: 'hidden', position: 'absolute', top, left, width, height }}>\n {React.cloneElement(child as ReactElement, {\n size,\n square: true,\n containerStyle: { left: innerLeft, top: innerTop },\n })}\n </View>\n );\n })?.slice(0, 4) ?? []\n );\n };\n\n return (\n <View style={[containerStyle, { overflow: 'hidden', width: size, height: size, borderRadius: size }]}>\n {renderAvatars()}\n </View>\n );\n};\n\nconst getHeightPoint = (_: number, total: number) => {\n if (total === 2) return 1;\n return 0.5;\n};\nconst getWidthPoint = (idx: number, total: number) => {\n if (total === 3 && idx === 0) return 1;\n return 0.5;\n};\nconst getTopPoint = (idx: number, total: number) => {\n if (total === 2) return -0.025;\n if (total === 3 && idx === 0) return -0.025;\n if (total === 3 && idx !== 0) return 0.525;\n if (idx === 0 || idx === 1) return -0.025;\n return 0.525;\n};\nconst getLeftPoint = (idx: number) => {\n if (idx === 0 || idx === 2) return -0.025;\n return 0.525;\n};\nconst getInnerLeft = (idx: number, total: number) => {\n if (total === 3 && idx === 0) return 0;\n return 0.25;\n};\nconst getInnerTop = (total: number) => {\n if (total === 2) return 0;\n return 0.25;\n};\n\nexport default AvatarGroup;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAwB,OAAO;AAC3C,SAAoBC,IAAI,QAAmB,cAAc;AAEzD,MAAMC,GAAG,GAAG,CAAC;AAMb,MAAMC,WAAW,GAAGC,IAAA,IAAoD;EAAA,IAAnD;IAAEC,QAAQ;IAAEC,cAAc;IAAEC,IAAI,GAAG;EAAU,CAAC,GAAAH,IAAA;EACjE,MAAMI,WAAW,GAAGR,KAAK,CAACS,QAAQ,CAACC,KAAK,CAACL,QAAQ,CAAC;EAElD,IAAIG,WAAW,KAAK,CAAC,EAAE;IACrB,oBACER,KAAA,CAAAW,aAAA,CAACV,IAAI;MACHW,KAAK,EAAE,CACLN,cAAc,EACd;QACEO,QAAQ,EAAE,QAAQ;QAClBC,KAAK,EAAEP,IAAI;QACXQ,MAAM,EAAER,IAAI;QACZS,YAAY,EAAET,IAAI;QAClBU,eAAe,EAAE;MACnB,CAAC;IACD,EACF;EAEN;EAEA,MAAMC,aAAa,GAAGA,CAAA,KAAM;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IAAIA,KAAK,KAAK,CAAC,IAAIC,GAAG,KAAK,CAAC,EAAE,OAAO,CAAC;EACtC,OAAO,IAAI;AACb,CAAC;AACD,MAAMN,WAAW,GAAIK,KAAa,IAAK;EACrC,IAAIA,KAAK,KAAK,CAAC,EAAE,OAAO,CAAC;EACzB,OAAO,IAAI;AACb,CAAC;AAED,eAAepC,WAAW"}
|
|
@@ -3,7 +3,6 @@ import { View } from 'react-native';
|
|
|
3
3
|
import Icon from '../../components/Icon';
|
|
4
4
|
import createStyleSheet from '../../styles/createStyleSheet';
|
|
5
5
|
import useUIKitTheme from '../../theme/useUIKitTheme';
|
|
6
|
-
|
|
7
6
|
const AvatarIcon = _ref => {
|
|
8
7
|
let {
|
|
9
8
|
size = 56,
|
|
@@ -28,7 +27,6 @@ const AvatarIcon = _ref => {
|
|
|
28
27
|
color: colors.onBackgroundReverse01
|
|
29
28
|
}));
|
|
30
29
|
};
|
|
31
|
-
|
|
32
30
|
const styles = createStyleSheet({
|
|
33
31
|
container: {
|
|
34
32
|
overflow: 'hidden',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Icon","createStyleSheet","useUIKitTheme","AvatarIcon","size","icon","containerStyle","backgroundColor","colors","palette","styles","container","width","height","borderRadius","background300","onBackgroundReverse01","overflow","alignItems","justifyContent"],"sources":["AvatarIcon.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\n\nimport Icon from '../../components/Icon';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\n\ntype Props = {\n icon: keyof typeof Icon.Assets;\n size?: number;\n backgroundColor?: string;\n containerStyle?: StyleProp<ViewStyle>;\n};\nconst AvatarIcon = ({ size = 56, icon, containerStyle, backgroundColor }: Props) => {\n const { colors, palette } = useUIKitTheme();\n return (\n <View\n style={[\n styles.container,\n {\n width: size,\n height: size,\n borderRadius: size / 2,\n backgroundColor: backgroundColor ?? palette.background300,\n },\n containerStyle,\n ]}\n >\n <Icon icon={icon} size={size / 2} color={colors.onBackgroundReverse01} />\n </View>\n );\n};\nconst styles = createStyleSheet({\n container: {\n overflow: 'hidden',\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\nexport default AvatarIcon;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"names":["React","View","Icon","createStyleSheet","useUIKitTheme","AvatarIcon","_ref","size","icon","containerStyle","backgroundColor","colors","palette","createElement","style","styles","container","width","height","borderRadius","background300","color","onBackgroundReverse01","overflow","alignItems","justifyContent"],"sources":["AvatarIcon.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\n\nimport Icon from '../../components/Icon';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\n\ntype Props = {\n icon: keyof typeof Icon.Assets;\n size?: number;\n backgroundColor?: string;\n containerStyle?: StyleProp<ViewStyle>;\n};\nconst AvatarIcon = ({ size = 56, icon, containerStyle, backgroundColor }: Props) => {\n const { colors, palette } = useUIKitTheme();\n return (\n <View\n style={[\n styles.container,\n {\n width: size,\n height: size,\n borderRadius: size / 2,\n backgroundColor: backgroundColor ?? palette.background300,\n },\n containerStyle,\n ]}\n >\n <Icon icon={icon} size={size / 2} color={colors.onBackgroundReverse01} />\n </View>\n );\n};\nconst styles = createStyleSheet({\n container: {\n overflow: 'hidden',\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\nexport default AvatarIcon;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAoBC,IAAI,QAAmB,cAAc;AAEzD,OAAOC,IAAI,MAAM,uBAAuB;AACxC,OAAOC,gBAAgB,MAAM,+BAA+B;AAC5D,OAAOC,aAAa,MAAM,2BAA2B;AAQrD,MAAMC,UAAU,GAAGC,IAAA,IAAiE;EAAA,IAAhE;IAAEC,IAAI,GAAG,EAAE;IAAEC,IAAI;IAAEC,cAAc;IAAEC;EAAuB,CAAC,GAAAJ,IAAA;EAC7E,MAAM;IAAEK,MAAM;IAAEC;EAAQ,CAAC,GAAGR,aAAa,EAAE;EAC3C,oBACEJ,KAAA,CAAAa,aAAA,CAACZ,IAAI;IACHa,KAAK,EAAE,CACLC,MAAM,CAACC,SAAS,EAChB;MACEC,KAAK,EAAEV,IAAI;MACXW,MAAM,EAAEX,IAAI;MACZY,YAAY,EAAEZ,IAAI,GAAG,CAAC;MACtBG,eAAe,EAAEA,eAAe,IAAIE,OAAO,CAACQ;IAC9C,CAAC,EACDX,cAAc;EACd,gBAEFT,KAAA,CAAAa,aAAA,CAACX,IAAI;IAACM,IAAI,EAAEA,IAAK;IAACD,IAAI,EAAEA,IAAI,GAAG,CAAE;IAACc,KAAK,EAAEV,MAAM,CAACW;EAAsB,EAAG,CACpE;AAEX,CAAC;AACD,MAAMP,MAAM,GAAGZ,gBAAgB,CAAC;EAC9Ba,SAAS,EAAE;IACTO,QAAQ,EAAE,QAAQ;IAClBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC;AACF,eAAepB,UAAU"}
|
|
@@ -7,7 +7,6 @@ import createStyleSheet from '../../styles/createStyleSheet';
|
|
|
7
7
|
import useUIKitTheme from '../../theme/useUIKitTheme';
|
|
8
8
|
import AvatarGroup from './AvatarGroup';
|
|
9
9
|
import AvatarIcon from './AvatarIcon';
|
|
10
|
-
|
|
11
10
|
const Avatar = _ref => {
|
|
12
11
|
let {
|
|
13
12
|
uri,
|
|
@@ -43,7 +42,6 @@ const Avatar = _ref => {
|
|
|
43
42
|
size: size
|
|
44
43
|
}));
|
|
45
44
|
};
|
|
46
|
-
|
|
47
45
|
const MutedOverlay = _ref2 => {
|
|
48
46
|
let {
|
|
49
47
|
size
|
|
@@ -64,7 +62,6 @@ const MutedOverlay = _ref2 => {
|
|
|
64
62
|
size: size * 0.72
|
|
65
63
|
}));
|
|
66
64
|
};
|
|
67
|
-
|
|
68
65
|
const styles = createStyleSheet({
|
|
69
66
|
container: {
|
|
70
67
|
alignItems: 'center',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","StyleSheet","View","conditionChaining","Icon","Image","createStyleSheet","useUIKitTheme","AvatarGroup","AvatarIcon","Avatar","uri","square","muted","size","containerStyle","colors","palette","loadFailure","setLoadFailure","styles","container","width","height","borderRadius","backgroundColor","background300","Boolean","absoluteFill","onBackgroundReverse01","MutedOverlay","primary300","opacity","onBackgroundDark01","alignItems","justifyContent","overflow","Group"],"sources":["index.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { conditionChaining } from '@sendbird/uikit-utils';\n\nimport Icon from '../../components/Icon';\nimport Image from '../../components/Image';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\nimport AvatarGroup from './AvatarGroup';\nimport AvatarIcon from './AvatarIcon';\n\ntype SubComponents = {\n Group: typeof AvatarGroup;\n Icon: typeof AvatarIcon;\n};\ntype Props = {\n uri?: string;\n size?: number;\n square?: boolean;\n muted?: boolean;\n containerStyle?: StyleProp<ViewStyle>;\n};\nconst Avatar: ((props: Props) => JSX.Element) & SubComponents = ({\n uri,\n square,\n muted = false,\n size = 56,\n containerStyle,\n}) => {\n const { colors, palette } = useUIKitTheme();\n const [loadFailure, setLoadFailure] = useState(false);\n\n return (\n <View\n style={[\n styles.container,\n { width: size, height: size, borderRadius: square ? 0 : size / 2, backgroundColor: palette.background300 },\n containerStyle,\n ]}\n >\n {conditionChaining(\n [Boolean(uri) && !loadFailure],\n [\n <Image\n onError={() => setLoadFailure(true)}\n source={{ uri }}\n resizeMode={'cover'}\n style={StyleSheet.absoluteFill}\n />,\n <Icon icon={'user'} size={size / 2} color={colors.onBackgroundReverse01} />,\n ],\n )}\n {muted && <MutedOverlay size={size} />}\n </View>\n );\n};\n\nconst MutedOverlay = ({ size }: { size: number }) => {\n const { palette } = useUIKitTheme();\n return (\n <View style={[styles.container, StyleSheet.absoluteFill]}>\n <View style={[StyleSheet.absoluteFill, { backgroundColor: palette.primary300, opacity: 0.5 }]} />\n <Icon color={palette.onBackgroundDark01} icon={'mute'} size={size * 0.72} />\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n alignItems: 'center',\n justifyContent: 'center',\n overflow: 'hidden',\n },\n});\n\nAvatar.Group = AvatarGroup;\nAvatar.Icon = AvatarIcon;\nexport default Avatar;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"names":["React","useState","StyleSheet","View","conditionChaining","Icon","Image","createStyleSheet","useUIKitTheme","AvatarGroup","AvatarIcon","Avatar","_ref","uri","square","muted","size","containerStyle","colors","palette","loadFailure","setLoadFailure","createElement","style","styles","container","width","height","borderRadius","backgroundColor","background300","Boolean","onError","source","resizeMode","absoluteFill","icon","color","onBackgroundReverse01","MutedOverlay","_ref2","primary300","opacity","onBackgroundDark01","alignItems","justifyContent","overflow","Group"],"sources":["index.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport { conditionChaining } from '@sendbird/uikit-utils';\n\nimport Icon from '../../components/Icon';\nimport Image from '../../components/Image';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\nimport AvatarGroup from './AvatarGroup';\nimport AvatarIcon from './AvatarIcon';\n\ntype SubComponents = {\n Group: typeof AvatarGroup;\n Icon: typeof AvatarIcon;\n};\ntype Props = {\n uri?: string;\n size?: number;\n square?: boolean;\n muted?: boolean;\n containerStyle?: StyleProp<ViewStyle>;\n};\nconst Avatar: ((props: Props) => JSX.Element) & SubComponents = ({\n uri,\n square,\n muted = false,\n size = 56,\n containerStyle,\n}) => {\n const { colors, palette } = useUIKitTheme();\n const [loadFailure, setLoadFailure] = useState(false);\n\n return (\n <View\n style={[\n styles.container,\n { width: size, height: size, borderRadius: square ? 0 : size / 2, backgroundColor: palette.background300 },\n containerStyle,\n ]}\n >\n {conditionChaining(\n [Boolean(uri) && !loadFailure],\n [\n <Image\n onError={() => setLoadFailure(true)}\n source={{ uri }}\n resizeMode={'cover'}\n style={StyleSheet.absoluteFill}\n />,\n <Icon icon={'user'} size={size / 2} color={colors.onBackgroundReverse01} />,\n ],\n )}\n {muted && <MutedOverlay size={size} />}\n </View>\n );\n};\n\nconst MutedOverlay = ({ size }: { size: number }) => {\n const { palette } = useUIKitTheme();\n return (\n <View style={[styles.container, StyleSheet.absoluteFill]}>\n <View style={[StyleSheet.absoluteFill, { backgroundColor: palette.primary300, opacity: 0.5 }]} />\n <Icon color={palette.onBackgroundDark01} icon={'mute'} size={size * 0.72} />\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n alignItems: 'center',\n justifyContent: 'center',\n overflow: 'hidden',\n },\n});\n\nAvatar.Group = AvatarGroup;\nAvatar.Icon = AvatarIcon;\nexport default Avatar;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAAoBC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AAErE,SAASC,iBAAiB,QAAQ,uBAAuB;AAEzD,OAAOC,IAAI,MAAM,uBAAuB;AACxC,OAAOC,KAAK,MAAM,wBAAwB;AAC1C,OAAOC,gBAAgB,MAAM,+BAA+B;AAC5D,OAAOC,aAAa,MAAM,2BAA2B;AACrD,OAAOC,WAAW,MAAM,eAAe;AACvC,OAAOC,UAAU,MAAM,cAAc;AAarC,MAAMC,MAAuD,GAAGC,IAAA,IAM1D;EAAA,IAN2D;IAC/DC,GAAG;IACHC,MAAM;IACNC,KAAK,GAAG,KAAK;IACbC,IAAI,GAAG,EAAE;IACTC;EACF,CAAC,GAAAL,IAAA;EACC,MAAM;IAAEM,MAAM;IAAEC;EAAQ,CAAC,GAAGX,aAAa,EAAE;EAC3C,MAAM,CAACY,WAAW,EAAEC,cAAc,CAAC,GAAGpB,QAAQ,C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eAAe,EAAEV,OAAO,CAACsB,UAAU;MAAEC,OAAO,EAAE;IAAI,CAAC;EAAE,EAAG,eACjG1C,KAAA,CAAAsB,aAAA,CAACjB,IAAI;IAACgC,KAAK,EAAElB,OAAO,CAACwB,kBAAmB;IAACP,IAAI,EAAE,MAAO;IAACpB,IAAI,EAAEA,IAAI,GAAG;EAAK,EAAG,CACvE;AAEX,CAAC;AAED,MAAMQ,MAAM,GAAGjB,gBAAgB,CAAC;EAC9BkB,SAAS,EAAE;IACTmB,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEFnC,MAAM,CAACoC,KAAK,GAAGtC,WAAW;AAC1BE,MAAM,CAACN,IAAI,GAAGK,UAAU;AACxB,eAAeC,MAAM"}
|
|
@@ -4,7 +4,6 @@ import { truncatedCount } from '@sendbird/uikit-utils';
|
|
|
4
4
|
import Text from '../../components/Text';
|
|
5
5
|
import createStyleSheet from '../../styles/createStyleSheet';
|
|
6
6
|
import useUIKitTheme from '../../theme/useUIKitTheme';
|
|
7
|
-
|
|
8
7
|
const Badge = _ref => {
|
|
9
8
|
let {
|
|
10
9
|
count,
|
|
@@ -27,7 +26,6 @@ const Badge = _ref => {
|
|
|
27
26
|
color: textColor ?? colors.ui.badge.default.none.text
|
|
28
27
|
}, truncatedCount(count, maxCount)));
|
|
29
28
|
};
|
|
30
|
-
|
|
31
29
|
const styles = createStyleSheet({
|
|
32
30
|
badgeDefault: {
|
|
33
31
|
paddingTop: Platform.select({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","View","truncatedCount","Text","createStyleSheet","useUIKitTheme","Badge","count","maxCount","badgeColor","textColor","style","size","colors","isSmall","styles","badgeSmall","badgeDefault","backgroundColor","ui","badge","default","none","background","badgeSmallPadding","badgeDefaultPadding","text","paddingTop","select","ios","android","minWidth","minHeight","borderRadius","alignItems","justifyContent","paddingHorizontal"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, StyleProp, View, ViewStyle } from 'react-native';\n\nimport { truncatedCount } from '@sendbird/uikit-utils';\n\nimport Text from '../../components/Text';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\n\ntype Props = {\n count: number;\n maxCount?: number;\n badgeColor?: string;\n textColor?: string;\n style?: StyleProp<ViewStyle>;\n size?: 'small' | 'default';\n};\n\nconst Badge = ({ count, maxCount, badgeColor, textColor, style, size = 'default' }: Props) => {\n const { colors } = useUIKitTheme();\n const isSmall = size === 'small';\n return (\n <View\n style={[\n isSmall ? styles.badgeSmall : styles.badgeDefault,\n { backgroundColor: badgeColor ?? colors.ui.badge.default.none.background },\n count >= 10 && (isSmall ? styles.badgeSmallPadding : styles.badgeDefaultPadding),\n style,\n ]}\n >\n <Text caption1 color={textColor ?? colors.ui.badge.default.none.text}>\n {truncatedCount(count, maxCount)}\n </Text>\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n badgeDefault: {\n paddingTop: Platform.select({ ios: 2, android: 2 }),\n minWidth: 20,\n minHeight: 20,\n borderRadius: 99,\n alignItems: 'center',\n justifyContent: 'center',\n },\n badgeDefaultPadding: {\n paddingHorizontal: 8,\n },\n badgeSmall: {\n paddingTop: Platform.select({ ios: 3, android: 2 }),\n minWidth: 16,\n minHeight: 16,\n borderRadius: 99,\n alignItems: 'center',\n justifyContent: 'center',\n },\n badgeSmallPadding: {\n paddingHorizontal: 4,\n },\n});\n\nexport default Badge;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"names":["React","Platform","View","truncatedCount","Text","createStyleSheet","useUIKitTheme","Badge","_ref","count","maxCount","badgeColor","textColor","style","size","colors","isSmall","createElement","styles","badgeSmall","badgeDefault","backgroundColor","ui","badge","default","none","background","badgeSmallPadding","badgeDefaultPadding","caption1","color","text","paddingTop","select","ios","android","minWidth","minHeight","borderRadius","alignItems","justifyContent","paddingHorizontal"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\nimport { Platform, StyleProp, View, ViewStyle } from 'react-native';\n\nimport { truncatedCount } from '@sendbird/uikit-utils';\n\nimport Text from '../../components/Text';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\n\ntype Props = {\n count: number;\n maxCount?: number;\n badgeColor?: string;\n textColor?: string;\n style?: StyleProp<ViewStyle>;\n size?: 'small' | 'default';\n};\n\nconst Badge = ({ count, maxCount, badgeColor, textColor, style, size = 'default' }: Props) => {\n const { colors } = useUIKitTheme();\n const isSmall = size === 'small';\n return (\n <View\n style={[\n isSmall ? styles.badgeSmall : styles.badgeDefault,\n { backgroundColor: badgeColor ?? colors.ui.badge.default.none.background },\n count >= 10 && (isSmall ? styles.badgeSmallPadding : styles.badgeDefaultPadding),\n style,\n ]}\n >\n <Text caption1 color={textColor ?? colors.ui.badge.default.none.text}>\n {truncatedCount(count, maxCount)}\n </Text>\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n badgeDefault: {\n paddingTop: Platform.select({ ios: 2, android: 2 }),\n minWidth: 20,\n minHeight: 20,\n borderRadius: 99,\n alignItems: 'center',\n justifyContent: 'center',\n },\n badgeDefaultPadding: {\n paddingHorizontal: 8,\n },\n badgeSmall: {\n paddingTop: Platform.select({ ios: 3, android: 2 }),\n minWidth: 16,\n minHeight: 16,\n borderRadius: 99,\n alignItems: 'center',\n justifyContent: 'center',\n },\n badgeSmallPadding: {\n paddingHorizontal: 4,\n },\n});\n\nexport default Badge;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAaC,IAAI,QAAmB,cAAc;AAEnE,SAASC,cAAc,QAAQ,uBAAuB;AAEtD,OAAOC,IAAI,MAAM,uBAAuB;AACxC,OAAOC,gBAAgB,MAAM,+BAA+B;AAC5D,OAAOC,aAAa,MAAM,2BAA2B;AAWrD,MAAMC,KAAK,GAAGC,IAAA,IAAgF;EAAA,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AG,EAAE,CAAC;MAAEC,OAAO,EAAE;IAAE,CAAC,CAAC;IACnDC,QAAQ,EAAE,EAAE;IACZC,SAAS,EAAE,EAAE;IACbC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDb,iBAAiB,EAAE;IACjBc,iBAAiB,EAAE;EACrB;AACF,CAAC,CAAC;AAEF,eAAelC,KAAK"}
|
|
@@ -4,7 +4,6 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
|
4
4
|
import Modal from '../../components/Modal';
|
|
5
5
|
import useHeaderStyle from '../../styles/useHeaderStyle';
|
|
6
6
|
import DialogSheet from '../Dialog/DialogSheet';
|
|
7
|
-
|
|
8
7
|
const BottomSheet = _ref => {
|
|
9
8
|
let {
|
|
10
9
|
onDismiss,
|
|
@@ -55,7 +54,6 @@ const BottomSheet = _ref => {
|
|
|
55
54
|
},
|
|
56
55
|
onPress: async () => {
|
|
57
56
|
await onHide();
|
|
58
|
-
|
|
59
57
|
try {
|
|
60
58
|
onPress();
|
|
61
59
|
} catch {}
|
|
@@ -63,6 +61,5 @@ const BottomSheet = _ref => {
|
|
|
63
61
|
}, /*#__PURE__*/React.createElement(DialogSheet.Item, props));
|
|
64
62
|
})));
|
|
65
63
|
};
|
|
66
|
-
|
|
67
64
|
export default BottomSheet;
|
|
68
65
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","TouchableOpacity","useWindowDimensions","useSafeAreaInsets","Modal","useHeaderStyle","DialogSheet","BottomSheet","onDismiss","onHide","visible","sheetItems","HeaderComponent","statusBarTranslucent","width","bottom","left","right","alignItems","justifyContent","paddingBottom","map","idx","onPress","props","title","paddingLeft","paddingRight"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\nimport { TouchableOpacity, useWindowDimensions } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport type Icon from '../../components/Icon';\nimport Modal from '../../components/Modal';\nimport useHeaderStyle from '../../styles/useHeaderStyle';\nimport DialogSheet from '../Dialog/DialogSheet';\n\ntype HeaderProps = { onClose: () => Promise<void> };\nexport type BottomSheetItem = {\n sheetItems: {\n icon?: keyof typeof Icon.Assets;\n iconColor?: string;\n title: string;\n titleColor?: string;\n onPress: () => void;\n }[];\n HeaderComponent?: (props: HeaderProps) => JSX.Element;\n};\ntype Props = {\n visible: boolean;\n onHide: () => Promise<void>;\n onError?: (error: unknown) => void;\n onDismiss?: () => void;\n} & BottomSheetItem;\nconst BottomSheet = ({ onDismiss, onHide, visible, sheetItems, HeaderComponent }: Props) => {\n const { statusBarTranslucent } = useHeaderStyle();\n const { width } = useWindowDimensions();\n const { bottom, left, right } = useSafeAreaInsets();\n return (\n <Modal\n type={'slide'}\n onClose={onHide}\n onDismiss={onDismiss}\n statusBarTranslucent={statusBarTranslucent}\n visible={visible}\n backgroundStyle={{ alignItems: 'center', justifyContent: 'flex-end' }}\n >\n <DialogSheet style={{ width, paddingBottom: bottom }}>\n {HeaderComponent && <HeaderComponent onClose={onHide} />}\n {sheetItems.map(({ onPress, ...props }, idx) => (\n <TouchableOpacity\n activeOpacity={0.75}\n key={props.title + idx}\n style={{ paddingLeft: left, paddingRight: right }}\n onPress={async () => {\n await onHide();\n try {\n onPress();\n } catch {}\n }}\n >\n <DialogSheet.Item {...props} />\n </TouchableOpacity>\n ))}\n </DialogSheet>\n </Modal>\n );\n};\n\nexport default BottomSheet;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"names":["React","TouchableOpacity","useWindowDimensions","useSafeAreaInsets","Modal","useHeaderStyle","DialogSheet","BottomSheet","_ref","onDismiss","onHide","visible","sheetItems","HeaderComponent","statusBarTranslucent","width","bottom","left","right","createElement","type","onClose","backgroundStyle","alignItems","justifyContent","style","paddingBottom","map","_ref2","idx","onPress","props","activeOpacity","key","title","paddingLeft","paddingRight","Item"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\nimport { TouchableOpacity, useWindowDimensions } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport type Icon from '../../components/Icon';\nimport Modal from '../../components/Modal';\nimport useHeaderStyle from '../../styles/useHeaderStyle';\nimport DialogSheet from '../Dialog/DialogSheet';\n\ntype HeaderProps = { onClose: () => Promise<void> };\nexport type BottomSheetItem = {\n sheetItems: {\n icon?: keyof typeof Icon.Assets;\n iconColor?: string;\n title: string;\n titleColor?: string;\n onPress: () => void;\n }[];\n HeaderComponent?: (props: HeaderProps) => JSX.Element;\n};\ntype Props = {\n visible: boolean;\n onHide: () => Promise<void>;\n onError?: (error: unknown) => void;\n onDismiss?: () => void;\n} & BottomSheetItem;\nconst BottomSheet = ({ onDismiss, onHide, visible, sheetItems, HeaderComponent }: Props) => {\n const { statusBarTranslucent } = useHeaderStyle();\n const { width } = useWindowDimensions();\n const { bottom, left, right } = useSafeAreaInsets();\n return (\n <Modal\n type={'slide'}\n onClose={onHide}\n onDismiss={onDismiss}\n statusBarTranslucent={statusBarTranslucent}\n visible={visible}\n backgroundStyle={{ alignItems: 'center', justifyContent: 'flex-end' }}\n >\n <DialogSheet style={{ width, paddingBottom: bottom }}>\n {HeaderComponent && <HeaderComponent onClose={onHide} />}\n {sheetItems.map(({ onPress, ...props }, idx) => (\n <TouchableOpacity\n activeOpacity={0.75}\n key={props.title + idx}\n style={{ paddingLeft: left, paddingRight: right }}\n onPress={async () => {\n await onHide();\n try {\n onPress();\n } catch {}\n }}\n >\n <DialogSheet.Item {...props} />\n </TouchableOpacity>\n ))}\n </DialogSheet>\n </Modal>\n );\n};\n\nexport default BottomSheet;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,EAAEC,mBAAmB,QAAQ,cAAc;AACpE,SAASC,iBAAiB,QAAQ,gCAAgC;AAGlE,OAAOC,KAAK,MAAM,wBAAwB;AAC1C,OAAOC,cAAc,MAAM,6BAA6B;AACxD,OAA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;QACX,CAAC,CAAC,MAAM,CAAC;MACX;IAAE,gBAEF9B,KAAA,CAAAmB,aAAA,CAACb,WAAW,CAAC+B,IAAI,EAAKN,KAAK,CAAI,CACd;EAAA,CACpB,CAAC,CACU,CACR;AAEZ,CAAC;AAED,eAAexB,WAAW"}
|
|
@@ -4,7 +4,6 @@ import Icon from '../../components/Icon';
|
|
|
4
4
|
import Text from '../../components/Text';
|
|
5
5
|
import createStyleSheet from '../../styles/createStyleSheet';
|
|
6
6
|
import useUIKitTheme from '../../theme/useUIKitTheme';
|
|
7
|
-
|
|
8
7
|
const Button = _ref => {
|
|
9
8
|
let {
|
|
10
9
|
icon,
|
|
@@ -19,14 +18,12 @@ const Button = _ref => {
|
|
|
19
18
|
const {
|
|
20
19
|
colors
|
|
21
20
|
} = useUIKitTheme();
|
|
22
|
-
|
|
23
21
|
const getStateColor = (pressed, disabled) => {
|
|
24
22
|
const stateColors = colors.ui.button[variant];
|
|
25
23
|
if (disabled) return stateColors.disabled;
|
|
26
24
|
if (pressed) return stateColors.pressed;
|
|
27
25
|
return stateColors.enabled;
|
|
28
26
|
};
|
|
29
|
-
|
|
30
27
|
return /*#__PURE__*/React.createElement(Pressable, {
|
|
31
28
|
disabled: disabled,
|
|
32
29
|
onPress: onPress,
|
|
@@ -56,7 +53,6 @@ const Button = _ref => {
|
|
|
56
53
|
}, children));
|
|
57
54
|
});
|
|
58
55
|
};
|
|
59
|
-
|
|
60
56
|
const styles = createStyleSheet({
|
|
61
57
|
container: {
|
|
62
58
|
flexDirection: 'row',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Pressable","Icon","Text","createStyleSheet","useUIKitTheme","Button","icon","variant","buttonColor","contentColor","disabled","onPress","style","children","colors","getStateColor","pressed","stateColors","ui","button","enabled","stateColor","backgroundColor","background","styles","container","content","text","flexDirection","padding","borderRadius","alignItems","justifyContent","marginVertical","marginRight"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\nimport { Pressable, StyleProp, ViewStyle } from 'react-native';\n\nimport Icon from '../../components/Icon';\nimport Text from '../../components/Text';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\n\ntype Props = React.PropsWithChildren<{\n style?: StyleProp<ViewStyle>;\n icon?: keyof typeof Icon.Assets;\n variant?: 'contained' | 'text';\n disabled?: boolean;\n onPress?: () => void;\n buttonColor?: string;\n contentColor?: string;\n}>;\nconst Button = ({\n icon,\n variant = 'contained',\n buttonColor,\n contentColor,\n disabled,\n onPress,\n style,\n children,\n}: Props) => {\n const { colors } = useUIKitTheme();\n\n const getStateColor = (pressed: boolean, disabled?: boolean) => {\n const stateColors = colors.ui.button[variant];\n if (disabled) return stateColors.disabled;\n if (pressed) return stateColors.pressed;\n return stateColors.enabled;\n };\n\n return (\n <Pressable\n disabled={disabled}\n onPress={onPress}\n style={({ pressed }) => {\n const stateColor = getStateColor(pressed, disabled);\n return [{ backgroundColor: buttonColor ?? stateColor.background }, styles.container, style];\n }}\n >\n {({ pressed }) => {\n const stateColor = getStateColor(pressed, disabled);\n\n return (\n <>\n {icon && (\n <Icon size={24} icon={icon} color={contentColor ?? stateColor.content} containerStyle={styles.icon} />\n )}\n <Text button color={contentColor ?? stateColor.content} style={styles.text}>\n {children}\n </Text>\n </>\n );\n }}\n </Pressable>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n flexDirection: 'row',\n padding: 8,\n borderRadius: 4,\n alignItems: 'center',\n justifyContent: 'center',\n },\n icon: { marginVertical: -4, marginRight: 8 },\n text: {},\n});\n\nexport default Button;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"names":["React","Pressable","Icon","Text","createStyleSheet","useUIKitTheme","Button","_ref","icon","variant","buttonColor","contentColor","disabled","onPress","style","children","colors","getStateColor","pressed","stateColors","ui","button","enabled","createElement","_ref2","stateColor","backgroundColor","background","styles","container","_ref3","Fragment","size","color","content","containerStyle","text","flexDirection","padding","borderRadius","alignItems","justifyContent","marginVertical","marginRight"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\nimport { Pressable, StyleProp, ViewStyle } from 'react-native';\n\nimport Icon from '../../components/Icon';\nimport Text from '../../components/Text';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\n\ntype Props = React.PropsWithChildren<{\n style?: StyleProp<ViewStyle>;\n icon?: keyof typeof Icon.Assets;\n variant?: 'contained' | 'text';\n disabled?: boolean;\n onPress?: () => void;\n buttonColor?: string;\n contentColor?: string;\n}>;\nconst Button = ({\n icon,\n variant = 'contained',\n buttonColor,\n contentColor,\n disabled,\n onPress,\n style,\n children,\n}: Props) => {\n const { colors } = useUIKitTheme();\n\n const getStateColor = (pressed: boolean, disabled?: boolean) => {\n const stateColors = colors.ui.button[variant];\n if (disabled) return stateColors.disabled;\n if (pressed) return stateColors.pressed;\n return stateColors.enabled;\n };\n\n return (\n <Pressable\n disabled={disabled}\n onPress={onPress}\n style={({ pressed }) => {\n const stateColor = getStateColor(pressed, disabled);\n return [{ backgroundColor: buttonColor ?? stateColor.background }, styles.container, style];\n }}\n >\n {({ pressed }) => {\n const stateColor = getStateColor(pressed, disabled);\n\n return (\n <>\n {icon && (\n <Icon size={24} icon={icon} color={contentColor ?? stateColor.content} containerStyle={styles.icon} />\n )}\n <Text button color={contentColor ?? stateColor.content} style={styles.text}>\n {children}\n </Text>\n </>\n );\n }}\n </Pressable>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n flexDirection: 'row',\n padding: 8,\n borderRadius: 4,\n alignItems: 'center',\n justifyContent: 'center',\n },\n icon: { marginVertical: -4, marginRight: 8 },\n text: {},\n});\n\nexport default Button;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAA8B,cAAc;AAE9D,OAAOC,IAAI,MAAM,uBAAuB;AACxC,OAAOC,IAAI,MAAM,uBAAuB;AACxC,OAAOC,gBAAgB,MAAM,+BAA+B;AAC5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yB,KAAK,EAAEtB,YAAY,IAAIc,UAAU,CAACS,OAAQ;MAACC,cAAc,EAAEP,MAAM,CAACpB;IAAK,EACpG,eACDR,KAAA,CAAAuB,aAAA,CAACpB,IAAI;MAACkB,MAAM;MAACY,KAAK,EAAEtB,YAAY,IAAIc,UAAU,CAACS,OAAQ;MAACpB,KAAK,EAAEc,MAAM,CAACQ;IAAK,GACxErB,QAAQ,CACJ,CACN;EAEP,CAAC,CACS;AAEhB,CAAC;AAED,MAAMa,MAAM,GAAGxB,gBAAgB,CAAC;EAC9ByB,SAAS,EAAE;IACTQ,aAAa,EAAE,KAAK;IACpBC,OAAO,EAAE,CAAC;IACVC,YAAY,EAAE,CAAC;IACfC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDjC,IAAI,EAAE;IAAEkC,cAAc,EAAE,CAAC,CAAC;IAAEC,WAAW,EAAE;EAAE,CAAC;EAC5CP,IAAI,EAAE,CAAC;AACT,CAAC,CAAC;AAEF,eAAe9B,MAAM"}
|
|
@@ -3,7 +3,6 @@ import { View } from 'react-native';
|
|
|
3
3
|
import Text from '../../components/Text';
|
|
4
4
|
import createStyleSheet from '../../styles/createStyleSheet';
|
|
5
5
|
import useUIKitTheme from '../../theme/useUIKitTheme';
|
|
6
|
-
|
|
7
6
|
const ChannelFrozenBanner = _ref => {
|
|
8
7
|
let {
|
|
9
8
|
text = 'Channel is frozen',
|
|
@@ -24,7 +23,6 @@ const ChannelFrozenBanner = _ref => {
|
|
|
24
23
|
color: textColor ?? palette.onBackgroundLight01
|
|
25
24
|
}, text));
|
|
26
25
|
};
|
|
27
|
-
|
|
28
26
|
const styles = createStyleSheet({
|
|
29
27
|
container: {
|
|
30
28
|
alignItems: 'center',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","createStyleSheet","useUIKitTheme","ChannelFrozenBanner","text","backgroundColor","textColor","style","palette","styles","container","information","onBackgroundLight01","alignItems","justifyContent","paddingVertical","borderRadius"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\n\nimport Text from '../../components/Text';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\n\ntype Props = {\n style?: StyleProp<ViewStyle>;\n text?: string;\n textColor?: string;\n backgroundColor?: string;\n};\n\nconst ChannelFrozenBanner = ({ text = 'Channel is frozen', backgroundColor, textColor, style }: Props) => {\n const { palette } = useUIKitTheme();\n\n return (\n <View\n pointerEvents={'none'}\n style={[styles.container, { backgroundColor: backgroundColor ?? palette.information }, style]}\n >\n <Text caption2 color={textColor ?? palette.onBackgroundLight01}>\n {text}\n </Text>\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n alignItems: 'center',\n justifyContent: 'center',\n paddingVertical: 6,\n borderRadius: 4,\n },\n});\n\nexport default ChannelFrozenBanner;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"names":["React","View","Text","createStyleSheet","useUIKitTheme","ChannelFrozenBanner","_ref","text","backgroundColor","textColor","style","palette","createElement","pointerEvents","styles","container","information","caption2","color","onBackgroundLight01","alignItems","justifyContent","paddingVertical","borderRadius"],"sources":["index.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\n\nimport Text from '../../components/Text';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\n\ntype Props = {\n style?: StyleProp<ViewStyle>;\n text?: string;\n textColor?: string;\n backgroundColor?: string;\n};\n\nconst ChannelFrozenBanner = ({ text = 'Channel is frozen', backgroundColor, textColor, style }: Props) => {\n const { palette } = useUIKitTheme();\n\n return (\n <View\n pointerEvents={'none'}\n style={[styles.container, { backgroundColor: backgroundColor ?? palette.information }, style]}\n >\n <Text caption2 color={textColor ?? palette.onBackgroundLight01}>\n {text}\n </Text>\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n alignItems: 'center',\n justifyContent: 'center',\n paddingVertical: 6,\n borderRadius: 4,\n },\n});\n\nexport default ChannelFrozenBanner;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAoBC,IAAI,QAAmB,cAAc;AAEzD,OAAOC,IAAI,MAAM,uBAAuB;AACxC,OAAOC,gBAAgB,MAAM,+BAA+B;AAC5D,OAAOC,aAAa,MAAM,2BAA2B;AASrD,MAAMC,mBAAmB,GAAGC,IAAA,IAA8E;EAAA,IAA7E;IAAEC,IAAI,GAAG,mBAAmB;IAAEC,eAAe;IAAEC,SAAS;IAAEC;EAAa,CAAC,GAAAJ,IAAA;EACnG,MAAM;IAAEK;EAAQ,CAAC,GAAGP,aAAa,EAAE;EAEnC,oBACEJ,KAAA,CAAAY,aAAA,CAACX,IAAI;IACHY,aAAa,EAAE,MAAO;IACtBH,KAAK,EAAE,CAACI,MAAM,CAACC,SAAS,EAAE;MAAEP,eAAe,EAAEA,eAAe,IAAIG,OAAO,CAACK;IAAY,CAAC,EAAEN,KAAK;EAAE,gBAE9FV,KAAA,CAAAY,aAAA,CAACV,IAAI;IAACe,QAAQ;IAACC,KAAK,EAAET,SAAS,IAAIE,OAAO,CAACQ;EAAoB,GAC5DZ,IAAI,CACA,CACF;AAEX,CAAC;AAED,MAAMO,MAAM,GAAGX,gBAAgB,CAAC;EAC9BY,SAAS,EAAE;IACTK,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,eAAe,EAAE,CAAC;IAClBC,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAEF,eAAelB,mBAAmB"}
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
import createStyleSheet from '../../styles/createStyleSheet';
|
|
4
4
|
import useUIKitTheme from '../../theme/useUIKitTheme';
|
|
5
|
-
|
|
6
5
|
const DialogBox = _ref => {
|
|
7
6
|
let {
|
|
8
7
|
style,
|
|
@@ -17,7 +16,6 @@ const DialogBox = _ref => {
|
|
|
17
16
|
}, style]
|
|
18
17
|
}, children);
|
|
19
18
|
};
|
|
20
|
-
|
|
21
19
|
const styles = createStyleSheet({
|
|
22
20
|
container: {
|
|
23
21
|
width: 280,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","createStyleSheet","useUIKitTheme","DialogBox","style","children","colors","styles","container","backgroundColor","ui","dialog","default","none","background","width","borderRadius"],"sources":["DialogBox.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\n\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\n\ntype Props = React.PropsWithChildren<{\n style?: StyleProp<ViewStyle>;\n}>;\nconst DialogBox = ({ style, children }: Props) => {\n const { colors } = useUIKitTheme();\n return (\n <View style={[styles.container, { backgroundColor: colors.ui.dialog.default.none.background }, style]}>\n {children}\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n width: 280,\n borderRadius: 4,\n },\n});\n\nexport default DialogBox;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"names":["React","View","createStyleSheet","useUIKitTheme","DialogBox","_ref","style","children","colors","createElement","styles","container","backgroundColor","ui","dialog","default","none","background","width","borderRadius"],"sources":["DialogBox.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\n\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\n\ntype Props = React.PropsWithChildren<{\n style?: StyleProp<ViewStyle>;\n}>;\nconst DialogBox = ({ style, children }: Props) => {\n const { colors } = useUIKitTheme();\n return (\n <View style={[styles.container, { backgroundColor: colors.ui.dialog.default.none.background }, style]}>\n {children}\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n width: 280,\n borderRadius: 4,\n },\n});\n\nexport default DialogBox;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAoBC,IAAI,QAAmB,cAAc;AAEzD,OAAOC,gBAAgB,MAAM,+BAA+B;AAC5D,OAAOC,aAAa,MAAM,2BAA2B;AAKrD,MAAMC,SAAS,GAAGC,IAAA,IAAgC;EAAA,IAA/B;IAAEC,KAAK;IAAEC;EAAgB,CAAC,GAAAF,IAAA;EAC3C,MAAM;IAAEG;EAAO,CAAC,GAAGL,aAAa,EAAE;EAClC,oBACEH,KAAA,CAAAS,aAAA,CAACR,IAAI;IAACK,KAAK,EAAE,CAACI,MAAM,CAACC,SAAS,EAAE;MAAEC,eAAe,EAAEJ,MAAM,CAACK,EAAE,CAACC,MAAM,CAACC,OAAO,CAACC,IAAI,CAACC;IAAW,CAAC,EAAEX,KAAK;EAAE,GACnGC,QAAQ,CACJ;AAEX,CAAC;AAED,MAAMG,MAAM,GAAGR,gBAAgB,CAAC;EAC9BS,SAAS,EAAE;IACTO,KAAK,EAAE,GAAG;IACVC,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAEF,eAAef,SAAS"}
|
|
@@ -4,7 +4,6 @@ import Icon from '../../components/Icon';
|
|
|
4
4
|
import Text from '../../components/Text';
|
|
5
5
|
import createStyleSheet from '../../styles/createStyleSheet';
|
|
6
6
|
import useUIKitTheme from '../../theme/useUIKitTheme';
|
|
7
|
-
|
|
8
7
|
const DialogSheet = _ref => {
|
|
9
8
|
let {
|
|
10
9
|
style,
|
|
@@ -19,7 +18,6 @@ const DialogSheet = _ref => {
|
|
|
19
18
|
}, style]
|
|
20
19
|
}, children);
|
|
21
20
|
};
|
|
22
|
-
|
|
23
21
|
const SheetItem = _ref2 => {
|
|
24
22
|
let {
|
|
25
23
|
icon,
|
|
@@ -45,7 +43,6 @@ const SheetItem = _ref2 => {
|
|
|
45
43
|
style: styles.sheetItemText
|
|
46
44
|
}, title));
|
|
47
45
|
};
|
|
48
|
-
|
|
49
46
|
const styles = createStyleSheet({
|
|
50
47
|
container: {
|
|
51
48
|
overflow: 'hidden',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Icon","Text","createStyleSheet","useUIKitTheme","DialogSheet","style","children","colors","styles","container","backgroundColor","ui","dialog","default","none","background","SheetItem","icon","title","iconColor","titleColor","sheetItemContainer","highlight","sheetItemIcon","text","sheetItemText","overflow","flexDirection","width","borderTopLeftRadius","borderTopRightRadius","alignItems","height","marginLeft","flex","marginHorizontal","Item"],"sources":["DialogSheet.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\n\nimport Icon from '../../components/Icon';\nimport Text from '../../components/Text';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\n\ntype Props = React.PropsWithChildren<{\n style?: StyleProp<ViewStyle>;\n}>;\nconst DialogSheet: ((props: Props) => JSX.Element) & { Item: typeof SheetItem } = ({ style, children }) => {\n const { colors } = useUIKitTheme();\n return (\n <View style={[styles.container, { backgroundColor: colors.ui.dialog.default.none.background }, style]}>\n {children}\n </View>\n );\n};\n\nexport type SheetItemProps = {\n icon?: keyof typeof Icon.Assets;\n iconColor?: string;\n title: string;\n titleColor?: string;\n};\nconst SheetItem = ({ icon, title, iconColor, titleColor }: SheetItemProps) => {\n const { colors } = useUIKitTheme();\n return (\n <View style={[styles.sheetItemContainer, { backgroundColor: colors.ui.dialog.default.none.background }]}>\n {icon && (\n <Icon\n icon={icon}\n color={iconColor ?? colors.ui.dialog.default.none.highlight}\n containerStyle={styles.sheetItemIcon}\n />\n )}\n <Text\n subtitle1\n numberOfLines={1}\n color={titleColor ?? colors.ui.dialog.default.none.text}\n style={styles.sheetItemText}\n >\n {title}\n </Text>\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n overflow: 'hidden',\n flexDirection: 'column',\n width: '100%',\n borderTopLeftRadius: 8,\n borderTopRightRadius: 8,\n },\n sheetItemContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n height: 48,\n },\n sheetItemIcon: {\n marginLeft: 16,\n },\n sheetItemText: {\n flex: 1,\n marginHorizontal: 24,\n },\n});\n\nDialogSheet.Item = SheetItem;\nexport default DialogSheet;\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"names":["React","View","Icon","Text","createStyleSheet","useUIKitTheme","DialogSheet","_ref","style","children","colors","createElement","styles","container","backgroundColor","ui","dialog","default","none","background","SheetItem","_ref2","icon","title","iconColor","titleColor","sheetItemContainer","color","highlight","containerStyle","sheetItemIcon","subtitle1","numberOfLines","text","sheetItemText","overflow","flexDirection","width","borderTopLeftRadius","borderTopRightRadius","alignItems","height","marginLeft","flex","marginHorizontal","Item"],"sources":["DialogSheet.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleProp, View, ViewStyle } from 'react-native';\n\nimport Icon from '../../components/Icon';\nimport Text from '../../components/Text';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\n\ntype Props = React.PropsWithChildren<{\n style?: StyleProp<ViewStyle>;\n}>;\nconst DialogSheet: ((props: Props) => JSX.Element) & { Item: typeof SheetItem } = ({ style, children }) => {\n const { colors } = useUIKitTheme();\n return (\n <View style={[styles.container, { backgroundColor: colors.ui.dialog.default.none.background }, style]}>\n {children}\n </View>\n );\n};\n\nexport type SheetItemProps = {\n icon?: keyof typeof Icon.Assets;\n iconColor?: string;\n title: string;\n titleColor?: string;\n};\nconst SheetItem = ({ icon, title, iconColor, titleColor }: SheetItemProps) => {\n const { colors } = useUIKitTheme();\n return (\n <View style={[styles.sheetItemContainer, { backgroundColor: colors.ui.dialog.default.none.background }]}>\n {icon && (\n <Icon\n icon={icon}\n color={iconColor ?? colors.ui.dialog.default.none.highlight}\n containerStyle={styles.sheetItemIcon}\n />\n )}\n <Text\n subtitle1\n numberOfLines={1}\n color={titleColor ?? colors.ui.dialog.default.none.text}\n style={styles.sheetItemText}\n >\n {title}\n </Text>\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n overflow: 'hidden',\n flexDirection: 'column',\n width: '100%',\n borderTopLeftRadius: 8,\n borderTopRightRadius: 8,\n },\n sheetItemContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n height: 48,\n },\n sheetItemIcon: {\n marginLeft: 16,\n },\n sheetItemText: {\n flex: 1,\n marginHorizontal: 24,\n },\n});\n\nDialogSheet.Item = SheetItem;\nexport default DialogSheet;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAoBC,IAAI,QAAmB,cAAc;AAEzD,OAAOC,IAAI,MAAM,uBAAuB;AACxC,OAAOC,IAAI,MAAM,uBAAuB;AACxC,OAAOC,gBAAgB,MAAM,+BAA+B;AAC5D,OAAOC,aAAa,MAAM,2BAA2B;AAKrD,MAAMC,WAAyE,GAAGC,IAAA,IAAyB;EAAA,IAAxB;IAAEC,KAAK;IAAEC;EAAS,CAAC,GAAAF,IAAA;EACpG,MAAM;IAAEG;EAAO,CAAC,GAAGL,aAAa,EAAE;EAClC,oBACEL,KAAA,CAAAW,aAAA,CAACV,IAAI;IAACO,KAAK,EAAE,CAACI,MAAM,CAACC,SAAS,EAAE;MAAEC,eAAe,EAAEJ,MAAM,CAACK,EAAE,CAACC,MAAM,CAACC,OAAO,CAACC,IAAI,CAACC;IAAW,CAAC,EAAEX,KAAK;EAAE,GACnGC,QAAQ,CACJ;AAEX,CAAC;AAQD,MAAMW,SAAS,GAAGC,KAAA,IAA4D;EAAA,IAA3D;IAAEC,IAAI;IAAEC,KAAK;IAAEC,SAAS;IAAEC;EAA2B,CAAC,GAAAJ,KAAA;EACvE,MAAM;IAAEX;EAAO,CAAC,GAAGL,aAAa,EAAE;EAClC,oBACEL,KAAA,CAAAW,aAAA,CAACV,IAAI;IAACO,KAAK,EAAE,CAACI,MAAM,CAACc,kBAAkB,EAAE;MAAEZ,eAAe,EAAEJ,MAAM,CAACK,EAAE,CAACC,MAAM,CAACC,OAAO,CAACC,IAAI,CAACC;IAAW,CAAC;EAAE,GACrGG,IAAI,iBACHtB,KAAA,CAAAW,aAAA,CAACT,IAAI;IACHoB,IAAI,EAAEA,IAAK;IACXK,KAAK,EAAEH,SAAS,IAAId,MAAM,CAACK,EAAE,CAACC,MAAM,CAACC,OAAO,CAACC,IAAI,CAACU,SAAU;IAC5DC,cAAc,EAAEjB,MAAM,CAACkB;EAAc,EAExC,eACD9B,KAAA,CAAAW,aAAA,CAACR,IAAI;IACH4B,SAAS;IACTC,aAAa,EAAE,CAAE;IACjBL,KAAK,EAAEF,UAAU,IAAIf,MAAM,CAACK,EAAE,CAACC,MAAM,CAACC,OAAO,CAACC,IAAI,CAACe,IAAK;IACxDzB,KAAK,EAAEI,MAAM,CAACsB;EAAc,GAE3BX,KAAK,CACD,CACF;AAEX,CAAC;AAED,MAAMX,MAAM,GAAGR,gBAAgB,CAAC;EAC9BS,SAAS,EAAE;IACTsB,QAAQ,EAAE,QAAQ;IAClBC,aAAa,EAAE,QAAQ;IACvBC,KAAK,EAAE,MAAM;IACbC,mBAAmB,EAAE,CAAC;IACtBC,oBAAoB,EAAE;EACxB,CAAC;EACDb,kBAAkB,EAAE;IAClBU,aAAa,EAAE,KAAK;IACpBI,UAAU,EAAE,QAAQ;IACpBC,MAAM,EAAE;EACV,CAAC;EACDX,aAAa,EAAE;IACbY,UAAU,EAAE;EACd,CAAC;EACDR,aAAa,EAAE;IACbS,IAAI,EAAE,CAAC;IACPC,gBAAgB,EAAE;EACpB;AACF,CAAC,CAAC;AAEFtC,WAAW,CAACuC,IAAI,GAAGzB,SAAS;AAC5B,eAAed,WAAW"}
|
|
@@ -11,7 +11,6 @@ const BottomSheetContext = /*#__PURE__*/React.createContext(null);
|
|
|
11
11
|
const DISMISS_TIMEOUT = 3000;
|
|
12
12
|
export const DialogProvider = _ref => {
|
|
13
13
|
var _workingDialogJob$cur, _workingDialogJob$cur2, _defaultLabels$alert, _workingDialogJob$cur3, _defaultLabels$prompt, _defaultLabels$prompt2, _defaultLabels$prompt3, _workingDialogJob$cur4;
|
|
14
|
-
|
|
15
14
|
let {
|
|
16
15
|
defaultLabels,
|
|
17
16
|
children
|
|
@@ -32,9 +31,7 @@ export const DialogProvider = _ref => {
|
|
|
32
31
|
const dialogQueue = useRef([]);
|
|
33
32
|
const workingDialogJob = useRef();
|
|
34
33
|
const visibleState = useRef(false);
|
|
35
|
-
|
|
36
34
|
const isProcessing = () => Boolean(workingDialogJob.current);
|
|
37
|
-
|
|
38
35
|
const updateToShow = useCallback(() => {
|
|
39
36
|
visibleState.current = true;
|
|
40
37
|
render();
|
|
@@ -49,7 +46,6 @@ export const DialogProvider = _ref => {
|
|
|
49
46
|
const consumeQueue = useCallback(() => {
|
|
50
47
|
completeDismiss();
|
|
51
48
|
const job = dialogQueue.current.shift();
|
|
52
|
-
|
|
53
49
|
if (job) {
|
|
54
50
|
workingDialogJob.current = job;
|
|
55
51
|
updateToShow();
|
|
@@ -57,7 +53,6 @@ export const DialogProvider = _ref => {
|
|
|
57
53
|
workingDialogJob.current = undefined;
|
|
58
54
|
}
|
|
59
55
|
}, []);
|
|
60
|
-
|
|
61
56
|
const createJob = type => props => {
|
|
62
57
|
const jobItem = {
|
|
63
58
|
type,
|
|
@@ -68,7 +63,6 @@ export const DialogProvider = _ref => {
|
|
|
68
63
|
updateToShow();
|
|
69
64
|
}
|
|
70
65
|
};
|
|
71
|
-
|
|
72
66
|
const alert = useCallback(createJob('Alert'), []);
|
|
73
67
|
const openMenu = useCallback(createJob('ActionMenu'), []);
|
|
74
68
|
const openPrompt = useCallback(createJob('Prompt'), []);
|