@momo-kits/native-kits 0.157.1-com.1-debug → 0.157.1-com.1
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/package.json +1 -1
- package/build.gradle.kts +0 -11
- package/compose/build.gradle.kts +0 -180
- package/compose/build.gradle.kts.backup +0 -180
- package/compose/compose.podspec +0 -54
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +0 -110
- package/compose/src/commonMain/composeResources/font/momosignature.otf +0 -0
- package/compose/src/commonMain/composeResources/font/momotrustdisplay.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_black.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_black.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_bold.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_heavy.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_light.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_medium.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_regular.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_semibold.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_thin.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_thin.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.ttf +0 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/AnimationSearchInput.kt +0 -57
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +0 -107
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/FloatingButton.kt +0 -201
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Header.kt +0 -222
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderAnimated.kt +0 -48
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderBackground.kt +0 -86
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderDefault.kt +0 -76
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderExtended.kt +0 -76
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderRight.kt +0 -305
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderTitle.kt +0 -33
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +0 -720
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +0 -121
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +0 -405
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/useHeaderSearchAnimation.kt +0 -69
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Avatar.kt +0 -157
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +0 -85
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +0 -32
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +0 -340
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +0 -198
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +0 -357
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Carousel.kt +0 -123
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +0 -94
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +0 -136
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Collapse.kt +0 -224
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +0 -543
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +0 -23
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +0 -76
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +0 -148
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +0 -188
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +0 -116
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +0 -448
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +0 -172
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +0 -255
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +0 -231
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +0 -233
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +0 -254
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +0 -241
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +0 -364
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Loader.kt +0 -108
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +0 -56
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationNumber.kt +0 -41
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +0 -92
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +0 -40
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +0 -352
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +0 -103
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ProgressInfo.kt +0 -350
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +0 -70
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Rating.kt +0 -87
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +0 -17
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +0 -96
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Slider.kt +0 -360
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Stepper.kt +0 -256
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Steps.kt +0 -494
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/SuggestAction.kt +0 -131
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Swipe.kt +0 -215
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +0 -96
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/TabView.kt +0 -449
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +0 -92
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +0 -130
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +0 -214
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +0 -590
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +0 -177
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Uploader.kt +0 -192
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +0 -205
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +0 -29
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +0 -239
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +0 -191
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +0 -306
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +0 -12
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +0 -13
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +0 -185
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +0 -285
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +0 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +0 -35
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +0 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +0 -59
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +0 -68
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Conditional.kt +0 -11
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +0 -14
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +0 -50
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Size.kt +0 -51
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +0 -239
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +0 -119
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +0 -98
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +0 -161
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +0 -331
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +0 -497
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +0 -162
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +0 -243
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +0 -86
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +0 -187
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +0 -279
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +0 -80
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +0 -306
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +0 -32
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +0 -370
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +0 -132
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +0 -42
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +0 -1329
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +0 -62
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Tracking.kt +0 -15
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +0 -88
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +0 -149
- package/gradle/libs.versions.toml +0 -57
- package/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/gradle/wrapper/gradle-wrapper.properties +0 -8
- package/gradle.properties +0 -26
- package/gradlew +0 -252
- package/gradlew.bat +0 -94
- package/local.properties +0 -8
- package/settings.gradle.kts +0 -52
- package/src/doctor/README.md +0 -73
- package/src/doctor/package-lock.json +0 -885
- package/src/doctor/package.json +0 -44
- package/src/doctor/publish.sh +0 -27
- package/src/doctor/src/Users.json +0 -112
- package/src/doctor/src/Whitelist.json +0 -6
- package/src/doctor/src/commands/check.ts +0 -81
- package/src/doctor/src/commands/doctor.ts +0 -193
- package/src/doctor/src/index.ts +0 -35
- package/src/doctor/src/logger.ts +0 -84
- package/src/doctor/src/task/native.ts +0 -21
- package/src/doctor/src/task/utils.ts +0 -20
- package/src/doctor/src/utils/checkCoreDependencies.ts +0 -138
- package/src/doctor/src/utils/checkDeletedPackage.ts +0 -53
- package/src/doctor/src/utils/checkDeprecatedPackages.ts +0 -168
- package/src/doctor/src/utils/checkDeprecatedVersion.ts +0 -60
- package/src/doctor/src/utils/checkShareDependencies.ts +0 -251
- package/src/doctor/src/utils/checkWrongVersionCommunityPackage.ts +0 -64
- package/src/doctor/src/utils/getErrorMessage.ts +0 -84
- package/src/doctor/src/utils/scanComponentUsage.ts +0 -206
- package/src/doctor/src/utils/scanFoundationImports.ts +0 -169
- package/src/doctor/src/utils/scanMaxApiUsage.ts +0 -86
- package/src/doctor/src/utils/scanNativeModulesUsage.ts +0 -78
- package/src/doctor/src/utils/sendMessage.ts +0 -28
- package/src/doctor/tsconfig.json +0 -14
- package/src/doctor/yarn.lock +0 -492
- package/src/foundations/Application/BottomSheet.tsx +0 -358
- package/src/foundations/Application/BottomTab/BottomTabBar.tsx +0 -320
- package/src/foundations/Application/BottomTab/CustomBottomTabItem.tsx +0 -155
- package/src/foundations/Application/BottomTab/TabBarIcon.tsx +0 -113
- package/src/foundations/Application/BottomTab/index.tsx +0 -449
- package/src/foundations/Application/Components/BackgroundImageView.tsx +0 -126
- package/src/foundations/Application/Components/HeaderAnimated.tsx +0 -69
- package/src/foundations/Application/Components/HeaderBackground.tsx +0 -83
- package/src/foundations/Application/Components/HeaderExtendHeader.tsx +0 -225
- package/src/foundations/Application/Components/HeaderLeft.tsx +0 -93
- package/src/foundations/Application/Components/HeaderRight.tsx +0 -444
- package/src/foundations/Application/Components/HeaderTitle.tsx +0 -596
- package/src/foundations/Application/Components/NavigationButton.tsx +0 -76
- package/src/foundations/Application/Components/SearchHeader.tsx +0 -127
- package/src/foundations/Application/Localize.ts +0 -44
- package/src/foundations/Application/ModalScreen.tsx +0 -148
- package/src/foundations/Application/Navigation.ts +0 -63
- package/src/foundations/Application/NavigationContainer.tsx +0 -245
- package/src/foundations/Application/Navigator.ts +0 -171
- package/src/foundations/Application/ScaleSizeProvider.tsx +0 -16
- package/src/foundations/Application/StackScreen.tsx +0 -420
- package/src/foundations/Application/TooltipPortal.tsx +0 -127
- package/src/foundations/Application/WidgetContainer.tsx +0 -162
- package/src/foundations/Application/index.ts +0 -34
- package/src/foundations/Application/types.ts +0 -350
- package/src/foundations/Application/utils.tsx +0 -239
- package/src/foundations/Assets/DotAnimation.json +0 -256
- package/src/foundations/Assets/SpinnerAnimation.json +0 -1027
- package/src/foundations/Assets/icon.json +0 -4052
- package/src/foundations/Assets/icon_bank.json +0 -506
- package/src/foundations/Assets/language.json +0 -208
- package/src/foundations/Assets/lottie_circle_loader.json +0 -1
- package/src/foundations/Assets/pinAnimation.json +0 -1
- package/src/foundations/Assets/unpinAnimation.json +0 -1
- package/src/foundations/Badge/Badge.tsx +0 -104
- package/src/foundations/Badge/BadgeDot.tsx +0 -35
- package/src/foundations/Badge/BadgeDotAnimation.tsx +0 -95
- package/src/foundations/Badge/BadgeRibbon.tsx +0 -112
- package/src/foundations/Badge/Shape.tsx +0 -29
- package/src/foundations/Badge/index.tsx +0 -8
- package/src/foundations/Badge/styles.ts +0 -125
- package/src/foundations/Badge/types.ts +0 -68
- package/src/foundations/Button/index.tsx +0 -371
- package/src/foundations/Button/styles.ts +0 -65
- package/src/foundations/CheckBox/index.tsx +0 -104
- package/src/foundations/CheckBox/styles.ts +0 -17
- package/src/foundations/CheckBox/types.ts +0 -37
- package/src/foundations/Consts/colors+spacing+radius.ts +0 -232
- package/src/foundations/Consts/index.ts +0 -4
- package/src/foundations/Consts/styles.ts +0 -52
- package/src/foundations/Consts/theme.ts +0 -121
- package/src/foundations/Context/index.ts +0 -27
- package/src/foundations/Divider/DashDivider.tsx +0 -46
- package/src/foundations/Divider/index.tsx +0 -45
- package/src/foundations/FoundationList/index.tsx +0 -12
- package/src/foundations/FoundationList/types.ts +0 -7
- package/src/foundations/Icon/index.tsx +0 -57
- package/src/foundations/Icon/types.ts +0 -32
- package/src/foundations/IconButton/index.tsx +0 -144
- package/src/foundations/IconButton/styles.ts +0 -20
- package/src/foundations/Image/index.tsx +0 -115
- package/src/foundations/Image/styles.ts +0 -7
- package/src/foundations/Image/types.ts +0 -7
- package/src/foundations/Input/Input.tsx +0 -280
- package/src/foundations/Input/InputDropDown.tsx +0 -161
- package/src/foundations/Input/InputMoney.tsx +0 -325
- package/src/foundations/Input/InputOTP.tsx +0 -299
- package/src/foundations/Input/InputPhoneNumber.tsx +0 -287
- package/src/foundations/Input/InputSearch.tsx +0 -351
- package/src/foundations/Input/InputTextArea.tsx +0 -218
- package/src/foundations/Input/SystemTextInput.tsx +0 -44
- package/src/foundations/Input/TextTyping.tsx +0 -115
- package/src/foundations/Input/common.tsx +0 -243
- package/src/foundations/Input/index.tsx +0 -373
- package/src/foundations/Input/styles.ts +0 -226
- package/src/foundations/Input/utils.ts +0 -97
- package/src/foundations/Layout/Card.tsx +0 -108
- package/src/foundations/Layout/FloatingButton.tsx +0 -179
- package/src/foundations/Layout/GridSystem.tsx +0 -137
- package/src/foundations/Layout/Item.tsx +0 -59
- package/src/foundations/Layout/ItemList.tsx +0 -66
- package/src/foundations/Layout/ItemSectionList.tsx +0 -40
- package/src/foundations/Layout/Screen.tsx +0 -644
- package/src/foundations/Layout/Section.tsx +0 -103
- package/src/foundations/Layout/TrackingScope.tsx +0 -18
- package/src/foundations/Layout/index.ts +0 -34
- package/src/foundations/Layout/styles.ts +0 -95
- package/src/foundations/Layout/types.ts +0 -40
- package/src/foundations/Layout/utils.ts +0 -47
- package/src/foundations/Loader/DotLoader.tsx +0 -37
- package/src/foundations/Loader/Loader.tsx +0 -13
- package/src/foundations/Loader/ProgressBar.tsx +0 -45
- package/src/foundations/Loader/Spinner.tsx +0 -29
- package/src/foundations/Loader/index.tsx +0 -6
- package/src/foundations/Loader/styles.ts +0 -10
- package/src/foundations/Loader/types.ts +0 -35
- package/src/foundations/Loader/utils.ts +0 -25
- package/src/foundations/Pagination/Dot.tsx +0 -19
- package/src/foundations/Pagination/PaginationDot.tsx +0 -44
- package/src/foundations/Pagination/PaginationNumber.tsx +0 -31
- package/src/foundations/Pagination/PaginationScroll.tsx +0 -99
- package/src/foundations/Pagination/PaginationWhiteDot.tsx +0 -43
- package/src/foundations/Pagination/index.tsx +0 -25
- package/src/foundations/Pagination/styles.ts +0 -51
- package/src/foundations/Pagination/types.ts +0 -40
- package/src/foundations/Popup/PopupNotify.tsx +0 -276
- package/src/foundations/Popup/PopupPromotion.tsx +0 -118
- package/src/foundations/Popup/index.tsx +0 -4
- package/src/foundations/Popup/types.ts +0 -96
- package/src/foundations/Radio/index.tsx +0 -108
- package/src/foundations/Radio/styles.ts +0 -15
- package/src/foundations/Radio/types.ts +0 -31
- package/src/foundations/Skeleton/index.tsx +0 -118
- package/src/foundations/Skeleton/styles.ts +0 -5
- package/src/foundations/Skeleton/types.ts +0 -6
- package/src/foundations/Switch/index.tsx +0 -68
- package/src/foundations/Switch/styles.ts +0 -25
- package/src/foundations/Switch/types.ts +0 -19
- package/src/foundations/Tag/index.tsx +0 -128
- package/src/foundations/Tag/types.ts +0 -41
- package/src/foundations/Text/index.tsx +0 -241
- package/src/foundations/Text/styles.ts +0 -78
- package/src/foundations/Text/types.ts +0 -53
- package/src/foundations/Text/utils.ts +0 -63
- package/src/foundations/Title/index.tsx +0 -285
- package/src/foundations/Title/styles.ts +0 -55
- package/src/foundations/Title/types.ts +0 -21
- package/src/foundations/index.ts +0 -50
- package/src/foundations/package.json +0 -35
- package/src/foundations/publish.sh +0 -17
- package/src/libs/AutoComplete/index.tsx +0 -88
- package/src/libs/AutoComplete/package.json +0 -16
- package/src/libs/AutoComplete/publish.sh +0 -16
- package/src/libs/AutoComplete/styles.ts +0 -15
- package/src/libs/AutoComplete/types.ts +0 -60
- package/src/libs/Avatar/index.tsx +0 -146
- package/src/libs/Avatar/package.json +0 -16
- package/src/libs/Avatar/publish.sh +0 -20
- package/src/libs/Avatar/styles.ts +0 -18
- package/src/libs/Avatar/types.ts +0 -57
- package/src/libs/Badge/Badge.tsx +0 -70
- package/src/libs/Badge/BadgeDot.tsx +0 -11
- package/src/libs/Badge/BadgeRibbon.tsx +0 -122
- package/src/libs/Badge/Shape.tsx +0 -29
- package/src/libs/Badge/index.tsx +0 -7
- package/src/libs/Badge/package.json +0 -16
- package/src/libs/Badge/publish.sh +0 -18
- package/src/libs/Badge/styles.ts +0 -55
- package/src/libs/Badge/types.ts +0 -63
- package/src/libs/Calendar/CalendarPro.tsx +0 -307
- package/src/libs/Calendar/Day.tsx +0 -150
- package/src/libs/Calendar/HeaderControl.tsx +0 -55
- package/src/libs/Calendar/LunarDateConverter.ts +0 -228
- package/src/libs/Calendar/LunarService.ts +0 -206
- package/src/libs/Calendar/Month.tsx +0 -118
- package/src/libs/Calendar/MonthList.tsx +0 -226
- package/src/libs/Calendar/TabHeader.tsx +0 -91
- package/src/libs/Calendar/Util.ts +0 -288
- package/src/libs/Calendar/holidayData.ts +0 -118
- package/src/libs/Calendar/index.tsx +0 -383
- package/src/libs/Calendar/package.json +0 -18
- package/src/libs/Calendar/publish.sh +0 -18
- package/src/libs/Calendar/styles.ts +0 -122
- package/src/libs/Calendar/types.ts +0 -212
- package/src/libs/Carousel/animation.ts +0 -62
- package/src/libs/Carousel/index.tsx +0 -517
- package/src/libs/Carousel/package.json +0 -18
- package/src/libs/Carousel/publish.sh +0 -16
- package/src/libs/Carousel/types.ts +0 -71
- package/src/libs/Chip/index.tsx +0 -164
- package/src/libs/Chip/package.json +0 -16
- package/src/libs/Chip/publish.sh +0 -16
- package/src/libs/Chip/styles.ts +0 -20
- package/src/libs/Chip/types.ts +0 -72
- package/src/libs/Collapse/index.tsx +0 -305
- package/src/libs/Collapse/package.json +0 -16
- package/src/libs/Collapse/publish.sh +0 -18
- package/src/libs/Collapse/styles.ts +0 -37
- package/src/libs/Collapse/types.ts +0 -84
- package/src/libs/DateTimePicker/WheelPicker.tsx +0 -163
- package/src/libs/DateTimePicker/WheelPickerItem.tsx +0 -58
- package/src/libs/DateTimePicker/index.tsx +0 -188
- package/src/libs/DateTimePicker/package.json +0 -16
- package/src/libs/DateTimePicker/publish.sh +0 -17
- package/src/libs/DateTimePicker/styles.ts +0 -31
- package/src/libs/DateTimePicker/types.ts +0 -102
- package/src/libs/DateTimePicker/utils.ts +0 -114
- package/src/libs/Information/index.tsx +0 -129
- package/src/libs/Information/package.json +0 -16
- package/src/libs/Information/publish.sh +0 -18
- package/src/libs/Information/styles.ts +0 -34
- package/src/libs/Information/types.ts +0 -79
- package/src/libs/Logo/index.tsx +0 -39
- package/src/libs/Logo/package.json +0 -17
- package/src/libs/Logo/publish.sh +0 -16
- package/src/libs/Logo/styles.ts +0 -25
- package/src/libs/Logo/types.ts +0 -13
- package/src/libs/ProgressInfo/ProgressInfoHorizontal.tsx +0 -128
- package/src/libs/ProgressInfo/ProgressInfoIcon.tsx +0 -88
- package/src/libs/ProgressInfo/ProgressInfoVertical.tsx +0 -85
- package/src/libs/ProgressInfo/index.tsx +0 -22
- package/src/libs/ProgressInfo/package.json +0 -16
- package/src/libs/ProgressInfo/publish.sh +0 -16
- package/src/libs/ProgressInfo/styles.ts +0 -46
- package/src/libs/ProgressInfo/types.ts +0 -60
- package/src/libs/ProgressInfo/yarn.lock +0 -8
- package/src/libs/Rating/index.tsx +0 -74
- package/src/libs/Rating/package.json +0 -16
- package/src/libs/Rating/publish.sh +0 -18
- package/src/libs/Rating/type.ts +0 -25
- package/src/libs/Slider/Label.tsx +0 -33
- package/src/libs/Slider/helpers.ts +0 -35
- package/src/libs/Slider/hooks.tsx +0 -218
- package/src/libs/Slider/index.tsx +0 -453
- package/src/libs/Slider/package.json +0 -16
- package/src/libs/Slider/publish.sh +0 -18
- package/src/libs/Slider/styles.ts +0 -36
- package/src/libs/Stepper/NumberView.tsx +0 -64
- package/src/libs/Stepper/StepperButton.tsx +0 -37
- package/src/libs/Stepper/index.tsx +0 -139
- package/src/libs/Stepper/package.json +0 -16
- package/src/libs/Stepper/publish.sh +0 -17
- package/src/libs/Stepper/styles.ts +0 -44
- package/src/libs/Stepper/types.ts +0 -154
- package/src/libs/Steps/StepIcon.tsx +0 -86
- package/src/libs/Steps/StepsHorizontal.tsx +0 -189
- package/src/libs/Steps/StepsVertical.tsx +0 -133
- package/src/libs/Steps/index.tsx +0 -20
- package/src/libs/Steps/package.json +0 -16
- package/src/libs/Steps/publish.sh +0 -16
- package/src/libs/Steps/styles.ts +0 -46
- package/src/libs/Steps/types.ts +0 -159
- package/src/libs/Steps/utils.ts +0 -175
- package/src/libs/SuggestAction/SuggestActionView.tsx +0 -124
- package/src/libs/SuggestAction/index.tsx +0 -3
- package/src/libs/SuggestAction/package.json +0 -16
- package/src/libs/SuggestAction/publish.sh +0 -16
- package/src/libs/SuggestAction/styles.ts +0 -30
- package/src/libs/SuggestAction/types.ts +0 -36
- package/src/libs/Swipe/SwipeView.tsx +0 -151
- package/src/libs/Swipe/index.tsx +0 -5
- package/src/libs/Swipe/package.json +0 -16
- package/src/libs/Swipe/publish.sh +0 -16
- package/src/libs/Swipe/styles.ts +0 -16
- package/src/libs/Swipe/types.ts +0 -109
- package/src/libs/TabView/assets/Path.tsx +0 -29
- package/src/libs/TabView/index.tsx +0 -184
- package/src/libs/TabView/package.json +0 -16
- package/src/libs/TabView/publish.sh +0 -16
- package/src/libs/TabView/styles.ts +0 -96
- package/src/libs/TabView/tabBar/CardTabBar.tsx +0 -137
- package/src/libs/TabView/tabBar/SrollableTabBar.tsx +0 -218
- package/src/libs/TabView/tabBar/TabBar.tsx +0 -67
- package/src/libs/TabView/tabItem/CardTabItem.tsx +0 -118
- package/src/libs/TabView/tabItem/TabItem.tsx +0 -180
- package/src/libs/TabView/types.ts +0 -166
- package/src/libs/Template/HeaderSliderBanner/index.tsx +0 -86
- package/src/libs/Template/HeaderSliderBanner/types.ts +0 -16
- package/src/libs/Template/TrustBanner/CustomAvatar.tsx +0 -39
- package/src/libs/Template/TrustBanner/index.tsx +0 -161
- package/src/libs/Template/TrustBanner/styles.ts +0 -48
- package/src/libs/Template/TrustBanner/types.ts +0 -50
- package/src/libs/Template/index.tsx +0 -4
- package/src/libs/Template/package.json +0 -18
- package/src/libs/Template/publish.sh +0 -17
- package/src/libs/Title/index.tsx +0 -284
- package/src/libs/Title/package.json +0 -17
- package/src/libs/Title/publish.sh +0 -16
- package/src/libs/Title/styles.ts +0 -54
- package/src/libs/Title/types.ts +0 -21
- package/src/libs/Tooltip/TooltipButtons.tsx +0 -54
- package/src/libs/Tooltip/index.tsx +0 -608
- package/src/libs/Tooltip/package.json +0 -16
- package/src/libs/Tooltip/publish.sh +0 -18
- package/src/libs/Tooltip/styles.ts +0 -70
- package/src/libs/Tooltip/types.ts +0 -61
- package/src/libs/Uploader/index.tsx +0 -87
- package/src/libs/Uploader/package.json +0 -17
- package/src/libs/Uploader/publish.sh +0 -18
- package/src/libs/Uploader/styles.ts +0 -30
- package/src/libs/Uploader/types.ts +0 -69
- package/src/native/MoMoNative.podspec +0 -18
- package/src/native/calculator/android/build.gradle +0 -61
- package/src/native/calculator/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/src/native/calculator/android/gradle/wrapper/gradle-wrapper.properties +0 -6
- package/src/native/calculator/android/gradlew +0 -172
- package/src/native/calculator/android/gradlew.bat +0 -84
- package/src/native/calculator/android/src/main/AndroidManifest.xml +0 -5
- package/src/native/calculator/android/src/main/java/com/calculator/KeyboardViewModule.java +0 -22
- package/src/native/calculator/android/src/main/java/com/calculator/KeyboardViewPackage.java +0 -35
- package/src/native/calculator/android/src/main/java/com/calculator/modules/CalculatorKeyboardModule.java +0 -157
- package/src/native/calculator/android/src/main/java/com/calculator/views/calculatorkeyboard/CalculatorEditText.java +0 -36
- package/src/native/calculator/android/src/main/java/com/calculator/views/calculatorkeyboard/FixedRelativeLayout.java +0 -45
- package/src/native/calculator/android/src/main/java/com/calculator/views/calculatorkeyboard/MomoTextInputCalculatorManager.java +0 -173
- package/src/native/calculator/android/src/main/java/com/calculator/views/customkeyboard/RNCustomKeyboardModule.java +0 -417
- package/src/native/calculator/ios/Helper/MomoHelper.swift +0 -16
- package/src/native/calculator/ios/KeyboardView-Bridging-Header.h +0 -60
- package/src/native/calculator/ios/KeyboardView.h +0 -19
- package/src/native/calculator/ios/KeyboardView.m +0 -56
- package/src/native/calculator/ios/MomoTextInputCalculator.swift +0 -144
- package/src/native/calculator/ios/RNCustomKeyboard/RNCustomKeyboard.h +0 -6
- package/src/native/calculator/ios/RNCustomKeyboard/RNCustomKeyboard.m +0 -143
- package/src/native/package.json +0 -14
- package/src/native/publish.sh +0 -29
- package/src/native/resource/android/build.gradle +0 -57
- package/src/native/resource/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/src/native/resource/android/gradle/wrapper/gradle-wrapper.properties +0 -6
- package/src/native/resource/android/src/main/AndroidManifest.xml +0 -6
- package/src/native/resource/android/src/main/java/com/resource/RNResourceModule.java +0 -90
- package/src/native/resource/android/src/main/java/com/resource/RNResourcePackage.java +0 -22
- package/src/native/resource/ios/RNResouce.m +0 -71
- package/src/native/resource/ios/RNResource.h +0 -5
|
@@ -1,239 +0,0 @@
|
|
|
1
|
-
package vn.momo.kits.navigation
|
|
2
|
-
|
|
3
|
-
import androidx.compose.animation.core.Animatable
|
|
4
|
-
import androidx.compose.animation.core.CubicBezierEasing
|
|
5
|
-
import androidx.compose.animation.core.tween
|
|
6
|
-
import androidx.compose.foundation.background
|
|
7
|
-
import androidx.compose.foundation.border
|
|
8
|
-
import androidx.compose.foundation.gestures.detectDragGestures
|
|
9
|
-
import androidx.compose.foundation.layout.Box
|
|
10
|
-
import androidx.compose.foundation.layout.BoxWithConstraints
|
|
11
|
-
import androidx.compose.foundation.layout.Column
|
|
12
|
-
import androidx.compose.foundation.layout.Row
|
|
13
|
-
import androidx.compose.foundation.layout.Spacer
|
|
14
|
-
import androidx.compose.foundation.layout.fillMaxHeight
|
|
15
|
-
import androidx.compose.foundation.layout.fillMaxSize
|
|
16
|
-
import androidx.compose.foundation.layout.fillMaxWidth
|
|
17
|
-
import androidx.compose.foundation.layout.height
|
|
18
|
-
import androidx.compose.foundation.layout.heightIn
|
|
19
|
-
import androidx.compose.foundation.layout.offset
|
|
20
|
-
import androidx.compose.foundation.layout.padding
|
|
21
|
-
import androidx.compose.foundation.layout.size
|
|
22
|
-
import androidx.compose.foundation.layout.width
|
|
23
|
-
import androidx.compose.foundation.shape.RoundedCornerShape
|
|
24
|
-
import androidx.compose.runtime.Composable
|
|
25
|
-
import androidx.compose.runtime.DisposableEffect
|
|
26
|
-
import androidx.compose.runtime.LaunchedEffect
|
|
27
|
-
import androidx.compose.runtime.remember
|
|
28
|
-
import androidx.compose.runtime.rememberCoroutineScope
|
|
29
|
-
import androidx.compose.ui.Alignment
|
|
30
|
-
import androidx.compose.ui.Modifier
|
|
31
|
-
import androidx.compose.ui.graphics.Color
|
|
32
|
-
import androidx.compose.ui.input.pointer.pointerInput
|
|
33
|
-
import androidx.compose.ui.platform.LocalDensity
|
|
34
|
-
import androidx.compose.ui.unit.IntOffset
|
|
35
|
-
import androidx.compose.ui.unit.dp
|
|
36
|
-
import kotlinx.coroutines.launch
|
|
37
|
-
import vn.momo.kits.components.Divider
|
|
38
|
-
import vn.momo.kits.components.Icon
|
|
39
|
-
import vn.momo.kits.components.Text
|
|
40
|
-
import vn.momo.kits.const.AppTheme
|
|
41
|
-
import vn.momo.kits.const.Colors
|
|
42
|
-
import vn.momo.kits.const.Radius
|
|
43
|
-
import vn.momo.kits.const.Spacing
|
|
44
|
-
import vn.momo.kits.application.IsShowBaseLineDebug
|
|
45
|
-
import vn.momo.kits.const.Typography
|
|
46
|
-
import vn.momo.kits.modifier.conditional
|
|
47
|
-
import vn.momo.kits.modifier.noFeedbackClickable
|
|
48
|
-
import vn.momo.kits.platform.BackHandler
|
|
49
|
-
import vn.momo.kits.platform.getScreenHeight
|
|
50
|
-
|
|
51
|
-
@Composable
|
|
52
|
-
internal fun BottomSheet(
|
|
53
|
-
content: @Composable () -> Unit,
|
|
54
|
-
header: BottomHeader,
|
|
55
|
-
isSurface: Boolean = false,
|
|
56
|
-
barrierDismissible: Boolean = true,
|
|
57
|
-
onDismiss: (() -> Unit)?
|
|
58
|
-
) {
|
|
59
|
-
val navigator = LocalNavigator.current
|
|
60
|
-
|
|
61
|
-
val screenHeightDp = getScreenHeight()
|
|
62
|
-
val screenHeightPx = with(LocalDensity.current) { screenHeightDp.toPx() }
|
|
63
|
-
val sheetOffset = remember { Animatable(screenHeightPx) }
|
|
64
|
-
|
|
65
|
-
val backgroundAlpha = remember { Animatable(0f) }
|
|
66
|
-
val dynamicAlpha = ((1f - (sheetOffset.value / screenHeightPx)).coerceIn(0f, 1f)) * 0.3f
|
|
67
|
-
val alpha = backgroundAlpha.value + dynamicAlpha
|
|
68
|
-
|
|
69
|
-
val sheetCloseOffset = with(LocalDensity.current) { 100.dp.toPx() }
|
|
70
|
-
|
|
71
|
-
val coroutineScope = rememberCoroutineScope()
|
|
72
|
-
|
|
73
|
-
suspend fun openEvent(){
|
|
74
|
-
backgroundAlpha.animateTo(
|
|
75
|
-
targetValue = 0.3f,
|
|
76
|
-
animationSpec = tween(
|
|
77
|
-
durationMillis = 100,
|
|
78
|
-
easing = CubicBezierEasing(0.05f, 0.7f, 0.1f, 1f)
|
|
79
|
-
)
|
|
80
|
-
)
|
|
81
|
-
sheetOffset.animateTo(
|
|
82
|
-
targetValue = 0f,
|
|
83
|
-
animationSpec = tween(
|
|
84
|
-
durationMillis = 350,
|
|
85
|
-
easing = CubicBezierEasing(0.05f, 0.7f, 0.1f, 1f)
|
|
86
|
-
)
|
|
87
|
-
)
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
fun closeEvent(){
|
|
91
|
-
coroutineScope.launch {
|
|
92
|
-
sheetOffset.animateTo(
|
|
93
|
-
targetValue = screenHeightPx,
|
|
94
|
-
animationSpec = tween(
|
|
95
|
-
durationMillis = 200,
|
|
96
|
-
easing = CubicBezierEasing(0.3f, 0.0f, 0.8f, 0.15f)
|
|
97
|
-
)
|
|
98
|
-
)
|
|
99
|
-
backgroundAlpha.animateTo(
|
|
100
|
-
targetValue = 0f,
|
|
101
|
-
animationSpec = tween(
|
|
102
|
-
durationMillis = 100,
|
|
103
|
-
easing = CubicBezierEasing(0.3f, 0.0f, 0.8f, 0.15f)
|
|
104
|
-
)
|
|
105
|
-
)
|
|
106
|
-
navigator.pop()
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
LaunchedEffect(Unit) {
|
|
111
|
-
openEvent()
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
DisposableEffect(Unit) {
|
|
115
|
-
OverplayComponentRegistry.bindClose { closeEvent() }
|
|
116
|
-
onDispose {
|
|
117
|
-
onDismiss?.invoke()
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
BackHandler(true){
|
|
122
|
-
closeEvent()
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
BoxWithConstraints(
|
|
126
|
-
modifier = Modifier
|
|
127
|
-
.fillMaxSize()
|
|
128
|
-
.background(Color.Black.copy(alpha = alpha))
|
|
129
|
-
.noFeedbackClickable {
|
|
130
|
-
if(barrierDismissible) closeEvent()
|
|
131
|
-
}
|
|
132
|
-
) {
|
|
133
|
-
val parentHeight = with(LocalDensity.current) { constraints.maxHeight.toDp() }
|
|
134
|
-
|
|
135
|
-
Box(
|
|
136
|
-
modifier = Modifier
|
|
137
|
-
.align(Alignment.BottomCenter)
|
|
138
|
-
.offset { IntOffset(x = 0, y = sheetOffset.value.toInt()) }
|
|
139
|
-
.fillMaxWidth()
|
|
140
|
-
.heightIn(max = parentHeight - 90.dp)
|
|
141
|
-
.background(
|
|
142
|
-
color = if (isSurface) AppTheme.current.colors.background.surface else AppTheme.current.colors.background.default,
|
|
143
|
-
shape = RoundedCornerShape(topStart = Radius.M, topEnd = Radius.M)
|
|
144
|
-
)
|
|
145
|
-
.conditional(IsShowBaseLineDebug) {
|
|
146
|
-
border(1.dp, Colors.blue_03)
|
|
147
|
-
}
|
|
148
|
-
.noFeedbackClickable { },
|
|
149
|
-
contentAlignment = Alignment.BottomCenter
|
|
150
|
-
) {
|
|
151
|
-
Column {
|
|
152
|
-
Box(
|
|
153
|
-
modifier = Modifier
|
|
154
|
-
.height(72.dp)
|
|
155
|
-
.fillMaxWidth()
|
|
156
|
-
.pointerInput(Unit) {
|
|
157
|
-
detectDragGestures(
|
|
158
|
-
onDrag = { change, dragAmount ->
|
|
159
|
-
change.consume()
|
|
160
|
-
coroutineScope.launch {
|
|
161
|
-
val newOffset = (sheetOffset.value + dragAmount.y).coerceAtLeast(0f)
|
|
162
|
-
sheetOffset.snapTo(newOffset)
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
onDragEnd = {
|
|
166
|
-
coroutineScope.launch {
|
|
167
|
-
if (sheetOffset.value > sheetCloseOffset) {
|
|
168
|
-
closeEvent()
|
|
169
|
-
} else {
|
|
170
|
-
sheetOffset.animateTo(0f)
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
)
|
|
175
|
-
}
|
|
176
|
-
) {
|
|
177
|
-
Column(
|
|
178
|
-
modifier = Modifier
|
|
179
|
-
.fillMaxSize()
|
|
180
|
-
.padding(horizontal = Spacing.M),
|
|
181
|
-
horizontalAlignment = Alignment.CenterHorizontally
|
|
182
|
-
) {
|
|
183
|
-
Spacer(Modifier.height(8.dp))
|
|
184
|
-
Box(
|
|
185
|
-
modifier = Modifier
|
|
186
|
-
.height(4.dp)
|
|
187
|
-
.width(40.dp)
|
|
188
|
-
.background(
|
|
189
|
-
color = Colors.black_06,
|
|
190
|
-
shape = RoundedCornerShape(Radius.S)
|
|
191
|
-
)
|
|
192
|
-
)
|
|
193
|
-
Spacer(Modifier.height(4.dp))
|
|
194
|
-
Box(Modifier.fillMaxWidth().height(56.dp), contentAlignment = Alignment.Center){
|
|
195
|
-
when (header) {
|
|
196
|
-
is BottomHeader.Title -> {
|
|
197
|
-
Row(modifier = Modifier.fillMaxSize(), verticalAlignment = Alignment.CenterVertically) {
|
|
198
|
-
Box(Modifier.size(24.dp))
|
|
199
|
-
Box(Modifier.fillMaxHeight().weight(1f), contentAlignment = Alignment.Center){
|
|
200
|
-
Text(
|
|
201
|
-
text = header.data,
|
|
202
|
-
color = Colors.black_17,
|
|
203
|
-
style = Typography.headerDefaultBold
|
|
204
|
-
)
|
|
205
|
-
}
|
|
206
|
-
Box(Modifier
|
|
207
|
-
.size(24.dp)
|
|
208
|
-
.noFeedbackClickable {
|
|
209
|
-
closeEvent()
|
|
210
|
-
},
|
|
211
|
-
contentAlignment = Alignment.Center
|
|
212
|
-
){
|
|
213
|
-
Icon(source = "navigation_close")
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
is BottomHeader.Custom -> {
|
|
218
|
-
header.content()
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
Divider()
|
|
225
|
-
content()
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
sealed class BottomHeader {
|
|
232
|
-
data class Title(
|
|
233
|
-
val data: String = "Bottom Sheet Title",
|
|
234
|
-
) : BottomHeader()
|
|
235
|
-
|
|
236
|
-
data class Custom(
|
|
237
|
-
val content: @Composable () -> Unit
|
|
238
|
-
) : BottomHeader()
|
|
239
|
-
}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
package vn.momo.kits.navigation
|
|
2
|
-
|
|
3
|
-
import androidx.compose.animation.core.Animatable
|
|
4
|
-
import androidx.compose.animation.core.CubicBezierEasing
|
|
5
|
-
import androidx.compose.animation.core.tween
|
|
6
|
-
import androidx.compose.foundation.background
|
|
7
|
-
import androidx.compose.foundation.border
|
|
8
|
-
import androidx.compose.foundation.clickable
|
|
9
|
-
import androidx.compose.foundation.interaction.MutableInteractionSource
|
|
10
|
-
import androidx.compose.foundation.layout.Box
|
|
11
|
-
import androidx.compose.foundation.layout.fillMaxSize
|
|
12
|
-
import androidx.compose.foundation.layout.wrapContentSize
|
|
13
|
-
import androidx.compose.runtime.Composable
|
|
14
|
-
import androidx.compose.runtime.DisposableEffect
|
|
15
|
-
import androidx.compose.runtime.LaunchedEffect
|
|
16
|
-
import androidx.compose.runtime.remember
|
|
17
|
-
import androidx.compose.runtime.rememberCoroutineScope
|
|
18
|
-
import androidx.compose.ui.Alignment
|
|
19
|
-
import androidx.compose.ui.Modifier
|
|
20
|
-
import androidx.compose.ui.draw.alpha
|
|
21
|
-
import androidx.compose.ui.draw.scale
|
|
22
|
-
import androidx.compose.ui.graphics.Color
|
|
23
|
-
import androidx.compose.ui.unit.dp
|
|
24
|
-
import kotlinx.coroutines.launch
|
|
25
|
-
import vn.momo.kits.application.IsShowBaseLineDebug
|
|
26
|
-
import vn.momo.kits.const.Colors
|
|
27
|
-
import vn.momo.kits.modifier.conditional
|
|
28
|
-
import vn.momo.kits.modifier.noFeedbackClickable
|
|
29
|
-
import vn.momo.kits.platform.BackHandler
|
|
30
|
-
|
|
31
|
-
@Composable
|
|
32
|
-
internal fun ModalScreen(
|
|
33
|
-
content: @Composable () -> Unit,
|
|
34
|
-
barrierDismissible: Boolean = true,
|
|
35
|
-
onDismiss: (() -> Unit)? = null
|
|
36
|
-
) {
|
|
37
|
-
val navigator = LocalNavigator.current
|
|
38
|
-
|
|
39
|
-
val alpha = remember { Animatable(0f) }
|
|
40
|
-
val scale = remember { Animatable(0.8f) }
|
|
41
|
-
|
|
42
|
-
val coroutineScope = rememberCoroutineScope()
|
|
43
|
-
|
|
44
|
-
fun openEvent() {
|
|
45
|
-
coroutineScope.launch {
|
|
46
|
-
launch {
|
|
47
|
-
alpha.animateTo(
|
|
48
|
-
targetValue = 1f,
|
|
49
|
-
animationSpec = tween(durationMillis = 250)
|
|
50
|
-
)
|
|
51
|
-
}
|
|
52
|
-
launch {
|
|
53
|
-
scale.animateTo(
|
|
54
|
-
targetValue = 1f,
|
|
55
|
-
animationSpec = tween(
|
|
56
|
-
durationMillis = 250,
|
|
57
|
-
easing = CubicBezierEasing(0.2f, 0.0f, 0f, 1f)
|
|
58
|
-
)
|
|
59
|
-
)
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
fun closeEvent() {
|
|
65
|
-
coroutineScope.launch {
|
|
66
|
-
alpha.animateTo(
|
|
67
|
-
targetValue = 0f,
|
|
68
|
-
animationSpec = tween(durationMillis = 200)
|
|
69
|
-
)
|
|
70
|
-
scale.animateTo(
|
|
71
|
-
targetValue = 0.8f,
|
|
72
|
-
animationSpec = tween(durationMillis = 200)
|
|
73
|
-
)
|
|
74
|
-
navigator.pop()
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
LaunchedEffect(Unit) {
|
|
79
|
-
openEvent()
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
DisposableEffect(Unit) {
|
|
83
|
-
OverplayComponentRegistry.bindClose { closeEvent() }
|
|
84
|
-
onDispose {
|
|
85
|
-
onDismiss?.invoke()
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
BackHandler(enabled = true) {
|
|
90
|
-
closeEvent()
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
Box(
|
|
94
|
-
modifier = Modifier
|
|
95
|
-
.fillMaxSize()
|
|
96
|
-
.background(Color.Black.copy(alpha = 0.6f * alpha.value))
|
|
97
|
-
.noFeedbackClickable {
|
|
98
|
-
if(barrierDismissible) closeEvent()
|
|
99
|
-
},
|
|
100
|
-
contentAlignment = Alignment.Center
|
|
101
|
-
) {
|
|
102
|
-
Box(
|
|
103
|
-
modifier = Modifier
|
|
104
|
-
.scale(scale.value)
|
|
105
|
-
.alpha(alpha.value)
|
|
106
|
-
.wrapContentSize()
|
|
107
|
-
.conditional(IsShowBaseLineDebug) {
|
|
108
|
-
border(1.dp, Colors.blue_03)
|
|
109
|
-
}
|
|
110
|
-
.clickable(
|
|
111
|
-
indication = null,
|
|
112
|
-
interactionSource = remember { MutableInteractionSource() }
|
|
113
|
-
) {},
|
|
114
|
-
contentAlignment = Alignment.Center
|
|
115
|
-
) {
|
|
116
|
-
content()
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
package vn.momo.kits.navigation
|
|
2
|
-
|
|
3
|
-
import androidx.compose.foundation.gestures.ScrollableState
|
|
4
|
-
import androidx.compose.runtime.Composable
|
|
5
|
-
import androidx.compose.runtime.Stable
|
|
6
|
-
import androidx.compose.runtime.State
|
|
7
|
-
import androidx.compose.runtime.mutableStateOf
|
|
8
|
-
import androidx.compose.runtime.staticCompositionLocalOf
|
|
9
|
-
import androidx.compose.ui.graphics.Color
|
|
10
|
-
import vn.momo.kits.navigation.bottomtab.setBottomTabOption
|
|
11
|
-
import vn.momo.kits.navigation.component.FloatingButtonProps
|
|
12
|
-
import vn.momo.kits.navigation.component.HeaderBackProps
|
|
13
|
-
import vn.momo.kits.navigation.component.HeaderRight
|
|
14
|
-
import vn.momo.kits.navigation.component.HeaderTitle
|
|
15
|
-
import vn.momo.kits.navigation.component.HeaderType
|
|
16
|
-
|
|
17
|
-
class Navigation(
|
|
18
|
-
val id: Int = -1,
|
|
19
|
-
val bottomTabIndex: Int = -1,
|
|
20
|
-
val initOptions: NavigationOptions? = null
|
|
21
|
-
) {
|
|
22
|
-
private val _options = mutableStateOf(initOptions ?: NavigationOptions())
|
|
23
|
-
val currentOptions: State<NavigationOptions> get() = _options
|
|
24
|
-
val options: NavigationOptions get() = _options.value
|
|
25
|
-
|
|
26
|
-
fun setOptions(
|
|
27
|
-
onBackHandler: (() -> Unit)? = null,
|
|
28
|
-
hiddenBack: Boolean? = null,
|
|
29
|
-
headerBackProps: HeaderBackProps? = null,
|
|
30
|
-
headerTitle: HeaderTitle? = null,
|
|
31
|
-
headerRight: HeaderRight? = null,
|
|
32
|
-
headerType: HeaderType? = null,
|
|
33
|
-
scrollData: ScrollData? = null,
|
|
34
|
-
backgroundColor: Color? = null,
|
|
35
|
-
tintColor: Color? = null,
|
|
36
|
-
footerComponent: (@Composable () -> Unit)? = null,
|
|
37
|
-
floatingButtonProps: FloatingButtonProps? = null,
|
|
38
|
-
keyboardOptions: KeyboardOptions? = null
|
|
39
|
-
) {
|
|
40
|
-
updateOptions(
|
|
41
|
-
options.copy(
|
|
42
|
-
onBackHandler = onBackHandler ?: options.onBackHandler,
|
|
43
|
-
hiddenBack = hiddenBack ?: options.hiddenBack,
|
|
44
|
-
headerBackProps = headerBackProps ?: options.headerBackProps,
|
|
45
|
-
headerTitle = headerTitle ?: options.headerTitle,
|
|
46
|
-
headerRight = headerRight ?: options.headerRight,
|
|
47
|
-
headerType = headerType ?: options.headerType,
|
|
48
|
-
scrollData = scrollData ?: options.scrollData,
|
|
49
|
-
backgroundColor = backgroundColor ?: options.backgroundColor,
|
|
50
|
-
tintColor = tintColor ?: options.tintColor,
|
|
51
|
-
footerComponent = footerComponent ?: options.footerComponent,
|
|
52
|
-
floatingButtonProps = floatingButtonProps ?: options.floatingButtonProps,
|
|
53
|
-
keyboardOptions = keyboardOptions ?: options.keyboardOptions,
|
|
54
|
-
)
|
|
55
|
-
)
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
fun setOptions(newOptions: NavigationOptions) {
|
|
59
|
-
updateOptions(newOptions)
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
private fun updateOptions(updated: NavigationOptions) {
|
|
63
|
-
_options.value = updated
|
|
64
|
-
if (bottomTabIndex != -1) setBottomTabOption(bottomTabIndex, updated)
|
|
65
|
-
if (id != -1) DynamicScreenRegistry.setOptions(id, updated)
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
val LocalNavigation = staticCompositionLocalOf<Navigation> {
|
|
70
|
-
error("No NavigationStack provided")
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
@Stable
|
|
74
|
-
data class NavigationOptions(
|
|
75
|
-
val onBackHandler: (() -> Unit)? = null,
|
|
76
|
-
val hiddenBack: Boolean = false,
|
|
77
|
-
val headerBackProps: HeaderBackProps = HeaderBackProps(),
|
|
78
|
-
val headerTitle: HeaderTitle = HeaderTitle.Default("Stack"),
|
|
79
|
-
val headerRight: HeaderRight = HeaderRight.Toolkit(),
|
|
80
|
-
val headerType: HeaderType = HeaderType.Default(),
|
|
81
|
-
val scrollData: ScrollData = ScrollData(),
|
|
82
|
-
val backgroundColor: Color? = null,
|
|
83
|
-
val tintColor: Color? = null,
|
|
84
|
-
val footerComponent: @Composable (() -> Unit)? = null,
|
|
85
|
-
val floatingButtonProps: FloatingButtonProps? = null,
|
|
86
|
-
val keyboardOptions: KeyboardOptions = KeyboardOptions()
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
data class KeyboardOptions(
|
|
90
|
-
val keyboardShouldPersistTaps: Boolean = false,
|
|
91
|
-
val useAvoidKeyboard: Boolean = true
|
|
92
|
-
)
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
data class ScrollData(
|
|
96
|
-
val scrollable: Boolean = true,
|
|
97
|
-
val scrollState: ScrollableState? = null,
|
|
98
|
-
)
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
package vn.momo.kits.navigation
|
|
2
|
-
|
|
3
|
-
import androidx.compose.animation.core.tween
|
|
4
|
-
import androidx.compose.animation.fadeIn
|
|
5
|
-
import androidx.compose.animation.slideInHorizontally
|
|
6
|
-
import androidx.compose.animation.slideInVertically
|
|
7
|
-
import androidx.compose.animation.slideOutHorizontally
|
|
8
|
-
import androidx.compose.animation.slideOutVertically
|
|
9
|
-
import androidx.compose.foundation.layout.WindowInsets
|
|
10
|
-
import androidx.compose.foundation.layout.asPaddingValues
|
|
11
|
-
import androidx.compose.foundation.layout.systemBars
|
|
12
|
-
import androidx.compose.runtime.Composable
|
|
13
|
-
import androidx.compose.runtime.CompositionLocalProvider
|
|
14
|
-
import androidx.compose.runtime.DisposableEffect
|
|
15
|
-
import androidx.compose.runtime.LaunchedEffect
|
|
16
|
-
import androidx.compose.runtime.mutableStateOf
|
|
17
|
-
import androidx.compose.runtime.remember
|
|
18
|
-
import androidx.compose.runtime.staticCompositionLocalOf
|
|
19
|
-
import androidx.compose.ui.unit.Dp
|
|
20
|
-
import androidx.compose.ui.unit.dp
|
|
21
|
-
import androidx.navigation.compose.NavHost
|
|
22
|
-
import androidx.navigation.compose.composable
|
|
23
|
-
import androidx.navigation.compose.rememberNavController
|
|
24
|
-
import androidx.navigation.toRoute
|
|
25
|
-
import vn.momo.kits.application.AppConfig
|
|
26
|
-
import vn.momo.kits.application.AppLanguage
|
|
27
|
-
import vn.momo.kits.application.ApplicationContext
|
|
28
|
-
import vn.momo.kits.application.KitConfig
|
|
29
|
-
import vn.momo.kits.application.MiniAppContext
|
|
30
|
-
import vn.momo.kits.const.AppNavigationBar
|
|
31
|
-
import vn.momo.kits.const.AppStatusBar
|
|
32
|
-
import vn.momo.kits.const.AppTheme
|
|
33
|
-
import vn.momo.kits.const.Theme
|
|
34
|
-
import vn.momo.kits.const.ThemeAssets
|
|
35
|
-
import vn.momo.kits.const.defaultTheme
|
|
36
|
-
import vn.momo.kits.utils.getAppStatusBarHeight
|
|
37
|
-
import vn.momo.maxapi.IMaxApi
|
|
38
|
-
|
|
39
|
-
@Composable
|
|
40
|
-
fun NavigationContainer(
|
|
41
|
-
initialScreen: @Composable () -> Unit,
|
|
42
|
-
options: NavigationOptions? = null,
|
|
43
|
-
initialTheme: Theme = defaultTheme,
|
|
44
|
-
applicationContext: MiniAppContext? = null,
|
|
45
|
-
maxApi: IMaxApi? = null,
|
|
46
|
-
setNavigator: ((Navigator) -> Unit)? = null,
|
|
47
|
-
statusBarHeight: Dp? = null,
|
|
48
|
-
config: KitConfig? = null,
|
|
49
|
-
language: String? = null
|
|
50
|
-
){
|
|
51
|
-
val navController = rememberNavController()
|
|
52
|
-
val navigator = remember { Navigator(navController = navController, maxApi = maxApi) }
|
|
53
|
-
val statusBarHeight = statusBarHeight ?: getAppStatusBarHeight()
|
|
54
|
-
val navigationBarHeight = if (AppNavigationBar.current == 0.dp) {
|
|
55
|
-
WindowInsets.systemBars.asPaddingValues().calculateBottomPadding()
|
|
56
|
-
} else {
|
|
57
|
-
AppNavigationBar.current
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
val parentContext = ApplicationContext.current
|
|
61
|
-
val mergedContext = MiniAppContext.merge(parentContext, applicationContext)
|
|
62
|
-
|
|
63
|
-
val theme = remember { mutableStateOf(initialTheme) }
|
|
64
|
-
|
|
65
|
-
LaunchedEffect(Unit) {
|
|
66
|
-
val headerBar = config?.headerBar
|
|
67
|
-
if (headerBar != null && theme.value.assets.headerBackground == null) {
|
|
68
|
-
theme.value = theme.value.copy(
|
|
69
|
-
assets = ThemeAssets(
|
|
70
|
-
headerBackground = headerBar
|
|
71
|
-
)
|
|
72
|
-
)
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
val startDestination = DynamicScreenRegistry.register(initialScreen, options)
|
|
77
|
-
|
|
78
|
-
CompositionLocalProvider(
|
|
79
|
-
LocalNavigator provides navigator,
|
|
80
|
-
LocalMaxApi provides maxApi,
|
|
81
|
-
AppTheme provides theme.value,
|
|
82
|
-
AppStatusBar provides statusBarHeight,
|
|
83
|
-
AppNavigationBar provides navigationBarHeight,
|
|
84
|
-
ApplicationContext provides mergedContext,
|
|
85
|
-
AppConfig provides config,
|
|
86
|
-
AppLanguage provides language,
|
|
87
|
-
) {
|
|
88
|
-
LaunchedEffect(Unit) {
|
|
89
|
-
setNavigator?.invoke(navigator)
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
NavHost(navController, startDestination = startDestination) {
|
|
93
|
-
composable<DynamicScreenRoute>(
|
|
94
|
-
enterTransition = {
|
|
95
|
-
slideInHorizontally(
|
|
96
|
-
animationSpec = tween(300),
|
|
97
|
-
initialOffsetX = { it }
|
|
98
|
-
)
|
|
99
|
-
},
|
|
100
|
-
exitTransition = null,
|
|
101
|
-
popEnterTransition = { fadeIn(animationSpec = tween(0)) },
|
|
102
|
-
popExitTransition = {
|
|
103
|
-
slideOutHorizontally(
|
|
104
|
-
animationSpec = tween(300),
|
|
105
|
-
targetOffsetX = { it }
|
|
106
|
-
)
|
|
107
|
-
}
|
|
108
|
-
) { backStackEntry ->
|
|
109
|
-
val route = backStackEntry.toRoute<DynamicScreenRoute>()
|
|
110
|
-
val screen = DynamicScreenRegistry.getScreen(route.id)
|
|
111
|
-
|
|
112
|
-
if (screen != null){
|
|
113
|
-
StackScreen(
|
|
114
|
-
id = route.id,
|
|
115
|
-
content = screen.content,
|
|
116
|
-
navigationOptions = screen.options
|
|
117
|
-
)
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
composable<DynamicDialogRoute>(
|
|
122
|
-
enterTransition = {
|
|
123
|
-
slideInVertically (
|
|
124
|
-
animationSpec = tween(300),
|
|
125
|
-
initialOffsetY = { it }
|
|
126
|
-
)
|
|
127
|
-
},
|
|
128
|
-
exitTransition = null,
|
|
129
|
-
popEnterTransition = { fadeIn(animationSpec = tween(0)) },
|
|
130
|
-
popExitTransition = {
|
|
131
|
-
slideOutVertically (
|
|
132
|
-
animationSpec = tween(300),
|
|
133
|
-
targetOffsetY = { it }
|
|
134
|
-
)
|
|
135
|
-
}
|
|
136
|
-
) { backStackEntry ->
|
|
137
|
-
val route = backStackEntry.toRoute<DynamicDialogRoute>()
|
|
138
|
-
val screen = DynamicScreenRegistry.getScreen(route.id)
|
|
139
|
-
|
|
140
|
-
if (screen != null){
|
|
141
|
-
StackScreen(
|
|
142
|
-
id = route.id,
|
|
143
|
-
content = screen.content,
|
|
144
|
-
navigationOptions = screen.options
|
|
145
|
-
)
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
DisposableEffect(Unit) {
|
|
152
|
-
onDispose {
|
|
153
|
-
navigator.dispose()
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
val LocalMaxApi = staticCompositionLocalOf<IMaxApi?> {
|
|
159
|
-
error("No MaxApi provided")
|
|
160
|
-
}
|
|
161
|
-
|