@moda/om 15.11.2 → 15.11.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/index.esm.js CHANGED
@@ -11349,14 +11349,22 @@ var Popover = function Popover(_ref) {
11349
11349
  };
11350
11350
  }, [mode, smoothTransitioning]);
11351
11351
  useEffect(function () {
11352
- if (!open) return;
11353
-
11354
- if (smoothTransitioning) {
11352
+ if (open && smoothTransitioning) {
11355
11353
  setMode(Mode.Opening);
11356
11354
  }
11357
11355
 
11358
- setMode(Mode.Open);
11359
- }, [mode, open]);
11356
+ if (open && !smoothTransitioning) {
11357
+ setMode(Mode.Open);
11358
+ }
11359
+
11360
+ if (!open && smoothTransitioning) {
11361
+ setMode(Mode.Closing);
11362
+ }
11363
+
11364
+ if (!open && !smoothTransitioning) {
11365
+ setMode(Mode.Closed);
11366
+ }
11367
+ }, [open, smoothTransitioning]);
11360
11368
  var isOpen = mode === Mode.AutoOpen || mode === Mode.Opening || mode === Mode.Open || mode === Mode.Closing;
11361
11369
  return /*#__PURE__*/React__default.createElement("div", _extends$3({
11362
11370
  className: classNames("Popover Popover--anchor-".concat(anchor), className),