@lumx/react 4.4.1-alpha.2 → 4.4.1-alpha.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/index.d.ts CHANGED
@@ -753,7 +753,7 @@ interface ButtonProps extends GenericProps$1, ReactToJSX<ButtonProps$1> {
753
753
  * @param ref Component ref.
754
754
  * @return React element.
755
755
  */
756
- declare const Button: Comp<ButtonProps, HTMLButtonElement | HTMLAnchorElement>;
756
+ declare const Button: Comp<ButtonProps, HTMLAnchorElement | HTMLButtonElement>;
757
757
 
758
758
  interface IconButtonProps$1 extends BaseButtonProps {
759
759
  /**
@@ -2259,7 +2259,7 @@ interface LinkProps extends GenericProps$1, ReactToJSX<LinkProps$1> {
2259
2259
  * @param ref Component ref.
2260
2260
  * @return React element.
2261
2261
  */
2262
- declare const Link: Comp<LinkProps, HTMLButtonElement | HTMLAnchorElement>;
2262
+ declare const Link: Comp<LinkProps, HTMLAnchorElement | HTMLButtonElement>;
2263
2263
 
2264
2264
  /**
2265
2265
  * Defines the props of the component.
package/index.js CHANGED
@@ -6417,12 +6417,16 @@ function usePopoverStyle({
6417
6417
  middlewareData
6418
6418
  } = useFloating({
6419
6419
  placement: floatingPlacement,
6420
- whileElementsMounted: autoUpdate,
6421
- middleware,
6422
- elements: {
6423
- reference: anchorElement,
6424
- floating: popperElement
6425
- }
6420
+ // Disable autoUpdate and element refs in non-browser environments (e.g. jsdom) to avoid
6421
+ // flushSync act() warnings from @floating-ui/react-dom (positioning is not meaningful in jsdom anyway).
6422
+ ...(IS_BROWSER$1 ? {
6423
+ whileElementsMounted: autoUpdate,
6424
+ elements: {
6425
+ reference: anchorElement,
6426
+ floating: popperElement
6427
+ }
6428
+ } : {}),
6429
+ middleware
6426
6430
  });
6427
6431
  const position = resolvedPlacement ?? placement;
6428
6432
 
@@ -15190,12 +15194,16 @@ const Tooltip = forwardRef((props, ref) => {
15190
15194
  placement: resolvedPlacement
15191
15195
  } = useFloating({
15192
15196
  placement: placement,
15193
- whileElementsMounted: autoUpdate,
15194
- middleware: [offset(ARROW_SIZE)],
15195
- elements: {
15196
- reference: anchorElement,
15197
- floating: popperElement
15198
- }
15197
+ // Disable autoUpdate and element refs in non-browser environments (e.g. jsdom) to avoid
15198
+ // flushSync act() warnings from @floating-ui/react-dom (positioning is not meaningful in jsdom anyway).
15199
+ ...(IS_BROWSER$1 ? {
15200
+ whileElementsMounted: autoUpdate,
15201
+ elements: {
15202
+ reference: anchorElement,
15203
+ floating: popperElement
15204
+ }
15205
+ } : {}),
15206
+ middleware: [offset(ARROW_SIZE)]
15199
15207
  });
15200
15208
  const position = resolvedPlacement ?? placement;
15201
15209
  const {