@bytebrand/fe-ui-core-autobahn 1.0.143 → 1.0.144

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.
@@ -710,7 +710,12 @@ export const PriceTerms: React.FunctionComponent<{
710
710
  onShowDetails?: () => void;
711
711
  t: TranslationFunction;
712
712
  }> = ({ car, mode, onOpenRateAdjust, onShowDetails, t }) => {
713
- if (mode === 'buy') return null;
713
+ // Kaufen (buy): a cash purchase has no financing terms/details link — used to `return null`
714
+ // here, which collapsed .cc-terms to 0 height on that tab while Financing/Leasing rendered a
715
+ // real line, jumping the price row (and everything below it: rating pill, CTA row) up/down on
716
+ // every tab switch. Render an empty, still-present .cc-terms div instead — same fix as the VDP
717
+ // FinanceCalculator's .fin-cond (md3.css), which reserves its line's height the same way.
718
+ if (mode === 'buy') return <div className="cc-terms" />;
714
719
  const finFirstInstallment =
715
720
  car.finFirstInstallment != null ? car.finFirstInstallment.toLocaleString('de-DE') : _finFirstInstallment;
716
721
  const finMonths = car.finMonths ?? _finMonths;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/fe-ui-core-autobahn",
3
- "version": "1.0.143",
3
+ "version": "1.0.144",
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
@@ -5552,6 +5552,10 @@ line-height: 31px;
5552
5552
  .md3 .cc-terms {
5553
5553
  margin-top: 9px;
5554
5554
  margin-bottom: 10px;
5555
+ /* Kaufen renders this div empty (cardParts.tsx's PriceTerms) — min-height keeps its line's
5556
+ height reserved so the price row/rating pill/CTA row below don't jump up when switching to
5557
+ that tab (an empty block's own top/bottom margins would otherwise collapse together). */
5558
+ min-height: 14px;
5555
5559
  font-family: Arial, Helvetica, Arimo, sans-serif;
5556
5560
  font-style: normal;
5557
5561
  font-weight: 400;
@@ -3470,11 +3470,16 @@ export const FinanceDetailsModal: React.FunctionComponent<FinanceDetailsModalPro
3470
3470
  {isLease ? t('autobahn:modal.leasingDetails') : t('autobahn:modal.financingDetails')}
3471
3471
  </span>
3472
3472
  </button>
3473
- {/* mobile "Finanzierungsdetails" toggle reveals the same row-by-row breakdown
3474
- table as desktop (breakdownRows, built once above). */}
3475
- {showBreakdown && (
3476
- <>
3477
- <div ref={mobileBreakdownRef} style={{ marginBottom: 5 }}>
3473
+ {/* mobile "Finanzierungsdetails" toggle scrolls the sheet body down to this same
3474
+ row-by-row breakdown table (breakdownRows, built once above) — always
3475
+ rendered now, not gated behind showBreakdown, so a visitor who scrolls the
3476
+ sheet by hand (no tap on the toggle) reaches it too. The collapsed look on
3477
+ open is unaffected: .fin-modal-body's own fixed height + overflow already
3478
+ clip this below the fold until scrolled, exactly as when it was conditionally
3479
+ mounted — only the toggle's click-triggered auto-scroll (scrollSheetToBreakdown,
3480
+ the effect above) actually depended on showBreakdown, and still does. */}
3481
+ <>
3482
+ <div ref={mobileBreakdownRef} style={{ marginBottom: 5 }}>
3478
3483
  <p
3479
3484
  style={{
3480
3485
  fontFamily: 'Arial, Helvetica, Arimo, sans-serif',
@@ -3738,7 +3743,6 @@ export const FinanceDetailsModal: React.FunctionComponent<FinanceDetailsModalPro
3738
3743
  />
3739
3744
  </div>
3740
3745
  </>
3741
- )}
3742
3746
  </>
3743
3747
  )}
3744
3748
  </div>