@bigbinary/neetoui-rn 0.0.220 → 0.0.221
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/index.d.ts +43 -5
- package/lib/components/Accordion.js +1 -1
- package/lib/components/Button.js +1 -1
- package/lib/components/ButtonGroup.js +1 -1
- package/lib/components/Calendar.js +1 -1
- package/lib/components/Chip.js +1 -1
- package/lib/components/FAB.js +1 -1
- package/lib/components/Input.js +1 -1
- package/lib/components/MultiSelect.js +1 -1
- package/lib/components/NotificationPreferenceList.js +1 -1
- package/lib/components/OrganizationItem.js +1 -1
- package/lib/components/RichTextEditor.js +1 -1
- package/lib/components/SearchBar.js +1 -1
- package/lib/components/SegmentedTopBar.js +1 -1
- package/lib/components/SocialButton.js +1 -1
- package/lib/components/Touchable.js +1 -1
- package/package.json +1 -1
- package/src/components/Accordion.js +98 -93
- package/src/components/Button.js +17 -15
- package/src/components/ButtonGroup.js +6 -4
- package/src/components/Calendar.js +1 -2
- package/src/components/Chip.js +6 -3
- package/src/components/FAB.js +9 -0
- package/src/components/Input.js +17 -18
- package/src/components/MultiSelect.js +2 -67
- package/src/components/NotificationPreferenceList.js +8 -10
- package/src/components/OrganizationItem.js +10 -11
- package/src/components/RichTextEditor.js +2 -0
- package/src/components/SearchBar.js +13 -11
- package/src/components/SegmentedTopBar.js +5 -10
- package/src/components/SocialButton.js +11 -2
- package/src/components/Touchable.js +1 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable react-native/no-inline-styles */
|
|
1
2
|
import React, { useEffect, useRef, useState } from "react";
|
|
2
3
|
import { Animated, TouchableWithoutFeedback } from "react-native";
|
|
3
4
|
import {
|
|
@@ -47,15 +48,15 @@ const TextInput = styled.TextInput`
|
|
|
47
48
|
* ```
|
|
48
49
|
*/
|
|
49
50
|
|
|
50
|
-
export const SearchBar =
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
export const SearchBar = ({
|
|
52
|
+
placeholder = "Search",
|
|
53
|
+
onChangeText = () => {},
|
|
54
|
+
onCancel = () => {},
|
|
55
|
+
debounceDelay = 1000,
|
|
56
|
+
showCancelButton = true,
|
|
57
|
+
containerProps,
|
|
58
|
+
searchbarProps,
|
|
59
|
+
}) => {
|
|
59
60
|
const inputRef = useRef();
|
|
60
61
|
const [searchText, setSearchText] = useState("");
|
|
61
62
|
const debouncedSearchTextValue = useDebounce(
|
|
@@ -113,7 +114,7 @@ export const SearchBar = props => {
|
|
|
113
114
|
borderRadius={8}
|
|
114
115
|
flexDirection="row"
|
|
115
116
|
alignItems="center"
|
|
116
|
-
{...
|
|
117
|
+
{...containerProps}
|
|
117
118
|
>
|
|
118
119
|
<Container px={10}>
|
|
119
120
|
<Icon
|
|
@@ -139,7 +140,7 @@ export const SearchBar = props => {
|
|
|
139
140
|
color="font.primary"
|
|
140
141
|
autoCapitalize="none"
|
|
141
142
|
returnKeyType="search"
|
|
142
|
-
{...
|
|
143
|
+
{...searchbarProps}
|
|
143
144
|
/>
|
|
144
145
|
</Container>
|
|
145
146
|
</TouchableWithoutFeedback>
|
|
@@ -190,4 +191,5 @@ SearchBar.propTypes = {
|
|
|
190
191
|
* option to hide the cancel button. Default is true
|
|
191
192
|
*/
|
|
192
193
|
showCancelButton: PropTypes.bool,
|
|
194
|
+
containerProps: PropTypes.object,
|
|
193
195
|
};
|
|
@@ -18,7 +18,6 @@ const defaultShadowStyle = {
|
|
|
18
18
|
},
|
|
19
19
|
shadowOpacity: 0.23,
|
|
20
20
|
shadowRadius: 2.62,
|
|
21
|
-
|
|
22
21
|
elevation: 4,
|
|
23
22
|
};
|
|
24
23
|
|
|
@@ -87,7 +86,6 @@ export const SegmentedTopBar = ({
|
|
|
87
86
|
}) => {
|
|
88
87
|
const translateValue = (width - 4) / routes?.length;
|
|
89
88
|
const tabTranslateValue = useSharedValue(0);
|
|
90
|
-
|
|
91
89
|
useEffect(() => {
|
|
92
90
|
tabTranslateValue.value = withSpring(
|
|
93
91
|
index * (translateValue * 1),
|
|
@@ -113,7 +111,7 @@ export const SegmentedTopBar = ({
|
|
|
113
111
|
defaultShadowStyle,
|
|
114
112
|
StyleSheet.absoluteFill,
|
|
115
113
|
{
|
|
116
|
-
width: width / routes?.length,
|
|
114
|
+
width: (width - 4) / routes?.length,
|
|
117
115
|
},
|
|
118
116
|
tabTranslateAnimatedStyles,
|
|
119
117
|
]}
|
|
@@ -184,14 +182,9 @@ const styles = StyleSheet.create({
|
|
|
184
182
|
|
|
185
183
|
SegmentedTopBar.propTypes = {
|
|
186
184
|
/**
|
|
187
|
-
*
|
|
185
|
+
* Navigation routes and additional data.
|
|
188
186
|
*/
|
|
189
|
-
|
|
190
|
-
PropTypes.shape({
|
|
191
|
-
name: PropTypes.string,
|
|
192
|
-
Component: PropTypes.oneOfType([PropTypes.element, PropTypes.func]),
|
|
193
|
-
})
|
|
194
|
-
).isRequired,
|
|
187
|
+
state: PropTypes.object,
|
|
195
188
|
/**
|
|
196
189
|
* To change the inactive segment container style.
|
|
197
190
|
*/
|
|
@@ -209,6 +202,8 @@ SegmentedTopBar.propTypes = {
|
|
|
209
202
|
*/
|
|
210
203
|
activeTextStyle: PropTypes.object,
|
|
211
204
|
height: PropTypes.number,
|
|
205
|
+
navigation: PropTypes.object,
|
|
206
|
+
descriptors: PropTypes.object,
|
|
212
207
|
};
|
|
213
208
|
|
|
214
209
|
SegmentedTopBar.defaultProps = {
|
|
@@ -33,8 +33,13 @@ import { Container, Typography, Touchable } from "@components";
|
|
|
33
33
|
*
|
|
34
34
|
*/
|
|
35
35
|
|
|
36
|
-
export const SocialButton =
|
|
37
|
-
|
|
36
|
+
export const SocialButton = ({
|
|
37
|
+
variant,
|
|
38
|
+
disabled,
|
|
39
|
+
labelStyle,
|
|
40
|
+
isLoading,
|
|
41
|
+
...rest
|
|
42
|
+
}) => {
|
|
38
43
|
const theme = useContext(ThemeContext);
|
|
39
44
|
const capitalize = str => `${str.charAt(0).toUpperCase()}${str.slice(1)}`;
|
|
40
45
|
|
|
@@ -93,4 +98,8 @@ SocialButton.propTypes = {
|
|
|
93
98
|
* Customize label style of the button
|
|
94
99
|
*/
|
|
95
100
|
labelStyle: PropTypes.object,
|
|
101
|
+
/**
|
|
102
|
+
* Button loading status
|
|
103
|
+
*/
|
|
104
|
+
isLoading: PropTypes.bool,
|
|
96
105
|
};
|