@indico-data/design-system 2.32.1 → 2.33.0

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/lib/index.d.ts CHANGED
@@ -1066,10 +1066,13 @@ type FloatUIProps = {
1066
1066
  floatingOptions?: UseFloatingOptions;
1067
1067
  isOpen?: boolean;
1068
1068
  isPortal?: boolean;
1069
+ portalOptions?: {
1070
+ rootId?: string;
1071
+ };
1069
1072
  setIsOpen?: React.Dispatch<React.SetStateAction<boolean>>;
1070
1073
  };
1071
1074
 
1072
- declare function FloatUI({ children, ariaLabel, isOpen: controlledIsOpen, setIsOpen: controlledSetIsOpen, isPortal, floatingOptions, }: FloatUIProps): react_jsx_runtime.JSX.Element;
1075
+ declare function FloatUI({ children, ariaLabel, isOpen: controlledIsOpen, setIsOpen: controlledSetIsOpen, isPortal, portalOptions, floatingOptions, }: FloatUIProps): react_jsx_runtime.JSX.Element;
1073
1076
 
1074
1077
  type MenuProps = {
1075
1078
  children: React$1.ReactNode;
package/lib/index.esm.js CHANGED
@@ -22037,7 +22037,7 @@ const defaultOptions$1 = {
22037
22037
  placement: 'bottom-start',
22038
22038
  middleware: [offset$4(5), flip$4(), shift$2()],
22039
22039
  };
22040
- function FloatUI({ children, ariaLabel, isOpen: controlledIsOpen, setIsOpen: controlledSetIsOpen, isPortal = false, floatingOptions = defaultOptions$1, }) {
22040
+ function FloatUI({ children, ariaLabel, isOpen: controlledIsOpen, setIsOpen: controlledSetIsOpen, isPortal = false, portalOptions = {}, floatingOptions = defaultOptions$1, }) {
22041
22041
  const [internalIsOpen, setInternalIsOpen] = useState(false);
22042
22042
  // Determine whether the component is controlled or uncontrolled
22043
22043
  const isControlled = controlledIsOpen !== undefined && controlledSetIsOpen !== undefined;
@@ -22064,7 +22064,8 @@ function FloatUI({ children, ariaLabel, isOpen: controlledIsOpen, setIsOpen: con
22064
22064
  top: y !== null && y !== void 0 ? y : 0,
22065
22065
  left: x !== null && x !== void 0 ? x : 0,
22066
22066
  }, role: "dialog", "aria-label": ariaLabel, className: "floatui-container", children: jsx("div", { ref: floatUIContentRef, className: "floatui-content", children: content }) }));
22067
- return (jsxs(Fragment, { children: [jsx("div", { ref: referenceElementRef, onClick: () => setIsOpen(!isOpen), children: trigger }), isOpen && (isPortal ? jsx(FloatingPortal, { children: tooltipContent }) : tooltipContent)] }));
22067
+ return (jsxs(Fragment, { children: [jsx("div", { ref: referenceElementRef, onClick: () => setIsOpen(!isOpen), children: trigger }), isOpen &&
22068
+ (isPortal ? (jsx(FloatingPortal, { id: portalOptions === null || portalOptions === void 0 ? void 0 : portalOptions.rootId, children: tooltipContent })) : (tooltipContent))] }));
22068
22069
  }
22069
22070
 
22070
22071
  function Menu({ children }) {