@bytebrand/fe-ui-core-autobahn 1.0.149 → 1.0.151
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/package.json +1 -1
- package/theme/md3.css +13 -9
- package/vdp/VdpModules.tsx +34 -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.151",
|
|
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",
|
package/theme/md3.css
CHANGED
|
@@ -6609,12 +6609,15 @@ line-height: 31px;
|
|
|
6609
6609
|
100vh > the visible area while the toolbar shows, which pushed the sheet's top off-screen). */
|
|
6610
6610
|
.md3 .fin-modal {
|
|
6611
6611
|
/* room under the fold for whatever overlays the bottom of the screen: the home-indicator
|
|
6612
|
-
inset, and on iOS
|
|
6613
|
-
|
|
6614
|
-
hidden behind the toolbar. */
|
|
6612
|
+
inset, and on iOS 26+ Safari its floating bottom toolbar (.fin-modal--ios-toolbar below) —
|
|
6613
|
+
without it the "Finanzierungs-Details" link ended up hidden behind the toolbar. */
|
|
6615
6614
|
--fin-sheet-bottom-gap: env(safe-area-inset-bottom, 0px);
|
|
6616
6615
|
max-width: none;
|
|
6617
|
-
|
|
6616
|
+
/* capped at the full visible height (not 100% - 24px): when the rate AND the details link
|
|
6617
|
+
don't fit otherwise (small iPhones behind Safari's floating toolbar), the sheet goes all the
|
|
6618
|
+
way up — both must be visible on open */
|
|
6619
|
+
--fin-sheet-collapsed: min(calc(var(--fin-sheet-fold, 85vh) + var(--fin-sheet-bottom-gap)), 100%);
|
|
6620
|
+
height: var(--fin-sheet-collapsed);
|
|
6618
6621
|
max-height: none;
|
|
6619
6622
|
background: #FFFFFF;
|
|
6620
6623
|
box-shadow: 0px -4px 18px rgba(0, 0, 0, 0.13);
|
|
@@ -6622,15 +6625,16 @@ line-height: 31px;
|
|
|
6622
6625
|
animation: sheet-up var(--dur-2);
|
|
6623
6626
|
}
|
|
6624
6627
|
.md3 .fin-modal.fin-modal--expanded {
|
|
6625
|
-
|
|
6628
|
+
/* never shorter than the collapsed sheet (which may already be full height) */
|
|
6629
|
+
height: max(var(--fin-sheet-collapsed), calc(100% - 24px));
|
|
6626
6630
|
}
|
|
6627
6631
|
.md3 .fin-modal .fin-modal-body {
|
|
6628
6632
|
padding-bottom: calc(13px + var(--fin-sheet-bottom-gap));
|
|
6629
6633
|
}
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
+
/* iOS 26+ Safari: its floating bottom toolbar sits ON TOP of fixed content (~86pt from the
|
|
6635
|
+
screen bottom incl. the home indicator) — class set by FinanceDetailsModal from the UA */
|
|
6636
|
+
.md3 .fin-modal.fin-modal--ios-toolbar {
|
|
6637
|
+
--fin-sheet-bottom-gap: max(env(safe-area-inset-bottom, 0px), 84px);
|
|
6634
6638
|
}
|
|
6635
6639
|
/* set from the frame after the first fold measure (not on open — no 85vh -> fold shrink) */
|
|
6636
6640
|
.md3 .fin-modal.fin-modal--animated {
|
package/vdp/VdpModules.tsx
CHANGED
|
@@ -2270,6 +2270,16 @@ export const FinanceDetailsModal: React.FunctionComponent<FinanceDetailsModalPro
|
|
|
2270
2270
|
const sheetRef = React.useRef<HTMLDivElement | null>(null);
|
|
2271
2271
|
const [sheetFold, setSheetFold] = React.useState<number | null>(null);
|
|
2272
2272
|
const [sheetAnimated, setSheetAnimated] = React.useState(false);
|
|
2273
|
+
// iOS 26+ Safari only (UA "Version/26…", not Chrome/Firefox/Edge for iOS): its floating bottom
|
|
2274
|
+
// toolbar overlays fixed content, so the sheet reserves room under its fold (md3.css
|
|
2275
|
+
// .fin-modal--ios-toolbar). Older iOS Safari keeps content above its toolbar by itself.
|
|
2276
|
+
const iosToolbarOverlay = React.useMemo((): boolean => {
|
|
2277
|
+
if (typeof navigator === 'undefined') return false;
|
|
2278
|
+
const ua = navigator.userAgent;
|
|
2279
|
+
if (!/iP(hone|od)/.test(ua) || /CriOS|FxiOS|EdgiOS/.test(ua)) return false;
|
|
2280
|
+
const m = /Version\/(\d+)/.exec(ua);
|
|
2281
|
+
return !!m && Number(m[1]) >= 26;
|
|
2282
|
+
}, []);
|
|
2273
2283
|
React.useLayoutEffect(() => {
|
|
2274
2284
|
if (!open) return;
|
|
2275
2285
|
const sheet = sheetRef.current;
|
|
@@ -2321,6 +2331,24 @@ export const FinanceDetailsModal: React.FunctionComponent<FinanceDetailsModalPro
|
|
|
2321
2331
|
else animateSheetScroll(() => 0);
|
|
2322
2332
|
}, [showBreakdown, scrollSheetToBreakdown, animateSheetScroll]);
|
|
2323
2333
|
|
|
2334
|
+
// iOS Safari (26+, "Allow Website Tinting") paints its bottom toolbar area with the page's
|
|
2335
|
+
// <meta name="theme-color"> (site-wide blue #005CCB) — under the open white sheet that showed
|
|
2336
|
+
// as a solid blue band right below the CTA. While the sheet is open, theme-color is white;
|
|
2337
|
+
// on close the previous value(s) are restored. Other pages/states are untouched.
|
|
2338
|
+
React.useEffect(() => {
|
|
2339
|
+
if (!open || typeof document === 'undefined') return;
|
|
2340
|
+
const metas = Array.from(document.querySelectorAll<HTMLMetaElement>('meta[name="theme-color"]'));
|
|
2341
|
+
const prev = metas.map((m) => m.getAttribute('content'));
|
|
2342
|
+
metas.forEach((m) => m.setAttribute('content', '#FFFFFF'));
|
|
2343
|
+
return () => {
|
|
2344
|
+
metas.forEach((m, i) => {
|
|
2345
|
+
const v = prev[i];
|
|
2346
|
+
if (v == null) m.removeAttribute('content');
|
|
2347
|
+
else m.setAttribute('content', v);
|
|
2348
|
+
});
|
|
2349
|
+
};
|
|
2350
|
+
}, [open]);
|
|
2351
|
+
|
|
2324
2352
|
// mobile-only: swipe-down-to-dismiss on the grabber/header (the mockup's drag handle).
|
|
2325
2353
|
// The sheet follows the finger (imperative transform — no re-renders while dragging);
|
|
2326
2354
|
// released past 90px it slides out and closes, otherwise it springs back. The element
|
|
@@ -2554,7 +2582,12 @@ export const FinanceDetailsModal: React.FunctionComponent<FinanceDetailsModalPro
|
|
|
2554
2582
|
return (
|
|
2555
2583
|
<div className="fin-modal-scrim" onClick={onClose}>
|
|
2556
2584
|
<div
|
|
2557
|
-
className={
|
|
2585
|
+
className={
|
|
2586
|
+
'fin-modal' +
|
|
2587
|
+
(showBreakdown ? ' fin-modal--expanded' : '') +
|
|
2588
|
+
(sheetAnimated ? ' fin-modal--animated' : '') +
|
|
2589
|
+
(iosToolbarOverlay ? ' fin-modal--ios-toolbar' : '')
|
|
2590
|
+
}
|
|
2558
2591
|
style={sheetFold != null ? ({ '--fin-sheet-fold': `${sheetFold}px` } as React.CSSProperties) : undefined}
|
|
2559
2592
|
role="dialog"
|
|
2560
2593
|
aria-modal="true"
|