@bigbinary/neetoui-rn 0.0.124 → 0.0.127
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/fonts/SFProText-Bold.ttf +0 -0
- package/assets/fonts/SFProText-Medium.ttf +0 -0
- package/assets/fonts/SFProText-Regular.ttf +0 -0
- package/assets/fonts/SFProText-Semibold.ttf +0 -0
- package/assets/icons/apple-logo.svg +3 -0
- package/assets/icons/error.svg +4 -0
- package/assets/icons/google-logo.svg +6 -0
- package/assets/icons/info.svg +7 -0
- package/assets/icons/success.svg +3 -0
- package/assets/icons/warning.svg +5 -0
- package/lib/components/Alert.js +1 -1
- package/lib/components/Avatar.js +1 -1
- package/lib/components/Badge.js +1 -1
- package/lib/components/BottomSheet.js +1 -1
- package/lib/components/Button.js +1 -1
- package/lib/components/Carousel.js +1 -0
- package/lib/components/CheckBox.js +1 -1
- package/lib/components/Chip.js +1 -1
- package/lib/components/Input.js +1 -1
- package/lib/components/ListItem.js +1 -0
- package/lib/components/MultiSelect.js +1 -1
- package/lib/components/OnBoarding.js +1 -0
- package/lib/components/OtpInputs.js +1 -1
- package/lib/components/Popover.js +1 -1
- package/lib/components/RadioButton.js +1 -1
- package/lib/components/SearchBar.js +1 -0
- package/lib/components/SegmentPicker.js +1 -0
- package/lib/components/Select.js +1 -1
- package/lib/components/SocialButton.js +1 -0
- package/lib/components/Toast.js +1 -1
- package/lib/components/ToggleSwitch.js +1 -1
- package/lib/components/index.js +1 -1
- package/lib/config/toasterConfig.js +1 -1
- package/lib/hooks/index.js +1 -1
- package/lib/hooks/useDebounce.js +1 -0
- package/lib/theme/index.js +1 -1
- package/package.json +5 -3
- package/src/components/Alert.js +5 -5
- package/src/components/Avatar.js +1 -1
- package/src/components/Badge.js +1 -1
- package/src/components/BottomSheet.js +113 -74
- package/src/components/Button.js +66 -64
- package/src/components/Carousel.js +112 -0
- package/src/components/CheckBox.js +87 -81
- package/src/components/Chip.js +1 -1
- package/src/components/Input.js +147 -241
- package/src/components/ListItem.js +66 -0
- package/src/components/MultiSelect.js +10 -8
- package/src/components/OnBoarding.js +116 -0
- package/src/components/OtpInputs.js +1 -1
- package/src/components/Popover.js +13 -1
- package/src/components/RadioButton.js +88 -114
- package/src/components/SearchBar.js +134 -0
- package/src/components/SegmentPicker.js +210 -0
- package/src/components/Select.js +9 -7
- package/src/components/SocialButton.js +89 -0
- package/src/components/Toast.js +85 -30
- package/src/components/ToggleSwitch.js +49 -97
- package/src/components/Typography.js +2 -2
- package/src/components/index.js +6 -0
- package/src/config/toasterConfig.js +2 -2
- package/src/hooks/index.js +1 -0
- package/src/hooks/useDebounce.js +16 -0
- package/src/theme/index.js +65 -34
- package/assets/fonts/Inter-Bold.ttf +0 -0
- package/assets/fonts/Inter-Regular.ttf +0 -0
package/src/components/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { Button } from "./Button";
|
|
2
|
+
export { SocialButton } from "./SocialButton";
|
|
2
3
|
export { Container } from "./Container";
|
|
3
4
|
export { Typography } from "./Typography";
|
|
4
5
|
export { Input } from "./Input";
|
|
@@ -25,3 +26,8 @@ export { MultiSelect } from "./MultiSelect";
|
|
|
25
26
|
export { Divider } from "./Divider";
|
|
26
27
|
export { FlatList } from "./FlatList";
|
|
27
28
|
export { ScrollView } from "./ScrollView";
|
|
29
|
+
export { SegmentPicker } from "./SegmentPicker";
|
|
30
|
+
export { ListItem } from "./ListItem";
|
|
31
|
+
export { Carousel } from "./Carousel";
|
|
32
|
+
export { OnBoarding } from "./OnBoarding";
|
|
33
|
+
export { SearchBar } from "./SearchBar";
|
|
@@ -121,12 +121,12 @@ const styles = StyleSheet.create({
|
|
|
121
121
|
},
|
|
122
122
|
text1Style: {
|
|
123
123
|
fontSize: 15,
|
|
124
|
-
fontFamily: theme.fonts.
|
|
124
|
+
fontFamily: theme.fonts.sf700,
|
|
125
125
|
color: theme.colors.font.white,
|
|
126
126
|
},
|
|
127
127
|
text2Style: {
|
|
128
128
|
fontSize: 16,
|
|
129
|
-
fontFamily: theme.fonts.
|
|
129
|
+
fontFamily: theme.fonts.sf700,
|
|
130
130
|
color: theme.colors.font.white,
|
|
131
131
|
},
|
|
132
132
|
closeButtonStyle: {
|
package/src/hooks/index.js
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useState, useEffect } from "react";
|
|
2
|
+
|
|
3
|
+
export function useDebounce(value, delay) {
|
|
4
|
+
const [debouncedValue, setDebouncedValue] = useState(value);
|
|
5
|
+
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
const handler = setTimeout(() => {
|
|
8
|
+
setDebouncedValue(value);
|
|
9
|
+
}, delay);
|
|
10
|
+
return () => {
|
|
11
|
+
clearTimeout(handler);
|
|
12
|
+
};
|
|
13
|
+
}, [value, delay]);
|
|
14
|
+
|
|
15
|
+
return debouncedValue;
|
|
16
|
+
}
|
package/src/theme/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
const defaultColors = {
|
|
2
2
|
white: "#ffffff",
|
|
3
3
|
black: "#000000",
|
|
4
|
-
base: "#
|
|
4
|
+
base: "#4557F8",
|
|
5
5
|
danger: "#ff6969",
|
|
6
|
-
menubackground: "#
|
|
6
|
+
menubackground: "#F6F6FA",
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
const toastBorderColors = {
|
|
10
|
-
success: "#
|
|
11
|
-
error: "#
|
|
12
|
-
info: "#
|
|
13
|
-
warning: "#
|
|
10
|
+
success: "#00BA88",
|
|
11
|
+
error: "#F56A58",
|
|
12
|
+
info: "#276EF1",
|
|
13
|
+
warning: "#F3CD82",
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
const
|
|
16
|
+
const greyVariants = {
|
|
17
17
|
grey: "#828282",
|
|
18
18
|
grey100: "#f8f9f9",
|
|
19
19
|
grey200: "#e9ebed",
|
|
@@ -21,27 +21,48 @@ const greyVarients = {
|
|
|
21
21
|
grey400: "#c2c8cc",
|
|
22
22
|
grey500: "#87929d",
|
|
23
23
|
grey600: "#68737d",
|
|
24
|
+
grey700: "#49545C",
|
|
24
25
|
grey800: "#2f3941",
|
|
25
26
|
};
|
|
26
27
|
|
|
28
|
+
const purpleVariants = {
|
|
29
|
+
purple800: "#342DF4",
|
|
30
|
+
purple700: "#4557F8",
|
|
31
|
+
purple600: "#7280FA",
|
|
32
|
+
purple500: "#5E5CE6",
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const greenVariants = {
|
|
36
|
+
green800: "#00956D",
|
|
37
|
+
green700: "#00BA88",
|
|
38
|
+
green600: "#33C8A0",
|
|
39
|
+
green500: "#34C759",
|
|
40
|
+
};
|
|
41
|
+
|
|
27
42
|
const colors = {
|
|
28
43
|
font: {
|
|
29
|
-
primary: "#
|
|
30
|
-
secondary: "#
|
|
44
|
+
primary: "#2F3941",
|
|
45
|
+
secondary: "#49545C",
|
|
31
46
|
...defaultColors,
|
|
32
|
-
...
|
|
47
|
+
...greyVariants,
|
|
48
|
+
...purpleVariants,
|
|
49
|
+
...greenVariants,
|
|
33
50
|
},
|
|
34
51
|
background: {
|
|
35
52
|
parentView: "#ffffff",
|
|
36
53
|
primary: "#ffffff",
|
|
37
|
-
secondary: "#
|
|
54
|
+
secondary: "#F6F6FA",
|
|
38
55
|
...defaultColors,
|
|
39
|
-
...
|
|
56
|
+
...greyVariants,
|
|
57
|
+
...purpleVariants,
|
|
58
|
+
...greenVariants,
|
|
40
59
|
},
|
|
41
60
|
border: {
|
|
42
|
-
primary: "#
|
|
43
|
-
|
|
61
|
+
primary: "#E9EBED",
|
|
62
|
+
secondary: "#C2C8CC",
|
|
63
|
+
...greyVariants,
|
|
44
64
|
...defaultColors,
|
|
65
|
+
...purpleVariants,
|
|
45
66
|
},
|
|
46
67
|
toast: {
|
|
47
68
|
...toastBorderColors,
|
|
@@ -54,25 +75,30 @@ const baseTheme = {
|
|
|
54
75
|
// We can add below commented fonts later as follows. Also add font faces in index.web.js for the web.
|
|
55
76
|
// https://www.bigbinary.com/learn-react-native/adding-custom-fonats
|
|
56
77
|
|
|
57
|
-
//
|
|
58
|
-
//
|
|
59
|
-
//
|
|
60
|
-
//
|
|
61
|
-
//
|
|
62
|
-
// inter800: "Inter-ExtraBold",
|
|
63
|
-
// inter900: "Inter-Black",
|
|
78
|
+
// sf100: "SFProText-Thin",
|
|
79
|
+
// sf200: "SFProText-ExtraLight",
|
|
80
|
+
// sf300: "SFProText-Light",
|
|
81
|
+
// sf800: "SFProText-ExtraBold",
|
|
82
|
+
// sf900: "SFProText-Black",
|
|
64
83
|
|
|
65
|
-
|
|
66
|
-
|
|
84
|
+
sf400: "SFProText-Regular",
|
|
85
|
+
sf500: "SFProText-Medium",
|
|
86
|
+
sf600: "SFProText-Semibold",
|
|
87
|
+
sf700: "SFProText-Bold",
|
|
67
88
|
},
|
|
68
89
|
lineHeights: [24],
|
|
69
90
|
fontSizes: {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
91
|
+
"3xs": 10,
|
|
92
|
+
"2xs": 12,
|
|
93
|
+
xs: 13,
|
|
94
|
+
s: 14,
|
|
95
|
+
m: 15,
|
|
96
|
+
l: 16,
|
|
97
|
+
xl: 17,
|
|
98
|
+
"2xl": 18,
|
|
99
|
+
"3xl": 20,
|
|
100
|
+
"4xl": 22,
|
|
101
|
+
"5xl": 30,
|
|
76
102
|
},
|
|
77
103
|
};
|
|
78
104
|
|
|
@@ -87,16 +113,21 @@ export const theme = {
|
|
|
87
113
|
},
|
|
88
114
|
header: {
|
|
89
115
|
color: baseTheme.colors.font.primary,
|
|
90
|
-
fontSize: baseTheme.fontSizes
|
|
91
|
-
fontFamily: baseTheme.fonts.
|
|
116
|
+
fontSize: baseTheme.fontSizes["3xl"],
|
|
117
|
+
fontFamily: baseTheme.fonts.sf700,
|
|
118
|
+
},
|
|
119
|
+
modalHeader: {
|
|
120
|
+
color: baseTheme.colors.font.black,
|
|
121
|
+
fontSize: baseTheme.fontSizes["xl"],
|
|
122
|
+
fontFamily: baseTheme.fonts.sf600,
|
|
92
123
|
},
|
|
93
124
|
body: {
|
|
94
|
-
color: baseTheme.colors.font.
|
|
95
|
-
fontSize: baseTheme.fontSizes.
|
|
125
|
+
color: baseTheme.colors.font.grey500,
|
|
126
|
+
fontSize: baseTheme.fontSizes.s,
|
|
96
127
|
},
|
|
97
128
|
subtext: {
|
|
98
129
|
color: baseTheme.colors.font.primary,
|
|
99
|
-
fontSize: baseTheme.fontSizes
|
|
130
|
+
fontSize: baseTheme.fontSizes["2xs"],
|
|
100
131
|
},
|
|
101
132
|
|
|
102
133
|
// buttonTextStyles
|
|
Binary file
|
|
Binary file
|