react-native-screens 5.0.0-alpha.2 → 5.0.0-alpha.3
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/Package.swift +87 -0
- package/README.md +0 -7
- package/android/src/main/cpp/NativeProxy.cpp +30 -6
- package/android/src/main/cpp/NativeProxy.h +7 -1
- package/android/src/main/java/com/swmansion/rnscreens/common/container/Container.kt +8 -0
- package/android/src/main/java/com/swmansion/rnscreens/common/container/ContainerItem.kt +13 -1
- package/android/src/main/java/com/swmansion/rnscreens/common/text/ReactTextAppearance.kt +62 -0
- package/android/src/main/java/com/swmansion/rnscreens/common/text/TextAppearance.kt +20 -0
- package/android/src/main/java/com/swmansion/rnscreens/common/text/TextAppearanceDefaults.kt +65 -0
- package/android/src/main/java/com/swmansion/rnscreens/helpers/PropIconResolver.kt +17 -23
- package/android/src/main/java/com/swmansion/rnscreens/legacy/Screen.kt +3 -1
- package/android/src/main/java/com/swmansion/rnscreens/legacy/ScreenStack.kt +2 -0
- package/android/src/main/java/com/swmansion/rnscreens/modals/formsheet/native/coordinator/FormSheetBehaviorController.kt +49 -18
- package/android/src/main/java/com/swmansion/rnscreens/modals/formsheet/native/coordinator/FormSheetDimensionsCoordinator.kt +65 -40
- package/android/src/main/java/com/swmansion/rnscreens/modals/formsheet/native/coordinator/FormSheetKeyboardCoordinator.kt +101 -0
- package/android/src/main/java/com/swmansion/rnscreens/modals/formsheet/native/coordinator/FormSheetNativeDismissCoordinator.kt +0 -6
- package/android/src/main/java/com/swmansion/rnscreens/modals/formsheet/native/core/FormSheetAvailableHeightProvider.kt +44 -0
- package/android/src/main/java/com/swmansion/rnscreens/modals/formsheet/native/core/FormSheetDialog.kt +35 -3
- package/android/src/main/java/com/swmansion/rnscreens/modals/formsheet/native/core/FormSheetDialogManager.kt +33 -106
- package/android/src/main/java/com/swmansion/rnscreens/modals/formsheet/native/interfaces/FormSheetDialogEventEmitter.kt +2 -0
- package/android/src/main/java/com/swmansion/rnscreens/modals/formsheet/native/model/FormSheetDetents.kt +61 -15
- package/android/src/main/java/com/swmansion/rnscreens/modals/formsheet/native/presentation/FormSheetAnimatorFactory.kt +8 -9
- package/android/src/main/java/com/swmansion/rnscreens/modals/formsheet/native/presentation/FormSheetDimmingManager.kt +115 -0
- package/android/src/main/java/com/swmansion/rnscreens/modals/formsheet/native/presentation/FormSheetDismissalOrigin.kt +22 -0
- package/android/src/main/java/com/swmansion/rnscreens/modals/formsheet/native/presentation/FormSheetPresentation.kt +173 -0
- package/android/src/main/java/com/swmansion/rnscreens/modals/formsheet/native/presentation/FormSheetPresentationManager.kt +141 -49
- package/android/src/main/java/com/swmansion/rnscreens/modals/formsheet/native/presentation/FormSheetPresentationState.kt +1 -1
- package/android/src/main/java/com/swmansion/rnscreens/modals/formsheet/native/presentation/FormSheetStackRegistry.kt +28 -0
- package/android/src/main/java/com/swmansion/rnscreens/modals/formsheet/react/event/FormSheetDismissEvent.kt +29 -0
- package/android/src/main/java/com/swmansion/rnscreens/modals/formsheet/react/host/FormSheetHostEventEmitter.kt +7 -0
- package/android/src/main/java/com/swmansion/rnscreens/modals/formsheet/react/host/FormSheetHostViewManager.kt +2 -0
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/StackHeaderApplicator.kt +369 -58
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/StackHeaderBackPressHandler.kt +11 -0
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/StackHeaderCoordinatorLayout.kt +143 -98
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/appbar/StackHeaderAppBarLayout.kt +155 -23
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/appbar/StackHeaderContentScrimDrawable.kt +36 -0
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/config/StackHeaderCollapsedTitleGravityMode.kt +6 -0
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/config/StackHeaderConfig.kt +170 -167
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/config/StackHeaderConfigViewManager.kt +385 -12
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/config/StackHeaderConfigurationObserver.kt +0 -4
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/config/StackHeaderConfigurationProviding.kt +32 -3
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/config/StackHeaderDelegate.kt +0 -7
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/config/StackHeaderInvalidationFlags.kt +7 -2
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/toolbar/StackHeaderToolbarMenuApplicator.kt +27 -280
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/toolbar/StackHeaderToolbarMenuController.kt +448 -0
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/toolbar/StackHeaderToolbarMenuDelegate.kt +10 -0
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/toolbar/StackHeaderToolbarMenuMapper.kt +28 -20
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/toolbar/model/StackHeaderToolbarMenuConfig.kt +3 -55
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/toolbar/model/StackHeaderToolbarMenuGroupMetadata.kt +1 -10
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/toolbar/model/StackHeaderToolbarMenuItemConfig.kt +1 -3
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/toolbar/model/StackHeaderToolbarMenuModel.kt +180 -0
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/toolbar/update/StackHeaderToolbarMenuElementOptions.kt +57 -6
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/toolbar/update/StackHeaderToolbarMenuElementRawUpdate.kt +3 -1
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/toolbar/update/StackHeaderToolbarMenuElementUpdate.kt +1 -0
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/toolbar/update/StackHeaderToolbarMenuIconResolver.kt +4 -3
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/toolbar/update/StackHeaderToolbarMenuUpdateQueue.kt +23 -9
- package/android/src/main/java/com/swmansion/rnscreens/stack/host/StackContainer.kt +103 -3
- package/android/src/main/java/com/swmansion/rnscreens/stack/host/StackHost.kt +13 -0
- package/android/src/main/java/com/swmansion/rnscreens/stack/host/StackHostViewManager.kt +14 -0
- package/android/src/main/java/com/swmansion/rnscreens/stack/screen/StackScreen.kt +4 -0
- package/android/src/main/java/com/swmansion/rnscreens/stack/screen/StackScreenFragment.kt +20 -1
- package/android/src/main/java/com/swmansion/rnscreens/stack/screen/StackScreenFragmentDelegate.kt +12 -0
- package/android/src/main/java/com/swmansion/rnscreens/tabs/appearance/TabsAppearanceCoordinator.kt +2 -4
- package/android/src/main/java/com/swmansion/rnscreens/tabs/container/MenuHelpers.kt +5 -23
- package/android/src/main/java/com/swmansion/rnscreens/tabs/container/TabsContainer.kt +46 -25
- package/android/src/main/java/com/swmansion/rnscreens/tabs/host/TabsHost.kt +10 -0
- package/android/src/main/java/com/swmansion/rnscreens/tabs/host/TabsHostA11yCoordinator.kt +23 -2
- package/android/src/main/java/com/swmansion/rnscreens/tabs/screen/TabsScreen.kt +17 -0
- package/android/src/main/java/com/swmansion/rnscreens/tabs/screen/TabsScreenFragment.kt +3 -0
- package/android/src/main/java/com/swmansion/rnscreens/utils/DimensionUtils.kt +7 -0
- package/android/src/main/java/com/swmansion/rnscreens/utils/StyleUtils.kt +22 -0
- package/android/src/main/res/base/layout/rns_collapsing_toolbar_large_available_space.xml +8 -0
- package/android/src/main/res/base/layout/rns_collapsing_toolbar_large_entire_space.xml +8 -0
- package/android/src/main/res/base/layout/rns_collapsing_toolbar_medium_available_space.xml +8 -0
- package/android/src/main/res/base/layout/rns_collapsing_toolbar_medium_entire_space.xml +8 -0
- package/cpp/legacy/RNSScreenRemovalListener.cpp +31 -1
- package/cpp/legacy/RNSScreenRemovalListener.h +18 -3
- package/ios/RNSEnums.h +2 -0
- package/ios/conversion/RNSConversions.h +7 -108
- package/ios/legacy/RNSFullWindowOverlay.mm +1 -1
- package/ios/legacy/RNSModalScreen.mm +1 -1
- package/ios/legacy/RNSScreen.mm +8 -19
- package/ios/legacy/RNSScreenStackHeaderConfig.mm +3 -1
- package/ios/legacy/RNSScreenStackHeaderSubview.mm +1 -1
- package/ios/legacy/RNSScreenWindowTraits.mm +5 -13
- package/ios/modals/form-sheet/RNSFormSheetConfigurationApplicator.h +1 -3
- package/ios/modals/form-sheet/RNSFormSheetConfigurationApplicator.mm +11 -22
- package/ios/modals/form-sheet/RNSFormSheetContentController.h +1 -1
- package/ios/modals/form-sheet/RNSFormSheetContentController.mm +7 -18
- package/ios/modals/form-sheet/RNSFormSheetHostComponentView.mm +4 -4
- package/ios/modals/form-sheet/RNSFormSheetHostShadowStateProxy.mm +2 -2
- package/ios/modals/form-sheet/RNSFormSheetUpdateFlags.h +3 -0
- package/ios/safe-area/RNSSafeAreaViewComponentView.mm +2 -2
- package/ios/{conversion → scroll-view-marker/conversion}/RNSConversions-ScrollViewMarker.mm +2 -3
- package/ios/split/RNSSplitAppearanceApplicator.h +4 -4
- package/ios/split/RNSSplitAppearanceApplicator.mm +53 -56
- package/ios/split/RNSSplitHostComponentEventEmitter.h +1 -0
- package/ios/split/RNSSplitHostComponentEventEmitter.mm +1 -1
- package/ios/split/RNSSplitHostComponentView.h +5 -15
- package/ios/split/RNSSplitHostComponentView.mm +55 -6
- package/ios/split/RNSSplitHostController.h +25 -6
- package/ios/split/RNSSplitHostController.mm +24 -92
- package/ios/split/RNSSplitHostProviders.h +67 -0
- package/ios/split/RNSSplitScreenComponentView.h +0 -39
- package/ios/split/RNSSplitScreenComponentView.mm +27 -10
- package/ios/split/RNSSplitScreenController.h +26 -3
- package/ios/split/RNSSplitScreenController.mm +13 -30
- package/ios/split/RNSSplitScreenShadowStateProxy.h +1 -40
- package/ios/split/RNSSplitScreenShadowStateProxy.mm +1 -26
- package/ios/split/conversion/RNSConversions-SplitView.h +56 -0
- package/ios/{conversion → split/conversion}/RNSConversions-SplitView.mm +4 -1
- package/ios/stack/conversion/RNSConversions-Stack.h +32 -0
- package/ios/stack/conversion/RNSConversions-Stack.mm +55 -0
- package/ios/stack/header/RNSStackHeaderAppearanceMapper.h +26 -0
- package/ios/stack/header/RNSStackHeaderAppearanceMapper.mm +88 -0
- package/ios/stack/header/RNSStackHeaderConfigComponentView.h +10 -1
- package/ios/stack/header/RNSStackHeaderConfigComponentView.mm +67 -35
- package/ios/stack/header/RNSStackHeaderConfigDataProviding.h +6 -0
- package/ios/stack/header/RNSStackHeaderConfigShadowStateProxy.mm +1 -1
- package/ios/stack/header/RNSStackHeaderIconResolver.mm +7 -0
- package/ios/stack/header/RNSStackHeaderItemComponentView.h +3 -1
- package/ios/stack/header/RNSStackHeaderItemComponentView.mm +15 -2
- package/ios/stack/header/RNSStackHeaderItemDataProviding.h +2 -0
- package/ios/stack/header/RNSStackHeaderItemShadowStateProxy.mm +1 -1
- package/ios/stack/header/RNSStackHeaderItemSpacerComponentView.mm +2 -1
- package/ios/stack/header/RNSStackHeaderMenuMapper.mm +4 -0
- package/ios/stack/host/RNSStackNavigationBar.h +25 -0
- package/ios/stack/host/RNSStackNavigationBar.mm +80 -0
- package/ios/stack/host/RNSStackNavigationBarCoordinator.h +8 -0
- package/ios/stack/host/RNSStackNavigationBarCoordinator.mm +11 -0
- package/ios/stack/host/RNSStackNavigationController.mm +13 -5
- package/ios/stack/host/RNSStackOperation.h +0 -2
- package/ios/stack/screen/RNSStackScreenComponentView.mm +9 -2
- package/ios/stack/screen/RNSStackScreenController.mm +12 -0
- package/ios/stack/screen/RNSStackScreenHeaderCoordinator.h +8 -0
- package/ios/stack/screen/RNSStackScreenHeaderCoordinator.mm +98 -16
- package/ios/tabs/RNSTabBarAppearanceCoordinator.mm +40 -9
- package/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryComponentView.h +1 -1
- package/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryComponentView.mm +1 -1
- package/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryContentComponentView.mm +1 -1
- package/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryEventEmitter.mm +1 -1
- package/ios/tabs/bottom-accessory/RNSTabsBottomAccessoryShadowStateProxy.mm +1 -1
- package/ios/tabs/conversion/RNSConversions-Tabs.h +78 -0
- package/ios/{conversion → tabs/conversion}/RNSConversions-Tabs.mm +8 -71
- package/ios/tabs/extensions/RNSTabsHostComponentView+RNSImageLoader.h +1 -1
- package/ios/tabs/host/RNSTabsHostComponentView.h +2 -0
- package/ios/tabs/host/RNSTabsHostComponentView.mm +10 -3
- package/ios/tabs/host/RNSTabsHostEventEmitter.mm +1 -1
- package/ios/tabs/screen/RNSTabsScreenComponentView.mm +20 -5
- package/ios/utils/RNSDefines.h +3 -0
- package/lib/commonjs/components/stack/header/StackHeaderConfig.android.js +34 -19
- package/lib/commonjs/components/stack/header/StackHeaderConfig.android.js.map +1 -1
- package/lib/commonjs/components/stack/header/StackHeaderConfig.ios.js +33 -1
- package/lib/commonjs/components/stack/header/StackHeaderConfig.ios.js.map +1 -1
- package/lib/commonjs/components/stack/host/StackHost.js +9 -6
- package/lib/commonjs/components/stack/host/StackHost.js.map +1 -1
- package/lib/commonjs/components/stack/index.js.map +1 -1
- package/lib/commonjs/components/tabs/host/TabsHost.ios.js +1 -0
- package/lib/commonjs/components/tabs/host/TabsHost.ios.js.map +1 -1
- package/lib/commonjs/fabric/stack/StackHeaderConfigAndroidNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/stack/StackHeaderConfigIOSNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/stack/StackHeaderItemIOSNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/stack/StackHostNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/tabs/TabsHostIOSNativeComponent.js.map +1 -1
- package/lib/module/components/stack/header/StackHeaderConfig.android.js +35 -20
- package/lib/module/components/stack/header/StackHeaderConfig.android.js.map +1 -1
- package/lib/module/components/stack/header/StackHeaderConfig.ios.js +34 -2
- package/lib/module/components/stack/header/StackHeaderConfig.ios.js.map +1 -1
- package/lib/module/components/stack/host/StackHost.js +9 -6
- package/lib/module/components/stack/host/StackHost.js.map +1 -1
- package/lib/module/components/stack/index.js.map +1 -1
- package/lib/module/components/tabs/host/TabsHost.ios.js +1 -0
- package/lib/module/components/tabs/host/TabsHost.ios.js.map +1 -1
- package/lib/module/fabric/stack/StackHeaderConfigAndroidNativeComponent.js.map +1 -1
- package/lib/module/fabric/stack/StackHeaderConfigIOSNativeComponent.js.map +1 -1
- package/lib/module/fabric/stack/StackHeaderItemIOSNativeComponent.js.map +1 -1
- package/lib/module/fabric/stack/StackHostNativeComponent.js.map +1 -1
- package/lib/module/fabric/tabs/TabsHostIOSNativeComponent.js.map +1 -1
- package/lib/typescript/components/modals/form-sheet/FormSheet.types.d.ts +1 -1
- package/lib/typescript/components/stack/header/StackHeaderConfig.android.d.ts.map +1 -1
- package/lib/typescript/components/stack/header/StackHeaderConfig.android.types.d.ts +616 -21
- package/lib/typescript/components/stack/header/StackHeaderConfig.android.types.d.ts.map +1 -1
- package/lib/typescript/components/stack/header/StackHeaderConfig.ios.d.ts.map +1 -1
- package/lib/typescript/components/stack/header/StackHeaderConfig.ios.types.d.ts +226 -2
- package/lib/typescript/components/stack/header/StackHeaderConfig.ios.types.d.ts.map +1 -1
- package/lib/typescript/components/stack/header/StackHeaderConfig.types.d.ts +2 -2
- package/lib/typescript/components/stack/header/ios/StackHeaderItem.ios.types.d.ts +2 -0
- package/lib/typescript/components/stack/header/ios/StackHeaderItem.ios.types.d.ts.map +1 -1
- package/lib/typescript/components/stack/host/StackHost.d.ts +1 -1
- package/lib/typescript/components/stack/host/StackHost.d.ts.map +1 -1
- package/lib/typescript/components/stack/host/StackHost.types.d.ts +24 -0
- package/lib/typescript/components/stack/host/StackHost.types.d.ts.map +1 -1
- package/lib/typescript/components/stack/index.d.ts +2 -2
- package/lib/typescript/components/stack/index.d.ts.map +1 -1
- package/lib/typescript/components/tabs/host/TabsHost.ios.d.ts.map +1 -1
- package/lib/typescript/components/tabs/host/TabsHost.ios.types.d.ts +16 -0
- package/lib/typescript/components/tabs/host/TabsHost.ios.types.d.ts.map +1 -1
- package/lib/typescript/components/tabs/host/TabsHost.types.d.ts +3 -0
- package/lib/typescript/components/tabs/host/TabsHost.types.d.ts.map +1 -1
- package/lib/typescript/fabric/stack/StackHeaderConfigAndroidNativeComponent.d.ts +52 -0
- package/lib/typescript/fabric/stack/StackHeaderConfigAndroidNativeComponent.d.ts.map +1 -1
- package/lib/typescript/fabric/stack/StackHeaderConfigIOSNativeComponent.d.ts +25 -1
- package/lib/typescript/fabric/stack/StackHeaderConfigIOSNativeComponent.d.ts.map +1 -1
- package/lib/typescript/fabric/stack/StackHeaderItemIOSNativeComponent.d.ts +2 -0
- package/lib/typescript/fabric/stack/StackHeaderItemIOSNativeComponent.d.ts.map +1 -1
- package/lib/typescript/fabric/stack/StackHostNativeComponent.d.ts +3 -1
- package/lib/typescript/fabric/stack/StackHostNativeComponent.d.ts.map +1 -1
- package/lib/typescript/fabric/tabs/TabsHostIOSNativeComponent.d.ts +1 -0
- package/lib/typescript/fabric/tabs/TabsHostIOSNativeComponent.d.ts.map +1 -1
- package/package.json +8 -7
- package/react-native.config.js +3 -0
- package/src/components/modals/form-sheet/FormSheet.types.ts +1 -1
- package/src/components/stack/header/StackHeaderConfig.android.tsx +48 -23
- package/src/components/stack/header/StackHeaderConfig.android.types.ts +637 -21
- package/src/components/stack/header/StackHeaderConfig.ios.tsx +45 -1
- package/src/components/stack/header/StackHeaderConfig.ios.types.ts +238 -2
- package/src/components/stack/header/StackHeaderConfig.types.ts +2 -2
- package/src/components/stack/header/ios/StackHeaderItem.ios.types.ts +2 -0
- package/src/components/stack/host/StackHost.tsx +4 -2
- package/src/components/stack/host/StackHost.types.ts +26 -0
- package/src/components/stack/index.ts +6 -1
- package/src/components/tabs/host/TabsHost.ios.tsx +1 -0
- package/src/components/tabs/host/TabsHost.ios.types.ts +16 -0
- package/src/components/tabs/host/TabsHost.types.ts +3 -0
- package/src/fabric/stack/StackHeaderConfigAndroidNativeComponent.ts +78 -0
- package/src/fabric/stack/StackHeaderConfigIOSNativeComponent.ts +32 -0
- package/src/fabric/stack/StackHeaderItemIOSNativeComponent.ts +2 -0
- package/src/fabric/stack/StackHostNativeComponent.ts +11 -2
- package/src/fabric/tabs/TabsHostIOSNativeComponent.ts +1 -0
- package/android/src/main/java/com/swmansion/rnscreens/modals/dimmingview/DimmingView.kt +0 -83
- package/android/src/main/java/com/swmansion/rnscreens/modals/dimmingview/DimmingViewManager.kt +0 -89
- package/android/src/main/java/com/swmansion/rnscreens/modals/dimmingview/DimmingViewPointerEvents.kt +0 -18
- package/android/src/main/java/com/swmansion/rnscreens/stack/header/toolbar/StackHeaderToolbarMenuSelectionController.kt +0 -83
- package/ios/conversion/RNSConversions-Stack.h +0 -32
- package/ios/conversion/RNSConversions-Stack.mm +0 -41
- package/ios/conversion/always_false.h +0 -31
- /package/ios/{conversion → scroll-view-marker/conversion}/RNSConversions-ScrollViewMarker.h +0 -0
|
@@ -14,6 +14,7 @@ import type {
|
|
|
14
14
|
} from './StackHeaderConfig.types';
|
|
15
15
|
import StackHeaderConfigIOSNativeComponent, {
|
|
16
16
|
Commands as StackHeaderConfigIOSNativeCommands,
|
|
17
|
+
HeaderAppearance,
|
|
17
18
|
MenuItemPressEvent,
|
|
18
19
|
MenuSelectionChangeEvent,
|
|
19
20
|
NativeMenuElementOptionsIOS,
|
|
@@ -22,8 +23,9 @@ import type { StackHeaderItemPlacement } from './ios/StackHeaderItem.ios.types';
|
|
|
22
23
|
import { StackHeaderItemSpacerPlacement } from './ios/StackHeaderItemSpacer.ios.types';
|
|
23
24
|
import StackHeaderItemSpacer from './ios/StackHeaderItemSpacer.ios';
|
|
24
25
|
import StackHeaderItem from './ios/StackHeaderItem.ios';
|
|
25
|
-
import { NativeSyntheticEvent, StyleSheet } from 'react-native';
|
|
26
|
+
import { NativeSyntheticEvent, StyleSheet, processColor } from 'react-native';
|
|
26
27
|
import type {
|
|
28
|
+
StackHeaderAppearanceIOS,
|
|
27
29
|
StackHeaderInlineCustomItemIOS,
|
|
28
30
|
StackHeaderInlineItemIOS,
|
|
29
31
|
StackHeaderMenuItemOptionsIOS,
|
|
@@ -55,6 +57,12 @@ function StackHeaderConfig(
|
|
|
55
57
|
largeTitle,
|
|
56
58
|
largeSubtitle,
|
|
57
59
|
largeTitleEnabled,
|
|
60
|
+
prompt,
|
|
61
|
+
backButtonTitle,
|
|
62
|
+
backButtonDisplayMode,
|
|
63
|
+
backButtonMenuEnabled,
|
|
64
|
+
standardAppearance,
|
|
65
|
+
scrollEdgeAppearance,
|
|
58
66
|
} = ios ?? {};
|
|
59
67
|
|
|
60
68
|
const nativeRef =
|
|
@@ -151,9 +159,15 @@ function StackHeaderConfig(
|
|
|
151
159
|
ref={nativeRef}
|
|
152
160
|
{...restProps}
|
|
153
161
|
collapsable={false}
|
|
162
|
+
backButtonTitle={backButtonTitle}
|
|
163
|
+
backButtonDisplayMode={backButtonDisplayMode}
|
|
164
|
+
backButtonMenuEnabled={backButtonMenuEnabled}
|
|
154
165
|
largeTitle={largeTitle}
|
|
155
166
|
largeSubtitle={largeSubtitle}
|
|
156
167
|
largeTitleEnabled={!!largeTitleEnabled}
|
|
168
|
+
prompt={prompt}
|
|
169
|
+
standardAppearance={mapAppearanceToNativeProp(standardAppearance)}
|
|
170
|
+
scrollEdgeAppearance={mapAppearanceToNativeProp(scrollEdgeAppearance)}
|
|
157
171
|
titleMenu={resolvedTitleMenu}
|
|
158
172
|
style={styles.config}
|
|
159
173
|
onMenuItemPress={handleMenuItemPress}
|
|
@@ -168,6 +182,36 @@ function StackHeaderConfig(
|
|
|
168
182
|
);
|
|
169
183
|
}
|
|
170
184
|
|
|
185
|
+
function mapAppearanceToNativeProp(
|
|
186
|
+
appearance?: StackHeaderAppearanceIOS,
|
|
187
|
+
): HeaderAppearance | undefined {
|
|
188
|
+
if (!appearance) return undefined;
|
|
189
|
+
|
|
190
|
+
const {
|
|
191
|
+
titleFontColor,
|
|
192
|
+
titleFontWeight,
|
|
193
|
+
largeTitleFontColor,
|
|
194
|
+
largeTitleFontWeight,
|
|
195
|
+
subtitleFontColor,
|
|
196
|
+
subtitleFontWeight,
|
|
197
|
+
} = appearance;
|
|
198
|
+
|
|
199
|
+
return {
|
|
200
|
+
...appearance,
|
|
201
|
+
titleFontColor: processColor(titleFontColor),
|
|
202
|
+
titleFontWeight:
|
|
203
|
+
titleFontWeight !== undefined ? String(titleFontWeight) : undefined,
|
|
204
|
+
largeTitleFontColor: processColor(largeTitleFontColor),
|
|
205
|
+
largeTitleFontWeight:
|
|
206
|
+
largeTitleFontWeight !== undefined
|
|
207
|
+
? String(largeTitleFontWeight)
|
|
208
|
+
: undefined,
|
|
209
|
+
subtitleFontColor: processColor(subtitleFontColor),
|
|
210
|
+
subtitleFontWeight:
|
|
211
|
+
subtitleFontWeight !== undefined ? String(subtitleFontWeight) : undefined,
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
|
|
171
215
|
function makeItemViewFromItem(
|
|
172
216
|
item:
|
|
173
217
|
| StackHeaderInlineItemIOS
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
+
import type { TextStyle } from 'react-native';
|
|
2
3
|
import type { PlatformIconIOS } from '../../shared/types';
|
|
3
4
|
import type { StackHeaderMenuIOS } from './ios/StackHeaderMenu.ios.types';
|
|
4
5
|
|
|
@@ -94,6 +95,43 @@ export interface SupportsMenuIOS {
|
|
|
94
95
|
menu?: StackHeaderMenuIOS | undefined;
|
|
95
96
|
}
|
|
96
97
|
|
|
98
|
+
export interface SupportsSharedBackgroundIOS {
|
|
99
|
+
/**
|
|
100
|
+
* @summary Whether the liquid glass background for this item should be hidden.
|
|
101
|
+
*
|
|
102
|
+
* @description
|
|
103
|
+
* On iOS 26, adjacent bar button items are grouped inside a shared liquid
|
|
104
|
+
* glass background. Setting this to `true` removes the shared background
|
|
105
|
+
* from this item.
|
|
106
|
+
*
|
|
107
|
+
* @default false
|
|
108
|
+
*
|
|
109
|
+
* @platform iOS
|
|
110
|
+
*
|
|
111
|
+
* @supported iOS 26 and higher
|
|
112
|
+
*/
|
|
113
|
+
hidesSharedBackground?: boolean | undefined;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export interface SupportsIdentifierIOS {
|
|
117
|
+
/**
|
|
118
|
+
* @summary Stable identifier used to match the item across different screens
|
|
119
|
+
* for more intelligent animation on transition.
|
|
120
|
+
*
|
|
121
|
+
* @description
|
|
122
|
+
* When navigating between screens, iOS tries to match similarly looking items (i.e. same sfSymbol)
|
|
123
|
+
* and animate between them. If the heuristic fails, a simpler crossfade is applied.
|
|
124
|
+
* In a situation where visually different items should be logically considered the same across screens,
|
|
125
|
+
* you may use this prop to tell this fact to the system. The identifier shouldn't be updated at runtime;
|
|
126
|
+
* doing so will result in item rebuild and visual flash.
|
|
127
|
+
*
|
|
128
|
+
* @platform iOS
|
|
129
|
+
*
|
|
130
|
+
* @supported iOS 26 and higher
|
|
131
|
+
*/
|
|
132
|
+
identifier?: string | undefined;
|
|
133
|
+
}
|
|
134
|
+
|
|
97
135
|
/**
|
|
98
136
|
* @summary Native header item with text label.
|
|
99
137
|
*
|
|
@@ -101,7 +139,9 @@ export interface SupportsMenuIOS {
|
|
|
101
139
|
*/
|
|
102
140
|
export interface StackHeaderInlineItemIOS
|
|
103
141
|
extends StackHeaderBaseItemIOS,
|
|
104
|
-
SupportsMenuIOS
|
|
142
|
+
SupportsMenuIOS,
|
|
143
|
+
SupportsIdentifierIOS,
|
|
144
|
+
SupportsSharedBackgroundIOS {
|
|
105
145
|
/**
|
|
106
146
|
* @summary Marks this object as a header item definition.
|
|
107
147
|
*
|
|
@@ -126,7 +166,10 @@ export interface StackHeaderInlineItemIOS
|
|
|
126
166
|
*
|
|
127
167
|
* @platform iOS
|
|
128
168
|
*/
|
|
129
|
-
export interface StackHeaderInlineCustomItemIOS
|
|
169
|
+
export interface StackHeaderInlineCustomItemIOS
|
|
170
|
+
extends SupportsMenuIOS,
|
|
171
|
+
SupportsIdentifierIOS,
|
|
172
|
+
SupportsSharedBackgroundIOS {
|
|
130
173
|
/**
|
|
131
174
|
* @summary A unique identifier within the screen header.
|
|
132
175
|
*
|
|
@@ -250,7 +293,172 @@ export interface StackHeaderTitleCustomItemIOS {
|
|
|
250
293
|
render: () => ReactElement;
|
|
251
294
|
}
|
|
252
295
|
|
|
296
|
+
/**
|
|
297
|
+
* @summary Controls how the back button title is displayed.
|
|
298
|
+
*
|
|
299
|
+
* @description
|
|
300
|
+
* - `default`: the system chooses the title depending on available space.
|
|
301
|
+
* On iOS < 26 options include: custom title (defaults to previous screen title),
|
|
302
|
+
* generic "Back", no title; on iOS >= 26 it's either custom title (if set) or no title.
|
|
303
|
+
* - `generic`: on iOS < 26, the system uses a generic "Back" title or no title;
|
|
304
|
+
* on iOS >= 26 it's the same as `minimal`.
|
|
305
|
+
* - `minimal`: no title is displayed next to the back button chevron.
|
|
306
|
+
*
|
|
307
|
+
* @platform iOS
|
|
308
|
+
*/
|
|
309
|
+
export type StackHeaderBackButtonDisplayModeIOS =
|
|
310
|
+
| 'default'
|
|
311
|
+
| 'generic'
|
|
312
|
+
| 'minimal';
|
|
313
|
+
|
|
314
|
+
export interface StackHeaderAppearanceIOS {
|
|
315
|
+
/**
|
|
316
|
+
* @summary Specifies the font family used for the title of the header.
|
|
317
|
+
*
|
|
318
|
+
* @platform ios
|
|
319
|
+
*/
|
|
320
|
+
titleFontFamily?: TextStyle['fontFamily'] | undefined;
|
|
321
|
+
/**
|
|
322
|
+
* @summary Specifies the font size used for the title of the header.
|
|
323
|
+
*
|
|
324
|
+
* @platform ios
|
|
325
|
+
*/
|
|
326
|
+
titleFontSize?: TextStyle['fontSize'] | undefined;
|
|
327
|
+
/**
|
|
328
|
+
* @summary Specifies the font weight used for the title of the header.
|
|
329
|
+
*
|
|
330
|
+
* @platform ios
|
|
331
|
+
*/
|
|
332
|
+
titleFontWeight?: TextStyle['fontWeight'] | undefined;
|
|
333
|
+
/**
|
|
334
|
+
* @summary Specifies the font style used for the title of the header.
|
|
335
|
+
*
|
|
336
|
+
* @platform ios
|
|
337
|
+
*/
|
|
338
|
+
titleFontStyle?: TextStyle['fontStyle'] | undefined;
|
|
339
|
+
/**
|
|
340
|
+
* @summary Specifies the font color used for the title of the header.
|
|
341
|
+
*
|
|
342
|
+
* @platform ios
|
|
343
|
+
*/
|
|
344
|
+
titleFontColor?: TextStyle['color'] | undefined;
|
|
345
|
+
/**
|
|
346
|
+
* @summary Specifies the font family used for the large title of the header.
|
|
347
|
+
*
|
|
348
|
+
* @platform ios
|
|
349
|
+
*/
|
|
350
|
+
largeTitleFontFamily?: TextStyle['fontFamily'] | undefined;
|
|
351
|
+
/**
|
|
352
|
+
* @summary Specifies the font size used for the large title of the header.
|
|
353
|
+
*
|
|
354
|
+
* @platform ios
|
|
355
|
+
*/
|
|
356
|
+
largeTitleFontSize?: TextStyle['fontSize'] | undefined;
|
|
357
|
+
/**
|
|
358
|
+
* @summary Specifies the font weight used for the large title of the header.
|
|
359
|
+
*
|
|
360
|
+
* @platform ios
|
|
361
|
+
*/
|
|
362
|
+
largeTitleFontWeight?: TextStyle['fontWeight'] | undefined;
|
|
363
|
+
/**
|
|
364
|
+
* @summary Specifies the font style used for the large title of the header.
|
|
365
|
+
*
|
|
366
|
+
* @platform ios
|
|
367
|
+
*/
|
|
368
|
+
largeTitleFontStyle?: TextStyle['fontStyle'] | undefined;
|
|
369
|
+
/**
|
|
370
|
+
* @summary Specifies the font color used for the large title of the header.
|
|
371
|
+
*
|
|
372
|
+
* @platform ios
|
|
373
|
+
*/
|
|
374
|
+
largeTitleFontColor?: TextStyle['color'] | undefined;
|
|
375
|
+
/**
|
|
376
|
+
* @summary Specifies the font family used for the subtitle of the header.
|
|
377
|
+
*
|
|
378
|
+
* @description Applies to both the regular and the large subtitle.
|
|
379
|
+
*
|
|
380
|
+
* @platform ios
|
|
381
|
+
*
|
|
382
|
+
* @supported iOS 26 and higher
|
|
383
|
+
*/
|
|
384
|
+
subtitleFontFamily?: TextStyle['fontFamily'] | undefined;
|
|
385
|
+
/**
|
|
386
|
+
* @summary Specifies the font size used for the subtitle of the header.
|
|
387
|
+
*
|
|
388
|
+
* @description Applies to both the regular and the large subtitle.
|
|
389
|
+
*
|
|
390
|
+
* @platform ios
|
|
391
|
+
*
|
|
392
|
+
* @supported iOS 26 and higher
|
|
393
|
+
*/
|
|
394
|
+
subtitleFontSize?: TextStyle['fontSize'] | undefined;
|
|
395
|
+
/**
|
|
396
|
+
* @summary Specifies the font weight used for the subtitle of the header.
|
|
397
|
+
*
|
|
398
|
+
* @description Applies to both the regular and the large subtitle.
|
|
399
|
+
*
|
|
400
|
+
* @platform ios
|
|
401
|
+
*
|
|
402
|
+
* @supported iOS 26 and higher
|
|
403
|
+
*/
|
|
404
|
+
subtitleFontWeight?: TextStyle['fontWeight'] | undefined;
|
|
405
|
+
/**
|
|
406
|
+
* @summary Specifies the font style used for the subtitle of the header.
|
|
407
|
+
*
|
|
408
|
+
* @description Applies to both the regular and the large subtitle.
|
|
409
|
+
*
|
|
410
|
+
* @platform ios
|
|
411
|
+
*
|
|
412
|
+
* @supported iOS 26 and higher
|
|
413
|
+
*/
|
|
414
|
+
subtitleFontStyle?: TextStyle['fontStyle'] | undefined;
|
|
415
|
+
/**
|
|
416
|
+
* @summary Specifies the font color used for the subtitle of the header.
|
|
417
|
+
*
|
|
418
|
+
* @description Applies to both the regular and the large subtitle.
|
|
419
|
+
*
|
|
420
|
+
* @platform ios
|
|
421
|
+
*
|
|
422
|
+
* @supported iOS 26 and higher
|
|
423
|
+
*/
|
|
424
|
+
subtitleFontColor?: TextStyle['color'] | undefined;
|
|
425
|
+
}
|
|
426
|
+
|
|
253
427
|
export interface StackHeaderConfigPropsIOS {
|
|
428
|
+
/**
|
|
429
|
+
* @summary Title displayed next to the back button on this screen.
|
|
430
|
+
*
|
|
431
|
+
* @description
|
|
432
|
+
* Configured on the screen whose back button it applies to (the screen that
|
|
433
|
+
* is pushed on top). When unset, the system derives the back title from the
|
|
434
|
+
* previous screen's `title`.
|
|
435
|
+
*
|
|
436
|
+
* @platform iOS
|
|
437
|
+
*/
|
|
438
|
+
backButtonTitle?: string | undefined;
|
|
439
|
+
/**
|
|
440
|
+
* @summary Controls how the back button title is displayed.
|
|
441
|
+
*
|
|
442
|
+
* @default 'default'
|
|
443
|
+
*
|
|
444
|
+
* @platform iOS
|
|
445
|
+
*/
|
|
446
|
+
backButtonDisplayMode?: StackHeaderBackButtonDisplayModeIOS | undefined;
|
|
447
|
+
/**
|
|
448
|
+
* @summary Whether the back button shows the navigation history menu.
|
|
449
|
+
*
|
|
450
|
+
* @description
|
|
451
|
+
* Configured on the screen whose back button it applies to (the screen that
|
|
452
|
+
* is pushed on top). When `false`, the navigation history menu is not shown
|
|
453
|
+
* on either of the gestures that normally open it: long-pressing the back
|
|
454
|
+
* button and secondary-clicking it (trackpad / mouse right click); tapping
|
|
455
|
+
* it still pops the screen.
|
|
456
|
+
*
|
|
457
|
+
* @default true
|
|
458
|
+
*
|
|
459
|
+
* @platform iOS
|
|
460
|
+
*/
|
|
461
|
+
backButtonMenuEnabled?: boolean | undefined;
|
|
254
462
|
/**
|
|
255
463
|
* @summary Custom item to display as a subtitle.
|
|
256
464
|
*
|
|
@@ -351,6 +559,34 @@ export interface StackHeaderConfigPropsIOS {
|
|
|
351
559
|
* @supported iOS 26 and higher
|
|
352
560
|
*/
|
|
353
561
|
largeSubtitleItem?: StackHeaderTitleCustomItemIOS | undefined;
|
|
562
|
+
/**
|
|
563
|
+
* @summary A single line of text displayed at the top of the navigation bar,
|
|
564
|
+
* above the title.
|
|
565
|
+
*
|
|
566
|
+
* @description
|
|
567
|
+
* Setting this prop increases the height of the navigation bar.
|
|
568
|
+
*
|
|
569
|
+
* @platform iOS
|
|
570
|
+
*/
|
|
571
|
+
prompt?: string | undefined;
|
|
572
|
+
/**
|
|
573
|
+
* @summary Appearance of the header when the edge of scrollable content
|
|
574
|
+
* is not aligned with the edge of the header.
|
|
575
|
+
*
|
|
576
|
+
* @platform ios
|
|
577
|
+
*/
|
|
578
|
+
standardAppearance?: StackHeaderAppearanceIOS | undefined;
|
|
579
|
+
/**
|
|
580
|
+
* @summary Appearance of the header when the edge of scrollable content
|
|
581
|
+
* is aligned with the edge of the header.
|
|
582
|
+
*
|
|
583
|
+
* @description If unset, derives the configuration from `standardAppearance`,
|
|
584
|
+
* otherwise becomes a standalone definition. In both cases it keeps transparent
|
|
585
|
+
* background by default (iOS <18).
|
|
586
|
+
*
|
|
587
|
+
* @platform ios
|
|
588
|
+
*/
|
|
589
|
+
scrollEdgeAppearance?: StackHeaderAppearanceIOS | undefined;
|
|
354
590
|
}
|
|
355
591
|
|
|
356
592
|
export interface StackHeaderConfigCommandsIOS {
|
|
@@ -11,9 +11,9 @@ export interface StackHeaderConfigPropsBase {
|
|
|
11
11
|
*/
|
|
12
12
|
title?: string | undefined;
|
|
13
13
|
/**
|
|
14
|
-
* @summary Subtitle displayed in the header.
|
|
14
|
+
* @summary Subtitle displayed in the header.
|
|
15
15
|
*
|
|
16
|
-
* @platform ios
|
|
16
|
+
* @platform android, ios
|
|
17
17
|
*/
|
|
18
18
|
subtitle?: string | undefined;
|
|
19
19
|
/**
|
|
@@ -12,6 +12,8 @@ export type StackHeaderItemPlacement =
|
|
|
12
12
|
export type StackHeaderItemProps = {
|
|
13
13
|
placement: StackHeaderItemPlacement;
|
|
14
14
|
itemId?: string | undefined;
|
|
15
|
+
identifier?: string | undefined;
|
|
16
|
+
hidesSharedBackground?: boolean | undefined;
|
|
15
17
|
title?: string | undefined;
|
|
16
18
|
icon?: PlatformIconIOS | undefined;
|
|
17
19
|
render?: (() => ReactElement) | undefined;
|
|
@@ -6,9 +6,11 @@ import type { StackHostProps } from './StackHost.types';
|
|
|
6
6
|
/**
|
|
7
7
|
* EXPERIMENTAL API, MIGHT CHANGE W/O ANY NOTICE
|
|
8
8
|
*/
|
|
9
|
-
function StackHost(
|
|
9
|
+
function StackHost(props: StackHostProps) {
|
|
10
|
+
const { children, ref, ...restProps } = props;
|
|
11
|
+
|
|
10
12
|
return (
|
|
11
|
-
<StackHostNativeComponent ref={ref} style={styles.container}>
|
|
13
|
+
<StackHostNativeComponent ref={ref} style={styles.container} {...restProps}>
|
|
12
14
|
{children}
|
|
13
15
|
</StackHostNativeComponent>
|
|
14
16
|
);
|
|
@@ -1,11 +1,37 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { HostInstance, ViewProps } from 'react-native';
|
|
3
3
|
import { type NativeProps } from '../../../fabric/stack/StackHostNativeComponent';
|
|
4
|
+
import type { ColorScheme } from '../../shared/types';
|
|
5
|
+
|
|
6
|
+
export type StackHostColorScheme = ColorScheme | 'inherit';
|
|
4
7
|
|
|
5
8
|
export type StackHostProps = {
|
|
9
|
+
// General
|
|
6
10
|
children: NonNullable<ViewProps['children']>;
|
|
7
11
|
// TODO: Work on these types
|
|
8
12
|
ref?:
|
|
9
13
|
| React.RefObject<(React.Component<NativeProps> & HostInstance) | null>
|
|
10
14
|
| undefined;
|
|
15
|
+
/**
|
|
16
|
+
* @summary Specifies the color scheme used by the container and any child
|
|
17
|
+
* containers.
|
|
18
|
+
*
|
|
19
|
+
* The following values are currently supported:
|
|
20
|
+
* - `inherit` - the interface style from parent,
|
|
21
|
+
* - `light` - the light interface style,
|
|
22
|
+
* - `dark` - the dark interface style.
|
|
23
|
+
*
|
|
24
|
+
* @remarks
|
|
25
|
+
* Color scheme isn't currently supported on iOS.
|
|
26
|
+
*
|
|
27
|
+
* On Android, changing the effective color scheme rebuilds the header.
|
|
28
|
+
* Toolbar menu state survives the rebuild: checkbox/radio selections and
|
|
29
|
+
* changes applied via the `updateToolbarMenuElements` view command are
|
|
30
|
+
* reapplied to the new toolbar.
|
|
31
|
+
*
|
|
32
|
+
* @default inherit
|
|
33
|
+
*
|
|
34
|
+
* @platform android
|
|
35
|
+
*/
|
|
36
|
+
colorScheme?: StackHostColorScheme | undefined;
|
|
11
37
|
};
|
|
@@ -2,7 +2,7 @@ import { StackHost } from './host';
|
|
|
2
2
|
import { StackScreen } from './screen';
|
|
3
3
|
import { StackHeaderConfig } from './header';
|
|
4
4
|
|
|
5
|
-
export type { StackHostProps } from './host';
|
|
5
|
+
export type { StackHostProps, StackHostColorScheme } from './host';
|
|
6
6
|
|
|
7
7
|
export type {
|
|
8
8
|
OnDismissEventPayload,
|
|
@@ -19,6 +19,9 @@ export type {
|
|
|
19
19
|
StackHeaderConfigRef,
|
|
20
20
|
// Android
|
|
21
21
|
StackHeaderTypeAndroid,
|
|
22
|
+
StackHeaderTitleHorizontalGravityAndroid,
|
|
23
|
+
StackHeaderTitleVerticalGravityAndroid,
|
|
24
|
+
StackHeaderCollapsedTitleGravityModeAndroid,
|
|
22
25
|
StackHeaderBackgroundSubviewCollapseModeAndroid,
|
|
23
26
|
StackHeaderToolbarSubviewAndroid,
|
|
24
27
|
StackHeaderBackgroundSubviewAndroid,
|
|
@@ -35,7 +38,9 @@ export type {
|
|
|
35
38
|
StackHeaderToolbarMenuItemShowAsActionAndroid,
|
|
36
39
|
StackHeaderToolbarMenuItemTypeAndroid,
|
|
37
40
|
// iOS
|
|
41
|
+
StackHeaderBackButtonDisplayModeIOS,
|
|
38
42
|
StackHeaderConfigPropsIOS,
|
|
43
|
+
StackHeaderAppearanceIOS,
|
|
39
44
|
StackHeaderInlineItemIOS,
|
|
40
45
|
StackHeaderInlineCustomItemIOS,
|
|
41
46
|
StackHeaderTitleCustomItemIOS,
|
|
@@ -48,6 +48,7 @@ function TabsHost(props: TabsHostProps) {
|
|
|
48
48
|
{...filteredBaseProps}
|
|
49
49
|
// iOS-specific
|
|
50
50
|
layoutDirection={direction}
|
|
51
|
+
tabBarHiddenAnimationEnabled={ios?.tabBarHiddenAnimationEnabled}
|
|
51
52
|
tabBarControllerMode={ios?.tabBarControllerMode}
|
|
52
53
|
tabBarMinimizeBehavior={ios?.tabBarMinimizeBehavior}
|
|
53
54
|
tabBarTintColor={ios?.tabBarTintColor}
|
|
@@ -34,6 +34,22 @@ export type TabBarMinimizeBehavior =
|
|
|
34
34
|
export type TabBarControllerMode = 'automatic' | 'tabBar' | 'tabSidebar';
|
|
35
35
|
|
|
36
36
|
export interface TabsHostPropsIOS {
|
|
37
|
+
/**
|
|
38
|
+
* @summary Whether changes of `tabBarHidden` are animated.
|
|
39
|
+
*
|
|
40
|
+
* When `true`, the tab bar is hidden and shown with the system transition
|
|
41
|
+
* (`UITabBarController.setTabBarHidden(_:animated:)`). When `false`, the
|
|
42
|
+
* tab bar disappears and reappears immediately.
|
|
43
|
+
*
|
|
44
|
+
* Available starting from iOS 18. On earlier versions the tab bar visibility
|
|
45
|
+
* is never animated, regardless of this prop.
|
|
46
|
+
*
|
|
47
|
+
* @default true
|
|
48
|
+
*
|
|
49
|
+
* @platform ios
|
|
50
|
+
* @supported iOS 18 or higher
|
|
51
|
+
*/
|
|
52
|
+
tabBarHiddenAnimationEnabled?: boolean | undefined;
|
|
37
53
|
/**
|
|
38
54
|
* @summary Specifies the color used for selected tab's text and icon color.
|
|
39
55
|
*
|
|
@@ -181,6 +181,9 @@ export interface TabsHostPropsBase {
|
|
|
181
181
|
/**
|
|
182
182
|
* @summary Hides the tab bar.
|
|
183
183
|
*
|
|
184
|
+
* On iOS 18+, whether the change is animated is controlled by
|
|
185
|
+
* `ios.tabBarHiddenAnimationEnabled`.
|
|
186
|
+
*
|
|
184
187
|
* @default false
|
|
185
188
|
*
|
|
186
189
|
* @platform android, ios
|
|
@@ -13,6 +13,14 @@ import type { UnsafeMixed } from '../codegenUtils';
|
|
|
13
13
|
|
|
14
14
|
type StackHeaderTypeAndroid = 'small' | 'medium' | 'large';
|
|
15
15
|
|
|
16
|
+
type StackHeaderTitleHorizontalGravityAndroid = 'start' | 'center' | 'end';
|
|
17
|
+
|
|
18
|
+
type StackHeaderTitleVerticalGravityAndroid = 'top' | 'center' | 'bottom';
|
|
19
|
+
|
|
20
|
+
type StackHeaderCollapsedTitleGravityModeAndroid =
|
|
21
|
+
| 'entireSpace'
|
|
22
|
+
| 'availableSpace';
|
|
23
|
+
|
|
16
24
|
export type StackHeaderToolbarMenuItemPressEventAndroid = Readonly<{
|
|
17
25
|
id: string;
|
|
18
26
|
}>;
|
|
@@ -84,6 +92,8 @@ export type StackHeaderToolbarMenuElementAndroid =
|
|
|
84
92
|
|
|
85
93
|
export interface NativeProps extends ViewProps {
|
|
86
94
|
title?: string | undefined;
|
|
95
|
+
subtitle?: string | undefined;
|
|
96
|
+
maxLines?: CT.WithDefault<CT.Int32, 1>;
|
|
87
97
|
hidden?: CT.WithDefault<boolean, false>;
|
|
88
98
|
transparent?: CT.WithDefault<boolean, false>;
|
|
89
99
|
backButtonHidden?: CT.WithDefault<boolean, false>;
|
|
@@ -91,12 +101,76 @@ export interface NativeProps extends ViewProps {
|
|
|
91
101
|
// Android-specific props
|
|
92
102
|
type?: CT.WithDefault<StackHeaderTypeAndroid, 'small'>;
|
|
93
103
|
|
|
104
|
+
titleCentered?: CT.WithDefault<boolean, false>;
|
|
105
|
+
subtitleCentered?: CT.WithDefault<boolean, false>;
|
|
106
|
+
|
|
107
|
+
expandedTitleHorizontalGravity?: CT.WithDefault<
|
|
108
|
+
StackHeaderTitleHorizontalGravityAndroid,
|
|
109
|
+
'start'
|
|
110
|
+
>;
|
|
111
|
+
expandedTitleVerticalGravity?: CT.WithDefault<
|
|
112
|
+
StackHeaderTitleVerticalGravityAndroid,
|
|
113
|
+
'bottom'
|
|
114
|
+
>;
|
|
115
|
+
collapsedTitleHorizontalGravity?: CT.WithDefault<
|
|
116
|
+
StackHeaderTitleHorizontalGravityAndroid,
|
|
117
|
+
'start'
|
|
118
|
+
>;
|
|
119
|
+
collapsedTitleVerticalGravity?: CT.WithDefault<
|
|
120
|
+
StackHeaderTitleVerticalGravityAndroid,
|
|
121
|
+
'center'
|
|
122
|
+
>;
|
|
123
|
+
collapsedTitleGravityMode?: CT.WithDefault<
|
|
124
|
+
StackHeaderCollapsedTitleGravityModeAndroid,
|
|
125
|
+
'availableSpace'
|
|
126
|
+
>;
|
|
127
|
+
|
|
128
|
+
contentInsetStart?: CT.WithDefault<CT.Float, -1.0>;
|
|
129
|
+
contentInsetEnd?: CT.WithDefault<CT.Float, -1.0>;
|
|
130
|
+
|
|
131
|
+
titleColor?: ColorValue | undefined;
|
|
132
|
+
titleFontFamily?: string | undefined;
|
|
133
|
+
titleFontSize?: CT.WithDefault<CT.Float, -1.0>;
|
|
134
|
+
titleFontWeight?: string | undefined;
|
|
135
|
+
titleFontStyle?: string | undefined;
|
|
136
|
+
subtitleColor?: ColorValue | undefined;
|
|
137
|
+
subtitleFontFamily?: string | undefined;
|
|
138
|
+
subtitleFontSize?: CT.WithDefault<CT.Float, -1.0>;
|
|
139
|
+
subtitleFontWeight?: string | undefined;
|
|
140
|
+
subtitleFontStyle?: string | undefined;
|
|
141
|
+
expandedTitleColor?: ColorValue | undefined;
|
|
142
|
+
expandedTitleFontFamily?: string | undefined;
|
|
143
|
+
expandedTitleFontSize?: CT.WithDefault<CT.Float, -1.0>;
|
|
144
|
+
expandedTitleFontWeight?: string | undefined;
|
|
145
|
+
expandedTitleFontStyle?: string | undefined;
|
|
146
|
+
collapsedTitleColor?: ColorValue | undefined;
|
|
147
|
+
collapsedTitleFontFamily?: string | undefined;
|
|
148
|
+
collapsedTitleFontSize?: CT.WithDefault<CT.Float, -1.0>;
|
|
149
|
+
collapsedTitleFontWeight?: string | undefined;
|
|
150
|
+
collapsedTitleFontStyle?: string | undefined;
|
|
151
|
+
expandedSubtitleColor?: ColorValue | undefined;
|
|
152
|
+
expandedSubtitleFontFamily?: string | undefined;
|
|
153
|
+
expandedSubtitleFontSize?: CT.WithDefault<CT.Float, -1.0>;
|
|
154
|
+
expandedSubtitleFontWeight?: string | undefined;
|
|
155
|
+
expandedSubtitleFontStyle?: string | undefined;
|
|
156
|
+
collapsedSubtitleColor?: ColorValue | undefined;
|
|
157
|
+
collapsedSubtitleFontFamily?: string | undefined;
|
|
158
|
+
collapsedSubtitleFontSize?: CT.WithDefault<CT.Float, -1.0>;
|
|
159
|
+
collapsedSubtitleFontWeight?: string | undefined;
|
|
160
|
+
collapsedSubtitleFontStyle?: string | undefined;
|
|
161
|
+
|
|
94
162
|
backButtonTintColorNormal?: ColorValue | undefined;
|
|
95
163
|
backButtonTintColorPressed?: ColorValue | undefined;
|
|
96
164
|
backButtonTintColorFocused?: ColorValue | undefined;
|
|
97
165
|
backButtonDrawableIconResourceName?: string | undefined;
|
|
98
166
|
backButtonImageIconResource?: ImageSource | undefined;
|
|
99
167
|
|
|
168
|
+
overflowIconTintColorNormal?: ColorValue | undefined;
|
|
169
|
+
overflowIconTintColorPressed?: ColorValue | undefined;
|
|
170
|
+
overflowIconTintColorFocused?: ColorValue | undefined;
|
|
171
|
+
overflowIconDrawableIconResourceName?: string | undefined;
|
|
172
|
+
overflowIconImageIconResource?: ImageSource | undefined;
|
|
173
|
+
|
|
100
174
|
scrollFlagScroll?: CT.WithDefault<boolean, false>;
|
|
101
175
|
scrollFlagEnterAlways?: CT.WithDefault<boolean, false>;
|
|
102
176
|
scrollFlagEnterAlwaysCollapsed?: CT.WithDefault<boolean, false>;
|
|
@@ -105,6 +179,10 @@ export interface NativeProps extends ViewProps {
|
|
|
105
179
|
|
|
106
180
|
liftOnScroll?: CT.WithDefault<boolean, true>;
|
|
107
181
|
|
|
182
|
+
backgroundColor?: ColorValue | undefined;
|
|
183
|
+
scrolledBackgroundColor?: ColorValue | undefined;
|
|
184
|
+
statusBarScrimColor?: ColorValue | undefined;
|
|
185
|
+
|
|
108
186
|
toolbarMenu?: UnsafeMixed<StackHeaderToolbarMenuBaseAndroid> | undefined;
|
|
109
187
|
toolbarMenuGroupDividerEnabled?: CT.WithDefault<boolean, false>;
|
|
110
188
|
onToolbarMenuItemPress?:
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import type {
|
|
4
4
|
CodegenTypes as CT,
|
|
5
5
|
HostComponent,
|
|
6
|
+
ProcessedColorValue,
|
|
6
7
|
ViewProps,
|
|
7
8
|
} from 'react-native';
|
|
8
9
|
import { codegenNativeCommands, codegenNativeComponent } from 'react-native';
|
|
@@ -12,6 +13,28 @@ import type {
|
|
|
12
13
|
} from './StackHeaderItemIOSNativeComponent';
|
|
13
14
|
import { UnsafeMixed } from '../codegenUtils';
|
|
14
15
|
|
|
16
|
+
type BackButtonDisplayMode = 'default' | 'generic' | 'minimal';
|
|
17
|
+
|
|
18
|
+
export type HeaderAppearance = {
|
|
19
|
+
titleFontFamily?: string | undefined;
|
|
20
|
+
titleFontSize?: CT.Float | undefined;
|
|
21
|
+
titleFontWeight?: string | undefined;
|
|
22
|
+
titleFontStyle?: string | undefined;
|
|
23
|
+
titleFontColor?: ProcessedColorValue | null | undefined;
|
|
24
|
+
|
|
25
|
+
largeTitleFontFamily?: string | undefined;
|
|
26
|
+
largeTitleFontSize?: CT.Float | undefined;
|
|
27
|
+
largeTitleFontWeight?: string | undefined;
|
|
28
|
+
largeTitleFontStyle?: string | undefined;
|
|
29
|
+
largeTitleFontColor?: ProcessedColorValue | null | undefined;
|
|
30
|
+
|
|
31
|
+
subtitleFontFamily?: string | undefined;
|
|
32
|
+
subtitleFontSize?: CT.Float | undefined;
|
|
33
|
+
subtitleFontWeight?: string | undefined;
|
|
34
|
+
subtitleFontStyle?: string | undefined;
|
|
35
|
+
subtitleFontColor?: ProcessedColorValue | null | undefined;
|
|
36
|
+
};
|
|
37
|
+
|
|
15
38
|
export type MenuItemPressEvent = Readonly<{ menuItemId: string }>;
|
|
16
39
|
|
|
17
40
|
export type MenuSelectionChangeEvent = Readonly<{
|
|
@@ -27,12 +50,21 @@ export interface NativeProps extends ViewProps {
|
|
|
27
50
|
backButtonHidden?: CT.WithDefault<boolean, false>;
|
|
28
51
|
|
|
29
52
|
// iOS-specific props
|
|
53
|
+
backButtonTitle?: string | undefined;
|
|
54
|
+
backButtonDisplayMode?: CT.WithDefault<BackButtonDisplayMode, 'default'>;
|
|
55
|
+
backButtonMenuEnabled?: CT.WithDefault<boolean, true>;
|
|
56
|
+
|
|
30
57
|
largeTitle?: string | undefined;
|
|
31
58
|
largeSubtitle?: string | undefined;
|
|
32
59
|
largeTitleEnabled?: CT.WithDefault<boolean, false>;
|
|
33
60
|
|
|
61
|
+
prompt?: string | undefined;
|
|
62
|
+
|
|
34
63
|
titleMenu?: UnsafeMixed<StackHeaderMenuIOS> | undefined;
|
|
35
64
|
|
|
65
|
+
standardAppearance?: UnsafeMixed<HeaderAppearance> | undefined;
|
|
66
|
+
scrollEdgeAppearance?: UnsafeMixed<HeaderAppearance> | undefined;
|
|
67
|
+
|
|
36
68
|
onMenuItemPress?: CT.DirectEventHandler<MenuItemPressEvent> | undefined;
|
|
37
69
|
onMenuSelectionChange?:
|
|
38
70
|
| CT.DirectEventHandler<MenuSelectionChangeEvent>
|
|
@@ -70,6 +70,8 @@ export type PlatformIconIOS =
|
|
|
70
70
|
export interface NativeProps extends ViewProps {
|
|
71
71
|
placement?: CT.WithDefault<Placement, 'trailing'>;
|
|
72
72
|
itemId?: string | undefined;
|
|
73
|
+
identifier?: string | undefined;
|
|
74
|
+
hidesSharedBackground?: CT.WithDefault<boolean, false>;
|
|
73
75
|
title?: string | undefined;
|
|
74
76
|
icon?: UnsafeMixed<PlatformIconIOS> | undefined;
|
|
75
77
|
menu?: UnsafeMixed<StackHeaderMenuIOS> | undefined;
|