@momo-kits/native-kits 0.89.32-nav.12 → 0.89.32-nav.14
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 +3 -4
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +0 -2
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +1 -5
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +5 -6
- package/package.json +1 -1
|
@@ -162,9 +162,8 @@ fun Header(
|
|
|
162
162
|
headerType: HeaderType = HeaderType.DEFAULT,
|
|
163
163
|
titlePosition: TitlePosition,
|
|
164
164
|
title: String,
|
|
165
|
-
isBack: Boolean,
|
|
166
165
|
headerRight: @Composable (() -> Unit)? = null,
|
|
167
|
-
goBack: (() -> Unit)
|
|
166
|
+
goBack: (() -> Unit)?,
|
|
168
167
|
opacity: Float? = null,
|
|
169
168
|
animatedHeader: AnimatedHeader? = null,
|
|
170
169
|
useSearchInput: Boolean? = false,
|
|
@@ -215,7 +214,7 @@ fun Header(
|
|
|
215
214
|
horizontalArrangement = Arrangement.SpaceBetween
|
|
216
215
|
) {
|
|
217
216
|
Box {
|
|
218
|
-
if (
|
|
217
|
+
if (goBack !== null) {
|
|
219
218
|
Box(
|
|
220
219
|
modifier = Modifier
|
|
221
220
|
.size(28.dp)
|
|
@@ -263,7 +262,7 @@ fun Header(
|
|
|
263
262
|
.padding(horizontal = Spacing.M),
|
|
264
263
|
verticalAlignment = Alignment.CenterVertically,
|
|
265
264
|
) {
|
|
266
|
-
if (
|
|
265
|
+
if (goBack !== null) {
|
|
267
266
|
Spacer(Modifier.width(40.dp))
|
|
268
267
|
}
|
|
269
268
|
if (useSearchInput == true && inputSearchProps != null) {
|
|
@@ -50,7 +50,6 @@ enum class HeaderType {
|
|
|
50
50
|
@Composable
|
|
51
51
|
fun Screen(
|
|
52
52
|
backgroundColor: Color? = null,
|
|
53
|
-
isBack: Boolean = true,
|
|
54
53
|
headerType: HeaderType = HeaderType.DEFAULT,
|
|
55
54
|
verticalArrangement: Arrangement.Vertical = Arrangement.Top,
|
|
56
55
|
horizontalAlignment: Alignment.Horizontal = Alignment.Start,
|
|
@@ -117,7 +116,6 @@ fun Screen(
|
|
|
117
116
|
title = title,
|
|
118
117
|
titlePosition = titlePosition,
|
|
119
118
|
headerRight = headerRight,
|
|
120
|
-
isBack = isBack,
|
|
121
119
|
goBack = goBack,
|
|
122
120
|
opacity = opacity,
|
|
123
121
|
animatedHeader = animatedHeader,
|
|
@@ -18,8 +18,6 @@ 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.semantics
|
|
22
|
-
import androidx.compose.ui.semantics.testTag
|
|
23
21
|
import androidx.compose.ui.text.TextStyle
|
|
24
22
|
import androidx.compose.ui.text.style.TextOverflow
|
|
25
23
|
import androidx.compose.ui.unit.Dp
|
|
@@ -235,7 +233,6 @@ fun Button(
|
|
|
235
233
|
isFull: Boolean = true,
|
|
236
234
|
modifier: Modifier = Modifier,
|
|
237
235
|
) {
|
|
238
|
-
val testId = "btn_${type.toString().lowercase()}_$title"
|
|
239
236
|
val customModifier = if (isFull) {
|
|
240
237
|
modifier
|
|
241
238
|
.fillMaxWidth()
|
|
@@ -257,8 +254,7 @@ fun Button(
|
|
|
257
254
|
.padding(horizontal = size.value.padding)
|
|
258
255
|
.defaultMinSize(
|
|
259
256
|
minWidth = size.value.width
|
|
260
|
-
).height(size.value.height)
|
|
261
|
-
.semantics { testTag = testId },
|
|
257
|
+
).height(size.value.height),
|
|
262
258
|
horizontalArrangement = Arrangement.Center,
|
|
263
259
|
verticalAlignment = Alignment.CenterVertically,
|
|
264
260
|
) {
|
|
@@ -27,7 +27,6 @@ import androidx.compose.runtime.setValue
|
|
|
27
27
|
import androidx.compose.ui.Alignment
|
|
28
28
|
import androidx.compose.ui.Modifier
|
|
29
29
|
import androidx.compose.ui.draw.clip
|
|
30
|
-
import androidx.compose.ui.semantics.contentDescription
|
|
31
30
|
import androidx.compose.ui.semantics.semantics
|
|
32
31
|
import androidx.compose.ui.semantics.testTag
|
|
33
32
|
import androidx.compose.ui.text.TextLayoutResult
|
|
@@ -97,7 +96,7 @@ fun PopupNotify(
|
|
|
97
96
|
}
|
|
98
97
|
|
|
99
98
|
Box(Modifier.semantics {
|
|
100
|
-
|
|
99
|
+
testTag = "popup_notify"
|
|
101
100
|
}, contentAlignment = Alignment.TopEnd) {
|
|
102
101
|
Column(
|
|
103
102
|
modifier = Modifier
|
|
@@ -235,7 +234,7 @@ fun renderRow(
|
|
|
235
234
|
title = it.title,
|
|
236
235
|
type = ButtonType.TEXT,
|
|
237
236
|
modifier = Modifier.semantics {
|
|
238
|
-
|
|
237
|
+
testTag = "btn_popup_cancel"
|
|
239
238
|
}
|
|
240
239
|
)
|
|
241
240
|
}
|
|
@@ -250,7 +249,7 @@ fun renderRow(
|
|
|
250
249
|
},
|
|
251
250
|
title = primary?.title ?: "",
|
|
252
251
|
modifier = Modifier.semantics {
|
|
253
|
-
|
|
252
|
+
testTag = "btn_popup_allow"
|
|
254
253
|
}
|
|
255
254
|
)
|
|
256
255
|
}
|
|
@@ -273,7 +272,7 @@ fun renderColumn(
|
|
|
273
272
|
},
|
|
274
273
|
title = primary?.title ?: "",
|
|
275
274
|
modifier = Modifier.semantics {
|
|
276
|
-
|
|
275
|
+
testTag = "btn_popup_allow"
|
|
277
276
|
}
|
|
278
277
|
)
|
|
279
278
|
secondary?.let {
|
|
@@ -288,7 +287,7 @@ fun renderColumn(
|
|
|
288
287
|
title = it.title,
|
|
289
288
|
type = ButtonType.TEXT,
|
|
290
289
|
modifier = Modifier.semantics {
|
|
291
|
-
|
|
290
|
+
testTag = "btn_popup_cancel"
|
|
292
291
|
}
|
|
293
292
|
)
|
|
294
293
|
}
|