@momo-kits/foundation 0.80.8-beta.12 → 0.80.8-beta.13

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.
@@ -1,6 +1,5 @@
1
1
  import React, {Fragment, useContext, useEffect, useState} from 'react';
2
2
  import {
3
- Alert,
4
3
  Animated,
5
4
  DeviceEventEmitter,
6
5
  Platform,
@@ -276,8 +275,7 @@ const HeaderRightAction: React.FC<any> = ({children, ...restProps}) => {
276
275
  const validateType = (child: React.ReactElement) => {
277
276
  const valid = child?.type === NavigationButton || child?.type == Fragment;
278
277
  if (__DEV__ && !valid) {
279
- Alert.alert(
280
- 'Rule',
278
+ console.warn(
281
279
  'HeaderRightAction contains element type of NavigationButton, Please check again.',
282
280
  );
283
281
  }
package/Layout/Card.tsx CHANGED
@@ -7,7 +7,7 @@ import Item from './Item';
7
7
  import {Image} from '../Image';
8
8
  import {ApplicationContext} from '../Application';
9
9
  import styles from './styles';
10
- import {Colors, Radius, Shadow, Spacing} from '../Consts';
10
+ import {Colors, Shadow, Spacing} from '../Consts';
11
11
 
12
12
  export interface CardProps extends ViewProps {
13
13
  /**
@@ -140,15 +140,12 @@ const Card: React.FC<CardProps> = ({
140
140
  <View
141
141
  accessibilityLabel={`Card`}
142
142
  style={[
143
- {
144
- backgroundColor: theme.colors.background.surface,
145
- borderRadius: Radius.M,
146
- },
147
143
  style,
148
144
  styles.card,
149
145
  {
150
146
  width: widthSection,
151
147
  marginHorizontal: gridContext.margin,
148
+ backgroundColor: theme.colors.background.surface,
152
149
  },
153
150
  useShadow && Shadow.Light,
154
151
  ]}>
package/Layout/Screen.tsx CHANGED
@@ -24,6 +24,7 @@ import {
24
24
  HeaderTitle,
25
25
  } from '../Application';
26
26
  import Navigation from '../Application/Navigation';
27
+ import styles from './styles';
27
28
 
28
29
  export interface ScreenProps extends ViewProps {
29
30
  children: React.ReactNode;
@@ -238,14 +239,7 @@ const Screen = forwardRef(
238
239
  <View
239
240
  style={[Styles.flex, {backgroundColor}]}
240
241
  accessibilityLabel={`ScreenContainer`}>
241
- <View
242
- style={{
243
- position: 'absolute',
244
- width: '100%',
245
- maxHeight: 215,
246
- }}>
247
- {renderHeader()}
248
- </View>
242
+ <View style={styles.screenBanner}>{renderHeader()}</View>
249
243
  <KeyboardAvoidingView
250
244
  style={[Styles.flex, {paddingTop: marginHeader}]}
251
245
  enabled={enableKeyboardAvoidingView}
package/Layout/styles.ts CHANGED
@@ -1,7 +1,12 @@
1
1
  import {StyleSheet} from 'react-native';
2
- import {Spacing} from '../Consts';
2
+ import {Radius, Spacing} from '../Consts';
3
3
 
4
4
  export default StyleSheet.create({
5
+ screenBanner: {
6
+ position: 'absolute',
7
+ width: '100%',
8
+ maxHeight: 215,
9
+ },
5
10
  boxGrid: {
6
11
  position: 'absolute',
7
12
  top: 0,
@@ -35,6 +40,7 @@ export default StyleSheet.create({
35
40
  card: {
36
41
  flexDirection: 'row',
37
42
  flexWrap: 'wrap',
43
+ borderRadius: Radius.M,
38
44
  paddingTop: undefined,
39
45
  paddingBottom: undefined,
40
46
  paddingLeft: undefined,
package/Layout/utils.ts CHANGED
@@ -1,4 +1,4 @@
1
- import {Alert, Dimensions} from 'react-native';
1
+ import {Dimensions} from 'react-native';
2
2
  import React, {Fragment, ReactElement, useEffect, useState} from 'react';
3
3
 
4
4
  /**
@@ -17,14 +17,12 @@ const validateChildren = (
17
17
  childrenType => child?.type === childrenType || child?.type == Fragment,
18
18
  );
19
19
  if (!valid) {
20
- Alert.alert(
21
- 'Component Kits',
20
+ console.warn(
22
21
  `Wrong children type for this component, expected are ${childrenTypes
23
22
  .map(type => type.displayName)
24
23
  .join(', ')}.`,
25
24
  );
26
25
  }
27
- return valid;
28
26
  };
29
27
 
30
28
  if (Array.isArray(children)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.80.8-beta.12",
3
+ "version": "0.80.8-beta.13",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {