@momo-kits/native-kits 0.163.1-beta.2 → 0.163.1-beta.20-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/settings.local.json +112 -0
- package/CLAUDE.md +1 -1
- package/build.gradle.kts +11 -0
- package/compose/build.gradle.kts +190 -0
- package/compose/build.gradle.kts.backup +190 -0
- package/compose/compose.podspec +47 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/navigation/ScrollToTop.android.kt +6 -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 +150 -0
- 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 +52 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +106 -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 +826 -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 +56 -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 +23 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +76 -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 +112 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +477 -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 +214 -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 +216 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +259 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +182 -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 +217 -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 +470 -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 +131 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +203 -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 +175 -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/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 +188 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +276 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +52 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +38 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +39 -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/ModalScreen.kt +129 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +100 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +172 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +372 -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 +581 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +156 -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 +320 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +81 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +309 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +34 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +360 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +132 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/tracking/ScreenTracker.kt +127 -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 +69 -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/iosMain/kotlin/vn/momo/kits/navigation/ScrollToTop.ios.kt +32 -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 +207 -0
- package/gradle/libs.versions.toml +69 -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 +15 -3
- package/ios/Application/Components.swift +36 -30
- package/ios/Application/FloatingButton.swift +10 -9
- package/ios/Application/Localize.swift +309 -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 +203 -0
- package/ios/Application/Navigation/NavigationOptions.swift +109 -0
- package/ios/Application/Navigation/Navigator.swift +385 -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/NavigationHeaderRight.swift +196 -0
- package/ios/Application/Screen.swift +2 -1
- package/ios/Application/StackScreen.swift +501 -0
- package/ios/Avatar/Avatar.swift +193 -0
- package/ios/Badge/Badge.swift +11 -14
- package/ios/Badge/BadgeRibbon.swift +91 -17
- package/ios/BaselineView/BaselineView.swift +163 -0
- package/ios/Button/Button.swift +137 -28
- package/ios/Carousel/Carousel.swift +196 -0
- package/ios/Checkbox/Checkbox.swift +23 -28
- package/ios/Chip/Chip.swift +56 -33
- package/ios/Collapse/Collapse.swift +192 -0
- package/ios/Colors+Radius+Spacing/Colors.swift +20 -17
- 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 +10 -1
- package/ios/IconButton/IconButton.swift +140 -0
- package/ios/Image/Image.swift +16 -3
- package/ios/Information/Information.swift +3 -1
- package/ios/Input/ErrorView.swift +3 -1
- package/ios/Input/Input.swift +72 -33
- package/ios/Input/InputPhoneNumber.swift +33 -21
- package/ios/Input/InputSearch.swift +107 -48
- package/ios/Input/InputTextArea.swift +134 -64
- package/ios/InputDropDown/InputDropDown.swift +201 -0
- package/ios/InputMoney/InputMoney.swift +347 -0
- package/ios/InputOTP/InputOTP.swift +210 -0
- package/ios/Loader/Loader.swift +113 -0
- package/ios/MoMoUIKits.podspec +5 -0
- 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 +11 -20
- package/ios/Popup/PopupInput.swift +2 -8
- package/ios/Popup/PopupNotify.swift +218 -0
- package/ios/Popup/PopupPromotion.swift +5 -3
- package/ios/ProgressInfo/ProgressInfo.swift +296 -0
- package/ios/Radio/Radio.swift +69 -0
- package/ios/Rating/Rating.swift +82 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/AccentColor.colorset/Contents.json +11 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/Background.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/Border.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/Card.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/Contents.json +6 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/Error.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/Primary.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/PrimaryDark.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/PrimaryLight.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/Secondary.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/Success.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/Text.colorset/Contents.json +38 -0
- package/ios/Resources/MoMoUIKitsColors.xcassets/TextSecondary.colorset/Contents.json +38 -0
- 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/Resources/MoMoUIKitsColors.xcassets/Warning.colorset/Contents.json +38 -0
- package/ios/Skeleton/Skeleton.swift +99 -0
- package/ios/Slider/Slider.swift +237 -0
- package/ios/Stepper/Stepper.swift +220 -0
- package/ios/Steps/Steps.swift +467 -0
- package/ios/SuggestAction/SuggestAction.swift +99 -0
- package/ios/Swipeable/SwipeCell.swift +187 -0
- 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 +98 -0
- package/ios/Template/TrustBanner/TrustBanner.swift +7 -8
- package/ios/Title/Title.swift +269 -0
- package/ios/Tooltip/Tooltip.swift +485 -0
- package/ios/Typography/FontScaleStore.swift +19 -0
- package/ios/Typography/Text.swift +86 -17
- package/ios/Typography/Typography.swift +12 -14
- package/ios/Uploader/Uploader.swift +174 -0
- package/ios/native-kits.podspec +61 -8
- 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 +93 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BadgeDemo.swift +269 -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 +100 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CarouselDemo.swift +126 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CheckboxDemo.swift +64 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ChipDemo.swift +20 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CollapseDemo.swift +93 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ContentView.swift +107 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DateTimePickerDemo.swift +124 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DividerDemo.swift +14 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/HeaderUserDemo.swift +49 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/Home.swift +279 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/IconButtonDemo.swift +58 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ImageDemo.swift +78 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InformationDemo.swift +138 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputDemo.swift +111 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputDropDownDemo.swift +136 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputMoneyDemo.swift +107 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputOTPDemo.swift +73 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputPhoneNumberDemo.swift +100 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputSearchDemo.swift +32 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputTextAreaDemo.swift +57 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/LoaderDemo.swift +70 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/LocalizeDemo.swift +188 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/NavigationDemo.swift +229 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PaginationDemo.swift +72 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupDisplayDemo.swift +175 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupNotifyDemo.swift +121 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupPromotionDemo.swift +76 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ProgressInfoDemo.swift +89 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/RadioDemo.swift +32 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/RatingDemo.swift +56 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SkeletonDemo.swift +32 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SliderDemo.swift +150 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SnackBarDemo.swift +138 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/StepperDemo.swift +103 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/StepsDemo.swift +94 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SuggestActionDemo.swift +79 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SwipeDemo.swift +152 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SwitchDemo.swift +33 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TabViewDemo.swift +190 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TagDemo.swift +34 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ThemeDemo.swift +182 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TitleDemo.swift +109 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TooltipDemo.swift +187 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TypographyDemo.swift +87 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/UploaderDemo.swift +131 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SwiftUIDemoBrowserView.swift +51 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/UIKitsDemoModels.swift +15 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/UIKitsDemoRegistry.swift +73 -0
- package/local.properties +8 -0
- package/package.json +1 -1
- package/publish.sh +53 -0
- package/scripts/gen-ios-color.mjs +136 -0
- package/settings.gradle.kts +64 -0
- package/example/ios/Example.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- package/example/ios/Example.xcworkspace/xcuserdata/huynhdung.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/example/ios/Example.xcworkspace/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +0 -5
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/Pods-Example.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SDWebImage.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SkeletonUI.xcscheme +0 -58
- package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +0 -46
- package/ios/Application/FontScaleStore.swift +0 -59
|
@@ -11,35 +11,33 @@ public extension View {
|
|
|
11
11
|
|
|
12
12
|
public extension Font {
|
|
13
13
|
static func appFont(size: CGFloat) -> Font {
|
|
14
|
-
|
|
14
|
+
if !FontScaleStore.shared.useOSScaleRate {
|
|
15
|
+
return Font.system(size: size * FontScaleStore.shared.userScaleRate)
|
|
16
|
+
}
|
|
15
17
|
let defaultScreenSize: CGFloat = 375
|
|
16
18
|
let maxFontScale: CGFloat = 1.5
|
|
17
19
|
let maxDeviceScale: CGFloat = 5
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
let scaled = customRate > 1 ? size * customRate : size
|
|
22
|
-
return Font.system(size: scaled)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
let deviceScale = UIScreen.main.bounds.width / defaultScreenSize
|
|
21
|
+
let deviceWidth = UIScreen.main.bounds.width
|
|
22
|
+
let deviceScale = deviceWidth / defaultScreenSize
|
|
26
23
|
|
|
27
24
|
let defaultFont = UIFont.systemFont(ofSize: UIFont.labelFontSize)
|
|
28
25
|
let scaledFont = UIFontMetrics.default.scaledFont(for: defaultFont)
|
|
29
|
-
let
|
|
26
|
+
let fontScale = scaledFont.pointSize / defaultFont.pointSize
|
|
30
27
|
|
|
31
28
|
var fontSize = size
|
|
32
29
|
|
|
33
30
|
if deviceScale > 1 {
|
|
34
31
|
fontSize = min(fontSize * deviceScale, fontSize + maxDeviceScale)
|
|
35
32
|
}
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
|
|
34
|
+
if fontScale > 1 {
|
|
35
|
+
fontSize = min(fontSize * fontScale, fontSize * maxFontScale)
|
|
38
36
|
}
|
|
39
37
|
|
|
40
38
|
return Font.system(size: fontSize)
|
|
41
39
|
}
|
|
42
|
-
|
|
40
|
+
|
|
43
41
|
// New supported typography styles
|
|
44
42
|
static let headline_default_bold = appFont(size: 24).weight(.bold)
|
|
45
43
|
static let header_m_bold = appFont(size: 18).weight(.bold)
|
|
@@ -57,7 +55,7 @@ public extension Font {
|
|
|
57
55
|
static let action_s_bold = appFont(size: 14).weight(.bold)
|
|
58
56
|
static let action_xs_bold = appFont(size: 12).weight(.bold)
|
|
59
57
|
static let action_xxs_bold = appFont(size: 10).weight(.bold)
|
|
60
|
-
|
|
58
|
+
|
|
61
59
|
// Legacy styles
|
|
62
60
|
static let headline_default = appFont(size: 28).weight(.semibold)
|
|
63
61
|
static let headline_s = appFont(size: 24).weight(.semibold)
|
|
@@ -82,7 +80,7 @@ public extension Font {
|
|
|
82
80
|
static let action_xxs = appFont(size: 10).weight(.bold)
|
|
83
81
|
static let action_xs = appFont(size: 12).weight(.bold)
|
|
84
82
|
static let action_s = appFont(size: 15).weight(.bold)
|
|
85
|
-
|
|
83
|
+
|
|
86
84
|
// deprecated
|
|
87
85
|
static let h1 = appFont(size: 36).weight(.semibold) //headline_xl
|
|
88
86
|
static let h2 = appFont(size: 32).weight(.semibold)
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import SwiftUI
|
|
2
|
+
|
|
3
|
+
/// Native SwiftUI port of the Compose `Uploader` component.
|
|
4
|
+
///
|
|
5
|
+
/// Renders a horizontal row with an optional dashed "add image" picker cell
|
|
6
|
+
/// followed by a horizontally scrollable list of uploaded image thumbnails.
|
|
7
|
+
/// Each thumbnail can show a loading shimmer overlay and an optional cancel
|
|
8
|
+
/// button.
|
|
9
|
+
///
|
|
10
|
+
/// Mirrors the Compose surface in
|
|
11
|
+
/// `compose/.../components/Uploader.kt`:
|
|
12
|
+
/// - `images`, `numberOfImages`, `disabled`, `width`, `height`
|
|
13
|
+
/// - callbacks `onAdd`, `onCancel`, `onPressImage`
|
|
14
|
+
///
|
|
15
|
+
/// Note: like Compose, this component does NOT perform any native photo-picker
|
|
16
|
+
/// or file-system access. It exposes the `onAdd` callback so the host can
|
|
17
|
+
/// present a picker and supply the resulting image data back via the `images`
|
|
18
|
+
/// list (the demo passes mock image URLs).
|
|
19
|
+
public struct UploadImage: Identifiable {
|
|
20
|
+
public let id = UUID()
|
|
21
|
+
public var uri: String?
|
|
22
|
+
public var loading: Bool
|
|
23
|
+
|
|
24
|
+
public init(uri: String? = nil, loading: Bool = false) {
|
|
25
|
+
self.uri = uri
|
|
26
|
+
self.loading = loading
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
public struct Uploader: View {
|
|
31
|
+
// MARK: Properties
|
|
32
|
+
|
|
33
|
+
private let images: [UploadImage]
|
|
34
|
+
private let numberOfImages: Int
|
|
35
|
+
private let disabled: Bool
|
|
36
|
+
private let width: CGFloat
|
|
37
|
+
private let height: CGFloat
|
|
38
|
+
private let onAdd: () -> Void
|
|
39
|
+
private let onCancel: ((UploadImage, Int) -> Void)?
|
|
40
|
+
private let onPressImage: (UploadImage, Int) -> Void
|
|
41
|
+
|
|
42
|
+
// MARK: Lifecycle
|
|
43
|
+
|
|
44
|
+
public init(
|
|
45
|
+
images: [UploadImage],
|
|
46
|
+
numberOfImages: Int = 1,
|
|
47
|
+
disabled: Bool = false,
|
|
48
|
+
width: CGFloat = 64,
|
|
49
|
+
height: CGFloat = 64,
|
|
50
|
+
onAdd: @escaping () -> Void = {},
|
|
51
|
+
onCancel: ((UploadImage, Int) -> Void)? = nil,
|
|
52
|
+
onPressImage: @escaping (UploadImage, Int) -> Void = { _, _ in }
|
|
53
|
+
) {
|
|
54
|
+
self.images = images
|
|
55
|
+
self.numberOfImages = numberOfImages
|
|
56
|
+
self.disabled = disabled
|
|
57
|
+
self.width = width
|
|
58
|
+
self.height = height
|
|
59
|
+
self.onAdd = onAdd
|
|
60
|
+
self.onCancel = onCancel
|
|
61
|
+
self.onPressImage = onPressImage
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// MARK: Body
|
|
65
|
+
|
|
66
|
+
private var shouldShowPicker: Bool {
|
|
67
|
+
images.count < numberOfImages
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
public var body: some View {
|
|
71
|
+
HStack(alignment: .top, spacing: Spacing.S) {
|
|
72
|
+
if shouldShowPicker {
|
|
73
|
+
UploaderPickerCell(
|
|
74
|
+
disabled: disabled,
|
|
75
|
+
width: width,
|
|
76
|
+
height: height,
|
|
77
|
+
onAdd: onAdd
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
ScrollView(.horizontal, showsIndicators: false) {
|
|
82
|
+
HStack(alignment: .top, spacing: Spacing.S) {
|
|
83
|
+
ForEach(Array(images.enumerated()), id: \.element.id) { index, image in
|
|
84
|
+
UploaderImageItem(
|
|
85
|
+
image: image,
|
|
86
|
+
width: width,
|
|
87
|
+
height: height,
|
|
88
|
+
index: index,
|
|
89
|
+
onCancel: onCancel,
|
|
90
|
+
onPressImage: { onPressImage(image, index) }
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// MARK: - Picker cell
|
|
100
|
+
|
|
101
|
+
private struct UploaderPickerCell: View {
|
|
102
|
+
@Environment(\.appTheme) private var theme
|
|
103
|
+
|
|
104
|
+
let disabled: Bool
|
|
105
|
+
let width: CGFloat
|
|
106
|
+
let height: CGFloat
|
|
107
|
+
let onAdd: () -> Void
|
|
108
|
+
|
|
109
|
+
// text.disable / text.hint and border.disable / border.default tokens.
|
|
110
|
+
private var mainColor: Color { disabled ? theme.colors.text.disable : theme.colors.text.hint }
|
|
111
|
+
private var borderColor: Color { disabled ? theme.colors.border.disable : theme.colors.border.default }
|
|
112
|
+
|
|
113
|
+
var body: some View {
|
|
114
|
+
SwiftUI.Button(action: { if !disabled { onAdd() } }) {
|
|
115
|
+
VStack(spacing: Spacing.XXS) {
|
|
116
|
+
Icon(source: "16_navigation_plus", size: 16, color: mainColor)
|
|
117
|
+
MomoText("Thêm hình", typography: .descriptionXsRegular, color: mainColor)
|
|
118
|
+
}
|
|
119
|
+
.frame(width: width, height: height)
|
|
120
|
+
.background(
|
|
121
|
+
RoundedRectangle(cornerRadius: Radius.XS)
|
|
122
|
+
.strokeBorder(
|
|
123
|
+
borderColor,
|
|
124
|
+
style: StrokeStyle(lineWidth: 1, dash: [10, 6])
|
|
125
|
+
)
|
|
126
|
+
)
|
|
127
|
+
.clipShape(RoundedRectangle(cornerRadius: Radius.XS))
|
|
128
|
+
}
|
|
129
|
+
.buttonStyle(ActiveOpacityButtonStyle())
|
|
130
|
+
.disabled(disabled)
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// MARK: - Image item
|
|
135
|
+
|
|
136
|
+
private struct UploaderImageItem: View {
|
|
137
|
+
let image: UploadImage
|
|
138
|
+
let width: CGFloat
|
|
139
|
+
let height: CGFloat
|
|
140
|
+
let index: Int
|
|
141
|
+
let onCancel: ((UploadImage, Int) -> Void)?
|
|
142
|
+
let onPressImage: () -> Void
|
|
143
|
+
|
|
144
|
+
var body: some View {
|
|
145
|
+
SwiftUI.Button(action: onPressImage) {
|
|
146
|
+
ZStack(alignment: .topTrailing) {
|
|
147
|
+
ImageView(image.uri ?? "", contentMode: .fill)
|
|
148
|
+
.frame(width: width, height: height)
|
|
149
|
+
.clipShape(RoundedRectangle(cornerRadius: Radius.XS))
|
|
150
|
+
|
|
151
|
+
if image.loading {
|
|
152
|
+
Skeleton()
|
|
153
|
+
.frame(width: width, height: height)
|
|
154
|
+
.clipShape(RoundedRectangle(cornerRadius: Radius.XS))
|
|
155
|
+
.background(
|
|
156
|
+
Color.white.opacity(0.4)
|
|
157
|
+
.clipShape(RoundedRectangle(cornerRadius: Radius.XS))
|
|
158
|
+
)
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if let onCancel, !image.loading {
|
|
162
|
+
SwiftUI.Button(action: { onCancel(image, index) }) {
|
|
163
|
+
Icon(source: "navigation_close_circle_full", size: 16, color: nil)
|
|
164
|
+
}
|
|
165
|
+
.buttonStyle(ActiveOpacityButtonStyle())
|
|
166
|
+
.padding(.top, Spacing.XXS)
|
|
167
|
+
.padding(.trailing, Spacing.XXS)
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
.frame(width: width, height: height)
|
|
171
|
+
}
|
|
172
|
+
.buttonStyle(ActiveOpacityButtonStyle())
|
|
173
|
+
}
|
|
174
|
+
}
|
package/ios/native-kits.podspec
CHANGED
|
@@ -1,21 +1,74 @@
|
|
|
1
1
|
Pod::Spec.new do |s|
|
|
2
2
|
s.name = 'MoMoUIKits'
|
|
3
|
-
s.version = '1.
|
|
3
|
+
s.version = '0.163.1-beta.20'
|
|
4
4
|
s.summary = 'MoMoUIKits for iOS'
|
|
5
5
|
s.homepage = 'https://momo.vn'
|
|
6
|
-
s.license = { :type => 'MIT'
|
|
6
|
+
s.license = { :type => 'MIT' }
|
|
7
7
|
s.author = { 'MoMo' => 'dev@momo.vn' }
|
|
8
8
|
s.source = { :path => '.' }
|
|
9
9
|
|
|
10
10
|
s.ios.deployment_target = '15.0'
|
|
11
11
|
s.swift_version = '5.0'
|
|
12
|
+
s.module_name = 'MoMoUIKits'
|
|
12
13
|
|
|
13
|
-
s.source_files =
|
|
14
|
+
s.source_files = [
|
|
15
|
+
"Application/**/*.{swift,m,h}",
|
|
16
|
+
"Avatar/**/*.{swift,m,h}",
|
|
17
|
+
"Badge/**/*.{swift,m,h}",
|
|
18
|
+
"BaselineView/**/*.{swift,m,h}",
|
|
19
|
+
"Button/**/*.{swift,m,h}",
|
|
20
|
+
"CalculatorKeyboard/**/*.{swift,m,h}",
|
|
21
|
+
"Carousel/**/*.{swift,m,h}",
|
|
22
|
+
"Checkbox/**/*.{swift,m,h}",
|
|
23
|
+
"Chip/**/*.{swift,m,h}",
|
|
24
|
+
"Collapse/**/*.{swift,m,h}",
|
|
25
|
+
"Colors+Radius+Spacing/**/*.{swift,m,h}",
|
|
26
|
+
"DateTimePicker/**/*.{swift,m,h}",
|
|
27
|
+
"Divider/**/*.{swift,m,h}",
|
|
28
|
+
"Extensions/**/*.{swift,m,h}",
|
|
29
|
+
"Icon/**/*.{swift,m,h}",
|
|
30
|
+
"IconButton/**/*.{swift,m,h}",
|
|
31
|
+
"Image/**/*.{swift,m,h}",
|
|
32
|
+
"Information/**/*.{swift,m,h}",
|
|
33
|
+
"Input/**/*.{swift,m,h}",
|
|
34
|
+
"InputDropDown/**/*.{swift,m,h}",
|
|
35
|
+
"InputMoney/**/*.{swift,m,h}",
|
|
36
|
+
"InputOTP/**/*.{swift,m,h}",
|
|
37
|
+
"Loader/**/*.{swift,m,h}",
|
|
38
|
+
"Lottie/**/*.{swift,m,h}",
|
|
39
|
+
"OTPKeyboard/**/*.{swift,m,h}",
|
|
40
|
+
"Pagination/**/*.{swift,m,h}",
|
|
41
|
+
"Popup/**/*.{swift,m,h}",
|
|
42
|
+
"PopupView/**/*.{swift,m,h}",
|
|
43
|
+
"ProgressInfo/**/*.{swift,m,h}",
|
|
44
|
+
"Radio/**/*.{swift,m,h}",
|
|
45
|
+
"Rating/**/*.{swift,m,h}",
|
|
46
|
+
"ScrollIndicator/**/*.{swift,m,h}",
|
|
47
|
+
"Skeleton/**/*.{swift,m,h}",
|
|
48
|
+
"Slider/**/*.{swift,m,h}",
|
|
49
|
+
"StatusBarTap/**/*.{swift,m,h}",
|
|
50
|
+
"Stepper/**/*.{swift,m,h}",
|
|
51
|
+
"Steps/**/*.{swift,m,h}",
|
|
52
|
+
"SuggestAction/**/*.{swift,m,h}",
|
|
53
|
+
"Swipeable/**/*.{swift,m,h}",
|
|
54
|
+
"Switch/**/*.{swift,m,h}",
|
|
55
|
+
"TabView/**/*.{swift,m,h}",
|
|
56
|
+
"Tag/**/*.{swift,m,h}",
|
|
57
|
+
"Template/**/*.{swift,m,h}",
|
|
58
|
+
"Title/**/*.{swift,m,h}",
|
|
59
|
+
"Tooltip/**/*.{swift,m,h}",
|
|
60
|
+
"Typography/**/*.{swift,m,h}",
|
|
61
|
+
"Uploader/**/*.{swift,m,h}"
|
|
62
|
+
]
|
|
63
|
+
s.resource_bundles = {
|
|
64
|
+
'MoMoUIKitsResources' => ['Resources/**/*']
|
|
65
|
+
}
|
|
14
66
|
s.public_header_files = "StatusBarTap/*.h"
|
|
15
|
-
s.
|
|
16
|
-
s.
|
|
17
|
-
|
|
67
|
+
s.frameworks = 'SwiftUI', 'Combine'
|
|
68
|
+
s.pod_target_xcconfig = {
|
|
69
|
+
'DEFINES_MODULE' => 'YES'
|
|
70
|
+
}
|
|
71
|
+
s.dependency 'SDWebImageSwiftUI', '2.2.1'
|
|
72
|
+
s.dependency 'lottie-ios', '4.6.0'
|
|
18
73
|
s.dependency 'SkeletonUI', '1.0.11'
|
|
19
74
|
end
|
|
20
|
-
|
|
21
|
-
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Pod::Spec.new do |s|
|
|
2
|
+
s.name = 'MoMoUIKitsDemo'
|
|
3
|
+
s.version = '0.163.1-beta.20'
|
|
4
|
+
s.summary = 'Demo browser for MoMoUIKits SwiftUI components'
|
|
5
|
+
s.homepage = 'https://momo.vn'
|
|
6
|
+
s.license = { :type => 'MIT' }
|
|
7
|
+
s.author = { 'MoMo' => 'dev@momo.vn' }
|
|
8
|
+
s.source = { :path => '.' }
|
|
9
|
+
|
|
10
|
+
s.ios.deployment_target = '15.0'
|
|
11
|
+
s.swift_version = '5.0'
|
|
12
|
+
|
|
13
|
+
s.source_files = 'Sources/**/*.{swift}'
|
|
14
|
+
s.resource_bundles = {
|
|
15
|
+
'MoMoUIKitsDemoResources' => ['Resources/**/*']
|
|
16
|
+
}
|
|
17
|
+
s.frameworks = 'SwiftUI', 'UIKit'
|
|
18
|
+
s.dependency 'MoMoUIKits'
|
|
19
|
+
s.dependency 'lottie-ios', '4.6.0'
|
|
20
|
+
end
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# MoMoUIKitsDemo
|
|
2
|
+
|
|
3
|
+
SwiftUI demo browser for `MoMoUIKits`.
|
|
4
|
+
|
|
5
|
+
The package can optionally host a Compose UIKits screen by receiving a
|
|
6
|
+
`UIViewController` factory from the host app. It does not import the KMP
|
|
7
|
+
`shared` module directly.
|
|
8
|
+
|
|
9
|
+
SwiftUI mode reuses the full demo screen set from
|
|
10
|
+
`sample/iosApp/iosApp/Demo`, including the sample `HomeView` registry and demo
|
|
11
|
+
screens for all currently available components.
|
|
12
|
+
|
|
13
|
+
## CocoaPods
|
|
14
|
+
|
|
15
|
+
In the host app `Podfile`, include both local pods:
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
pod 'MoMoUIKits', :path => '../momo-native-kits/ios/native-kits.podspec'
|
|
19
|
+
pod 'MoMoUIKitsDemo', :path => '../momo-native-kits/ios-demo'
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Adjust the relative paths to match the host app checkout.
|
|
23
|
+
|
|
24
|
+
## Host App Usage
|
|
25
|
+
|
|
26
|
+
```swift
|
|
27
|
+
import MoMoUIKitsDemo
|
|
28
|
+
import shared
|
|
29
|
+
|
|
30
|
+
class UIKitsViewController: BaseComposeAppViewController {
|
|
31
|
+
override func getViewController() -> UIViewController? {
|
|
32
|
+
let params = self.application.data as? [String: Any]
|
|
33
|
+
|
|
34
|
+
return MoMoUIKitsDemoViewControllerFactory.make(
|
|
35
|
+
context: MoMoUIKitsDemoContext(
|
|
36
|
+
appId: params?["appId"] as? String ?? "",
|
|
37
|
+
appCode: params?["code"] as? String ?? "",
|
|
38
|
+
appName: params?["name"] as? String,
|
|
39
|
+
appIcon: params?["icon"] as? String ?? ""
|
|
40
|
+
),
|
|
41
|
+
composeViewController: {
|
|
42
|
+
UIKitsScreenComposeViewControllerKt.UIKitsScreenComposeViewController(
|
|
43
|
+
params: params
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
override func viewDidDisappear(_ animated: Bool) {
|
|
50
|
+
super.viewDidDisappear(animated)
|
|
51
|
+
composeViewController = nil
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
If the host does not pass `composeViewController`, the demo opens directly in
|
|
57
|
+
SwiftUI mode.
|
|
58
|
+
|
|
59
|
+
## Included SwiftUI Demos
|
|
60
|
+
|
|
61
|
+
The pod includes the sample demo screens for:
|
|
62
|
+
|
|
63
|
+
- Animated Header
|
|
64
|
+
- Avatar
|
|
65
|
+
- Badge
|
|
66
|
+
- Baseline View
|
|
67
|
+
- Bottom Tab
|
|
68
|
+
- Button
|
|
69
|
+
- Carousel
|
|
70
|
+
- Checkbox
|
|
71
|
+
- Chip
|
|
72
|
+
- Collapse
|
|
73
|
+
- DateTimePicker
|
|
74
|
+
- Divider
|
|
75
|
+
- Header User
|
|
76
|
+
- Icon Button
|
|
77
|
+
- Image
|
|
78
|
+
- Information
|
|
79
|
+
- Input
|
|
80
|
+
- Input DropDown
|
|
81
|
+
- Input Money
|
|
82
|
+
- Input OTP
|
|
83
|
+
- Input Phone Number
|
|
84
|
+
- Input Search
|
|
85
|
+
- Input TextArea
|
|
86
|
+
- Loader
|
|
87
|
+
- Navigation
|
|
88
|
+
- Pagination
|
|
89
|
+
- Popup Display
|
|
90
|
+
- Popup Notify
|
|
91
|
+
- Popup Promotion
|
|
92
|
+
- Progress Info
|
|
93
|
+
- Radio
|
|
94
|
+
- Rating
|
|
95
|
+
- Skeleton
|
|
96
|
+
- Slider
|
|
97
|
+
- SnackBar
|
|
98
|
+
- Stepper
|
|
99
|
+
- Steps
|
|
100
|
+
- Suggest Action
|
|
101
|
+
- Swipe
|
|
102
|
+
- Switch
|
|
103
|
+
- TabView
|
|
104
|
+
- Tag
|
|
105
|
+
- Theme
|
|
106
|
+
- Title
|
|
107
|
+
- Tooltip
|
|
108
|
+
- Typography
|
|
109
|
+
- Uploader
|
|
110
|
+
|
|
111
|
+
## Validation Notes
|
|
112
|
+
|
|
113
|
+
Validated locally with:
|
|
114
|
+
|
|
115
|
+
```sh
|
|
116
|
+
pod ipc spec ios/MoMoUIKits.podspec
|
|
117
|
+
pod ipc spec ios-demo/MoMoUIKitsDemo.podspec
|
|
118
|
+
pod lib lint ios/MoMoUIKits.podspec --allow-warnings --skip-import-validation
|
|
119
|
+
pod lib lint ios-demo/MoMoUIKitsDemo.podspec --allow-warnings --skip-import-validation --include-podspecs=ios/MoMoUIKits.podspec
|
|
120
|
+
```
|