@momo-kits/foundation 0.89.5 → 0.89.6-rc.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/Application/BottomSheet.tsx +216 -0
- package/Application/BottomTab/BottomTabBar.tsx +278 -0
- package/Application/{BottomTab.tsx → BottomTab/index.tsx} +42 -18
- package/Application/Components.tsx +350 -86
- package/Application/Localize.ts +44 -0
- package/Application/ModalScreen.tsx +14 -185
- package/Application/Navigation.ts +5 -19
- package/Application/NavigationContainer.tsx +62 -72
- package/Application/Navigator.ts +53 -35
- package/Application/StackScreen.tsx +289 -32
- package/Application/index.ts +13 -15
- package/Application/types.ts +64 -35
- package/Application/utils.tsx +76 -30
- package/Assets/icon_bank.json +1 -1
- package/Badge/Badge.tsx +1 -1
- package/Badge/BadgeDotAnimation.tsx +95 -0
- package/Badge/index.tsx +2 -1
- package/Badge/styles.ts +50 -6
- package/Button/index.tsx +44 -26
- package/CheckBox/index.tsx +37 -26
- package/CheckBox/types.ts +5 -3
- package/Consts/colors+spacing+radius.ts +14 -0
- package/Icon/index.tsx +9 -8
- package/Icon/types.ts +2 -2
- package/IconButton/index.tsx +24 -14
- package/Image/index.tsx +23 -8
- package/Image/types.ts +2 -0
- package/Input/Input.tsx +116 -26
- package/Input/InputDropDown.tsx +66 -51
- package/Input/InputMoney.tsx +106 -15
- package/Input/InputOTP.tsx +49 -26
- package/Input/InputSearch.tsx +252 -99
- package/Input/InputTextArea.tsx +26 -6
- package/Input/TextTyping.tsx +113 -0
- package/Input/common.tsx +48 -22
- package/Input/index.tsx +112 -77
- package/Input/styles.ts +48 -11
- package/Input/utils.ts +1 -1
- package/Layout/Card.tsx +4 -3
- package/Layout/FloatingButton.tsx +168 -0
- package/Layout/GridSystem.tsx +1 -1
- package/Layout/ItemList.tsx +3 -2
- package/Layout/Screen.tsx +242 -121
- package/Layout/Section.tsx +4 -3
- package/Layout/styles.ts +11 -13
- package/Layout/types.ts +1 -1
- package/Layout/utils.ts +4 -4
- package/Loader/index.tsx +2 -0
- package/Pagination/PaginationScroll.tsx +2 -2
- package/Pagination/styles.ts +1 -1
- package/Popup/PopupNotify.tsx +56 -45
- package/Popup/PopupPromotion.tsx +5 -7
- package/Popup/types.ts +1 -7
- package/Radio/index.tsx +35 -20
- package/Radio/types.ts +5 -3
- package/Switch/index.tsx +32 -18
- package/Switch/types.ts +5 -3
- package/Tag/index.tsx +9 -2
- package/Tag/styles.ts +3 -2
- package/Tag/types.ts +12 -0
- package/Text/index.tsx +24 -5
- package/Text/styles.ts +8 -8
- package/Text/types.ts +19 -1
- package/Title/index.tsx +170 -103
- package/Title/styles.ts +36 -9
- package/Title/types.ts +16 -48
- package/code-scanner.js +125 -16
- package/index.ts +7 -0
- package/migrate_typo.js +56 -0
- package/package.json +11 -10
- package/publish.sh +16 -21
- package/tsconfig.json +1 -1
- package/verify.js +37 -40
package/package.json
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@momo-kits/foundation",
|
|
3
|
-
"version": "0.89.
|
|
3
|
+
"version": "0.89.6-rc.2",
|
|
4
4
|
"description": "React Native Component Kits",
|
|
5
5
|
"main": "index.ts",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"postinstall": "node verify.js"
|
|
8
|
-
},
|
|
6
|
+
"scripts": {},
|
|
9
7
|
"keywords": [
|
|
10
8
|
"@momo-kits/foundation"
|
|
11
9
|
],
|
|
12
10
|
"dependencies": {
|
|
13
|
-
"@gorhom/bottom-sheet": "
|
|
11
|
+
"@gorhom/bottom-sheet": "2.4.1",
|
|
14
12
|
"react-native-safe-area-context": "3.1.4",
|
|
15
13
|
"react-native-linear-gradient": "2.8.3",
|
|
16
14
|
"react-native-gesture-handler": "1.10.3",
|
|
15
|
+
"react-native-modalize": "2.1.1",
|
|
17
16
|
"react-native-fast-image": "8.1.5",
|
|
18
|
-
"@react-navigation/bottom-tabs": "
|
|
17
|
+
"@react-navigation/bottom-tabs": "https://gitlab.mservice.com.vn/momo-platform/react-native-bottom-tabs.git",
|
|
19
18
|
"@react-navigation/core": "5.16.1",
|
|
20
19
|
"@react-navigation/native": "5.9.8",
|
|
21
20
|
"@react-navigation/routers": "5.7.4",
|
|
22
|
-
"lottie-react-native": "
|
|
23
|
-
"@react-navigation/stack": "
|
|
21
|
+
"lottie-react-native": "git+https://gitlab.mservice.com.vn/momo-platform/momo-lottie-react-native.git",
|
|
22
|
+
"@react-navigation/stack": "https://gitlab.mservice.com.vn/momo-platform/react-navigation-stack.git"
|
|
24
23
|
},
|
|
25
24
|
"peerDependencies": {
|
|
26
25
|
"react-native": "*"
|
|
@@ -32,6 +31,7 @@
|
|
|
32
31
|
"@types/jest": "26.0.23",
|
|
33
32
|
"@types/react-native": "0.64.4",
|
|
34
33
|
"@types/react-test-renderer": "16.9.2",
|
|
34
|
+
"@types/d3-shape": "1.3.7",
|
|
35
35
|
"babel-jest": "^26.6.3",
|
|
36
36
|
"eslint": "^7.14.0",
|
|
37
37
|
"jest": "^26.6.3",
|
|
@@ -39,8 +39,9 @@
|
|
|
39
39
|
"react-test-renderer": "17.0.1",
|
|
40
40
|
"typescript": "^4.0.3",
|
|
41
41
|
"@momo-platform/versions": "4.1.11",
|
|
42
|
-
"react-scanner": "^1.1.0"
|
|
42
|
+
"react-scanner": "^1.1.0",
|
|
43
|
+
"@types/color": "3.0.6"
|
|
43
44
|
},
|
|
44
45
|
"author": "@momo-kits/foundation",
|
|
45
46
|
"license": "ISC"
|
|
46
|
-
}
|
|
47
|
+
}
|
package/publish.sh
CHANGED
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
rm -rf dist
|
|
3
|
-
mkdir dist
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
npm publish --tag
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
#curl -X POST -H 'Content-Type: application/json' 'https://chat.googleapis.com/v1/spaces/AAAAbP8987c/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=UGSFRvk_oYb9uGsAgs31bVvMm6jDkmD8zihGm3eyaQA%3D&threadKey=JoaXTEYaNNkl' -d '{"text": "@momo-kits/core new version release: '*"$VERSION"*' https://www.npmjs.com/package/@momo-kits/foundation"}'
|
|
3
|
+
if [ "$1" == "stable" ]; then
|
|
4
|
+
npm version $(npm view @momo-kits/foundation@stable version)
|
|
5
|
+
npm version patch
|
|
6
|
+
npm publish --tag stable --access=public
|
|
7
|
+
elif [ "$1" == "latest" ]; then
|
|
8
|
+
npm version $(npm view @momo-kits/foundation@latest version)
|
|
9
|
+
npm version prerelease --preid=rc
|
|
10
|
+
npm publish --tag latest --access=public
|
|
11
|
+
else
|
|
12
|
+
npm version $(npm view @momo-kits/foundation@beta version)
|
|
13
|
+
npm version prerelease --preid=beta
|
|
14
|
+
npm publish --tag beta --access=public
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
PACKAGE_NAME=$(npm pkg get name)
|
|
18
|
+
NEW_PACKAGE_VERSION=$(npm pkg get version)
|
package/tsconfig.json
CHANGED
package/verify.js
CHANGED
|
@@ -1,44 +1,41 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
2
|
const path = require('path');
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
} catch (error) {
|
|
42
|
-
console.error(`Installation failed: ${error.message}`);
|
|
43
|
-
process.exit(1);
|
|
4
|
+
const packageInfo = JSON.parse(
|
|
5
|
+
fs.readFileSync(path.join(`${__dirname}`, 'package.json'), 'utf8')
|
|
6
|
+
);
|
|
7
|
+
const packageVersion = parseInt(packageInfo?.version.split('.')?.[1]);
|
|
8
|
+
|
|
9
|
+
const app = path.join(`${__dirname}/../../../`, 'app.json');
|
|
10
|
+
const miniJson = path.join(`${__dirname}/../../../`, 'package.json');
|
|
11
|
+
|
|
12
|
+
if (!fs.existsSync(app) || !fs.existsSync(miniJson)) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const appInfo = JSON.parse(fs.readFileSync(app, 'utf8'));
|
|
17
|
+
const miniInfo = JSON.parse(fs.readFileSync(miniJson, 'utf8'));
|
|
18
|
+
|
|
19
|
+
const iOSAppTarget = appInfo?.client?.ios.deploymentTarget;
|
|
20
|
+
const androidAppTarget = appInfo?.client?.android.deploymentTarget;
|
|
21
|
+
|
|
22
|
+
if (
|
|
23
|
+
miniInfo?.dependencies?.['@momo-platform/momo-core']?.includes('optimize')
|
|
24
|
+
) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (packageVersion > iOSAppTarget || packageVersion > androidAppTarget) {
|
|
29
|
+
throw new Error(
|
|
30
|
+
`\x1b[41m Package ${packageInfo.name} version: ${packageInfo.version} require deploymentTarget ${packageVersion}`
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (
|
|
35
|
+
miniInfo?.dependencies?.['@momo-platform/momo-core'] &&
|
|
36
|
+
miniInfo?.dependencies?.['@momo-platform/momo-core'] !== packageInfo?.version
|
|
37
|
+
) {
|
|
38
|
+
throw new Error(
|
|
39
|
+
`\x1b[41m Package ${packageInfo.name} version: ${packageInfo.version} require install resolutions @momo-platform/momo-core ${packageInfo.version}`
|
|
40
|
+
);
|
|
44
41
|
}
|