@dynamic-framework/ui-react 1.9.0 → 1.9.1

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/dist/index.esm.js CHANGED
@@ -956,7 +956,7 @@ function DPopover({ children, renderComponent, isOpen, setEventIsOpen, adjustCon
956
956
  setEventIsOpen(value);
957
957
  }
958
958
  }, [setEventIsOpen]);
959
- const { refs, floatingStyles: floatingStylesBase, context, } = useFloating({
959
+ const { refs, floatingStyles, context, } = useFloating({
960
960
  open: innerIsOpen,
961
961
  onOpenChange,
962
962
  middleware: [
@@ -975,10 +975,10 @@ function DPopover({ children, renderComponent, isOpen, setEventIsOpen, adjustCon
975
975
  role,
976
976
  ]);
977
977
  const headingId = useId();
978
- const floatingStyles = useMemo(() => (Object.assign(Object.assign({}, floatingStylesBase), adjustContentToRender && {
978
+ const generateStyleVariables = useMemo(() => (Object.assign(Object.assign({}, style), adjustContentToRender && {
979
979
  [`--${PREFIX_BS}popover-component-min-width`]: 'auto',
980
- })), [floatingStylesBase, adjustContentToRender]);
981
- return (jsxs("div", { className: classNames('d-popover', className), style: style, children: [jsx("div", Object.assign({ ref: refs.setReference }, getReferenceProps(), { children: renderComponent(innerIsOpen) })), innerIsOpen && (jsx(FloatingFocusManager, { context: context, modal: false, children: jsx("div", Object.assign({ className: classNames('d-popover-content', {
980
+ })), [style, adjustContentToRender]);
981
+ return (jsxs("div", { className: classNames('d-popover', className), style: generateStyleVariables, children: [jsx("div", Object.assign({ ref: refs.setReference }, getReferenceProps(), { children: renderComponent(innerIsOpen) })), innerIsOpen && (jsx(FloatingFocusManager, { context: context, modal: false, children: jsx("div", Object.assign({ className: classNames('d-popover-content', {
982
982
  'w-100': adjustContentToRender,
983
983
  }), ref: refs.setFloating, style: floatingStyles, "aria-labelledby": headingId }, getFloatingProps(), { children: children })) }))] }));
984
984
  }