@momo-kits/native-kits 0.114.2-beta.10 → 0.114.2-beta.12

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.
@@ -138,12 +138,12 @@ public struct Header: View {
138
138
 
139
139
  public var body: some View {
140
140
 
141
- let statusBarHeight = safeAreaTopInset()
141
+ // let statusBarHeight = safeAreaTopInset()
142
142
  let tintIconColor = Colors.black17
143
143
  let backgroundButton = Colors.black01.opacity(0.6)
144
144
 
145
145
  if headerType != .none {
146
- VStack(spacing: 0) {
146
+ VStack(spacing: 0) {
147
147
  ZStack {
148
148
  HStack {
149
149
  if let goBack = goBack {
@@ -153,7 +153,7 @@ public struct Header: View {
153
153
  .background(Circle().fill(backgroundButton))
154
154
  .frame(width: 28, height: 28)
155
155
  .overlay(
156
- Icon(source: "ic_back_android", size: 20, color: Colors.black17)
156
+ Icon(source: "arrow-back", size: 20, color: Colors.black17)
157
157
  )
158
158
  }
159
159
 
@@ -197,7 +197,8 @@ public struct Header: View {
197
197
  }
198
198
  } else {
199
199
  Text(title)
200
- .font(.headline)
200
+ .font(.action_s)
201
+ .lineSpacing(22)
201
202
  .foregroundColor(tintIconColor)
202
203
  .frame(maxWidth: titlePosition == .center ? UIScreen.main.bounds.width - 252 : nil)
203
204
  .frame(maxWidth: titlePosition == .center ? .infinity : UIScreen.main.bounds.width - 172, alignment: titlePosition == .center ? .center : .leading)
@@ -211,7 +212,6 @@ public struct Header: View {
211
212
  .background(Color.clear)
212
213
  }
213
214
  .frame(height: 52)
214
- .padding(.top,statusBarHeight > 21 ? 5 : 0)
215
215
  }
216
216
  }
217
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,13 +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, -safeAreaTopInset())
104
+ )
105
+ .background(HeaderBackground(headerType: headerType, scrollState: scrollOffset).edgesIgnoringSafeArea(.top))
106
+ .offset(y: topInset)
107
+
108
+ }
109
+ .offset(y: -topInset)
104
110
 
105
111
 
106
112
  VStack(alignment: horizontalAlignment, spacing: 0) {
107
113
  if animatedHeader != nil {
108
- Spacer().frame(height: statusBarHeight + 52 + layoutOffset)
114
+ Spacer().frame(height: topInset + 52 + layoutOffset)
109
115
  }
110
116
 
111
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: 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.114.2-beta.10",
3
+ "version": "0.114.2-beta.12",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},