@momo-kits/native-kits 0.89.30-rc.6 → 0.89.30-rc.7
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/application/Components.kt +2 -5
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +1 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +6 -6
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PromotionPopup.kt +2 -3
- package/package.json +1 -1
|
@@ -4,7 +4,6 @@ import androidx.compose.animation.animateColorAsState
|
|
|
4
4
|
import androidx.compose.foundation.background
|
|
5
5
|
import androidx.compose.foundation.border
|
|
6
6
|
import androidx.compose.foundation.clickable
|
|
7
|
-
import androidx.compose.foundation.interaction.MutableInteractionSource
|
|
8
7
|
import androidx.compose.foundation.layout.Arrangement
|
|
9
8
|
import androidx.compose.foundation.layout.Box
|
|
10
9
|
import androidx.compose.foundation.layout.BoxWithConstraints
|
|
@@ -16,7 +15,6 @@ import androidx.compose.foundation.layout.padding
|
|
|
16
15
|
import androidx.compose.foundation.layout.size
|
|
17
16
|
import androidx.compose.foundation.layout.width
|
|
18
17
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
|
19
|
-
import androidx.compose.material.ripple.rememberRipple
|
|
20
18
|
import androidx.compose.runtime.Composable
|
|
21
19
|
import androidx.compose.runtime.LaunchedEffect
|
|
22
20
|
import androidx.compose.runtime.getValue
|
|
@@ -185,8 +183,7 @@ fun Header(
|
|
|
185
183
|
)
|
|
186
184
|
.padding(Spacing.XS)
|
|
187
185
|
.semantics {
|
|
188
|
-
|
|
189
|
-
"btn_navigation_back"
|
|
186
|
+
testTag = "btn_navigation_back"
|
|
190
187
|
},
|
|
191
188
|
contentAlignment = Alignment.Center
|
|
192
189
|
) {
|
|
@@ -225,7 +222,7 @@ fun Header(
|
|
|
225
222
|
title = title,
|
|
226
223
|
color = if (headerType == HeaderType.SURFACE && animatedHeader !== null) tintIconColorAnim else tintIconColor,
|
|
227
224
|
modifier = Modifier.semantics {
|
|
228
|
-
contentDescription =
|
|
225
|
+
contentDescription = title
|
|
229
226
|
testTag = "title_navigation_header"
|
|
230
227
|
}
|
|
231
228
|
)
|
|
@@ -260,7 +260,7 @@ fun Button(
|
|
|
260
260
|
minWidth = size.value.width
|
|
261
261
|
).height(size.value.height)
|
|
262
262
|
.semantics {
|
|
263
|
-
contentDescription =
|
|
263
|
+
contentDescription = title; testTag = testId
|
|
264
264
|
},
|
|
265
265
|
horizontalArrangement = Arrangement.Center,
|
|
266
266
|
verticalAlignment = Alignment.CenterVertically,
|
|
@@ -204,7 +204,7 @@ fun Input(
|
|
|
204
204
|
val testId = if (disabled) "input_${floatingValue}_disabled" else "input_$floatingValue"
|
|
205
205
|
|
|
206
206
|
Column(modifier = Modifier.semantics {
|
|
207
|
-
contentDescription =
|
|
207
|
+
contentDescription = floatingValue; testTag = testId
|
|
208
208
|
}) {
|
|
209
209
|
BasicTextField(
|
|
210
210
|
enabled = !disabled,
|
|
@@ -17,7 +17,6 @@ import androidx.compose.runtime.MutableState
|
|
|
17
17
|
import androidx.compose.runtime.getValue
|
|
18
18
|
import androidx.compose.runtime.mutableStateOf
|
|
19
19
|
import androidx.compose.runtime.remember
|
|
20
|
-
import androidx.compose.runtime.setValue
|
|
21
20
|
import androidx.compose.ui.Alignment
|
|
22
21
|
import androidx.compose.ui.Modifier
|
|
23
22
|
import androidx.compose.ui.graphics.Color
|
|
@@ -78,7 +77,7 @@ fun InputDropDown(
|
|
|
78
77
|
val testId = if (disabled) "input_${floatingValue}_disabled" else "input_$floatingValue"
|
|
79
78
|
|
|
80
79
|
Column(modifier = Modifier.clickable(enabled = !disabled, onClick = onPress).semantics {
|
|
81
|
-
contentDescription =
|
|
80
|
+
contentDescription = floatingValue; testTag = testId
|
|
82
81
|
}) {
|
|
83
82
|
Box {
|
|
84
83
|
if (floatingValue.isNotEmpty() || floatingIcon.isNotEmpty()) {
|
|
@@ -110,7 +110,7 @@ fun InputMoney(
|
|
|
110
110
|
val testId = if (disabled) "input_${floatingValue}_disabled" else "input_$floatingValue"
|
|
111
111
|
|
|
112
112
|
Column(modifier = Modifier.semantics {
|
|
113
|
-
contentDescription =
|
|
113
|
+
contentDescription = floatingValue; testTag = testId
|
|
114
114
|
}) {
|
|
115
115
|
BasicTextField(
|
|
116
116
|
enabled = !disabled,
|
|
@@ -97,7 +97,7 @@ fun PopupNotify(
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
Box(Modifier.semantics {
|
|
100
|
-
contentDescription =
|
|
100
|
+
contentDescription = title; testTag = "popup_notify"
|
|
101
101
|
}, contentAlignment = Alignment.TopEnd) {
|
|
102
102
|
Column(
|
|
103
103
|
modifier = Modifier
|
|
@@ -166,7 +166,7 @@ fun PopupNotify(
|
|
|
166
166
|
color = AppTheme.current.colors.background.surface,
|
|
167
167
|
size = 14.dp,
|
|
168
168
|
modifier = Modifier.semantics {
|
|
169
|
-
|
|
169
|
+
testTag = "ic_popup_close"
|
|
170
170
|
}
|
|
171
171
|
)
|
|
172
172
|
}
|
|
@@ -235,7 +235,7 @@ fun renderRow(
|
|
|
235
235
|
title = it.title,
|
|
236
236
|
type = ButtonType.TEXT,
|
|
237
237
|
modifier = Modifier.semantics {
|
|
238
|
-
contentDescription =
|
|
238
|
+
contentDescription = it.title; testTag = "btn_popup_cancel"
|
|
239
239
|
}
|
|
240
240
|
)
|
|
241
241
|
}
|
|
@@ -250,7 +250,7 @@ fun renderRow(
|
|
|
250
250
|
},
|
|
251
251
|
title = primary?.title ?: "",
|
|
252
252
|
modifier = Modifier.semantics {
|
|
253
|
-
contentDescription = "
|
|
253
|
+
contentDescription = primary?.title ?: ""; testTag = "btn_popup_allow"
|
|
254
254
|
}
|
|
255
255
|
)
|
|
256
256
|
}
|
|
@@ -273,7 +273,7 @@ fun renderColumn(
|
|
|
273
273
|
},
|
|
274
274
|
title = primary?.title ?: "",
|
|
275
275
|
modifier = Modifier.semantics {
|
|
276
|
-
contentDescription = "
|
|
276
|
+
contentDescription = primary?.title ?: ""; testTag = "btn_popup_allow"
|
|
277
277
|
}
|
|
278
278
|
)
|
|
279
279
|
secondary?.let {
|
|
@@ -288,7 +288,7 @@ fun renderColumn(
|
|
|
288
288
|
title = it.title,
|
|
289
289
|
type = ButtonType.TEXT,
|
|
290
290
|
modifier = Modifier.semantics {
|
|
291
|
-
contentDescription =
|
|
291
|
+
contentDescription = it.title; testTag = "btn_popup_cancel"
|
|
292
292
|
}
|
|
293
293
|
)
|
|
294
294
|
}
|
|
@@ -17,7 +17,6 @@ import androidx.compose.runtime.remember
|
|
|
17
17
|
import androidx.compose.ui.Alignment
|
|
18
18
|
import androidx.compose.ui.Modifier
|
|
19
19
|
import androidx.compose.ui.draw.clip
|
|
20
|
-
import androidx.compose.ui.semantics.contentDescription
|
|
21
20
|
import androidx.compose.ui.semantics.semantics
|
|
22
21
|
import androidx.compose.ui.semantics.testTag
|
|
23
22
|
import androidx.compose.ui.unit.dp
|
|
@@ -30,7 +29,7 @@ fun PromotionPopup(
|
|
|
30
29
|
source: String = "",
|
|
31
30
|
onClose: (() -> Unit) = {},
|
|
32
31
|
) {
|
|
33
|
-
Column(Modifier.semantics {
|
|
32
|
+
Column(Modifier.semantics { testTag = "popup_notify" }) {
|
|
34
33
|
if (source.isNotEmpty()) {
|
|
35
34
|
Image(
|
|
36
35
|
source = source,
|
|
@@ -69,7 +68,7 @@ fun PromotionPopup(
|
|
|
69
68
|
color = AppTheme.current.colors.background.surface,
|
|
70
69
|
size = 14.dp,
|
|
71
70
|
modifier = Modifier.semantics {
|
|
72
|
-
|
|
71
|
+
testTag = "ic_popup_close"
|
|
73
72
|
}
|
|
74
73
|
)
|
|
75
74
|
}
|