@momo-kits/foundation 0.109.1-optimize.16 → 0.109.1-optimize.17-beta.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 +13 -2
- package/Application/Components/HeaderBackground.tsx +1 -1
- package/Application/Components/HeaderExtendHeader.tsx +12 -3
- package/Application/Components/HeaderRight.tsx +5 -2
- package/Input/Input.tsx +6 -1
- package/Input/InputSearch.tsx +7 -1
- package/Layout/Screen.tsx +2 -6
- package/Radio/index.tsx +1 -1
- package/Title/index.tsx +1 -1
- package/code-scanner.js +1 -1
- package/package.json +1 -1
- package/verify.js +1 -1
- package/tsconfig.json +0 -24
|
@@ -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 {Radius} from '../../Consts';
|
|
19
|
+
import {Colors, 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
|
-
styles.tabBar,
|
|
210
|
+
floatingButton ? styles.tabBarFloatingButton : styles.tabBar,
|
|
211
211
|
{
|
|
212
212
|
backgroundColor: theme.colors.background.surface,
|
|
213
213
|
borderTopColor: theme.colors.border.default,
|
|
@@ -253,6 +253,17 @@ 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
|
+
},
|
|
256
267
|
floatingContainer: {
|
|
257
268
|
position: 'absolute',
|
|
258
269
|
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 = new Animated.Value(0),
|
|
17
17
|
useGradient = true,
|
|
18
18
|
useShadowHeader = true,
|
|
19
19
|
gradientColor,
|
|
@@ -46,6 +46,7 @@ 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';
|
|
49
50
|
|
|
50
51
|
const opacityBackground = animatedValue?.interpolate({
|
|
51
52
|
inputRange: [0, 52],
|
|
@@ -94,7 +95,9 @@ const HeaderExtendHeader: React.FC<{
|
|
|
94
95
|
<Animated.View style={{height: height}} />
|
|
95
96
|
<Animated.View
|
|
96
97
|
style={[
|
|
97
|
-
|
|
98
|
+
isIos && useShadowHeader
|
|
99
|
+
? styles.shadowHeader
|
|
100
|
+
: styles.dividerHeader,
|
|
98
101
|
{
|
|
99
102
|
backgroundColor: theme.colors.background.surface,
|
|
100
103
|
opacity: opacityBackground,
|
|
@@ -244,8 +247,14 @@ const styles = StyleSheet.create({
|
|
|
244
247
|
shadowRadius: 10,
|
|
245
248
|
},
|
|
246
249
|
android: {
|
|
247
|
-
|
|
248
|
-
|
|
250
|
+
shadowColor: Colors.black_17,
|
|
251
|
+
shadowOffset: {
|
|
252
|
+
width: 3,
|
|
253
|
+
height: 3,
|
|
254
|
+
},
|
|
255
|
+
shadowOpacity: 0.12,
|
|
256
|
+
shadowRadius: 10,
|
|
257
|
+
elevation: 10,
|
|
249
258
|
},
|
|
250
259
|
}),
|
|
251
260
|
},
|
|
@@ -65,7 +65,7 @@ const HeaderToolkitAction: React.FC<any> = ({
|
|
|
65
65
|
if (useShortcut) {
|
|
66
66
|
checkAppIsFavorite();
|
|
67
67
|
}
|
|
68
|
-
}, []);
|
|
68
|
+
}, [useShortcut, useMore, tools]);
|
|
69
69
|
|
|
70
70
|
let buttonStyle: ViewStyle = {};
|
|
71
71
|
if (tintColor === Colors.black_01) {
|
|
@@ -147,6 +147,9 @@ 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
|
+
|
|
150
153
|
navigator?.showBottomSheet({
|
|
151
154
|
options: {
|
|
152
155
|
header: (
|
|
@@ -157,7 +160,7 @@ const HeaderToolkitAction: React.FC<any> = ({
|
|
|
157
160
|
/>
|
|
158
161
|
<View>
|
|
159
162
|
<Text typography={'label_default_medium'}>{appName}</Text>
|
|
160
|
-
{
|
|
163
|
+
{isShowDescription && (
|
|
161
164
|
<Text
|
|
162
165
|
typography={'description_default_regular'}
|
|
163
166
|
color={Colors.black_12}>
|
package/Input/Input.tsx
CHANGED
|
@@ -93,12 +93,17 @@ 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
|
+
|
|
96
101
|
useImperativeHandle(ref, () => {
|
|
97
102
|
return {
|
|
98
103
|
clear: onClearText,
|
|
99
104
|
focus: () => inputRef.current?.focus(),
|
|
100
105
|
blur: () => inputRef.current?.blur(),
|
|
101
|
-
setText:
|
|
106
|
+
setText: _setText,
|
|
102
107
|
};
|
|
103
108
|
});
|
|
104
109
|
|
package/Input/InputSearch.tsx
CHANGED
|
@@ -165,12 +165,17 @@ 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
|
+
|
|
168
173
|
useImperativeHandle(ref, () => {
|
|
169
174
|
return {
|
|
170
175
|
clear: onClearText,
|
|
171
176
|
focus: () => inputRef.current?.focus(),
|
|
172
177
|
blur: () => inputRef.current?.blur(),
|
|
173
|
-
setText:
|
|
178
|
+
setText: _setText,
|
|
174
179
|
};
|
|
175
180
|
});
|
|
176
181
|
|
|
@@ -208,6 +213,7 @@ const InputSearch: ForwardRefRenderFunction<InputRef, InputSearchProps> = (
|
|
|
208
213
|
]}
|
|
209
214
|
value={value}
|
|
210
215
|
onChangeText={_onChangeText}
|
|
216
|
+
defaultValue={defaultValue}
|
|
211
217
|
onFocus={_onFocus}
|
|
212
218
|
onBlur={_onBlur}
|
|
213
219
|
placeholder={placeholder}
|
package/Layout/Screen.tsx
CHANGED
|
@@ -344,12 +344,8 @@ const Screen = forwardRef(
|
|
|
344
344
|
const setSearchHeader = (params: SearchHeaderProps) => {
|
|
345
345
|
const options: StackNavigationOptions = {
|
|
346
346
|
headerRight: undefined,
|
|
347
|
-
headerTitle: (
|
|
348
|
-
<SearchHeader
|
|
349
|
-
{...props}
|
|
350
|
-
{...params}
|
|
351
|
-
animatedValue={animatedValue.current}
|
|
352
|
-
/>
|
|
347
|
+
headerTitle: () => (
|
|
348
|
+
<SearchHeader {...params} animatedValue={animatedValue.current} />
|
|
353
349
|
),
|
|
354
350
|
};
|
|
355
351
|
|
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: '95%'};
|
|
42
42
|
|
|
43
43
|
const renderIcon = () => {
|
|
44
44
|
if (!icon) return null;
|
package/code-scanner.js
CHANGED
package/package.json
CHANGED
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
|
|
package/tsconfig.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
}
|