@momo-kits/native-kits 0.113.1-beta.7 → 0.113.1-beta.9

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.
@@ -132,9 +132,9 @@ fun Header(
132
132
  }
133
133
  }
134
134
 
135
- if (inputSearchProps == null && miniAppContext != null) {
135
+ if (((useAnimationSearch && inputSearchProps != null) || inputSearchProps == null) && miniAppContext != null) {
136
136
  Box(Modifier.graphicsLayer {
137
- alpha = if (animatedHeader !== null) opacity ?: 1f else 1f
137
+ alpha = if (useAnimationSearch) 1f - (opacity ?: 1f) else 1f
138
138
  }) {
139
139
  headerRight?.invoke()
140
140
  }
@@ -79,12 +79,12 @@ object Spacing {
79
79
 
80
80
  @Composable
81
81
  fun HeaderRight(
82
- headerRight: HeaderRightData? = null,
82
+ data: HeaderRightData? = null,
83
83
  ) {
84
84
  Row(
85
85
  verticalAlignment = Alignment.CenterVertically,
86
86
  ) {
87
- ToolkitHeaderRight(headerRight = headerRight)
87
+ ToolkitHeaderRight(headerRight = data)
88
88
  }
89
89
  }
90
90
 
@@ -25,7 +25,7 @@ import vn.momo.kits.const.Typography
25
25
  fun CheckBox(
26
26
  disabled: Boolean = false,
27
27
  checked: Boolean = false,
28
- onCheckedChange: () -> Unit,
28
+ onCheckedChange: (Boolean) -> Unit,
29
29
  indeterminate: Boolean = false,
30
30
  title: String = "",
31
31
  ) {
@@ -53,7 +53,7 @@ fun CheckBox(
53
53
  .background(backgroundColor, RoundedCornerShape(Radius.XS))
54
54
  .border(Spacing.XXS, borderColor, RoundedCornerShape(Radius.XS))
55
55
  .clickable(
56
- onClick = onCheckedChange,
56
+ onClick = { onCheckedChange(!checked) },
57
57
  enabled = !disabled,
58
58
  ),
59
59
  ) {
@@ -115,7 +115,7 @@ fun PopupNotify(
115
115
  )
116
116
 
117
117
  Column(modifier = Modifier.padding(Spacing.XL)) {
118
- Text(style = Typography.titleXs, maxLines = 1, text = title)
118
+ Text(style = Typography.titleXs, maxLines = 2, text = title)
119
119
  content(Modifier.padding(top = Spacing.S))
120
120
  if (error.isNotEmpty()) {
121
121
  Text(
@@ -98,9 +98,8 @@ private extension View {
98
98
  case .secondary:
99
99
  return AnyView(self
100
100
  .background(Colors.card)
101
- .foregroundColor(Colors.text)
101
+ .foregroundColor(Colors.primary)
102
102
  .cornerRadius(8)
103
- .overlay(RoundedRectangle(cornerRadius: Radius.S).stroke(Colors.black06, lineWidth: 1))
104
103
  .padding(2)
105
104
  )
106
105
  case .outline:
@@ -43,6 +43,7 @@ public struct PopupDisplay: View {
43
43
  Image(systemName: "xmark.circle.fill")
44
44
  .resizable()
45
45
  .frame(width: 16, height: 16)
46
+ .overlay(RoundedRectangle(cornerRadius: Radius.S).stroke(Colors.black01, lineWidth: 1))
46
47
  }.foregroundColor(Colors.black20)
47
48
  .background(Colors.black01.cornerRadius(8))
48
49
  .offset(x: 6, y: -6)
@@ -52,15 +53,17 @@ public struct PopupDisplay: View {
52
53
  WebImage(url: URL(string: url), isAnimating: .constant(true))
53
54
  .resizable()
54
55
  .scaledToFill()
55
- .frame(maxWidth: .infinity, maxHeight: 164)
56
+ .frame(maxWidth: .infinity)
56
57
  .clipShape(RoundedCorner(radius: 8, corners: [.topLeft, .topRight]))
58
+ .aspectRatio(2, contentMode: .fit)
57
59
 
58
60
  VStack(alignment: .leading) {
59
61
  Text(title)
60
62
  .foregroundColor(.black)
61
- .font(.headerText1)
62
- .padding(.top, 12)
63
- .padding(.bottom, 24)
63
+ .font(.header_default_bold)
64
+ .padding(.top, 16)
65
+ .padding(.bottom, 8)
66
+ .lineLimit(2)
64
67
 
65
68
  Text(description)
66
69
  .foregroundColor(.black)
@@ -87,10 +90,8 @@ public struct PopupDisplay: View {
87
90
  }.clipped()
88
91
  }
89
92
  }
90
- .background(Color.white.cornerRadius(8))
91
- .shadow(color: .black.opacity(0.08), radius: 2, x: 0, y: 0)
92
- .shadow(color: .black.opacity(0.16), radius: 24, x: 0, y: 0)
93
- .padding(.horizontal, 40)
93
+ .background(Color.white.cornerRadius(15))
94
+ .padding(.horizontal, 24)
94
95
  }
95
96
 
96
97
  // MARK: Internal
@@ -106,7 +107,7 @@ public struct PopupDisplay: View {
106
107
  var onClose: () -> Void
107
108
  var actionButtonTitle: String
108
109
  var closeButtonTitle: String
109
-
110
+
110
111
  var RowTextButtons: some View {
111
112
  HStack {
112
113
  SwiftUI.Button(action: onPressCloseButton) {
@@ -143,8 +144,8 @@ public struct PopupDisplay: View {
143
144
 
144
145
  var RowButtons: some View {
145
146
  HStack {
146
- Button(title: closeButtonTitle, action: onPressCloseButton, type: .secondary)
147
- Button(title: actionButtonTitle, action: onPressAction)
147
+ Button(title: closeButtonTitle, action: onPressCloseButton, type: .secondary, size: .medium)
148
+ Button(title: actionButtonTitle, action: onPressAction, size: .medium)
148
149
  }
149
150
  .frame(maxWidth: .infinity, alignment: .center)
150
151
  .padding(.horizontal, 24)
@@ -153,8 +154,12 @@ public struct PopupDisplay: View {
153
154
 
154
155
  var ColumnButtons: some View {
155
156
  VStack(alignment: .trailing) {
156
- Button(title: actionButtonTitle, action: onPressAction)
157
- Button(title: closeButtonTitle, action: onPressCloseButton, type: .secondary)
157
+ Button(
158
+ title: actionButtonTitle,
159
+ action: onPressAction,
160
+ size: .medium
161
+ )
162
+ Button(title: closeButtonTitle, action: onPressCloseButton, type: .secondary, size: .medium)
158
163
  }
159
164
  .frame(maxWidth: .infinity, alignment: .trailing)
160
165
  .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.1-beta.7",
3
+ "version": "0.113.1-beta.9",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},