@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/CHANGELOG.md CHANGED
@@ -3,6 +3,13 @@
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
+ ## [15.11.3](https://github.com/ModaOperandi/om/compare/v15.11.2...v15.11.3) (2021-12-13)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **popover:** fixes open & !open logic ([#2265](https://github.com/ModaOperandi/om/issues/2265)) ([21e5bc9](https://github.com/ModaOperandi/om/commit/21e5bc995297ca3eeaaf4c4e0361ddb4860bd7b7))
12
+
6
13
  ## [15.11.2](https://github.com/ModaOperandi/om/compare/v15.11.1...v15.11.2) (2021-12-10)
7
14
 
8
15
 
package/dist/index.cjs.js CHANGED
@@ -11376,14 +11376,22 @@ var Popover = function Popover(_ref) {
11376
11376
  };
11377
11377
  }, [mode, smoothTransitioning]);
11378
11378
  React$2.useEffect(function () {
11379
- if (!open) return;
11380
-
11381
- if (smoothTransitioning) {
11379
+ if (open && smoothTransitioning) {
11382
11380
  setMode(Mode.Opening);
11383
11381
  }
11384
11382
 
11385
- setMode(Mode.Open);
11386
- }, [mode, open]);
11383
+ if (open && !smoothTransitioning) {
11384
+ setMode(Mode.Open);
11385
+ }
11386
+
11387
+ if (!open && smoothTransitioning) {
11388
+ setMode(Mode.Closing);
11389
+ }
11390
+
11391
+ if (!open && !smoothTransitioning) {
11392
+ setMode(Mode.Closed);
11393
+ }
11394
+ }, [open, smoothTransitioning]);
11387
11395
  var isOpen = mode === Mode.AutoOpen || mode === Mode.Opening || mode === Mode.Open || mode === Mode.Closing;
11388
11396
  return /*#__PURE__*/React__default["default"].createElement("div", _extends$3({
11389
11397
  className: classNames("Popover Popover--anchor-".concat(anchor), className),