@react-navigation/elements 3.0.0-alpha.12 → 3.0.0-alpha.13

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 (65) hide show
  1. package/lib/module/ActivityView.js +90 -0
  2. package/lib/module/ActivityView.js.map +1 -0
  3. package/lib/module/ActivityView.native.js +67 -0
  4. package/lib/module/ActivityView.native.js.map +1 -0
  5. package/lib/module/Container.js +3 -0
  6. package/lib/module/Container.js.map +1 -1
  7. package/lib/module/Header/Header.js +5 -2
  8. package/lib/module/Header/Header.js.map +1 -1
  9. package/lib/module/Header/getHeaderTitle.js.map +1 -1
  10. package/lib/module/Label/getLabel.js.map +1 -1
  11. package/lib/module/PlatformPressable.js.map +1 -1
  12. package/lib/module/internal.js +1 -1
  13. package/lib/module/internal.js.map +1 -1
  14. package/lib/typescript/src/ActivityView.d.ts +31 -0
  15. package/lib/typescript/src/ActivityView.d.ts.map +1 -0
  16. package/lib/typescript/src/ActivityView.native.d.ts +3 -0
  17. package/lib/typescript/src/ActivityView.native.d.ts.map +1 -0
  18. package/lib/typescript/src/Badge.d.ts +3 -3
  19. package/lib/typescript/src/Badge.d.ts.map +1 -1
  20. package/lib/typescript/src/Button.d.ts +2 -2
  21. package/lib/typescript/src/Button.d.ts.map +1 -1
  22. package/lib/typescript/src/Container.d.ts +7 -6
  23. package/lib/typescript/src/Container.d.ts.map +1 -1
  24. package/lib/typescript/src/Header/Header.d.ts +2 -2
  25. package/lib/typescript/src/Header/Header.d.ts.map +1 -1
  26. package/lib/typescript/src/Header/HeaderBackground.d.ts +3 -3
  27. package/lib/typescript/src/Header/HeaderBackground.d.ts.map +1 -1
  28. package/lib/typescript/src/Header/HeaderSearchBar.d.ts +4 -4
  29. package/lib/typescript/src/Header/HeaderSearchBar.d.ts.map +1 -1
  30. package/lib/typescript/src/Header/HeaderTitle.d.ts +3 -3
  31. package/lib/typescript/src/Header/HeaderTitle.d.ts.map +1 -1
  32. package/lib/typescript/src/Header/getHeaderTitle.d.ts +1 -1
  33. package/lib/typescript/src/Header/getHeaderTitle.d.ts.map +1 -1
  34. package/lib/typescript/src/Label/getLabel.d.ts +2 -2
  35. package/lib/typescript/src/Label/getLabel.d.ts.map +1 -1
  36. package/lib/typescript/src/PlatformPressable.d.ts +12 -12
  37. package/lib/typescript/src/PlatformPressable.d.ts.map +1 -1
  38. package/lib/typescript/src/Screen.d.ts +5 -5
  39. package/lib/typescript/src/Screen.d.ts.map +1 -1
  40. package/lib/typescript/src/internal.d.ts +1 -1
  41. package/lib/typescript/src/internal.d.ts.map +1 -1
  42. package/lib/typescript/src/types.d.ts +65 -65
  43. package/lib/typescript/src/types.d.ts.map +1 -1
  44. package/package.json +10 -10
  45. package/src/ActivityView.native.tsx +90 -0
  46. package/src/ActivityView.tsx +129 -0
  47. package/src/Badge.tsx +3 -3
  48. package/src/Button.tsx +2 -2
  49. package/src/Container.tsx +11 -6
  50. package/src/Header/Header.tsx +19 -12
  51. package/src/Header/HeaderBackButton.tsx +3 -3
  52. package/src/Header/HeaderBackground.tsx +3 -3
  53. package/src/Header/HeaderSearchBar.tsx +4 -4
  54. package/src/Header/HeaderTitle.tsx +3 -3
  55. package/src/Header/getHeaderTitle.tsx +4 -1
  56. package/src/Label/getLabel.tsx +1 -1
  57. package/src/PlatformPressable.tsx +12 -8
  58. package/src/Screen.tsx +5 -5
  59. package/src/internal.tsx +1 -1
  60. package/src/types.tsx +96 -75
  61. package/lib/module/Lazy.js +0 -42
  62. package/lib/module/Lazy.js.map +0 -1
  63. package/lib/typescript/src/Lazy.d.ts +0 -31
  64. package/lib/typescript/src/Lazy.d.ts.map +0 -1
  65. package/src/Lazy.tsx +0 -59
@@ -6,21 +6,21 @@ type HoverEffectProps = {
6
6
  activeOpacity?: number;
7
7
  };
8
8
  export type Props = Omit<PressableProps, 'style' | 'onPress'> & {
9
- href?: string;
10
- pressColor?: ColorValue;
11
- pressOpacity?: number;
12
- hoverEffect?: HoverEffectProps;
13
- style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
14
- onPress?: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent) => void;
9
+ href?: string | undefined;
10
+ pressColor?: ColorValue | undefined;
11
+ pressOpacity?: number | undefined;
12
+ hoverEffect?: HoverEffectProps | undefined;
13
+ style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>> | undefined;
14
+ onPress?: ((e: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent) => void) | undefined;
15
15
  children: React.ReactNode;
16
16
  };
17
17
  export declare const PlatformPressable: React.ForwardRefExoticComponent<Omit<PressableProps, "style" | "onPress"> & {
18
- href?: string;
19
- pressColor?: ColorValue;
20
- pressOpacity?: number;
21
- hoverEffect?: HoverEffectProps;
22
- style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
23
- onPress?: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent) => void;
18
+ href?: string | undefined;
19
+ pressColor?: ColorValue | undefined;
20
+ pressOpacity?: number | undefined;
21
+ hoverEffect?: HoverEffectProps | undefined;
22
+ style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>> | undefined;
23
+ onPress?: ((e: React.MouseEvent<HTMLAnchorElement, MouseEvent> | GestureResponderEvent) => void) | undefined;
24
24
  children: React.ReactNode;
25
25
  } & React.RefAttributes<import("react-native").View | Animated.LegacyRef<import("react-native").View>>>;
26
26
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"PlatformPressable.d.ts","sourceRoot":"","sources":["../../../src/PlatformPressable.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,QAAQ,EACR,KAAK,UAAU,EAEf,KAAK,qBAAqB,EAG1B,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,KAAK,gBAAgB,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,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AAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,SAAS,CAAC,GAAG;IAC9D,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,WAAW,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAC3C,KAAK,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,GAAG,SAAS,CAAC;IACrE,OAAO,CAAC,EACJ,CAAC,CACC,CAAC,EACG,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAC/C,qBAAqB,KACtB,IAAI,CAAC,GACV,SAAS,CAAC;IACd,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAgIF,eAAO,MAAM,iBAAiB;WA7IrB,MAAM,GAAG,SAAS;iBACZ,UAAU,GAAG,SAAS;mBACpB,MAAM,GAAG,SAAS;kBACnB,gBAAgB,GAAG,SAAS;YAClC,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,GAAG,SAAS;cAEhE,CAAC,CACC,CAAC,EACG,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAC/C,qBAAqB,KACtB,IAAI,CAAC,GACV,SAAS;cACH,KAAK,CAAC,SAAS;uGAiIiD,CAAC"}
@@ -3,14 +3,14 @@ import * as React from 'react';
3
3
  import { Container } from './Container';
4
4
  type Props = {
5
5
  focused: boolean;
6
- modal?: boolean;
6
+ modal?: boolean | undefined;
7
7
  navigation: NavigationProp<ParamListBase>;
8
8
  route: RouteProp<ParamListBase>;
9
9
  header: React.ReactNode;
10
- headerShown?: boolean;
11
- headerStatusBarHeight?: number;
12
- headerTransparent?: boolean;
13
- style?: React.ComponentProps<typeof Container>['style'];
10
+ headerShown?: boolean | undefined;
11
+ headerStatusBarHeight?: number | undefined;
12
+ headerTransparent?: boolean | undefined;
13
+ style?: React.ComponentProps<typeof Container>['style'] | undefined;
14
14
  children: React.ReactNode;
15
15
  };
16
16
  export declare function Screen(props: Props): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../../../src/Screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,aAAa,EAClB,KAAK,SAAS,EAEf,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAMxC,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IAC1C,KAAK,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;IAChC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,KAAK,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC;IACxD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,wBAAgB,MAAM,CAAC,KAAK,EAAE,KAAK,2CA+ElC"}
1
+ {"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../../../src/Screen.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,aAAa,EAClB,KAAK,SAAS,EAEf,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAMxC,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B,UAAU,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;IAC1C,KAAK,EAAE,SAAS,CAAC,aAAa,CAAC,CAAC;IAChC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC,qBAAqB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,iBAAiB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACxC,KAAK,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;IACpE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,wBAAgB,MAAM,CAAC,KAAK,EAAE,KAAK,2CA+ElC"}
@@ -1,6 +1,6 @@
1
+ export { ActivityView } from './ActivityView';
1
2
  export { Color } from './Color';
2
3
  export { Container, type Props as ContainerProps } from './Container';
3
- export { Lazy } from './Lazy';
4
4
  export { isLiquidGlassSupported } from './LiquidGlassView';
5
5
  export { MissingIcon } from './MissingIcon';
6
6
  export { SafeAreaProviderCompat } from './SafeAreaProviderCompat';
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/internal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,KAAK,KAAK,IAAI,cAAc,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/internal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,KAAK,KAAK,IAAI,cAAc,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -25,59 +25,59 @@ export type HeaderSearchBarOptions = {
25
25
  * - `clearText` - removes any text present in the search bar input field
26
26
  * - `cancelSearch` - cancel the search and close the search bar
27
27
  */
28
- ref?: React.Ref<HeaderSearchBarRef>;
28
+ ref?: React.Ref<HeaderSearchBarRef> | undefined;
29
29
  /**
30
30
  * The auto-capitalization behavior
31
31
  */
32
- autoCapitalize?: 'none' | 'words' | 'sentences' | 'characters' | 'systemDefault';
32
+ autoCapitalize?: 'none' | 'words' | 'sentences' | 'characters' | 'systemDefault' | undefined;
33
33
  /**
34
34
  * Automatically focuses search input on mount
35
35
  */
36
- autoFocus?: boolean;
36
+ autoFocus?: boolean | undefined;
37
37
  /**
38
38
  * The text to be used instead of default `Cancel` button text
39
39
  *
40
40
  * @platform ios
41
41
  */
42
- cancelButtonText?: string;
42
+ cancelButtonText?: string | undefined;
43
43
  /**
44
44
  * Sets type of the input. Defaults to `text`.
45
45
  */
46
- inputType?: 'text' | 'phone' | 'number' | 'email';
46
+ inputType?: 'text' | 'phone' | 'number' | 'email' | undefined;
47
47
  /**
48
48
  * Determines how the return key should look. Defaults to `search`.
49
49
  */
50
- enterKeyHint?: TextInputProps['enterKeyHint'];
50
+ enterKeyHint?: TextInputProps['enterKeyHint'] | undefined;
51
51
  /**
52
52
  * A callback that gets called when search input has lost focus
53
53
  */
54
- onBlur?: TextInputProps['onBlur'];
54
+ onBlur?: TextInputProps['onBlur'] | undefined;
55
55
  /**
56
56
  * A callback that gets called when the text changes.
57
57
  * It receives the current text value of the search input.
58
58
  */
59
- onChange?: TextInputProps['onChange'];
59
+ onChange?: TextInputProps['onChange'] | undefined;
60
60
  /**
61
61
  * Callback that is called when the submit button is pressed.
62
62
  * It receives the current text value of the search input.
63
63
  */
64
- onSubmitEditing?: TextInputProps['onSubmitEditing'];
64
+ onSubmitEditing?: TextInputProps['onSubmitEditing'] | undefined;
65
65
  /**
66
66
  * A callback that gets called when search input is opened
67
67
  */
68
- onOpen?: () => void;
68
+ onOpen?: (() => void) | undefined;
69
69
  /**
70
70
  * A callback that gets called when search input is closed
71
71
  */
72
- onClose?: () => void;
72
+ onClose?: (() => void) | undefined;
73
73
  /**
74
74
  * A callback that gets called when search input has received focus
75
75
  */
76
- onFocus?: TextInputProps['onFocus'];
76
+ onFocus?: TextInputProps['onFocus'] | undefined;
77
77
  /**
78
78
  * Text displayed when search field is empty
79
79
  */
80
- placeholder?: string;
80
+ placeholder?: string | undefined;
81
81
  };
82
82
  export type HeaderOptions = {
83
83
  /**
@@ -87,28 +87,28 @@ export type HeaderOptions = {
87
87
  * It receives `allowFontScaling`, `tintColor`, `style` and `children` in the options object as an argument.
88
88
  * The title string is passed in `children`.
89
89
  */
90
- headerTitle?: string | ((props: HeaderTitleProps) => React.ReactNode);
90
+ headerTitle?: string | ((props: HeaderTitleProps) => React.ReactNode) | undefined;
91
91
  /**
92
92
  * How to align the the header title.
93
93
  * Defaults to `center` on iOS and `left` on Android.
94
94
  */
95
- headerTitleAlign?: 'left' | 'center';
95
+ headerTitleAlign?: 'left' | 'center' | undefined;
96
96
  /**
97
97
  * Style object for the title component.
98
98
  */
99
- headerTitleStyle?: Animated.WithAnimatedValue<StyleProp<TextStyle>>;
99
+ headerTitleStyle?: Animated.WithAnimatedValue<StyleProp<TextStyle>> | undefined;
100
100
  /**
101
101
  * Style object for the container of the `headerTitle` element.
102
102
  */
103
- headerTitleContainerStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
103
+ headerTitleContainerStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>> | undefined;
104
104
  /**
105
105
  * Whether header title font should scale to respect Text Size accessibility settings. Defaults to `false`.
106
106
  */
107
- headerTitleAllowFontScaling?: boolean;
107
+ headerTitleAllowFontScaling?: boolean | undefined;
108
108
  /**
109
109
  * Options to render a search bar.
110
110
  */
111
- headerSearchBarOptions?: HeaderSearchBarOptions;
111
+ headerSearchBarOptions?: HeaderSearchBarOptions | undefined;
112
112
  /**
113
113
  * How the back button displays icon and title.
114
114
  *
@@ -119,25 +119,25 @@ export type HeaderOptions = {
119
119
  *
120
120
  * Defaults to "default" on iOS, and "minimal" on other platforms.
121
121
  */
122
- headerBackButtonDisplayMode?: HeaderBackButtonDisplayMode;
122
+ headerBackButtonDisplayMode?: HeaderBackButtonDisplayMode | undefined;
123
123
  /**
124
124
  * Style object for header back title. Supported properties:
125
125
  * - fontFamily
126
126
  * - fontSize
127
127
  */
128
128
  headerBackTitleStyle?: StyleProp<{
129
- fontFamily?: string;
130
- fontSize?: number;
131
- }>;
129
+ fontFamily?: string | undefined;
130
+ fontSize?: number | undefined;
131
+ }> | undefined;
132
132
  /**
133
133
  * Function which returns a React Element to display on the left side of the header.
134
134
  */
135
- headerLeft?: (props: HeaderBackButtonProps & {
135
+ headerLeft?: ((props: HeaderBackButtonProps & {
136
136
  /**
137
137
  * Whether it's possible to navigate back.
138
138
  */
139
- canGoBack?: boolean;
140
- }) => React.ReactNode;
139
+ canGoBack?: boolean | undefined;
140
+ }) => React.ReactNode) | undefined;
141
141
  /**
142
142
  * Whether the liquid glass background is visible for the item.
143
143
  *
@@ -146,20 +146,20 @@ export type HeaderOptions = {
146
146
  *
147
147
  * Defaults to `true`.
148
148
  */
149
- headerLeftBackgroundVisible?: boolean;
149
+ headerLeftBackgroundVisible?: boolean | undefined;
150
150
  /**
151
151
  * Style object for the container of the `headerLeft` element`.
152
152
  */
153
- headerLeftContainerStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
153
+ headerLeftContainerStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>> | undefined;
154
154
  /**
155
155
  * Function which returns a React Element to display on the right side of the header.
156
156
  */
157
- headerRight?: (props: {
158
- tintColor?: ColorValue;
159
- pressColor?: ColorValue;
160
- pressOpacity?: number;
157
+ headerRight?: ((props: {
158
+ tintColor?: ColorValue | undefined;
159
+ pressColor?: ColorValue | undefined;
160
+ pressOpacity?: number | undefined;
161
161
  canGoBack: boolean;
162
- }) => React.ReactNode;
162
+ }) => React.ReactNode) | undefined;
163
163
  /**
164
164
  * Whether the liquid glass background is visible for the item.
165
165
  *
@@ -168,41 +168,41 @@ export type HeaderOptions = {
168
168
  *
169
169
  * Defaults to `true`.
170
170
  */
171
- headerRightBackgroundVisible?: boolean;
171
+ headerRightBackgroundVisible?: boolean | undefined;
172
172
  /**
173
173
  * Style object for the container of the `headerRight` element.
174
174
  */
175
- headerRightContainerStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
175
+ headerRightContainerStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>> | undefined;
176
176
  /**
177
177
  * Color for material ripple (Android >= 5.0 only).
178
178
  */
179
- headerPressColor?: ColorValue;
179
+ headerPressColor?: ColorValue | undefined;
180
180
  /**
181
181
  * Color for material ripple (Android >= 5.0 only).
182
182
  */
183
- headerPressOpacity?: number;
183
+ headerPressOpacity?: number | undefined;
184
184
  /**
185
185
  * Tint color for the header.
186
186
  */
187
- headerTintColor?: ColorValue;
187
+ headerTintColor?: ColorValue | undefined;
188
188
  /**
189
189
  * Function which returns a React Element to render as the background of the header.
190
190
  * This is useful for using backgrounds such as an image, a gradient, blur effect etc.
191
191
  * You can use this with `headerTransparent` to render a blur view, for example, to create a translucent header.
192
192
  */
193
- headerBackground?: (props: {
193
+ headerBackground?: ((props: {
194
194
  style: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
195
- }) => React.ReactNode;
195
+ }) => React.ReactNode) | undefined;
196
196
  /**
197
197
  * Style object for the container of the `headerBackground` element.
198
198
  */
199
- headerBackgroundContainerStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
199
+ headerBackgroundContainerStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>> | undefined;
200
200
  /**
201
201
  * Defaults to `false`. If `true`, the header will not have a background unless you explicitly provide it with `headerBackground`.
202
202
  * The header will also float over the screen so that it overlaps the content underneath.
203
203
  * This is useful if you want to render a semi-transparent header or a blurred background.
204
204
  */
205
- headerTransparent?: boolean;
205
+ headerTransparent?: boolean | undefined;
206
206
  /**
207
207
  * Blur effect for the translucent header.
208
208
  * The `headerTransparent` option needs to be set to `true` for this to work.
@@ -211,11 +211,11 @@ export type HeaderOptions = {
211
211
  *
212
212
  * @platform web
213
213
  */
214
- headerBlurEffect?: BlurEffectType | 'none';
214
+ headerBlurEffect?: BlurEffectType | 'none' | undefined;
215
215
  /**
216
216
  * Style object for the header. You can specify a custom background color here, for example.
217
217
  */
218
- headerStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
218
+ headerStyle?: Animated.WithAnimatedValue<StyleProp<ViewStyle>> | undefined;
219
219
  /**
220
220
  * Whether to hide the elevation shadow (Android) or the bottom border (iOS) on the header.
221
221
  *
@@ -232,13 +232,13 @@ export type HeaderOptions = {
232
232
  * If the above styles are specified in `headerStyle` along with `headerShadowVisible: false`,
233
233
  * then `headerShadowVisible: false` will take precedence.
234
234
  */
235
- headerShadowVisible?: boolean;
235
+ headerShadowVisible?: boolean | undefined;
236
236
  /**
237
237
  * Extra padding to add at the top of header to account for translucent status bar.
238
238
  * By default, it uses the top value from the safe area insets of the device.
239
239
  * Pass 0 or a custom value to disable the default behaviour, and customize the height.
240
240
  */
241
- headerStatusBarHeight?: number;
241
+ headerStatusBarHeight?: number | undefined;
242
242
  };
243
243
  export type HeaderTitleProps = {
244
244
  /**
@@ -248,57 +248,57 @@ export type HeaderTitleProps = {
248
248
  /**
249
249
  * Whether title font should scale to respect Text Size accessibility settings.
250
250
  */
251
- allowFontScaling?: boolean;
251
+ allowFontScaling?: boolean | undefined;
252
252
  /**
253
253
  * Tint color for the header.
254
254
  */
255
- tintColor?: ColorValue;
255
+ tintColor?: ColorValue | undefined;
256
256
  /**
257
257
  * Callback to trigger when the size of the title element changes.
258
258
  */
259
- onLayout?: (e: LayoutChangeEvent) => void;
259
+ onLayout?: ((e: LayoutChangeEvent) => void) | undefined;
260
260
  /**
261
261
  * Style object for the title element.
262
262
  */
263
- style?: Animated.WithAnimatedValue<StyleProp<TextStyle>>;
263
+ style?: Animated.WithAnimatedValue<StyleProp<TextStyle>> | undefined;
264
264
  };
265
265
  export type HeaderButtonProps = {
266
266
  /**
267
267
  * Callback to call when the button is pressed.
268
268
  */
269
- onPress?: () => void;
269
+ onPress?: (() => void) | undefined;
270
270
  /**
271
271
  * The `href` to use for the anchor tag on web
272
272
  */
273
- href?: string;
273
+ href?: string | undefined;
274
274
  /**
275
275
  * Whether the button is disabled.
276
276
  */
277
- disabled?: boolean;
277
+ disabled?: boolean | undefined;
278
278
  /**
279
279
  * Accessibility label for the button for screen readers.
280
280
  */
281
- accessibilityLabel?: string;
281
+ accessibilityLabel?: string | undefined;
282
282
  /**
283
283
  * ID to locate this button in tests.
284
284
  */
285
- testID?: string;
285
+ testID?: string | undefined;
286
286
  /**
287
287
  * Tint color for the header button.
288
288
  */
289
- tintColor?: ColorValue;
289
+ tintColor?: ColorValue | undefined;
290
290
  /**
291
291
  * Color for material ripple (Android >= 5.0 only).
292
292
  */
293
- pressColor?: ColorValue;
293
+ pressColor?: ColorValue | undefined;
294
294
  /**
295
295
  * Opacity when the button is pressed, used when ripple is not supported.
296
296
  */
297
- pressOpacity?: number;
297
+ pressOpacity?: number | undefined;
298
298
  /**
299
299
  * Style object for the button.
300
300
  */
301
- style?: StyleProp<ViewStyle>;
301
+ style?: StyleProp<ViewStyle> | undefined;
302
302
  /**
303
303
  * Content to render for the button. Usually the icon.
304
304
  */
@@ -329,16 +329,16 @@ export type HeaderBackButtonProps = Omit<HeaderButtonProps, 'children'> & {
329
329
  */
330
330
  icon?: HeaderIcon | ((props: {
331
331
  tintColor: ColorValue | undefined;
332
- }) => React.ReactNode);
332
+ }) => React.ReactNode) | undefined;
333
333
  /**
334
334
  * Label text for the button. Usually the title of the previous screen.
335
335
  * By default, this is only shown on iOS.
336
336
  */
337
- label?: string;
337
+ label?: string | undefined;
338
338
  /**
339
339
  * Label text to show when there isn't enough space for the full label.
340
340
  */
341
- truncatedLabel?: string;
341
+ truncatedLabel?: string | undefined;
342
342
  /**
343
343
  * How the back button displays icon and title.
344
344
  *
@@ -349,14 +349,14 @@ export type HeaderBackButtonProps = Omit<HeaderButtonProps, 'children'> & {
349
349
  *
350
350
  * Defaults to "default" on iOS, and "minimal" on other platforms.
351
351
  */
352
- displayMode?: HeaderBackButtonDisplayMode;
352
+ displayMode?: HeaderBackButtonDisplayMode | undefined;
353
353
  /**
354
354
  * Style object for the label.
355
355
  */
356
- labelStyle?: Animated.WithAnimatedValue<StyleProp<TextStyle>>;
356
+ labelStyle?: Animated.WithAnimatedValue<StyleProp<TextStyle>> | undefined;
357
357
  /**
358
358
  * Whether label font should scale to respect Text Size accessibility settings.
359
359
  */
360
- allowFontScaling?: boolean;
360
+ allowFontScaling?: boolean | undefined;
361
361
  };
362
362
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAC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GAAG,SAAS,CAAC;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IACzC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,UAAU,GAClB;IACE,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,mBAAmB,CAAC;CAC7B,GACD;IACE,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC7B,GACD,CAAC;IACC,IAAI,EAAE,gBAAgB,CAAC;CACxB,GAAG,IAAI,CAAC,mBAAmB,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC;AAElE,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,GAAG;IACxE;;;;;;;;;;;;OAYG;IACH,IAAI,CAAC,EACD,UAAU,GACV,CAAC,CAAC,KAAK,EAAE;QAAE,SAAS,EAAE,UAAU,GAAG,SAAS,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC,GACnE,SAAS,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,2BAA2B,GAAG,SAAS,CAAC;IACtD;;OAEG;IACH,UAAU,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,GAAG,SAAS,CAAC;IAC1E;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACxC,CAAC"}
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": "3.0.0-alpha.12",
4
+ "version": "3.0.0-alpha.13",
5
5
  "keywords": [
6
6
  "react-native",
7
7
  "react-navigation",
@@ -54,21 +54,21 @@
54
54
  "devDependencies": {
55
55
  "@callstack/liquid-glass": "^0.6.0",
56
56
  "@jest/globals": "^30.0.0",
57
- "@react-navigation/native": "^8.0.0-alpha.11",
58
- "@testing-library/react-native": "^13.2.1",
59
- "@types/react": "~19.1.10",
57
+ "@react-navigation/native": "^8.0.0-alpha.12",
58
+ "@testing-library/react-native": "^13.3.3",
59
+ "@types/react": "~19.2.2",
60
60
  "@types/use-sync-external-store": "^1.5.0",
61
61
  "del-cli": "^6.0.0",
62
- "react": "19.1.0",
63
- "react-native": "0.81.4",
62
+ "react": "19.2.0",
63
+ "react-native": "0.83.2",
64
64
  "react-native-builder-bob": "^0.40.12",
65
- "react-native-screens": "^4.21.0",
66
- "react-test-renderer": "19.1.0",
65
+ "react-native-screens": "^4.24.0",
66
+ "react-test-renderer": "19.2.0",
67
67
  "typescript": "^5.9.2"
68
68
  },
69
69
  "peerDependencies": {
70
70
  "@callstack/liquid-glass": ">= 0.6.0",
71
- "@react-navigation/native": "^8.0.0-alpha.11",
71
+ "@react-navigation/native": "^8.0.0-alpha.12",
72
72
  "react": ">= 19.0.0",
73
73
  "react-native": "*",
74
74
  "react-native-safe-area-context": ">= 5.5.0",
@@ -92,5 +92,5 @@
92
92
  ]
93
93
  ]
94
94
  },
95
- "gitHead": "5d08a615905bbdaf8feba748bd83828d3eea5fdf"
95
+ "gitHead": "4ac6c41c1f751fba9dd82db050865bc71f3310f5"
96
96
  }
@@ -0,0 +1,90 @@
1
+ import { Activity, useEffect, useState } from 'react';
2
+ import {
3
+ type HostComponent,
4
+ NativeComponentRegistry,
5
+ type ViewProps,
6
+ } from 'react-native';
7
+
8
+ // eslint-disable-next-line import-x/extensions
9
+ import type { Props } from './ActivityView.tsx';
10
+ import { Container } from './Container';
11
+
12
+ export function ActivityView({
13
+ mode,
14
+ visible,
15
+ delay = 500,
16
+ style,
17
+ children,
18
+ }: Props) {
19
+ const [delayedMode, setDelayedMode] = useState(mode);
20
+
21
+ useEffect(() => {
22
+ if (!delay) {
23
+ return;
24
+ }
25
+
26
+ const timer = setTimeout(() => {
27
+ setDelayedMode(mode);
28
+ }, delay);
29
+
30
+ return () => clearTimeout(timer);
31
+ }, [delay, mode]);
32
+
33
+ const display = visible ? 'flex' : 'none';
34
+ const activityMode =
35
+ mode !== 'paused' || (delay && delayedMode !== 'paused')
36
+ ? 'visible'
37
+ : 'hidden';
38
+
39
+ return (
40
+ <Activity mode={activityMode}>
41
+ <ActivityContentView style={{ display: 'contents' }}>
42
+ <Container
43
+ inert={mode !== 'normal'}
44
+ style={{
45
+ ...style,
46
+ /**
47
+ * The visibility of the nested view is controlled by `Activity`
48
+ * It'll be overridden to `display: 'none'` when `mode="hidden"` regardless of what we set
49
+ * So we set the visibility on another view instead
50
+ */
51
+ display,
52
+ }}
53
+ >
54
+ {children}
55
+ </Container>
56
+ </ActivityContentView>
57
+ </Activity>
58
+ );
59
+ }
60
+
61
+ const STYLE: Record<string, true | { process?: (arg1: any) => any }> = {
62
+ display: {
63
+ /**
64
+ * React `Activity` sets `display: 'none'` when `mode="hidden"` to unmount effects
65
+ * But we want to keep the content visible, so we switch it to `display: 'contents'`
66
+ */
67
+ process: () => 'contents',
68
+ },
69
+ };
70
+
71
+ const VIEW_CONFIG = {
72
+ uiViewClassName: 'RCTView',
73
+ validAttributes: {
74
+ style: STYLE,
75
+ },
76
+ };
77
+
78
+ type ActivityContentViewProps = Omit<ViewProps, 'style'> & {
79
+ style?:
80
+ | {
81
+ display?: 'contents' | undefined;
82
+ }
83
+ | undefined;
84
+ };
85
+
86
+ const ActivityContentView: HostComponent<ActivityContentViewProps> =
87
+ NativeComponentRegistry.get<ActivityContentViewProps>(
88
+ 'ReactNavigationActivityContentView',
89
+ () => VIEW_CONFIG
90
+ );