@momo-kits/native-kits 0.163.1-beta.8 → 0.163.1-beta.9-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 (334) hide show
  1. package/CLAUDE.md +1 -1
  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 +294 -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 +543 -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 +306 -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 +65 -0
  99. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +48 -0
  100. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +51 -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 +253 -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 +100 -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 +360 -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 +581 -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 +128 -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 +15 -2
  142. package/ios/Application/Components.swift +50 -44
  143. package/ios/Application/FloatingButton.swift +10 -9
  144. package/ios/Application/HeaderRight.swift +79 -45
  145. package/ios/Application/Localize.swift +277 -0
  146. package/ios/Application/MaxApi.swift +18 -0
  147. package/ios/Application/Navigation/BottomTab/BottomTab.swift +104 -0
  148. package/ios/Application/Navigation/BottomTab/BottomTabBar.swift +215 -0
  149. package/ios/Application/Navigation/BottomTab/CurvedContainer.swift +65 -0
  150. package/ios/Application/Navigation/HeaderBackProps.swift +66 -0
  151. package/ios/Application/Navigation/HeaderTitle.swift +57 -0
  152. package/ios/Application/Navigation/HeaderUser.swift +209 -0
  153. package/ios/Application/Navigation/NavigationContainer.swift +200 -0
  154. package/ios/Application/Navigation/NavigationOptions.swift +109 -0
  155. package/ios/Application/Navigation/Navigator.swift +385 -0
  156. package/ios/Application/Navigation/Overplay/BottomSheet.swift +256 -0
  157. package/ios/Application/Navigation/Overplay/ModalScreen.swift +74 -0
  158. package/ios/Application/Navigation/Overplay/SnackBar.swift +144 -0
  159. package/ios/Application/Navigation/Tracking/ScreenTracker.swift +117 -0
  160. package/ios/Application/Navigation/component/Header.swift +178 -0
  161. package/ios/Application/Navigation/component/HeaderBackground.swift +83 -0
  162. package/ios/Application/Navigation/component/HeaderColor.swift +65 -0
  163. package/ios/Application/Screen.swift +2 -1
  164. package/ios/Application/StackScreen.swift +501 -0
  165. package/ios/Avatar/Avatar.swift +193 -0
  166. package/ios/Badge/Badge.swift +11 -14
  167. package/ios/Badge/BadgeRibbon.swift +92 -21
  168. package/ios/BaselineView/BaselineView.swift +163 -0
  169. package/ios/Button/Button.swift +124 -29
  170. package/ios/Carousel/Carousel.swift +196 -0
  171. package/ios/Checkbox/Checkbox.swift +23 -28
  172. package/ios/Chip/Chip.swift +56 -33
  173. package/ios/Collapse/Collapse.swift +192 -0
  174. package/ios/Colors+Radius+Spacing/Colors.swift +20 -17
  175. package/ios/Colors+Radius+Spacing/Spacing.swift +3 -1
  176. package/ios/Colors+Radius+Spacing/Theme.swift +295 -0
  177. package/ios/DateTimePicker/DateTimePicker.swift +212 -0
  178. package/ios/DateTimePicker/DateTimePickerTypes.swift +55 -0
  179. package/ios/DateTimePicker/DateTimePickerUtils.swift +167 -0
  180. package/ios/DateTimePicker/WheelPicker.swift +165 -0
  181. package/ios/Divider/Divider.swift +16 -0
  182. package/ios/Extensions/ActiveOpacityButtonStyle.swift +14 -0
  183. package/ios/Extensions/Color++.swift +32 -0
  184. package/ios/Icon/Icon.swift +10 -1
  185. package/ios/IconButton/IconButton.swift +140 -0
  186. package/ios/Image/Image.swift +16 -3
  187. package/ios/Information/Information.swift +3 -1
  188. package/ios/Input/ErrorView.swift +3 -1
  189. package/ios/Input/Input.swift +72 -33
  190. package/ios/Input/InputPhoneNumber.swift +33 -21
  191. package/ios/Input/InputSearch.swift +107 -48
  192. package/ios/Input/InputTextArea.swift +134 -64
  193. package/ios/InputDropDown/InputDropDown.swift +201 -0
  194. package/ios/InputMoney/InputMoney.swift +347 -0
  195. package/ios/InputOTP/InputOTP.swift +210 -0
  196. package/ios/Loader/Loader.swift +113 -0
  197. package/ios/MoMoUIKits.podspec +5 -0
  198. package/ios/Pagination/PaginationDot.swift +61 -0
  199. package/ios/Pagination/PaginationNumber.swift +35 -0
  200. package/ios/Pagination/PaginationScroll.swift +101 -0
  201. package/ios/Pagination/PaginationWhiteDot.swift +37 -0
  202. package/ios/Popup/PopupDisplay.swift +11 -20
  203. package/ios/Popup/PopupInput.swift +2 -8
  204. package/ios/Popup/PopupNotify.swift +218 -0
  205. package/ios/Popup/PopupPromotion.swift +16 -8
  206. package/ios/ProgressInfo/ProgressInfo.swift +296 -0
  207. package/ios/Radio/Radio.swift +69 -0
  208. package/ios/Rating/Rating.swift +82 -0
  209. package/ios/Resources/MoMoUIKitsColors.xcassets/AccentColor.colorset/Contents.json +11 -0
  210. package/ios/Resources/MoMoUIKitsColors.xcassets/Background.colorset/Contents.json +38 -0
  211. package/ios/Resources/MoMoUIKitsColors.xcassets/Border.colorset/Contents.json +38 -0
  212. package/ios/Resources/MoMoUIKitsColors.xcassets/Card.colorset/Contents.json +38 -0
  213. package/ios/Resources/MoMoUIKitsColors.xcassets/Contents.json +6 -0
  214. package/ios/Resources/MoMoUIKitsColors.xcassets/Error.colorset/Contents.json +38 -0
  215. package/ios/Resources/MoMoUIKitsColors.xcassets/Primary.colorset/Contents.json +38 -0
  216. package/ios/Resources/MoMoUIKitsColors.xcassets/PrimaryDark.colorset/Contents.json +38 -0
  217. package/ios/Resources/MoMoUIKitsColors.xcassets/PrimaryLight.colorset/Contents.json +38 -0
  218. package/ios/Resources/MoMoUIKitsColors.xcassets/Secondary.colorset/Contents.json +38 -0
  219. package/ios/Resources/MoMoUIKitsColors.xcassets/Success.colorset/Contents.json +38 -0
  220. package/ios/Resources/MoMoUIKitsColors.xcassets/Text.colorset/Contents.json +38 -0
  221. package/ios/Resources/MoMoUIKitsColors.xcassets/TextSecondary.colorset/Contents.json +38 -0
  222. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/Contents.json +9 -0
  223. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-default.colorset/Contents.json +38 -0
  224. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-disable.colorset/Contents.json +38 -0
  225. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-pressed.colorset/Contents.json +38 -0
  226. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-selected.colorset/Contents.json +38 -0
  227. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-surface.colorset/Contents.json +38 -0
  228. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-tonal.colorset/Contents.json +38 -0
  229. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/border-default.colorset/Contents.json +38 -0
  230. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/border-disable.colorset/Contents.json +38 -0
  231. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/gradient.colorset/Contents.json +38 -0
  232. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/primary.colorset/Contents.json +38 -0
  233. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/secondary.colorset/Contents.json +38 -0
  234. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-container.colorset/Contents.json +38 -0
  235. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-primary.colorset/Contents.json +38 -0
  236. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-secondary.colorset/Contents.json +38 -0
  237. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-default.colorset/Contents.json +38 -0
  238. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-disable.colorset/Contents.json +38 -0
  239. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-hint.colorset/Contents.json +38 -0
  240. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-secondary.colorset/Contents.json +38 -0
  241. package/ios/Resources/MoMoUIKitsColors.xcassets/Warning.colorset/Contents.json +38 -0
  242. package/ios/Skeleton/Skeleton.swift +99 -0
  243. package/ios/Slider/Slider.swift +237 -0
  244. package/ios/Stepper/Stepper.swift +220 -0
  245. package/ios/Steps/Steps.swift +467 -0
  246. package/ios/SuggestAction/SuggestAction.swift +99 -0
  247. package/ios/Swipeable/SwipeCell.swift +187 -0
  248. package/ios/Swipeable/SwipeCellModel.swift +21 -0
  249. package/ios/Switch/Switch.swift +53 -28
  250. package/ios/TabView/TabView.swift +534 -0
  251. package/ios/Tag/Tag.swift +98 -0
  252. package/ios/Template/TrustBanner/TrustBanner.swift +6 -7
  253. package/ios/Title/Title.swift +269 -0
  254. package/ios/Tooltip/Tooltip.swift +485 -0
  255. package/ios/Typography/FontScaleStore.swift +19 -0
  256. package/ios/Typography/Text.swift +79 -5
  257. package/ios/Typography/Typography.swift +3 -0
  258. package/ios/Uploader/Uploader.swift +174 -0
  259. package/ios/native-kits.podspec +61 -8
  260. package/ios-demo/MoMoUIKitsDemo.podspec +20 -0
  261. package/ios-demo/README.md +120 -0
  262. package/ios-demo/Resources/dot_loading.json +558 -0
  263. package/ios-demo/Resources/icon.json +4052 -0
  264. package/ios-demo/Resources/lottie_circle_loader.json +1 -0
  265. package/ios-demo/Sources/MoMoUIKitsDemo/DemoScaffold.swift +48 -0
  266. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsBadgeDemoView.swift +25 -0
  267. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsButtonDemoView.swift +26 -0
  268. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsCheckboxDemoView.swift +19 -0
  269. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsChipDemoView.swift +33 -0
  270. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsInputDemoView.swift +48 -0
  271. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsPopupDemoView.swift +21 -0
  272. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsRadioDemoView.swift +17 -0
  273. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsTypographyDemoView.swift +28 -0
  274. package/ios-demo/Sources/MoMoUIKitsDemo/MoMoUIKitsDemoContext.swift +31 -0
  275. package/ios-demo/Sources/MoMoUIKitsDemo/MoMoUIKitsDemoFactory.swift +24 -0
  276. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/AnimatedHeaderDemo.swift +110 -0
  277. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/AvatarDemo.swift +93 -0
  278. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BadgeDemo.swift +269 -0
  279. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BaselineView.swift +117 -0
  280. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BottomTabDemo.swift +89 -0
  281. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ButtonDemo.swift +100 -0
  282. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CarouselDemo.swift +126 -0
  283. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CheckboxDemo.swift +63 -0
  284. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ChipDemo.swift +20 -0
  285. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CollapseDemo.swift +93 -0
  286. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ContentView.swift +107 -0
  287. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DateTimePickerDemo.swift +124 -0
  288. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DividerDemo.swift +14 -0
  289. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/HeaderUserDemo.swift +49 -0
  290. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/Home.swift +279 -0
  291. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/IconButtonDemo.swift +58 -0
  292. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ImageDemo.swift +78 -0
  293. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InformationDemo.swift +138 -0
  294. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputDemo.swift +111 -0
  295. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputDropDownDemo.swift +136 -0
  296. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputMoneyDemo.swift +107 -0
  297. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputOTPDemo.swift +73 -0
  298. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputPhoneNumberDemo.swift +100 -0
  299. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputSearchDemo.swift +32 -0
  300. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputTextAreaDemo.swift +57 -0
  301. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/LoaderDemo.swift +70 -0
  302. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/LocalizeDemo.swift +188 -0
  303. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/NavigationDemo.swift +229 -0
  304. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PaginationDemo.swift +72 -0
  305. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupDisplayDemo.swift +175 -0
  306. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupNotifyDemo.swift +121 -0
  307. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupPromotionDemo.swift +76 -0
  308. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ProgressInfoDemo.swift +89 -0
  309. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/RadioDemo.swift +32 -0
  310. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/RatingDemo.swift +56 -0
  311. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SkeletonDemo.swift +32 -0
  312. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SliderDemo.swift +150 -0
  313. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SnackBarDemo.swift +138 -0
  314. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/StepperDemo.swift +103 -0
  315. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/StepsDemo.swift +94 -0
  316. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SuggestActionDemo.swift +79 -0
  317. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SwipeDemo.swift +152 -0
  318. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SwitchDemo.swift +33 -0
  319. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TabViewDemo.swift +190 -0
  320. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TagDemo.swift +34 -0
  321. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ThemeDemo.swift +182 -0
  322. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TitleDemo.swift +109 -0
  323. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TooltipDemo.swift +187 -0
  324. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TypographyDemo.swift +87 -0
  325. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/UploaderDemo.swift +131 -0
  326. package/ios-demo/Sources/MoMoUIKitsDemo/SwiftUIDemoBrowserView.swift +51 -0
  327. package/ios-demo/Sources/MoMoUIKitsDemo/UIKitsDemoModels.swift +15 -0
  328. package/ios-demo/Sources/MoMoUIKitsDemo/UIKitsDemoRegistry.swift +73 -0
  329. package/local.properties +8 -0
  330. package/package.json +1 -1
  331. package/publish.sh +53 -0
  332. package/scripts/gen-ios-color.mjs +136 -0
  333. package/settings.gradle.kts +64 -0
  334. package/.claude/settings.local.json +0 -62
@@ -9,11 +9,12 @@ import SwiftUI
9
9
  // MARK: - RenderRightIconSearch
10
10
 
11
11
  struct RenderRightIconSearch: View {
12
+ @Environment(\.appTheme) private var theme
12
13
  let loading: Bool
13
14
  let icon: String
14
15
  let color: Color
15
16
  let onClick: () -> Void
16
-
17
+
17
18
  var body: some View {
18
19
  HStack(spacing: 0) {
19
20
  if loading {
@@ -24,12 +25,10 @@ struct RenderRightIconSearch: View {
24
25
  if !icon.isEmpty {
25
26
  Divider()
26
27
  .frame(width: 1)
27
- .background(Colors.primary)
28
+ .background(theme.colors.primary)
28
29
  .padding(.leading, Spacing.S)
29
30
 
30
- Image(systemName: icon)
31
- .foregroundColor(color)
32
- .frame(width: 24, height: 24)
31
+ Icon(source: icon, size: 24, color: color)
33
32
  .padding(.leading, Spacing.S)
34
33
  .onTapGesture(perform: onClick)
35
34
  }
@@ -48,14 +47,18 @@ public struct InputSearchProps {
48
47
  var error: String = ""
49
48
  var disabled: Bool = false
50
49
  var icon: String = ""
51
- var iconColor: Color = Colors.text
50
+ var iconColor: Color? = nil
52
51
  var onRightIconPressed: () -> Void = {}
53
52
  var onFocus: () -> Void = {}
54
53
  var onBlur: () -> Void = {}
55
54
  var loading: Bool = false
56
55
  var fontWeight: Font.Weight = .regular
57
56
  var keyboardType: UIKeyboardType = .default
58
-
57
+ // Mirrors Compose's InputSearchProps.searchIcon — a custom leading icon view.
58
+ var searchIcon: (() -> AnyView)? = nil
59
+ // Mirrors Compose's InputSearchProps.placeholderCustomRender — a custom placeholder view.
60
+ var placeholderCustomRender: (() -> AnyView)? = nil
61
+
59
62
  public init(text: Binding<String>,
60
63
  buttonText: String = "",
61
64
  showButtonText: Bool = false,
@@ -66,13 +69,15 @@ public struct InputSearchProps {
66
69
  error: String = "",
67
70
  disabled: Bool = false,
68
71
  icon: String = "",
69
- iconColor: Color = Colors.text,
72
+ iconColor: Color? = nil,
70
73
  onRightIconPressed: @escaping () -> Void = {},
71
74
  onFocus: @escaping () -> Void = {},
72
75
  onBlur: @escaping () -> Void = {},
73
76
  loading: Bool = false,
74
77
  fontWeight: Font.Weight = .regular,
75
- keyboardType: UIKeyboardType = .default) {
78
+ keyboardType: UIKeyboardType = .default,
79
+ searchIcon: (() -> AnyView)? = nil,
80
+ placeholderCustomRender: (() -> AnyView)? = nil) {
76
81
  self._text = text
77
82
  self.buttonText = buttonText
78
83
  self.showButtonText = showButtonText
@@ -90,12 +95,15 @@ public struct InputSearchProps {
90
95
  self.loading = loading
91
96
  self.fontWeight = fontWeight
92
97
  self.keyboardType = keyboardType
98
+ self.searchIcon = searchIcon
99
+ self.placeholderCustomRender = placeholderCustomRender
93
100
  }
94
101
  }
95
102
 
96
103
  // MARK: - InputSearch
97
104
 
98
105
  public struct InputSearch: View {
106
+ @Environment(\.appTheme) private var theme
99
107
  @Binding var text: String
100
108
  var buttonText: String = ""
101
109
  var showButtonText: Bool = false
@@ -106,17 +114,19 @@ public struct InputSearch: View {
106
114
  var error: String = ""
107
115
  var disabled: Bool = false
108
116
  var icon: String = ""
109
- var iconColor: Color = Colors.text
117
+ var iconColor: Color? = nil
110
118
  var onRightIconPressed: () -> Void = {}
111
119
  var onFocus: () -> Void = {}
112
120
  var onBlur: () -> Void = {}
113
121
  var loading: Bool = false
114
122
  var fontWeight: Font.Weight = .regular
115
123
  var keyboardType: UIKeyboardType = .default
116
-
124
+ var searchIcon: (() -> AnyView)? = nil
125
+ var placeholderCustomRender: (() -> AnyView)? = nil
126
+
117
127
  @State private var isFocused = false
118
128
  @State private var isBlurred = false
119
-
129
+
120
130
  public init(text: Binding<String>,
121
131
  buttonText: String = "",
122
132
  showButtonText: Bool = false,
@@ -127,13 +137,15 @@ public struct InputSearch: View {
127
137
  error: String = "",
128
138
  disabled: Bool = false,
129
139
  icon: String = "",
130
- iconColor: Color = Colors.text,
140
+ iconColor: Color? = nil,
131
141
  onRightIconPressed: @escaping () -> Void = {},
132
142
  onFocus: @escaping () -> Void = {},
133
143
  onBlur: @escaping () -> Void = {},
134
144
  loading: Bool = false,
135
145
  fontWeight: Font.Weight = .regular,
136
- keyboardType: UIKeyboardType = .default) {
146
+ keyboardType: UIKeyboardType = .default,
147
+ searchIcon: (() -> AnyView)? = nil,
148
+ placeholderCustomRender: (() -> AnyView)? = nil) {
137
149
  self._text = text
138
150
  self.buttonText = buttonText
139
151
  self.showButtonText = showButtonText
@@ -151,24 +163,60 @@ public struct InputSearch: View {
151
163
  self.loading = loading
152
164
  self.fontWeight = fontWeight
153
165
  self.keyboardType = keyboardType
166
+ self.searchIcon = searchIcon
167
+ self.placeholderCustomRender = placeholderCustomRender
154
168
  }
155
169
 
156
-
170
+ /// Convenience initializer mirroring Compose's `InputSearch(inputSearchProps)`.
171
+ public init(props: InputSearchProps) {
172
+ self.init(
173
+ text: props.$text,
174
+ buttonText: props.buttonText,
175
+ showButtonText: props.showButtonText,
176
+ showBorder: props.showBorder,
177
+ placeholder: props.placeholder,
178
+ onChangeText: props.onChangeText,
179
+ onPressButtonText: props.onPressButtonText,
180
+ error: props.error,
181
+ disabled: props.disabled,
182
+ icon: props.icon,
183
+ iconColor: props.iconColor,
184
+ onRightIconPressed: props.onRightIconPressed,
185
+ onFocus: props.onFocus,
186
+ onBlur: props.onBlur,
187
+ loading: props.loading,
188
+ fontWeight: props.fontWeight,
189
+ keyboardType: props.keyboardType,
190
+ searchIcon: props.searchIcon,
191
+ placeholderCustomRender: props.placeholderCustomRender
192
+ )
193
+ }
194
+
195
+
157
196
  public var body: some View {
197
+ let iconColor: Color = disabled ? theme.colors.text.disable : (self.iconColor ?? theme.colors.text.default)
158
198
  VStack(alignment: .leading, spacing: 0) {
159
199
  HStack(spacing: 0) {
160
200
  HStack {
161
- Image(systemName: "magnifyingglass")
162
- .foregroundColor(Colors.black12)
163
- .frame(width: 24, height: 24)
164
- .padding(.trailing, Spacing.XS)
165
-
201
+ if let searchIcon = searchIcon {
202
+ searchIcon()
203
+ } else {
204
+ Image(systemName: "magnifyingglass")
205
+ .foregroundColor(theme.colors.text.hint)
206
+ .frame(width: 24, height: 24)
207
+ .padding(.trailing, Spacing.XS)
208
+ }
209
+
166
210
  ZStack(alignment: .leading) {
167
211
  if text.isEmpty {
168
- Text(placeholder)
169
- .foregroundColor(disabled ? Colors.black08 : Colors.black12)
170
- .font(.system(size: 16, weight: fontWeight))
171
- .ignoreBoldTextSetting()
212
+ if let placeholderCustomRender = placeholderCustomRender {
213
+ placeholderCustomRender()
214
+ } else {
215
+ Text(placeholder)
216
+ .foregroundColor(disabled ? theme.colors.text.disable : theme.colors.text.hint)
217
+ .font(.system(size: scaleSize(14), weight: fontWeight))
218
+ .ignoreBoldTextSetting()
219
+ }
172
220
  }
173
221
  TextField("", text: $text, onEditingChanged: { editing in
174
222
  isFocused = editing
@@ -182,26 +230,33 @@ public struct InputSearch: View {
182
230
  }
183
231
  }, onCommit: {})
184
232
  .disabled(disabled)
185
- .foregroundColor(disabled ? Colors.black08 : Colors.black17)
186
- .font(.system(size: 15, weight: fontWeight))
233
+ .foregroundColor(disabled ? theme.colors.text.disable : theme.colors.text.default)
234
+ .font(.system(size: scaleSize(14), weight: fontWeight))
187
235
  .ignoreBoldTextSetting()
188
236
  .keyboardType(keyboardType)
237
+ .applyCursorColor(theme.colors.primary)
189
238
  }
190
239
 
191
240
  if isFocused && !text.isEmpty {
192
- SwiftButton(action: { text = "" }) {
241
+ SwiftButton(action: {
242
+ text = ""
243
+ // Kotlin's clear icon fires a callback distinct from
244
+ // onChangeText (`onClearPress`, not ported here); route
245
+ // through onChangeText so clearing isn't a silent no-op.
246
+ onChangeText("")
247
+ }) {
193
248
  Image(systemName: "xmark.circle.fill")
194
- .foregroundColor(Colors.black12)
249
+ .foregroundColor(theme.colors.text.hint)
195
250
  .frame(width: 16, height: 16)
196
251
  }
197
252
  .padding(.leading, Spacing.S)
198
253
  }
199
254
 
200
- RenderRightIconSearch(loading: loading, icon: icon, color: disabled ? Colors.black08 : iconColor, onClick: onRightIconPressed)
255
+ RenderRightIconSearch(loading: loading, icon: icon, color: iconColor, onClick: onRightIconPressed)
201
256
  }
202
257
  .padding(.horizontal, Spacing.M)
203
258
  .padding(.vertical, Spacing.S)
204
- .background(Colors.black01)
259
+ .background(theme.colors.background.surface)
205
260
  .cornerRadius(Radius.XL)
206
261
  .overlay(
207
262
  RoundedRectangle(cornerRadius: Radius.XL)
@@ -211,31 +266,35 @@ public struct InputSearch: View {
211
266
 
212
267
  if showButtonText {
213
268
  SwiftButton(action: onPressButtonText) {
214
- Text(buttonText)
215
- .foregroundColor(Colors.black17)
216
- .font(.system(size: 14, weight: .medium))
217
- .ignoreBoldTextSetting()
269
+ MomoText(buttonText, typography: .actionDefaultBold, color: theme.colors.text.default)
218
270
  }
219
271
  .padding(.leading, Spacing.L)
220
272
  }
221
273
  }
222
274
  }
223
275
  }
224
- }
225
276
 
226
- // MARK: - Helper Functions
227
-
228
- func getBorderColor(isFocused: Bool, error: String, disabled: Bool) -> Color {
229
- if disabled {
230
- return Colors.black08
231
- } else if !error.isEmpty {
232
- return Colors.red03
233
- } else if isFocused {
234
- return Colors.primary
235
- } else {
236
- return Colors.black04
277
+ // MARK: - Helper Functions
278
+
279
+ func getBorderColor(isFocused: Bool, error: String, disabled: Bool) -> Color {
280
+ if disabled {
281
+ return theme.colors.border.disable
282
+ } else if !error.isEmpty {
283
+ return theme.colors.error.primary
284
+ } else if isFocused {
285
+ return theme.colors.primary
286
+ } else {
287
+ return theme.colors.border.default
288
+ }
237
289
  }
238
290
  }
239
291
 
240
-
241
-
292
+ private extension View {
293
+ func applyCursorColor(_ color: Color) -> some View {
294
+ if #available(iOS 15.0, *) {
295
+ return self.tint(color)
296
+ } else {
297
+ return self
298
+ }
299
+ }
300
+ }
@@ -12,6 +12,12 @@ public let DEFAULT_HEIGHT: CGFloat = 104
12
12
 
13
13
  struct UITextViewWrapper: UIViewRepresentable {
14
14
  @Binding var text: String
15
+ var maxLength: Int
16
+ var textColor: Color
17
+ var cursorColor: Color
18
+ var fontWeight: Font.Weight
19
+ var disabled: Bool
20
+ var onChangeText: (String) -> Void
15
21
  var onDone: (() -> Void)?
16
22
  var onFocus: (() -> Void)?
17
23
  var onBlur: (() -> Void)?
@@ -19,11 +25,20 @@ struct UITextViewWrapper: UIViewRepresentable {
19
25
  func makeUIView(context: Context) -> UITextView {
20
26
  let textView = UITextView()
21
27
  textView.delegate = context.coordinator
28
+ textView.backgroundColor = .clear
29
+ textView.textContainerInset = .zero
30
+ textView.textContainer.lineFragmentPadding = 0
22
31
  return textView
23
32
  }
24
33
 
25
34
  func updateUIView(_ uiView: UITextView, context: Context) {
26
- uiView.text = text
35
+ if uiView.text != text {
36
+ uiView.text = text
37
+ }
38
+ uiView.textColor = UIColor(textColor)
39
+ uiView.tintColor = UIColor(cursorColor)
40
+ uiView.font = UIFont.systemFont(ofSize: scaleSize(16), weight: fontWeight == .bold ? .bold : .regular)
41
+ uiView.isEditable = !disabled
27
42
  }
28
43
 
29
44
  func makeCoordinator() -> Coordinator {
@@ -38,7 +53,12 @@ struct UITextViewWrapper: UIViewRepresentable {
38
53
  }
39
54
 
40
55
  func textViewDidChange(_ textView: UITextView) {
41
- parent.text = textView.text
56
+ let limited = String(textView.text.prefix(parent.maxLength))
57
+ if textView.text != limited {
58
+ textView.text = limited
59
+ }
60
+ parent.text = limited
61
+ parent.onChangeText(limited)
42
62
  }
43
63
 
44
64
  func textViewDidBeginEditing(_ textView: UITextView) {
@@ -54,27 +74,31 @@ struct UITextViewWrapper: UIViewRepresentable {
54
74
  parent.onDone?()
55
75
  return false
56
76
  }
57
- return true
77
+ let current = textView.text ?? ""
78
+ guard let range = Range(range, in: current) else { return false }
79
+ let proposed = current.replacingCharacters(in: range, with: text)
80
+ return proposed.count <= parent.maxLength
58
81
  }
59
82
  }
60
83
  }
61
84
 
62
85
  // Make the struct public
63
86
  public struct InputTextArea: View {
87
+ @Environment(\.appTheme) private var theme
64
88
  @Binding var text: String
65
89
  var maxLength: Int = MAX_LENGTH
66
90
  var height: CGFloat = DEFAULT_HEIGHT
67
91
  var floatingValue: String = ""
68
- var floatingValueColor: Color = .gray
92
+ var floatingValueColor: Color?
69
93
  var floatingIcon: String = ""
70
- var floatingIconColor: Color = .black
94
+ var floatingIconColor: Color?
71
95
  var placeholder: String = ""
72
96
  var onChangeText: (String) -> Void = { _ in }
73
97
  var error: String = ""
74
98
  var errorSpacing: Bool = false
75
99
  var disabled: Bool = false
76
100
  var icon: String = ""
77
- var iconColor: Color = .black
101
+ var iconColor: Color?
78
102
  var onRightIconPressed: () -> Void = {}
79
103
  var onFocus: () -> Void = {}
80
104
  var onBlur: () -> Void = {}
@@ -85,6 +109,7 @@ public struct InputTextArea: View {
85
109
 
86
110
  @State private var isFocused = false
87
111
  @State private var isBlurred = false
112
+ @State private var floatingLabelHeight: CGFloat = 16
88
113
 
89
114
  // Make the initializer public
90
115
  public init(
@@ -92,16 +117,16 @@ public struct InputTextArea: View {
92
117
  maxLength: Int = MAX_LENGTH,
93
118
  height: CGFloat = DEFAULT_HEIGHT,
94
119
  floatingValue: String = "",
95
- floatingValueColor: Color = .gray,
120
+ floatingValueColor: Color? = nil,
96
121
  floatingIcon: String = "",
97
- floatingIconColor: Color = .black,
122
+ floatingIconColor: Color? = nil,
98
123
  placeholder: String = "",
99
124
  onChangeText: @escaping (String) -> Void = { _ in },
100
125
  error: String = "",
101
126
  errorSpacing: Bool = false,
102
127
  disabled: Bool = false,
103
128
  icon: String = "",
104
- iconColor: Color = Colors.pink03,
129
+ iconColor: Color? = nil,
105
130
  onRightIconPressed: @escaping () -> Void = {},
106
131
  onFocus: @escaping () -> Void = {},
107
132
  onBlur: @escaping () -> Void = {},
@@ -138,77 +163,124 @@ public struct InputTextArea: View {
138
163
  ZStack(alignment: .topLeading) {
139
164
  if !floatingValue.isEmpty || !floatingIcon.isEmpty {
140
165
  HStack(spacing: 4) {
141
- Text(floatingValue)
142
- .font(.caption)
143
- .foregroundColor(disabled ? .gray : floatingValueColor)
166
+ MomoText(
167
+ floatingValue,
168
+ typography: .labelSMedium,
169
+ color: disabled ? theme.colors.text.disable : (floatingValueColor ?? theme.colors.text.hint)
170
+ )
144
171
 
145
172
  if required {
146
- Text("*")
147
- .font(.caption)
148
- .foregroundColor(.red)
173
+ MomoText("*", typography: .labelSMedium, color: theme.colors.error.primary)
149
174
  }
150
175
 
151
176
  if !floatingIcon.isEmpty {
152
- Image(systemName: floatingIcon)
153
- .font(.caption)
154
- .foregroundColor(disabled ? .gray : floatingIconColor)
177
+ Icon(
178
+ source: floatingIcon,
179
+ size: 16,
180
+ color: disabled ? theme.colors.text.disable : (floatingIconColor ?? theme.colors.text.default)
181
+ )
182
+ .padding(.leading, Spacing.XS)
155
183
  }
156
184
  }
157
- .padding(.horizontal, 8)
158
- .background(Colors.black01)
159
- .offset(x: Spacing.S, y: -height / 10)
185
+ .padding(.horizontal, Spacing.S)
186
+ .background(
187
+ GeometryReader { geo in
188
+ Color.clear.onAppear { floatingLabelHeight = geo.size.height }
189
+ }
190
+ )
191
+ .background(theme.colors.background.surface)
192
+ // Kotlin centers the label within the box-height-tall decorationBox
193
+ // by default, then applies `offsetY = -scaleHeight / 2` — net effect:
194
+ // the label ends up centered exactly on the box's top border. Our
195
+ // ZStack anchors top-leading instead, so matching that requires
196
+ // offsetting by half the label's OWN measured height, not half the
197
+ // (104pt-tall) text-area box height.
198
+ .offset(x: Spacing.S, y: -floatingLabelHeight / 2)
160
199
  .zIndex(10)
161
200
  }
162
-
201
+
163
202
  VStack {
164
- ZStack(alignment: .topLeading) {
165
- if text.isEmpty {
166
- Text(placeholder)
167
- .foregroundColor(disabled ? .gray : .gray)
168
- .font(.system(size: 16, weight: fontWeight))
169
- .padding(.horizontal, 16)
170
- .padding(.vertical, 12)
203
+ HStack(alignment: .top, spacing: 0) {
204
+ ZStack(alignment: .topLeading) {
205
+ if text.isEmpty {
206
+ Text(placeholder)
207
+ .foregroundColor(disabled ? theme.colors.text.disable : theme.colors.text.hint)
208
+ .font(.system(size: 16, weight: fontWeight))
209
+ .padding(.horizontal, 16)
210
+ .padding(.vertical, 12)
211
+ }
212
+
213
+ UITextViewWrapper(
214
+ text: $text,
215
+ maxLength: maxLength,
216
+ textColor: disabled ? theme.colors.text.disable : theme.colors.text.default,
217
+ cursorColor: theme.colors.primary,
218
+ fontWeight: fontWeight,
219
+ disabled: disabled,
220
+ onChangeText: onChangeText,
221
+ onDone: {
222
+ // Handle done action if needed
223
+ },
224
+ onFocus: {
225
+ isFocused = true
226
+ onFocus()
227
+ }, onBlur: {
228
+ isFocused = false
229
+ isBlurred = true
230
+ onBlur()
231
+ })
232
+ .frame(height: height)
233
+ .padding(.horizontal, 12)
234
+ .padding(.vertical, 8)
235
+ .disabled(disabled)
171
236
  }
172
-
173
- UITextViewWrapper(text: $text, onDone: {
174
- // Handle done action if needed
175
- },
176
- onFocus: {
177
- isFocused = true
178
- onFocus()
179
- }, onBlur: {
180
- isFocused = false
181
- isBlurred = true
182
- onBlur()
183
- })
184
- .frame(height: height)
185
- .padding(.horizontal, 12)
186
- .padding(.vertical, 8)
187
- .disabled(disabled) }
188
-
237
+ .frame(maxWidth: .infinity)
238
+
239
+ // Clear button (mirrors Compose: focused + non-empty).
240
+ if isFocused && !text.isEmpty {
241
+ SwiftUI.Button(action: {
242
+ text = ""
243
+ onChangeText("")
244
+ }) {
245
+ Icon(source: "24_navigation_close_circle_full", size: 16, color: theme.colors.text.hint)
246
+ }
247
+ .padding(.leading, Spacing.XS)
248
+ .padding(.top, 12)
249
+ }
250
+
251
+ // Loading indicator and right icon (independent, mirrors
252
+ // Compose's RenderRightIcon: both can render at once).
253
+ if loading {
254
+ ActivityIndicator(isAnimating: .constant(true), style: .medium)
255
+ .frame(width: 16, height: 16)
256
+ .padding(.leading, Spacing.XS)
257
+ .padding(.top, 12)
258
+ }
259
+ if !icon.isEmpty {
260
+ SwiftUI.Button(action: onRightIconPressed) {
261
+ Icon(source: icon, size: 24, color: disabled ? theme.colors.text.disable : (iconColor ?? theme.colors.text.default))
262
+ }
263
+ .padding(.leading, Spacing.XS)
264
+ .padding(.top, 12)
265
+ }
266
+ }
267
+
189
268
  HStack {
190
269
  Spacer()
191
- Text("\(text.count)/\(maxLength)")
192
- .font(.caption)
193
- .foregroundColor(.gray)
270
+ MomoText("\(text.count)/\(maxLength)", typography: .descriptionXsRegular, color: theme.colors.text.hint)
194
271
  }
195
272
  .padding(.horizontal, 16)
196
273
  .padding(.bottom, 12)
197
274
  }
198
- .background(Color.white)
199
- .cornerRadius(8)
275
+ .background(theme.colors.background.surface)
276
+ .cornerRadius(Radius.S)
200
277
  .overlay(
201
- RoundedRectangle(cornerRadius: 8)
278
+ RoundedRectangle(cornerRadius: Radius.S)
202
279
  .stroke(borderColor, lineWidth: 1)
203
280
  )
204
281
  }
205
282
 
206
- if !error.isEmpty {
207
- Text(error)
208
- .font(.caption)
209
- .foregroundColor(.red)
210
- .padding(.top, errorSpacing ? 8 : 4)
211
- }
283
+ ErrorView(errorMessage: error, errorSpacing: errorSpacing, hintText: "")
212
284
  }
213
285
  .onReceive(NotificationCenter.default.publisher(for: UIResponder.keyboardWillShowNotification)) { _ in
214
286
  if !isBlurred {
@@ -228,16 +300,14 @@ public struct InputTextArea: View {
228
300
 
229
301
  private var borderColor: Color {
230
302
  if disabled {
231
- return Colors.black03
303
+ return theme.colors.border.disable
232
304
  } else if !error.isEmpty {
233
- return .red
305
+ return theme.colors.error.primary
234
306
  } else if isFocused {
235
- return Colors.pink03
307
+ return theme.colors.primary
236
308
  } else {
237
- return Colors.border
309
+ return theme.colors.border.default
238
310
  }
239
311
 
240
312
  }
241
313
  }
242
-
243
-