@momo-kits/native-kits 0.89.30-rc.6 → 0.89.30-rc.8
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 +4 -6
- 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,19 +4,18 @@ 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
|
|
11
10
|
import androidx.compose.foundation.layout.Row
|
|
12
11
|
import androidx.compose.foundation.layout.Spacer
|
|
12
|
+
import androidx.compose.foundation.layout.fillMaxSize
|
|
13
13
|
import androidx.compose.foundation.layout.fillMaxWidth
|
|
14
14
|
import androidx.compose.foundation.layout.height
|
|
15
15
|
import androidx.compose.foundation.layout.padding
|
|
16
16
|
import androidx.compose.foundation.layout.size
|
|
17
17
|
import androidx.compose.foundation.layout.width
|
|
18
18
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
|
19
|
-
import androidx.compose.material.ripple.rememberRipple
|
|
20
19
|
import androidx.compose.runtime.Composable
|
|
21
20
|
import androidx.compose.runtime.LaunchedEffect
|
|
22
21
|
import androidx.compose.runtime.getValue
|
|
@@ -82,7 +81,7 @@ fun HeaderImage(
|
|
|
82
81
|
Image(
|
|
83
82
|
source = headerBackground ?: "",
|
|
84
83
|
loading = false,
|
|
85
|
-
modifier = Modifier.
|
|
84
|
+
modifier = Modifier.fillMaxSize(),
|
|
86
85
|
options = Options(
|
|
87
86
|
contentScale = ContentScale.FillWidth
|
|
88
87
|
)
|
|
@@ -185,8 +184,7 @@ fun Header(
|
|
|
185
184
|
)
|
|
186
185
|
.padding(Spacing.XS)
|
|
187
186
|
.semantics {
|
|
188
|
-
|
|
189
|
-
"btn_navigation_back"
|
|
187
|
+
testTag = "btn_navigation_back"
|
|
190
188
|
},
|
|
191
189
|
contentAlignment = Alignment.Center
|
|
192
190
|
) {
|
|
@@ -225,7 +223,7 @@ fun Header(
|
|
|
225
223
|
title = title,
|
|
226
224
|
color = if (headerType == HeaderType.SURFACE && animatedHeader !== null) tintIconColorAnim else tintIconColor,
|
|
227
225
|
modifier = Modifier.semantics {
|
|
228
|
-
contentDescription =
|
|
226
|
+
contentDescription = title
|
|
229
227
|
testTag = "title_navigation_header"
|
|
230
228
|
}
|
|
231
229
|
)
|
|
@@ -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
|
}
|