@momo-kits/native-kits 0.169.8-beta.7-debug → 0.169.8

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.
Files changed (157) hide show
  1. package/ios/Input/InputSearch.swift +6 -23
  2. package/ios/Navigation/BottomTab/BottomTabBar.swift +0 -9
  3. package/ios/Navigation/Component/Header.swift +46 -31
  4. package/ios/Navigation/Component/HeaderJourney.swift +1 -2
  5. package/ios/Navigation/Component/HeaderLocation.swift +1 -2
  6. package/ios/Navigation/Component/HeaderRight.swift +15 -18
  7. package/ios/Navigation/Component/HeaderUser.swift +1 -2
  8. package/ios/Navigation/Component/SideBar.swift +13 -4
  9. package/ios/Navigation/Navigation.swift +1 -31
  10. package/ios/Navigation/StackScreen.swift +14 -43
  11. package/ios/native-kits.podspec +1 -1
  12. package/ios-demo/MoMoUIKitsDemo.podspec +1 -1
  13. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/AnimatedHeaderDemo.swift +2 -11
  14. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/BottomTabDemo.swift +1 -13
  15. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/NavigationDemo.swift +0 -11
  16. package/ios-demo/Sources/MoMoUIKitsDemo/SampleDemos/PopupNotifyDemo.swift +1 -1
  17. package/package.json +1 -1
  18. package/build.gradle.kts +0 -11
  19. package/compose/build.gradle.kts +0 -198
  20. package/compose/compose.podspec +0 -47
  21. package/compose/src/androidMain/kotlin/vn/momo/kits/const/HostFont.android.kt +0 -19
  22. package/compose/src/androidMain/kotlin/vn/momo/kits/navigation/ScrollToTop.android.kt +0 -6
  23. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/BackGesture.android.kt +0 -12
  24. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/OsFontScale.android.kt +0 -7
  25. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +0 -154
  26. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/ReduceMotion.android.kt +0 -17
  27. package/compose/src/androidMain/kotlin/vn/momo/kits/platform/ReservedRegions.android.kt +0 -6
  28. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +0 -110
  29. package/compose/src/commonMain/kotlin/vn/momo/kits/application/DesignSystemKits.kt +0 -62
  30. package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +0 -1067
  31. package/compose/src/commonMain/kotlin/vn/momo/kits/application/Localize.kt +0 -267
  32. package/compose/src/commonMain/kotlin/vn/momo/kits/application/WidgetContainer.kt +0 -56
  33. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Avatar.kt +0 -157
  34. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +0 -82
  35. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +0 -32
  36. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +0 -338
  37. package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +0 -175
  38. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +0 -356
  39. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Carousel.kt +0 -115
  40. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +0 -89
  41. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +0 -128
  42. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Collapse.kt +0 -209
  43. package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +0 -482
  44. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +0 -49
  45. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +0 -86
  46. package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +0 -125
  47. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +0 -224
  48. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +0 -195
  49. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +0 -473
  50. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +0 -113
  51. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +0 -263
  52. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +0 -235
  53. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +0 -228
  54. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +0 -280
  55. package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +0 -183
  56. package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +0 -343
  57. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Loader.kt +0 -108
  58. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +0 -56
  59. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationNumber.kt +0 -40
  60. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +0 -82
  61. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +0 -39
  62. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +0 -363
  63. package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +0 -108
  64. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ProgressInfo.kt +0 -307
  65. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +0 -59
  66. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Rating.kt +0 -87
  67. package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +0 -21
  68. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +0 -88
  69. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Slider.kt +0 -306
  70. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Stepper.kt +0 -220
  71. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Steps.kt +0 -457
  72. package/compose/src/commonMain/kotlin/vn/momo/kits/components/SuggestAction.kt +0 -122
  73. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Swipe.kt +0 -205
  74. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +0 -89
  75. package/compose/src/commonMain/kotlin/vn/momo/kits/components/TabView.kt +0 -542
  76. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +0 -86
  77. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +0 -120
  78. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +0 -201
  79. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +0 -498
  80. package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +0 -176
  81. package/compose/src/commonMain/kotlin/vn/momo/kits/components/Uploader.kt +0 -182
  82. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +0 -193
  83. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +0 -29
  84. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +0 -210
  85. package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +0 -180
  86. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +0 -325
  87. package/compose/src/commonMain/kotlin/vn/momo/kits/const/HostFont.kt +0 -12
  88. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +0 -12
  89. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +0 -16
  90. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +0 -194
  91. package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +0 -292
  92. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +0 -54
  93. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/HeaderLayout.kt +0 -63
  94. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +0 -50
  95. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/ModalLayout.kt +0 -184
  96. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/ScreenLayout.kt +0 -316
  97. package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +0 -41
  98. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +0 -52
  99. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +0 -66
  100. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Conditional.kt +0 -11
  101. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +0 -104
  102. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +0 -48
  103. package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Size.kt +0 -51
  104. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +0 -397
  105. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/HostBackGestureBridge.kt +0 -58
  106. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +0 -153
  107. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +0 -118
  108. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +0 -205
  109. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +0 -422
  110. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ScrollToTop.kt +0 -8
  111. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +0 -746
  112. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackTransition.kt +0 -148
  113. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/SwipeBackHaptic.kt +0 -35
  114. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +0 -242
  115. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +0 -400
  116. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +0 -100
  117. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/DuoBarCompression.kt +0 -97
  118. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/DuoTabBar.kt +0 -207
  119. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/TabBarMetrics.kt +0 -132
  120. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +0 -167
  121. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +0 -446
  122. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +0 -105
  123. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderJourney.kt +0 -106
  124. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderLocation.kt +0 -74
  125. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +0 -398
  126. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +0 -39
  127. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +0 -363
  128. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SideBar.kt +0 -197
  129. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +0 -133
  130. package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/tracking/ScreenTracker.kt +0 -127
  131. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/BackGesture.kt +0 -12
  132. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ComposeLottieAnimation.kt +0 -114
  133. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/OsFontScale.kt +0 -9
  134. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +0 -76
  135. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ReduceMotion.kt +0 -7
  136. package/compose/src/commonMain/kotlin/vn/momo/kits/platform/ReservedRegions.kt +0 -22
  137. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +0 -1329
  138. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +0 -55
  139. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Tracking.kt +0 -15
  140. package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +0 -118
  141. package/compose/src/iosMain/kotlin/vn/momo/kits/const/HostFont.ios.kt +0 -42
  142. package/compose/src/iosMain/kotlin/vn/momo/kits/navigation/HostBackGesture.ios.kt +0 -45
  143. package/compose/src/iosMain/kotlin/vn/momo/kits/navigation/ScrollToTop.ios.kt +0 -32
  144. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/BackGesture.ios.kt +0 -38
  145. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/OsFontScale.ios.kt +0 -66
  146. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +0 -218
  147. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/ReduceMotion.ios.kt +0 -48
  148. package/compose/src/iosMain/kotlin/vn/momo/kits/platform/ReservedRegions.ios.kt +0 -144
  149. package/gradle/libs.versions.toml +0 -67
  150. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  151. package/gradle/wrapper/gradle-wrapper.properties +0 -8
  152. package/gradle.properties +0 -24
  153. package/gradlew +0 -252
  154. package/gradlew.bat +0 -94
  155. package/ios/Layout/HeaderLayout.swift +0 -60
  156. package/ios-demo/README.md +0 -120
  157. package/settings.gradle.kts +0 -64
@@ -1,746 +0,0 @@
1
- package vn.momo.kits.navigation
2
-
3
- import androidx.compose.animation.animateColorAsState
4
- import androidx.compose.animation.core.Animatable
5
- import androidx.compose.animation.core.AnimationVector1D
6
- import androidx.compose.animation.core.tween
7
- import androidx.compose.foundation.ScrollState
8
- import androidx.compose.foundation.background
9
- import androidx.compose.foundation.border
10
- import androidx.compose.foundation.gestures.ScrollableState
11
- import androidx.compose.foundation.gestures.animateScrollBy
12
- import androidx.compose.foundation.layout.Box
13
- import androidx.compose.foundation.layout.Column
14
- import androidx.compose.foundation.layout.ColumnScope
15
- import androidx.compose.foundation.layout.Spacer
16
- import androidx.compose.foundation.layout.WindowInsets
17
- import androidx.compose.foundation.layout.asPaddingValues
18
- import androidx.compose.foundation.layout.aspectRatio
19
- import androidx.compose.foundation.layout.fillMaxSize
20
- import androidx.compose.foundation.layout.fillMaxWidth
21
- import androidx.compose.foundation.layout.height
22
- import androidx.compose.foundation.layout.ime
23
- import androidx.compose.foundation.layout.imePadding
24
- import androidx.compose.foundation.layout.offset
25
- import androidx.compose.foundation.layout.padding
26
- import androidx.compose.foundation.layout.width
27
- import androidx.compose.foundation.lazy.LazyListState
28
- import androidx.compose.foundation.rememberScrollState
29
- import androidx.compose.foundation.verticalScroll
30
- import androidx.compose.material.ExperimentalMaterialApi
31
- import androidx.compose.runtime.Composable
32
- import androidx.compose.runtime.CompositionLocalProvider
33
- import androidx.compose.foundation.layout.PaddingValues
34
- import androidx.compose.runtime.LaunchedEffect
35
- import androidx.compose.runtime.State
36
- import androidx.compose.runtime.getValue
37
- import androidx.compose.runtime.mutableIntStateOf
38
- import androidx.compose.runtime.mutableStateOf
39
- import androidx.compose.runtime.remember
40
- import androidx.compose.runtime.rememberUpdatedState
41
- import androidx.compose.runtime.snapshotFlow
42
- import androidx.compose.runtime.staticCompositionLocalOf
43
- import androidx.compose.ui.Alignment
44
- import androidx.compose.ui.Modifier
45
- import androidx.compose.ui.graphics.Brush
46
- import androidx.compose.ui.graphics.Color
47
- import androidx.compose.ui.graphics.graphicsLayer
48
- import androidx.compose.ui.graphics.lerp
49
- import androidx.compose.ui.layout.onGloballyPositioned
50
- import androidx.compose.ui.platform.LocalDensity
51
- import androidx.compose.ui.unit.Dp
52
- import androidx.compose.ui.unit.dp
53
- import androidx.compose.ui.unit.lerp
54
- import androidx.compose.ui.zIndex
55
- import kotlinx.coroutines.flow.Flow
56
- import kotlinx.coroutines.flow.filter
57
- import kotlinx.coroutines.launch
58
- import vn.momo.kits.components.InputSearch
59
- import vn.momo.kits.components.InputSearchSize
60
- import vn.momo.kits.const.AppNavigationBar
61
- import vn.momo.kits.const.AppTheme
62
- import vn.momo.kits.application.IsShowBaseLineDebug
63
- import vn.momo.kits.const.Colors
64
- import vn.momo.kits.const.Spacing
65
- import vn.momo.kits.modifier.conditional
66
- import vn.momo.kits.modifier.hideKeyboardOnTap
67
- import vn.momo.kits.navigation.component.FABPosition
68
- import vn.momo.kits.navigation.component.FloatingButton
69
- import vn.momo.kits.navigation.component.HEADER_HEIGHT
70
- import vn.momo.kits.navigation.component.Header
71
- import vn.momo.kits.navigation.component.HeaderBackground
72
- import vn.momo.kits.navigation.component.HeaderRight
73
- import vn.momo.kits.navigation.component.HeaderSideBar
74
- import vn.momo.kits.navigation.bottomtab.LocalDuoRailReserve
75
- import vn.momo.kits.navigation.bottomtab.LocalTabBarHasCenterAction
76
- import vn.momo.kits.navigation.bottomtab.duoFloatingTabBarInset
77
- import vn.momo.kits.navigation.component.HeaderType
78
- import vn.momo.kits.navigation.component.InputSearchType
79
- import vn.momo.kits.navigation.bottomtab.LocalBottomTabFocused
80
- import vn.momo.kits.platform.BackHandler
81
- import vn.momo.kits.platform.supportsImePadding
82
- import vn.momo.kits.navigation.tracking.ScreenTracker
83
- import vn.momo.kits.navigation.tracking.ScreenTrackingState
84
- import kotlinx.coroutines.delay
85
- import vn.momo.kits.application.LocalContext
86
- import vn.momo.kits.utils.horizontalSafeAreaPadding
87
- import vn.momo.kits.layout.LocalScreenLayout
88
- import vn.momo.kits.layout.ScreenLayout
89
- import vn.momo.kits.layout.consumeHorizontalInsets
90
- import vn.momo.kits.layout.HEADER_BANNER_WIDTH
91
- import vn.momo.kits.layout.HEADER_BUTTON_SIZE
92
- import vn.momo.kits.layout.HEADER_TITLE_GAP
93
- import vn.momo.kits.layout.getScreenLayout
94
- import vn.momo.kits.layout.rememberHeaderLayout
95
- import kotlin.time.Clock
96
- import kotlin.time.Duration.Companion.milliseconds
97
- import kotlin.time.ExperimentalTime
98
-
99
- @Composable
100
- fun floatingTabBarContentPadding(): PaddingValues {
101
- val navigation = LocalNavigation.current
102
- LaunchedEffect(navigation) { navigation.bottomTabEdgeToEdge = true }
103
- val reserve = navigation.bottomTabIndex != -1 && navigation.bottomTabEdgeToEdge
104
- return PaddingValues(bottom = if (reserve) bottomTabChildInset() else 0.dp)
105
- }
106
-
107
- internal val LocalFooterHeightPx = staticCompositionLocalOf { mutableIntStateOf(0) }
108
- internal val LocalHeaderRightWidthPx = staticCompositionLocalOf { mutableIntStateOf(0) }
109
-
110
- // Space a tab's content leaves for the tab bar and home indicator: the horizontal bar floats over the
111
- // content (phone and unfolded Duo); the Duo rail lives in the side strip, so only the home indicator.
112
- @Composable
113
- private fun bottomTabChildInset(): Dp {
114
- val keyboard = keyboardSizeState().value
115
- val navigationBar = AppNavigationBar.current
116
- val layout = getScreenLayout()
117
- return when {
118
- layout.isIPhoneDuo && layout.sideBar != null -> (navigationBar - keyboard).coerceAtLeast(0.dp)
119
- else -> (duoFloatingTabBarInset(layout, LocalTabBarHasCenterAction.current) - keyboard).coerceAtLeast(0.dp)
120
- }
121
- }
122
-
123
- @OptIn(ExperimentalMaterialApi::class, ExperimentalTime::class)
124
- @Composable
125
- internal fun StackScreen(
126
- content: @Composable () -> Unit,
127
- navigationOptions: NavigationOptions? = null,
128
- id: Int = -1,
129
- name: String = "",
130
- bottomTabIndex: Int = -1,
131
- onBackHandler: (() -> Unit)? = null,
132
- ) {
133
- val navigator = LocalNavigator.current
134
- val maxApi = LocalMaxApi.current
135
- val context = LocalContext.current
136
- val screenLayout = getScreenLayout()
137
- val density = LocalDensity.current
138
- val screenRegistry = LocalDynamicScreenRegistry.current
139
- val navigation = remember { Navigation(id = id, bottomTabIndex = bottomTabIndex, initOptions = navigationOptions, registry = screenRegistry) }
140
-
141
- val options by navigation.currentOptions
142
- val isBottomTabChild = bottomTabIndex != -1
143
- val isBottomTabRoot = navigation.isBottomTabRoot
144
-
145
- // A mounted-but-hidden bottom tab tracks again each time it is focused (RN useFocusEffect).
146
- val tabFocused = LocalBottomTabFocused.current
147
-
148
- val trackingState = remember(tabFocused) {
149
- ScreenTrackingState().apply {
150
- time = Clock.System.now().toEpochMilliseconds()
151
- }
152
- }
153
-
154
- val action = remember(tabFocused) {
155
- if (ScreenTracker.getLastScreenName() != null) "push" else "back"
156
- }
157
-
158
- LaunchedEffect(name, tabFocused) {
159
- if (!tabFocused) return@LaunchedEffect
160
- ScreenTracker.trackScreenNavigated(
161
- maxApi = maxApi,
162
- context = context,
163
- screenName = name,
164
- action = action,
165
- state = trackingState
166
- )
167
-
168
- delay(2000.milliseconds)
169
- val loadTime = Clock.System.now().toEpochMilliseconds() - trackingState.time
170
- ScreenTracker.trackScreenDisplayed(
171
- maxApi = maxApi,
172
- context = context,
173
- screenName = name,
174
- duration = loadTime,
175
- state = trackingState
176
- )
177
-
178
- val interactionTime = Clock.System.now().toEpochMilliseconds() - trackingState.time
179
- ScreenTracker.trackScreenInteracted(
180
- maxApi = maxApi,
181
- context = context,
182
- screenName = name,
183
- duration = interactionTime - loadTime,
184
- totalDuration = interactionTime,
185
- state = trackingState
186
- )
187
- }
188
-
189
- val limit = with(density) {
190
- screenLayout.headerHeight.toPx()
191
- }.toInt()
192
-
193
- val lazyListState = options.scrollData.scrollState as? LazyListState
194
- val (scrollState, _) = if (lazyListState != null)
195
- lazyListState.proxyScrollState(limit, 1)
196
- else
197
- (options.scrollData.scrollState as? ScrollState ?: rememberScrollState()).proxyLimitedScrollState(limit, 1)
198
- val snapState: ScrollableState = lazyListState ?: scrollState
199
- val headerHide = rememberQuickReturnHide(
200
- enabled = options.usesDuoQuickReturnHeader(screenLayout),
201
- scrollState = scrollState,
202
- heightPx = with(density) { screenLayout.headerHeight.toPx() },
203
- )
204
-
205
- val footerHeightPx = remember { mutableIntStateOf(0) }
206
- val headerRightWidthPx = remember { mutableIntStateOf(0) }
207
-
208
- if (tabFocused && navigation.options.scrollData.scrollToTopCallback != null) {
209
- RegisterScrollToTop(navigation.options.scrollData.scrollToTopCallback)
210
- }
211
-
212
- val canPop = navigator.canPop()
213
-
214
- val hasCustomBackHandling = !SwipeBackConfig.enabled ||
215
- OverplayComponentRegistry.isOverplayShowing() ||
216
- !canPop
217
-
218
- BackHandler(hasCustomBackHandling) { navigator.onBackSafe() }
219
-
220
- CompositionLocalProvider(
221
- StackScreenScrollableState provides options.scrollData.scrollState,
222
- LocalNavigation provides navigation,
223
- LocalScrollState provides scrollState,
224
- LocalOptions provides options,
225
- LocalFooterHeightPx provides footerHeightPx,
226
- LocalHeaderRightWidthPx provides headerRightWidthPx
227
- ) {
228
- Box(Modifier.fillMaxSize()) {
229
- options.backgroundComponent?.let { background ->
230
- Box(Modifier.fillMaxSize()) { background() }
231
- }
232
- Box(
233
- Modifier
234
- .fillMaxSize()
235
- .background(
236
- if (options.backgroundComponent != null) Color.Transparent
237
- else options.backgroundColor ?: AppTheme.current.colors.background.default
238
- )
239
- .conditional(options.keyboardOptions.keyboardShouldPersistTaps) {
240
- hideKeyboardOnTap()
241
- }
242
- .conditional(options.keyboardOptions.useAvoidKeyboard && supportsImePadding()) {
243
- imePadding()
244
- }
245
- ) {
246
- Box(Modifier.zIndex(1f)) {
247
- HeaderBackground()
248
- }
249
-
250
- Box(Modifier.zIndex(4f).graphicsLayer { translationY = -headerHide.value }) {
251
- Header(onBackHandler)
252
- }
253
-
254
- HeaderSideBar(
255
- bottomInset = maxOf(
256
- bottomBarsHeight(isBottomTabChild) + Spacing.XL,
257
- if (isBottomTabChild) LocalDuoRailReserve.current else 0.dp,
258
- ),
259
- modifier = Modifier.zIndex(4f),
260
- )
261
-
262
- Column(Modifier.zIndex(5f).horizontalSafeAreaPadding()) {
263
- SearchAnimated(snapState = snapState)
264
- }
265
-
266
- Column(Modifier.zIndex(2f).fillMaxSize()) {
267
- MainContent(content = content, isBottomTabRoot = isBottomTabRoot, isBottomTabChild = isBottomTabChild)
268
- FooterContent()
269
- }
270
-
271
- Box(Modifier.zIndex(6f).horizontalSafeAreaPadding()) {
272
- FloatingContent(isBottomTabChild = isBottomTabChild)
273
- }
274
-
275
- OverplayView(isBottomTabChild = isBottomTabChild, id = id)
276
- }
277
- }
278
- }
279
- }
280
-
281
- // Height the footer, tab bar or home indicator takes from the bottom of the screen.
282
- @Composable
283
- private fun bottomBarsHeight(isBottomTabChild: Boolean): Dp {
284
- val options = LocalOptions.current
285
- val navigationBar = AppNavigationBar.current
286
- return when {
287
- options.hasFooter() -> with(LocalDensity.current) { LocalFooterHeightPx.current.intValue.toDp() }
288
- isBottomTabChild -> bottomTabChildInset()
289
- else -> navigationBar
290
- }
291
- }
292
-
293
- @Suppress("FrequentlyChangingValue")
294
- @Composable
295
- internal fun FloatingContent(isBottomTabChild: Boolean) {
296
- val options = LocalOptions.current
297
- val scrollState = LocalScrollState.current
298
-
299
- val fabProps = options.floatingButtonProps ?: return
300
- val bottomPadding = fabProps.bottom ?: (Spacing.M + bottomBarsHeight(isBottomTabChild))
301
-
302
- FloatingButton(
303
- scrollPosition = fabProps.scrollState?.value ?: scrollState.value,
304
- onClick = fabProps.onClick,
305
- containerColor = AppTheme.current.colors.primary,
306
- bottom = bottomPadding,
307
- icon = fabProps.icon,
308
- iconColor = fabProps.iconColor,
309
- text = fabProps.label,
310
- size = fabProps.size,
311
- position = fabProps.position ?: FABPosition.END,
312
- )
313
- }
314
-
315
- @Composable
316
- internal fun ColumnScope.MainContent(content: @Composable () -> Unit, isBottomTabRoot: Boolean, isBottomTabChild: Boolean) {
317
- val options = LocalOptions.current
318
- val inputSearchType = getInputSearchType(options)
319
- val density = LocalDensity.current
320
- val scrollState = LocalScrollState.current
321
- val navigationBar = AppNavigationBar.current
322
- val screenLayout = getScreenLayout()
323
- val useDuoGlass = options.usesDuoGlassHeader(screenLayout)
324
-
325
- Spacer(
326
- Modifier.height(
327
- if (!useDuoGlass && (options.headerType is HeaderType.DefaultOrExtended || (options.headerType is HeaderType.Transparent && !options.headerType.isFullScreenContent)))
328
- screenLayout.headerHeight else 0.dp
329
- )
330
- )
331
- if (inputSearchType == InputSearchType.Animated) {
332
- val scrollDp = with(density) { scrollState.value.toDp() }
333
-
334
- Spacer(Modifier.height((HEADER_HEIGHT.dp - scrollDp).coerceIn(0.dp, HEADER_HEIGHT.dp)))
335
- }
336
- val insetContent = !isBottomTabRoot
337
- Column(
338
- Modifier
339
- .fillMaxWidth()
340
- .weight(1f)
341
- .conditional(insetContent && options.headerType !is HeaderType.Animated) {
342
- horizontalSafeAreaPadding()
343
- }
344
- .conditional(options.scrollData.scrollable && options.scrollData.scrollState is ScrollState) {
345
- verticalScroll(scrollState)
346
- }
347
- .conditional(useDuoGlass) {
348
- padding(top = screenLayout.headerHeight)
349
- }
350
- .padding(
351
- bottom = when {
352
- options.hasFooter() || isBottomTabRoot -> 0.dp
353
- // 0 when the tab pads itself via floatingTabBarContentPadding(), else the kit reserves the bar space
354
- isBottomTabChild -> if (LocalNavigation.current.bottomTabEdgeToEdge) 0.dp else bottomTabChildInset()
355
- !options.scrollData.scrollable && options.scrollData.scrollState == null -> 0.dp
356
- else -> navigationBar
357
- }
358
- )
359
- ) {
360
- ScreenContent(content = content, insetContent = insetContent)
361
- }
362
-
363
- }
364
-
365
- @Composable
366
- internal fun ScreenContent(content: @Composable () -> Unit, insetContent: Boolean) {
367
- val scrollState = LocalScrollState.current
368
- val options = LocalOptions.current
369
- val screenLayout = getScreenLayout()
370
- val insetBody: @Composable () -> Unit = {
371
- CompositionLocalProvider(
372
- LocalScreenLayout provides if (insetContent) screenLayout.consumeHorizontalInsets() else screenLayout,
373
- content = content,
374
- )
375
- }
376
-
377
- if (options.headerType is HeaderType.Animated) {
378
- val animatedHeader = options.headerType
379
- val isWide = rememberHeaderLayout(options.contentLayout).isWide
380
- Box {
381
- // wide windows keep the phone banner size, centered over a fill fading down from bannerBackgroundColor
382
- val bannerWidth = if (isWide) Modifier.width(HEADER_BANNER_WIDTH) else Modifier.fillMaxWidth()
383
- val bannerModifier = animatedHeader.height
384
- ?.let { bannerWidth.height(it) }
385
- ?: bannerWidth.aspectRatio(animatedHeader.aspectRatio.value)
386
- Box(Modifier.fillMaxWidth(), contentAlignment = Alignment.TopCenter) {
387
- val fill = animatedHeader.bannerBackgroundColor
388
- if (isWide && fill != null) {
389
- Box(
390
- Modifier.matchParentSize()
391
- .background(Brush.verticalGradient(listOf(fill, fill.copy(alpha = 0f))))
392
- )
393
- }
394
- Box(bannerModifier) {
395
- animatedHeader.composable.invoke(scrollState.value)
396
- }
397
- }
398
- Box(
399
- Modifier
400
- .padding(top = screenLayout.headerHeight + animatedHeader.layoutOffSet)
401
- .conditional(insetContent) { horizontalSafeAreaPadding() }
402
- ) {
403
- insetBody()
404
- }
405
- }
406
- } else {
407
- insetBody()
408
- }
409
- }
410
-
411
- @Composable
412
- internal fun FooterContent() {
413
- val options = LocalOptions.current
414
- if (options.hasFooter()) {
415
- val keyboardSize = keyboardSizeState()
416
- // the floating tab bar overlays tab content, so a tab's footer sits above it
417
- val duoTabInset = if (LocalNavigation.current.bottomTabIndex != -1) duoFloatingTabBarInset(getScreenLayout(), LocalTabBarHasCenterAction.current) else 0.dp
418
- val bottomPadding = (maxOf(AppNavigationBar.current, duoTabInset) - keyboardSize.value).coerceAtLeast(0.dp)
419
- Footer(
420
- footerComponent = options.footerComponent,
421
- bottomPadding = bottomPadding,
422
- transparent = options.footerTransparent,
423
- useMargin = options.footerUseMargin
424
- )
425
- }
426
- }
427
-
428
- @Composable
429
- internal fun keyboardSizeState(): State<Dp> {
430
- val bottom = WindowInsets.ime.asPaddingValues()
431
- return rememberUpdatedState(bottom.calculateBottomPadding())
432
- }
433
-
434
- @Composable
435
- internal fun OverplayView(isBottomTabChild: Boolean, id: Int) {
436
- val overplayType = OverplayComponentRegistry.getOverplayType()
437
-
438
- if (overplayType != null) {
439
- Box(Modifier.zIndex(if (overplayType == OverplayComponentType.SNACK_BAR) 3f else 7f).fillMaxSize()) {
440
- if (isBottomTabChild) return@Box
441
- if (OverplayComponentRegistry.currentRootId() != id) return@Box
442
- OverplayComponentRegistry.OverlayComponent()
443
- }
444
- }
445
- }
446
-
447
- @Composable
448
- fun Footer(
449
- footerComponent: @Composable (() -> Unit)?,
450
- bottomPadding: Dp,
451
- transparent: Boolean = false,
452
- useMargin: Boolean = true,
453
- ) {
454
- if (footerComponent == null) return
455
-
456
- val footerHeightPx = LocalFooterHeightPx.current
457
-
458
- val shadowBrush = remember {
459
- Brush.verticalGradient(
460
- colors = listOf(Color.Transparent, Color.Black.copy(alpha = 0.05f))
461
- )
462
- }
463
-
464
- val backgroundColor = if (transparent) Color.Transparent else AppTheme.current.colors.background.surface
465
-
466
- // inset as a whole, not padded inside, so the surface and its shadow stay off the iPhone Duo side bar
467
- Box(Modifier.onGloballyPositioned {
468
- if (footerHeightPx.intValue != it.size.height) footerHeightPx.intValue = it.size.height
469
- }.horizontalSafeAreaPadding()) {
470
- Box(
471
- Modifier
472
- .fillMaxWidth()
473
- .background(backgroundColor)
474
- .conditional(IsShowBaseLineDebug) {
475
- border(1.dp, Colors.blue_03)
476
- }
477
- .padding(
478
- top = if (useMargin) Spacing.S else 0.dp,
479
- start = if (useMargin) Spacing.M else 0.dp,
480
- end = if (useMargin) Spacing.M else 0.dp,
481
- bottom = bottomPadding + if (useMargin) Spacing.S else 0.dp,
482
- )
483
- ) {
484
- footerComponent.invoke()
485
- }
486
-
487
- if (!transparent) {
488
- Box(
489
- modifier = Modifier
490
- .fillMaxWidth()
491
- .height(6.dp)
492
- .offset(x = 0.dp, y = (-6).dp)
493
- .background(shadowBrush)
494
- )
495
- }
496
- }
497
- }
498
-
499
- data class InputSearchLayoutParams(
500
- val topPadding: Dp,
501
- val startPadding: Dp,
502
- val endPadding: Dp
503
- )
504
-
505
- @Suppress("FrequentlyChangingValue")
506
- @Composable
507
- internal fun SearchAnimated(
508
- snapState: ScrollableState
509
- ) {
510
- val scrollState = LocalScrollState.current
511
- val options = LocalOptions.current
512
- val navigator = LocalNavigator.current
513
- val density = LocalDensity.current
514
-
515
- val scrollDp = with(density) { scrollState.value.toDp() }
516
-
517
- val inputSearchType = getInputSearchType(options)
518
- val headerRightWidthPx = LocalHeaderRightWidthPx.current
519
- val headerRightWidthDp = with(density) { headerRightWidthPx.intValue.toDp() }
520
-
521
- if (inputSearchType == InputSearchType.None) return
522
- val inputSearchProps = (options.headerType as? HeaderType.DefaultOrExtended)?.inputSearchProps ?: return
523
-
524
- val screenLayout = getScreenLayout()
525
- val useSideBar = screenLayout.sideBar != null
526
- // collapsed, the search is centered in the bar row
527
- val minTopPadding = screenLayout.headerStatusBarHeight + (screenLayout.headerBarHeight - HEADER_HEIGHT.dp) / 2
528
- val maxTopPadding = screenLayout.headerHeight
529
- // collapsed on the iPhone Duo status bar row, the search stays between its clusters
530
- val clearance = screenLayout.statusBarClearance
531
- // stretch screens on wide windows keep the search in the header's centered frame
532
- val sidePadding = rememberHeaderLayout(options.contentLayout).frameInset
533
- val minStartPadding = sidePadding
534
- val maxStartPadding = (clearance?.left ?: 0.dp) +
535
- if (options.hiddenBack || useSideBar) sidePadding else HEADER_BUTTON_SIZE + sidePadding + HEADER_TITLE_GAP
536
- val minEndPadding = sidePadding
537
- val maxEndPadding = (clearance?.right ?: 0.dp) + when {
538
- options.headerRight is HeaderRight.None -> sidePadding
539
- useSideBar && options.headerRight is HeaderRight.Toolkit -> sidePadding
540
- else -> headerRightWidthDp + sidePadding + Spacing.M
541
- }
542
-
543
- val targetColor = lerp(
544
- AppTheme.current.colors.background.surface,
545
- AppTheme.current.colors.background.default,
546
- (scrollDp / minTopPadding.coerceAtLeast(1.dp)).coerceIn(0f, 1f)
547
- )
548
- val animatedColor by animateColorAsState(targetValue = targetColor, label = "BackgroundColor")
549
-
550
- val layoutParams = when (inputSearchType) {
551
- InputSearchType.Header -> {
552
- InputSearchLayoutParams(
553
- topPadding = minTopPadding,
554
- startPadding = maxStartPadding,
555
- endPadding = maxEndPadding
556
- )
557
- }
558
-
559
- InputSearchType.Animated -> {
560
- val collapsePx = with(density) { HEADER_HEIGHT.dp.roundToPx() }
561
- val progress = (scrollState.value / collapsePx.toFloat()).coerceIn(0f, 1f)
562
-
563
- LaunchedEffect(snapState, collapsePx) {
564
- snapshotFlow { snapState.isScrollInProgress }
565
- .filter { !it }
566
- .collect {
567
- val offset = snapState.headerOffsetPx() ?: return@collect
568
- if (offset <= 0 || offset >= collapsePx) return@collect
569
- val target = if (offset < collapsePx / 2) 0 else collapsePx
570
- launch { snapState.animateScrollBy((target - offset).toFloat()) }
571
- }
572
- }
573
-
574
- InputSearchLayoutParams(
575
- topPadding = lerp(maxTopPadding, minTopPadding, progress),
576
- startPadding = lerp(minStartPadding, maxStartPadding, progress),
577
- endPadding = lerp(minEndPadding, maxEndPadding, progress)
578
- )
579
- }
580
-
581
- InputSearchType.None -> return
582
- }
583
-
584
- Spacer(Modifier.height(layoutParams.topPadding))
585
- Box(
586
- modifier = Modifier
587
- .height(HEADER_HEIGHT.dp)
588
- .fillMaxWidth()
589
- .padding(
590
- start = layoutParams.startPadding,
591
- end = layoutParams.endPadding
592
- ),
593
- contentAlignment = Alignment.Center
594
- ) {
595
- InputSearch(
596
- inputSearchProps = inputSearchProps.copy(
597
- backgroundColor = animatedColor,
598
- onPressButtonText = {
599
- navigator.pop()
600
- }
601
- ),
602
- size = InputSearchSize.Header,
603
- )
604
- }
605
- }
606
-
607
- private fun ScrollableState.headerOffsetPx(): Int? = when (this) {
608
- is LazyListState -> if (firstVisibleItemIndex == 0) firstVisibleItemScrollOffset else null
609
- is ScrollState -> value
610
- else -> null
611
- }
612
-
613
- private fun quantize(value: Int, stepPx: Int): Int {
614
- if (stepPx <= 1) return value
615
- return (value / stepPx) * stepPx
616
- }
617
-
618
- @Composable
619
- internal fun LazyListState.proxyScrollState(
620
- thresholdPx: Int = 200,
621
- stepPx: Int = 4
622
- ): Pair<ScrollState, Boolean> = proxyScroll(
623
- source = this,
624
- thresholdPx = thresholdPx,
625
- stepPx = stepPx,
626
- isScrollInProgress = { isScrollInProgress },
627
- rawTargetFlow = {
628
- snapshotFlow {
629
- if (firstVisibleItemIndex == 0) firstVisibleItemScrollOffset
630
- else SCROLLED_PAST_FIRST_ITEM_THRESHOLD
631
- }
632
- },
633
- )
634
-
635
- @Composable
636
- internal fun ScrollState.proxyLimitedScrollState(
637
- thresholdPx: Int = 200,
638
- stepPx: Int = 4
639
- ): Pair<ScrollState, Boolean> = proxyScroll(
640
- source = this,
641
- thresholdPx = thresholdPx,
642
- stepPx = stepPx,
643
- isScrollInProgress = { isScrollInProgress },
644
- rawTargetFlow = { snapshotFlow { value } },
645
- )
646
-
647
- @Composable
648
- private fun proxyScroll(
649
- source: Any,
650
- thresholdPx: Int,
651
- stepPx: Int,
652
- isScrollInProgress: () -> Boolean,
653
- rawTargetFlow: () -> Flow<Int>,
654
- ): Pair<ScrollState, Boolean> {
655
- val proxy = rememberScrollState()
656
- val locked = remember { mutableStateOf(false) }
657
-
658
- LaunchedEffect(source, proxy, thresholdPx, stepPx) {
659
- rawTargetFlow().collect { rawTarget ->
660
- val shouldLock = rawTarget > thresholdPx
661
- if (locked.value != shouldLock) locked.value = shouldLock
662
-
663
- val desired = if (shouldLock) thresholdPx else quantize(rawTarget, stepPx)
664
-
665
- if (proxy.value != desired) {
666
- proxy.scrollTo(desired.coerceAtLeast(0))
667
- }
668
- }
669
- }
670
-
671
- val inProgress = remember { mutableStateOf(false) }
672
- LaunchedEffect(source, thresholdPx) {
673
- snapshotFlow { isScrollInProgress() }
674
- .collect { progressing ->
675
- inProgress.value = if (locked.value) false else progressing
676
- }
677
- }
678
-
679
- return proxy to inProgress.value
680
- }
681
-
682
- private const val SCROLLED_PAST_FIRST_ITEM_THRESHOLD = 10_000
683
-
684
- internal val LocalScrollState = staticCompositionLocalOf<ScrollState> { error("No Scroll State provided") }
685
- internal val LocalOptions = staticCompositionLocalOf<NavigationOptions> { error("No NavigationOptions provided") }
686
-
687
- val StackScreenScrollableState = staticCompositionLocalOf<ScrollableState?> { null }
688
-
689
- // iPhone Duo side bar: the header leaves with the content and slides back in on a reverse scroll
690
- // (RN DuoQuickReturnHeader). The side bar is drawn apart from the header, so it stays put.
691
- @Composable
692
- private fun rememberQuickReturnHide(
693
- enabled: Boolean,
694
- scrollState: ScrollState,
695
- heightPx: Float,
696
- ): Animatable<Float, AnimationVector1D> {
697
- val hide = remember { Animatable(0f) }
698
- LaunchedEffect(enabled, scrollState, heightPx) {
699
- if (!enabled) {
700
- hide.snapTo(0f)
701
- return@LaunchedEffect
702
- }
703
- var last = scrollState.value
704
- snapshotFlow { scrollState.value }.collect { y ->
705
- val delta = y - last
706
- last = y
707
- hide.snapTo(if (y <= 0) 0f else (hide.value + delta).coerceIn(0f, heightPx))
708
- }
709
- }
710
- // a half-shown header settles fully in or out once the scroll stops
711
- LaunchedEffect(enabled, scrollState, heightPx) {
712
- if (!enabled) return@LaunchedEffect
713
- snapshotFlow { scrollState.isScrollInProgress }
714
- .filter { !it }
715
- .collect {
716
- val value = hide.value
717
- // within the first header height the header still sits on the content
718
- if (scrollState.value < heightPx || value <= 0f || value >= heightPx) return@collect
719
- launch { hide.animateTo(if (value > heightPx / 2) heightPx else 0f, tween(200)) }
720
- }
721
- }
722
- return hide
723
- }
724
-
725
- internal fun NavigationOptions.usesDuoQuickReturnHeader(layout: ScreenLayout): Boolean =
726
- usesDuoGlassHeader(layout) || (layout.sideBar != null && headerType is HeaderType.Animated &&
727
- scrollData.scrollable && scrollData.scrollState is ScrollState)
728
-
729
- // iPhone Duo side bar: content scrolls under a glass header instead of starting below it (RN Screen).
730
- internal fun NavigationOptions.usesDuoGlassHeader(layout: ScreenLayout): Boolean =
731
- layout.sideBar != null && headerType is HeaderType.DefaultOrExtended &&
732
- getInputSearchType(this) == InputSearchType.None &&
733
- scrollData.scrollable && scrollData.scrollState is ScrollState
734
-
735
- internal fun getInputSearchType(options: NavigationOptions): InputSearchType {
736
- return when (val headerType = options.headerType) {
737
- is HeaderType.DefaultOrExtended -> when {
738
- headerType.inputSearchProps == null -> InputSearchType.None
739
- headerType.useAnimated -> InputSearchType.Animated
740
- else -> InputSearchType.Header
741
- }
742
-
743
- else -> InputSearchType.None
744
- }
745
- }
746
-