@bytebrand/fe-ui-core-autobahn 1.0.33 → 1.0.35
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 +9 -0
- package/vdp/FinanceCalculator.tsx +8 -0
- package/vdp/VdpModules.tsx +2049 -2035
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.35",
|
|
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
|
@@ -1203,6 +1203,11 @@
|
|
|
1203
1203
|
/* UVP (struck list price) — cash mode only */
|
|
1204
1204
|
.md3 .fin-kauf { margin-top: 8px; font-size: 13px; color: var(--md-on-surface-variant); }
|
|
1205
1205
|
.md3 .fin-kauf s { color: var(--md-error); }
|
|
1206
|
+
/* struck old rate / list price next to the hero figure (Figma "329 € 4̶9̶9̶ ̶€̶ / mtl.") —
|
|
1207
|
+
REAL isStrikeShown-gated data; used in the offer card, the Rate-anpassen sheet and the
|
|
1208
|
+
sticky bottom bar, all payment modes. */
|
|
1209
|
+
.md3 .fin-rate-old { font-size: 15px; font-weight: 700; color: var(--md-error);
|
|
1210
|
+
text-decoration: line-through; letter-spacing: 0; flex: none; }
|
|
1206
1211
|
/* condition summary — left cell of row 2 in fin-price-grid */
|
|
1207
1212
|
.md3 .fin-cond { min-width: 0; font-size: 12.5px; color: var(--md-on-surface-variant); }
|
|
1208
1213
|
/* Rate-edit (Rate anpassen) sits between the rate and the CTA now */
|
|
@@ -1341,6 +1346,8 @@
|
|
|
1341
1346
|
.md3 .gitem:nth-child(n+3) { border-top: 1px solid var(--md-outline-variant); }
|
|
1342
1347
|
.md3 .mag-grid { grid-template-columns: 1fr; }
|
|
1343
1348
|
.md3 .zustand-grid { grid-template-columns: repeat(2, 1fr); }
|
|
1349
|
+
/* buttons: mobile mockups use 10px corners, not the desktop pill (round 9 review) */
|
|
1350
|
+
.md3 .mbtn { border-radius: 10px; }
|
|
1344
1351
|
/* highlight pills: Figma 2-col grid — ALL highlights visible, no swipe-line */
|
|
1345
1352
|
.md3 .vdp-highlights { display: grid !important; grid-template-columns: 1fr 1fr; gap: 9px; }
|
|
1346
1353
|
.md3 .vdp-highlights .chip { width: 100%; justify-content: flex-start; }
|
|
@@ -1605,6 +1612,8 @@
|
|
|
1605
1612
|
.md3 .fin-info { margin-top: 10px; padding-top: 10px; }
|
|
1606
1613
|
/* mockup hero rate is a notch bigger on phone (inline style says 48 — hence !important) */
|
|
1607
1614
|
.md3 .fin-rate-main .num { font-size: 52px !important; letter-spacing: -1.5px !important; }
|
|
1615
|
+
/* the struck old figure must NOT inherit the 52px hero size */
|
|
1616
|
+
.md3 .fin-rate-main .fin-rate-old { font-size: 15px !important; letter-spacing: 0 !important; }
|
|
1608
1617
|
/* narrower rating column (figma bar is 115px) frees room for the bigger rate; let the
|
|
1609
1618
|
€ /mtl. suffix wrap under the number instead of pushing the grid wide on 4-digit rates */
|
|
1610
1619
|
.md3 .fin-price-grid { grid-template-columns: minmax(0, 1fr) 112px; }
|
|
@@ -126,6 +126,9 @@ export interface FinanceCalculatorProps {
|
|
|
126
126
|
ratingLabel?: string;
|
|
127
127
|
/** computed monthly rate in EUR for the current mode — supplied, NOT computed here. */
|
|
128
128
|
monthly: number;
|
|
129
|
+
/** struck old monthly rate (fe-financing oldMonthlyInstallment, isStrikeShown-gated) —
|
|
130
|
+
* rendered as the red line-through figure next to the hero rate (fin/leasing only). */
|
|
131
|
+
oldMonthly?: number;
|
|
129
132
|
/** effective annual rate (%) for the current mode — supplied, NOT computed here. */
|
|
130
133
|
apr: number;
|
|
131
134
|
/** current down payment in EUR (controlled). */
|
|
@@ -228,6 +231,7 @@ const FinanceCalculator: React.FunctionComponent<FinanceCalculatorProps> = ({
|
|
|
228
231
|
autoDeId,
|
|
229
232
|
ratingLabel,
|
|
230
233
|
monthly,
|
|
234
|
+
oldMonthly,
|
|
231
235
|
down,
|
|
232
236
|
term,
|
|
233
237
|
downMin,
|
|
@@ -338,6 +342,10 @@ const FinanceCalculator: React.FunctionComponent<FinanceCalculatorProps> = ({
|
|
|
338
342
|
>
|
|
339
343
|
{isCash ? eur(price) : eur(Math.round(monthly))}
|
|
340
344
|
</span>
|
|
345
|
+
{/* struck old rate (REAL oldMonthlyInstallment; SRP strikes the same source) */}
|
|
346
|
+
{!isCash && oldMonthly != null && (
|
|
347
|
+
<s className="num fin-rate-old">{eur(Math.round(oldMonthly))} €</s>
|
|
348
|
+
)}
|
|
341
349
|
<span className="md-body-sm" style={{ fontWeight: 600 }}>
|
|
342
350
|
{isCash ? '€' : `€ ${t('autobahn:finance.perMonth')}`}
|
|
343
351
|
</span>
|