@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.js CHANGED
@@ -19195,14 +19195,29 @@ const bottomSheetRecipe = sva({
19195
19195
  });
19196
19196
  const BottomSheetContext = createContext$1({ rounded: 20 });
19197
19197
  const BottomSheet = forwardRef(
19198
- ({ children, snapPercent, fullHeight, className, rounded = 20, disableDrag, onClose, ...props }, ref) => {
19199
- const snapPoints = snapPercent ? [snapPercent.max * window.innerHeight, snapPercent.min * window.innerHeight] : void 0;
19198
+ ({
19199
+ children,
19200
+ snapPercent = { min: 0, max: null },
19201
+ maxSnapPoint,
19202
+ fullHeight,
19203
+ className,
19204
+ rounded = 20,
19205
+ disableDrag,
19206
+ onClose,
19207
+ ...props
19208
+ }, ref) => {
19209
+ let snapPercentPoints = null;
19210
+ if (snapPercent.min && snapPercent.max) {
19211
+ snapPercentPoints = [snapPercent.max * window.innerHeight, snapPercent.min * window.innerHeight];
19212
+ }
19213
+ const snapPoints = snapPercentPoints ? snapPercentPoints : maxSnapPoint ? [maxSnapPoint] : void 0;
19200
19214
  const styles2 = bottomSheetRecipe({ fullHeight });
19201
19215
  return /* @__PURE__ */ jsx(BottomSheetContext.Provider, { value: { rounded, onClose }, children: /* @__PURE__ */ jsx(
19202
19216
  Sheet,
19203
19217
  {
19204
19218
  ref,
19205
19219
  snapPoints,
19220
+ detent: !snapPercent.max && !maxSnapPoint ? "content-height" : void 0,
19206
19221
  initialSnap: 0,
19207
19222
  className: cx(styles2.root, className),
19208
19223
  onClose,