@momo-kits/native-kits 0.168.1-beta.33 → 0.168.1-beta.34-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 (149) hide show
  1. package/CLAUDE.md +2 -2
  2. package/build.gradle.kts +11 -0
  3. package/compose/build.gradle.kts +198 -0
  4. package/compose/build.gradle.kts.backup +198 -0
  5. package/compose/compose.podspec +47 -0
  6. package/compose/src/androidMain/kotlin/vn/momo/kits/const/HostFont.android.kt +20 -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/BackGesture.android.kt +12 -0
  9. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/OsFontScale.android.kt +7 -0
  10. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +153 -0
  11. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/ReduceMotion.android.kt +17 -0
  12. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/ReservedRegions.android.kt +6 -0
  13. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +110 -0
  14. package/compose/src/commonMain/kotlin/vn/momo/kits/application/DesignSystemKits.kt +62 -0
  15. package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +1071 -0
  16. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Localize.kt +269 -0
  17. package/compose/src/commonMain/kotlin/vn/momo/kits/application/WidgetContainer.kt +56 -0
  18. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Avatar.kt +157 -0
  19. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +81 -0
  20. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +32 -0
  21. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +338 -0
  22. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +175 -0
  23. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +357 -0
  24. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Carousel.kt +115 -0
  25. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +89 -0
  26. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +128 -0
  27. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Collapse.kt +209 -0
  28. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +542 -0
  29. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +49 -0
  30. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +86 -0
  31. package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +125 -0
  32. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +231 -0
  33. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +189 -0
  34. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +478 -0
  35. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +114 -0
  36. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +265 -0
  37. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +235 -0
  38. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +223 -0
  39. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +265 -0
  40. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +185 -0
  41. package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +343 -0
  42. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Loader.kt +108 -0
  43. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +56 -0
  44. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationNumber.kt +41 -0
  45. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +84 -0
  46. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +40 -0
  47. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +402 -0
  48. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +108 -0
  49. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ProgressInfo.kt +308 -0
  50. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +59 -0
  51. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Rating.kt +87 -0
  52. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +21 -0
  53. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +90 -0
  54. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Slider.kt +330 -0
  55. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Stepper.kt +220 -0
  56. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Steps.kt +473 -0
  57. package/compose/src/commonMain/kotlin/vn/momo/kits/components/SuggestAction.kt +122 -0
  58. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Swipe.kt +207 -0
  59. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +92 -0
  60. package/compose/src/commonMain/kotlin/vn/momo/kits/components/TabView.kt +560 -0
  61. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +86 -0
  62. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +125 -0
  63. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +207 -0
  64. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +501 -0
  65. package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +176 -0
  66. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Uploader.kt +182 -0
  67. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +193 -0
  68. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +29 -0
  69. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +236 -0
  70. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +180 -0
  71. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +325 -0
  72. package/compose/src/commonMain/kotlin/vn/momo/kits/const/HostFont.kt +17 -0
  73. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +12 -0
  74. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +16 -0
  75. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +194 -0
  76. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +287 -0
  77. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +54 -0
  78. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +50 -0
  79. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/ModalLayout.kt +150 -0
  80. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/ScreenLayout.kt +316 -0
  81. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +41 -0
  82. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +52 -0
  83. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +66 -0
  84. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Conditional.kt +11 -0
  85. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +104 -0
  86. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +48 -0
  87. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Size.kt +51 -0
  88. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +411 -0
  89. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/HostBackGestureBridge.kt +58 -0
  90. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +153 -0
  91. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +116 -0
  92. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +205 -0
  93. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +422 -0
  94. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ScrollToTop.kt +8 -0
  95. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +732 -0
  96. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackTransition.kt +148 -0
  97. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/SwipeBackHaptic.kt +35 -0
  98. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +232 -0
  99. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +237 -0
  100. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +86 -0
  101. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/DuoBarCompression.kt +97 -0
  102. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/DuoLiquidSelection.kt +380 -0
  103. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/DuoTabBar.kt +436 -0
  104. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +169 -0
  105. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +455 -0
  106. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +105 -0
  107. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderJourney.kt +106 -0
  108. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderLocation.kt +74 -0
  109. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +399 -0
  110. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +39 -0
  111. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +363 -0
  112. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SideBar.kt +192 -0
  113. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +133 -0
  114. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/tracking/ScreenTracker.kt +127 -0
  115. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/BackGesture.kt +12 -0
  116. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ComposeLottieAnimation.kt +91 -0
  117. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/OsFontScale.kt +9 -0
  118. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +74 -0
  119. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ReduceMotion.kt +7 -0
  120. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ReservedRegions.kt +22 -0
  121. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +1329 -0
  122. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +55 -0
  123. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Tracking.kt +15 -0
  124. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +118 -0
  125. package/compose/src/iosMain/kotlin/vn/momo/kits/const/HostFont.ios.kt +42 -0
  126. package/compose/src/iosMain/kotlin/vn/momo/kits/navigation/HostBackGesture.ios.kt +45 -0
  127. package/compose/src/iosMain/kotlin/vn/momo/kits/navigation/ScrollToTop.ios.kt +32 -0
  128. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/BackGesture.ios.kt +38 -0
  129. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/OsFontScale.ios.kt +66 -0
  130. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +218 -0
  131. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/ReduceMotion.ios.kt +48 -0
  132. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/ReservedRegions.ios.kt +144 -0
  133. package/gradle/libs.versions.toml +69 -0
  134. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  135. package/gradle/wrapper/gradle-wrapper.properties +8 -0
  136. package/gradle.properties +26 -0
  137. package/gradlew +252 -0
  138. package/gradlew.bat +94 -0
  139. package/ios/Layout/ModalLayout.swift +125 -0
  140. package/ios/Layout/ScreenLayout.swift +28 -24
  141. package/ios/Navigation/BottomSheet.swift +40 -153
  142. package/ios/Navigation/Component/HeaderRight.swift +1 -1
  143. package/ios/Navigation/ModalScreen.swift +18 -7
  144. package/ios/Popup/PopupLayout.swift +9 -8
  145. package/ios/Popup/PopupNotify.swift +36 -23
  146. package/ios-demo/README.md +120 -0
  147. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/NavigationDemo.swift +0 -90
  148. package/package.json +1 -1
  149. package/settings.gradle.kts +64 -0
@@ -55,7 +55,8 @@ public struct PopupNotify: View {
55
55
  public let props: PopupNotifyProps
56
56
 
57
57
  @State private var descriptionHeight: CGFloat = 0
58
- @State private var actionsHeight: CGFloat = 0
58
+ @State private var descriptionFrameHeight: CGFloat = 0
59
+ @State private var cardHeight: CGFloat = 0
59
60
  @State private var oneLineHeight: CGFloat = 0
60
61
  @State private var twoLinesHeight: CGFloat = 0
61
62
 
@@ -63,10 +64,17 @@ public struct PopupNotify: View {
63
64
  localize.translate("errorCode")
64
65
  }
65
66
 
66
- // ~8.5 lines as laid out (Compose measures the real lines); nominal line height until measured
67
+ // ~8.5 lines as laid out (Compose measures the real lines); nominal line height until measured.
68
+ // With a max height (foldables) only the description gives way: image, title and actions stay.
67
69
  private var maxDescriptionHeight: CGFloat {
68
- popupLinesHeight(8.5, oneLine: oneLineHeight, twoLines: twoLinesHeight)
70
+ let lines = popupLinesHeight(8.5, oneLine: oneLineHeight, twoLines: twoLinesHeight)
69
71
  ?? fontScale(TypographyStyle.bodyDefaultRegular.lineHeight) * 8.5
72
+ guard let maxHeight = layout.modalLayout.popup.maxHeight else { return lines }
73
+ return max(min(lines, maxHeight - (cardHeight - descriptionFrameHeight)), 0)
74
+ }
75
+
76
+ private var isCloseInside: Bool {
77
+ layout.modalLayout.isFoldable && props.isShowCloseIcon
70
78
  }
71
79
 
72
80
  private var shouldUseColumnButtons: Bool {
@@ -87,33 +95,35 @@ public struct PopupNotify: View {
87
95
  }
88
96
 
89
97
  public var body: some View {
98
+ let modal = layout.modalLayout
90
99
  ZStack(alignment: .topTrailing) {
91
100
  VStack(spacing: 0) {
92
- // scrolls when iPhone Duo landscape is too short; actions stay visible
93
- PopupScrollBody(maxHeight: layout.popupMaxHeight.map { $0 - actionsHeight }) {
94
- VStack(spacing: 0) {
95
- if !props.image.isEmpty {
96
- PopupHeaderImage(url: props.image)
97
- }
98
- textContent
99
- }
101
+ if !props.image.isEmpty {
102
+ PopupHeaderImage(url: props.image)
100
103
  }
104
+ textContent
101
105
 
102
106
  actionButtons
103
107
  .padding(.horizontal, Spacing.XL)
104
108
  .padding(.bottom, Spacing.XL)
105
- .popupReadHeight($actionsHeight)
106
109
  }
107
110
  .background(theme.colors.background.surface)
108
- .clipShape(RoundedRectangle(cornerRadius: layout.popupRadius()))
109
-
110
- if props.isShowCloseIcon {
111
+ .clipShape(RoundedRectangle(cornerRadius: modal.popup.radius))
112
+ .popupReadHeight($cardHeight)
113
+
114
+ if isCloseInside {
115
+ ModalIconButton(icon: "navigation_close", accessibilityId: "ic_popup_close", action: props.onIconClose)
116
+ .padding(.top, Spacing.M)
117
+ .padding(.trailing, Spacing.M)
118
+ } else if props.isShowCloseIcon {
119
+ // phones: straddles the card's top right corner
111
120
  PopupCloseButton(action: props.onIconClose)
112
121
  .offset(x: 11, y: -11)
113
122
  }
114
123
  }
115
- .frame(maxWidth: layout.popupMaxWidth)
116
- .padding(.horizontal, layout.popupHorizontalPadding(Spacing.M))
124
+ .frame(minWidth: modal.popup.minWidth, maxWidth: modal.popup.maxWidth)
125
+ // phones keep room around the card for the close badge on its corner
126
+ .padding(.horizontal, modal.isFoldable ? 0 : Spacing.M)
117
127
  .accessibilityElement(children: .contain)
118
128
  .accessibilityIdentifier("popup_notify")
119
129
  }
@@ -126,6 +136,7 @@ public struct PopupNotify: View {
126
136
  maxLines: 2,
127
137
  accessibilityId: "title_popup_permission"
128
138
  )
139
+ .padding(.trailing, isCloseInside && props.image.isEmpty ? ModalMetrics.iconButtonSize + Spacing.M - Spacing.XL : 0)
129
140
  .padding(.bottom, Spacing.S)
130
141
 
131
142
  descriptionContent
@@ -145,16 +156,18 @@ public struct PopupNotify: View {
145
156
  .measureLineHeights(typography: .bodyDefaultRegular, oneLine: $oneLineHeight, twoLines: $twoLinesHeight)
146
157
  }
147
158
 
148
- @ViewBuilder
149
159
  private var descriptionContent: some View {
150
- if descriptionHeight > maxDescriptionHeight {
151
- ScrollView(.vertical, showsIndicators: false) {
160
+ Group {
161
+ if descriptionHeight > maxDescriptionHeight {
162
+ ScrollView(.vertical, showsIndicators: false) {
163
+ descriptionText
164
+ }
165
+ .frame(height: maxDescriptionHeight)
166
+ } else {
152
167
  descriptionText
153
168
  }
154
- .frame(height: maxDescriptionHeight)
155
- } else {
156
- descriptionText
157
169
  }
170
+ .popupReadHeight($descriptionFrameHeight)
158
171
  }
159
172
 
160
173
  private var descriptionText: some View {
@@ -0,0 +1,120 @@
1
+ # MoMoUIKitsDemo
2
+
3
+ SwiftUI demo browser for `MoMoUIKits`.
4
+
5
+ The package can optionally host a Compose UIKits screen by receiving a
6
+ `UIViewController` factory from the host app. It does not import the KMP
7
+ `shared` module directly.
8
+
9
+ SwiftUI mode reuses the full demo screen set from
10
+ `sample/iosApp/iosApp/Demo`, including the sample `HomeView` registry and demo
11
+ screens for all currently available components.
12
+
13
+ ## CocoaPods
14
+
15
+ In the host app `Podfile`, include both local pods:
16
+
17
+ ```ruby
18
+ pod 'MoMoUIKits', :path => '../momo-native-kits/ios/native-kits.podspec'
19
+ pod 'MoMoUIKitsDemo', :path => '../momo-native-kits/ios-demo'
20
+ ```
21
+
22
+ Adjust the relative paths to match the host app checkout.
23
+
24
+ ## Host App Usage
25
+
26
+ ```swift
27
+ import MoMoUIKitsDemo
28
+ import shared
29
+
30
+ class UIKitsViewController: BaseComposeAppViewController {
31
+ override func getViewController() -> UIViewController? {
32
+ let params = self.application.data as? [String: Any]
33
+
34
+ return MoMoUIKitsDemoViewControllerFactory.make(
35
+ context: MoMoUIKitsDemoContext(
36
+ appId: params?["appId"] as? String ?? "",
37
+ appCode: params?["code"] as? String ?? "",
38
+ appName: params?["name"] as? String,
39
+ appIcon: params?["icon"] as? String ?? ""
40
+ ),
41
+ composeViewController: {
42
+ UIKitsScreenComposeViewControllerKt.UIKitsScreenComposeViewController(
43
+ params: params
44
+ )
45
+ }
46
+ )
47
+ }
48
+
49
+ override func viewDidDisappear(_ animated: Bool) {
50
+ super.viewDidDisappear(animated)
51
+ composeViewController = nil
52
+ }
53
+ }
54
+ ```
55
+
56
+ If the host does not pass `composeViewController`, the demo opens directly in
57
+ SwiftUI mode.
58
+
59
+ ## Included SwiftUI Demos
60
+
61
+ The pod includes the sample demo screens for:
62
+
63
+ - Animated Header
64
+ - Avatar
65
+ - Badge
66
+ - Baseline View
67
+ - Bottom Tab
68
+ - Button
69
+ - Carousel
70
+ - Checkbox
71
+ - Chip
72
+ - Collapse
73
+ - DateTimePicker
74
+ - Divider
75
+ - Header User
76
+ - Icon Button
77
+ - Image
78
+ - Information
79
+ - Input
80
+ - Input DropDown
81
+ - Input Money
82
+ - Input OTP
83
+ - Input Phone Number
84
+ - Input Search
85
+ - Input TextArea
86
+ - Loader
87
+ - Navigation
88
+ - Pagination
89
+ - Popup Display
90
+ - Popup Notify
91
+ - Popup Promotion
92
+ - Progress Info
93
+ - Radio
94
+ - Rating
95
+ - Skeleton
96
+ - Slider
97
+ - SnackBar
98
+ - Stepper
99
+ - Steps
100
+ - Suggest Action
101
+ - Swipe
102
+ - Switch
103
+ - TabView
104
+ - Tag
105
+ - Theme
106
+ - Title
107
+ - Tooltip
108
+ - Typography
109
+ - Uploader
110
+
111
+ ## Validation Notes
112
+
113
+ Validated locally with:
114
+
115
+ ```sh
116
+ pod ipc spec ios/MoMoUIKits.podspec
117
+ pod ipc spec ios-demo/MoMoUIKitsDemo.podspec
118
+ pod lib lint ios/MoMoUIKits.podspec --allow-warnings --skip-import-validation
119
+ pod lib lint ios-demo/MoMoUIKitsDemo.podspec --allow-warnings --skip-import-validation --include-podspecs=ios/MoMoUIKits.podspec
120
+ ```
@@ -202,13 +202,6 @@ private struct NavigationDemoContent: View {
202
202
  )
203
203
  }
204
204
 
205
- row("Header Types") {
206
- navigator.push(
207
- { HeaderTypesScreen() },
208
- options: NavigationOptions(title: "Header Types")
209
- )
210
- }
211
-
212
205
  row("Bottom Tabs") {
213
206
  navigator.push(
214
207
  { BottomTabDemoContent() },
@@ -260,89 +253,6 @@ private struct UpdateOptionsScreen: View {
260
253
  }
261
254
  }
262
255
 
263
- /// Header options switched at runtime (Compose `HeaderTypeUsage`).
264
- @available(iOS 16.0, *)
265
- private struct HeaderTypesScreen: View {
266
- private enum Kind: String, CaseIterable {
267
- case none = "None", `default` = "Default", extended = "Extended", transparent = "Transparent"
268
- }
269
-
270
- @EnvironmentObject private var navigation: Navigation
271
- @State private var kind: AnyHashable = Kind.default
272
- @State private var titlePosition: AnyHashable = TitlePosition.left
273
- @State private var showBack = true
274
- @State private var showHeaderRight = true
275
- @State private var isAnimated = false
276
- @State private var isHeader = false
277
- @State private var isFullScreenContent = false
278
- @State private var searchText = ""
279
-
280
- var body: some View {
281
- VStack(alignment: .leading, spacing: Spacing.M) {
282
- ForEach(Kind.allCases, id: \.self) { item in
283
- Radio(value: item, groupValue: $kind, onChange: applyHeader, label: item.rawValue)
284
- }
285
- Divider()
286
- MomoText("Title Position")
287
- ForEach([TitlePosition.left, TitlePosition.center], id: \.self) { position in
288
- Radio(value: position, groupValue: $titlePosition, onChange: {
289
- navigation.setOptions { $0.titlePosition = position }
290
- }, label: position == .left ? "LEFT" : "CENTER")
291
- }
292
- Divider()
293
- Checkbox($showBack, onChange: { checked in
294
- navigation.setOptions { $0.hiddenBack = !checked }
295
- }, title: "Show Back")
296
- Checkbox($showHeaderRight, onChange: { checked in
297
- navigation.setOptions {
298
- $0.headerRightData = checked ? HeaderRightData() : nil
299
- $0.headerRight = nil
300
- }
301
- }, title: "Show Header Right")
302
- Divider()
303
- Checkbox($isAnimated, onChange: { checked in
304
- if checked { isHeader = false }
305
- applyHeader()
306
- }, title: "Search Animated")
307
- Checkbox($isHeader, onChange: { checked in
308
- if checked { isAnimated = false }
309
- applyHeader()
310
- }, title: "Search Header")
311
- if kind == AnyHashable(Kind.transparent) {
312
- Checkbox($isFullScreenContent, onChange: { _ in applyHeader() }, title: "Is Full Screen Content")
313
- }
314
- Color.clear.frame(height: 1600)
315
- }
316
- .padding(Spacing.M)
317
- }
318
-
319
- private func applyHeader() {
320
- let selected = kind.base as? Kind ?? .default
321
- var search: InputSearchProps?
322
- if isAnimated {
323
- search = InputSearchProps(text: $searchText, placeholder: "Search input")
324
- } else if isHeader {
325
- search = InputSearchProps(text: $searchText, buttonText: "Huỷ", showButtonText: true, placeholder: "Search input")
326
- }
327
- navigation.setOptions {
328
- switch selected {
329
- case .none:
330
- $0.headerType = .none
331
- case .default, .extended:
332
- $0.headerType = selected == .default ? .default : .extended
333
- $0.useAnimated = isAnimated
334
- $0.inputSearchProps = search
335
- case .transparent:
336
- $0.headerType = .default
337
- $0.useAnimated = false
338
- $0.inputSearchProps = nil
339
- }
340
- $0.headerTransparent = selected == .transparent
341
- $0.fullScreenContent = selected == .transparent && isFullScreenContent
342
- }
343
- }
344
- }
345
-
346
256
  @available(iOS 16.0, *)
347
257
  private struct DemoLeafScreen: View {
348
258
  @EnvironmentObject private var navigator: Navigator
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.168.1-beta.33",
3
+ "version": "0.168.1-beta.34-debug",
4
4
  "private": false,
5
5
  "dependeNavigationncies": {},
6
6
  "devDependencies": {},
@@ -0,0 +1,64 @@
1
+ import org.gradle.kotlin.dsl.maven
2
+
3
+ rootProject.name = "momo-native-kits"
4
+ enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
5
+
6
+ pluginManagement {
7
+ repositories {
8
+ google {
9
+ mavenContent {
10
+ includeGroupAndSubgroups("androidx")
11
+ includeGroupAndSubgroups("com.android")
12
+ includeGroupAndSubgroups("com.google")
13
+ }
14
+ }
15
+ mavenCentral()
16
+ gradlePluginPortal()
17
+ maven {
18
+ url = uri("https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven")
19
+ credentials {username = "download_packages"; password = "gldt-bjDqLpU_sPcHDuXau2ws" }
20
+ }
21
+ maven {
22
+ url = uri("https://artifacts.mservice.com.vn/repository/maven-momo-app/")
23
+ credentials {
24
+ username = "viewer"
25
+ password = "viewer"
26
+ }
27
+ isAllowInsecureProtocol = true
28
+ }
29
+ }
30
+ }
31
+
32
+ dependencyResolutionManagement {
33
+ repositories {
34
+ google {
35
+ mavenContent {
36
+ includeGroupAndSubgroups("androidx")
37
+ includeGroupAndSubgroups("com.android")
38
+ includeGroupAndSubgroups("com.google")
39
+ }
40
+ }
41
+ mavenCentral()
42
+ maven { url = uri("https://maven.pkg.jetbrains.space/public/p/compose/dev") }
43
+ maven {
44
+ url = uri("https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven")
45
+ credentials {
46
+ username = "download_packages";
47
+ password = "gldt-bjDqLpU_sPcHDuXau2ws"
48
+ }
49
+ }
50
+ maven {
51
+ url = uri("https://artifacts.mservice.com.vn/repository/maven-momo-app/")
52
+ credentials {
53
+ username = "viewer"
54
+ password = "viewer"
55
+ }
56
+ isAllowInsecureProtocol = true
57
+ }
58
+ }
59
+ }
60
+
61
+ include(":compose")
62
+
63
+ include(":sample:androidApp")
64
+ include(":sample:shared")