@react-spectrum/overlays 5.5.1 → 5.5.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/import.mjs CHANGED
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import "./main.css";
2
4
  import {Provider as $fQOb3$Provider} from "@react-spectrum/provider";
3
5
  import $fQOb3$react, {useState as $fQOb3$useState, useCallback as $fQOb3$useCallback, useRef as $fQOb3$useRef, forwardRef as $fQOb3$forwardRef} from "react";
@@ -7,9 +9,11 @@ import {useDOMRef as $fQOb3$useDOMRef, useStyleProps as $fQOb3$useStyleProps, cl
7
9
  import {useFocusWithin as $fQOb3$useFocusWithin} from "@react-aria/interactions";
8
10
  import {mergeProps as $fQOb3$mergeProps, useLayoutEffect as $fQOb3$useLayoutEffect, useViewportSize as $fQOb3$useViewportSize} from "@react-aria/utils";
9
11
 
12
+
10
13
  function $parcel$interopDefault(a) {
11
14
  return a && a.__esModule ? a.default : a;
12
15
  }
16
+
13
17
  function $parcel$export(e, n, v, s) {
14
18
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
15
19
  }
@@ -335,7 +339,7 @@ function $17b503f7de08fecc$var$Popover(props, ref) {
335
339
  }, children));
336
340
  }
337
341
  const $17b503f7de08fecc$var$PopoverWrapper = /*#__PURE__*/ (0, $fQOb3$forwardRef)((props, ref)=>{
338
- let { children: children, isOpen: isOpen, hideArrow: hideArrow, isNonModal: isNonModal, enableBothDismissButtons: enableBothDismissButtons, state: state, wrapperRef: wrapperRef } = props;
342
+ let { children: children, isOpen: isOpen, hideArrow: hideArrow, isNonModal: isNonModal, enableBothDismissButtons: enableBothDismissButtons, state: state, wrapperRef: wrapperRef, onDismissButtonPress: onDismissButtonPress = ()=>state.close() } = props;
339
343
  let { styleProps: styleProps } = (0, $fQOb3$useStyleProps)(props);
340
344
  let { size: size, borderWidth: borderWidth, arrowRef: arrowRef } = $17b503f7de08fecc$var$useArrowSize();
341
345
  const borderRadius = $17b503f7de08fecc$var$usePopoverBorderRadius(ref);
@@ -378,7 +382,7 @@ const $17b503f7de08fecc$var$PopoverWrapper = /*#__PURE__*/ (0, $fQOb3$forwardRef
378
382
  role: "presentation",
379
383
  "data-testid": "popover"
380
384
  }, (!isNonModal || enableBothDismissButtons) && /*#__PURE__*/ (0, $fQOb3$react).createElement((0, $fQOb3$DismissButton), {
381
- onDismiss: state.close
385
+ onDismiss: onDismissButtonPress
382
386
  }), children, hideArrow ? null : /*#__PURE__*/ (0, $fQOb3$react).createElement($17b503f7de08fecc$var$Arrow, {
383
387
  arrowProps: arrowProps,
384
388
  isLandscape: $17b503f7de08fecc$var$arrowPlacement[placement] === "bottom",
@@ -387,7 +391,7 @@ const $17b503f7de08fecc$var$PopoverWrapper = /*#__PURE__*/ (0, $fQOb3$forwardRef
387
391
  secondary: secondary,
388
392
  borderDiagonal: borderDiagonal
389
393
  }), /*#__PURE__*/ (0, $fQOb3$react).createElement((0, $fQOb3$DismissButton), {
390
- onDismiss: state.close
394
+ onDismiss: onDismissButtonPress
391
395
  })));
392
396
  });
393
397
  function $17b503f7de08fecc$var$usePopoverBorderRadius(popoverRef) {