@momo-kits/native-kits 0.163.2-beta.2 → 0.164.1-beta.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 (247) hide show
  1. package/CLAUDE.md +19 -0
  2. package/build.gradle.kts +11 -0
  3. package/compose/build.gradle.kts +190 -0
  4. package/compose/build.gradle.kts.backup +190 -0
  5. package/compose/compose.podspec +47 -0
  6. package/compose/src/androidMain/kotlin/vn/momo/kits/navigation/ScrollToTop.android.kt +6 -0
  7. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/OsFontScale.android.kt +7 -0
  8. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +150 -0
  9. package/compose/src/commonMain/composeResources/font/momosignature.otf +0 -0
  10. package/compose/src/commonMain/composeResources/font/momotrustdisplay.otf +0 -0
  11. package/compose/src/commonMain/composeResources/font/sfprotext_black.otf +0 -0
  12. package/compose/src/commonMain/composeResources/font/sfprotext_black.ttf +0 -0
  13. package/compose/src/commonMain/composeResources/font/sfprotext_bold.ttf +0 -0
  14. package/compose/src/commonMain/composeResources/font/sfprotext_heavy.ttf +0 -0
  15. package/compose/src/commonMain/composeResources/font/sfprotext_light.ttf +0 -0
  16. package/compose/src/commonMain/composeResources/font/sfprotext_medium.ttf +0 -0
  17. package/compose/src/commonMain/composeResources/font/sfprotext_regular.ttf +0 -0
  18. package/compose/src/commonMain/composeResources/font/sfprotext_semibold.ttf +0 -0
  19. package/compose/src/commonMain/composeResources/font/sfprotext_thin.otf +0 -0
  20. package/compose/src/commonMain/composeResources/font/sfprotext_thin.ttf +0 -0
  21. package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.otf +0 -0
  22. package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.ttf +0 -0
  23. package/compose/src/commonMain/kotlin/vn/momo/kits/application/AnimationSearchInput.kt +52 -0
  24. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +106 -0
  25. package/compose/src/commonMain/kotlin/vn/momo/kits/application/FloatingButton.kt +183 -0
  26. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Header.kt +207 -0
  27. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderAnimated.kt +39 -0
  28. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderBackground.kt +86 -0
  29. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderDefault.kt +76 -0
  30. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderExtended.kt +76 -0
  31. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderRight.kt +293 -0
  32. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderTitle.kt +33 -0
  33. package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +826 -0
  34. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Localize.kt +269 -0
  35. package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +110 -0
  36. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +378 -0
  37. package/compose/src/commonMain/kotlin/vn/momo/kits/application/WidgetContainer.kt +56 -0
  38. package/compose/src/commonMain/kotlin/vn/momo/kits/application/useHeaderSearchAnimation.kt +69 -0
  39. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Avatar.kt +157 -0
  40. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +82 -0
  41. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +32 -0
  42. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +338 -0
  43. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +175 -0
  44. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +356 -0
  45. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Carousel.kt +113 -0
  46. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +89 -0
  47. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +128 -0
  48. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Collapse.kt +209 -0
  49. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +542 -0
  50. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +23 -0
  51. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +76 -0
  52. package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +125 -0
  53. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +231 -0
  54. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +112 -0
  55. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +477 -0
  56. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +114 -0
  57. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +214 -0
  58. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +240 -0
  59. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +216 -0
  60. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +259 -0
  61. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +182 -0
  62. package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +343 -0
  63. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Loader.kt +108 -0
  64. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +56 -0
  65. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationNumber.kt +41 -0
  66. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +84 -0
  67. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +40 -0
  68. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +328 -0
  69. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +97 -0
  70. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ProgressInfo.kt +310 -0
  71. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +59 -0
  72. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Rating.kt +87 -0
  73. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +21 -0
  74. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +90 -0
  75. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Slider.kt +323 -0
  76. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Stepper.kt +217 -0
  77. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Steps.kt +473 -0
  78. package/compose/src/commonMain/kotlin/vn/momo/kits/components/SuggestAction.kt +122 -0
  79. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Swipe.kt +199 -0
  80. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +91 -0
  81. package/compose/src/commonMain/kotlin/vn/momo/kits/components/TabView.kt +470 -0
  82. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +88 -0
  83. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +131 -0
  84. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +203 -0
  85. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +498 -0
  86. package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +175 -0
  87. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Uploader.kt +182 -0
  88. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +193 -0
  89. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +29 -0
  90. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +234 -0
  91. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +188 -0
  92. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +325 -0
  93. package/compose/src/commonMain/kotlin/vn/momo/kits/const/KitFontScale.kt +22 -0
  94. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +12 -0
  95. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +16 -0
  96. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +188 -0
  97. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +276 -0
  98. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +52 -0
  99. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +38 -0
  100. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +39 -0
  101. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +52 -0
  102. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +66 -0
  103. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Conditional.kt +11 -0
  104. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +104 -0
  105. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +48 -0
  106. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Size.kt +51 -0
  107. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +299 -0
  108. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +129 -0
  109. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +103 -0
  110. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +172 -0
  111. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +372 -0
  112. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ScrollToTop.kt +8 -0
  113. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +589 -0
  114. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +156 -0
  115. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +225 -0
  116. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +86 -0
  117. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +169 -0
  118. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +320 -0
  119. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +81 -0
  120. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +309 -0
  121. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +34 -0
  122. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +360 -0
  123. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +132 -0
  124. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/tracking/ScreenTracker.kt +127 -0
  125. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ComposeLottieAnimation.kt +91 -0
  126. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/OsFontScale.kt +9 -0
  127. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +69 -0
  128. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +1329 -0
  129. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +55 -0
  130. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Tracking.kt +15 -0
  131. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +105 -0
  132. package/compose/src/iosMain/kotlin/vn/momo/kits/navigation/ScrollToTop.ios.kt +32 -0
  133. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/OsFontScale.ios.kt +66 -0
  134. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +207 -0
  135. package/gradle/libs.versions.toml +69 -0
  136. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  137. package/gradle/wrapper/gradle-wrapper.properties +8 -0
  138. package/gradle.properties +26 -0
  139. package/gradlew +252 -0
  140. package/gradlew.bat +94 -0
  141. package/ios/Application/ApplicationEnvironment.swift +14 -6
  142. package/ios/Application/LanguageSource.swift +93 -0
  143. package/ios/Application/Localize.swift +73 -4
  144. package/ios/Application/LocalizeModifier.swift +30 -0
  145. package/ios/Application/Navigation/NavigationContainer.swift +28 -18
  146. package/ios/Application/Navigation/Navigator.swift +121 -53
  147. package/ios/Application/Navigation/NavigatorManager.swift +49 -0
  148. package/ios/Application/Navigation/component/NavigationFooter.swift +90 -0
  149. package/ios/Application/StackScreen.swift +19 -28
  150. package/ios/Badge/Badge.swift +2 -1
  151. package/ios/Badge/BadgeRibbon.swift +6 -2
  152. package/ios/Button/Button.swift +41 -61
  153. package/ios/Chip/Chip.swift +6 -5
  154. package/ios/Icon/Icon.swift +13 -4
  155. package/ios/Input/ErrorView.swift +2 -1
  156. package/ios/Input/Input.swift +9 -2
  157. package/ios/Input/InputPhoneNumber.swift +2 -1
  158. package/ios/Input/InputSearch.swift +3 -2
  159. package/ios/Input/InputTextArea.swift +6 -1
  160. package/ios/InputMoney/InputMoney.swift +5 -2
  161. package/ios/InputOTP/InputOTP.swift +2 -1
  162. package/ios/Layout/GridContext.swift +30 -0
  163. package/ios/Layout/Item.swift +42 -0
  164. package/ios/Layout/Section.swift +134 -0
  165. package/ios/Popup/PopupNotify.swift +2 -1
  166. package/ios/ProgressInfo/ProgressInfo.swift +4 -3
  167. package/ios/Rating/Rating.swift +2 -1
  168. package/ios/Stepper/Stepper.swift +2 -1
  169. package/ios/SuggestAction/SuggestAction.swift +3 -2
  170. package/ios/Tag/Tag.swift +2 -1
  171. package/ios/Template/TrustBanner/TrustBanner.swift +4 -2
  172. package/ios/Title/Title.swift +3 -2
  173. package/ios/Tooltip/Tooltip.swift +2 -1
  174. package/ios/Typography/FontScale.swift +103 -0
  175. package/ios/Typography/FontScaleStore.swift +52 -13
  176. package/ios/Typography/Text.swift +12 -29
  177. package/ios/Typography/Typography.swift +66 -86
  178. package/ios/native-kits.podspec +2 -1
  179. package/ios-demo/MoMoUIKitsDemo.podspec +1 -1
  180. package/ios-demo/README.md +120 -0
  181. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/AvatarDemo.swift +87 -73
  182. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BadgeDemo.swift +55 -249
  183. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ButtonDemo.swift +90 -82
  184. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CarouselDemo.swift +74 -104
  185. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CheckboxDemo.swift +47 -50
  186. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ChipDemo.swift +63 -7
  187. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CollapseDemo.swift +90 -81
  188. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DateTimePickerDemo.swift +73 -97
  189. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DemoScreen.swift +420 -0
  190. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DividerDemo.swift +46 -4
  191. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/Home.swift +54 -57
  192. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/IconButtonDemo.swift +80 -45
  193. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/IconDemo.swift +81 -0
  194. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ImageDemo.swift +49 -62
  195. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InformationDemo.swift +66 -116
  196. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputDemo.swift +104 -98
  197. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputDropDownDemo.swift +76 -118
  198. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputMoneyDemo.swift +73 -86
  199. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputOTPDemo.swift +69 -54
  200. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputPhoneNumberDemo.swift +74 -54
  201. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputSearchDemo.swift +73 -20
  202. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputTextAreaDemo.swift +68 -38
  203. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/LoaderDemo.swift +55 -52
  204. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/LocalizeDemo.swift +51 -4
  205. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/NavigationDemo.swift +14 -2
  206. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PaginationDemo.swift +47 -51
  207. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PlaygroundData.swift +76 -0
  208. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupNotifyDemo.swift +67 -93
  209. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupPromotionDemo.swift +34 -43
  210. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ProgressInfoDemo.swift +83 -71
  211. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/RadioDemo.swift +55 -23
  212. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/RatingDemo.swift +58 -46
  213. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SectionDemo.swift +83 -0
  214. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SkeletonDemo.swift +41 -12
  215. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SliderDemo.swift +67 -127
  216. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SnackBarDemo.swift +54 -110
  217. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/StepperDemo.swift +69 -79
  218. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/StepsDemo.swift +78 -58
  219. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SuggestActionDemo.swift +76 -65
  220. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SwipeDemo.swift +82 -127
  221. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SwitchDemo.swift +44 -19
  222. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TabViewDemo.swift +92 -168
  223. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TagDemo.swift +79 -27
  224. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ThemeDemo.swift +0 -1
  225. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TitleDemo.swift +87 -92
  226. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TooltipDemo.swift +94 -163
  227. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TypographyDemo.swift +70 -70
  228. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/UploaderDemo.swift +68 -114
  229. package/ios-demo/Sources/MoMoUIKitsDemo/SwiftUIDemoBrowserView.swift +3 -1
  230. package/local.properties +8 -0
  231. package/package.json +2 -2
  232. package/settings.gradle.kts +64 -0
  233. package/.codegraph/.gitignore +0 -5
  234. package/example/ios/Example.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/Example.xcscheme +0 -32
  235. package/example/ios/Example.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  236. package/example/ios/Example.xcworkspace/xcuserdata/sonnguyen.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  237. package/example/ios/Example.xcworkspace/xcuserdata/sonnguyen.xcuserdatad/WorkspaceSettings.xcsettings +0 -16
  238. package/example/ios/Example.xcworkspace/xcuserdata/sonnguyen.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -6
  239. package/example/ios/Example.xcworkspace/xcuserdata/sonnguyen.xcuserdatad/xcschemes/xcschememanagement.plist +0 -5
  240. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +0 -58
  241. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/Pods-Example.xcscheme +0 -58
  242. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/SDWebImage.xcscheme +0 -58
  243. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +0 -58
  244. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/SkeletonUI.xcscheme +0 -58
  245. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/lottie-ios-LottiePrivacyInfo.xcscheme +0 -58
  246. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/lottie-ios.xcscheme +0 -58
  247. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sonnguyen.xcuserdatad/xcschemes/xcschememanagement.plist +0 -60
@@ -2,88 +2,100 @@
2
2
  // ProgressInfoDemo.swift
3
3
  // Example
4
4
  //
5
+ // Preview + Playground demo, mirroring Compose's ProgressInfoUsage.kt.
6
+ //
5
7
 
6
- import SwiftUI
7
8
  import MoMoUIKits
9
+ import SwiftUI
8
10
 
9
- // MARK: - ProgressInfoDemo
10
-
11
- struct ProgressInfoDemo: View {
12
- private let sampleSteps = [
13
- ProgressInfoItem(title: "Bước 1", description: "Mô tả bước đầu tiên"),
14
- ProgressInfoItem(title: "Bước 2", description: "Mô tả bước thứ hai"),
15
- ProgressInfoItem(title: "Bước 3", description: "Mô tả bước thứ ba"),
16
- ]
17
-
18
- private let sampleStepsNoDesc = [
19
- ProgressInfoItem(title: "Đăng ký"),
20
- ProgressInfoItem(title: "Xác minh"),
21
- ProgressInfoItem(title: "Hoàn tất"),
22
- ]
23
-
24
- var body: some View {
25
- ScrollView {
26
- VStack(alignment: .leading, spacing: 24) {
27
- section("Vertical (default)") {
28
- ProgressInfo(steps: sampleSteps)
29
- }
30
-
31
- section("Vertical – no description") {
32
- ProgressInfo(steps: sampleStepsNoDesc, showDescription: false)
33
- }
34
-
35
- section("Vertical – useNumber") {
36
- ProgressInfo(steps: sampleSteps, useNumber: true)
37
- }
38
-
39
- section("Vertical – Small size") {
40
- ProgressInfo(steps: sampleSteps, size: .small)
41
- }
11
+ private let piSteps = [
12
+ ProgressInfoItem(title: "Bước 1", description: "Mô tả bước đầu tiên"),
13
+ ProgressInfoItem(title: "Bước 2", description: "Mô tả bước thứ hai"),
14
+ ProgressInfoItem(title: "Bước 3", description: "Mô tả bước thứ ba"),
15
+ ]
42
16
 
43
- section("Horizontal Center (default)") {
44
- ProgressInfo(steps: sampleSteps, horizontal: true)
45
- }
17
+ private let piStepsNoDesc = [
18
+ ProgressInfoItem(title: "Đăng ký"),
19
+ ProgressInfoItem(title: "Xác minh"),
20
+ ProgressInfoItem(title: "Hoàn tất"),
21
+ ]
46
22
 
47
- section("Horizontal Left") {
48
- ProgressInfo(steps: sampleSteps, horizontal: true, align: .left)
49
- }
23
+ private let progressInfoSizeList: [PlaygroundOption] = [
24
+ .init("large", ProgressInfoSize.large),
25
+ .init("small", ProgressInfoSize.small),
26
+ ]
50
27
 
51
- section("Horizontal Right") {
52
- ProgressInfo(steps: sampleSteps, horizontal: true, align: .right)
53
- }
28
+ private let progressInfoAlignList: [PlaygroundOption] = [
29
+ .init("center", ProgressInfoAlign.center),
30
+ .init("left", ProgressInfoAlign.left),
31
+ .init("right", ProgressInfoAlign.right),
32
+ .init("stretch", ProgressInfoAlign.stretch),
33
+ ]
54
34
 
55
- section("Horizontal Stretch") {
56
- ProgressInfo(steps: sampleSteps, horizontal: true, align: .stretch)
57
- }
35
+ struct ProgressInfoDemo: View {
36
+ var body: some View {
37
+ if #available(iOS 16.0, *) {
38
+ DemoScreen(preview: { ProgressInfoPreview() }, playground: { ProgressInfoPlayground() })
39
+ } else {
40
+ Text("Requires iOS 16+").padding()
41
+ }
42
+ }
43
+ }
58
44
 
59
- section("Horizontal useNumber") {
60
- ProgressInfo(steps: sampleSteps, horizontal: true, useNumber: true)
61
- }
45
+ // MARK: - Preview
62
46
 
63
- section("Horizontal Small size") {
64
- ProgressInfo(
65
- steps: sampleStepsNoDesc,
66
- horizontal: true,
67
- size: .small,
68
- showDescription: false
69
- )
70
- }
71
- }
72
- .padding(16)
47
+ private struct ProgressInfoPreview: View {
48
+ var body: some View {
49
+ BasicColumnBox("Vertical (default)", alignment: .leading) {
50
+ ProgressInfo(steps: piSteps)
51
+ }
52
+ BasicColumnBox("Vertical – no description", alignment: .leading) {
53
+ ProgressInfo(steps: piStepsNoDesc, showDescription: false)
54
+ }
55
+ BasicColumnBox("Vertical – useNumber", alignment: .leading) {
56
+ ProgressInfo(steps: piSteps, useNumber: true)
57
+ }
58
+ BasicColumnBox("Horizontal – Center", alignment: .leading) {
59
+ ProgressInfo(steps: piSteps, horizontal: true)
60
+ }
61
+ BasicColumnBox("Horizontal – useNumber", alignment: .leading) {
62
+ ProgressInfo(steps: piSteps, horizontal: true, useNumber: true)
73
63
  }
74
64
  }
65
+ }
75
66
 
76
- @ViewBuilder
77
- private func section<Content: View>(
78
- _ title: String,
79
- @ViewBuilder content: () -> Content
80
- ) -> some View {
81
- VStack(alignment: .leading, spacing: 8) {
82
- Text(title)
83
- .font(.system(size: 14, weight: .semibold))
84
- .foregroundColor(.secondary)
85
- content()
86
- }
87
- .frame(maxWidth: .infinity, alignment: .leading)
67
+ // MARK: - Playground
68
+
69
+ @available(iOS 16.0, *)
70
+ private struct ProgressInfoPlayground: View {
71
+ @State private var size: PlaygroundOption? = progressInfoSizeList.first { $0.key == "large" }
72
+ @State private var align: PlaygroundOption? = progressInfoAlignList.first { $0.key == "center" }
73
+ @State private var horizontal = false
74
+ @State private var useNumber = false
75
+ @State private var showTitle = true
76
+ @State private var showDescription = true
77
+
78
+ var body: some View {
79
+ PlaygroundTab(
80
+ component: {
81
+ ProgressInfo(
82
+ steps: piSteps,
83
+ horizontal: horizontal,
84
+ size: (size?.value as? ProgressInfoSize) ?? .large,
85
+ useNumber: useNumber,
86
+ align: (align?.value as? ProgressInfoAlign) ?? .center,
87
+ showTitle: showTitle,
88
+ showDescription: showDescription
89
+ )
90
+ },
91
+ params: [
92
+ .radio("Size", progressInfoSizeList, $size),
93
+ .radio("Align", progressInfoAlignList, $align),
94
+ .checkbox("Horizontal", $horizontal),
95
+ .checkbox("UseNumber", $useNumber),
96
+ .checkbox("ShowTitle", $showTitle),
97
+ .checkbox("ShowDescription", $showDescription),
98
+ ]
99
+ )
88
100
  }
89
101
  }
@@ -1,32 +1,64 @@
1
- import SwiftUI
1
+ //
2
+ // RadioDemo.swift
3
+ // Example
4
+ //
5
+ // Preview + Playground demo for Radio.
6
+ //
7
+
2
8
  import MoMoUIKits
9
+ import SwiftUI
3
10
 
4
11
  struct RadioDemo: View {
12
+ var body: some View {
13
+ if #available(iOS 16.0, *) {
14
+ DemoScreen(preview: { RadioPreview() }, playground: { RadioPlayground() })
15
+ } else {
16
+ Text("Requires iOS 16+").padding()
17
+ }
18
+ }
19
+ }
20
+
21
+ // MARK: - Preview
22
+
23
+ private struct RadioPreview: View {
5
24
  @State private var group: AnyHashable = 1
6
25
 
7
26
  var body: some View {
8
- VStack(alignment: .leading, spacing: 24) {
9
- // Value
10
- VStack(alignment: .leading, spacing: 12) {
11
- Text("Value").font(.description1)
12
- Radio(value: 1, groupValue: $group)
13
- Radio(value: 2, groupValue: $group)
14
- }
15
-
16
- // Disabled
17
- VStack(alignment: .leading, spacing: 12) {
18
- Text("Disabled").font(.description1)
19
- Radio(value: 1, groupValue: .constant(1), disabled: true)
20
- Radio(value: 2, groupValue: .constant(1), disabled: false)
21
- }
22
-
23
- // Label
24
- VStack(alignment: .leading, spacing: 12) {
25
- Text("Label").font(.description1)
26
- Radio(value: 1, groupValue: .constant(1), label: "Label")
27
- Radio(value: 2, groupValue: .constant(1), label: "Label")
28
- }
27
+ BasicColumnBox("Value", alignment: .leading) {
28
+ Radio(value: 1, groupValue: $group)
29
+ Radio(value: 2, groupValue: $group)
29
30
  }
30
- .padding()
31
+ BasicColumnBox("Disabled", alignment: .leading) {
32
+ Radio(value: 1, groupValue: .constant(1), disabled: true)
33
+ Radio(value: 2, groupValue: .constant(1), disabled: false)
34
+ }
35
+ BasicColumnBox("Label", alignment: .leading) {
36
+ Radio(value: 1, groupValue: .constant(1), label: "Label")
37
+ Radio(value: 2, groupValue: .constant(1), label: "Label")
38
+ }
39
+ }
40
+ }
41
+
42
+ // MARK: - Playground
43
+
44
+ @available(iOS 16.0, *)
45
+ private struct RadioPlayground: View {
46
+ @State private var group: AnyHashable = 1
47
+ @State private var label = "Label"
48
+ @State private var disabled = false
49
+
50
+ var body: some View {
51
+ PlaygroundTab(
52
+ component: {
53
+ VStack(alignment: .leading, spacing: Spacing.S) {
54
+ Radio(value: 1, groupValue: $group, disabled: disabled, label: label)
55
+ Radio(value: 2, groupValue: $group, disabled: disabled, label: label)
56
+ }
57
+ },
58
+ params: [
59
+ .string("Label", $label),
60
+ .checkbox("Disabled", $disabled),
61
+ ]
62
+ )
31
63
  }
32
64
  }
@@ -1,56 +1,68 @@
1
- import SwiftUI
1
+ //
2
+ // RatingDemo.swift
3
+ // Example
4
+ //
5
+ // Preview + Playground demo for Rating.
6
+ //
7
+
2
8
  import MoMoUIKits
9
+ import SwiftUI
3
10
 
4
- struct RatingDemo: View {
5
- @State private var interactiveRating: Float = 3
11
+ private let ratingSizeList: [PlaygroundOption] = [
12
+ .init("small", RatingSize.small),
13
+ .init("medium", RatingSize.medium),
14
+ .init("large", RatingSize.large),
15
+ ]
6
16
 
17
+ struct RatingDemo: View {
7
18
  var body: some View {
8
- ScrollView {
9
- VStack(alignment: .leading, spacing: 24) {
10
- section("Size") {
11
- Rating(numOfStars: 5, rating: 3, size: .small)
12
- Rating(numOfStars: 5, rating: 3, size: .medium)
13
- Rating(numOfStars: 5, rating: 3, size: .large)
14
- }
15
-
16
- section("Half star") {
17
- Rating(numOfStars: 5, rating: 3.5)
18
- }
19
-
20
- section("Full") {
21
- Rating(numOfStars: 5, rating: 5)
22
- }
23
-
24
- section("Empty") {
25
- Rating(numOfStars: 5, rating: 0)
26
- }
27
-
28
- section("Read-only (no callback)") {
29
- Rating(numOfStars: 5, rating: 4)
30
- }
31
-
32
- section("Interactive") {
33
- Rating(
34
- numOfStars: 5,
35
- rating: interactiveRating,
36
- onRatingChange: { newRating in
37
- interactiveRating = Float(newRating)
38
- }
39
- )
40
- }
41
- }
42
- .padding()
19
+ if #available(iOS 16.0, *) {
20
+ DemoScreen(preview: { RatingPreview() }, playground: { RatingPlayground() })
21
+ } else {
22
+ Text("Requires iOS 16+").padding()
43
23
  }
44
24
  }
25
+ }
45
26
 
46
- @ViewBuilder
47
- private func section<Content: View>(
48
- _ title: String,
49
- @ViewBuilder content: () -> Content
50
- ) -> some View {
51
- VStack(alignment: .leading, spacing: 8) {
52
- Text(title)
53
- content()
27
+ // MARK: - Preview
28
+
29
+ private struct RatingPreview: View {
30
+ var body: some View {
31
+ BasicColumnBox("Size", alignment: .leading) {
32
+ Rating(numOfStars: 5, rating: 3, size: .small)
33
+ Rating(numOfStars: 5, rating: 3, size: .medium)
34
+ Rating(numOfStars: 5, rating: 3, size: .large)
54
35
  }
36
+ BasicColumnBox("Values", alignment: .leading) {
37
+ Rating(numOfStars: 5, rating: 3.5)
38
+ Rating(numOfStars: 5, rating: 5)
39
+ Rating(numOfStars: 5, rating: 0)
40
+ }
41
+ }
42
+ }
43
+
44
+ // MARK: - Playground
45
+
46
+ @available(iOS 16.0, *)
47
+ private struct RatingPlayground: View {
48
+ @State private var stars: Double = 5
49
+ @State private var rating: Double = 3
50
+ @State private var size: PlaygroundOption? = ratingSizeList.first { $0.key == "large" }
51
+
52
+ var body: some View {
53
+ PlaygroundTab(
54
+ component: {
55
+ Rating(
56
+ numOfStars: Int(stars),
57
+ rating: Float(rating),
58
+ size: (size?.value as? RatingSize) ?? .large
59
+ )
60
+ },
61
+ params: [
62
+ .slider("NumOfStars", $stars, min: 1, max: 10, step: 1),
63
+ .slider("Rating", $rating, min: 0, max: 10, step: 0.5),
64
+ .radio("Size", ratingSizeList, $size),
65
+ ]
66
+ )
55
67
  }
56
68
  }
@@ -0,0 +1,83 @@
1
+ //
2
+ // SectionDemo.swift
3
+ // Example
4
+ //
5
+ // Preview + Playground demo for SectionView / ItemView (12-column grid).
6
+ //
7
+
8
+ import MoMoUIKits
9
+ import SwiftUI
10
+
11
+ struct SectionDemo: View {
12
+ var body: some View {
13
+ if #available(iOS 16.0, *) {
14
+ DemoScreen(preview: { SectionPreview() }, playground: { SectionPlayground() })
15
+ } else {
16
+ Text("Requires iOS 16+").padding()
17
+ }
18
+ }
19
+ }
20
+
21
+ // MARK: - Preview
22
+
23
+ private struct SectionPreview: View {
24
+ var body: some View {
25
+ BasicColumnBox("Full width — span 12", alignment: .leading) {
26
+ SectionView { SectionTile("12") }
27
+ }
28
+ BasicColumnBox("Even splits", alignment: .leading) {
29
+ SectionView {
30
+ ItemView(widthSpan: 6) { SectionTile("6") }
31
+ ItemView(widthSpan: 6) { SectionTile("6") }
32
+ ItemView(widthSpan: 4) { SectionTile("4") }
33
+ ItemView(widthSpan: 4) { SectionTile("4") }
34
+ ItemView(widthSpan: 4) { SectionTile("4") }
35
+ }
36
+ }
37
+ BasicColumnBox("heightSpan — square tiles", alignment: .leading) {
38
+ SectionView {
39
+ ItemView(widthSpan: 3, heightSpan: 3) { SectionTile("3×3") }
40
+ ItemView(widthSpan: 3, heightSpan: 3) { SectionTile("3×3") }
41
+ ItemView(widthSpan: 6, heightSpan: 3) { SectionTile("6×3") }
42
+ }
43
+ }
44
+ }
45
+ }
46
+
47
+ // MARK: - Playground
48
+
49
+ @available(iOS 16.0, *)
50
+ private struct SectionPlayground: View {
51
+ @State private var span: Double = 6
52
+ @State private var useMargin = true
53
+
54
+ var body: some View {
55
+ PlaygroundTab(
56
+ component: {
57
+ SectionView(useMargin: useMargin) {
58
+ ItemView(widthSpan: Int(span)) { SectionTile("\(Int(span))") }
59
+ ItemView(widthSpan: 12 - Int(span)) { SectionTile("\(12 - Int(span))") }
60
+ }
61
+ },
62
+ params: [
63
+ .slider("Left widthSpan", $span, min: 1, max: 11, step: 1),
64
+ .checkbox("useMargin", $useMargin),
65
+ ]
66
+ )
67
+ }
68
+ }
69
+
70
+ /// Filled placeholder so span widths are visible.
71
+ private struct SectionTile: View {
72
+ let label: String
73
+ init(_ label: String) { self.label = label }
74
+
75
+ var body: some View {
76
+ Text(label)
77
+ .font(.footnote)
78
+ .foregroundColor(Colors.black17)
79
+ .frame(maxWidth: .infinity, minHeight: 44, maxHeight: .infinity)
80
+ .background(Colors.blue08)
81
+ .clipShape(RoundedRectangle(cornerRadius: Radius.S, style: .continuous))
82
+ }
83
+ }
@@ -2,31 +2,60 @@
2
2
  // SkeletonDemo.swift
3
3
  // Example
4
4
  //
5
+ // Preview + Playground demo (DemoScreen pattern).
6
+ //
5
7
 
6
- import SwiftUI
7
8
  import MoMoUIKits
9
+ import SwiftUI
8
10
 
9
- public struct SkeletonDemo: View {
10
- public init() {}
11
+ struct SkeletonDemo: View {
12
+ var body: some View {
13
+ if #available(iOS 16.0, *) {
14
+ DemoScreen(preview: { SkeletonPreview() }, playground: { SkeletonPlayground() })
15
+ } else {
16
+ Text("Requires iOS 16+").padding()
17
+ }
18
+ }
19
+ }
11
20
 
12
- public var body: some View {
13
- VStack(alignment: .leading, spacing: 12) {
14
- Spacer().frame(height: 12)
21
+ // MARK: - Preview
15
22
 
16
- // Square skeleton (Compose: fillMaxWidth().aspectRatio(1f)).
23
+ private struct SkeletonPreview: View {
24
+ var body: some View {
25
+ BasicColumnBox("Square (aspect 1:1)", alignment: .leading) {
17
26
  Skeleton()
18
27
  .aspectRatio(1, contentMode: .fit)
19
28
  .frame(maxWidth: .infinity)
20
-
21
- // Fixed-height skeleton (Compose: fillMaxWidth().height(32.dp)).
29
+ }
30
+ BasicColumnBox("Fixed height (32)", alignment: .leading) {
22
31
  Skeleton()
23
32
  .frame(maxWidth: .infinity)
24
33
  .frame(height: 32)
25
34
  }
26
- .padding()
35
+ BasicColumnBox("Lines", alignment: .leading) {
36
+ Skeleton().frame(maxWidth: .infinity).frame(height: 16)
37
+ Skeleton().frame(maxWidth: .infinity).frame(height: 16)
38
+ Skeleton().frame(width: 160).frame(height: 16)
39
+ }
27
40
  }
28
41
  }
29
42
 
30
- #Preview {
31
- SkeletonDemo()
43
+ // MARK: - Playground
44
+
45
+ @available(iOS 16.0, *)
46
+ private struct SkeletonPlayground: View {
47
+ @State private var height: Double = 32
48
+
49
+ var body: some View {
50
+ PlaygroundTab(
51
+ component: {
52
+ Skeleton()
53
+ .frame(maxWidth: .infinity)
54
+ .frame(height: CGFloat(height))
55
+ },
56
+ params: [
57
+ .slider("Height", $height, min: 16, max: 200, step: 4),
58
+ ]
59
+ )
60
+ }
32
61
  }