@lumx/react 3.11.1 → 3.11.2
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
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"url": "https://github.com/lumapps/design-system/issues"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@lumx/core": "^3.11.
|
|
10
|
-
"@lumx/icons": "^3.11.
|
|
9
|
+
"@lumx/core": "^3.11.2",
|
|
10
|
+
"@lumx/icons": "^3.11.2",
|
|
11
11
|
"@popperjs/core": "^2.5.4",
|
|
12
12
|
"body-scroll-lock": "^3.1.5",
|
|
13
13
|
"classnames": "^2.3.2",
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"build:storybook": "storybook build"
|
|
111
111
|
},
|
|
112
112
|
"sideEffects": false,
|
|
113
|
-
"version": "3.11.
|
|
113
|
+
"version": "3.11.2"
|
|
114
114
|
}
|
|
@@ -6,7 +6,7 @@ import classNames from 'classnames';
|
|
|
6
6
|
import { useCallbackOnEscape } from '@lumx/react/hooks/useCallbackOnEscape';
|
|
7
7
|
import { useFocus } from '@lumx/react/hooks/useFocus';
|
|
8
8
|
import { ClickAwayProvider } from '@lumx/react/utils/ClickAwayProvider';
|
|
9
|
-
import { DOCUMENT
|
|
9
|
+
import { DOCUMENT } from '@lumx/react/constants';
|
|
10
10
|
import { Comp, GenericProps, HasTheme } from '@lumx/react/utils/type';
|
|
11
11
|
import { getRootClassName, handleBasicClasses } from '@lumx/react/utils/className';
|
|
12
12
|
import { useMergeRefs } from '@lumx/react/utils/react/mergeRefs';
|
|
@@ -166,9 +166,8 @@ const _InnerPopover = forwardRef<PopoverProps, HTMLDivElement>((props, ref) => {
|
|
|
166
166
|
theme,
|
|
167
167
|
elevation: Math.min(elevation || 0, 5),
|
|
168
168
|
position,
|
|
169
|
+
isInitializing: !styles.popover?.transform,
|
|
169
170
|
}),
|
|
170
|
-
// Do not show the popover while it's not properly placed
|
|
171
|
-
!styles.popover?.transform ? VISUALLY_HIDDEN : undefined,
|
|
172
171
|
)}
|
|
173
172
|
style={styles.popover}
|
|
174
173
|
{...attributes.popper}
|
|
@@ -119,12 +119,13 @@ export const Tooltip = forwardRef<TooltipProps, HTMLDivElement>((props, ref) =>
|
|
|
119
119
|
|
|
120
120
|
// Update on open
|
|
121
121
|
React.useEffect(() => {
|
|
122
|
-
if (isOpen) update?.();
|
|
123
|
-
}, [isOpen, update]);
|
|
122
|
+
if (isOpen || popperElement) update?.();
|
|
123
|
+
}, [isOpen, update, popperElement]);
|
|
124
124
|
|
|
125
125
|
const labelLines = label ? label.split('\n') : [];
|
|
126
126
|
|
|
127
127
|
const tooltipRef = useMergeRefs(ref, setPopperElement, onPopperMount);
|
|
128
|
+
|
|
128
129
|
return (
|
|
129
130
|
<>
|
|
130
131
|
<TooltipContextProvider>{wrappedChildren}</TooltipContextProvider>
|
|
@@ -140,6 +141,7 @@ export const Tooltip = forwardRef<TooltipProps, HTMLDivElement>((props, ref) =>
|
|
|
140
141
|
handleBasicClasses({
|
|
141
142
|
prefix: CLASSNAME,
|
|
142
143
|
position,
|
|
144
|
+
isInitializing: !styles.popper?.transform,
|
|
143
145
|
}),
|
|
144
146
|
isHidden && VISUALLY_HIDDEN,
|
|
145
147
|
)}
|