@momo-kits/native-kits 0.0.1-beta.4 → 0.89.1-2

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 (195) hide show
  1. package/README.md +1 -0
  2. package/android/.gradle/8.0/checksums/checksums.lock +0 -0
  3. package/android/.gradle/8.0/dependencies-accessors/dependencies-accessors.lock +0 -0
  4. package/android/.gradle/8.0/dependencies-accessors/gc.properties +0 -0
  5. package/android/.gradle/8.0/fileChanges/last-build.bin +0 -0
  6. package/android/.gradle/8.0/fileHashes/fileHashes.lock +0 -0
  7. package/android/.gradle/8.0/gc.properties +0 -0
  8. package/android/.gradle/config.properties +2 -0
  9. package/android/.gradle/vcs-1/gc.properties +0 -0
  10. package/android/.idea/gradle.xml +12 -0
  11. package/android/.idea/migrations.xml +10 -0
  12. package/android/.idea/misc.xml +10 -0
  13. package/android/.idea/vcs.xml +6 -0
  14. package/android/.idea/workspace.xml +50 -0
  15. package/android/build.gradle +35 -69
  16. package/android/local.properties +8 -0
  17. package/android/proguard-rules.pro +21 -0
  18. package/android/src/main/AndroidManifest.xml +2 -2
  19. package/android/src/main/java/com/momoplatform/nativekits/foundations/Button.kt +16 -0
  20. package/android/src/main/java/com/momoplatform/nativekits/libs/Logo.kt +63 -0
  21. package/android/src/main/java/com/momoplatform/nativekits/libs/TrustBanner.kt +246 -0
  22. package/android/src/main/res/drawable/ic_launcher_background.xml +170 -0
  23. package/android/src/main/res/drawable-v24/ic_launcher_foreground.xml +30 -0
  24. package/android/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +6 -0
  25. package/android/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +6 -0
  26. package/android/src/main/res/mipmap-hdpi/ic_launcher.webp +0 -0
  27. package/android/src/main/res/mipmap-hdpi/ic_launcher_round.webp +0 -0
  28. package/android/src/main/res/mipmap-mdpi/ic_launcher.webp +0 -0
  29. package/android/src/main/res/mipmap-mdpi/ic_launcher_round.webp +0 -0
  30. package/android/src/main/res/mipmap-xhdpi/ic_launcher.webp +0 -0
  31. package/android/src/main/res/mipmap-xhdpi/ic_launcher_round.webp +0 -0
  32. package/android/src/main/res/mipmap-xxhdpi/ic_launcher.webp +0 -0
  33. package/android/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp +0 -0
  34. package/android/src/main/res/mipmap-xxxhdpi/ic_launcher.webp +0 -0
  35. package/android/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp +0 -0
  36. package/android/src/main/res/values/colors.xml +10 -0
  37. package/android/src/main/res/values/strings.xml +3 -0
  38. package/android/src/main/res/values/themes.xml +3 -0
  39. package/android/src/main/res/values-night/themes.xml +3 -0
  40. package/android/src/main/res/xml/backup_rules.xml +13 -0
  41. package/android/src/main/res/xml/data_extraction_rules.xml +19 -0
  42. package/build.gradle.kts +18 -0
  43. package/compose/build.gradle.kts +82 -0
  44. package/compose/src/androidMain/AndroidManifest.xml +2 -0
  45. package/compose/src/androidMain/kotlin/vn/momo/kits/utils/Platform.kt +3 -0
  46. package/compose/src/androidMain/kotlin/vn/momo/kits/utils/SetMaskFilter.kt +8 -0
  47. package/compose/src/androidMain/kotlin/vn/momo/kits/utils/Utils.android.kt +14 -0
  48. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Components.kt +194 -0
  49. package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +197 -0
  50. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +133 -0
  51. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +62 -0
  52. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +27 -0
  53. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +288 -0
  54. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +80 -0
  55. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +23 -0
  56. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +42 -0
  57. package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +126 -0
  58. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +51 -0
  59. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +299 -0
  60. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +246 -0
  61. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +223 -0
  62. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +244 -0
  63. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +281 -0
  64. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PromotionPopup.kt +72 -0
  65. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +65 -0
  66. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +64 -0
  67. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +63 -0
  68. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +73 -0
  69. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +42 -0
  70. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +150 -0
  71. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +12 -0
  72. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +13 -0
  73. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +173 -0
  74. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +242 -0
  75. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +2 -0
  76. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +2 -0
  77. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +2 -0
  78. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +50 -0
  79. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +1321 -0
  80. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Platform.kt +3 -0
  81. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/SetMaskFilter.kt +5 -0
  82. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +97 -0
  83. package/compose/src/iosMain/kotlin/vn/momo/kits/utils/Platform.kt +3 -0
  84. package/compose/src/iosMain/kotlin/vn/momo/kits/utils/SetMaskFilter.kt +9 -0
  85. package/compose/src/iosMain/kotlin/vn/momo/kits/utils/Utils.ios.kt +18 -0
  86. package/gradle.properties +19 -0
  87. package/gradlew +240 -0
  88. package/gradlew.bat +91 -0
  89. package/ios/Button/Button.swift +9 -2
  90. package/ios/CalculatorKeyboard/CalculatorKeyboard.swift +126 -0
  91. package/ios/Checkbox/Checkbox.swift +38 -0
  92. package/ios/{Colors+Spacing → Colors+Radius+Spacing}/Colors.swift +21 -19
  93. package/ios/Colors+Radius+Spacing/Radius.swift +22 -0
  94. package/ios/Image/Image.swift +60 -0
  95. package/ios/Input/Input.swift +88 -37
  96. package/ios/OTPKeyboard/KeyboardButton.swift +12 -4
  97. package/ios/OTPKeyboard/OTPKeyboard.swift +1 -1
  98. package/ios/Popup/PopupDisplay.swift +169 -0
  99. package/ios/Popup/PopupInput.swift +96 -0
  100. package/ios/Popup/PopupPromotion.swift +52 -0
  101. package/ios/PopupView/FullscreenPopup.swift +251 -0
  102. package/ios/{Popup → PopupView}/Modifiers.swift +6 -20
  103. package/ios/{Popup → PopupView}/PopupView.swift +38 -146
  104. package/ios/PopupView/Utils++.swift +281 -0
  105. package/ios/ScrollIndicator/ScrollIndicator.swift +79 -0
  106. package/ios/Switch/Switch.swift +44 -0
  107. package/ios/Template/Logo/Logo.swift +75 -0
  108. package/ios/Template/TrustBanner/TrustBanner.swift +189 -0
  109. package/ios/native-kits.podspec +2 -0
  110. package/local.properties +8 -0
  111. package/package.json +6 -6
  112. package/publish.sh +1 -10
  113. package/settings.gradle.kts +41 -0
  114. package/android/gradle.properties +0 -5
  115. package/android/src/main/java/com/momoplatform/nativekits/NativeKitsPackage.kt +0 -17
  116. package/android/src/main/java/com/momoplatform/nativekits/NativeKitsViewManager.kt +0 -20
  117. package/example/ios/Example/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -63
  118. package/example/ios/Example/Assets.xcassets/Background.colorset/Contents.json +0 -38
  119. package/example/ios/Example/Assets.xcassets/Border.colorset/Contents.json +0 -38
  120. package/example/ios/Example/Assets.xcassets/Card.colorset/Contents.json +0 -38
  121. package/example/ios/Example/Assets.xcassets/Contents.json +0 -6
  122. package/example/ios/Example/Assets.xcassets/Error.colorset/Contents.json +0 -38
  123. package/example/ios/Example/Assets.xcassets/Primary.colorset/Contents.json +0 -38
  124. package/example/ios/Example/Assets.xcassets/PrimaryDark.colorset/Contents.json +0 -38
  125. package/example/ios/Example/Assets.xcassets/PrimaryLight.colorset/Contents.json +0 -38
  126. package/example/ios/Example/Assets.xcassets/Secondary.colorset/Contents.json +0 -38
  127. package/example/ios/Example/Assets.xcassets/Success.colorset/Contents.json +0 -38
  128. package/example/ios/Example/Assets.xcassets/Text.colorset/Contents.json +0 -38
  129. package/example/ios/Example/Assets.xcassets/TextSecondary.colorset/Contents.json +0 -38
  130. package/example/ios/Example/Assets.xcassets/Warning.colorset/Contents.json +0 -38
  131. package/example/ios/Example/ComponentDetail.swift +0 -35
  132. package/example/ios/Example/ComponentItem.swift +0 -24
  133. package/example/ios/Example/ComponentModel.swift +0 -33
  134. package/example/ios/Example/ContentView.swift +0 -53
  135. package/example/ios/Example/Example.entitlements +0 -10
  136. package/example/ios/Example/Foundation/ButtonDemo.swift +0 -80
  137. package/example/ios/Example/Foundation/Popup/ActionSheets.swift +0 -136
  138. package/example/ios/Example/Foundation/Popup/Floats.swift +0 -127
  139. package/example/ios/Example/Foundation/Popup/Popups.swift +0 -101
  140. package/example/ios/Example/Foundation/PopupDemo.swift +0 -366
  141. package/example/ios/Example/Foundation/TextInputDemo.swift +0 -31
  142. package/example/ios/Example/Foundation/TypographyDemo.swift +0 -53
  143. package/example/ios/Example/Foundation.swift +0 -26
  144. package/example/ios/Example/Info.plist +0 -18
  145. package/example/ios/Example/Library/SwipeableDemo.swift +0 -105
  146. package/example/ios/Example/Library.swift +0 -26
  147. package/example/ios/Example/Main.swift +0 -11
  148. package/example/ios/Example/Overview.swift +0 -20
  149. package/example/ios/Example/Preview Content/Preview Assets.xcassets/Contents.json +0 -6
  150. package/example/ios/Example/Resource/SFProText-Black.ttf +0 -0
  151. package/example/ios/Example/Resource/SFProText-Bold.ttf +0 -0
  152. package/example/ios/Example/Resource/SFProText-Heavy.ttf +0 -0
  153. package/example/ios/Example/Resource/SFProText-Light.ttf +0 -0
  154. package/example/ios/Example/Resource/SFProText-Medium.ttf +0 -0
  155. package/example/ios/Example/Resource/SFProText-Regular.ttf +0 -0
  156. package/example/ios/Example/Resource/SFProText-Semibold.ttf +0 -0
  157. package/example/ios/Example/Resource/SFProText-Thin.ttf +0 -0
  158. package/example/ios/Example/Resource/SFProText-Ultralight.ttf +0 -0
  159. package/example/ios/Example/Resource/foundation.json +0 -33
  160. package/example/ios/Example/Resource/library.json +0 -8
  161. package/example/ios/Example/Utils.swift +0 -30
  162. package/example/ios/Example/ViewModifier/DarkViewModifier.swift +0 -22
  163. package/example/ios/Example.xcodeproj/project.pbxproj +0 -570
  164. package/example/ios/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  165. package/example/ios/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  166. package/example/ios/Example.xcodeproj/project.xcworkspace/xcuserdata/wem.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  167. package/example/ios/Example.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  168. package/example/ios/Example.xcworkspace/contents.xcworkspacedata +0 -10
  169. package/example/ios/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  170. package/example/ios/Example.xcworkspace/xcuserdata/wem.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  171. package/example/ios/Example.xcworkspace/xcuserdata/wem.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -6
  172. package/example/ios/Podfile +0 -6
  173. package/example/ios/Podfile.lock +0 -16
  174. package/example/ios/Pods/Local Podspecs/MoMoUIKits.podspec.json +0 -29
  175. package/example/ios/Pods/Manifest.lock +0 -16
  176. package/example/ios/Pods/Pods.xcodeproj/project.pbxproj +0 -661
  177. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +0 -58
  178. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/Pods-Example.xcscheme +0 -58
  179. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/wem.xcuserdatad/xcschemes/xcschememanagement.plist +0 -25
  180. package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits-dummy.m +0 -5
  181. package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits-prefix.pch +0 -12
  182. package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits-umbrella.h +0 -16
  183. package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits.debug.xcconfig +0 -12
  184. package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits.modulemap +0 -6
  185. package/example/ios/Pods/Target Support Files/MoMoUIKits/MoMoUIKits.release.xcconfig +0 -12
  186. package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.markdown +0 -3
  187. package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-acknowledgements.plist +0 -29
  188. package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-dummy.m +0 -5
  189. package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example-umbrella.h +0 -16
  190. package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example.debug.xcconfig +0 -14
  191. package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example.modulemap +0 -6
  192. package/example/ios/Pods/Target Support Files/Pods-Example/Pods-Example.release.xcconfig +0 -14
  193. package/ios/Colors+Spacing/Radius.swift +0 -11
  194. package/ios/Popup/Utils++.swift +0 -163
  195. /package/ios/{Colors+Spacing → Colors+Radius+Spacing}/Spacing.swift +0 -0
@@ -0,0 +1,170 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <vector xmlns:android="http://schemas.android.com/apk/res/android"
3
+ android:width="108dp"
4
+ android:height="108dp"
5
+ android:viewportWidth="108"
6
+ android:viewportHeight="108">
7
+ <path
8
+ android:fillColor="#3DDC84"
9
+ android:pathData="M0,0h108v108h-108z" />
10
+ <path
11
+ android:fillColor="#00000000"
12
+ android:pathData="M9,0L9,108"
13
+ android:strokeWidth="0.8"
14
+ android:strokeColor="#33FFFFFF" />
15
+ <path
16
+ android:fillColor="#00000000"
17
+ android:pathData="M19,0L19,108"
18
+ android:strokeWidth="0.8"
19
+ android:strokeColor="#33FFFFFF" />
20
+ <path
21
+ android:fillColor="#00000000"
22
+ android:pathData="M29,0L29,108"
23
+ android:strokeWidth="0.8"
24
+ android:strokeColor="#33FFFFFF" />
25
+ <path
26
+ android:fillColor="#00000000"
27
+ android:pathData="M39,0L39,108"
28
+ android:strokeWidth="0.8"
29
+ android:strokeColor="#33FFFFFF" />
30
+ <path
31
+ android:fillColor="#00000000"
32
+ android:pathData="M49,0L49,108"
33
+ android:strokeWidth="0.8"
34
+ android:strokeColor="#33FFFFFF" />
35
+ <path
36
+ android:fillColor="#00000000"
37
+ android:pathData="M59,0L59,108"
38
+ android:strokeWidth="0.8"
39
+ android:strokeColor="#33FFFFFF" />
40
+ <path
41
+ android:fillColor="#00000000"
42
+ android:pathData="M69,0L69,108"
43
+ android:strokeWidth="0.8"
44
+ android:strokeColor="#33FFFFFF" />
45
+ <path
46
+ android:fillColor="#00000000"
47
+ android:pathData="M79,0L79,108"
48
+ android:strokeWidth="0.8"
49
+ android:strokeColor="#33FFFFFF" />
50
+ <path
51
+ android:fillColor="#00000000"
52
+ android:pathData="M89,0L89,108"
53
+ android:strokeWidth="0.8"
54
+ android:strokeColor="#33FFFFFF" />
55
+ <path
56
+ android:fillColor="#00000000"
57
+ android:pathData="M99,0L99,108"
58
+ android:strokeWidth="0.8"
59
+ android:strokeColor="#33FFFFFF" />
60
+ <path
61
+ android:fillColor="#00000000"
62
+ android:pathData="M0,9L108,9"
63
+ android:strokeWidth="0.8"
64
+ android:strokeColor="#33FFFFFF" />
65
+ <path
66
+ android:fillColor="#00000000"
67
+ android:pathData="M0,19L108,19"
68
+ android:strokeWidth="0.8"
69
+ android:strokeColor="#33FFFFFF" />
70
+ <path
71
+ android:fillColor="#00000000"
72
+ android:pathData="M0,29L108,29"
73
+ android:strokeWidth="0.8"
74
+ android:strokeColor="#33FFFFFF" />
75
+ <path
76
+ android:fillColor="#00000000"
77
+ android:pathData="M0,39L108,39"
78
+ android:strokeWidth="0.8"
79
+ android:strokeColor="#33FFFFFF" />
80
+ <path
81
+ android:fillColor="#00000000"
82
+ android:pathData="M0,49L108,49"
83
+ android:strokeWidth="0.8"
84
+ android:strokeColor="#33FFFFFF" />
85
+ <path
86
+ android:fillColor="#00000000"
87
+ android:pathData="M0,59L108,59"
88
+ android:strokeWidth="0.8"
89
+ android:strokeColor="#33FFFFFF" />
90
+ <path
91
+ android:fillColor="#00000000"
92
+ android:pathData="M0,69L108,69"
93
+ android:strokeWidth="0.8"
94
+ android:strokeColor="#33FFFFFF" />
95
+ <path
96
+ android:fillColor="#00000000"
97
+ android:pathData="M0,79L108,79"
98
+ android:strokeWidth="0.8"
99
+ android:strokeColor="#33FFFFFF" />
100
+ <path
101
+ android:fillColor="#00000000"
102
+ android:pathData="M0,89L108,89"
103
+ android:strokeWidth="0.8"
104
+ android:strokeColor="#33FFFFFF" />
105
+ <path
106
+ android:fillColor="#00000000"
107
+ android:pathData="M0,99L108,99"
108
+ android:strokeWidth="0.8"
109
+ android:strokeColor="#33FFFFFF" />
110
+ <path
111
+ android:fillColor="#00000000"
112
+ android:pathData="M19,29L89,29"
113
+ android:strokeWidth="0.8"
114
+ android:strokeColor="#33FFFFFF" />
115
+ <path
116
+ android:fillColor="#00000000"
117
+ android:pathData="M19,39L89,39"
118
+ android:strokeWidth="0.8"
119
+ android:strokeColor="#33FFFFFF" />
120
+ <path
121
+ android:fillColor="#00000000"
122
+ android:pathData="M19,49L89,49"
123
+ android:strokeWidth="0.8"
124
+ android:strokeColor="#33FFFFFF" />
125
+ <path
126
+ android:fillColor="#00000000"
127
+ android:pathData="M19,59L89,59"
128
+ android:strokeWidth="0.8"
129
+ android:strokeColor="#33FFFFFF" />
130
+ <path
131
+ android:fillColor="#00000000"
132
+ android:pathData="M19,69L89,69"
133
+ android:strokeWidth="0.8"
134
+ android:strokeColor="#33FFFFFF" />
135
+ <path
136
+ android:fillColor="#00000000"
137
+ android:pathData="M19,79L89,79"
138
+ android:strokeWidth="0.8"
139
+ android:strokeColor="#33FFFFFF" />
140
+ <path
141
+ android:fillColor="#00000000"
142
+ android:pathData="M29,19L29,89"
143
+ android:strokeWidth="0.8"
144
+ android:strokeColor="#33FFFFFF" />
145
+ <path
146
+ android:fillColor="#00000000"
147
+ android:pathData="M39,19L39,89"
148
+ android:strokeWidth="0.8"
149
+ android:strokeColor="#33FFFFFF" />
150
+ <path
151
+ android:fillColor="#00000000"
152
+ android:pathData="M49,19L49,89"
153
+ android:strokeWidth="0.8"
154
+ android:strokeColor="#33FFFFFF" />
155
+ <path
156
+ android:fillColor="#00000000"
157
+ android:pathData="M59,19L59,89"
158
+ android:strokeWidth="0.8"
159
+ android:strokeColor="#33FFFFFF" />
160
+ <path
161
+ android:fillColor="#00000000"
162
+ android:pathData="M69,19L69,89"
163
+ android:strokeWidth="0.8"
164
+ android:strokeColor="#33FFFFFF" />
165
+ <path
166
+ android:fillColor="#00000000"
167
+ android:pathData="M79,19L79,89"
168
+ android:strokeWidth="0.8"
169
+ android:strokeColor="#33FFFFFF" />
170
+ </vector>
@@ -0,0 +1,30 @@
1
+ <vector xmlns:android="http://schemas.android.com/apk/res/android"
2
+ xmlns:aapt="http://schemas.android.com/aapt"
3
+ android:width="108dp"
4
+ android:height="108dp"
5
+ android:viewportWidth="108"
6
+ android:viewportHeight="108">
7
+ <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
8
+ <aapt:attr name="android:fillColor">
9
+ <gradient
10
+ android:endX="85.84757"
11
+ android:endY="92.4963"
12
+ android:startX="42.9492"
13
+ android:startY="49.59793"
14
+ android:type="linear">
15
+ <item
16
+ android:color="#44000000"
17
+ android:offset="0.0" />
18
+ <item
19
+ android:color="#00000000"
20
+ android:offset="1.0" />
21
+ </gradient>
22
+ </aapt:attr>
23
+ </path>
24
+ <path
25
+ android:fillColor="#FFFFFF"
26
+ android:fillType="nonZero"
27
+ android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
28
+ android:strokeWidth="1"
29
+ android:strokeColor="#00000000" />
30
+ </vector>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3
+ <background android:drawable="@drawable/ic_launcher_background" />
4
+ <foreground android:drawable="@drawable/ic_launcher_foreground" />
5
+ <monochrome android:drawable="@drawable/ic_launcher_foreground" />
6
+ </adaptive-icon>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
3
+ <background android:drawable="@drawable/ic_launcher_background" />
4
+ <foreground android:drawable="@drawable/ic_launcher_foreground" />
5
+ <monochrome android:drawable="@drawable/ic_launcher_foreground" />
6
+ </adaptive-icon>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <resources>
3
+ <color name="purple_200">#FFBB86FC</color>
4
+ <color name="purple_500">#FF6200EE</color>
5
+ <color name="purple_700">#FF3700B3</color>
6
+ <color name="teal_200">#FF03DAC5</color>
7
+ <color name="teal_700">#FF018786</color>
8
+ <color name="black">#FF000000</color>
9
+ <color name="white">#FFFFFFFF</color>
10
+ </resources>
@@ -0,0 +1,3 @@
1
+ <resources>
2
+ <string name="app_name">nativekits</string>
3
+ </resources>
@@ -0,0 +1,3 @@
1
+ <resources xmlns:tools="http://schemas.android.com/tools">
2
+
3
+ </resources>
@@ -0,0 +1,3 @@
1
+ <resources xmlns:tools="http://schemas.android.com/tools">
2
+
3
+ </resources>
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0" encoding="utf-8"?><!--
2
+ Sample backup rules file; uncomment and customize as necessary.
3
+ See https://developer.android.com/guide/topics/data/autobackup
4
+ for details.
5
+ Note: This file is ignored for devices older that API 31
6
+ See https://developer.android.com/about/versions/12/backup-restore
7
+ -->
8
+ <full-backup-content>
9
+ <!--
10
+ <include domain="sharedpref" path="."/>
11
+ <exclude domain="sharedpref" path="device.xml"/>
12
+ -->
13
+ </full-backup-content>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="utf-8"?><!--
2
+ Sample data extraction rules file; uncomment and customize as necessary.
3
+ See https://developer.android.com/about/versions/12/backup-restore#xml-changes
4
+ for details.
5
+ -->
6
+ <data-extraction-rules>
7
+ <cloud-backup>
8
+ <!-- TODO: Use <include> and <exclude> to control what is backed up.
9
+ <include .../>
10
+ <exclude .../>
11
+ -->
12
+ </cloud-backup>
13
+ <!--
14
+ <device-transfer>
15
+ <include .../>
16
+ <exclude .../>
17
+ </device-transfer>
18
+ -->
19
+ </data-extraction-rules>
@@ -0,0 +1,18 @@
1
+ plugins {
2
+ // this is necessary to avoid the plugins to be loaded multiple times
3
+ // in each subproject's classloader
4
+ kotlin("multiplatform").apply(false)
5
+ id("com.android.application").apply(false)
6
+ id("com.android.library").apply(false)
7
+ id("org.jetbrains.compose").apply(false)
8
+ }
9
+
10
+ subprojects {
11
+
12
+ }
13
+
14
+ tasks.register<Copy>("setUpGitHooks") {
15
+ group = "help"
16
+ from("$rootDir/.hooks")
17
+ into("$rootDir/.git/hooks")
18
+ }
@@ -0,0 +1,82 @@
1
+ plugins {
2
+ kotlin("multiplatform")
3
+ id("com.android.library")
4
+ id("org.jetbrains.compose")
5
+ }
6
+
7
+ kotlin {
8
+ androidTarget {
9
+ publishLibraryVariants("release")
10
+ }
11
+
12
+ listOf(
13
+ iosX64(),
14
+ iosArm64(),
15
+ iosSimulatorArm64(),
16
+ ).forEach { iosTarget ->
17
+ iosTarget.binaries.framework {
18
+ baseName = "lib"
19
+ isStatic = true
20
+ }
21
+ }
22
+
23
+ sourceSets {
24
+ val commonMain by getting {
25
+ dependencies {
26
+ val voyagerVersion = "1.1.0-alpha03"
27
+ implementation(compose.runtime)
28
+ implementation(compose.foundation)
29
+ implementation(compose.material)
30
+ implementation(compose.material3)
31
+ implementation(libs.ktor.client.core)
32
+ implementation(libs.jetbrains.coroutines.core)
33
+ implementation(libs.ktor.client.core)
34
+ implementation("com.github.skydoves:landscapist-coil3:2.3.2")
35
+ implementation(compose.components.resources)
36
+
37
+ implementation("cafe.adriel.voyager:voyager-navigator:$voyagerVersion")
38
+ implementation("cafe.adriel.voyager:voyager-screenmodel:$voyagerVersion")
39
+ implementation("cafe.adriel.voyager:voyager-bottom-sheet-navigator:$voyagerVersion")
40
+ implementation("cafe.adriel.voyager:voyager-tab-navigator:$voyagerVersion")
41
+ implementation("cafe.adriel.voyager:voyager-transitions:$voyagerVersion")
42
+ implementation("cafe.adriel.voyager:voyager-koin:$voyagerVersion")
43
+ }
44
+ }
45
+ val androidMain by getting {
46
+ dependencies {
47
+ val voyagerVersion = "1.1.0-alpha03"
48
+ implementation(libs.ktor.client.okhttp)
49
+ implementation(libs.jetbrains.coroutines.android)
50
+ implementation("cafe.adriel.voyager:voyager-hilt:$voyagerVersion")
51
+ implementation("cafe.adriel.voyager:voyager-livedata:$voyagerVersion")
52
+ // RxJava integration
53
+ implementation("cafe.adriel.voyager:voyager-rxjava:$voyagerVersion")
54
+ }
55
+ }
56
+ val iosX64Main by getting
57
+ val iosArm64Main by getting
58
+ val iosSimulatorArm64Main by getting
59
+ }
60
+
61
+ task("testClasses")
62
+ }
63
+
64
+ android {
65
+ compileSdk = 34
66
+ namespace = "com.myapplication.common"
67
+
68
+ sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
69
+ sourceSets["main"].res.srcDirs("src/androidMain/res")
70
+ sourceSets["main"].resources.srcDirs("src/commonMain/resources")
71
+
72
+ defaultConfig {
73
+ minSdk = 23
74
+ }
75
+ compileOptions {
76
+ sourceCompatibility = JavaVersion.VERSION_17
77
+ targetCompatibility = JavaVersion.VERSION_17
78
+ }
79
+ kotlin {
80
+ jvmToolchain(17)
81
+ }
82
+ }
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest />
@@ -0,0 +1,3 @@
1
+ package vn.momo.kits.utils
2
+
3
+ actual fun getPlatformName(): String = "Android"
@@ -0,0 +1,8 @@
1
+ package vn.momo.kits.utils
2
+
3
+ import android.graphics.BlurMaskFilter
4
+ import androidx.compose.ui.graphics.NativePaint
5
+
6
+ actual fun NativePaint.setMaskFilter(blurRadius: Float) {
7
+ this.maskFilter = BlurMaskFilter(blurRadius, BlurMaskFilter.Blur.NORMAL)
8
+ }
@@ -0,0 +1,14 @@
1
+ package vn.momo.kits.utils
2
+
3
+ import androidx.compose.runtime.Composable
4
+ import androidx.compose.ui.platform.LocalConfiguration
5
+ import androidx.compose.ui.text.font.Font
6
+ import androidx.compose.ui.text.font.FontFamily
7
+
8
+ @Composable
9
+ actual fun getScreenDimensions(): ScreenDimension {
10
+ val config = LocalConfiguration.current
11
+ return ScreenDimension(
12
+ config.screenWidthDp, config.screenHeightDp
13
+ )
14
+ }
@@ -0,0 +1,194 @@
1
+ package vn.momo.kits.application
2
+
3
+ import androidx.compose.foundation.background
4
+ import androidx.compose.foundation.border
5
+ import androidx.compose.foundation.clickable
6
+ import androidx.compose.foundation.interaction.MutableInteractionSource
7
+ import androidx.compose.foundation.layout.Arrangement
8
+ import androidx.compose.foundation.layout.Box
9
+ import androidx.compose.foundation.layout.BoxWithConstraints
10
+ import androidx.compose.foundation.layout.Row
11
+ import androidx.compose.foundation.layout.Spacer
12
+ import androidx.compose.foundation.layout.WindowInsets
13
+ import androidx.compose.foundation.layout.asPaddingValues
14
+ import androidx.compose.foundation.layout.fillMaxWidth
15
+ import androidx.compose.foundation.layout.height
16
+ import androidx.compose.foundation.layout.padding
17
+ import androidx.compose.foundation.layout.size
18
+ import androidx.compose.foundation.layout.systemBars
19
+ import androidx.compose.foundation.layout.width
20
+ import androidx.compose.foundation.shape.RoundedCornerShape
21
+ import androidx.compose.material.ripple.rememberRipple
22
+ import androidx.compose.runtime.Composable
23
+ import androidx.compose.runtime.remember
24
+ import androidx.compose.ui.Alignment
25
+ import androidx.compose.ui.Modifier
26
+ import androidx.compose.ui.graphics.Color
27
+ import androidx.compose.ui.layout.ContentScale
28
+ import androidx.compose.ui.text.style.TextAlign
29
+ import androidx.compose.ui.unit.dp
30
+ import androidx.compose.ui.zIndex
31
+ import vn.momo.kits.components.Icon
32
+ import vn.momo.kits.components.Image
33
+ import vn.momo.kits.components.Options
34
+ import vn.momo.kits.components.Text
35
+ import vn.momo.kits.const.AppStatusBar
36
+ import vn.momo.kits.const.AppTheme
37
+ import vn.momo.kits.const.Colors
38
+ import vn.momo.kits.const.Spacing
39
+ import vn.momo.kits.const.Typography
40
+ import vn.momo.kits.utils.bottomBorder
41
+
42
+ enum class TitlePosition {
43
+ LEFT, CENTER,
44
+ }
45
+
46
+ @Composable
47
+ fun HeaderImage(
48
+ headerType: HeaderType = HeaderType.DEFAULT,
49
+ headerBackground: String?,
50
+ ) {
51
+ when (headerType) {
52
+ HeaderType.DEFAULT -> {
53
+ val height = AppStatusBar.current + 52.dp
54
+ Image(
55
+ source = headerBackground ?: "",
56
+ modifier = Modifier.fillMaxWidth().height(height),
57
+ options = Options(
58
+ contentScale = ContentScale.FillWidth
59
+ )
60
+ )
61
+ }
62
+
63
+ HeaderType.EXTENDED -> {
64
+ Image(
65
+ source = headerBackground ?: "",
66
+ modifier = Modifier.fillMaxWidth(),
67
+ options = Options(
68
+ contentScale = ContentScale.FillWidth
69
+ )
70
+ )
71
+ }
72
+
73
+ else -> {
74
+ Box(modifier = Modifier.fillMaxWidth())
75
+ }
76
+ }
77
+ }
78
+
79
+ @Composable
80
+ fun Header(
81
+ headerType: HeaderType = HeaderType.DEFAULT,
82
+ titlePosition: TitlePosition,
83
+ title: String,
84
+ backgroundColor: Color,
85
+ isBack: Boolean,
86
+ headerRight: @Composable (() -> Unit)? = null,
87
+ goBack: (() -> Unit) = { },
88
+ ) {
89
+ var tintIconColor = Colors.black_01
90
+ var backgroundButton = Colors.black_20.copy(alpha = 0.4f)
91
+ if (headerType == HeaderType.SURFACE) {
92
+ tintIconColor = AppTheme.current.colors.text.default
93
+ backgroundButton = Color.Transparent
94
+ }
95
+
96
+ if (headerType != HeaderType.NONE) {
97
+ BoxWithConstraints(
98
+ Modifier.height(AppStatusBar.current + 52.dp)
99
+ .background(backgroundColor)
100
+ .fillMaxWidth()
101
+ .bottomBorder(
102
+ strokeWidth = if (headerType == HeaderType.SURFACE) 2.dp else 0.dp,
103
+ color = AppTheme.current.colors.border.default
104
+ ),
105
+ contentAlignment = Alignment.BottomCenter
106
+ ) {
107
+ Row(
108
+ modifier = Modifier.height(52.dp)
109
+ .fillMaxWidth()
110
+ .padding(horizontal = Spacing.M),
111
+ verticalAlignment = Alignment.CenterVertically,
112
+ horizontalArrangement = Arrangement.SpaceBetween
113
+ ) {
114
+ if (isBack) {
115
+ Box(
116
+ modifier = Modifier
117
+ .size(28.dp)
118
+ .then(
119
+ if (headerType == HeaderType.SURFACE) {
120
+ Modifier.border(
121
+ 0.5.dp,
122
+ Colors.black_20.copy(alpha = 0.4f),
123
+ RoundedCornerShape(100)
124
+ )
125
+ } else {
126
+ Modifier
127
+ }
128
+ )
129
+ .background(
130
+ backgroundButton,
131
+ RoundedCornerShape(100)
132
+ )
133
+ .clickable(
134
+ interactionSource = remember { MutableInteractionSource() },
135
+ indication = rememberRipple(),
136
+ onClick = goBack
137
+ )
138
+ .padding(Spacing.XS),
139
+ contentAlignment = Alignment.Center
140
+ ) {
141
+ Icon(
142
+ source = "ic_back_ios",
143
+ color = tintIconColor,
144
+ size = 20.dp,
145
+ )
146
+ }
147
+ }
148
+ Box {}
149
+ headerRight?.invoke()
150
+ }
151
+
152
+ Row(
153
+ modifier = Modifier.height(52.dp)
154
+ .fillMaxWidth()
155
+ .padding(horizontal = Spacing.M),
156
+ verticalAlignment = Alignment.CenterVertically,
157
+ ) {
158
+ if (isBack) {
159
+ Spacer(Modifier.width(40.dp))
160
+ }
161
+ Box(
162
+ Modifier.weight(1f),
163
+ contentAlignment = if (titlePosition == TitlePosition.LEFT) Alignment.TopStart else Alignment.Center
164
+ ) {
165
+ HeaderTitle(
166
+ title = title,
167
+ color = tintIconColor,
168
+ )
169
+ }
170
+ if (isBack) {
171
+ Spacer(Modifier.width(40.dp))
172
+ }
173
+ }
174
+ }
175
+ }
176
+ }
177
+
178
+ @Composable
179
+ fun HeaderTitle(
180
+ title: String = "",
181
+ modifier: Modifier = Modifier,
182
+ textAlign: TextAlign = TextAlign.Start,
183
+ color: Color? = null,
184
+ ) {
185
+ Text(
186
+ modifier = Modifier.then(modifier).zIndex(1f),
187
+ text = title,
188
+ textAlign = textAlign,
189
+ style = Typography.headerDefault,
190
+ color = color,
191
+ maxLines = 1
192
+ )
193
+
194
+ }