fln-espranza 0.0.15 → 0.0.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.
- package/.expo/README.md +15 -15
- package/.expo/settings.json +8 -8
- package/components/Avatar.tsx +42 -42
- package/components/BaseLayout.tsx +174 -174
- package/components/Drawer.tsx +98 -98
- package/components/EBadge.tsx +23 -23
- package/components/EButton.tsx +71 -71
- package/components/EDateAndTimeCard.tsx +51 -51
- package/components/EDateInput.tsx +55 -55
- package/components/EEmptyPlaceholder.tsx +21 -21
- package/components/EErrorText.tsx +19 -19
- package/components/EInfoBox.tsx +41 -41
- package/components/EInput.tsx +52 -52
- package/components/ELabel.tsx +15 -15
- package/components/EListPerson.tsx +40 -40
- package/components/EListSchool.tsx +35 -35
- package/components/EOption.tsx +34 -34
- package/components/EOtpInputBox.tsx +49 -49
- package/components/EPageDescription.tsx +19 -19
- package/components/EPillButton.tsx +33 -33
- package/components/EProfile.tsx +62 -62
- package/components/EProgressBar.tsx +33 -33
- package/components/EQuestionSerialNumberLabel.tsx +17 -17
- package/components/EQuestionText.tsx +14 -14
- package/components/ESegment.tsx +36 -36
- package/components/EText.tsx +41 -41
- package/components/ETimeInput.tsx +55 -55
- package/components/ETimeLineCard.tsx +68 -68
- package/components/ListFormView.tsx +36 -36
- package/components/Loader.tsx +31 -31
- package/components/MenuItems.tsx +46 -46
- package/components/PageHeader.tsx +115 -115
- package/components/SecondaryBaseLayout.tsx +102 -102
- package/components/Timer.tsx +56 -56
- package/components/icons/EIconAdd.jsx +19 -19
- package/components/icons/EIconAddCircle.jsx +21 -21
- package/components/icons/EIconApplicationStatus.jsx +20 -20
- package/components/icons/EIconArrowDown.jsx +20 -20
- package/components/icons/EIconArrowLeft.jsx +21 -21
- package/components/icons/EIconArrowRight.jsx +21 -21
- package/components/icons/EIconArrowUp.jsx +20 -20
- package/components/icons/EIconBadge.jsx +20 -20
- package/components/icons/EIconBell.jsx +19 -19
- package/components/icons/EIconCalendar.jsx +21 -21
- package/components/icons/EIconCalendarCheck.jsx +24 -24
- package/components/icons/EIconCamera.jsx +20 -20
- package/components/icons/EIconCameraRotate.jsx +23 -23
- package/components/icons/EIconCheck.jsx +19 -19
- package/components/icons/EIconCheckCircle.jsx +20 -20
- package/components/icons/EIconCheckFill.jsx +19 -19
- package/components/icons/EIconChevronDown.jsx +19 -19
- package/components/icons/EIconChevronLeft.jsx +19 -19
- package/components/icons/EIconChevronRight.jsx +19 -19
- package/components/icons/EIconChevronUp.jsx +19 -19
- package/components/icons/EIconClock.jsx +19 -19
- package/components/icons/EIconClose.jsx +19 -19
- package/components/icons/EIconDashboard.jsx +20 -20
- package/components/icons/EIconEdit.jsx +19 -19
- package/components/icons/EIconFile.jsx +21 -21
- package/components/icons/EIconInfo.jsx +20 -20
- package/components/icons/EIconLogout.jsx +19 -19
- package/components/icons/EIconMenu.jsx +19 -19
- package/components/icons/EIconMinus.jsx +19 -19
- package/components/icons/EIconPin.jsx +19 -19
- package/components/icons/EIconProfile.jsx +19 -19
- package/components/icons/EIconSchool.jsx +24 -24
- package/components/icons/EIconSearch.jsx +19 -19
- package/components/icons/EIconSettings.jsx +20 -20
- package/components/icons/EIconShare.jsx +21 -21
- package/components/icons/EIconStudent.jsx +23 -23
- package/components/icons/EIconSubject.jsx +21 -21
- package/components/icons/EIconTeach.jsx +21 -21
- package/components/icons/EIconTrash.jsx +19 -19
- package/components/icons/EIconUserCard.jsx +19 -19
- package/components/icons/EIconUserCheck.jsx +20 -20
- package/components/icons/EIconUsers.jsx +19 -19
- package/components/index.tsx +65 -65
- package/index.ts +172 -172
- package/package.json +26 -26
- package/utils/Color.ts +14 -14
package/components/Drawer.tsx
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ScrollView, View, TouchableOpacity } from "react-native";
|
|
3
|
-
import {
|
|
4
|
-
HomeIcon,
|
|
5
|
-
CalendarIcon,
|
|
6
|
-
TemplateIcon,
|
|
7
|
-
ViewBoardsIcon,
|
|
8
|
-
} from "react-native-heroicons/solid";
|
|
9
|
-
import { StyleSheet } from "react-native";
|
|
10
|
-
import tw from "../lib/tailwind";
|
|
11
|
-
import EText from "./EText";
|
|
12
|
-
import Spacer from "./Spacer";
|
|
13
|
-
import Avatar from "./Avatar";
|
|
14
|
-
import { Colors } from "../utils/Color";
|
|
15
|
-
import MenuItems from "./MenuItems";
|
|
16
|
-
import EIconLogout from "./icons/EIconLogout";
|
|
17
|
-
|
|
18
|
-
type menuItems = {
|
|
19
|
-
title: string;
|
|
20
|
-
icon: any;
|
|
21
|
-
screen: string;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
interface IProps {
|
|
25
|
-
name: string;
|
|
26
|
-
profile: string;
|
|
27
|
-
menuItems: menuItems[];
|
|
28
|
-
navigation: any;
|
|
29
|
-
logout?: () => void;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const Drawer = ({ name, profile, menuItems, navigation, logout }: IProps) => {
|
|
33
|
-
return (
|
|
34
|
-
<ScrollView
|
|
35
|
-
scrollEnabled={true}
|
|
36
|
-
showsVerticalScrollIndicator={false}
|
|
37
|
-
style={{
|
|
38
|
-
position: "relative",
|
|
39
|
-
backgroundColor: "#ffffff",
|
|
40
|
-
}}
|
|
41
|
-
>
|
|
42
|
-
<View style={tw`mx-4 pt-4`}>
|
|
43
|
-
<Spacer height={30} />
|
|
44
|
-
|
|
45
|
-
<View style={tw`flex w-full mt-5`}>
|
|
46
|
-
<View style={tw`flex-row items-center`}>
|
|
47
|
-
<Avatar
|
|
48
|
-
size="sm"
|
|
49
|
-
source={""}
|
|
50
|
-
nameFirstLetter={name?.split("")[0]}
|
|
51
|
-
/>
|
|
52
|
-
<View style={tw`ml-3`}>
|
|
53
|
-
<EText size={"xl"} style={tw`font-bold -mt-1`}>
|
|
54
|
-
{name}
|
|
55
|
-
</EText>
|
|
56
|
-
<EText
|
|
57
|
-
size="sm"
|
|
58
|
-
style={[
|
|
59
|
-
tw`font-normal`,
|
|
60
|
-
{
|
|
61
|
-
color: Colors["text-body"],
|
|
62
|
-
},
|
|
63
|
-
]}
|
|
64
|
-
>
|
|
65
|
-
{profile}
|
|
66
|
-
</EText>
|
|
67
|
-
</View>
|
|
68
|
-
</View>
|
|
69
|
-
</View>
|
|
70
|
-
|
|
71
|
-
<Spacer height={30} />
|
|
72
|
-
{menuItems.map((item, index) => {
|
|
73
|
-
return (
|
|
74
|
-
<MenuItems
|
|
75
|
-
key={index}
|
|
76
|
-
title={item.title}
|
|
77
|
-
icon={item.icon}
|
|
78
|
-
onPress={() => navigation.navigate(item.screen)}
|
|
79
|
-
/>
|
|
80
|
-
);
|
|
81
|
-
})}
|
|
82
|
-
|
|
83
|
-
<MenuItems
|
|
84
|
-
title={"Logout"}
|
|
85
|
-
icon={
|
|
86
|
-
<EIconLogout
|
|
87
|
-
size={24}
|
|
88
|
-
style={tw`text-[${Colors["primary-base"]}]`}
|
|
89
|
-
/>
|
|
90
|
-
}
|
|
91
|
-
onPress={() => logout()}
|
|
92
|
-
/>
|
|
93
|
-
</View>
|
|
94
|
-
</ScrollView>
|
|
95
|
-
);
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
export default Drawer;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ScrollView, View, TouchableOpacity } from "react-native";
|
|
3
|
+
import {
|
|
4
|
+
HomeIcon,
|
|
5
|
+
CalendarIcon,
|
|
6
|
+
TemplateIcon,
|
|
7
|
+
ViewBoardsIcon,
|
|
8
|
+
} from "react-native-heroicons/solid";
|
|
9
|
+
import { StyleSheet } from "react-native";
|
|
10
|
+
import tw from "../lib/tailwind";
|
|
11
|
+
import EText from "./EText";
|
|
12
|
+
import Spacer from "./Spacer";
|
|
13
|
+
import Avatar from "./Avatar";
|
|
14
|
+
import { Colors } from "../utils/Color";
|
|
15
|
+
import MenuItems from "./MenuItems";
|
|
16
|
+
import EIconLogout from "./icons/EIconLogout";
|
|
17
|
+
|
|
18
|
+
type menuItems = {
|
|
19
|
+
title: string;
|
|
20
|
+
icon: any;
|
|
21
|
+
screen: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
interface IProps {
|
|
25
|
+
name: string;
|
|
26
|
+
profile: string;
|
|
27
|
+
menuItems: menuItems[];
|
|
28
|
+
navigation: any;
|
|
29
|
+
logout?: () => void;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const Drawer = ({ name, profile, menuItems, navigation, logout }: IProps) => {
|
|
33
|
+
return (
|
|
34
|
+
<ScrollView
|
|
35
|
+
scrollEnabled={true}
|
|
36
|
+
showsVerticalScrollIndicator={false}
|
|
37
|
+
style={{
|
|
38
|
+
position: "relative",
|
|
39
|
+
backgroundColor: "#ffffff",
|
|
40
|
+
}}
|
|
41
|
+
>
|
|
42
|
+
<View style={tw`mx-4 pt-4`}>
|
|
43
|
+
<Spacer height={30} />
|
|
44
|
+
|
|
45
|
+
<View style={tw`flex w-full mt-5`}>
|
|
46
|
+
<View style={tw`flex-row items-center`}>
|
|
47
|
+
<Avatar
|
|
48
|
+
size="sm"
|
|
49
|
+
source={""}
|
|
50
|
+
nameFirstLetter={name?.split("")[0]}
|
|
51
|
+
/>
|
|
52
|
+
<View style={tw`ml-3`}>
|
|
53
|
+
<EText size={"xl"} style={tw`font-bold -mt-1`}>
|
|
54
|
+
{name}
|
|
55
|
+
</EText>
|
|
56
|
+
<EText
|
|
57
|
+
size="sm"
|
|
58
|
+
style={[
|
|
59
|
+
tw`font-normal`,
|
|
60
|
+
{
|
|
61
|
+
color: Colors["text-body"],
|
|
62
|
+
},
|
|
63
|
+
]}
|
|
64
|
+
>
|
|
65
|
+
{profile}
|
|
66
|
+
</EText>
|
|
67
|
+
</View>
|
|
68
|
+
</View>
|
|
69
|
+
</View>
|
|
70
|
+
|
|
71
|
+
<Spacer height={30} />
|
|
72
|
+
{menuItems.map((item, index) => {
|
|
73
|
+
return (
|
|
74
|
+
<MenuItems
|
|
75
|
+
key={index}
|
|
76
|
+
title={item.title}
|
|
77
|
+
icon={item.icon}
|
|
78
|
+
onPress={() => navigation.navigate(item.screen)}
|
|
79
|
+
/>
|
|
80
|
+
);
|
|
81
|
+
})}
|
|
82
|
+
|
|
83
|
+
<MenuItems
|
|
84
|
+
title={"Logout"}
|
|
85
|
+
icon={
|
|
86
|
+
<EIconLogout
|
|
87
|
+
size={24}
|
|
88
|
+
style={tw`text-[${Colors["primary-base"]}]`}
|
|
89
|
+
/>
|
|
90
|
+
}
|
|
91
|
+
onPress={() => logout && logout()}
|
|
92
|
+
/>
|
|
93
|
+
</View>
|
|
94
|
+
</ScrollView>
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export default Drawer;
|
package/components/EBadge.tsx
CHANGED
|
@@ -1,23 +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
|
-
color?: string;
|
|
11
|
-
completed?: boolean;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export default function EBadge({ text, completed, color }: IProps) {
|
|
15
|
-
return (
|
|
16
|
-
<View style={[tw`flex-row p-1 px-2 bg-[${color}] rounded-full`, ]}>
|
|
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
|
-
}
|
|
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`flex-row p-1 px-2 bg-[${color}] rounded-full`, ]}>
|
|
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
|
+
}
|
package/components/EButton.tsx
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import {
|
|
2
|
-
View,
|
|
3
|
-
Text,
|
|
4
|
-
TouchableOpacity,
|
|
5
|
-
TouchableOpacityProps,
|
|
6
|
-
} from "react-native";
|
|
7
|
-
import React from "react";
|
|
8
|
-
import tw from "../lib/tailwind";
|
|
9
|
-
import EText from "./EText";
|
|
10
|
-
import { Colors } from "../utils/Color";
|
|
11
|
-
|
|
12
|
-
interface EButtonProps extends TouchableOpacityProps {
|
|
13
|
-
iconL?: JSX.Element;
|
|
14
|
-
iconR?: JSX.Element;
|
|
15
|
-
inline?: boolean;
|
|
16
|
-
small?: boolean;
|
|
17
|
-
type?: "secondary" | "clear" | "primary";
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
children: any;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export default function EButton({
|
|
23
|
-
// label,
|
|
24
|
-
children,
|
|
25
|
-
iconL,
|
|
26
|
-
iconR,
|
|
27
|
-
inline,
|
|
28
|
-
small,
|
|
29
|
-
type,
|
|
30
|
-
disabled,
|
|
31
|
-
...props
|
|
32
|
-
}: EButtonProps) {
|
|
33
|
-
return (
|
|
34
|
-
<TouchableOpacity
|
|
35
|
-
activeOpacity={0.8}
|
|
36
|
-
disabled={disabled}
|
|
37
|
-
{...props}
|
|
38
|
-
style={[tw`${inline ? "items-start" : ""}`, {}]}
|
|
39
|
-
>
|
|
40
|
-
<View
|
|
41
|
-
style={[
|
|
42
|
-
tw`flex-row justify-center items-center px-8 rounded-full ${small ? 'h-10' : 'h-14'} ${disabled ? "opacity-40" : ""} ${
|
|
43
|
-
type === "clear"
|
|
44
|
-
? "bg-transparent"
|
|
45
|
-
: type === "secondary"
|
|
46
|
-
? `bg-[${Colors["secondary-base"]}] self-start px-5 h-11`
|
|
47
|
-
: `bg-[${Colors["primary-base"]}]`
|
|
48
|
-
}`,
|
|
49
|
-
]}
|
|
50
|
-
>
|
|
51
|
-
{/* ICON LEFT */}
|
|
52
|
-
{iconL ? <View style={tw`mr-1 -ml-2`}>{iconL}</View> : null}
|
|
53
|
-
{/* LABEL */}
|
|
54
|
-
<EText
|
|
55
|
-
size={"sm"}
|
|
56
|
-
style={[
|
|
57
|
-
tw`font-semibold ${
|
|
58
|
-
type === "clear" ? `text-[${Colors["primary-base"]}]` : "text-white"
|
|
59
|
-
}`,
|
|
60
|
-
]}
|
|
61
|
-
>
|
|
62
|
-
{children }
|
|
63
|
-
</EText>
|
|
64
|
-
|
|
65
|
-
{/* ICON RIGHT */}
|
|
66
|
-
{iconR ? <View style={tw`ml-1 -mr-2`}>{iconR}</View> : null}
|
|
67
|
-
</View>
|
|
68
|
-
</TouchableOpacity>
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
|
|
1
|
+
import {
|
|
2
|
+
View,
|
|
3
|
+
Text,
|
|
4
|
+
TouchableOpacity,
|
|
5
|
+
TouchableOpacityProps,
|
|
6
|
+
} from "react-native";
|
|
7
|
+
import React from "react";
|
|
8
|
+
import tw from "../lib/tailwind";
|
|
9
|
+
import EText from "./EText";
|
|
10
|
+
import { Colors } from "../utils/Color";
|
|
11
|
+
|
|
12
|
+
interface EButtonProps extends TouchableOpacityProps {
|
|
13
|
+
iconL?: JSX.Element;
|
|
14
|
+
iconR?: JSX.Element;
|
|
15
|
+
inline?: boolean;
|
|
16
|
+
small?: boolean;
|
|
17
|
+
type?: "secondary" | "clear" | "primary";
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
children: any;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export default function EButton({
|
|
23
|
+
// label,
|
|
24
|
+
children,
|
|
25
|
+
iconL,
|
|
26
|
+
iconR,
|
|
27
|
+
inline,
|
|
28
|
+
small,
|
|
29
|
+
type,
|
|
30
|
+
disabled,
|
|
31
|
+
...props
|
|
32
|
+
}: EButtonProps) {
|
|
33
|
+
return (
|
|
34
|
+
<TouchableOpacity
|
|
35
|
+
activeOpacity={0.8}
|
|
36
|
+
disabled={disabled}
|
|
37
|
+
{...props}
|
|
38
|
+
style={[tw`${inline ? "items-start" : ""}`, {}]}
|
|
39
|
+
>
|
|
40
|
+
<View
|
|
41
|
+
style={[
|
|
42
|
+
tw`flex-row justify-center items-center px-8 rounded-full ${small ? 'h-10' : 'h-14'} ${disabled ? "opacity-40" : ""} ${
|
|
43
|
+
type === "clear"
|
|
44
|
+
? "bg-transparent"
|
|
45
|
+
: type === "secondary"
|
|
46
|
+
? `bg-[${Colors["secondary-base"]}] self-start px-5 h-11`
|
|
47
|
+
: `bg-[${Colors["primary-base"]}]`
|
|
48
|
+
}`,
|
|
49
|
+
]}
|
|
50
|
+
>
|
|
51
|
+
{/* ICON LEFT */}
|
|
52
|
+
{iconL ? <View style={tw`mr-1 -ml-2`}>{iconL}</View> : null}
|
|
53
|
+
{/* LABEL */}
|
|
54
|
+
<EText
|
|
55
|
+
size={"sm"}
|
|
56
|
+
style={[
|
|
57
|
+
tw`font-semibold ${
|
|
58
|
+
type === "clear" ? `text-[${Colors["primary-base"]}]` : "text-white"
|
|
59
|
+
}`,
|
|
60
|
+
]}
|
|
61
|
+
>
|
|
62
|
+
{children }
|
|
63
|
+
</EText>
|
|
64
|
+
|
|
65
|
+
{/* ICON RIGHT */}
|
|
66
|
+
{iconR ? <View style={tw`ml-1 -mr-2`}>{iconR}</View> : null}
|
|
67
|
+
</View>
|
|
68
|
+
</TouchableOpacity>
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { View } from "react-native";
|
|
3
|
-
import tw from "../lib/tailwind";
|
|
4
|
-
import { Colors } from "../utils/Color";
|
|
5
|
-
import EText from "./EText";
|
|
6
|
-
import EIconClock from "./icons/EIconClock";
|
|
7
|
-
|
|
8
|
-
interface IProps{
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export default function EDateAndTimeCard(
|
|
17
|
-
return (
|
|
18
|
-
<View
|
|
19
|
-
style={[tw`flex-row pb-4 border-b`, { borderBottomColor: Colors.border }]}
|
|
20
|
-
>
|
|
21
|
-
<View
|
|
22
|
-
style={[
|
|
23
|
-
tw`rounded-lg px-3 py-1 items-center justify-center`,
|
|
24
|
-
{ backgroundColor: Colors["primary-base"] },
|
|
25
|
-
]}
|
|
26
|
-
>
|
|
27
|
-
<EText size="xl" style={tw`font-bold text-white -mb-1`}>
|
|
28
|
-
{date}
|
|
29
|
-
</EText>
|
|
30
|
-
<EText size="xs" style={tw`font-bold text-white uppercase opacity-80`}>
|
|
31
|
-
{month}
|
|
32
|
-
</EText>
|
|
33
|
-
</View>
|
|
34
|
-
<View style={tw`ml-3`}>
|
|
35
|
-
<EText size="base" style={tw`font-bold text-black opacity-80 -mb-1`}>
|
|
36
|
-
{day}
|
|
37
|
-
</EText>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<EIconClock size={16} style={tw`text-slate-500`}/>
|
|
41
|
-
<EText
|
|
42
|
-
size="sm"
|
|
43
|
-
style={tw`ml-1 text-slate-500`}
|
|
44
|
-
>
|
|
45
|
-
{time}
|
|
46
|
-
</EText>
|
|
47
|
-
</View>
|
|
48
|
-
</View>
|
|
49
|
-
</View>
|
|
50
|
-
);
|
|
51
|
-
}
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
import tw from "../lib/tailwind";
|
|
4
|
+
import { Colors } from "../utils/Color";
|
|
5
|
+
import EText from "./EText";
|
|
6
|
+
import EIconClock from "./icons/EIconClock";
|
|
7
|
+
|
|
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) {
|
|
17
|
+
return (
|
|
18
|
+
<View
|
|
19
|
+
style={[tw`flex-row pb-4 border-b`, { borderBottomColor: Colors.border }]}
|
|
20
|
+
>
|
|
21
|
+
<View
|
|
22
|
+
style={[
|
|
23
|
+
tw`rounded-lg px-3 py-1 items-center justify-center`,
|
|
24
|
+
{ backgroundColor: Colors["primary-base"] },
|
|
25
|
+
]}
|
|
26
|
+
>
|
|
27
|
+
<EText size="xl" style={tw`font-bold text-white -mb-1`}>
|
|
28
|
+
{date}
|
|
29
|
+
</EText>
|
|
30
|
+
<EText size="xs" style={tw`font-bold text-white uppercase opacity-80`}>
|
|
31
|
+
{month}
|
|
32
|
+
</EText>
|
|
33
|
+
</View>
|
|
34
|
+
<View style={tw`ml-3 justify-center`}>
|
|
35
|
+
<EText size="base" style={tw`font-bold text-black opacity-80 -mb-1`}>
|
|
36
|
+
{day}
|
|
37
|
+
</EText>
|
|
38
|
+
{
|
|
39
|
+
time ?<View style={tw`flex-row justify-center items-center mt-2`}>
|
|
40
|
+
<EIconClock size={16} style={tw`text-slate-500`} />
|
|
41
|
+
<EText
|
|
42
|
+
size="sm"
|
|
43
|
+
style={tw`ml-1 text-slate-500`}
|
|
44
|
+
>
|
|
45
|
+
{time}
|
|
46
|
+
</EText>
|
|
47
|
+
</View> : null}
|
|
48
|
+
</View>
|
|
49
|
+
</View>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import moment from 'moment'
|
|
2
|
-
import React, { useState } from 'react'
|
|
3
|
-
import { View, TouchableOpacity } from 'react-native'
|
|
4
|
-
import { ClockIcon } from 'react-native-heroicons/solid'
|
|
5
|
-
import { onChange } from 'react-native-reanimated'
|
|
6
|
-
import DateTimePicker from '@react-native-community/datetimepicker';
|
|
7
|
-
import tw from '../../../lib/tailwind'
|
|
8
|
-
import { CalendarIcon } from 'react-native-heroicons/outline';
|
|
9
|
-
import EText from './EText';
|
|
10
|
-
import ELabel from './ELabel';
|
|
11
|
-
|
|
12
|
-
interface IProps {
|
|
13
|
-
label: string;
|
|
14
|
-
value: string;
|
|
15
|
-
onChange: (value: string) => void;
|
|
16
|
-
style?: string;
|
|
17
|
-
maxDate?: Date;
|
|
18
|
-
minDate?: Date;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export default function EDateInput({ label, value, style, maxDate, minDate, onChange }: IProps) {
|
|
22
|
-
const [show, setShow] = useState(false);
|
|
23
|
-
|
|
24
|
-
const handleOnChange = (event: any, selectedDate: any) => {
|
|
25
|
-
const currentDate = selectedDate;
|
|
26
|
-
setShow(false);
|
|
27
|
-
onChange(currentDate)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return (
|
|
31
|
-
|
|
32
|
-
<View style={tw`flex-1 ${style ? style : ""}`}>
|
|
33
|
-
<ELabel label={label} />
|
|
34
|
-
<TouchableOpacity
|
|
35
|
-
style={tw`h-12 rounded-lg px-4 flex-row justify-between items-center border border-slate-300 lowercase my-2 bg-white`}
|
|
36
|
-
onPress={() => setShow(true)}
|
|
37
|
-
>
|
|
38
|
-
<EText size={"sm"} style={tw`font-normal`}>
|
|
39
|
-
{
|
|
40
|
-
value ? moment(value).format("DD/MM/YYYY") : "Select Date"
|
|
41
|
-
}
|
|
42
|
-
</EText>
|
|
43
|
-
{show ? <DateTimePicker
|
|
44
|
-
testID="dateTimePicker"
|
|
45
|
-
value={value ? new Date(value) : new Date()}
|
|
46
|
-
mode={"date"}
|
|
47
|
-
onChange={handleOnChange}
|
|
48
|
-
minimumDate={minDate}
|
|
49
|
-
maximumDate={maxDate}
|
|
50
|
-
/> : <></>}
|
|
51
|
-
<CalendarIcon size={20} style={tw`text-slate-500`} />
|
|
52
|
-
</TouchableOpacity>
|
|
53
|
-
</View>
|
|
54
|
-
)
|
|
55
|
-
}
|
|
1
|
+
import moment from 'moment'
|
|
2
|
+
import React, { useState } from 'react'
|
|
3
|
+
import { View, TouchableOpacity } from 'react-native'
|
|
4
|
+
import { ClockIcon } from 'react-native-heroicons/solid'
|
|
5
|
+
import { onChange } from 'react-native-reanimated'
|
|
6
|
+
import DateTimePicker from '@react-native-community/datetimepicker';
|
|
7
|
+
import tw from '../../../lib/tailwind'
|
|
8
|
+
import { CalendarIcon } from 'react-native-heroicons/outline';
|
|
9
|
+
import EText from './EText';
|
|
10
|
+
import ELabel from './ELabel';
|
|
11
|
+
|
|
12
|
+
interface IProps {
|
|
13
|
+
label: string;
|
|
14
|
+
value: string;
|
|
15
|
+
onChange: (value: string) => void;
|
|
16
|
+
style?: string;
|
|
17
|
+
maxDate?: Date;
|
|
18
|
+
minDate?: Date;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default function EDateInput({ label, value, style, maxDate, minDate, onChange }: IProps) {
|
|
22
|
+
const [show, setShow] = useState(false);
|
|
23
|
+
|
|
24
|
+
const handleOnChange = (event: any, selectedDate: any) => {
|
|
25
|
+
const currentDate = selectedDate;
|
|
26
|
+
setShow(false);
|
|
27
|
+
onChange(currentDate)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
|
|
32
|
+
<View style={tw`flex-1 ${style ? style : ""}`}>
|
|
33
|
+
<ELabel label={label} />
|
|
34
|
+
<TouchableOpacity
|
|
35
|
+
style={tw`h-12 rounded-lg px-4 flex-row justify-between items-center border border-slate-300 lowercase my-2 bg-white`}
|
|
36
|
+
onPress={() => setShow(true)}
|
|
37
|
+
>
|
|
38
|
+
<EText size={"sm"} style={tw`font-normal`}>
|
|
39
|
+
{
|
|
40
|
+
value ? moment(value).format("DD/MM/YYYY") : "Select Date"
|
|
41
|
+
}
|
|
42
|
+
</EText>
|
|
43
|
+
{show ? <DateTimePicker
|
|
44
|
+
testID="dateTimePicker"
|
|
45
|
+
value={value ? new Date(value) : new Date()}
|
|
46
|
+
mode={"date"}
|
|
47
|
+
onChange={handleOnChange}
|
|
48
|
+
minimumDate={minDate}
|
|
49
|
+
maximumDate={maxDate}
|
|
50
|
+
/> : <></>}
|
|
51
|
+
<CalendarIcon size={20} style={tw`text-slate-500`} />
|
|
52
|
+
</TouchableOpacity>
|
|
53
|
+
</View>
|
|
54
|
+
)
|
|
55
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { ImageBackground, View } from 'react-native'
|
|
4
|
-
import tw from '../../../lib/tailwind'
|
|
5
|
-
import EText from "./EText";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
interface IProps{
|
|
9
|
-
text: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export default function EEmptyPlaceholder( { text }: IProps) {
|
|
13
|
-
return (
|
|
14
|
-
<View style={tw`flex justify-center items-center`}>
|
|
15
|
-
<ImageBackground source={require("../assets/images/empty.png")} style={{width: 200, height: 200}} />
|
|
16
|
-
<EText size="lg" style={tw`text-center text-gray-500 mt-5`}>
|
|
17
|
-
{text}
|
|
18
|
-
</EText>
|
|
19
|
-
</View>
|
|
20
|
-
)
|
|
21
|
-
}
|
|
1
|
+
|
|
2
|
+
import React from 'react'
|
|
3
|
+
import { ImageBackground, View } from 'react-native'
|
|
4
|
+
import tw from '../../../lib/tailwind'
|
|
5
|
+
import EText from "./EText";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
interface IProps{
|
|
9
|
+
text: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default function EEmptyPlaceholder( { text }: IProps) {
|
|
13
|
+
return (
|
|
14
|
+
<View style={tw`flex justify-center items-center`}>
|
|
15
|
+
<ImageBackground source={require("../assets/images/empty.png")} style={{width: 200, height: 200}} />
|
|
16
|
+
<EText size="lg" style={tw`text-center text-gray-500 mt-5`}>
|
|
17
|
+
{text}
|
|
18
|
+
</EText>
|
|
19
|
+
</View>
|
|
20
|
+
)
|
|
21
|
+
}
|