@momo-kits/native-kits 0.156.6-beta.2 → 0.156.6-beta.20
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/ios/Input/Input.swift
CHANGED
|
@@ -174,7 +174,7 @@ public struct Input: View {
|
|
|
174
174
|
onChangeText?("")
|
|
175
175
|
}) {
|
|
176
176
|
Icon(source: "24_navigation_close_circle_full", size: 16, color: Colors.black12)
|
|
177
|
-
.padding(.leading, Spacing.S)
|
|
177
|
+
.padding(.leading, Spacing.S).accessibility("ic_clear")
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
|
|
@@ -194,7 +194,7 @@ public struct Input: View {
|
|
|
194
194
|
size: 24,
|
|
195
195
|
color: rightIconColor
|
|
196
196
|
)
|
|
197
|
-
.padding(.leading, Spacing.S)
|
|
197
|
+
.padding(.leading, Spacing.S).accessibility("ic_show_hide")
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
} else if !rightIcon.isEmpty {
|
|
@@ -21,6 +21,7 @@ public struct InputPhoneNumber: View {
|
|
|
21
21
|
public var onFocus: (() -> Void)?
|
|
22
22
|
public var onBlur: (() -> Void)?
|
|
23
23
|
public var onRightIconPressed: (() -> Void)?
|
|
24
|
+
public var accessibilityLabel: String?
|
|
24
25
|
|
|
25
26
|
@State private var isFocused: Bool = false
|
|
26
27
|
|
|
@@ -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
|
+
accessibilityLabel: String? = nil
|
|
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.accessibilityLabel = accessibilityLabel
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
// MARK: - Body
|
|
@@ -86,7 +89,7 @@ public struct InputPhoneNumber: View {
|
|
|
86
89
|
MomoText(placeholder, typography: size == .small ? .headerSSemibold : .headerMBold, color: Colors.black12)
|
|
87
90
|
}
|
|
88
91
|
|
|
89
|
-
TextField(
|
|
92
|
+
TextField(placeholder, text: textBinding, onEditingChanged: { focused in
|
|
90
93
|
handleFocusChange(focused)
|
|
91
94
|
})
|
|
92
95
|
.keyboardType(.numberPad)
|
|
@@ -94,6 +97,7 @@ public struct InputPhoneNumber: View {
|
|
|
94
97
|
.foregroundColor(Colors.black17)
|
|
95
98
|
.applyPrimaryCursorColor()
|
|
96
99
|
.lineLimit(1)
|
|
100
|
+
.accessibility(identifier: accessibilityLabel ?? "")
|
|
97
101
|
}
|
|
98
102
|
|
|
99
103
|
// Clear button
|
|
@@ -103,7 +107,7 @@ public struct InputPhoneNumber: View {
|
|
|
103
107
|
onChangeText?("")
|
|
104
108
|
}) {
|
|
105
109
|
Icon(source: "24_navigation_close_circle_full", size: 16, color: Colors.black12)
|
|
106
|
-
.padding(.leading, Spacing.S)
|
|
110
|
+
.padding(.leading, Spacing.S).accessibility("ic_clear")
|
|
107
111
|
}
|
|
108
112
|
}
|
|
109
113
|
|
|
@@ -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 {
|