related-ui-components 2.1.0 → 2.1.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.
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ import { createContext, useContext } from "react";
4
+ const BottomSheetContext = /*#__PURE__*/createContext(undefined);
5
+ export const useBottomSheet = () => {
6
+ const context = useContext(BottomSheetContext);
7
+ if (!context) {
8
+ throw new Error("useBottomSheet must be used within a BottomSheetProvider");
9
+ }
10
+ return context;
11
+ };
12
+ export default BottomSheetContext;
13
+ //# sourceMappingURL=BottomSheetContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createContext","useContext","BottomSheetContext","undefined","useBottomSheet","context","Error"],"sourceRoot":"..\\..\\..\\src","sources":["contexts/BottomSheetContext.tsx"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,UAAU,QAAmB,OAAO;AAY5D,MAAMC,kBAAkB,gBAAGF,aAAa,CACtCG,SACF,CAAC;AAED,OAAO,MAAMC,cAAc,GAAGA,CAAA,KAAM;EAClC,MAAMC,OAAO,GAAGJ,UAAU,CAACC,kBAAkB,CAAC;EAC9C,IAAI,CAACG,OAAO,EAAE;IACZ,MAAM,IAAIC,KAAK,CACb,0DACF,CAAC;EACH;EACA,OAAOD,OAAO;AAChB,CAAC;AAED,eAAeH,kBAAkB","ignoreList":[]}
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+
3
+ import React, { useState, useRef, useCallback, useMemo, useEffect } from "react";
4
+ import BottomSheet, { BottomSheetBackdrop } from "@gorhom/bottom-sheet";
5
+ import BottomSheetContext from "./BottomSheetContext.js";
6
+ import { Keyboard, StyleSheet } from "react-native";
7
+ import { useTheme } from "../theme/index.js";
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ export const BottomSheetProvider = ({
10
+ children
11
+ }) => {
12
+ const {
13
+ theme
14
+ } = useTheme(); // Get theme for styling the provider's sheet if needed
15
+ const styles = useMemo(() => providerStyles(theme), [theme]);
16
+ const sheetRef = useRef(null);
17
+ const [isOpen, setIsOpen] = useState(false);
18
+ const [content, setContent] = useState(null);
19
+ const [size, setSize] = useState("small");
20
+ const [onCloseCallback, setOnCloseCallback] = useState(null);
21
+ const openBottomSheet = useCallback((newContent, size, onClose) => {
22
+ setContent(newContent);
23
+ setSize(size);
24
+ setOnCloseCallback(() => onClose);
25
+ setIsOpen(true);
26
+ }, []);
27
+ const closeBottomSheet = useCallback(() => {
28
+ sheetRef.current?.close();
29
+ setIsOpen(false);
30
+ }, []);
31
+ const renderBackdrop = useCallback(props => /*#__PURE__*/_jsx(BottomSheetBackdrop, {
32
+ ...props,
33
+ disappearsOnIndex: -1,
34
+ appearsOnIndex: 0,
35
+ opacity: 0.5,
36
+ pressBehavior: "close",
37
+ style: [props.style, {
38
+ backgroundColor: "rgba(0,0,0,0.5)"
39
+ }]
40
+ }), []);
41
+ useEffect(() => {
42
+ if (isOpen && content) {
43
+ sheetRef.current?.snapToIndex(size === "small" ? 0 : 1);
44
+ } else {
45
+ sheetRef.current?.close();
46
+ }
47
+ }, [isOpen, content, size]);
48
+ return /*#__PURE__*/_jsxs(BottomSheetContext.Provider, {
49
+ value: {
50
+ openBottomSheet,
51
+ closeBottomSheet,
52
+ isOpen
53
+ },
54
+ children: [children, /*#__PURE__*/_jsx(BottomSheet, {
55
+ ref: sheetRef,
56
+ index: -1,
57
+ snapPoints: ["30%", "50%", "85%"],
58
+ enablePanDownToClose: true,
59
+ backdropComponent: renderBackdrop,
60
+ android_keyboardInputMode: "adjustResize",
61
+ keyboardBlurBehavior: "restore",
62
+ keyboardBehavior: "extend",
63
+ enableDynamicSizing: false,
64
+ style: styles.bottomSheetContainer,
65
+ onClose: () => {
66
+ setIsOpen(false);
67
+ Keyboard.dismiss();
68
+ },
69
+ handleIndicatorStyle: {
70
+ backgroundColor: theme.onSurface
71
+ },
72
+ children: content
73
+ })]
74
+ });
75
+ };
76
+ const providerStyles = theme => StyleSheet.create({
77
+ bottomSheetContainer: {
78
+ backgroundColor: theme.surface,
79
+ // Ensure sheet background matches theme
80
+ borderTopLeftRadius: 20,
81
+ borderTopRightRadius: 20,
82
+ overflow: "hidden" // Important for rounded corners with content
83
+ },
84
+ headerContainer: {
85
+ padding: 16,
86
+ borderBottomWidth: 1,
87
+ borderBottomColor: theme.divider,
88
+ // Use theme color for divider
89
+ alignItems: "center"
90
+ },
91
+ headerTitle: {
92
+ fontSize: 18,
93
+ fontWeight: "bold",
94
+ color: theme.onSurface
95
+ },
96
+ contentContainer: {
97
+ flex: 1 // Ensure content can take up available space
98
+ }
99
+ });
100
+ //# sourceMappingURL=BottomSheetProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useState","useRef","useCallback","useMemo","useEffect","BottomSheet","BottomSheetBackdrop","BottomSheetContext","Keyboard","StyleSheet","useTheme","jsx","_jsx","jsxs","_jsxs","BottomSheetProvider","children","theme","styles","providerStyles","sheetRef","isOpen","setIsOpen","content","setContent","size","setSize","onCloseCallback","setOnCloseCallback","openBottomSheet","newContent","onClose","closeBottomSheet","current","close","renderBackdrop","props","disappearsOnIndex","appearsOnIndex","opacity","pressBehavior","style","backgroundColor","snapToIndex","Provider","value","ref","index","snapPoints","enablePanDownToClose","backdropComponent","android_keyboardInputMode","keyboardBlurBehavior","keyboardBehavior","enableDynamicSizing","bottomSheetContainer","dismiss","handleIndicatorStyle","onSurface","create","surface","borderTopLeftRadius","borderTopRightRadius","overflow","headerContainer","padding","borderBottomWidth","borderBottomColor","divider","alignItems","headerTitle","fontSize","fontWeight","color","contentContainer","flex"],"sourceRoot":"..\\..\\..\\src","sources":["contexts/BottomSheetProvider.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IACVC,QAAQ,EACRC,MAAM,EACNC,WAAW,EAEXC,OAAO,EACPC,SAAS,QACJ,OAAO;AACd,OAAOC,WAAW,IAChBC,mBAAmB,QAEd,sBAAsB;AAC7B,OAAOC,kBAAkB,MAAM,yBAAsB;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AU,CAAE;MAAA1C,QAAA,EAE1DO;IAAO,CACG,CAAC;EAAA,CACa,CAAC;AAElC,CAAC;AAED,MAAMJ,cAAc,GAAIF,KAAgB,IACtCR,UAAU,CAACkD,MAAM,CAAC;EAChBJ,oBAAoB,EAAE;IACpBb,eAAe,EAAEzB,KAAK,CAAC2C,OAAO;IAAE;IAChCC,mBAAmB,EAAE,EAAE;IACvBC,oBAAoB,EAAE,EAAE;IACxBC,QAAQ,EAAE,QAAQ,CAAE;EACtB,CAAC;EACDC,eAAe,EAAE;IACfC,OAAO,EAAE,EAAE;IACXC,iBAAiB,EAAE,CAAC;IACpBC,iBAAiB,EAAElD,KAAK,CAACmD,OAAO;IAAE;IAClCC,UAAU,EAAE;EACd,CAAC;EACDC,WAAW,EAAE;IACXC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBC,KAAK,EAAExD,KAAK,CAACyC;EACf,CAAC;EACDgB,gBAAgB,EAAE;IAChBC,IAAI,EAAE,CAAC,CAAE;EACX;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ export * from "./BottomSheetContext.js";
4
+ export * from "./BottomSheetProvider.js";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"..\\..\\..\\src","sources":["contexts/index.ts"],"mappings":";;AAAA,cAAc,yBAAsB;AACpC,cAAc,0BAAuB","ignoreList":[]}
@@ -1,9 +1,13 @@
1
1
  "use strict";
2
2
 
3
- import { registerRootComponent } from 'expo';
4
- import "react-native-reanimated";
5
- import App from "./app.js";
6
- registerRootComponent(App);
3
+ // import { registerRootComponent } from 'expo';
4
+ // import "react-native-reanimated";
5
+
6
+ // import App from "./app";
7
+
8
+ // registerRootComponent(App);
9
+
7
10
  export * from "./theme/index.js";
8
11
  export * from "./components/index.js";
12
+ export * from "./contexts/index.js";
9
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["registerRootComponent","App"],"sourceRoot":"..\\..\\src","sources":["index.ts"],"mappings":";;AAAA,SAASA,qBAAqB,QAAQ,MAAM;AAC5C,OAAO,yBAAyB;AAGhC,OAAOC,GAAG,MAAM,UAAO;AAEvBD,qBAAqB,CAACC,GAAG,CAAC;AAE1B,cAAc,kBAAS;AACvB,cAAc,uBAAc","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"..\\..\\src","sources":["index.ts"],"mappings":";;AAAA;AACA;;AAGA;;AAEA;;AAEA,cAAc,kBAAS;AACvB,cAAc,uBAAc;AAC5B,cAAc,qBAAY","ignoreList":[]}
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from "react";
2
+ interface BottomSheetContextProps {
3
+ openBottomSheet: (content: ReactNode | (() => ReactNode), size: "small" | "large", onClose?: () => void) => void;
4
+ closeBottomSheet: () => void;
5
+ isOpen: boolean;
6
+ }
7
+ declare const BottomSheetContext: import("react").Context<BottomSheetContextProps | undefined>;
8
+ export declare const useBottomSheet: () => BottomSheetContextProps;
9
+ export default BottomSheetContext;
10
+ //# sourceMappingURL=BottomSheetContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheetContext.d.ts","sourceRoot":"","sources":["../../../../src/contexts/BottomSheetContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,UAAU,uBAAuB;IAC/B,eAAe,EAAE,CACf,OAAO,EAAE,SAAS,GAAG,CAAC,MAAM,SAAS,CAAC,EACtC,IAAI,EAAE,OAAO,GAAG,OAAO,EACvB,OAAO,CAAC,EAAE,MAAM,IAAI,KACjB,IAAI,CAAC;IACV,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,QAAA,MAAM,kBAAkB,8DAEvB,CAAC;AAEF,eAAO,MAAM,cAAc,+BAQ1B,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React, { ReactNode } from "react";
2
+ interface BottomSheetProviderProps {
3
+ children: ReactNode;
4
+ }
5
+ export declare const BottomSheetProvider: React.FC<BottomSheetProviderProps>;
6
+ export {};
7
+ //# sourceMappingURL=BottomSheetProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BottomSheetProvider.d.ts","sourceRoot":"","sources":["../../../../src/contexts/BottomSheetProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAIZ,SAAS,EAGV,MAAM,OAAO,CAAC;AASf,UAAU,wBAAwB;IAChC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAkFlE,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./BottomSheetContext";
2
+ export * from "./BottomSheetProvider";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/contexts/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA"}
@@ -1,4 +1,4 @@
1
- import "react-native-reanimated";
2
1
  export * from "./theme";
3
2
  export * from "./components";
3
+ export * from "./contexts";
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,yBAAyB,CAAC;AAOjC,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAQA,cAAc,SAAS,CAAA;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "related-ui-components",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "main": "./src/index.ts",
5
5
  "scripts": {
6
6
  "start": "expo start",
@@ -0,0 +1,27 @@
1
+ import { createContext, useContext, ReactNode } from "react";
2
+
3
+ interface BottomSheetContextProps {
4
+ openBottomSheet: (
5
+ content: ReactNode | (() => ReactNode),
6
+ size: "small" | "large",
7
+ onClose?: () => void,
8
+ ) => void;
9
+ closeBottomSheet: () => void;
10
+ isOpen: boolean;
11
+ }
12
+
13
+ const BottomSheetContext = createContext<BottomSheetContextProps | undefined>(
14
+ undefined
15
+ );
16
+
17
+ export const useBottomSheet = () => {
18
+ const context = useContext(BottomSheetContext);
19
+ if (!context) {
20
+ throw new Error(
21
+ "useBottomSheet must be used within a BottomSheetProvider"
22
+ );
23
+ }
24
+ return context;
25
+ };
26
+
27
+ export default BottomSheetContext;
@@ -0,0 +1,127 @@
1
+ import React, {
2
+ useState,
3
+ useRef,
4
+ useCallback,
5
+ ReactNode,
6
+ useMemo,
7
+ useEffect,
8
+ } from "react";
9
+ import BottomSheet, {
10
+ BottomSheetBackdrop,
11
+ BottomSheetBackdropProps,
12
+ } from "@gorhom/bottom-sheet";
13
+ import BottomSheetContext from "./BottomSheetContext";
14
+ import { Keyboard, StyleSheet } from "react-native";
15
+ import { ThemeType, useTheme } from "../theme";
16
+
17
+ interface BottomSheetProviderProps {
18
+ children: ReactNode;
19
+ }
20
+
21
+ export const BottomSheetProvider: React.FC<BottomSheetProviderProps> = ({
22
+ children,
23
+ }) => {
24
+ const { theme } = useTheme(); // Get theme for styling the provider's sheet if needed
25
+ const styles = useMemo(() => providerStyles(theme), [theme]);
26
+ const sheetRef = useRef<BottomSheet>(null);
27
+
28
+ const [isOpen, setIsOpen] = useState(false);
29
+ const [content, setContent] = useState<ReactNode>(null);
30
+ const [size, setSize] = useState<"small" | "large">("small");
31
+
32
+ const [onCloseCallback, setOnCloseCallback] = useState<(() => void) | null>(
33
+ null
34
+ );
35
+
36
+ const openBottomSheet = useCallback(
37
+ (
38
+ newContent: ReactNode | (() => ReactNode),
39
+ size: "small" | "large",
40
+ onClose?: () => void
41
+ ) => {
42
+ setContent(newContent);
43
+ setSize(size);
44
+ setOnCloseCallback(() => onClose);
45
+ setIsOpen(true);
46
+ },
47
+ []
48
+ );
49
+
50
+ const closeBottomSheet = useCallback(() => {
51
+ sheetRef.current?.close();
52
+ setIsOpen(false);
53
+ }, []);
54
+
55
+ const renderBackdrop = useCallback(
56
+ (props: BottomSheetBackdropProps) => (
57
+ <BottomSheetBackdrop
58
+ {...props}
59
+ disappearsOnIndex={-1}
60
+ appearsOnIndex={0}
61
+ opacity={0.5}
62
+ pressBehavior="close"
63
+ style={[props.style, { backgroundColor: "rgba(0,0,0,0.5)" }]}
64
+ />
65
+ ),
66
+ []
67
+ );
68
+
69
+ useEffect(() => {
70
+ if (isOpen && content) {
71
+ sheetRef.current?.snapToIndex(size === "small" ? 0 : 1);
72
+ } else {
73
+ sheetRef.current?.close();
74
+ }
75
+ }, [isOpen, content, size]);
76
+
77
+ return (
78
+ <BottomSheetContext.Provider
79
+ value={{ openBottomSheet, closeBottomSheet, isOpen }}
80
+ >
81
+ {children}
82
+ <BottomSheet
83
+ ref={sheetRef}
84
+ index={-1}
85
+ snapPoints={["30%", "50%", "85%"]}
86
+ enablePanDownToClose
87
+ backdropComponent={renderBackdrop}
88
+ android_keyboardInputMode="adjustResize"
89
+ keyboardBlurBehavior="restore"
90
+ keyboardBehavior="extend"
91
+ enableDynamicSizing={false}
92
+ style={styles.bottomSheetContainer}
93
+ onClose={() => {
94
+ setIsOpen(false);
95
+ Keyboard.dismiss();
96
+ }}
97
+ handleIndicatorStyle={{ backgroundColor: theme.onSurface }}
98
+ >
99
+ {content}
100
+ </BottomSheet>
101
+ </BottomSheetContext.Provider>
102
+ );
103
+ };
104
+
105
+ const providerStyles = (theme: ThemeType) =>
106
+ StyleSheet.create({
107
+ bottomSheetContainer: {
108
+ backgroundColor: theme.surface, // Ensure sheet background matches theme
109
+ borderTopLeftRadius: 20,
110
+ borderTopRightRadius: 20,
111
+ overflow: "hidden", // Important for rounded corners with content
112
+ },
113
+ headerContainer: {
114
+ padding: 16,
115
+ borderBottomWidth: 1,
116
+ borderBottomColor: theme.divider, // Use theme color for divider
117
+ alignItems: "center",
118
+ },
119
+ headerTitle: {
120
+ fontSize: 18,
121
+ fontWeight: "bold",
122
+ color: theme.onSurface,
123
+ },
124
+ contentContainer: {
125
+ flex: 1, // Ensure content can take up available space
126
+ },
127
+ });
@@ -0,0 +1,2 @@
1
+ export * from "./BottomSheetContext"
2
+ export * from "./BottomSheetProvider"
package/src/index.ts CHANGED
@@ -1,10 +1,11 @@
1
- import { registerRootComponent } from 'expo';
2
- import "react-native-reanimated";
1
+ // import { registerRootComponent } from 'expo';
2
+ // import "react-native-reanimated";
3
3
 
4
4
 
5
- import App from "./app";
5
+ // import App from "./app";
6
6
 
7
- registerRootComponent(App);
7
+ // registerRootComponent(App);
8
8
 
9
9
  export * from "./theme"
10
- export * from "./components";
10
+ export * from "./components";
11
+ export * from "./contexts";