@momo-kits/foundation 0.103.2-beta.5 → 0.103.2-beta.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.
@@ -80,7 +80,11 @@ const BottomTab: React.FC<BottomTabProps> = ({
80
80
  initialRouteName={initialRouteName}
81
81
  backBehavior={'firstRoute'}
82
82
  tabBar={props => (
83
- <BottomTabBar {...props} floatingButton={floatingButton} />
83
+ <BottomTabBar
84
+ {...props}
85
+ floatingButton={floatingButton}
86
+ inactiveTintColor={theme.colors.text.secondary}
87
+ />
84
88
  )}
85
89
  tabBarOptions={{
86
90
  style: {
package/Icon/index.tsx CHANGED
@@ -10,6 +10,7 @@ const Icon: React.FC<IconProps> = ({
10
10
  size = 24,
11
11
  color,
12
12
  style = {},
13
+ accessibilityLabel,
13
14
  }) => {
14
15
  const {theme} = useContext(ApplicationContext);
15
16
 
@@ -34,6 +35,7 @@ const Icon: React.FC<IconProps> = ({
34
35
  source={getIconSource()}
35
36
  style={[style, {width: size, height: size}]}
36
37
  resizeMode="contain"
38
+ accessibilityLabel={accessibilityLabel}
37
39
  {...tintColorProps}
38
40
  />
39
41
  );
package/Icon/types.ts CHANGED
@@ -24,4 +24,9 @@ export type IconProps = {
24
24
  * Accepts an object of style properties.
25
25
  */
26
26
  style?: StyleProp<ImageStyle>;
27
+
28
+ /**
29
+ * Optional. Represents the accessibility label for the icon.
30
+ */
31
+ accessibilityLabel?: string;
27
32
  };
package/Image/index.tsx CHANGED
@@ -1,8 +1,12 @@
1
- import React, {useContext, useRef, useState} from 'react';
1
+ import React, {useContext, useEffect, useRef, useState} from 'react';
2
2
  import {StyleSheet, View} from 'react-native';
3
3
  import FastImage, {Source} from 'react-native-fast-image';
4
4
  import styles from './styles';
5
- import {ApplicationContext} from '../Application';
5
+ import {
6
+ ApplicationContext,
7
+ ComponentContext,
8
+ MiniAppContext,
9
+ } from '../Application';
6
10
  import {Skeleton} from '../Skeleton';
7
11
  import {Icon} from '../Icon';
8
12
  import {Styles} from '../Consts';
@@ -19,6 +23,8 @@ const Image: React.FC<ImageProps> = ({
19
23
  ...rest
20
24
  }) => {
21
25
  const {theme} = useContext(ApplicationContext);
26
+ const app = useContext<any>(MiniAppContext);
27
+ const component = useContext<any>(ComponentContext);
22
28
  const error = useRef(false);
23
29
  const [status, setStatus] = useState<Status>('success');
24
30
 
@@ -26,6 +32,13 @@ const Image: React.FC<ImageProps> = ({
26
32
  accessibilityLabel: accessibilityLabel || `img|${(source as Source).uri}`,
27
33
  };
28
34
 
35
+ useEffect(() => {
36
+ if (app.enableAutoId) {
37
+ component?.addChildren?.(test.accessibilityLabel, 'add');
38
+ return () => component?.addChildren?.(test.accessibilityLabel, 'remove');
39
+ }
40
+ }, []);
41
+
29
42
  /**
30
43
  * render content loading | fail | rendered
31
44
  */
@@ -5,7 +5,7 @@ import {ApplicationContext} from '../Application';
5
5
  import {hexToRGBA} from './utils';
6
6
  import {LoaderProps} from './types';
7
7
 
8
- const DotLoader: FC<LoaderProps> = ({color}) => {
8
+ const DotLoader: FC<LoaderProps> = ({color, style}) => {
9
9
  const {theme} = useContext(ApplicationContext);
10
10
 
11
11
  const arrayColor = [
@@ -28,7 +28,7 @@ const DotLoader: FC<LoaderProps> = ({color}) => {
28
28
  return (
29
29
  <AnimatedLottieView
30
30
  source={source}
31
- style={{width: 52, height: 18}}
31
+ style={[{width: 52, height: 18}, style]}
32
32
  autoPlay
33
33
  />
34
34
  );
@@ -5,7 +5,7 @@ import {hexToRGBA} from './utils';
5
5
  import {ApplicationContext} from '../Application';
6
6
  import {LoaderProps} from './types';
7
7
 
8
- const Spinner: FC<LoaderProps> = ({color}) => {
8
+ const Spinner: FC<LoaderProps> = ({color, style}) => {
9
9
  const {theme} = useContext(ApplicationContext);
10
10
 
11
11
  let source: any = animation;
@@ -20,7 +20,7 @@ const Spinner: FC<LoaderProps> = ({color}) => {
20
20
  return (
21
21
  <AnimatedLottieView
22
22
  source={source}
23
- style={{width: 24, height: 24}}
23
+ style={[{width: 24, height: 24}, style]}
24
24
  autoPlay
25
25
  />
26
26
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.103.2-beta.5",
3
+ "version": "0.103.2-beta.7",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},