Popper Core Versions Save

A JavaScript library to position floating elements and create interactions for them.

@floating-ui/[email protected]

3 weeks ago

Patch Changes

  • fix(FloatingFocusManager): place fallback focus on element with floating props
  • feat(FloatingFocusManager): restoreFocus prop. This enables automatic restoration of focus to the nearest tabbable element if the element that currently has focus inside the floating element is removed from the DOM.
  • fix(useHover): fix restMs options throwing SyntheticEvent warning on React < 17

@floating-ui/[email protected]

1 month ago

Patch Changes

  • fix(types): re-export all missing core types
  • feat: support dependency array as a second argument of all middleware. This ensures stateful options can be kept reactive when making them derived (passing a function that returns the options):
const [value, setValue] = React.useState(0);

const offset1 = offset(value); // reactive
const offset2 = offset(() => value); // NOT reactive
const offset3 = offset(() => value, [value]); // reactive

This also includes size's apply function:

size(
  {
    apply() {
      value; // reactive
    },
  },
  [value],
);

@floating-ui/[email protected]

1 month ago

Minor Changes

  • feat: support dependency array as a second argument of all middleware. This ensures stateful options can be kept reactive when making them derived (passing a function that returns the options):
const [value, setValue] = React.useState(0);

const offset1 = offset(value); // reactive
const offset2 = offset(() => value); // NOT reactive
const offset3 = offset(() => value, [value]); // reactive

This also includes size's apply function:

size(
  {
    apply() {
      value; // reactive
    },
  },
  [value],
);

@floating-ui/[email protected]

1 month ago

Patch Changes

  • fix(useListNavigation): correct scrollIntoView and focus behavior with virtual focus and inner DOM-focused element + FloatingList
  • fix(FloatingPortal): prevent undefined id with unconditional rendering in React <18
  • fix(useListNavigation): prevent selectedIndex changes from stealing focus
  • fix(FloatingDelayGroup): prevent hydration error with Suspense
  • fix(useListNavigation, Composite): correct index calculations for grid navigation with nullish and disabled items when disabledIndices is inferred
  • perf(markOthers): avoid applying attributes to script tags needlessly
  • Update dependencies: @floating-ui/[email protected]

@floating-ui/[email protected]

1 month ago

Patch Changes

  • fix(useTransitionStatus): guard isMounted check and remove unneeded initiated state. Prevents an infinite loop when called in a component with an unstable callback ref.

@floating-ui/[email protected]

1 month ago

Patch Changes

  • fix(size): correctly constrain floating element to avoid overflowing outside viewport with shift({crossAxis: true})

@floating-ui/[email protected]

1 month ago

Patch Changes

  • feat: add useFloatingRootContext Hook, which enables calling interaction hooks in a component higher in the tree than useFloating is called in. This supports spreading reference props onto an "external" reference element. External reference documentation.

@floating-ui/[email protected]

1 month ago

Patch Changes

  • fix: correctly calculate <svg> arrow element offsetParent. Fixes arrow positioning when styling an inner element of the floating element with a border.
  • fix: ignore clippingAncestors collision boundary for top layer elements
  • fix(types): correct OffsetOptions alias

@floating-ui/[email protected]

2 months ago

Patch Changes

  • fix: avoid spreading rects to support DOMRect types

@floating-ui/[email protected]

2 months ago

Patch Changes

  • fix(types): replace React_2 with React in generated .d.ts files