@fto-consult/expo-ui 6.54.3 → 6.54.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fto-consult/expo-ui",
3
- "version": "6.54.3",
3
+ "version": "6.54.4",
4
4
  "description": "Bibliothèque de composants UI Expo,react-native",
5
5
  "main": "main",
6
6
  "scripts": {
@@ -109,7 +109,6 @@
109
109
  "react-native-gesture-handler": "~2.12.0",
110
110
  "react-native-iphone-x-helper": "^1.3.1",
111
111
  "react-native-mime-types": "^2.4.0",
112
- "react-native-mmkv": "^2.10.2",
113
112
  "react-native-paper": "^5.10.6",
114
113
  "react-native-paper-dates": "^0.19.7",
115
114
  "react-native-reanimated": "~3.3.0",
@@ -9,6 +9,7 @@ import Label from "$ecomponents/Label";
9
9
  import theme,{Colors} from "$theme";
10
10
  import {isIos,isWeb} from "$cplatform";
11
11
  import {defaultObj,defaultStr} from "$cutils";
12
+ import { getThemeColors} from './utils';
12
13
  const AppbarContent = ({
13
14
  color: titleColor,
14
15
  subtitle,
@@ -26,8 +27,8 @@ const AppbarContent = ({
26
27
  testID,
27
28
  ...rest
28
29
  }) => {
29
-
30
- const titleTextColor = Colors.isValid(titleColor) ? titleColor : theme.colors.onPrimary;
30
+ const {color:tColor} = getThemeColors();
31
+ const titleTextColor = Colors.isValid(titleColor) ? titleColor : tColor;
31
32
  titleProps = defaultObj(titleProps);
32
33
  subtitleProps = defaultObj(subtitleProps);
33
34
  testID = defaultStr(testID)+"_RN_AppBarContent";
@@ -21,7 +21,7 @@ export const getMaxActions = (windowWidth) => {
21
21
  export const isSplitedActions = (actions)=> isObj(actions) && Array.isArray(actions.actions) && Array.isArray(actions.menus);
22
22
 
23
23
  export const getThemeColors = ()=>{
24
- const isDark = theme.isDark(),onPrimary = isDark? theme.colors.onSurface : theme.colors.onPrimary;
24
+ const isDark = theme.isDark() || theme.colors.dark ,onPrimary = isDark? theme.colors.onSurface : theme.colors.onPrimary;
25
25
  return {
26
26
  onPrimary,
27
27
  color : onPrimary,
@@ -15,7 +15,7 @@ import {MAX_WIDTH,SCREEN_INDENT,MIN_HEIGHT} from "./utils";
15
15
  import {isMobileOrTabletMedia,isMobileMedia} from "$cplatform/dimensions";
16
16
  import Platform,{isMobileNative} from "$cplatform";
17
17
  import Icon,{BACK_ICON} from "$ecomponents/Icon";
18
- import {ACTION_ICON_SIZE} from "$ecomponents/AppBar";
18
+ import {ACTION_ICON_SIZE,getThemeColors} from "$ecomponents/AppBar";
19
19
  import DialogFooter from "./DialogFooter";
20
20
  import { Dimensions } from "react-native";
21
21
  import Surface from "$ecomponents/Surface";
@@ -88,7 +88,7 @@ const DialogComponent = React.forwardRef((props,ref)=>{
88
88
  appBarProps = defaultObj(appBarProps);
89
89
  subtitle = subtitle !== false ? defaultVal(appBarProps.subtitle,modalProps.subtitle,subtitle) : null;
90
90
  backActionProps = Object.assign({},backActionProps);
91
- backActionProps.color = Colors.isValid(backActionProps.color)? backActionProps.color : theme.colors.onPrimary;
91
+ backActionProps.color = Colors.isValid(backActionProps.color)? backActionProps.color : getThemeColors().onPrimary;
92
92
  cancelButton = cancelButton === false || modalProps.cancelButton === false ? null : isObj(cancelButton)? {...cancelButton} : {};
93
93
  if(isNonNullString(no)){
94
94
  no = {label:no};