@momo-kits/native-kits 0.157.1-skill.3 → 0.157.1-skill.6-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 (222) hide show
  1. package/.claude/skills/momo-native-kits-skills/README.md +52 -0
  2. package/.claude/skills/momo-native-kits-skills/SKILL.md +32 -0
  3. package/.claude/skills/momo-native-kits-skills/data-display/SKILL.md +42 -0
  4. package/.claude/skills/momo-native-kits-skills/feedback/SKILL.md +43 -0
  5. package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/feedback}/references/popup.md +3 -10
  6. package/.claude/skills/momo-native-kits-skills/form-controls/SKILL.md +42 -0
  7. package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/form-controls}/references/button.md +2 -3
  8. package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/form-controls}/references/input.md +3 -7
  9. package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/form-controls}/references/radio.md +9 -9
  10. package/.claude/skills/momo-native-kits-skills/layout/SKILL.md +39 -0
  11. package/.claude/skills/momo-native-kits-skills/navigation/SKILL.md +38 -0
  12. package/.claude/skills/momo-native-kits-skills/output/test-report.json +12 -0
  13. package/.claude/skills/momo-native-kits-skills/output/validation-result.json +108 -0
  14. package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills}/references/constants.md +81 -6
  15. package/.claude/skills/momo-native-kits-skills/references/design-guidelines.md +130 -0
  16. package/.claude/skills/momo-native-kits-skills/references/developer/android-compose.md +29 -0
  17. package/.claude/skills/momo-native-kits-skills/references/developer/code-convention.md +118 -0
  18. package/.claude/skills/momo-native-kits-skills/references/developer/compose-multiplatform.md +29 -0
  19. package/.claude/skills/momo-native-kits-skills/scripts/logger.js +63 -0
  20. package/.claude/skills/momo-native-kits-skills/scripts/rules/badge.js +32 -0
  21. package/.claude/skills/momo-native-kits-skills/scripts/rules/bottomtab.js +19 -0
  22. package/.claude/skills/momo-native-kits-skills/scripts/rules/button.js +32 -0
  23. package/.claude/skills/momo-native-kits-skills/scripts/rules/card.js +32 -0
  24. package/.claude/skills/momo-native-kits-skills/scripts/rules/checkbox.js +32 -0
  25. package/.claude/skills/momo-native-kits-skills/scripts/rules/chip.js +59 -0
  26. package/.claude/skills/momo-native-kits-skills/scripts/rules/divider.js +19 -0
  27. package/.claude/skills/momo-native-kits-skills/scripts/rules/global.js +61 -0
  28. package/.claude/skills/momo-native-kits-skills/scripts/rules/index.js +54 -0
  29. package/.claude/skills/momo-native-kits-skills/scripts/rules/input.js +32 -0
  30. package/.claude/skills/momo-native-kits-skills/scripts/rules/navigation.js +48 -0
  31. package/.claude/skills/momo-native-kits-skills/scripts/rules/popup.js +45 -0
  32. package/.claude/skills/momo-native-kits-skills/scripts/rules/radio.js +105 -0
  33. package/.claude/skills/momo-native-kits-skills/scripts/rules/skeleton.js +20 -0
  34. package/.claude/skills/momo-native-kits-skills/scripts/rules/snackbar.js +32 -0
  35. package/.claude/skills/momo-native-kits-skills/scripts/rules/state.js +21 -0
  36. package/.claude/skills/momo-native-kits-skills/scripts/rules/switch.js +45 -0
  37. package/.claude/skills/momo-native-kits-skills/scripts/rules/text.js +19 -0
  38. package/.claude/skills/momo-native-kits-skills/scripts/rules/tooltip.js +45 -0
  39. package/.claude/skills/momo-native-kits-skills/scripts/rules/trustbanner.js +22 -0
  40. package/.claude/skills/momo-native-kits-skills/scripts/test-on-device.sh +117 -0
  41. package/.claude/skills/momo-native-kits-skills/scripts/test-runner.js +167 -0
  42. package/.claude/skills/momo-native-kits-skills/scripts/validate-kits.js +131 -0
  43. package/.momo-agent.json +13 -0
  44. package/build.gradle.kts +11 -0
  45. package/compose/build.gradle.kts +180 -0
  46. package/compose/build.gradle.kts.backup +180 -0
  47. package/compose/compose.podspec +54 -0
  48. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +110 -0
  49. package/compose/src/commonMain/composeResources/font/momosignature.otf +0 -0
  50. package/compose/src/commonMain/composeResources/font/momotrustdisplay.otf +0 -0
  51. package/compose/src/commonMain/composeResources/font/sfprotext_black.otf +0 -0
  52. package/compose/src/commonMain/composeResources/font/sfprotext_black.ttf +0 -0
  53. package/compose/src/commonMain/composeResources/font/sfprotext_bold.ttf +0 -0
  54. package/compose/src/commonMain/composeResources/font/sfprotext_heavy.ttf +0 -0
  55. package/compose/src/commonMain/composeResources/font/sfprotext_light.ttf +0 -0
  56. package/compose/src/commonMain/composeResources/font/sfprotext_medium.ttf +0 -0
  57. package/compose/src/commonMain/composeResources/font/sfprotext_regular.ttf +0 -0
  58. package/compose/src/commonMain/composeResources/font/sfprotext_semibold.ttf +0 -0
  59. package/compose/src/commonMain/composeResources/font/sfprotext_thin.otf +0 -0
  60. package/compose/src/commonMain/composeResources/font/sfprotext_thin.ttf +0 -0
  61. package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.otf +0 -0
  62. package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.ttf +0 -0
  63. package/compose/src/commonMain/kotlin/vn/momo/kits/application/AnimationSearchInput.kt +57 -0
  64. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +107 -0
  65. package/compose/src/commonMain/kotlin/vn/momo/kits/application/FloatingButton.kt +201 -0
  66. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Header.kt +222 -0
  67. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderAnimated.kt +48 -0
  68. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderBackground.kt +86 -0
  69. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderDefault.kt +76 -0
  70. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderExtended.kt +76 -0
  71. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderRight.kt +305 -0
  72. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderTitle.kt +33 -0
  73. package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +720 -0
  74. package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +121 -0
  75. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +405 -0
  76. package/compose/src/commonMain/kotlin/vn/momo/kits/application/useHeaderSearchAnimation.kt +69 -0
  77. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +85 -0
  78. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +32 -0
  79. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +340 -0
  80. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +198 -0
  81. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +357 -0
  82. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +94 -0
  83. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +136 -0
  84. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +543 -0
  85. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +23 -0
  86. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +76 -0
  87. package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +148 -0
  88. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +188 -0
  89. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +116 -0
  90. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +448 -0
  91. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +172 -0
  92. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +255 -0
  93. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +231 -0
  94. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +233 -0
  95. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +254 -0
  96. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +241 -0
  97. package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +364 -0
  98. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +56 -0
  99. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationNumber.kt +41 -0
  100. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +92 -0
  101. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +40 -0
  102. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +352 -0
  103. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +103 -0
  104. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +70 -0
  105. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +17 -0
  106. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +96 -0
  107. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +96 -0
  108. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +92 -0
  109. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +130 -0
  110. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +214 -0
  111. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +590 -0
  112. package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +177 -0
  113. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +205 -0
  114. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +29 -0
  115. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +239 -0
  116. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +191 -0
  117. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +306 -0
  118. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +12 -0
  119. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +13 -0
  120. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +185 -0
  121. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +285 -0
  122. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +2 -0
  123. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +35 -0
  124. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +2 -0
  125. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +59 -0
  126. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +68 -0
  127. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Conditional.kt +11 -0
  128. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +14 -0
  129. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +50 -0
  130. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Size.kt +51 -0
  131. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +239 -0
  132. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +119 -0
  133. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +98 -0
  134. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +161 -0
  135. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +331 -0
  136. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +497 -0
  137. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +162 -0
  138. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +243 -0
  139. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +86 -0
  140. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +187 -0
  141. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +279 -0
  142. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +80 -0
  143. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +306 -0
  144. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +32 -0
  145. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +370 -0
  146. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +132 -0
  147. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +42 -0
  148. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +1329 -0
  149. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +62 -0
  150. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Tracking.kt +15 -0
  151. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +88 -0
  152. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +149 -0
  153. package/gradle/libs.versions.toml +57 -0
  154. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  155. package/gradle/wrapper/gradle-wrapper.properties +8 -0
  156. package/gradle.properties +26 -0
  157. package/gradlew +252 -0
  158. package/gradlew.bat +94 -0
  159. package/package.json +1 -1
  160. package/settings.gradle.kts +52 -0
  161. package/.claude/momo-native-kits-skill/SKILL.md +0 -51
  162. package/.claude/momo-native-kits-skill/evals/evals.json +0 -95
  163. package/.claude/momo-native-kits-skill/workspace/iteration-1/benchmark.json +0 -20
  164. package/.claude/momo-native-kits-skill/workspace/iteration-1/benchmark.md +0 -13
  165. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-0-button/eval_metadata.json +0 -6
  166. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-0-button/with_skill/outputs/ButtonExample.kt +0 -55
  167. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-0-button/without_skill/outputs/ButtonExample.kt +0 -45
  168. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-1-input/eval_metadata.json +0 -6
  169. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-1-input/with_skill/outputs/InputPhoneExample.kt +0 -40
  170. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-1-input/without_skill/outputs/InputPhoneExample.kt +0 -42
  171. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-2-bottomtab/eval_metadata.json +0 -6
  172. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-2-bottomtab/with_skill/outputs/BottomTabExample.kt +0 -236
  173. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-2-bottomtab/without_skill/outputs/BottomTabExample.kt +0 -152
  174. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-3-checkbox/eval_metadata.json +0 -6
  175. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-3-checkbox/with_skill/outputs/CheckBoxExample.kt +0 -49
  176. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-3-checkbox/without_skill/outputs/CheckBoxExample.kt +0 -123
  177. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-4-datetimepicker/eval_metadata.json +0 -6
  178. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-4-datetimepicker/with_skill/outputs/DateTimePickerExample.kt +0 -318
  179. package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-4-datetimepicker/without_skill/outputs/DateTimePickerExample.kt +0 -330
  180. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-card/with_skill/outputs/CardExample.kt +0 -124
  181. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-card/without_skill/outputs/CardExample.kt +0 -71
  182. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-loginform/with_skill/outputs/LoginFormExample.kt +0 -134
  183. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-loginform/without_skill/outputs/LoginFormExample.kt +0 -199
  184. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-navcontainer/with_skill/outputs/NavigationContainerExample.kt +0 -224
  185. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-navcontainer/without_skill/outputs/NavigationContainerExample.kt +0 -225
  186. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-popup/with_skill/outputs/PopupExample.kt +0 -79
  187. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-popup/without_skill/outputs/PopupExample.kt +0 -169
  188. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-setoptions/eval_metadata.json +0 -6
  189. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-setoptions/with_skill/outputs/SetOptionsExample.kt +0 -255
  190. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-setoptions/without_skill/outputs/SetOptionsExample.kt +0 -212
  191. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-skeleton/with_skill/outputs/SkeletonExample.kt +0 -199
  192. package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-skeleton/without_skill/outputs/SkeletonExample.kt +0 -229
  193. package/.claude/momo-native-kits-skill/workspace/iteration-3/benchmark.json +0 -20
  194. package/.claude/momo-native-kits-skill/workspace/iteration-3/benchmark.md +0 -13
  195. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/eval_metadata.json +0 -22
  196. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/with_skill/outputs/PrimaryButtonExample.kt +0 -38
  197. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/with_skill/timing.json +0 -5
  198. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/without_skill/outputs/PrimaryButtonExample.kt +0 -83
  199. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/without_skill/timing.json +0 -5
  200. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/eval_metadata.json +0 -22
  201. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/with_skill/outputs/NavigationContainerExample.kt +0 -547
  202. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/with_skill/timing.json +0 -5
  203. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/without_skill/outputs/MoMoNavigationContainer.kt +0 -519
  204. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/without_skill/timing.json +0 -5
  205. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/eval_metadata.json +0 -27
  206. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/with_skill/outputs/SetOptionsExample.kt +0 -429
  207. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/with_skill/timing.json +0 -5
  208. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/without_skill/outputs/SetOptionsExample.kt +0 -353
  209. package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/without_skill/timing.json +0 -5
  210. package/.claude/settings.local.json +0 -41
  211. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/data-display}/references/badge.md +0 -0
  212. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/data-display}/references/chip.md +0 -0
  213. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/data-display}/references/skeleton.md +0 -0
  214. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/data-display}/references/text.md +0 -0
  215. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/feedback}/references/snackbar.md +0 -0
  216. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/feedback}/references/tooltip.md +0 -0
  217. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/feedback}/references/trustbanner.md +0 -0
  218. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/form-controls}/references/checkbox.md +0 -0
  219. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/form-controls}/references/switch.md +0 -0
  220. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/layout}/references/card.md +0 -0
  221. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/layout}/references/divider.md +0 -0
  222. /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/navigation}/references/navigation.md +0 -0
@@ -1,255 +0,0 @@
1
- package vn.momo.kits.navigation.examples
2
-
3
- import androidx.compose.foundation.layout.Column
4
- import androidx.compose.foundation.layout.fillMaxSize
5
- import androidx.compose.foundation.layout.padding
6
- import androidx.compose.foundation.rememberScrollState
7
- import androidx.compose.foundation.verticalScroll
8
- import androidx.compose.material3.MaterialTheme
9
- import androidx.compose.material3.Text
10
- import androidx.compose.runtime.Composable
11
- import androidx.compose.runtime.LaunchedEffect
12
- import androidx.compose.runtime.getValue
13
- import androidx.compose.runtime.mutableStateOf
14
- import androidx.compose.runtime.remember
15
- import androidx.compose.runtime.setValue
16
- import androidx.compose.ui.Modifier
17
- import androidx.compose.ui.unit.dp
18
- import vn.momo.kits.navigation.LocalNavigation
19
- import vn.momo.kits.navigation.LocalNavigator
20
- import vn.momo.kits.navigation.NavigationOptions
21
- import vn.momo.kits.navigation.component.HeaderTitle
22
- import vn.momo.kits.navigation.component.HeaderType
23
- import vn.momo.kits.navigation.component.ScrollData
24
- import vn.momo.kits.uikit.Button
25
- import vn.momo.kits.uikit.Input
26
-
27
- /**
28
- * SetOptions Example - How to use setOptions in MoMo Navigation
29
- *
30
- * This example demonstrates how to dynamically change header title and other
31
- * screen options after the screen has been pushed using setOptions.
32
- *
33
- * Key Points:
34
- * - Use LocalNavigation.current to access navigation for setting options
35
- * - Call setOptions inside LaunchedEffect(Unit) when screen initializes
36
- * - You can change header title dynamically in response to user actions
37
- */
38
-
39
- @Composable
40
- fun SetOptionsExample() {
41
- val navigation = LocalNavigation.current
42
- val navigator = LocalNavigator.current
43
-
44
- // State for dynamic title change
45
- var titleInput by remember { mutableStateOf("") }
46
-
47
- // Set initial options when screen loads
48
- LaunchedEffect(Unit) {
49
- navigation.setOptions(
50
- headerTitle = HeaderTitle.Default("SetOptions Demo"),
51
- headerType = HeaderType.Default
52
- )
53
- }
54
-
55
- // Screen content
56
- Column(
57
- modifier = Modifier
58
- .fillMaxSize()
59
- .padding(16.dp)
60
- .verticalScroll(rememberScrollState())
61
- ) {
62
- // Example 1: Dynamic title change on button click
63
- Text(
64
- text = "Example 1: Change Header Title Dynamically",
65
- style = MaterialTheme.typography.titleMedium,
66
- modifier = Modifier.padding(bottom = 8.dp)
67
- )
68
-
69
- Input(
70
- text = titleInput,
71
- onChangeText = { titleInput = it },
72
- placeholder = "Enter new title",
73
- modifier = Modifier.padding(bottom = 8.dp)
74
- )
75
-
76
- Button(
77
- title = "Update Title",
78
- onClick = {
79
- if (titleInput.isNotEmpty()) {
80
- navigation.setOptions(
81
- headerTitle = HeaderTitle.Default(titleInput)
82
- )
83
- }
84
- },
85
- modifier = Modifier.padding(bottom = 24.dp)
86
- )
87
-
88
- // Example 2: Predefined title changes
89
- Text(
90
- text = "Example 2: Quick Title Changes",
91
- style = MaterialTheme.typography.titleMedium,
92
- modifier = Modifier.padding(bottom = 8.dp)
93
- )
94
-
95
- Button(
96
- title = "Set: My Profile",
97
- onClick = {
98
- navigation.setOptions(
99
- headerTitle = HeaderTitle.Default("My Profile")
100
- )
101
- },
102
- modifier = Modifier.padding(bottom = 8.dp)
103
- )
104
-
105
- Button(
106
- title = "Set: Settings",
107
- onClick = {
108
- navigation.setOptions(
109
- headerTitle = HeaderTitle.Default("Settings")
110
- )
111
- },
112
- modifier = Modifier.padding(bottom = 8.dp)
113
- )
114
-
115
- Button(
116
- title = "Set: Notifications",
117
- onClick = {
118
- navigation.setOptions(
119
- headerTitle = HeaderTitle.Default("Notifications")
120
- )
121
- },
122
- modifier = Modifier.padding(bottom = 24.dp)
123
- )
124
-
125
- // Example 3: Change header type dynamically
126
- Text(
127
- text = "Example 3: Change Header Type",
128
- style = MaterialTheme.typography.titleMedium,
129
- modifier = Modifier.padding(bottom = 8.dp)
130
- )
131
-
132
- Button(
133
- title = "Show Default Header",
134
- onClick = {
135
- navigation.setOptions(
136
- headerType = HeaderType.Default
137
- )
138
- },
139
- modifier = Modifier.padding(bottom = 8.dp)
140
- )
141
-
142
- Button(
143
- title = "Hide Header",
144
- onClick = {
145
- navigation.setOptions(
146
- headerType = HeaderType.None
147
- )
148
- },
149
- modifier = Modifier.padding(bottom = 24.dp)
150
- )
151
-
152
- // Example 4: Combine multiple options
153
- Text(
154
- text = "Example 4: Update Multiple Options",
155
- style = MaterialTheme.typography.titleMedium,
156
- modifier = Modifier.padding(bottom = 8.dp)
157
- )
158
-
159
- Button(
160
- title = "Update Title + Header Type",
161
- onClick = {
162
- navigation.setOptions(
163
- headerTitle = HeaderTitle.Default("Updated Screen"),
164
- headerType = HeaderType.Default
165
- )
166
- },
167
- modifier = Modifier.padding(bottom = 8.dp)
168
- )
169
-
170
- // Example 5: Navigate and set options
171
- Button(
172
- title = "Push New Screen with Options",
173
- onClick = {
174
- navigator.push(
175
- content = { DetailScreen() },
176
- options = NavigationOptions(
177
- headerTitle = HeaderTitle.Default("Detail Screen")
178
- )
179
- )
180
- },
181
- modifier = Modifier.padding(bottom = 24.dp)
182
- )
183
-
184
- // Example 6: Screen with scroll behavior
185
- Text(
186
- text = "Example 5: Scroll Behavior",
187
- style = MaterialTheme.typography.titleMedium,
188
- modifier = Modifier.padding(bottom = 8.dp)
189
- )
190
-
191
- Text(
192
- text = "Set scrollData in LaunchedEffect to connect scroll state to header animation",
193
- modifier = Modifier.padding(bottom = 8.dp)
194
- )
195
- }
196
- }
197
-
198
- /**
199
- * Detail screen that demonstrates setOptions on a pushed screen
200
- */
201
- @Composable
202
- fun DetailScreen() {
203
- val navigation = LocalNavigation.current
204
- val scrollState = rememberScrollState()
205
-
206
- // Set options when this screen loads
207
- LaunchedEffect(Unit) {
208
- navigation.setOptions(
209
- headerTitle = HeaderTitle.Default("Detail"),
210
- scrollData = ScrollData(
211
- scrollState = scrollState
212
- )
213
- )
214
- }
215
-
216
- Column(
217
- modifier = Modifier
218
- .fillMaxSize()
219
- .padding(16.dp)
220
- .verticalScroll(scrollState)
221
- ) {
222
- Text(
223
- text = "This is a detail screen pushed with options.",
224
- modifier = Modifier.padding(bottom = 16.dp)
225
- )
226
-
227
- Button(
228
- title = "Change Title from Detail",
229
- onClick = {
230
- navigation.setOptions(
231
- headerTitle = HeaderTitle.Default("Updated Detail")
232
- )
233
- }
234
- )
235
- }
236
- }
237
-
238
- /**
239
- * Summary of setOptions usage:
240
- *
241
- * 1. Access navigation: val navigation = LocalNavigation.current
242
- * 2. Call inside LaunchedEffect(Unit) for initial setup
243
- * 3. Call from any function to update options dynamically
244
- *
245
- * Available options to set:
246
- * - headerTitle: HeaderTitle.Default("Title") or HeaderTitle.None
247
- * - headerType: HeaderType.Default, HeaderType.None, HeaderType.Extended(...)
248
- * - hiddenBack: Boolean - show/hide back button
249
- * - footerComponent: @Composable () -> Unit - custom footer
250
- * - scrollData: ScrollData(scrollState) - connect scroll behavior
251
- * - headerBackProps: HeaderBackProps - configure back button behavior
252
- *
253
- * Note: Not all options can be changed dynamically. Some require
254
- * pushing a new screen with NavigationOptions.
255
- */
@@ -1,212 +0,0 @@
1
- package com.momo.navigation.example
2
-
3
- import androidx.compose.foundation.layout.Box
4
- import androidx.compose.foundation.layout.fillMaxSize
5
- import androidx.compose.material3.Text
6
- import androidx.compose.runtime.Composable
7
- import androidx.compose.ui.Alignment
8
- import androidx.compose.ui.Modifier
9
- import androidx.navigation.NavHostController
10
- import androidx.navigation.compose.NavHost
11
- import androidx.navigation.compose.composable
12
- import androidx.navigation.compose.rememberNavController
13
-
14
- /**
15
- * MoMo Navigation - SetOptions Example
16
- *
17
- * In MoMo's navigation system (built on Compose Navigation),
18
- * you can use setOptions() to programmatically update navigation options
19
- * including the header/title.
20
- *
21
- * Here's how to change the header title dynamically:
22
- */
23
-
24
- // Define navigation routes
25
- sealed class Screen(val route: String) {
26
- object Home : Screen("home")
27
- object Detail : Screen("detail/{title}") {
28
- fun createRoute(title: String) = "detail/$title"
29
- }
30
- }
31
-
32
- // Example: NavBackStackEntry extension to get arguments
33
- // In MoMo navigation, you can access arguments via savedStateHandle
34
- // Note: This requires MoMo's extended navigation setup
35
-
36
- /**
37
- * Example 1: Basic SetOptions usage in MoMo Navigation
38
- *
39
- * In MoMo's navigation, setOptions is typically called within a
40
- * NavHost or when navigating to update the top app bar.
41
- *
42
- * For dynamic header titles, you would typically:
43
- * 1. Use a state hoisting pattern
44
- * 2. Pass the title as a navigation argument
45
- * 3. Update the top bar based on the current destination
46
- */
47
-
48
- @Composable
49
- fun MoMoNavigationExample() {
50
- val navController = rememberNavController()
51
-
52
- // State to hold dynamic title - typically this would be in a ViewModel
53
- val dynamicTitle = androidx.compose.runtime.remember {
54
- androidx.compose.runtime.mutableStateOf("Home")
55
- }
56
-
57
- NavHost(
58
- navController = navController,
59
- startDestination = Screen.Home.route
60
- ) {
61
- composable(Screen.Home.route) {
62
- // Home screen content
63
- Box(
64
- modifier = Modifier.fillMaxSize(),
65
- contentAlignment = Alignment.Center
66
- ) {
67
- Text("Home Screen")
68
- }
69
-
70
- // Set options for Home - in practice this is handled by the
71
- // navigation library's LocalNavigationBar or similar composable
72
- }
73
-
74
- composable(
75
- route = Screen.Detail.route,
76
- // You can use arguments to get dynamic data
77
- ) { backStackEntry ->
78
- // Get the title from navigation arguments
79
- val title = backStackEntry.arguments?.getString("title") ?: "Detail"
80
-
81
- Box(
82
- modifier = Modifier.fillMaxSize(),
83
- contentAlignment = Alignment.Center
84
- ) {
85
- Text("$title Screen")
86
- }
87
- }
88
- }
89
- }
90
-
91
- /**
92
- * Example 2: Using MoMo's setOptions pattern (if available in your version)
93
- *
94
- * In some versions of MoMo navigation, you can use setOptions like this:
95
- */
96
-
97
- fun navigateWithOptions(
98
- navController: NavHostController,
99
- title: String
100
- ) {
101
- // Navigate to the detail screen with the title
102
- navController.navigate(Screen.Detail.createRoute(title))
103
- }
104
-
105
- /**
106
- * Example 3: Programmatic navigation with dynamic title using Compose Navigation
107
- *
108
- * This is the recommended pattern for changing header title dynamically:
109
- */
110
-
111
- @Composable
112
- fun DynamicHeaderNavigationExample() {
113
- val navController = rememberNavController()
114
-
115
- // This state would typically be in a ViewModel
116
- val currentTitle = androidx.compose.runtime.remember {
117
- androidx.compose.runtime.mutableStateOf("Home Screen")
118
- }
119
-
120
- // Update the title when navigating
121
- fun navigateToDetail(newTitle: String) {
122
- currentTitle.value = newTitle
123
- navController.navigate(Screen.Detail.createRoute(newTitle))
124
- }
125
- }
126
-
127
- /**
128
- * Example 4: Complete example with MoMo-style TopAppBar integration
129
- */
130
-
131
- @Composable
132
- fun FullNavigationExample() {
133
- val navController = rememberNavController()
134
-
135
- // This would typically be provided via a ViewModel or navigation library
136
- val (currentTitle, setCurrentTitle) = androidx.compose.runtime.remember {
137
- androidx.compose.runtime.mutableStateOf("Home")
138
- }
139
-
140
- NavHost(
141
- navController = navController,
142
- startDestination = Screen.Home.route
143
- ) {
144
- composable(Screen.Home.route) {
145
- HomeScreen(
146
- onNavigateToDetail = { title ->
147
- setCurrentTitle(title)
148
- navController.navigate(Screen.Detail.createRoute(title))
149
- }
150
- )
151
- }
152
-
153
- composable(Screen.Detail.route) { backStackEntry ->
154
- val title = backStackEntry.arguments?.getString("title") ?: "Detail"
155
- DetailScreen(
156
- title = title,
157
- onNavigateBack = {
158
- navController.popBackStack()
159
- }
160
- )
161
- }
162
- }
163
- }
164
-
165
- @Composable
166
- fun HomeScreen(
167
- onNavigateToDetail: (String) -> Unit
168
- ) {
169
- Box(
170
- modifier = Modifier.fillMaxSize(),
171
- contentAlignment = Alignment.Center
172
- ) {
173
- Text("Home Screen")
174
- }
175
- }
176
-
177
- @Composable
178
- fun DetailScreen(
179
- title: String,
180
- onNavigateBack: () -> Unit
181
- ) {
182
- Box(
183
- modifier = Modifier.fillMaxSize(),
184
- contentAlignment = Alignment.Center
185
- ) {
186
- Text("$title Screen")
187
- }
188
- }
189
-
190
- /**
191
- * Summary: How to change header title dynamically in MoMo Navigation
192
- *
193
- * 1. **Use Navigation Arguments**: Pass the title as a route argument
194
- * navController.navigate("detail/$title")
195
- *
196
- * 2. **Read Arguments in Composable**: Access via backStackEntry.arguments
197
- * val title = backStackEntry.arguments?.getString("title")
198
- *
199
- * 3. **State Management**: Use remember/mutableState or a ViewModel
200
- * to hold and update the current title
201
- *
202
- * 4. **Update TopAppBar**: Bind your TopAppBar title to the state
203
- * that gets updated based on the current destination
204
- *
205
- * Note: If MoMo's navigation library has a specific setOptions API,
206
- * it would typically be used like:
207
- * navController.setOptions(options = {
208
- * putString("title", "New Title")
209
- * })
210
- *
211
- * But the standard Compose Navigation approach above is more commonly used.
212
- */
@@ -1,199 +0,0 @@
1
- package com.example
2
-
3
- import androidx.compose.foundation.layout.Column
4
- import androidx.compose.foundation.layout.Row
5
- import androidx.compose.foundation.layout.Spacer
6
- import androidx.compose.foundation.layout.fillMaxWidth
7
- import androidx.compose.foundation.layout.height
8
- import androidx.compose.foundation.layout.padding
9
- import androidx.compose.foundation.layout.size
10
- import androidx.compose.foundation.layout.width
11
- import androidx.compose.runtime.Composable
12
- import androidx.compose.ui.Modifier
13
- import androidx.compose.ui.unit.dp
14
- import vn.momo.kits.components.Card
15
- import vn.momo.kits.components.Skeleton
16
- import vn.momo.kits.components.Radius
17
-
18
- /**
19
- * Example: Loading skeleton for a card component
20
- *
21
- * This demonstrates how to create loading skeleton placeholders for cards
22
- * in MoMo Native Kits to show while content is loading.
23
- */
24
-
25
- /**
26
- * Skeleton for a simple card with title
27
- */
28
- @Composable
29
- fun CardSkeletonSimple() {
30
- Card(
31
- modifier = Modifier
32
- .fillMaxWidth()
33
- .padding(horizontal = 16.dp, vertical = 8.dp)
34
- ) {
35
- Column(modifier = Modifier.padding(16.dp)) {
36
- // Title skeleton
37
- Skeleton(
38
- width = 120.dp,
39
- height = 20.dp,
40
- cornerRadius = Radius.S
41
- )
42
- Spacer(modifier = Modifier.height(8.dp))
43
- // Description skeleton
44
- Skeleton(
45
- width = 200.dp,
46
- height = 14.dp,
47
- cornerRadius = Radius.S
48
- )
49
- }
50
- }
51
- }
52
-
53
- /**
54
- * Skeleton for a card with image and title (matching ListItemCardExample layout)
55
- */
56
- @Composable
57
- fun CardSkeletonWithImage() {
58
- Card(
59
- modifier = Modifier
60
- .fillMaxWidth()
61
- .padding(horizontal = 16.dp, vertical = 8.dp)
62
- ) {
63
- Row(
64
- modifier = Modifier.padding(12.dp)
65
- ) {
66
- // Image placeholder skeleton
67
- Skeleton(
68
- width = 48.dp,
69
- height = 48.dp,
70
- cornerRadius = Radius.M
71
- )
72
-
73
- // Title placeholder skeleton
74
- Column(
75
- modifier = Modifier.padding(start = 12.dp)
76
- ) {
77
- Skeleton(
78
- width = 100.dp,
79
- height = 16.dp,
80
- cornerRadius = Radius.S
81
- )
82
- }
83
- }
84
- }
85
- }
86
-
87
- /**
88
- * Skeleton for a card with image, title and description
89
- * (matching ListItemCardWithDescriptionExample layout)
90
- */
91
- @Composable
92
- fun CardSkeletonWithImageAndDescription() {
93
- Card(
94
- modifier = Modifier
95
- .fillMaxWidth()
96
- .padding(horizontal = 16.dp, vertical = 8.dp)
97
- ) {
98
- Row(
99
- modifier = Modifier.padding(12.dp)
100
- ) {
101
- // Image placeholder skeleton
102
- Skeleton(
103
- width = 56.dp,
104
- height = 56.dp,
105
- cornerRadius = Radius.M
106
- )
107
-
108
- // Title and description placeholder skeleton
109
- Column(
110
- modifier = Modifier.padding(start = 12.dp)
111
- ) {
112
- Skeleton(
113
- width = 120.dp,
114
- height = 18.dp,
115
- cornerRadius = Radius.S
116
- )
117
- Spacer(modifier = Modifier.height(8.dp))
118
- Skeleton(
119
- width = 180.dp,
120
- height = 12.dp,
121
- cornerRadius = Radius.S
122
- )
123
- }
124
- }
125
- }
126
- }
127
-
128
- /**
129
- * Complex skeleton with multiple rows (avatar + text + action)
130
- */
131
- @Composable
132
- fun CardSkeletonComplex() {
133
- Card(
134
- modifier = Modifier
135
- .fillMaxWidth()
136
- .padding(horizontal = 16.dp, vertical = 8.dp)
137
- ) {
138
- Column(modifier = Modifier.padding(16.dp)) {
139
- Row {
140
- // Avatar skeleton
141
- Skeleton(
142
- width = 60.dp,
143
- height = 60.dp,
144
- cornerRadius = Radius.XL
145
- )
146
-
147
- Column(modifier = Modifier.padding(start = 12.dp)) {
148
- // Name skeleton
149
- Skeleton(
150
- width = 140.dp,
151
- height = 18.dp,
152
- cornerRadius = Radius.S
153
- )
154
- Spacer(modifier = Modifier.height(8.dp))
155
- // Subtitle skeleton
156
- Skeleton(
157
- width = 100.dp,
158
- height = 14.dp,
159
- cornerRadius = Radius.S
160
- )
161
- }
162
- }
163
-
164
- Spacer(modifier = Modifier.height(16.dp))
165
-
166
- // Description lines
167
- Skeleton(
168
- width = 280.dp,
169
- height = 14.dp,
170
- cornerRadius = Radius.S
171
- )
172
- Spacer(modifier = Modifier.height(6.dp))
173
- Skeleton(
174
- width = 240.dp,
175
- height = 14.dp,
176
- cornerRadius = Radius.S
177
- )
178
- Spacer(modifier = Modifier.height(6.dp))
179
- Skeleton(
180
- width = 180.dp,
181
- height = 14.dp,
182
- cornerRadius = Radius.S
183
- )
184
- }
185
- }
186
- }
187
-
188
- /**
189
- * Example: List of card skeletons (loading state for a list)
190
- */
191
- @Composable
192
- fun CardSkeletonList() {
193
- Column {
194
- // Simulating a list of loading cards
195
- CardSkeletonWithImage()
196
- CardSkeletonWithImageAndDescription()
197
- CardSkeletonSimple()
198
- }
199
- }