@momo-kits/native-kits 0.156.6-beta.2-debug → 0.156.6-beta.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.
package/compose/build.gradle.kts
CHANGED
|
@@ -370,9 +370,14 @@ private class LiteScreenHeaderPolicy(
|
|
|
370
370
|
maxWidth = (realConstraints.maxWidth * (1 - scrollPercent)).toInt()
|
|
371
371
|
.coerceAtLeast(minWidth)
|
|
372
372
|
)
|
|
373
|
-
} else
|
|
374
|
-
|
|
375
|
-
|
|
373
|
+
} else {
|
|
374
|
+
var spaceConsumed = 0
|
|
375
|
+
if (backIconPlaceable.safeWidth != 0) spaceConsumed += backIconPlaceable.safeWidth + spacing12
|
|
376
|
+
if (headerRightPlaceable.safeWidth != 0) spaceConsumed += headerRightPlaceable.safeWidth + spacing12
|
|
377
|
+
realConstraints.copy(
|
|
378
|
+
maxWidth = realConstraints.maxWidth - spaceConsumed
|
|
379
|
+
)
|
|
380
|
+
}
|
|
376
381
|
val inputSearchPlaceable = measurables.find { it.layoutId == HeaderId.INPUT_SEARCH_ID }
|
|
377
382
|
?.measure(inputSearchConstraints)
|
|
378
383
|
val titlePlaceable = measurables.find { it.layoutId == HeaderId.TITLE_ID }?.measure(
|
|
@@ -516,7 +521,7 @@ private fun LiteInputSearch(
|
|
|
516
521
|
|
|
517
522
|
val isShowBtnText by remember(inputSearchProps.isShowBtnText, inputSearchProps.btnText) {
|
|
518
523
|
derivedStateOf {
|
|
519
|
-
inputSearchProps.isShowBtnText && inputSearchProps.btnText.isNullOrEmpty()
|
|
524
|
+
inputSearchProps.isShowBtnText && !inputSearchProps.btnText.isNullOrEmpty()
|
|
520
525
|
}
|
|
521
526
|
}
|
|
522
527
|
val inputFieldStyle = remember(theme) {
|
|
@@ -21,7 +21,8 @@ public struct InputPhoneNumber: View {
|
|
|
21
21
|
public var onFocus: (() -> Void)?
|
|
22
22
|
public var onBlur: (() -> Void)?
|
|
23
23
|
public var onRightIconPressed: (() -> Void)?
|
|
24
|
-
|
|
24
|
+
public var inputAccessibilityId: String
|
|
25
|
+
|
|
25
26
|
@State private var isFocused: Bool = false
|
|
26
27
|
|
|
27
28
|
public init(
|
|
@@ -38,7 +39,8 @@ public struct InputPhoneNumber: View {
|
|
|
38
39
|
onChangeText: ((String) -> Void)? = nil,
|
|
39
40
|
onFocus: (() -> Void)? = nil,
|
|
40
41
|
onBlur: (() -> Void)? = nil,
|
|
41
|
-
onRightIconPressed: (() -> Void)? = nil
|
|
42
|
+
onRightIconPressed: (() -> Void)? = nil,
|
|
43
|
+
inputAccessibilityId: String = ""
|
|
42
44
|
) {
|
|
43
45
|
self._text = text
|
|
44
46
|
self.placeholder = placeholder
|
|
@@ -53,6 +55,7 @@ public struct InputPhoneNumber: View {
|
|
|
53
55
|
self.onFocus = onFocus
|
|
54
56
|
self.onBlur = onBlur
|
|
55
57
|
self.onRightIconPressed = onRightIconPressed
|
|
58
|
+
self.inputAccessibilityId = inputAccessibilityId
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
// MARK: - Body
|
|
@@ -94,6 +97,7 @@ public struct InputPhoneNumber: View {
|
|
|
94
97
|
.foregroundColor(Colors.black17)
|
|
95
98
|
.applyPrimaryCursorColor()
|
|
96
99
|
.lineLimit(1)
|
|
100
|
+
.accessibility(identifier: inputAccessibilityId)
|
|
97
101
|
}
|
|
98
102
|
|
|
99
103
|
// Clear button
|
|
@@ -113,7 +113,11 @@ public struct PopupDisplay: View {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
VStack(spacing: 0) {
|
|
116
|
-
if(
|
|
116
|
+
if(url.isEmpty) {
|
|
117
|
+
Icon(source: "media_fail")
|
|
118
|
+
.frame(width: .infinity, height: 184)
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
117
121
|
WebImage(url: URL(string: url), isAnimating: .constant(true))
|
|
118
122
|
.resizable()
|
|
119
123
|
.placeholder {
|