@dloizides/ui-nav 1.38.0 → 1.38.1
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 +560 -556
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1914,7 +1914,7 @@ var styles9 = reactNative.StyleSheet.create({
|
|
|
1914
1914
|
// so on react-native-web it — and the nav leaves inside it — sit above the scrim
|
|
1915
1915
|
// and receive presses instead of the scrim swallowing them.
|
|
1916
1916
|
panel: { position: "absolute", top: 0, bottom: 0, left: 0, width: DRAWER_WIDTH, zIndex: PANEL_Z_INDEX },
|
|
1917
|
-
|
|
1917
|
+
windowFill: { right: void 0, bottom: void 0 },
|
|
1918
1918
|
panelBody: { flex: 1 },
|
|
1919
1919
|
menuToggle: {
|
|
1920
1920
|
minWidth: MIN_TOUCH_TARGET,
|
|
@@ -1952,6 +1952,8 @@ var MobileDrawer = ({
|
|
|
1952
1952
|
const { theme } = uiFeedback.useUi();
|
|
1953
1953
|
const panelRef = React.useRef(null);
|
|
1954
1954
|
const isFull = width === "full";
|
|
1955
|
+
const viewport = reactNative.useWindowDimensions();
|
|
1956
|
+
const windowSize = isFull ? [styles9.windowFill, { width: viewport.width, height: viewport.height }] : null;
|
|
1955
1957
|
const showHeaderBar = header !== void 0 || isFull;
|
|
1956
1958
|
React.useEffect(() => {
|
|
1957
1959
|
const node = panelRef.current;
|
|
@@ -1966,7 +1968,7 @@ var MobileDrawer = ({
|
|
|
1966
1968
|
node.addEventListener("click", handleClick);
|
|
1967
1969
|
return () => node.removeEventListener("click", handleClick);
|
|
1968
1970
|
}, [onClose]);
|
|
1969
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles9.overlay, children: [
|
|
1971
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles9.overlay, windowSize], children: [
|
|
1970
1972
|
isFull ? null : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1971
1973
|
reactNative.Pressable,
|
|
1972
1974
|
{
|
|
@@ -1984,7 +1986,7 @@ var MobileDrawer = ({
|
|
|
1984
1986
|
ref: panelRef,
|
|
1985
1987
|
"aria-modal": true,
|
|
1986
1988
|
role: "dialog",
|
|
1987
|
-
style: [styles9.panel,
|
|
1989
|
+
style: [styles9.panel, windowSize, { backgroundColor: theme.colors.surface }],
|
|
1988
1990
|
testID: drawerTestID,
|
|
1989
1991
|
children: [
|
|
1990
1992
|
showHeaderBar ? /* @__PURE__ */ jsxRuntime.jsx(
|