@react-navigation/bottom-tabs
Advanced tools
Comparing version 7.0.0-alpha.8 to 7.0.0-alpha.9
@@ -119,3 +119,3 @@ "use strict"; | ||
tabBarInactiveTintColor, | ||
tabBarActiveBackgroundColor = tabBarPosition !== 'bottom' ? (0, _color.default)(tabBarActiveTintColor ?? colors.primary).alpha(0.12).rgb().string() : undefined, | ||
tabBarActiveBackgroundColor = tabBarPosition !== 'bottom' && tabBarPosition !== 'top' ? (0, _color.default)(tabBarActiveTintColor ?? colors.primary).alpha(0.12).rgb().string() : undefined, | ||
tabBarInactiveBackgroundColor | ||
@@ -204,2 +204,3 @@ } = focusedOptions; | ||
const tabBarBackgroundElement = tabBarBackground?.(); | ||
const tabBarIsHorizontal = tabBarPosition === 'bottom' || tabBarPosition === 'top'; | ||
return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, { | ||
@@ -209,3 +210,3 @@ style: [tabBarPosition === 'left' ? styles.left : tabBarPosition === 'right' ? styles.right : styles.bottom, { | ||
borderColor: colors.border | ||
}, tabBarPosition === 'bottom' ? [{ | ||
}, tabBarIsHorizontal ? [{ | ||
transform: [{ | ||
@@ -232,3 +233,3 @@ translateY: visible.interpolate({ | ||
pointerEvents: isTabBarHidden ? 'none' : 'auto', | ||
onLayout: tabBarPosition === 'bottom' ? handleLayout : undefined | ||
onLayout: tabBarIsHorizontal ? handleLayout : undefined | ||
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, { | ||
@@ -239,3 +240,3 @@ pointerEvents: "none", | ||
accessibilityRole: "tablist", | ||
style: tabBarPosition === 'bottom' ? styles.bottomContent : styles.sideContent | ||
style: tabBarIsHorizontal ? styles.bottomContent : styles.sideContent | ||
}, routes.map((route, index) => { | ||
@@ -307,3 +308,3 @@ const focused = index === state.index; | ||
iconStyle: options.tabBarIconStyle, | ||
style: [tabBarPosition === 'bottom' ? styles.bottomItem : [styles.sideItem, hasHorizontalLabels ? { | ||
style: [tabBarIsHorizontal ? styles.bottomItem : [styles.sideItem, hasHorizontalLabels ? { | ||
justifyContent: 'flex-start' | ||
@@ -310,0 +311,0 @@ } : null], options.tabBarItemStyle] |
@@ -120,3 +120,5 @@ "use strict"; | ||
style: tabBarPosition === 'left' ? styles.left : tabBarPosition === 'right' ? styles.right : null | ||
}, /*#__PURE__*/React.createElement(_ScreenFallback.MaybeScreenContainer, { | ||
}, tabBarPosition === 'top' ? /*#__PURE__*/React.createElement(_BottomTabBarHeightCallbackContext.BottomTabBarHeightCallbackContext.Provider, { | ||
value: setTabBarHeight | ||
}, renderTabBar()) : null, /*#__PURE__*/React.createElement(_ScreenFallback.MaybeScreenContainer, { | ||
enabled: detachInactiveScreens, | ||
@@ -198,5 +200,5 @@ hasTwoStates: hasTwoStates, | ||
}, descriptor.render()))); | ||
})), /*#__PURE__*/React.createElement(_BottomTabBarHeightCallbackContext.BottomTabBarHeightCallbackContext.Provider, { | ||
})), tabBarPosition !== 'top' ? /*#__PURE__*/React.createElement(_BottomTabBarHeightCallbackContext.BottomTabBarHeightCallbackContext.Provider, { | ||
value: setTabBarHeight | ||
}, renderTabBar())); | ||
}, renderTabBar()) : null); | ||
} | ||
@@ -203,0 +205,0 @@ const styles = _reactNative.StyleSheet.create({ |
@@ -110,3 +110,3 @@ import { getDefaultSidebarWidth, getLabel, MissingIcon } from '@react-navigation/elements'; | ||
tabBarInactiveTintColor, | ||
tabBarActiveBackgroundColor = tabBarPosition !== 'bottom' ? Color(tabBarActiveTintColor ?? colors.primary).alpha(0.12).rgb().string() : undefined, | ||
tabBarActiveBackgroundColor = tabBarPosition !== 'bottom' && tabBarPosition !== 'top' ? Color(tabBarActiveTintColor ?? colors.primary).alpha(0.12).rgb().string() : undefined, | ||
tabBarInactiveBackgroundColor | ||
@@ -195,2 +195,3 @@ } = focusedOptions; | ||
const tabBarBackgroundElement = tabBarBackground?.(); | ||
const tabBarIsHorizontal = tabBarPosition === 'bottom' || tabBarPosition === 'top'; | ||
return /*#__PURE__*/React.createElement(Animated.View, { | ||
@@ -200,3 +201,3 @@ style: [tabBarPosition === 'left' ? styles.left : tabBarPosition === 'right' ? styles.right : styles.bottom, { | ||
borderColor: colors.border | ||
}, tabBarPosition === 'bottom' ? [{ | ||
}, tabBarIsHorizontal ? [{ | ||
transform: [{ | ||
@@ -223,3 +224,3 @@ translateY: visible.interpolate({ | ||
pointerEvents: isTabBarHidden ? 'none' : 'auto', | ||
onLayout: tabBarPosition === 'bottom' ? handleLayout : undefined | ||
onLayout: tabBarIsHorizontal ? handleLayout : undefined | ||
}, /*#__PURE__*/React.createElement(View, { | ||
@@ -230,3 +231,3 @@ pointerEvents: "none", | ||
accessibilityRole: "tablist", | ||
style: tabBarPosition === 'bottom' ? styles.bottomContent : styles.sideContent | ||
style: tabBarIsHorizontal ? styles.bottomContent : styles.sideContent | ||
}, routes.map((route, index) => { | ||
@@ -298,3 +299,3 @@ const focused = index === state.index; | ||
iconStyle: options.tabBarIconStyle, | ||
style: [tabBarPosition === 'bottom' ? styles.bottomItem : [styles.sideItem, hasHorizontalLabels ? { | ||
style: [tabBarIsHorizontal ? styles.bottomItem : [styles.sideItem, hasHorizontalLabels ? { | ||
justifyContent: 'flex-start' | ||
@@ -301,0 +302,0 @@ } : null], options.tabBarItemStyle] |
@@ -112,3 +112,5 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
style: tabBarPosition === 'left' ? styles.left : tabBarPosition === 'right' ? styles.right : null | ||
}, /*#__PURE__*/React.createElement(MaybeScreenContainer, { | ||
}, tabBarPosition === 'top' ? /*#__PURE__*/React.createElement(BottomTabBarHeightCallbackContext.Provider, { | ||
value: setTabBarHeight | ||
}, renderTabBar()) : null, /*#__PURE__*/React.createElement(MaybeScreenContainer, { | ||
enabled: detachInactiveScreens, | ||
@@ -190,5 +192,5 @@ hasTwoStates: hasTwoStates, | ||
}, descriptor.render()))); | ||
})), /*#__PURE__*/React.createElement(BottomTabBarHeightCallbackContext.Provider, { | ||
})), tabBarPosition !== 'top' ? /*#__PURE__*/React.createElement(BottomTabBarHeightCallbackContext.Provider, { | ||
value: setTabBarHeight | ||
}, renderTabBar())); | ||
}, renderTabBar()) : null); | ||
} | ||
@@ -195,0 +197,0 @@ const styles = StyleSheet.create({ |
@@ -160,3 +160,3 @@ import type { HeaderOptions, PlatformPressable } from '@react-navigation/elements'; | ||
*/ | ||
tabBarPosition?: 'bottom' | 'left' | 'right'; | ||
tabBarPosition?: 'bottom' | 'left' | 'right' | 'top'; | ||
/** | ||
@@ -163,0 +163,0 @@ * Whether this screens should render the first time it's accessed. Defaults to `true`. |
{ | ||
"name": "@react-navigation/bottom-tabs", | ||
"description": "Bottom tab navigator following iOS design guidelines", | ||
"version": "7.0.0-alpha.8", | ||
"version": "7.0.0-alpha.9", | ||
"keywords": [ | ||
@@ -39,24 +39,24 @@ "react-native-component", | ||
"dependencies": { | ||
"@react-navigation/elements": "^2.0.0-alpha.5", | ||
"@react-navigation/elements": "^2.0.0-alpha.6", | ||
"color": "^4.2.3" | ||
}, | ||
"devDependencies": { | ||
"@react-navigation/native": "^7.0.0-alpha.7", | ||
"@testing-library/react-native": "^12.3.1", | ||
"@types/color": "^3.0.5", | ||
"@types/react": "~18.2.33", | ||
"@react-navigation/native": "^7.0.0-alpha.8", | ||
"@testing-library/react-native": "^12.4.3", | ||
"@types/color": "^3.0.6", | ||
"@types/react": "~18.2.45", | ||
"del-cli": "^5.1.0", | ||
"react": "18.2.0", | ||
"react-native": "0.72.6", | ||
"react-native-builder-bob": "^0.23.1", | ||
"react-native-safe-area-context": "4.6.3", | ||
"react-native-screens": "~3.22.0", | ||
"typescript": "^5.2.2" | ||
"react-native": "0.73.2", | ||
"react-native-builder-bob": "^0.23.2", | ||
"react-native-safe-area-context": "4.8.2", | ||
"react-native-screens": "~3.29.0", | ||
"typescript": "^5.3.3" | ||
}, | ||
"peerDependencies": { | ||
"@react-navigation/native": "^7.0.0-alpha.7", | ||
"@react-navigation/native": "^7.0.0-alpha.8", | ||
"react": "*", | ||
"react-native": "0.72.6", | ||
"react-native-safe-area-context": "4.6.3", | ||
"react-native-screens": "~3.22.0" | ||
"react-native": "0.73.2", | ||
"react-native-safe-area-context": "4.8.2", | ||
"react-native-screens": "~3.29.0" | ||
}, | ||
@@ -77,3 +77,3 @@ "react-native-builder-bob": { | ||
}, | ||
"gitHead": "d0e6a2cd79d2c6aff0cf54e46e31edc407c3c46b" | ||
"gitHead": "e4e445810a3a958c35cc34486b5499baa595500e" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
270476
4642
+ Added@isaacs/ttlcache@1.4.1(transitive)
+ Added@react-native-community/cli@12.3.0(transitive)
+ Added@react-native-community/cli-clean@12.3.0(transitive)
+ Added@react-native-community/cli-config@12.3.0(transitive)
+ Added@react-native-community/cli-debugger-ui@12.3.0(transitive)
+ Added@react-native-community/cli-doctor@12.3.0(transitive)
+ Added@react-native-community/cli-hermes@12.3.0(transitive)
+ Added@react-native-community/cli-platform-android@12.3.0(transitive)
+ Added@react-native-community/cli-platform-ios@12.3.0(transitive)
+ Added@react-native-community/cli-plugin-metro@12.3.0(transitive)
+ Added@react-native-community/cli-server-api@12.3.0(transitive)
+ Added@react-native-community/cli-tools@12.3.0(transitive)
+ Added@react-native-community/cli-types@12.3.0(transitive)
+ Added@react-native/assets-registry@0.73.1(transitive)
+ Added@react-native/babel-plugin-codegen@0.73.2(transitive)
+ Added@react-native/babel-preset@0.73.19(transitive)
+ Added@react-native/codegen@0.73.2(transitive)
+ Added@react-native/community-cli-plugin@0.73.12(transitive)
+ Added@react-native/debugger-frontend@0.73.3(transitive)
+ Added@react-native/dev-middleware@0.73.7(transitive)
+ Added@react-native/gradle-plugin@0.73.4(transitive)
+ Added@react-native/js-polyfills@0.73.1(transitive)
+ Added@react-native/metro-babel-transformer@0.73.13(transitive)
+ Added@react-native/normalize-colors@0.73.2(transitive)
+ Added@react-native/virtualized-lists@0.73.4(transitive)
+ Addedchrome-launcher@0.15.2(transitive)
+ Addedchromium-edge-launcher@1.0.0(transitive)
+ Addeddeprecated-react-native-prop-types@5.0.0(transitive)
+ Addedexponential-backoff@3.1.1(transitive)
+ Addedflow-enums-runtime@0.0.6(transitive)
+ Addedhermes-estree@0.15.00.23.1(transitive)
+ Addedhermes-parser@0.15.00.23.1(transitive)
+ Addedis-docker@2.2.1(transitive)
+ Addedis-wsl@2.2.0(transitive)
+ Addedjest-worker@29.7.0(transitive)
+ Addedlighthouse-logger@1.4.2(transitive)
+ Addedmarky@1.2.5(transitive)
+ Addedmetro@0.80.12(transitive)
+ Addedmetro-babel-transformer@0.80.12(transitive)
+ Addedmetro-cache@0.80.12(transitive)
+ Addedmetro-cache-key@0.80.12(transitive)
+ Addedmetro-config@0.80.12(transitive)
+ Addedmetro-core@0.80.12(transitive)
+ Addedmetro-file-map@0.80.12(transitive)
+ Addedmetro-minify-terser@0.80.12(transitive)
+ Addedmetro-resolver@0.80.12(transitive)
+ Addedmetro-runtime@0.80.12(transitive)
+ Addedmetro-source-map@0.80.12(transitive)
+ Addedmetro-symbolicate@0.80.12(transitive)
+ Addedmetro-transform-plugins@0.80.12(transitive)
+ Addedmetro-transform-worker@0.80.12(transitive)
+ Addedmkdirp@1.0.4(transitive)
+ Addedob1@0.80.12(transitive)
+ Addedopen@7.4.2(transitive)
+ Addedreact-native@0.73.2(transitive)
+ Addedreact-native-safe-area-context@4.8.2(transitive)
+ Addedreact-native-screens@3.29.0(transitive)
+ Addedreact-refresh@0.14.2(transitive)
+ Addedtemp-dir@2.0.0(transitive)
- Removed@babel/plugin-syntax-class-properties@7.12.13(transitive)
- Removed@jest/types@27.5.1(transitive)
- Removed@react-native-community/cli@11.3.7(transitive)
- Removed@react-native-community/cli-clean@11.3.7(transitive)
- Removed@react-native-community/cli-config@11.3.7(transitive)
- Removed@react-native-community/cli-debugger-ui@11.3.7(transitive)
- Removed@react-native-community/cli-doctor@11.3.7(transitive)
- Removed@react-native-community/cli-hermes@11.3.7(transitive)
- Removed@react-native-community/cli-platform-android@11.3.7(transitive)
- Removed@react-native-community/cli-platform-ios@11.3.7(transitive)
- Removed@react-native-community/cli-plugin-metro@11.3.7(transitive)
- Removed@react-native-community/cli-server-api@11.3.7(transitive)
- Removed@react-native-community/cli-tools@11.3.7(transitive)
- Removed@react-native-community/cli-types@11.3.7(transitive)
- Removed@react-native/assets-registry@0.72.0(transitive)
- Removed@react-native/codegen@0.72.8(transitive)
- Removed@react-native/gradle-plugin@0.72.11(transitive)
- Removed@react-native/js-polyfills@0.72.1(transitive)
- Removed@react-native/normalize-colors@0.72.0(transitive)
- Removed@react-native/virtualized-lists@0.72.8(transitive)
- Removed@types/yargs@16.0.9(transitive)
- Removedasync@3.2.6(transitive)
- Removedbabel-plugin-syntax-trailing-function-commas@7.0.0-beta.0(transitive)
- Removedbabel-preset-fbjs@3.4.0(transitive)
- Removedcommander@2.14.1(transitive)
- Removeddeprecated-react-native-prop-types@4.1.0(transitive)
- Removedflow-enums-runtime@0.0.5(transitive)
- Removedhermes-estree@0.12.0(transitive)
- Removedhermes-parser@0.12.0(transitive)
- Removedjest-regex-util@27.5.1(transitive)
- Removedjest-util@27.5.1(transitive)
- Removedjest-worker@27.5.1(transitive)
- Removedmetro@0.76.8(transitive)
- Removedmetro-babel-transformer@0.76.8(transitive)
- Removedmetro-cache@0.76.8(transitive)
- Removedmetro-cache-key@0.76.8(transitive)
- Removedmetro-config@0.76.8(transitive)
- Removedmetro-core@0.76.8(transitive)
- Removedmetro-file-map@0.76.8(transitive)
- Removedmetro-inspector-proxy@0.76.8(transitive)
- Removedmetro-minify-terser@0.76.8(transitive)
- Removedmetro-minify-uglify@0.76.8(transitive)
- Removedmetro-react-native-babel-preset@0.76.8(transitive)
- Removedmetro-react-native-babel-transformer@0.76.8(transitive)
- Removedmetro-resolver@0.76.8(transitive)
- Removedmetro-runtime@0.76.8(transitive)
- Removedmetro-source-map@0.76.8(transitive)
- Removedmetro-symbolicate@0.76.8(transitive)
- Removedmetro-transform-plugins@0.76.8(transitive)
- Removedmetro-transform-worker@0.76.8(transitive)
- Removedob1@0.76.8(transitive)
- Removedreact-native@0.72.6(transitive)
- Removedreact-native-safe-area-context@4.6.3(transitive)
- Removedreact-native-screens@3.22.1(transitive)
- Removedreact-refresh@0.4.3(transitive)
- Removeduglify-es@3.3.10(transitive)