@momo-kits/native-kits 0.156.1-beta.6 → 0.156.1-sp.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.
Files changed (133) hide show
  1. package/PUBLISH_GUIDE.md +410 -184
  2. package/build.gradle.kts +11 -0
  3. package/compose/build.gradle.kts +180 -0
  4. package/compose/build.gradle.kts.backup +180 -0
  5. package/compose/compose.podspec +54 -0
  6. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +113 -0
  7. package/compose/src/commonMain/composeResources/font/momosignature.otf +0 -0
  8. package/compose/src/commonMain/composeResources/font/momotrustdisplay.otf +0 -0
  9. package/compose/src/commonMain/composeResources/font/sfprotext_black.otf +0 -0
  10. package/compose/src/commonMain/composeResources/font/sfprotext_black.ttf +0 -0
  11. package/compose/src/commonMain/composeResources/font/sfprotext_bold.ttf +0 -0
  12. package/compose/src/commonMain/composeResources/font/sfprotext_heavy.ttf +0 -0
  13. package/compose/src/commonMain/composeResources/font/sfprotext_light.ttf +0 -0
  14. package/compose/src/commonMain/composeResources/font/sfprotext_medium.ttf +0 -0
  15. package/compose/src/commonMain/composeResources/font/sfprotext_regular.ttf +0 -0
  16. package/compose/src/commonMain/composeResources/font/sfprotext_semibold.ttf +0 -0
  17. package/compose/src/commonMain/composeResources/font/sfprotext_thin.otf +0 -0
  18. package/compose/src/commonMain/composeResources/font/sfprotext_thin.ttf +0 -0
  19. package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.otf +0 -0
  20. package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.ttf +0 -0
  21. package/compose/src/commonMain/kotlin/vn/momo/kits/application/AnimationSearchInput.kt +57 -0
  22. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +95 -0
  23. package/compose/src/commonMain/kotlin/vn/momo/kits/application/FloatingButton.kt +201 -0
  24. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Header.kt +222 -0
  25. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderAnimated.kt +48 -0
  26. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderBackground.kt +86 -0
  27. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderDefault.kt +76 -0
  28. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderExtended.kt +76 -0
  29. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderRight.kt +305 -0
  30. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderTitle.kt +33 -0
  31. package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +715 -0
  32. package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +121 -0
  33. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +405 -0
  34. package/compose/src/commonMain/kotlin/vn/momo/kits/application/useHeaderSearchAnimation.kt +69 -0
  35. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +83 -0
  36. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +32 -0
  37. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +340 -0
  38. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +348 -0
  39. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +94 -0
  40. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +136 -0
  41. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +543 -0
  42. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +23 -0
  43. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +76 -0
  44. package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +148 -0
  45. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +188 -0
  46. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +116 -0
  47. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +447 -0
  48. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +172 -0
  49. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +244 -0
  50. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +231 -0
  51. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +234 -0
  52. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +254 -0
  53. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +241 -0
  54. package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +364 -0
  55. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +56 -0
  56. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationNumber.kt +41 -0
  57. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +92 -0
  58. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +40 -0
  59. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +352 -0
  60. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +103 -0
  61. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +70 -0
  62. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +17 -0
  63. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +96 -0
  64. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +96 -0
  65. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +92 -0
  66. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +130 -0
  67. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +214 -0
  68. package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +177 -0
  69. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +205 -0
  70. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +29 -0
  71. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +239 -0
  72. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +191 -0
  73. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +306 -0
  74. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +12 -0
  75. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +13 -0
  76. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +189 -0
  77. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +285 -0
  78. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +2 -0
  79. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +35 -0
  80. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +2 -0
  81. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +59 -0
  82. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +68 -0
  83. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Conditional.kt +11 -0
  84. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +14 -0
  85. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +50 -0
  86. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Size.kt +51 -0
  87. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +239 -0
  88. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +119 -0
  89. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +98 -0
  90. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +163 -0
  91. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +331 -0
  92. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +497 -0
  93. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +162 -0
  94. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +226 -0
  95. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +86 -0
  96. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +187 -0
  97. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +274 -0
  98. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +80 -0
  99. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +306 -0
  100. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +31 -0
  101. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +370 -0
  102. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +132 -0
  103. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +42 -0
  104. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +1329 -0
  105. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +62 -0
  106. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +88 -0
  107. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +152 -0
  108. package/example/ios/Example.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
  109. package/example/ios/Example.xcworkspace/xcuserdata/sophia.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  110. package/example/ios/Example.xcworkspace/xcuserdata/sophia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +6 -0
  111. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +58 -0
  112. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/Pods-Example.xcscheme +58 -0
  113. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/SDWebImage.xcscheme +58 -0
  114. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +58 -0
  115. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/SkeletonUI.xcscheme +58 -0
  116. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/lottie-ios-LottiePrivacyInfo.xcscheme +58 -0
  117. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/lottie-ios.xcscheme +58 -0
  118. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/xcschememanagement.plist +46 -0
  119. package/gradle/libs.versions.toml +57 -0
  120. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  121. package/gradle/wrapper/gradle-wrapper.properties +8 -0
  122. package/gradle.properties +26 -0
  123. package/gradlew +252 -0
  124. package/gradlew.bat +94 -0
  125. package/ios/Button/Button.swift +6 -7
  126. package/ios/Input/Input.swift +8 -9
  127. package/ios/Input/InputPhoneNumber.swift +11 -8
  128. package/ios/Input/InputTextArea.swift +5 -6
  129. package/local.properties +8 -0
  130. package/package.json +1 -1
  131. package/publish.sh +401 -0
  132. package/settings.gradle.kts +52 -0
  133. package/publish_beta.sh +0 -153
@@ -0,0 +1,58 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Scheme
3
+ LastUpgradeVersion = "1600"
4
+ version = "1.3">
5
+ <BuildAction
6
+ parallelizeBuildables = "YES"
7
+ buildImplicitDependencies = "YES">
8
+ <BuildActionEntries>
9
+ <BuildActionEntry
10
+ buildForTesting = "YES"
11
+ buildForRunning = "YES"
12
+ buildForProfiling = "YES"
13
+ buildForArchiving = "YES"
14
+ buildForAnalyzing = "YES">
15
+ <BuildableReference
16
+ BuildableIdentifier = "primary"
17
+ BlueprintIdentifier = "0B967D7F8561D42493EE289EC8D450D1"
18
+ BuildableName = "Lottie.framework"
19
+ BlueprintName = "lottie-ios"
20
+ ReferencedContainer = "container:Pods.xcodeproj">
21
+ </BuildableReference>
22
+ </BuildActionEntry>
23
+ </BuildActionEntries>
24
+ </BuildAction>
25
+ <TestAction
26
+ buildConfiguration = "Debug"
27
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
+ shouldUseLaunchSchemeArgsEnv = "YES">
30
+ <Testables>
31
+ </Testables>
32
+ </TestAction>
33
+ <LaunchAction
34
+ buildConfiguration = "Debug"
35
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37
+ launchStyle = "0"
38
+ useCustomWorkingDirectory = "NO"
39
+ ignoresPersistentStateOnLaunch = "NO"
40
+ debugDocumentVersioning = "YES"
41
+ debugServiceExtension = "internal"
42
+ allowLocationSimulation = "YES">
43
+ </LaunchAction>
44
+ <ProfileAction
45
+ buildConfiguration = "Release"
46
+ shouldUseLaunchSchemeArgsEnv = "YES"
47
+ savedToolIdentifier = ""
48
+ useCustomWorkingDirectory = "NO"
49
+ debugDocumentVersioning = "YES">
50
+ </ProfileAction>
51
+ <AnalyzeAction
52
+ buildConfiguration = "Debug">
53
+ </AnalyzeAction>
54
+ <ArchiveAction
55
+ buildConfiguration = "Release"
56
+ revealArchiveInOrganizer = "YES">
57
+ </ArchiveAction>
58
+ </Scheme>
@@ -0,0 +1,46 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>SchemeUserState</key>
6
+ <dict>
7
+ <key>MoMoUIKits.xcscheme</key>
8
+ <dict>
9
+ <key>isShown</key>
10
+ <false/>
11
+ </dict>
12
+ <key>Pods-Example.xcscheme</key>
13
+ <dict>
14
+ <key>isShown</key>
15
+ <false/>
16
+ </dict>
17
+ <key>SDWebImage.xcscheme</key>
18
+ <dict>
19
+ <key>isShown</key>
20
+ <false/>
21
+ </dict>
22
+ <key>SDWebImageSwiftUI.xcscheme</key>
23
+ <dict>
24
+ <key>isShown</key>
25
+ <false/>
26
+ </dict>
27
+ <key>SkeletonUI.xcscheme</key>
28
+ <dict>
29
+ <key>isShown</key>
30
+ <false/>
31
+ </dict>
32
+ <key>lottie-ios-LottiePrivacyInfo.xcscheme</key>
33
+ <dict>
34
+ <key>isShown</key>
35
+ <false/>
36
+ </dict>
37
+ <key>lottie-ios.xcscheme</key>
38
+ <dict>
39
+ <key>isShown</key>
40
+ <false/>
41
+ </dict>
42
+ </dict>
43
+ <key>SuppressBuildableAutocreation</key>
44
+ <dict/>
45
+ </dict>
46
+ </plist>
@@ -0,0 +1,57 @@
1
+ [versions]
2
+ android-compileSdk = "35"
3
+ android-minSdk = "24"
4
+ android-targetSdk = "35"
5
+ ktor-version = "3.0.0-rc-1"
6
+ coroutines = "1.8.1"
7
+ kotlin = "2.1.21"
8
+ kSerialize = "1.7.1"
9
+ compose = "1.8.1"
10
+ navigation-multiplatform = "2.9.0-beta02"
11
+ coil3-multiplatform = "3.0.0-alpha10"
12
+ androidGradlePlugin = "8.6.0"
13
+ r8 = "8.9.35"
14
+ kotlinx-datetime = "0.7.1"
15
+ airbnb-lottie = "5.2.0"
16
+ androidx-activity = "1.9.1"
17
+ androidx-appcompat = "1.7.1"
18
+ material = "1.10.0"
19
+ maxapi = "0.1.1"
20
+ vanniktechMavenPublish = "0.34.0"
21
+ kits = "0.1.9"
22
+ nativemaxapi = "0.0.6"
23
+
24
+ [libraries]
25
+ ktor-client-core = { group = "io.ktor", name = "ktor-client-core", version.ref = "ktor-version" }
26
+ ktor-client-darwin = { group = "io.ktor", name = "ktor-client-darwin", version.ref = "ktor-version" }
27
+ ktor-client-okhttp = { group = "io.ktor", name = "ktor-client-okhttp", version.ref = "ktor-version" }
28
+ jetbrains-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "coroutines" }
29
+ jetbrains-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "coroutines" }
30
+ jetbrains-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "coroutines" }
31
+ jetbrains-serialization = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization", version.ref = "kSerialize" }
32
+ jetbrains-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kSerialize" }
33
+ kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version.ref = "kotlinx-datetime" }
34
+ navigation-multiplatform = { module = "org.jetbrains.androidx.navigation:navigation-compose", version.ref = "navigation-multiplatform" }
35
+ coil-multiplatform-core = { module = "io.coil-kt.coil3:coil-core", version.ref = "coil3-multiplatform" }
36
+ coil-multiplatform-compose = { module = "io.coil-kt.coil3:coil-compose", version.ref = "coil3-multiplatform" }
37
+ coil-multiplatform-network-ktor = { module = "io.coil-kt.coil3:coil-network-ktor3", version.ref = "coil3-multiplatform" }
38
+ r8 = { module = "com.android.tools:r8", version.ref = "r8" }
39
+ airbnb-lottie = { group = "com.airbnb.android", name = "lottie-compose", version.ref = "airbnb-lottie" }
40
+ native-max-api = { group = "vn.momo.maxapi", name = "NativeMaxApi", version.ref = "nativemaxapi" }
41
+ kits = { module = "vn.momo.kits:kits", version.ref = "kits" }
42
+ androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
43
+ androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity" }
44
+ material = { module = "com.google.android.material:material", version.ref = "material" }
45
+
46
+ [plugins]
47
+ jetbrains-kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
48
+ jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
49
+ jetbrains-kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
50
+ jetbrains-kotlin-cocoapods = { id = "org.jetbrains.kotlin.native.cocoapods", version.ref = "kotlin" }
51
+ jetbrains-kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
52
+ jetbrains-kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
53
+ kotlin-compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
54
+ compose = { id = "org.jetbrains.compose", version.ref = "compose" }
55
+ android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
56
+ android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
57
+ vanniktech-mavenPublish = { id = "com.vanniktech.maven.publish", version.ref = "vanniktechMavenPublish" }
@@ -0,0 +1,8 @@
1
+ #Thu Jul 31 17:05:40 ICT 2025
2
+ distributionBase=GRADLE_USER_HOME
3
+ distributionPath=wrapper/dists
4
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
5
+ networkTimeout=10000
6
+ validateDistributionUrl=true
7
+ zipStoreBase=GRADLE_USER_HOME
8
+ zipStorePath=wrapper/dists
@@ -0,0 +1,26 @@
1
+ #Kotlin
2
+ kotlin.code.style=official
3
+ kotlin.daemon.jvmargs=-Xmx6144M
4
+
5
+ #Gradle
6
+ org.gradle.jvmargs=-Xmx8192M -Dfile.encoding=UTF-8
7
+ org.gradle.configuration-cache=false
8
+ org.gradle.caching=true
9
+
10
+ #Android
11
+ android.nonTransitiveRClass=true
12
+ android.useAndroidX=true
13
+
14
+ #KMP
15
+ kotlin.apple.xcodeCompatibility.nowarn=true
16
+
17
+ # Publishing
18
+ name="ComposeKits"
19
+ group=vn.momo.kits
20
+ artifact.id=kits
21
+ version=0.156.1-sp.1
22
+
23
+ repo=GitLab
24
+ url=https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven
25
+ gitlab.user=upload_packages
26
+ gitlab.password=gldt-CtTSGmzz57sUL9cnjdaQ
package/gradlew ADDED
@@ -0,0 +1,252 @@
1
+ #!/bin/sh
2
+
3
+ #
4
+ # Copyright © 2015-2021 the original authors.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+ # SPDX-License-Identifier: Apache-2.0
19
+ #
20
+
21
+ ##############################################################################
22
+ #
23
+ # Gradle start up script for POSIX generated by Gradle.
24
+ #
25
+ # Important for running:
26
+ #
27
+ # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
28
+ # noncompliant, but you have some other compliant shell such as ksh or
29
+ # bash, then to run this script, type that shell name before the whole
30
+ # command line, like:
31
+ #
32
+ # ksh Gradle
33
+ #
34
+ # Busybox and similar reduced shells will NOT work, because this script
35
+ # requires all of these POSIX shell features:
36
+ # * functions;
37
+ # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
38
+ # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
39
+ # * compound commands having a testable exit status, especially «case»;
40
+ # * various built-in commands including «command», «set», and «ulimit».
41
+ #
42
+ # Important for patching:
43
+ #
44
+ # (2) This script targets any POSIX shell, so it avoids extensions provided
45
+ # by Bash, Ksh, etc; in particular arrays are avoided.
46
+ #
47
+ # The "traditional" practice of packing multiple parameters into a
48
+ # space-separated string is a well documented source of bugs and security
49
+ # problems, so this is (mostly) avoided, by progressively accumulating
50
+ # options in "$@", and eventually passing that to Java.
51
+ #
52
+ # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
53
+ # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
54
+ # see the in-line comments for details.
55
+ #
56
+ # There are tweaks for specific operating systems such as AIX, CygWin,
57
+ # Darwin, MinGW, and NonStop.
58
+ #
59
+ # (3) This script is generated from the Groovy template
60
+ # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
61
+ # within the Gradle project.
62
+ #
63
+ # You can find Gradle at https://github.com/gradle/gradle/.
64
+ #
65
+ ##############################################################################
66
+
67
+ # Attempt to set APP_HOME
68
+
69
+ # Resolve links: $0 may be a link
70
+ app_path=$0
71
+
72
+ # Need this for daisy-chained symlinks.
73
+ while
74
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
75
+ [ -h "$app_path" ]
76
+ do
77
+ ls=$( ls -ld "$app_path" )
78
+ link=${ls#*' -> '}
79
+ case $link in #(
80
+ /*) app_path=$link ;; #(
81
+ *) app_path=$APP_HOME$link ;;
82
+ esac
83
+ done
84
+
85
+ # This is normally unused
86
+ # shellcheck disable=SC2034
87
+ APP_BASE_NAME=${0##*/}
88
+ # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89
+ APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90
+ ' "$PWD" ) || exit
91
+
92
+ # Use the maximum available, or set MAX_FD != -1 to use that value.
93
+ MAX_FD=maximum
94
+
95
+ warn () {
96
+ echo "$*"
97
+ } >&2
98
+
99
+ die () {
100
+ echo
101
+ echo "$*"
102
+ echo
103
+ exit 1
104
+ } >&2
105
+
106
+ # OS specific support (must be 'true' or 'false').
107
+ cygwin=false
108
+ msys=false
109
+ darwin=false
110
+ nonstop=false
111
+ case "$( uname )" in #(
112
+ CYGWIN* ) cygwin=true ;; #(
113
+ Darwin* ) darwin=true ;; #(
114
+ MSYS* | MINGW* ) msys=true ;; #(
115
+ NONSTOP* ) nonstop=true ;;
116
+ esac
117
+
118
+ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
119
+
120
+
121
+ # Determine the Java command to use to start the JVM.
122
+ if [ -n "$JAVA_HOME" ] ; then
123
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
124
+ # IBM's JDK on AIX uses strange locations for the executables
125
+ JAVACMD=$JAVA_HOME/jre/sh/java
126
+ else
127
+ JAVACMD=$JAVA_HOME/bin/java
128
+ fi
129
+ if [ ! -x "$JAVACMD" ] ; then
130
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
131
+
132
+ Please set the JAVA_HOME variable in your environment to match the
133
+ location of your Java installation."
134
+ fi
135
+ else
136
+ JAVACMD=java
137
+ if ! command -v java >/dev/null 2>&1
138
+ then
139
+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
140
+
141
+ Please set the JAVA_HOME variable in your environment to match the
142
+ location of your Java installation."
143
+ fi
144
+ fi
145
+
146
+ # Increase the maximum file descriptors if we can.
147
+ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
148
+ case $MAX_FD in #(
149
+ max*)
150
+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
151
+ # shellcheck disable=SC2039,SC3045
152
+ MAX_FD=$( ulimit -H -n ) ||
153
+ warn "Could not query maximum file descriptor limit"
154
+ esac
155
+ case $MAX_FD in #(
156
+ '' | soft) :;; #(
157
+ *)
158
+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
159
+ # shellcheck disable=SC2039,SC3045
160
+ ulimit -n "$MAX_FD" ||
161
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
162
+ esac
163
+ fi
164
+
165
+ # Collect all arguments for the java command, stacking in reverse order:
166
+ # * args from the command line
167
+ # * the main class name
168
+ # * -classpath
169
+ # * -D...appname settings
170
+ # * --module-path (only if needed)
171
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
172
+
173
+ # For Cygwin or MSYS, switch paths to Windows format before running java
174
+ if "$cygwin" || "$msys" ; then
175
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
176
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
177
+
178
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
179
+
180
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
181
+ for arg do
182
+ if
183
+ case $arg in #(
184
+ -*) false ;; # don't mess with options #(
185
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
186
+ [ -e "$t" ] ;; #(
187
+ *) false ;;
188
+ esac
189
+ then
190
+ arg=$( cygpath --path --ignore --mixed "$arg" )
191
+ fi
192
+ # Roll the args list around exactly as many times as the number of
193
+ # args, so each arg winds up back in the position where it started, but
194
+ # possibly modified.
195
+ #
196
+ # NB: a `for` loop captures its iteration list before it begins, so
197
+ # changing the positional parameters here affects neither the number of
198
+ # iterations, nor the values presented in `arg`.
199
+ shift # remove old arg
200
+ set -- "$@" "$arg" # push replacement arg
201
+ done
202
+ fi
203
+
204
+
205
+ # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
206
+ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
207
+
208
+ # Collect all arguments for the java command:
209
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
210
+ # and any embedded shellness will be escaped.
211
+ # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
212
+ # treated as '${Hostname}' itself on the command line.
213
+
214
+ set -- \
215
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
216
+ -classpath "$CLASSPATH" \
217
+ org.gradle.wrapper.GradleWrapperMain \
218
+ "$@"
219
+
220
+ # Stop when "xargs" is not available.
221
+ if ! command -v xargs >/dev/null 2>&1
222
+ then
223
+ die "xargs is not available"
224
+ fi
225
+
226
+ # Use "xargs" to parse quoted args.
227
+ #
228
+ # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
229
+ #
230
+ # In Bash we could simply go:
231
+ #
232
+ # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
233
+ # set -- "${ARGS[@]}" "$@"
234
+ #
235
+ # but POSIX shell has neither arrays nor command substitution, so instead we
236
+ # post-process each arg (as a line of input to sed) to backslash-escape any
237
+ # character that might be a shell metacharacter, then use eval to reverse
238
+ # that process (while maintaining the separation between arguments), and wrap
239
+ # the whole thing up as a single "set" statement.
240
+ #
241
+ # This will of course break if any of these variables contains a newline or
242
+ # an unmatched quote.
243
+ #
244
+
245
+ eval "set -- $(
246
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
247
+ xargs -n1 |
248
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
249
+ tr '\n' ' '
250
+ )" '"$@"'
251
+
252
+ exec "$JAVACMD" "$@"
package/gradlew.bat ADDED
@@ -0,0 +1,94 @@
1
+ @rem
2
+ @rem Copyright 2015 the original author or authors.
3
+ @rem
4
+ @rem Licensed under the Apache License, Version 2.0 (the "License");
5
+ @rem you may not use this file except in compliance with the License.
6
+ @rem You may obtain a copy of the License at
7
+ @rem
8
+ @rem https://www.apache.org/licenses/LICENSE-2.0
9
+ @rem
10
+ @rem Unless required by applicable law or agreed to in writing, software
11
+ @rem distributed under the License is distributed on an "AS IS" BASIS,
12
+ @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ @rem See the License for the specific language governing permissions and
14
+ @rem limitations under the License.
15
+ @rem
16
+ @rem SPDX-License-Identifier: Apache-2.0
17
+ @rem
18
+
19
+ @if "%DEBUG%"=="" @echo off
20
+ @rem ##########################################################################
21
+ @rem
22
+ @rem Gradle startup script for Windows
23
+ @rem
24
+ @rem ##########################################################################
25
+
26
+ @rem Set local scope for the variables with windows NT shell
27
+ if "%OS%"=="Windows_NT" setlocal
28
+
29
+ set DIRNAME=%~dp0
30
+ if "%DIRNAME%"=="" set DIRNAME=.
31
+ @rem This is normally unused
32
+ set APP_BASE_NAME=%~n0
33
+ set APP_HOME=%DIRNAME%
34
+
35
+ @rem Resolve any "." and ".." in APP_HOME to make it shorter.
36
+ for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
37
+
38
+ @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
39
+ set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
40
+
41
+ @rem Find java.exe
42
+ if defined JAVA_HOME goto findJavaFromJavaHome
43
+
44
+ set JAVA_EXE=java.exe
45
+ %JAVA_EXE% -version >NUL 2>&1
46
+ if %ERRORLEVEL% equ 0 goto execute
47
+
48
+ echo. 1>&2
49
+ echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50
+ echo. 1>&2
51
+ echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52
+ echo location of your Java installation. 1>&2
53
+
54
+ goto fail
55
+
56
+ :findJavaFromJavaHome
57
+ set JAVA_HOME=%JAVA_HOME:"=%
58
+ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
59
+
60
+ if exist "%JAVA_EXE%" goto execute
61
+
62
+ echo. 1>&2
63
+ echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64
+ echo. 1>&2
65
+ echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66
+ echo location of your Java installation. 1>&2
67
+
68
+ goto fail
69
+
70
+ :execute
71
+ @rem Setup the command line
72
+
73
+ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
74
+
75
+
76
+ @rem Execute Gradle
77
+ "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
78
+
79
+ :end
80
+ @rem End local scope for the variables with windows NT shell
81
+ if %ERRORLEVEL% equ 0 goto mainEnd
82
+
83
+ :fail
84
+ rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
85
+ rem the _cmd.exe /c_ return code!
86
+ set EXIT_CODE=%ERRORLEVEL%
87
+ if %EXIT_CODE% equ 0 set EXIT_CODE=1
88
+ if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
89
+ exit /b %EXIT_CODE%
90
+
91
+ :mainEnd
92
+ if "%OS%"=="Windows_NT" endlocal
93
+
94
+ :omega
@@ -106,11 +106,12 @@ extension ButtonSize {
106
106
  }
107
107
  }
108
108
 
109
- var font: Font {
109
+ var typographyStyle: TypographyStyle {
110
110
  switch self {
111
- case .large: return .system(size: 16, weight: .bold)
112
- case .medium: return .system(size: 14, weight: .bold)
113
- case .small: return .system(size: 12, weight: .bold)
111
+ case .large: return .actionDefaultBold
112
+ case .medium: return .actionSBold
113
+ case .small: return .actionXsBold
114
+ default : return .actionDefaultBold
114
115
  }
115
116
  }
116
117
  }
@@ -180,9 +181,7 @@ public struct Button: View {
180
181
  iconLeft.frame(width: size.iconSize, height: size.iconSize)
181
182
  }
182
183
 
183
- Text(title)
184
- .font(size.font)
185
- .foregroundColor(fg)
184
+ MomoText(title, typography: size.typographyStyle, color: fg)
186
185
  .lineLimit(1)
187
186
  .truncationMode(.tail)
188
187
 
@@ -29,9 +29,8 @@ public struct Input: View {
29
29
  public var onBlur: (() -> Void)?
30
30
  public var onRightIconPressed: (() -> Void)?
31
31
 
32
- @State private var isFocused: Bool = false
32
+ @FocusState private var isFocused: Bool
33
33
  @State private var isPasswordHidden: Bool = true
34
- @FocusState private var isTextFieldFocused: Bool
35
34
 
36
35
  public init(
37
36
  text: Binding<String>,
@@ -128,11 +127,12 @@ public struct Input: View {
128
127
 
129
128
  if secureTextEntry && isPasswordHidden {
130
129
  SecureField("", text: $text, onCommit: {})
130
+ .keyboardType(keyboardType)
131
131
  .font(fontWeight == .bold ? .action_s_bold : .body_default_regular)
132
132
  .foregroundColor(getTextColor())
133
133
  .disabled(disabled || readOnly)
134
134
  .applyPrimaryCursorColor()
135
- .focused($isTextFieldFocused)
135
+ .focused($isFocused)
136
136
  .onChange(of: text) { newValue in
137
137
  onChangeText?(newValue)
138
138
  }
@@ -140,12 +140,12 @@ public struct Input: View {
140
140
  TextField("", text: $text, onEditingChanged: { focused in
141
141
  handleFocusChange(focused)
142
142
  })
143
- .keyboardType(secureTextEntry ? .default : keyboardType)
143
+ .keyboardType(keyboardType)
144
144
  .font(fontWeight == .bold ? .action_s_bold : .body_default_regular)
145
145
  .foregroundColor(getTextColor())
146
146
  .disabled(disabled || readOnly)
147
147
  .applyPrimaryCursorColor()
148
- .focused($isTextFieldFocused)
148
+ .focused($isFocused)
149
149
  .onChange(of: text) { newValue in
150
150
  onChangeText?(newValue)
151
151
  }
@@ -154,7 +154,7 @@ public struct Input: View {
154
154
 
155
155
  // Clear button (only show when focused and has text)
156
156
  if isFocused && !text.isEmpty {
157
- SwiftUI.Button(action: { text = "" }) {
157
+ SwiftUI.Button(action: { text = "" ; onChangeText?("") }) {
158
158
  Icon(source: "24_navigation_close_circle_full", size: 16, color: Colors.black12)
159
159
  .padding(.leading, Spacing.S)
160
160
  }
@@ -206,11 +206,11 @@ public struct Input: View {
206
206
  .onAppear {
207
207
  if autofocus {
208
208
  DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
209
- isTextFieldFocused = true
209
+ isFocused = true
210
210
  }
211
211
  }
212
212
  }
213
- .onChange(of: isTextFieldFocused) { newValue in
213
+ .onChange(of: isFocused) { newValue in
214
214
  isFocused = newValue
215
215
  if newValue {
216
216
  onFocus?()
@@ -224,7 +224,6 @@ public struct Input: View {
224
224
 
225
225
  private func handleFocusChange(_ focused: Bool) {
226
226
  isFocused = focused
227
- isTextFieldFocused = focused
228
227
  if focused {
229
228
  onFocus?()
230
229
  } else {