@bigbinary/neetoui-rn 0.0.268 → 0.0.270
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/package.json +2 -3
- package/src/components/Accordion.jsx +0 -266
- package/src/components/ActionIcon.jsx +0 -76
- package/src/components/Alert.jsx +0 -262
- package/src/components/AnimatedImage.jsx +0 -140
- package/src/components/Avatar.jsx +0 -144
- package/src/components/Badge.jsx +0 -97
- package/src/components/BottomSheet.jsx +0 -487
- package/src/components/BottomTabBar.jsx +0 -232
- package/src/components/Button.jsx +0 -275
- package/src/components/ButtonGroup.jsx +0 -120
- package/src/components/Calendar.jsx +0 -128
- package/src/components/Card.jsx +0 -90
- package/src/components/Carousel.jsx +0 -116
- package/src/components/ChatInput/AttachmentsView.jsx +0 -51
- package/src/components/ChatInput/Badge.jsx +0 -24
- package/src/components/ChatInput/ChatInput.jsx +0 -564
- package/src/components/ChatInput/EmailFields.jsx +0 -122
- package/src/components/ChatInput/IconButton.jsx +0 -34
- package/src/components/ChatInput/MentionsInputWrapper.jsx +0 -155
- package/src/components/CheckBox.jsx +0 -150
- package/src/components/Chip.jsx +0 -180
- package/src/components/Container.jsx +0 -31
- package/src/components/Divider.jsx +0 -79
- package/src/components/FAB.jsx +0 -113
- package/src/components/FlashList.jsx +0 -189
- package/src/components/FlatList.js +0 -10
- package/src/components/Input.jsx +0 -357
- package/src/components/InputEmailChip.jsx +0 -246
- package/src/components/LineLoader.jsx +0 -46
- package/src/components/ListItem.jsx +0 -68
- package/src/components/Loader.jsx +0 -122
- package/src/components/MultiSelect.jsx +0 -631
- package/src/components/NotificationIcon.jsx +0 -38
- package/src/components/NotificationPreferenceList.jsx +0 -208
- package/src/components/OnBoarding.jsx +0 -134
- package/src/components/OrganizationItem.jsx +0 -110
- package/src/components/OtpInputs.jsx +0 -194
- package/src/components/ParentView.jsx +0 -139
- package/src/components/Popover.jsx +0 -221
- package/src/components/RadioButton.jsx +0 -155
- package/src/components/RichTextEditor.jsx +0 -163
- package/src/components/Ripple.jsx +0 -281
- package/src/components/ScrollView.js +0 -14
- package/src/components/SearchBar.jsx +0 -207
- package/src/components/SegmentedTopBar/Indicator.jsx +0 -77
- package/src/components/SegmentedTopBar/Tab.jsx +0 -37
- package/src/components/SegmentedTopBar/index.jsx +0 -128
- package/src/components/SocialButton.jsx +0 -106
- package/src/components/Toast.jsx +0 -195
- package/src/components/ToggleSwitch.jsx +0 -112
- package/src/components/TopBar.jsx +0 -147
- package/src/components/Touchable.jsx +0 -133
- package/src/components/TouchableWithoutFeedback.jsx +0 -51
- package/src/components/Typography.jsx +0 -93
- package/src/components/index.js +0 -45
- package/src/config/index.js +0 -1
- package/src/config/toasterConfig.jsx +0 -142
- package/src/contexts/index.js +0 -3
- package/src/hooks/index.js +0 -3
- package/src/hooks/useDebounce.js +0 -17
- package/src/hooks/useKeyboard.js +0 -33
- package/src/hooks/useRefreshByUser.js +0 -20
- package/src/index.js +0 -2
- package/src/theme/index.js +0 -181
- package/src/utils/utils.js +0 -56
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import React, { useState } from "react";
|
|
2
|
-
import { StyleSheet, Dimensions, useWindowDimensions } from "react-native";
|
|
3
|
-
|
|
4
|
-
import PropTypes from "prop-types";
|
|
5
|
-
import { moderateScale } from "react-native-size-matters";
|
|
6
|
-
import CarouselParent, { Pagination } from "react-native-snap-carousel";
|
|
7
|
-
|
|
8
|
-
import { Container } from "@components";
|
|
9
|
-
|
|
10
|
-
const { width } = Dimensions.get("screen");
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* <div class="screenshots">
|
|
15
|
-
* <img src="screenshots/carousel/carousel.png" />
|
|
16
|
-
* </div>
|
|
17
|
-
*
|
|
18
|
-
* This component supports below props categories from [styled-system ](/styled-system).
|
|
19
|
-
* <ul>
|
|
20
|
-
* <li>flexbox</li>
|
|
21
|
-
* <li>space</li>
|
|
22
|
-
* <li>border</li>
|
|
23
|
-
* <li>layout</li>
|
|
24
|
-
* <li>color</li>
|
|
25
|
-
* <li>buttonStyle</li>
|
|
26
|
-
* </ul>
|
|
27
|
-
*
|
|
28
|
-
* ## Usage
|
|
29
|
-
* ```js
|
|
30
|
-
* import * as React from "react";
|
|
31
|
-
* import { moderateScale } from "react-native-size-matters";
|
|
32
|
-
* import { Carousel } from "@bigbinary/neetoui-rn";
|
|
33
|
-
*
|
|
34
|
-
* export default function Main() {
|
|
35
|
-
*
|
|
36
|
-
* return (
|
|
37
|
-
* <Carousel itemArray={[{url:"https://picsum.photos/200"}]} />
|
|
38
|
-
* );
|
|
39
|
-
* }
|
|
40
|
-
* ```
|
|
41
|
-
*
|
|
42
|
-
*/
|
|
43
|
-
|
|
44
|
-
export const Carousel = ({
|
|
45
|
-
itemArray,
|
|
46
|
-
renderItem,
|
|
47
|
-
carouselRef,
|
|
48
|
-
onSnapToItem,
|
|
49
|
-
containerStyle = {},
|
|
50
|
-
}) => {
|
|
51
|
-
const { width } = useWindowDimensions();
|
|
52
|
-
const [activeIndex, setActiveIndex] = useState(0);
|
|
53
|
-
|
|
54
|
-
return (
|
|
55
|
-
<Container flex={1} {...containerStyle}>
|
|
56
|
-
<CarouselParent
|
|
57
|
-
data={itemArray}
|
|
58
|
-
itemWidth={width}
|
|
59
|
-
ref={carouselRef}
|
|
60
|
-
renderItem={renderItem}
|
|
61
|
-
sliderWidth={width}
|
|
62
|
-
onSnapToItem={index => {
|
|
63
|
-
onSnapToItem(index);
|
|
64
|
-
setActiveIndex(index);
|
|
65
|
-
}}
|
|
66
|
-
/>
|
|
67
|
-
<Pagination
|
|
68
|
-
activeDotIndex={activeIndex}
|
|
69
|
-
dotContainerStyle={styles.dotContainerStyle}
|
|
70
|
-
dotStyle={styles.dotStyle}
|
|
71
|
-
dotsLength={itemArray.length}
|
|
72
|
-
inactiveDotOpacity={moderateScale(1)}
|
|
73
|
-
inactiveDotScale={moderateScale(1)}
|
|
74
|
-
inactiveDotStyle={styles.inactiveDotStyle}
|
|
75
|
-
/>
|
|
76
|
-
</Container>
|
|
77
|
-
);
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
const styles = StyleSheet.create({
|
|
81
|
-
image: {
|
|
82
|
-
height: width / moderateScale(1.8),
|
|
83
|
-
width: width / moderateScale(1.8),
|
|
84
|
-
resizeMode: "contain",
|
|
85
|
-
borderRadius: moderateScale(20),
|
|
86
|
-
},
|
|
87
|
-
indicator: {
|
|
88
|
-
height: moderateScale(12),
|
|
89
|
-
width: moderateScale(12),
|
|
90
|
-
borderRadius: moderateScale(10),
|
|
91
|
-
marginVertical: moderateScale(20),
|
|
92
|
-
marginHorizontal: moderateScale(5),
|
|
93
|
-
backgroundColor: "#49545C",
|
|
94
|
-
borderColor: "#FFFFFF",
|
|
95
|
-
borderWidth: moderateScale(2),
|
|
96
|
-
},
|
|
97
|
-
dotStyle: {
|
|
98
|
-
width: moderateScale(10),
|
|
99
|
-
height: moderateScale(10),
|
|
100
|
-
borderRadius: moderateScale(5),
|
|
101
|
-
marginHorizontal: moderateScale(4),
|
|
102
|
-
backgroundColor: "#2F3941",
|
|
103
|
-
},
|
|
104
|
-
inactiveDotStyle: {
|
|
105
|
-
backgroundColor: "#D9D9D9",
|
|
106
|
-
},
|
|
107
|
-
dotContainerStyle: { marginHorizontal: 0 },
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
Carousel.propTypes = {
|
|
111
|
-
itemArray: PropTypes.array.isRequired,
|
|
112
|
-
renderItem: PropTypes.func.isRequired,
|
|
113
|
-
onSnapToItem: PropTypes.func,
|
|
114
|
-
carouselRef: PropTypes.object,
|
|
115
|
-
containerStyle: PropTypes.object,
|
|
116
|
-
};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
|
-
import Animated, { FadeInDown, FadeInUp } from "react-native-reanimated";
|
|
5
|
-
|
|
6
|
-
import { Badge } from "./Badge";
|
|
7
|
-
|
|
8
|
-
export const AttachmentsView = ({
|
|
9
|
-
isAttachmentsVisible,
|
|
10
|
-
setIsAttachmentsVisible,
|
|
11
|
-
Attachments,
|
|
12
|
-
attachmentsCount,
|
|
13
|
-
isNoteOptionSelected,
|
|
14
|
-
}) =>
|
|
15
|
-
isAttachmentsVisible ? (
|
|
16
|
-
attachmentsCount !== 0 && (
|
|
17
|
-
<Animated.View entering={FadeInUp} key={isAttachmentsVisible}>
|
|
18
|
-
{Attachments}
|
|
19
|
-
</Animated.View>
|
|
20
|
-
)
|
|
21
|
-
) : (
|
|
22
|
-
<>
|
|
23
|
-
{attachmentsCount > 0 && (
|
|
24
|
-
<Animated.View
|
|
25
|
-
alignItems="flex-start"
|
|
26
|
-
entering={FadeInDown}
|
|
27
|
-
flexDirection="row"
|
|
28
|
-
flexWrap="wrap"
|
|
29
|
-
key={isAttachmentsVisible}
|
|
30
|
-
onTouchStart={() => setIsAttachmentsVisible(true)}
|
|
31
|
-
>
|
|
32
|
-
<Badge
|
|
33
|
-
isNoteOptionSelected={isNoteOptionSelected}
|
|
34
|
-
text="Attachments"
|
|
35
|
-
/>
|
|
36
|
-
<Badge
|
|
37
|
-
isNoteOptionSelected={isNoteOptionSelected}
|
|
38
|
-
text={`+ ${attachmentsCount}`}
|
|
39
|
-
/>
|
|
40
|
-
</Animated.View>
|
|
41
|
-
)}
|
|
42
|
-
</>
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
AttachmentsView.propTypes = {
|
|
46
|
-
isAttachmentsVisible: PropTypes.bool,
|
|
47
|
-
setIsAttachmentsVisible: PropTypes.func,
|
|
48
|
-
Attachments: PropTypes.any,
|
|
49
|
-
attachmentsCount: PropTypes.number,
|
|
50
|
-
isNoteOptionSelected: PropTypes.bool,
|
|
51
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
import PropTypes from "prop-types";
|
|
4
|
-
import { moderateScale } from "react-native-size-matters";
|
|
5
|
-
|
|
6
|
-
import { Container, Typography } from "@components";
|
|
7
|
-
|
|
8
|
-
export const Badge = ({ text, isNoteOptionSelected }) => (
|
|
9
|
-
<Container
|
|
10
|
-
alignSelf="flex-start"
|
|
11
|
-
bg={isNoteOptionSelected ? "white" : "background.oldLace"}
|
|
12
|
-
borderRadius={moderateScale(20)}
|
|
13
|
-
flexDirection="row"
|
|
14
|
-
flexGrow={0}
|
|
15
|
-
px={moderateScale(4)}
|
|
16
|
-
>
|
|
17
|
-
<Typography fontSize="3xs">{text}</Typography>
|
|
18
|
-
</Container>
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
Badge.propTypes = {
|
|
22
|
-
text: PropTypes.string,
|
|
23
|
-
isNoteOptionSelected: PropTypes.bool,
|
|
24
|
-
};
|