@react-navigation/elements 1.3.1 → 1.3.2

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["HeaderBackground.tsx"],"names":["HeaderBackground","style","rest","colors","styles","container","backgroundColor","card","borderBottomColor","border","shadowColor","StyleSheet","create","flex","Platform","select","android","elevation","ios","shadowOpacity","shadowRadius","shadowOffset","width","height","hairlineWidth","default","borderBottomWidth"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAce,SAASA,gBAAT,OAAqD;AAAA,MAA3B;AAAEC,IAAAA,KAAF;AAAS,OAAGC;AAAZ,GAA2B;AAClE,QAAM;AAAEC,IAAAA;AAAF,MAAa,uBAAnB;AAEA,sBACE,oBAAC,qBAAD,CAAU,IAAV;AACE,IAAA,KAAK,EAAE,CACLC,MAAM,CAACC,SADF,EAEL;AACEC,MAAAA,eAAe,EAAEH,MAAM,CAACI,IAD1B;AAEEC,MAAAA,iBAAiB,EAAEL,MAAM,CAACM,MAF5B;AAGEC,MAAAA,WAAW,EAAEP,MAAM,CAACM;AAHtB,KAFK,EAOLR,KAPK;AADT,KAUMC,IAVN,EADF;AAcD;;AAED,MAAME,MAAM,GAAGO,wBAAWC,MAAX,CAAkB;AAC/BP,EAAAA,SAAS,EAAE;AACTQ,IAAAA,IAAI,EAAE,CADG;AAET,OAAGC,sBAASC,MAAT,CAAgB;AACjBC,MAAAA,OAAO,EAAE;AACPC,QAAAA,SAAS,EAAE;AADJ,OADQ;AAIjBC,MAAAA,GAAG,EAAE;AACHC,QAAAA,aAAa,EAAE,IADZ;AAEHC,QAAAA,YAAY,EAAE,CAFX;AAGHC,QAAAA,YAAY,EAAE;AACZC,UAAAA,KAAK,EAAE,CADK;AAEZC,UAAAA,MAAM,EAAEZ,wBAAWa;AAFP;AAHX,OAJY;AAYjBC,MAAAA,OAAO,EAAE;AACPC,QAAAA,iBAAiB,EAAEf,wBAAWa;AADvB;AAZQ,KAAhB;AAFM;AADoB,CAAlB,CAAf","sourcesContent":["import { useTheme } from '@react-navigation/native';\nimport * as React from 'react';\nimport {\n Animated,\n Platform,\n StyleProp,\n StyleSheet,\n ViewProps,\n ViewStyle,\n} from 'react-native';\n\ntype Props = ViewProps & {\n style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n children?: React.ReactNode;\n};\n\nexport default function HeaderBackground({ style, ...rest }: Props) {\n const { colors } = useTheme();\n\n return (\n <Animated.View\n style={[\n styles.container,\n {\n backgroundColor: colors.card,\n borderBottomColor: colors.border,\n shadowColor: colors.border,\n },\n style,\n ]}\n {...rest}\n />\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n ...Platform.select({\n android: {\n elevation: 4,\n },\n ios: {\n shadowOpacity: 0.85,\n shadowRadius: 0,\n shadowOffset: {\n width: 0,\n height: StyleSheet.hairlineWidth,\n },\n },\n default: {\n borderBottomWidth: StyleSheet.hairlineWidth,\n },\n }),\n },\n});\n"]}
1
+ {"version":3,"sources":["HeaderBackground.tsx"],"names":["HeaderBackground","style","rest","colors","styles","container","backgroundColor","card","borderBottomColor","border","shadowColor","StyleSheet","create","flex","Platform","select","android","elevation","ios","shadowOpacity","shadowRadius","shadowOffset","width","height","hairlineWidth","default","borderBottomWidth"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAce,SAASA,gBAAT,OAAqD;AAAA,MAA3B;AAAEC,IAAAA,KAAF;AAAS,OAAGC;AAAZ,GAA2B;AAClE,QAAM;AAAEC,IAAAA;AAAF,MAAa,uBAAnB;AAEA,sBACE,oBAAC,qBAAD,CAAU,IAAV;AACE,IAAA,KAAK,EAAE,CACLC,MAAM,CAACC,SADF,EAEL;AACEC,MAAAA,eAAe,EAAEH,MAAM,CAACI,IAD1B;AAEEC,MAAAA,iBAAiB,EAAEL,MAAM,CAACM,MAF5B;AAGEC,MAAAA,WAAW,EAAEP,MAAM,CAACM;AAHtB,KAFK,EAOLR,KAPK;AADT,KAUMC,IAVN,EADF;AAcD;;AAED,MAAME,MAAM,GAAGO,wBAAWC,MAAX,CAAkB;AAC/BP,EAAAA,SAAS,EAAE;AACTQ,IAAAA,IAAI,EAAE,CADG;AAET,OAAGC,sBAASC,MAAT,CAAgB;AACjBC,MAAAA,OAAO,EAAE;AACPC,QAAAA,SAAS,EAAE;AADJ,OADQ;AAIjBC,MAAAA,GAAG,EAAE;AACHC,QAAAA,aAAa,EAAE,IADZ;AAEHC,QAAAA,YAAY,EAAE,CAFX;AAGHC,QAAAA,YAAY,EAAE;AACZC,UAAAA,KAAK,EAAE,CADK;AAEZC,UAAAA,MAAM,EAAEZ,wBAAWa;AAFP;AAHX,OAJY;AAYjBC,MAAAA,OAAO,EAAE;AACPC,QAAAA,iBAAiB,EAAEf,wBAAWa;AADvB;AAZQ,KAAhB;AAFM;AADoB,CAAlB,CAAf","sourcesContent":["import { useTheme } from '@react-navigation/native';\nimport * as React from 'react';\nimport {\n Animated,\n Platform,\n StyleProp,\n StyleSheet,\n ViewProps,\n ViewStyle,\n} from 'react-native';\n\ntype Props = Omit<ViewProps, 'style'> & {\n style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n children?: React.ReactNode;\n};\n\nexport default function HeaderBackground({ style, ...rest }: Props) {\n const { colors } = useTheme();\n\n return (\n <Animated.View\n style={[\n styles.container,\n {\n backgroundColor: colors.card,\n borderBottomColor: colors.border,\n shadowColor: colors.border,\n },\n style,\n ]}\n {...rest}\n />\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n ...Platform.select({\n android: {\n elevation: 4,\n },\n ios: {\n shadowOpacity: 0.85,\n shadowRadius: 0,\n shadowOffset: {\n width: 0,\n height: StyleSheet.hairlineWidth,\n },\n },\n default: {\n borderBottomWidth: StyleSheet.hairlineWidth,\n },\n }),\n },\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["HeaderBackground.tsx"],"names":["useTheme","React","Animated","Platform","StyleSheet","HeaderBackground","style","rest","colors","styles","container","backgroundColor","card","borderBottomColor","border","shadowColor","create","flex","select","android","elevation","ios","shadowOpacity","shadowRadius","shadowOffset","width","height","hairlineWidth","default","borderBottomWidth"],"mappings":";;AAAA,SAASA,QAAT,QAAyB,0BAAzB;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,SACEC,QADF,EAEEC,QAFF,EAIEC,UAJF,QAOO,cAPP;AAcA,eAAe,SAASC,gBAAT,OAAqD;AAAA,MAA3B;AAAEC,IAAAA,KAAF;AAAS,OAAGC;AAAZ,GAA2B;AAClE,QAAM;AAAEC,IAAAA;AAAF,MAAaR,QAAQ,EAA3B;AAEA,sBACE,oBAAC,QAAD,CAAU,IAAV;AACE,IAAA,KAAK,EAAE,CACLS,MAAM,CAACC,SADF,EAEL;AACEC,MAAAA,eAAe,EAAEH,MAAM,CAACI,IAD1B;AAEEC,MAAAA,iBAAiB,EAAEL,MAAM,CAACM,MAF5B;AAGEC,MAAAA,WAAW,EAAEP,MAAM,CAACM;AAHtB,KAFK,EAOLR,KAPK;AADT,KAUMC,IAVN,EADF;AAcD;AAED,MAAME,MAAM,GAAGL,UAAU,CAACY,MAAX,CAAkB;AAC/BN,EAAAA,SAAS,EAAE;AACTO,IAAAA,IAAI,EAAE,CADG;AAET,OAAGd,QAAQ,CAACe,MAAT,CAAgB;AACjBC,MAAAA,OAAO,EAAE;AACPC,QAAAA,SAAS,EAAE;AADJ,OADQ;AAIjBC,MAAAA,GAAG,EAAE;AACHC,QAAAA,aAAa,EAAE,IADZ;AAEHC,QAAAA,YAAY,EAAE,CAFX;AAGHC,QAAAA,YAAY,EAAE;AACZC,UAAAA,KAAK,EAAE,CADK;AAEZC,UAAAA,MAAM,EAAEtB,UAAU,CAACuB;AAFP;AAHX,OAJY;AAYjBC,MAAAA,OAAO,EAAE;AACPC,QAAAA,iBAAiB,EAAEzB,UAAU,CAACuB;AADvB;AAZQ,KAAhB;AAFM;AADoB,CAAlB,CAAf","sourcesContent":["import { useTheme } from '@react-navigation/native';\nimport * as React from 'react';\nimport {\n Animated,\n Platform,\n StyleProp,\n StyleSheet,\n ViewProps,\n ViewStyle,\n} from 'react-native';\n\ntype Props = ViewProps & {\n style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n children?: React.ReactNode;\n};\n\nexport default function HeaderBackground({ style, ...rest }: Props) {\n const { colors } = useTheme();\n\n return (\n <Animated.View\n style={[\n styles.container,\n {\n backgroundColor: colors.card,\n borderBottomColor: colors.border,\n shadowColor: colors.border,\n },\n style,\n ]}\n {...rest}\n />\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n ...Platform.select({\n android: {\n elevation: 4,\n },\n ios: {\n shadowOpacity: 0.85,\n shadowRadius: 0,\n shadowOffset: {\n width: 0,\n height: StyleSheet.hairlineWidth,\n },\n },\n default: {\n borderBottomWidth: StyleSheet.hairlineWidth,\n },\n }),\n },\n});\n"]}
1
+ {"version":3,"sources":["HeaderBackground.tsx"],"names":["useTheme","React","Animated","Platform","StyleSheet","HeaderBackground","style","rest","colors","styles","container","backgroundColor","card","borderBottomColor","border","shadowColor","create","flex","select","android","elevation","ios","shadowOpacity","shadowRadius","shadowOffset","width","height","hairlineWidth","default","borderBottomWidth"],"mappings":";;AAAA,SAASA,QAAT,QAAyB,0BAAzB;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,SACEC,QADF,EAEEC,QAFF,EAIEC,UAJF,QAOO,cAPP;AAcA,eAAe,SAASC,gBAAT,OAAqD;AAAA,MAA3B;AAAEC,IAAAA,KAAF;AAAS,OAAGC;AAAZ,GAA2B;AAClE,QAAM;AAAEC,IAAAA;AAAF,MAAaR,QAAQ,EAA3B;AAEA,sBACE,oBAAC,QAAD,CAAU,IAAV;AACE,IAAA,KAAK,EAAE,CACLS,MAAM,CAACC,SADF,EAEL;AACEC,MAAAA,eAAe,EAAEH,MAAM,CAACI,IAD1B;AAEEC,MAAAA,iBAAiB,EAAEL,MAAM,CAACM,MAF5B;AAGEC,MAAAA,WAAW,EAAEP,MAAM,CAACM;AAHtB,KAFK,EAOLR,KAPK;AADT,KAUMC,IAVN,EADF;AAcD;AAED,MAAME,MAAM,GAAGL,UAAU,CAACY,MAAX,CAAkB;AAC/BN,EAAAA,SAAS,EAAE;AACTO,IAAAA,IAAI,EAAE,CADG;AAET,OAAGd,QAAQ,CAACe,MAAT,CAAgB;AACjBC,MAAAA,OAAO,EAAE;AACPC,QAAAA,SAAS,EAAE;AADJ,OADQ;AAIjBC,MAAAA,GAAG,EAAE;AACHC,QAAAA,aAAa,EAAE,IADZ;AAEHC,QAAAA,YAAY,EAAE,CAFX;AAGHC,QAAAA,YAAY,EAAE;AACZC,UAAAA,KAAK,EAAE,CADK;AAEZC,UAAAA,MAAM,EAAEtB,UAAU,CAACuB;AAFP;AAHX,OAJY;AAYjBC,MAAAA,OAAO,EAAE;AACPC,QAAAA,iBAAiB,EAAEzB,UAAU,CAACuB;AADvB;AAZQ,KAAhB;AAFM;AADoB,CAAlB,CAAf","sourcesContent":["import { useTheme } from '@react-navigation/native';\nimport * as React from 'react';\nimport {\n Animated,\n Platform,\n StyleProp,\n StyleSheet,\n ViewProps,\n ViewStyle,\n} from 'react-native';\n\ntype Props = Omit<ViewProps, 'style'> & {\n style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;\n children?: React.ReactNode;\n};\n\nexport default function HeaderBackground({ style, ...rest }: Props) {\n const { colors } = useTheme();\n\n return (\n <Animated.View\n style={[\n styles.container,\n {\n backgroundColor: colors.card,\n borderBottomColor: colors.border,\n shadowColor: colors.border,\n },\n style,\n ]}\n {...rest}\n />\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n ...Platform.select({\n android: {\n elevation: 4,\n },\n ios: {\n shadowOpacity: 0.85,\n shadowRadius: 0,\n shadowOffset: {\n width: 0,\n height: StyleSheet.hairlineWidth,\n },\n },\n default: {\n borderBottomWidth: StyleSheet.hairlineWidth,\n },\n }),\n },\n});\n"]}
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Animated, StyleProp, ViewProps, ViewStyle } from 'react-native';
3
- declare type Props = ViewProps & {
3
+ declare type Props = Omit<ViewProps, 'style'> & {
4
4
  style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
5
5
  children?: React.ReactNode;
6
6
  };
@@ -92,7 +92,7 @@ export declare type HeaderOptions = {
92
92
  /**
93
93
  * Style object for the header. You can specify a custom background color here, for example.
94
94
  */
95
- headerStyle?: StyleProp<ViewStyle>;
95
+ headerStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
96
96
  /**
97
97
  * Whether to hide the elevation shadow (Android) or the bottom border (iOS) on the header.
98
98
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@react-navigation/elements",
3
3
  "description": "UI Components for React Navigation",
4
- "version": "1.3.1",
4
+ "version": "1.3.2",
5
5
  "keywords": [
6
6
  "react-native",
7
7
  "react-navigation",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@react-native-masked-view/masked-view": "^0.2.4",
41
- "@react-navigation/native": "^6.0.8",
41
+ "@react-navigation/native": "^6.0.9",
42
42
  "@testing-library/react-native": "^7.2.0",
43
43
  "@types/react": "^17.0.9",
44
44
  "@types/react-native": "~0.64.9",
@@ -68,5 +68,5 @@
68
68
  ]
69
69
  ]
70
70
  },
71
- "gitHead": "4cddbce150413c15db93897c76b813f436f5186d"
71
+ "gitHead": "c5ef6b5e88426e658123ea8590da583314b9001e"
72
72
  }
@@ -9,7 +9,7 @@ import {
9
9
  ViewStyle,
10
10
  } from 'react-native';
11
11
 
12
- type Props = ViewProps & {
12
+ type Props = Omit<ViewProps, 'style'> & {
13
13
  style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
14
14
  children?: React.ReactNode;
15
15
  };
package/src/types.tsx CHANGED
@@ -98,7 +98,7 @@ export type HeaderOptions = {
98
98
  /**
99
99
  * Style object for the header. You can specify a custom background color here, for example.
100
100
  */
101
- headerStyle?: StyleProp<ViewStyle>;
101
+ headerStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
102
102
  /**
103
103
  * Whether to hide the elevation shadow (Android) or the bottom border (iOS) on the header.
104
104
  *