@indico-data/design-system 2.32.0 → 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.js CHANGED
@@ -5543,6 +5543,7 @@ const Button$2 = React$1.forwardRef((props, ref) => {
5543
5543
  [`btn--${color}`]: color,
5544
5544
  [`btn--${variant}`]: variant,
5545
5545
  [`btn--${size}`]: size,
5546
+ 'btn--icon-only': !children && iconName,
5546
5547
  'btn--loading': isLoading,
5547
5548
  }, className);
5548
5549
  const handleOnClick = (event) => {
@@ -5550,7 +5551,7 @@ const Button$2 = React$1.forwardRef((props, ref) => {
5550
5551
  onClick(event);
5551
5552
  }
5552
5553
  };
5553
- return (jsxRuntime.jsxs("button", Object.assign({ ref: ref, disabled: isLoading || isDisabled, className: buttonClasses, role: "button", onClick: handleOnClick, "aria-label": ariaLabel || 'button', "aria-disabled": isLoading || isDisabled, "aria-busy": isLoading, type: type, onMouseEnter: onMouseEnter, onMouseLeave: onMouseExit, onKeyDown: onKeyDown }, rest, { children: [isLoading && (jsxRuntime.jsx(Icon, { name: "fa-circle-notch", style: { animation: 'spin 1s linear infinite' }, className: "mr-2", ariaLabel: "Loading..." })), !children && iconName && jsxRuntime.jsx(Icon, { name: iconName, ariaLabel: `${iconName} Icon` }), children && iconPosition === 'left' && iconName && (jsxRuntime.jsx(Icon, { name: iconName, className: "mr-2", ariaLabel: `${iconName} Icon` })), children, children && iconPosition === 'right' && iconName && (jsxRuntime.jsx(Icon, { name: iconName, className: "ml-2", ariaLabel: `${iconName} Icon` }))] })));
5554
+ return (jsxRuntime.jsxs("button", Object.assign({ ref: ref, disabled: isLoading || isDisabled, className: buttonClasses, role: "button", onClick: handleOnClick, "aria-label": ariaLabel || 'button', "aria-disabled": isLoading || isDisabled, "aria-busy": isLoading, type: type, onMouseEnter: onMouseEnter, onMouseLeave: onMouseExit, onKeyDown: onKeyDown }, rest, { children: [isLoading && (jsxRuntime.jsx(Icon, { name: "fa-circle-notch", style: { animation: 'spin 1s linear infinite' }, className: "mr-2", ariaLabel: "Loading...", size: size })), !children && iconName && jsxRuntime.jsx(Icon, { name: iconName, ariaLabel: `${iconName} Icon`, size: size }), children && iconPosition === 'left' && iconName && (jsxRuntime.jsx(Icon, { name: iconName, className: "mr-2", ariaLabel: `${iconName} Icon`, size: size })), children, children && iconPosition === 'right' && iconName && (jsxRuntime.jsx(Icon, { name: iconName, className: "ml-2", ariaLabel: `${iconName} Icon`, size: size }))] })));
5554
5555
  });
5555
5556
 
5556
5557
  function ownKeys$2(object, enumerableOnly) {
@@ -22061,7 +22062,7 @@ const defaultOptions$1 = {
22061
22062
  placement: 'bottom-start',
22062
22063
  middleware: [offset$4(5), flip$4(), shift$2()],
22063
22064
  };
22064
- function FloatUI({ children, ariaLabel, isOpen: controlledIsOpen, setIsOpen: controlledSetIsOpen, isPortal = false, floatingOptions = defaultOptions$1, }) {
22065
+ function FloatUI({ children, ariaLabel, isOpen: controlledIsOpen, setIsOpen: controlledSetIsOpen, isPortal = false, portalOptions = {}, floatingOptions = defaultOptions$1, }) {
22065
22066
  const [internalIsOpen, setInternalIsOpen] = React$1.useState(false);
22066
22067
  // Determine whether the component is controlled or uncontrolled
22067
22068
  const isControlled = controlledIsOpen !== undefined && controlledSetIsOpen !== undefined;
@@ -22088,7 +22089,8 @@ function FloatUI({ children, ariaLabel, isOpen: controlledIsOpen, setIsOpen: con
22088
22089
  top: y !== null && y !== void 0 ? y : 0,
22089
22090
  left: x !== null && x !== void 0 ? x : 0,
22090
22091
  }, role: "dialog", "aria-label": ariaLabel, className: "floatui-container", children: jsxRuntime.jsx("div", { ref: floatUIContentRef, className: "floatui-content", children: content }) }));
22091
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { ref: referenceElementRef, onClick: () => setIsOpen(!isOpen), children: trigger }), isOpen && (isPortal ? jsxRuntime.jsx(FloatingPortal, { children: tooltipContent }) : tooltipContent)] }));
22092
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { ref: referenceElementRef, onClick: () => setIsOpen(!isOpen), children: trigger }), isOpen &&
22093
+ (isPortal ? (jsxRuntime.jsx(FloatingPortal, { id: portalOptions === null || portalOptions === void 0 ? void 0 : portalOptions.rootId, children: tooltipContent })) : (tooltipContent))] }));
22092
22094
  }
22093
22095
 
22094
22096
  function Menu({ children }) {