@momo-kits/native-kits 0.157.1-beta.9 → 0.157.1-skill.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 (165) hide show
  1. package/.claude/momo-native-kits/SKILL.md +87 -0
  2. package/.claude/momo-native-kits/references/Badge.md +39 -0
  3. package/.claude/momo-native-kits/references/BadgeDot.md +37 -0
  4. package/.claude/momo-native-kits/references/BottomSheet.md +51 -0
  5. package/.claude/momo-native-kits/references/BottomTab.md +65 -0
  6. package/.claude/momo-native-kits/references/Button.md +197 -0
  7. package/.claude/momo-native-kits/references/CheckBox.md +51 -0
  8. package/.claude/momo-native-kits/references/Chip.md +47 -0
  9. package/.claude/momo-native-kits/references/Divider.md +29 -0
  10. package/.claude/momo-native-kits/references/HeaderTitle.md +45 -0
  11. package/.claude/momo-native-kits/references/HeaderType.md +47 -0
  12. package/.claude/momo-native-kits/references/Icon.md +32 -0
  13. package/.claude/momo-native-kits/references/Image.md +38 -0
  14. package/.claude/momo-native-kits/references/Information.md +36 -0
  15. package/.claude/momo-native-kits/references/Input.md +334 -0
  16. package/.claude/momo-native-kits/references/InputDropDown.md +47 -0
  17. package/.claude/momo-native-kits/references/InputMoney.md +241 -0
  18. package/.claude/momo-native-kits/references/InputOTP.md +52 -0
  19. package/.claude/momo-native-kits/references/InputPhoneNumber.md +175 -0
  20. package/.claude/momo-native-kits/references/InputSearch.md +57 -0
  21. package/.claude/momo-native-kits/references/InputTextArea.md +46 -0
  22. package/.claude/momo-native-kits/references/NavigationContainer.md +51 -0
  23. package/.claude/momo-native-kits/references/Navigator.md +287 -0
  24. package/.claude/momo-native-kits/references/PaginationDot.md +28 -0
  25. package/.claude/momo-native-kits/references/PaginationNumber.md +28 -0
  26. package/.claude/momo-native-kits/references/PopupNotify.md +47 -0
  27. package/.claude/momo-native-kits/references/Radio.md +44 -0
  28. package/.claude/momo-native-kits/references/Skeleton.md +32 -0
  29. package/.claude/momo-native-kits/references/Switch.md +36 -0
  30. package/.claude/momo-native-kits/references/Tag.md +40 -0
  31. package/.claude/momo-native-kits/references/Text.md +37 -0
  32. package/.claude/momo-native-kits/references/Title.md +43 -0
  33. package/.claude/momo-native-kits/references/Tooltip.md +30 -0
  34. package/.claude/settings.local.json +13 -0
  35. package/build.gradle.kts +11 -0
  36. package/building-skill-for-claude.md +1190 -0
  37. package/compose/build.gradle.kts +180 -0
  38. package/compose/build.gradle.kts.backup +180 -0
  39. package/compose/compose.podspec +54 -0
  40. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +110 -0
  41. package/compose/src/commonMain/composeResources/font/momosignature.otf +0 -0
  42. package/compose/src/commonMain/composeResources/font/momotrustdisplay.otf +0 -0
  43. package/compose/src/commonMain/composeResources/font/sfprotext_black.otf +0 -0
  44. package/compose/src/commonMain/composeResources/font/sfprotext_black.ttf +0 -0
  45. package/compose/src/commonMain/composeResources/font/sfprotext_bold.ttf +0 -0
  46. package/compose/src/commonMain/composeResources/font/sfprotext_heavy.ttf +0 -0
  47. package/compose/src/commonMain/composeResources/font/sfprotext_light.ttf +0 -0
  48. package/compose/src/commonMain/composeResources/font/sfprotext_medium.ttf +0 -0
  49. package/compose/src/commonMain/composeResources/font/sfprotext_regular.ttf +0 -0
  50. package/compose/src/commonMain/composeResources/font/sfprotext_semibold.ttf +0 -0
  51. package/compose/src/commonMain/composeResources/font/sfprotext_thin.otf +0 -0
  52. package/compose/src/commonMain/composeResources/font/sfprotext_thin.ttf +0 -0
  53. package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.otf +0 -0
  54. package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.ttf +0 -0
  55. package/compose/src/commonMain/kotlin/vn/momo/kits/application/AnimationSearchInput.kt +57 -0
  56. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +107 -0
  57. package/compose/src/commonMain/kotlin/vn/momo/kits/application/FloatingButton.kt +201 -0
  58. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Header.kt +222 -0
  59. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderAnimated.kt +48 -0
  60. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderBackground.kt +86 -0
  61. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderDefault.kt +76 -0
  62. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderExtended.kt +76 -0
  63. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderRight.kt +305 -0
  64. package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderTitle.kt +33 -0
  65. package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +720 -0
  66. package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +121 -0
  67. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +405 -0
  68. package/compose/src/commonMain/kotlin/vn/momo/kits/application/useHeaderSearchAnimation.kt +69 -0
  69. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +85 -0
  70. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +32 -0
  71. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +340 -0
  72. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +198 -0
  73. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +357 -0
  74. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +94 -0
  75. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +136 -0
  76. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +543 -0
  77. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +23 -0
  78. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +76 -0
  79. package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +148 -0
  80. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +188 -0
  81. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +116 -0
  82. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +448 -0
  83. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +172 -0
  84. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +255 -0
  85. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +231 -0
  86. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +233 -0
  87. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +254 -0
  88. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +241 -0
  89. package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +364 -0
  90. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +56 -0
  91. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationNumber.kt +41 -0
  92. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +92 -0
  93. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +40 -0
  94. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +352 -0
  95. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +103 -0
  96. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +70 -0
  97. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +17 -0
  98. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +96 -0
  99. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +96 -0
  100. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +92 -0
  101. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +130 -0
  102. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +214 -0
  103. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +590 -0
  104. package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +177 -0
  105. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +205 -0
  106. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +29 -0
  107. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +239 -0
  108. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +191 -0
  109. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +306 -0
  110. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +12 -0
  111. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +13 -0
  112. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +185 -0
  113. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +285 -0
  114. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +2 -0
  115. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +35 -0
  116. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +2 -0
  117. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +59 -0
  118. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +68 -0
  119. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Conditional.kt +11 -0
  120. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +14 -0
  121. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +50 -0
  122. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Size.kt +51 -0
  123. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +239 -0
  124. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +119 -0
  125. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +98 -0
  126. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +161 -0
  127. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +331 -0
  128. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +497 -0
  129. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +162 -0
  130. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +243 -0
  131. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +86 -0
  132. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +187 -0
  133. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +279 -0
  134. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +80 -0
  135. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +306 -0
  136. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +32 -0
  137. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +370 -0
  138. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +132 -0
  139. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +42 -0
  140. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +1329 -0
  141. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +62 -0
  142. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Tracking.kt +15 -0
  143. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +88 -0
  144. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +149 -0
  145. package/gradle/libs.versions.toml +57 -0
  146. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  147. package/gradle/wrapper/gradle-wrapper.properties +8 -0
  148. package/gradle.properties +26 -0
  149. package/gradlew +252 -0
  150. package/gradlew.bat +94 -0
  151. package/ios/Input/Input.swift +50 -108
  152. package/local.properties +8 -0
  153. package/package.json +1 -1
  154. package/settings.gradle.kts +52 -0
  155. package/example/ios/Example.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  156. package/example/ios/Example.xcworkspace/xcuserdata/sophia.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  157. package/example/ios/Example.xcworkspace/xcuserdata/sophia.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -6
  158. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/MoMoUIKits.xcscheme +0 -58
  159. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/Pods-Example.xcscheme +0 -58
  160. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/SDWebImage.xcscheme +0 -58
  161. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/SDWebImageSwiftUI.xcscheme +0 -58
  162. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/SkeletonUI.xcscheme +0 -58
  163. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/lottie-ios-LottiePrivacyInfo.xcscheme +0 -58
  164. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/lottie-ios.xcscheme +0 -58
  165. package/example/ios/Pods/Pods.xcodeproj/xcuserdata/sophia.xcuserdatad/xcschemes/xcschememanagement.plist +0 -46
package/gradlew.bat ADDED
@@ -0,0 +1,94 @@
1
+ @rem
2
+ @rem Copyright 2015 the original author or authors.
3
+ @rem
4
+ @rem Licensed under the Apache License, Version 2.0 (the "License");
5
+ @rem you may not use this file except in compliance with the License.
6
+ @rem You may obtain a copy of the License at
7
+ @rem
8
+ @rem https://www.apache.org/licenses/LICENSE-2.0
9
+ @rem
10
+ @rem Unless required by applicable law or agreed to in writing, software
11
+ @rem distributed under the License is distributed on an "AS IS" BASIS,
12
+ @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ @rem See the License for the specific language governing permissions and
14
+ @rem limitations under the License.
15
+ @rem
16
+ @rem SPDX-License-Identifier: Apache-2.0
17
+ @rem
18
+
19
+ @if "%DEBUG%"=="" @echo off
20
+ @rem ##########################################################################
21
+ @rem
22
+ @rem Gradle startup script for Windows
23
+ @rem
24
+ @rem ##########################################################################
25
+
26
+ @rem Set local scope for the variables with windows NT shell
27
+ if "%OS%"=="Windows_NT" setlocal
28
+
29
+ set DIRNAME=%~dp0
30
+ if "%DIRNAME%"=="" set DIRNAME=.
31
+ @rem This is normally unused
32
+ set APP_BASE_NAME=%~n0
33
+ set APP_HOME=%DIRNAME%
34
+
35
+ @rem Resolve any "." and ".." in APP_HOME to make it shorter.
36
+ for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
37
+
38
+ @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
39
+ set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
40
+
41
+ @rem Find java.exe
42
+ if defined JAVA_HOME goto findJavaFromJavaHome
43
+
44
+ set JAVA_EXE=java.exe
45
+ %JAVA_EXE% -version >NUL 2>&1
46
+ if %ERRORLEVEL% equ 0 goto execute
47
+
48
+ echo. 1>&2
49
+ echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50
+ echo. 1>&2
51
+ echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52
+ echo location of your Java installation. 1>&2
53
+
54
+ goto fail
55
+
56
+ :findJavaFromJavaHome
57
+ set JAVA_HOME=%JAVA_HOME:"=%
58
+ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
59
+
60
+ if exist "%JAVA_EXE%" goto execute
61
+
62
+ echo. 1>&2
63
+ echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64
+ echo. 1>&2
65
+ echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66
+ echo location of your Java installation. 1>&2
67
+
68
+ goto fail
69
+
70
+ :execute
71
+ @rem Setup the command line
72
+
73
+ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
74
+
75
+
76
+ @rem Execute Gradle
77
+ "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
78
+
79
+ :end
80
+ @rem End local scope for the variables with windows NT shell
81
+ if %ERRORLEVEL% equ 0 goto mainEnd
82
+
83
+ :fail
84
+ rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
85
+ rem the _cmd.exe /c_ return code!
86
+ set EXIT_CODE=%ERRORLEVEL%
87
+ if %EXIT_CODE% equ 0 set EXIT_CODE=1
88
+ if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
89
+ exit /b %EXIT_CODE%
90
+
91
+ :mainEnd
92
+ if "%OS%"=="Windows_NT" endlocal
93
+
94
+ :omega
@@ -32,6 +32,7 @@ public struct Input: View {
32
32
 
33
33
  @State private var isFocused: Bool = false
34
34
  @State private var isPasswordHidden: Bool = true
35
+ @State private var lastTextValue: String = ""
35
36
 
36
37
  public init(
37
38
  text: Binding<String>,
@@ -92,6 +93,14 @@ public struct Input: View {
92
93
  let textBinding = Binding<String>(
93
94
  get: { self.text },
94
95
  set: { newValue in
96
+ // For SecureField, infer focus when text changes
97
+ if self.secureTextEntry && !self.isFocused && newValue != self.lastTextValue {
98
+ DispatchQueue.main.async {
99
+ self.isFocused = true
100
+ self.onFocus?()
101
+ }
102
+ }
103
+ self.lastTextValue = newValue
95
104
  self.text = newValue
96
105
  self.onChangeText?(newValue)
97
106
  }
@@ -135,18 +144,17 @@ public struct Input: View {
135
144
  }
136
145
 
137
146
  if secureTextEntry && isPasswordHidden {
138
- SecureInputField(
139
- text: $text,
140
- keyboardType: keyboardType,
141
- fontSize: scaleSize(14),
142
- fontWeight: fontWeight == .bold ? .bold : .regular,
143
- textColor: UIColor(getTextColor()),
144
- isDisabled: disabled || readOnly,
145
- onFocusChange: { focused in
146
- handleFocusChange(focused)
147
- },
148
- onChangeText: onChangeText
149
- )
147
+ SecureField("", text: textBinding, onCommit: {
148
+ handleSecureFieldBlur()
149
+ })
150
+ .keyboardType(keyboardType)
151
+ .font(fontWeight == .bold ? .action_s_bold : .body_default_regular)
152
+ .foregroundColor(getTextColor())
153
+ .disabled(disabled || readOnly)
154
+ .applyPrimaryCursorColor()
155
+ .simultaneousGesture(TapGesture().onEnded {
156
+ handleSecureFieldFocus()
157
+ })
150
158
  } else {
151
159
  TextField("", text: textBinding, onEditingChanged: { focused in
152
160
  handleFocusChange(focused)
@@ -215,10 +223,26 @@ public struct Input: View {
215
223
  hintText: hintText
216
224
  )
217
225
  }
226
+ .onAppear {
227
+ lastTextValue = text
228
+ }
218
229
  .onReceive(NotificationCenter.default.publisher(for: UIResponder.keyboardWillHideNotification)) { _ in
219
- if isFocused && !secureTextEntry {
230
+ // Reset focus when keyboard is dismissed
231
+ if isFocused {
232
+ DispatchQueue.main.async {
233
+ if secureTextEntry {
234
+ handleSecureFieldBlur()
235
+ } else {
236
+ handleFocusChange(false)
237
+ }
238
+ }
239
+ }
240
+ }
241
+ .onReceive(NotificationCenter.default.publisher(for: UITextField.textDidEndEditingNotification)) { _ in
242
+ // Reset focus when any text field ends editing
243
+ if isFocused && secureTextEntry {
220
244
  DispatchQueue.main.async {
221
- handleFocusChange(false)
245
+ self.handleSecureFieldBlur()
222
246
  }
223
247
  }
224
248
  }
@@ -235,6 +259,18 @@ public struct Input: View {
235
259
  }
236
260
  }
237
261
 
262
+ private func handleSecureFieldFocus() {
263
+ if !isFocused {
264
+ isFocused = true
265
+ onFocus?()
266
+ }
267
+ }
268
+
269
+ private func handleSecureFieldBlur() {
270
+ isFocused = false
271
+ onBlur?()
272
+ }
273
+
238
274
  private func togglePasswordVisibility() {
239
275
  isPasswordHidden.toggle()
240
276
  onRightIconPressed?()
@@ -271,100 +307,6 @@ public struct Input: View {
271
307
  }
272
308
 
273
309
 
274
- // MARK: - Secure Input Field (UIViewRepresentable)
275
- private struct SecureInputField: UIViewRepresentable {
276
- @Binding var text: String
277
- var keyboardType: UIKeyboardType
278
- var fontSize: CGFloat
279
- var fontWeight: UIFont.Weight
280
- var textColor: UIColor
281
- var isDisabled: Bool
282
- var onFocusChange: (Bool) -> Void
283
- var onChangeText: ((String) -> Void)?
284
-
285
- func makeCoordinator() -> Coordinator {
286
- Coordinator(self)
287
- }
288
-
289
- func makeUIView(context: Context) -> UITextField {
290
- let textField = UITextField()
291
- textField.isSecureTextEntry = true
292
- textField.delegate = context.coordinator
293
- textField.keyboardType = keyboardType
294
- textField.font = UIFont.systemFont(ofSize: fontSize, weight: fontWeight)
295
- textField.textColor = textColor
296
- textField.isEnabled = !isDisabled
297
- textField.setContentHuggingPriority(.defaultLow, for: .horizontal)
298
- textField.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
299
- textField.text = text
300
- textField.tintColor = UIColor(Colors.primary)
301
- textField.addTarget(
302
- context.coordinator,
303
- action: #selector(Coordinator.textFieldDidChange(_:)),
304
- for: .editingChanged
305
- )
306
- return textField
307
- }
308
-
309
- func updateUIView(_ textField: UITextField, context: Context) {
310
- if textField.text != text {
311
- textField.text = text
312
- }
313
- textField.isEnabled = !isDisabled
314
- }
315
-
316
- class Coordinator: NSObject, UITextFieldDelegate {
317
- var parent: SecureInputField
318
- private var isResettingText = false
319
-
320
- init(_ parent: SecureInputField) {
321
- self.parent = parent
322
- }
323
-
324
- func textFieldDidBeginEditing(_ textField: UITextField) {
325
- let existingText = textField.text ?? ""
326
- if !existingText.isEmpty {
327
- // When a secure text field regains focus, iOS marks the
328
- // existing text as "committed". The next keystroke would
329
- // replace ALL committed text with the new character.
330
- // Prevent this by clearing and re-inserting via insertText(),
331
- // which puts the text into an "active editing" state.
332
- isResettingText = true
333
- textField.text = ""
334
- textField.insertText(existingText)
335
- isResettingText = false
336
- }
337
- parent.onFocusChange(true)
338
- }
339
-
340
- func textFieldDidEndEditing(_ textField: UITextField) {
341
- parent.text = textField.text ?? ""
342
- parent.onFocusChange(false)
343
- }
344
-
345
- func textField(
346
- _ textField: UITextField,
347
- shouldChangeCharactersIn range: NSRange,
348
- replacementString string: String
349
- ) -> Bool {
350
- if isResettingText { return true }
351
- return true
352
- }
353
-
354
- @objc func textFieldDidChange(_ textField: UITextField) {
355
- if isResettingText { return }
356
- let newText = textField.text ?? ""
357
- parent.text = newText
358
- parent.onChangeText?(newText)
359
- }
360
-
361
- func textFieldShouldReturn(_ textField: UITextField) -> Bool {
362
- textField.resignFirstResponder()
363
- return true
364
- }
365
- }
366
- }
367
-
368
310
  // MARK: - Helper Extension
369
311
  private extension View {
370
312
  func applyPrimaryCursorColor() -> some View {
@@ -0,0 +1,8 @@
1
+ ## This file must *NOT* be checked into Version Control Systems,
2
+ # as it contains information specific to your local configuration.
3
+ #
4
+ # Location of the SDK. This is only used by Gradle.
5
+ # For customization when using a Version Control System, please read the
6
+ # header note.
7
+ #Mon Dec 22 10:07:29 ICT 2025
8
+ sdk.dir=/Users/phuc/Library/Android/sdk
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.157.1-beta.9",
3
+ "version": "0.157.1-skill.1-debug",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},
@@ -0,0 +1,52 @@
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("http://nexus.mservice.com.vn:8081/repository/maven-public/")
23
+ isAllowInsecureProtocol = true
24
+ }
25
+ }
26
+ }
27
+
28
+ dependencyResolutionManagement {
29
+ repositories {
30
+ google {
31
+ mavenContent {
32
+ includeGroupAndSubgroups("androidx")
33
+ includeGroupAndSubgroups("com.android")
34
+ includeGroupAndSubgroups("com.google")
35
+ }
36
+ }
37
+ mavenCentral()
38
+ maven {
39
+ url = uri("https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven")
40
+ credentials {username = "download_packages"; password = "gldt-bjDqLpU_sPcHDuXau2ws" }
41
+ }
42
+ maven {
43
+ url = uri("http://nexus.mservice.com.vn:8081/repository/maven-public/")
44
+ isAllowInsecureProtocol = true
45
+ }
46
+ }
47
+ }
48
+
49
+ include(":compose")
50
+
51
+ include(":sample:androidApp")
52
+ include(":sample:shared")
@@ -1,14 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>SchemeUserState</key>
6
- <dict>
7
- <key>Example.xcscheme_^#shared#^_</key>
8
- <dict>
9
- <key>orderHint</key>
10
- <integer>7</integer>
11
- </dict>
12
- </dict>
13
- </dict>
14
- </plist>
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Bucket
3
- uuid = "DBF0EFAF-411F-4CB3-946D-C4AB48EBD7AE"
4
- type = "0"
5
- version = "2.0">
6
- </Bucket>
@@ -1,58 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Scheme
3
- LastUpgradeVersion = "1600"
4
- version = "1.3">
5
- <BuildAction
6
- parallelizeBuildables = "YES"
7
- buildImplicitDependencies = "YES">
8
- <BuildActionEntries>
9
- <BuildActionEntry
10
- buildForTesting = "YES"
11
- buildForRunning = "YES"
12
- buildForProfiling = "YES"
13
- buildForArchiving = "YES"
14
- buildForAnalyzing = "YES">
15
- <BuildableReference
16
- BuildableIdentifier = "primary"
17
- BlueprintIdentifier = "3B6FB503A75BF5BC1FA6F30BC06B9D28"
18
- BuildableName = "MoMoUIKits.framework"
19
- BlueprintName = "MoMoUIKits"
20
- ReferencedContainer = "container:Pods.xcodeproj">
21
- </BuildableReference>
22
- </BuildActionEntry>
23
- </BuildActionEntries>
24
- </BuildAction>
25
- <TestAction
26
- buildConfiguration = "Debug"
27
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
- shouldUseLaunchSchemeArgsEnv = "YES">
30
- <Testables>
31
- </Testables>
32
- </TestAction>
33
- <LaunchAction
34
- buildConfiguration = "Debug"
35
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37
- launchStyle = "0"
38
- useCustomWorkingDirectory = "NO"
39
- ignoresPersistentStateOnLaunch = "NO"
40
- debugDocumentVersioning = "YES"
41
- debugServiceExtension = "internal"
42
- allowLocationSimulation = "YES">
43
- </LaunchAction>
44
- <ProfileAction
45
- buildConfiguration = "Release"
46
- shouldUseLaunchSchemeArgsEnv = "YES"
47
- savedToolIdentifier = ""
48
- useCustomWorkingDirectory = "NO"
49
- debugDocumentVersioning = "YES">
50
- </ProfileAction>
51
- <AnalyzeAction
52
- buildConfiguration = "Debug">
53
- </AnalyzeAction>
54
- <ArchiveAction
55
- buildConfiguration = "Release"
56
- revealArchiveInOrganizer = "YES">
57
- </ArchiveAction>
58
- </Scheme>
@@ -1,58 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Scheme
3
- LastUpgradeVersion = "1600"
4
- version = "1.3">
5
- <BuildAction
6
- parallelizeBuildables = "YES"
7
- buildImplicitDependencies = "YES">
8
- <BuildActionEntries>
9
- <BuildActionEntry
10
- buildForTesting = "YES"
11
- buildForRunning = "YES"
12
- buildForProfiling = "YES"
13
- buildForArchiving = "YES"
14
- buildForAnalyzing = "YES">
15
- <BuildableReference
16
- BuildableIdentifier = "primary"
17
- BlueprintIdentifier = "0AEE99A309977BD12A049FF48AF9BA4B"
18
- BuildableName = "Pods_Example.framework"
19
- BlueprintName = "Pods-Example"
20
- ReferencedContainer = "container:Pods.xcodeproj">
21
- </BuildableReference>
22
- </BuildActionEntry>
23
- </BuildActionEntries>
24
- </BuildAction>
25
- <TestAction
26
- buildConfiguration = "Debug"
27
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
- shouldUseLaunchSchemeArgsEnv = "YES">
30
- <Testables>
31
- </Testables>
32
- </TestAction>
33
- <LaunchAction
34
- buildConfiguration = "Debug"
35
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37
- launchStyle = "0"
38
- useCustomWorkingDirectory = "NO"
39
- ignoresPersistentStateOnLaunch = "NO"
40
- debugDocumentVersioning = "YES"
41
- debugServiceExtension = "internal"
42
- allowLocationSimulation = "YES">
43
- </LaunchAction>
44
- <ProfileAction
45
- buildConfiguration = "Release"
46
- shouldUseLaunchSchemeArgsEnv = "YES"
47
- savedToolIdentifier = ""
48
- useCustomWorkingDirectory = "NO"
49
- debugDocumentVersioning = "YES">
50
- </ProfileAction>
51
- <AnalyzeAction
52
- buildConfiguration = "Debug">
53
- </AnalyzeAction>
54
- <ArchiveAction
55
- buildConfiguration = "Release"
56
- revealArchiveInOrganizer = "YES">
57
- </ArchiveAction>
58
- </Scheme>
@@ -1,58 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Scheme
3
- LastUpgradeVersion = "1600"
4
- version = "1.3">
5
- <BuildAction
6
- parallelizeBuildables = "YES"
7
- buildImplicitDependencies = "YES">
8
- <BuildActionEntries>
9
- <BuildActionEntry
10
- buildForTesting = "YES"
11
- buildForRunning = "YES"
12
- buildForProfiling = "YES"
13
- buildForArchiving = "YES"
14
- buildForAnalyzing = "YES">
15
- <BuildableReference
16
- BuildableIdentifier = "primary"
17
- BlueprintIdentifier = "3847153A6E5EEFB86565BA840768F429"
18
- BuildableName = "SDWebImage.framework"
19
- BlueprintName = "SDWebImage"
20
- ReferencedContainer = "container:Pods.xcodeproj">
21
- </BuildableReference>
22
- </BuildActionEntry>
23
- </BuildActionEntries>
24
- </BuildAction>
25
- <TestAction
26
- buildConfiguration = "Debug"
27
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
- shouldUseLaunchSchemeArgsEnv = "YES">
30
- <Testables>
31
- </Testables>
32
- </TestAction>
33
- <LaunchAction
34
- buildConfiguration = "Debug"
35
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37
- launchStyle = "0"
38
- useCustomWorkingDirectory = "NO"
39
- ignoresPersistentStateOnLaunch = "NO"
40
- debugDocumentVersioning = "YES"
41
- debugServiceExtension = "internal"
42
- allowLocationSimulation = "YES">
43
- </LaunchAction>
44
- <ProfileAction
45
- buildConfiguration = "Release"
46
- shouldUseLaunchSchemeArgsEnv = "YES"
47
- savedToolIdentifier = ""
48
- useCustomWorkingDirectory = "NO"
49
- debugDocumentVersioning = "YES">
50
- </ProfileAction>
51
- <AnalyzeAction
52
- buildConfiguration = "Debug">
53
- </AnalyzeAction>
54
- <ArchiveAction
55
- buildConfiguration = "Release"
56
- revealArchiveInOrganizer = "YES">
57
- </ArchiveAction>
58
- </Scheme>
@@ -1,58 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Scheme
3
- LastUpgradeVersion = "1600"
4
- version = "1.3">
5
- <BuildAction
6
- parallelizeBuildables = "YES"
7
- buildImplicitDependencies = "YES">
8
- <BuildActionEntries>
9
- <BuildActionEntry
10
- buildForTesting = "YES"
11
- buildForRunning = "YES"
12
- buildForProfiling = "YES"
13
- buildForArchiving = "YES"
14
- buildForAnalyzing = "YES">
15
- <BuildableReference
16
- BuildableIdentifier = "primary"
17
- BlueprintIdentifier = "92EBFA3E7005B4C18A9C0B44324EB80F"
18
- BuildableName = "SDWebImageSwiftUI.framework"
19
- BlueprintName = "SDWebImageSwiftUI"
20
- ReferencedContainer = "container:Pods.xcodeproj">
21
- </BuildableReference>
22
- </BuildActionEntry>
23
- </BuildActionEntries>
24
- </BuildAction>
25
- <TestAction
26
- buildConfiguration = "Debug"
27
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
- shouldUseLaunchSchemeArgsEnv = "YES">
30
- <Testables>
31
- </Testables>
32
- </TestAction>
33
- <LaunchAction
34
- buildConfiguration = "Debug"
35
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37
- launchStyle = "0"
38
- useCustomWorkingDirectory = "NO"
39
- ignoresPersistentStateOnLaunch = "NO"
40
- debugDocumentVersioning = "YES"
41
- debugServiceExtension = "internal"
42
- allowLocationSimulation = "YES">
43
- </LaunchAction>
44
- <ProfileAction
45
- buildConfiguration = "Release"
46
- shouldUseLaunchSchemeArgsEnv = "YES"
47
- savedToolIdentifier = ""
48
- useCustomWorkingDirectory = "NO"
49
- debugDocumentVersioning = "YES">
50
- </ProfileAction>
51
- <AnalyzeAction
52
- buildConfiguration = "Debug">
53
- </AnalyzeAction>
54
- <ArchiveAction
55
- buildConfiguration = "Release"
56
- revealArchiveInOrganizer = "YES">
57
- </ArchiveAction>
58
- </Scheme>