@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.
@@ -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 = ({ item, onPress, fontFamily, fontSize }) => {
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
- <TouchableOpacity
25
- alignItems="center"
26
- flexDirection="row"
27
- p={moderateScale(2)}
28
- px={moderateScale(3)}
29
- onPress={onPress}
30
- >
31
- <Icon />
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
- {label}
40
- </Typography>
41
- </TouchableOpacity>
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: { borderRadius: moderateScale(15), padding: moderateScale(5) },
218
+ popoverStyle: {
219
+ borderRadius: moderateScale(10),
220
+ padding: moderateScale(5),
221
+ },
205
222
  });
@@ -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";
@@ -64,6 +64,7 @@ const colors = {
64
64
  parentView: "#ffffff",
65
65
  primary: "#ffffff",
66
66
  secondary: "#F6F6FA",
67
+ oldLace: "#FDF6E5",
67
68
  ...defaultColors,
68
69
  ...greyVariants,
69
70
  ...lightBlueVariants,