@momo-kits/native-kits 0.156.6-beta.2 → 0.156.6-beta.3
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.
|
@@ -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 {
|