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