@moda/om 17.9.1 → 17.11.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/CHANGELOG.md CHANGED
@@ -3,6 +3,20 @@
3
3
  All notable changes to this project will be documented in this file. See
4
4
  [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [17.11.0](https://github.com/ModaOperandi/om/compare/v17.10.0...v17.11.0) (2022-10-14)
7
+
8
+
9
+ ### Features
10
+
11
+ * **modaloverlay:** add autoFocus ([3f41d25](https://github.com/ModaOperandi/om/commit/3f41d2546e3ddde4b4c2e7786fcaf53eed12da78))
12
+
13
+ # [17.10.0](https://github.com/ModaOperandi/om/compare/v17.9.1...v17.10.0) (2022-10-14)
14
+
15
+
16
+ ### Features
17
+
18
+ * **modal:** make autoFocus optional ([#2970](https://github.com/ModaOperandi/om/issues/2970)) ([ec884b0](https://github.com/ModaOperandi/om/commit/ec884b0bcbe5c4fec3610c47f9afc397fe6d5c82))
19
+
6
20
  ## [17.9.1](https://github.com/ModaOperandi/om/compare/v17.9.0...v17.9.1) (2022-10-13)
7
21
 
8
22
 
package/dist/index.cjs.js CHANGED
@@ -11715,17 +11715,19 @@ var LoadingBalls = function LoadingBalls(_ref) {
11715
11715
  })));
11716
11716
  };
11717
11717
 
11718
- var _excluded$c = ["className", "children", "onClose", "shards"];
11718
+ var _excluded$c = ["className", "children", "onClose", "shards", "autoFocus"];
11719
11719
  var Modal = function Modal(_ref) {
11720
11720
  var className = _ref.className,
11721
11721
  children = _ref.children,
11722
11722
  onClose = _ref.onClose,
11723
11723
  shards = _ref.shards,
11724
+ autoFocus = _ref.autoFocus,
11724
11725
  rest = _objectWithoutProperties(_ref, _excluded$c);
11725
11726
 
11726
11727
  return /*#__PURE__*/React__default["default"].createElement("div", _extends$1({
11727
11728
  className: classNames('Modal', className)
11728
11729
  }, rest), /*#__PURE__*/React__default["default"].createElement(FocusOn, {
11730
+ autoFocus: autoFocus,
11729
11731
  shards: shards,
11730
11732
  onClickOutside: onClose,
11731
11733
  onEscapeKey: onClose
@@ -11769,7 +11771,7 @@ var Overlay = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
11769
11771
  });
11770
11772
  Overlay.displayName = 'Overlay';
11771
11773
 
11772
- var _excluded$a = ["children", "className", "contentClassName", "onClose", "overlayClassName", "show", "shards"];
11774
+ var _excluded$a = ["children", "className", "contentClassName", "onClose", "overlayClassName", "show", "shards", "autoFocus"];
11773
11775
  var ModalOverlay = function ModalOverlay(_ref) {
11774
11776
  var children = _ref.children,
11775
11777
  className = _ref.className,
@@ -11779,6 +11781,7 @@ var ModalOverlay = function ModalOverlay(_ref) {
11779
11781
  _ref$show = _ref.show,
11780
11782
  show = _ref$show === void 0 ? true : _ref$show,
11781
11783
  shards = _ref.shards,
11784
+ autoFocus = _ref.autoFocus,
11782
11785
  rest = _objectWithoutProperties(_ref, _excluded$a);
11783
11786
 
11784
11787
  var element = React.useMemo(function () {
@@ -11800,7 +11803,8 @@ var ModalOverlay = function ModalOverlay(_ref) {
11800
11803
  }, rest), /*#__PURE__*/React__default["default"].createElement(Modal, {
11801
11804
  className: classNames('ModalOverlay__modal', className),
11802
11805
  onClose: onClose,
11803
- shards: shards
11806
+ shards: shards,
11807
+ autoFocus: autoFocus
11804
11808
  }, /*#__PURE__*/React__default["default"].createElement("div", {
11805
11809
  className: classNames('ModalOverlay__content', contentClassName)
11806
11810
  }, children))), element);