@hoddy-ui/core 1.0.7 → 1.0.9
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/index.ts
CHANGED
|
@@ -4,12 +4,19 @@ export { default as AlertX } from "./src/Components/AlertX";
|
|
|
4
4
|
export { default as Avatar } from "./src/Components/Avatar";
|
|
5
5
|
export * from "./src/Components/Button";
|
|
6
6
|
export { default as Button } from "./src/Components/Button";
|
|
7
|
+
export * from "./src/Components/Checkbox";
|
|
8
|
+
export * from "./src/Components/FlashMessage";
|
|
9
|
+
export * from "./src/Components/Grid";
|
|
10
|
+
export * from "./src/Components/Locator";
|
|
11
|
+
export { default as Locator } from "./src/Components/Locator";
|
|
12
|
+
export * from "./src/Components/Popup";
|
|
13
|
+
export * from "./src/Components/SafeAreaView";
|
|
14
|
+
export { default as SelectMenu } from "./src/Components/SelectMenu";
|
|
7
15
|
export { default as Spinner } from "./src/Components/Spinner";
|
|
8
16
|
export * from "./src/Components/TextField";
|
|
9
17
|
export { default as TextField } from "./src/Components/TextField";
|
|
10
18
|
export { default as Typography } from "./src/Components/Typography";
|
|
11
|
-
export { default as SafeAreaView } from "./src/Components/SafeAreaView";
|
|
12
|
-
export { default as SelectMenu } from "./src/Components/SelectMenu";
|
|
13
19
|
// Others
|
|
20
|
+
export * from "./src/config";
|
|
14
21
|
export * from "./src/hooks";
|
|
15
22
|
export * from "./src/theme/index";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hoddy-ui/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Core rich react native components written in typescript",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"repository": {
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"@react-navigation/native": "^6.1.6",
|
|
18
18
|
"@types/react": "^18.2.6",
|
|
19
19
|
"@types/react-native": "^0.72.0",
|
|
20
|
+
"expo-location": "^15.1.1",
|
|
20
21
|
"expo-navigation-bar": "^2.1.1",
|
|
21
22
|
"expo-system-ui": "^2.2.1",
|
|
22
23
|
"react": "^18.2.0",
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"dependencies": {
|
|
36
37
|
"@react-native-async-storage/async-storage": "^1.18.1",
|
|
37
38
|
"@react-navigation/native": "^6.1.6",
|
|
39
|
+
"expo-location": "^15.1.1",
|
|
38
40
|
"expo-navigation-bar": "^2.1.1",
|
|
39
41
|
"expo-system-ui": "^2.2.1",
|
|
40
42
|
"react-native-safe-area-context": "^4.5.3",
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "react-native";
|
|
9
9
|
import { ScaledSheet } from "react-native-size-matters";
|
|
10
10
|
import { FormWrapperProps } from "../types";
|
|
11
|
-
const FormWrapper: React.FC<FormWrapperProps> = ({
|
|
11
|
+
export const FormWrapper: React.FC<FormWrapperProps> = ({
|
|
12
12
|
children,
|
|
13
13
|
behavior = "position",
|
|
14
14
|
contentContainerStyle,
|
|
@@ -54,5 +54,3 @@ const FormWrapper: React.FC<FormWrapperProps> = ({
|
|
|
54
54
|
</ScrollView>
|
|
55
55
|
);
|
|
56
56
|
};
|
|
57
|
-
|
|
58
|
-
export default FormWrapper;
|
package/src/Components/Grid.tsx
CHANGED
|
@@ -19,7 +19,11 @@ export const GridItem: React.FC<GridItemProps> = ({
|
|
|
19
19
|
});
|
|
20
20
|
return <View children={children} style={[styles.gridItem, style]} />;
|
|
21
21
|
};
|
|
22
|
-
const Grid: React.FC<GridProps> = ({
|
|
22
|
+
export const Grid: React.FC<GridProps> = ({
|
|
23
|
+
children,
|
|
24
|
+
spacing = 1,
|
|
25
|
+
style = {},
|
|
26
|
+
}) => {
|
|
23
27
|
const styles = ScaledSheet.create({
|
|
24
28
|
grid: {
|
|
25
29
|
flexWrap: "wrap",
|
|
@@ -29,5 +33,3 @@ const Grid: React.FC<GridProps> = ({ children, spacing = 1, style = {} }) => {
|
|
|
29
33
|
});
|
|
30
34
|
return <View children={children} style={[styles.grid, style]} />;
|
|
31
35
|
};
|
|
32
|
-
|
|
33
|
-
export default Grid;
|
|
@@ -10,10 +10,13 @@ import { useColors } from "../hooks";
|
|
|
10
10
|
import { LocatorProps } from "../types";
|
|
11
11
|
|
|
12
12
|
// import { GOOGLE_MAP_API } from "../../api/config";
|
|
13
|
+
import { getApiKey } from "../config/KeyManager";
|
|
13
14
|
import Typography from "./Typography";
|
|
14
|
-
import { GOOGLE_MAP_API_KEY } from "../../api/config";
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
const { GOOGLE_MAP_API_KEY } = getApiKey();
|
|
17
|
+
|
|
18
|
+
if (GOOGLE_MAP_API_KEY) Location.setGoogleApiKey(GOOGLE_MAP_API_KEY);
|
|
19
|
+
else console.error("Google map api key needs to be set to use this component");
|
|
17
20
|
|
|
18
21
|
type predictionType = {
|
|
19
22
|
id: string;
|
package/src/Components/Popup.tsx
CHANGED
|
@@ -7,7 +7,7 @@ import { PopupProps } from "../types";
|
|
|
7
7
|
import { IconButton } from "./Button";
|
|
8
8
|
import Typography from "./Typography";
|
|
9
9
|
|
|
10
|
-
const Popup: React.FC<PopupProps> = ({
|
|
10
|
+
export const Popup: React.FC<PopupProps> = ({
|
|
11
11
|
title,
|
|
12
12
|
sheet,
|
|
13
13
|
bare = false,
|
|
@@ -95,5 +95,3 @@ const Popup: React.FC<PopupProps> = ({
|
|
|
95
95
|
</>
|
|
96
96
|
);
|
|
97
97
|
};
|
|
98
|
-
|
|
99
|
-
export default Popup;
|
|
@@ -12,8 +12,9 @@ const styles = StyleSheet.create({
|
|
|
12
12
|
},
|
|
13
13
|
});
|
|
14
14
|
|
|
15
|
-
const SafeAreaView: React.FC<SafeAreaViewProps> = ({
|
|
15
|
+
export const SafeAreaView: React.FC<SafeAreaViewProps> = ({
|
|
16
|
+
children,
|
|
17
|
+
style,
|
|
18
|
+
}) => {
|
|
16
19
|
return <Safe style={{ ...styles.droidSafeArea, ...style }}>{children}</Safe>;
|
|
17
20
|
};
|
|
18
|
-
|
|
19
|
-
export default SafeAreaView;
|
package/src/config/index.ts
CHANGED
|
@@ -18,8 +18,6 @@ export function initialize(config: configProps): void {
|
|
|
18
18
|
setApiKey({
|
|
19
19
|
GOOGLE_MAP_API_KEY: config.googleMapApiKey,
|
|
20
20
|
});
|
|
21
|
-
|
|
22
|
-
console.log("Got key from frontend", config.googleMapApiKey);
|
|
23
21
|
} catch (error) {
|
|
24
22
|
console.error("Error reading the config file:", error);
|
|
25
23
|
}
|