@bytebrand/fe-ui-core-autobahn 1.0.142 → 1.0.143
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/vdp/VdpModules.tsx +10 -4
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.143",
|
|
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/vdp/VdpModules.tsx
CHANGED
|
@@ -2226,17 +2226,23 @@ export const FinanceDetailsModal: React.FunctionComponent<FinanceDetailsModalPro
|
|
|
2226
2226
|
const desktopBreakdownRef = React.useRef<HTMLDivElement | null>(null);
|
|
2227
2227
|
const mobileBreakdownRef = React.useRef<HTMLDivElement | null>(null);
|
|
2228
2228
|
// mobile (ADV-276): revealing the breakdown scrolls the sheet body until the "Repräsentatives
|
|
2229
|
-
// Beispiel" headline sits at its top —
|
|
2229
|
+
// Beispiel" headline sits at its top — but never so far that the CTA row under the breakdown
|
|
2230
|
+
// comes into view (on tall screens the breakdown is shorter than the sheet, so the headline
|
|
2231
|
+
// then stops lower, with the bottom CTA row still just below the fold).
|
|
2230
2232
|
// The sheet keeps its fixed height (see .fin-modal in md3.css), so nothing jumps; only the
|
|
2231
2233
|
// body scrolls. Hand-rolled rAF ease-out so the duration is ours, not the browser's.
|
|
2234
|
+
const mobileBottomCtaRef = React.useRef<HTMLDivElement | null>(null);
|
|
2232
2235
|
const breakdownScrollRaf = React.useRef(0);
|
|
2233
2236
|
const scrollSheetToBreakdown = React.useCallback((): void => {
|
|
2234
2237
|
const el = mobileBreakdownRef.current;
|
|
2235
2238
|
const body = el?.closest('.fin-modal-body') as HTMLElement | null | undefined;
|
|
2236
2239
|
if (!el || !body) return;
|
|
2237
2240
|
const from = body.scrollTop;
|
|
2238
|
-
const
|
|
2239
|
-
const
|
|
2241
|
+
const bodyTop = body.getBoundingClientRect().top;
|
|
2242
|
+
const headlineTop = el.getBoundingClientRect().top - bodyTop + from;
|
|
2243
|
+
const cta = mobileBottomCtaRef.current;
|
|
2244
|
+
const ctaLimit = cta ? cta.getBoundingClientRect().top - bodyTop + from - body.clientHeight : Infinity;
|
|
2245
|
+
const to = Math.max(0, Math.min(headlineTop - 8, ctaLimit, body.scrollHeight - body.clientHeight));
|
|
2240
2246
|
if (to === from) return;
|
|
2241
2247
|
window.cancelAnimationFrame(breakdownScrollRaf.current);
|
|
2242
2248
|
const duration = 400;
|
|
@@ -3687,7 +3693,7 @@ export const FinanceDetailsModal: React.FunctionComponent<FinanceDetailsModalPro
|
|
|
3687
3693
|
</p>
|
|
3688
3694
|
</>
|
|
3689
3695
|
)}
|
|
3690
|
-
<div className="fin-sheet-cta-row" style={{ display: 'flex', gap: 7, paddingBottom: 15 }}>
|
|
3696
|
+
<div ref={mobileBottomCtaRef} className="fin-sheet-cta-row" style={{ display: 'flex', gap: 7, paddingBottom: 15 }}>
|
|
3691
3697
|
<Button
|
|
3692
3698
|
variant="filled"
|
|
3693
3699
|
size="lg"
|