fln-espranza 1.1.15 → 1.1.16

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,15 @@
1
+ > Why do I have a folder named ".expo" in my project?
2
+
3
+ The ".expo" folder is created when an Expo project is started using "expo start" command.
4
+
5
+ > What do the files contain?
6
+
7
+ - "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds.
8
+ - "packager-info.json": contains port numbers and process PIDs that are used to serve the application to the mobile device/simulator.
9
+ - "settings.json": contains the server configuration that is used to serve the application manifest.
10
+
11
+ > Should I commit the ".expo" folder?
12
+
13
+ No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine.
14
+
15
+ Upon project creation, the ".expo" folder is already added to your ".gitignore" file.
@@ -0,0 +1,8 @@
1
+ {
2
+ "hostType": "lan",
3
+ "lanType": "ip",
4
+ "dev": true,
5
+ "minify": false,
6
+ "urlRandomness": null,
7
+ "https": false
8
+ }
@@ -1,174 +1,174 @@
1
- import { View, ImageBackground, Dimensions, Animated } from "react-native";
2
- import React, { useEffect, useRef, useState } from "react";
3
- import { useSafeAreaInsets } from "react-native-safe-area-context";
4
- import tw from "../lib/tailwind";
5
- import EText from "./EText";
6
- import { StatusBar } from "expo-status-bar";
7
- import { Container, EButton, EButtonIcon, PageHeader } from ".";
8
- import Constants from "expo-constants";
9
- import { useNavigation } from "@react-navigation/native";
10
-
11
- const SCREEN_WIDTH = Dimensions.get("window").width;
12
- const SCREEN_HEIGHT = Dimensions.get("window").height;
13
- const HEADER_HEIGHT = Constants.statusBarHeight + 60;
14
- const SCROLL_PADDING_BOTTOM = 100;
15
-
16
- interface BaseLayoutProps {
17
- title: string;
18
- subtitle?: string;
19
- curved?: boolean;
20
- headerContent?: JSX.Element;
21
- children?: JSX.Element;
22
- iconEnd?: JSX.Element;
23
- noScroll?: boolean;
24
- bottomButton?: JSX.Element;
25
- border?: boolean;
26
- menuButton?: boolean;
27
- }
28
-
29
- export default function BaseLayout({
30
- title,
31
- subtitle,
32
- curved,
33
- headerContent,
34
- children,
35
- noScroll,
36
- iconEnd,
37
- bottomButton,
38
- border,
39
- menuButton,
40
- }: BaseLayoutProps) {
41
- const insets = useSafeAreaInsets();
42
- const [headerScrolled, setHeaderScrolled] = useState(false);
43
- const scrollY = useRef(new Animated.Value(0)).current;
44
- const opacity = useRef(new Animated.Value(0)).current;
45
-
46
- useEffect(() => {
47
- Animated.spring(scrollY, {
48
- toValue: headerScrolled ? 0 : -40,
49
- speed: 2,
50
- delay: 1,
51
- bounciness: 1,
52
- useNativeDriver: true,
53
- }).start();
54
-
55
- Animated.spring(opacity, {
56
- toValue: headerScrolled ? 0.975 : 0,
57
- speed: 2,
58
- delay: 1,
59
- bounciness: 1,
60
- useNativeDriver: true,
61
- }).start();
62
- }, [headerScrolled]);
63
-
64
- const navigation = useNavigation();
65
-
66
- return (
67
- <View
68
- style={[
69
- tw`flex-1 bg-white`,
70
- {
71
- paddingBottom: noScroll ? 0 : insets.bottom,
72
- },
73
- ]}
74
- >
75
- <StatusBar
76
- style={headerScrolled ? "light" : curved ? "light" : "dark"}
77
- animated
78
- />
79
- {/* COLLAPSED HEADER */}
80
- <Animated.View
81
- style={[
82
- tw`absolute top-0 left-0 right-0 bg-white z-10 shadow-2xl`,
83
- {
84
- transform: [{ translateY: scrollY }],
85
- opacity,
86
- },
87
- ]}
88
- >
89
- <ImageBackground
90
- style={[tw`flex-1`, {}]}
91
- source={require("../assets/images/bg-header.jpg")}
92
- >
93
- <View
94
- style={[
95
- tw`flex-1 pl-3 pb-3 flex-row items-center`,
96
- { paddingTop: Constants.statusBarHeight + 4 },
97
- ]}
98
- >
99
- <EButtonIcon
100
- iconColor={"white"}
101
- size={20}
102
- onPress={() => navigation.goBack()}
103
- />
104
- <View style={tw`ml-2`}>
105
- <EText size="base" style={tw`font-semibold text-white mb-0.5`}>
106
- {title}
107
- </EText>
108
- {subtitle ? (
109
- <EText
110
- size="xs"
111
- style={tw`font-semibold text-white opacity-40`}
112
- >
113
- {subtitle}
114
- </EText>
115
- ) : null}
116
- </View>
117
- </View>
118
- </ImageBackground>
119
- </Animated.View>
120
-
121
- {noScroll ? (
122
- <View style={tw`flex-1`}>
123
- <PageHeader
124
- title={title}
125
- subtitle={subtitle}
126
- curved={curved}
127
- iconEnd={iconEnd}
128
- >
129
- {headerContent}
130
- </PageHeader>
131
- {children}
132
- </View>
133
- ) : (
134
- <Animated.ScrollView
135
- onScroll={(event) => {
136
- const scrolling = event.nativeEvent.contentOffset.y;
137
- scrolling > 60 ? setHeaderScrolled(true) : setHeaderScrolled(false);
138
- }}
139
- style={[
140
- tw`flex-1`,
141
- { minHeight: SCREEN_HEIGHT, paddingBottom: SCROLL_PADDING_BOTTOM },
142
- ]}
143
- scrollEventThrottle={16}
144
- showsVerticalScrollIndicator={false}
145
- decelerationRate={"fast"}
146
- // fadingEdgeLength={1s00}
147
- // alwaysBounceVertical={false}
148
- contentContainerStyle={{
149
- paddingBottom: SCROLL_PADDING_BOTTOM,
150
- }}
151
- >
152
- <PageHeader
153
- menuButton={menuButton}
154
- title={title}
155
- subtitle={subtitle}
156
- curved={curved}
157
- iconEnd={iconEnd}
158
- border={border}
159
- >
160
- {headerContent}
161
- </PageHeader>
162
- {children}
163
- </Animated.ScrollView>
164
- )}
165
- {bottomButton ? (
166
- <Container style={tw`flex-1 justify-end mb-4 `}>
167
- {bottomButton}
168
- </Container>
169
- ) : (
170
- <></>
171
- )}
172
- </View>
173
- );
174
- }
1
+ import { View, ImageBackground, Dimensions, Animated } from "react-native";
2
+ import React, { useEffect, useRef, useState } from "react";
3
+ import { useSafeAreaInsets } from "react-native-safe-area-context";
4
+ import tw from "../lib/tailwind";
5
+ import EText from "./EText";
6
+ import { StatusBar } from "expo-status-bar";
7
+ import { Container, EButton, EButtonIcon, PageHeader } from ".";
8
+ import Constants from "expo-constants";
9
+ import { useNavigation } from "@react-navigation/native";
10
+
11
+ const SCREEN_WIDTH = Dimensions.get("window").width;
12
+ const SCREEN_HEIGHT = Dimensions.get("window").height;
13
+ const HEADER_HEIGHT = Constants.statusBarHeight + 60;
14
+ const SCROLL_PADDING_BOTTOM = 100;
15
+
16
+ interface BaseLayoutProps {
17
+ title: string;
18
+ subtitle?: string;
19
+ curved?: boolean;
20
+ headerContent?: JSX.Element;
21
+ children?: JSX.Element;
22
+ iconEnd?: JSX.Element;
23
+ noScroll?: boolean;
24
+ bottomButton?: JSX.Element;
25
+ border?: boolean;
26
+ menuButton?: boolean;
27
+ }
28
+
29
+ export default function BaseLayout({
30
+ title,
31
+ subtitle,
32
+ curved,
33
+ headerContent,
34
+ children,
35
+ noScroll,
36
+ iconEnd,
37
+ bottomButton,
38
+ border,
39
+ menuButton,
40
+ }: BaseLayoutProps) {
41
+ const insets = useSafeAreaInsets();
42
+ const [headerScrolled, setHeaderScrolled] = useState(false);
43
+ const scrollY = useRef(new Animated.Value(0)).current;
44
+ const opacity = useRef(new Animated.Value(0)).current;
45
+
46
+ useEffect(() => {
47
+ Animated.spring(scrollY, {
48
+ toValue: headerScrolled ? 0 : -40,
49
+ speed: 2,
50
+ delay: 1,
51
+ bounciness: 1,
52
+ useNativeDriver: true,
53
+ }).start();
54
+
55
+ Animated.spring(opacity, {
56
+ toValue: headerScrolled ? 0.975 : 0,
57
+ speed: 2,
58
+ delay: 1,
59
+ bounciness: 1,
60
+ useNativeDriver: true,
61
+ }).start();
62
+ }, [headerScrolled]);
63
+
64
+ const navigation = useNavigation();
65
+
66
+ return (
67
+ <View
68
+ style={[
69
+ tw`flex-1 bg-white`,
70
+ {
71
+ paddingBottom: noScroll ? 0 : insets.bottom,
72
+ },
73
+ ]}
74
+ >
75
+ <StatusBar
76
+ style={headerScrolled ? "light" : curved ? "light" : "dark"}
77
+ animated
78
+ />
79
+ {/* COLLAPSED HEADER */}
80
+ <Animated.View
81
+ style={[
82
+ tw`absolute top-0 left-0 right-0 bg-white z-10 shadow-2xl`,
83
+ {
84
+ transform: [{ translateY: scrollY }],
85
+ opacity,
86
+ },
87
+ ]}
88
+ >
89
+ <ImageBackground
90
+ style={[tw`flex-1`, {}]}
91
+ source={require("../assets/images/bg-header.jpg")}
92
+ >
93
+ <View
94
+ style={[
95
+ tw`flex-1 pl-3 pb-3 flex-row items-center`,
96
+ { paddingTop: Constants.statusBarHeight + 4 },
97
+ ]}
98
+ >
99
+ <EButtonIcon
100
+ iconColor={"white"}
101
+ size={20}
102
+ onPress={() => navigation.goBack()}
103
+ />
104
+ <View style={tw`ml-2`}>
105
+ <EText size="base" style={tw`font-semibold text-white mb-0.5`}>
106
+ {title}
107
+ </EText>
108
+ {subtitle ? (
109
+ <EText
110
+ size="xs"
111
+ style={tw`font-semibold text-white opacity-40`}
112
+ >
113
+ {subtitle}
114
+ </EText>
115
+ ) : null}
116
+ </View>
117
+ </View>
118
+ </ImageBackground>
119
+ </Animated.View>
120
+
121
+ {noScroll ? (
122
+ <View style={tw`flex-1`}>
123
+ <PageHeader
124
+ title={title}
125
+ subtitle={subtitle}
126
+ curved={curved}
127
+ iconEnd={iconEnd}
128
+ >
129
+ {headerContent}
130
+ </PageHeader>
131
+ {children}
132
+ </View>
133
+ ) : (
134
+ <Animated.ScrollView
135
+ onScroll={(event) => {
136
+ const scrolling = event.nativeEvent.contentOffset.y;
137
+ scrolling > 60 ? setHeaderScrolled(true) : setHeaderScrolled(false);
138
+ }}
139
+ style={[
140
+ tw`flex-1`,
141
+ { minHeight: SCREEN_HEIGHT, paddingBottom: SCROLL_PADDING_BOTTOM },
142
+ ]}
143
+ scrollEventThrottle={16}
144
+ showsVerticalScrollIndicator={false}
145
+ decelerationRate={"fast"}
146
+ // fadingEdgeLength={1s00}
147
+ // alwaysBounceVertical={false}
148
+ contentContainerStyle={{
149
+ paddingBottom: SCROLL_PADDING_BOTTOM,
150
+ }}
151
+ >
152
+ <PageHeader
153
+ menuButton={menuButton}
154
+ title={title}
155
+ subtitle={subtitle}
156
+ curved={curved}
157
+ iconEnd={iconEnd}
158
+ border={border}
159
+ >
160
+ {headerContent}
161
+ </PageHeader>
162
+ {children}
163
+ </Animated.ScrollView>
164
+ )}
165
+ {bottomButton ? (
166
+ <Container style={tw`flex-1 justify-end mb-4 `}>
167
+ {bottomButton}
168
+ </Container>
169
+ ) : (
170
+ <></>
171
+ )}
172
+ </View>
173
+ );
174
+ }
@@ -1,97 +1,97 @@
1
- import React from "react";
2
- import { ScrollView, View, TouchableOpacity } from "react-native";
3
- import { HomeIcon,CalendarIcon, TemplateIcon, ViewBoardsIcon } from 'react-native-heroicons/solid';
4
- import { StyleSheet } from 'react-native';
5
- import tw from "../lib/tailwind";
6
- import EText from "./EText";
7
- import Spacer from "./Spacer";
8
- import Avatar from "./Avatar";
9
- import { Colors } from "../utils/Color";
10
- import MenuItems from "./MenuItems";
11
-
12
- type menuItems = {
13
- title: string,
14
- icon: any,
15
- screen: string,
16
- }
17
-
18
- interface IProps{
19
- name: string,
20
- profile: string,
21
- menuItems: menuItems[];
22
- navigation: any;
23
- }
24
-
25
- const Drawer = ({name,profile, menuItems,navigation }: IProps) => {
26
- return (
27
- <ScrollView
28
- scrollEnabled={true}
29
- showsVerticalScrollIndicator={false}
30
- style={{
31
- position: 'relative',
32
- backgroundColor: '#ffffff',
33
- }}>
34
- <View style={tw`mx-4 pt-4`}>
35
- <Spacer height={30} />
36
-
37
- <View style={tw`flex w-full mt-5`}>
38
- <View style={tw`flex-row items-center`}>
39
- <Avatar
40
- size="sm"
41
- source={""}
42
- nameFirstLetter={name?.split("")[0]}
43
- />
44
- <View style={tw`ml-3`}>
45
- <EText size={"xl"} style={tw`font-bold -mt-1`}>{name}</EText>
46
- <EText size="sm" style={[tw`font-normal`, {
47
- color: Colors["text-body"]
48
- }]}>
49
- {profile}
50
- </EText>
51
- </View>
52
- </View>
53
- </View>
54
-
55
- <Spacer height={30} />
56
- {
57
- menuItems.map((item, index) => {
58
- return (
59
- <MenuItems
60
- key={index}
61
- title={item.title}
62
- icon={item.icon}
63
- onPress={() => navigation.navigate(item.screen)}
64
- />
65
- )
66
- })
67
- }
68
- <Spacer />
69
- <Spacer />
70
- <MenuItems
71
- title="Profile"
72
- onPress={() => navigation.navigate("ProfileScreen")}
73
- />
74
- <MenuItems
75
- title="Settings"
76
- />
77
- <MenuItems
78
- title="Logout"
79
- />
80
- </View>
81
- </ScrollView>
82
- );
83
- };
84
-
85
- const styles = StyleSheet.create({
86
- container: {
87
- backgroundColor: '#fff',
88
- padding: 10,
89
- },
90
- logoStyle: {
91
- height: 20,
92
- width: '80%',
93
- alignSelf: 'center',
94
- },
95
- });
96
-
1
+ import React from "react";
2
+ import { ScrollView, View, TouchableOpacity } from "react-native";
3
+ import { HomeIcon,CalendarIcon, TemplateIcon, ViewBoardsIcon } from 'react-native-heroicons/solid';
4
+ import { StyleSheet } from 'react-native';
5
+ import tw from "../lib/tailwind";
6
+ import EText from "./EText";
7
+ import Spacer from "./Spacer";
8
+ import Avatar from "./Avatar";
9
+ import { Colors } from "../utils/Color";
10
+ import MenuItems from "./MenuItems";
11
+
12
+ type menuItems = {
13
+ title: string,
14
+ icon: any,
15
+ screen: string,
16
+ }
17
+
18
+ interface IProps{
19
+ name: string,
20
+ profile: string,
21
+ menuItems: menuItems[];
22
+ navigation: any;
23
+ }
24
+
25
+ const Drawer = ({name,profile, menuItems,navigation }: IProps) => {
26
+ return (
27
+ <ScrollView
28
+ scrollEnabled={true}
29
+ showsVerticalScrollIndicator={false}
30
+ style={{
31
+ position: 'relative',
32
+ backgroundColor: '#ffffff',
33
+ }}>
34
+ <View style={tw`mx-4 pt-4`}>
35
+ <Spacer height={30} />
36
+
37
+ <View style={tw`flex w-full mt-5`}>
38
+ <View style={tw`flex-row items-center`}>
39
+ <Avatar
40
+ size="sm"
41
+ source={""}
42
+ nameFirstLetter={name?.split("")[0]}
43
+ />
44
+ <View style={tw`ml-3`}>
45
+ <EText size={"xl"} style={tw`font-bold -mt-1`}>{name}</EText>
46
+ <EText size="sm" style={[tw`font-normal`, {
47
+ color: Colors["text-body"]
48
+ }]}>
49
+ {profile}
50
+ </EText>
51
+ </View>
52
+ </View>
53
+ </View>
54
+
55
+ <Spacer height={30} />
56
+ {
57
+ menuItems.map((item, index) => {
58
+ return (
59
+ <MenuItems
60
+ key={index}
61
+ title={item.title}
62
+ icon={item.icon}
63
+ onPress={() => navigation.navigate(item.screen)}
64
+ />
65
+ )
66
+ })
67
+ }
68
+ <Spacer />
69
+ <Spacer />
70
+ <MenuItems
71
+ title="Profile"
72
+ onPress={() => navigation.navigate("ProfileScreen")}
73
+ />
74
+ <MenuItems
75
+ title="Settings"
76
+ />
77
+ <MenuItems
78
+ title="Logout"
79
+ />
80
+ </View>
81
+ </ScrollView>
82
+ );
83
+ };
84
+
85
+ const styles = StyleSheet.create({
86
+ container: {
87
+ backgroundColor: '#fff',
88
+ padding: 10,
89
+ },
90
+ logoStyle: {
91
+ height: 20,
92
+ width: '80%',
93
+ alignSelf: 'center',
94
+ },
95
+ });
96
+
97
97
  export default Drawer;
@@ -1,27 +1,23 @@
1
- import React from 'react'
2
- import { View } from 'react-native'
3
- import tw from '../lib/tailwind';
4
- import EText from './EText';
5
- import { CheckCircleIcon } from 'react-native-heroicons/solid';
6
-
7
-
8
- interface IProps {
9
- text: string;
10
- completed?: boolean;
11
- color?: string;
12
- textColor?: string;
13
- size: "xs" | "sm" | "base" | "lg" | "xl" | "2xl" | "3xl" | "title";
14
- fontWeight: string;
15
- padding: string;
16
- }
17
-
18
- export default function EBadge({ text, completed, color, textColor, size, fontWeight, padding }: IProps) {
19
- return (
20
- <View style={[tw` rounded-full flex-row ${padding}`, {backgroundColor: color}]}>
21
- {completed ? <CheckCircleIcon style={tw`text-white mr-1`} size={16} /> : null}
22
- <EText size={size} style={tw`${fontWeight} ${textColor ? textColor : ""}`}>
23
- {text}
24
- </EText>
25
- </View>
26
- )
27
- }
1
+ import React from 'react'
2
+ import { View } from 'react-native'
3
+ import tw from '../lib/tailwind';
4
+ import EText from './EText';
5
+ import { CheckCircleIcon } from 'react-native-heroicons/solid';
6
+
7
+
8
+ interface IProps {
9
+ text: string;
10
+ color?: string;
11
+ completed?: boolean;
12
+ }
13
+
14
+ export default function EBadge({ text, completed, color }: IProps) {
15
+ return (
16
+ <View style={[tw`rounded-full flex-row p-1 px-2 ${completed ? 'bg-green-600' : color}`, ]}>
17
+ {completed ? <CheckCircleIcon style={tw`text-white -ml-1 mr-1`} size={16} /> : null}
18
+ <EText size='xs' style={tw`font-semibold text-white`}>
19
+ {text}
20
+ </EText>
21
+ </View>
22
+ )
23
+ }