@broberg/app-shell 0.20.0 → 0.21.0
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/README.md +3 -0
- package/css/app-shell.css +5 -2
- package/dist/preact.cjs +5 -2
- package/dist/preact.cjs.map +1 -1
- package/dist/preact.d.cts +6 -2
- package/dist/preact.d.ts +6 -2
- package/dist/preact.js +5 -2
- package/dist/preact.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -176,6 +176,9 @@ const [open, setOpen] = useState(false);
|
|
|
176
176
|
testids: `<prefix>-menu`, `<prefix>-action-<id>`, `<prefix>-back`, `<prefix>-input`, `<prefix>-save` — so the
|
|
177
177
|
anchor's own testid must not be `<prefix>-menu`.
|
|
178
178
|
|
|
179
|
+
**0.21.0** — `placement: "up-start"` (F092.31): above the anchor, left edge = the anchor's left edge (clamped
|
|
180
|
+
8px inside the viewport); below if there is no room above. For a «+» in a composer. `auto`/`down` unchanged.
|
|
181
|
+
|
|
179
182
|
## 0.11.1 — the palette list floats over the menu (F001.25)
|
|
180
183
|
|
|
181
184
|
Christian 10/10: «Kunne denne ikke være en pop-over ting så dialogen ikke bliver
|
package/css/app-shell.css
CHANGED
|
@@ -70,8 +70,11 @@
|
|
|
70
70
|
.bas-sidebar {
|
|
71
71
|
/* sticky makes its own stacking context, so the rail's flyout can only rise
|
|
72
72
|
* as high as the sidebar does; without this <main> paints over it and takes
|
|
73
|
-
* its clicks (appkit, Lens 839394b1). Below the top bar (50).
|
|
74
|
-
|
|
73
|
+
* its clicks (appkit, Lens 839394b1). Below the top bar (50).
|
|
74
|
+
* F092.30 — and ABOVE the inset content header (30): every popover that opens
|
|
75
|
+
* from the sidebar (user menu, row menu, flyout) lives in this context, so at
|
|
76
|
+
* 20 the header's line and blur ran over the user menu (scout #2779). */
|
|
77
|
+
z-index: 40;
|
|
75
78
|
flex: 0 0 240px; width: 240px;
|
|
76
79
|
position: sticky; top: var(--bas-top); align-self: flex-start;
|
|
77
80
|
height: calc(100dvh - var(--bas-top));
|
package/dist/preact.cjs
CHANGED
|
@@ -579,9 +579,12 @@ function ItemActionsMenu(props) {
|
|
|
579
579
|
const vw = window.innerWidth, vh = window.innerHeight, m = 8;
|
|
580
580
|
const w = Math.min(240, vw - 2 * m);
|
|
581
581
|
const h = menu.current?.offsetHeight ?? 0;
|
|
582
|
-
const
|
|
582
|
+
const start = props.placement === "up-start";
|
|
583
|
+
const left = Math.max(m, Math.min(start ? r.left : r.right - w, vw - w - m));
|
|
583
584
|
const fitsBelow = r.bottom + 4 + h <= vh - m;
|
|
584
|
-
const
|
|
585
|
+
const fitsAbove = r.top - 4 - h >= m;
|
|
586
|
+
const below = start ? !fitsAbove : props.placement === "down" || fitsBelow || !fitsAbove;
|
|
587
|
+
const top = below ? Math.min(r.bottom + 4, vh - m - h) : r.top - 4 - h;
|
|
585
588
|
setPos({ position: "fixed", left: `${left}px`, top: `${Math.max(m, top)}px`, width: `${w}px` });
|
|
586
589
|
}, [stack.length]);
|
|
587
590
|
hooks.useLayoutEffect(() => {
|