@homebound/beam 3.0.1 → 3.0.3

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.cjs CHANGED
@@ -9839,7 +9839,14 @@ function OverlayTrigger(props) {
9839
9839
  isOpen: state.isOpen,
9840
9840
  onClose: state.close,
9841
9841
  placement: placement ? `bottom ${placement}` : "bottom left",
9842
- offset: showActiveBorder ? 4 : void 0
9842
+ offset: showActiveBorder ? 4 : void 0,
9843
+ // Prevents a react-aria ResizeObserver loop that prevents full scrollability in menus
9844
+ // that scroll when the trigger is inside a virtual GridTable with nested
9845
+ // scroll containers (e.g. stepper + layout + virtuoso), and the trigger is far
9846
+ // enough from the viewport edge that the calculated maxHeight differs significantly
9847
+ // This is a very specific set of circumstances that have appeared w/in blueprint
9848
+ // after we upgraded truss to v2
9849
+ maxHeight: window.visualViewport?.height ?? window.innerHeight
9843
9850
  });
9844
9851
  const tid = useTestIds(props, isTextButton(trigger) ? defaultTestId(labelOr(trigger, "overlayTrigger")) : isNavLinkButton(trigger) ? defaultTestId(trigger.navLabel) : isIconButton(trigger) ? trigger.icon : trigger.name);
9845
9852
  return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "dib lineHeight_0", children: [
@@ -12972,6 +12979,7 @@ function NumberField(props) {
12972
12979
  wip: false
12973
12980
  });
12974
12981
  const lastSentRef = (0, import_react54.useRef)(void 0);
12982
+ const [, forceRender] = (0, import_react54.useState)(0);
12975
12983
  const propValue = value === void 0 ? Number.NaN : value / factor;
12976
12984
  if (valueRef.current.wip && !Object.is(valueRef.current.value, propValue)) {
12977
12985
  const lastSentInternal = lastSentRef.current === void 0 ? Number.NaN : lastSentRef.current / factor;
@@ -12985,7 +12993,9 @@ function NumberField(props) {
12985
12993
  value: valueRef.current.wip ? valueRef.current.value : value === void 0 ? Number.NaN : value / factor,
12986
12994
  // // This is called on blur with the final/committed value.
12987
12995
  onChange: (value2) => {
12988
- onChange(formatValue(value2, factor, numFractionDigits, numIntegerDigits, positiveOnly));
12996
+ const formatted = formatValue(value2, factor, numFractionDigits, numIntegerDigits, positiveOnly);
12997
+ if (formatted !== lastSentRef.current) return;
12998
+ onChange(formatted);
12989
12999
  },
12990
13000
  onFocus: () => {
12991
13001
  valueRef.current = {
@@ -12999,6 +13009,7 @@ function NumberField(props) {
12999
13009
  wip: false
13000
13010
  };
13001
13011
  lastSentRef.current = void 0;
13012
+ forceRender((c) => c + 1);
13002
13013
  },
13003
13014
  onKeyDown: (e) => {
13004
13015
  if (e.key === "Enter") {