fln-espranza 0.0.47 → 0.0.48
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
CHANGED
package/components/EButton.tsx
CHANGED
|
@@ -7,6 +7,7 @@ import { CalendarIcon } from 'react-native-heroicons/outline';
|
|
|
7
7
|
import EText from './EText';
|
|
8
8
|
import ELabel from './ELabel';
|
|
9
9
|
import { Colors } from 'fln-espranza/utils/Color'
|
|
10
|
+
import DateTimePickerModal from "react-native-modal-datetime-picker";
|
|
10
11
|
|
|
11
12
|
interface IProps {
|
|
12
13
|
label: string;
|
|
@@ -21,7 +22,7 @@ interface IProps {
|
|
|
21
22
|
export default function EDateInput({ label, value, style, placeholder, maxDate, minDate, onChange }: IProps) {
|
|
22
23
|
const [show, setShow] = useState(false);
|
|
23
24
|
|
|
24
|
-
const handleOnChange = (
|
|
25
|
+
const handleOnChange = (selectedDate: any) => {
|
|
25
26
|
const currentDate = selectedDate;
|
|
26
27
|
setShow(false);
|
|
27
28
|
onChange(currentDate)
|
|
@@ -40,14 +41,14 @@ export default function EDateInput({ label, value, style, placeholder, maxDate,
|
|
|
40
41
|
value ? moment(value).format("DD/MM/YYYY") : "Select Date"
|
|
41
42
|
}
|
|
42
43
|
</EText>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
<DateTimePickerModal
|
|
45
|
+
isVisible={show}
|
|
46
|
+
mode="date"
|
|
47
|
+
onConfirm={handleOnChange}
|
|
48
|
+
onCancel={() => setShow(false)}
|
|
48
49
|
minimumDate={minDate}
|
|
49
50
|
maximumDate={maxDate}
|
|
50
|
-
/>
|
|
51
|
+
/>
|
|
51
52
|
<CalendarIcon size={20} style={tw`text-[${Colors["primary-base"]}]`} />
|
|
52
53
|
</TouchableOpacity>
|
|
53
54
|
</View>
|
package/components/EInput.tsx
CHANGED
|
@@ -25,7 +25,7 @@ export default function EInput({
|
|
|
25
25
|
return (
|
|
26
26
|
<View style={[tw`mb-4`, {style}]}>
|
|
27
27
|
{label ? (
|
|
28
|
-
<EText
|
|
28
|
+
<EText style={[tw`font-semibold ${hasFocus ? '' : 'text-slate-800'}`, {
|
|
29
29
|
// color: Colors["text-primary"]
|
|
30
30
|
}]}>
|
|
31
31
|
{label}
|
|
@@ -33,11 +33,11 @@ export default function EInput({
|
|
|
33
33
|
) : null}
|
|
34
34
|
|
|
35
35
|
<View
|
|
36
|
-
style={tw` mt-
|
|
36
|
+
style={tw` mt-1`}
|
|
37
37
|
>
|
|
38
38
|
<TextInput
|
|
39
|
-
style={tw`h-12 rounded-lg px-4 flex-row items-center border border-slate-300 ${
|
|
40
|
-
hasFocus ? "border-black " : ""
|
|
39
|
+
style={tw`h-12 rounded-lg px-4 flex-row items-center border border-slate-300 text-base ${
|
|
40
|
+
hasFocus ? "border-black bg-teal-50/10" : ""
|
|
41
41
|
}`}
|
|
42
42
|
{...props}
|
|
43
43
|
onFocus={() => setHasFocus(!hasFocus)}
|
|
@@ -19,7 +19,7 @@ export default function ENotFoundPlaceholder(
|
|
|
19
19
|
<View style={tw`items-center px-16 py-2`}>
|
|
20
20
|
<Image
|
|
21
21
|
source={require("../assets/images/icon-placeholder-schedule.png")}
|
|
22
|
-
style={[tw
|
|
22
|
+
style={[tw``, { height: 44 }]}
|
|
23
23
|
resizeMode="contain"
|
|
24
24
|
/>
|
|
25
25
|
|
|
@@ -35,7 +35,7 @@ export default function ENotFoundPlaceholder(
|
|
|
35
35
|
>
|
|
36
36
|
{subtitle}
|
|
37
37
|
</EText>
|
|
38
|
-
<View style={tw`mt-
|
|
38
|
+
<View style={tw`mt-4`}>
|
|
39
39
|
{button}
|
|
40
40
|
</View>
|
|
41
41
|
</View>
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from 'react'
|
|
2
|
-
import { Animated,StyleSheet, View } from 'react-native';
|
|
2
|
+
import { Animated, StyleSheet, View } from 'react-native';
|
|
3
3
|
import tw from "fln-espranza/lib/tailwind";
|
|
4
4
|
import { Colors } from "fln-espranza/utils/Color";
|
|
5
5
|
|
|
6
|
-
interface IProps{
|
|
6
|
+
interface IProps {
|
|
7
7
|
progress: number;
|
|
8
|
+
type: "stepper" | "bar";
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
export default function EProgressBar(
|
|
11
|
+
export default function EProgressBar({ progress, type }: IProps) {
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
const barWidth = useRef(new Animated.Value(0)).current;
|
|
@@ -21,13 +22,26 @@ export default function EProgressBar( {progress}: IProps) {
|
|
|
21
22
|
}).start();
|
|
22
23
|
}, [progress]);
|
|
23
24
|
return (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
<>
|
|
26
|
+
{type === "stepper" ? <View style={[tw`h-2 w-14 bg-slate-200 overflow-hidden mr-2`, {
|
|
27
|
+
borderRadius: 40,
|
|
28
|
+
}]}>
|
|
29
|
+
<Animated.View
|
|
30
|
+
style={[StyleSheet.absoluteFill, { backgroundColor: Colors['primary-base'], width: barWidth }]}
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
/>
|
|
33
|
+
</View>
|
|
34
|
+
:
|
|
35
|
+
|
|
36
|
+
<View style={[tw`h-1 w-full bg-white/10 overflow-hidden mt-1`, {
|
|
37
|
+
borderRadius: 40,
|
|
38
|
+
}]}>
|
|
39
|
+
<View
|
|
40
|
+
style={[tw`h-1 w-[${progress}%] bg-[${Colors['primary-base']}]`]}
|
|
41
|
+
|
|
42
|
+
/>
|
|
43
|
+
</View>
|
|
44
|
+
}
|
|
45
|
+
</>
|
|
32
46
|
)
|
|
33
47
|
}
|