ikualo-ui-kit-mobile 0.2.0 → 0.2.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/.env +2 -1
- package/assets/styles/elements/buttons.ts +0 -1
- package/assets/styles/elements/dialog.ts +2 -1
- package/assets/styles/elements/dropdown.ts +0 -1
- package/package.json +1 -1
- package/src/elements/dialogs/DialogGeneral.tsx +1 -2
- package/src/elements/headers/HeaderPage.tsx +9 -6
- package/src/elements/select/Select.tsx +4 -3
package/.env
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
EXPO_PUBLIC_API_URL=https://api-gw-dev.ikualo.com/api/v1/
|
|
2
|
+
EXPO_PUBLIC_API_KEY_VEXO=110bbcca-a118-494c-9b6f-ad60ec11370e
|
|
@@ -41,6 +41,7 @@ export const stylesDialog = StyleSheet.create({
|
|
|
41
41
|
fontFamily: 'MontserratSemiBold',
|
|
42
42
|
marginBottom: 16,
|
|
43
43
|
},
|
|
44
|
+
'dialog-only-title': { marginBottom: 0, marginTop: 16 },
|
|
44
45
|
'dialog-select-title': {
|
|
45
46
|
fontSize: 14,
|
|
46
47
|
color: theme.colors.text,
|
|
@@ -48,7 +49,7 @@ export const stylesDialog = StyleSheet.create({
|
|
|
48
49
|
fontFamily: 'MontserratSemiBold',
|
|
49
50
|
marginTop: -5,
|
|
50
51
|
},
|
|
51
|
-
'dialog-container-icon': { flexDirection: 'row', justifyContent: 'center', },
|
|
52
|
+
'dialog-container-icon': { flexDirection: 'row', justifyContent: 'center', marginBottom: 16 },
|
|
52
53
|
'dialog-text': {
|
|
53
54
|
fontSize: 14,
|
|
54
55
|
color: theme.colors.text,
|
|
@@ -6,7 +6,6 @@ const styleDropdown = StyleSheet.create({
|
|
|
6
6
|
width: 'auto',
|
|
7
7
|
flexDirection: 'row',
|
|
8
8
|
justifyContent: 'flex-end',
|
|
9
|
-
marginTop: 28
|
|
10
9
|
},
|
|
11
10
|
'dropdown-menu': { flexDirection: 'row', alignItems: 'center' },
|
|
12
11
|
'dropdown-content': { backgroundColor: 'white', borderRadius: 16, padding: 16 },
|
package/package.json
CHANGED
|
@@ -63,11 +63,10 @@ export const DialogGeneral = (props: IFDialogIcon) => {
|
|
|
63
63
|
{IconDelete}
|
|
64
64
|
</View>
|
|
65
65
|
)}
|
|
66
|
-
<Text style={[stylesDialog['dialog-title']]}>{title}</Text>
|
|
66
|
+
<Text style={[stylesDialog['dialog-title'], !text && !children && stylesDialog['dialog-only-title']]}>{title}</Text>
|
|
67
67
|
<Text style={textStyle || stylesDialog['dialog-text']}>
|
|
68
68
|
{text}
|
|
69
69
|
</Text>
|
|
70
|
-
|
|
71
70
|
{children}
|
|
72
71
|
<View style={stylesDialog['dialog-actions']}>
|
|
73
72
|
{textCancel && (
|
|
@@ -8,13 +8,14 @@ import { theme } from '../../config/paper.config';
|
|
|
8
8
|
|
|
9
9
|
interface IFHeaderPage {
|
|
10
10
|
title: string;
|
|
11
|
+
hideBack?: boolean;
|
|
11
12
|
navigateTo?: 'Back' | string;
|
|
12
13
|
onPressBack?: () => void;
|
|
13
14
|
onPressRight?: () => void;
|
|
14
15
|
right: 'icon' | 'close' | 'help' | ''
|
|
15
16
|
}
|
|
16
17
|
export const HeaderPage = (props: IFHeaderPage) => {
|
|
17
|
-
const { navigateTo, title, onPressBack, onPressRight, right } = props;
|
|
18
|
+
const { navigateTo, title, onPressBack, onPressRight, right, hideBack } = props;
|
|
18
19
|
const { navigate, goBack } = useNavigation();
|
|
19
20
|
const navigateToScreen = () => {
|
|
20
21
|
onPressBack && onPressBack();
|
|
@@ -45,11 +46,13 @@ export const HeaderPage = (props: IFHeaderPage) => {
|
|
|
45
46
|
]
|
|
46
47
|
return (
|
|
47
48
|
<View style={stylesHeader['header']}>
|
|
48
|
-
|
|
49
|
-
<
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
{!hideBack &&
|
|
50
|
+
<TouchableOpacity onPress={navigateToScreen}>
|
|
51
|
+
<View style={stylesHeader['header-icon-back']}>
|
|
52
|
+
<FontAwesome6 name="chevron-left" size={16} color={theme.colors.primary} />
|
|
53
|
+
</View>
|
|
54
|
+
</TouchableOpacity>
|
|
55
|
+
}
|
|
53
56
|
<View style={{ flex: 1, alignItems: 'center' }}>
|
|
54
57
|
<Text variant="bodyMedium" style={stylesHeader['header-title']}>
|
|
55
58
|
{title}
|
|
@@ -12,9 +12,10 @@ interface IFSelect {
|
|
|
12
12
|
options: { value: string; label: ReactElement }[];
|
|
13
13
|
onSelect: (value: string) => void;
|
|
14
14
|
value?: string;
|
|
15
|
+
showInLabel?: "placeholder" | "label"
|
|
15
16
|
}
|
|
16
17
|
export const Select = (props: IFSelect) => {
|
|
17
|
-
const { placeholder, options, onSelect, label, isDisabled, value } = props;
|
|
18
|
+
const { placeholder, options, onSelect, label, isDisabled, value, showInLabel } = props;
|
|
18
19
|
const [showList, setShowList] = useState(false);
|
|
19
20
|
const [selected, setSelected] = useState<ReactElement | null>(
|
|
20
21
|
options?.find((option) => option.value === value)?.label ?? null
|
|
@@ -38,7 +39,7 @@ export const Select = (props: IFSelect) => {
|
|
|
38
39
|
</TouchableNativeFeedback>
|
|
39
40
|
<SelectList
|
|
40
41
|
children={options}
|
|
41
|
-
label={placeholder}
|
|
42
|
+
label={showInLabel === "label" ? label : placeholder}
|
|
42
43
|
onDismiss={() => setShowList(false)}
|
|
43
44
|
onSelect={(value) => {
|
|
44
45
|
setSelected(value.label);
|
|
@@ -48,4 +49,4 @@ export const Select = (props: IFSelect) => {
|
|
|
48
49
|
/>
|
|
49
50
|
</>
|
|
50
51
|
);
|
|
51
|
-
};
|
|
52
|
+
};
|