fln-espranza 1.1.5 → 1.1.7
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/components/Drawer.tsx +31 -26
- package/components/EButton.tsx +7 -15
- package/components/EButtonIcon.tsx +3 -3
- package/components/EDateAndTimeCard.tsx +15 -8
- package/components/EIcon.tsx +1 -1
- package/components/EInput.tsx +0 -1
- package/components/EPillButton.tsx +0 -2
- package/components/ESegment.tsx +1 -0
- package/components/MenuItems.tsx +0 -1
- package/components/PageHeader.tsx +5 -5
- package/components/SecondaryBaseLayout.tsx +2 -2
- package/package.json +1 -1
package/components/Drawer.tsx
CHANGED
|
@@ -9,16 +9,29 @@ import Avatar from "./Avatar";
|
|
|
9
9
|
import { Colors } from "../utils/Color";
|
|
10
10
|
import MenuItems from "./MenuItems";
|
|
11
11
|
|
|
12
|
-
|
|
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) => {
|
|
13
26
|
return (
|
|
14
27
|
<ScrollView
|
|
15
28
|
scrollEnabled={true}
|
|
16
29
|
showsVerticalScrollIndicator={false}
|
|
17
30
|
style={{
|
|
18
31
|
position: 'relative',
|
|
19
|
-
backgroundColor: '#
|
|
32
|
+
backgroundColor: '#ffffff',
|
|
20
33
|
}}>
|
|
21
|
-
<View style={tw`mx-4`}>
|
|
34
|
+
<View style={tw`mx-4 pt-4`}>
|
|
22
35
|
<Spacer height={30} />
|
|
23
36
|
|
|
24
37
|
<View style={tw`flex w-full mt-5`}>
|
|
@@ -26,41 +39,33 @@ const Drawer = ({ navigation }: any) => {
|
|
|
26
39
|
<Avatar
|
|
27
40
|
size="sm"
|
|
28
41
|
source={""}
|
|
29
|
-
nameFirstLetter={"
|
|
42
|
+
nameFirstLetter={name?.split("")[0]}
|
|
30
43
|
bg={"sky-400"}
|
|
31
44
|
/>
|
|
32
45
|
<View style={tw`ml-3`}>
|
|
33
|
-
<EText size={"xl"} style={tw`font-bold -mt-1`}>{
|
|
46
|
+
<EText size={"xl"} style={tw`font-bold -mt-1`}>{name}</EText>
|
|
34
47
|
<EText size="sm" style={[tw`font-normal`, {
|
|
35
48
|
color: Colors["text-body"]
|
|
36
49
|
}]}>
|
|
37
|
-
{
|
|
50
|
+
{profile}
|
|
38
51
|
</EText>
|
|
39
52
|
</View>
|
|
40
53
|
</View>
|
|
41
54
|
</View>
|
|
42
55
|
|
|
43
56
|
<Spacer height={30} />
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
<MenuItems
|
|
57
|
-
title={"Mentoring Resources"}
|
|
58
|
-
icon={<ViewBoardsIcon style={[tw`w-6 h-6`, { color: Colors["primary-base"] }]} />}
|
|
59
|
-
/>
|
|
60
|
-
<MenuItems
|
|
61
|
-
title={"Cluster Performance"}
|
|
62
|
-
icon={<TemplateIcon style={[tw`w-6 h-6`, { color: Colors["primary-base"] }]} />}
|
|
63
|
-
/>
|
|
57
|
+
{
|
|
58
|
+
menuItems.map((item, index) => {
|
|
59
|
+
return (
|
|
60
|
+
<MenuItems
|
|
61
|
+
key={index}
|
|
62
|
+
title={item.title}
|
|
63
|
+
icon={item.icon}
|
|
64
|
+
onPress={() => navigation.navigate(item.screen)}
|
|
65
|
+
/>
|
|
66
|
+
)
|
|
67
|
+
})
|
|
68
|
+
}
|
|
64
69
|
<Spacer />
|
|
65
70
|
<Spacer />
|
|
66
71
|
<MenuItems
|
package/components/EButton.tsx
CHANGED
|
@@ -16,6 +16,8 @@ interface EButtonProps extends TouchableOpacityProps {
|
|
|
16
16
|
inline?: boolean;
|
|
17
17
|
small?: boolean;
|
|
18
18
|
type?: "secondary" | "clear" | "primary";
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
children: any;
|
|
19
21
|
}
|
|
20
22
|
|
|
21
23
|
export default function EButton({
|
|
@@ -27,17 +29,19 @@ export default function EButton({
|
|
|
27
29
|
inline,
|
|
28
30
|
small,
|
|
29
31
|
type,
|
|
32
|
+
disabled,
|
|
30
33
|
...props
|
|
31
34
|
}: EButtonProps) {
|
|
32
35
|
return (
|
|
33
36
|
<TouchableOpacity
|
|
34
37
|
activeOpacity={0.8}
|
|
38
|
+
disabled={disabled}
|
|
35
39
|
{...props}
|
|
36
40
|
style={[tw`${inline ? "items-start" : ""}`, {}]}
|
|
37
41
|
>
|
|
38
42
|
<View
|
|
39
43
|
style={[
|
|
40
|
-
tw`h-14 flex-row justify-center items-center px-8 rounded-full ${
|
|
44
|
+
tw`h-14 flex-row justify-center items-center px-8 rounded-full ${disabled ? "opacity-60" : ""} ${
|
|
41
45
|
type === "clear"
|
|
42
46
|
? "bg-transparent"
|
|
43
47
|
: type === "secondary"
|
|
@@ -50,14 +54,14 @@ export default function EButton({
|
|
|
50
54
|
{iconL ? <View style={tw`mr-1 -ml-2`}>{iconL}</View> : null}
|
|
51
55
|
{/* LABEL */}
|
|
52
56
|
<EText
|
|
53
|
-
size={
|
|
57
|
+
size={"sm"}
|
|
54
58
|
style={[
|
|
55
59
|
tw`font-semibold ${
|
|
56
60
|
type === "clear" ? `text-[${Colors["primary-base"]}]` : "text-white"
|
|
57
61
|
}`,
|
|
58
62
|
]}
|
|
59
63
|
>
|
|
60
|
-
{children}
|
|
64
|
+
{children }
|
|
61
65
|
</EText>
|
|
62
66
|
|
|
63
67
|
{/* ICON RIGHT */}
|
|
@@ -67,15 +71,3 @@ export default function EButton({
|
|
|
67
71
|
);
|
|
68
72
|
}
|
|
69
73
|
|
|
70
|
-
// style={[
|
|
71
|
-
// tw` ${
|
|
72
|
-
// withoutbackground ? "" : " shadow-md shadow-green-500 rounded-full"
|
|
73
|
-
// } flex items-center justify-center ${
|
|
74
|
-
// small ? "h-12 px-4" : "h-14 px-6 "
|
|
75
|
-
// } ${secondary ? "bg-purple-500 shadow-none" : ""}`,
|
|
76
|
-
// {
|
|
77
|
-
// backgroundColor: withoutbackground
|
|
78
|
-
// ? "transparent"
|
|
79
|
-
// : Colors["primary-base"],
|
|
80
|
-
// },
|
|
81
|
-
// ]}
|
|
@@ -22,14 +22,14 @@ export default function EButtonIcon({
|
|
|
22
22
|
return (
|
|
23
23
|
<TouchableOpacity {...props}>
|
|
24
24
|
<View
|
|
25
|
-
style={tw`h-9 w-9 items-center justify-center bg-${backgroundColor} rounded-full ${
|
|
25
|
+
style={tw`h-9 w-9 items-center justify-center bg-${backgroundColor ? backgroundColor : ""} rounded-full ${
|
|
26
26
|
shadow ? "shadow-xl shadow-slate-400" : ""
|
|
27
27
|
}`}
|
|
28
28
|
>
|
|
29
29
|
{type === "close" ? (
|
|
30
|
-
<XIcon size={20} style={tw`text-${iconColor}`} />
|
|
30
|
+
<XIcon size={20} style={tw`text-${iconColor? iconColor: ""}`} />
|
|
31
31
|
) : (
|
|
32
|
-
<ArrowNarrowLeftIcon size={20} style={tw`text-${iconColor}`} />
|
|
32
|
+
<ArrowNarrowLeftIcon size={20} style={tw`text-${iconColor? iconColor : ""}`} />
|
|
33
33
|
)}
|
|
34
34
|
</View>
|
|
35
35
|
</TouchableOpacity>
|
|
@@ -5,7 +5,15 @@ import tw from "../lib/tailwind";
|
|
|
5
5
|
import { Colors } from "../utils/Color";
|
|
6
6
|
import EText from "./EText";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
interface IProps{
|
|
9
|
+
date: string;
|
|
10
|
+
month: string;
|
|
11
|
+
day: string;
|
|
12
|
+
time: string;
|
|
13
|
+
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default function EDateAndTimeCard( {date, month, day, time}: IProps) {
|
|
9
17
|
return (
|
|
10
18
|
<View
|
|
11
19
|
style={[tw`flex-row pb-4 border-b`, { borderBottomColor: Colors.border }]}
|
|
@@ -17,24 +25,23 @@ export default function EDateAndTimeCard() {
|
|
|
17
25
|
]}
|
|
18
26
|
>
|
|
19
27
|
<EText size="xl" style={tw`font-bold text-white -mb-1`}>
|
|
20
|
-
{
|
|
28
|
+
{date}
|
|
21
29
|
</EText>
|
|
22
30
|
<EText size="xs" style={tw`font-bold text-white`}>
|
|
23
|
-
{
|
|
31
|
+
{month}
|
|
24
32
|
</EText>
|
|
25
33
|
</View>
|
|
26
34
|
<View style={tw`ml-3`}>
|
|
27
35
|
<EText size="base" style={tw`font-bold text-black opacity-80 -mb-1`}>
|
|
28
|
-
{
|
|
36
|
+
{day}
|
|
29
37
|
</EText>
|
|
30
38
|
<View style={tw`flex-row justify-center items-center mt-2`}>
|
|
31
|
-
<ClockIcon size={
|
|
39
|
+
<ClockIcon size={14} style={tw`text-slate-400`} />
|
|
32
40
|
<EText
|
|
33
41
|
size="sm"
|
|
34
|
-
style={tw`ml-
|
|
35
|
-
numberOfLines={2}
|
|
42
|
+
style={tw`ml-0.5 text-slate-400 font-medium`}
|
|
36
43
|
>
|
|
37
|
-
{
|
|
44
|
+
{time}
|
|
38
45
|
</EText>
|
|
39
46
|
</View>
|
|
40
47
|
</View>
|
package/components/EIcon.tsx
CHANGED
|
@@ -21,7 +21,7 @@ export default function EIcon({
|
|
|
21
21
|
<View style={[{height: size, width: size}, style]}>
|
|
22
22
|
<Image
|
|
23
23
|
source={source}
|
|
24
|
-
style={[tw`w-full h-full tint-${tintColor} opacity-${opacity}`, {}]}
|
|
24
|
+
style={[tw`w-full h-full tint-${tintColor ? tintColor : "slate-900"} opacity-${opacity ? opacity : "100"}`, {}]}
|
|
25
25
|
/>
|
|
26
26
|
</View>
|
|
27
27
|
);
|
package/components/EInput.tsx
CHANGED
|
@@ -11,8 +11,6 @@ interface IProps {
|
|
|
11
11
|
|
|
12
12
|
export default function EPillButton( { title, active }: IProps) {
|
|
13
13
|
return (
|
|
14
|
-
// <TouchableOpacity style={tw`px-4 py-3 mr-3 border rounded-lg border-slate-300
|
|
15
|
-
// ${active ? "bg-purple-900 border-purple-900" : "border-slate-300"}`}>
|
|
16
14
|
<TouchableOpacity style={[tw`px-4 py-3 mr-2 border rounded-lg border-slate-300`, {
|
|
17
15
|
backgroundColor: active ? Colors['secondary-base'] : "transparent",
|
|
18
16
|
borderColor: active ? Colors['secondary-base'] : Colors['border'],
|
package/components/ESegment.tsx
CHANGED
|
@@ -12,6 +12,7 @@ export function ESegmentItem(props: any) {
|
|
|
12
12
|
"py-1.5 px-4 rounded items-center w-1/2",
|
|
13
13
|
isActive && "bg-white shadow-lg shadow-slate-500 "
|
|
14
14
|
)}
|
|
15
|
+
onPress={onPress}
|
|
15
16
|
>
|
|
16
17
|
<View style={tw`items-center`}>
|
|
17
18
|
<EText size="xs" style={tw`font-bold ${!isActive ? "text-white": ""}`}>{label}</EText>
|
package/components/MenuItems.tsx
CHANGED
|
@@ -50,7 +50,7 @@ export default function PageHeader({
|
|
|
50
50
|
return (
|
|
51
51
|
<View style={[tw`${curved ? "-mb-2" : ""} ${border ? "border-b border-slate-300" : ""} `, {}]}>
|
|
52
52
|
<View style={tw`overflow-hidden`}>
|
|
53
|
-
{curved ? (
|
|
53
|
+
{/* curved ? (
|
|
54
54
|
<Image
|
|
55
55
|
resizeMode="cover"
|
|
56
56
|
// source={require("../assets/images/bg-header.jpg")}
|
|
@@ -59,7 +59,7 @@ export default function PageHeader({
|
|
|
59
59
|
{ width: SCREEN_WIDTH, borderBottomRightRadius: 32 },
|
|
60
60
|
]}
|
|
61
61
|
/>
|
|
62
|
-
|
|
62
|
+
) : null */}
|
|
63
63
|
<Animated.View
|
|
64
64
|
style={[
|
|
65
65
|
tw`flex-row pr-4 pl-3 pb-3`,
|
|
@@ -76,7 +76,7 @@ export default function PageHeader({
|
|
|
76
76
|
{menuButton ?
|
|
77
77
|
<MenuIcon
|
|
78
78
|
onPress={() => navigation?.openDrawer()}
|
|
79
|
-
size={
|
|
79
|
+
size={24}
|
|
80
80
|
// onPress={() => navigation.navigate("Dashboard")}
|
|
81
81
|
style={tw`text-slate-900 mt-2`}
|
|
82
82
|
/>
|
|
@@ -84,7 +84,7 @@ export default function PageHeader({
|
|
|
84
84
|
|
|
85
85
|
<EButtonIcon
|
|
86
86
|
iconColor={curved ? "white" : "tint-slate-900"}
|
|
87
|
-
size={
|
|
87
|
+
size={24}
|
|
88
88
|
// onPress={() => navigation.navigate("Dashboard")}
|
|
89
89
|
onPress={() => navigation.goBack()}
|
|
90
90
|
/>
|
|
@@ -92,7 +92,7 @@ export default function PageHeader({
|
|
|
92
92
|
</Animated.View>
|
|
93
93
|
<View style={tw`flex-1 items-center`}>
|
|
94
94
|
<EText
|
|
95
|
-
size="
|
|
95
|
+
size="base"
|
|
96
96
|
style={tw.style("text-black font-semibold ", curved && "text-white ")}
|
|
97
97
|
>
|
|
98
98
|
{title}
|
|
@@ -61,7 +61,7 @@ export default function SecondaryBaseLayout({
|
|
|
61
61
|
{/* HEADER */}
|
|
62
62
|
<View
|
|
63
63
|
style={[
|
|
64
|
-
tw`absolute top-0 right-0 left-0
|
|
64
|
+
tw`absolute top-0 right-0 left-0 pt-2 z-10 w-full bg-white ${title ? 'mb-1' : 'pb-0'}`,
|
|
65
65
|
// {height: 64},
|
|
66
66
|
]}
|
|
67
67
|
>
|
|
@@ -93,7 +93,7 @@ export default function SecondaryBaseLayout({
|
|
|
93
93
|
>
|
|
94
94
|
{children}
|
|
95
95
|
</ScrollView>
|
|
96
|
-
{bottomButton ? <View style={tw` px-4 mb-
|
|
96
|
+
{bottomButton ? <View style={tw` px-4 mb-6 `}>
|
|
97
97
|
{bottomButton}
|
|
98
98
|
</View> : <></>}
|
|
99
99
|
</View>
|