@fto-consult/expo-ui 7.13.6 → 7.13.7
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/package.json
CHANGED
@@ -13,6 +13,7 @@ import PropTypes from "prop-types";
|
|
13
13
|
import {flatMode } from '$ecomponents/TextField/utils';
|
14
14
|
import {defaultStr} from "$cutils";
|
15
15
|
import Surface from "$ecomponents/Surface";
|
16
|
+
import {isObj,defaultObj} from "$cutils";
|
16
17
|
|
17
18
|
const ChipComponent = React.forwardRef(({
|
18
19
|
mode = flatMode,
|
@@ -177,7 +178,7 @@ const ChipComponent = React.forwardRef(({
|
|
177
178
|
{userSelect:"none"},
|
178
179
|
styles.text,
|
179
180
|
{
|
180
|
-
...theme.fonts
|
181
|
+
...(defaultObj(theme.fonts?.regular,theme.fonts?.default)),
|
181
182
|
color: textColor,
|
182
183
|
marginHorizontal : 4,
|
183
184
|
marginLeft: avatar || icon || selected ? 4 : 8,
|
@@ -25,7 +25,7 @@ const DrawerItem = ({icon,iconProps,borderRadius,color,minimized,contentContaine
|
|
25
25
|
const contentColor = active ? theme.colors.primary : Colors.isValid(color)? color : Colors.isValid(style.color)? style.color : Colors.setAlpha(theme.colors.text,ALPHA);
|
26
26
|
const backgroundColor = getBackgroundColor(active);
|
27
27
|
const fontWeight = active ? '400': 'normal';
|
28
|
-
const font = theme.fonts.medium;
|
28
|
+
const font = defaultObj(theme.fonts.medium,theme.fonts.default);
|
29
29
|
contentContainerProps = defaultObj(contentContainerProps);
|
30
30
|
contentProps = defaultObj(contentProps);
|
31
31
|
labelProps = defaultObj(labelProps);
|
package/src/context/Provider.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from "$react";
|
2
2
|
import appConfig from "$capp/config";
|
3
|
-
import {MD3LightTheme,MD3DarkTheme} from "react-native-paper";
|
3
|
+
import {MD3LightTheme,MD3DarkTheme,configureFonts} from "react-native-paper";
|
4
4
|
import { useMaterial3Theme,isDynamicThemeSupported} from '@pchmn/expo-material3-theme';
|
5
5
|
import { useColorScheme } from 'react-native';
|
6
6
|
import {colorsAlias,Colors} from "$theme";
|
@@ -183,7 +183,7 @@ const Provider = ({children,getTableData,handleHelpScreen,navigation,swrConfig,a
|
|
183
183
|
if(!isObj(theme)) return;
|
184
184
|
const isDark = theme.dark || theme.isDark || isDynamicThemeSupported && isColorShemeDark ;
|
185
185
|
const elevation = defaultObj(theme.elevation,isDark ? pTheme.dark?.elevation : pTheme.light?.elevation)
|
186
|
-
const newTheme = isDark ? { ...MD3DarkTheme, colors: pTheme.dark } : { ...MD3LightTheme, colors: pTheme.light };
|
186
|
+
const newTheme = isDark ? { ...MD3DarkTheme,fonts:configureFonts(), colors: pTheme.dark } : { ...MD3LightTheme,fonts:configureFonts(), colors: pTheme.light };
|
187
187
|
if(isElectron() && typeof window.ELECTRON =='object' && typeof ELECTRON.setThemeToDark =="function" && typeof ELECTRON.setThemeToLight =="function"){
|
188
188
|
if(isDark){
|
189
189
|
ELECTRON.setThemeToDark();
|