@momo-kits/native-kits 0.117.2-beta.3 → 0.117.2-beta.5

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.
@@ -22,8 +22,10 @@ import androidx.compose.ui.semantics.semantics
22
22
  import androidx.compose.ui.semantics.testTag
23
23
  import androidx.compose.ui.unit.dp
24
24
  import vn.momo.kits.const.AppTheme
25
+ import vn.momo.kits.const.Colors
25
26
  import vn.momo.kits.const.Radius
26
27
  import vn.momo.kits.const.Spacing
28
+ import vn.momo.kits.modifier.setAutomationId
27
29
  import vn.momo.kits.utils.ifNotNull
28
30
 
29
31
  @Composable
@@ -49,23 +51,15 @@ fun PopupPromotion(
49
51
  Box(
50
52
  modifier = Modifier
51
53
  .padding(top = Spacing.S)
52
- .fillMaxWidth(),
54
+ .fillMaxWidth()
55
+ .width(40.dp)
56
+ .height(40.dp),
53
57
  contentAlignment = Alignment.Center
54
58
  ) {
55
59
  Box(
56
- Modifier
57
- .width(20.dp)
58
- .height(20.dp)
59
- .background(
60
- color = AppTheme.current.colors.text.default,
61
- shape = RoundedCornerShape(Radius.M)
62
- )
63
- .border(
64
- width = 2.dp,
65
- color = AppTheme.current.colors.background.surface,
66
- shape = RoundedCornerShape(Radius.M)
67
- )
68
- .clip(RoundedCornerShape(100))
60
+ modifier = Modifier
61
+ .width(40.dp)
62
+ .height(40.dp)
69
63
  .clickable(
70
64
  interactionSource = remember { MutableInteractionSource() },
71
65
  indication = null,
@@ -73,15 +67,32 @@ fun PopupPromotion(
73
67
  ),
74
68
  contentAlignment = Alignment.Center
75
69
  ) {
76
- Icon(
77
- source = "navigation_close",
78
- color = AppTheme.current.colors.background.surface,
79
- size = 14.dp,
80
- modifier = Modifier.semantics {
81
- testTag = "ic_popup_close"
82
- }
83
- )
70
+ Box(
71
+ Modifier
72
+ .width(22.dp)
73
+ .height(22.dp)
74
+ .background(
75
+ color = AppTheme.current.colors.text.default,
76
+ shape = RoundedCornerShape(Radius.M)
77
+ )
78
+ .border(
79
+ width = 2.dp,
80
+ color = AppTheme.current.colors.background.surface,
81
+ shape = RoundedCornerShape(Radius.M)
82
+ )
83
+ .clip(RoundedCornerShape(100))
84
+ ,
85
+ contentAlignment = Alignment.Center
86
+ ) {
87
+ Icon(
88
+ source = "navigation_close",
89
+ color = AppTheme.current.colors.background.surface,
90
+ size = 16.dp,
91
+ modifier = Modifier.setAutomationId("ic_popup_close")
92
+ )
93
+ }
84
94
  }
95
+
85
96
  }
86
97
  }
87
98
  }
@@ -40,14 +40,15 @@ public struct PopupPromotion: View {
40
40
  }
41
41
  }
42
42
  buildCloseIcon()
43
+ .accessibility(identifier: "ic_popup_close")
43
44
  }
45
+ .accessibilityElement(children: .ignore)
44
46
  .accessibility(identifier: "popup_promotion")
45
47
  }
46
48
 
47
49
  @ViewBuilder
48
50
  private func buildCloseIcon() -> some View {
49
- HStack {
50
- Spacer()
51
+ HStack(alignment: .center, spacing: 0) {
51
52
  SwiftUI.Button(action: {
52
53
  onIconClose?()
53
54
  }) {
@@ -55,13 +56,14 @@ public struct PopupPromotion: View {
55
56
  Circle()
56
57
  .strokeBorder(Colors.black01, lineWidth: 2)
57
58
  .background(Circle().fill(Colors.black17))
58
- .frame(width: 20, height: 20)
59
+ .frame(width: 22, height: 22)
59
60
 
60
- Icon(source: "navigation_close", size: 14, color: Colors.black01)
61
+ Icon(source: "navigation_close", size: 16, color: Colors.black01)
61
62
  }
63
+ .frame(width: 40, height: 40)
64
+ .padding(8)
65
+ .zIndex(1)
62
66
  }
63
- .padding(8)
64
- Spacer()
65
67
  }
66
68
  }
67
69
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.117.2-beta.3",
3
+ "version": "0.117.2-beta.5",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},