@momo-kits/native-kits 0.114.2-beta.8 → 0.117.1

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.
@@ -4,6 +4,7 @@ import androidx.compose.runtime.Composable
4
4
  import androidx.compose.ui.Modifier
5
5
  import androidx.compose.ui.graphics.Color
6
6
  import androidx.compose.ui.text.style.TextAlign
7
+ import androidx.compose.ui.unit.sp
7
8
  import androidx.compose.ui.zIndex
8
9
  import vn.momo.kits.components.Text
9
10
  import vn.momo.kits.const.Typography
@@ -19,7 +20,10 @@ fun HeaderTitle(
19
20
  modifier = Modifier.then(modifier).zIndex(1f),
20
21
  text = title,
21
22
  textAlign = textAlign,
22
- style = Typography.actionSBold,
23
+ style = Typography.actionSBold.copy(
24
+ fontSize = 15.sp,
25
+ lineHeight = 22.sp,
26
+ ),
23
27
  color = color,
24
28
  maxLines = 1
25
29
  )
@@ -11,6 +11,7 @@ import androidx.compose.foundation.shape.RoundedCornerShape
11
11
  import androidx.compose.runtime.Composable
12
12
  import androidx.compose.ui.Alignment
13
13
  import androidx.compose.ui.Modifier
14
+ import androidx.compose.ui.graphics.Color
14
15
  import androidx.compose.ui.unit.dp
15
16
  import vn.momo.kits.const.AppTheme
16
17
  import vn.momo.kits.const.Colors
@@ -27,8 +28,8 @@ fun CheckBox(
27
28
  title: String = "",
28
29
  ) {
29
30
  var borderColor = AppTheme.current.colors.text.default
30
- var backgroundColor = AppTheme.current.colors.background.surface
31
- val iconSource = if (indeterminate) "minus" else "ic_checked"
31
+ var backgroundColor = Color.Transparent
32
+ val iconSource = if (indeterminate) "navigation_minus" else "ic_checked"
32
33
 
33
34
  if (checked) {
34
35
  borderColor = AppTheme.current.colors.primary
@@ -36,7 +37,7 @@ fun CheckBox(
36
37
  }
37
38
  if (disabled) {
38
39
  borderColor = AppTheme.current.colors.border.disable
39
- backgroundColor = AppTheme.current.colors.background.surface
40
+ backgroundColor = Color.Transparent
40
41
  if (checked) {
41
42
  borderColor = AppTheme.current.colors.background.tonal
42
43
  backgroundColor = AppTheme.current.colors.background.tonal
@@ -1,11 +1,6 @@
1
1
  package vn.momo.kits.modifier
2
2
 
3
- import androidx.compose.foundation.clickable
4
- import androidx.compose.foundation.interaction.MutableInteractionSource
5
- import androidx.compose.runtime.remember
6
3
  import androidx.compose.ui.Modifier
7
- import androidx.compose.ui.composed
8
- import androidx.compose.ui.semantics.Role
9
4
  import androidx.compose.ui.semantics.contentDescription
10
5
  import androidx.compose.ui.semantics.semantics
11
6
  import androidx.compose.ui.semantics.testTag
@@ -138,12 +138,11 @@ public struct Header: View {
138
138
 
139
139
  public var body: some View {
140
140
 
141
- let statusBarHeight = safeAreaTopInset()
142
141
  let tintIconColor = Colors.black17
143
142
  let backgroundButton = Colors.black01.opacity(0.6)
144
143
 
145
144
  if headerType != .none {
146
- VStack(spacing: 0) {
145
+ VStack(spacing: 0) {
147
146
  ZStack {
148
147
  HStack {
149
148
  if let goBack = goBack {
@@ -153,8 +152,7 @@ public struct Header: View {
153
152
  .background(Circle().fill(backgroundButton))
154
153
  .frame(width: 28, height: 28)
155
154
  .overlay(
156
- Image(systemName: "arrow.backward")
157
- .foregroundColor(.black)
155
+ Icon(source: "arrow-back", size: 20, color: Colors.black17)
158
156
  )
159
157
  }
160
158
 
@@ -167,14 +165,11 @@ public struct Header: View {
167
165
  }
168
166
 
169
167
  }
170
- .frame(height: 52)
171
- .padding(.horizontal)
172
-
173
-
168
+ .padding(.horizontal, 12)
174
169
 
175
170
  HStack {
176
171
  if titlePosition == .left, goBack != nil {
177
- Spacer().frame(width: 40)
172
+ Spacer().frame(width: 38)
178
173
  }
179
174
 
180
175
  if inputSearchProps != nil {
@@ -201,22 +196,22 @@ public struct Header: View {
201
196
  }
202
197
  } else {
203
198
  Text(title)
204
- .font(.headline)
199
+ .font(Font.system(size: 17).weight(.bold)) .lineSpacing(22)
205
200
  .foregroundColor(tintIconColor)
206
201
  .frame(maxWidth: titlePosition == .center ? UIScreen.main.bounds.width - 252 : nil)
207
202
  .frame(maxWidth: titlePosition == .center ? .infinity : UIScreen.main.bounds.width - 172, alignment: titlePosition == .center ? .center : .leading)
208
203
  .lineLimit(1)
204
+
209
205
  }
210
206
  Spacer()
211
207
  }
212
- .frame(height: 52)
213
208
  .padding(.horizontal)
214
209
  }
215
210
  .background(Color.clear)
216
211
  }
217
- }
212
+ .frame(height: 52)
218
213
  }
219
-
214
+ }
220
215
  }
221
216
 
222
217
 
@@ -71,23 +71,25 @@ public struct Screen<Content: View>: View {
71
71
 
72
72
  public var body: some View {
73
73
  GeometryReader { geometry in
74
- let safeAreaInsets = geometry.safeAreaInsets
75
- let statusBarHeight = safeAreaInsets.top
74
+ let topInset = geometry.safeAreaInsets.top
76
75
  let keyboardHeight: CGFloat = 0
77
76
  let keyboardSize: CGFloat = useAvoidKeyboard ? max(keyboardHeight, 0) : 0
77
+ let height = geometry.size.height
78
+ let bottomInset = geometry.safeAreaInsets.bottom
79
+ let screenHeight = height + topInset + bottomInset
78
80
 
79
81
  ZStack {
80
82
  (backgroundColor ?? Color.white).edgesIgnoringSafeArea(.all)
81
83
 
82
84
  VStack(spacing: 0) {
83
- ZStack {
84
- if animatedHeader == nil {
85
- HeaderBackground(headerType: headerType, scrollState: scrollOffset)
86
- } else {
87
- Color.white.opacity(Double(min(scrollOffset / 114, 1)))
88
- .overlay(HeaderBackground(headerType: headerType, scrollState: scrollOffset))
89
-
90
- }
85
+ ZStack(alignment: .top) {
86
+ // if animatedHeader == nil {
87
+ // HeaderBackground(headerType: headerType, scrollState: scrollOffset)
88
+ // } else {
89
+ // Color.white.opacity(Double(min(scrollOffset / 114, 1)))
90
+ // .overlay(HeaderBackground(headerType: headerType, scrollState: scrollOffset))
91
+ //
92
+ // }
91
93
 
92
94
  Header(
93
95
  headerType: headerType,
@@ -99,14 +101,17 @@ public struct Screen<Content: View>: View {
99
101
  animatedHeader: animatedHeader,
100
102
  scrollState: scrollOffset,
101
103
  inputSearchProps: inputSearchProps
102
- ).padding(.bottom, headerType == .extended ? 0 : -safeAreaTopInset())
103
- .padding(.top, statusBarHeight > 20 ? 10 : 0)
104
- }.padding(.top, -safeAreaTopInset())
104
+ )
105
+ .background(HeaderBackground(headerType: headerType, scrollState: scrollOffset).edgesIgnoringSafeArea(.top))
106
+ .offset(y: topInset)
107
+
108
+ }
109
+ .offset(y: -topInset)
105
110
 
106
111
 
107
112
  VStack(alignment: horizontalAlignment, spacing: 0) {
108
113
  if animatedHeader != nil {
109
- Spacer().frame(height: statusBarHeight + 52 + layoutOffset)
114
+ Spacer().frame(height: topInset + 52 + layoutOffset)
110
115
  }
111
116
 
112
117
  if scrollable {
@@ -75,7 +75,7 @@ public struct Checkbox: View{
75
75
  } else if checked {
76
76
  return Colors.primary
77
77
  } else {
78
- return Colors.black01
78
+ return Color.clear
79
79
  }
80
80
  }
81
81
  }
@@ -62,7 +62,7 @@ public struct PopupDisplay: View {
62
62
  }
63
63
  .scaledToFill()
64
64
  .frame(maxWidth: .infinity)
65
- .clipShape(RoundedCorner(radius: 8, corners: [.topLeft, .topRight]))
65
+ .clipShape(RoundedCorner(radius: 15, corners: [.topLeft, .topRight]))
66
66
  .aspectRatio(2, contentMode: .fit)
67
67
  }
68
68
  VStack(alignment: .leading) {
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
- #Thu Jan 09 10:43:10 ICT 2025
8
- sdk.dir=/Users/sophia/Library/Android/sdk
7
+ #Wed Aug 21 14:20:12 ICT 2024
8
+ sdk.dir=/Users/huynhdung/Library/Android/sdk
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.114.2-beta.8",
3
+ "version": "0.117.1",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},