fln-espranza 0.0.3 → 0.0.5

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.
Files changed (55) hide show
  1. package/components/Avatar.tsx +1 -1
  2. package/components/Drawer.tsx +27 -13
  3. package/components/EButton.tsx +2 -4
  4. package/components/EDateAndTimeCard.tsx +1 -1
  5. package/components/ELabel.tsx +1 -1
  6. package/components/EListPerson.tsx +1 -1
  7. package/components/EPillButton.tsx +24 -17
  8. package/components/{ProgressBar.tsx → EProgressBar.tsx} +4 -4
  9. package/components/EText.tsx +1 -1
  10. package/components/SecondaryBaseLayout.tsx +2 -2
  11. package/components/icons/{add.jsx → EIconAdd.jsx} +0 -0
  12. package/components/icons/{add-circle.jsx → EIconAddCircle.jsx} +0 -0
  13. package/components/icons/{application-status.jsx → EIconApplicationStatus.jsx} +0 -0
  14. package/components/icons/{arrow-down.jsx → EIconArrowDown.jsx} +0 -0
  15. package/components/icons/{arrow-left.jsx → EIconArrowLeft.jsx} +0 -0
  16. package/components/icons/{arrow-right.jsx → EIconArrowRight.jsx} +0 -0
  17. package/components/icons/{arrow-up.jsx → EIconArrowUp.jsx} +0 -0
  18. package/components/icons/{badge.jsx → EIconBadge.jsx} +0 -0
  19. package/components/icons/{bell.jsx → EIconBell.jsx} +0 -0
  20. package/components/icons/{calendar.jsx → EIconCalendar.jsx} +0 -0
  21. package/components/icons/{calendar-check.jsx → EIconCalendarCheck.jsx} +0 -0
  22. package/components/icons/{camera.jsx → EIconCamera.jsx} +0 -0
  23. package/components/icons/{camera-rotate.jsx → EIconCameraRotate.jsx} +0 -0
  24. package/components/icons/{check.jsx → EIconCheck.jsx} +0 -0
  25. package/components/icons/{check-circle.jsx → EIconCheckCircle.jsx} +0 -0
  26. package/components/icons/{check-fill.jsx → EIconCheckFill.jsx} +0 -0
  27. package/components/icons/{chevron-down.jsx → EIconChevronDown.jsx} +0 -0
  28. package/components/icons/{chevron-left.jsx → EIconChevronLeft.jsx} +0 -0
  29. package/components/icons/{chevron-right.jsx → EIconChevronRight.jsx} +0 -0
  30. package/components/icons/{chevron-up.jsx → EIconChevronUp.jsx} +0 -0
  31. package/components/icons/{clock.jsx → EIconClock.jsx} +0 -0
  32. package/components/icons/{close.jsx → EIconClose.jsx} +0 -0
  33. package/components/icons/{dashboard.jsx → EIconDashboard.jsx} +0 -0
  34. package/components/icons/{edit.jsx → EIconEdit.jsx} +0 -0
  35. package/components/icons/{file.jsx → EIconFile.jsx} +0 -0
  36. package/components/icons/{info.jsx → EIconInfo.jsx} +0 -0
  37. package/components/icons/{logout.jsx → EIconLogout.jsx} +0 -0
  38. package/components/icons/{menu.jsx → EIconMenu.jsx} +0 -0
  39. package/components/icons/{minus.jsx → EIconMinus.jsx} +0 -0
  40. package/components/icons/{pin.jsx → EIconPin.jsx} +0 -0
  41. package/components/icons/{profile.jsx → EIconProfile.jsx} +0 -0
  42. package/components/icons/{school.jsx → EIconSchool.jsx} +0 -0
  43. package/components/icons/{search.jsx → EIconSearch.jsx} +0 -0
  44. package/components/icons/{settings.jsx → EIconSettings.jsx} +0 -0
  45. package/components/icons/{share.jsx → EIconShare.jsx} +0 -0
  46. package/components/icons/{student.jsx → EIconStudent.jsx} +0 -0
  47. package/components/icons/{subject.jsx → EIconSubject.jsx} +0 -0
  48. package/components/icons/{teach.jsx → EIconTeach.jsx} +0 -0
  49. package/components/icons/{trash.jsx → EIconTrash.jsx} +0 -0
  50. package/components/icons/{user-card.jsx → EIconUserCard.jsx} +0 -0
  51. package/components/icons/{user-check.jsx → EIconUserCheck.jsx} +0 -0
  52. package/components/icons/{users.jsx → EIconUsers.jsx} +0 -0
  53. package/components/index.tsx +1 -1
  54. package/index.ts +91 -2
  55. package/package.json +1 -1
@@ -36,7 +36,7 @@ export default function Avatar({ size, source, nameFirstLetter, textColor }: Ava
36
36
  )}
37
37
  >
38
38
  {source ? <Image style={tw`w-full h-full `} source={source} /> :
39
- <EText style={tw`text-2xl font-extrabold text-white`}>{nameFirstLetter}</EText>}
39
+ <EText style={tw`text-xl font-bold text-white`}>{nameFirstLetter}</EText>}
40
40
  </View>
41
41
  );
42
42
  }
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { ScrollView, View, TouchableOpacity } from "react-native";
3
- import { HomeIcon,CalendarIcon, TemplateIcon, ViewBoardsIcon } from 'react-native-heroicons/solid';
3
+ import { HomeIcon, CalendarIcon, TemplateIcon, ViewBoardsIcon } from 'react-native-heroicons/solid';
4
4
  import { StyleSheet } from 'react-native';
5
5
  import tw from "../lib/tailwind";
6
6
  import EText from "./EText";
@@ -10,19 +10,20 @@ 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
- }
13
+ title: string,
14
+ icon: any,
15
+ screen: string,
16
+ }
17
17
 
18
- interface IProps{
19
- name: string,
20
- profile: string,
21
- menuItems: menuItems[];
22
- navigation: any;
18
+ interface IProps {
19
+ name: string,
20
+ profile: string,
21
+ menuItems: menuItems[];
22
+ menuItems2?: menuItems[];
23
+ navigation: any;
23
24
  }
24
25
 
25
- const Drawer = ({name,profile, menuItems,navigation }: IProps) => {
26
+ const Drawer = ({ name, profile, menuItems, menuItems2, navigation }: IProps) => {
26
27
  return (
27
28
  <ScrollView
28
29
  scrollEnabled={true}
@@ -67,7 +68,7 @@ const Drawer = ({name,profile, menuItems,navigation }: IProps) => {
67
68
  }
68
69
  <Spacer />
69
70
  <Spacer />
70
- <MenuItems
71
+ {/* <MenuItems
71
72
  title="Profile"
72
73
  onPress={() => navigation.navigate("ProfileScreen")}
73
74
  />
@@ -76,7 +77,20 @@ const Drawer = ({name,profile, menuItems,navigation }: IProps) => {
76
77
  />
77
78
  <MenuItems
78
79
  title="Logout"
79
- />
80
+ /> */}
81
+ {
82
+ menuItems2?.map((item, index) => {
83
+ return (
84
+ <MenuItems
85
+ key={index}
86
+ title={item.title}
87
+ icon={item.icon}
88
+ onPress={() => navigation.navigate(item.screen)}
89
+ />
90
+ )
91
+ })
92
+ }
93
+
80
94
  </View>
81
95
  </ScrollView>
82
96
  );
@@ -12,7 +12,6 @@ import { Colors } from "../utils/Color";
12
12
  interface EButtonProps extends TouchableOpacityProps {
13
13
  iconL?: JSX.Element;
14
14
  iconR?: JSX.Element;
15
- secondary?: boolean;
16
15
  inline?: boolean;
17
16
  small?: boolean;
18
17
  type?: "secondary" | "clear" | "primary";
@@ -25,7 +24,6 @@ export default function EButton({
25
24
  children,
26
25
  iconL,
27
26
  iconR,
28
- secondary,
29
27
  inline,
30
28
  small,
31
29
  type,
@@ -41,7 +39,7 @@ export default function EButton({
41
39
  >
42
40
  <View
43
41
  style={[
44
- tw`h-14 flex-row justify-center items-center px-8 rounded-full ${disabled ? "opacity-60" : ""} ${
42
+ tw`flex-row justify-center items-center px-8 rounded-full ${small ? 'h-10' : 'h-14'} ${disabled ? "opacity-40" : ""} ${
45
43
  type === "clear"
46
44
  ? "bg-transparent"
47
45
  : type === "secondary"
@@ -54,7 +52,7 @@ export default function EButton({
54
52
  {iconL ? <View style={tw`mr-1 -ml-2`}>{iconL}</View> : null}
55
53
  {/* LABEL */}
56
54
  <EText
57
- size={"base"}
55
+ size={"sm"}
58
56
  style={[
59
57
  tw`font-semibold ${
60
58
  type === "clear" ? `text-[${Colors["primary-base"]}]` : "text-white"
@@ -3,7 +3,7 @@ import { View } from "react-native";
3
3
  import tw from "../lib/tailwind";
4
4
  import { Colors } from "../utils/Color";
5
5
  import EText from "./EText";
6
- import EIconClock from "./icons/clock";
6
+ import EIconClock from "./icons/EIconClock";
7
7
 
8
8
  interface IProps{
9
9
  date: string;
@@ -8,7 +8,7 @@ interface IProps{
8
8
 
9
9
  export default function ELabel( {label }: IProps ) {
10
10
  return (
11
- <EText style={tw`text-sm font-semibold text-slate-500`}>
11
+ <EText size="sm" style={[tw`font-semibold text-slate-800`, {}]}>
12
12
  {label}
13
13
  </EText>
14
14
  )
@@ -19,7 +19,7 @@ export default function EListPerson({
19
19
  }: IProps) {
20
20
  return (
21
21
  <View style={[tw`flex-row items-center justify-between`]}>
22
- <Avatar size="sm" source={""} nameFirstLetter={firstLetter} />
22
+ <Avatar size="sm" source={""} nameFirstLetter={name.split(" ")[0].charAt(0)} />
23
23
  <View
24
24
  style={tw` ml-3 py-3 flex-1 ${
25
25
  noBorder ? "" : "border-b border-slate-200"
@@ -1,26 +1,33 @@
1
- import React from 'react'
2
- import { TouchableOpacity, View } from 'react-native'
3
- import tw from '../lib/tailwind'
4
- import { Colors } from '../utils/Color';
5
- import EText from './EText';
1
+ import React from "react";
2
+ import { TouchableOpacity, View } from "react-native";
3
+ import tw from "../lib/tailwind";
4
+ import { Colors } from "../utils/Color";
5
+ import EText from "./EText";
6
6
 
7
7
  interface IProps {
8
- title: string;
9
- active?: boolean;
10
- onPress?: () => void;
8
+ title: string;
9
+ active?: boolean;
10
+ onPress?: () => void;
11
11
  }
12
12
 
13
- export default function EPillButton( { title, active, onPress }: IProps) {
13
+ export default function EPillButton({ title, active, onPress }: IProps) {
14
14
  return (
15
- <TouchableOpacity style={[tw`px-4 py-3 mr-2 border rounded-lg border-slate-300`, {
16
- backgroundColor: active ? Colors['secondary-base'] : "transparent",
17
- borderColor: active ? Colors['secondary-base'] : Colors['border'],
18
- }]}
15
+ <TouchableOpacity
16
+ style={[
17
+ tw`px-4 py-3 mr-2 border rounded-lg border-slate-300`,
18
+ {
19
+ backgroundColor: active ? Colors["secondary-base"] : "transparent",
20
+ borderColor: active ? Colors["secondary-base"] : Colors["border"],
21
+ },
22
+ ]}
19
23
  onPress={onPress}
24
+ >
25
+ <EText
26
+ size={"base"}
27
+ style={tw`font-normal ${active ? "text-white" : "text-slate-500"}`}
20
28
  >
21
- <EText size={"sm"} style={tw`font-normal ${active ? "text-white" : "text-slate-500"}`}>
22
- {title}
23
- </EText>
29
+ {title}
30
+ </EText>
24
31
  </TouchableOpacity>
25
- )
32
+ );
26
33
  }
@@ -1,13 +1,13 @@
1
1
  import React, { useEffect, useRef, useState } from 'react'
2
2
  import { Animated,StyleSheet, View } from 'react-native';
3
- import tw from "../lib/tailwind";
4
- import { Colors } from "../utils/Color";
3
+ import tw from "fln-espranza/lib/tailwind";
4
+ import { Colors } from "fln-espranza/utils/Color";
5
5
 
6
6
  interface IProps{
7
7
  progress: number;
8
8
  }
9
9
 
10
- export default function ProgressBar( {progress}: IProps) {
10
+ export default function EProgressBar( {progress}: IProps) {
11
11
 
12
12
 
13
13
  const barWidth = useRef(new Animated.Value(0)).current;
@@ -21,7 +21,7 @@ export default function ProgressBar( {progress}: IProps) {
21
21
  }).start();
22
22
  }, [progress]);
23
23
  return (
24
- <View style={[tw`h-2 w-14 bg-[${Colors['primary-light']}] overflow-hidden mr-2`, {
24
+ <View style={[tw`h-2 w-14 bg-slate-200 overflow-hidden mr-2`, {
25
25
  borderRadius: 40,
26
26
  }]}>
27
27
  <Animated.View
@@ -30,7 +30,7 @@ export default function EText({
30
30
  size === "2xl" && "font-bold text-2xl",
31
31
  size === "3xl" && "font-bold text-3xl",
32
32
  size === "title" && "font-extrabold text-title text-2xl",
33
- muted && "opacity-40"
33
+ muted && "opacity-60"
34
34
  ),
35
35
  style,
36
36
  ]}
@@ -61,7 +61,7 @@ export default function SecondaryBaseLayout({
61
61
  tw`flex-1 bg-white`,
62
62
  {
63
63
  paddingBottom: Platform.OS === "ios" ? insets.bottom : 0,
64
- paddingTop: Platform.OS === "ios" ? 20 : 0,
64
+ paddingTop: Platform.OS === "ios" ? 12 : 24,
65
65
  },
66
66
  ]}
67
67
  >
@@ -111,7 +111,7 @@ export default function SecondaryBaseLayout({
111
111
  {children}
112
112
  </ScrollView>
113
113
  {bottomButton ? (
114
- <View style={tw` px-4 mb-6 `}>{bottomButton}</View>
114
+ <View style={[tw` px-4 `, {paddingBottom: Platform.OS ==='android' ? 8 : 0}]}>{bottomButton}</View>
115
115
  ) : (
116
116
  <></>
117
117
  )}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -26,7 +26,7 @@ import ModalLayout from "./ModalLayout";
26
26
  import PageHeader from "./PageHeader";
27
27
  import PageHeaderSecondary from "./PageHeaderSecondary";
28
28
  import Spacer from "./Spacer";
29
- import ProgressBar from "./ProgressBar";
29
+ import ProgressBar from "./EProgressBar";
30
30
  import Loader from "./Loader";
31
31
 
32
32
  export {
package/index.ts CHANGED
@@ -27,7 +27,7 @@ import PageHeader from "./components/PageHeader";
27
27
  import PageHeaderSecondary from "./components/PageHeaderSecondary";
28
28
  import Spacer from "./components/Spacer";
29
29
  import { Colors } from "./utils/Color";
30
- import ProgressBar from "./components/ProgressBar";
30
+ import ProgressBar from "./components/EProgressBar";
31
31
  import Loader from "./components/Loader";
32
32
  import ETimeInput from "./components/ETimeInput";
33
33
  import EDateInput from "./components/EDateInput";
@@ -35,6 +35,50 @@ import EErrorText from "./components/EErrorText";
35
35
  import EListPerson from "./components/EListPerson";
36
36
  import EListSchool from "./components/EListSchool";
37
37
 
38
+ // ICONS
39
+ import EIconAdd from "./components/icons/EIconAdd";
40
+ import EIconAddCircle from "./components/icons/EIconAddCircle";
41
+ import EIconApplicationStatus from "./components/icons/EIconApplicationStatus";
42
+ import EIconArrowDown from "./components/icons/EIconArrowDown";
43
+ import EIconArrowLeft from "./components/icons/EIconArrowLeft";
44
+ import EIconArrowRight from "./components/icons/EIconArrowRight";
45
+ import EIconArrowUp from "./components/icons/EIconArrowUp";
46
+ import EIconBadge from "./components/icons/EIconBadge";
47
+ import EIconBell from "./components/icons/EIconBell";
48
+ import EIconCalendar from "./components/icons/EIconCalendar";
49
+ import EIconCalendarCheck from "./components/icons/EIconCalendarCheck";
50
+ import EIconCamera from "./components/icons/EIconCamera";
51
+ import EIconCameraRotate from "./components/icons/EIconCameraRotate";
52
+ import EIconCheck from "./components/icons/EIconCheck";
53
+ import EIconCheckCircle from "./components/icons/EIconCheckCircle";
54
+ import EIconCheckFill from "./components/icons/EIconCheckFill";
55
+ import EIconChevronDown from "./components/icons/EIconChevronDown";
56
+ import EIconChevronLeft from "./components/icons/EIconChevronLeft";
57
+ import EIconChevronRight from "./components/icons/EIconChevronRight";
58
+ import EIconChevronUp from "./components/icons/EIconChevronUp";
59
+ import EIconClock from "./components/icons/EIconClock";
60
+ import EIconClose from "./components/icons/EIconClose";
61
+ import EIconDashboard from "./components/icons/EIconDashboard";
62
+ import EIconEdit from "./components/icons/EIconEdit";
63
+ import EIconFile from "./components/icons/EIconFile";
64
+ import EIconInfo from "./components/icons/EIconInfo";
65
+ import EIconLogout from "./components/icons/EIconLogout";
66
+ import EIconMenu from "./components/icons/EIconMenu";
67
+ import EIconMinus from "./components/icons/EIconMinus";
68
+ import EIconPin from "./components/icons/EIconPin";
69
+ import EIconProfile from "./components/icons/EIconProfile";
70
+ import EIconSchool from "./components/icons/EIconSchool";
71
+ import EIconSearch from "./components/icons/EIconSearch";
72
+ import EIconSettings from "./components/icons/EIconSettings";
73
+ import EIconShare from "./components/icons/EIconShare";
74
+ import EIconStudent from "./components/icons/EIconStudent";
75
+ import EIconSubject from "./components/icons/EIconSubject";
76
+ import EIconTeach from "./components/icons/EIconTeach";
77
+ import EIconTrash from "./components/icons/EIconTrash";
78
+ import EIconUserCard from "./components/icons/EIconUserCard";
79
+ import EIconUserCheck from "./components/icons/EIconUserCheck";
80
+ import EIconUsers from "./components/icons/EIconUsers";
81
+
38
82
  export {
39
83
  Avatar,
40
84
  BaseLayout,
@@ -71,6 +115,51 @@ export {
71
115
  EErrorText,
72
116
  Colors,
73
117
  EListPerson,
74
- EListSchool
118
+ EListSchool,
119
+
120
+
121
+ // ICONS
122
+ EIconAdd,
123
+ EIconAddCircle,
124
+ EIconApplicationStatus,
125
+ EIconArrowDown,
126
+ EIconArrowLeft,
127
+ EIconArrowRight,
128
+ EIconArrowUp,
129
+ EIconBadge,
130
+ EIconBell,
131
+ EIconCalendar,
132
+ EIconCalendarCheck,
133
+ EIconCamera,
134
+ EIconCameraRotate,
135
+ EIconCheck,
136
+ EIconCheckCircle,
137
+ EIconCheckFill,
138
+ EIconChevronDown,
139
+ EIconChevronLeft,
140
+ EIconChevronRight,
141
+ EIconChevronUp,
142
+ EIconClock,
143
+ EIconClose,
144
+ EIconDashboard,
145
+ EIconEdit,
146
+ EIconFile,
147
+ EIconInfo,
148
+ EIconLogout,
149
+ EIconMenu,
150
+ EIconMinus,
151
+ EIconPin,
152
+ EIconProfile,
153
+ EIconSchool,
154
+ EIconSearch,
155
+ EIconSettings,
156
+ EIconShare,
157
+ EIconStudent,
158
+ EIconSubject,
159
+ EIconTeach,
160
+ EIconTrash,
161
+ EIconUserCard,
162
+ EIconUserCheck,
163
+ EIconUsers
75
164
 
76
165
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fln-espranza",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "All components used inside FLN Project of Espranza Innovations",
5
5
  "main": "index.ts",
6
6
  "scripts": {