@nation-a/ui 0.16.1 → 0.16.2
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/index.cjs
CHANGED
|
@@ -19213,14 +19213,29 @@ const bottomSheetRecipe = sva({
|
|
|
19213
19213
|
});
|
|
19214
19214
|
const BottomSheetContext = React.createContext({ rounded: 20 });
|
|
19215
19215
|
const BottomSheet = React.forwardRef(
|
|
19216
|
-
({
|
|
19217
|
-
|
|
19216
|
+
({
|
|
19217
|
+
children,
|
|
19218
|
+
snapPercent = { min: 0, max: null },
|
|
19219
|
+
maxSnapPoint,
|
|
19220
|
+
fullHeight,
|
|
19221
|
+
className,
|
|
19222
|
+
rounded = 20,
|
|
19223
|
+
disableDrag,
|
|
19224
|
+
onClose,
|
|
19225
|
+
...props
|
|
19226
|
+
}, ref) => {
|
|
19227
|
+
let snapPercentPoints = null;
|
|
19228
|
+
if (snapPercent.min && snapPercent.max) {
|
|
19229
|
+
snapPercentPoints = [snapPercent.max * window.innerHeight, snapPercent.min * window.innerHeight];
|
|
19230
|
+
}
|
|
19231
|
+
const snapPoints = snapPercentPoints ? snapPercentPoints : maxSnapPoint ? [maxSnapPoint] : void 0;
|
|
19218
19232
|
const styles2 = bottomSheetRecipe({ fullHeight });
|
|
19219
19233
|
return /* @__PURE__ */ jsxRuntime.jsx(BottomSheetContext.Provider, { value: { rounded, onClose }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
19220
19234
|
Sheet,
|
|
19221
19235
|
{
|
|
19222
19236
|
ref,
|
|
19223
19237
|
snapPoints,
|
|
19238
|
+
detent: !snapPercent.max && !maxSnapPoint ? "content-height" : void 0,
|
|
19224
19239
|
initialSnap: 0,
|
|
19225
19240
|
className: cx(styles2.root, className),
|
|
19226
19241
|
onClose,
|