@momo-kits/foundation 0.104.1-beta.0 → 0.104.1-beta.2
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/Text/index.tsx +14 -0
- package/index.ts +7 -0
- package/package.json +3 -1
- package/publish.sh +2 -2
package/Text/index.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import styles from './styles';
|
|
|
4
4
|
import {Typography, TypographyWeight} from './types';
|
|
5
5
|
import {ApplicationContext} from '../Application';
|
|
6
6
|
import {scaleSize} from './utils';
|
|
7
|
+
import {isIos} from "react-native-modalize/lib/utils/devices";
|
|
7
8
|
|
|
8
9
|
const SFProText: TypographyWeight = {
|
|
9
10
|
100: 'Thin',
|
|
@@ -109,6 +110,18 @@ const Text: React.FC<TextProps> = ({
|
|
|
109
110
|
};
|
|
110
111
|
};
|
|
111
112
|
|
|
113
|
+
const getAccessibilityID = (accessibilityLabel = '') => {
|
|
114
|
+
if (isIos) {
|
|
115
|
+
return {
|
|
116
|
+
accessible: true,
|
|
117
|
+
testID: accessibilityLabel,
|
|
118
|
+
};
|
|
119
|
+
} else {
|
|
120
|
+
return {
|
|
121
|
+
accessibilityLabel,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
};
|
|
112
125
|
const textStyle = getTypoStyle(typography);
|
|
113
126
|
|
|
114
127
|
if (deprecatedValues.includes(typography)) {
|
|
@@ -120,6 +133,7 @@ const Text: React.FC<TextProps> = ({
|
|
|
120
133
|
return (
|
|
121
134
|
<RNText
|
|
122
135
|
{...rest}
|
|
136
|
+
{...getAccessibilityID((rest.accessibilityLabel))}
|
|
123
137
|
style={[style, textStyle, {color: color ?? theme.colors.text.default}]}>
|
|
124
138
|
{children ?? ''}
|
|
125
139
|
</RNText>
|
package/index.ts
CHANGED
|
@@ -49,3 +49,10 @@ export * from './Title';
|
|
|
49
49
|
export * from './Title/types';
|
|
50
50
|
export * from './Badge';
|
|
51
51
|
export * from './Badge/types';
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* export trick for keep old mini app working
|
|
55
|
+
* @deprecated
|
|
56
|
+
*/
|
|
57
|
+
export * from 'react-native-modalize';
|
|
58
|
+
export * from '@gorhom/bottom-sheet';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@momo-kits/foundation",
|
|
3
|
-
"version": "0.104.1-beta.
|
|
3
|
+
"version": "0.104.1-beta.2",
|
|
4
4
|
"description": "React Native Component Kits",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"scripts": {},
|
|
@@ -8,9 +8,11 @@
|
|
|
8
8
|
"@momo-kits/foundation"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": {
|
|
11
|
+
"@gorhom/bottom-sheet": "2.4.1",
|
|
11
12
|
"react-native-safe-area-context": "3.1.4",
|
|
12
13
|
"react-native-linear-gradient": "2.8.3",
|
|
13
14
|
"react-native-gesture-handler": "1.10.3",
|
|
15
|
+
"react-native-modalize": "2.1.1",
|
|
14
16
|
"react-native-fast-image": "8.1.5",
|
|
15
17
|
"@react-navigation/bottom-tabs": "https://gitlab.mservice.com.vn/momo-platform/react-native-bottom-tabs.git",
|
|
16
18
|
"@react-navigation/core": "5.16.1",
|
package/publish.sh
CHANGED
|
@@ -9,8 +9,8 @@ elif [ "$1" == "latest" ]; then
|
|
|
9
9
|
npm version prerelease --preid=rc
|
|
10
10
|
npm publish --tag latest --access=public
|
|
11
11
|
else
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
npm version $(npm view @momo-kits/foundation@beta version)
|
|
13
|
+
npm version prerelease --preid=beta
|
|
14
14
|
npm publish --tag beta --access=public
|
|
15
15
|
fi
|
|
16
16
|
|