@bytebrand/fe-ui-core-autobahn 1.0.136 → 1.0.138
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 +30 -30
- package/vdp/VdpModules.tsx +38 -1
package/package.json
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@bytebrand/fe-ui-core-autobahn",
|
|
3
|
-
"version": "1.0.
|
|
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
|
-
"main": "index.ts",
|
|
6
|
-
"license": "UNLICENSED",
|
|
7
|
-
"peerDependencies": {
|
|
8
|
-
"react": "^18.0.0",
|
|
9
|
-
"react-dom": "^18.0.0"
|
|
10
|
-
},
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"@bytebrand/car-schema-selectors": "^2.0.7",
|
|
13
|
-
"@bytebrand/fe-financing": "^5.14.20",
|
|
14
|
-
"classnames": "2.2.6",
|
|
15
|
-
"clsx": "^2.1.1",
|
|
16
|
-
"d3-format": "1.4.5",
|
|
17
|
-
"js-cookie": "^2.2.0",
|
|
18
|
-
"lodash": "^4.17.21",
|
|
19
|
-
"lucide-react": "^0.288.0",
|
|
20
|
-
"mobx-react": "^7.6.0",
|
|
21
|
-
"moment": "^2.29.1",
|
|
22
|
-
"qs": "^6.6.0",
|
|
23
|
-
"react-device-detect": "^2.1.2",
|
|
24
|
-
"react-grid-system": "^5.0.2",
|
|
25
|
-
"react-lazyload": "^3.2.0",
|
|
26
|
-
"react-scroll": "^1.9.3",
|
|
27
|
-
"react-slick": "^0.29.0",
|
|
28
|
-
"slick-carousel": "1.8.1"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@bytebrand/fe-ui-core-autobahn",
|
|
3
|
+
"version": "1.0.138",
|
|
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
|
+
"main": "index.ts",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"peerDependencies": {
|
|
8
|
+
"react": "^18.0.0",
|
|
9
|
+
"react-dom": "^18.0.0"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@bytebrand/car-schema-selectors": "^2.0.7",
|
|
13
|
+
"@bytebrand/fe-financing": "^5.14.20",
|
|
14
|
+
"classnames": "2.2.6",
|
|
15
|
+
"clsx": "^2.1.1",
|
|
16
|
+
"d3-format": "1.4.5",
|
|
17
|
+
"js-cookie": "^2.2.0",
|
|
18
|
+
"lodash": "^4.17.21",
|
|
19
|
+
"lucide-react": "^0.288.0",
|
|
20
|
+
"mobx-react": "^7.6.0",
|
|
21
|
+
"moment": "^2.29.1",
|
|
22
|
+
"qs": "^6.6.0",
|
|
23
|
+
"react-device-detect": "^2.1.2",
|
|
24
|
+
"react-grid-system": "^5.0.2",
|
|
25
|
+
"react-lazyload": "^3.2.0",
|
|
26
|
+
"react-scroll": "^1.9.3",
|
|
27
|
+
"react-slick": "^0.29.0",
|
|
28
|
+
"slick-carousel": "1.8.1"
|
|
29
|
+
}
|
|
30
|
+
}
|
package/vdp/VdpModules.tsx
CHANGED
|
@@ -2239,6 +2239,34 @@ export const FinanceDetailsModal: React.FunctionComponent<FinanceDetailsModalPro
|
|
|
2239
2239
|
return () => window.clearTimeout(timer);
|
|
2240
2240
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2241
2241
|
}, [open, initialShowBreakdown]);
|
|
2242
|
+
// in-sheet "Finanzierungs-/Leasingdetails" toggle (mobile): expanding the breakdown alone left
|
|
2243
|
+
// it below the fold — scroll the sheet body all the way down (same end state as opening via
|
|
2244
|
+
// the page's details link) in one quick ~300ms ease-out. The click also skips
|
|
2245
|
+
// .fin-modal--expanded's 0.35s min-height transition (see the toggle's onClick): a scroll
|
|
2246
|
+
// running while the sheet is still growing gets clamped/retargeted every frame and stutters.
|
|
2247
|
+
// Hand-rolled rAF instead of scrollTo({behavior:'smooth'}) so the duration is ours, not the
|
|
2248
|
+
// browser's. Collapsing doesn't scroll.
|
|
2249
|
+
const revealBreakdownRef = React.useRef(false);
|
|
2250
|
+
React.useEffect(() => {
|
|
2251
|
+
if (!showBreakdown || !revealBreakdownRef.current) return;
|
|
2252
|
+
revealBreakdownRef.current = false;
|
|
2253
|
+
const body = mobileBreakdownRef.current?.closest('.fin-modal-body') as HTMLElement | null | undefined;
|
|
2254
|
+
if (!body) return;
|
|
2255
|
+
const from = body.scrollTop;
|
|
2256
|
+
const dist = body.scrollHeight - body.clientHeight - from;
|
|
2257
|
+
if (dist <= 0) return;
|
|
2258
|
+
const duration = 300;
|
|
2259
|
+
let start: number | null = null;
|
|
2260
|
+
let raf = 0;
|
|
2261
|
+
const step = (now: number): void => {
|
|
2262
|
+
if (start === null) start = now;
|
|
2263
|
+
const p = Math.min(1, (now - start) / duration);
|
|
2264
|
+
body.scrollTop = from + dist * (1 - Math.pow(1 - p, 3));
|
|
2265
|
+
if (p < 1) raf = window.requestAnimationFrame(step);
|
|
2266
|
+
};
|
|
2267
|
+
raf = window.requestAnimationFrame(step);
|
|
2268
|
+
return () => window.cancelAnimationFrame(raf);
|
|
2269
|
+
}, [showBreakdown]);
|
|
2242
2270
|
|
|
2243
2271
|
// mobile-only: swipe-down-to-dismiss on the grabber/header (the mockup's drag handle).
|
|
2244
2272
|
// The sheet follows the finger (imperative transform — no re-renders while dragging);
|
|
@@ -3411,7 +3439,16 @@ export const FinanceDetailsModal: React.FunctionComponent<FinanceDetailsModalPro
|
|
|
3411
3439
|
</div>
|
|
3412
3440
|
|
|
3413
3441
|
{/* centered ⓘ details toggle (mockup shows no chevron) */}
|
|
3414
|
-
<button
|
|
3442
|
+
<button
|
|
3443
|
+
type="button"
|
|
3444
|
+
onClick={() => {
|
|
3445
|
+
revealBreakdownRef.current = !showBreakdown;
|
|
3446
|
+
// expanding: grow the sheet to full height at once (no min-height
|
|
3447
|
+
// transition) so the scroll-down above runs on a settled layout
|
|
3448
|
+
if (!showBreakdown && sheetRef.current) sheetRef.current.style.transition = 'none';
|
|
3449
|
+
setShowBreakdown((v) => !v);
|
|
3450
|
+
}}
|
|
3451
|
+
style={{ ...expanderBtnStyle, justifyContent: 'center', padding: '2px 0 20px' }}>
|
|
3415
3452
|
<span
|
|
3416
3453
|
style={{
|
|
3417
3454
|
display: 'inline-flex',
|