@homebound/beam 2.399.0 → 2.400.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
@@ -6872,6 +6872,8 @@ interface RadioGroupFieldProps<K extends string> extends Pick<PresentationFieldP
6872
6872
  helperText?: string | ReactNode;
6873
6873
  onBlur?: () => void;
6874
6874
  onFocus?: () => void;
6875
+ /** The group name for the radio group. Only for legacy pages with custom layouts - avoid using this. */
6876
+ unsupportedNameHack?: string;
6875
6877
  }
6876
6878
  /**
6877
6879
  * Provides a radio group with label.
@@ -8312,12 +8314,23 @@ interface UseToastProps {
8312
8314
  declare function useToast(): UseToastProps;
8313
8315
 
8314
8316
  type TooltipXss = Xss<Padding | "borderRadius">;
8317
+ /** Note: Only 1 tooltip is ever on screen at a time */
8315
8318
  interface TooltipProps {
8316
8319
  /** The content that shows up when hovered */
8317
8320
  title: ReactNode;
8318
8321
  children: ReactNode;
8319
8322
  placement?: Placement;
8323
+ /**
8324
+ * The delay for the tooltip to appear.
8325
+ *
8326
+ * Note: If tooltip `A` is still showing when tooltip `B` is triggered, tooltip `B`'s `delay` property will be ignored and it will render immediately.
8327
+ * @default 0
8328
+ */
8320
8329
  delay?: number;
8330
+ /** The delay time for the tooltip to disappear.
8331
+ * @default 500
8332
+ */
8333
+ closeDelay?: number;
8321
8334
  disabled?: boolean;
8322
8335
  bgColor?: Palette;
8323
8336
  xss?: TooltipXss;
package/dist/index.d.ts CHANGED
@@ -6872,6 +6872,8 @@ interface RadioGroupFieldProps<K extends string> extends Pick<PresentationFieldP
6872
6872
  helperText?: string | ReactNode;
6873
6873
  onBlur?: () => void;
6874
6874
  onFocus?: () => void;
6875
+ /** The group name for the radio group. Only for legacy pages with custom layouts - avoid using this. */
6876
+ unsupportedNameHack?: string;
6875
6877
  }
6876
6878
  /**
6877
6879
  * Provides a radio group with label.
@@ -8312,12 +8314,23 @@ interface UseToastProps {
8312
8314
  declare function useToast(): UseToastProps;
8313
8315
 
8314
8316
  type TooltipXss = Xss<Padding | "borderRadius">;
8317
+ /** Note: Only 1 tooltip is ever on screen at a time */
8315
8318
  interface TooltipProps {
8316
8319
  /** The content that shows up when hovered */
8317
8320
  title: ReactNode;
8318
8321
  children: ReactNode;
8319
8322
  placement?: Placement;
8323
+ /**
8324
+ * The delay for the tooltip to appear.
8325
+ *
8326
+ * Note: If tooltip `A` is still showing when tooltip `B` is triggered, tooltip `B`'s `delay` property will be ignored and it will render immediately.
8327
+ * @default 0
8328
+ */
8320
8329
  delay?: number;
8330
+ /** The delay time for the tooltip to disappear.
8331
+ * @default 500
8332
+ */
8333
+ closeDelay?: number;
8321
8334
  disabled?: boolean;
8322
8335
  bgColor?: Palette;
8323
8336
  xss?: TooltipXss;
package/dist/index.js CHANGED
@@ -4169,8 +4169,8 @@ 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, xss } = props;
4173
- const state = useTooltipTriggerState({ delay, isDisabled: disabled });
4172
+ const { placement, children, title, disabled, delay = 0, closeDelay = 500, bgColor, xss } = props;
4173
+ const state = useTooltipTriggerState({ delay, closeDelay, isDisabled: disabled });
4174
4174
  const triggerRef = useRef2(null);
4175
4175
  const { triggerProps, tooltipProps: _tooltipProps } = useTooltipTrigger({ isDisabled: disabled }, state, triggerRef);
4176
4176
  const { tooltipProps } = useTooltip(_tooltipProps, state);
@@ -4183,7 +4183,7 @@ function Tooltip(props) {
4183
4183
  ...triggerProps,
4184
4184
  ...!state.isOpen && typeof title === "string" ? { title } : {},
4185
4185
  ...tid,
4186
- css: Css.display("contents").addIn(":active", Css.add("pointerEvents", "none").$).$,
4186
+ css: Css.display("contents").addIn(":active:not(:has(a))", Css.add("pointerEvents", "none").$).$,
4187
4187
  draggable: true,
4188
4188
  onDragStart: (e) => e.preventDefault(),
4189
4189
  children
@@ -11458,17 +11458,28 @@ import { useRadioGroupState } from "react-stately";
11458
11458
  import { jsx as jsx68, jsxs as jsxs38 } from "@emotion/react/jsx-runtime";
11459
11459
  var nextNameId = 0;
11460
11460
  function RadioGroupField(props) {
11461
- const { label, labelStyle, value, onChange, options, disabled = false, errorMsg, helperText, ...otherProps } = props;
11462
- const name = useMemo18(() => `radio-group-${++nextNameId}`, []);
11461
+ const {
11462
+ label,
11463
+ labelStyle,
11464
+ value,
11465
+ onChange,
11466
+ options,
11467
+ disabled = false,
11468
+ errorMsg,
11469
+ helperText,
11470
+ unsupportedNameHack,
11471
+ ...otherProps
11472
+ } = props;
11473
+ const groupName = useMemo18(() => unsupportedNameHack ?? `radio-group-${++nextNameId}`, [unsupportedNameHack]);
11463
11474
  const state = useRadioGroupState({
11464
- name,
11475
+ name: groupName,
11465
11476
  value,
11466
11477
  onChange: (value2) => onChange(value2),
11467
11478
  isDisabled: disabled,
11468
11479
  isReadOnly: false
11469
11480
  });
11470
11481
  const tid = useTestIds(props, defaultTestId(label));
11471
- const { labelProps, radioGroupProps } = useRadioGroup({ label, isDisabled: disabled }, state);
11482
+ const { labelProps, radioGroupProps } = useRadioGroup({ label, isDisabled: disabled, name: groupName }, state);
11472
11483
  return (
11473
11484
  // default styling to position `<Label />` above.
11474
11485
  /* @__PURE__ */ jsxs38("div", { css: Css.df.fdc.gap1.aifs.if(labelStyle === "left").fdr.gap2.jcsb.$, children: [
@@ -11482,7 +11493,7 @@ function RadioGroupField(props) {
11482
11493
  children: /* @__PURE__ */ jsx68(
11483
11494
  Radio,
11484
11495
  {
11485
- parentId: name,
11496
+ parentId: groupName,
11486
11497
  option,
11487
11498
  state: { ...state, isDisabled },
11488
11499
  ...otherProps,
@@ -11530,6 +11541,7 @@ function Radio(props) {
11530
11541
  disabled,
11531
11542
  "aria-labelledby": labelId,
11532
11543
  ...inputProps,
11544
+ name: parentId,
11533
11545
  ...focusProps,
11534
11546
  ...others
11535
11547
  }