@homebound/beam 2.395.0 → 2.397.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/dist/index.d.cts CHANGED
@@ -8298,6 +8298,7 @@ interface UseToastProps {
8298
8298
  }
8299
8299
  declare function useToast(): UseToastProps;
8300
8300
 
8301
+ type TooltipXss = Xss<Padding | "borderRadius">;
8301
8302
  interface TooltipProps {
8302
8303
  /** The content that shows up when hovered */
8303
8304
  title: ReactNode;
@@ -8306,6 +8307,7 @@ interface TooltipProps {
8306
8307
  delay?: number;
8307
8308
  disabled?: boolean;
8308
8309
  bgColor?: Palette;
8310
+ xss?: TooltipXss;
8309
8311
  }
8310
8312
  declare function Tooltip(props: TooltipProps): _emotion_react_jsx_runtime.JSX.Element;
8311
8313
  type Placement = "top" | "bottom" | "left" | "right" | "auto";
package/dist/index.d.ts CHANGED
@@ -8298,6 +8298,7 @@ interface UseToastProps {
8298
8298
  }
8299
8299
  declare function useToast(): UseToastProps;
8300
8300
 
8301
+ type TooltipXss = Xss<Padding | "borderRadius">;
8301
8302
  interface TooltipProps {
8302
8303
  /** The content that shows up when hovered */
8303
8304
  title: ReactNode;
@@ -8306,6 +8307,7 @@ interface TooltipProps {
8306
8307
  delay?: number;
8307
8308
  disabled?: boolean;
8308
8309
  bgColor?: Palette;
8310
+ xss?: TooltipXss;
8309
8311
  }
8310
8312
  declare function Tooltip(props: TooltipProps): _emotion_react_jsx_runtime.JSX.Element;
8311
8313
  type Placement = "top" | "bottom" | "left" | "right" | "auto";
package/dist/index.js CHANGED
@@ -4169,7 +4169,7 @@ import { usePopper } from "react-popper";
4169
4169
  import { useTooltipTriggerState } from "react-stately";
4170
4170
  import { Fragment, jsx as jsx2, jsxs } from "@emotion/react/jsx-runtime";
4171
4171
  function Tooltip(props) {
4172
- const { placement, children, title, disabled, delay = 0, bgColor } = props;
4172
+ const { placement, children, title, disabled, delay = 0, bgColor, xss } = props;
4173
4173
  const state = useTooltipTriggerState({ delay, isDisabled: disabled });
4174
4174
  const triggerRef = useRef2(null);
4175
4175
  const { triggerProps, tooltipProps: _tooltipProps } = useTooltipTrigger({ isDisabled: disabled }, state, triggerRef);
@@ -4196,12 +4196,13 @@ function Tooltip(props) {
4196
4196
  triggerRef,
4197
4197
  content: title,
4198
4198
  placement,
4199
- bgColor
4199
+ bgColor,
4200
+ xss
4200
4201
  }
4201
4202
  )
4202
4203
  ] });
4203
4204
  }
4204
- function Popper({ triggerRef, content, placement = "auto", bgColor = "rgba(36, 36, 36, 1)" /* Gray900 */ }) {
4205
+ function Popper({ triggerRef, content, placement = "auto", xss, bgColor = "rgba(36, 36, 36, 1)" /* Gray900 */ }) {
4205
4206
  const popperRef = useRef2(null);
4206
4207
  const [arrowRef, setArrowRef] = useState2(null);
4207
4208
  const targetElement = triggerRef.current ? triggerRef.current.children[0] ?? triggerRef.current.parentElement : null;
@@ -4219,7 +4220,10 @@ function Popper({ triggerRef, content, placement = "auto", bgColor = "rgba(36, 3
4219
4220
  ref: popperRef,
4220
4221
  style: styles.popper,
4221
4222
  ...attributes.popper,
4222
- css: Css.maxw("320px").bgColor(bgColor).bshBasic.white.px1.py("4px").br4.xs.add("zIndex", 999999).$,
4223
+ css: {
4224
+ ...Css.maxw("320px").bgColor(bgColor).bshBasic.white.px1.py("4px").br4.xs.z(999999).$,
4225
+ ...xss
4226
+ },
4223
4227
  children: [
4224
4228
  /* @__PURE__ */ jsx2("div", { ref: setArrowRef, style: { ...styles.arrow }, id: "arrow" }),
4225
4229
  content
@@ -5373,7 +5377,7 @@ function IconButton(props) {
5373
5377
  }
5374
5378
  );
5375
5379
  return maybeTooltip({
5376
- title: resolveTooltip(disabled, tooltip),
5380
+ title: resolveTooltip(disabled ?? label, tooltip),
5377
5381
  placement: "top",
5378
5382
  children: getButtonOrLink(buttonContent, onPress, buttonAttrs, openInNew, download)
5379
5383
  });