@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/dist/index.mjs CHANGED
@@ -1908,7 +1908,7 @@ var styles9 = StyleSheet.create({
1908
1908
  // so on react-native-web it — and the nav leaves inside it — sit above the scrim
1909
1909
  // and receive presses instead of the scrim swallowing them.
1910
1910
  panel: { position: "absolute", top: 0, bottom: 0, left: 0, width: DRAWER_WIDTH, zIndex: PANEL_Z_INDEX },
1911
- panelFull: { width: "100%" },
1911
+ windowFill: { right: void 0, bottom: void 0 },
1912
1912
  panelBody: { flex: 1 },
1913
1913
  menuToggle: {
1914
1914
  minWidth: MIN_TOUCH_TARGET,
@@ -1946,6 +1946,8 @@ var MobileDrawer = ({
1946
1946
  const { theme } = useUi();
1947
1947
  const panelRef = useRef(null);
1948
1948
  const isFull = width === "full";
1949
+ const viewport = useWindowDimensions();
1950
+ const windowSize = isFull ? [styles9.windowFill, { width: viewport.width, height: viewport.height }] : null;
1949
1951
  const showHeaderBar = header !== void 0 || isFull;
1950
1952
  useEffect(() => {
1951
1953
  const node = panelRef.current;
@@ -1960,7 +1962,7 @@ var MobileDrawer = ({
1960
1962
  node.addEventListener("click", handleClick);
1961
1963
  return () => node.removeEventListener("click", handleClick);
1962
1964
  }, [onClose]);
1963
- return /* @__PURE__ */ jsxs(View, { style: styles9.overlay, children: [
1965
+ return /* @__PURE__ */ jsxs(View, { style: [styles9.overlay, windowSize], children: [
1964
1966
  isFull ? null : /* @__PURE__ */ jsx(
1965
1967
  Pressable,
1966
1968
  {
@@ -1978,7 +1980,7 @@ var MobileDrawer = ({
1978
1980
  ref: panelRef,
1979
1981
  "aria-modal": true,
1980
1982
  role: "dialog",
1981
- style: [styles9.panel, isFull ? styles9.panelFull : null, { backgroundColor: theme.colors.surface }],
1983
+ style: [styles9.panel, windowSize, { backgroundColor: theme.colors.surface }],
1982
1984
  testID: drawerTestID,
1983
1985
  children: [
1984
1986
  showHeaderBar ? /* @__PURE__ */ jsx(