fln-espranza 0.0.7 → 0.0.9
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 +110 -110
- 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/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 -0
- package/components/EOtpInputBox.tsx +49 -49
- package/components/EPageDescription.tsx +19 -19
- package/components/EPillButton.tsx +33 -33
- package/components/EProfile.tsx +42 -42
- package/components/EProgressBar.tsx +33 -33
- package/components/EQuestionSerialNumberLabel.tsx +17 -0
- package/components/EQuestionText.tsx +14 -0
- 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 +129 -129
- package/components/SecondaryBaseLayout.tsx +120 -120
- 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 +171 -165
- package/package.json +26 -26
- package/utils/Color.ts +14 -14
package/components/EProfile.tsx
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
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 Avatar from './Avatar';
|
|
6
|
-
import EText from './EText';
|
|
7
|
-
|
|
8
|
-
interface IProps {
|
|
9
|
-
name: string;
|
|
10
|
-
subjectName?: string;
|
|
11
|
-
border?: boolean;
|
|
12
|
-
children?: JSX.Element;
|
|
13
|
-
titleSize: string;
|
|
14
|
-
subTitleSize: string;
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default function EProfile({ name, subjectName, border, children, titleSize, subTitleSize }: IProps) {
|
|
19
|
-
return (
|
|
20
|
-
<View style={[tw`flex-row items-center justify-between py-3 ${border ? "border-b" : ""}`, {borderBottomColor: Colors.border}]}>
|
|
21
|
-
<View style={tw`flex-row items-center`}>
|
|
22
|
-
<Avatar
|
|
23
|
-
size="sm"
|
|
24
|
-
source={""}
|
|
25
|
-
nameFirstLetter={name.split(" ")[0].charAt(0)}
|
|
26
|
-
/>
|
|
27
|
-
<View style={tw`ml-3`}>
|
|
28
|
-
<EText style={[tw`${titleSize}`, { color: Colors['text-primary'] }]}>{name}</EText>
|
|
29
|
-
{subjectName ? <EText style={[tw`mt-1 ${subTitleSize}`, { color: Colors['text-body'] }]}>
|
|
30
|
-
{subjectName}
|
|
31
|
-
</EText> : null}
|
|
32
|
-
</View>
|
|
33
|
-
</View>
|
|
34
|
-
{
|
|
35
|
-
children ? <>
|
|
36
|
-
{children}
|
|
37
|
-
</> : null
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
</View>
|
|
41
|
-
)
|
|
42
|
-
}
|
|
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 Avatar from './Avatar';
|
|
6
|
+
import EText from './EText';
|
|
7
|
+
|
|
8
|
+
interface IProps {
|
|
9
|
+
name: string;
|
|
10
|
+
subjectName?: string;
|
|
11
|
+
border?: boolean;
|
|
12
|
+
children?: JSX.Element;
|
|
13
|
+
titleSize: string;
|
|
14
|
+
subTitleSize: string;
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default function EProfile({ name, subjectName, border, children, titleSize, subTitleSize }: IProps) {
|
|
19
|
+
return (
|
|
20
|
+
<View style={[tw`flex-row items-center justify-between py-3 ${border ? "border-b" : ""}`, {borderBottomColor: Colors.border}]}>
|
|
21
|
+
<View style={tw`flex-row items-center`}>
|
|
22
|
+
<Avatar
|
|
23
|
+
size="sm"
|
|
24
|
+
source={""}
|
|
25
|
+
nameFirstLetter={name.split(" ")[0].charAt(0)}
|
|
26
|
+
/>
|
|
27
|
+
<View style={tw`ml-3`}>
|
|
28
|
+
<EText style={[tw`${titleSize}`, { color: Colors['text-primary'] }]}>{name}</EText>
|
|
29
|
+
{subjectName ? <EText style={[tw`mt-1 ${subTitleSize}`, { color: Colors['text-body'] }]}>
|
|
30
|
+
{subjectName}
|
|
31
|
+
</EText> : null}
|
|
32
|
+
</View>
|
|
33
|
+
</View>
|
|
34
|
+
{
|
|
35
|
+
children ? <>
|
|
36
|
+
{children}
|
|
37
|
+
</> : null
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
</View>
|
|
41
|
+
)
|
|
42
|
+
}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import React, { useEffect, useRef, useState } from 'react'
|
|
2
|
-
import { Animated,StyleSheet, View } from 'react-native';
|
|
3
|
-
import tw from "fln-espranza/lib/tailwind";
|
|
4
|
-
import { Colors } from "fln-espranza/utils/Color";
|
|
5
|
-
|
|
6
|
-
interface IProps{
|
|
7
|
-
progress: number;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export default function EProgressBar( {progress}: IProps) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const barWidth = useRef(new Animated.Value(0)).current;
|
|
14
|
-
|
|
15
|
-
useEffect(() => {
|
|
16
|
-
Animated.spring(barWidth, {
|
|
17
|
-
toValue: progress,
|
|
18
|
-
bounciness: 0,
|
|
19
|
-
speed: 7,
|
|
20
|
-
useNativeDriver: false,
|
|
21
|
-
}).start();
|
|
22
|
-
}, [progress]);
|
|
23
|
-
return (
|
|
24
|
-
<View style={[tw`h-2 w-14 bg-slate-200 overflow-hidden mr-2`, {
|
|
25
|
-
borderRadius: 40,
|
|
26
|
-
}]}>
|
|
27
|
-
<Animated.View
|
|
28
|
-
style={[StyleSheet.absoluteFill, { backgroundColor: Colors['primary-base'], width: barWidth }]}
|
|
29
|
-
|
|
30
|
-
/>
|
|
31
|
-
</View>
|
|
32
|
-
)
|
|
33
|
-
}
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react'
|
|
2
|
+
import { Animated,StyleSheet, View } from 'react-native';
|
|
3
|
+
import tw from "fln-espranza/lib/tailwind";
|
|
4
|
+
import { Colors } from "fln-espranza/utils/Color";
|
|
5
|
+
|
|
6
|
+
interface IProps{
|
|
7
|
+
progress: number;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default function EProgressBar( {progress}: IProps) {
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
const barWidth = useRef(new Animated.Value(0)).current;
|
|
14
|
+
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
Animated.spring(barWidth, {
|
|
17
|
+
toValue: progress,
|
|
18
|
+
bounciness: 0,
|
|
19
|
+
speed: 7,
|
|
20
|
+
useNativeDriver: false,
|
|
21
|
+
}).start();
|
|
22
|
+
}, [progress]);
|
|
23
|
+
return (
|
|
24
|
+
<View style={[tw`h-2 w-14 bg-slate-200 overflow-hidden mr-2`, {
|
|
25
|
+
borderRadius: 40,
|
|
26
|
+
}]}>
|
|
27
|
+
<Animated.View
|
|
28
|
+
style={[StyleSheet.absoluteFill, { backgroundColor: Colors['primary-base'], width: barWidth }]}
|
|
29
|
+
|
|
30
|
+
/>
|
|
31
|
+
</View>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { Colors } from 'react-native/Libraries/NewAppScreen';
|
|
3
|
+
import tw from '../lib/tailwind';
|
|
4
|
+
import EText from './EText';
|
|
5
|
+
// import { EText } from '../../../components'
|
|
6
|
+
|
|
7
|
+
interface IProps{
|
|
8
|
+
label: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default function EQuestionSerialNumberLabel( { label } : IProps) {
|
|
12
|
+
return (
|
|
13
|
+
<EText size={"sm"} style={[tw`font-extrabold`, {color: Colors['primary-base']}]}>
|
|
14
|
+
{label}
|
|
15
|
+
</EText>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import tw from '../lib/tailwind';
|
|
3
|
+
import EText from './EText';
|
|
4
|
+
interface IProps{
|
|
5
|
+
question: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default function EQuestionText( { question } : IProps) {
|
|
9
|
+
return (
|
|
10
|
+
<EText size={"base"} style={ tw`font-medium mt-1`}>
|
|
11
|
+
{question}
|
|
12
|
+
</EText>
|
|
13
|
+
)
|
|
14
|
+
}
|
package/components/ESegment.tsx
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { View, Text, Pressable, TouchableOpacity } from "react-native";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import tw from '../lib/tailwind'
|
|
4
|
-
import EText from "./EText";
|
|
5
|
-
import { Colors } from "../utils/Color";
|
|
6
|
-
|
|
7
|
-
export function ESegmentItem(props: any) {
|
|
8
|
-
const { onPress, label, isActive } = props;
|
|
9
|
-
return (
|
|
10
|
-
<TouchableOpacity
|
|
11
|
-
style={tw.style(
|
|
12
|
-
"py-1.5 px-4 rounded-full items-center w-1/2",
|
|
13
|
-
isActive && "bg-white shadow-lg shadow-slate-500 "
|
|
14
|
-
)}
|
|
15
|
-
onPress={onPress}
|
|
16
|
-
>
|
|
17
|
-
<View style={tw`items-center`}>
|
|
18
|
-
<EText size="sm" style={tw`font-bold ${!isActive ? "text-white": ""}`}>{label}</EText>
|
|
19
|
-
</View>
|
|
20
|
-
</TouchableOpacity>
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default function ESegment(props: any) {
|
|
25
|
-
return (
|
|
26
|
-
<View style={tw`justify-center items-center`}>
|
|
27
|
-
<View
|
|
28
|
-
style={[tw`flex-row rounded-full p-1 border border-slate-100 w-full`, {
|
|
29
|
-
backgroundColor: Colors["text-body"],
|
|
30
|
-
}]}
|
|
31
|
-
>
|
|
32
|
-
{props.children}
|
|
33
|
-
</View>
|
|
34
|
-
</View>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
1
|
+
import { View, Text, Pressable, TouchableOpacity } from "react-native";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import tw from '../lib/tailwind'
|
|
4
|
+
import EText from "./EText";
|
|
5
|
+
import { Colors } from "../utils/Color";
|
|
6
|
+
|
|
7
|
+
export function ESegmentItem(props: any) {
|
|
8
|
+
const { onPress, label, isActive } = props;
|
|
9
|
+
return (
|
|
10
|
+
<TouchableOpacity
|
|
11
|
+
style={tw.style(
|
|
12
|
+
"py-1.5 px-4 rounded-full items-center w-1/2",
|
|
13
|
+
isActive && "bg-white shadow-lg shadow-slate-500 "
|
|
14
|
+
)}
|
|
15
|
+
onPress={onPress}
|
|
16
|
+
>
|
|
17
|
+
<View style={tw`items-center`}>
|
|
18
|
+
<EText size="sm" style={tw`font-bold ${!isActive ? "text-white": ""}`}>{label}</EText>
|
|
19
|
+
</View>
|
|
20
|
+
</TouchableOpacity>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default function ESegment(props: any) {
|
|
25
|
+
return (
|
|
26
|
+
<View style={tw`justify-center items-center`}>
|
|
27
|
+
<View
|
|
28
|
+
style={[tw`flex-row rounded-full p-1 border border-slate-100 w-full`, {
|
|
29
|
+
backgroundColor: Colors["text-body"],
|
|
30
|
+
}]}
|
|
31
|
+
>
|
|
32
|
+
{props.children}
|
|
33
|
+
</View>
|
|
34
|
+
</View>
|
|
35
|
+
);
|
|
36
|
+
}
|
package/components/EText.tsx
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { Text, TextProps } from "react-native";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import tw from "../lib/tailwind";
|
|
4
|
-
|
|
5
|
-
interface ETextProps extends TextProps {
|
|
6
|
-
size?: "xs" | "sm" | "base" | "lg" | "xl" | "2xl" | "3xl" | "title";
|
|
7
|
-
muted?: boolean;
|
|
8
|
-
style?: any;
|
|
9
|
-
children?: any;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export default function EText({
|
|
13
|
-
size,
|
|
14
|
-
muted,
|
|
15
|
-
style,
|
|
16
|
-
children,
|
|
17
|
-
...props
|
|
18
|
-
}: ETextProps) {
|
|
19
|
-
return (
|
|
20
|
-
<Text
|
|
21
|
-
{...props}
|
|
22
|
-
style={[
|
|
23
|
-
tw.style(
|
|
24
|
-
"text-base leading-6",
|
|
25
|
-
size === "xs" && "text-xs",
|
|
26
|
-
size === "sm" && "text-sm",
|
|
27
|
-
size === "base" && "text-base",
|
|
28
|
-
size == "lg" && "font-semibold text-lg",
|
|
29
|
-
size === "xl" && "font-bold text-xl",
|
|
30
|
-
size === "2xl" && "font-bold text-2xl",
|
|
31
|
-
size === "3xl" && "font-bold text-3xl",
|
|
32
|
-
size === "title" && "font-extrabold text-title text-2xl",
|
|
33
|
-
muted && "opacity-60"
|
|
34
|
-
),
|
|
35
|
-
style,
|
|
36
|
-
]}
|
|
37
|
-
>
|
|
38
|
-
{children}
|
|
39
|
-
</Text>
|
|
40
|
-
);
|
|
41
|
-
}
|
|
1
|
+
import { Text, TextProps } from "react-native";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import tw from "../lib/tailwind";
|
|
4
|
+
|
|
5
|
+
interface ETextProps extends TextProps {
|
|
6
|
+
size?: "xs" | "sm" | "base" | "lg" | "xl" | "2xl" | "3xl" | "title";
|
|
7
|
+
muted?: boolean;
|
|
8
|
+
style?: any;
|
|
9
|
+
children?: any;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default function EText({
|
|
13
|
+
size,
|
|
14
|
+
muted,
|
|
15
|
+
style,
|
|
16
|
+
children,
|
|
17
|
+
...props
|
|
18
|
+
}: ETextProps) {
|
|
19
|
+
return (
|
|
20
|
+
<Text
|
|
21
|
+
{...props}
|
|
22
|
+
style={[
|
|
23
|
+
tw.style(
|
|
24
|
+
"text-base leading-6",
|
|
25
|
+
size === "xs" && "text-xs",
|
|
26
|
+
size === "sm" && "text-sm",
|
|
27
|
+
size === "base" && "text-base",
|
|
28
|
+
size == "lg" && "font-semibold text-lg",
|
|
29
|
+
size === "xl" && "font-bold text-xl",
|
|
30
|
+
size === "2xl" && "font-bold text-2xl",
|
|
31
|
+
size === "3xl" && "font-bold text-3xl",
|
|
32
|
+
size === "title" && "font-extrabold text-title text-2xl",
|
|
33
|
+
muted && "opacity-60"
|
|
34
|
+
),
|
|
35
|
+
style,
|
|
36
|
+
]}
|
|
37
|
+
>
|
|
38
|
+
{children}
|
|
39
|
+
</Text>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -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/outline'
|
|
5
|
-
import { onChange } from 'react-native-reanimated'
|
|
6
|
-
import DateTimePicker from '@react-native-community/datetimepicker';
|
|
7
|
-
import tw from '../../../lib/tailwind'
|
|
8
|
-
import EText from './EText';
|
|
9
|
-
import ELabel from './ELabel';
|
|
10
|
-
|
|
11
|
-
interface IProps {
|
|
12
|
-
label: string;
|
|
13
|
-
value: string;
|
|
14
|
-
onChange: (value: string) => void;
|
|
15
|
-
style?: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default function ETimeInput( { label, value,style, onChange }: IProps ) {
|
|
19
|
-
const [date, setDate] = useState(new Date());
|
|
20
|
-
const [show, setShow] = useState(false);
|
|
21
|
-
|
|
22
|
-
const handleOnChange = (event: any, selectedDate: any) => {
|
|
23
|
-
const currentDate = selectedDate;
|
|
24
|
-
setShow(false);
|
|
25
|
-
setDate(currentDate);
|
|
26
|
-
onChange(moment(currentDate).format("hh:mm A"));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
|
|
31
|
-
<View style={tw`flex-1 ${ style ? style : ""}`}>
|
|
32
|
-
<ELabel label={label} />
|
|
33
|
-
<TouchableOpacity
|
|
34
|
-
style={tw`h-12 rounded-lg px-4 flex-row justify-between items-center border border-slate-300 lowercase my-2 bg-white`}
|
|
35
|
-
onPress={() => setShow(true)}
|
|
36
|
-
>
|
|
37
|
-
<EText size={"sm"} style={tw`font-normal`}>
|
|
38
|
-
{
|
|
39
|
-
// value ? value : moment(date).format("hh:mm A")
|
|
40
|
-
value ? value : "Select Time"
|
|
41
|
-
}
|
|
42
|
-
</EText>
|
|
43
|
-
{show ? <DateTimePicker
|
|
44
|
-
testID="dateTimePicker"
|
|
45
|
-
value={date}
|
|
46
|
-
mode={"time"}
|
|
47
|
-
is24Hour={false}
|
|
48
|
-
onChange={handleOnChange}
|
|
49
|
-
/> : <></>}
|
|
50
|
-
<ClockIcon size={20} style={tw`text-slate-500`} />
|
|
51
|
-
</TouchableOpacity>
|
|
52
|
-
</View>
|
|
53
|
-
)
|
|
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/outline'
|
|
5
|
+
import { onChange } from 'react-native-reanimated'
|
|
6
|
+
import DateTimePicker from '@react-native-community/datetimepicker';
|
|
7
|
+
import tw from '../../../lib/tailwind'
|
|
8
|
+
import EText from './EText';
|
|
9
|
+
import ELabel from './ELabel';
|
|
10
|
+
|
|
11
|
+
interface IProps {
|
|
12
|
+
label: string;
|
|
13
|
+
value: string;
|
|
14
|
+
onChange: (value: string) => void;
|
|
15
|
+
style?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default function ETimeInput( { label, value,style, onChange }: IProps ) {
|
|
19
|
+
const [date, setDate] = useState(new Date());
|
|
20
|
+
const [show, setShow] = useState(false);
|
|
21
|
+
|
|
22
|
+
const handleOnChange = (event: any, selectedDate: any) => {
|
|
23
|
+
const currentDate = selectedDate;
|
|
24
|
+
setShow(false);
|
|
25
|
+
setDate(currentDate);
|
|
26
|
+
onChange(moment(currentDate).format("hh:mm A"));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
|
|
31
|
+
<View style={tw`flex-1 ${ style ? style : ""}`}>
|
|
32
|
+
<ELabel label={label} />
|
|
33
|
+
<TouchableOpacity
|
|
34
|
+
style={tw`h-12 rounded-lg px-4 flex-row justify-between items-center border border-slate-300 lowercase my-2 bg-white`}
|
|
35
|
+
onPress={() => setShow(true)}
|
|
36
|
+
>
|
|
37
|
+
<EText size={"sm"} style={tw`font-normal`}>
|
|
38
|
+
{
|
|
39
|
+
// value ? value : moment(date).format("hh:mm A")
|
|
40
|
+
value ? value : "Select Time"
|
|
41
|
+
}
|
|
42
|
+
</EText>
|
|
43
|
+
{show ? <DateTimePicker
|
|
44
|
+
testID="dateTimePicker"
|
|
45
|
+
value={date}
|
|
46
|
+
mode={"time"}
|
|
47
|
+
is24Hour={false}
|
|
48
|
+
onChange={handleOnChange}
|
|
49
|
+
/> : <></>}
|
|
50
|
+
<ClockIcon size={20} style={tw`text-slate-500`} />
|
|
51
|
+
</TouchableOpacity>
|
|
52
|
+
</View>
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
|
|
@@ -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
|
}
|