@loomhq/lens 10.32.13 → 10.32.14
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.
|
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import { autoUpdate, flip, offset as floatingUiOffset, shift, useFloating, } from '@floating-ui/react-dom';
|
|
12
|
+
import { autoUpdate, flip, offset as floatingUiOffset, limitShift, shift, useFloating, } from '@floating-ui/react-dom';
|
|
13
13
|
import React, { useEffect } from 'react';
|
|
14
14
|
import ReactDOM from 'react-dom';
|
|
15
15
|
import styled from '@emotion/styled';
|
|
@@ -55,13 +55,14 @@ const Popover = (_a) => {
|
|
|
55
55
|
const { x, y, reference, floating, strategy, update, refs } = useFloating({
|
|
56
56
|
placement: placements[placement],
|
|
57
57
|
middleware: [
|
|
58
|
-
flip({
|
|
59
|
-
fallbackPlacements: ['top', 'bottom'],
|
|
60
|
-
fallbackStrategy: 'initialPlacement',
|
|
61
|
-
}),
|
|
62
58
|
shift({
|
|
63
59
|
padding: unitBoundaryOffset,
|
|
64
60
|
boundary: boundaryElement ? getBoundaryElement() : undefined,
|
|
61
|
+
limiter: limitShift(),
|
|
62
|
+
}),
|
|
63
|
+
flip({
|
|
64
|
+
fallbackPlacements: ['top', 'bottom'],
|
|
65
|
+
fallbackStrategy: 'initialPlacement',
|
|
65
66
|
}),
|
|
66
67
|
floatingUiOffset(unitOffset),
|
|
67
68
|
],
|