@dloizides/ui-layout 1.38.1 → 1.38.2
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/CHANGELOG.md +6 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -767,6 +767,11 @@ var MENU_PADDING = 4;
|
|
|
767
767
|
var MENU_SCROLL_MAX_HEIGHT = MENU_MAX_HEIGHT - (BORDER_WIDTH2 + MENU_PADDING) * 2;
|
|
768
768
|
var MENU_BOX_SHADOW = "0px 2px 8px rgba(0, 0, 0, 0.15)";
|
|
769
769
|
var MENU_VIEWPORT_MARGIN = 8;
|
|
770
|
+
var COMPACT_TRIGGER_MENU_MIN_WIDTH = 160;
|
|
771
|
+
function resolveMenuMinWidth(menuMinWidth, hasCustomTrigger) {
|
|
772
|
+
if (menuMinWidth !== void 0) return menuMinWidth;
|
|
773
|
+
return hasCustomTrigger ? COMPACT_TRIGGER_MENU_MIN_WIDTH : void 0;
|
|
774
|
+
}
|
|
770
775
|
function buildPortalPopoverStyle(rect, minWidth = 0, viewportWidth = 0) {
|
|
771
776
|
const width = Math.max(rect.width, minWidth);
|
|
772
777
|
let left = rect.left;
|
|
@@ -1397,7 +1402,7 @@ var ModalDropdown = ({
|
|
|
1397
1402
|
containerRef: anchorRef,
|
|
1398
1403
|
isOpen,
|
|
1399
1404
|
menuHeading,
|
|
1400
|
-
menuMinWidth,
|
|
1405
|
+
menuMinWidth: resolveMenuMinWidth(menuMinWidth, renderTrigger !== void 0),
|
|
1401
1406
|
optionTestID: optionTestIDFor,
|
|
1402
1407
|
options,
|
|
1403
1408
|
selectedMarker,
|