@momo-kits/native-kits 0.163.1-beta.3 → 0.163.1-beta.5-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 (331) 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 +123 -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 +2 -0
  99. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +35 -0
  100. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +2 -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 +98 -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 +562 -0
  114. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +154 -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 +70 -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 +58 -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 +184 -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 +11 -1
  142. package/ios/Application/Components.swift +34 -44
  143. package/ios/Application/FloatingButton.swift +10 -9
  144. package/ios/Application/HeaderRight.swift +79 -45
  145. package/ios/Application/Navigation/BottomTab/BottomTab.swift +103 -0
  146. package/ios/Application/Navigation/BottomTab/BottomTabBar.swift +215 -0
  147. package/ios/Application/Navigation/BottomTab/CurvedContainer.swift +65 -0
  148. package/ios/Application/Navigation/HeaderBackProps.swift +66 -0
  149. package/ios/Application/Navigation/HeaderTitle.swift +57 -0
  150. package/ios/Application/Navigation/HeaderUser.swift +209 -0
  151. package/ios/Application/Navigation/NavigationContainer.swift +176 -0
  152. package/ios/Application/Navigation/NavigationOptions.swift +109 -0
  153. package/ios/Application/Navigation/Navigator.swift +364 -0
  154. package/ios/Application/Navigation/Overplay/BottomSheet.swift +188 -0
  155. package/ios/Application/Navigation/Overplay/ModalScreen.swift +68 -0
  156. package/ios/Application/Navigation/Overplay/SnackBar.swift +144 -0
  157. package/ios/Application/Navigation/component/Header.swift +178 -0
  158. package/ios/Application/Navigation/component/HeaderBackground.swift +83 -0
  159. package/ios/Application/Navigation/component/HeaderColor.swift +65 -0
  160. package/ios/Application/Screen.swift +2 -1
  161. package/ios/Application/StackScreen.swift +453 -0
  162. package/ios/Avatar/Avatar.swift +193 -0
  163. package/ios/Badge/Badge.swift +11 -14
  164. package/ios/Badge/BadgeRibbon.swift +12 -21
  165. package/ios/BaselineView/BaselineView.swift +163 -0
  166. package/ios/Button/Button.swift +61 -22
  167. package/ios/Carousel/Carousel.swift +181 -0
  168. package/ios/Checkbox/Checkbox.swift +14 -13
  169. package/ios/Chip/Chip.swift +23 -9
  170. package/ios/Collapse/Collapse.swift +182 -0
  171. package/ios/Colors+Radius+Spacing/Colors.swift +12 -12
  172. package/ios/Colors+Radius+Spacing/Theme.swift +295 -0
  173. package/ios/DateTimePicker/DateTimePicker.swift +210 -0
  174. package/ios/DateTimePicker/DateTimePickerTypes.swift +55 -0
  175. package/ios/DateTimePicker/DateTimePickerUtils.swift +167 -0
  176. package/ios/DateTimePicker/WheelPicker.swift +161 -0
  177. package/ios/Divider/Divider.swift +16 -0
  178. package/ios/Extensions/Color++.swift +32 -0
  179. package/ios/Icon/Icon.swift +6 -1
  180. package/ios/IconButton/IconButton.swift +112 -0
  181. package/ios/Input/Input.swift +41 -25
  182. package/ios/Input/InputPhoneNumber.swift +20 -19
  183. package/ios/Input/InputSearch.swift +100 -47
  184. package/ios/Input/InputTextArea.swift +66 -40
  185. package/ios/InputDropDown/InputDropDown.swift +198 -0
  186. package/ios/InputMoney/InputMoney.swift +335 -0
  187. package/ios/InputOTP/InputOTP.swift +210 -0
  188. package/ios/Loader/Loader.swift +113 -0
  189. package/ios/MoMoUIKits.podspec +5 -0
  190. package/ios/Pagination/PaginationDot.swift +61 -0
  191. package/ios/Pagination/PaginationNumber.swift +35 -0
  192. package/ios/Pagination/PaginationScroll.swift +101 -0
  193. package/ios/Pagination/PaginationWhiteDot.swift +37 -0
  194. package/ios/Popup/PopupDisplay.swift +8 -16
  195. package/ios/Popup/PopupInput.swift +2 -8
  196. package/ios/Popup/PopupNotify.swift +219 -0
  197. package/ios/ProgressInfo/ProgressInfo.swift +294 -0
  198. package/ios/Radio/Radio.swift +70 -0
  199. package/ios/Rating/Rating.swift +82 -0
  200. package/ios/Resources/MoMoUIKitsColors.xcassets/AccentColor.colorset/Contents.json +11 -0
  201. package/ios/Resources/MoMoUIKitsColors.xcassets/Background.colorset/Contents.json +38 -0
  202. package/ios/Resources/MoMoUIKitsColors.xcassets/Border.colorset/Contents.json +38 -0
  203. package/ios/Resources/MoMoUIKitsColors.xcassets/Card.colorset/Contents.json +38 -0
  204. package/ios/Resources/MoMoUIKitsColors.xcassets/Contents.json +6 -0
  205. package/ios/Resources/MoMoUIKitsColors.xcassets/Error.colorset/Contents.json +38 -0
  206. package/ios/Resources/MoMoUIKitsColors.xcassets/Primary.colorset/Contents.json +38 -0
  207. package/ios/Resources/MoMoUIKitsColors.xcassets/PrimaryDark.colorset/Contents.json +38 -0
  208. package/ios/Resources/MoMoUIKitsColors.xcassets/PrimaryLight.colorset/Contents.json +38 -0
  209. package/ios/Resources/MoMoUIKitsColors.xcassets/Secondary.colorset/Contents.json +38 -0
  210. package/ios/Resources/MoMoUIKitsColors.xcassets/Success.colorset/Contents.json +38 -0
  211. package/ios/Resources/MoMoUIKitsColors.xcassets/Text.colorset/Contents.json +38 -0
  212. package/ios/Resources/MoMoUIKitsColors.xcassets/TextSecondary.colorset/Contents.json +38 -0
  213. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/Contents.json +9 -0
  214. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-default.colorset/Contents.json +38 -0
  215. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-disable.colorset/Contents.json +38 -0
  216. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-pressed.colorset/Contents.json +38 -0
  217. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-selected.colorset/Contents.json +38 -0
  218. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-surface.colorset/Contents.json +38 -0
  219. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-tonal.colorset/Contents.json +38 -0
  220. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/border-default.colorset/Contents.json +38 -0
  221. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/border-disable.colorset/Contents.json +38 -0
  222. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/gradient.colorset/Contents.json +38 -0
  223. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/primary.colorset/Contents.json +38 -0
  224. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/secondary.colorset/Contents.json +38 -0
  225. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-container.colorset/Contents.json +38 -0
  226. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-primary.colorset/Contents.json +38 -0
  227. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-secondary.colorset/Contents.json +38 -0
  228. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-default.colorset/Contents.json +38 -0
  229. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-disable.colorset/Contents.json +38 -0
  230. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-hint.colorset/Contents.json +38 -0
  231. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-secondary.colorset/Contents.json +38 -0
  232. package/ios/Resources/MoMoUIKitsColors.xcassets/Warning.colorset/Contents.json +38 -0
  233. package/ios/Skeleton/Skeleton.swift +99 -0
  234. package/ios/Slider/Slider.swift +237 -0
  235. package/ios/Stepper/Stepper.swift +220 -0
  236. package/ios/Steps/Steps.swift +451 -0
  237. package/ios/SuggestAction/SuggestAction.swift +97 -0
  238. package/ios/Swipeable/SwipeCell.swift +185 -0
  239. package/ios/Swipeable/SwipeCellModel.swift +21 -0
  240. package/ios/TabView/TabView.swift +530 -0
  241. package/ios/Tag/Tag.swift +98 -0
  242. package/ios/Title/Title.swift +269 -0
  243. package/ios/Tooltip/Tooltip.swift +482 -0
  244. package/ios/Typography/FontScaleStore.swift +19 -0
  245. package/ios/Typography/Text.swift +86 -17
  246. package/ios/Typography/Typography.swift +12 -14
  247. package/ios/Uploader/Uploader.swift +183 -0
  248. package/ios/native-kits.podspec +61 -8
  249. package/ios-demo/MoMoUIKitsDemo.podspec +20 -0
  250. package/ios-demo/README.md +120 -0
  251. package/ios-demo/Resources/dot_loading.json +558 -0
  252. package/ios-demo/Resources/icon.json +4052 -0
  253. package/ios-demo/Resources/lottie_circle_loader.json +1 -0
  254. package/ios-demo/Sources/MoMoUIKitsDemo/DemoScaffold.swift +48 -0
  255. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsBadgeDemoView.swift +25 -0
  256. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsButtonDemoView.swift +26 -0
  257. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsCheckboxDemoView.swift +19 -0
  258. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsChipDemoView.swift +33 -0
  259. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsInputDemoView.swift +48 -0
  260. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsPopupDemoView.swift +21 -0
  261. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsRadioDemoView.swift +17 -0
  262. package/ios-demo/Sources/MoMoUIKitsDemo/Demos/UIKitsTypographyDemoView.swift +28 -0
  263. package/ios-demo/Sources/MoMoUIKitsDemo/MoMoUIKitsDemoContext.swift +31 -0
  264. package/ios-demo/Sources/MoMoUIKitsDemo/MoMoUIKitsDemoFactory.swift +24 -0
  265. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/AnimatedHeaderDemo.swift +110 -0
  266. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/AvatarDemo.swift +93 -0
  267. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BadgeDemo.swift +269 -0
  268. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BaselineView.swift +117 -0
  269. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BottomTabDemo.swift +89 -0
  270. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ButtonDemo.swift +100 -0
  271. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CarouselDemo.swift +126 -0
  272. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CheckboxDemo.swift +63 -0
  273. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ChipDemo.swift +20 -0
  274. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/CollapseDemo.swift +93 -0
  275. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ContentView.swift +107 -0
  276. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DateTimePickerDemo.swift +124 -0
  277. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/DividerDemo.swift +14 -0
  278. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/HeaderUserDemo.swift +49 -0
  279. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/Home.swift +278 -0
  280. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/IconButtonDemo.swift +58 -0
  281. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ImageDemo.swift +78 -0
  282. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InformationDemo.swift +138 -0
  283. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputDemo.swift +111 -0
  284. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputDropDownDemo.swift +136 -0
  285. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputMoneyDemo.swift +107 -0
  286. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputOTPDemo.swift +73 -0
  287. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputPhoneNumberDemo.swift +100 -0
  288. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputSearchDemo.swift +32 -0
  289. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputTextAreaDemo.swift +57 -0
  290. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/LoaderDemo.swift +70 -0
  291. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/NavigationDemo.swift +227 -0
  292. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PaginationDemo.swift +72 -0
  293. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupDisplayDemo.swift +175 -0
  294. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupNotifyDemo.swift +121 -0
  295. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupPromotionDemo.swift +76 -0
  296. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ProgressInfoDemo.swift +89 -0
  297. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/RadioDemo.swift +32 -0
  298. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/RatingDemo.swift +56 -0
  299. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SkeletonDemo.swift +32 -0
  300. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SliderDemo.swift +150 -0
  301. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SnackBarDemo.swift +138 -0
  302. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/StepperDemo.swift +103 -0
  303. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/StepsDemo.swift +94 -0
  304. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SuggestActionDemo.swift +79 -0
  305. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SwipeDemo.swift +152 -0
  306. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/SwitchDemo.swift +33 -0
  307. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TabViewDemo.swift +190 -0
  308. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TagDemo.swift +34 -0
  309. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/ThemeDemo.swift +182 -0
  310. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TitleDemo.swift +109 -0
  311. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TooltipDemo.swift +187 -0
  312. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TypographyDemo.swift +87 -0
  313. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/UploaderDemo.swift +131 -0
  314. package/ios-demo/Sources/MoMoUIKitsDemo/SwiftUIDemoBrowserView.swift +51 -0
  315. package/ios-demo/Sources/MoMoUIKitsDemo/UIKitsDemoModels.swift +15 -0
  316. package/ios-demo/Sources/MoMoUIKitsDemo/UIKitsDemoRegistry.swift +73 -0
  317. package/local.properties +8 -0
  318. package/package.json +1 -1
  319. package/publish.sh +50 -0
  320. package/scripts/gen-ios-color.mjs +136 -0
  321. package/settings.gradle.kts +64 -0
  322. package/example/ios/Example.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  323. package/example/ios/Example.xcworkspace/xcuserdata/huynhdung.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  324. package/example/ios/Example.xcworkspace/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +0 -5
  325. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +0 -58
  326. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/Pods-Example.xcscheme +0 -58
  327. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SDWebImage.xcscheme +0 -58
  328. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +0 -58
  329. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/SkeletonUI.xcscheme +0 -58
  330. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/huynhdung.xcuserdatad/xcschemes/xcschememanagement.plist +0 -46
  331. package/ios/Application/FontScaleStore.swift +0 -59
@@ -0,0 +1,112 @@
1
+ import Foundation
2
+ import SwiftUI
3
+
4
+ // MARK: - IconSize
5
+
6
+ public enum IconSize {
7
+ case large
8
+ case small
9
+
10
+ /// Container width/height of the button.
11
+ var containerSize: CGFloat {
12
+ switch self {
13
+ case .large: return 48
14
+ case .small: return 40
15
+ }
16
+ }
17
+
18
+ /// Glyph size of the icon inside the button.
19
+ var iconSize: CGFloat {
20
+ switch self {
21
+ case .large: return 24
22
+ case .small: return 16
23
+ }
24
+ }
25
+
26
+ var radius: CGFloat {
27
+ Radius.XL
28
+ }
29
+ }
30
+
31
+ // MARK: - IconButton
32
+
33
+ public struct IconButton: View {
34
+ @Environment(\.appTheme) private var theme
35
+
36
+ var icon: String
37
+ var onClick: () -> Void
38
+ var type: ButtonType
39
+ var size: IconSize
40
+ var color: Color?
41
+
42
+ public init(
43
+ icon: String = "",
44
+ onClick: @escaping () -> Void,
45
+ type: ButtonType = .primary,
46
+ size: IconSize = .small,
47
+ color: Color? = nil
48
+ ) {
49
+ self.icon = icon
50
+ self.onClick = onClick
51
+ self.type = type
52
+ self.size = size
53
+ self.color = color
54
+ }
55
+
56
+ private var isEnabled: Bool {
57
+ type != .disabled
58
+ }
59
+
60
+ public var body: some View {
61
+ let bg = backgroundColor
62
+ let fg = contentColor
63
+ // OUTLINE allows an override color for its border, mirroring Compose `color ?? theme.colors.primary`.
64
+ let border: Color? = type == .outline ? (color ?? theme.colors.primary) : borderColor
65
+ let borderWidth = type.borderWidth
66
+
67
+ SwiftUI.Button(action: {
68
+ if isEnabled {
69
+ onClick()
70
+ }
71
+ }) {
72
+ Icon(source: icon, size: size.iconSize, color: fg)
73
+ .frame(width: size.containerSize, height: size.containerSize)
74
+ .background(bg)
75
+ .clipShape(RoundedRectangle(cornerRadius: size.radius))
76
+ .overlay(
77
+ RoundedRectangle(cornerRadius: size.radius)
78
+ .stroke(border ?? .clear, lineWidth: border != nil ? borderWidth : 0)
79
+ )
80
+ }
81
+ .buttonStyle(.plain)
82
+ .disabled(!isEnabled)
83
+ }
84
+
85
+ private var backgroundColor: Color {
86
+ switch type {
87
+ case .disabled: return theme.colors.background.disable
88
+ case .primary: return theme.colors.primary
89
+ case .secondary, .outline: return theme.colors.background.surface
90
+ case .tonal: return theme.colors.background.tonal
91
+ case .danger: return theme.colors.error.primary
92
+ case .text: return .clear
93
+ }
94
+ }
95
+
96
+ private var contentColor: Color {
97
+ switch type {
98
+ case .disabled: return theme.colors.text.disable
99
+ case .primary, .danger: return Colors.black01
100
+ case .secondary: return theme.colors.text.default
101
+ case .outline, .tonal, .text: return theme.colors.primary
102
+ }
103
+ }
104
+
105
+ private var borderColor: Color? {
106
+ switch type {
107
+ case .secondary: return theme.colors.border.default
108
+ case .outline: return color ?? theme.colors.primary
109
+ default: return nil
110
+ }
111
+ }
112
+ }
@@ -3,12 +3,14 @@ import SwiftUI
3
3
  import Combine
4
4
 
5
5
  public struct Input: View {
6
+ @Environment(\.appTheme) private var theme
6
7
  @Binding public var text: String
7
8
 
8
9
  public var placeholder: String
9
10
  public var floatingValue: String
11
+ public var floatingValueColor: Color?
10
12
  public var floatingIcon: String
11
- public var floatingIconColor: Color
13
+ public var floatingIconColor: Color?
12
14
  public var size: InputSize
13
15
  public var hintText: String
14
16
  public var error: String
@@ -17,9 +19,9 @@ public struct Input: View {
17
19
  public var readOnly: Bool
18
20
  public var secureTextEntry: Bool
19
21
  public var rightIcon: String
20
- public var rightIconColor: Color
22
+ public var rightIconColor: Color?
21
23
  public var leadingIcon: String
22
- public var leadingIconColor: Color
24
+ public var leadingIconColor: Color?
23
25
  public var loading: Bool
24
26
  public var required: Bool
25
27
  public var maxLength: Int?
@@ -38,8 +40,9 @@ public struct Input: View {
38
40
  text: Binding<String>,
39
41
  placeholder: String = "",
40
42
  floatingValue: String = "",
43
+ floatingValueColor: Color? = nil,
41
44
  floatingIcon: String = "",
42
- floatingIconColor: Color = Colors.primary,
45
+ floatingIconColor: Color? = nil,
43
46
  size: InputSize = .small,
44
47
  hintText: String = "",
45
48
  error: String = "",
@@ -48,9 +51,9 @@ public struct Input: View {
48
51
  readOnly: Bool = false,
49
52
  secureTextEntry: Bool = false,
50
53
  rightIcon: String = "",
51
- rightIconColor: Color = Colors.black17,
54
+ rightIconColor: Color? = nil,
52
55
  leadingIcon: String = "",
53
- leadingIconColor: Color = Colors.black12,
56
+ leadingIconColor: Color? = nil,
54
57
  loading: Bool = false,
55
58
  required: Bool = false,
56
59
  maxLength: Int? = nil,
@@ -65,6 +68,7 @@ public struct Input: View {
65
68
  self._text = text
66
69
  self.placeholder = placeholder
67
70
  self.floatingValue = floatingValue
71
+ self.floatingValueColor = floatingValueColor
68
72
  self.floatingIcon = floatingIcon
69
73
  self.floatingIconColor = floatingIconColor
70
74
  self.size = size
@@ -107,14 +111,14 @@ public struct Input: View {
107
111
  HStack(spacing: Spacing.XS) {
108
112
  MomoText(floatingValue, typography: .labelSMedium, color: getFloatingColor())
109
113
  if required {
110
- MomoText("*", typography: .labelSMedium, color: Colors.red03)
114
+ MomoText("*", typography: .labelSMedium, color: theme.colors.error.primary)
111
115
  }
112
116
  if !floatingIcon.isEmpty {
113
117
  Icon(source: floatingIcon, size: 16, color: getFloatingIconColor())
114
118
  }
115
119
  }
116
120
  .padding(.horizontal, Spacing.S)
117
- .background(Colors.black01)
121
+ .background(theme.colors.background.surface)
118
122
  .offset(x: Spacing.S, y: -8)
119
123
  .zIndex(10)
120
124
  }
@@ -123,7 +127,7 @@ public struct Input: View {
123
127
  HStack(alignment: .center, spacing: 0) {
124
128
  // Leading icon
125
129
  if !leadingIcon.isEmpty {
126
- Icon(source: leadingIcon, size: size == .small ? 24 : 32, color: leadingIconColor)
130
+ Icon(source: leadingIcon, size: size == .small ? 24 : 32, color: getLeadingIconColor())
127
131
  .padding(.trailing, Spacing.M)
128
132
  }
129
133
 
@@ -144,6 +148,7 @@ public struct Input: View {
144
148
  fontSize: scaleSize(14),
145
149
  fontWeight: fontWeight == .bold ? .bold : .regular,
146
150
  textColor: UIColor(getTextColor()),
151
+ cursorColor: UIColor(theme.colors.primary),
147
152
  isDisabled: disabled || readOnly,
148
153
  maxLength: maxLength,
149
154
  onFocusChange: { focused in
@@ -160,7 +165,7 @@ public struct Input: View {
160
165
  .ignoreBoldTextSetting()
161
166
  .foregroundColor(getTextColor())
162
167
  .disabled(disabled || readOnly)
163
- .applyPrimaryCursorColor()
168
+ .applyCursorColor(theme.colors.primary)
164
169
  .onChange(of: text) { newValue in
165
170
  let limited = limitText(newValue)
166
171
  if limited != newValue {
@@ -176,7 +181,7 @@ public struct Input: View {
176
181
  text = ""
177
182
  onChangeText?("")
178
183
  }) {
179
- Icon(source: "24_navigation_close_circle_full", size: 16, color: Colors.black12)
184
+ Icon(source: "24_navigation_close_circle_full", size: 16, color: theme.colors.text.hint)
180
185
  .padding(.leading, Spacing.S).accessibility(identifier: "ic_clear")
181
186
  }
182
187
  }
@@ -195,14 +200,14 @@ public struct Input: View {
195
200
  Icon(
196
201
  source: isPasswordHidden ? "24_security_eye_off" : "24_security_eye_open",
197
202
  size: 24,
198
- color: rightIconColor
203
+ color: getRightIconColor()
199
204
  )
200
205
  .padding(.leading, Spacing.S).accessibility(identifier: "ic_show_hide")
201
206
  }
202
207
  }
203
208
  } else if !rightIcon.isEmpty {
204
209
  SwiftUI.Button(action: { onRightIconPressed?() }) {
205
- Icon(source: rightIcon, size: 24, color: rightIconColor)
210
+ Icon(source: rightIcon, size: 24, color: getRightIconColor())
206
211
  .padding(.leading, Spacing.S)
207
212
  }
208
213
  }
@@ -211,7 +216,7 @@ public struct Input: View {
211
216
  .frame(height: scaleSize(size == .small ? 48 : 56, 1.1))
212
217
  .background(
213
218
  RoundedRectangle(cornerRadius: Radius.S)
214
- .fill(Colors.black01)
219
+ .fill(theme.colors.background.surface)
215
220
  )
216
221
  .overlay(
217
222
  RoundedRectangle(cornerRadius: Radius.S)
@@ -260,31 +265,39 @@ public struct Input: View {
260
265
 
261
266
  private func borderColor() -> Color {
262
267
  if disabled {
263
- return Colors.black04 // border.disable
268
+ return theme.colors.border.disable
264
269
  }
265
270
  if !error.isEmpty {
266
- return Colors.red03 // error.primary
271
+ return theme.colors.error.primary
267
272
  }
268
273
  if isFocused {
269
- return Colors.primary
274
+ return theme.colors.primary
270
275
  }
271
- return Colors.black04 // border.default
276
+ return theme.colors.border.default
272
277
  }
273
278
 
274
279
  private func getTextColor() -> Color {
275
- return disabled ? Colors.black09 : Colors.black17
280
+ return disabled ? theme.colors.text.disable : theme.colors.text.default
276
281
  }
277
282
 
278
283
  private func getPlaceholderColor() -> Color {
279
- return disabled ? Colors.black09 : Colors.black12
284
+ return disabled ? theme.colors.text.disable : theme.colors.text.hint
280
285
  }
281
286
 
282
287
  private func getFloatingColor() -> Color {
283
- return disabled ? Colors.black09 : Colors.black12
288
+ return disabled ? theme.colors.text.disable : (floatingValueColor ?? theme.colors.text.hint)
284
289
  }
285
290
 
286
291
  private func getFloatingIconColor() -> Color {
287
- return disabled ? Colors.black09 : floatingIconColor
292
+ return disabled ? theme.colors.text.disable : (floatingIconColor ?? theme.colors.text.default)
293
+ }
294
+
295
+ private func getLeadingIconColor() -> Color {
296
+ return disabled ? theme.colors.text.disable : (leadingIconColor ?? theme.colors.text.hint)
297
+ }
298
+
299
+ private func getRightIconColor() -> Color {
300
+ return disabled ? theme.colors.text.disable : (rightIconColor ?? theme.colors.text.default)
288
301
  }
289
302
  }
290
303
 
@@ -296,6 +309,7 @@ private struct SecureInputField: UIViewRepresentable {
296
309
  var fontSize: CGFloat
297
310
  var fontWeight: UIFont.Weight
298
311
  var textColor: UIColor
312
+ var cursorColor: UIColor
299
313
  var isDisabled: Bool
300
314
  var maxLength: Int?
301
315
  var onFocusChange: (Bool) -> Void
@@ -316,7 +330,7 @@ private struct SecureInputField: UIViewRepresentable {
316
330
  textField.setContentHuggingPriority(.defaultLow, for: .horizontal)
317
331
  textField.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
318
332
  textField.text = text
319
- textField.tintColor = UIColor(Colors.primary)
333
+ textField.tintColor = cursorColor
320
334
  textField.addTarget(
321
335
  context.coordinator,
322
336
  action: #selector(Coordinator.textFieldDidChange(_:)),
@@ -331,6 +345,8 @@ private struct SecureInputField: UIViewRepresentable {
331
345
  textField.text = text
332
346
  }
333
347
  textField.isEnabled = !isDisabled
348
+ textField.textColor = textColor
349
+ textField.tintColor = cursorColor
334
350
  if textField.keyboardType != keyboardType {
335
351
  textField.keyboardType = keyboardType
336
352
  textField.reloadInputViews()
@@ -401,9 +417,9 @@ private struct SecureInputField: UIViewRepresentable {
401
417
 
402
418
  // MARK: - Helper Extension
403
419
  private extension View {
404
- func applyPrimaryCursorColor() -> some View {
420
+ func applyCursorColor(_ color: Color) -> some View {
405
421
  if #available(iOS 15.0, *) {
406
- return self.tint(Colors.primary)
422
+ return self.tint(color)
407
423
  } else {
408
424
  return self
409
425
  }
@@ -7,15 +7,17 @@
7
7
 
8
8
  import SwiftUI
9
9
  public struct InputPhoneNumber: View {
10
+ @Environment(\.appTheme) private var theme
10
11
  @Binding public var text: String
11
12
 
12
13
  public var placeholder: String
13
14
  public var size: InputSize
14
15
  public var hintText: String
15
16
  public var error: String
17
+ public var errorSpacing: Bool
16
18
  public var loading: Bool
17
19
  public var rightIcon: String
18
- public var rightIconColor: Color
20
+ public var rightIconColor: Color?
19
21
  public var autofocus: Bool
20
22
  public var onChangeText: ((String) -> Void)?
21
23
  public var onFocus: (() -> Void)?
@@ -31,10 +33,11 @@ public struct InputPhoneNumber: View {
31
33
  size: InputSize = .small,
32
34
  hintText: String = "",
33
35
  error: String = "",
36
+ errorSpacing: Bool = false,
34
37
  loading: Bool = false,
35
38
  required: Bool = false,
36
39
  rightIcon: String = "",
37
- rightIconColor: Color = Colors.black12,
40
+ rightIconColor: Color? = nil,
38
41
  autofocus: Bool = false,
39
42
  onChangeText: ((String) -> Void)? = nil,
40
43
  onFocus: (() -> Void)? = nil,
@@ -47,6 +50,7 @@ public struct InputPhoneNumber: View {
47
50
  self.size = size
48
51
  self.hintText = hintText
49
52
  self.error = error
53
+ self.errorSpacing = errorSpacing
50
54
  self.loading = loading
51
55
  self.rightIcon = rightIcon
52
56
  self.rightIconColor = rightIconColor
@@ -76,17 +80,17 @@ public struct InputPhoneNumber: View {
76
80
  .padding(.trailing, Spacing.XS)
77
81
 
78
82
  MomoText("+84", typography: size == .small ? .headerSSemibold : .headerMBold)
79
- .foregroundColor(Colors.black17)
83
+ .foregroundColor(theme.colors.text.default)
80
84
 
81
85
  Rectangle()
82
- .fill(Colors.black04)
86
+ .fill(theme.colors.border.default)
83
87
  .frame(width: 1, height: size == .small ? 24 : 32)
84
88
  .padding(.horizontal, Spacing.M)
85
89
 
86
90
  // Text input
87
91
  ZStack(alignment: .leading) {
88
92
  if text.isEmpty {
89
- MomoText(placeholder, typography: size == .small ? .headerSSemibold : .headerMBold, color: Colors.black12)
93
+ MomoText(placeholder, typography: size == .small ? .headerSSemibold : .headerMBold, color: theme.colors.text.hint)
90
94
  }
91
95
 
92
96
  TextField("", text: textBinding, onEditingChanged: { focused in
@@ -95,8 +99,8 @@ public struct InputPhoneNumber: View {
95
99
  .keyboardType(.numberPad)
96
100
  .font(size == .small ? .header_s_semibold : .header_m_bold)
97
101
  .ignoreBoldTextSetting()
98
- .foregroundColor(Colors.black17)
99
- .applyPrimaryCursorColor()
102
+ .foregroundColor(theme.colors.text.default)
103
+ .applyCursorColor(theme.colors.primary)
100
104
  .lineLimit(1)
101
105
  .accessibility(identifier: accessibilityLabel ?? "")
102
106
  .accessibilityValue(textBinding.wrappedValue.isEmpty ? placeholder : textBinding.wrappedValue)
@@ -108,7 +112,7 @@ public struct InputPhoneNumber: View {
108
112
  text = ""
109
113
  onChangeText?("")
110
114
  }) {
111
- Icon(source: "24_navigation_close_circle_full", size: 16, color: Colors.black12)
115
+ Icon(source: "24_navigation_close_circle_full", size: 16, color: theme.colors.text.hint)
112
116
  .padding(.leading, Spacing.S).accessibility(identifier: "ic_clear")
113
117
  }
114
118
  }
@@ -122,7 +126,7 @@ public struct InputPhoneNumber: View {
122
126
  // ✅ Right icon
123
127
  if !rightIcon.isEmpty {
124
128
  SwiftUI.Button(action: { onRightIconPressed?() }) {
125
- Icon(source: rightIcon, size: 24, color: rightIconColor)
129
+ Icon(source: rightIcon, size: 24, color: rightIconColor ?? theme.colors.text.default)
126
130
  .padding(.leading, Spacing.S)
127
131
  }
128
132
  }
@@ -131,7 +135,7 @@ public struct InputPhoneNumber: View {
131
135
  .frame(height: scaleSize(size == .small ? 48 : 56, 1.1))
132
136
  .background(
133
137
  RoundedRectangle(cornerRadius: Radius.S)
134
- .fill(Colors.black01)
138
+ .fill(theme.colors.background.surface)
135
139
  )
136
140
  .overlay(
137
141
  RoundedRectangle(cornerRadius: Radius.S)
@@ -141,7 +145,7 @@ public struct InputPhoneNumber: View {
141
145
  // Error or hint
142
146
  ErrorView(
143
147
  errorMessage: error,
144
- errorSpacing: false,
148
+ errorSpacing: errorSpacing,
145
149
  hintText: hintText
146
150
  )
147
151
  }
@@ -159,21 +163,18 @@ public struct InputPhoneNumber: View {
159
163
  }
160
164
 
161
165
  private func borderColor() -> Color {
162
- if !error.isEmpty { return Colors.red03 }
163
- if isFocused { return Colors.primary }
164
- return Colors.black04
166
+ if !error.isEmpty { return theme.colors.error.primary }
167
+ if isFocused { return theme.colors.primary }
168
+ return theme.colors.border.default
165
169
  }
166
170
  }
167
171
 
168
172
  private extension View {
169
- func applyPrimaryCursorColor() -> some View {
173
+ func applyCursorColor(_ color: Color) -> some View {
170
174
  if #available(iOS 15.0, *) {
171
- // Modern SwiftUI: use .tint() for cursor
172
- return self.tint(Colors.primary)
175
+ return self.tint(color)
173
176
  } else {
174
- // iOS 13–14: return unchanged (no tint support)
175
177
  return self
176
178
  }
177
179
  }
178
180
  }
179
-