ncore-react-native-sheet 1.0.0-alpha.0
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/LICENSE +21 -0
- package/README.md +7 -0
- package/lib/commonjs/constants.js +10 -0
- package/lib/commonjs/constants.js.map +1 -0
- package/lib/commonjs/index.js +494 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/styles.js +53 -0
- package/lib/commonjs/styles.js.map +1 -0
- package/lib/commonjs/types.js +8 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/module/constants.js +6 -0
- package/lib/module/constants.js.map +1 -0
- package/lib/module/index.js +488 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/styles.js +49 -0
- package/lib/module/styles.js.map +1 -0
- package/lib/module/types.js +6 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/src/constants.d.ts +3 -0
- package/lib/typescript/src/constants.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +6 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/styles.d.ts +45 -0
- package/lib/typescript/src/styles.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +44 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/package.json +149 -0
- package/src/constants.ts +6 -0
- package/src/index.tsx +631 -0
- package/src/styles.ts +51 -0
- package/src/types.ts +54 -0
package/src/types.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ForwardRefRenderFunction,
|
|
3
|
+
ReactNode
|
|
4
|
+
} from "react";
|
|
5
|
+
import {
|
|
6
|
+
ScrollViewProps,
|
|
7
|
+
FlatListProps,
|
|
8
|
+
ViewStyle
|
|
9
|
+
} from "react-native";
|
|
10
|
+
|
|
11
|
+
export type SheetRef = {
|
|
12
|
+
close: () => void,
|
|
13
|
+
open: () => void
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export interface ISheetProps<T> {
|
|
17
|
+
scrollViewProps?: ScrollViewProps;
|
|
18
|
+
flatListProps?: FlatListProps<T>;
|
|
19
|
+
isCanFullScreenOnSnap?: boolean;
|
|
20
|
+
handler?: "inside" | "outside",
|
|
21
|
+
footerComponent?: ReactNode;
|
|
22
|
+
headerComponent?: ReactNode;
|
|
23
|
+
panGestureEnabled?: boolean;
|
|
24
|
+
onOverlayPress?: () => void;
|
|
25
|
+
backgroundColor?: string;
|
|
26
|
+
withFullScreen?: boolean;
|
|
27
|
+
contentStyle?: ViewStyle;
|
|
28
|
+
toSnapDuration?: number;
|
|
29
|
+
overlayStyle?: ViewStyle;
|
|
30
|
+
withSafeArea?: boolean;
|
|
31
|
+
closeDuration?: number;
|
|
32
|
+
handlerColor?: string;
|
|
33
|
+
openDuration?: number;
|
|
34
|
+
rootStyle?: ViewStyle;
|
|
35
|
+
onClosed?: () => void;
|
|
36
|
+
onOpened?: () => void;
|
|
37
|
+
autoHeight?: boolean;
|
|
38
|
+
children: ReactNode;
|
|
39
|
+
snapPoint?: number;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export interface RefForwardingComponent<T, P = {}> extends ForwardRefRenderFunction<T, P> {
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
type Dist = {
|
|
46
|
+
action: () => void,
|
|
47
|
+
value: number
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type DistsType = {
|
|
51
|
+
distToBottom: Dist;
|
|
52
|
+
distToSnap?: Dist;
|
|
53
|
+
distToTop: Dist;
|
|
54
|
+
}
|