@dloizides/ui-layout 1.24.0 → 1.25.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.js CHANGED
@@ -327,6 +327,7 @@ var MENU_MAX_HEIGHT = 300;
327
327
  var BORDER_RADIUS = 8;
328
328
  var BORDER_WIDTH2 = 1;
329
329
  var MENU_PADDING = 4;
330
+ var MENU_SCROLL_MAX_HEIGHT = MENU_MAX_HEIGHT - (BORDER_WIDTH2 + MENU_PADDING) * 2;
330
331
  var MENU_BOX_SHADOW = "0px 2px 8px rgba(0, 0, 0, 0.15)";
331
332
  var MENU_VIEWPORT_MARGIN = 8;
332
333
  function buildPortalPopoverStyle(rect, minWidth = 0, viewportWidth = 0) {
@@ -576,7 +577,10 @@ var styles6 = reactNative.StyleSheet.create({
576
577
  // The enter/exit fade+scale lives on an INNER wrapper so the outer popover keeps its raw DOM
577
578
  // node (the `menuRef` outside-click / keyboard logic and the web portal target depend on it).
578
579
  // `transformOrigin: 'top'` makes the scale grow downward FROM the anchor rather than the centre.
579
- animated: { transformOrigin: "top" }
580
+ animated: { transformOrigin: "top" },
581
+ // Bound the scroll viewport so a list longer than the popover scrolls (with a scrollbar) instead of
582
+ // overflowing the frame — the popover's own maxHeight cannot do this (see MENU_SCROLL_MAX_HEIGHT).
583
+ scroll: { maxHeight: MENU_SCROLL_MAX_HEIGHT }
580
584
  });
581
585
  var InlineMenu = ({
582
586
  testID,
@@ -640,7 +644,7 @@ var InlineMenu = ({
640
644
  "aria-label": accessibilityLabel,
641
645
  style: popoverStyle,
642
646
  testID: `${testID}-menu`,
643
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [styles6.animated, animatedStyle], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { keyboardShouldPersistTaps: "handled", children: options.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(
647
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: [styles6.animated, animatedStyle], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.ScrollView, { style: styles6.scroll, keyboardShouldPersistTaps: "handled", children: options.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(
644
648
  OptionRow,
645
649
  {
646
650
  isHighlighted: index === highlightedIndex,