@momo-kits/native-kits 0.89.33-rc.3 → 0.89.33-rc.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.
@@ -50,7 +50,6 @@ import vn.momo.kits.const.AppTheme
50
50
  import vn.momo.kits.const.Colors
51
51
  import vn.momo.kits.const.Spacing
52
52
  import vn.momo.kits.const.Typography
53
- import vn.momo.kits.modifier.shadow
54
53
  import vn.momo.kits.platform.getStatusBarHeight
55
54
  import vn.momo.kits.utils.bottomBorder
56
55
 
@@ -67,7 +66,6 @@ data class AnimatedHeader(
67
66
  @Composable
68
67
  fun HeaderBackground(
69
68
  headerType: HeaderType = HeaderType.DEFAULT,
70
- useShadow: Boolean? = true,
71
69
  scrollState: Int
72
70
  ) {
73
71
  val statusBarHeight = AppStatusBar.current ?: getStatusBarHeight()
@@ -140,21 +138,12 @@ fun HeaderBackground(
140
138
  }
141
139
  }
142
140
  }
141
+
143
142
  else -> {
144
143
  Box(modifier = Modifier.fillMaxWidth())
145
144
  }
146
145
  }
147
- Box(
148
- modifier = Modifier.fillMaxWidth().height(statusBarHeight + 52.dp)
149
- .alpha(1 - opacityAni)
150
- .background(Colors.black_01)
151
- .then(
152
- if (useShadow == true) Modifier.shadow() else Modifier.bottomBorder(
153
- 1.dp,
154
- Colors.black_04
155
- )
156
- )
157
- )
146
+
158
147
  }
159
148
 
160
149
  @Composable
@@ -166,7 +155,6 @@ fun Header(
166
155
  goBack: (() -> Unit)? = null,
167
156
  opacity: Float? = null,
168
157
  animatedHeader: AnimatedHeader? = null,
169
- useSearchInput: Boolean? = false,
170
158
  scrollState: Int = 0,
171
159
  inputSearchProps: InputSearchProps?
172
160
  ) {
@@ -238,12 +226,11 @@ fun Header(
238
226
  }
239
227
  }
240
228
  }
241
- if (useSearchInput == false) {
242
- Box(Modifier.graphicsLayer {
243
- alpha = if (animatedHeader !== null) opacity ?: 1f else 1f
244
- }) {
245
- headerRight?.invoke()
246
- }
229
+
230
+ Box(Modifier.graphicsLayer {
231
+ alpha = if (animatedHeader !== null) opacity ?: 1f else 1f
232
+ }) {
233
+ headerRight?.invoke()
247
234
  }
248
235
  }
249
236
 
@@ -254,13 +241,12 @@ fun Header(
254
241
  .padding(horizontal = Spacing.M),
255
242
  verticalAlignment = Alignment.CenterVertically,
256
243
  ) {
257
- if (goBack != null) {
244
+ if (goBack != null && titlePosition == TitlePosition.LEFT) {
258
245
  Spacer(Modifier.width(40.dp))
259
246
  }
260
- if (useSearchInput == true && inputSearchProps != null) {
247
+ if (inputSearchProps != null) {
261
248
  InputSearch(inputSearchProps = inputSearchProps.copy(backgroundColor = backgroundSearch))
262
- }
263
- else{
249
+ } else{
264
250
  Box(
265
251
  Modifier.weight(1f).graphicsLayer {
266
252
  alpha = if (animatedHeader !== null) opacity ?: 1f else 1f
@@ -66,8 +66,6 @@ fun Screen(
66
66
  fabProps: FabProps? = null,
67
67
  animatedHeader: AnimatedHeader? = null,
68
68
  layoutOffset: Dp = 56.dp,
69
- useShadow: Boolean? = true,
70
- useSearchInput: Boolean? = false,
71
69
  inputSearchProps: InputSearchProps? = null,
72
70
  content: @Composable () -> Unit,
73
71
  ) {
@@ -106,7 +104,6 @@ fun Screen(
106
104
  ) {
107
105
  HeaderBackground(
108
106
  headerType = headerType,
109
- useShadow = useShadow,
110
107
  scrollState = scrollState.value
111
108
  )
112
109
  }
@@ -120,7 +117,6 @@ fun Screen(
120
117
  goBack = goBack,
121
118
  opacity = opacity,
122
119
  animatedHeader = animatedHeader,
123
- useSearchInput = useSearchInput,
124
120
  inputSearchProps = inputSearchProps,
125
121
  scrollState = scrollState.value
126
122
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/native-kits",
3
- "version": "0.89.33-rc.3",
3
+ "version": "0.89.33-rc.4",
4
4
  "private": false,
5
5
  "dependencies": {},
6
6
  "devDependencies": {},