@momo-kits/native-kits 0.162.28-debug → 0.162.29-debug
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/build.gradle.kts
CHANGED
|
@@ -32,6 +32,7 @@ class Navigation(
|
|
|
32
32
|
backgroundColor: Color? = null,
|
|
33
33
|
tintColor: Color? = null,
|
|
34
34
|
footerComponent: (@Composable () -> Unit)? = null,
|
|
35
|
+
footerTransparent: Boolean? = null,
|
|
35
36
|
floatingButtonProps: FloatingButtonProps? = null,
|
|
36
37
|
keyboardOptions: KeyboardOptions? = null
|
|
37
38
|
) {
|
|
@@ -48,6 +49,7 @@ class Navigation(
|
|
|
48
49
|
backgroundColor = backgroundColor ?: options.backgroundColor,
|
|
49
50
|
tintColor = tintColor ?: options.tintColor,
|
|
50
51
|
footerComponent = footerComponent ?: options.footerComponent,
|
|
52
|
+
footerTransparent = footerTransparent ?: options.footerTransparent,
|
|
51
53
|
floatingButtonProps = floatingButtonProps ?: options.floatingButtonProps,
|
|
52
54
|
keyboardOptions = keyboardOptions ?: options.keyboardOptions,
|
|
53
55
|
)
|
|
@@ -83,6 +85,7 @@ data class NavigationOptions(
|
|
|
83
85
|
val backgroundColor: Color? = null,
|
|
84
86
|
val tintColor: Color? = null,
|
|
85
87
|
val footerComponent: @Composable (() -> Unit)? = null,
|
|
88
|
+
val footerTransparent: Boolean = false,
|
|
86
89
|
val floatingButtonProps: FloatingButtonProps? = null,
|
|
87
90
|
val keyboardOptions: KeyboardOptions = KeyboardOptions()
|
|
88
91
|
) {
|
|
@@ -316,7 +316,11 @@ internal fun FooterContent() {
|
|
|
316
316
|
if (options.hasFooter()) {
|
|
317
317
|
val keyboardSize = keyboardSizeState()
|
|
318
318
|
val bottomPadding = (AppNavigationBar.current - keyboardSize.value).coerceAtLeast(0.dp)
|
|
319
|
-
Footer(
|
|
319
|
+
Footer(
|
|
320
|
+
footerComponent = options.footerComponent,
|
|
321
|
+
bottomPadding = bottomPadding,
|
|
322
|
+
transparent = options.footerTransparent
|
|
323
|
+
)
|
|
320
324
|
}
|
|
321
325
|
}
|
|
322
326
|
|
|
@@ -340,7 +344,7 @@ internal fun OverplayView(isBottomTabChild: Boolean, id: Int) {
|
|
|
340
344
|
}
|
|
341
345
|
|
|
342
346
|
@Composable
|
|
343
|
-
fun Footer(footerComponent: @Composable (() -> Unit)?, bottomPadding: Dp) {
|
|
347
|
+
fun Footer(footerComponent: @Composable (() -> Unit)?, bottomPadding: Dp, transparent: Boolean = false) {
|
|
344
348
|
if (footerComponent == null) return
|
|
345
349
|
|
|
346
350
|
val footerHeightPx = LocalFooterHeightPx.current
|
|
@@ -351,13 +355,15 @@ fun Footer(footerComponent: @Composable (() -> Unit)?, bottomPadding: Dp) {
|
|
|
351
355
|
)
|
|
352
356
|
}
|
|
353
357
|
|
|
358
|
+
val backgroundColor = if (transparent) Color.Transparent else AppTheme.current.colors.background.surface
|
|
359
|
+
|
|
354
360
|
Box(Modifier.onGloballyPositioned {
|
|
355
361
|
if (footerHeightPx.intValue != it.size.height) footerHeightPx.intValue = it.size.height
|
|
356
362
|
}) {
|
|
357
363
|
Box(
|
|
358
364
|
Modifier
|
|
359
365
|
.fillMaxWidth()
|
|
360
|
-
.background(
|
|
366
|
+
.background(backgroundColor)
|
|
361
367
|
.conditional(IsShowBaseLineDebug) {
|
|
362
368
|
border(1.dp, Colors.blue_03)
|
|
363
369
|
}
|
|
@@ -366,13 +372,15 @@ fun Footer(footerComponent: @Composable (() -> Unit)?, bottomPadding: Dp) {
|
|
|
366
372
|
footerComponent.invoke()
|
|
367
373
|
}
|
|
368
374
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
375
|
+
if (!transparent) {
|
|
376
|
+
Box(
|
|
377
|
+
modifier = Modifier
|
|
378
|
+
.fillMaxWidth()
|
|
379
|
+
.height(6.dp)
|
|
380
|
+
.offset(x = 0.dp, y = (-6).dp)
|
|
381
|
+
.background(shadowBrush)
|
|
382
|
+
)
|
|
383
|
+
}
|
|
376
384
|
}
|
|
377
385
|
}
|
|
378
386
|
|
package/gradle.properties
CHANGED