@momo-kits/native-kits 0.113.2-beta.15 → 0.113.2-beta.17

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.
@@ -136,29 +136,28 @@ fun Header(
136
136
  ) {
137
137
  if (goBack != null && titlePosition == TitlePosition.LEFT) {
138
138
  Spacer(Modifier.width(40.dp))
139
+ }
140
+ if (inputSearchProps != null && !useAnimationSearch) {
141
+ InputSearch(inputSearchProps = inputSearchProps.copy(backgroundColor = backgroundSearch))
139
142
  } else {
140
- if (inputSearchProps != null && !useAnimationSearch) {
141
- InputSearch(inputSearchProps = inputSearchProps.copy(backgroundColor = backgroundSearch))
142
- } else {
143
- Box(
144
- Modifier.weight(1f).graphicsLayer {
145
- alpha = if (useAnimationSearch) {
146
- 1f - (opacity ?: 1f)
147
- } else {
148
- if (animatedHeader !== null) opacity ?: 1f else 1f
149
- }
150
- },
151
- contentAlignment = if (titlePosition == TitlePosition.LEFT) Alignment.TopStart else Alignment.Center
152
- ) {
143
+ Box(
144
+ Modifier.weight(1f).graphicsLayer {
145
+ alpha = if (useAnimationSearch) {
146
+ 1f - (opacity ?: 1f)
147
+ } else {
148
+ if (animatedHeader !== null) opacity ?: 1f else 1f
149
+ }
150
+ },
151
+ contentAlignment = if (titlePosition == TitlePosition.LEFT) Alignment.TopStart else Alignment.Center
152
+ ) {
153
153
 
154
- HeaderTitle(
155
- title = title,
156
- color = tintIconColor,
157
- modifier = Modifier.semantics {
158
- testTag = "title_navigation_header"
159
- }
160
- )
161
- }
154
+ HeaderTitle(
155
+ title = title,
156
+ color = tintIconColor,
157
+ modifier = Modifier.semantics {
158
+ testTag = "title_navigation_header"
159
+ }
160
+ )
162
161
  }
163
162
  }
164
163
  }
@@ -61,7 +61,6 @@ fun HeaderBackground(
61
61
  HeaderDefault(
62
62
  opacityAni = opacityAni,
63
63
  statusBarHeight = statusBarHeight,
64
- backgroundColor = backgroundColor,
65
64
  )
66
65
  }
67
66
 
@@ -23,12 +23,11 @@ import vn.momo.kits.utils.bottomBorder
23
23
  fun HeaderDefault(
24
24
  opacityAni: Float,
25
25
  statusBarHeight: Dp,
26
- backgroundColor: Color
27
26
  ) {
28
27
  val height = statusBarHeight + 52.dp
29
28
  Box(
30
29
  modifier = Modifier.fillMaxWidth().height(height)
31
- .background(backgroundColor)
30
+ .background(AppTheme.current.colors.background.surface)
32
31
  .bottomBorder(
33
32
  strokeWidth = 1.dp,
34
33
  color = AppTheme.current.colors.border.default
@@ -165,7 +165,7 @@ fun Screen(
165
165
  Spacer(modifier = Modifier.padding(top = statusBarHeight + 52.dp + layoutOffset))
166
166
  }
167
167
 
168
- if (useAnimationSearch && inputSearchProps != null) {
168
+ if (useAnimationSearch && inputSearchProps != null && headerType == HeaderType.EXTENDED) {
169
169
  Spacer(modifier = Modifier.padding(top = statusBarHeight))
170
170
  }
171
171
  content()
@@ -35,6 +35,7 @@ import vn.momo.kits.const.AppTheme
35
35
  import vn.momo.kits.const.Radius
36
36
  import vn.momo.kits.const.Spacing
37
37
  import vn.momo.kits.const.Typography
38
+ import vn.momo.kits.modifier.setAutomationId
38
39
  import vn.momo.kits.utils.ifNotNull
39
40
 
40
41
  data class PopupAction(
@@ -95,12 +96,12 @@ fun PopupNotify(
95
96
  callback?.invoke()
96
97
  }
97
98
 
98
- Box(Modifier.semantics {
99
- testTag = "popup_notify"
100
- }, contentAlignment = Alignment.TopEnd) {
99
+ Box(Modifier.setAutomationId("popup_notify")
100
+ , contentAlignment = Alignment.TopEnd) {
101
101
  Column(
102
102
  modifier = Modifier
103
103
  .fillMaxWidth()
104
+ .padding(horizontal = 12.dp)
104
105
  .clip(RoundedCornerShape(Radius.L))
105
106
  .background(
106
107
  AppTheme.current.colors.background.surface,
@@ -115,7 +116,7 @@ fun PopupNotify(
115
116
  )
116
117
 
117
118
  Column(modifier = Modifier.padding(Spacing.XL)) {
118
- Text(style = Typography.titleXs, maxLines = 2, text = title)
119
+ Text(style = Typography.titleXs, maxLines = 2, text = title, modifier = Modifier.setAutomationId("title_popup_permission"))
119
120
  content(Modifier.padding(top = Spacing.S))
120
121
  if (error.isNotEmpty()) {
121
122
  Text(
@@ -142,7 +143,7 @@ fun PopupNotify(
142
143
  Modifier
143
144
  .width(22.dp)
144
145
  .height(22.dp)
145
- .offset(x = Spacing.S, y = -Spacing.S)
146
+ .offset(x = Spacing.M / 2, y = -Spacing.M)
146
147
  .background(
147
148
  color = AppTheme.current.colors.text.default,
148
149
  shape = RoundedCornerShape(Radius.M)
@@ -164,9 +165,7 @@ fun PopupNotify(
164
165
  source = "navigation_close",
165
166
  color = AppTheme.current.colors.background.surface,
166
167
  size = 16.dp,
167
- modifier = Modifier.semantics {
168
- testTag = "ic_popup_close"
169
- }
168
+ modifier = Modifier.setAutomationId("ic_popup_close")
170
169
  )
171
170
  }
172
171
  }
@@ -233,9 +232,7 @@ fun renderRow(
233
232
  },
234
233
  title = it.title,
235
234
  type = ButtonType.TEXT,
236
- modifier = Modifier.semantics {
237
- testTag = "btn_popup_cancel"
238
- }
235
+ modifier = Modifier.setAutomationId("btn_popup_cancel")
239
236
  )
240
237
  }
241
238
  Spacer(modifier = Modifier.width(Spacing.S))
@@ -248,9 +245,7 @@ fun renderRow(
248
245
  onAction(primary?.onPress)
249
246
  },
250
247
  title = primary?.title ?: "",
251
- modifier = Modifier.semantics {
252
- testTag = "btn_popup_allow"
253
- }
248
+ modifier = Modifier.setAutomationId("btn_popup_allow")
254
249
  )
255
250
  }
256
251
  }
@@ -271,9 +266,7 @@ fun renderColumn(
271
266
  onAction(primary?.onPress)
272
267
  },
273
268
  title = primary?.title ?: "",
274
- modifier = Modifier.semantics {
275
- testTag = "btn_popup_allow"
276
- }
269
+ modifier = Modifier.setAutomationId("btn_popup_allow")
277
270
  )
278
271
  secondary?.let {
279
272
  Spacer(modifier = Modifier.height(Spacing.S))
@@ -286,9 +279,7 @@ fun renderColumn(
286
279
  },
287
280
  title = it.title,
288
281
  type = ButtonType.TEXT,
289
- modifier = Modifier.semantics {
290
- testTag = "btn_popup_cancel"
291
- }
282
+ modifier = Modifier.setAutomationId("btn_popup_cancel")
292
283
  )
293
284
  }
294
285
  }
@@ -203,7 +203,9 @@ public struct Header: View {
203
203
  Text(title)
204
204
  .font(.headline)
205
205
  .foregroundColor(tintIconColor)
206
+ .frame(maxWidth: UIScreen.main.bounds.width - 172)
206
207
  .frame(maxWidth: titlePosition == .center ? .infinity : nil, alignment: titlePosition == .center ? .center : .leading)
208
+ .lineLimit(1)
207
209
  }
208
210
  Spacer()
209
211
  }
@@ -49,6 +49,7 @@ public struct PopupDisplay: View {
49
49
  .padding(.trailing, -Spacing.M )
50
50
  .padding(.top, -Spacing.M)
51
51
  .zIndex(1)
52
+ .accessibility(identifier: "ic_popup_close")
52
53
 
53
54
  VStack {
54
55
  if(!url.isEmpty) {
@@ -71,6 +72,7 @@ public struct PopupDisplay: View {
71
72
  .padding(.top, 16)
72
73
  .padding(.bottom, 8)
73
74
  .lineLimit(2)
75
+ .accessibility(identifier: "title_popup_permission")
74
76
 
75
77
  Text(description)
76
78
  .foregroundColor(.black)
@@ -79,7 +81,7 @@ public struct PopupDisplay: View {
79
81
  .multilineTextAlignment(.leading)
80
82
  .padding(.bottom, 20)
81
83
  }
82
- .frame(maxWidth: .infinity, alignment: .leading)
84
+ .frame(maxWidth: .infinity, alignment: .leading)
83
85
  .padding(.horizontal, 24)
84
86
 
85
87
  if buttonDirection == .row {
@@ -100,7 +102,7 @@ public struct PopupDisplay: View {
100
102
  }
101
103
  }
102
104
  .background(Color.white.cornerRadius(15))
103
- .padding(.horizontal, 24)
105
+ .padding(.horizontal, 12)
104
106
  }
105
107
 
106
108
  // MARK: Internal
@@ -153,8 +155,9 @@ public struct PopupDisplay: View {
153
155
 
154
156
  var RowButtons: some View {
155
157
  HStack {
156
- Button(title: closeButtonTitle, action: onPressCloseButton, type: .secondary, size: .medium)
158
+ Button(title: closeButtonTitle, action: onPressCloseButton, type: .secondary, size: .medium).accessibility(identifier: "btn_popup_cancel")
157
159
  Button(title: actionButtonTitle, action: onPressAction, size: .medium)
160
+ .accessibility(identifier: "btn_popup_allow")
158
161
  }
159
162
  .frame(maxWidth: .infinity, alignment: .center)
160
163
  .padding(.horizontal, 24)
@@ -167,8 +170,9 @@ public struct PopupDisplay: View {
167
170
  title: actionButtonTitle,
168
171
  action: onPressAction,
169
172
  size: .medium
170
- )
171
- Button(title: closeButtonTitle, action: onPressCloseButton, type: .secondary, size: .medium)
173
+ ).accessibility(identifier: "btn_popup_allow")
174
+ Button(title: closeButtonTitle, action: onPressCloseButton, type: .secondary, size: .medium).accessibility(identifier: "btn_popup_cancel")
175
+
172
176
  }
173
177
  .frame(maxWidth: .infinity, alignment: .trailing)
174
178
  .padding(.horizontal, 24)
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
- #Sun Mar 02 11:30:14 ICT 2025
8
- sdk.dir=/Users/nguyenhoangson/Library/Android/sdk
7
+ #Thu Jan 09 10:43:10 ICT 2025
8
+ sdk.dir=/Users/sophia/Library/Android/sdk
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.113.2-beta.15",
3
+ "version": "0.113.2-beta.17",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},