ikualo-ui-kit-mobile 0.1.0 → 0.1.2
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/assets/styles/elements/buttons.ts +44 -5
- package/assets/styles/elements/cards.ts +44 -0
- package/assets/styles/elements/dialog.ts +15 -8
- package/assets/styles/elements/header.ts +3 -1
- package/package.json +2 -2
- package/src/config/paper.config.ts +3 -0
- package/src/elements/buttons/BtnCircle.tsx +63 -0
- package/src/elements/buttons/BtnContained.tsx +2 -2
- package/src/elements/buttons/BtnOutlined.tsx +1 -1
- package/src/elements/cards/CardAbout.tsx +32 -0
- package/src/elements/dialogs/DialogGeneral.tsx +70 -21
- package/src/elements/headers/HeaderPage.tsx +10 -4
- package/src/elements/inputs/Input.tsx +4 -1
- package/src/elements/inputs/InputOtp.tsx +3 -1
- package/src/elements/inputs/InputPassword.tsx +3 -3
- package/src/elements/pages/PageBasic.tsx +5 -5
- package/src/elements/pages/PageTouchable.tsx +2 -4
- package/src/index.ts +2 -0
- package/%ProgramData%/Microsoft/Windows/UUS/State/_active.uusver +0 -1
|
@@ -10,12 +10,17 @@ const stylesButtonContained = StyleSheet.create({
|
|
|
10
10
|
'btn-contained-text': {
|
|
11
11
|
fontFamily: 'MontserratBold',
|
|
12
12
|
textAlign: 'center',
|
|
13
|
-
fontSize: 16
|
|
13
|
+
fontSize: 16
|
|
14
|
+
|
|
14
15
|
},
|
|
15
16
|
'btn-contained--primary': {
|
|
16
17
|
backgroundColor: theme.colors.primary,
|
|
17
18
|
color: theme.colors.white,
|
|
18
19
|
},
|
|
20
|
+
'btn-contained--error': {
|
|
21
|
+
backgroundColor: theme.colors.darkRed,
|
|
22
|
+
color: theme.colors.white,
|
|
23
|
+
},
|
|
19
24
|
'btn-contained--lightPrimary': {
|
|
20
25
|
backgroundColor: theme.colors.lightPrimary,
|
|
21
26
|
color: theme.colors.boldBlack,
|
|
@@ -41,7 +46,7 @@ const stylesButtonContained = StyleSheet.create({
|
|
|
41
46
|
|
|
42
47
|
'btn-contained--sm': {
|
|
43
48
|
padding: 0,
|
|
44
|
-
width:
|
|
49
|
+
width: 158,
|
|
45
50
|
},
|
|
46
51
|
'btn-contained--md': {
|
|
47
52
|
paddingVertical: 3,
|
|
@@ -57,7 +62,7 @@ const stylesButtonOutlined = StyleSheet.create({
|
|
|
57
62
|
'btn-outlined-text': {
|
|
58
63
|
fontFamily: 'MontserratBold',
|
|
59
64
|
textAlign: 'center',
|
|
60
|
-
fontSize: 16
|
|
65
|
+
fontSize: 16
|
|
61
66
|
},
|
|
62
67
|
'btn-outlined': {
|
|
63
68
|
borderRadius: 8,
|
|
@@ -69,6 +74,10 @@ const stylesButtonOutlined = StyleSheet.create({
|
|
|
69
74
|
borderColor: theme.colors.primary,
|
|
70
75
|
color: theme.colors.primary,
|
|
71
76
|
},
|
|
77
|
+
'btn-outlined--error': {
|
|
78
|
+
borderColor: theme.colors.darkRed,
|
|
79
|
+
color: theme.colors.darkRed,
|
|
80
|
+
},
|
|
72
81
|
'btn-outlined--secondary': {
|
|
73
82
|
borderColor: theme.colors.secondary,
|
|
74
83
|
color: theme.colors.secondary,
|
|
@@ -87,7 +96,8 @@ const stylesButtonOutlined = StyleSheet.create({
|
|
|
87
96
|
},
|
|
88
97
|
'btn-outlined--sm': {
|
|
89
98
|
paddingVertical: 3,
|
|
90
|
-
|
|
99
|
+
width: 158,
|
|
100
|
+
// paddingHorizontal: 10,
|
|
91
101
|
},
|
|
92
102
|
'btn-outlined--md': {
|
|
93
103
|
paddingVertical: 3,
|
|
@@ -201,5 +211,34 @@ const stylesBtnLightSmall = StyleSheet.create({
|
|
|
201
211
|
'btn-light-small-label--active': {
|
|
202
212
|
color: theme.colors.secondary,
|
|
203
213
|
},
|
|
214
|
+
|
|
215
|
+
});
|
|
216
|
+
const stylesButtonCircle = StyleSheet.create({
|
|
217
|
+
'btn-circle': {
|
|
218
|
+
borderRadius: 19,
|
|
219
|
+
backgroundColor: theme.colors.lightPurpleBorder,
|
|
220
|
+
paddingHorizontal: 8,
|
|
221
|
+
paddingTop: 4,
|
|
222
|
+
},
|
|
223
|
+
'btn-circle__icon': {
|
|
224
|
+
fontSize: 14,
|
|
225
|
+
color: theme.colors.primary,
|
|
226
|
+
},
|
|
227
|
+
'btn-circle__image': {
|
|
228
|
+
width: 24,
|
|
229
|
+
height: 24,
|
|
230
|
+
},
|
|
231
|
+
'btn-circle__content': {
|
|
232
|
+
flexDirection: 'row',
|
|
233
|
+
alignItems: 'center',
|
|
234
|
+
justifyContent: 'center',
|
|
235
|
+
gap: 4,
|
|
236
|
+
},
|
|
237
|
+
|
|
238
|
+
'btn-circle__text': {
|
|
239
|
+
fontSize: 14,
|
|
240
|
+
color: theme.colors.primary,
|
|
241
|
+
fontFamily: 'MontserratSemiBold',
|
|
242
|
+
},
|
|
204
243
|
});
|
|
205
|
-
export { stylesButtonContained, stylesButtonOutlined, stylesButtonText, stylesBtnLightSmall };
|
|
244
|
+
export { stylesButtonContained, stylesButtonOutlined, stylesButtonText, stylesBtnLightSmall, stylesButtonCircle };
|
|
@@ -102,3 +102,47 @@ export const stylesCards = StyleSheet.create({
|
|
|
102
102
|
borderRadius: 4,
|
|
103
103
|
},
|
|
104
104
|
});
|
|
105
|
+
export const styleCardAbout = StyleSheet.create({
|
|
106
|
+
'card-about': {
|
|
107
|
+
backgroundColor: theme.colors.white,
|
|
108
|
+
borderTopStartRadius: 8,
|
|
109
|
+
borderBottomLeftRadius: 8,
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
'card-about__image': {
|
|
113
|
+
borderBottomRightRadius: 8,
|
|
114
|
+
borderTopRightRadius: 8,
|
|
115
|
+
height: '100%',
|
|
116
|
+
objectFit: 'contain',
|
|
117
|
+
backgroundColor: theme.colors.lightPurpleBorder,
|
|
118
|
+
},
|
|
119
|
+
'card-about__title': {
|
|
120
|
+
fontFamily: 'MontserratSemiBold',
|
|
121
|
+
fontSize: 14,
|
|
122
|
+
lineHeight: 21,
|
|
123
|
+
color: theme.colors.cardDsc,
|
|
124
|
+
},
|
|
125
|
+
'card-about__vertical-line': {
|
|
126
|
+
width: 8,
|
|
127
|
+
backgroundColor: theme.colors.mediumPurple,
|
|
128
|
+
borderTopStartRadius: 8,
|
|
129
|
+
borderBottomStartRadius: 30,
|
|
130
|
+
borderBottomEndRadius: 8,
|
|
131
|
+
},
|
|
132
|
+
'card-about__container': {
|
|
133
|
+
flexDirection: 'row',
|
|
134
|
+
},
|
|
135
|
+
'card-about__text__container': {
|
|
136
|
+
flex: 1,
|
|
137
|
+
marginTop: 16,
|
|
138
|
+
marginBottom: 16,
|
|
139
|
+
paddingLeft: 8,
|
|
140
|
+
},
|
|
141
|
+
'card-about__text-dsc': {
|
|
142
|
+
marginVertical: 10,
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
'card-about__full-width': {
|
|
146
|
+
paddingRight: 16,
|
|
147
|
+
},
|
|
148
|
+
});
|
|
@@ -3,18 +3,18 @@ import { theme } from '../../../src/config/paper.config';
|
|
|
3
3
|
export const stylesDialog = StyleSheet.create({
|
|
4
4
|
dialog: {
|
|
5
5
|
backgroundColor: theme.colors.white,
|
|
6
|
+
marginHorizontal: 16,
|
|
6
7
|
},
|
|
7
|
-
'dialog-icon': {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
textAlign: 'center',
|
|
13
|
-
},
|
|
8
|
+
'dialog-icon': { borderRadius: 100, backgroundColor: theme.colors.lightRed, width: 40, height: 40, alignItems: 'center', justifyContent: 'center' },
|
|
9
|
+
'dialog-icon--error': { backgroundColor: theme.colors.lightRed },
|
|
10
|
+
'dialog-icon--warning': { backgroundColor: theme.colors.lightWarning },
|
|
11
|
+
'dialog-icon--info': { backgroundColor: theme.colors.lightInfo },
|
|
12
|
+
'dialog-icon--success': { backgroundColor: theme.colors.lightSuccess },
|
|
14
13
|
'dialog-title': {
|
|
15
14
|
fontSize: 16,
|
|
16
15
|
color: theme.colors.text,
|
|
17
16
|
textAlign: 'center',
|
|
17
|
+
lineHeight: 24,
|
|
18
18
|
fontFamily: 'MontserratSemiBold',
|
|
19
19
|
},
|
|
20
20
|
'dialog-select-title': {
|
|
@@ -75,4 +75,11 @@ export const stylesDialog = StyleSheet.create({
|
|
|
75
75
|
alignItems: 'center',
|
|
76
76
|
marginBottom: 16,
|
|
77
77
|
},
|
|
78
|
-
|
|
78
|
+
'dialog-general-close': {
|
|
79
|
+
position: 'absolute',
|
|
80
|
+
left: 10,
|
|
81
|
+
top: 20,
|
|
82
|
+
justifyContent: 'space-evenly',
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
});
|
|
@@ -24,4 +24,6 @@ export const stylesHeader = StyleSheet.create({
|
|
|
24
24
|
fontFamily: 'MontserratSemiBold',
|
|
25
25
|
},
|
|
26
26
|
'header-logo': { height: 32, width: 32, resizeMode: 'contain' },
|
|
27
|
-
}
|
|
27
|
+
'header-icon-back': { borderRadius: 100, backgroundColor: theme.colors.lightPrimary, width: 32, height: 32, alignItems: 'center', justifyContent: 'center' },
|
|
28
|
+
|
|
29
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ikualo-ui-kit-mobile",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"main": "src/index.ts",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "expo start",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"expo-updates": "^0.25.14",
|
|
29
29
|
"react": "18.2.0",
|
|
30
30
|
"react-dom": "18.2.0",
|
|
31
|
-
"react-native": "0.74.1",
|
|
31
|
+
"react-native": "^0.74.1",
|
|
32
32
|
"react-native-asset": "^2.1.1",
|
|
33
33
|
"react-native-country-flag": "^2.0.2",
|
|
34
34
|
"react-native-gesture-handler": "^2.16.2",
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Button, Text } from 'react-native-paper';
|
|
2
|
+
import { stylesButtonText, stylesButtonCircle } from '../../../assets/styles/elements/buttons';
|
|
3
|
+
import { cloneElement } from 'react';
|
|
4
|
+
import { View, Image } from 'react-native';
|
|
5
|
+
import { theme } from '../../config/paper.config';
|
|
6
|
+
|
|
7
|
+
interface IfBtnCircle {
|
|
8
|
+
onPress: () => void;
|
|
9
|
+
icon?: JSX.Element;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
text?: string;
|
|
12
|
+
contentStyle?: object;
|
|
13
|
+
image?: any;
|
|
14
|
+
customBackgroundColor?: string;
|
|
15
|
+
customTextColor?: string;
|
|
16
|
+
customButtonRadius?: number;
|
|
17
|
+
customFontStyle?: object;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const BtnCircle = (props: IfBtnCircle) => {
|
|
21
|
+
const {
|
|
22
|
+
onPress,
|
|
23
|
+
icon,
|
|
24
|
+
disabled,
|
|
25
|
+
text,
|
|
26
|
+
image,
|
|
27
|
+
customBackgroundColor,
|
|
28
|
+
customTextColor,
|
|
29
|
+
customButtonRadius,
|
|
30
|
+
customFontStyle,
|
|
31
|
+
contentStyle,
|
|
32
|
+
} = props;
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<Button
|
|
36
|
+
onPress={onPress}
|
|
37
|
+
disabled={disabled}
|
|
38
|
+
style={[
|
|
39
|
+
stylesButtonCircle['btn-circle'],
|
|
40
|
+
customBackgroundColor ? { backgroundColor: customBackgroundColor } : undefined,
|
|
41
|
+
customButtonRadius ? { borderRadius: customButtonRadius } : undefined,
|
|
42
|
+
contentStyle,
|
|
43
|
+
]}
|
|
44
|
+
contentStyle={contentStyle}
|
|
45
|
+
>
|
|
46
|
+
<View style={stylesButtonCircle['btn-circle__content']}>
|
|
47
|
+
{image && <Image source={image} style={stylesButtonCircle['btn-circle__image']} />}
|
|
48
|
+
{text && (
|
|
49
|
+
<Text
|
|
50
|
+
style={[
|
|
51
|
+
stylesButtonCircle['btn-circle__text'],
|
|
52
|
+
{ color: customTextColor || theme.colors.primary },
|
|
53
|
+
customFontStyle,
|
|
54
|
+
]}
|
|
55
|
+
>
|
|
56
|
+
{text}
|
|
57
|
+
</Text>
|
|
58
|
+
)}
|
|
59
|
+
{icon && cloneElement(icon, { style: stylesButtonCircle['btn-circle__icon'] })}
|
|
60
|
+
</View>
|
|
61
|
+
</Button>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
@@ -4,7 +4,7 @@ import { Image } from 'react-native';
|
|
|
4
4
|
import { stylesButtonContained } from '../../../assets/styles/elements/buttons';
|
|
5
5
|
|
|
6
6
|
interface IfBtnContained {
|
|
7
|
-
color?: 'primary' | 'secondary' | 'dark' | 'light' | 'lightPrimary';
|
|
7
|
+
color?: 'primary' | 'secondary' | 'dark' | 'light' | 'lightPrimary' | 'error';
|
|
8
8
|
text?: string;
|
|
9
9
|
size?: 'sm' | 'md' | 'xl';
|
|
10
10
|
labelStyle?: any;
|
|
@@ -47,4 +47,4 @@ export const BtnContained = (props: IfBtnContained) => {
|
|
|
47
47
|
</Button>
|
|
48
48
|
</>
|
|
49
49
|
);
|
|
50
|
-
};
|
|
50
|
+
};
|
|
@@ -3,7 +3,7 @@ import { Button } from 'react-native-paper';
|
|
|
3
3
|
import { stylesButtonOutlined } from '../../../assets/styles/elements/buttons';
|
|
4
4
|
|
|
5
5
|
interface IfBtnOutlined {
|
|
6
|
-
color?: 'primary' | 'secondary' | 'dark' | 'light';
|
|
6
|
+
color?: 'primary' | 'secondary' | 'dark' | 'light' | 'error';
|
|
7
7
|
text?: string;
|
|
8
8
|
size?: 'sm' | 'md' | 'xl';
|
|
9
9
|
customStyles?: object;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { View, Image, ImageRequireSource } from 'react-native';
|
|
2
|
+
import { Card, TouchableRipple, Text } from 'react-native-paper';
|
|
3
|
+
import { styleCardAbout } from '../../../assets/styles/elements/cards';
|
|
4
|
+
|
|
5
|
+
interface IfCardAbout {
|
|
6
|
+
image?: ImageRequireSource;
|
|
7
|
+
children: any;
|
|
8
|
+
style?: object;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const CardAbout = (props: IfCardAbout) => {
|
|
12
|
+
const { image, children } = props;
|
|
13
|
+
return (
|
|
14
|
+
<TouchableRipple onPress={() => { }}>
|
|
15
|
+
<Card style={styleCardAbout['card-about']}>
|
|
16
|
+
<View style={styleCardAbout['card-about__container']}>
|
|
17
|
+
<View style={styleCardAbout['card-about__vertical-line']} />
|
|
18
|
+
|
|
19
|
+
<View
|
|
20
|
+
style={[
|
|
21
|
+
styleCardAbout['card-about__text__container'],
|
|
22
|
+
!image && styleCardAbout['card-about__full-width'],
|
|
23
|
+
]}
|
|
24
|
+
>
|
|
25
|
+
{children}
|
|
26
|
+
</View>
|
|
27
|
+
{image && <Image style={styleCardAbout['card-about__image']} source={image} />}
|
|
28
|
+
</View>
|
|
29
|
+
</Card>
|
|
30
|
+
</TouchableRipple>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
@@ -1,47 +1,96 @@
|
|
|
1
|
-
import { Dialog, Portal, Text } from 'react-native-paper';
|
|
1
|
+
import { Dialog, Portal, Text, Button, Icon } from 'react-native-paper';
|
|
2
2
|
import { BtnOutlined, BtnContained } from '../../';
|
|
3
3
|
import { stylesDialog } from '../../../assets/styles/elements/dialog';
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
4
|
+
import { StyleProp, TextStyle, View, ViewStyle } from 'react-native';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { MaterialIcons, FontAwesome } from '@expo/vector-icons';
|
|
7
|
+
import { theme } from '../../config/paper.config';
|
|
7
8
|
interface IFDialogIcon {
|
|
8
9
|
isVisible: boolean;
|
|
9
|
-
icon
|
|
10
|
-
title
|
|
10
|
+
icon?: 'error' | 'warning' | 'info' | 'success' | '';
|
|
11
|
+
title?: string;
|
|
12
|
+
showClose?: boolean;
|
|
11
13
|
text: JSX.Element | string;
|
|
14
|
+
additionalText?: JSX.Element | string;
|
|
12
15
|
textOk?: string;
|
|
13
16
|
textCancel?: string;
|
|
14
17
|
onDismiss: () => void;
|
|
15
18
|
onConfirm: () => void;
|
|
19
|
+
textStyle?: TextStyle;
|
|
20
|
+
additionalTextStyle?: TextStyle;
|
|
21
|
+
children?: JSX.Element;
|
|
22
|
+
isDisabled?: boolean;
|
|
23
|
+
styleBtnContainer?: StyleProp<ViewStyle>;
|
|
24
|
+
|
|
16
25
|
}
|
|
17
26
|
|
|
18
27
|
export const DialogGeneral = (props: IFDialogIcon) => {
|
|
19
|
-
const { isVisible, title, text, textCancel, textOk, icon, onDismiss, onConfirm } = props;
|
|
28
|
+
const { isVisible, title, text, textCancel, textOk, icon, onDismiss, onConfirm, textStyle, additionalTextStyle, additionalText, isDisabled, children, styleBtnContainer, showClose } = props;
|
|
29
|
+
const icons = {
|
|
30
|
+
error: <MaterialIcons name="delete-forever" size={24} color={theme.colors.darkRed} />,
|
|
31
|
+
warning: <FontAwesome name="warning" size={24} color={theme.colors.darkWarning} />,
|
|
32
|
+
info: <MaterialIcons name="info-outline" size={24} color={theme.colors.darkBlue} />,
|
|
33
|
+
success: <MaterialIcons name="check-circle" size={24} color={theme.colors.darkSuccess} />
|
|
34
|
+
}
|
|
35
|
+
const IconDelete = <View style={[stylesDialog['dialog-icon'], icon ? stylesDialog[`dialog-icon--${icon}`] : null]}>
|
|
36
|
+
{icon && icons[icon]}
|
|
37
|
+
</View>
|
|
20
38
|
|
|
21
39
|
return (
|
|
22
40
|
<Portal>
|
|
23
41
|
<Dialog style={stylesDialog['dialog']} visible={isVisible} onDismiss={onDismiss}>
|
|
24
|
-
|
|
25
|
-
<
|
|
42
|
+
{icon && (
|
|
43
|
+
<View style={stylesDialog['dialog-container-icon']}>
|
|
44
|
+
{IconDelete}
|
|
45
|
+
</View>
|
|
46
|
+
)}
|
|
47
|
+
<View>
|
|
48
|
+
<Dialog.Title style={[stylesDialog['dialog-title']]}>{title}</Dialog.Title>
|
|
49
|
+
{showClose &&
|
|
50
|
+
<Button onPress={onDismiss} style={stylesDialog['dialog-general-close']}>
|
|
51
|
+
<Icon
|
|
52
|
+
source="close"
|
|
53
|
+
color={stylesDialog['dialog-down-close-icon'].color}
|
|
54
|
+
size={stylesDialog['dialog-down-close-icon'].width}
|
|
55
|
+
/>
|
|
56
|
+
</Button>
|
|
57
|
+
}
|
|
26
58
|
</View>
|
|
27
|
-
<Dialog.Title style={stylesDialog['dialog-title']}>{title}</Dialog.Title>
|
|
28
59
|
<Dialog.Content>
|
|
29
|
-
<Text style={stylesDialog['dialog-text']}>
|
|
60
|
+
<Text style={textStyle || stylesDialog['dialog-text']}>
|
|
61
|
+
{text}
|
|
62
|
+
</Text>
|
|
63
|
+
{additionalText && (
|
|
64
|
+
<Text style={additionalTextStyle ? [stylesDialog['dialog-text'], additionalTextStyle] : undefined}>
|
|
65
|
+
{additionalText}
|
|
66
|
+
</Text>
|
|
67
|
+
)}
|
|
68
|
+
{children && (
|
|
69
|
+
<View>
|
|
70
|
+
{children}
|
|
71
|
+
</View>
|
|
72
|
+
)}
|
|
30
73
|
</Dialog.Content>
|
|
31
74
|
<Dialog.Actions style={stylesDialog['dialog-actions']}>
|
|
32
75
|
{textCancel && (
|
|
33
|
-
<BtnOutlined color=
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
<BtnContained
|
|
37
|
-
color="primary"
|
|
38
|
-
size={!textCancel ? 'xl' : 'sm'}
|
|
39
|
-
onPress={onConfirm}
|
|
40
|
-
text={textOk}
|
|
41
|
-
/>
|
|
76
|
+
<BtnOutlined color={icon === 'error' ? 'error' : 'primary'}
|
|
77
|
+
size='sm'
|
|
78
|
+
onPress={onDismiss} text={textCancel} />
|
|
42
79
|
)}
|
|
80
|
+
<View style={styleBtnContainer} >
|
|
81
|
+
{textOk && (
|
|
82
|
+
<BtnContained
|
|
83
|
+
color={icon === 'error' ? 'error' : 'primary'}
|
|
84
|
+
size='sm'
|
|
85
|
+
onPress={onConfirm}
|
|
86
|
+
text={textOk}
|
|
87
|
+
isDisabled={isDisabled}
|
|
88
|
+
/>
|
|
89
|
+
)}
|
|
90
|
+
</View>
|
|
91
|
+
|
|
43
92
|
</Dialog.Actions>
|
|
44
93
|
</Dialog>
|
|
45
94
|
</Portal>
|
|
46
95
|
);
|
|
47
|
-
};
|
|
96
|
+
};
|
|
@@ -3,6 +3,8 @@ import { Image, TouchableOpacity, View } from 'react-native';
|
|
|
3
3
|
import { useNavigation } from '@react-navigation/native';
|
|
4
4
|
import { stylesHeader } from '../../../assets/styles/elements/header';
|
|
5
5
|
import { images } from '../../../assets/images/_images';
|
|
6
|
+
import { FontAwesome6, Ionicons, MaterialIcons } from '@expo/vector-icons';
|
|
7
|
+
import { theme } from '../../config/paper.config';
|
|
6
8
|
|
|
7
9
|
interface IFHeaderPage {
|
|
8
10
|
title: string;
|
|
@@ -28,21 +30,25 @@ export const HeaderPage = (props: IFHeaderPage) => {
|
|
|
28
30
|
{
|
|
29
31
|
name: 'close',
|
|
30
32
|
component: <TouchableOpacity onPress={() => onPressRight && onPressRight()}>
|
|
31
|
-
<
|
|
33
|
+
<View style={stylesHeader['header-icon-back']}>
|
|
34
|
+
<Ionicons name="close" size={24} color={theme.colors.primary} />
|
|
35
|
+
</View>
|
|
32
36
|
</TouchableOpacity>
|
|
33
37
|
|
|
34
38
|
},
|
|
35
39
|
{
|
|
36
40
|
name: 'help',
|
|
37
41
|
component: <TouchableOpacity onPress={() => onPressRight && onPressRight()}>
|
|
38
|
-
<
|
|
42
|
+
<MaterialIcons name="help-outline" size={28} color={theme.colors.primary} />
|
|
39
43
|
</TouchableOpacity>
|
|
40
44
|
},
|
|
41
45
|
]
|
|
42
46
|
return (
|
|
43
47
|
<View style={stylesHeader['header']}>
|
|
44
48
|
<TouchableOpacity onPress={navigateToScreen}>
|
|
45
|
-
<
|
|
49
|
+
<View style={stylesHeader['header-icon-back']}>
|
|
50
|
+
<FontAwesome6 name="chevron-left" size={16} color={theme.colors.primary} />
|
|
51
|
+
</View>
|
|
46
52
|
</TouchableOpacity>
|
|
47
53
|
<View style={{ flex: 1, alignItems: 'center' }}>
|
|
48
54
|
<Text variant="bodyMedium" style={stylesHeader['header-title']}>
|
|
@@ -52,4 +58,4 @@ export const HeaderPage = (props: IFHeaderPage) => {
|
|
|
52
58
|
{actionsRight.find(x => x.name === right)?.component ?? ""}
|
|
53
59
|
</View>
|
|
54
60
|
);
|
|
55
|
-
};
|
|
61
|
+
};
|
|
@@ -3,7 +3,7 @@ import { styleInput } from '../../../assets/styles/elements/inputs';
|
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { Image, View } from 'react-native';
|
|
5
5
|
import { icons } from '../../../assets/icons/_icons';
|
|
6
|
-
import { theme } from '
|
|
6
|
+
import { theme } from '../../config/paper.config';
|
|
7
7
|
|
|
8
8
|
interface IfInputText {
|
|
9
9
|
label?: string;
|
|
@@ -32,6 +32,7 @@ interface IfInputText {
|
|
|
32
32
|
required?: boolean;
|
|
33
33
|
readonly?: boolean;
|
|
34
34
|
msgErrorRequired?: string;
|
|
35
|
+
selection?: any
|
|
35
36
|
icon?: any;
|
|
36
37
|
}
|
|
37
38
|
|
|
@@ -61,6 +62,7 @@ export const Input = (props: IfInputText) => {
|
|
|
61
62
|
pattern,
|
|
62
63
|
required,
|
|
63
64
|
msgErrorRequired,
|
|
65
|
+
selection,
|
|
64
66
|
readonly,
|
|
65
67
|
icon
|
|
66
68
|
} = props;
|
|
@@ -143,6 +145,7 @@ export const Input = (props: IfInputText) => {
|
|
|
143
145
|
keyboardType={type === 'number' ? 'numeric' : 'default'}
|
|
144
146
|
right={icon && <TextInput.Icon color={theme.colors.primary} icon={icon ?? ''} />}
|
|
145
147
|
readOnly={isDisabled || readonly}
|
|
148
|
+
selection={selection}
|
|
146
149
|
/>
|
|
147
150
|
{!isDisabled &&
|
|
148
151
|
<>
|
|
@@ -10,10 +10,11 @@ interface IFInputOtp {
|
|
|
10
10
|
onChangeText: (otp: string) => void;
|
|
11
11
|
onFocus: () => void;
|
|
12
12
|
onBlur: () => void;
|
|
13
|
+
onKeyPress: (e: any) => void;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export const InputOtp = (props: IFInputOtp) => {
|
|
16
|
-
const { onChangeText, value, focus, onBlur, onFocus, isValid, someFocus } = props;
|
|
17
|
+
const { onChangeText, value, focus, onBlur, onFocus, isValid, someFocus, onKeyPress } = props;
|
|
17
18
|
const inputRef = React.useRef<any>(null);
|
|
18
19
|
React.useEffect(() => {
|
|
19
20
|
if (focus) {
|
|
@@ -42,6 +43,7 @@ export const InputOtp = (props: IFInputOtp) => {
|
|
|
42
43
|
onFocus={onFocus}
|
|
43
44
|
placeholderTextColor={theme.colors.text}
|
|
44
45
|
keyboardType="numeric"
|
|
46
|
+
onKeyPress={(e) => { onKeyPress && onKeyPress(e) }}
|
|
45
47
|
/>
|
|
46
48
|
</>
|
|
47
49
|
);
|
|
@@ -41,7 +41,6 @@ export const InputPassword = (props: IfInputPassword) => {
|
|
|
41
41
|
underlineColor,
|
|
42
42
|
activeUnderlineColor,
|
|
43
43
|
style,
|
|
44
|
-
theme,
|
|
45
44
|
textColor,
|
|
46
45
|
value,
|
|
47
46
|
isValid,
|
|
@@ -54,7 +53,8 @@ export const InputPassword = (props: IfInputPassword) => {
|
|
|
54
53
|
readonly,
|
|
55
54
|
nonValidate,
|
|
56
55
|
} = props;
|
|
57
|
-
const patternPasswordDefault = pattern ?? /^(
|
|
56
|
+
const patternPasswordDefault = pattern ?? /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*]).{8,}$/
|
|
57
|
+
|
|
58
58
|
|
|
59
59
|
const validateText = (text: string) => {
|
|
60
60
|
onChange(text);
|
|
@@ -132,4 +132,4 @@ export const InputPassword = (props: IfInputPassword) => {
|
|
|
132
132
|
)}
|
|
133
133
|
</View>
|
|
134
134
|
);
|
|
135
|
-
};
|
|
135
|
+
};
|
|
@@ -9,13 +9,13 @@ interface IFPageBasic {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export const PageBasic = (props: IFPageBasic) => {
|
|
12
|
-
const {
|
|
12
|
+
const { children, customStyles } = props;
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
|
-
|
|
16
|
-
<SafeAreaView style={[stylePages['page-basic']
|
|
15
|
+
<View style={[stylePages['page-basic']]}>
|
|
16
|
+
<SafeAreaView style={[stylePages['page-basic']]}>
|
|
17
17
|
<View style={[stylePages['page-basic-view'], customStyles]}>{children}</View>
|
|
18
18
|
</SafeAreaView>
|
|
19
|
-
|
|
19
|
+
</View>
|
|
20
20
|
);
|
|
21
|
-
};
|
|
21
|
+
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { View, KeyboardAvoidingView, TouchableWithoutFeedback, Keyboard } from 'react-native';
|
|
2
2
|
import { theme } from '../../config/paper.config';
|
|
3
3
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
4
|
-
|
|
5
|
-
|
|
6
4
|
interface IFPageTouchable {
|
|
7
5
|
children: React.ReactNode;
|
|
8
6
|
customStyles?: object;
|
|
@@ -12,7 +10,7 @@ export const PageTouchable = (props: IFPageTouchable) => {
|
|
|
12
10
|
const { children, customStyles } = props;
|
|
13
11
|
|
|
14
12
|
return (
|
|
15
|
-
|
|
13
|
+
<View style={{ backgroundColor: theme.colors.background, flex: 1 }}>
|
|
16
14
|
<KeyboardAvoidingView style={{ flex: 1 }} behavior="height">
|
|
17
15
|
<TouchableWithoutFeedback onPress={() => Keyboard.dismiss()}>
|
|
18
16
|
<SafeAreaView style={{ flex: 1 }}>
|
|
@@ -22,6 +20,6 @@ export const PageTouchable = (props: IFPageTouchable) => {
|
|
|
22
20
|
</SafeAreaView>
|
|
23
21
|
</TouchableWithoutFeedback>
|
|
24
22
|
</KeyboardAvoidingView>
|
|
25
|
-
|
|
23
|
+
</View>
|
|
26
24
|
);
|
|
27
25
|
};
|
package/src/index.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './elements/buttons/BtnOutlined';
|
|
|
6
6
|
export * from './elements/buttons/BtnText';
|
|
7
7
|
export * from './elements/buttons/BtnIcon';
|
|
8
8
|
export * from './elements/buttons/BtnLightSmall';
|
|
9
|
+
export * from './elements/buttons/BtnCircle';
|
|
9
10
|
|
|
10
11
|
export * from './elements/inputs/InputOtp';
|
|
11
12
|
export * from './elements/inputs/InputPassword';
|
|
@@ -22,6 +23,7 @@ export * from './elements/dialogs/DialogDown';
|
|
|
22
23
|
export * from './elements/cards/CardInteractive';
|
|
23
24
|
export * from './elements/cards/CardComponent';
|
|
24
25
|
export * from './elements/cards/CardList';
|
|
26
|
+
export * from './elements/cards/CardAbout';
|
|
25
27
|
|
|
26
28
|
export * from './elements/headers/HeaderPage';
|
|
27
29
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1308.2407.15042.0
|