@shaquillehinds/react-native-bottom-sheet 0.0.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/LICENSE +20 -0
- package/README.md +880 -0
- package/lib/commonjs/BottomSheet/animations/drag.animation.js +72 -0
- package/lib/commonjs/BottomSheet/animations/drag.animation.js.map +1 -0
- package/lib/commonjs/BottomSheet/components/BottomSheet.js +92 -0
- package/lib/commonjs/BottomSheet/components/BottomSheet.js.map +1 -0
- package/lib/commonjs/BottomSheet/components/BottomSheetFlatlist.js +38 -0
- package/lib/commonjs/BottomSheet/components/BottomSheetFlatlist.js.map +1 -0
- package/lib/commonjs/BottomSheet/components/BottomSheetModal.js +34 -0
- package/lib/commonjs/BottomSheet/components/BottomSheetModal.js.map +1 -0
- package/lib/commonjs/BottomSheet/components/BottomSheetScrollView.js +37 -0
- package/lib/commonjs/BottomSheet/components/BottomSheetScrollView.js.map +1 -0
- package/lib/commonjs/BottomSheet/config/bottomSheet.constants.js +35 -0
- package/lib/commonjs/BottomSheet/config/bottomSheet.constants.js.map +1 -0
- package/lib/commonjs/BottomSheet/config/bottomSheet.styles.js +42 -0
- package/lib/commonjs/BottomSheet/config/bottomSheet.styles.js.map +1 -0
- package/lib/commonjs/BottomSheet/config/bottomSheet.types.js +14 -0
- package/lib/commonjs/BottomSheet/config/bottomSheet.types.js.map +1 -0
- package/lib/commonjs/BottomSheet/controller/bottomFlatlist.controller.js +69 -0
- package/lib/commonjs/BottomSheet/controller/bottomFlatlist.controller.js.map +1 -0
- package/lib/commonjs/BottomSheet/controller/bottomScrollView.controller.js +41 -0
- package/lib/commonjs/BottomSheet/controller/bottomScrollView.controller.js.map +1 -0
- package/lib/commonjs/BottomSheet/controller/bottomSheet.controller.js +216 -0
- package/lib/commonjs/BottomSheet/controller/bottomSheet.controller.js.map +1 -0
- package/lib/commonjs/BottomSheet/controller/callbacks.controller.js +135 -0
- package/lib/commonjs/BottomSheet/controller/callbacks.controller.js.map +1 -0
- package/lib/commonjs/BottomSheet/controller/dragAnimation.controller.js +127 -0
- package/lib/commonjs/BottomSheet/controller/dragAnimation.controller.js.map +1 -0
- package/lib/commonjs/BottomSheet/controller/hooks/useBottomSheetRef.js +60 -0
- package/lib/commonjs/BottomSheet/controller/hooks/useBottomSheetRef.js.map +1 -0
- package/lib/commonjs/BottomSheet/controller/hooks/useBottomSheetUtils.js +74 -0
- package/lib/commonjs/BottomSheet/controller/hooks/useBottomSheetUtils.js.map +1 -0
- package/lib/commonjs/BottomSheet/controller/index.js +17 -0
- package/lib/commonjs/BottomSheet/controller/index.js.map +1 -0
- package/lib/commonjs/BottomSheet/controller/keyboardAnimation.controller.js +88 -0
- package/lib/commonjs/BottomSheet/controller/keyboardAnimation.controller.js.map +1 -0
- package/lib/commonjs/BottomSheet/controller/scrollContent.controller.js +89 -0
- package/lib/commonjs/BottomSheet/controller/scrollContent.controller.js.map +1 -0
- package/lib/commonjs/BottomSheet/index.js +130 -0
- package/lib/commonjs/BottomSheet/index.js.map +1 -0
- package/lib/commonjs/index.js +17 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/module/BottomSheet/animations/drag.animation.js +68 -0
- package/lib/module/BottomSheet/animations/drag.animation.js.map +1 -0
- package/lib/module/BottomSheet/components/BottomSheet.js +87 -0
- package/lib/module/BottomSheet/components/BottomSheet.js.map +1 -0
- package/lib/module/BottomSheet/components/BottomSheetFlatlist.js +32 -0
- package/lib/module/BottomSheet/components/BottomSheetFlatlist.js.map +1 -0
- package/lib/module/BottomSheet/components/BottomSheetModal.js +30 -0
- package/lib/module/BottomSheet/components/BottomSheetModal.js.map +1 -0
- package/lib/module/BottomSheet/components/BottomSheetScrollView.js +31 -0
- package/lib/module/BottomSheet/components/BottomSheetScrollView.js.map +1 -0
- package/lib/module/BottomSheet/config/bottomSheet.constants.js +30 -0
- package/lib/module/BottomSheet/config/bottomSheet.constants.js.map +1 -0
- package/lib/module/BottomSheet/config/bottomSheet.styles.js +38 -0
- package/lib/module/BottomSheet/config/bottomSheet.styles.js.map +1 -0
- package/lib/module/BottomSheet/config/bottomSheet.types.js +10 -0
- package/lib/module/BottomSheet/config/bottomSheet.types.js.map +1 -0
- package/lib/module/BottomSheet/controller/bottomFlatlist.controller.js +64 -0
- package/lib/module/BottomSheet/controller/bottomFlatlist.controller.js.map +1 -0
- package/lib/module/BottomSheet/controller/bottomScrollView.controller.js +37 -0
- package/lib/module/BottomSheet/controller/bottomScrollView.controller.js.map +1 -0
- package/lib/module/BottomSheet/controller/bottomSheet.controller.js +212 -0
- package/lib/module/BottomSheet/controller/bottomSheet.controller.js.map +1 -0
- package/lib/module/BottomSheet/controller/callbacks.controller.js +130 -0
- package/lib/module/BottomSheet/controller/callbacks.controller.js.map +1 -0
- package/lib/module/BottomSheet/controller/dragAnimation.controller.js +122 -0
- package/lib/module/BottomSheet/controller/dragAnimation.controller.js.map +1 -0
- package/lib/module/BottomSheet/controller/hooks/useBottomSheetRef.js +56 -0
- package/lib/module/BottomSheet/controller/hooks/useBottomSheetRef.js.map +1 -0
- package/lib/module/BottomSheet/controller/hooks/useBottomSheetUtils.js +70 -0
- package/lib/module/BottomSheet/controller/hooks/useBottomSheetUtils.js.map +1 -0
- package/lib/module/BottomSheet/controller/index.js +4 -0
- package/lib/module/BottomSheet/controller/index.js.map +1 -0
- package/lib/module/BottomSheet/controller/keyboardAnimation.controller.js +84 -0
- package/lib/module/BottomSheet/controller/keyboardAnimation.controller.js.map +1 -0
- package/lib/module/BottomSheet/controller/scrollContent.controller.js +84 -0
- package/lib/module/BottomSheet/controller/scrollContent.controller.js.map +1 -0
- package/lib/module/BottomSheet/index.js +112 -0
- package/lib/module/BottomSheet/index.js.map +1 -0
- package/lib/module/index.js +4 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/BottomSheet/animations/drag.animation.d.ts +31 -0
- package/lib/typescript/commonjs/src/BottomSheet/animations/drag.animation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BottomSheet/components/BottomSheet.d.ts +9 -0
- package/lib/typescript/commonjs/src/BottomSheet/components/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BottomSheet/components/BottomSheetFlatlist.d.ts +3 -0
- package/lib/typescript/commonjs/src/BottomSheet/components/BottomSheetFlatlist.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BottomSheet/components/BottomSheetModal.d.ts +8 -0
- package/lib/typescript/commonjs/src/BottomSheet/components/BottomSheetModal.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BottomSheet/components/BottomSheetScrollView.d.ts +3 -0
- package/lib/typescript/commonjs/src/BottomSheet/components/BottomSheetScrollView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BottomSheet/config/bottomSheet.constants.d.ts +30 -0
- package/lib/typescript/commonjs/src/BottomSheet/config/bottomSheet.constants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BottomSheet/config/bottomSheet.styles.d.ts +37 -0
- package/lib/typescript/commonjs/src/BottomSheet/config/bottomSheet.styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BottomSheet/config/bottomSheet.types.d.ts +185 -0
- package/lib/typescript/commonjs/src/BottomSheet/config/bottomSheet.types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BottomSheet/controller/bottomFlatlist.controller.d.ts +480 -0
- package/lib/typescript/commonjs/src/BottomSheet/controller/bottomFlatlist.controller.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BottomSheet/controller/bottomScrollView.controller.d.ts +338 -0
- package/lib/typescript/commonjs/src/BottomSheet/controller/bottomScrollView.controller.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BottomSheet/controller/bottomSheet.controller.d.ts +51 -0
- package/lib/typescript/commonjs/src/BottomSheet/controller/bottomSheet.controller.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BottomSheet/controller/callbacks.controller.d.ts +36 -0
- package/lib/typescript/commonjs/src/BottomSheet/controller/callbacks.controller.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BottomSheet/controller/dragAnimation.controller.d.ts +27 -0
- package/lib/typescript/commonjs/src/BottomSheet/controller/dragAnimation.controller.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BottomSheet/controller/hooks/useBottomSheetRef.d.ts +12 -0
- package/lib/typescript/commonjs/src/BottomSheet/controller/hooks/useBottomSheetRef.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BottomSheet/controller/hooks/useBottomSheetUtils.d.ts +40 -0
- package/lib/typescript/commonjs/src/BottomSheet/controller/hooks/useBottomSheetUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BottomSheet/controller/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/BottomSheet/controller/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BottomSheet/controller/keyboardAnimation.controller.d.ts +15 -0
- package/lib/typescript/commonjs/src/BottomSheet/controller/keyboardAnimation.controller.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BottomSheet/controller/scrollContent.controller.d.ts +20 -0
- package/lib/typescript/commonjs/src/BottomSheet/controller/scrollContent.controller.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BottomSheet/index.d.ts +23 -0
- package/lib/typescript/commonjs/src/BottomSheet/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/BottomSheet/animations/drag.animation.d.ts +31 -0
- package/lib/typescript/module/src/BottomSheet/animations/drag.animation.d.ts.map +1 -0
- package/lib/typescript/module/src/BottomSheet/components/BottomSheet.d.ts +9 -0
- package/lib/typescript/module/src/BottomSheet/components/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/module/src/BottomSheet/components/BottomSheetFlatlist.d.ts +3 -0
- package/lib/typescript/module/src/BottomSheet/components/BottomSheetFlatlist.d.ts.map +1 -0
- package/lib/typescript/module/src/BottomSheet/components/BottomSheetModal.d.ts +8 -0
- package/lib/typescript/module/src/BottomSheet/components/BottomSheetModal.d.ts.map +1 -0
- package/lib/typescript/module/src/BottomSheet/components/BottomSheetScrollView.d.ts +3 -0
- package/lib/typescript/module/src/BottomSheet/components/BottomSheetScrollView.d.ts.map +1 -0
- package/lib/typescript/module/src/BottomSheet/config/bottomSheet.constants.d.ts +30 -0
- package/lib/typescript/module/src/BottomSheet/config/bottomSheet.constants.d.ts.map +1 -0
- package/lib/typescript/module/src/BottomSheet/config/bottomSheet.styles.d.ts +37 -0
- package/lib/typescript/module/src/BottomSheet/config/bottomSheet.styles.d.ts.map +1 -0
- package/lib/typescript/module/src/BottomSheet/config/bottomSheet.types.d.ts +185 -0
- package/lib/typescript/module/src/BottomSheet/config/bottomSheet.types.d.ts.map +1 -0
- package/lib/typescript/module/src/BottomSheet/controller/bottomFlatlist.controller.d.ts +480 -0
- package/lib/typescript/module/src/BottomSheet/controller/bottomFlatlist.controller.d.ts.map +1 -0
- package/lib/typescript/module/src/BottomSheet/controller/bottomScrollView.controller.d.ts +338 -0
- package/lib/typescript/module/src/BottomSheet/controller/bottomScrollView.controller.d.ts.map +1 -0
- package/lib/typescript/module/src/BottomSheet/controller/bottomSheet.controller.d.ts +51 -0
- package/lib/typescript/module/src/BottomSheet/controller/bottomSheet.controller.d.ts.map +1 -0
- package/lib/typescript/module/src/BottomSheet/controller/callbacks.controller.d.ts +36 -0
- package/lib/typescript/module/src/BottomSheet/controller/callbacks.controller.d.ts.map +1 -0
- package/lib/typescript/module/src/BottomSheet/controller/dragAnimation.controller.d.ts +27 -0
- package/lib/typescript/module/src/BottomSheet/controller/dragAnimation.controller.d.ts.map +1 -0
- package/lib/typescript/module/src/BottomSheet/controller/hooks/useBottomSheetRef.d.ts +12 -0
- package/lib/typescript/module/src/BottomSheet/controller/hooks/useBottomSheetRef.d.ts.map +1 -0
- package/lib/typescript/module/src/BottomSheet/controller/hooks/useBottomSheetUtils.d.ts +40 -0
- package/lib/typescript/module/src/BottomSheet/controller/hooks/useBottomSheetUtils.d.ts.map +1 -0
- package/lib/typescript/module/src/BottomSheet/controller/index.d.ts +2 -0
- package/lib/typescript/module/src/BottomSheet/controller/index.d.ts.map +1 -0
- package/lib/typescript/module/src/BottomSheet/controller/keyboardAnimation.controller.d.ts +15 -0
- package/lib/typescript/module/src/BottomSheet/controller/keyboardAnimation.controller.d.ts.map +1 -0
- package/lib/typescript/module/src/BottomSheet/controller/scrollContent.controller.d.ts +20 -0
- package/lib/typescript/module/src/BottomSheet/controller/scrollContent.controller.d.ts.map +1 -0
- package/lib/typescript/module/src/BottomSheet/index.d.ts +23 -0
- package/lib/typescript/module/src/BottomSheet/index.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +2 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/package.json +203 -0
- package/src/BottomSheet/animations/drag.animation.ts +86 -0
- package/src/BottomSheet/components/BottomSheet.tsx +157 -0
- package/src/BottomSheet/components/BottomSheetFlatlist.tsx +46 -0
- package/src/BottomSheet/components/BottomSheetModal.tsx +47 -0
- package/src/BottomSheet/components/BottomSheetScrollView.tsx +46 -0
- package/src/BottomSheet/config/bottomSheet.constants.ts +31 -0
- package/src/BottomSheet/config/bottomSheet.styles.ts +42 -0
- package/src/BottomSheet/config/bottomSheet.types.ts +246 -0
- package/src/BottomSheet/controller/bottomFlatlist.controller.ts +87 -0
- package/src/BottomSheet/controller/bottomScrollView.controller.ts +43 -0
- package/src/BottomSheet/controller/bottomSheet.controller.ts +238 -0
- package/src/BottomSheet/controller/callbacks.controller.ts +222 -0
- package/src/BottomSheet/controller/dragAnimation.controller.ts +211 -0
- package/src/BottomSheet/controller/hooks/useBottomSheetRef.ts +73 -0
- package/src/BottomSheet/controller/hooks/useBottomSheetUtils.ts +75 -0
- package/src/BottomSheet/controller/index.ts +1 -0
- package/src/BottomSheet/controller/keyboardAnimation.controller.ts +148 -0
- package/src/BottomSheet/controller/scrollContent.controller.ts +120 -0
- package/src/BottomSheet/index.tsx +139 -0
- package/src/index.tsx +1 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type SharedValue } from 'react-native-reanimated';
|
|
2
|
+
import { type TextInput } from 'react-native';
|
|
3
|
+
type UseKeyboardAnimationProps = {
|
|
4
|
+
avoidKeyboard?: boolean;
|
|
5
|
+
screenHeight: number;
|
|
6
|
+
inputsForKeyboardToAvoid?: React.RefObject<TextInput>[];
|
|
7
|
+
keyboardHeight: SharedValue<number>;
|
|
8
|
+
translationY: SharedValue<number>;
|
|
9
|
+
prevTranslationY: SharedValue<number>;
|
|
10
|
+
modalContentTranslateY: SharedValue<number>;
|
|
11
|
+
setDisableLayoutAnimation: (bool: boolean) => void;
|
|
12
|
+
};
|
|
13
|
+
export declare function keyboardAnimationController(props: UseKeyboardAnimationProps): void;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=keyboardAnimation.controller.d.ts.map
|
package/lib/typescript/commonjs/src/BottomSheet/controller/keyboardAnimation.controller.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboardAnimation.controller.d.ts","sourceRoot":"","sources":["../../../../../../src/BottomSheet/controller/keyboardAnimation.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,KAAK,WAAW,EAAc,MAAM,yBAAyB,CAAC;AAKhF,OAAO,EAAsB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAQlE,KAAK,yBAAyB,GAAG;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,wBAAwB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC;IACxD,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACpC,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAClC,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC,sBAAsB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC5C,yBAAyB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACpD,CAAC;AAEF,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,yBAAyB,QA0H3E"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type SharedValue } from 'react-native-reanimated';
|
|
2
|
+
import type { GestureStateChangeEvent, GestureUpdateEvent, PanGestureHandlerEventPayload } from 'react-native-gesture-handler';
|
|
3
|
+
import type { ScrollComponentRef } from '../config/bottomSheet.types';
|
|
4
|
+
type ScrollContentControllerType = {
|
|
5
|
+
scrollY: SharedValue<number>;
|
|
6
|
+
maxScrollOffset: SharedValue<number>;
|
|
7
|
+
inverted: SharedValue<boolean>;
|
|
8
|
+
scrollActive: SharedValue<boolean>;
|
|
9
|
+
onDragStartGesture: (e: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => void;
|
|
10
|
+
onDragEndGesture: (e: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => void;
|
|
11
|
+
onDragGesture: (e: GestureUpdateEvent<PanGestureHandlerEventPayload>) => void;
|
|
12
|
+
scrollableComponentRef?: ScrollComponentRef;
|
|
13
|
+
};
|
|
14
|
+
export declare function scrollContentController({ scrollActive, scrollY, onDragStartGesture, onDragEndGesture, onDragGesture, maxScrollOffset, inverted, scrollableComponentRef, }: ScrollContentControllerType): {
|
|
15
|
+
onBeginScroll: (e: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => void;
|
|
16
|
+
onUpdateScroll: (e: GestureUpdateEvent<PanGestureHandlerEventPayload>) => void;
|
|
17
|
+
onEndScroll: (e: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => void;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=scrollContent.controller.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrollContent.controller.d.ts","sourceRoot":"","sources":["../../../../../../src/BottomSheet/controller/scrollContent.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,uBAAuB,EACvB,kBAAkB,EAClB,6BAA6B,EAC9B,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAGtE,KAAK,2BAA2B,GAAG;IACjC,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7B,eAAe,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACrC,QAAQ,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC/B,YAAY,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACnC,kBAAkB,EAAE,CAClB,CAAC,EAAE,uBAAuB,CAAC,6BAA6B,CAAC,KACtD,IAAI,CAAC;IACV,gBAAgB,EAAE,CAChB,CAAC,EAAE,uBAAuB,CAAC,6BAA6B,CAAC,KACtD,IAAI,CAAC;IACV,aAAa,EAAE,CAAC,CAAC,EAAE,kBAAkB,CAAC,6BAA6B,CAAC,KAAK,IAAI,CAAC;IAC9E,sBAAsB,CAAC,EAAE,kBAAkB,CAAC;CAC7C,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,EACtC,YAAY,EACZ,OAAO,EACP,kBAAkB,EAClB,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,QAAQ,EACR,sBAAsB,GACvB,EAAE,2BAA2B;;;;EAgF7B"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type BottomSheetProps, type BottomModalContextProps } from './config/bottomSheet.types';
|
|
2
|
+
import { BottomSheetFlatlist } from './components/BottomSheetFlatlist';
|
|
3
|
+
import { BottomSheetScrollView } from './components/BottomSheetScrollView';
|
|
4
|
+
export declare const BottomModalContext: import("react").Context<BottomModalContextProps | null>;
|
|
5
|
+
declare const BottomSheetModal: import("react").ForwardRefExoticComponent<{
|
|
6
|
+
BackdropComponent?: React.ReactNode;
|
|
7
|
+
onBackDropPress?: () => void;
|
|
8
|
+
disableCloseOnBackdropPress?: boolean;
|
|
9
|
+
} & BottomSheetProps & import("@shaquillehinds/react-native-essentials").ModalWrapperProps & {
|
|
10
|
+
children?: import("react").ReactNode | undefined;
|
|
11
|
+
} & import("react").RefAttributes<import("./config/bottomSheet.types").BottomModalRef>>;
|
|
12
|
+
declare const BottomSheet: import("react").ForwardRefExoticComponent<{
|
|
13
|
+
BackdropComponent?: React.ReactNode;
|
|
14
|
+
onBackDropPress?: () => void;
|
|
15
|
+
disableCloseOnBackdropPress?: boolean;
|
|
16
|
+
} & BottomSheetProps & import("@shaquillehinds/react-native-essentials").ModalWrapperProps & {
|
|
17
|
+
children?: import("react").ReactNode | undefined;
|
|
18
|
+
} & import("react").RefAttributes<import("./config/bottomSheet.types").BottomModalRef>>;
|
|
19
|
+
declare const useBottomSheetRef: () => {
|
|
20
|
+
modalRef: import("./config/bottomSheet.types").BottomModalRef | undefined;
|
|
21
|
+
};
|
|
22
|
+
export { BottomSheet, BottomSheetModal, BottomSheetFlatlist, BottomSheetScrollView, useBottomSheetRef, };
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/BottomSheet/index.tsx"],"names":[],"mappings":"AAOA,OAAO,EACL,KAAK,gBAAgB,EAIrB,KAAK,uBAAuB,EAC7B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAU3E,eAAO,MAAM,kBAAkB,yDAE9B,CAAC;AAEF,QAAA,MAAM,gBAAgB;;;;;;uFAyCrB,CAAC;AAaF,QAAA,MAAM,WAAW;;;;;;uFAyChB,CAAC;AAEF,QAAA,MAAM,iBAAiB;;CAGtB,CAAC;AAEF,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,GAClB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type SharedValue } from 'react-native-reanimated';
|
|
2
|
+
export type OnMoveAnimationProps = {
|
|
3
|
+
posX: number;
|
|
4
|
+
posY: number;
|
|
5
|
+
minPosY: number;
|
|
6
|
+
maxPosY: number;
|
|
7
|
+
};
|
|
8
|
+
export type OnDragAnimationProps = {
|
|
9
|
+
translationX?: SharedValue<number>;
|
|
10
|
+
translationY?: SharedValue<number>;
|
|
11
|
+
prevTranslationX?: SharedValue<number>;
|
|
12
|
+
prevTranslationY?: SharedValue<number>;
|
|
13
|
+
};
|
|
14
|
+
export declare function useDragAnimation(props?: OnDragAnimationProps): {
|
|
15
|
+
onDrag: (dragProps: OnMoveAnimationProps) => void;
|
|
16
|
+
onDragStart: () => void;
|
|
17
|
+
dragAnimatedStyle: {
|
|
18
|
+
transform: ({
|
|
19
|
+
translateX: number;
|
|
20
|
+
translateY?: undefined;
|
|
21
|
+
} | {
|
|
22
|
+
translateY: number;
|
|
23
|
+
translateX?: undefined;
|
|
24
|
+
})[];
|
|
25
|
+
};
|
|
26
|
+
translationX: SharedValue<number>;
|
|
27
|
+
translationY: SharedValue<number>;
|
|
28
|
+
prevTranslationX: SharedValue<number>;
|
|
29
|
+
prevTranslationY: SharedValue<number>;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=drag.animation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drag.animation.d.ts","sourceRoot":"","sources":["../../../../../../src/BottomSheet/animations/drag.animation.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AA+BjC,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACvC,gBAAgB,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACxC,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,KAAK,CAAC,EAAE,oBAAoB;wBAkBpB,oBAAoB;;;;;;;;;;;;;;;EAiB5D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type BottomSheetControllerReturn } from '../controller/bottomSheet.controller';
|
|
2
|
+
import { type BottomSheetContextProps, type BottomSheetProps } from '../config/bottomSheet.types';
|
|
3
|
+
export declare const BottomSheetContext: import("react").Context<BottomSheetContextProps | null>;
|
|
4
|
+
export declare const BottomSheet: import("react").ForwardRefExoticComponent<BottomSheetProps & {
|
|
5
|
+
children?: import("react").ReactNode | undefined;
|
|
6
|
+
} & {
|
|
7
|
+
controller: BottomSheetControllerReturn;
|
|
8
|
+
} & import("react").RefAttributes<import("../config/bottomSheet.types").BottomSheetRef>>;
|
|
9
|
+
//# sourceMappingURL=BottomSheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../../../../src/BottomSheet/components/BottomSheet.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACxF,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EAEtB,MAAM,6BAA6B,CAAC;AAOrC,eAAO,MAAM,kBAAkB,yDAE9B,CAAC;AAEF,eAAO,MAAM,WAAW;;;gBAGN,2BAA2B;wFAkH5C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheetFlatlist.d.ts","sourceRoot":"","sources":["../../../../../../src/BottomSheet/components/BottomSheetFlatlist.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,wBAAwB,EAEzB,MAAM,6BAA6B,CAAC;AAKrC,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,wBAAwB,CAAC,CAAC,CAAC,2CAmCxE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const BottomSheetModal: import("react").ForwardRefExoticComponent<{
|
|
2
|
+
BackdropComponent?: React.ReactNode;
|
|
3
|
+
onBackDropPress?: () => void;
|
|
4
|
+
disableCloseOnBackdropPress?: boolean;
|
|
5
|
+
} & import("../config/bottomSheet.types").BottomSheetProps & import("@shaquillehinds/react-native-essentials").ModalWrapperProps & {
|
|
6
|
+
children?: import("react").ReactNode | undefined;
|
|
7
|
+
} & import("react").RefAttributes<import("../config/bottomSheet.types").BottomSheetRef>>;
|
|
8
|
+
//# sourceMappingURL=BottomSheetModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheetModal.d.ts","sourceRoot":"","sources":["../../../../../../src/BottomSheet/components/BottomSheetModal.tsx"],"names":[],"mappings":"AAaA,eAAO,MAAM,gBAAgB;;;;;;wFAiC5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheetScrollView.d.ts","sourceRoot":"","sources":["../../../../../../src/BottomSheet/components/BottomSheetScrollView.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,0BAA0B,EAE3B,MAAM,6BAA6B,CAAC;AAKrC,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,2CAmCtE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const extraHeightPercent = 10;
|
|
2
|
+
export declare const extraHeight: number;
|
|
3
|
+
export declare const modalHeight: number;
|
|
4
|
+
export declare const modalContentMaxHeight: number;
|
|
5
|
+
export declare const modalBottomOffset: number;
|
|
6
|
+
export declare const modalTimingConfig: (duration?: number) => {
|
|
7
|
+
duration: number;
|
|
8
|
+
easing: import("react-native-reanimated").EasingFunctionFactory;
|
|
9
|
+
};
|
|
10
|
+
export declare const modalTransitionTimingConfig: {
|
|
11
|
+
duration: number;
|
|
12
|
+
easing: import("react-native-reanimated").EasingFunctionFactory;
|
|
13
|
+
};
|
|
14
|
+
export declare const animateOpenTimingConfig: {
|
|
15
|
+
duration: number;
|
|
16
|
+
easing: import("react-native-reanimated").EasingFunctionFactory;
|
|
17
|
+
};
|
|
18
|
+
export declare const animateCloseTimingConfig: {
|
|
19
|
+
duration: number;
|
|
20
|
+
easing: (t: number) => number;
|
|
21
|
+
};
|
|
22
|
+
export declare const openKeyboardTimingConfig: {
|
|
23
|
+
duration: number;
|
|
24
|
+
easing: import("react-native-reanimated").EasingFunctionFactory;
|
|
25
|
+
};
|
|
26
|
+
export declare const closeKeyboardTimingConfig: {
|
|
27
|
+
duration: number;
|
|
28
|
+
easing: import("react-native-reanimated").EasingFunctionFactory;
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=bottomSheet.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bottomSheet.constants.d.ts","sourceRoot":"","sources":["../../../../../../src/BottomSheet/config/bottomSheet.constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,WAAW,QAAgC,CAAC;AACzD,eAAO,MAAM,WAAW,QAA+B,CAAC;AACxD,eAAO,MAAM,qBAAqB,QAAc,CAAC;AAGjD,eAAO,MAAM,iBAAiB,QAAmB,CAAC;AAElD,eAAO,MAAM,iBAAiB,GAAI,iBAAc;;;CAG9C,CAAC;AACH,eAAO,MAAM,2BAA2B;;;CAAsB,CAAC;AAC/D,eAAO,MAAM,uBAAuB;;;CAAsB,CAAC;AAE3D,eAAO,MAAM,wBAAwB;;;CAGpC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;CAGpC,CAAC;AACF,eAAO,MAAM,yBAAyB;;;CAGrC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const bottomModalStyle: {
|
|
2
|
+
bottomSheet: {
|
|
3
|
+
backgroundColor: string;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
borderRadius: number;
|
|
7
|
+
position: "absolute";
|
|
8
|
+
bottom: number;
|
|
9
|
+
zIndex: number;
|
|
10
|
+
overflow: "hidden";
|
|
11
|
+
};
|
|
12
|
+
contentContainer: {
|
|
13
|
+
paddingBottom: number;
|
|
14
|
+
};
|
|
15
|
+
bumper: {
|
|
16
|
+
backgroundColor: string;
|
|
17
|
+
width: number;
|
|
18
|
+
borderRadius: number;
|
|
19
|
+
height: number;
|
|
20
|
+
alignSelf: "center";
|
|
21
|
+
marginVertical: number;
|
|
22
|
+
};
|
|
23
|
+
bumperContainer: {
|
|
24
|
+
zIndex: number;
|
|
25
|
+
};
|
|
26
|
+
background: {
|
|
27
|
+
zIndex: number;
|
|
28
|
+
backgroundColor: string;
|
|
29
|
+
opacity: number;
|
|
30
|
+
position: "absolute";
|
|
31
|
+
left: 0;
|
|
32
|
+
right: 0;
|
|
33
|
+
top: 0;
|
|
34
|
+
bottom: 0;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=bottomSheet.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bottomSheet.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/BottomSheet/config/bottomSheet.styles.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC3B,CAAC"}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { FlatList, NativeScrollEvent, NativeSyntheticEvent, StyleProp, TextInput, ViewStyle } from 'react-native';
|
|
3
|
+
import type { AnimatedScrollViewProps, EasingFunction, EasingFunctionFactory, FlatListPropsWithLayout, SharedValue } from 'react-native-reanimated';
|
|
4
|
+
import type { GestureStateChangeEvent, GestureUpdateEvent, PanGestureHandlerEventPayload } from 'react-native-gesture-handler';
|
|
5
|
+
import type { ReanimatedScrollEvent } from 'react-native-reanimated/lib/typescript/hook/commonTypes';
|
|
6
|
+
import type { AnimatedScrollView } from 'react-native-reanimated/lib/typescript/component/ScrollView';
|
|
7
|
+
import type { PortalContextValue, ModalWrapperProps } from '@shaquillehinds/react-native-essentials';
|
|
8
|
+
export type BottomSheetProps = {
|
|
9
|
+
showModal?: boolean;
|
|
10
|
+
setShowModal?: React.Dispatch<React.SetStateAction<boolean>> | ((bool: boolean) => void);
|
|
11
|
+
_unMounter?: () => void;
|
|
12
|
+
/**
|
|
13
|
+
* Modal snaps to various positions of the screens overall height.
|
|
14
|
+
* Takes a percentage of the screen height.
|
|
15
|
+
* @example
|
|
16
|
+
* [25, "50", "75%"]
|
|
17
|
+
*/
|
|
18
|
+
snapPoints?: (number | string)[];
|
|
19
|
+
/**
|
|
20
|
+
* Defines which part of the modal is draggable.
|
|
21
|
+
* "Full" makes the entire modal draggable.
|
|
22
|
+
* @default "bumper"
|
|
23
|
+
*/
|
|
24
|
+
dragArea?: 'full' | 'bumper' | 'none';
|
|
25
|
+
/**
|
|
26
|
+
* Prevents full unmounting. Use with bottomOffset if you want to see the modal when it's "closed".
|
|
27
|
+
*/
|
|
28
|
+
keepMounted?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Removes the top part of the modal that is draggable.
|
|
31
|
+
*/
|
|
32
|
+
hideBumper?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Adds content bottom padding when the keyboard is visible. Use inputsForKeyboardToAvoid if you only want the padding to be adding when certain inputs are focused.
|
|
35
|
+
*/
|
|
36
|
+
avoidKeyboard?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* By default the modal isn't draggable when the keyboard is visible to prevent weird behavior when avoidKeyboard is active.
|
|
39
|
+
* Add this prop to disable that behavior.
|
|
40
|
+
*/
|
|
41
|
+
allowDragWhileKeyboardVisible?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Function to run when the modal is mounting.
|
|
44
|
+
*/
|
|
45
|
+
onModalShow?: () => Promise<void> | void;
|
|
46
|
+
/**
|
|
47
|
+
* Function to run when the modal is unmounting.
|
|
48
|
+
*/
|
|
49
|
+
onModalClose?: () => Promise<void> | void;
|
|
50
|
+
/**
|
|
51
|
+
* Function to run when modal reaches a snapPoint
|
|
52
|
+
*/
|
|
53
|
+
onSnapPointReach?: (snapPointIndex: number) => Promise<void> | void;
|
|
54
|
+
/**
|
|
55
|
+
* Style for the modal sheet itself, not the modal content.
|
|
56
|
+
*/
|
|
57
|
+
style?: StyleProp<ViewStyle>;
|
|
58
|
+
/**
|
|
59
|
+
* Style for the bumper itself, not it's container.
|
|
60
|
+
*/
|
|
61
|
+
bumperStyle?: StyleProp<ViewStyle>;
|
|
62
|
+
/**
|
|
63
|
+
* Style for the bumper container, not the actual bumper.
|
|
64
|
+
*/
|
|
65
|
+
bumperContainerStyle?: StyleProp<ViewStyle>;
|
|
66
|
+
/**
|
|
67
|
+
* Sets the background color of the modal and the bumper container.
|
|
68
|
+
*/
|
|
69
|
+
backgroundColor?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Style for the modal content container, not the modal sheet itself.
|
|
72
|
+
*/
|
|
73
|
+
contentContainerStyle?: StyleProp<ViewStyle>;
|
|
74
|
+
/**
|
|
75
|
+
* Provide a custom bumper component that replaces the default one. This component will be draggrable.
|
|
76
|
+
*/
|
|
77
|
+
BumperComponent?: () => React.ReactNode;
|
|
78
|
+
/**
|
|
79
|
+
* Adds content bottom padding for the modal depending on if the provided inputRef is focused.
|
|
80
|
+
*/
|
|
81
|
+
inputsForKeyboardToAvoid?: React.RefObject<TextInput>[];
|
|
82
|
+
/**
|
|
83
|
+
* Pushes the modal up. Useful when used with keepMounted prop and you want to still the modal in it's closed position.
|
|
84
|
+
*/
|
|
85
|
+
bottomOffset?: number;
|
|
86
|
+
/**
|
|
87
|
+
* Delay as to when content should be shown.
|
|
88
|
+
* Use 'mount' type for heavy loaded content that causes sluggish modal entry to improve performance.
|
|
89
|
+
* Give the contentContainerStyle prop an appropriate minHeight or height when using type 'mount'.
|
|
90
|
+
*/
|
|
91
|
+
showContentDelay?: {
|
|
92
|
+
/**
|
|
93
|
+
* @default - "opacity"
|
|
94
|
+
*/
|
|
95
|
+
type?: 'mount' | 'opacity';
|
|
96
|
+
timeInMilliSecs: number;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Disables the use use of the portabl provider to render component
|
|
100
|
+
*/
|
|
101
|
+
disablePortal?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Provide a custom context in case you want to restrict your modal to particular portal
|
|
104
|
+
*/
|
|
105
|
+
CustomPortalContext?: React.Context<PortalContextValue | undefined>;
|
|
106
|
+
};
|
|
107
|
+
export type BottomSheetModalProps = {
|
|
108
|
+
/**
|
|
109
|
+
* Custom backdrop component instead of the default blurview
|
|
110
|
+
*/
|
|
111
|
+
BackdropComponent?: React.ReactNode;
|
|
112
|
+
onBackDropPress?: () => void;
|
|
113
|
+
disableCloseOnBackdropPress?: boolean;
|
|
114
|
+
} & BottomSheetProps & ModalWrapperProps;
|
|
115
|
+
export type BottomSheetContextProps = {
|
|
116
|
+
scrollY: SharedValue<number>;
|
|
117
|
+
maxScrollOffset: SharedValue<number>;
|
|
118
|
+
inverted: SharedValue<boolean>;
|
|
119
|
+
onBeginScroll: (e: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => void;
|
|
120
|
+
onUpdateScroll: (e: GestureUpdateEvent<PanGestureHandlerEventPayload>) => void;
|
|
121
|
+
onEndScroll: (e: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => void;
|
|
122
|
+
scrollableComponentRef: ScrollComponentRef;
|
|
123
|
+
};
|
|
124
|
+
export type BottomModalContextProps = {
|
|
125
|
+
modalRef: BottomModalRef;
|
|
126
|
+
};
|
|
127
|
+
export type BottomSheetFlatlistProps<T> = Omit<FlatListPropsWithLayout<T>, 'onScroll'> & {
|
|
128
|
+
onScroll?: ReanimatedOnScroll | DefaultOnScroll;
|
|
129
|
+
refFlatlist?: React.MutableRefObject<FlatList> | React.RefObject<FlatList>;
|
|
130
|
+
};
|
|
131
|
+
export type BottomSheetScrollViewProps = Omit<AnimatedScrollViewProps, 'onScroll'> & {
|
|
132
|
+
onScroll?: ReanimatedOnScroll | DefaultOnScroll;
|
|
133
|
+
refScrollView?: React.MutableRefObject<AnimatedScrollView> | React.RefObject<AnimatedScrollView>;
|
|
134
|
+
};
|
|
135
|
+
export type DefaultOnScroll = (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
136
|
+
export type ReanimatedOnScroll = (event: ReanimatedScrollEvent) => void;
|
|
137
|
+
export type ScrollComponentRef = React.MutableRefObject<ScrollComponentRefProps>;
|
|
138
|
+
export type ScrollComponentRefProps = FlatList | AnimatedScrollView | null;
|
|
139
|
+
export declare enum ModalState {
|
|
140
|
+
CLOSED = 0,
|
|
141
|
+
OPENING = 1,
|
|
142
|
+
OPEN = 2,
|
|
143
|
+
CLOSING = 3
|
|
144
|
+
}
|
|
145
|
+
export type SnapPoint = {
|
|
146
|
+
offset: number;
|
|
147
|
+
};
|
|
148
|
+
type SnapController = {
|
|
149
|
+
snapToIndex: (snapPointIndex: number) => void;
|
|
150
|
+
snapToPercentage: (percentage: number | string) => void;
|
|
151
|
+
};
|
|
152
|
+
export type AnimateCloseModalProps = {
|
|
153
|
+
duration?: number;
|
|
154
|
+
easing?: EasingFunction | EasingFunctionFactory;
|
|
155
|
+
};
|
|
156
|
+
export type BottomSheetRef = {
|
|
157
|
+
getModalState: () => ModalState;
|
|
158
|
+
animateCloseModal: (props?: AnimateCloseModalProps) => void;
|
|
159
|
+
} & SnapController;
|
|
160
|
+
export type BottomSheetRefObject = React.Ref<BottomSheetRef>;
|
|
161
|
+
export type CloseModalProps = {
|
|
162
|
+
/**
|
|
163
|
+
* Instantly unmounts modal without animation.
|
|
164
|
+
* Useful for glitchy android navigation.
|
|
165
|
+
*/
|
|
166
|
+
skipAnimation?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Reduces animation duration to 100ms
|
|
169
|
+
* Useful for glitchy android navigation.
|
|
170
|
+
*/
|
|
171
|
+
isNavigating?: boolean;
|
|
172
|
+
onClose?: () => void;
|
|
173
|
+
} & AnimateCloseModalProps;
|
|
174
|
+
export type OpenModalProps = {
|
|
175
|
+
onOpen?: () => void;
|
|
176
|
+
};
|
|
177
|
+
export type BottomModalRef = {
|
|
178
|
+
getModalState: () => ModalState | undefined;
|
|
179
|
+
openModal: (props?: OpenModalProps) => void;
|
|
180
|
+
closeModal: (props?: CloseModalProps) => void;
|
|
181
|
+
closeWithoutAnimation: () => void;
|
|
182
|
+
} & SnapController;
|
|
183
|
+
export type BottomModalRefObject = React.Ref<BottomModalRef>;
|
|
184
|
+
export {};
|
|
185
|
+
//# sourceMappingURL=bottomSheet.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bottomSheet.types.d.ts","sourceRoot":"","sources":["../../../../../../src/BottomSheet/config/bottomSheet.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EACjB,oBAAoB,EACpB,SAAS,EACT,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,O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