@momo-kits/native-kits 0.162.2-sp.1 → 0.162.2-sp.10-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 (239) hide show
  1. package/.claude/settings.local.json +15 -1
  2. package/CLAUDE.md +78 -0
  3. package/build.gradle.kts +11 -0
  4. package/compose/build.gradle.kts +190 -0
  5. package/compose/build.gradle.kts.backup +190 -0
  6. package/compose/compose.podspec +47 -0
  7. package/compose/src/androidMain/kotlin/vn/momo/kits/navigation/ScrollToTop.android.kt +6 -0
  8. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/OsFontScale.android.kt +7 -0
  9. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +123 -0
  10. package/compose/src/commonMain/composeResources/font/momosignature.otf +0 -0
  11. package/compose/src/commonMain/composeResources/font/momotrustdisplay.otf +0 -0
  12. package/compose/src/commonMain/composeResources/font/sfprotext_black.otf +0 -0
  13. package/compose/src/commonMain/composeResources/font/sfprotext_black.ttf +0 -0
  14. package/compose/src/commonMain/composeResources/font/sfprotext_bold.ttf +0 -0
  15. package/compose/src/commonMain/composeResources/font/sfprotext_heavy.ttf +0 -0
  16. package/compose/src/commonMain/composeResources/font/sfprotext_light.ttf +0 -0
  17. package/compose/src/commonMain/composeResources/font/sfprotext_medium.ttf +0 -0
  18. package/compose/src/commonMain/composeResources/font/sfprotext_regular.ttf +0 -0
  19. package/compose/src/commonMain/composeResources/font/sfprotext_semibold.ttf +0 -0
  20. package/compose/src/commonMain/composeResources/font/sfprotext_thin.otf +0 -0
  21. package/compose/src/commonMain/composeResources/font/sfprotext_thin.ttf +0 -0
  22. package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.otf +0 -0
  23. package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.ttf +0 -0
  24. package/compose/src/commonMain/kotlin/vn/momo/kits/application/AnimationSearchInput.kt +52 -0
  25. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +106 -0
  26. package/compose/src/commonMain/kotlin/vn/momo/kits/application/FloatingButton.kt +183 -0
  27. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Header.kt +207 -0
  28. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderAnimated.kt +39 -0
  29. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderBackground.kt +86 -0
  30. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderDefault.kt +76 -0
  31. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderExtended.kt +76 -0
  32. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderRight.kt +294 -0
  33. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderTitle.kt +33 -0
  34. package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +826 -0
  35. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Localize.kt +269 -0
  36. package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +110 -0
  37. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +378 -0
  38. package/compose/src/commonMain/kotlin/vn/momo/kits/application/WidgetContainer.kt +56 -0
  39. package/compose/src/commonMain/kotlin/vn/momo/kits/application/useHeaderSearchAnimation.kt +69 -0
  40. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Avatar.kt +157 -0
  41. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +82 -0
  42. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +32 -0
  43. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +338 -0
  44. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +175 -0
  45. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +356 -0
  46. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Carousel.kt +113 -0
  47. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +89 -0
  48. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +128 -0
  49. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Collapse.kt +209 -0
  50. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +543 -0
  51. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +23 -0
  52. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +76 -0
  53. package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +125 -0
  54. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +231 -0
  55. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +112 -0
  56. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +477 -0
  57. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +114 -0
  58. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +214 -0
  59. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +240 -0
  60. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +216 -0
  61. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +259 -0
  62. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +182 -0
  63. package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +343 -0
  64. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Loader.kt +108 -0
  65. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +56 -0
  66. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationNumber.kt +41 -0
  67. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +84 -0
  68. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +40 -0
  69. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +328 -0
  70. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +97 -0
  71. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ProgressInfo.kt +310 -0
  72. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +59 -0
  73. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Rating.kt +87 -0
  74. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +21 -0
  75. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +90 -0
  76. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Slider.kt +323 -0
  77. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Stepper.kt +217 -0
  78. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Steps.kt +473 -0
  79. package/compose/src/commonMain/kotlin/vn/momo/kits/components/SuggestAction.kt +122 -0
  80. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Swipe.kt +199 -0
  81. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +91 -0
  82. package/compose/src/commonMain/kotlin/vn/momo/kits/components/TabView.kt +470 -0
  83. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +88 -0
  84. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +131 -0
  85. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +203 -0
  86. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +498 -0
  87. package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +175 -0
  88. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Uploader.kt +182 -0
  89. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +193 -0
  90. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +29 -0
  91. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +234 -0
  92. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +188 -0
  93. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +306 -0
  94. package/compose/src/commonMain/kotlin/vn/momo/kits/const/KitFontScale.kt +22 -0
  95. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +12 -0
  96. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +16 -0
  97. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +188 -0
  98. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +276 -0
  99. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +2 -0
  100. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +35 -0
  101. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +2 -0
  102. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +52 -0
  103. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +66 -0
  104. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Conditional.kt +11 -0
  105. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +104 -0
  106. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +48 -0
  107. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Size.kt +51 -0
  108. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +253 -0
  109. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +129 -0
  110. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +100 -0
  111. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +172 -0
  112. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +360 -0
  113. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ScrollToTop.kt +8 -0
  114. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +581 -0
  115. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +156 -0
  116. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +225 -0
  117. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +86 -0
  118. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +169 -0
  119. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +320 -0
  120. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +81 -0
  121. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +309 -0
  122. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +34 -0
  123. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +360 -0
  124. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +132 -0
  125. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/tracking/ScreenTracker.kt +128 -0
  126. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ComposeLottieAnimation.kt +70 -0
  127. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/OsFontScale.kt +9 -0
  128. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +58 -0
  129. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +1329 -0
  130. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +55 -0
  131. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Tracking.kt +15 -0
  132. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +105 -0
  133. package/compose/src/iosMain/kotlin/vn/momo/kits/navigation/ScrollToTop.ios.kt +32 -0
  134. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/OsFontScale.ios.kt +66 -0
  135. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +184 -0
  136. package/gradle/libs.versions.toml +69 -0
  137. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  138. package/gradle/wrapper/gradle-wrapper.properties +8 -0
  139. package/gradle.properties +26 -0
  140. package/gradlew +252 -0
  141. package/gradlew.bat +94 -0
  142. package/ios/Application/ApplicationEnvironment.swift +15 -2
  143. package/ios/Application/Components.swift +16 -0
  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 +3 -1
  148. package/ios/Application/Navigation/NavigationContainer.swift +53 -4
  149. package/ios/Application/Navigation/Navigator.swift +54 -29
  150. package/ios/Application/Navigation/Overplay/BottomSheet.swift +98 -18
  151. package/ios/Application/Navigation/Overplay/ModalScreen.swift +6 -0
  152. package/ios/Application/Navigation/Tracking/ScreenTracker.swift +117 -0
  153. package/ios/Application/Screen.swift +2 -1
  154. package/ios/Application/StackScreen.swift +55 -3
  155. package/ios/Badge/BadgeRibbon.swift +80 -0
  156. package/ios/Button/Button.swift +67 -11
  157. package/ios/Carousel/Carousel.swift +16 -1
  158. package/ios/Checkbox/Checkbox.swift +14 -20
  159. package/ios/Chip/Chip.swift +35 -26
  160. package/ios/Collapse/Collapse.swift +11 -1
  161. package/ios/Colors+Radius+Spacing/Colors.swift +20 -17
  162. package/ios/Colors+Radius+Spacing/Spacing.swift +3 -1
  163. package/ios/Colors+Radius+Spacing/Theme.swift +15 -15
  164. package/ios/DateTimePicker/DateTimePicker.swift +4 -2
  165. package/ios/DateTimePicker/WheelPicker.swift +7 -3
  166. package/ios/Extensions/ActiveOpacityButtonStyle.swift +14 -0
  167. package/ios/Extensions/Color++.swift +32 -0
  168. package/ios/Icon/Icon.swift +5 -1
  169. package/ios/IconButton/IconButton.swift +35 -7
  170. package/ios/Image/Image.swift +16 -3
  171. package/ios/Information/Information.swift +3 -1
  172. package/ios/Input/ErrorView.swift +3 -1
  173. package/ios/Input/Input.swift +31 -8
  174. package/ios/Input/InputPhoneNumber.swift +14 -3
  175. package/ios/Input/InputSearch.swift +7 -1
  176. package/ios/Input/InputTextArea.swift +78 -34
  177. package/ios/InputDropDown/InputDropDown.swift +4 -1
  178. package/ios/InputMoney/InputMoney.swift +16 -4
  179. package/ios/Popup/PopupDisplay.swift +3 -4
  180. package/ios/Popup/PopupNotify.swift +3 -4
  181. package/ios/ProgressInfo/ProgressInfo.swift +4 -2
  182. package/ios/Radio/Radio.swift +12 -13
  183. package/ios/Rating/Rating.swift +1 -1
  184. package/ios/Resources/MoMoUIKitsColors.xcassets/AccentColor.colorset/Contents.json +11 -0
  185. package/ios/Resources/MoMoUIKitsColors.xcassets/Background.colorset/Contents.json +38 -0
  186. package/ios/Resources/MoMoUIKitsColors.xcassets/Border.colorset/Contents.json +38 -0
  187. package/ios/Resources/MoMoUIKitsColors.xcassets/Card.colorset/Contents.json +38 -0
  188. package/ios/Resources/MoMoUIKitsColors.xcassets/Contents.json +6 -0
  189. package/ios/Resources/MoMoUIKitsColors.xcassets/Error.colorset/Contents.json +38 -0
  190. package/ios/Resources/MoMoUIKitsColors.xcassets/Primary.colorset/Contents.json +38 -0
  191. package/ios/Resources/MoMoUIKitsColors.xcassets/PrimaryDark.colorset/Contents.json +38 -0
  192. package/ios/Resources/MoMoUIKitsColors.xcassets/PrimaryLight.colorset/Contents.json +38 -0
  193. package/ios/Resources/MoMoUIKitsColors.xcassets/Secondary.colorset/Contents.json +38 -0
  194. package/ios/Resources/MoMoUIKitsColors.xcassets/Success.colorset/Contents.json +38 -0
  195. package/ios/Resources/MoMoUIKitsColors.xcassets/Text.colorset/Contents.json +38 -0
  196. package/ios/Resources/MoMoUIKitsColors.xcassets/TextSecondary.colorset/Contents.json +38 -0
  197. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/Contents.json +9 -0
  198. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-default.colorset/Contents.json +38 -0
  199. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-disable.colorset/Contents.json +38 -0
  200. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-pressed.colorset/Contents.json +38 -0
  201. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-selected.colorset/Contents.json +38 -0
  202. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-surface.colorset/Contents.json +38 -0
  203. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/background-tonal.colorset/Contents.json +38 -0
  204. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/border-default.colorset/Contents.json +38 -0
  205. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/border-disable.colorset/Contents.json +38 -0
  206. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/gradient.colorset/Contents.json +38 -0
  207. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/primary.colorset/Contents.json +38 -0
  208. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/secondary.colorset/Contents.json +38 -0
  209. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-container.colorset/Contents.json +38 -0
  210. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-primary.colorset/Contents.json +38 -0
  211. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/success-secondary.colorset/Contents.json +38 -0
  212. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-default.colorset/Contents.json +38 -0
  213. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-disable.colorset/Contents.json +38 -0
  214. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-hint.colorset/Contents.json +38 -0
  215. package/ios/Resources/MoMoUIKitsColors.xcassets/ThemeColors/text-secondary.colorset/Contents.json +38 -0
  216. package/ios/Resources/MoMoUIKitsColors.xcassets/Warning.colorset/Contents.json +38 -0
  217. package/ios/Stepper/Stepper.swift +2 -2
  218. package/ios/Steps/Steps.swift +22 -6
  219. package/ios/SuggestAction/SuggestAction.swift +5 -3
  220. package/ios/Swipeable/SwipeCell.swift +5 -3
  221. package/ios/Switch/Switch.swift +53 -28
  222. package/ios/TabView/TabView.swift +18 -14
  223. package/ios/Template/TrustBanner/TrustBanner.swift +6 -7
  224. package/ios/Tooltip/Tooltip.swift +3 -0
  225. package/ios/Typography/FontScaleStore.swift +19 -0
  226. package/ios/Typography/Text.swift +3 -0
  227. package/ios/Typography/Typography.swift +8 -5
  228. package/ios/Uploader/Uploader.swift +0 -9
  229. package/ios/native-kits.podspec +6 -3
  230. package/ios-demo/MoMoUIKitsDemo.podspec +5 -3
  231. package/ios-demo/README.md +120 -0
  232. package/ios-demo/Sources/MoMoUIKitsDemo/MoMoUIKitsDemoFactory.swift +9 -57
  233. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/Home.swift +21 -3
  234. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/LocalizeDemo.swift +188 -0
  235. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/NavigationDemo.swift +2 -0
  236. package/ios-demo/Sources/MoMoUIKitsDemo/SwiftUIDemoBrowserView.swift +5 -4
  237. package/local.properties +8 -0
  238. package/package.json +1 -1
  239. package/settings.gradle.kts +64 -0
@@ -0,0 +1,38 @@
1
+ {
2
+ "colors": [
3
+ {
4
+ "color": {
5
+ "color-space": "srgb",
6
+ "components": {
7
+ "red": "0xF7",
8
+ "green": "0xAC",
9
+ "blue": "0xD5",
10
+ "alpha": "1.000"
11
+ }
12
+ },
13
+ "idiom": "universal"
14
+ },
15
+ {
16
+ "color": {
17
+ "color-space": "srgb",
18
+ "components": {
19
+ "red": "0xFB",
20
+ "green": "0xD5",
21
+ "blue": "0xEA",
22
+ "alpha": "1.000"
23
+ }
24
+ },
25
+ "idiom": "universal",
26
+ "appearances": [
27
+ {
28
+ "appearance": "luminosity",
29
+ "value": "dark"
30
+ }
31
+ ]
32
+ }
33
+ ],
34
+ "info": {
35
+ "author": "xcode",
36
+ "version": 1
37
+ }
38
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "colors": [
3
+ {
4
+ "color": {
5
+ "color-space": "srgb",
6
+ "components": {
7
+ "red": "0xD6",
8
+ "green": "0xF4",
9
+ "blue": "0xDE",
10
+ "alpha": "1.000"
11
+ }
12
+ },
13
+ "idiom": "universal"
14
+ },
15
+ {
16
+ "color": {
17
+ "color-space": "srgb",
18
+ "components": {
19
+ "red": "0xD6",
20
+ "green": "0xF4",
21
+ "blue": "0xDE",
22
+ "alpha": "1.000"
23
+ }
24
+ },
25
+ "idiom": "universal",
26
+ "appearances": [
27
+ {
28
+ "appearance": "luminosity",
29
+ "value": "dark"
30
+ }
31
+ ]
32
+ }
33
+ ],
34
+ "info": {
35
+ "author": "xcode",
36
+ "version": 1
37
+ }
38
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "colors": [
3
+ {
4
+ "color": {
5
+ "color-space": "srgb",
6
+ "components": {
7
+ "red": "0x34",
8
+ "green": "0xC7",
9
+ "blue": "0x59",
10
+ "alpha": "1.000"
11
+ }
12
+ },
13
+ "idiom": "universal"
14
+ },
15
+ {
16
+ "color": {
17
+ "color-space": "srgb",
18
+ "components": {
19
+ "red": "0x34",
20
+ "green": "0xC7",
21
+ "blue": "0x59",
22
+ "alpha": "1.000"
23
+ }
24
+ },
25
+ "idiom": "universal",
26
+ "appearances": [
27
+ {
28
+ "appearance": "luminosity",
29
+ "value": "dark"
30
+ }
31
+ ]
32
+ }
33
+ ],
34
+ "info": {
35
+ "author": "xcode",
36
+ "version": 1
37
+ }
38
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "colors": [
3
+ {
4
+ "color": {
5
+ "color-space": "srgb",
6
+ "components": {
7
+ "red": "0xAE",
8
+ "green": "0xE9",
9
+ "blue": "0xBD",
10
+ "alpha": "1.000"
11
+ }
12
+ },
13
+ "idiom": "universal"
14
+ },
15
+ {
16
+ "color": {
17
+ "color-space": "srgb",
18
+ "components": {
19
+ "red": "0xAE",
20
+ "green": "0xE9",
21
+ "blue": "0xBD",
22
+ "alpha": "1.000"
23
+ }
24
+ },
25
+ "idiom": "universal",
26
+ "appearances": [
27
+ {
28
+ "appearance": "luminosity",
29
+ "value": "dark"
30
+ }
31
+ ]
32
+ }
33
+ ],
34
+ "info": {
35
+ "author": "xcode",
36
+ "version": 1
37
+ }
38
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "colors": [
3
+ {
4
+ "color": {
5
+ "color-space": "srgb",
6
+ "components": {
7
+ "red": "0x30",
8
+ "green": "0x32",
9
+ "blue": "0x33",
10
+ "alpha": "1.000"
11
+ }
12
+ },
13
+ "idiom": "universal"
14
+ },
15
+ {
16
+ "color": {
17
+ "color-space": "srgb",
18
+ "components": {
19
+ "red": "0xFF",
20
+ "green": "0xFF",
21
+ "blue": "0xFF",
22
+ "alpha": "1.000"
23
+ }
24
+ },
25
+ "idiom": "universal",
26
+ "appearances": [
27
+ {
28
+ "appearance": "luminosity",
29
+ "value": "dark"
30
+ }
31
+ ]
32
+ }
33
+ ],
34
+ "info": {
35
+ "author": "xcode",
36
+ "version": 1
37
+ }
38
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "colors": [
3
+ {
4
+ "color": {
5
+ "color-space": "srgb",
6
+ "components": {
7
+ "red": "0xC6",
8
+ "green": "0xC6",
9
+ "blue": "0xC6",
10
+ "alpha": "1.000"
11
+ }
12
+ },
13
+ "idiom": "universal"
14
+ },
15
+ {
16
+ "color": {
17
+ "color-space": "srgb",
18
+ "components": {
19
+ "red": "0x50",
20
+ "green": "0x50",
21
+ "blue": "0x50",
22
+ "alpha": "1.000"
23
+ }
24
+ },
25
+ "idiom": "universal",
26
+ "appearances": [
27
+ {
28
+ "appearance": "luminosity",
29
+ "value": "dark"
30
+ }
31
+ ]
32
+ }
33
+ ],
34
+ "info": {
35
+ "author": "xcode",
36
+ "version": 1
37
+ }
38
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "colors": [
3
+ {
4
+ "color": {
5
+ "color-space": "srgb",
6
+ "components": {
7
+ "red": "0x72",
8
+ "green": "0x72",
9
+ "blue": "0x72",
10
+ "alpha": "1.000"
11
+ }
12
+ },
13
+ "idiom": "universal"
14
+ },
15
+ {
16
+ "color": {
17
+ "color-space": "srgb",
18
+ "components": {
19
+ "red": "0x72",
20
+ "green": "0x72",
21
+ "blue": "0x72",
22
+ "alpha": "1.000"
23
+ }
24
+ },
25
+ "idiom": "universal",
26
+ "appearances": [
27
+ {
28
+ "appearance": "luminosity",
29
+ "value": "dark"
30
+ }
31
+ ]
32
+ }
33
+ ],
34
+ "info": {
35
+ "author": "xcode",
36
+ "version": 1
37
+ }
38
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "colors": [
3
+ {
4
+ "color": {
5
+ "color-space": "srgb",
6
+ "components": {
7
+ "red": "0x48",
8
+ "green": "0x48",
9
+ "blue": "0x48",
10
+ "alpha": "1.000"
11
+ }
12
+ },
13
+ "idiom": "universal"
14
+ },
15
+ {
16
+ "color": {
17
+ "color-space": "srgb",
18
+ "components": {
19
+ "red": "0xB0",
20
+ "green": "0xB0",
21
+ "blue": "0xB0",
22
+ "alpha": "1.000"
23
+ }
24
+ },
25
+ "idiom": "universal",
26
+ "appearances": [
27
+ {
28
+ "appearance": "luminosity",
29
+ "value": "dark"
30
+ }
31
+ ]
32
+ }
33
+ ],
34
+ "info": {
35
+ "author": "xcode",
36
+ "version": 1
37
+ }
38
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "colors" : [
3
+ {
4
+ "color" : {
5
+ "color-space" : "srgb",
6
+ "components" : {
7
+ "alpha" : "1.000",
8
+ "blue" : "0.086",
9
+ "green" : "0.549",
10
+ "red" : "0.980"
11
+ }
12
+ },
13
+ "idiom" : "universal"
14
+ },
15
+ {
16
+ "appearances" : [
17
+ {
18
+ "appearance" : "luminosity",
19
+ "value" : "dark"
20
+ }
21
+ ],
22
+ "color" : {
23
+ "color-space" : "srgb",
24
+ "components" : {
25
+ "alpha" : "1.000",
26
+ "blue" : "0.086",
27
+ "green" : "0.549",
28
+ "red" : "0.980"
29
+ }
30
+ },
31
+ "idiom" : "universal"
32
+ }
33
+ ],
34
+ "info" : {
35
+ "author" : "xcode",
36
+ "version" : 1
37
+ }
38
+ }
@@ -70,14 +70,14 @@ private struct StepperButton: View {
70
70
  let iconColor: Color = disabled ? theme.colors.text.disable : theme.colors.primary
71
71
  let iconName = sign == "-" ? "24_navigation_minus_circle" : "24_navigation_plus_circle"
72
72
 
73
- SwiftUI.Button(action: { if !disabled { onPress() } }) {
73
+ SwiftUI.Button(action: onPress) {
74
74
  ZStack {
75
75
  Circle().fill(theme.colors.background.disable)
76
76
  Icon(source: iconName, size: specs.iconSize, color: iconColor)
77
77
  }
78
78
  .frame(width: specs.buttonSize, height: specs.buttonSize)
79
79
  }
80
- .buttonStyle(.plain)
80
+ .buttonStyle(ActiveOpacityButtonStyle())
81
81
  .disabled(disabled)
82
82
  }
83
83
  }
@@ -201,7 +201,7 @@ private struct StepsHorizontal: View {
201
201
 
202
202
  let clickable = status == .completed && onPress != nil && !disabled
203
203
 
204
- VStack(alignment: colAlignment, spacing: 0) {
204
+ let columnBody = VStack(alignment: colAlignment, spacing: 0) {
205
205
  if let time = item.time, !time.isEmpty {
206
206
  MomoText(time, typography: .descriptionXsRegular, color: subColor)
207
207
  .multilineTextAlignment(textAlignment)
@@ -250,8 +250,16 @@ private struct StepsHorizontal: View {
250
250
  }
251
251
  }
252
252
  .contentShape(Rectangle())
253
- .onTapGesture {
254
- if clickable { onPress?(item, index) }
253
+
254
+ if clickable {
255
+ // Mirrors Compose's `activeOpacityClickable` press feedback; non-clickable
256
+ // steps render with no press interaction at all.
257
+ SwiftUI.Button(action: { onPress?(item, index) }) {
258
+ columnBody
259
+ }
260
+ .buttonStyle(ActiveOpacityButtonStyle())
261
+ } else {
262
+ columnBody
255
263
  }
256
264
  }
257
265
 
@@ -338,7 +346,7 @@ private struct StepsVertical: View {
338
346
 
339
347
  let clickable = status == .completed && onPress != nil && !disabled
340
348
 
341
- HStack(alignment: .top, spacing: 0) {
349
+ let rowBody = HStack(alignment: .top, spacing: 0) {
342
350
  VStack(spacing: 0) {
343
351
  StepBubble(
344
352
  index: index,
@@ -380,8 +388,16 @@ private struct StepsVertical: View {
380
388
  }
381
389
  .frame(maxWidth: .infinity)
382
390
  .contentShape(Rectangle())
383
- .onTapGesture {
384
- if clickable { onPress?(item, index) }
391
+
392
+ if clickable {
393
+ // Mirrors Compose's `activeOpacityClickable` press feedback; non-clickable
394
+ // steps render with no press interaction at all.
395
+ SwiftUI.Button(action: { onPress?(item, index) }) {
396
+ rowBody
397
+ }
398
+ .buttonStyle(ActiveOpacityButtonStyle())
399
+ } else {
400
+ rowBody
385
401
  }
386
402
  }
387
403
  }
@@ -77,9 +77,11 @@ public struct SuggestAction: View {
77
77
 
78
78
  Spacer().frame(width: Spacing.S)
79
79
 
80
- Icon(source: "navigation_close", size: 24, color: theme.colors.text.default)
81
- .contentShape(Rectangle())
82
- .onTapGesture { onClose() }
80
+ SwiftUI.Button(action: onClose) {
81
+ Icon(source: "navigation_close", size: 24, color: theme.colors.text.default)
82
+ .contentShape(Rectangle())
83
+ }
84
+ .buttonStyle(ActiveOpacityButtonStyle())
83
85
  }
84
86
  .padding(Spacing.M)
85
87
  .frame(maxWidth: .infinity)
@@ -6,6 +6,8 @@ private let swipeActionWidth: CGFloat = 56
6
6
  // MARK: - Swipe
7
7
 
8
8
  public struct Swipe<Content: View>: View {
9
+ @Environment(\.appTheme) private var theme
10
+
9
11
  private let leftActions: [SwipeAction]
10
12
  private let rightActions: [SwipeAction]
11
13
  private let height: CGFloat
@@ -54,7 +56,7 @@ public struct Swipe<Content: View>: View {
54
56
  action: action,
55
57
  height: height,
56
58
  itemRadius: itemRadius,
57
- defaultBackgroundColor: Colors.primary
59
+ defaultBackgroundColor: theme.colors.primary
58
60
  )
59
61
  }
60
62
  Spacer(minLength: 0)
@@ -69,14 +71,14 @@ public struct Swipe<Content: View>: View {
69
71
  action: action,
70
72
  height: height,
71
73
  itemRadius: itemRadius,
72
- defaultBackgroundColor: Colors.error
74
+ defaultBackgroundColor: theme.colors.error.primary
73
75
  )
74
76
  }
75
77
  }
76
78
  }
77
79
 
78
80
  ZStack {
79
- Colors.card
81
+ theme.colors.background.surface
80
82
  content()
81
83
  }
82
84
  .frame(maxWidth: .infinity)
@@ -1,44 +1,69 @@
1
1
  import Foundation
2
2
  import SwiftUI
3
3
 
4
- public struct Switch: View{
4
+ public struct Switch: View {
5
5
  @Binding var value: Bool
6
6
  var disabled: Bool
7
- var onChange: ((Bool)->Void)?
8
-
9
- public init(_ value: Binding<Bool>,disabled: Bool = false, onChange: ((Bool)->Void)? = nil){
7
+ var onChange: ((Bool) -> Void)?
8
+ var title: String?
9
+ var accessibilityId: String?
10
+
11
+ public init(
12
+ _ value: Binding<Bool>,
13
+ disabled: Bool = false,
14
+ onChange: ((Bool) -> Void)? = nil,
15
+ title: String? = "",
16
+ accessibilityId: String? = ""
17
+ ) {
10
18
  self._value = value
11
19
  self.disabled = disabled
12
20
  self.onChange = onChange
21
+ self.title = title
22
+ self.accessibilityId = accessibilityId
23
+ }
24
+
25
+ // Mirrors Kotlin's `backgroundColor`: shared by the track AND the inner dot.
26
+ private var backgroundColor: Color {
27
+ switch (disabled, value) {
28
+ case (true, true): return Colors.green09
29
+ case (true, false): return Colors.black05
30
+ case (false, true): return Colors.green03
31
+ case (false, false): return Colors.black07
32
+ }
33
+ }
34
+
35
+ // Mirrors Kotlin's `circleBackgroundColor` (the outer 14pt thumb circle).
36
+ private var circleColor: Color {
37
+ value ? Colors.black01 : Colors.black03
13
38
  }
14
-
15
-
39
+
40
+ private var automationId: String {
41
+ accessibilityId?.isEmpty == false ? accessibilityId! : "toggle_\(title?.isEmpty == false ? title! : "unknown")_\(value)"
42
+ }
43
+
16
44
  public var body: some View {
17
45
  SwiftUI.Button(action: {
18
- withAnimation{
46
+ withAnimation {
19
47
  value.toggle()
20
48
  onChange?(value)
21
49
  }
22
- }){
23
- HStack{
24
- HStack {
25
- }
26
- .frame(width: 6, height: 6)
27
- .background(value ? Colors.pink03 : Colors.black07)
28
- .clipShape(Circle())
29
- .opacity(disabled ? 0.4 : 1)
30
- }
31
- .frame(width: 14, height: 14)
32
- .background(Colors.black01)
33
- .clipShape(Circle())
34
- .padding(.leading,5)
35
- .padding(.trailing,5)
36
-
37
- }
38
- .disabled(disabled)
39
- .frame(width: 40, height: 24, alignment: value == true ? .trailing : .leading)
40
- .background(value ? Colors.pink03 : Colors.black07)
41
- .clipShape(Capsule())
42
- .opacity(disabled ? 0.4 : 1)
50
+ }) {
51
+ HStack {
52
+ HStack {}
53
+ .frame(width: 6, height: 6)
54
+ .background(backgroundColor)
55
+ .clipShape(Circle())
56
+ }
57
+ .frame(width: 14, height: 14)
58
+ .background(circleColor)
59
+ .clipShape(Circle())
60
+ .padding(.leading, Spacing.XS)
61
+ .padding(.trailing, Spacing.XS)
62
+ }
63
+ .disabled(disabled)
64
+ .frame(width: 38, height: 20, alignment: value ? .trailing : .leading)
65
+ .background(backgroundColor)
66
+ .clipShape(Capsule())
67
+ .accessibilityIdentifier(automationId)
43
68
  }
44
69
  }
@@ -363,13 +363,15 @@ private struct CardTabBar: View {
363
363
  let isActive = selectedIndex == index
364
364
  let iconColor = isActive ? selectedColor : unselectedColor
365
365
 
366
- cardItem(tab: tab, isActive: isActive, iconColor: iconColor)
367
- .frame(maxWidth: .infinity)
368
- .frame(height: isActive ? 44 : 40)
369
- .background(isActive ? theme.colors.background.surface : theme.colors.background.tonal)
370
- .clipShape(UnstyledRoundedRectangle(topLeft: Radius.M, topRight: Radius.M))
371
- .contentShape(Rectangle())
372
- .onTapGesture { onPress(index) }
366
+ SwiftUI.Button(action: { onPress(index) }) {
367
+ cardItem(tab: tab, isActive: isActive, iconColor: iconColor)
368
+ .frame(maxWidth: .infinity)
369
+ .frame(height: isActive ? 44 : 40)
370
+ .background(isActive ? theme.colors.background.surface : theme.colors.background.tonal)
371
+ .clipShape(UnstyledRoundedRectangle(topLeft: Radius.M, topRight: Radius.M))
372
+ .contentShape(Rectangle())
373
+ }
374
+ .buttonStyle(ActiveOpacityButtonStyle())
373
375
  }
374
376
  }
375
377
  .frame(maxWidth: .infinity)
@@ -416,15 +418,17 @@ private struct TabItemView: View {
416
418
  private var textStyle: TypographyStyle { active ? .headerSSemibold : .bodyDefaultRegular }
417
419
 
418
420
  var body: some View {
419
- Group {
420
- if direction == .column {
421
- columnBody
422
- } else {
423
- rowBody
421
+ SwiftUI.Button(action: onPress) {
422
+ Group {
423
+ if direction == .column {
424
+ columnBody
425
+ } else {
426
+ rowBody
427
+ }
424
428
  }
429
+ .contentShape(Rectangle())
425
430
  }
426
- .contentShape(Rectangle())
427
- .onTapGesture { onPress() }
431
+ .buttonStyle(ActiveOpacityButtonStyle())
428
432
  }
429
433
 
430
434
  @ViewBuilder
@@ -52,15 +52,14 @@ let defaultBanner = TrustBannerData(
52
52
 
53
53
  public struct TrustBanner: View {
54
54
  @EnvironmentObject var applicationEnvironment: ApplicationEnvironment
55
-
55
+ @EnvironmentObject private var localize: Localize
56
+
56
57
  var onPress: ((String)->Void)?
57
-
58
+
58
59
  public init(onPress: ((String)->Void)?) {
59
60
  self.onPress = onPress
60
61
  }
61
-
62
- var language: String? = "vi"
63
-
62
+
64
63
  func onPressSecurity() {
65
64
  if (onPress != nil) {
66
65
  onPress!(applicationEnvironment.config?.trustBanner?.urlConfig ?? defaultBanner.urlConfig)
@@ -75,7 +74,7 @@ public struct TrustBanner: View {
75
74
  .scaledToFit()
76
75
  .frame(width: 64, height: 64)
77
76
  VStack(alignment: .leading){
78
- Text(applicationEnvironment.config?.trustBanner?.content[language ?? "vi"] as? String ?? defaultBanner.content[language ?? "vi"])
77
+ Text(applicationEnvironment.config?.trustBanner?.content[localize.currentLanguage] ?? defaultBanner.content[localize.currentLanguage])
79
78
  .foregroundColor(Color(hex: "484848"))
80
79
  .lineLimit(2)
81
80
  .font(.system(size: 13, weight: Font.Weight.regular))
@@ -84,7 +83,7 @@ public struct TrustBanner: View {
84
83
  .padding(.bottom, 8)
85
84
  HStack {
86
85
  HStack(spacing: 0) {
87
- Text(applicationEnvironment.config?.trustBanner?.subContent[language ?? "vi"] as? String ?? defaultBanner.subContent[language ?? "vi"])
86
+ Text(applicationEnvironment.config?.trustBanner?.subContent[localize.currentLanguage] ?? defaultBanner.subContent[localize.currentLanguage])
88
87
  .foregroundColor(Colors.pink03)
89
88
  .font(.system(size: 13, weight: .bold))
90
89
  .ignoreBoldTextSetting()
@@ -462,6 +462,9 @@ private struct TooltipSecondaryButton: View {
462
462
  .padding(.vertical, Spacing.S)
463
463
  }
464
464
  .buttonStyle(.plain)
465
+ // Mirrors Compose's `Modifier.weight(1f, fill = false)` on the secondary button:
466
+ // it yields space to the primary button first under width pressure.
467
+ .layoutPriority(-1)
465
468
  }
466
469
  }
467
470