@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moda/om",
3
- "version": "15.11.2",
3
+ "version": "15.11.3",
4
4
  "description": "Moda Operandi design system",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -104,14 +104,22 @@ export const Popover: React.FC<PopoverProps> = ({
104
104
  }, [mode, smoothTransitioning]);
105
105
 
106
106
  useEffect(() => {
107
- if (!open) return;
108
-
109
- if (smoothTransitioning) {
107
+ if (open && smoothTransitioning) {
110
108
  setMode(Mode.Opening);
111
109
  }
112
110
 
113
- setMode(Mode.Open);
114
- }, [mode, open]);
111
+ if (open && !smoothTransitioning) {
112
+ setMode(Mode.Open);
113
+ }
114
+
115
+ if (!open && smoothTransitioning) {
116
+ setMode(Mode.Closing);
117
+ }
118
+
119
+ if (!open && !smoothTransitioning) {
120
+ setMode(Mode.Closed);
121
+ }
122
+ }, [open, smoothTransitioning]);
115
123
 
116
124
  const isOpen =
117
125
  mode === Mode.AutoOpen || mode === Mode.Opening || mode === Mode.Open || mode === Mode.Closing;