@momo-kits/native-kits 0.300.7 → 0.300.8-beta.1-debug

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (256) hide show
  1. package/CLAUDE.md +12 -8
  2. package/README.md +8 -7
  3. package/build.gradle.kts +13 -0
  4. package/compose/build.gradle.kts +195 -0
  5. package/compose/build.gradle.kts.backup +195 -0
  6. package/compose/compose.podspec +47 -0
  7. package/compose/src/androidMain/kotlin/vn/momo/kits/const/HostFont.android.kt +19 -0
  8. package/compose/src/androidMain/kotlin/vn/momo/kits/navigation/ScrollToTop.android.kt +6 -0
  9. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/BackGesture.android.kt +12 -0
  10. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/OsFontScale.android.kt +7 -0
  11. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +154 -0
  12. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/ReduceMotion.android.kt +17 -0
  13. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/ReservedRegions.android.kt +6 -0
  14. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +110 -0
  15. package/compose/src/commonMain/kotlin/vn/momo/kits/application/DesignSystemKits.kt +61 -0
  16. package/compose/src/commonMain/kotlin/vn/momo/kits/application/KitsBinding.kt +60 -0
  17. package/compose/src/commonMain/kotlin/vn/momo/kits/application/KitsHost.kt +32 -0
  18. package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +1067 -0
  19. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Localize.kt +268 -0
  20. package/compose/src/commonMain/kotlin/vn/momo/kits/application/WidgetContainer.kt +55 -0
  21. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Avatar.kt +157 -0
  22. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +81 -0
  23. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +32 -0
  24. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +338 -0
  25. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +175 -0
  26. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +354 -0
  27. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Carousel.kt +115 -0
  28. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +89 -0
  29. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +130 -0
  30. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Collapse.kt +209 -0
  31. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +482 -0
  32. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +49 -0
  33. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +86 -0
  34. package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +125 -0
  35. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +224 -0
  36. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +137 -0
  37. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +473 -0
  38. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +113 -0
  39. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +262 -0
  40. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +237 -0
  41. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +228 -0
  42. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +280 -0
  43. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +183 -0
  44. package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +342 -0
  45. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Loader.kt +108 -0
  46. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +56 -0
  47. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationNumber.kt +40 -0
  48. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +82 -0
  49. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +39 -0
  50. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +362 -0
  51. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +108 -0
  52. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ProgressInfo.kt +304 -0
  53. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +59 -0
  54. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Rating.kt +87 -0
  55. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +21 -0
  56. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +88 -0
  57. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Slider.kt +308 -0
  58. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Stepper.kt +218 -0
  59. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Steps.kt +456 -0
  60. package/compose/src/commonMain/kotlin/vn/momo/kits/components/SuggestAction.kt +122 -0
  61. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Swipe.kt +205 -0
  62. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +89 -0
  63. package/compose/src/commonMain/kotlin/vn/momo/kits/components/TabView.kt +542 -0
  64. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +86 -0
  65. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +175 -0
  66. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +201 -0
  67. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +498 -0
  68. package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +176 -0
  69. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Uploader.kt +182 -0
  70. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +193 -0
  71. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +29 -0
  72. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +208 -0
  73. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +180 -0
  74. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +325 -0
  75. package/compose/src/commonMain/kotlin/vn/momo/kits/const/HostFont.kt +12 -0
  76. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +12 -0
  77. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +16 -0
  78. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +194 -0
  79. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +291 -0
  80. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +54 -0
  81. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/HeaderLayout.kt +71 -0
  82. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +50 -0
  83. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/ModalLayout.kt +184 -0
  84. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/ScreenLayout.kt +315 -0
  85. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +41 -0
  86. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +54 -0
  87. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +66 -0
  88. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Conditional.kt +11 -0
  89. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +104 -0
  90. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +48 -0
  91. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Size.kt +51 -0
  92. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +397 -0
  93. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/HostBackGestureBridge.kt +58 -0
  94. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +153 -0
  95. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +118 -0
  96. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +212 -0
  97. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +422 -0
  98. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ScrollToTop.kt +8 -0
  99. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +750 -0
  100. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackTransition.kt +152 -0
  101. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/SwipeBackHaptic.kt +35 -0
  102. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +244 -0
  103. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +398 -0
  104. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +103 -0
  105. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/DuoBarCompression.kt +93 -0
  106. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/DuoTabBar.kt +208 -0
  107. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/TabBarMetrics.kt +133 -0
  108. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +167 -0
  109. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +446 -0
  110. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +105 -0
  111. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderJourney.kt +106 -0
  112. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderLocation.kt +74 -0
  113. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +387 -0
  114. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +39 -0
  115. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +363 -0
  116. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HelpCenterRequest.kt +33 -0
  117. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SideBar.kt +197 -0
  118. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +133 -0
  119. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/ToolkitRequests.kt +38 -0
  120. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/tracking/ScreenTracker.kt +135 -0
  121. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/BackGesture.kt +12 -0
  122. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ComposeLottieAnimation.kt +114 -0
  123. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/OsFontScale.kt +7 -0
  124. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +76 -0
  125. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ReduceMotion.kt +7 -0
  126. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ReservedRegions.kt +21 -0
  127. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +1329 -0
  128. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +55 -0
  129. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Tracking.kt +15 -0
  130. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +117 -0
  131. package/compose/src/commonTest/kotlin/vn/momo/kits/application/KitsHostTest.kt +44 -0
  132. package/compose/src/commonTest/kotlin/vn/momo/kits/navigation/component/HelpCenterRequestTest.kt +39 -0
  133. package/compose/src/commonTest/kotlin/vn/momo/kits/navigation/component/ToolkitRequestsTest.kt +53 -0
  134. package/compose/src/iosMain/kotlin/vn/momo/kits/const/HostFont.ios.kt +42 -0
  135. package/compose/src/iosMain/kotlin/vn/momo/kits/navigation/HostBackGesture.ios.kt +45 -0
  136. package/compose/src/iosMain/kotlin/vn/momo/kits/navigation/ScrollToTop.ios.kt +31 -0
  137. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/BackGesture.ios.kt +38 -0
  138. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/OsFontScale.ios.kt +65 -0
  139. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +217 -0
  140. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/ReduceMotion.ios.kt +48 -0
  141. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/ReservedRegions.ios.kt +143 -0
  142. package/gradle/libs.versions.toml +66 -0
  143. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  144. package/gradle/wrapper/gradle-wrapper.properties +8 -0
  145. package/gradle.properties +24 -0
  146. package/gradlew +252 -0
  147. package/gradlew.bat +94 -0
  148. package/ios/Application/ApplicationEnvironment.swift +6 -4
  149. package/ios/Application/DesignSystemKits.swift +59 -13
  150. package/ios/Application/DesignSystemKitsPayload.swift +0 -8
  151. package/ios/Application/LanguageSource.swift +2 -11
  152. package/ios/Application/Localize.swift +8 -35
  153. package/ios/Application/LocalizeModifier.swift +2 -11
  154. package/ios/Application/MaxApi.swift +3 -11
  155. package/ios/Avatar/Avatar.swift +0 -1
  156. package/ios/Badge/Badge.swift +5 -8
  157. package/ios/Badge/BadgeRibbon.swift +2 -5
  158. package/ios/Button/Button.swift +4 -8
  159. package/ios/CalculatorKeyboard/CalculatorKeyboard.swift +5 -7
  160. package/ios/Carousel/Carousel.swift +4 -17
  161. package/ios/Checkbox/Checkbox.swift +0 -2
  162. package/ios/Collapse/Collapse.swift +17 -11
  163. package/ios/Colors+Radius+Spacing/Theme.swift +0 -7
  164. package/ios/DateTimePicker/DateTimePicker.swift +4 -10
  165. package/ios/DateTimePicker/DateTimePickerTypes.swift +1 -3
  166. package/ios/DateTimePicker/DateTimePickerUtils.swift +0 -3
  167. package/ios/DateTimePicker/WheelPicker.swift +2 -4
  168. package/ios/Extensions/ActiveOpacityButtonStyle.swift +2 -3
  169. package/ios/Extensions/Color++.swift +2 -4
  170. package/ios/Extensions/SkeletonUICompat.swift +0 -8
  171. package/ios/Icon/Icon.swift +3 -6
  172. package/ios/IconButton/IconButton.swift +2 -5
  173. package/ios/Input/ErrorView.swift +0 -7
  174. package/ios/Input/Input.swift +9 -20
  175. package/ios/Input/InputPhoneNumber.swift +37 -20
  176. package/ios/Input/InputSearch.swift +23 -12
  177. package/ios/Input/InputTextArea.swift +4 -13
  178. package/ios/InputDropDown/InputDropDown.swift +1 -11
  179. package/ios/InputMoney/InputMoney.swift +9 -28
  180. package/ios/InputOTP/InputOTP.swift +2 -9
  181. package/ios/Layout/HeaderLayout.swift +72 -0
  182. package/ios/Layout/Item.swift +1 -2
  183. package/ios/Layout/ModalLayout.swift +144 -0
  184. package/ios/Layout/ScreenLayout.swift +48 -31
  185. package/ios/Layout/Section.swift +2 -3
  186. package/ios/Loader/Loader.swift +3 -12
  187. package/ios/Lottie/LottieView.swift +0 -11
  188. package/ios/Navigation/BottomSheet.swift +73 -94
  189. package/ios/Navigation/BottomTab/BottomTab.swift +58 -73
  190. package/ios/Navigation/BottomTab/BottomTabBar.swift +286 -121
  191. package/ios/Navigation/BottomTab/CurvedContainer.swift +52 -54
  192. package/ios/Navigation/BottomTab/DuoBarCompression.swift +5 -12
  193. package/ios/Navigation/BottomTab/DuoTabBar.swift +67 -202
  194. package/ios/Navigation/BottomTab/TabBarMetrics.swift +97 -0
  195. package/ios/Navigation/Component/FloatingButton.swift +4 -11
  196. package/ios/Navigation/Component/Header.swift +35 -54
  197. package/ios/Navigation/Component/HeaderBackground.swift +2 -8
  198. package/ios/Navigation/Component/HeaderJourney.swift +4 -8
  199. package/ios/Navigation/Component/HeaderLocation.swift +4 -8
  200. package/ios/Navigation/Component/HeaderRight.swift +20 -22
  201. package/ios/Navigation/Component/HeaderTitle.swift +1 -6
  202. package/ios/Navigation/Component/HeaderUser.swift +4 -10
  203. package/ios/Navigation/Component/SideBar.swift +6 -21
  204. package/ios/Navigation/Component/SnackBar.swift +9 -13
  205. package/ios/Navigation/HostBackGestureBridge.swift +2 -9
  206. package/ios/Navigation/ModalScreen.swift +24 -13
  207. package/ios/Navigation/Navigation.swift +35 -19
  208. package/ios/Navigation/NavigationContainer.swift +4 -15
  209. package/ios/Navigation/Navigator.swift +21 -39
  210. package/ios/Navigation/StackScreen.swift +64 -51
  211. package/ios/Navigation/StackTransition.swift +7 -14
  212. package/ios/Navigation/SwipeBackHaptic.swift +2 -7
  213. package/ios/Navigation/Tracking/ScreenTracker.swift +2 -7
  214. package/ios/Pagination/PaginationDot.swift +0 -9
  215. package/ios/Pagination/PaginationNumber.swift +1 -9
  216. package/ios/Pagination/PaginationScroll.swift +2 -14
  217. package/ios/Pagination/PaginationWhiteDot.swift +1 -10
  218. package/ios/Popup/PopupDisplay.swift +7 -5
  219. package/ios/Popup/PopupInput.swift +6 -4
  220. package/ios/Popup/PopupLayout.swift +17 -9
  221. package/ios/Popup/PopupNotify.swift +32 -25
  222. package/ios/PopupView/FullscreenPopup.swift +3 -4
  223. package/ios/PopupView/PopupView.swift +2 -2
  224. package/ios/PopupView/Utils++.swift +1 -2
  225. package/ios/ProgressInfo/ProgressInfo.swift +2 -13
  226. package/ios/Skeleton/Skeleton.swift +5 -16
  227. package/ios/Slider/Slider.swift +5 -12
  228. package/ios/StatusBarTap/StatusBarTap.h +2 -3
  229. package/ios/StatusBarTap/StatusBarTap.m +3 -16
  230. package/ios/Stepper/Stepper.swift +8 -27
  231. package/ios/Steps/Steps.swift +29 -26
  232. package/ios/Swipeable/SwipeCell.swift +2 -2
  233. package/ios/Swipeable/SwipeCellModel.swift +3 -6
  234. package/ios/TabView/TabView.swift +14 -28
  235. package/ios/Template/TrustBanner/TrustBanner.swift +2 -9
  236. package/ios/Title/Title.swift +1 -3
  237. package/ios/Tooltip/Tooltip.swift +4 -9
  238. package/ios/Typography/FontScale.swift +79 -24
  239. package/ios/Typography/Text.swift +6 -12
  240. package/ios/Typography/Typography.swift +8 -11
  241. package/ios/Uploader/Uploader.swift +2 -17
  242. package/ios-demo/README.md +120 -0
  243. package/ios-demo/Resources/tabbar_scan_qr_button.json +1 -0
  244. package/ios-demo/Resources/tabbar_scan_qr_label.json +1 -0
  245. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/AnimatedHeaderDemo.swift +11 -2
  246. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BottomTabDemo.swift +296 -59
  247. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/InputPhoneNumberDemo.swift +15 -4
  248. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/LocalizeDemo.swift +0 -8
  249. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/NavigationDemo.swift +114 -0
  250. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupNotifyDemo.swift +29 -1
  251. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/TypographyDemo.swift +16 -0
  252. package/package.json +1 -1
  253. package/publish.sh +8 -2
  254. package/scripts/ci/build-swiftui.sh +22 -0
  255. package/scripts/ci/resolve-version.mjs +144 -0
  256. package/settings.gradle.kts +63 -0
@@ -1,10 +1,3 @@
1
- //
2
- // InputPhoneNumber.swift
3
- // Pods
4
- //
5
- // Created by sophia on 20/10/25.
6
- //
7
-
8
1
  import SwiftUI
9
2
  public struct InputPhoneNumber: View {
10
3
  @Environment(\.appTheme) private var theme
@@ -18,13 +11,22 @@ public struct InputPhoneNumber: View {
18
11
  public var errorSpacing: Bool
19
12
  public var loading: Bool
20
13
  public var required: Bool
14
+ /// Deprecated: use `trailing`.
21
15
  public var rightIcon: String
16
+ /// Deprecated: use `trailingColor`.
22
17
  public var rightIconColor: Color?
18
+ /// Icon key or URL; wins over `rightIcon` when not empty.
19
+ public var trailing: String
20
+ /// Wins over `rightIconColor` when set.
21
+ public var trailingColor: Color?
23
22
  public var autofocus: Bool
24
23
  public var onChangeText: ((String) -> Void)?
25
24
  public var onFocus: (() -> Void)?
26
25
  public var onBlur: (() -> Void)?
26
+ /// Deprecated: use `onPressTrailing`.
27
27
  public var onRightIconPressed: (() -> Void)?
28
+ /// Wins over `onRightIconPressed` when set.
29
+ public var onPressTrailing: (() -> Void)?
28
30
  public var accessibilityLabel: String?
29
31
 
30
32
  @State private var isFocused: Bool = false
@@ -41,11 +43,14 @@ public struct InputPhoneNumber: View {
41
43
  required: Bool = false,
42
44
  rightIcon: String = "",
43
45
  rightIconColor: Color? = nil,
46
+ trailing: String = "",
47
+ trailingColor: Color? = nil,
44
48
  autofocus: Bool = false,
45
49
  onChangeText: ((String) -> Void)? = nil,
46
50
  onFocus: (() -> Void)? = nil,
47
51
  onBlur: (() -> Void)? = nil,
48
52
  onRightIconPressed: (() -> Void)? = nil,
53
+ onPressTrailing: (() -> Void)? = nil,
49
54
  accessibilityLabel: String? = nil
50
55
  ) {
51
56
  self._text = text
@@ -58,11 +63,14 @@ public struct InputPhoneNumber: View {
58
63
  self.required = required
59
64
  self.rightIcon = rightIcon
60
65
  self.rightIconColor = rightIconColor
66
+ self.trailing = trailing
67
+ self.trailingColor = trailingColor
61
68
  self.autofocus = autofocus
62
69
  self.onChangeText = onChangeText
63
70
  self.onFocus = onFocus
64
71
  self.onBlur = onBlur
65
72
  self.onRightIconPressed = onRightIconPressed
73
+ self.onPressTrailing = onPressTrailing
66
74
  self.accessibilityLabel = accessibilityLabel
67
75
  }
68
76
 
@@ -78,7 +86,6 @@ public struct InputPhoneNumber: View {
78
86
 
79
87
  VStack(alignment: .leading, spacing: 0) {
80
88
  HStack(spacing: 0) {
81
- // 🇻🇳 Flag
82
89
  ImageView("https://static.momocdn.net/app/img/icon/ic-qrcode-package/ic_vn_flag.png")
83
90
  .frame(width: 24, height: 24)
84
91
  .padding(.trailing, Spacing.XS)
@@ -90,7 +97,6 @@ public struct InputPhoneNumber: View {
90
97
  .frame(width: 1, height: size == .small ? 24 : 32)
91
98
  .padding(.horizontal, Spacing.M)
92
99
 
93
- // Text input
94
100
  ZStack(alignment: .leading) {
95
101
  if text.isEmpty {
96
102
  MomoText(
@@ -117,7 +123,6 @@ public struct InputPhoneNumber: View {
117
123
  .accessibilityValue(textBinding.wrappedValue.isEmpty ? placeholder : textBinding.wrappedValue)
118
124
  }
119
125
 
120
- // Clear button
121
126
  if isFocused && !text.isEmpty {
122
127
  SwiftUI.Button(action: {
123
128
  text = ""
@@ -129,16 +134,13 @@ public struct InputPhoneNumber: View {
129
134
  .accessibilityIdentifier("ic_clear")
130
135
  }
131
136
 
132
- // Loading indicator
137
+ // Spinner replaces the trailing icon while loading (RN RenderTrailing)
133
138
  if loading {
134
- ActivityIndicator(isAnimating: .constant(true), style: .medium, color: rightIconColor ?? theme.colors.text.default)
139
+ ActivityIndicator(isAnimating: .constant(true), style: .medium, color: trailingTint)
135
140
  .frame(width: 16, height: 16)
136
- }
137
-
138
- // ✅ Right icon
139
- if !rightIcon.isEmpty {
140
- SwiftUI.Button(action: { onRightIconPressed?() }) {
141
- Icon(source: rightIcon, size: 24, color: rightIconColor ?? theme.colors.text.default)
141
+ } else if !trailingIcon.isEmpty {
142
+ SwiftUI.Button(action: pressTrailing) {
143
+ Icon(source: trailingIcon, size: 24, color: trailingTint)
142
144
  .padding(.leading, Spacing.S)
143
145
  }
144
146
  }
@@ -154,7 +156,6 @@ public struct InputPhoneNumber: View {
154
156
  .stroke(borderColor(), lineWidth: isFocused ? 1.5 : 1)
155
157
  )
156
158
 
157
- // Error or hint
158
159
  ErrorView(
159
160
  errorMessage: error,
160
161
  errorSpacing: errorSpacing,
@@ -164,7 +165,23 @@ public struct InputPhoneNumber: View {
164
165
  }
165
166
 
166
167
  // MARK: - Helpers
167
-
168
+
169
+ private var trailingIcon: String {
170
+ return trailing.isEmpty ? rightIcon : trailing
171
+ }
172
+
173
+ private var trailingTint: Color {
174
+ return trailingColor ?? rightIconColor ?? theme.colors.text.default
175
+ }
176
+
177
+ private func pressTrailing() {
178
+ if let onPressTrailing {
179
+ onPressTrailing()
180
+ return
181
+ }
182
+ onRightIconPressed?()
183
+ }
184
+
168
185
  private func handleFocusChange(_ focused: Bool) {
169
186
  guard focused != isFocused else { return }
170
187
  isFocused = focused
@@ -1,11 +1,13 @@
1
- //
2
- // InputSearch.swift
3
- // Pods
4
- //
5
- // Created by dung.pham2 on 3/12/24.
6
- //
7
1
  import SwiftUI
8
2
 
3
+ /// Body searches keep 36 / 24; the header search matches the 32pt header buttons.
4
+ enum InputSearchSize {
5
+ case `default`, header
6
+
7
+ var height: CGFloat { self == .header ? HeaderLayoutMetrics.searchHeight : 36 }
8
+ var iconSize: CGFloat { self == .header ? HeaderLayoutMetrics.iconSize : 24 }
9
+ }
10
+
9
11
  // MARK: - RenderRightIconSearch
10
12
 
11
13
  struct RenderRightIconSearch: View {
@@ -13,6 +15,7 @@ struct RenderRightIconSearch: View {
13
15
  let loading: Bool
14
16
  let icon: String
15
17
  let color: Color
18
+ var size: InputSearchSize = .default
16
19
  let onClick: () -> Void
17
20
 
18
21
  var body: some View {
@@ -23,13 +26,13 @@ struct RenderRightIconSearch: View {
23
26
  .padding(.horizontal, Spacing.S)
24
27
  }
25
28
  if !icon.isEmpty {
26
- // Compose: a 1pt rule inset S from the top and bottom of the 36pt bar.
29
+ // Compose: a 1pt rule inset S from the top and bottom of the bar.
27
30
  Rectangle()
28
31
  .fill(theme.colors.primary)
29
- .frame(width: 1, height: 36 - Spacing.S * 2)
32
+ .frame(width: 1, height: size.height - Spacing.S * 2)
30
33
  .padding(.leading, Spacing.S)
31
34
 
32
- Icon(source: icon, size: 24, color: color)
35
+ Icon(source: icon, size: size.iconSize, color: color)
33
36
  .padding(.leading, Spacing.S)
34
37
  .onTapGesture(perform: onClick)
35
38
  }
@@ -143,6 +146,7 @@ public struct InputSearch: View {
143
146
  var clearCondition: (() -> Bool)? = nil
144
147
  var onClearPress: () -> Void = {}
145
148
  var onSubmit: () -> Void = {}
149
+ var size: InputSearchSize = .default
146
150
 
147
151
  @State private var isFocused = false
148
152
  @State private var isBlurred = false
@@ -232,7 +236,7 @@ public struct InputSearch: View {
232
236
  if let searchIcon = searchIcon {
233
237
  searchIcon()
234
238
  } else {
235
- Icon(source: "navigation_search", size: 24, color: theme.colors.text.hint)
239
+ Icon(source: "navigation_search", size: size.iconSize, color: theme.colors.text.hint)
236
240
  .padding(.trailing, Spacing.XS)
237
241
  }
238
242
 
@@ -281,11 +285,11 @@ public struct InputSearch: View {
281
285
  .padding(.leading, Spacing.XS)
282
286
  }
283
287
 
284
- RenderRightIconSearch(loading: loading, icon: icon, color: iconColor, onClick: onRightIconPressed)
288
+ RenderRightIconSearch(loading: loading, icon: icon, color: iconColor, size: size, onClick: onRightIconPressed)
285
289
  }
286
290
  .padding(.horizontal, Spacing.M)
287
291
  .frame(maxWidth: .infinity, alignment: .leading)
288
- .frame(height: 36)
292
+ .frame(height: size.height)
289
293
  .background(
290
294
  RoundedRectangle(cornerRadius: Radius.XL)
291
295
  .fill(backgroundColor ?? theme.colors.background.surface)
@@ -304,6 +308,13 @@ public struct InputSearch: View {
304
308
  }
305
309
  }
306
310
 
311
+ /// The header search: 32pt tall with a 20pt icon, level with the header buttons.
312
+ func headerSize() -> InputSearch {
313
+ var copy = self
314
+ copy.size = .header
315
+ return copy
316
+ }
317
+
307
318
  // MARK: - Helper Functions
308
319
 
309
320
  func getBorderColor(isFocused: Bool, error: String, disabled: Bool) -> Color {
@@ -1,12 +1,5 @@
1
- //
2
- // InputTextArea.swift
3
- // Pods
4
- //
5
- // Created by dung.pham2 on 2/12/24.
6
- //
7
1
  import SwiftUI
8
2
 
9
- // Make these constants public
10
3
  public let MAX_LENGTH = 300
11
4
  public let DEFAULT_HEIGHT: CGFloat = 104
12
5
 
@@ -92,7 +85,6 @@ struct UITextViewWrapper: UIViewRepresentable {
92
85
  }
93
86
  }
94
87
 
95
- // Make the struct public
96
88
  public struct InputTextArea: View {
97
89
  @Environment(\.appTheme) private var theme
98
90
  @Environment(\.momoFontScale) private var fontScale
@@ -120,7 +112,6 @@ public struct InputTextArea: View {
120
112
 
121
113
  @State private var isFocused = false
122
114
 
123
- // Make the initializer public
124
115
  public init(
125
116
  text: Binding<String>,
126
117
  maxLength: Int = MAX_LENGTH,
@@ -204,7 +195,6 @@ public struct InputTextArea: View {
204
195
  }
205
196
  .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading)
206
197
 
207
- // Clear button (mirrors Compose: focused + non-empty).
208
198
  if isFocused && !text.isEmpty {
209
199
  SwiftUI.Button(action: {
210
200
  text = ""
@@ -215,8 +205,7 @@ public struct InputTextArea: View {
215
205
  .padding(.leading, Spacing.XS)
216
206
  }
217
207
 
218
- // Loading indicator and right icon (independent, mirrors
219
- // Compose's RenderRightIcon: both can render at once).
208
+ // Not if/else: Compose's RenderRightIcon can show the spinner and the icon together.
220
209
  if loading {
221
210
  ActivityIndicator(isAnimating: .constant(true), style: .medium, color: iconTintColor)
222
211
  .frame(width: 16, height: 16)
@@ -279,7 +268,9 @@ public struct InputTextArea: View {
279
268
  }
280
269
  .padding(.horizontal, Spacing.S)
281
270
  .background(theme.colors.background.surface)
282
- .alignmentGuide(.top) { $0[VerticalAlignment.center] }
271
+ // A zero-height frame on the top edge centers the label on the border, re-laid out with font scale.
272
+ .fixedSize(horizontal: false, vertical: true)
273
+ .frame(height: 0)
283
274
  .offset(x: Spacing.S)
284
275
  }
285
276
  }
@@ -1,10 +1,3 @@
1
- //
2
- // InputDropDown.swift
3
- // Pods
4
- //
5
- // Hand-written SwiftUI reimplementation of Compose `InputDropDown`.
6
- //
7
-
8
1
  import SwiftUI
9
2
 
10
3
  // MARK: - RenderRightIcon (mirrors Compose RenderRightIcon for InputDropDown)
@@ -16,8 +9,7 @@ private struct RenderRightIcon: View {
16
9
  let onPressed: () -> Void
17
10
 
18
11
  var body: some View {
19
- // Mirrors Compose's two independent `if` blocks: loading spinner and icon
20
- // can both render at once, not exclusively (not an if/else).
12
+ // Not if/else, as in Compose: the spinner and the icon can show together.
21
13
  if loading {
22
14
  ActivityIndicator(isAnimating: .constant(true), style: .medium, color: color)
23
15
  .frame(width: 16, height: 16)
@@ -100,7 +92,6 @@ public struct InputDropDown: View {
100
92
  public var body: some View {
101
93
  VStack(alignment: .leading, spacing: 0) {
102
94
  ZStack(alignment: .topLeading) {
103
- // Floating label
104
95
  if !floatingValue.isEmpty || !floatingIcon.isEmpty {
105
96
  HStack(spacing: 0) {
106
97
  MomoText(floatingValue, typography: .labelSMedium, color: floatingTitleColor)
@@ -118,7 +109,6 @@ public struct InputDropDown: View {
118
109
  .zIndex(10)
119
110
  }
120
111
 
121
- // Input container
122
112
  HStack(alignment: .center, spacing: 0) {
123
113
  if !leadingIcon.isEmpty {
124
114
  Icon(source: leadingIcon, size: size == .small ? 24 : 32, color: leadingIconTintColor)
@@ -1,12 +1,3 @@
1
- //
2
- // InputMoney.swift
3
- // MoMoUIKits
4
- //
5
- // Native SwiftUI reimplementation of Compose `InputMoney`.
6
- // The bound `text` holds RAW DIGITS only, as in Compose; the field shows
7
- // the thousands-separated currency and edits apply at the caret.
8
- //
9
-
10
1
  import Foundation
11
2
  import SwiftUI
12
3
  import UIKit
@@ -35,7 +26,6 @@ public func formatNumberToMoney(_ digits: String, currency: String = "đ") -> St
35
26
  for i in 0..<reversed.count {
36
27
  count += 1
37
28
  chars.append(reversed[i])
38
- // i counts from the least significant digit; original index = len-1-i.
39
29
  let originalIndex = reversed.count - 1 - i
40
30
  if count == 3 && originalIndex >= 1 {
41
31
  chars.append(".")
@@ -47,9 +37,8 @@ public func formatNumberToMoney(_ digits: String, currency: String = "đ") -> St
47
37
 
48
38
  private func isMoneyDigit(_ char: Character) -> Bool { char.isASCII && char.isNumber }
49
39
 
50
- /// Applies an edit of `display[start..<end]` → `inserted` to the digits of `display`.
51
- /// Separators and currency are never deleted: removing a separator deletes the
52
- /// digit before it instead, removing only the currency leaves the digits untouched. Returns the new digits and the caret as a digit index.
40
+ /// Applies the edit `display[start..<end]` → `inserted` to the digits of `display`. Separators and
41
+ /// currency are never deleted: removing a separator deletes the digit before it instead.
53
42
  private func applyMoneyEdit(_ display: String, start: Int, end: Int, inserted: String) -> (digits: String, caretDigit: Int) {
54
43
  let chars = Array(display)
55
44
  let start = min(start, chars.count)
@@ -83,6 +72,8 @@ private func moneyCaret(_ display: String, digitIndex: Int) -> Int {
83
72
 
84
73
  // MARK: - InputMoney
85
74
 
75
+ /// Compose `InputMoney`: the bound `text` holds raw digits only; the field shows the
76
+ /// thousands-separated currency and edits apply at the caret.
86
77
  public struct InputMoney: View {
87
78
  @Environment(\.appTheme) private var theme
88
79
  @Environment(\.momoFontScale) private var fontScale
@@ -166,7 +157,6 @@ public struct InputMoney: View {
166
157
  public var body: some View {
167
158
  VStack(alignment: .leading, spacing: 0) {
168
159
  ZStack(alignment: .topLeading) {
169
- // Floating label
170
160
  if !floatingValue.isEmpty || !floatingIcon.isEmpty {
171
161
  HStack(spacing: 0) {
172
162
  MomoText(floatingValue, typography: .labelSMedium, color: floatingTitleColor)
@@ -185,24 +175,18 @@ public struct InputMoney: View {
185
175
  }
186
176
  )
187
177
  .background(theme.colors.background.surface)
188
- // Kotlin centers the label within the box-height-tall decorationBox by
189
- // default, then applies `offsetY = -size.values.height / 2` — net effect:
190
- // the label ends up centered exactly on the box's top border. Our ZStack
191
- // anchors top-leading instead, so matching that requires offsetting by
192
- // half the label's OWN measured height, not half the box height.
178
+ // Compose centers the label in the box and offsets it by -box height / 2, onto the
179
+ // top border; this ZStack anchors top-leading, so it offsets by half the label height.
193
180
  .offset(x: Spacing.S, y: -floatingLabelHeight / 2)
194
181
  .zIndex(10)
195
182
  }
196
183
 
197
- // Input container
198
184
  HStack(alignment: .center, spacing: 0) {
199
- // Leading icon
200
185
  if !leadingIcon.isEmpty {
201
186
  Icon(source: leadingIcon, size: size == .small ? 24 : 32, color: leadingIconTintColor)
202
187
  .padding(.trailing, Spacing.XS)
203
188
  }
204
189
 
205
- // Money field
206
190
  ZStack(alignment: .leading) {
207
191
  if !hasDigits {
208
192
  MomoText(
@@ -226,7 +210,6 @@ public struct InputMoney: View {
226
210
  }
227
211
  .frame(maxWidth: .infinity, alignment: .leading)
228
212
 
229
- // Clear button (focused + has value)
230
213
  if isFocused && hasDigits {
231
214
  SwiftUI.Button(action: {
232
215
  text = ""
@@ -238,8 +221,7 @@ public struct InputMoney: View {
238
221
  }
239
222
  }
240
223
 
241
- // Loading indicator and right icon can both render (mirrors
242
- // Compose's two independent `if` blocks, not if/else).
224
+ // Not if/else, as in Compose: the spinner and the icon can show together.
243
225
  if loading {
244
226
  ActivityIndicator(isAnimating: .constant(true), style: .medium, color: iconTintColor)
245
227
  .frame(width: 16, height: 16)
@@ -303,9 +285,8 @@ public struct InputMoney: View {
303
285
 
304
286
  // MARK: - MoneyTextField (UIViewRepresentable)
305
287
 
306
- /// A UITextField that shows live thousands-separated currency while the bound
307
- /// `digits` string holds only the raw numeric value. The caret can move freely
308
- /// but never past the trailing currency symbol; edits apply at the caret.
288
+ /// Shows the formatted currency while `digits` holds the raw value; the caret never passes the
289
+ /// currency suffix.
309
290
  private struct MoneyTextField: UIViewRepresentable {
310
291
  @Binding var digits: String
311
292
  var keyboardType: UIKeyboardType
@@ -27,11 +27,8 @@ private struct OTPCaret: View {
27
27
 
28
28
  // MARK: - InputOTP
29
29
 
30
- /// Native SwiftUI port of Compose `InputOTP`.
31
- ///
32
- /// A row of OTP cells driven by a hidden `TextField`. When `length` is provided
33
- /// it renders fixed-count slots (`-` placeholders + blinking caret); otherwise it
34
- /// renders the typed characters followed by a trailing caret while focused.
30
+ /// Compose `InputOTP`: cells driven by a hidden `TextField`. With `length`, fixed slots (`-`
31
+ /// placeholders + blinking caret); without, the typed characters and a trailing caret while focused.
35
32
  public struct InputOTP: View {
36
33
  @Environment(\.appTheme) private var theme
37
34
  @Binding public var value: String
@@ -80,10 +77,8 @@ public struct InputOTP: View {
80
77
  public var body: some View {
81
78
  VStack(alignment: .leading, spacing: 0) {
82
79
  ZStack {
83
- // Hidden text field that owns the keyboard / cursor.
84
80
  hiddenField
85
81
 
86
- // Floating label over the border.
87
82
  if !floatingValue.isEmpty {
88
83
  HStack {
89
84
  MomoText(floatingValue, typography: .labelSMedium, color: theme.colors.text.hint)
@@ -94,7 +89,6 @@ public struct InputOTP: View {
94
89
  .zIndex(10)
95
90
  }
96
91
 
97
- // Bordered container with cells.
98
92
  cells
99
93
  .frame(maxWidth: .infinity)
100
94
  .frame(height: 56)
@@ -103,7 +97,6 @@ public struct InputOTP: View {
103
97
  .stroke(borderColor, lineWidth: 1)
104
98
  )
105
99
 
106
- // Trailing clear button.
107
100
  HStack {
108
101
  Spacer()
109
102
  SwiftUI.Button(action: clearText) {
@@ -0,0 +1,72 @@
1
+ // Top navigation spec (Figma "Top Navigation · Màn hình gập"). Mirrors Compose `layout/HeaderLayout.kt`
2
+ // and RN; keep the three in sync.
3
+
4
+ import SwiftUI
5
+
6
+ /// Stretch frame on hold until design confirms it: `.stretch` lays out like `.grid`.
7
+ private let isStretchFrameEnabled = false
8
+
9
+ /// Header spec values, in points. Public so custom header rights and extensions can match them.
10
+ public enum HeaderLayoutMetrics {
11
+ public static let buttonSize: CGFloat = 32
12
+ public static let iconSize: CGFloat = 20
13
+ public static let pillWidth: CGFloat = 72
14
+ public static let searchHeight: CGFloat = 32
15
+ public static let titleGap: CGFloat = Spacing.S
16
+ public static let sidePadding: CGFloat = Spacing.M
17
+ /// shortcut + gap + help/home pill
18
+ public static let clusterWidth: CGFloat = buttonSize + titleGap + pillWidth
19
+ public static let frameMaxWidth: CGFloat = 600
20
+ /// Banner image width on every device: wide windows keep the phone size, centered.
21
+ public static let bannerWidth: CGFloat = 375
22
+ }
23
+
24
+ /// How a screen lays out its content on wide windows; the header row follows it.
25
+ public enum ContentLayout: Equatable {
26
+ /// 12 column grid: the header keeps the 12pt side padding.
27
+ case grid
28
+ /// One column of at most `HeaderLayoutMetrics.frameMaxWidth`, centered: the header row sits in the same frame.
29
+ /// On hold: same as `.grid` for now.
30
+ case stretch
31
+ }
32
+
33
+ /// Header geometry for a window; see `ScreenLayout.headerLayout(_:)`.
34
+ public struct HeaderLayout: Equatable {
35
+ /// Short side >= 600, iPhone Duo excluded (it has its own layout).
36
+ public let isWide: Bool
37
+ /// Banner kept at `HeaderLayoutMetrics.bannerWidth`, centered: wide windows plus the iPhone Duo inner display.
38
+ public let isBannerCentered: Bool
39
+ /// Padding from each side of the safe area to the header row (back, title / search, right cluster).
40
+ public let frameInset: CGFloat
41
+ /// Width of the header row, so tabs and other header extensions can line up with it.
42
+ public let frameWidth: CGFloat
43
+ }
44
+
45
+ public extension ScreenLayout {
46
+ func headerLayout(_ contentLayout: ContentLayout = .grid) -> HeaderLayout {
47
+ let isLargeWindow = min(width, height) >= ModalMetrics.foldableMinWidth
48
+ let isWide = !isIPhoneDuo && !isDuoDevice && isLargeWindow
49
+ let safeWidth = width - insets.leading - insets.trailing
50
+ let isStretch = isStretchFrameEnabled && contentLayout == .stretch
51
+ let frameInset = isWide && isStretch
52
+ ? max(HeaderLayoutMetrics.sidePadding, (safeWidth - HeaderLayoutMetrics.frameMaxWidth) / 2)
53
+ : HeaderLayoutMetrics.sidePadding
54
+ return HeaderLayout(
55
+ isWide: isWide,
56
+ isBannerCentered: isLargeWindow,
57
+ frameInset: frameInset,
58
+ frameWidth: safeWidth - frameInset * 2)
59
+ }
60
+ }
61
+
62
+ private struct ContentLayoutKey: EnvironmentKey {
63
+ static let defaultValue: ContentLayout = .grid
64
+ }
65
+
66
+ public extension EnvironmentValues {
67
+ /// The enclosing screen's `NavigationOptions.contentLayout`, set by `StackScreen`.
68
+ var contentLayout: ContentLayout {
69
+ get { self[ContentLayoutKey.self] }
70
+ set { self[ContentLayoutKey.self] = newValue }
71
+ }
72
+ }
@@ -19,8 +19,7 @@ public struct ItemView<Content: View>: View {
19
19
  // MARK: Public
20
20
 
21
21
  public var body: some View {
22
- // A VStack (not a ZStack) so multiple children flow VERTICALLY instead of stacking
23
- // on top of each other — matches the React Item's flex-column content.
22
+ // VStack, not ZStack: children flow vertically like RN Item's flex-column content.
24
23
  VStack(alignment: .leading, spacing: 0) { content() }
25
24
  .frame(width: width, height: height, alignment: .topLeading)
26
25
  }