@momo-kits/native-kits 0.169.6 → 0.169.7-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/build.gradle.kts +11 -0
- package/compose/build.gradle.kts +198 -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 +154 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/ReduceMotion.android.kt +17 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/ReservedRegions.android.kt +6 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +110 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/DesignSystemKits.kt +62 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +1067 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Localize.kt +267 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/WidgetContainer.kt +56 -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 +115 -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 +482 -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 +224 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +195 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +473 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +113 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +263 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +235 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +228 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +265 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +183 -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 +40 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +82 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +39 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +363 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +108 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ProgressInfo.kt +307 -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 +88 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Slider.kt +306 -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 +457 -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 +205 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +89 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/TabView.kt +542 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +86 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +120 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +201 -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 +210 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +180 -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 +12 -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 +292 -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 +50 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/ModalLayout.kt +184 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/ScreenLayout.kt +316 -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 +397 -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 +153 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +113 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +205 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +422 -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 +727 -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 +35 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +239 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +430 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +100 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/DuoBarCompression.kt +97 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/DuoTabBar.kt +208 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/TabBarMetrics.kt +129 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +167 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +456 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +105 -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 +74 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +399 -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 +363 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SideBar.kt +204 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +133 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/tracking/ScreenTracker.kt +127 -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 +114 -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 +76 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ReduceMotion.kt +7 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ReservedRegions.kt +22 -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 +118 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/const/HostFont.ios.kt +42 -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 +32 -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 +218 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/ReduceMotion.ios.kt +48 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/ReservedRegions.ios.kt +144 -0
- package/gradle/libs.versions.toml +67 -0
- package/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/gradle/wrapper/gradle-wrapper.properties +8 -0
- package/gradle.properties +24 -0
- package/gradlew +252 -0
- package/gradlew.bat +94 -0
- package/ios/Application/ApplicationEnvironment.swift +2 -3
- package/ios/Application/DesignSystemKits.swift +4 -20
- package/ios/Application/DesignSystemKitsPayload.swift +0 -8
- package/ios/Application/LanguageSource.swift +0 -8
- package/ios/Application/Localize.swift +7 -31
- package/ios/Application/LocalizeModifier.swift +0 -8
- package/ios/Application/MaxApi.swift +3 -11
- package/ios/Avatar/Avatar.swift +0 -1
- package/ios/Badge/Badge.swift +0 -1
- package/ios/Badge/BadgeRibbon.swift +2 -5
- package/ios/Button/Button.swift +2 -5
- package/ios/CalculatorKeyboard/CalculatorKeyboard.swift +2 -2
- package/ios/Carousel/Carousel.swift +5 -17
- package/ios/Checkbox/Checkbox.swift +0 -2
- package/ios/Colors+Radius+Spacing/Theme.swift +0 -7
- package/ios/DateTimePicker/DateTimePicker.swift +4 -10
- package/ios/DateTimePicker/DateTimePickerTypes.swift +1 -3
- package/ios/DateTimePicker/DateTimePickerUtils.swift +0 -3
- package/ios/DateTimePicker/WheelPicker.swift +2 -4
- package/ios/Extensions/SkeletonUICompat.swift +0 -8
- package/ios/Icon/Icon.swift +1 -3
- package/ios/IconButton/IconButton.swift +0 -2
- package/ios/Input/ErrorView.swift +0 -7
- package/ios/Input/Input.swift +6 -19
- package/ios/Input/InputPhoneNumber.swift +0 -11
- package/ios/Input/InputSearch.swift +0 -6
- package/ios/Input/InputTextArea.swift +1 -12
- package/ios/InputDropDown/InputDropDown.swift +1 -11
- package/ios/InputMoney/InputMoney.swift +9 -28
- package/ios/InputOTP/InputOTP.swift +2 -9
- package/ios/Layout/Item.swift +1 -2
- package/ios/Layout/ModalLayout.swift +7 -14
- package/ios/Layout/ScreenLayout.swift +2 -7
- package/ios/Loader/Loader.swift +3 -12
- package/ios/Lottie/LottieView.swift +0 -11
- package/ios/Navigation/BottomSheet.swift +14 -35
- package/ios/Navigation/BottomTab/BottomTab.swift +10 -19
- package/ios/Navigation/BottomTab/BottomTabBar.swift +4 -10
- package/ios/Navigation/BottomTab/CurvedContainer.swift +5 -11
- package/ios/Navigation/BottomTab/DuoBarCompression.swift +6 -12
- package/ios/Navigation/BottomTab/DuoTabBar.swift +2 -7
- package/ios/Navigation/BottomTab/TabBarMetrics.swift +3 -9
- package/ios/Navigation/Component/FloatingButton.swift +4 -11
- package/ios/Navigation/Component/Header.swift +4 -8
- package/ios/Navigation/Component/HeaderBackground.swift +2 -8
- package/ios/Navigation/Component/HeaderJourney.swift +2 -7
- package/ios/Navigation/Component/HeaderLocation.swift +2 -7
- package/ios/Navigation/Component/HeaderRight.swift +2 -7
- package/ios/Navigation/Component/HeaderTitle.swift +1 -6
- package/ios/Navigation/Component/HeaderUser.swift +2 -9
- package/ios/Navigation/Component/SideBar.swift +3 -8
- package/ios/Navigation/Component/SnackBar.swift +5 -13
- package/ios/Navigation/HostBackGestureBridge.swift +3 -9
- package/ios/Navigation/ModalScreen.swift +2 -8
- package/ios/Navigation/Navigation.swift +2 -15
- package/ios/Navigation/NavigationContainer.swift +3 -12
- package/ios/Navigation/Navigator.swift +15 -27
- package/ios/Navigation/StackScreen.swift +8 -28
- package/ios/Navigation/StackTransition.swift +3 -11
- package/ios/Navigation/SwipeBackHaptic.swift +2 -7
- package/ios/Navigation/Tracking/ScreenTracker.swift +2 -7
- package/ios/Pagination/PaginationDot.swift +0 -9
- package/ios/Pagination/PaginationNumber.swift +1 -9
- package/ios/Pagination/PaginationScroll.swift +2 -14
- package/ios/Pagination/PaginationWhiteDot.swift +1 -10
- package/ios/Popup/PopupDisplay.swift +3 -3
- package/ios/Popup/PopupInput.swift +1 -1
- package/ios/Popup/PopupLayout.swift +3 -3
- package/ios/PopupView/FullscreenPopup.swift +3 -4
- package/ios/PopupView/PopupView.swift +2 -2
- package/ios/PopupView/Utils++.swift +1 -2
- package/ios/ProgressInfo/ProgressInfo.swift +2 -13
- package/ios/Skeleton/Skeleton.swift +2 -10
- package/ios/Slider/Slider.swift +5 -12
- package/ios/StatusBarTap/StatusBarTap.h +2 -3
- package/ios/StatusBarTap/StatusBarTap.m +3 -16
- package/ios/Stepper/Stepper.swift +8 -27
- package/ios/Steps/Steps.swift +9 -11
- package/ios/Swipeable/SwipeCell.swift +2 -2
- package/ios/Swipeable/SwipeCellModel.swift +3 -6
- package/ios/TabView/TabView.swift +12 -25
- package/ios/Template/TrustBanner/TrustBanner.swift +2 -9
- package/ios/Tooltip/Tooltip.swift +2 -7
- package/ios/Typography/FontScale.swift +3 -15
- package/ios/Typography/Text.swift +2 -7
- package/ios/Typography/Typography.swift +8 -10
- package/ios/Uploader/Uploader.swift +2 -17
- package/ios/native-kits.podspec +1 -1
- package/ios-demo/MoMoUIKitsDemo.podspec +1 -1
- package/ios-demo/README.md +120 -0
- package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/LocalizeDemo.swift +0 -8
- package/package.json +1 -1
- package/settings.gradle.kts +64 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import SwiftUI
|
|
2
2
|
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
// types
|
|
6
|
-
// ---------------------------------------------------------------------------
|
|
3
|
+
// MARK: - Style enums
|
|
4
|
+
|
|
5
|
+
// Prefixed to avoid colliding with other public kit types (ButtonSize, InputSize, TagColor).
|
|
7
6
|
|
|
8
7
|
public enum TabViewType {
|
|
9
8
|
case `default`
|
|
@@ -15,10 +14,9 @@ public enum TabViewDirection {
|
|
|
15
14
|
case column
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
//
|
|
19
|
-
// Data model — mirrors Compose `TabViewItem`
|
|
20
|
-
// ---------------------------------------------------------------------------
|
|
17
|
+
// MARK: - Data model
|
|
21
18
|
|
|
19
|
+
/// Mirrors Compose `TabViewItem`.
|
|
22
20
|
public struct TabViewItem {
|
|
23
21
|
public let title: String
|
|
24
22
|
public let icon: String?
|
|
@@ -72,10 +70,9 @@ public struct TabViewItem {
|
|
|
72
70
|
}
|
|
73
71
|
}
|
|
74
72
|
|
|
75
|
-
//
|
|
76
|
-
// Public component — named `MomoTabView` to avoid shadowing SwiftUI.TabView
|
|
77
|
-
// ---------------------------------------------------------------------------
|
|
73
|
+
// MARK: - MomoTabView
|
|
78
74
|
|
|
75
|
+
/// Named `MomoTabView` to avoid shadowing SwiftUI's `TabView`.
|
|
79
76
|
public struct MomoTabView: View {
|
|
80
77
|
@Environment(\.appTheme) private var theme
|
|
81
78
|
|
|
@@ -213,9 +210,7 @@ public struct MomoTabView: View {
|
|
|
213
210
|
}
|
|
214
211
|
}
|
|
215
212
|
|
|
216
|
-
//
|
|
217
|
-
// Default fixed-width tab bar (equal-width items + animated underline)
|
|
218
|
-
// ---------------------------------------------------------------------------
|
|
213
|
+
// MARK: - Default tab bar (equal-width items)
|
|
219
214
|
|
|
220
215
|
private struct DefaultTabBar: View {
|
|
221
216
|
@Environment(\.appTheme) private var theme
|
|
@@ -266,9 +261,7 @@ private struct DefaultTabBar: View {
|
|
|
266
261
|
}
|
|
267
262
|
}
|
|
268
263
|
|
|
269
|
-
//
|
|
270
|
-
// Scrollable tab bar (wrap-width items, horizontal scroll, animated underline)
|
|
271
|
-
// ---------------------------------------------------------------------------
|
|
264
|
+
// MARK: - Scrollable tab bar (wrap-width items)
|
|
272
265
|
|
|
273
266
|
private struct ScrollableTabBar: View {
|
|
274
267
|
@Environment(\.appTheme) private var theme
|
|
@@ -347,9 +340,7 @@ private struct TabFramePreferenceKey: PreferenceKey {
|
|
|
347
340
|
}
|
|
348
341
|
}
|
|
349
342
|
|
|
350
|
-
//
|
|
351
|
-
// Card tab bar
|
|
352
|
-
// ---------------------------------------------------------------------------
|
|
343
|
+
// MARK: - Card tab bar
|
|
353
344
|
|
|
354
345
|
private let cardTabHeight: CGFloat = 40
|
|
355
346
|
private let cardTabActiveHeight: CGFloat = 44
|
|
@@ -480,9 +471,7 @@ private struct CardTabEarShape: Shape {
|
|
|
480
471
|
}
|
|
481
472
|
}
|
|
482
473
|
|
|
483
|
-
//
|
|
484
|
-
// Shared tab item (Default + Scrollable bars)
|
|
485
|
-
// ---------------------------------------------------------------------------
|
|
474
|
+
// MARK: - Shared tab item (default + scrollable bars)
|
|
486
475
|
|
|
487
476
|
private struct TabItemView: View {
|
|
488
477
|
let tab: TabViewItem
|
|
@@ -563,9 +552,7 @@ private struct TabItemView: View {
|
|
|
563
552
|
}
|
|
564
553
|
}
|
|
565
554
|
|
|
566
|
-
//
|
|
567
|
-
// Shared helpers
|
|
568
|
-
// ---------------------------------------------------------------------------
|
|
555
|
+
// MARK: - Shared helpers
|
|
569
556
|
|
|
570
557
|
private func barHeight(_ direction: TabViewDirection) -> CGFloat {
|
|
571
558
|
direction == .column ? 68 : 48
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
//
|
|
2
|
-
// TrustBanner.swift
|
|
3
|
-
// MoMoUIKits
|
|
4
|
-
//
|
|
5
|
-
// Created by Nguyễn Hoàng Sơn on 14/12/2023.
|
|
6
|
-
//
|
|
7
|
-
|
|
8
1
|
import Foundation
|
|
9
2
|
import SwiftUI
|
|
10
3
|
import SDWebImageSwiftUI
|
|
@@ -131,7 +124,7 @@ public struct TrustBanner: View {
|
|
|
131
124
|
MomoText(
|
|
132
125
|
localize.translateData(banner.content),
|
|
133
126
|
typography: .descriptionDefaultRegular,
|
|
134
|
-
color:
|
|
127
|
+
color: Colors.black15,
|
|
135
128
|
maxLines: 2
|
|
136
129
|
)
|
|
137
130
|
.padding(.bottom, 8)
|
|
@@ -166,7 +159,7 @@ public struct TrustBanner: View {
|
|
|
166
159
|
}
|
|
167
160
|
}
|
|
168
161
|
.padding(.all, 12)
|
|
169
|
-
.background(
|
|
162
|
+
.background(Colors.blue10)
|
|
170
163
|
.cornerRadius(12)
|
|
171
164
|
.contentShape(Rectangle())
|
|
172
165
|
.onTapGesture {
|
|
@@ -41,17 +41,14 @@ public final class TooltipState: ObservableObject {
|
|
|
41
41
|
|
|
42
42
|
public init() {}
|
|
43
43
|
|
|
44
|
-
/// Shows the tooltip.
|
|
45
44
|
public func show() {
|
|
46
45
|
isVisible = true
|
|
47
46
|
}
|
|
48
47
|
|
|
49
|
-
/// Hides the tooltip.
|
|
50
48
|
public func hide() {
|
|
51
49
|
isVisible = false
|
|
52
50
|
}
|
|
53
51
|
|
|
54
|
-
/// Toggles the tooltip visibility.
|
|
55
52
|
public func toggle() {
|
|
56
53
|
isVisible.toggle()
|
|
57
54
|
}
|
|
@@ -126,10 +123,8 @@ private struct TooltipAnchorBoundsKey: PreferenceKey {
|
|
|
126
123
|
|
|
127
124
|
// MARK: - Tooltip
|
|
128
125
|
|
|
129
|
-
///
|
|
130
|
-
///
|
|
131
|
-
///
|
|
132
|
-
/// Port of the Compose / React Native `Tooltip` component.
|
|
126
|
+
/// Port of the Compose / RN `Tooltip`: wraps `content` (the anchor) and shows a positioned popup
|
|
127
|
+
/// with title, description, close button and action buttons.
|
|
133
128
|
public struct Tooltip<Content: View>: View {
|
|
134
129
|
@ObservedObject private var state: TooltipState
|
|
135
130
|
private let title: String?
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
// File: ios/Typography/FontScale.swift
|
|
2
|
-
// Created At: 2026-08-06 10:00:00 +07:00
|
|
3
|
-
// Created By: AI
|
|
4
|
-
// AI Agent: Claude Code
|
|
5
|
-
// Model: claude-opus-5
|
|
6
|
-
|
|
7
|
-
// AI-GENERATED START: reactive font-scale snapshot injected through the environment
|
|
8
1
|
import SwiftUI
|
|
9
2
|
|
|
10
3
|
/// Immutable snapshot of the kit's font-scale inputs. The formula is a 1:1 port of Compose's
|
|
@@ -19,11 +12,10 @@ public struct FontScale: Equatable {
|
|
|
19
12
|
public let useOSScaleRate: Bool
|
|
20
13
|
/// OS Dynamic Type factor at the time the snapshot was taken.
|
|
21
14
|
public let osFontScale: CGFloat
|
|
22
|
-
|
|
15
|
+
/// From the app window, not UIScreen.main (which stays on one display on iPhone Duo).
|
|
23
16
|
public let windowShortSide: CGFloat
|
|
24
|
-
/// Opt-in ceiling (Compose's `MiniAppContext.scaleSizeMaxRate`):
|
|
25
|
-
///
|
|
26
|
-
/// old behavior. Used by `CappedFontScale` for the bottom-tab labels.
|
|
17
|
+
/// Opt-in ceiling (Compose's `MiniAppContext.scaleSizeMaxRate`): caps the result at size × maxScaleRate
|
|
18
|
+
/// on both the userScaleRate and OS paths; nil means no cap. Used by `CappedFontScale` for tab labels.
|
|
27
19
|
public let maxScaleRate: CGFloat?
|
|
28
20
|
|
|
29
21
|
public init(
|
|
@@ -50,7 +42,6 @@ public struct FontScale: Equatable {
|
|
|
50
42
|
|
|
51
43
|
// Short side, not width: landscape must not inflate every font (and so every popup's height).
|
|
52
44
|
let deviceScale = windowShortSide / Self.defaultScreenSize
|
|
53
|
-
// AI-GENERATED END: device scale from the app window, not UIScreen.main (fixed to one display on iPhone Duo)
|
|
54
45
|
|
|
55
46
|
var deviceScaled = size
|
|
56
47
|
var osScaled = size
|
|
@@ -89,9 +80,7 @@ public struct FontScale: Equatable {
|
|
|
89
80
|
userScaleRate: userScaleRate ?? self.userScaleRate,
|
|
90
81
|
useOSScaleRate: useOSScaleRate ?? self.useOSScaleRate,
|
|
91
82
|
osFontScale: osFontScale,
|
|
92
|
-
// AI-GENERATED START: keep the window size through context overrides
|
|
93
83
|
windowShortSide: windowShortSide,
|
|
94
|
-
// AI-GENERATED END: keep the window size through context overrides
|
|
95
84
|
maxScaleRate: maxScaleRate
|
|
96
85
|
)
|
|
97
86
|
}
|
|
@@ -137,4 +126,3 @@ private struct MomoFontScaleModifier: ViewModifier {
|
|
|
137
126
|
.environment(\.designSystemKitsConfigs, store.getConfigs())
|
|
138
127
|
}
|
|
139
128
|
}
|
|
140
|
-
// AI-GENERATED END: reactive font-scale snapshot injected through the environment
|
|
@@ -107,7 +107,7 @@ private enum MomoFontFace {
|
|
|
107
107
|
/// Port of Compose `getFontFamily`; SF Pro Text is the iOS system font, so the legacy family is `.system`.
|
|
108
108
|
private func momoFontFace(family: String, weight: Font.Weight, isWhiteList: Bool) -> MomoFontFace? {
|
|
109
109
|
let isNewFamily = family == "MomoTrustSans" || family == headerFontFamily
|
|
110
|
-
// Outside the whitelist the
|
|
110
|
+
// Outside the whitelist the DS-791 families fall back to the legacy font.
|
|
111
111
|
if family == "SFProText" || (isNewFamily && !isWhiteList) { return .system }
|
|
112
112
|
// single-file families (Compose maps every weight to the same .otf)
|
|
113
113
|
if family == headerFontFamily || family == "MoMoSignature" { return .named(family) }
|
|
@@ -264,8 +264,6 @@ public struct MomoText: View {
|
|
|
264
264
|
self.textAlign = textAlign
|
|
265
265
|
self.maxLines = maxLines
|
|
266
266
|
self.minLines = minLines
|
|
267
|
-
// SwiftUI's range-based `lineLimit` is iOS 16+ only; keep the range for
|
|
268
|
-
// newer OS versions and fall back to the legacy single-value overload.
|
|
269
267
|
if maxLines == Int.max && minLines <= 1 {
|
|
270
268
|
self.lineLimitRange = nil
|
|
271
269
|
} else {
|
|
@@ -345,8 +343,6 @@ public struct MomoText: View {
|
|
|
345
343
|
|
|
346
344
|
public var body: some View {
|
|
347
345
|
let textColor = color ?? theme.colors.text.default
|
|
348
|
-
// Strikethrough is driven either by the typography variant (mirrors Compose
|
|
349
|
-
// *Strikethrough styles) or the explicit `strikethrough` flag.
|
|
350
346
|
let isStrikethrough = strikethrough || typography.isStrikethrough
|
|
351
347
|
|
|
352
348
|
// lineSpacing is added on top of the font's natural line height, not on top of fontSize.
|
|
@@ -379,8 +375,7 @@ public struct MomoText: View {
|
|
|
379
375
|
}
|
|
380
376
|
}
|
|
381
377
|
|
|
382
|
-
//
|
|
383
|
-
// single-value overload so the file still compiles for iOS 15.
|
|
378
|
+
// Range-based `lineLimit` is iOS 16+; iOS 15 gets the upper bound only.
|
|
384
379
|
private struct LineLimitModifier: ViewModifier {
|
|
385
380
|
let range: ClosedRange<Int>?
|
|
386
381
|
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import SwiftUI
|
|
2
2
|
|
|
3
3
|
public extension View {
|
|
4
|
-
///
|
|
5
|
-
///
|
|
6
|
-
/// (which does not honor that OS setting). Apply it wherever a `.font(...)` is set.
|
|
4
|
+
/// Ignores the OS "Bold Text" setting so weights stay fixed, as in Compose (which doesn't honor it).
|
|
5
|
+
/// Apply it wherever a `.font(...)` is set.
|
|
7
6
|
func ignoreBoldTextSetting() -> some View {
|
|
8
7
|
environment(\.legibilityWeight, .regular)
|
|
9
8
|
}
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
public extension Font {
|
|
13
|
-
/// Non-reactive:
|
|
14
|
-
///
|
|
15
|
-
///
|
|
16
|
-
/// Inside a view, `@Environment(\.momoFontScale)` + `fontScale.font(size:weight:)` also re-renders.
|
|
12
|
+
/// Non-reactive: reads the `DesignSystemKits` font scale on each access, so the styles below are computed
|
|
13
|
+
/// (a `static let` would freeze the scale). Inside a view, `@Environment(\.momoFontScale)` +
|
|
14
|
+
/// `fontScale.font(size:weight:)` also re-renders on change.
|
|
17
15
|
static func appFont(size: CGFloat) -> Font {
|
|
18
16
|
DesignSystemKits.shared.fontScale.font(size: size)
|
|
19
17
|
}
|
|
@@ -62,17 +60,17 @@ public extension Font {
|
|
|
62
60
|
static var action_s: Font { appFont(size: 15).weight(.bold) }
|
|
63
61
|
|
|
64
62
|
// deprecated
|
|
65
|
-
static var h1: Font { appFont(size: 36).weight(.semibold) } //headline_xl
|
|
63
|
+
static var h1: Font { appFont(size: 36).weight(.semibold) } // headline_xl
|
|
66
64
|
static var h2: Font { appFont(size: 32).weight(.semibold) }
|
|
67
65
|
static var h3: Font { appFont(size: 28).weight(.semibold) }
|
|
68
66
|
static var h4: Font { appFont(size: 24).weight(.semibold) }
|
|
69
67
|
static var title1: Font { appFont(size: 20).weight(.bold) }
|
|
70
68
|
static var title2: Font { appFont(size: 18).weight(.bold) }
|
|
71
69
|
static var title3: Font { appFont(size: 16).weight(.bold) }
|
|
72
|
-
static var headerText1: Font { appFont(size: 15).weight(.semibold) } //header_default
|
|
70
|
+
static var headerText1: Font { appFont(size: 15).weight(.semibold) } // header_default
|
|
73
71
|
static var headerText2: Font { appFont(size: 14).weight(.semibold) }
|
|
74
72
|
static var headerText3: Font { appFont(size: 12).weight(.semibold) }
|
|
75
|
-
static var paragraph: Font { appFont(size: 15).weight(.regular) } //paragraph_default
|
|
73
|
+
static var paragraph: Font { appFont(size: 15).weight(.regular) } // paragraph_default
|
|
76
74
|
static var description1: Font { appFont(size: 14).weight(.regular) }
|
|
77
75
|
static var description2: Font { appFont(size: 12).weight(.regular) }
|
|
78
76
|
static var description3: Font { appFont(size: 10).weight(.regular) }
|
|
@@ -1,21 +1,5 @@
|
|
|
1
1
|
import SwiftUI
|
|
2
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
3
|
public struct UploadImage: Identifiable {
|
|
20
4
|
public let id = UUID()
|
|
21
5
|
public var uri: String?
|
|
@@ -27,6 +11,8 @@ public struct UploadImage: Identifiable {
|
|
|
27
11
|
}
|
|
28
12
|
}
|
|
29
13
|
|
|
14
|
+
/// Compose `Uploader`: an optional dashed "add image" cell, then a scrollable row of thumbnails.
|
|
15
|
+
/// Like Compose it opens no picker: the host handles `onAdd` and passes the result back in `images`.
|
|
30
16
|
public struct Uploader: View {
|
|
31
17
|
// MARK: Properties
|
|
32
18
|
|
|
@@ -108,7 +94,6 @@ private struct UploaderPickerCell: View {
|
|
|
108
94
|
let height: CGFloat
|
|
109
95
|
let onAdd: () -> Void
|
|
110
96
|
|
|
111
|
-
// text.disable / text.hint and border.disable / border.default tokens.
|
|
112
97
|
private var mainColor: Color { disabled ? theme.colors.text.disable : theme.colors.text.hint }
|
|
113
98
|
private var borderColor: Color { disabled ? theme.colors.border.disable : theme.colors.border.default }
|
|
114
99
|
|
package/ios/native-kits.podspec
CHANGED
|
@@ -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
|
+
```
|
|
@@ -24,14 +24,11 @@ private let AppTranslations = LocalizationObject(
|
|
|
24
24
|
)
|
|
25
25
|
|
|
26
26
|
struct LocalizeDemo: View {
|
|
27
|
-
// AI-GENERATED START: observe the app language and drive it through the real platform API
|
|
28
27
|
@Environment(\.localize) private var localize
|
|
29
28
|
@Environment(\.applicationEnvironment) private var applicationEnvironment
|
|
30
|
-
// AI-GENERATED END: observe the app language and drive it through the real platform API
|
|
31
29
|
|
|
32
30
|
private var isEnglish: Bool { localize.currentLanguage == Localize.EN }
|
|
33
31
|
|
|
34
|
-
// AI-GENERATED START: observe the app language and drive it through the real platform API
|
|
35
32
|
private var storedLanguage: String {
|
|
36
33
|
UserDefaults.standard.string(forKey: UserDefaultsLanguageSource.defaultKey) ?? "nil"
|
|
37
34
|
}
|
|
@@ -45,7 +42,6 @@ struct LocalizeDemo: View {
|
|
|
45
42
|
localize.changeLanguage(language) // #Preview / sample app: no host bridge
|
|
46
43
|
}
|
|
47
44
|
}
|
|
48
|
-
// AI-GENERATED END: observe the app language and drive it through the real platform API
|
|
49
45
|
|
|
50
46
|
var body: some View {
|
|
51
47
|
ScrollView {
|
|
@@ -65,7 +61,6 @@ struct LocalizeDemo: View {
|
|
|
65
61
|
MomoText("currentLanguage = \(localize.currentLanguage)", typography: .labelDefaultMedium)
|
|
66
62
|
}
|
|
67
63
|
|
|
68
|
-
// AI-GENERATED START: prove the observation loop, not kit-local state, drives updates
|
|
69
64
|
LocalizeSectionBox(title: "Nguồn thật: UserDefaults") {
|
|
70
65
|
MomoText(
|
|
71
66
|
"Ghi thẳng vào UserDefaults, bỏ qua mọi API của kit — màn hình vẫn đổi, chứng minh "
|
|
@@ -88,7 +83,6 @@ struct LocalizeDemo: View {
|
|
|
88
83
|
isFull: false
|
|
89
84
|
)
|
|
90
85
|
}
|
|
91
|
-
// AI-GENERATED END: prove the observation loop, not kit-local state, drives updates
|
|
92
86
|
|
|
93
87
|
LocalizeSectionBox(title: "translate(key) — từ điển mặc định của kit") {
|
|
94
88
|
TranslationRow(key: "confirm", value: localize.translate("confirm"))
|
|
@@ -224,10 +218,8 @@ private struct TranslationRow: View {
|
|
|
224
218
|
#Preview {
|
|
225
219
|
if #available(iOS 16.0, *) {
|
|
226
220
|
NavigationStack {
|
|
227
|
-
// AI-GENERATED START: preview needs the observing provider or the toggle will not update
|
|
228
221
|
LocalizeDemo()
|
|
229
222
|
.momoLocalize(Localize())
|
|
230
|
-
// AI-GENERATED END: preview needs the observing provider or the toggle will not update
|
|
231
223
|
}
|
|
232
224
|
} else {
|
|
233
225
|
// Fallback on earlier versions
|
package/package.json
CHANGED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import org.gradle.kotlin.dsl.maven
|
|
2
|
+
|
|
3
|
+
rootProject.name = "momo-native-kits"
|
|
4
|
+
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
|
5
|
+
|
|
6
|
+
pluginManagement {
|
|
7
|
+
repositories {
|
|
8
|
+
google {
|
|
9
|
+
mavenContent {
|
|
10
|
+
includeGroupAndSubgroups("androidx")
|
|
11
|
+
includeGroupAndSubgroups("com.android")
|
|
12
|
+
includeGroupAndSubgroups("com.google")
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
mavenCentral()
|
|
16
|
+
gradlePluginPortal()
|
|
17
|
+
maven {
|
|
18
|
+
url = uri("https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven")
|
|
19
|
+
credentials {username = "download_packages"; password = "gldt-bjDqLpU_sPcHDuXau2ws" }
|
|
20
|
+
}
|
|
21
|
+
maven {
|
|
22
|
+
url = uri("https://artifacts.mservice.com.vn/repository/maven-momo-app/")
|
|
23
|
+
credentials {
|
|
24
|
+
username = "viewer"
|
|
25
|
+
password = "viewer"
|
|
26
|
+
}
|
|
27
|
+
isAllowInsecureProtocol = true
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
dependencyResolutionManagement {
|
|
33
|
+
repositories {
|
|
34
|
+
google {
|
|
35
|
+
mavenContent {
|
|
36
|
+
includeGroupAndSubgroups("androidx")
|
|
37
|
+
includeGroupAndSubgroups("com.android")
|
|
38
|
+
includeGroupAndSubgroups("com.google")
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
mavenCentral()
|
|
42
|
+
maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
|
|
43
|
+
maven {
|
|
44
|
+
url = uri("https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven")
|
|
45
|
+
credentials {
|
|
46
|
+
username = "download_packages";
|
|
47
|
+
password = "gldt-bjDqLpU_sPcHDuXau2ws"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
maven {
|
|
51
|
+
url = uri("https://artifacts.mservice.com.vn/repository/maven-momo-app/")
|
|
52
|
+
credentials {
|
|
53
|
+
username = "viewer"
|
|
54
|
+
password = "viewer"
|
|
55
|
+
}
|
|
56
|
+
isAllowInsecureProtocol = true
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
include(":compose")
|
|
62
|
+
|
|
63
|
+
include(":sample:androidApp")
|
|
64
|
+
include(":sample:shared")
|