@momo-kits/foundation 0.109.1-optimize.17-beta.18 → 0.109.1-optimize.18
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/Application/BottomTab/BottomTabBar.tsx +2 -13
- package/Application/Components/HeaderBackground.tsx +1 -1
- package/Application/Components/HeaderExtendHeader.tsx +3 -12
- package/Application/Components/HeaderRight.tsx +2 -5
- package/Application/StackScreen.tsx +6 -1
- package/Input/Input.tsx +1 -6
- package/Input/InputSearch.tsx +1 -7
- package/Layout/Screen.tsx +6 -2
- package/Radio/index.tsx +1 -1
- package/Title/index.tsx +1 -1
- package/code-scanner.js +1 -1
- package/package.json +1 -1
- package/tsconfig.json +24 -0
- package/verify.js +1 -1
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
View,
|
|
17
17
|
} from 'react-native';
|
|
18
18
|
import {EdgeInsets, useSafeAreaInsets} from 'react-native-safe-area-context';
|
|
19
|
-
import {
|
|
19
|
+
import {Radius} from '../../Consts';
|
|
20
20
|
import {Icon} from '../../Icon';
|
|
21
21
|
import {Text} from '../../Text';
|
|
22
22
|
import {FloatingButtonProps} from '../types';
|
|
@@ -207,7 +207,7 @@ export default function BottomTabBar({
|
|
|
207
207
|
return (
|
|
208
208
|
<Animated.View
|
|
209
209
|
style={[
|
|
210
|
-
|
|
210
|
+
styles.tabBar,
|
|
211
211
|
{
|
|
212
212
|
backgroundColor: theme.colors.background.surface,
|
|
213
213
|
borderTopColor: theme.colors.border.default,
|
|
@@ -253,17 +253,6 @@ const styles = StyleSheet.create({
|
|
|
253
253
|
borderTopWidth: StyleSheet.hairlineWidth,
|
|
254
254
|
elevation: 8,
|
|
255
255
|
},
|
|
256
|
-
tabBarFloatingButton: {
|
|
257
|
-
left: 0,
|
|
258
|
-
right: 0,
|
|
259
|
-
bottom: 0,
|
|
260
|
-
zIndex: 1,
|
|
261
|
-
shadowColor: Colors.black_20,
|
|
262
|
-
shadowOffset: {width: 0, height: -2},
|
|
263
|
-
shadowOpacity: 0.05,
|
|
264
|
-
shadowRadius: 3,
|
|
265
|
-
elevation: 8,
|
|
266
|
-
},
|
|
267
256
|
floatingContainer: {
|
|
268
257
|
position: 'absolute',
|
|
269
258
|
alignItems: 'center',
|
|
@@ -13,7 +13,7 @@ const LinearGradientAnimated = Animated.createAnimatedComponent(LinearGradient);
|
|
|
13
13
|
*/
|
|
14
14
|
const HeaderBackground: React.FC<HeaderBackgroundProps> = ({
|
|
15
15
|
image,
|
|
16
|
-
animatedValue
|
|
16
|
+
animatedValue,
|
|
17
17
|
useGradient = true,
|
|
18
18
|
useShadowHeader = true,
|
|
19
19
|
gradientColor,
|
|
@@ -46,7 +46,6 @@ const HeaderExtendHeader: React.FC<{
|
|
|
46
46
|
const gradientColor = customGradientColor ?? theme.colors.gradient;
|
|
47
47
|
const headerBackground = customBackground ?? theme.assets?.headerBackground;
|
|
48
48
|
const leftPosition = inputSearchProps?.leftPosition || BACK_WIDTH + 20;
|
|
49
|
-
const isIos = Platform.OS === 'ios';
|
|
50
49
|
|
|
51
50
|
const opacityBackground = animatedValue?.interpolate({
|
|
52
51
|
inputRange: [0, 52],
|
|
@@ -95,9 +94,7 @@ const HeaderExtendHeader: React.FC<{
|
|
|
95
94
|
<Animated.View style={{height: height}} />
|
|
96
95
|
<Animated.View
|
|
97
96
|
style={[
|
|
98
|
-
|
|
99
|
-
? styles.shadowHeader
|
|
100
|
-
: styles.dividerHeader,
|
|
97
|
+
useShadowHeader ? styles.shadowHeader : styles.dividerHeader,
|
|
101
98
|
{
|
|
102
99
|
backgroundColor: theme.colors.background.surface,
|
|
103
100
|
opacity: opacityBackground,
|
|
@@ -247,14 +244,8 @@ const styles = StyleSheet.create({
|
|
|
247
244
|
shadowRadius: 10,
|
|
248
245
|
},
|
|
249
246
|
android: {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
width: 3,
|
|
253
|
-
height: 3,
|
|
254
|
-
},
|
|
255
|
-
shadowOpacity: 0.12,
|
|
256
|
-
shadowRadius: 10,
|
|
257
|
-
elevation: 10,
|
|
247
|
+
borderBottomWidth: 1,
|
|
248
|
+
borderColor: Colors.black_04,
|
|
258
249
|
},
|
|
259
250
|
}),
|
|
260
251
|
},
|
|
@@ -65,7 +65,7 @@ const HeaderToolkitAction: React.FC<any> = ({
|
|
|
65
65
|
if (useShortcut) {
|
|
66
66
|
checkAppIsFavorite();
|
|
67
67
|
}
|
|
68
|
-
}, [
|
|
68
|
+
}, []);
|
|
69
69
|
|
|
70
70
|
let buttonStyle: ViewStyle = {};
|
|
71
71
|
if (tintColor === Colors.black_01) {
|
|
@@ -147,9 +147,6 @@ const HeaderToolkitAction: React.FC<any> = ({
|
|
|
147
147
|
const onPressHelpCenter = () => {
|
|
148
148
|
const appName = translate?.(context?.name);
|
|
149
149
|
const appDescription = translate?.(context?.description);
|
|
150
|
-
const isShowDescription =
|
|
151
|
-
context?.description && Object.keys(context?.description).length > 0;
|
|
152
|
-
|
|
153
150
|
navigator?.showBottomSheet({
|
|
154
151
|
options: {
|
|
155
152
|
header: (
|
|
@@ -160,7 +157,7 @@ const HeaderToolkitAction: React.FC<any> = ({
|
|
|
160
157
|
/>
|
|
161
158
|
<View>
|
|
162
159
|
<Text typography={'label_default_medium'}>{appName}</Text>
|
|
163
|
-
{
|
|
160
|
+
{!!appDescription && (
|
|
164
161
|
<Text
|
|
165
162
|
typography={'description_default_regular'}
|
|
166
163
|
color={Colors.black_12}>
|
|
@@ -239,7 +239,12 @@ const StackScreen: React.FC<ScreenParams> = props => {
|
|
|
239
239
|
}, 2000);
|
|
240
240
|
},
|
|
241
241
|
}}>
|
|
242
|
-
<Component
|
|
242
|
+
<Component
|
|
243
|
+
{...data}
|
|
244
|
+
heightHeader={heightHeader}
|
|
245
|
+
onScreenLoad={onScreenLoad}
|
|
246
|
+
onScreenInteraction={onScreenInteraction}
|
|
247
|
+
/>
|
|
243
248
|
{showGrid && <GridSystem />}
|
|
244
249
|
</ScreenContext.Provider>
|
|
245
250
|
);
|
package/Input/Input.tsx
CHANGED
|
@@ -93,17 +93,12 @@ const Input = forwardRef(
|
|
|
93
93
|
onBlur?.(e);
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
-
const _setText = (text: string) => {
|
|
97
|
-
inputRef?.current?.setNativeProps({text});
|
|
98
|
-
_onChangeText(text);
|
|
99
|
-
};
|
|
100
|
-
|
|
101
96
|
useImperativeHandle(ref, () => {
|
|
102
97
|
return {
|
|
103
98
|
clear: onClearText,
|
|
104
99
|
focus: () => inputRef.current?.focus(),
|
|
105
100
|
blur: () => inputRef.current?.blur(),
|
|
106
|
-
setText:
|
|
101
|
+
setText: (text: string) => _onChangeText(text),
|
|
107
102
|
};
|
|
108
103
|
});
|
|
109
104
|
|
package/Input/InputSearch.tsx
CHANGED
|
@@ -165,17 +165,12 @@ const InputSearch: ForwardRefRenderFunction<InputRef, InputSearchProps> = (
|
|
|
165
165
|
onChangeText?.(text);
|
|
166
166
|
};
|
|
167
167
|
|
|
168
|
-
const _setText = (text: string) => {
|
|
169
|
-
inputRef?.current?.setNativeProps({text});
|
|
170
|
-
_onChangeText(text);
|
|
171
|
-
};
|
|
172
|
-
|
|
173
168
|
useImperativeHandle(ref, () => {
|
|
174
169
|
return {
|
|
175
170
|
clear: onClearText,
|
|
176
171
|
focus: () => inputRef.current?.focus(),
|
|
177
172
|
blur: () => inputRef.current?.blur(),
|
|
178
|
-
setText:
|
|
173
|
+
setText: (text: string) => _onChangeText(text),
|
|
179
174
|
};
|
|
180
175
|
});
|
|
181
176
|
|
|
@@ -213,7 +208,6 @@ const InputSearch: ForwardRefRenderFunction<InputRef, InputSearchProps> = (
|
|
|
213
208
|
]}
|
|
214
209
|
value={value}
|
|
215
210
|
onChangeText={_onChangeText}
|
|
216
|
-
defaultValue={defaultValue}
|
|
217
211
|
onFocus={_onFocus}
|
|
218
212
|
onBlur={_onBlur}
|
|
219
213
|
placeholder={placeholder}
|
package/Layout/Screen.tsx
CHANGED
|
@@ -344,8 +344,12 @@ const Screen = forwardRef(
|
|
|
344
344
|
const setSearchHeader = (params: SearchHeaderProps) => {
|
|
345
345
|
const options: StackNavigationOptions = {
|
|
346
346
|
headerRight: undefined,
|
|
347
|
-
headerTitle: () => (
|
|
348
|
-
<SearchHeader
|
|
347
|
+
headerTitle: (props: any) => (
|
|
348
|
+
<SearchHeader
|
|
349
|
+
{...props}
|
|
350
|
+
{...params}
|
|
351
|
+
animatedValue={animatedValue.current}
|
|
352
|
+
/>
|
|
349
353
|
),
|
|
350
354
|
};
|
|
351
355
|
|
package/Radio/index.tsx
CHANGED
package/Title/index.tsx
CHANGED
|
@@ -38,7 +38,7 @@ const Title: FC<TitleProps> = ({
|
|
|
38
38
|
const numberOfLines = showTrailingAction || !!badgeLabel ? 1 : 2;
|
|
39
39
|
const buttonTypo: Typography =
|
|
40
40
|
buttonSize === 'small' ? 'action_xs_bold' : 'action_s_bold';
|
|
41
|
-
const flexStyle = showTrailingAction && {maxWidth: '
|
|
41
|
+
const flexStyle = showTrailingAction && {maxWidth: '70%'};
|
|
42
42
|
|
|
43
43
|
const renderIcon = () => {
|
|
44
44
|
if (!icon) return null;
|
package/code-scanner.js
CHANGED
package/package.json
CHANGED
package/tsconfig.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"rootDir": ".",
|
|
4
|
+
"allowUnreachableCode": false,
|
|
5
|
+
"allowUnusedLabels": false,
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"forceConsistentCasingInFileNames": true,
|
|
8
|
+
"jsx": "react",
|
|
9
|
+
"lib": ["esnext"],
|
|
10
|
+
"module": "esnext",
|
|
11
|
+
"moduleResolution": "node",
|
|
12
|
+
"noFallthroughCasesInSwitch": true,
|
|
13
|
+
"noImplicitReturns": false,
|
|
14
|
+
"noImplicitUseStrict": false,
|
|
15
|
+
"noStrictGenericChecks": false,
|
|
16
|
+
"noUncheckedIndexedAccess": true,
|
|
17
|
+
"noUnusedLocals": true,
|
|
18
|
+
"noUnusedParameters": true,
|
|
19
|
+
"resolveJsonModule": true,
|
|
20
|
+
"skipLibCheck": true,
|
|
21
|
+
"strict": true,
|
|
22
|
+
"target": "esnext"
|
|
23
|
+
}
|
|
24
|
+
}
|
package/verify.js
CHANGED
|
@@ -27,7 +27,7 @@ if (
|
|
|
27
27
|
|
|
28
28
|
if (packageVersion > iOSAppTarget || packageVersion > androidAppTarget) {
|
|
29
29
|
throw new Error(
|
|
30
|
-
`\x1b[41m Package ${packageInfo.name} version
|
|
30
|
+
`\x1b[41m Package ${packageInfo.name} version: ${packageInfo.version} require deploymentTarget ${packageVersion}`
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
33
|
|