@react-navigation/elements 2.9.5 → 3.0.0-alpha.1
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/lib/module/Badge.js +2 -2
- package/lib/module/Badge.js.map +1 -1
- package/lib/module/BlurEffectBackground.js +59 -0
- package/lib/module/BlurEffectBackground.js.map +1 -0
- package/lib/module/Button.js +7 -6
- package/lib/module/Button.js.map +1 -1
- package/lib/module/Color.js +11 -0
- package/lib/module/Color.js.map +1 -0
- package/lib/module/Container.js +42 -0
- package/lib/module/Container.js.map +1 -0
- package/lib/module/Header/Header.js +156 -97
- package/lib/module/Header/Header.js.map +1 -1
- package/lib/module/Header/HeaderBackButton.js +130 -121
- package/lib/module/Header/HeaderBackButton.js.map +1 -1
- package/lib/module/Header/HeaderBackground.js +10 -17
- package/lib/module/Header/HeaderBackground.js.map +1 -1
- package/lib/module/Header/HeaderButton.js +6 -2
- package/lib/module/Header/HeaderButton.js.map +1 -1
- package/lib/module/Header/HeaderButtonBackground.js +34 -0
- package/lib/module/Header/HeaderButtonBackground.js.map +1 -0
- package/lib/module/Header/HeaderSearchBar.js +174 -123
- package/lib/module/Header/HeaderSearchBar.js.map +1 -1
- package/lib/module/Header/HeaderTitle.js.map +1 -1
- package/lib/module/Header/getDefaultHeaderHeight.js +22 -10
- package/lib/module/Header/getDefaultHeaderHeight.js.map +1 -1
- package/lib/module/Label/Label.js.map +1 -1
- package/lib/module/LiquidGlassView.ios.js +21 -0
- package/lib/module/LiquidGlassView.ios.js.map +1 -0
- package/lib/module/LiquidGlassView.js +13 -0
- package/lib/module/LiquidGlassView.js.map +1 -0
- package/lib/module/MissingIcon.js +1 -0
- package/lib/module/MissingIcon.js.map +1 -1
- package/lib/module/PlatformColor.js +9 -0
- package/lib/module/PlatformColor.js.map +1 -0
- package/lib/module/PlatformColor.native.js +4 -0
- package/lib/module/PlatformColor.native.js.map +1 -0
- package/lib/module/PlatformPressable.js.map +1 -1
- package/lib/module/Screen.js +29 -23
- package/lib/module/Screen.js.map +1 -1
- package/lib/module/assets/back-icon.ios.svg +4 -0
- package/lib/module/assets/back-icon@1x.ios.png +0 -0
- package/lib/module/assets/back-icon@2x.ios.png +0 -0
- package/lib/module/assets/back-icon@3x.ios.png +0 -0
- package/lib/module/assets/back-icon@4x.ios.png +0 -0
- package/lib/module/assets/search-icon-legacy.png +0 -0
- package/lib/module/assets/search-icon-legacy@1x.ios.png +0 -0
- package/lib/module/assets/search-icon-legacy@2x.ios.png +0 -0
- package/lib/module/assets/search-icon-legacy@3x.ios.png +0 -0
- package/lib/module/assets/search-icon-legacy@4x.ios.png +0 -0
- package/lib/module/assets/search-icon.ios.svg +4 -0
- package/lib/module/assets/search-icon@1x.ios.png +0 -0
- package/lib/module/assets/search-icon@2x.ios.png +0 -0
- package/lib/module/assets/search-icon@3x.ios.png +0 -0
- package/lib/module/assets/search-icon@4x.ios.png +0 -0
- package/lib/module/getBlurBackgroundColor.js +48 -0
- package/lib/module/getBlurBackgroundColor.js.map +1 -0
- package/lib/module/index.js +2 -8
- package/lib/module/index.js.map +1 -1
- package/lib/module/internal.js +10 -0
- package/lib/module/internal.js.map +1 -0
- package/lib/module/useFrameSize.js +4 -4
- package/lib/module/useFrameSize.js.map +1 -1
- package/lib/typescript/src/Badge.d.ts.map +1 -1
- package/lib/typescript/src/BlurEffectBackground.d.ts +16 -0
- package/lib/typescript/src/BlurEffectBackground.d.ts.map +1 -0
- package/lib/typescript/src/Button.d.ts +5 -4
- package/lib/typescript/src/Button.d.ts.map +1 -1
- package/lib/typescript/src/Color.d.ts +13 -0
- package/lib/typescript/src/Color.d.ts.map +1 -0
- package/lib/typescript/src/Container.d.ts +8 -0
- package/lib/typescript/src/Container.d.ts.map +1 -0
- package/lib/typescript/src/Header/Header.d.ts +1 -5
- package/lib/typescript/src/Header/Header.d.ts.map +1 -1
- package/lib/typescript/src/Header/HeaderBackButton.d.ts +1 -1
- package/lib/typescript/src/Header/HeaderBackButton.d.ts.map +1 -1
- package/lib/typescript/src/Header/HeaderBackground.d.ts +5 -3
- package/lib/typescript/src/Header/HeaderBackground.d.ts.map +1 -1
- package/lib/typescript/src/Header/HeaderButton.d.ts +2 -0
- package/lib/typescript/src/Header/HeaderButton.d.ts.map +1 -1
- package/lib/typescript/src/Header/HeaderButtonBackground.d.ts +7 -0
- package/lib/typescript/src/Header/HeaderButtonBackground.d.ts.map +1 -0
- package/lib/typescript/src/Header/HeaderSearchBar.d.ts +5 -2
- package/lib/typescript/src/Header/HeaderSearchBar.d.ts.map +1 -1
- package/lib/typescript/src/Header/HeaderTitle.d.ts +2 -2
- package/lib/typescript/src/Header/HeaderTitle.d.ts.map +1 -1
- package/lib/typescript/src/Header/getDefaultHeaderHeight.d.ts +5 -2
- package/lib/typescript/src/Header/getDefaultHeaderHeight.d.ts.map +1 -1
- package/lib/typescript/src/Label/Label.d.ts +2 -2
- package/lib/typescript/src/Label/Label.d.ts.map +1 -1
- package/lib/typescript/src/LiquidGlassView.d.ts +9 -0
- package/lib/typescript/src/LiquidGlassView.d.ts.map +1 -0
- package/lib/typescript/src/LiquidGlassView.ios.d.ts +5 -0
- package/lib/typescript/src/LiquidGlassView.ios.d.ts.map +1 -0
- package/lib/typescript/src/MissingIcon.d.ts +2 -2
- package/lib/typescript/src/MissingIcon.d.ts.map +1 -1
- package/lib/typescript/src/PlatformColor.d.ts +7 -0
- package/lib/typescript/src/PlatformColor.d.ts.map +1 -0
- package/lib/typescript/src/PlatformColor.native.d.ts +2 -0
- package/lib/typescript/src/PlatformColor.native.d.ts.map +1 -0
- package/lib/typescript/src/PlatformPressable.d.ts +3 -3
- package/lib/typescript/src/PlatformPressable.d.ts.map +1 -1
- package/lib/typescript/src/Screen.d.ts.map +1 -1
- package/lib/typescript/src/getBlurBackgroundColor.d.ts +7 -0
- package/lib/typescript/src/getBlurBackgroundColor.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +0 -6
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/internal.d.ts +8 -0
- package/lib/typescript/src/internal.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +47 -31
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/package.json +19 -17
- package/src/Badge.tsx +3 -2
- package/src/BlurEffectBackground.tsx +90 -0
- package/src/Button.tsx +33 -21
- package/src/Color.tsx +21 -0
- package/src/Container.tsx +44 -0
- package/src/Header/Header.tsx +230 -156
- package/src/Header/HeaderBackButton.tsx +194 -168
- package/src/Header/HeaderBackground.tsx +17 -19
- package/src/Header/HeaderButton.tsx +7 -2
- package/src/Header/HeaderButtonBackground.tsx +35 -0
- package/src/Header/HeaderSearchBar.tsx +227 -129
- package/src/Header/HeaderTitle.tsx +2 -1
- package/src/Header/getDefaultHeaderHeight.tsx +29 -18
- package/src/Label/Label.tsx +2 -1
- package/src/LiquidGlassView.ios.tsx +39 -0
- package/src/LiquidGlassView.tsx +20 -0
- package/src/MissingIcon.tsx +12 -3
- package/src/PlatformColor.native.tsx +1 -0
- package/src/PlatformColor.tsx +8 -0
- package/src/PlatformPressable.tsx +2 -1
- package/src/Screen.tsx +24 -25
- package/src/assets/back-icon.ios.svg +4 -0
- package/src/assets/back-icon@1x.ios.png +0 -0
- package/src/assets/back-icon@2x.ios.png +0 -0
- package/src/assets/back-icon@3x.ios.png +0 -0
- package/src/assets/back-icon@4x.ios.png +0 -0
- package/src/assets/search-icon-legacy.png +0 -0
- package/src/assets/search-icon-legacy@1x.ios.png +0 -0
- package/src/assets/search-icon-legacy@2x.ios.png +0 -0
- package/src/assets/search-icon-legacy@3x.ios.png +0 -0
- package/src/assets/search-icon-legacy@4x.ios.png +0 -0
- package/src/assets/search-icon.ios.svg +4 -0
- package/src/assets/search-icon@1x.ios.png +0 -0
- package/src/assets/search-icon@2x.ios.png +0 -0
- package/src/assets/search-icon@3x.ios.png +0 -0
- package/src/assets/search-icon@4x.ios.png +0 -0
- package/src/getBlurBackgroundColor.tsx +68 -0
- package/src/index.tsx +2 -8
- package/src/internal.tsx +7 -0
- package/src/types.tsx +50 -32
- package/src/useFrameSize.tsx +4 -4
- package/lib/module/Background.js +0 -22
- package/lib/module/Background.js.map +0 -1
- package/lib/module/MaskedView.android.js +0 -4
- package/lib/module/MaskedView.android.js.map +0 -1
- package/lib/module/MaskedView.ios.js +0 -4
- package/lib/module/MaskedView.ios.js.map +0 -1
- package/lib/module/MaskedView.js +0 -12
- package/lib/module/MaskedView.js.map +0 -1
- package/lib/module/MaskedViewNative.js +0 -30
- package/lib/module/MaskedViewNative.js.map +0 -1
- package/lib/module/ResourceSavingView.js +0 -57
- package/lib/module/ResourceSavingView.js.map +0 -1
- package/lib/module/assets/back-icon-mask.png +0 -0
- package/lib/typescript/src/Background.d.ts +0 -9
- package/lib/typescript/src/Background.d.ts.map +0 -1
- package/lib/typescript/src/MaskedView.android.d.ts +0 -2
- package/lib/typescript/src/MaskedView.android.d.ts.map +0 -1
- package/lib/typescript/src/MaskedView.d.ts +0 -11
- package/lib/typescript/src/MaskedView.d.ts.map +0 -1
- package/lib/typescript/src/MaskedView.ios.d.ts +0 -2
- package/lib/typescript/src/MaskedView.ios.d.ts.map +0 -1
- package/lib/typescript/src/MaskedViewNative.d.ts +0 -11
- package/lib/typescript/src/MaskedViewNative.d.ts.map +0 -1
- package/lib/typescript/src/ResourceSavingView.d.ts +0 -10
- package/lib/typescript/src/ResourceSavingView.d.ts.map +0 -1
- package/src/Background.tsx +0 -24
- package/src/MaskedView.android.tsx +0 -1
- package/src/MaskedView.ios.tsx +0 -1
- package/src/MaskedView.tsx +0 -13
- package/src/MaskedViewNative.tsx +0 -33
- package/src/ResourceSavingView.tsx +0 -76
- package/src/assets/back-icon-mask.png +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Background.d.ts","sourceRoot":"","sources":["../../../src/Background.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,QAAQ,EACR,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,KAAK,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,GAAG;IACtC,KAAK,CAAC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IACzD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,2CASnD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MaskedView.android.d.ts","sourceRoot":"","sources":["../../../src/MaskedView.android.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Use a stub for MaskedView on all Platforms that don't support it.
|
|
3
|
-
*/
|
|
4
|
-
import type * as React from 'react';
|
|
5
|
-
type Props = {
|
|
6
|
-
maskElement: React.ReactElement;
|
|
7
|
-
children: React.ReactElement;
|
|
8
|
-
};
|
|
9
|
-
export declare function MaskedView({ children }: Props): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=MaskedView.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MaskedView.d.ts","sourceRoot":"","sources":["../../../src/MaskedView.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,KAAK,KAAK,GAAG;IACX,WAAW,EAAE,KAAK,CAAC,YAAY,CAAC;IAChC,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;CAC9B,CAAC;AAEF,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,0EAE7C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MaskedView.ios.d.ts","sourceRoot":"","sources":["../../../src/MaskedView.ios.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The native MaskedView that we explicitly re-export for supported platforms: Android, iOS.
|
|
3
|
-
*/
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
type MaskedViewType = typeof import('@react-native-masked-view/masked-view').default;
|
|
6
|
-
type Props = React.ComponentProps<MaskedViewType> & {
|
|
7
|
-
children: React.ReactElement;
|
|
8
|
-
};
|
|
9
|
-
export declare function MaskedView({ children, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=MaskedViewNative.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MaskedViewNative.d.ts","sourceRoot":"","sources":["../../../src/MaskedViewNative.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,cAAc,GACjB,cAAc,uCAAuC,EAAE,OAAO,CAAC;AAEjE,KAAK,KAAK,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IAClD,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC;CAC9B,CAAC;AAeF,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,KAAK,2CAMtD"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
3
|
-
type Props = {
|
|
4
|
-
visible: boolean;
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
style?: StyleProp<ViewStyle>;
|
|
7
|
-
};
|
|
8
|
-
export declare function ResourceSavingView({ visible, children, style, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=ResourceSavingView.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ResourceSavingView.d.ts","sourceRoot":"","sources":["../../../src/ResourceSavingView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,KAAK,SAAS,EAGd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAIF,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,QAAQ,EACR,KAAK,EACL,GAAG,IAAI,EACR,EAAE,KAAK,2CAuCP"}
|
package/src/Background.tsx
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { useTheme } from '@react-navigation/native';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
Animated,
|
|
5
|
-
type StyleProp,
|
|
6
|
-
type ViewProps,
|
|
7
|
-
type ViewStyle,
|
|
8
|
-
} from 'react-native';
|
|
9
|
-
|
|
10
|
-
type Props = Omit<ViewProps, 'style'> & {
|
|
11
|
-
style?: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export function Background({ style, ...rest }: Props) {
|
|
16
|
-
const { colors } = useTheme();
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<Animated.View
|
|
20
|
-
{...rest}
|
|
21
|
-
style={[{ flex: 1, backgroundColor: colors.background }, style]}
|
|
22
|
-
/>
|
|
23
|
-
);
|
|
24
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { MaskedView } from './MaskedViewNative';
|
package/src/MaskedView.ios.tsx
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { MaskedView } from './MaskedViewNative';
|
package/src/MaskedView.tsx
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Use a stub for MaskedView on all Platforms that don't support it.
|
|
3
|
-
*/
|
|
4
|
-
import type * as React from 'react';
|
|
5
|
-
|
|
6
|
-
type Props = {
|
|
7
|
-
maskElement: React.ReactElement;
|
|
8
|
-
children: React.ReactElement;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export function MaskedView({ children }: Props) {
|
|
12
|
-
return children;
|
|
13
|
-
}
|
package/src/MaskedViewNative.tsx
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The native MaskedView that we explicitly re-export for supported platforms: Android, iOS.
|
|
3
|
-
*/
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import { UIManager } from 'react-native';
|
|
6
|
-
|
|
7
|
-
type MaskedViewType =
|
|
8
|
-
typeof import('@react-native-masked-view/masked-view').default;
|
|
9
|
-
|
|
10
|
-
type Props = React.ComponentProps<MaskedViewType> & {
|
|
11
|
-
children: React.ReactElement;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
let RNCMaskedView: MaskedViewType | undefined;
|
|
15
|
-
|
|
16
|
-
try {
|
|
17
|
-
// Add try/catch to support usage even if it's not installed, since it's optional.
|
|
18
|
-
// Newer versions of Metro will handle it properly.
|
|
19
|
-
RNCMaskedView = require('@react-native-masked-view/masked-view').default;
|
|
20
|
-
} catch (e) {
|
|
21
|
-
// Ignore
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const isMaskedViewAvailable =
|
|
25
|
-
UIManager.getViewManagerConfig('RNCMaskedView') != null;
|
|
26
|
-
|
|
27
|
-
export function MaskedView({ children, ...rest }: Props) {
|
|
28
|
-
if (isMaskedViewAvailable && RNCMaskedView) {
|
|
29
|
-
return <RNCMaskedView {...rest}>{children}</RNCMaskedView>;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return children;
|
|
33
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
Platform,
|
|
4
|
-
type StyleProp,
|
|
5
|
-
StyleSheet,
|
|
6
|
-
View,
|
|
7
|
-
type ViewStyle,
|
|
8
|
-
} from 'react-native';
|
|
9
|
-
|
|
10
|
-
type Props = {
|
|
11
|
-
visible: boolean;
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
style?: StyleProp<ViewStyle>;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const FAR_FAR_AWAY = 30000; // this should be big enough to move the whole view out of its container
|
|
17
|
-
|
|
18
|
-
export function ResourceSavingView({
|
|
19
|
-
visible,
|
|
20
|
-
children,
|
|
21
|
-
style,
|
|
22
|
-
...rest
|
|
23
|
-
}: Props) {
|
|
24
|
-
if (Platform.OS === 'web') {
|
|
25
|
-
return (
|
|
26
|
-
<View
|
|
27
|
-
// @ts-expect-error: hidden exists on web, but not in React Native
|
|
28
|
-
hidden={!visible}
|
|
29
|
-
style={[
|
|
30
|
-
{ display: visible ? 'flex' : 'none' },
|
|
31
|
-
styles.container,
|
|
32
|
-
style,
|
|
33
|
-
]}
|
|
34
|
-
pointerEvents={visible ? 'auto' : 'none'}
|
|
35
|
-
{...rest}
|
|
36
|
-
>
|
|
37
|
-
{children}
|
|
38
|
-
</View>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
return (
|
|
43
|
-
<View
|
|
44
|
-
style={[styles.container, style]}
|
|
45
|
-
// box-none doesn't seem to work properly on Android
|
|
46
|
-
pointerEvents={visible ? 'auto' : 'none'}
|
|
47
|
-
>
|
|
48
|
-
<View
|
|
49
|
-
collapsable={false}
|
|
50
|
-
removeClippedSubviews={
|
|
51
|
-
// On iOS & macOS, set removeClippedSubviews to true only when not focused
|
|
52
|
-
// This is an workaround for a bug where the clipped view never re-appears
|
|
53
|
-
Platform.OS === 'ios' || Platform.OS === 'macos' ? !visible : true
|
|
54
|
-
}
|
|
55
|
-
pointerEvents={visible ? 'auto' : 'none'}
|
|
56
|
-
style={visible ? styles.attached : styles.detached}
|
|
57
|
-
>
|
|
58
|
-
{children}
|
|
59
|
-
</View>
|
|
60
|
-
</View>
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const styles = StyleSheet.create({
|
|
65
|
-
container: {
|
|
66
|
-
flex: 1,
|
|
67
|
-
overflow: 'hidden',
|
|
68
|
-
},
|
|
69
|
-
attached: {
|
|
70
|
-
flex: 1,
|
|
71
|
-
},
|
|
72
|
-
detached: {
|
|
73
|
-
flex: 1,
|
|
74
|
-
top: FAR_FAR_AWAY,
|
|
75
|
-
},
|
|
76
|
-
});
|
|
Binary file
|