@charcoal-ui/react 2.0.0 → 2.0.1

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.
@@ -10,7 +10,7 @@ import { useToggleState, useSelectState, Item, useRadioGroupState } from 'react-
10
10
  import { useTextField } from '@react-aria/textfield';
11
11
  import { useVisuallyHidden } from '@react-aria/visually-hidden';
12
12
  import '@charcoal-ui/icons';
13
- import { useOverlay, usePreventScroll, useModal, OverlayContainer, DismissButton } from '@react-aria/overlays';
13
+ import { useOverlay, usePreventScroll, useModalOverlay, Overlay, DismissButton } from '@react-aria/overlays';
14
14
  import { FocusScope, focusSafely, getFocusableTreeWalker, useFocusRing } from '@react-aria/focus';
15
15
  import { useDialog } from '@react-aria/dialog';
16
16
  import { animated, useTransition, easings } from 'react-spring';
@@ -1286,8 +1286,7 @@ function Modal(_ref) {
1286
1286
 
1287
1287
  let {
1288
1288
  children,
1289
- zIndex = DEFAULT_Z_INDEX,
1290
- portalContainer
1289
+ zIndex = DEFAULT_Z_INDEX
1291
1290
  } = _ref,
1292
1291
  props = _objectWithoutPropertiesLoose(_ref, _excluded$5);
1293
1292
 
@@ -1307,7 +1306,18 @@ function Modal(_ref) {
1307
1306
  usePreventScroll();
1308
1307
  const {
1309
1308
  modalProps
1310
- } = useModal();
1309
+ } = useModalOverlay(props, {
1310
+ close: onClose,
1311
+ isOpen: isOpen,
1312
+ // these props are not used actually.
1313
+ // https://github.com/adobe/react-spectrum/blob/df14e3fb129b94b310f0397a701b83f006b51dfe/packages/%40react-aria/overlays/src/useModalOverlay.ts
1314
+ open: () => {// nope
1315
+ },
1316
+ setOpen: () => {// nope
1317
+ },
1318
+ toggle: () => {// nope
1319
+ }
1320
+ }, ref);
1311
1321
  const {
1312
1322
  dialogProps,
1313
1323
  titleProps
@@ -1339,9 +1349,7 @@ function Modal(_ref) {
1339
1349
  return transition(({
1340
1350
  backgroundColor,
1341
1351
  transform
1342
- }, item) => item && /*#__PURE__*/React.createElement(OverlayContainer, {
1343
- portalContainer: portalContainer
1344
- }, /*#__PURE__*/React.createElement(ModalBackground, _extends({
1352
+ }, item) => item && /*#__PURE__*/React.createElement(Overlay, null, /*#__PURE__*/React.createElement(ModalBackground, _extends({
1345
1353
  zIndex: zIndex
1346
1354
  }, underlayProps, {
1347
1355
  style: transitionEnabled ? {