@dloizides/ui-layout 1.38.0 → 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 +15 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -579,9 +579,17 @@ var Modal = ({
|
|
|
579
579
|
)
|
|
580
580
|
] }) });
|
|
581
581
|
};
|
|
582
|
+
var CENTRED_ROW = { flexGrow: 1, justifyContent: "center" };
|
|
582
583
|
var PageOverlay = ({ children, pageSize, visible, onClose, testID }) => {
|
|
583
584
|
const { t } = useUi();
|
|
584
|
-
return /* @__PURE__ */ jsx(Modal, { accessibilityLabel: t(LAYOUT_I18N.pageEnlarge), size: "xl", testID, visible, onClose, children: /* @__PURE__ */ jsx(ScrollView, { horizontal: true, children: /* @__PURE__ */ jsx(
|
|
585
|
+
return /* @__PURE__ */ jsx(Modal, { accessibilityLabel: t(LAYOUT_I18N.pageEnlarge), size: "xl", testID, visible, onClose, children: /* @__PURE__ */ jsx(ScrollView, { horizontal: true, contentContainerStyle: CENTRED_ROW, children: /* @__PURE__ */ jsx(
|
|
586
|
+
View,
|
|
587
|
+
{
|
|
588
|
+
style: { width: pageSize.width, minWidth: pageSize.width, height: pageSize.height, flexShrink: 0 },
|
|
589
|
+
testID: `${testID}-page`,
|
|
590
|
+
children
|
|
591
|
+
}
|
|
592
|
+
) }) });
|
|
585
593
|
};
|
|
586
594
|
|
|
587
595
|
// src/PageFrame/utils/pageScale.ts
|
|
@@ -759,6 +767,11 @@ var MENU_PADDING = 4;
|
|
|
759
767
|
var MENU_SCROLL_MAX_HEIGHT = MENU_MAX_HEIGHT - (BORDER_WIDTH2 + MENU_PADDING) * 2;
|
|
760
768
|
var MENU_BOX_SHADOW = "0px 2px 8px rgba(0, 0, 0, 0.15)";
|
|
761
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
|
+
}
|
|
762
775
|
function buildPortalPopoverStyle(rect, minWidth = 0, viewportWidth = 0) {
|
|
763
776
|
const width = Math.max(rect.width, minWidth);
|
|
764
777
|
let left = rect.left;
|
|
@@ -1389,7 +1402,7 @@ var ModalDropdown = ({
|
|
|
1389
1402
|
containerRef: anchorRef,
|
|
1390
1403
|
isOpen,
|
|
1391
1404
|
menuHeading,
|
|
1392
|
-
menuMinWidth,
|
|
1405
|
+
menuMinWidth: resolveMenuMinWidth(menuMinWidth, renderTrigger !== void 0),
|
|
1393
1406
|
optionTestID: optionTestIDFor,
|
|
1394
1407
|
options,
|
|
1395
1408
|
selectedMarker,
|