@bigbinary/neetoui-rn 0.0.247 → 0.0.249
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/assets/icons/attachment.svg +3 -0
- package/assets/icons/canned-response.svg +5 -0
- package/assets/icons/expand.svg +5 -0
- package/assets/icons/forward.svg +3 -0
- package/assets/icons/minimize.svg +6 -0
- package/assets/icons/note.svg +4 -0
- package/assets/icons/reply.svg +5 -0
- package/index.d.ts +28 -0
- package/lib/components/Button.js +1 -1
- package/lib/components/ChatInput/AttachmentsView.js +1 -0
- package/lib/components/ChatInput/Badge.js +1 -0
- package/lib/components/ChatInput/ChatInput.js +1 -0
- package/lib/components/ChatInput/EmailFields.js +1 -0
- package/lib/components/ChatInput/IconButton.js +1 -0
- package/lib/components/InputEmailChip.js +1 -1
- package/lib/components/LineLoader.js +1 -0
- package/lib/components/Popover.js +1 -1
- package/lib/components/index.js +1 -1
- package/lib/theme/index.js +1 -1
- package/package.json +1 -1
- package/src/components/Button.jsx +7 -3
- package/src/components/ChatInput/AttachmentsView.jsx +51 -0
- package/src/components/ChatInput/Badge.jsx +24 -0
- package/src/components/ChatInput/ChatInput.jsx +500 -0
- package/src/components/ChatInput/EmailFields.jsx +122 -0
- package/src/components/ChatInput/IconButton.jsx +22 -0
- package/src/components/InputEmailChip.jsx +14 -5
- package/src/components/LineLoader.jsx +46 -0
- package/src/components/Popover.jsx +37 -20
- package/src/components/index.js +2 -0
- package/src/theme/index.js +1 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import PropTypes from "prop-types";
|
|
4
|
+
import ContentLoader, { Rect } from "react-content-loader/native";
|
|
5
|
+
import { moderateScale } from "react-native-size-matters";
|
|
6
|
+
|
|
7
|
+
import { theme } from "../theme";
|
|
8
|
+
|
|
9
|
+
export const LineLoader = ({
|
|
10
|
+
isLoading,
|
|
11
|
+
backgroundColor = theme.colors.background.primary,
|
|
12
|
+
foregroundColor = theme.colors.background.base,
|
|
13
|
+
height = moderateScale(1.5),
|
|
14
|
+
}) => (
|
|
15
|
+
<ContentLoader
|
|
16
|
+
animate={isLoading}
|
|
17
|
+
backgroundColor={backgroundColor}
|
|
18
|
+
foregroundColor={foregroundColor}
|
|
19
|
+
height={height}
|
|
20
|
+
interval={0}
|
|
21
|
+
key={isLoading}
|
|
22
|
+
speed={1}
|
|
23
|
+
width="100%"
|
|
24
|
+
>
|
|
25
|
+
<Rect height={height} width="100%" x={0} y={0} />
|
|
26
|
+
</ContentLoader>
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
LineLoader.propTypes = {
|
|
30
|
+
/**
|
|
31
|
+
* Shows loader when true.
|
|
32
|
+
*/
|
|
33
|
+
isLoading: PropTypes.bool,
|
|
34
|
+
/**
|
|
35
|
+
* Custom background color of loader.
|
|
36
|
+
*/
|
|
37
|
+
backgroundColor: PropTypes.string,
|
|
38
|
+
/**
|
|
39
|
+
* Custom foreground color of loader.
|
|
40
|
+
*/
|
|
41
|
+
foregroundColor: PropTypes.string,
|
|
42
|
+
/**
|
|
43
|
+
* Height of loader.
|
|
44
|
+
*/
|
|
45
|
+
height: PropTypes.number,
|
|
46
|
+
};
|
|
@@ -7,7 +7,7 @@ import { moderateScale } from "react-native-size-matters";
|
|
|
7
7
|
import styled from "styled-components/native";
|
|
8
8
|
import { flexbox, space, border, color, layout } from "styled-system";
|
|
9
9
|
|
|
10
|
-
import { Typography } from "@components";
|
|
10
|
+
import { Typography, Divider } from "@components";
|
|
11
11
|
|
|
12
12
|
export const TouchableOpacity = styled.TouchableOpacity`
|
|
13
13
|
${space}
|
|
@@ -17,32 +17,45 @@ export const TouchableOpacity = styled.TouchableOpacity`
|
|
|
17
17
|
${layout}
|
|
18
18
|
`;
|
|
19
19
|
|
|
20
|
-
const PopOverItem = ({
|
|
20
|
+
const PopOverItem = ({
|
|
21
|
+
item,
|
|
22
|
+
onPress,
|
|
23
|
+
fontFamily,
|
|
24
|
+
fontSize,
|
|
25
|
+
shouldShowDivider,
|
|
26
|
+
}) => {
|
|
21
27
|
const { Icon, label, labelProps } = item;
|
|
22
28
|
|
|
23
29
|
return (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<Typography
|
|
33
|
-
fontColor="font.primary"
|
|
34
|
-
fontFamily={fontFamily}
|
|
35
|
-
fontSize={fontSize}
|
|
36
|
-
px={moderateScale(2)}
|
|
37
|
-
{...labelProps}
|
|
30
|
+
<>
|
|
31
|
+
<TouchableOpacity
|
|
32
|
+
alignItems="center"
|
|
33
|
+
flexDirection="row"
|
|
34
|
+
p={moderateScale(2)}
|
|
35
|
+
px={moderateScale(8)}
|
|
36
|
+
py={moderateScale(8)}
|
|
37
|
+
onPress={onPress}
|
|
38
38
|
>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
<Icon />
|
|
40
|
+
<Typography
|
|
41
|
+
fontColor="font.primary"
|
|
42
|
+
fontFamily={fontFamily}
|
|
43
|
+
fontSize={fontSize}
|
|
44
|
+
px={moderateScale(2)}
|
|
45
|
+
{...labelProps}
|
|
46
|
+
>
|
|
47
|
+
{label}
|
|
48
|
+
</Typography>
|
|
49
|
+
</TouchableOpacity>
|
|
50
|
+
{shouldShowDivider && (
|
|
51
|
+
<Divider backgroundColor="background.grey200" mx={moderateScale(8)} />
|
|
52
|
+
)}
|
|
53
|
+
</>
|
|
42
54
|
);
|
|
43
55
|
};
|
|
44
56
|
|
|
45
57
|
PopOverItem.propTypes = {
|
|
58
|
+
shouldShowDivider: PropTypes.bool,
|
|
46
59
|
item: PropTypes.object,
|
|
47
60
|
onPress: PropTypes.func,
|
|
48
61
|
fontFamily: PropTypes.string,
|
|
@@ -171,6 +184,7 @@ export const Popover = ({
|
|
|
171
184
|
fontSize={fontSize}
|
|
172
185
|
item={item}
|
|
173
186
|
key={index}
|
|
187
|
+
shouldShowDivider={index !== data.length - 1}
|
|
174
188
|
onPress={() => {
|
|
175
189
|
popoverRef?.current?.setState({ isVisible: false });
|
|
176
190
|
onPressItemRef.current = item.onPress;
|
|
@@ -201,5 +215,8 @@ Popover.propTypes = {
|
|
|
201
215
|
};
|
|
202
216
|
|
|
203
217
|
const styles = StyleSheet.create({
|
|
204
|
-
popoverStyle: {
|
|
218
|
+
popoverStyle: {
|
|
219
|
+
borderRadius: moderateScale(10),
|
|
220
|
+
padding: moderateScale(5),
|
|
221
|
+
},
|
|
205
222
|
});
|
package/src/components/index.js
CHANGED
|
@@ -37,5 +37,7 @@ export { BottomTabBar } from "./BottomTabBar";
|
|
|
37
37
|
export { AnimatedImage } from "./AnimatedImage";
|
|
38
38
|
export { NotificationPreferenceList } from "./NotificationPreferenceList";
|
|
39
39
|
export { OrganizationItem } from "./OrganizationItem";
|
|
40
|
+
export { ChatInput } from "./ChatInput/ChatInput";
|
|
40
41
|
export { Loader } from "./Loader";
|
|
41
42
|
export { InputEmailChip } from "./InputEmailChip";
|
|
43
|
+
export { LineLoader } from "./LineLoader";
|