@momo-kits/native-kits 0.156.1-sp.2-debug → 0.156.1-sp.3-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.
@@ -40,7 +40,7 @@ kotlin {
40
40
  }
41
41
 
42
42
  cocoapods {
43
- version = "0.156.1-sp.2-debug"
43
+ version = "0.156.1-sp.3-debug"
44
44
  summary = "IOS Shared module"
45
45
  homepage = "https://momo.vn"
46
46
  ios.deploymentTarget = "15.0"
package/gradle.properties CHANGED
@@ -18,7 +18,7 @@ kotlin.apple.xcodeCompatibility.nowarn=true
18
18
  name="ComposeKits"
19
19
  group=vn.momo.kits
20
20
  artifact.id=kits
21
- version=0.156.1-sp.2
21
+ version=0.156.1-sp.3
22
22
 
23
23
  repo=GitLab
24
24
  url=https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven
@@ -29,8 +29,9 @@ public struct Input: View {
29
29
  public var onBlur: (() -> Void)?
30
30
  public var onRightIconPressed: (() -> Void)?
31
31
 
32
- @FocusState private var isFocused: Bool
32
+ @State private var isFocused: Bool = false
33
33
  @State private var isPasswordHidden: Bool = true
34
+ @FocusState private var isTextFieldFocused: Bool
34
35
 
35
36
  public init(
36
37
  text: Binding<String>,
@@ -132,7 +133,7 @@ public struct Input: View {
132
133
  .foregroundColor(getTextColor())
133
134
  .disabled(disabled || readOnly)
134
135
  .applyPrimaryCursorColor()
135
- .focused($isFocused)
136
+ .focused($isTextFieldFocused)
136
137
  .onChange(of: text) { newValue in
137
138
  onChangeText?(newValue)
138
139
  }
@@ -145,7 +146,7 @@ public struct Input: View {
145
146
  .foregroundColor(getTextColor())
146
147
  .disabled(disabled || readOnly)
147
148
  .applyPrimaryCursorColor()
148
- .focused($isFocused)
149
+ .focused($isTextFieldFocused)
149
150
  .onChange(of: text) { newValue in
150
151
  onChangeText?(newValue)
151
152
  }
@@ -206,11 +207,11 @@ public struct Input: View {
206
207
  .onAppear {
207
208
  if autofocus {
208
209
  DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
209
- isFocused = true
210
+ isTextFieldFocused = true
210
211
  }
211
212
  }
212
213
  }
213
- .onChange(of: isFocused) { newValue in
214
+ .onChange(of: isTextFieldFocused) { newValue in
214
215
  isFocused = newValue
215
216
  if newValue {
216
217
  onFocus?()
@@ -224,6 +225,7 @@ public struct Input: View {
224
225
 
225
226
  private func handleFocusChange(_ focused: Bool) {
226
227
  isFocused = focused
228
+ isTextFieldFocused = focused
227
229
  if focused {
228
230
  onFocus?()
229
231
  } else {
@@ -22,7 +22,8 @@ public struct InputPhoneNumber: View {
22
22
  public var onBlur: (() -> Void)?
23
23
  public var onRightIconPressed: (() -> Void)?
24
24
 
25
- @FocusState private var isFocused: Bool
25
+ @State private var isFocused: Bool = false
26
+ @FocusState private var isTextFieldFocused: Bool
26
27
 
27
28
  public init(
28
29
  text: Binding<String>,
@@ -86,7 +87,7 @@ public struct InputPhoneNumber: View {
86
87
  .foregroundColor(Colors.black17)
87
88
  .applyPrimaryCursorColor()
88
89
  .lineLimit(1)
89
- .focused($isFocused)
90
+ .focused($isTextFieldFocused)
90
91
  .onChange(of: text) { newValue in
91
92
  onChangeText?(newValue)
92
93
  }
@@ -136,7 +137,7 @@ public struct InputPhoneNumber: View {
136
137
  if autofocus {
137
138
  // Small delay to ensure the view is fully loaded
138
139
  DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
139
- isFocused = true
140
+ isTextFieldFocused = true
140
141
  }
141
142
  }
142
143
  }
@@ -146,6 +147,7 @@ public struct InputPhoneNumber: View {
146
147
 
147
148
  private func handleFocusChange(_ focused: Bool) {
148
149
  isFocused = focused
150
+ isTextFieldFocused = focused
149
151
  if focused {
150
152
  onFocus?()
151
153
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.156.1-sp.2-debug",
3
+ "version": "0.156.1-sp.3-debug",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},