@momo-kits/native-kits 0.89.30-beta.10 → 0.89.30-beta.22
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/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +8 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +8 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +7 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +7 -1
- package/package.json +1 -1
|
@@ -18,6 +18,9 @@ import androidx.compose.ui.Alignment
|
|
|
18
18
|
import androidx.compose.ui.Modifier
|
|
19
19
|
import androidx.compose.ui.draw.clip
|
|
20
20
|
import androidx.compose.ui.graphics.Color
|
|
21
|
+
import androidx.compose.ui.semantics.contentDescription
|
|
22
|
+
import androidx.compose.ui.semantics.semantics
|
|
23
|
+
import androidx.compose.ui.semantics.testTag
|
|
21
24
|
import androidx.compose.ui.text.TextStyle
|
|
22
25
|
import androidx.compose.ui.text.style.TextOverflow
|
|
23
26
|
import androidx.compose.ui.unit.Dp
|
|
@@ -233,6 +236,7 @@ fun Button(
|
|
|
233
236
|
isFull: Boolean = true,
|
|
234
237
|
modifier: Modifier = Modifier,
|
|
235
238
|
) {
|
|
239
|
+
val testId = "btn_${type.toString().lowercase()}_$title"
|
|
236
240
|
val customModifier = if (isFull) {
|
|
237
241
|
modifier
|
|
238
242
|
.fillMaxWidth()
|
|
@@ -254,7 +258,10 @@ fun Button(
|
|
|
254
258
|
.padding(horizontal = size.value.padding)
|
|
255
259
|
.defaultMinSize(
|
|
256
260
|
minWidth = size.value.width
|
|
257
|
-
).height(size.value.height)
|
|
261
|
+
).height(size.value.height)
|
|
262
|
+
.semantics {
|
|
263
|
+
contentDescription = testId; testTag = testId
|
|
264
|
+
},
|
|
258
265
|
horizontalArrangement = Arrangement.Center,
|
|
259
266
|
verticalAlignment = Alignment.CenterVertically,
|
|
260
267
|
) {
|
|
@@ -29,6 +29,9 @@ import androidx.compose.ui.Alignment
|
|
|
29
29
|
import androidx.compose.ui.Modifier
|
|
30
30
|
import androidx.compose.ui.focus.onFocusChanged
|
|
31
31
|
import androidx.compose.ui.graphics.Color
|
|
32
|
+
import androidx.compose.ui.semantics.contentDescription
|
|
33
|
+
import androidx.compose.ui.semantics.semantics
|
|
34
|
+
import androidx.compose.ui.semantics.testTag
|
|
32
35
|
import androidx.compose.ui.text.TextStyle
|
|
33
36
|
import androidx.compose.ui.text.font.FontWeight
|
|
34
37
|
import androidx.compose.ui.text.input.KeyboardType
|
|
@@ -198,7 +201,11 @@ fun Input(
|
|
|
198
201
|
iconTintColor = disabledColor
|
|
199
202
|
}
|
|
200
203
|
|
|
201
|
-
|
|
204
|
+
val testId = if (disabled) "input_${floatingValue}_disabled" else "input_$floatingValue"
|
|
205
|
+
|
|
206
|
+
Column(modifier = Modifier.semantics {
|
|
207
|
+
contentDescription = testId; testTag = testId
|
|
208
|
+
}) {
|
|
202
209
|
BasicTextField(
|
|
203
210
|
enabled = !disabled,
|
|
204
211
|
readOnly = readOnly,
|
|
@@ -21,6 +21,9 @@ import androidx.compose.runtime.setValue
|
|
|
21
21
|
import androidx.compose.ui.Alignment
|
|
22
22
|
import androidx.compose.ui.Modifier
|
|
23
23
|
import androidx.compose.ui.graphics.Color
|
|
24
|
+
import androidx.compose.ui.semantics.contentDescription
|
|
25
|
+
import androidx.compose.ui.semantics.semantics
|
|
26
|
+
import androidx.compose.ui.semantics.testTag
|
|
24
27
|
import androidx.compose.ui.text.TextStyle
|
|
25
28
|
import androidx.compose.ui.unit.dp
|
|
26
29
|
import androidx.compose.ui.unit.sp
|
|
@@ -72,8 +75,11 @@ fun InputDropDown(
|
|
|
72
75
|
iconTintColor = disabledColor
|
|
73
76
|
}
|
|
74
77
|
|
|
78
|
+
val testId = if (disabled) "input_${floatingValue}_disabled" else "input_$floatingValue"
|
|
75
79
|
|
|
76
|
-
Column(modifier = Modifier.clickable(enabled = !disabled, onClick = onPress)
|
|
80
|
+
Column(modifier = Modifier.clickable(enabled = !disabled, onClick = onPress).semantics {
|
|
81
|
+
contentDescription = testId; testTag = testId
|
|
82
|
+
}) {
|
|
77
83
|
Box {
|
|
78
84
|
if (floatingValue.isNotEmpty() || floatingIcon.isNotEmpty()) {
|
|
79
85
|
Box(
|
|
@@ -27,6 +27,9 @@ import androidx.compose.ui.Alignment
|
|
|
27
27
|
import androidx.compose.ui.Modifier
|
|
28
28
|
import androidx.compose.ui.focus.onFocusChanged
|
|
29
29
|
import androidx.compose.ui.graphics.Color
|
|
30
|
+
import androidx.compose.ui.semantics.contentDescription
|
|
31
|
+
import androidx.compose.ui.semantics.semantics
|
|
32
|
+
import androidx.compose.ui.semantics.testTag
|
|
30
33
|
import androidx.compose.ui.text.AnnotatedString
|
|
31
34
|
import androidx.compose.ui.text.TextStyle
|
|
32
35
|
import androidx.compose.ui.text.input.KeyboardType
|
|
@@ -104,8 +107,11 @@ fun InputMoney(
|
|
|
104
107
|
iconTintColor = disabledColor
|
|
105
108
|
}
|
|
106
109
|
|
|
110
|
+
val testId = if (disabled) "input_${floatingValue}_disabled" else "input_$floatingValue"
|
|
107
111
|
|
|
108
|
-
Column {
|
|
112
|
+
Column(modifier = Modifier.semantics {
|
|
113
|
+
contentDescription = testId; testTag = testId
|
|
114
|
+
}) {
|
|
109
115
|
BasicTextField(
|
|
110
116
|
enabled = !disabled,
|
|
111
117
|
singleLine = true,
|