@hoddy-ui/core 1.1.0 → 1.1.1
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/README.md +773 -190
- package/next/dist/index.d.mts +62 -7
- package/next/dist/index.d.ts +62 -7
- package/next/dist/index.js +225 -200
- package/next/dist/index.js.map +1 -1
- package/next/dist/index.mjs +223 -200
- package/next/dist/index.mjs.map +1 -1
- package/next/index.ts +1 -0
- package/next/package.json +1 -1
- package/package.json +1 -1
- package/src/Components/Locator.tsx +50 -22
- package/src/Components/Popup.tsx +16 -13
- package/src/Components/TextField.tsx +230 -220
- package/src/Components/Typography.tsx +0 -2
- package/src/config/KeyManager.ts +2 -0
- package/src/config/index.ts +2 -0
- package/src/theme/index.tsx +3 -1
- package/src/types.ts +1 -0
package/src/config/KeyManager.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
type configTypes = {
|
|
2
2
|
GOOGLE_MAP_API_KEY?: string;
|
|
3
3
|
DEFAULT_FONT_FAMILY?: string;
|
|
4
|
+
EDGE_TO_EDGE?: boolean;
|
|
4
5
|
};
|
|
5
6
|
|
|
6
7
|
let config: configTypes = {
|
|
7
8
|
GOOGLE_MAP_API_KEY: "",
|
|
9
|
+
EDGE_TO_EDGE: false,
|
|
8
10
|
};
|
|
9
11
|
|
|
10
12
|
export function setConfig(key: configTypes): void {
|
package/src/config/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ type configProps = {
|
|
|
7
7
|
googleMapApiKey?: string;
|
|
8
8
|
colors?: extraColorTypes;
|
|
9
9
|
fontFamily?: string;
|
|
10
|
+
edgeToEdge?: boolean;
|
|
10
11
|
};
|
|
11
12
|
|
|
12
13
|
export function initialize(config: configProps): void {
|
|
@@ -14,6 +15,7 @@ export function initialize(config: configProps): void {
|
|
|
14
15
|
setConfig({
|
|
15
16
|
GOOGLE_MAP_API_KEY: config.googleMapApiKey,
|
|
16
17
|
DEFAULT_FONT_FAMILY: config.fontFamily,
|
|
18
|
+
EDGE_TO_EDGE: config.edgeToEdge ?? false,
|
|
17
19
|
});
|
|
18
20
|
if (config.colors) setExtraColors(config.colors);
|
|
19
21
|
} catch (error) {
|
package/src/theme/index.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import React, { createContext, useEffect, useReducer } from "react";
|
|
|
5
5
|
import { Platform, useColorScheme } from "react-native";
|
|
6
6
|
import { SafeAreaProvider } from "react-native-safe-area-context";
|
|
7
7
|
import FlashMessage from "../Components/FlashMessage";
|
|
8
|
+
import { getConfig } from "../config/KeyManager";
|
|
8
9
|
import { useColors, useTheme } from "../hooks";
|
|
9
10
|
import {
|
|
10
11
|
ThemeActionTypes,
|
|
@@ -41,9 +42,10 @@ const ConfigureSystemUI = () => {
|
|
|
41
42
|
const colors = useColors();
|
|
42
43
|
|
|
43
44
|
useEffect(() => {
|
|
45
|
+
const config = getConfig();
|
|
44
46
|
if (colors) {
|
|
45
47
|
SystemUI.setBackgroundColorAsync(colors.white[1]);
|
|
46
|
-
if (Platform.OS === "android") {
|
|
48
|
+
if (Platform.OS === "android" && !config.EDGE_TO_EDGE) {
|
|
47
49
|
NavigationBar.setBackgroundColorAsync(colors.white[1]);
|
|
48
50
|
if (theme === "dark") {
|
|
49
51
|
NavigationBar.setButtonStyleAsync("light");
|