@broberg/app-shell 0.22.0 → 0.22.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/preact.js CHANGED
@@ -576,7 +576,7 @@ function ItemActionsMenu(props) {
576
576
  useLayoutEffect(() => {
577
577
  const r = props.anchor.getBoundingClientRect();
578
578
  const vw = window.innerWidth, vh = window.innerHeight, m = 8;
579
- const w = Math.min(240, vw - 2 * m);
579
+ const w = Math.min(Math.max(240, menu.current?.offsetWidth ?? 0), vw - 2 * m);
580
580
  const h = menu.current?.offsetHeight ?? 0;
581
581
  const start = props.placement === "up-start";
582
582
  const left = Math.max(m, Math.min(start ? r.left : r.right - w, vw - w - m));
@@ -584,7 +584,7 @@ function ItemActionsMenu(props) {
584
584
  const fitsAbove = r.top - 4 - h >= m;
585
585
  const below = start ? !fitsAbove : props.placement === "down" || fitsBelow || !fitsAbove;
586
586
  const top = below ? Math.min(r.bottom + 4, vh - m - h) : r.top - 4 - h;
587
- setPos({ position: "fixed", left: `${left}px`, top: `${Math.max(m, top)}px`, width: `${w}px` });
587
+ setPos({ position: "fixed", left: `${left}px`, top: `${Math.max(m, top)}px` });
588
588
  }, [stack.length]);
589
589
  useLayoutEffect(() => {
590
590
  if (!pos) return;
@@ -668,7 +668,7 @@ function ItemActionsMenu(props) {
668
668
  tabIndex: -1,
669
669
  "aria-label": view.kind === "list" && view.title ? view.title : props.label,
670
670
  "data-testid": `${pre}-menu`,
671
- style: pos ?? { position: "fixed", visibility: "hidden" },
671
+ style: pos ?? { position: "fixed", left: "0px", top: "0px", visibility: "hidden" },
672
672
  onKeyDown,
673
673
  children: [
674
674
  stack.length > 1 ? /* @__PURE__ */ jsxs("button", { type: "button", class: "bas-rowmenu__back", "data-testid": `${pre}-back`, "aria-label": t.back, onClick: back, children: [