@nexara/nativeflow 0.1.1 → 0.1.4
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/lib/commonjs/components/Button/Button.js +61 -47
- package/lib/commonjs/components/Button/Button.js.map +1 -1
- package/lib/commonjs/components/CheckBox/CheckBox.js +39 -29
- package/lib/commonjs/components/CheckBox/CheckBox.js.map +1 -1
- package/lib/commonjs/components/Chip/Chip.js +2 -2
- package/lib/commonjs/components/Chip/Chip.js.map +1 -1
- package/lib/commonjs/components/Dialog/Dialog.js +53 -48
- package/lib/commonjs/components/Dialog/Dialog.js.map +1 -1
- package/lib/commonjs/components/Dialog/DialogBody.js +6 -8
- package/lib/commonjs/components/Dialog/DialogBody.js.map +1 -1
- package/lib/commonjs/components/Dialog/DialogDescription.js +5 -8
- package/lib/commonjs/components/Dialog/DialogDescription.js.map +1 -1
- package/lib/commonjs/components/Dialog/DialogFoot.js +13 -13
- package/lib/commonjs/components/Dialog/DialogFoot.js.map +1 -1
- package/lib/commonjs/components/Dialog/DialogHead.js +17 -16
- package/lib/commonjs/components/Dialog/DialogHead.js.map +1 -1
- package/lib/commonjs/components/Divider/Divider.js +5 -9
- package/lib/commonjs/components/Divider/Divider.js.map +1 -1
- package/lib/commonjs/components/Grid/Grid.js +0 -1
- package/lib/commonjs/components/Grid/Grid.js.map +1 -1
- package/lib/commonjs/components/Header/Header.js.map +1 -1
- package/lib/commonjs/components/Icon/Icon.js +9 -5
- package/lib/commonjs/components/Icon/Icon.js.map +1 -1
- package/lib/commonjs/components/IconButton/IconButton.js +6 -3
- package/lib/commonjs/components/IconButton/IconButton.js.map +1 -1
- package/lib/commonjs/components/Link/Link.js +13 -15
- package/lib/commonjs/components/Link/Link.js.map +1 -1
- package/lib/commonjs/components/Menu/Menu.js +51 -54
- package/lib/commonjs/components/Menu/Menu.js.map +1 -1
- package/lib/commonjs/components/Menu/MenuItem.js +0 -2
- package/lib/commonjs/components/Menu/MenuItem.js.map +1 -1
- package/lib/commonjs/components/Portal/Portal.js +1 -1
- package/lib/commonjs/components/Portal/Portal.js.map +1 -1
- package/lib/commonjs/components/Progress/Progress.js +25 -15
- package/lib/commonjs/components/Progress/Progress.js.map +1 -1
- package/lib/commonjs/components/Stack/HStack.js +9 -13
- package/lib/commonjs/components/Stack/HStack.js.map +1 -1
- package/lib/commonjs/components/Stack/VStack.js +5 -6
- package/lib/commonjs/components/Stack/VStack.js.map +1 -1
- package/lib/commonjs/components/StyledComponents/StyledText.js +11 -14
- package/lib/commonjs/components/StyledComponents/StyledText.js.map +1 -1
- package/lib/commonjs/components/StyledComponents/StyledView.js +14 -14
- package/lib/commonjs/components/StyledComponents/StyledView.js.map +1 -1
- package/lib/commonjs/components/Switch/Switch.js +4 -4
- package/lib/commonjs/components/Switch/Switch.js.map +1 -1
- package/lib/commonjs/components/TouchableRipple/TouchableRipple.js +90 -103
- package/lib/commonjs/components/TouchableRipple/TouchableRipple.js.map +1 -1
- package/lib/commonjs/components/UserInput/UserInput.js +31 -34
- package/lib/commonjs/components/UserInput/UserInput.js.map +1 -1
- package/lib/commonjs/helpers/LightenColorShades.js +18 -5
- package/lib/commonjs/helpers/LightenColorShades.js.map +1 -1
- package/lib/commonjs/helpers/ResponsiveCalculations.js +30 -4
- package/lib/commonjs/helpers/ResponsiveCalculations.js.map +1 -1
- package/lib/commonjs/helpers/index.js +16 -0
- package/lib/commonjs/helpers/index.js.map +1 -1
- package/lib/commonjs/index.js +0 -7
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/themes/LightTheme.js +1 -3
- package/lib/commonjs/themes/LightTheme.js.map +1 -1
- package/lib/commonjs/types/index.js +11 -0
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/types/progress.type.js +2 -0
- package/lib/commonjs/types/progress.type.js.map +1 -0
- package/lib/module/components/Button/Button.js +62 -48
- package/lib/module/components/Button/Button.js.map +1 -1
- package/lib/module/components/CheckBox/CheckBox.js +41 -31
- package/lib/module/components/CheckBox/CheckBox.js.map +1 -1
- package/lib/module/components/Chip/Chip.js +2 -2
- package/lib/module/components/Chip/Chip.js.map +1 -1
- package/lib/module/components/Dialog/Dialog.js +53 -48
- package/lib/module/components/Dialog/Dialog.js.map +1 -1
- package/lib/module/components/Dialog/DialogBody.js +7 -9
- package/lib/module/components/Dialog/DialogBody.js.map +1 -1
- package/lib/module/components/Dialog/DialogDescription.js +6 -9
- package/lib/module/components/Dialog/DialogDescription.js.map +1 -1
- package/lib/module/components/Dialog/DialogFoot.js +13 -13
- package/lib/module/components/Dialog/DialogFoot.js.map +1 -1
- package/lib/module/components/Dialog/DialogHead.js +17 -16
- package/lib/module/components/Dialog/DialogHead.js.map +1 -1
- package/lib/module/components/Divider/Divider.js +5 -9
- package/lib/module/components/Divider/Divider.js.map +1 -1
- package/lib/module/components/Grid/Grid.js +0 -1
- package/lib/module/components/Grid/Grid.js.map +1 -1
- package/lib/module/components/Header/Header.js.map +1 -1
- package/lib/module/components/Icon/Icon.js +7 -4
- package/lib/module/components/Icon/Icon.js.map +1 -1
- package/lib/module/components/IconButton/IconButton.js +5 -3
- package/lib/module/components/IconButton/IconButton.js.map +1 -1
- package/lib/module/components/Link/Link.js +14 -16
- package/lib/module/components/Link/Link.js.map +1 -1
- package/lib/module/components/Menu/Menu.js +51 -54
- package/lib/module/components/Menu/Menu.js.map +1 -1
- package/lib/module/components/Menu/MenuItem.js +0 -2
- package/lib/module/components/Menu/MenuItem.js.map +1 -1
- package/lib/module/components/Portal/Portal.js +1 -1
- package/lib/module/components/Portal/Portal.js.map +1 -1
- package/lib/module/components/Progress/Progress.js +26 -16
- package/lib/module/components/Progress/Progress.js.map +1 -1
- package/lib/module/components/Stack/HStack.js +9 -13
- package/lib/module/components/Stack/HStack.js.map +1 -1
- package/lib/module/components/Stack/VStack.js +6 -7
- package/lib/module/components/Stack/VStack.js.map +1 -1
- package/lib/module/components/StyledComponents/StyledText.js +12 -15
- package/lib/module/components/StyledComponents/StyledText.js.map +1 -1
- package/lib/module/components/StyledComponents/StyledView.js +15 -15
- package/lib/module/components/StyledComponents/StyledView.js.map +1 -1
- package/lib/module/components/Switch/Switch.js +4 -4
- package/lib/module/components/Switch/Switch.js.map +1 -1
- package/lib/module/components/TouchableRipple/TouchableRipple.js +90 -96
- package/lib/module/components/TouchableRipple/TouchableRipple.js.map +1 -1
- package/lib/module/components/UserInput/UserInput.js +32 -37
- package/lib/module/components/UserInput/UserInput.js.map +1 -1
- package/lib/module/components/UserInput/UserInputV2.js.map +1 -1
- package/lib/module/helpers/LightenColorShades.js +18 -5
- package/lib/module/helpers/LightenColorShades.js.map +1 -1
- package/lib/module/helpers/ResponsiveCalculations.js +28 -3
- package/lib/module/helpers/ResponsiveCalculations.js.map +1 -1
- package/lib/module/helpers/index.js +1 -0
- package/lib/module/helpers/index.js.map +1 -1
- package/lib/module/index.js +5 -5
- package/lib/module/index.js.map +1 -2
- package/lib/module/themes/LightTheme.js +1 -2
- package/lib/module/themes/LightTheme.js.map +1 -1
- package/lib/module/types/index.js +1 -0
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/types/progress.type.js +2 -0
- package/lib/module/types/progress.type.js.map +1 -0
- package/lib/typescript/commonjs/src/components/Button/Button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/CheckBox/CheckBox.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Dialog/DialogBody.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Dialog/DialogFoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Dialog/DialogHead.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Divider/Divider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Grid/Grid.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Header/Header.d.ts +1 -0
- package/lib/typescript/commonjs/src/components/Header/Header.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Icon/Icon.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/Icon/Icon.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/IconButton/IconButton.d.ts +2 -2
- package/lib/typescript/commonjs/src/components/IconButton/IconButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Link/Link.d.ts +4 -0
- package/lib/typescript/commonjs/src/components/Link/Link.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Menu/Menu.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Menu/MenuItem.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Portal/Portal.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/Portal/Portal.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Progress/Progress.d.ts +1 -12
- package/lib/typescript/commonjs/src/components/Progress/Progress.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Stack/HStack.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/Stack/VStack.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/StyledComponents/StyledText.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/StyledComponents/StyledView.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/TouchableRipple/TouchableRipple.d.ts +0 -10
- package/lib/typescript/commonjs/src/components/TouchableRipple/TouchableRipple.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/UserInput/UserInput.d.ts +1 -34
- package/lib/typescript/commonjs/src/components/UserInput/UserInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/components/UserInput/UserInputV2.d.ts +1 -1
- package/lib/typescript/commonjs/src/components/UserInput/UserInputV2.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/helpers/LightenColorShades.d.ts +1 -1
- package/lib/typescript/commonjs/src/helpers/LightenColorShades.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/helpers/ResponsiveCalculations.d.ts +1 -0
- package/lib/typescript/commonjs/src/helpers/ResponsiveCalculations.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/helpers/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/helpers/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +0 -2
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/themes/LightTheme.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/button.type.d.ts +3 -2
- package/lib/typescript/commonjs/src/types/button.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/chip.type.d.ts +1 -0
- package/lib/typescript/commonjs/src/types/chip.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/dialog.type.d.ts +4 -6
- package/lib/typescript/commonjs/src/types/dialog.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/types/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/menu.type.d.ts +7 -2
- package/lib/typescript/commonjs/src/types/menu.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/progress.type.d.ts +13 -0
- package/lib/typescript/commonjs/src/types/progress.type.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/stack.type.d.ts +6 -4
- package/lib/typescript/commonjs/src/types/stack.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/styledComponents.type.d.ts +7 -1
- package/lib/typescript/commonjs/src/types/styledComponents.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/userInput.type.d.ts +7 -1
- package/lib/typescript/commonjs/src/types/userInput.type.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Button/Button.d.ts.map +1 -1
- package/lib/typescript/module/src/components/CheckBox/CheckBox.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Dialog/DialogBody.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Dialog/DialogFoot.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Dialog/DialogHead.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Divider/Divider.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Grid/Grid.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Header/Header.d.ts +1 -0
- package/lib/typescript/module/src/components/Header/Header.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Icon/Icon.d.ts +1 -1
- package/lib/typescript/module/src/components/Icon/Icon.d.ts.map +1 -1
- package/lib/typescript/module/src/components/IconButton/IconButton.d.ts +2 -2
- package/lib/typescript/module/src/components/IconButton/IconButton.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Link/Link.d.ts +4 -0
- package/lib/typescript/module/src/components/Link/Link.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Menu/Menu.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Menu/MenuItem.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Portal/Portal.d.ts +1 -1
- package/lib/typescript/module/src/components/Portal/Portal.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Progress/Progress.d.ts +1 -12
- package/lib/typescript/module/src/components/Progress/Progress.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Stack/HStack.d.ts.map +1 -1
- package/lib/typescript/module/src/components/Stack/VStack.d.ts.map +1 -1
- package/lib/typescript/module/src/components/StyledComponents/StyledText.d.ts.map +1 -1
- package/lib/typescript/module/src/components/StyledComponents/StyledView.d.ts.map +1 -1
- package/lib/typescript/module/src/components/TouchableRipple/TouchableRipple.d.ts +0 -10
- package/lib/typescript/module/src/components/TouchableRipple/TouchableRipple.d.ts.map +1 -1
- package/lib/typescript/module/src/components/UserInput/UserInput.d.ts +1 -34
- package/lib/typescript/module/src/components/UserInput/UserInput.d.ts.map +1 -1
- package/lib/typescript/module/src/components/UserInput/UserInputV2.d.ts +1 -1
- package/lib/typescript/module/src/components/UserInput/UserInputV2.d.ts.map +1 -1
- package/lib/typescript/module/src/helpers/LightenColorShades.d.ts +1 -1
- package/lib/typescript/module/src/helpers/LightenColorShades.d.ts.map +1 -1
- package/lib/typescript/module/src/helpers/ResponsiveCalculations.d.ts +1 -0
- package/lib/typescript/module/src/helpers/ResponsiveCalculations.d.ts.map +1 -1
- package/lib/typescript/module/src/helpers/index.d.ts +1 -0
- package/lib/typescript/module/src/helpers/index.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +0 -2
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/themes/LightTheme.d.ts.map +1 -1
- package/lib/typescript/module/src/types/button.type.d.ts +3 -2
- package/lib/typescript/module/src/types/button.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/chip.type.d.ts +1 -0
- package/lib/typescript/module/src/types/chip.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/dialog.type.d.ts +4 -6
- package/lib/typescript/module/src/types/dialog.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/index.d.ts +1 -0
- package/lib/typescript/module/src/types/index.d.ts.map +1 -1
- package/lib/typescript/module/src/types/menu.type.d.ts +7 -2
- package/lib/typescript/module/src/types/menu.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/progress.type.d.ts +13 -0
- package/lib/typescript/module/src/types/progress.type.d.ts.map +1 -0
- package/lib/typescript/module/src/types/stack.type.d.ts +6 -4
- package/lib/typescript/module/src/types/stack.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/styledComponents.type.d.ts +7 -1
- package/lib/typescript/module/src/types/styledComponents.type.d.ts.map +1 -1
- package/lib/typescript/module/src/types/userInput.type.d.ts +7 -1
- package/lib/typescript/module/src/types/userInput.type.d.ts.map +1 -1
- package/package.json +29 -19
- package/src/components/Button/Button.tsx +122 -79
- package/src/components/CheckBox/CheckBox.tsx +61 -49
- package/src/components/Chip/Chip.tsx +2 -2
- package/src/components/Dialog/Dialog.tsx +55 -51
- package/src/components/Dialog/DialogBody.tsx +7 -9
- package/src/components/Dialog/DialogDescription.tsx +10 -10
- package/src/components/Dialog/DialogFoot.tsx +15 -13
- package/src/components/Dialog/DialogHead.tsx +20 -17
- package/src/components/Divider/Divider.tsx +5 -10
- package/src/components/Grid/Grid.tsx +0 -1
- package/src/components/Header/Header.tsx +1 -0
- package/src/components/Icon/Icon.tsx +8 -4
- package/src/components/IconButton/IconButton.tsx +6 -6
- package/src/components/Link/Link.tsx +24 -7
- package/src/components/Menu/Menu.tsx +51 -51
- package/src/components/Menu/MenuItem.tsx +0 -2
- package/src/components/Portal/Portal.tsx +2 -2
- package/src/components/Progress/Progress.tsx +32 -35
- package/src/components/Stack/HStack.tsx +12 -14
- package/src/components/Stack/VStack.tsx +10 -9
- package/src/components/StyledComponents/StyledText.tsx +4 -7
- package/src/components/StyledComponents/StyledView.tsx +6 -2
- package/src/components/Switch/Switch.tsx +4 -4
- package/src/components/TouchableRipple/TouchableRipple.tsx +83 -83
- package/src/components/UserInput/UserInput.tsx +45 -39
- package/src/components/UserInput/UserInputV2.tsx +2 -2
- package/src/helpers/LightenColorShades.ts +26 -6
- package/src/helpers/ResponsiveCalculations.ts +28 -3
- package/src/helpers/index.ts +2 -1
- package/src/index.ts +2 -2
- package/src/themes/LightTheme.ts +1 -2
- package/src/types/button.type.ts +3 -2
- package/src/types/chip.type.ts +1 -0
- package/src/types/dialog.type.ts +6 -8
- package/src/types/index.ts +2 -1
- package/src/types/menu.type.ts +8 -2
- package/src/types/progress.type.ts +16 -0
- package/src/types/stack.type.ts +6 -4
- package/src/types/styledComponents.type.ts +8 -1
- package/src/types/userInput.type.ts +8 -1
- package/src/index.tsx +0 -3
|
@@ -19,24 +19,13 @@ const DialogHead: React.FC<props> = ({
|
|
|
19
19
|
textStyle,
|
|
20
20
|
children
|
|
21
21
|
}) => {
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
padding: moderateScale(variant === 'default' ? 16 : 25),
|
|
27
|
-
paddingBottom: moderateScale(16),
|
|
28
|
-
justifyContent: 'space-between',
|
|
29
|
-
flexDirection: 'row',
|
|
30
|
-
},
|
|
31
|
-
HEADER_TEXT: {
|
|
32
|
-
// fontSize: responsiveFontSize(15),
|
|
33
|
-
fontWeight: 'bold',
|
|
34
|
-
color: '#000',
|
|
35
|
-
}
|
|
36
|
-
});
|
|
22
|
+
const dynamicStyles = {
|
|
23
|
+
borderBottomWidth: variant == 'default' ? 0.7 : 0,
|
|
24
|
+
padding: moderateScale(variant === 'default' ? 16 : 25),
|
|
25
|
+
};
|
|
37
26
|
return (<>
|
|
38
27
|
|
|
39
|
-
<View style={[STYLES.CONTAINER, containerStyle]}>
|
|
28
|
+
<View style={[STYLES.CONTAINER, dynamicStyles, containerStyle]}>
|
|
40
29
|
<View>
|
|
41
30
|
<StyledText style={[STYLES.HEADER_TEXT, textStyle]} fs={fs} variant={textVariant}>{title}</StyledText>
|
|
42
31
|
{children}
|
|
@@ -48,4 +37,18 @@ const DialogHead: React.FC<props> = ({
|
|
|
48
37
|
</>);
|
|
49
38
|
}
|
|
50
39
|
export default DialogHead;
|
|
51
|
-
export type { DialogHeadProps };
|
|
40
|
+
export type { DialogHeadProps };
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
const STYLES = StyleSheet.create({
|
|
44
|
+
CONTAINER: {
|
|
45
|
+
borderColor: '#d4d4d4',
|
|
46
|
+
paddingBottom: moderateScale(16),
|
|
47
|
+
justifyContent: 'space-between',
|
|
48
|
+
flexDirection: 'row',
|
|
49
|
+
},
|
|
50
|
+
HEADER_TEXT: {
|
|
51
|
+
fontWeight: 'bold',
|
|
52
|
+
color: '#000',
|
|
53
|
+
}
|
|
54
|
+
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { StyleSheet } from "react-native";
|
|
3
2
|
import type { ViewStyle, StyleProp } from "react-native";
|
|
4
3
|
import { StyledView } from '../StyledComponents';
|
|
5
4
|
import { useTheme } from '../../hooks';
|
|
@@ -13,22 +12,18 @@ type DividerProps = {
|
|
|
13
12
|
|
|
14
13
|
const Divider: React.FC<DividerProps> = ({
|
|
15
14
|
thickness = 0.2,
|
|
16
|
-
// color = '#DCDBDB',
|
|
17
15
|
color,
|
|
18
16
|
style
|
|
19
17
|
}) => {
|
|
20
18
|
|
|
21
19
|
const theme = useTheme();
|
|
22
20
|
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
|
|
21
|
+
const dynamicStyles = {
|
|
22
|
+
borderWidth: thickness,
|
|
23
|
+
borderColor: color ?? theme?.colors.dividerColor
|
|
24
|
+
};
|
|
30
25
|
return (<>
|
|
31
|
-
<StyledView style={[
|
|
26
|
+
<StyledView style={[dynamicStyles, style]} />
|
|
32
27
|
</>);
|
|
33
28
|
};
|
|
34
29
|
export default Divider;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { JSX } from 'react';
|
|
2
3
|
import { View, StyleSheet, TouchableOpacity } from 'react-native';
|
|
3
4
|
import { moderateScale, moderateVerticalScale, responsiveFontSize } from '../../helpers/ResponsiveCalculations';
|
|
4
5
|
import { StyledText } from '../StyledComponents';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { useMemo, type JSX } from "react";
|
|
2
2
|
import { verticalScale } from "../../helpers/ResponsiveCalculations";
|
|
3
3
|
import { useTheme } from "../../hooks";
|
|
4
4
|
|
|
@@ -14,14 +14,18 @@ const Icon: React.FC<IconProps> = ({
|
|
|
14
14
|
}) => {
|
|
15
15
|
const theme = useTheme(!color && !renderIcon?.props.color);
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const renderCallBackIcon = useMemo(() => {
|
|
18
|
+
return React.cloneElement(renderIcon as React.ReactElement<any>,
|
|
19
19
|
{
|
|
20
20
|
...renderIcon?.props,
|
|
21
21
|
size: verticalScale(renderIcon?.props?.size ?? 15),
|
|
22
22
|
color: color ?? (renderIcon?.props.color ?? theme?.colors.iconPrimary)
|
|
23
23
|
}
|
|
24
|
-
)
|
|
24
|
+
)
|
|
25
|
+
}, [color, theme]);
|
|
26
|
+
|
|
27
|
+
return (<>
|
|
28
|
+
{renderCallBackIcon}
|
|
25
29
|
</>)
|
|
26
30
|
}
|
|
27
31
|
export default Icon;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { ReactNode } from "react";
|
|
3
|
-
import type
|
|
3
|
+
import { TouchableOpacity, type TouchableOpacityProps } from "react-native";
|
|
4
4
|
import { StyledView } from "../StyledComponents";
|
|
5
|
-
import TouchableRipple from "../TouchableRipple/TouchableRipple";
|
|
5
|
+
// import TouchableRipple from "../TouchableRipple/TouchableRipple";
|
|
6
6
|
import Icon from "../Icon/Icon";
|
|
7
7
|
import { verticalScale } from "../../helpers/ResponsiveCalculations";
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
type IconButtonProps =
|
|
10
|
+
type IconButtonProps = TouchableOpacityProps & {
|
|
11
11
|
rippleColor?: string;
|
|
12
12
|
children?: ReactNode;
|
|
13
13
|
}
|
|
@@ -20,15 +20,15 @@ const IconButton: React.FC<IconButtonProps> = ({
|
|
|
20
20
|
|
|
21
21
|
return (<>
|
|
22
22
|
<StyledView style={{ alignSelf: 'flex-start' }}>
|
|
23
|
-
<
|
|
24
|
-
rippleColor={rippleColor}
|
|
23
|
+
<TouchableOpacity
|
|
24
|
+
// rippleColor={rippleColor}
|
|
25
25
|
style={{ borderRadius: 100, padding: verticalScale(8) }}
|
|
26
26
|
{...rest}
|
|
27
27
|
>
|
|
28
28
|
<Icon
|
|
29
29
|
renderIcon={React.cloneElement(children as React.ReactElement<any>)}
|
|
30
30
|
/>
|
|
31
|
-
</
|
|
31
|
+
</TouchableOpacity>
|
|
32
32
|
</StyledView>
|
|
33
33
|
</>)
|
|
34
34
|
}
|
|
@@ -1,31 +1,48 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
2
|
import { StyledText } from "../StyledComponents";
|
|
3
|
-
import { Linking, TouchableOpacity } from "react-native";
|
|
3
|
+
import { Linking, StyleSheet, TouchableOpacity, type TextStyle } from "react-native";
|
|
4
4
|
import { useCallback } from "react";
|
|
5
|
+
import type { TypographyVariant } from "../../types";
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
type props = {
|
|
8
9
|
title: string;
|
|
9
10
|
href: string;
|
|
11
|
+
textVariant?: TypographyVariant;
|
|
12
|
+
style?: TextStyle
|
|
10
13
|
}
|
|
11
14
|
|
|
12
15
|
const Link: React.FC<props> = ({
|
|
13
16
|
title = '',
|
|
14
|
-
href
|
|
17
|
+
href,
|
|
18
|
+
textVariant = 'h5',
|
|
19
|
+
style
|
|
15
20
|
}) => {
|
|
16
21
|
const onUserPress = useCallback(async () => {
|
|
17
22
|
const supported = await Linking.canOpenURL(href);
|
|
18
23
|
if (supported) {
|
|
19
24
|
await Linking.openURL(href);
|
|
20
25
|
}
|
|
21
|
-
}, []);
|
|
26
|
+
}, [href]);
|
|
22
27
|
return (<>
|
|
23
28
|
<TouchableOpacity onPress={onUserPress}>
|
|
24
|
-
<StyledText
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
<StyledText
|
|
30
|
+
variant={textVariant}
|
|
31
|
+
color='#0000FF'
|
|
32
|
+
style={[STYLES.TEXT, style]}
|
|
33
|
+
>
|
|
34
|
+
{title}
|
|
35
|
+
</StyledText>
|
|
27
36
|
</TouchableOpacity>
|
|
28
37
|
</>)
|
|
29
38
|
}
|
|
30
39
|
|
|
31
|
-
export default Link;
|
|
40
|
+
export default Link;
|
|
41
|
+
|
|
42
|
+
const STYLES = StyleSheet.create({
|
|
43
|
+
TEXT: {
|
|
44
|
+
borderBottomColor: '#0000FF',
|
|
45
|
+
borderBottomWidth: 0.8,
|
|
46
|
+
alignSelf: 'flex-start',
|
|
47
|
+
}
|
|
48
|
+
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { useState, useRef, useCallback, useEffect, } from "react";
|
|
2
|
-
import { StyleSheet, Pressable, View, ScrollView } from "react-native";
|
|
2
|
+
import { StyleSheet, Pressable, View, ScrollView, Animated } from "react-native";
|
|
3
3
|
import { StyledView } from "../StyledComponents";
|
|
4
|
-
import Animated, { useAnimatedStyle, useSharedValue, withTiming } from "react-native-reanimated";
|
|
5
4
|
import Portal from "../Portal/Portal";
|
|
6
5
|
import { positionCalculations } from "./calculations";
|
|
7
6
|
import type { menuLayoutTypes, anchorLayoutTypes } from "./calculations";
|
|
@@ -19,20 +18,20 @@ const Menu: React.FC<MenuProps> = ({
|
|
|
19
18
|
style,
|
|
20
19
|
children
|
|
21
20
|
}) => {
|
|
22
|
-
|
|
23
21
|
const [isVisible, setIsVisible] = useState<boolean>(false);
|
|
24
22
|
const anchorLayoutRef = useRef<anchorLayoutTypes>({ pageY: 0, pageX: 0, height: 0, width: 0 });
|
|
25
23
|
const menuLayoutRef = useRef<menuLayoutTypes>({ height: 0, width: 0 });
|
|
26
|
-
const buttonRef = useRef<View
|
|
27
|
-
const
|
|
24
|
+
const buttonRef = useRef<View>(null!);
|
|
25
|
+
const animatedScaleRef = useRef(new Animated.Value(1)).current;
|
|
26
|
+
|
|
28
27
|
const positions = (useCallback(() => (positionCalculations(anchorLayoutRef.current, menuLayoutRef.current, placement)), [menuLayoutRef, anchorLayoutRef, placement]))();
|
|
29
28
|
|
|
30
29
|
useEffect(() => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
30
|
+
Animated.timing(animatedScaleRef, {
|
|
31
|
+
toValue: (disableBuiltInState && isOpen) || isVisible ? 1 : 0,
|
|
32
|
+
duration: 150,
|
|
33
|
+
useNativeDriver: true,
|
|
34
|
+
}).start();
|
|
36
35
|
}, [isOpen, isVisible]);
|
|
37
36
|
|
|
38
37
|
const measureLayout = useCallback(() => {
|
|
@@ -63,14 +62,17 @@ const Menu: React.FC<MenuProps> = ({
|
|
|
63
62
|
|
|
64
63
|
const renderChildren = (useCallback(() => {
|
|
65
64
|
return (<ScrollView>
|
|
66
|
-
{React.Children?.toArray(children).map((
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
65
|
+
{React.Children?.toArray(children).map((child) => {
|
|
66
|
+
if (React.isValidElement<{ onPress: () => void; name: string; }>(child)) {
|
|
67
|
+
return React.cloneElement(child, {
|
|
68
|
+
onPress: () => {
|
|
69
|
+
(child)?.props?.onPress?.();
|
|
70
|
+
onSelect?.((child)?.props?.name);
|
|
71
|
+
onClose();
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return null;
|
|
74
76
|
})}
|
|
75
77
|
</ScrollView>)
|
|
76
78
|
|
|
@@ -79,34 +81,15 @@ const Menu: React.FC<MenuProps> = ({
|
|
|
79
81
|
const scale: number = disableBuiltInState ? Number(isOpen) : Number(isVisible);
|
|
80
82
|
const pointerEvent = (isVisible && !disableBuiltInState) || (isOpen && disableBuiltInState) ? 'auto' : 'none';
|
|
81
83
|
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
backgroundColor: '#fff',
|
|
87
|
-
shadowOffset: {
|
|
88
|
-
width: 0,
|
|
89
|
-
height: 2,
|
|
90
|
-
},
|
|
91
|
-
shadowOpacity: 0.23,
|
|
92
|
-
shadowRadius: 2.62,
|
|
93
|
-
elevation: 4,
|
|
94
|
-
position: 'absolute',
|
|
95
|
-
left: positions.left,
|
|
96
|
-
top: positions.top,
|
|
97
|
-
borderRadius: 5,
|
|
98
|
-
maxHeight: 400,
|
|
99
|
-
minWidth: horizontalScale(150),
|
|
100
|
-
paddingVertical: verticalScale(5)
|
|
101
|
-
}
|
|
102
|
-
});
|
|
84
|
+
const dynamicStyles = {
|
|
85
|
+
left: positions.left,
|
|
86
|
+
top: positions.top,
|
|
87
|
+
};
|
|
103
88
|
|
|
104
|
-
const menuAnimatedStyle =
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
});
|
|
89
|
+
const menuAnimatedStyle = {
|
|
90
|
+
transform: [{ scale: animatedScaleRef }],
|
|
91
|
+
opacity: animatedScaleRef
|
|
92
|
+
};
|
|
110
93
|
|
|
111
94
|
return (<>
|
|
112
95
|
|
|
@@ -119,7 +102,7 @@ const Menu: React.FC<MenuProps> = ({
|
|
|
119
102
|
onPress={onClose}>
|
|
120
103
|
<Animated.View
|
|
121
104
|
onStartShouldSetResponder={() => true}
|
|
122
|
-
style={[STYLES.
|
|
105
|
+
style={[STYLES.MENU_CONT, dynamicStyles, menuAnimatedStyle, style]}
|
|
123
106
|
onLayout={({ nativeEvent: { layout: { height, width } } }) => menuLayoutRef.current = { width, height }}
|
|
124
107
|
>
|
|
125
108
|
{renderChildren}
|
|
@@ -127,13 +110,30 @@ const Menu: React.FC<MenuProps> = ({
|
|
|
127
110
|
</Pressable>
|
|
128
111
|
</Portal>
|
|
129
112
|
|
|
130
|
-
<StyledView alignItems='flex-start'>
|
|
131
|
-
<
|
|
132
|
-
{anchor && React.cloneElement(anchor, { onPress: onOpen })}
|
|
133
|
-
</View>
|
|
113
|
+
<StyledView alignItems='flex-start' ref={buttonRef} onLayout={measureLayout}>
|
|
114
|
+
{anchor && React.isValidElement<{ onPress: () => void }>(anchor) && React.cloneElement(anchor, { onPress: onOpen })}
|
|
134
115
|
</StyledView>
|
|
135
116
|
|
|
136
117
|
</>)
|
|
137
118
|
}
|
|
138
119
|
export default Menu;
|
|
139
|
-
export type { MenuProps };
|
|
120
|
+
export type { MenuProps };
|
|
121
|
+
|
|
122
|
+
const STYLES = StyleSheet.create({
|
|
123
|
+
MENU_CONT: {
|
|
124
|
+
shadowColor: "#000",
|
|
125
|
+
backgroundColor: '#fff',
|
|
126
|
+
shadowOffset: {
|
|
127
|
+
width: 0,
|
|
128
|
+
height: 2,
|
|
129
|
+
},
|
|
130
|
+
shadowOpacity: 0.23,
|
|
131
|
+
shadowRadius: 2.62,
|
|
132
|
+
elevation: 4,
|
|
133
|
+
position: 'absolute',
|
|
134
|
+
borderRadius: 5,
|
|
135
|
+
maxHeight: 400,
|
|
136
|
+
minWidth: horizontalScale(150),
|
|
137
|
+
paddingVertical: verticalScale(5)
|
|
138
|
+
}
|
|
139
|
+
});
|
|
@@ -5,8 +5,6 @@ import { horizontalScale, moderateScale, verticalScale } from "../../helpers/Res
|
|
|
5
5
|
import type { MenuItemProps } from "../../types";
|
|
6
6
|
|
|
7
7
|
const MenuItem: React.FC<MenuItemProps> = ({
|
|
8
|
-
// paddingV = 12,
|
|
9
|
-
// paddingH = 12,
|
|
10
8
|
paddingV = 11,
|
|
11
9
|
paddingH = 17,
|
|
12
10
|
gap = 12,
|
|
@@ -3,13 +3,13 @@ import PortalContext from "./PortalContext";
|
|
|
3
3
|
|
|
4
4
|
interface PortalProps {
|
|
5
5
|
children: React.ReactNode,
|
|
6
|
-
name
|
|
6
|
+
name?: string
|
|
7
7
|
}
|
|
8
8
|
const Portal: React.FC<PortalProps> = ({ children, name }) => {
|
|
9
9
|
const { addComponent, removeComponent } = useContext(PortalContext);
|
|
10
10
|
|
|
11
11
|
useEffect(() => {
|
|
12
|
-
const uniqueId = name ?? Math.random() * 50
|
|
12
|
+
const uniqueId = name ?? `${Math.random() * 50}`;
|
|
13
13
|
addComponent({ name: uniqueId, component: children });
|
|
14
14
|
return () => removeComponent(uniqueId);
|
|
15
15
|
}, [children, name]);
|
|
@@ -1,33 +1,16 @@
|
|
|
1
|
-
import React, { useEffect, useRef } from 'react';
|
|
1
|
+
import React, { useEffect, useMemo, useRef } from 'react';
|
|
2
2
|
import { Animated, StyleSheet } from "react-native";
|
|
3
3
|
import { moderateScale, verticalScale, } from "../../helpers/ResponsiveCalculations";
|
|
4
4
|
import { StyledView } from '../StyledComponents';
|
|
5
5
|
import { useTheme } from '../../hooks';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
type ProgressProps = {
|
|
9
|
-
/** Current progress value (0-100) */
|
|
10
|
-
value?: number;
|
|
11
|
-
|
|
12
|
-
/** Thickness of the progress bar */
|
|
13
|
-
thickness?: number;
|
|
14
|
-
|
|
15
|
-
/** Border radius of the progress bar */
|
|
16
|
-
br?: number;
|
|
17
|
-
|
|
18
|
-
/** Background color of the track (unfilled part) */
|
|
19
|
-
trackColor?: string;
|
|
20
|
-
|
|
21
|
-
/** Color of the progress (filled part) */
|
|
22
|
-
color?: string;
|
|
23
|
-
}
|
|
6
|
+
import type { ProgressProps } from '../../types';
|
|
24
7
|
|
|
25
8
|
const Progress: React.FC<ProgressProps> = ({
|
|
26
9
|
value = 50,
|
|
27
10
|
thickness = 5,
|
|
28
11
|
br = 100,
|
|
29
12
|
trackColor = '#E8E8E8',
|
|
30
|
-
|
|
13
|
+
progressColor,
|
|
31
14
|
}) => {
|
|
32
15
|
|
|
33
16
|
const animatedWidth = useRef(new Animated.Value(value)).current;
|
|
@@ -35,35 +18,49 @@ const Progress: React.FC<ProgressProps> = ({
|
|
|
35
18
|
|
|
36
19
|
useEffect(() => {
|
|
37
20
|
Animated.timing(animatedWidth, {
|
|
38
|
-
toValue: value,
|
|
21
|
+
toValue: value / 100,
|
|
39
22
|
duration: 1000,
|
|
40
|
-
useNativeDriver:
|
|
23
|
+
useNativeDriver: true,
|
|
41
24
|
}).start();
|
|
42
25
|
}, [value]);
|
|
43
26
|
|
|
44
|
-
const
|
|
27
|
+
const dynamicStyles = useMemo(() => ({
|
|
45
28
|
TRACK: {
|
|
46
29
|
backgroundColor: trackColor,
|
|
47
30
|
borderRadius: moderateScale(br),
|
|
48
|
-
|
|
31
|
+
height: verticalScale(thickness),
|
|
49
32
|
},
|
|
50
33
|
TRACK_ITEM: {
|
|
51
|
-
backgroundColor:
|
|
52
|
-
|
|
53
|
-
borderRadius: moderateScale(br)
|
|
34
|
+
backgroundColor: progressColor ?? theme?.colors.primary,
|
|
35
|
+
borderRadius: moderateScale(br),
|
|
54
36
|
}
|
|
55
|
-
});
|
|
37
|
+
}), [br, trackColor, thickness, progressColor, theme]);
|
|
38
|
+
|
|
39
|
+
const animatedViewStyle = {
|
|
40
|
+
transform: [{ scaleX: animatedWidth }],
|
|
41
|
+
transformOrigin: 'left'
|
|
42
|
+
}
|
|
56
43
|
|
|
57
44
|
return (<>
|
|
58
|
-
<StyledView
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}]} />
|
|
45
|
+
<StyledView
|
|
46
|
+
style={[STYLES.TRACK, dynamicStyles.TRACK]}
|
|
47
|
+
>
|
|
48
|
+
<Animated.View
|
|
49
|
+
style={[STYLES.TRACK_ITEM, dynamicStyles.TRACK_ITEM, animatedViewStyle]}
|
|
50
|
+
/>
|
|
65
51
|
</StyledView>
|
|
66
52
|
</>);
|
|
67
53
|
};
|
|
68
54
|
export default Progress;
|
|
69
55
|
export type { ProgressProps };
|
|
56
|
+
|
|
57
|
+
const STYLES = StyleSheet.create({
|
|
58
|
+
TRACK: {
|
|
59
|
+
overflow: 'hidden',
|
|
60
|
+
width: '100%',
|
|
61
|
+
},
|
|
62
|
+
TRACK_ITEM: {
|
|
63
|
+
width: "100%",
|
|
64
|
+
height: '100%'
|
|
65
|
+
}
|
|
66
|
+
});
|
|
@@ -1,37 +1,35 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import type { ViewStyle } from "react-native";
|
|
3
3
|
import { horizontalScale } from "../../helpers/ResponsiveCalculations";
|
|
4
4
|
import type { HStackProps } from "../../types";
|
|
5
|
+
import { StyledView } from "../StyledComponents";
|
|
5
6
|
|
|
6
7
|
const HStack: React.FC<HStackProps> = ({
|
|
7
8
|
justify,
|
|
8
9
|
align = 'center',
|
|
9
10
|
fWrap = 'wrap',
|
|
10
11
|
gap = 10,
|
|
11
|
-
|
|
12
|
+
style,
|
|
12
13
|
children,
|
|
13
14
|
...rest
|
|
14
15
|
}) => {
|
|
15
16
|
const calculatedGap: number = useMemo(() => horizontalScale(gap), [gap]);
|
|
16
|
-
|
|
17
|
+
|
|
18
|
+
const viewProps: ViewStyle = {
|
|
17
19
|
gap: calculatedGap,
|
|
20
|
+
flexDirection: 'row',
|
|
21
|
+
justifyContent: justify,
|
|
22
|
+
alignItems: align,
|
|
23
|
+
flexWrap: fWrap,
|
|
18
24
|
};
|
|
19
|
-
const STYLES = StyleSheet.create({
|
|
20
|
-
HSTACK: {
|
|
21
|
-
flexDirection: 'row',
|
|
22
|
-
justifyContent: justify,
|
|
23
|
-
alignItems: align,
|
|
24
|
-
flexWrap: fWrap,
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
25
|
|
|
28
26
|
return (<>
|
|
29
|
-
<
|
|
30
|
-
style={[viewProps,
|
|
27
|
+
<StyledView
|
|
28
|
+
style={[viewProps, style]}
|
|
31
29
|
{...rest}
|
|
32
30
|
>
|
|
33
31
|
{children}
|
|
34
|
-
</
|
|
32
|
+
</StyledView>
|
|
35
33
|
</>)
|
|
36
34
|
}
|
|
37
35
|
export default HStack;
|
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { horizontalScale } from "../../helpers/ResponsiveCalculations";
|
|
2
|
+
import { verticalScale } from "../../helpers/ResponsiveCalculations";
|
|
4
3
|
import type { VStackProps } from "../../types";
|
|
4
|
+
import { StyledView } from "../StyledComponents";
|
|
5
|
+
import type { ViewStyle } from "react-native";
|
|
5
6
|
|
|
6
7
|
const VStack: React.FC<VStackProps> = ({
|
|
7
8
|
children,
|
|
8
9
|
align,
|
|
9
10
|
gap = 10,
|
|
10
|
-
|
|
11
|
+
style,
|
|
11
12
|
...rest
|
|
12
13
|
}) => {
|
|
13
14
|
|
|
14
|
-
const calculatedGap: number = useMemo(() =>
|
|
15
|
-
|
|
15
|
+
const calculatedGap: number = useMemo(() => verticalScale(gap), [gap]);
|
|
16
|
+
|
|
17
|
+
const viewProps: ViewStyle = {
|
|
16
18
|
flexDirection: 'column',
|
|
17
19
|
alignItems: align,
|
|
18
20
|
gap: calculatedGap,
|
|
19
21
|
};
|
|
20
22
|
return (<>
|
|
21
|
-
<
|
|
22
|
-
{
|
|
23
|
-
style={containerStyle}
|
|
23
|
+
<StyledView
|
|
24
|
+
style={[viewProps, style]}
|
|
24
25
|
{...rest}
|
|
25
26
|
>
|
|
26
27
|
{children}
|
|
27
|
-
</
|
|
28
|
+
</StyledView>
|
|
28
29
|
</>)
|
|
29
30
|
}
|
|
30
31
|
export default VStack;
|
|
@@ -16,14 +16,11 @@ const StyledText: React.FC<StyledTextProps> = ({
|
|
|
16
16
|
themeColor,
|
|
17
17
|
primary,
|
|
18
18
|
secondary,
|
|
19
|
-
...
|
|
19
|
+
...rest
|
|
20
20
|
}) => {
|
|
21
|
-
|
|
22
21
|
const { colors, typography: { variantSizes } }: any = useTheme();
|
|
23
|
-
|
|
24
|
-
return (<>
|
|
22
|
+
return (
|
|
25
23
|
<Text
|
|
26
|
-
allowFontScaling={false}
|
|
27
24
|
style={[{
|
|
28
25
|
fontSize: responsiveFontSize(fs ?? variantSizes[variant]),
|
|
29
26
|
fontFamily: ff ?? '',
|
|
@@ -33,11 +30,11 @@ const StyledText: React.FC<StyledTextProps> = ({
|
|
|
33
30
|
},
|
|
34
31
|
style,
|
|
35
32
|
]}
|
|
36
|
-
{...
|
|
33
|
+
{...rest}
|
|
37
34
|
>
|
|
38
35
|
{children}
|
|
39
36
|
</Text>
|
|
40
|
-
|
|
37
|
+
);
|
|
41
38
|
};
|
|
42
39
|
|
|
43
40
|
export default StyledText;
|
|
@@ -15,10 +15,13 @@ const StyledView: React.FC<StyledViewProps> = ({
|
|
|
15
15
|
w,
|
|
16
16
|
children,
|
|
17
17
|
style,
|
|
18
|
+
ref,
|
|
18
19
|
...rest
|
|
19
20
|
}) => {
|
|
21
|
+
|
|
20
22
|
const theme = useTheme(themeBg);
|
|
21
|
-
|
|
23
|
+
|
|
24
|
+
return (
|
|
22
25
|
<View
|
|
23
26
|
style={[{
|
|
24
27
|
flex: f,
|
|
@@ -31,11 +34,12 @@ const StyledView: React.FC<StyledViewProps> = ({
|
|
|
31
34
|
},
|
|
32
35
|
style
|
|
33
36
|
]}
|
|
37
|
+
ref={ref}
|
|
34
38
|
{...rest}
|
|
35
39
|
>
|
|
36
40
|
{children}
|
|
37
41
|
</View>
|
|
38
|
-
|
|
42
|
+
);
|
|
39
43
|
};
|
|
40
44
|
|
|
41
45
|
export default StyledView;
|