@momo-kits/native-kits 0.0.1-beta.5 → 0.0.2-alpha.1-debug
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/CLAUDE.md +99 -0
- package/PUBLISH_GUIDE.md +675 -0
- package/README.md +184 -5
- package/build.gradle.kts +11 -0
- package/compose/build.gradle.kts +189 -0
- package/compose/build.gradle.kts.backup +189 -0
- package/compose/compose.podspec +47 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/const/HostFont.android.kt +19 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/navigation/ScrollToTop.android.kt +6 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/BackGesture.android.kt +12 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/OsFontScale.android.kt +7 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +151 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/AnimationSearchInput.kt +52 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +124 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/FloatingButton.kt +183 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Header.kt +207 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderAnimated.kt +39 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderBackground.kt +86 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderDefault.kt +76 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderExtended.kt +76 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderRight.kt +293 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderTitle.kt +33 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +831 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Localize.kt +269 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +110 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +378 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/WidgetContainer.kt +65 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/useHeaderSearchAnimation.kt +69 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Avatar.kt +157 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +82 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +32 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +338 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +175 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +356 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Carousel.kt +113 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +89 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +128 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Collapse.kt +209 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +542 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +49 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +86 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +125 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +231 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +189 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +475 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +114 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +266 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +240 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +223 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +264 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +185 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +343 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Loader.kt +108 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +56 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationNumber.kt +41 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +84 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +40 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +328 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +97 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ProgressInfo.kt +310 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +59 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Rating.kt +87 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +21 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +90 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Slider.kt +323 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Stepper.kt +220 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Steps.kt +473 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/SuggestAction.kt +122 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Swipe.kt +199 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +91 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/TabView.kt +552 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +88 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +125 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +207 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +498 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +176 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Uploader.kt +182 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +193 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +29 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +234 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +188 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +325 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/HostFont.kt +16 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/KitDesignSystem.kt +18 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/KitFontScale.kt +22 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +12 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +16 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +194 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +282 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +54 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +51 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +41 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +52 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +66 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Conditional.kt +11 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +104 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +48 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Size.kt +51 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +299 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/HostBackGestureBridge.kt +58 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +129 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +106 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +211 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +398 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ScrollToTop.kt +8 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +595 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackTransition.kt +148 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/SwipeBackHaptic.kt +40 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +184 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +225 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +86 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +169 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +357 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +83 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderJourney.kt +106 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderLocation.kt +75 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +326 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +39 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +364 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +132 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/ToolkitRequests.kt +33 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/tracking/ScreenTracker.kt +135 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/BackGesture.kt +12 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ComposeLottieAnimation.kt +91 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/OsFontScale.kt +9 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +71 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +1329 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +55 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Tracking.kt +15 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +105 -0
- package/compose/src/commonTest/kotlin/vn/momo/kits/navigation/component/ToolkitRequestsTest.kt +47 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/const/HostFont.ios.kt +40 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/navigation/HostBackGesture.ios.kt +45 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/navigation/ScrollToTop.ios.kt +36 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/BackGesture.ios.kt +38 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/OsFontScale.ios.kt +66 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +213 -0
- package/gradle/libs.versions.toml +71 -0
- package/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/gradle/wrapper/gradle-wrapper.properties +8 -0
- package/gradle.properties +26 -0
- package/gradlew +252 -0
- package/gradlew.bat +94 -0
- package/ios/Application/ApplicationEnvironment.swift +71 -0
- package/ios/Application/Components.swift +270 -0
- package/ios/Application/ComposeApi.swift +22 -0
- package/ios/Application/FloatingButton.swift +174 -0
- package/ios/Application/HeaderRight.swift +306 -0
- package/ios/Application/LanguageSource.swift +93 -0
- package/ios/Application/Localize.swift +378 -0
- package/ios/Application/LocalizeModifier.swift +30 -0
- package/ios/Application/MaxApi.swift +18 -0
- package/ios/Application/Navigation/BottomTab/BottomTab.swift +104 -0
- package/ios/Application/Navigation/BottomTab/BottomTabBar.swift +215 -0
- package/ios/Application/Navigation/BottomTab/CurvedContainer.swift +65 -0
- package/ios/Application/Navigation/HeaderBackProps.swift +66 -0
- package/ios/Application/Navigation/HeaderTitle.swift +57 -0
- package/ios/Application/Navigation/HeaderUser.swift +209 -0
- package/ios/Application/Navigation/NavigationContainer.swift +213 -0
- package/ios/Application/Navigation/NavigationOptions.swift +109 -0
- package/ios/Application/Navigation/Navigator.swift +453 -0
- package/ios/Application/Navigation/NavigatorManager.swift +22 -0
- package/ios/Application/Navigation/Overplay/BottomSheet.swift +256 -0
- package/ios/Application/Navigation/Overplay/ModalScreen.swift +74 -0
- package/ios/Application/Navigation/Overplay/SnackBar.swift +144 -0
- package/ios/Application/Navigation/Tracking/ScreenTracker.swift +117 -0
- package/ios/Application/Navigation/component/Header.swift +178 -0
- package/ios/Application/Navigation/component/HeaderBackground.swift +83 -0
- package/ios/Application/Navigation/component/HeaderColor.swift +65 -0
- package/ios/Application/Navigation/component/HeaderRightWidthKey.swift +11 -0
- package/ios/Application/Navigation/component/NavigationFooter.swift +90 -0
- package/ios/Application/Navigation/component/NavigationHeaderRight.swift +196 -0
- package/ios/Application/Screen.swift +250 -0
- package/ios/Application/StackScreen.swift +492 -0
- package/ios/Avatar/Avatar.swift +193 -0
- package/ios/Badge/Badge.swift +84 -0
- package/ios/Badge/BadgeDot.swift +31 -0
- package/ios/Badge/BadgeRibbon.swift +319 -0
- package/ios/BaselineView/BaselineView.swift +163 -0
- package/ios/Button/Button.swift +232 -84
- package/ios/CalculatorKeyboard/CalculatorKeyboard.swift +126 -0
- package/ios/Carousel/Carousel.swift +196 -0
- package/ios/Checkbox/Checkbox.swift +59 -20
- package/ios/Chip/Chip.swift +120 -0
- package/ios/Collapse/Collapse.swift +192 -0
- package/ios/Colors+Radius+Spacing/Colors.swift +42 -37
- package/ios/Colors+Radius+Spacing/Spacing.swift +3 -1
- package/ios/Colors+Radius+Spacing/Theme.swift +295 -0
- package/ios/DateTimePicker/DateTimePicker.swift +212 -0
- package/ios/DateTimePicker/DateTimePickerTypes.swift +55 -0
- package/ios/DateTimePicker/DateTimePickerUtils.swift +167 -0
- package/ios/DateTimePicker/WheelPicker.swift +165 -0
- package/ios/Divider/Divider.swift +16 -0
- package/ios/Extensions/ActiveOpacityButtonStyle.swift +14 -0
- package/ios/Extensions/Color++.swift +32 -0
- package/ios/Icon/Icon.swift +69 -0
- package/ios/IconButton/IconButton.swift +140 -0
- package/ios/Image/Image.swift +36 -9
- package/ios/Information/Information.swift +156 -0
- package/ios/Input/ErrorView.swift +58 -0
- package/ios/Input/Input.swift +455 -121
- package/ios/Input/InputPhoneNumber.swift +192 -0
- package/ios/Input/InputSearch.swift +301 -0
- package/ios/Input/InputTextArea.swift +318 -0
- package/ios/InputDropDown/InputDropDown.swift +201 -0
- package/ios/InputMoney/InputMoney.swift +405 -0
- package/ios/InputOTP/InputOTP.swift +211 -0
- package/ios/Layout/GridContext.swift +30 -0
- package/ios/Layout/Item.swift +42 -0
- package/ios/Layout/Section.swift +134 -0
- package/ios/Loader/Loader.swift +113 -0
- package/ios/Lottie/LottieView.swift +86 -0
- package/ios/MoMoUIKits.podspec +5 -0
- package/ios/OTPKeyboard/KeyboardButton.swift +13 -5
- package/ios/Pagination/PaginationDot.swift +61 -0
- package/ios/Pagination/PaginationNumber.swift +35 -0
- package/ios/Pagination/PaginationScroll.swift +101 -0
- package/ios/Pagination/PaginationWhiteDot.swift +37 -0
- package/ios/Popup/PopupDisplay.swift +195 -94
- package/ios/Popup/PopupInput.swift +92 -0
- package/ios/Popup/PopupNotify.swift +219 -0
- package/ios/Popup/PopupPromotion.swift +74 -0
- package/ios/ProgressInfo/ProgressInfo.swift +297 -0
- package/ios/Radio/Radio.swift +69 -0
- package/ios/Rating/Rating.swift +83 -0
- package/{example/ios/Example/Preview Content/Preview Assets.xcassets/Contents.json → ios/Resources/MoMoUIKitsColors.xcassets/AccentColor.colorset/Contents.json} +5 -0
- package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/Text.colorset/Contents.json +3 -3
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/Contents.json +9 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-default.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-disable.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-pressed.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-selected.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-surface.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-tonal.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/border-default.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/border-disable.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/gradient.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/primary.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/secondary.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-container.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-primary.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-secondary.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-default.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-disable.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-hint.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-secondary.colorset/Contents.json +38 -0
- package/ios/ScrollIndicator/ScrollIndicator.swift +110 -0
- package/ios/Skeleton/Skeleton.swift +99 -0
- package/ios/Slider/Slider.swift +237 -0
- package/ios/StatusBarTap/StatusBarTap.h +13 -0
- package/ios/StatusBarTap/StatusBarTap.m +75 -0
- package/ios/Stepper/Stepper.swift +221 -0
- package/ios/Steps/Steps.swift +467 -0
- package/ios/SuggestAction/SuggestAction.swift +100 -0
- package/ios/Swipeable/SwipeCell.swift +226 -31
- package/ios/Swipeable/SwipeCellModel.swift +21 -0
- package/ios/Switch/Switch.swift +53 -28
- package/ios/TabView/TabView.swift +534 -0
- package/ios/Tag/Tag.swift +99 -0
- package/ios/Template/Logo/Logo.swift +75 -0
- package/ios/Template/TrustBanner/TrustBanner.swift +123 -0
- package/ios/Title/Title.swift +270 -0
- package/ios/Tooltip/Tooltip.swift +486 -0
- package/ios/Typography/FontScale.swift +103 -0
- package/ios/Typography/FontScaleStore.swift +58 -0
- package/ios/Typography/KitDesignSystem.swift +17 -0
- package/ios/Typography/Text.swift +262 -0
- package/ios/Typography/Typography.swift +80 -23
- package/ios/Uploader/Uploader.swift +174 -0
- package/ios/native-kits.podspec +73 -15
- package/ios-demo/MoMoUIKitsDemo.podspec +20 -0
- package/ios-demo/README.md +120 -0
- package/ios-demo/Resources/dot_loading.json +558 -0
- package/ios-demo/Resources/icon.json +4052 -0
- package/ios-demo/Resources/lottie_circle_loader.json +1 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/DemoScaffold.swift +48 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsBadgeDemoView.swift +25 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsButtonDemoView.swift +26 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsCheckboxDemoView.swift +19 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsChipDemoView.swift +33 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsInputDemoView.swift +48 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsPopupDemoView.swift +21 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsRadioDemoView.swift +17 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsTypographyDemoView.swift +28 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/MoMoUIKitsDemoContext.swift +31 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/MoMoUIKitsDemoFactory.swift +24 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/AnimatedHeaderDemo.swift +110 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/AvatarDemo.swift +107 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BadgeDemo.swift +75 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BaselineView.swift +117 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BottomTabDemo.swift +89 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ButtonDemo.swift +108 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CarouselDemo.swift +96 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CheckboxDemo.swift +60 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ChipDemo.swift +76 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CollapseDemo.swift +102 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ContentView.swift +107 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DateTimePickerDemo.swift +100 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DemoScreen.swift +420 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DividerDemo.swift +56 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/HeaderUserDemo.swift +49 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/Home.swift +276 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/IconButtonDemo.swift +93 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/IconDemo.swift +81 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ImageDemo.swift +65 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InformationDemo.swift +96 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputDemo.swift +117 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputDropDownDemo.swift +94 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputMoneyDemo.swift +94 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputOTPDemo.swift +88 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputPhoneNumberDemo.swift +120 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputSearchDemo.swift +85 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputTextAreaDemo.swift +87 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/LoaderDemo.swift +73 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/LocalizeDemo.swift +235 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/NavigationDemo.swift +241 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PaginationDemo.swift +68 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PlaygroundData.swift +76 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupDisplayDemo.swift +175 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupNotifyDemo.swift +95 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupPromotionDemo.swift +67 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ProgressInfoDemo.swift +101 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/RadioDemo.swift +64 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/RatingDemo.swift +68 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SectionDemo.swift +83 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SkeletonDemo.swift +61 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SliderDemo.swift +90 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SnackBarDemo.swift +82 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/StepperDemo.swift +93 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/StepsDemo.swift +114 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SuggestActionDemo.swift +90 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SwipeDemo.swift +107 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SwitchDemo.swift +58 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TabViewDemo.swift +114 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TagDemo.swift +86 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ThemeDemo.swift +181 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TitleDemo.swift +104 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TooltipDemo.swift +118 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TypographyDemo.swift +87 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/UploaderDemo.swift +85 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SwiftUIDemoBrowserView.swift +53 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/UIKitsDemoModels.swift +15 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/UIKitsDemoRegistry.swift +73 -0
- package/package.json +6 -6
- package/publish.sh +554 -20
- package/scripts/gen-ios-color.mjs +136 -0
- package/settings.gradle.kts +64 -0
- package/CODE_OF_CONDUCT.md +0 -133
- package/CONTRIBUTING.md +0 -114
- package/LICENSE +0 -20
- package/android/build.gradle +0 -82
- package/android/gradle.properties +0 -5
- package/android/src/main/AndroidManifest.xml +0 -4
- package/android/src/main/java/com/momoplatform/nativekits/NativeKitsPackage.kt +0 -17
- package/android/src/main/java/com/momoplatform/nativekits/NativeKitsViewManager.kt +0 -20
- package/example/ios/Example/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -63
- package/example/ios/Example/ComponentDetail.swift +0 -35
- package/example/ios/Example/ComponentItem.swift +0 -24
- package/example/ios/Example/ComponentModel.swift +0 -38
- package/example/ios/Example/ContentView.swift +0 -39
- package/example/ios/Example/Example.entitlements +0 -10
- package/example/ios/Example/Foundation/ButtonDemo.swift +0 -80
- package/example/ios/Example/Foundation/ImageDemo.swift +0 -43
- package/example/ios/Example/Foundation/Popup/ActionSheets.swift +0 -136
- package/example/ios/Example/Foundation/Popup/Floats.swift +0 -127
- package/example/ios/Example/Foundation/Popup/Popups.swift +0 -51
- package/example/ios/Example/Foundation/PopupDemo.swift +0 -389
- package/example/ios/Example/Foundation/TextInputDemo.swift +0 -36
- package/example/ios/Example/Foundation/TypographyDemo.swift +0 -53
- package/example/ios/Example/Foundation.swift +0 -26
- package/example/ios/Example/Info.plist +0 -18
- package/example/ios/Example/Library/CheckboxDemo.swift +0 -19
- package/example/ios/Example/Library/SwipeableDemo.swift +0 -105
- package/example/ios/Example/Library/SwitchDemo.swift +0 -19
- package/example/ios/Example/Library.swift +0 -26
- package/example/ios/Example/Main.swift +0 -27
- package/example/ios/Example/Overview.swift +0 -20
- package/example/ios/Example/Resource/SFProText-Black.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Bold.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Heavy.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Light.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Medium.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Regular.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Semibold.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Thin.ttf +0 -0
- package/example/ios/Example/Resource/SFProText-Ultralight.ttf +0 -0
- package/example/ios/Example/Resource/foundation.json +0 -33
- package/example/ios/Example/Resource/library.json +0 -18
- package/example/ios/Example/Utils.swift +0 -30
- package/example/ios/Example/ViewModifier/DarkViewModifier.swift +0 -22
- package/example/ios/Example.xcodeproj/project.pbxproj +0 -581
- package/example/ios/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/example/ios/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/example/ios/Example.xcodeproj/project.xcworkspace/xcuserdata/wem.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/example/ios/Example.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- package/example/ios/Example.xcworkspace/contents.xcworkspacedata +0 -10
- package/example/ios/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/example/ios/Example.xcworkspace/xcuserdata/wem.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/example/ios/Example.xcworkspace/xcuserdata/wem.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -6
- package/example/ios/Podfile +0 -7
- package/example/ios/Podfile.lock +0 -35
- package/example/ios/Pods/Local Podspecs/MoMoUIKits.podspec.json +0 -37
- package/example/ios/Pods/Manifest.lock +0 -35
- package/example/ios/Pods/Pods.xcodeproj/project.pbxproj +0 -2047
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/Pods-Example.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/SDWebImage.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/SkeletonUI.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/xcschememanagement.plist +0 -46
- package/example/ios/Pods/SDWebImage/LICENSE +0 -20
- package/example/ios/Pods/SDWebImage/README.md +0 -352
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/NSButton+WebCache.h +0 -340
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/NSButton+WebCache.m +0 -172
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/NSData+ImageContentType.h +0 -63
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/NSData+ImageContentType.m +0 -165
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/NSImage+Compatibility.h +0 -67
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/NSImage+Compatibility.m +0 -120
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImage.h +0 -114
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImage.m +0 -392
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImagePlayer.h +0 -112
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImagePlayer.m +0 -420
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImageRep.h +0 -23
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImageRep.m +0 -133
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImageView+WebCache.h +0 -168
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImageView+WebCache.m +0 -79
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImageView.h +0 -110
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDAnimatedImageView.m +0 -540
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDDiskCache.h +0 -145
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDDiskCache.m +0 -326
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDGraphicsImageRenderer.h +0 -73
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDGraphicsImageRenderer.m +0 -256
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageAPNGCoder.h +0 -19
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageAPNGCoder.m +0 -58
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageAWebPCoder.h +0 -23
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageAWebPCoder.m +0 -98
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCache.h +0 -450
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCache.m +0 -1030
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCacheConfig.h +0 -153
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCacheConfig.m +0 -68
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCacheDefine.h +0 -156
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCacheDefine.m +0 -138
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCachesManager.h +0 -81
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCachesManager.m +0 -556
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCoder.h +0 -297
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCoder.m +0 -26
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCoderHelper.h +0 -153
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCoderHelper.m +0 -822
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCodersManager.h +0 -58
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageCodersManager.m +0 -130
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageFrame.h +0 -36
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageFrame.m +0 -28
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageGIFCoder.h +0 -22
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageGIFCoder.m +0 -58
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageGraphics.h +0 -28
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageGraphics.m +0 -127
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageHEICCoder.h +0 -25
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageHEICCoder.m +0 -101
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageIOAnimatedCoder.h +0 -58
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageIOAnimatedCoder.m +0 -807
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageIOCoder.h +0 -30
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageIOCoder.m +0 -420
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageLoader.h +0 -146
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageLoader.m +0 -170
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageLoadersManager.h +0 -40
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageLoadersManager.m +0 -123
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageTransformer.h +0 -241
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDImageTransformer.m +0 -331
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDMemoryCache.h +0 -78
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDMemoryCache.m +0 -158
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageCacheKeyFilter.h +0 -32
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageCacheKeyFilter.m +0 -39
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageCacheSerializer.h +0 -36
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageCacheSerializer.m +0 -39
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageCompat.h +0 -95
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageCompat.m +0 -17
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDefine.h +0 -352
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDefine.m +0 -149
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloader.h +0 -314
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloader.m +0 -658
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderConfig.h +0 -113
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderConfig.m +0 -60
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderDecryptor.h +0 -49
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderDecryptor.m +0 -55
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderOperation.h +0 -191
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderOperation.m +0 -722
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderRequestModifier.h +0 -69
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderRequestModifier.m +0 -71
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderResponseModifier.h +0 -69
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageDownloaderResponseModifier.m +0 -73
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageError.h +0 -32
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageError.m +0 -16
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageIndicator.h +0 -115
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageIndicator.m +0 -275
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageManager.h +0 -290
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageManager.m +0 -775
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageOperation.h +0 -27
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageOperation.m +0 -14
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageOptionsProcessor.h +0 -72
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageOptionsProcessor.m +0 -59
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImagePrefetcher.h +0 -143
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImagePrefetcher.m +0 -303
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageTransition.h +0 -131
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/SDWebImageTransition.m +0 -194
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIButton+WebCache.h +0 -387
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIButton+WebCache.m +0 -234
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+ExtendedCacheData.h +0 -24
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+ExtendedCacheData.m +0 -23
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+ForceDecode.h +0 -46
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+ForceDecode.m +0 -60
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+GIF.h +0 -26
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+GIF.m +0 -22
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+MemoryCacheCost.h +0 -27
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+MemoryCacheCost.m +0 -47
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+Metadata.h +0 -89
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+Metadata.m +0 -221
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+MultiFormat.h +0 -80
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+MultiFormat.m +0 -47
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+Transform.h +0 -146
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImage+Transform.m +0 -824
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImageView+HighlightedWebCache.h +0 -129
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImageView+HighlightedWebCache.m +0 -76
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImageView+WebCache.h +0 -194
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIImageView+WebCache.m +0 -67
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIView+WebCache.h +0 -110
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIView+WebCache.m +0 -446
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIView+WebCacheOperation.h +0 -48
- package/example/ios/Pods/SDWebImage/SDWebImage/Core/UIView+WebCacheOperation.m +0 -82
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/NSBezierPath+SDRoundedCorners.h +0 -24
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/NSBezierPath+SDRoundedCorners.m +0 -42
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDAssociatedObject.h +0 -14
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDAssociatedObject.m +0 -29
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDAsyncBlockOperation.h +0 -21
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDAsyncBlockOperation.m +0 -92
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDDeviceHelper.h +0 -18
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDDeviceHelper.m +0 -32
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDDisplayLink.h +0 -29
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDDisplayLink.m +0 -227
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDFileAttributeHelper.h +0 -19
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDFileAttributeHelper.m +0 -127
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDImageAssetManager.h +0 -23
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDImageAssetManager.m +0 -164
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDImageCachesManagerOperation.h +0 -21
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDImageCachesManagerOperation.m +0 -83
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDImageIOAnimatedCoderInternal.h +0 -39
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDInternalMacros.h +0 -122
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDInternalMacros.m +0 -13
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDWeakProxy.h +0 -20
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDWeakProxy.m +0 -79
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDWebImageTransitionInternal.h +0 -19
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/SDmetamacros.h +0 -667
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/UIColor+SDHexString.h +0 -18
- package/example/ios/Pods/SDWebImage/SDWebImage/Private/UIColor+SDHexString.m +0 -42
- package/example/ios/Pods/SDWebImage/WebImage/SDWebImage.h +0 -89
- package/example/ios/Pods/SDWebImageSwiftUI/LICENSE +0 -19
- package/example/ios/Pods/SDWebImageSwiftUI/README.md +0 -690
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/AnimatedImage.swift +0 -870
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Backports/Backport.swift +0 -59
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Backports/OnChange.swift +0 -52
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Backports/Overlay.swift +0 -124
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Backports/StateObject.swift +0 -151
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Image.swift +0 -78
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImageManager.swift +0 -132
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImagePlayer.swift +0 -122
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/ImageViewWrapper.swift +0 -133
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Indicator/ActivityIndicator.swift +0 -82
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Indicator/Indicator.swift +0 -97
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Indicator/ProgressIndicator.swift +0 -114
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/SDWebImageSwiftUI.swift +0 -64
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/SwiftUICompatibility.swift +0 -92
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/Transition/Transition.swift +0 -93
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Classes/WebImage.swift +0 -509
- package/example/ios/Pods/SDWebImageSwiftUI/SDWebImageSwiftUI/Module/SDWebImageSwiftUI.h +0 -15
- package/example/ios/Pods/SkeletonUI/LICENSE +0 -21
- package/example/ios/Pods/SkeletonUI/README.md +0 -137
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Angle/AngleInteractor.swift +0 -29
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Angle/AnglePresenter.swift +0 -7
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Animation/AnimationInteractor.swift +0 -56
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Appearance/AppearanceInteractor.swift +0 -58
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Appearance/AppearancePresenter.swift +0 -5
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/ClosedRange+Normalize.swift +0 -16
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/Image+OptionalType.swift +0 -102
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/ModifiedContent+SkeletonModifier.swift +0 -26
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/Optional+OptionalType.swift +0 -5
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/SecureField+OptionalType.swift +0 -19
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/Text+OptionalType.swift +0 -27
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/TextField+OptionalType.swift +0 -35
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/Toggle+OptionalType.swift +0 -29
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/UnitPoint+Angle.swift +0 -8
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Extensions/View+SkeletonModifier.swift +0 -8
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Modifiers/SkeletonModifier.swift +0 -52
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Multiline/MultilineInteractor.swift +0 -41
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Multiline/MultilinePresenter.swift +0 -9
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Opacity/OpacityInteractor.swift +0 -29
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Opacity/OpacityPresenter.swift +0 -7
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Position/PositionInteractor.swift +0 -29
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Position/PositionPresenter.swift +0 -7
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Protocols/OptionalType.swift +0 -4
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Radius/RadiusInteractor.swift +0 -29
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Radius/RadiusPresenter.swift +0 -7
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Shape/ShapeInteractor.swift +0 -33
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Shape/ShapePresenter.swift +0 -5
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Skeleton/SkeletonForEach.swift +0 -20
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Skeleton/SkeletonInteractor.swift +0 -27
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Skeleton/SkeletonList.swift +0 -20
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Skeleton/SkeletonPresenter.swift +0 -15
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Skeleton/SkeletonShape.swift +0 -64
- package/example/ios/Pods/SkeletonUI/Sources/SkeletonUI/Skeleton/SkeletonView.swift +0 -25
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits-dummy.m +0 -5
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits-prefix.pch +0 -12
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits-umbrella.h +0 -16
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits.debug.xcconfig +0 -15
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits.modulemap +0 -6
- package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits.release.xcconfig +0 -15
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.markdown +0 -75
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.plist +0 -119
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-dummy.m +0 -5
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-umbrella.h +0 -16
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig +0 -15
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example.modulemap +0 -6
- package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig +0 -15
- package/example/ios/Pods/Target Support Files/SDWebImage/SDWebImage-dummy.m +0 -5
- package/example/ios/Pods/Target Support Files/SDWebImage/SDWebImage-prefix.pch +0 -12
- package/example/ios/Pods/Target Support Files/SDWebImage/SDWebImage-umbrella.h +0 -75
- package/example/ios/Pods/Target Support Files/SDWebImage/SDWebImage.debug.xcconfig +0 -14
- package/example/ios/Pods/Target Support Files/SDWebImage/SDWebImage.modulemap +0 -6
- package/example/ios/Pods/Target Support Files/SDWebImage/SDWebImage.release.xcconfig +0 -14
- package/example/ios/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI-dummy.m +0 -5
- package/example/ios/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI-prefix.pch +0 -12
- package/example/ios/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI-umbrella.h +0 -17
- package/example/ios/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI.debug.xcconfig +0 -17
- package/example/ios/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI.modulemap +0 -6
- package/example/ios/Pods/Target Support Files/SDWebImageSwiftUI/SDWebImageSwiftUI.release.xcconfig +0 -17
- package/example/ios/Pods/Target Support Files/SkeletonUI/SkeletonUI-dummy.m +0 -5
- package/example/ios/Pods/Target Support Files/SkeletonUI/SkeletonUI-prefix.pch +0 -12
- package/example/ios/Pods/Target Support Files/SkeletonUI/SkeletonUI-umbrella.h +0 -16
- package/example/ios/Pods/Target Support Files/SkeletonUI/SkeletonUI.debug.xcconfig +0 -12
- package/example/ios/Pods/Target Support Files/SkeletonUI/SkeletonUI.modulemap +0 -6
- package/example/ios/Pods/Target Support Files/SkeletonUI/SkeletonUI.release.xcconfig +0 -12
- package/ios/Extensions/View++.swift +0 -9
- package/ios/Theme.md +0 -18
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/Background.colorset/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/Border.colorset/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/Card.colorset/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/Error.colorset/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/Primary.colorset/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/PrimaryDark.colorset/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/PrimaryLight.colorset/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/Secondary.colorset/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/Success.colorset/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/TextSecondary.colorset/Contents.json +0 -0
- /package/{example/ios/Example/Assets.xcassets → ios/Resources/MoMoUIKitsColors.xcassets}/Warning.colorset/Contents.json +0 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
package vn.momo.kits.const
|
|
2
|
+
|
|
3
|
+
import androidx.compose.runtime.Stable
|
|
4
|
+
import androidx.compose.runtime.staticCompositionLocalOf
|
|
5
|
+
import androidx.compose.ui.graphics.Color
|
|
6
|
+
import androidx.compose.ui.unit.dp
|
|
7
|
+
|
|
8
|
+
@Stable
|
|
9
|
+
data class Background(
|
|
10
|
+
val default: Color,
|
|
11
|
+
val surface: Color,
|
|
12
|
+
val tonal: Color,
|
|
13
|
+
val pressed: Color,
|
|
14
|
+
val selected: Color,
|
|
15
|
+
val disable: Color
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
@Stable
|
|
19
|
+
data class ColorScheme(
|
|
20
|
+
val primary: Color,
|
|
21
|
+
val secondary: Color,
|
|
22
|
+
val gradient: Color,
|
|
23
|
+
val background: Background,
|
|
24
|
+
val text: TextColors,
|
|
25
|
+
val border: BorderColors,
|
|
26
|
+
val success: ColorSet,
|
|
27
|
+
val warning: ColorSet,
|
|
28
|
+
val error: ColorSet,
|
|
29
|
+
val highlight: ColorSet,
|
|
30
|
+
val interactive: ColorSet
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
@Stable
|
|
34
|
+
data class TextColors(
|
|
35
|
+
val default: Color,
|
|
36
|
+
val secondary: Color,
|
|
37
|
+
val hint: Color,
|
|
38
|
+
val disable: Color
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
@Stable
|
|
42
|
+
data class BorderColors(
|
|
43
|
+
val default: Color,
|
|
44
|
+
val disable: Color
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
@Stable
|
|
48
|
+
data class ColorSet(
|
|
49
|
+
val primary: Color,
|
|
50
|
+
val secondary: Color,
|
|
51
|
+
val container: Color
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
@Stable
|
|
55
|
+
data class ThemeAssets(
|
|
56
|
+
val headerBackground: String? = null
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
@Stable
|
|
60
|
+
data class Theme(
|
|
61
|
+
val dark: Boolean,
|
|
62
|
+
val colors: ColorScheme,
|
|
63
|
+
val font: String,
|
|
64
|
+
val assets: ThemeAssets
|
|
65
|
+
) {
|
|
66
|
+
fun isHeaderImage(): Boolean {
|
|
67
|
+
return !assets.headerBackground.isNullOrEmpty()
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
private val lightBaseTheme = Theme(
|
|
71
|
+
dark = false,
|
|
72
|
+
colors = ColorScheme(
|
|
73
|
+
primary = Colors.pink_03,
|
|
74
|
+
secondary = Colors.pink_07,
|
|
75
|
+
gradient = Color(0xFFFDCADE),
|
|
76
|
+
background = Background(
|
|
77
|
+
default = Color(0xFFF2F2F6),
|
|
78
|
+
surface = Colors.black_01,
|
|
79
|
+
tonal = Colors.pink_09,
|
|
80
|
+
pressed = Color(0xFFDFDFE6),
|
|
81
|
+
selected = Colors.pink_10,
|
|
82
|
+
disable = Color(0xFFEBEBF2)
|
|
83
|
+
),
|
|
84
|
+
text = TextColors(
|
|
85
|
+
default = Colors.black_17,
|
|
86
|
+
secondary = Colors.black_15,
|
|
87
|
+
hint = Colors.black_12,
|
|
88
|
+
disable = Colors.black_08
|
|
89
|
+
),
|
|
90
|
+
border = BorderColors(
|
|
91
|
+
default = Colors.black_04,
|
|
92
|
+
disable = Colors.black_02
|
|
93
|
+
),
|
|
94
|
+
success = ColorSet(
|
|
95
|
+
primary = Colors.green_03,
|
|
96
|
+
secondary = Colors.green_07,
|
|
97
|
+
container = Colors.green_08
|
|
98
|
+
),
|
|
99
|
+
warning = ColorSet(
|
|
100
|
+
primary = Colors.orange_03,
|
|
101
|
+
secondary = Colors.orange_07,
|
|
102
|
+
container = Colors.orange_08
|
|
103
|
+
),
|
|
104
|
+
error = ColorSet(
|
|
105
|
+
primary = Colors.red_03,
|
|
106
|
+
secondary = Colors.red_07,
|
|
107
|
+
container = Colors.red_08,
|
|
108
|
+
),
|
|
109
|
+
highlight = ColorSet(
|
|
110
|
+
primary = Colors.mint_03,
|
|
111
|
+
secondary = Colors.mint_07,
|
|
112
|
+
container = Colors.mint_08
|
|
113
|
+
),
|
|
114
|
+
interactive = ColorSet(
|
|
115
|
+
primary = Colors.blue_03,
|
|
116
|
+
secondary = Colors.blue_07,
|
|
117
|
+
container = Colors.blue_08
|
|
118
|
+
)
|
|
119
|
+
),
|
|
120
|
+
font = "SFProText",
|
|
121
|
+
assets = ThemeAssets(
|
|
122
|
+
headerBackground = null
|
|
123
|
+
)
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
private val darkBaseTheme = Theme(
|
|
128
|
+
dark = true,
|
|
129
|
+
colors = ColorScheme(
|
|
130
|
+
primary = Colors.pink_04,
|
|
131
|
+
secondary = Colors.pink_08,
|
|
132
|
+
gradient = Color(0xFFFDCADE),
|
|
133
|
+
background = Background(
|
|
134
|
+
default = Color(0xFF121212),
|
|
135
|
+
surface = Color(0xFF1E1E1E),
|
|
136
|
+
tonal = Colors.pink_10,
|
|
137
|
+
pressed = Color(0xFF1A1A1A),
|
|
138
|
+
selected = Colors.pink_11,
|
|
139
|
+
disable = Color(0xFF303030)
|
|
140
|
+
),
|
|
141
|
+
text = TextColors(
|
|
142
|
+
default = Color.White,
|
|
143
|
+
secondary = Color(0xFFB0B0B0),
|
|
144
|
+
hint = Color(0xFF727272),
|
|
145
|
+
disable = Color(0xFF505050)
|
|
146
|
+
),
|
|
147
|
+
border = BorderColors(
|
|
148
|
+
default = Color(0xFF2A2A2A),
|
|
149
|
+
disable = Color(0xFF242424)
|
|
150
|
+
),
|
|
151
|
+
success = ColorSet(
|
|
152
|
+
primary = Colors.green_03,
|
|
153
|
+
secondary = Colors.green_07,
|
|
154
|
+
container = Colors.green_08
|
|
155
|
+
),
|
|
156
|
+
warning = ColorSet(
|
|
157
|
+
primary = Colors.orange_03,
|
|
158
|
+
secondary = Colors.orange_07,
|
|
159
|
+
container = Colors.orange_08
|
|
160
|
+
),
|
|
161
|
+
error = ColorSet(
|
|
162
|
+
primary = Colors.red_03,
|
|
163
|
+
secondary = Colors.red_07,
|
|
164
|
+
container = Colors.red_08,
|
|
165
|
+
),
|
|
166
|
+
highlight = ColorSet(
|
|
167
|
+
primary = Colors.mint_03,
|
|
168
|
+
secondary = Colors.mint_07,
|
|
169
|
+
container = Colors.mint_08
|
|
170
|
+
),
|
|
171
|
+
interactive = ColorSet(
|
|
172
|
+
primary = Colors.blue_03,
|
|
173
|
+
secondary = Colors.blue_07,
|
|
174
|
+
container = Colors.blue_08
|
|
175
|
+
)
|
|
176
|
+
),
|
|
177
|
+
font = "SFProText",
|
|
178
|
+
assets = ThemeAssets(
|
|
179
|
+
headerBackground = null
|
|
180
|
+
)
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
val defaultTheme: Theme
|
|
185
|
+
get() = lightBaseTheme.copy(font = defaultFontFamily)
|
|
186
|
+
|
|
187
|
+
val darkTheme: Theme
|
|
188
|
+
get() = darkBaseTheme.copy(font = defaultFontFamily)
|
|
189
|
+
|
|
190
|
+
val AppTheme = staticCompositionLocalOf { defaultTheme }
|
|
191
|
+
|
|
192
|
+
val AppStatusBar = staticCompositionLocalOf { 0.dp }
|
|
193
|
+
|
|
194
|
+
val AppNavigationBar = staticCompositionLocalOf { 0.dp }
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
package vn.momo.kits.const
|
|
2
|
+
|
|
3
|
+
import androidx.compose.runtime.Composable
|
|
4
|
+
import androidx.compose.runtime.Immutable
|
|
5
|
+
import androidx.compose.ui.platform.LocalDensity
|
|
6
|
+
import androidx.compose.ui.text.TextStyle
|
|
7
|
+
import androidx.compose.ui.text.font.FontFamily
|
|
8
|
+
import androidx.compose.ui.text.font.FontWeight
|
|
9
|
+
import androidx.compose.ui.text.style.TextDecoration
|
|
10
|
+
import androidx.compose.ui.unit.*
|
|
11
|
+
import vn.momo.kits.application.LocalContext
|
|
12
|
+
import vn.momo.kits.platform.getScreenDimensions
|
|
13
|
+
import kotlin.math.max
|
|
14
|
+
import kotlin.math.min
|
|
15
|
+
|
|
16
|
+
const val DEFAULT_SCREEN_SIZE = 375f
|
|
17
|
+
const val MAX_FONT_SCALE = 1.5f
|
|
18
|
+
const val MAX_DEVICE_SCALE = 5
|
|
19
|
+
|
|
20
|
+
@Composable
|
|
21
|
+
fun scaleSize(size: Float): Float {
|
|
22
|
+
val context = LocalContext.current
|
|
23
|
+
// Host-pushed context wins; otherwise fall back to the app-wide KitFontScale holder.
|
|
24
|
+
val useOsScale = context?.useOSScaleRate ?: KitFontScale.useOSScaleRate
|
|
25
|
+
if (!useOsScale) {
|
|
26
|
+
return size * (context?.userScaleRate ?: KitFontScale.userScaleRate)
|
|
27
|
+
}
|
|
28
|
+
val scaleSizeMaxRate: Float = MAX_FONT_SCALE
|
|
29
|
+
val deviceWidth = getScreenDimensions().width
|
|
30
|
+
val deviceScale = deviceWidth / DEFAULT_SCREEN_SIZE
|
|
31
|
+
|
|
32
|
+
val density = LocalDensity.current
|
|
33
|
+
val fontScale = density.fontScale
|
|
34
|
+
|
|
35
|
+
var fontSizeScaleDevice = size
|
|
36
|
+
var fontSizeScaleOS = size
|
|
37
|
+
|
|
38
|
+
if (deviceScale > 1) {
|
|
39
|
+
fontSizeScaleDevice =
|
|
40
|
+
min(deviceScale * fontSizeScaleDevice, fontSizeScaleDevice + MAX_DEVICE_SCALE)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (fontScale > 1) {
|
|
44
|
+
fontSizeScaleOS = min(fontScale * fontSizeScaleOS, fontSizeScaleOS * scaleSizeMaxRate)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return max(
|
|
48
|
+
fontSizeScaleDevice,
|
|
49
|
+
fontSizeScaleOS
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@Composable
|
|
54
|
+
fun scaleSize(size: TextUnit): TextUnit {
|
|
55
|
+
if (!size.isSp) return size
|
|
56
|
+
|
|
57
|
+
val density = LocalDensity.current
|
|
58
|
+
|
|
59
|
+
val scaled = scaleSize(size.value)
|
|
60
|
+
val spValue = scaled / density.fontScale
|
|
61
|
+
|
|
62
|
+
return TextUnit(value = spValue, type = TextUnitType.Sp)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@Composable
|
|
66
|
+
fun scaleSize(size: Dp): Dp {
|
|
67
|
+
return scaleSize(size.value).dp
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@Composable
|
|
71
|
+
fun scaleSize(textStyle: TextStyle): TextStyle {
|
|
72
|
+
return textStyle.copy(
|
|
73
|
+
fontSize = if (textStyle.fontSize != TextUnit.Unspecified)
|
|
74
|
+
scaleSize(textStyle.fontSize)
|
|
75
|
+
else
|
|
76
|
+
TextUnit.Unspecified,
|
|
77
|
+
|
|
78
|
+
lineHeight = if (textStyle.lineHeight != TextUnit.Unspecified)
|
|
79
|
+
scaleSize(textStyle.lineHeight)
|
|
80
|
+
else
|
|
81
|
+
TextUnit.Unspecified,
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Tên file font trong tài nguyên native của app host (xem [hostFontFamily]).
|
|
88
|
+
*
|
|
89
|
+
* SDK không đóng gói font riêng nữa: app host đã bundle sẵn toàn bộ font từ `font-source`
|
|
90
|
+
* cho cả React Native lẫn native, nên bản copy trong `composeResources` chỉ làm phình app.
|
|
91
|
+
*/
|
|
92
|
+
private const val LEGACY_DEFAULT_FONT_FILE = "SFProText-Regular.ttf"
|
|
93
|
+
private const val NEW_DEFAULT_FONT_FILE = "MomoTrustSans-Regular.ttf"
|
|
94
|
+
|
|
95
|
+
private val hostFontFiles: Map<String, String> = mapOf(
|
|
96
|
+
"SFProText-100" to "SFProText-Thin.ttf",
|
|
97
|
+
"SFProText-200" to "SFProText-Ultralight.ttf",
|
|
98
|
+
"SFProText-300" to "SFProText-Light.ttf",
|
|
99
|
+
"SFProText-400" to LEGACY_DEFAULT_FONT_FILE,
|
|
100
|
+
"SFProText-500" to "SFProText-Medium.ttf",
|
|
101
|
+
"SFProText-600" to "SFProText-Semibold.ttf",
|
|
102
|
+
"SFProText-700" to "SFProText-Bold.ttf",
|
|
103
|
+
"SFProText-800" to "SFProText-Heavy.ttf",
|
|
104
|
+
"SFProText-900" to "SFProText-Black.ttf",
|
|
105
|
+
|
|
106
|
+
"MomoTrustSans-100" to "MomoTrustSans-ExtraLight.ttf",
|
|
107
|
+
"MomoTrustSans-200" to "MomoTrustSans-ExtraLight.ttf",
|
|
108
|
+
"MomoTrustSans-300" to "MomoTrustSans-Light.ttf",
|
|
109
|
+
"MomoTrustSans-400" to "MomoTrustSans-Regular.ttf",
|
|
110
|
+
"MomoTrustSans-500" to "MomoTrustSans-Medium.ttf",
|
|
111
|
+
"MomoTrustSans-600" to "MomoTrustSans-SemiBold.ttf",
|
|
112
|
+
"MomoTrustSans-700" to "MomoTrustSans-Bold.ttf",
|
|
113
|
+
"MomoTrustSans-800" to "MomoTrustSans-ExtraBold.ttf",
|
|
114
|
+
"MomoTrustSans-900" to "MomoTrustSans-ExtraBold.ttf",
|
|
115
|
+
) + (1..9).flatMap { step ->
|
|
116
|
+
val weight = step * 100
|
|
117
|
+
listOf(
|
|
118
|
+
"MoMoSignature-$weight" to "MoMoSignature.otf",
|
|
119
|
+
"MoMoTrustDisplay-$weight" to "MoMoTrustDisplay.otf",
|
|
120
|
+
)
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
private const val NEW_DEFAULT_FONT_FAMILY = "MomoTrustSans"
|
|
124
|
+
private const val LEGACY_DEFAULT_FONT_FAMILY = "SFProText"
|
|
125
|
+
|
|
126
|
+
internal val defaultFontFamily: String
|
|
127
|
+
get() = if (KitDesignSystem.isWhiteList) NEW_DEFAULT_FONT_FAMILY else LEGACY_DEFAULT_FONT_FAMILY
|
|
128
|
+
|
|
129
|
+
@Composable
|
|
130
|
+
fun getFontFamily(fontFamily: String, fontWeight: FontWeight? = FontWeight.Normal): FontFamily {
|
|
131
|
+
val isWhiteList = KitDesignSystem.isWhiteList
|
|
132
|
+
val defaultFile = if (isWhiteList) NEW_DEFAULT_FONT_FILE else LEGACY_DEFAULT_FONT_FILE
|
|
133
|
+
val key = "$fontFamily-${fontWeight?.weight}"
|
|
134
|
+
val fileName = hostFontFiles[key] ?: defaultFile
|
|
135
|
+
return hostFontFamily(fileName)
|
|
136
|
+
?: hostFontFamily(defaultFile)
|
|
137
|
+
?: FontFamily.Default
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@Immutable
|
|
141
|
+
class AppTypography internal constructor(
|
|
142
|
+
val headlineDefaultBold: TextStyle,
|
|
143
|
+
val headerMBold: TextStyle,
|
|
144
|
+
val headerDefaultBold: TextStyle,
|
|
145
|
+
val headerSSemibold: TextStyle,
|
|
146
|
+
val headerXsSemibold: TextStyle,
|
|
147
|
+
val bodyDefaultRegular: TextStyle,
|
|
148
|
+
val bodyDefaultRegularStrikethrough: TextStyle,
|
|
149
|
+
val descriptionDefaultRegular: TextStyle,
|
|
150
|
+
val descriptionDefaultRegularStrikethrough: TextStyle,
|
|
151
|
+
val descriptionXsRegular: TextStyle,
|
|
152
|
+
val descriptionXsRegularStrikethrough: TextStyle,
|
|
153
|
+
val labelDefaultMedium: TextStyle,
|
|
154
|
+
val labelSMedium: TextStyle,
|
|
155
|
+
val labelXsMedium: TextStyle,
|
|
156
|
+
val actionDefaultBold: TextStyle,
|
|
157
|
+
val actionSBold: TextStyle,
|
|
158
|
+
val actionXsBold: TextStyle,
|
|
159
|
+
val actionXxsBold: TextStyle,
|
|
160
|
+
) {
|
|
161
|
+
constructor(
|
|
162
|
+
default: TextStyle = TextStyle(
|
|
163
|
+
fontSize = 14.sp,
|
|
164
|
+
lineHeight = 20.sp,
|
|
165
|
+
fontWeight = FontWeight.Normal
|
|
166
|
+
),
|
|
167
|
+
headlineDefaultBold: TextStyle = TextStyle(
|
|
168
|
+
fontSize = 24.sp,
|
|
169
|
+
lineHeight = 34.sp,
|
|
170
|
+
fontWeight = FontWeight.Bold
|
|
171
|
+
),
|
|
172
|
+
headerMBold: TextStyle = TextStyle(
|
|
173
|
+
fontSize = 18.sp,
|
|
174
|
+
lineHeight = 26.sp,
|
|
175
|
+
fontWeight = FontWeight.Bold
|
|
176
|
+
),
|
|
177
|
+
headerDefaultBold: TextStyle = TextStyle(
|
|
178
|
+
fontSize = 16.sp,
|
|
179
|
+
lineHeight = 22.sp,
|
|
180
|
+
fontWeight = FontWeight.Bold
|
|
181
|
+
),
|
|
182
|
+
headerSSemibold: TextStyle = TextStyle(
|
|
183
|
+
fontSize = 14.sp,
|
|
184
|
+
lineHeight = 20.sp,
|
|
185
|
+
fontWeight = FontWeight.SemiBold
|
|
186
|
+
),
|
|
187
|
+
headerXsSemibold: TextStyle = TextStyle(
|
|
188
|
+
fontSize = 12.sp,
|
|
189
|
+
lineHeight = 18.sp,
|
|
190
|
+
fontWeight = FontWeight.SemiBold
|
|
191
|
+
),
|
|
192
|
+
bodyDefaultRegular: TextStyle = TextStyle(
|
|
193
|
+
fontSize = 14.sp,
|
|
194
|
+
lineHeight = 20.sp,
|
|
195
|
+
fontWeight = FontWeight.Normal
|
|
196
|
+
),
|
|
197
|
+
bodyDefaultRegularStrikethrough: TextStyle = TextStyle(
|
|
198
|
+
fontSize = 14.sp,
|
|
199
|
+
lineHeight = 20.sp,
|
|
200
|
+
fontWeight = FontWeight.Normal,
|
|
201
|
+
textDecoration = TextDecoration.LineThrough
|
|
202
|
+
),
|
|
203
|
+
descriptionDefaultRegular: TextStyle = TextStyle(
|
|
204
|
+
fontSize = 12.sp,
|
|
205
|
+
lineHeight = 18.sp,
|
|
206
|
+
fontWeight = FontWeight.Normal
|
|
207
|
+
),
|
|
208
|
+
descriptionDefaultRegularStrikethrough: TextStyle = TextStyle(
|
|
209
|
+
fontSize = 12.sp,
|
|
210
|
+
lineHeight = 18.sp,
|
|
211
|
+
fontWeight = FontWeight.Normal,
|
|
212
|
+
textDecoration = TextDecoration.LineThrough
|
|
213
|
+
),
|
|
214
|
+
descriptionXsRegular: TextStyle = TextStyle(
|
|
215
|
+
fontSize = 10.sp,
|
|
216
|
+
lineHeight = 14.sp,
|
|
217
|
+
fontWeight = FontWeight.Normal
|
|
218
|
+
),
|
|
219
|
+
descriptionXsRegularStrikethrough: TextStyle = TextStyle(
|
|
220
|
+
fontSize = 10.sp,
|
|
221
|
+
lineHeight = 14.sp,
|
|
222
|
+
fontWeight = FontWeight.Normal,
|
|
223
|
+
textDecoration = TextDecoration.LineThrough
|
|
224
|
+
),
|
|
225
|
+
labelDefaultMedium: TextStyle = TextStyle(
|
|
226
|
+
fontSize = 14.sp,
|
|
227
|
+
lineHeight = 20.sp,
|
|
228
|
+
fontWeight = FontWeight.Medium
|
|
229
|
+
),
|
|
230
|
+
labelSMedium: TextStyle = TextStyle(
|
|
231
|
+
fontSize = 12.sp,
|
|
232
|
+
lineHeight = 18.sp,
|
|
233
|
+
fontWeight = FontWeight.Medium
|
|
234
|
+
),
|
|
235
|
+
labelXsMedium: TextStyle = TextStyle(
|
|
236
|
+
fontSize = 10.sp,
|
|
237
|
+
lineHeight = 14.sp,
|
|
238
|
+
fontWeight = FontWeight.Medium
|
|
239
|
+
),
|
|
240
|
+
actionDefaultBold: TextStyle = TextStyle(
|
|
241
|
+
fontSize = 16.sp,
|
|
242
|
+
lineHeight = 22.sp,
|
|
243
|
+
fontWeight = FontWeight.Bold
|
|
244
|
+
),
|
|
245
|
+
actionSBold: TextStyle = TextStyle(
|
|
246
|
+
fontSize = 14.sp,
|
|
247
|
+
lineHeight = 20.sp,
|
|
248
|
+
fontWeight = FontWeight.Bold
|
|
249
|
+
),
|
|
250
|
+
actionXsBold: TextStyle = TextStyle(
|
|
251
|
+
fontSize = 12.sp,
|
|
252
|
+
lineHeight = 18.sp,
|
|
253
|
+
fontWeight = FontWeight.Bold
|
|
254
|
+
),
|
|
255
|
+
actionXxsBold: TextStyle = TextStyle(
|
|
256
|
+
fontSize = 10.sp,
|
|
257
|
+
lineHeight = 14.sp,
|
|
258
|
+
fontWeight = FontWeight.Bold
|
|
259
|
+
),
|
|
260
|
+
) : this(
|
|
261
|
+
headlineDefaultBold = headlineDefaultBold,
|
|
262
|
+
headerMBold = headerMBold,
|
|
263
|
+
headerDefaultBold = headerDefaultBold,
|
|
264
|
+
headerSSemibold = headerSSemibold,
|
|
265
|
+
headerXsSemibold = headerXsSemibold,
|
|
266
|
+
bodyDefaultRegular = bodyDefaultRegular,
|
|
267
|
+
bodyDefaultRegularStrikethrough = bodyDefaultRegularStrikethrough,
|
|
268
|
+
descriptionDefaultRegular = descriptionDefaultRegular,
|
|
269
|
+
descriptionDefaultRegularStrikethrough = descriptionDefaultRegularStrikethrough,
|
|
270
|
+
descriptionXsRegular = descriptionXsRegular,
|
|
271
|
+
descriptionXsRegularStrikethrough = descriptionXsRegularStrikethrough,
|
|
272
|
+
labelDefaultMedium = labelDefaultMedium,
|
|
273
|
+
labelSMedium = labelSMedium,
|
|
274
|
+
labelXsMedium = labelXsMedium,
|
|
275
|
+
actionDefaultBold = actionDefaultBold,
|
|
276
|
+
actionSBold = actionSBold,
|
|
277
|
+
actionXsBold = actionXsBold,
|
|
278
|
+
actionXxsBold = actionXxsBold
|
|
279
|
+
)
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
val Typography = AppTypography()
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
package vn.momo.kits.layout
|
|
2
|
+
|
|
3
|
+
import androidx.compose.foundation.background
|
|
4
|
+
import androidx.compose.foundation.layout.Arrangement
|
|
5
|
+
import androidx.compose.foundation.layout.Box
|
|
6
|
+
import androidx.compose.foundation.layout.BoxWithConstraints
|
|
7
|
+
import androidx.compose.foundation.layout.ExperimentalLayoutApi
|
|
8
|
+
import androidx.compose.foundation.layout.FlowRow
|
|
9
|
+
import androidx.compose.foundation.layout.PaddingValues
|
|
10
|
+
import androidx.compose.foundation.layout.fillMaxWidth
|
|
11
|
+
import androidx.compose.foundation.layout.padding
|
|
12
|
+
import androidx.compose.foundation.shape.RoundedCornerShape
|
|
13
|
+
import androidx.compose.runtime.Composable
|
|
14
|
+
import androidx.compose.runtime.CompositionLocalProvider
|
|
15
|
+
import androidx.compose.ui.Modifier
|
|
16
|
+
import androidx.compose.ui.draw.clip
|
|
17
|
+
import androidx.compose.ui.draw.shadow
|
|
18
|
+
import androidx.compose.ui.graphics.Color
|
|
19
|
+
import androidx.compose.ui.unit.dp
|
|
20
|
+
import vn.momo.kits.components.Image
|
|
21
|
+
import vn.momo.kits.const.AppTheme
|
|
22
|
+
import vn.momo.kits.const.Radius
|
|
23
|
+
import vn.momo.kits.const.Spacing
|
|
24
|
+
|
|
25
|
+
@Composable
|
|
26
|
+
@OptIn(ExperimentalLayoutApi::class)
|
|
27
|
+
fun Card(
|
|
28
|
+
useShadow: Boolean = false,
|
|
29
|
+
backgroundImage: String? = null,
|
|
30
|
+
backgroundColor: Color? = null,
|
|
31
|
+
contentPadding: PaddingValues = PaddingValues(Spacing.M),
|
|
32
|
+
modifier: Modifier = Modifier,
|
|
33
|
+
content: @Composable () -> Unit,
|
|
34
|
+
) {
|
|
35
|
+
val columns = gridColumns()
|
|
36
|
+
val gap = Spacing.S
|
|
37
|
+
val shape = RoundedCornerShape(Radius.M)
|
|
38
|
+
var surface = modifier.fillMaxWidth().padding(horizontal = Spacing.M)
|
|
39
|
+
if (useShadow) surface = surface.shadow(6.dp, shape)
|
|
40
|
+
surface = surface.clip(shape).background(backgroundColor ?: AppTheme.current.colors.background.surface)
|
|
41
|
+
Box(modifier = surface) {
|
|
42
|
+
if (backgroundImage != null) {
|
|
43
|
+
Image(source = backgroundImage, modifier = Modifier.matchParentSize())
|
|
44
|
+
}
|
|
45
|
+
BoxWithConstraints(modifier = Modifier.fillMaxWidth().padding(contentPadding)) {
|
|
46
|
+
CompositionLocalProvider(LocalGridContext provides gridContext(constraints.maxWidth, columns, gap)) {
|
|
47
|
+
FlowRow(
|
|
48
|
+
horizontalArrangement = Arrangement.spacedBy(gap),
|
|
49
|
+
verticalArrangement = Arrangement.spacedBy(gap),
|
|
50
|
+
) { content() }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
package vn.momo.kits.layout
|
|
2
|
+
|
|
3
|
+
import androidx.compose.foundation.layout.Column
|
|
4
|
+
import androidx.compose.foundation.layout.height
|
|
5
|
+
import androidx.compose.foundation.layout.width
|
|
6
|
+
import androidx.compose.runtime.Composable
|
|
7
|
+
import androidx.compose.runtime.compositionLocalOf
|
|
8
|
+
import androidx.compose.ui.Modifier
|
|
9
|
+
import androidx.compose.ui.platform.LocalDensity
|
|
10
|
+
import androidx.compose.ui.unit.Dp
|
|
11
|
+
import androidx.compose.ui.unit.dp
|
|
12
|
+
import vn.momo.kits.platform.getScreenDimensions
|
|
13
|
+
import kotlin.math.floor
|
|
14
|
+
|
|
15
|
+
internal data class GridContext(
|
|
16
|
+
val numberOfColumns: Int = 12,
|
|
17
|
+
val gutterPx: Int = 0,
|
|
18
|
+
val columnPx: Float = 0f,
|
|
19
|
+
val density: Float = 1f,
|
|
20
|
+
) {
|
|
21
|
+
fun sizeForSpan(span: Int): Dp = (floor(columnPx * span + gutterPx * (span - 1)) / density).dp
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
internal val LocalGridContext = compositionLocalOf<GridContext?> { null }
|
|
25
|
+
|
|
26
|
+
@Composable
|
|
27
|
+
internal fun gridColumns(): Int = if (getScreenDimensions().width > 600) 24 else 12
|
|
28
|
+
|
|
29
|
+
@Composable
|
|
30
|
+
internal fun gridContext(maxWidthPx: Int, columns: Int, gap: Dp): GridContext {
|
|
31
|
+
val density = LocalDensity.current
|
|
32
|
+
val gutterPx = with(density) { gap.roundToPx() }
|
|
33
|
+
return GridContext(columns, gutterPx, (maxWidthPx - gutterPx * (columns - 1)).toFloat() / columns, density.density)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@Composable
|
|
37
|
+
fun Item(
|
|
38
|
+
widthSpan: Int? = null,
|
|
39
|
+
heightSpan: Int = 0,
|
|
40
|
+
modifier: Modifier = Modifier,
|
|
41
|
+
contentModifier: Modifier = Modifier,
|
|
42
|
+
content: @Composable () -> Unit,
|
|
43
|
+
) {
|
|
44
|
+
val grid = LocalGridContext.current
|
|
45
|
+
var m = modifier
|
|
46
|
+
if (grid != null) {
|
|
47
|
+
m = m.width(grid.sizeForSpan(widthSpan ?: grid.numberOfColumns))
|
|
48
|
+
if (heightSpan > 0) m = m.height(grid.sizeForSpan(heightSpan))
|
|
49
|
+
}
|
|
50
|
+
Column(modifier = m.then(contentModifier)) { content() }
|
|
51
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
package vn.momo.kits.layout
|
|
2
|
+
|
|
3
|
+
import androidx.compose.foundation.layout.Arrangement
|
|
4
|
+
import androidx.compose.foundation.layout.Box
|
|
5
|
+
import androidx.compose.foundation.layout.BoxWithConstraints
|
|
6
|
+
import androidx.compose.foundation.layout.ExperimentalLayoutApi
|
|
7
|
+
import androidx.compose.foundation.layout.FlowRow
|
|
8
|
+
import androidx.compose.foundation.layout.fillMaxWidth
|
|
9
|
+
import androidx.compose.foundation.layout.padding
|
|
10
|
+
import androidx.compose.runtime.Composable
|
|
11
|
+
import androidx.compose.runtime.CompositionLocalProvider
|
|
12
|
+
import androidx.compose.ui.Modifier
|
|
13
|
+
import androidx.compose.ui.unit.dp
|
|
14
|
+
import vn.momo.kits.components.Image
|
|
15
|
+
import vn.momo.kits.const.Spacing
|
|
16
|
+
|
|
17
|
+
@Composable
|
|
18
|
+
@OptIn(ExperimentalLayoutApi::class)
|
|
19
|
+
fun Section(
|
|
20
|
+
useMargin: Boolean = true,
|
|
21
|
+
backgroundImage: String? = null,
|
|
22
|
+
modifier: Modifier = Modifier,
|
|
23
|
+
content: @Composable () -> Unit,
|
|
24
|
+
) {
|
|
25
|
+
val columns = gridColumns()
|
|
26
|
+
val gap = Spacing.M
|
|
27
|
+
val margin = if (useMargin) Spacing.M else 0.dp
|
|
28
|
+
Box(modifier = Modifier.fillMaxWidth().padding(horizontal = margin).then(modifier)) {
|
|
29
|
+
if (backgroundImage != null) {
|
|
30
|
+
Image(source = backgroundImage, modifier = Modifier.matchParentSize())
|
|
31
|
+
}
|
|
32
|
+
BoxWithConstraints(modifier = Modifier.fillMaxWidth()) {
|
|
33
|
+
CompositionLocalProvider(LocalGridContext provides gridContext(constraints.maxWidth, columns, gap)) {
|
|
34
|
+
FlowRow(
|
|
35
|
+
horizontalArrangement = Arrangement.spacedBy(gap),
|
|
36
|
+
verticalArrangement = Arrangement.spacedBy(gap),
|
|
37
|
+
) { content() }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
package vn.momo.kits.modifier
|
|
2
|
+
|
|
3
|
+
import androidx.compose.ui.Modifier
|
|
4
|
+
import androidx.compose.ui.node.ModifierNodeElement
|
|
5
|
+
import androidx.compose.ui.node.SemanticsModifierNode
|
|
6
|
+
import androidx.compose.ui.semantics.SemanticsPropertyReceiver
|
|
7
|
+
import androidx.compose.ui.semantics.contentDescription
|
|
8
|
+
import androidx.compose.ui.semantics.semantics
|
|
9
|
+
import androidx.compose.ui.semantics.testTag
|
|
10
|
+
import vn.momo.kits.platform.getPlatformName
|
|
11
|
+
|
|
12
|
+
fun Modifier.setAutomationId(accessibilityId: String, mergeDescendants: Boolean = false): Modifier {
|
|
13
|
+
return if (getPlatformName() == "Android") {
|
|
14
|
+
semantics {
|
|
15
|
+
contentDescription = accessibilityId
|
|
16
|
+
}
|
|
17
|
+
} else {
|
|
18
|
+
semantics(mergeDescendants = mergeDescendants) {
|
|
19
|
+
testTag = accessibilityId
|
|
20
|
+
}
|
|
21
|
+
}}
|
|
22
|
+
|
|
23
|
+
fun Modifier.kitsAutomationId(accessibilityId: String, label: String? = null) =
|
|
24
|
+
this then KitsAutomationIdElement(accessibilityId, label)
|
|
25
|
+
|
|
26
|
+
private data class KitsAutomationIdElement(
|
|
27
|
+
private val accessibilityId: String,
|
|
28
|
+
private val label: String? = null,
|
|
29
|
+
) : ModifierNodeElement<KitsAutomationIdNode>() {
|
|
30
|
+
override fun create(): KitsAutomationIdNode {
|
|
31
|
+
return KitsAutomationIdNode(accessibilityId, label)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
override fun update(node: KitsAutomationIdNode) {
|
|
35
|
+
node.accessibilityId = accessibilityId
|
|
36
|
+
node.label = label
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
private class KitsAutomationIdNode(
|
|
41
|
+
var accessibilityId: String,
|
|
42
|
+
var label: String?,
|
|
43
|
+
) : Modifier.Node(), SemanticsModifierNode {
|
|
44
|
+
override fun SemanticsPropertyReceiver.applySemantics() {
|
|
45
|
+
if (getPlatformName() == "Android") {
|
|
46
|
+
contentDescription = accessibilityId
|
|
47
|
+
} else {
|
|
48
|
+
testTag = accessibilityId
|
|
49
|
+
contentDescription = label ?: accessibilityId
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|