@momo-kits/native-kits 0.89.32-nav.16 → 0.89.32-nav.2

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.
@@ -61,6 +61,8 @@ kotlin {
61
61
 
62
62
  publishing {
63
63
  repositories {
64
+ google()
65
+ mavenCentral()
64
66
  maven {
65
67
  group = libGroup
66
68
  version = libVersion
@@ -32,6 +32,7 @@ import androidx.compose.ui.graphics.Color
32
32
  import androidx.compose.ui.graphics.graphicsLayer
33
33
  import androidx.compose.ui.layout.ContentScale
34
34
  import androidx.compose.ui.platform.LocalDensity
35
+ import androidx.compose.ui.semantics.contentDescription
35
36
  import androidx.compose.ui.semantics.semantics
36
37
  import androidx.compose.ui.semantics.testTag
37
38
  import androidx.compose.ui.text.style.TextAlign
@@ -92,8 +93,8 @@ fun HeaderBackground(
92
93
  .background(
93
94
  Brush.linearGradient(
94
95
  colors = listOf(
95
- Color(0xFFFDCACE),
96
- Color(0x00FDCACE)
96
+ Color(0xFFFDCADE),
97
+ Color(0x00FDCADE)
97
98
  ),
98
99
  start = Offset(0f, 0f),
99
100
  end = Offset(0f, with(LocalDensity.current) { 154.dp.toPx() })
@@ -162,8 +163,9 @@ fun Header(
162
163
  headerType: HeaderType = HeaderType.DEFAULT,
163
164
  titlePosition: TitlePosition,
164
165
  title: String,
166
+ isBack: Boolean,
165
167
  headerRight: @Composable (() -> Unit)? = null,
166
- goBack: (() -> Unit)?,
168
+ goBack: (() -> Unit) = { },
167
169
  opacity: Float? = null,
168
170
  animatedHeader: AnimatedHeader? = null,
169
171
  useSearchInput: Boolean? = false,
@@ -172,7 +174,7 @@ fun Header(
172
174
  ) {
173
175
  val statusBarHeight = AppStatusBar.current ?: getStatusBarHeight()
174
176
  val tintIconColor = AppTheme.current.colors.text.default
175
- val backgroundButton = Colors.black_01.copy(alpha = 0.2f)
177
+ val backgroundButton = Colors.black_01.copy(alpha = 0.6f)
176
178
 
177
179
  var colorFraction by remember { mutableStateOf(0f) }
178
180
 
@@ -214,14 +216,14 @@ fun Header(
214
216
  horizontalArrangement = Arrangement.SpaceBetween
215
217
  ) {
216
218
  Box {
217
- if (goBack !== null) {
219
+ if (isBack) {
218
220
  Box(
219
221
  modifier = Modifier
220
222
  .size(28.dp)
221
223
  .then(
222
224
  Modifier.border(
223
- 0.5.dp,
224
- Colors.black_20.copy(alpha = 0.4f),
225
+ 0.2.dp,
226
+ Colors.black_20.copy(alpha = 0.2f),
225
227
  RoundedCornerShape(100)
226
228
  )
227
229
  )
@@ -239,7 +241,7 @@ fun Header(
239
241
  contentAlignment = Alignment.Center
240
242
  ) {
241
243
  Icon(
242
- source = "ic_back_ios",
244
+ source = "arrow-back",
243
245
  color = if (animatedHeader !== null) tintIconColorAnim else tintIconColor,
244
246
  size = 20.dp,
245
247
  )
@@ -262,7 +264,7 @@ fun Header(
262
264
  .padding(horizontal = Spacing.M),
263
265
  verticalAlignment = Alignment.CenterVertically,
264
266
  ) {
265
- if (goBack !== null) {
267
+ if (isBack) {
266
268
  Spacer(Modifier.width(40.dp))
267
269
  }
268
270
  if (useSearchInput == true && inputSearchProps != null) {
@@ -279,6 +281,7 @@ fun Header(
279
281
  title = title,
280
282
  color = if (animatedHeader !== null) tintIconColorAnim else tintIconColor,
281
283
  modifier = Modifier.semantics {
284
+ contentDescription = title
282
285
  testTag = "title_navigation_header"
283
286
  }
284
287
  )
@@ -117,6 +117,7 @@ fun Screen(
117
117
  title = title,
118
118
  titlePosition = titlePosition,
119
119
  headerRight = headerRight,
120
+ isBack = isBack,
120
121
  goBack = goBack,
121
122
  opacity = opacity,
122
123
  animatedHeader = animatedHeader,
@@ -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 = title; testTag = testId
264
+ },
258
265
  horizontalArrangement = Arrangement.Center,
259
266
  verticalAlignment = Alignment.CenterVertically,
260
267
  ) {
@@ -14,6 +14,7 @@ import androidx.compose.ui.graphics.painter.Painter
14
14
  import androidx.compose.ui.layout.ContentScale
15
15
  import androidx.compose.ui.semantics.contentDescription
16
16
  import androidx.compose.ui.semantics.semantics
17
+ import androidx.compose.ui.semantics.testTag
17
18
  import coil3.compose.AsyncImage
18
19
  import vn.momo.kits.const.AppTheme
19
20
 
@@ -47,9 +48,9 @@ fun Image(
47
48
  )
48
49
  }
49
50
 
50
- Box(modifier = modifier.semantics {contentDescription = "img|$source"}) {
51
+ Box(modifier = modifier) {
51
52
  AsyncImage(
52
- modifier = Modifier.matchParentSize(),
53
+ modifier = Modifier.matchParentSize().semantics {contentDescription = "img|$source"; testTag = "img|$source"},
53
54
  model = source,
54
55
  contentDescription = null,
55
56
  contentScale = imageOptions.contentScale,
@@ -27,6 +27,7 @@ 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
30
31
  import androidx.compose.ui.semantics.semantics
31
32
  import androidx.compose.ui.semantics.testTag
32
33
  import androidx.compose.ui.text.TextLayoutResult
@@ -96,7 +97,7 @@ fun PopupNotify(
96
97
  }
97
98
 
98
99
  Box(Modifier.semantics {
99
- testTag = "popup_notify"
100
+ contentDescription = title; testTag = "popup_notify"
100
101
  }, contentAlignment = Alignment.TopEnd) {
101
102
  Column(
102
103
  modifier = Modifier
@@ -234,7 +235,7 @@ fun renderRow(
234
235
  title = it.title,
235
236
  type = ButtonType.TEXT,
236
237
  modifier = Modifier.semantics {
237
- testTag = "btn_popup_cancel"
238
+ contentDescription = it.title; testTag = "btn_popup_cancel"
238
239
  }
239
240
  )
240
241
  }
@@ -249,7 +250,7 @@ fun renderRow(
249
250
  },
250
251
  title = primary?.title ?: "",
251
252
  modifier = Modifier.semantics {
252
- testTag = "btn_popup_allow"
253
+ contentDescription = primary?.title ?: ""; testTag = "btn_popup_allow"
253
254
  }
254
255
  )
255
256
  }
@@ -272,7 +273,7 @@ fun renderColumn(
272
273
  },
273
274
  title = primary?.title ?: "",
274
275
  modifier = Modifier.semantics {
275
- testTag = "btn_popup_allow"
276
+ contentDescription = primary?.title ?: ""; testTag = "btn_popup_allow"
276
277
  }
277
278
  )
278
279
  secondary?.let {
@@ -287,7 +288,7 @@ fun renderColumn(
287
288
  title = it.title,
288
289
  type = ButtonType.TEXT,
289
290
  modifier = Modifier.semantics {
290
- testTag = "btn_popup_cancel"
291
+ contentDescription = it.title; testTag = "btn_popup_cancel"
291
292
  }
292
293
  )
293
294
  }
@@ -3,8 +3,6 @@ package vn.momo.kits.components
3
3
  import androidx.compose.runtime.Composable
4
4
  import androidx.compose.ui.Modifier
5
5
  import androidx.compose.ui.graphics.Color
6
- import androidx.compose.ui.semantics.contentDescription
7
- import androidx.compose.ui.semantics.semantics
8
6
  import androidx.compose.ui.text.TextLayoutResult
9
7
  import androidx.compose.ui.text.TextStyle
10
8
  import androidx.compose.ui.text.style.TextAlign
@@ -33,7 +31,7 @@ fun Text(
33
31
  val font = getFontFamily(fontFamily, style.fontWeight)
34
32
 
35
33
  androidx.compose.material3.Text(
36
- modifier = modifier.semantics { contentDescription = text },
34
+ modifier = modifier,
37
35
  text = text,
38
36
  color = color ?: AppTheme.current.colors.text.default,
39
37
  style = style,
@@ -4,6 +4,7 @@ val Icons = mapOf(
4
4
  "01.MoMo Copy" to "https://img.mservice.com.vn/app/img/kits/01.MoMo%20Copy.png",
5
5
  "01.MoMo" to "https://img.mservice.com.vn/app/img/kits/01.MoMo.png",
6
6
  "Phonebook" to "https://img.mservice.com.vn/app/img/kits/Phonebook.png",
7
+ "arrow-back" to "https://static.momocdn.net/app/img/kits/arrow-back.png",
7
8
  "arrow_arrow-back" to "https://img.mservice.com.vn/app/img/kits/arrow_arrow-back.png",
8
9
  "arrow_arrow-down" to "https://img.mservice.com.vn/app/img/kits/arrow_arrow-down.png",
9
10
  "arrow_arrow-next" to "https://img.mservice.com.vn/app/img/kits/arrow_arrow-next.png",
package/local.properties CHANGED
@@ -4,5 +4,5 @@
4
4
  # Location of the SDK. This is only used by Gradle.
5
5
  # For customization when using a Version Control System, please read the
6
6
  # header note.
7
- #Wed Aug 21 14:20:12 ICT 2024
8
- sdk.dir=/Users/huynhdung/Library/Android/sdk
7
+ #Tue Apr 23 16:40:15 ICT 2024
8
+ sdk.dir=/Users/hung.dao1/Library/Android/sdk
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.89.32-nav.16",
3
+ "version": "0.89.32-nav.2",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},