prizmux 1.0.3 → 1.1.3
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/dist/components/BottomSheet/BottomSheet.d.ts +2 -0
- package/dist/components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.js +159 -265
- package/dist/components/BottomSheet/BottomSheet.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.types.d.ts +13 -0
- package/dist/components/BottomSheet/BottomSheet.types.d.ts.map +1 -0
- package/dist/components/BottomSheet/BottomSheet.types.js +3 -0
- package/dist/components/BottomSheet/BottomSheet.types.js.map +1 -0
- package/dist/components/BottomSheet/index.d.ts +3 -0
- package/dist/components/BottomSheet/index.d.ts.map +1 -0
- package/dist/components/BottomSheet/index.js +9 -0
- package/dist/components/BottomSheet/index.js.map +1 -0
- package/package.json +2 -2
|
@@ -1 +1,3 @@
|
|
|
1
|
+
import type { BottomSheetProps } from './BottomSheet.types';
|
|
2
|
+
export default function BottomSheet({ visible, onClose, title, children, dismissOnTouchOutside, showCloseButton, showDragHandle, swipeToClose, closeIcon, }: BottomSheetProps): import("react/jsx-runtime").JSX.Element | null;
|
|
1
3
|
//# sourceMappingURL=BottomSheet.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAQ5D,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,OAAO,EACP,OAAO,EACP,KAAK,EACL,QAAQ,EACR,qBAA4B,EAC5B,eAAsB,EACtB,cAAqB,EACrB,YAAmB,EACnB,SAAS,GACV,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98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
// ]}
|
|
162
|
-
// >
|
|
163
|
-
// {/* Drag Handle */}
|
|
164
|
-
// {showDragHandle && (
|
|
165
|
-
// <View style={styles.dragHandleContainer}>
|
|
166
|
-
// <View
|
|
167
|
-
// style={[
|
|
168
|
-
// styles.dragHandle,
|
|
169
|
-
// { backgroundColor: Colors.light.borderColor },
|
|
170
|
-
// ]}
|
|
171
|
-
// />
|
|
172
|
-
// </View>
|
|
173
|
-
// )}
|
|
174
|
-
// {/* Header */}
|
|
175
|
-
// {(title || showCloseButton) && (
|
|
176
|
-
// <View style={[styles.header, { borderBottomColor: Colors.light.borderColor }]}>
|
|
177
|
-
// <View style={styles.titleContainer}>
|
|
178
|
-
// {title && (
|
|
179
|
-
// <ThemedText type="title" style={[styles.title, { color: Colors.light.text }]}>
|
|
180
|
-
// {title}
|
|
181
|
-
// </ThemedText>
|
|
182
|
-
// )}
|
|
183
|
-
// </View>
|
|
184
|
-
// {showCloseButton && (
|
|
185
|
-
// <Pressable
|
|
186
|
-
// style={[
|
|
187
|
-
// styles.closeButton,
|
|
188
|
-
// { backgroundColor: Colors.light.lightShade },
|
|
189
|
-
// ]}
|
|
190
|
-
// onPress={closeModal}
|
|
191
|
-
// hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
|
|
192
|
-
// >
|
|
193
|
-
// <LucideX size={16} color={Colors.light.icon} />
|
|
194
|
-
// </Pressable>
|
|
195
|
-
// )}
|
|
196
|
-
// </View>
|
|
197
|
-
// )}
|
|
198
|
-
// {/* Content */}
|
|
199
|
-
// <View style={styles.contentContainer}>{children}</View>
|
|
200
|
-
// </ThemedView>
|
|
201
|
-
// </Animated.View>
|
|
202
|
-
// </Modal>
|
|
203
|
-
// );
|
|
204
|
-
// }
|
|
205
|
-
// const styles = StyleSheet.create({
|
|
206
|
-
// backdropPressable: {
|
|
207
|
-
// ...StyleSheet.absoluteFillObject,
|
|
208
|
-
// zIndex: 1, // Ensure the Pressable handles the press event first
|
|
209
|
-
// },
|
|
210
|
-
// backdrop: {
|
|
211
|
-
// ...StyleSheet.absoluteFillObject,
|
|
212
|
-
// flex: 1,
|
|
213
|
-
// },
|
|
214
|
-
// modalContainer: {
|
|
215
|
-
// position: 'absolute',
|
|
216
|
-
// bottom: 0,
|
|
217
|
-
// left: 0,
|
|
218
|
-
// right: 0,
|
|
219
|
-
// borderTopLeftRadius: 20,
|
|
220
|
-
// borderTopRightRadius: 20,
|
|
221
|
-
// overflow: 'hidden',
|
|
222
|
-
// zIndex: 2, // Ensure the modal is above the backdrop
|
|
223
|
-
// },
|
|
224
|
-
// modalContent: {
|
|
225
|
-
// flex: 1,
|
|
226
|
-
// borderTopLeftRadius: 20,
|
|
227
|
-
// borderTopRightRadius: 20,
|
|
228
|
-
// },
|
|
229
|
-
// dragHandleContainer: {
|
|
230
|
-
// alignItems: 'center',
|
|
231
|
-
// paddingVertical: 12,
|
|
232
|
-
// },
|
|
233
|
-
// dragHandle: {
|
|
234
|
-
// width: 40,
|
|
235
|
-
// height: 4,
|
|
236
|
-
// borderRadius: 2,
|
|
237
|
-
// },
|
|
238
|
-
// header: {
|
|
239
|
-
// flexDirection: 'row',
|
|
240
|
-
// alignItems: 'center',
|
|
241
|
-
// justifyContent: 'space-between',
|
|
242
|
-
// paddingHorizontal: 20,
|
|
243
|
-
// paddingBottom: 16,
|
|
244
|
-
// borderBottomWidth: StyleSheet.hairlineWidth,
|
|
245
|
-
// },
|
|
246
|
-
// titleContainer: {
|
|
247
|
-
// flex: 1,
|
|
248
|
-
// },
|
|
249
|
-
// title: {
|
|
250
|
-
// fontSize: 18,
|
|
251
|
-
// fontWeight: '600',
|
|
252
|
-
// },
|
|
253
|
-
// closeButton: {
|
|
254
|
-
// width: 32,
|
|
255
|
-
// height: 32,
|
|
256
|
-
// borderRadius: 16,
|
|
257
|
-
// alignItems: 'center',
|
|
258
|
-
// justifyContent: 'center',
|
|
259
|
-
// marginLeft: 16,
|
|
260
|
-
// },
|
|
261
|
-
// contentContainer: {
|
|
262
|
-
// flex: 1,
|
|
263
|
-
// paddingHorizontal: 20,
|
|
264
|
-
// paddingTop: 16,
|
|
265
|
-
// },
|
|
266
|
-
// })
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = BottomSheet;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const react_native_1 = require("react-native");
|
|
7
|
+
const { height: SCREEN_HEIGHT } = react_native_1.Dimensions.get('window');
|
|
8
|
+
const DefaultCloseIcon = () => ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: styles.defaultCloseIcon, children: "\u2715" }));
|
|
9
|
+
function BottomSheet({ visible, onClose, title, children, dismissOnTouchOutside = true, showCloseButton = true, showDragHandle = true, swipeToClose = true, closeIcon, }) {
|
|
10
|
+
const slideAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(SCREEN_HEIGHT)).current;
|
|
11
|
+
const backdropAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(0)).current;
|
|
12
|
+
const [dynamicHeight, setDynamicHeight] = (0, react_1.useState)(SCREEN_HEIGHT * 0.6);
|
|
13
|
+
const panResponder = (0, react_1.useRef)(react_native_1.PanResponder.create({
|
|
14
|
+
onMoveShouldSetPanResponder: (_, gestureState) => {
|
|
15
|
+
return swipeToClose && gestureState.dy > 5;
|
|
16
|
+
},
|
|
17
|
+
onPanResponderMove: (_, gestureState) => {
|
|
18
|
+
if (gestureState.dy > 0) {
|
|
19
|
+
slideAnim.setValue(gestureState.dy);
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
onPanResponderRelease: (_, gestureState) => {
|
|
23
|
+
if (gestureState.dy > dynamicHeight * 0.4) {
|
|
24
|
+
closeModal();
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
react_native_1.Animated.spring(slideAnim, {
|
|
28
|
+
toValue: 0,
|
|
29
|
+
useNativeDriver: true,
|
|
30
|
+
bounciness: 5,
|
|
31
|
+
}).start();
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
})).current;
|
|
35
|
+
const openModal = (0, react_1.useCallback)(() => {
|
|
36
|
+
react_native_1.Animated.parallel([
|
|
37
|
+
react_native_1.Animated.timing(backdropAnim, {
|
|
38
|
+
toValue: 1,
|
|
39
|
+
duration: 300,
|
|
40
|
+
useNativeDriver: true,
|
|
41
|
+
}),
|
|
42
|
+
react_native_1.Animated.spring(slideAnim, {
|
|
43
|
+
toValue: 0,
|
|
44
|
+
useNativeDriver: true,
|
|
45
|
+
bounciness: 0,
|
|
46
|
+
}),
|
|
47
|
+
]).start();
|
|
48
|
+
}, [backdropAnim, slideAnim]);
|
|
49
|
+
const closeModal = (0, react_1.useCallback)(() => {
|
|
50
|
+
react_native_1.Animated.parallel([
|
|
51
|
+
react_native_1.Animated.timing(backdropAnim, {
|
|
52
|
+
toValue: 0,
|
|
53
|
+
duration: 250,
|
|
54
|
+
useNativeDriver: true,
|
|
55
|
+
}),
|
|
56
|
+
react_native_1.Animated.timing(slideAnim, {
|
|
57
|
+
toValue: dynamicHeight,
|
|
58
|
+
duration: 250,
|
|
59
|
+
useNativeDriver: true,
|
|
60
|
+
}),
|
|
61
|
+
]).start(() => {
|
|
62
|
+
onClose();
|
|
63
|
+
});
|
|
64
|
+
}, [backdropAnim, slideAnim, dynamicHeight, onClose]);
|
|
65
|
+
(0, react_1.useEffect)(() => {
|
|
66
|
+
if (visible) {
|
|
67
|
+
openModal();
|
|
68
|
+
}
|
|
69
|
+
}, [visible, openModal]);
|
|
70
|
+
if (!visible)
|
|
71
|
+
return null;
|
|
72
|
+
return ((0, jsx_runtime_1.jsxs)(react_native_1.Modal, { animationType: "none", transparent: true, visible: visible, onRequestClose: closeModal, statusBarTranslucent: true, children: [(0, jsx_runtime_1.jsx)(react_native_1.Pressable, { style: styles.backdropPressable, onPress: () => dismissOnTouchOutside && closeModal(), children: (0, jsx_runtime_1.jsx)(react_native_1.Animated.View, { style: [styles.backdrop, { opacity: backdropAnim }] }) }), (0, jsx_runtime_1.jsxs)(react_native_1.Animated.View, { style: [
|
|
73
|
+
styles.modalContainer,
|
|
74
|
+
{
|
|
75
|
+
maxHeight: SCREEN_HEIGHT * 0.9,
|
|
76
|
+
transform: [{ translateY: slideAnim }],
|
|
77
|
+
},
|
|
78
|
+
], onLayout: (event) => {
|
|
79
|
+
const { height: layoutHeight } = event.nativeEvent.layout;
|
|
80
|
+
setDynamicHeight(layoutHeight);
|
|
81
|
+
if (visible) {
|
|
82
|
+
slideAnim.setValue(layoutHeight);
|
|
83
|
+
openModal();
|
|
84
|
+
}
|
|
85
|
+
}, ...panResponder.panHandlers, children: [showDragHandle && ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.dragHandleContainer, children: (0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.dragHandle }) })), (title || showCloseButton) && ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles.header, children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.titleContainer, children: title && (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: styles.title, children: title }) }), showCloseButton && ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { style: styles.closeButton, onPress: closeModal, hitSlop: { top: 10, bottom: 10, left: 10, right: 10 }, children: closeIcon ?? (0, jsx_runtime_1.jsx)(DefaultCloseIcon, {}) }))] })), (0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.contentContainer, children: children })] })] }));
|
|
86
|
+
}
|
|
87
|
+
const styles = react_native_1.StyleSheet.create({
|
|
88
|
+
backdropPressable: {
|
|
89
|
+
...react_native_1.StyleSheet.absoluteFillObject,
|
|
90
|
+
zIndex: 1,
|
|
91
|
+
},
|
|
92
|
+
backdrop: {
|
|
93
|
+
...react_native_1.StyleSheet.absoluteFillObject,
|
|
94
|
+
flex: 1,
|
|
95
|
+
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
96
|
+
},
|
|
97
|
+
modalContainer: {
|
|
98
|
+
position: 'absolute',
|
|
99
|
+
bottom: 0,
|
|
100
|
+
left: 0,
|
|
101
|
+
right: 0,
|
|
102
|
+
borderTopLeftRadius: 20,
|
|
103
|
+
borderTopRightRadius: 20,
|
|
104
|
+
overflow: 'hidden',
|
|
105
|
+
zIndex: 2,
|
|
106
|
+
backgroundColor: '#FFFFFF',
|
|
107
|
+
shadowColor: '#000000',
|
|
108
|
+
shadowOffset: { width: 0, height: -3 },
|
|
109
|
+
shadowOpacity: 0.1,
|
|
110
|
+
shadowRadius: 5,
|
|
111
|
+
elevation: 10,
|
|
112
|
+
},
|
|
113
|
+
dragHandleContainer: {
|
|
114
|
+
alignItems: 'center',
|
|
115
|
+
paddingVertical: 12,
|
|
116
|
+
},
|
|
117
|
+
dragHandle: {
|
|
118
|
+
width: 40,
|
|
119
|
+
height: 4,
|
|
120
|
+
borderRadius: 2,
|
|
121
|
+
backgroundColor: '#E5E7EB',
|
|
122
|
+
},
|
|
123
|
+
header: {
|
|
124
|
+
flexDirection: 'row',
|
|
125
|
+
alignItems: 'center',
|
|
126
|
+
justifyContent: 'space-between',
|
|
127
|
+
paddingHorizontal: 20,
|
|
128
|
+
paddingBottom: 16,
|
|
129
|
+
borderBottomWidth: react_native_1.StyleSheet.hairlineWidth,
|
|
130
|
+
borderBottomColor: '#E5E7EB',
|
|
131
|
+
},
|
|
132
|
+
titleContainer: {
|
|
133
|
+
flex: 1,
|
|
134
|
+
},
|
|
135
|
+
title: {
|
|
136
|
+
fontSize: 18,
|
|
137
|
+
fontWeight: '600',
|
|
138
|
+
color: '#111827',
|
|
139
|
+
},
|
|
140
|
+
closeButton: {
|
|
141
|
+
width: 32,
|
|
142
|
+
height: 32,
|
|
143
|
+
borderRadius: 16,
|
|
144
|
+
alignItems: 'center',
|
|
145
|
+
justifyContent: 'center',
|
|
146
|
+
marginLeft: 16,
|
|
147
|
+
backgroundColor: '#F3F4F6',
|
|
148
|
+
},
|
|
149
|
+
contentContainer: {
|
|
150
|
+
flex: 1,
|
|
151
|
+
paddingHorizontal: 20,
|
|
152
|
+
paddingTop: 16,
|
|
153
|
+
paddingBottom: 24,
|
|
154
|
+
},
|
|
155
|
+
defaultCloseIcon: {
|
|
156
|
+
fontSize: 14,
|
|
157
|
+
color: '#6B7280',
|
|
158
|
+
fontWeight: '600',
|
|
159
|
+
},
|
|
160
|
+
});
|
|
267
161
|
//# sourceMappingURL=BottomSheet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.js","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BottomSheet.js","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":";;AAm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: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
title?: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
dismissOnTouchOutside?: boolean;
|
|
8
|
+
showCloseButton?: boolean;
|
|
9
|
+
showDragHandle?: boolean;
|
|
10
|
+
swipeToClose?: boolean;
|
|
11
|
+
closeIcon?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=BottomSheet.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheet.types.d.ts","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC;IACpB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheet.types.js","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/BottomSheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.BottomSheet = void 0;
|
|
7
|
+
var BottomSheet_1 = require("./BottomSheet");
|
|
8
|
+
Object.defineProperty(exports, "BottomSheet", { enumerable: true, get: function () { return __importDefault(BottomSheet_1).default; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/BottomSheet/index.ts"],"names":[],"mappings":";;;;;;AAAA,6CAAuD;AAA9C,2HAAA,OAAO,OAAe"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prizmux",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "A smooth and modern UI component library for React Native",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"license": "ISC",
|
|
40
40
|
"repository": {
|
|
41
41
|
"type": "git",
|
|
42
|
-
"url": "https://github.com/
|
|
42
|
+
"url": "https://github.com/contecfy/prizmux"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8.0",
|