@oxyhq/bloom 0.12.1 → 0.14.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/lib/commonjs/fab/Fab.js +25 -6
- package/lib/commonjs/fab/Fab.js.map +1 -1
- package/lib/commonjs/fab/Fab.web.js +26 -7
- package/lib/commonjs/fab/Fab.web.js.map +1 -1
- package/lib/commonjs/index.js +15 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +21 -6
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/responsive-sheet/ResponsiveSheet.js +300 -0
- package/lib/commonjs/responsive-sheet/ResponsiveSheet.js.map +1 -0
- package/lib/commonjs/responsive-sheet/ResponsiveSheet.native.js +226 -0
- package/lib/commonjs/responsive-sheet/ResponsiveSheet.native.js.map +1 -0
- package/lib/commonjs/responsive-sheet/const.js +60 -0
- package/lib/commonjs/responsive-sheet/const.js.map +1 -0
- package/lib/commonjs/responsive-sheet/index.js +19 -0
- package/lib/commonjs/responsive-sheet/index.js.map +1 -0
- package/lib/commonjs/responsive-sheet/index.web.js +19 -0
- package/lib/commonjs/responsive-sheet/index.web.js.map +1 -0
- package/lib/commonjs/responsive-sheet/types.js +6 -0
- package/lib/commonjs/responsive-sheet/types.js.map +1 -0
- package/lib/module/fab/Fab.js +25 -6
- package/lib/module/fab/Fab.js.map +1 -1
- package/lib/module/fab/Fab.web.js +26 -7
- package/lib/module/fab/Fab.web.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +2 -0
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/responsive-sheet/ResponsiveSheet.js +293 -0
- package/lib/module/responsive-sheet/ResponsiveSheet.js.map +1 -0
- package/lib/module/responsive-sheet/ResponsiveSheet.native.js +219 -0
- package/lib/module/responsive-sheet/ResponsiveSheet.native.js.map +1 -0
- package/lib/module/responsive-sheet/const.js +56 -0
- package/lib/module/responsive-sheet/const.js.map +1 -0
- package/lib/module/responsive-sheet/index.js +4 -0
- package/lib/module/responsive-sheet/index.js.map +1 -0
- package/lib/module/responsive-sheet/index.web.js +14 -0
- package/lib/module/responsive-sheet/index.web.js.map +1 -0
- package/lib/module/responsive-sheet/types.js +4 -0
- package/lib/module/responsive-sheet/types.js.map +1 -0
- package/lib/typescript/commonjs/fab/Fab.d.ts.map +1 -1
- package/lib/typescript/commonjs/fab/Fab.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/fab/types.d.ts +12 -2
- package/lib/typescript/commonjs/fab/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +2 -0
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/responsive-sheet/ResponsiveSheet.d.ts +26 -0
- package/lib/typescript/commonjs/responsive-sheet/ResponsiveSheet.d.ts.map +1 -0
- package/lib/typescript/commonjs/responsive-sheet/ResponsiveSheet.native.d.ts +20 -0
- package/lib/typescript/commonjs/responsive-sheet/ResponsiveSheet.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/responsive-sheet/const.d.ts +43 -0
- package/lib/typescript/commonjs/responsive-sheet/const.d.ts.map +1 -0
- package/lib/typescript/commonjs/responsive-sheet/index.d.ts +3 -0
- package/lib/typescript/commonjs/responsive-sheet/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/responsive-sheet/index.web.d.ts +3 -0
- package/lib/typescript/commonjs/responsive-sheet/index.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/responsive-sheet/types.d.ts +55 -0
- package/lib/typescript/commonjs/responsive-sheet/types.d.ts.map +1 -0
- package/lib/typescript/module/fab/Fab.d.ts.map +1 -1
- package/lib/typescript/module/fab/Fab.web.d.ts.map +1 -1
- package/lib/typescript/module/fab/types.d.ts +12 -2
- package/lib/typescript/module/fab/types.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +2 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +2 -0
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/responsive-sheet/ResponsiveSheet.d.ts +26 -0
- package/lib/typescript/module/responsive-sheet/ResponsiveSheet.d.ts.map +1 -0
- package/lib/typescript/module/responsive-sheet/ResponsiveSheet.native.d.ts +20 -0
- package/lib/typescript/module/responsive-sheet/ResponsiveSheet.native.d.ts.map +1 -0
- package/lib/typescript/module/responsive-sheet/const.d.ts +43 -0
- package/lib/typescript/module/responsive-sheet/const.d.ts.map +1 -0
- package/lib/typescript/module/responsive-sheet/index.d.ts +3 -0
- package/lib/typescript/module/responsive-sheet/index.d.ts.map +1 -0
- package/lib/typescript/module/responsive-sheet/index.web.d.ts +3 -0
- package/lib/typescript/module/responsive-sheet/index.web.d.ts.map +1 -0
- package/lib/typescript/module/responsive-sheet/types.d.ts +55 -0
- package/lib/typescript/module/responsive-sheet/types.d.ts.map +1 -0
- package/package.json +18 -1
- package/src/__tests__/Fab.test.tsx +17 -0
- package/src/__tests__/Fab.web.test.tsx +14 -0
- package/src/__tests__/ResponsiveSheet.test.tsx +104 -0
- package/src/fab/Fab.stories.tsx +9 -0
- package/src/fab/Fab.tsx +33 -7
- package/src/fab/Fab.web.tsx +33 -8
- package/src/fab/types.ts +12 -2
- package/src/index.ts +8 -0
- package/src/index.web.ts +8 -0
- package/src/responsive-sheet/ResponsiveSheet.native.tsx +257 -0
- package/src/responsive-sheet/ResponsiveSheet.stories.tsx +54 -0
- package/src/responsive-sheet/ResponsiveSheet.tsx +327 -0
- package/src/responsive-sheet/const.ts +53 -0
- package/src/responsive-sheet/index.ts +6 -0
- package/src/responsive-sheet/index.web.ts +16 -0
- package/src/responsive-sheet/types.ts +57 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
4
|
+
import { Pressable, StyleSheet, useWindowDimensions, View } from 'react-native';
|
|
5
|
+
import Animated, { cancelAnimation, Easing, runOnJS, useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
6
|
+
import { Z_INDEX } from "../styles/z-index.js";
|
|
7
|
+
import { useTheme } from "../theme/use-theme.js";
|
|
8
|
+
import { ANIMATION_DURATION, BACKDROP_OPACITY, DEFAULT_BREAKPOINT, DEFAULT_LABEL, DEFAULT_MAX_HEIGHT_RATIO, DEFAULT_SIDE, DEFAULT_WIDTH, HANDLE_HEIGHT, HANDLE_RADIUS, HANDLE_WIDTH, PANEL_RADIUS, SIDE_SHEET_MIN_GUTTER } from "./const.js";
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
/** Stable testID for the dimmed backdrop dismiss button. */
|
|
11
|
+
export const RESPONSIVE_SHEET_BACKDROP_TESTID = 'bloom-responsive-sheet-backdrop';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Native variant of `<ResponsiveSheet>` (selected only by Metro).
|
|
15
|
+
*
|
|
16
|
+
* Uses `react-native-reanimated` to drive the same motion as the web/CSS
|
|
17
|
+
* default fork: a shared `progress` value times 0 -> 1 on open and 1 -> 0 on
|
|
18
|
+
* close, mapped to the panel translate/opacity and the backdrop opacity.
|
|
19
|
+
* Native exit animations are safe here — the web-only `removeChild` crash does
|
|
20
|
+
* not apply — so we keep the node mounted through the close timing and unmount
|
|
21
|
+
* from the animation completion callback.
|
|
22
|
+
*
|
|
23
|
+
* The panel itself is measured (not percentage-translated): we offset by the
|
|
24
|
+
* panel's own width/height so the hidden state sits fully off its side, which
|
|
25
|
+
* is the reanimated-friendly equivalent of the web `translate(±100%)`.
|
|
26
|
+
*/
|
|
27
|
+
export function ResponsiveSheet({
|
|
28
|
+
open,
|
|
29
|
+
onClose,
|
|
30
|
+
side = DEFAULT_SIDE,
|
|
31
|
+
breakpoint = DEFAULT_BREAKPOINT,
|
|
32
|
+
width = DEFAULT_WIDTH,
|
|
33
|
+
maxHeightRatio = DEFAULT_MAX_HEIGHT_RATIO,
|
|
34
|
+
inset,
|
|
35
|
+
showHandle = true,
|
|
36
|
+
dismissOnBackdrop = true,
|
|
37
|
+
panelStyle,
|
|
38
|
+
panelClassName,
|
|
39
|
+
containerStyle,
|
|
40
|
+
containerClassName,
|
|
41
|
+
label = DEFAULT_LABEL,
|
|
42
|
+
children
|
|
43
|
+
}) {
|
|
44
|
+
const theme = useTheme();
|
|
45
|
+
const {
|
|
46
|
+
width: viewportWidth,
|
|
47
|
+
height: viewportHeight
|
|
48
|
+
} = useWindowDimensions();
|
|
49
|
+
|
|
50
|
+
// Keep the tree mounted through the exit timing; unmount once it settles.
|
|
51
|
+
const [mounted, setMounted] = useState(open);
|
|
52
|
+
// `progress`: 0 = fully hidden, 1 = fully shown. Drives both transform and
|
|
53
|
+
// opacity so a single timing controls the whole transition.
|
|
54
|
+
const progress = useSharedValue(open ? 1 : 0);
|
|
55
|
+
const isBottom = viewportWidth < breakpoint;
|
|
56
|
+
|
|
57
|
+
// Measured panel extent along the travel axis. Falls back to the geometry
|
|
58
|
+
// target so the very first frame is already off-screen before layout lands.
|
|
59
|
+
const insetTop = inset?.top ?? 0;
|
|
60
|
+
const insetBottom = inset?.bottom ?? 0;
|
|
61
|
+
const insetLeft = inset?.left ?? 0;
|
|
62
|
+
const insetRight = inset?.right ?? 0;
|
|
63
|
+
const anchorInset = side === 'left' ? insetLeft : insetRight;
|
|
64
|
+
const oppositeInset = side === 'left' ? insetRight : insetLeft;
|
|
65
|
+
const sideWidth = useMemo(() => {
|
|
66
|
+
const available = viewportWidth - anchorInset - oppositeInset - SIDE_SHEET_MIN_GUTTER;
|
|
67
|
+
return Math.max(0, Math.min(width, available));
|
|
68
|
+
}, [viewportWidth, anchorInset, oppositeInset, width]);
|
|
69
|
+
const bottomMaxHeight = useMemo(() => Math.round(viewportHeight * maxHeightRatio), [viewportHeight, maxHeightRatio]);
|
|
70
|
+
|
|
71
|
+
// Travel distance for the hidden state: the panel's measured extent (height
|
|
72
|
+
// for the bottom-sheet, width for the side-sheet), with the geometry target
|
|
73
|
+
// as the pre-measurement fallback.
|
|
74
|
+
const travel = useSharedValue(isBottom ? bottomMaxHeight : sideWidth);
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
travel.value = isBottom ? bottomMaxHeight : sideWidth;
|
|
77
|
+
}, [isBottom, bottomMaxHeight, sideWidth, travel]);
|
|
78
|
+
const finishClose = useCallback(() => {
|
|
79
|
+
setMounted(false);
|
|
80
|
+
}, []);
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
cancelAnimation(progress);
|
|
83
|
+
const timing = {
|
|
84
|
+
duration: ANIMATION_DURATION,
|
|
85
|
+
easing: Easing.out(Easing.cubic)
|
|
86
|
+
};
|
|
87
|
+
if (open) {
|
|
88
|
+
setMounted(true);
|
|
89
|
+
progress.value = withTiming(1, timing);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (!mounted) return;
|
|
93
|
+
progress.value = withTiming(0, timing, finished => {
|
|
94
|
+
if (finished) runOnJS(finishClose)();
|
|
95
|
+
});
|
|
96
|
+
}, [open, mounted, progress, finishClose]);
|
|
97
|
+
const handleBackdropPress = useCallback(() => {
|
|
98
|
+
if (dismissOnBackdrop) onClose();
|
|
99
|
+
}, [dismissOnBackdrop, onClose]);
|
|
100
|
+
const backdropAnimatedStyle = useAnimatedStyle(() => ({
|
|
101
|
+
opacity: progress.value * BACKDROP_OPACITY
|
|
102
|
+
}));
|
|
103
|
+
const hiddenSign = side === 'left' ? -1 : 1;
|
|
104
|
+
const panelAnimatedStyle = useAnimatedStyle(() => {
|
|
105
|
+
const hidden = 1 - progress.value;
|
|
106
|
+
if (isBottom) {
|
|
107
|
+
return {
|
|
108
|
+
opacity: progress.value,
|
|
109
|
+
transform: [{
|
|
110
|
+
translateY: hidden * travel.value
|
|
111
|
+
}]
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
return {
|
|
115
|
+
opacity: progress.value,
|
|
116
|
+
transform: [{
|
|
117
|
+
translateX: hidden * travel.value * hiddenSign
|
|
118
|
+
}]
|
|
119
|
+
};
|
|
120
|
+
}, [isBottom, hiddenSign]);
|
|
121
|
+
const measurePanel = useCallback(e => {
|
|
122
|
+
const measured = isBottom ? e.nativeEvent.layout.height : e.nativeEvent.layout.width;
|
|
123
|
+
if (measured > 0) travel.value = measured;
|
|
124
|
+
}, [isBottom, travel]);
|
|
125
|
+
const panelGeometry = useMemo(() => {
|
|
126
|
+
if (isBottom) {
|
|
127
|
+
return {
|
|
128
|
+
left: 0,
|
|
129
|
+
right: 0,
|
|
130
|
+
bottom: 0,
|
|
131
|
+
maxHeight: bottomMaxHeight,
|
|
132
|
+
borderTopLeftRadius: PANEL_RADIUS,
|
|
133
|
+
borderTopRightRadius: PANEL_RADIUS
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
top: insetTop,
|
|
138
|
+
bottom: insetBottom,
|
|
139
|
+
[side]: anchorInset,
|
|
140
|
+
width: sideWidth,
|
|
141
|
+
borderRadius: PANEL_RADIUS
|
|
142
|
+
};
|
|
143
|
+
}, [isBottom, bottomMaxHeight, insetTop, insetBottom, side, anchorInset, sideWidth]);
|
|
144
|
+
if (!mounted) return null;
|
|
145
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
146
|
+
style: [styles.root, containerStyle],
|
|
147
|
+
...(containerClassName ? {
|
|
148
|
+
className: containerClassName
|
|
149
|
+
} : {}),
|
|
150
|
+
pointerEvents: "box-none",
|
|
151
|
+
children: [/*#__PURE__*/_jsx(Animated.View, {
|
|
152
|
+
style: [styles.backdrop, backdropAnimatedStyle],
|
|
153
|
+
pointerEvents: "auto",
|
|
154
|
+
children: /*#__PURE__*/_jsx(Pressable, {
|
|
155
|
+
testID: RESPONSIVE_SHEET_BACKDROP_TESTID,
|
|
156
|
+
accessibilityRole: "button",
|
|
157
|
+
accessibilityLabel: `Dismiss ${label}`,
|
|
158
|
+
onPress: handleBackdropPress,
|
|
159
|
+
disabled: !dismissOnBackdrop,
|
|
160
|
+
style: StyleSheet.absoluteFill
|
|
161
|
+
})
|
|
162
|
+
}), /*#__PURE__*/_jsxs(Animated.View, {
|
|
163
|
+
accessibilityViewIsModal: true,
|
|
164
|
+
...(panelClassName ? {
|
|
165
|
+
className: panelClassName
|
|
166
|
+
} : {}),
|
|
167
|
+
onLayout: measurePanel,
|
|
168
|
+
style: [styles.panel, {
|
|
169
|
+
backgroundColor: theme.colors.background,
|
|
170
|
+
shadowColor: theme.colors.shadow
|
|
171
|
+
}, panelGeometry, panelAnimatedStyle, panelStyle],
|
|
172
|
+
pointerEvents: "auto",
|
|
173
|
+
children: [isBottom && showHandle ? /*#__PURE__*/_jsx(View, {
|
|
174
|
+
style: styles.handleRow,
|
|
175
|
+
pointerEvents: "none",
|
|
176
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
177
|
+
style: [styles.handle, {
|
|
178
|
+
backgroundColor: theme.colors.border
|
|
179
|
+
}]
|
|
180
|
+
})
|
|
181
|
+
}) : null, children]
|
|
182
|
+
})]
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
const styles = StyleSheet.create({
|
|
186
|
+
root: {
|
|
187
|
+
...StyleSheet.absoluteFill,
|
|
188
|
+
zIndex: Z_INDEX.fullscreen
|
|
189
|
+
},
|
|
190
|
+
backdrop: {
|
|
191
|
+
...StyleSheet.absoluteFill,
|
|
192
|
+
backgroundColor: '#000'
|
|
193
|
+
},
|
|
194
|
+
panel: {
|
|
195
|
+
position: 'absolute',
|
|
196
|
+
overflow: 'hidden',
|
|
197
|
+
shadowOpacity: 0.18,
|
|
198
|
+
shadowRadius: 24,
|
|
199
|
+
shadowOffset: {
|
|
200
|
+
width: 0,
|
|
201
|
+
height: 8
|
|
202
|
+
},
|
|
203
|
+
elevation: 12
|
|
204
|
+
},
|
|
205
|
+
handleRow: {
|
|
206
|
+
width: '100%',
|
|
207
|
+
alignItems: 'center',
|
|
208
|
+
paddingTop: 8,
|
|
209
|
+
paddingBottom: 4
|
|
210
|
+
},
|
|
211
|
+
handle: {
|
|
212
|
+
width: HANDLE_WIDTH,
|
|
213
|
+
height: HANDLE_HEIGHT,
|
|
214
|
+
borderRadius: HANDLE_RADIUS,
|
|
215
|
+
opacity: 0.5
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
export default ResponsiveSheet;
|
|
219
|
+
//# sourceMappingURL=ResponsiveSheet.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useCallback","useEffect","useMemo","useState","Pressable","StyleSheet","useWindowDimensions","View","Animated","cancelAnimation","Easing","runOnJS","useAnimatedStyle","useSharedValue","withTiming","Z_INDEX","useTheme","ANIMATION_DURATION","BACKDROP_OPACITY","DEFAULT_BREAKPOINT","DEFAULT_LABEL","DEFAULT_MAX_HEIGHT_RATIO","DEFAULT_SIDE","DEFAULT_WIDTH","HANDLE_HEIGHT","HANDLE_RADIUS","HANDLE_WIDTH","PANEL_RADIUS","SIDE_SHEET_MIN_GUTTER","jsx","_jsx","jsxs","_jsxs","RESPONSIVE_SHEET_BACKDROP_TESTID","ResponsiveSheet","open","onClose","side","breakpoint","width","maxHeightRatio","inset","showHandle","dismissOnBackdrop","panelStyle","panelClassName","containerStyle","containerClassName","label","children","theme","viewportWidth","height","viewportHeight","mounted","setMounted","progress","isBottom","insetTop","top","insetBottom","bottom","insetLeft","left","insetRight","right","anchorInset","oppositeInset","sideWidth","available","Math","max","min","bottomMaxHeight","round","travel","value","finishClose","timing","duration","easing","out","cubic","finished","handleBackdropPress","backdropAnimatedStyle","opacity","hiddenSign","panelAnimatedStyle","hidden","transform","translateY","translateX","measurePanel","e","measured","nativeEvent","layout","panelGeometry","maxHeight","borderTopLeftRadius","borderTopRightRadius","borderRadius","style","styles","root","className","pointerEvents","backdrop","testID","accessibilityRole","accessibilityLabel","onPress","disabled","absoluteFill","accessibilityViewIsModal","onLayout","panel","backgroundColor","colors","background","shadowColor","shadow","handleRow","handle","border","create","zIndex","fullscreen","position","overflow","shadowOpacity","shadowRadius","shadowOffset","elevation","alignItems","paddingTop","paddingBottom"],"sourceRoot":"../../../src","sources":["responsive-sheet/ResponsiveSheet.native.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IACVC,WAAW,EACXC,SAAS,EACTC,OAAO,EAEPC,QAAQ,QACH,OAAO;AACd,SACEC,SAAS,EACTC,UAAU,EACVC,mBAAmB,EACnBC,IAAI,QAEC,cAAc;AACrB,OAAOC,QAAQ,IACbC,eAAe,EACfC,MAAM,EACNC,OAAO,EACPC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,QACL,yBAAyB;AAEhC,SAASC,OAAO,QAAQ,sBAAmB;AAC3C,SAASC,QAAQ,QAAQ,uBAAoB;AAC7C,SACEC,kBAAkB,EAClBC,gBAAgB,EAChBC,kBAAkB,EAClBC,aAAa,EACbC,wBAAwB,EACxBC,YAAY,EACZC,aAAa,EACbC,aAAa,EACbC,aAAa,EACbC,YAAY,EACZC,YAAY,EACZC,qBAAqB,QAChB,YAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGjB;AACA,OAAO,MAAMC,gCAAgC,GAAG,iCAAiC;;AAEjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAAC;EAC9BC,IAAI;EACJC,OAAO;EACPC,IAAI,GAAGf,YAAY;EACnBgB,UAAU,GAAGnB,kBAAkB;EAC/BoB,KAAK,GAAGhB,aAAa;EACrBiB,cAAc,GAAGnB,wBAAwB;EACzCoB,KAAK;EACLC,UAAU,GAAG,IAAI;EACjBC,iBAAiB,GAAG,IAAI;EACxBC,UAAU;EACVC,cAAc;EACdC,cAAc;EACdC,kBAAkB;EAClBC,KAAK,GAAG5B,aAAa;EACrB6B;AACoB,CAAC,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,EAAE5B,aAAa;IACrB8E,YAAY,EAAE7E,aAAa;IAC3B6D,OAAO,EAAE;EACX;AACF,CAAC,CAAC;AAEF,eAAepD,eAAe","ignoreList":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shared default constants for `ResponsiveSheet`.
|
|
5
|
+
*
|
|
6
|
+
* Platform-agnostic — imported by both the default/web CSS implementation
|
|
7
|
+
* (`ResponsiveSheet.tsx`) and the native reanimated implementation
|
|
8
|
+
* (`ResponsiveSheet.native.tsx`) so the two variants stay in lockstep.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/** Below this viewport width the sheet renders as a bottom-sheet. */
|
|
12
|
+
export const DEFAULT_BREAKPOINT = 768;
|
|
13
|
+
|
|
14
|
+
/** Side-sheet width (px) on wide screens. Capped to fit the viewport. */
|
|
15
|
+
export const DEFAULT_WIDTH = 460;
|
|
16
|
+
|
|
17
|
+
/** Bottom-sheet maximum height as a fraction of the viewport height. */
|
|
18
|
+
export const DEFAULT_MAX_HEIGHT_RATIO = 0.9;
|
|
19
|
+
|
|
20
|
+
/** Anchored edge of the side-sheet on wide screens. */
|
|
21
|
+
export const DEFAULT_SIDE = 'left';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Open/close transition duration (ms). ~280–300ms ease-out reads as smooth
|
|
25
|
+
* without feeling sluggish; shared by the CSS transition and the native
|
|
26
|
+
* reanimated timing so both platforms match.
|
|
27
|
+
*/
|
|
28
|
+
export const ANIMATION_DURATION = 280;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Standard CSS approximation of reanimated's `Easing.out(Easing.cubic)` so the
|
|
32
|
+
* web transition curve matches the native one.
|
|
33
|
+
*/
|
|
34
|
+
export const EASE_OUT = 'cubic-bezier(0.33, 1, 0.68, 1)';
|
|
35
|
+
|
|
36
|
+
/** Corner radius for the side-sheet panel and the top of the bottom-sheet. */
|
|
37
|
+
export const PANEL_RADIUS = 20;
|
|
38
|
+
|
|
39
|
+
/** Backdrop dim opacity once fully shown (matches `bg-black/40`). */
|
|
40
|
+
export const BACKDROP_OPACITY = 0.4;
|
|
41
|
+
|
|
42
|
+
/** Drag-handle pill geometry for the bottom-sheet. */
|
|
43
|
+
export const HANDLE_WIDTH = 36;
|
|
44
|
+
export const HANDLE_HEIGHT = 5;
|
|
45
|
+
export const HANDLE_RADIUS = 3;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Minimum gutter kept between a wide side-sheet and the opposite viewport edge
|
|
49
|
+
* when capping its width, so the panel never spans the full screen on a narrow
|
|
50
|
+
* desktop window that is still above the breakpoint.
|
|
51
|
+
*/
|
|
52
|
+
export const SIDE_SHEET_MIN_GUTTER = 24;
|
|
53
|
+
|
|
54
|
+
/** A11y label fallback when the host does not provide one. */
|
|
55
|
+
export const DEFAULT_LABEL = 'Sheet';
|
|
56
|
+
//# sourceMappingURL=const.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DEFAULT_BREAKPOINT","DEFAULT_WIDTH","DEFAULT_MAX_HEIGHT_RATIO","DEFAULT_SIDE","ANIMATION_DURATION","EASE_OUT","PANEL_RADIUS","BACKDROP_OPACITY","HANDLE_WIDTH","HANDLE_HEIGHT","HANDLE_RADIUS","SIDE_SHEET_MIN_GUTTER","DEFAULT_LABEL"],"sourceRoot":"../../../src","sources":["responsive-sheet/const.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO,MAAMA,kBAAkB,GAAG,GAAG;;AAErC;AACA,OAAO,MAAMC,aAAa,GAAG,GAAG;;AAEhC;AACA,OAAO,MAAMC,wBAAwB,GAAG,GAAG;;AAE3C;AACA,OAAO,MAAMC,YAAY,GAAG,MAAe;;AAE3C;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAG,GAAG;;AAErC;AACA;AACA;AACA;AACA,OAAO,MAAMC,QAAQ,GAAG,gCAAgC;;AAExD;AACA,OAAO,MAAMC,YAAY,GAAG,EAAE;;AAE9B;AACA,OAAO,MAAMC,gBAAgB,GAAG,GAAG;;AAEnC;AACA,OAAO,MAAMC,YAAY,GAAG,EAAE;AAC9B,OAAO,MAAMC,aAAa,GAAG,CAAC;AAC9B,OAAO,MAAMC,aAAa,GAAG,CAAC;;AAE9B;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,qBAAqB,GAAG,EAAE;;AAEvC;AACA,OAAO,MAAMC,aAAa,GAAG,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ResponsiveSheet","RESPONSIVE_SHEET_BACKDROP_TESTID"],"sourceRoot":"../../../src","sources":["responsive-sheet/index.ts"],"mappings":";;AAAA,SAASA,eAAe,EAAEC,gCAAgC,QAAQ,mBAAmB","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// Web variant of the `./responsive-sheet` barrel.
|
|
4
|
+
//
|
|
5
|
+
// The default barrel (`./index.ts`) re-exports from `./ResponsiveSheet`, which
|
|
6
|
+
// is itself the reanimated-free web/CSS implementation — Metro additionally
|
|
7
|
+
// resolves `./ResponsiveSheet.native` for native targets. Web bundlers select
|
|
8
|
+
// THIS file via the `"browser"` export condition in `package.json`'s
|
|
9
|
+
// `exports['./responsive-sheet']`, pointing them explicitly at the CSS
|
|
10
|
+
// implementation so a non-Metro bundler never follows the `.native` sibling
|
|
11
|
+
// (which statically imports `react-native-reanimated`, a native-only module).
|
|
12
|
+
// Types are platform-agnostic, so they come straight from `./types`.
|
|
13
|
+
export { ResponsiveSheet, RESPONSIVE_SHEET_BACKDROP_TESTID } from './ResponsiveSheet';
|
|
14
|
+
//# sourceMappingURL=index.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ResponsiveSheet","RESPONSIVE_SHEET_BACKDROP_TESTID"],"sourceRoot":"../../../src","sources":["responsive-sheet/index.web.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,eAAe,EAAEC,gCAAgC,QAAQ,mBAAmB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["responsive-sheet/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fab.d.ts","sourceRoot":"","sources":["../../../../src/fab/Fab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAa7C,OAAO,KAAK,EAAgB,QAAQ,EAAuB,MAAM,SAAS,CAAC;AAE3E,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Fab.d.ts","sourceRoot":"","sources":["../../../../src/fab/Fab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAa7C,OAAO,KAAK,EAAgB,QAAQ,EAAuB,MAAM,SAAS,CAAC;AAE3E,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAyM3E,eAAO,MAAM,GAAG,sCAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fab.web.d.ts","sourceRoot":"","sources":["../../../../src/fab/Fab.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAgB,QAAQ,EAAuB,MAAM,SAAS,CAAC;AAE3E,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Fab.web.d.ts","sourceRoot":"","sources":["../../../../src/fab/Fab.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAgB,QAAQ,EAAuB,MAAM,SAAS,CAAC;AAE3E,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAyR3E,eAAO,MAAM,GAAG,sCAAwB,CAAC"}
|
|
@@ -10,13 +10,19 @@ import type { StyleProp, ViewStyle, TextStyle } from 'react-native';
|
|
|
10
10
|
*/
|
|
11
11
|
export type FabVariant = 'primary' | 'secondary' | 'surface';
|
|
12
12
|
/**
|
|
13
|
-
* FAB
|
|
13
|
+
* FAB size presets, matching Material-ish conventions but in Bloom's scale:
|
|
14
14
|
* - `small` — 40px (compact / dense layouts)
|
|
15
15
|
* - `medium` — 56px (the canonical FAB; the default)
|
|
16
16
|
* - `large` — 64px (high-prominence primary action)
|
|
17
17
|
*
|
|
18
18
|
* In the `extended` variant the height tracks the size but the FAB grows
|
|
19
19
|
* horizontally to fit its icon + label as a pill.
|
|
20
|
+
*
|
|
21
|
+
* The `size` prop ALSO accepts a raw pixel `number` for an exact diameter
|
|
22
|
+
* between (or outside) the presets — e.g. `size={48}` for a FAB halfway between
|
|
23
|
+
* `small` and `medium`. A numeric size sets the diameter directly, derives the
|
|
24
|
+
* icon box as `round(size * 0.5)` (min 22px) and keeps the circle radius at
|
|
25
|
+
* `size / 2`.
|
|
20
26
|
*/
|
|
21
27
|
export type FabSize = 'small' | 'medium' | 'large';
|
|
22
28
|
/**
|
|
@@ -61,7 +67,11 @@ export interface FabProps {
|
|
|
61
67
|
*/
|
|
62
68
|
label?: string;
|
|
63
69
|
variant?: FabVariant;
|
|
64
|
-
|
|
70
|
+
/**
|
|
71
|
+
* A preset (`'small' | 'medium' | 'large'`) or a raw pixel diameter
|
|
72
|
+
* (`number`). Defaults to `'medium'`. See {@link FabSize}.
|
|
73
|
+
*/
|
|
74
|
+
size?: FabSize | number;
|
|
65
75
|
/**
|
|
66
76
|
* Corner of the containing block to anchor to. Defaults to `'bottom-right'`.
|
|
67
77
|
* See {@link FabPlacement}. The DEFAULT never escapes the containing column
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/fab/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE;;;;;;;;GAQG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;AAE7D
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/fab/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE;;;;;;;;GAQG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC;AAE7D;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,MAAM,YAAY,GACpB,cAAc,GACd,aAAa,GACb,WAAW,GACX,UAAU,GACV,QAAQ,CAAC;AAEb,MAAM,WAAW,QAAQ;IACvB,qBAAqB;IACrB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAExB;;;;OAIG;IACH,SAAS,CAAC,EAAE,YAAY,CAAC;IAEzB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,yEAAyE;IACzE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,8CAA8C;IAC9C,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,8CAA8C;IAC9C,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAUhB,wDAAwD;IACxD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC/D,mEAAmE;IACnE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kCAAkC;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6DAA6D;IAC7D,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;CACtC"}
|
|
@@ -49,6 +49,8 @@ export { Combobox } from './combobox';
|
|
|
49
49
|
export type { ComboboxProps, ComboboxOption } from './combobox';
|
|
50
50
|
export { BottomSheet } from './bottom-sheet';
|
|
51
51
|
export type { BottomSheetRef, BottomSheetProps } from './bottom-sheet';
|
|
52
|
+
export { ResponsiveSheet, RESPONSIVE_SHEET_BACKDROP_TESTID } from './responsive-sheet';
|
|
53
|
+
export type { ResponsiveSheetProps, ResponsiveSheetSide, ResponsiveSheetInset, } from './responsive-sheet';
|
|
52
54
|
export * from './card';
|
|
53
55
|
export * from './badge';
|
|
54
56
|
export * from './chip';
|
|
@@ -1 +1 @@
|
|
|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AK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACvE,YAAY,EACV,gBAAgB,EAChB,sBAAsB,EACtB,cAAc,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAG3D,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAG/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC"}
|
|
@@ -49,6 +49,8 @@ export { Combobox } from './combobox/index.web';
|
|
|
49
49
|
export type { ComboboxProps, ComboboxOption } from './combobox/index.web';
|
|
50
50
|
export { BottomSheet } from './bottom-sheet';
|
|
51
51
|
export type { BottomSheetRef, BottomSheetProps } from './bottom-sheet';
|
|
52
|
+
export { ResponsiveSheet, RESPONSIVE_SHEET_BACKDROP_TESTID } from './responsive-sheet/index.web';
|
|
53
|
+
export type { ResponsiveSheetProps, ResponsiveSheetSide, ResponsiveSheetInset, } from './responsive-sheet/index.web';
|
|
52
54
|
export * from './card';
|
|
53
55
|
export * from './badge';
|
|
54
56
|
export * from './chip';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.ts"],"names":[],"mappings":"AAMA,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG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AA0B,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGrE,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAG/B,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ResponsiveSheetProps } from './types';
|
|
2
|
+
/** Stable testID for the dimmed backdrop dismiss button. */
|
|
3
|
+
export declare const RESPONSIVE_SHEET_BACKDROP_TESTID = "bloom-responsive-sheet-backdrop";
|
|
4
|
+
/**
|
|
5
|
+
* Default / web variant of `<ResponsiveSheet>`.
|
|
6
|
+
*
|
|
7
|
+
* This file is BOTH the package's default entry (`react-native` export
|
|
8
|
+
* condition resolves it for downstream `tsc`, and non-Metro web bundlers pick
|
|
9
|
+
* it via the `browser` condition through `index.web`) AND the canonical web
|
|
10
|
+
* implementation. It MUST NOT import `react-native-reanimated` — reanimated has
|
|
11
|
+
* no web build and its worklets Babel plugin is native-only, so a static import
|
|
12
|
+
* here would break every web bundler and downstream type-check. The native
|
|
13
|
+
* fork (`ResponsiveSheet.native.tsx`, selected only by Metro) drives the same
|
|
14
|
+
* motion with reanimated.
|
|
15
|
+
*
|
|
16
|
+
* Motion is pure CSS transitions: react-native-web emits `transition-*` style
|
|
17
|
+
* props to the DOM, and the panel/backdrop toggle their transform/opacity by a
|
|
18
|
+
* `shown` flag. Presence is handled with a `mounted` + `shown` pair so both the
|
|
19
|
+
* open AND close directions animate while the node stays mounted through the
|
|
20
|
+
* exit. We deliberately do NOT use reanimated `exiting` on web — concurrent
|
|
21
|
+
* React unmounts there throw `Failed to execute 'removeChild' on 'Node'`, the
|
|
22
|
+
* exact bug this component exists to avoid.
|
|
23
|
+
*/
|
|
24
|
+
export declare function ResponsiveSheet({ open, onClose, side, breakpoint, width, maxHeightRatio, inset, showHandle, dismissOnBackdrop, panelStyle, panelClassName, containerStyle, containerClassName, label, children, }: ResponsiveSheetProps): import("react/jsx-runtime").JSX.Element | null;
|
|
25
|
+
export default ResponsiveSheet;
|
|
26
|
+
//# sourceMappingURL=ResponsiveSheet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponsiveSheet.d.ts","sourceRoot":"","sources":["../../../../src/responsive-sheet/ResponsiveSheet.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,4DAA4D;AAC5D,eAAO,MAAM,gCAAgC,oCAAoC,CAAC;AAElF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,OAAO,EACP,IAAmB,EACnB,UAA+B,EAC/B,KAAqB,EACrB,cAAyC,EACzC,KAAK,EACL,UAAiB,EACjB,iBAAwB,EACxB,UAAU,EACV,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,KAAqB,EACrB,QAAQ,GACT,EAAE,oBAAoB,kDA+KtB;AA8ED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ResponsiveSheetProps } from './types';
|
|
2
|
+
/** Stable testID for the dimmed backdrop dismiss button. */
|
|
3
|
+
export declare const RESPONSIVE_SHEET_BACKDROP_TESTID = "bloom-responsive-sheet-backdrop";
|
|
4
|
+
/**
|
|
5
|
+
* Native variant of `<ResponsiveSheet>` (selected only by Metro).
|
|
6
|
+
*
|
|
7
|
+
* Uses `react-native-reanimated` to drive the same motion as the web/CSS
|
|
8
|
+
* default fork: a shared `progress` value times 0 -> 1 on open and 1 -> 0 on
|
|
9
|
+
* close, mapped to the panel translate/opacity and the backdrop opacity.
|
|
10
|
+
* Native exit animations are safe here — the web-only `removeChild` crash does
|
|
11
|
+
* not apply — so we keep the node mounted through the close timing and unmount
|
|
12
|
+
* from the animation completion callback.
|
|
13
|
+
*
|
|
14
|
+
* The panel itself is measured (not percentage-translated): we offset by the
|
|
15
|
+
* panel's own width/height so the hidden state sits fully off its side, which
|
|
16
|
+
* is the reanimated-friendly equivalent of the web `translate(±100%)`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function ResponsiveSheet({ open, onClose, side, breakpoint, width, maxHeightRatio, inset, showHandle, dismissOnBackdrop, panelStyle, panelClassName, containerStyle, containerClassName, label, children, }: ResponsiveSheetProps): import("react/jsx-runtime").JSX.Element | null;
|
|
19
|
+
export default ResponsiveSheet;
|
|
20
|
+
//# sourceMappingURL=ResponsiveSheet.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponsiveSheet.native.d.ts","sourceRoot":"","sources":["../../../../src/responsive-sheet/ResponsiveSheet.native.tsx"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,4DAA4D;AAC5D,eAAO,MAAM,gCAAgC,oCAAoC,CAAC;AAElF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,OAAO,EACP,IAAmB,EACnB,UAA+B,EAC/B,KAAqB,EACrB,cAAyC,EACzC,KAAK,EACL,UAAiB,EACjB,iBAAwB,EACxB,UAAU,EACV,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,KAAqB,EACrB,QAAQ,GACT,EAAE,oBAAoB,kDAqJtB;AAiCD,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared default constants for `ResponsiveSheet`.
|
|
3
|
+
*
|
|
4
|
+
* Platform-agnostic — imported by both the default/web CSS implementation
|
|
5
|
+
* (`ResponsiveSheet.tsx`) and the native reanimated implementation
|
|
6
|
+
* (`ResponsiveSheet.native.tsx`) so the two variants stay in lockstep.
|
|
7
|
+
*/
|
|
8
|
+
/** Below this viewport width the sheet renders as a bottom-sheet. */
|
|
9
|
+
export declare const DEFAULT_BREAKPOINT = 768;
|
|
10
|
+
/** Side-sheet width (px) on wide screens. Capped to fit the viewport. */
|
|
11
|
+
export declare const DEFAULT_WIDTH = 460;
|
|
12
|
+
/** Bottom-sheet maximum height as a fraction of the viewport height. */
|
|
13
|
+
export declare const DEFAULT_MAX_HEIGHT_RATIO = 0.9;
|
|
14
|
+
/** Anchored edge of the side-sheet on wide screens. */
|
|
15
|
+
export declare const DEFAULT_SIDE: "left";
|
|
16
|
+
/**
|
|
17
|
+
* Open/close transition duration (ms). ~280–300ms ease-out reads as smooth
|
|
18
|
+
* without feeling sluggish; shared by the CSS transition and the native
|
|
19
|
+
* reanimated timing so both platforms match.
|
|
20
|
+
*/
|
|
21
|
+
export declare const ANIMATION_DURATION = 280;
|
|
22
|
+
/**
|
|
23
|
+
* Standard CSS approximation of reanimated's `Easing.out(Easing.cubic)` so the
|
|
24
|
+
* web transition curve matches the native one.
|
|
25
|
+
*/
|
|
26
|
+
export declare const EASE_OUT = "cubic-bezier(0.33, 1, 0.68, 1)";
|
|
27
|
+
/** Corner radius for the side-sheet panel and the top of the bottom-sheet. */
|
|
28
|
+
export declare const PANEL_RADIUS = 20;
|
|
29
|
+
/** Backdrop dim opacity once fully shown (matches `bg-black/40`). */
|
|
30
|
+
export declare const BACKDROP_OPACITY = 0.4;
|
|
31
|
+
/** Drag-handle pill geometry for the bottom-sheet. */
|
|
32
|
+
export declare const HANDLE_WIDTH = 36;
|
|
33
|
+
export declare const HANDLE_HEIGHT = 5;
|
|
34
|
+
export declare const HANDLE_RADIUS = 3;
|
|
35
|
+
/**
|
|
36
|
+
* Minimum gutter kept between a wide side-sheet and the opposite viewport edge
|
|
37
|
+
* when capping its width, so the panel never spans the full screen on a narrow
|
|
38
|
+
* desktop window that is still above the breakpoint.
|
|
39
|
+
*/
|
|
40
|
+
export declare const SIDE_SHEET_MIN_GUTTER = 24;
|
|
41
|
+
/** A11y label fallback when the host does not provide one. */
|
|
42
|
+
export declare const DEFAULT_LABEL = "Sheet";
|
|
43
|
+
//# sourceMappingURL=const.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../../../src/responsive-sheet/const.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,qEAAqE;AACrE,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,yEAAyE;AACzE,eAAO,MAAM,aAAa,MAAM,CAAC;AAEjC,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C,uDAAuD;AACvD,eAAO,MAAM,YAAY,EAAG,MAAe,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,QAAQ,mCAAmC,CAAC;AAEzD,8EAA8E;AAC9E,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B,qEAAqE;AACrE,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,sDAAsD;AACtD,eAAO,MAAM,YAAY,KAAK,CAAC;AAC/B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC,8DAA8D;AAC9D,eAAO,MAAM,aAAa,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/responsive-sheet/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAC;AACtF,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../../src/responsive-sheet/index.web.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,eAAe,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAC;AACtF,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
/** Edge a wide-screen side-sheet anchors to. */
|
|
4
|
+
export type ResponsiveSheetSide = 'left' | 'right';
|
|
5
|
+
/**
|
|
6
|
+
* Inset (px) of the wide-screen side-sheet from its container edges. Lets a
|
|
7
|
+
* host place the sheet "inside its own shell" — e.g. offset from the top by a
|
|
8
|
+
* header, or from the left by a nav rail — with margins on every side.
|
|
9
|
+
*/
|
|
10
|
+
export interface ResponsiveSheetInset {
|
|
11
|
+
top?: number;
|
|
12
|
+
bottom?: number;
|
|
13
|
+
left?: number;
|
|
14
|
+
right?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A responsive overlay sheet: an anchored side-sheet on wide screens and a
|
|
18
|
+
* bottom-sheet (with drag handle) on small screens, switching by viewport
|
|
19
|
+
* width. It is a plain controlled component — the host drives `open`/`onClose`
|
|
20
|
+
* from its own state. It renders in place (no portal) so the host can scope it
|
|
21
|
+
* inside a themed/positioned subtree.
|
|
22
|
+
*/
|
|
23
|
+
export interface ResponsiveSheetProps {
|
|
24
|
+
/** Whether the sheet is open. Controlled by the host. */
|
|
25
|
+
open: boolean;
|
|
26
|
+
/** Fired when the sheet requests to close (backdrop tap, Escape on web). */
|
|
27
|
+
onClose: () => void;
|
|
28
|
+
/** Anchor edge on wide screens. Defaults to `'left'`. */
|
|
29
|
+
side?: ResponsiveSheetSide;
|
|
30
|
+
/** Viewport width (px) below which the sheet renders as a bottom-sheet. Defaults to `768`. */
|
|
31
|
+
breakpoint?: number;
|
|
32
|
+
/** Side-sheet width (px) on wide screens. Capped to fit. Defaults to `460`. */
|
|
33
|
+
width?: number;
|
|
34
|
+
/** Bottom-sheet max height as a fraction of the viewport height. Defaults to `0.9`. */
|
|
35
|
+
maxHeightRatio?: number;
|
|
36
|
+
/** Side-sheet inset (px) from the container edges. Defaults to `0` on all sides. */
|
|
37
|
+
inset?: ResponsiveSheetInset;
|
|
38
|
+
/** Whether to render the drag handle in bottom-sheet mode. Defaults to `true`. */
|
|
39
|
+
showHandle?: boolean;
|
|
40
|
+
/** Whether tapping the backdrop closes the sheet. Defaults to `true`. */
|
|
41
|
+
dismissOnBackdrop?: boolean;
|
|
42
|
+
/** Style for the panel surface (e.g. brand color). Composed after defaults. */
|
|
43
|
+
panelStyle?: StyleProp<ViewStyle>;
|
|
44
|
+
/** NativeWind classes for the panel surface. */
|
|
45
|
+
panelClassName?: string;
|
|
46
|
+
/** Style for the root overlay (theme-var scope, rail offset, etc.). */
|
|
47
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
48
|
+
/** NativeWind classes for the root overlay (e.g. `"md:left-[4.75rem]"`). */
|
|
49
|
+
containerClassName?: string;
|
|
50
|
+
/** Accessibility label for the sheet panel and the backdrop dismiss button. */
|
|
51
|
+
label?: string;
|
|
52
|
+
/** Sheet content. */
|
|
53
|
+
children: ReactNode;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=types.d.ts.map
|