@momo-kits/native-kits 0.113.2-beta.2 → 0.113.2-beta.4

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.
@@ -94,14 +94,14 @@ fun Screen(
94
94
 
95
95
  Box(
96
96
  Modifier.fillMaxSize()
97
- .background(backgroundColor ?: AppTheme.current.colors.background.surface)
97
+ .background(AppTheme.current.colors.background.surface)
98
98
  ) {
99
99
 
100
100
  if (animatedHeader === null) {
101
101
  HeaderBackground(
102
102
  headerType = headerType,
103
103
  scrollState = scrollState.value,
104
- inputSearchProps= inputSearchProps,
104
+ inputSearchProps = inputSearchProps,
105
105
  useAnimationSearch = useAnimationSearch
106
106
  )
107
107
  } else {
@@ -114,7 +114,7 @@ fun Screen(
114
114
  isBack = isBack,
115
115
  headerType = headerType,
116
116
  scrollState = scrollState.value,
117
- inputSearchProps= inputSearchProps,
117
+ inputSearchProps = inputSearchProps,
118
118
  useAnimationSearch = useAnimationSearch
119
119
  )
120
120
  }
@@ -155,7 +155,11 @@ fun Screen(
155
155
  verticalArrangement = verticalArrangement,
156
156
  horizontalAlignment = horizontalAlignment
157
157
  ) {
158
- Box {
158
+ Box(
159
+ modifier = Modifier.background(
160
+ backgroundColor ?: AppTheme.current.colors.background.default
161
+ )
162
+ ) {
159
163
  headerAnimated()
160
164
  Column {
161
165
  if (animatedHeader !== null) {
@@ -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(
@@ -140,8 +140,8 @@ fun PopupNotify(
140
140
 
141
141
  Box(
142
142
  Modifier
143
- .width(20.dp)
144
- .height(20.dp)
143
+ .width(22.dp)
144
+ .height(22.dp)
145
145
  .offset(x = Spacing.S, y = -Spacing.S)
146
146
  .background(
147
147
  color = AppTheme.current.colors.text.default,
@@ -163,7 +163,7 @@ fun PopupNotify(
163
163
  Icon(
164
164
  source = "navigation_close",
165
165
  color = AppTheme.current.colors.background.surface,
166
- size = 14.dp,
166
+ size = 16.dp,
167
167
  modifier = Modifier.semantics {
168
168
  testTag = "ic_popup_close"
169
169
  }
@@ -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:
@@ -42,25 +42,34 @@ public struct PopupDisplay: View {
42
42
  SwiftUI.Button(action: onPressClose) {
43
43
  Image(systemName: "xmark.circle.fill")
44
44
  .resizable()
45
- .frame(width: 16, height: 16)
45
+ .frame(width: 22, height: 22)
46
+ .overlay(RoundedRectangle(cornerRadius: Radius.L).stroke(Colors.black01, lineWidth: 1))
46
47
  }.foregroundColor(Colors.black20)
47
- .background(Colors.black01.cornerRadius(8))
48
+ .background(Colors.black01.cornerRadius(15))
48
49
  .offset(x: 6, y: -6)
49
50
  .zIndex(1)
50
51
 
51
52
  VStack {
53
+ if(!url.isEmpty) {
52
54
  WebImage(url: URL(string: url), isAnimating: .constant(true))
53
55
  .resizable()
56
+ .placeholder {
57
+ Rectangle()
58
+ .fill(Color.gray.opacity(0.3))
59
+ .frame(maxWidth: .infinity, maxHeight: 184)
60
+ }
54
61
  .scaledToFill()
55
- .frame(maxWidth: .infinity, maxHeight: 164)
62
+ .frame(maxWidth: .infinity)
56
63
  .clipShape(RoundedCorner(radius: 8, corners: [.topLeft, .topRight]))
57
-
64
+ .aspectRatio(2, contentMode: .fit)
65
+ }
58
66
  VStack(alignment: .leading) {
59
67
  Text(title)
60
68
  .foregroundColor(.black)
61
- .font(.headerText1)
62
- .padding(.top, 12)
63
- .padding(.bottom, 24)
69
+ .font(.header_default_semibold)
70
+ .padding(.top, 16)
71
+ .padding(.bottom, 8)
72
+ .lineLimit(2)
64
73
 
65
74
  Text(description)
66
75
  .foregroundColor(.black)
@@ -87,10 +96,8 @@ public struct PopupDisplay: View {
87
96
  }.clipped()
88
97
  }
89
98
  }
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)
99
+ .background(Color.white.cornerRadius(15))
100
+ .padding(.horizontal, 24)
94
101
  }
95
102
 
96
103
  // MARK: Internal
@@ -106,7 +113,7 @@ public struct PopupDisplay: View {
106
113
  var onClose: () -> Void
107
114
  var actionButtonTitle: String
108
115
  var closeButtonTitle: String
109
-
116
+
110
117
  var RowTextButtons: some View {
111
118
  HStack {
112
119
  SwiftUI.Button(action: onPressCloseButton) {
@@ -143,8 +150,8 @@ public struct PopupDisplay: View {
143
150
 
144
151
  var RowButtons: some View {
145
152
  HStack {
146
- Button(title: closeButtonTitle, action: onPressCloseButton, type: .secondary)
147
- Button(title: actionButtonTitle, action: onPressAction)
153
+ Button(title: closeButtonTitle, action: onPressCloseButton, type: .secondary, size: .medium)
154
+ Button(title: actionButtonTitle, action: onPressAction, size: .medium)
148
155
  }
149
156
  .frame(maxWidth: .infinity, alignment: .center)
150
157
  .padding(.horizontal, 24)
@@ -153,8 +160,12 @@ public struct PopupDisplay: View {
153
160
 
154
161
  var ColumnButtons: some View {
155
162
  VStack(alignment: .trailing) {
156
- Button(title: actionButtonTitle, action: onPressAction)
157
- Button(title: closeButtonTitle, action: onPressCloseButton, type: .secondary)
163
+ Button(
164
+ title: actionButtonTitle,
165
+ action: onPressAction,
166
+ size: .medium
167
+ )
168
+ Button(title: closeButtonTitle, action: onPressCloseButton, type: .secondary, size: .medium)
158
169
  }
159
170
  .frame(maxWidth: .infinity, alignment: .trailing)
160
171
  .padding(.horizontal, 24)
@@ -2,13 +2,14 @@ import SwiftUI
2
2
 
3
3
  public extension Font {
4
4
  static func appFont(size: CGFloat) -> Font {
5
- return Font.custom("SFProText", size: size)
5
+ return Font.system(size: size)
6
6
  }
7
7
 
8
8
  // New supported typography styles
9
9
  static let headline_default_bold = appFont(size: 24).weight(.bold)
10
10
  static let header_m_bold = appFont(size: 18).weight(.bold)
11
11
  static let header_default_bold = appFont(size: 16).weight(.bold)
12
+ static let header_default_semibold = appFont(size: 16).weight(.semibold)
12
13
  static let header_s_semibold = appFont(size: 14).weight(.semibold)
13
14
  static let header_xs_semibold = appFont(size: 12).weight(.semibold)
14
15
  static let body_default_regular = appFont(size: 14).weight(.regular)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.113.2-beta.2",
3
+ "version": "0.113.2-beta.4",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},