@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.
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderTitle.kt +5 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +4 -3
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +0 -5
- package/ios/Application/Components.swift +8 -13
- package/ios/Application/Screen.swift +19 -14
- package/ios/Checkbox/Checkbox.swift +1 -1
- package/ios/Popup/PopupDisplay.swift +1 -1
- package/local.properties +2 -2
- package/package.json +1 -1
|
@@ -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 =
|
|
31
|
-
val iconSource = if (indeterminate) "
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
.
|
|
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:
|
|
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(.
|
|
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
|
|
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
|
-
)
|
|
103
|
-
|
|
104
|
-
|
|
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:
|
|
114
|
+
Spacer().frame(height: topInset + 52 + layoutOffset)
|
|
110
115
|
}
|
|
111
116
|
|
|
112
117
|
if scrollable {
|
|
@@ -62,7 +62,7 @@ public struct PopupDisplay: View {
|
|
|
62
62
|
}
|
|
63
63
|
.scaledToFill()
|
|
64
64
|
.frame(maxWidth: .infinity)
|
|
65
|
-
.clipShape(RoundedCorner(radius:
|
|
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
|
-
#
|
|
8
|
-
sdk.dir=/Users/
|
|
7
|
+
#Wed Aug 21 14:20:12 ICT 2024
|
|
8
|
+
sdk.dir=/Users/huynhdung/Library/Android/sdk
|