fln-espranza 0.0.1 → 0.0.2

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.
@@ -1,68 +1,68 @@
1
- import React from 'react'
2
- import { Dimensions, TouchableOpacity, View } from 'react-native'
3
- import { ChevronRightIcon } from 'react-native-heroicons/solid';
4
- import tw from '../lib/tailwind'
5
- import { Colors } from '../utils/Color';
6
- import EBadge from './EBadge'
7
- import EButton from './EButton';
8
- import EDateAndTimeCard from './EDateAndTimeCard'
9
- import EText from './EText'
10
-
11
- interface IProps {
12
- title: string;
13
- description: string;
14
- completed: boolean;
15
- skipButton?: boolean;
16
- onPress?: () => void;
17
- }
18
-
19
- export default function ETimeLineCard({ title, description, completed, skipButton, onPress }: IProps) {
20
- return (
21
- <TouchableOpacity
22
- onPress={() => onPress && onPress()}
23
- style={[
24
- tw` rounded-lg p-4 mb-3 w-full border border}`,
25
- {
26
- backgroundColor: completed ? Colors['primary-light'] : Colors['white'],
27
- borderColor: completed ? Colors['primary-base'] : Colors['border'],
28
- }
29
- ]}
30
- >
31
-
32
- <View style={tw`flex-row justify-between `}>
33
- <View style={tw`flex-1`}>
34
- <EText size="lg" style={[tw`font-bold`, { color: Colors['text-primary'] }]}>
35
- {title}
36
- </EText>
37
- <EText size='sm' style={[tw`font-normal mt-1`, {color: Colors['text-body']}]}>
38
- {description}
39
- </EText>
40
- </View>
41
- <View style={tw`ml-4`}>
42
- <ChevronRightIcon style={[tw``,{ color: Colors['text-body']}]} size={16} />
43
- </View>
44
- </View>
45
-
46
- <View style={tw`mt-6 flex-row items-center justify-between`}>
47
- <EBadge
48
- completed={completed}
49
- text={completed ? "Complete" : "Pending"}
50
- color={completed ? Colors['primary-base'] : Colors.warning}
51
- textColor={completed ? "text-white" : ""}
52
- size="xs"
53
- padding='py-1 px-3'
54
- fontWeight='font-bold'
55
- />
56
-
57
- {
58
- skipButton ? (
59
- <TouchableOpacity>
60
- <EText size="sm" style={[tw`ml-2 font-semibold`, {color: Colors['primary-base']}]}>
61
- Skip
62
- </EText>
63
- </TouchableOpacity>) : null
64
- }
65
- </View>
66
- </TouchableOpacity>
67
- )
68
- }
1
+ import React from 'react'
2
+ import { Dimensions, TouchableOpacity, View } from 'react-native'
3
+ import { ChevronRightIcon } from 'react-native-heroicons/solid';
4
+ import tw from '../lib/tailwind'
5
+ import { Colors } from '../utils/Color';
6
+ import EBadge from './EBadge'
7
+ import EButton from './EButton';
8
+ import EDateAndTimeCard from './EDateAndTimeCard'
9
+ import EText from './EText'
10
+
11
+ interface IProps {
12
+ title: string;
13
+ description: string;
14
+ completed: boolean;
15
+ skipButton?: boolean;
16
+ onPress?: () => void;
17
+ }
18
+
19
+ export default function ETimeLineCard({ title, description, completed, skipButton, onPress }: IProps) {
20
+ return (
21
+ <TouchableOpacity
22
+ onPress={() => onPress && onPress()}
23
+ style={[
24
+ tw` rounded-lg p-4 mb-3 w-full border border}`,
25
+ {
26
+ backgroundColor: completed ? Colors['primary-light'] : Colors['white'],
27
+ borderColor: completed ? Colors['primary-base'] : Colors['border'],
28
+ }
29
+ ]}
30
+ >
31
+
32
+ <View style={tw`flex-row justify-between `}>
33
+ <View style={tw`flex-1`}>
34
+ <EText size="lg" style={[tw`font-bold`, { color: Colors['text-primary'] }]}>
35
+ {title}
36
+ </EText>
37
+ <EText size='sm' style={[tw`font-normal mt-1`, {color: Colors['text-body']}]}>
38
+ {description}
39
+ </EText>
40
+ </View>
41
+ <View style={tw`ml-4`}>
42
+ <ChevronRightIcon style={[tw``,{ color: Colors['text-body']}]} size={16} />
43
+ </View>
44
+ </View>
45
+
46
+ <View style={tw`mt-6 flex-row items-center justify-between`}>
47
+ <EBadge
48
+ completed={completed}
49
+ text={completed ? "Complete" : "Pending"}
50
+ color={completed ? Colors['primary-base'] : Colors.warning}
51
+ textColor={completed ? "text-white" : ""}
52
+ size="xs"
53
+ padding='py-1 px-3'
54
+ fontWeight='font-bold'
55
+ />
56
+
57
+ {
58
+ skipButton ? (
59
+ <TouchableOpacity>
60
+ <EText size="sm" style={[tw`ml-2 font-semibold`, {color: Colors['primary-base']}]}>
61
+ Skip
62
+ </EText>
63
+ </TouchableOpacity>) : null
64
+ }
65
+ </View>
66
+ </TouchableOpacity>
67
+ )
68
+ }
@@ -1,37 +1,37 @@
1
- import {
2
- View,
3
- Text,
4
- TouchableOpacity,
5
- Image,
6
- TouchableOpacityProps,
7
- } from "react-native";
8
- import React from "react";
9
- import tw from "../lib/tailwind";
10
- import EText from "./EText";
11
- import { Colors } from "../utils/Color";
12
- // import { Tag } from "..";
13
-
14
- interface ListFormViewProps {
15
- label: string;
16
- description: string;
17
- }
18
-
19
- export default function ListFormView({
20
- label,
21
- description,
22
- }: ListFormViewProps) {
23
- return (
24
- <View style={tw`flex-row items-center justify-between py-3 border-b border-[${Colors.border}]`}>
25
- <View style={tw``}>
26
- <EText size="sm" style={tw`font-normal text-[${Colors["text-secondary"]}]`}>
27
- {label}
28
- </EText>
29
- </View>
30
- <View style={tw`flex-1 ml-4 items-end`}>
31
- <EText size="sm" style={tw`font-normal text-[${Colors["text-primary"]}]`}>
32
- {description}
33
- </EText>
34
- </View>
35
- </View>
36
- );
1
+ import {
2
+ View,
3
+ Text,
4
+ TouchableOpacity,
5
+ Image,
6
+ TouchableOpacityProps,
7
+ } from "react-native";
8
+ import React from "react";
9
+ import tw from "../lib/tailwind";
10
+ import EText from "./EText";
11
+ import { Colors } from "../utils/Color";
12
+ // import { Tag } from "..";
13
+
14
+ interface ListFormViewProps {
15
+ label: string;
16
+ description: string;
17
+ }
18
+
19
+ export default function ListFormView({
20
+ label,
21
+ description,
22
+ }: ListFormViewProps) {
23
+ return (
24
+ <View style={tw`flex-row items-center justify-between py-3 border-b border-[${Colors.border}]`}>
25
+ <View style={tw``}>
26
+ <EText size="sm" style={tw`font-normal text-[${Colors["text-secondary"]}]`}>
27
+ {label}
28
+ </EText>
29
+ </View>
30
+ <View style={tw`flex-1 ml-4 items-end`}>
31
+ <EText size="sm" style={tw`font-normal text-[${Colors["text-primary"]}]`}>
32
+ {description}
33
+ </EText>
34
+ </View>
35
+ </View>
36
+ );
37
37
  }
@@ -1,31 +1,31 @@
1
- import { SCREEN_WIDTH, SCREEN_HEIGHT } from '@gorhom/bottom-sheet'
2
- // import { Colors, EText } from 'fln-espranza'
3
- import EText from './EText';
4
- import React from 'react'
5
- import { View, ActivityIndicator } from 'react-native'
6
- import tw from '../lib/tailwind';
7
- import { Colors } from '../utils/Color';
8
-
9
- interface IProps{
10
- show: boolean
11
- }
12
-
13
- export default function Loader({show}: IProps) {
14
- return (
15
- <>
16
- {show ? <View style={[tw`absolute justify-center items-center z-10 bg-slate-100 `, {
17
- opacity: 0.9,
18
- width: SCREEN_WIDTH,
19
- height: SCREEN_HEIGHT,
20
- }]}>
21
- <View style={[tw`h-24 w-32 bg-white px-2 py-3 justify-center items-center rounded-xl`]}>
22
- <ActivityIndicator size="large" color={Colors['primary-base']} />
23
- <EText size="base" style={tw`text-black`}>Loading...</EText>
24
- </View>
25
- </View>
26
- :
27
- <></>
28
- }
29
- </>
30
- )
31
- }
1
+ import { SCREEN_WIDTH, SCREEN_HEIGHT } from '@gorhom/bottom-sheet'
2
+ // import { Colors, EText } from 'fln-espranza'
3
+ import EText from './EText';
4
+ import React from 'react'
5
+ import { View, ActivityIndicator } from 'react-native'
6
+ import tw from '../lib/tailwind';
7
+ import { Colors } from '../utils/Color';
8
+
9
+ interface IProps{
10
+ show: boolean
11
+ }
12
+
13
+ export default function Loader({show}: IProps) {
14
+ return (
15
+ <>
16
+ {show ? <View style={[tw`absolute justify-center items-center z-10 bg-slate-100 `, {
17
+ opacity: 0.9,
18
+ width: SCREEN_WIDTH,
19
+ height: SCREEN_HEIGHT,
20
+ }]}>
21
+ <View style={[tw`h-24 w-32 bg-white px-2 py-3 justify-center items-center rounded-xl`]}>
22
+ <ActivityIndicator size="large" color={Colors['primary-base']} />
23
+ <EText size="base" style={tw`text-black`}>Loading...</EText>
24
+ </View>
25
+ </View>
26
+ :
27
+ <></>
28
+ }
29
+ </>
30
+ )
31
+ }
@@ -1,46 +1,46 @@
1
- import React from "react";
2
- import { TouchableOpacity, View } from "react-native";
3
- import { HomeIcon } from "react-native-heroicons/solid";
4
- import tw from "../lib/tailwind";
5
- import { Colors } from "../utils/Color";
6
- import EText from "./EText";
7
-
8
- interface IProps {
9
- title?: string;
10
- icon?: JSX.Element;
11
- onPress?: () => void;
12
- }
13
-
14
- export default function MenuItems({ title, icon, onPress }: IProps) {
15
- return (
16
- <TouchableOpacity style={tw`flex-row items-center`} onPress={onPress}>
17
- {/* <HomeIcon style={[tw`w-6 h-6`, { color: Colors["primary-base"] }]} /> */}
18
- {icon ? (
19
- icon
20
- ) : (
21
- <HomeIcon style={[tw`w-6 h-6`, { color: Colors["primary-base"] }]} />
22
- )}
23
- <View
24
- style={[
25
- tw`py-4 ml-4 mr-8 w-[80%]`,
26
- {
27
- borderBottomWidth: 1,
28
- borderBottomColor: Colors.border,
29
- },
30
- ]}
31
- >
32
- <EText
33
- size="base"
34
- style={[
35
- tw`font-medium `,
36
- {
37
- color: Colors["text-primary"],
38
- },
39
- ]}
40
- >
41
- {title ? title : "Dashboard"}
42
- </EText>
43
- </View>
44
- </TouchableOpacity>
45
- );
46
- }
1
+ import React from "react";
2
+ import { TouchableOpacity, View } from "react-native";
3
+ import { HomeIcon } from "react-native-heroicons/solid";
4
+ import tw from "../lib/tailwind";
5
+ import { Colors } from "../utils/Color";
6
+ import EText from "./EText";
7
+
8
+ interface IProps {
9
+ title?: string;
10
+ icon?: JSX.Element;
11
+ onPress?: () => void;
12
+ }
13
+
14
+ export default function MenuItems({ title, icon, onPress }: IProps) {
15
+ return (
16
+ <TouchableOpacity style={tw`flex-row items-center`} onPress={onPress}>
17
+ {/* <HomeIcon style={[tw`w-6 h-6`, { color: Colors["primary-base"] }]} /> */}
18
+ {icon ? (
19
+ icon
20
+ ) : (
21
+ <HomeIcon style={[tw`w-6 h-6`, { color: Colors["primary-base"] }]} />
22
+ )}
23
+ <View
24
+ style={[
25
+ tw`py-4 ml-4 mr-8 w-[80%]`,
26
+ {
27
+ borderBottomWidth: 1,
28
+ borderBottomColor: Colors.border,
29
+ },
30
+ ]}
31
+ >
32
+ <EText
33
+ size="base"
34
+ style={[
35
+ tw`font-medium `,
36
+ {
37
+ color: Colors["text-primary"],
38
+ },
39
+ ]}
40
+ >
41
+ {title ? title : "Dashboard"}
42
+ </EText>
43
+ </View>
44
+ </TouchableOpacity>
45
+ );
46
+ }
@@ -1,129 +1,129 @@
1
- import { View, Animated, Dimensions, Image } from "react-native";
2
- import React, { useEffect, useRef } from "react";
3
- import tw from "../lib/tailwind";
4
- import { useNavigation } from "@react-navigation/native";
5
- import EButtonIcon from "./EButtonIcon";
6
- import EText from "./EText";
7
- import Constants from "expo-constants";
8
- import { MenuIcon } from "react-native-heroicons/outline";
9
-
10
- const SCREEN_WIDTH = Dimensions.get("window").width;
11
- const HEADER_HEIGHT = 90;
12
-
13
- interface PageHeaderProps {
14
- title: string;
15
- subtitle?: string;
16
- curved?: boolean;
17
- children?: JSX.Element;
18
- iconEnd?: JSX.Element;
19
- border?: boolean;
20
- menuButton?: boolean;
21
- }
22
-
23
- export default function PageHeader({
24
- title,
25
- subtitle,
26
- curved,
27
- children,
28
- iconEnd,
29
- border,
30
- menuButton,
31
- }: PageHeaderProps) {
32
- const navigation = useNavigation();
33
-
34
- const translateX = useRef(new Animated.Value(60)).current;
35
- const opacity = useRef(new Animated.Value(0)).current;
36
-
37
- useEffect(() => {
38
- Animated.spring(translateX, {
39
- toValue: 0,
40
- stiffness: 40,
41
- damping: 10,
42
- useNativeDriver: true,
43
- }).start();
44
- Animated.spring(opacity, {
45
- toValue: 1,
46
- delay: 250,
47
- useNativeDriver: true,
48
- }).start();
49
- });
50
- return (
51
- <View style={[tw`${curved ? "-mb-2" : ""} ${border ? "border-b border-slate-300" : ""} `, {}]}>
52
- <View style={tw`overflow-hidden`}>
53
- <Animated.View
54
- style={[
55
- tw`flex-row pr-4 pl-3 pb-3`,
56
- {
57
- paddingTop: Constants.statusBarHeight + 8,
58
- transform: [{ translateX }],
59
- opacity,
60
- },
61
- ]}
62
- >
63
- <Animated.View
64
- style={[tw`-mt-2 left-3 absolute `, { transform: [{ translateX }], opacity, paddingTop: Constants.statusBarHeight + 8 }]}
65
- >
66
- {menuButton ?
67
- <MenuIcon
68
- onPress={() => navigation?.openDrawer()}
69
- size={24}
70
- // onPress={() => navigation.navigate("Dashboard")}
71
- style={tw`text-slate-900 mt-2`}
72
- />
73
- :
74
-
75
- <EButtonIcon
76
- iconColor={curved ? "white" : "tint-slate-900"}
77
- size={24}
78
- // onPress={() => navigation.navigate("Dashboard")}
79
- onPress={() => navigation.goBack()}
80
- />
81
- }
82
- </Animated.View>
83
- <View style={tw`flex-1 items-center`}>
84
- <EText
85
- size="base"
86
- style={tw.style("text-black font-semibold ", curved && "text-white ")}
87
- >
88
- {title}
89
- </EText>
90
- {subtitle ? (
91
- <EText
92
- style={tw.style(
93
- "text-slate-800 opacity-40 font-semibold mt-0.25",
94
- curved && "text-white "
95
- )}
96
- >
97
- {subtitle}
98
- </EText>
99
- ) : null}
100
- </View>
101
-
102
- {iconEnd ? (
103
- <View style={[tw`mt-0.5 items-center justify-center`, {}]}>
104
- {iconEnd}
105
- </View>
106
- ) : null}
107
- </Animated.View>
108
- {children ? <View style={tw.style("pb-6")}>{children}</View> : null}
109
- </View>
110
-
111
- {/* MASK */}
112
- {curved ? (
113
- <View
114
- style={[
115
- tw``,
116
- { height: 32, width: SCREEN_WIDTH, backgroundColor: "#0547FA" },
117
- ]}
118
- >
119
- <View
120
- style={[
121
- tw`bg-white -z-0`,
122
- { height: 64, width: SCREEN_WIDTH, borderTopLeftRadius: 32 },
123
- ]}
124
- />
125
- </View>
126
- ) : null}
127
- </View>
128
- );
129
- }
1
+ import { View, Animated, Dimensions, Image } from "react-native";
2
+ import React, { useEffect, useRef } from "react";
3
+ import tw from "../lib/tailwind";
4
+ import { useNavigation } from "@react-navigation/native";
5
+ import EButtonIcon from "./EButtonIcon";
6
+ import EText from "./EText";
7
+ import Constants from "expo-constants";
8
+ import { MenuIcon } from "react-native-heroicons/outline";
9
+
10
+ const SCREEN_WIDTH = Dimensions.get("window").width;
11
+ const HEADER_HEIGHT = 90;
12
+
13
+ interface PageHeaderProps {
14
+ title: string;
15
+ subtitle?: string;
16
+ curved?: boolean;
17
+ children?: JSX.Element;
18
+ iconEnd?: JSX.Element;
19
+ border?: boolean;
20
+ menuButton?: boolean;
21
+ }
22
+
23
+ export default function PageHeader({
24
+ title,
25
+ subtitle,
26
+ curved,
27
+ children,
28
+ iconEnd,
29
+ border,
30
+ menuButton,
31
+ }: PageHeaderProps) {
32
+ const navigation = useNavigation();
33
+
34
+ const translateX = useRef(new Animated.Value(60)).current;
35
+ const opacity = useRef(new Animated.Value(0)).current;
36
+
37
+ useEffect(() => {
38
+ Animated.spring(translateX, {
39
+ toValue: 0,
40
+ stiffness: 40,
41
+ damping: 10,
42
+ useNativeDriver: true,
43
+ }).start();
44
+ Animated.spring(opacity, {
45
+ toValue: 1,
46
+ delay: 250,
47
+ useNativeDriver: true,
48
+ }).start();
49
+ });
50
+ return (
51
+ <View style={[tw`${curved ? "-mb-2" : ""} ${border ? "border-b border-slate-300" : ""} `, {}]}>
52
+ <View style={tw`overflow-hidden`}>
53
+ <Animated.View
54
+ style={[
55
+ tw`flex-row pr-4 pl-3 pb-3`,
56
+ {
57
+ paddingTop: Constants.statusBarHeight + 8,
58
+ transform: [{ translateX }],
59
+ opacity,
60
+ },
61
+ ]}
62
+ >
63
+ <Animated.View
64
+ style={[tw`-mt-2 left-3 absolute `, { transform: [{ translateX }], opacity, paddingTop: Constants.statusBarHeight + 8 }]}
65
+ >
66
+ {menuButton ?
67
+ <MenuIcon
68
+ onPress={() => navigation?.openDrawer()}
69
+ size={24}
70
+ // onPress={() => navigation.navigate("Dashboard")}
71
+ style={tw`text-slate-900 mt-2`}
72
+ />
73
+ :
74
+
75
+ <EButtonIcon
76
+ iconColor={curved ? "white" : "tint-slate-900"}
77
+ size={24}
78
+ // onPress={() => navigation.navigate("Dashboard")}
79
+ onPress={() => navigation.goBack()}
80
+ />
81
+ }
82
+ </Animated.View>
83
+ <View style={tw`flex-1 items-center`}>
84
+ <EText
85
+ size="base"
86
+ style={tw.style("text-black font-semibold ", curved && "text-white ")}
87
+ >
88
+ {title}
89
+ </EText>
90
+ {subtitle ? (
91
+ <EText
92
+ style={tw.style(
93
+ "text-slate-800 opacity-40 font-semibold mt-0.25",
94
+ curved && "text-white "
95
+ )}
96
+ >
97
+ {subtitle}
98
+ </EText>
99
+ ) : null}
100
+ </View>
101
+
102
+ {iconEnd ? (
103
+ <View style={[tw`mt-0.5 items-center justify-center`, {}]}>
104
+ {iconEnd}
105
+ </View>
106
+ ) : null}
107
+ </Animated.View>
108
+ {children ? <View style={tw.style("pb-6")}>{children}</View> : null}
109
+ </View>
110
+
111
+ {/* MASK */}
112
+ {curved ? (
113
+ <View
114
+ style={[
115
+ tw``,
116
+ { height: 32, width: SCREEN_WIDTH, backgroundColor: "#0547FA" },
117
+ ]}
118
+ >
119
+ <View
120
+ style={[
121
+ tw`bg-white -z-0`,
122
+ { height: 64, width: SCREEN_WIDTH, borderTopLeftRadius: 32 },
123
+ ]}
124
+ />
125
+ </View>
126
+ ) : null}
127
+ </View>
128
+ );
129
+ }