@bytebrand/fe-ui-core-autobahn 1.0.174 → 1.0.175
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/compat/CookieModal/CookieModal.tsx +5 -1
- package/compat/CookieModal/Modal.tsx +6 -3
- package/compat/CookieModal/modals/ManageCookieModal/ManageCookieModal.tsx +37 -14
- package/locales/de/autobahn.json +879 -859
- package/locales/en/autobahn.json +879 -859
- package/package.json +1 -1
- package/ui/usePortalMenuPosition.ts +5 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bytebrand/fe-ui-core-autobahn",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.175",
|
|
4
4
|
"description": "auto.de md3 (Autobahn) design system — UI primitives, cards, chrome, VDP modules, theme CSS and locales. Ships raw TypeScript source (like fe-ui-core before it); each consumer's bundler compiles it.",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -76,6 +76,9 @@ export interface UsePortalMenuPositionResult<TMenuEl extends HTMLElement = HTMLD
|
|
|
76
76
|
// reasonable estimate; it decides whether to flip ABOVE the trigger. The real size is then
|
|
77
77
|
// clamped to the space actually available (see `maxHeight` above), not just guessed at.
|
|
78
78
|
const ESTIMATED_MENU_HEIGHT = 300;
|
|
79
|
+
// .mselect-menu's own padding + border (6px*2 + 1px*2) — the consumers add it back on top of
|
|
80
|
+
// `maxHeight` for the box, so the space it fits into has to leave room for it.
|
|
81
|
+
const MENU_CHROME = 14;
|
|
79
82
|
// a scroll within this window of opening REPOSITIONS instead of closing — see the effect below.
|
|
80
83
|
const SELF_SCROLL_GRACE_MS = 500;
|
|
81
84
|
|
|
@@ -158,7 +161,8 @@ export function usePortalMenuPosition<TMenuEl extends HTMLElement = HTMLDivEleme
|
|
|
158
161
|
// cap can still be taller than what's really available, which is what let the menu paint over
|
|
159
162
|
// the header in the first place. The consumer's own overflow-y:auto takes it from there once
|
|
160
163
|
// content exceeds this.
|
|
161
|
-
|
|
164
|
+
// `available` is the LIST's height: the box (list + MENU_CHROME) must end inside the viewport.
|
|
165
|
+
const available = Math.max(120, Math.min(ESTIMATED_MENU_HEIGHT - 12, (openAbove ? spaceAbove : spaceBelow) - MENU_CHROME));
|
|
162
166
|
setMenuPos({
|
|
163
167
|
width: rect.width,
|
|
164
168
|
left: menuAlign === 'right' ? 'auto' : rect.left,
|