@bytebrand/fe-ui-core-autobahn 1.0.214 → 1.0.215
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/cards/CarCard.tsx +59 -14
- package/cards/CarRow.tsx +33 -9
- package/cards/cardParts.tsx +58 -18
- package/compat/PriceRating/PriceRating.styl +5 -7
- package/compat/PriceRatingDetailed/PriceRatingDetailed.styl +8 -6
- package/compat/legacy-theme/priceReviewColors.styl +18 -5
- package/constants/app.ts +11 -1
- package/constants/autobahn.ts +39 -0
- package/constants/core.ts +12 -1
- package/data/fieldMapping.ts +3 -3
- package/data/toAutobahnCar.ts +14 -12
- package/locales/de/autobahn.json +3 -1
- package/locales/en/autobahn.json +3 -1
- package/package.json +30 -30
- package/theme/md3.css +115 -218
- package/ui/StatChip.tsx +8 -3
- package/ui/index.ts +1 -0
- package/ui/ratingLink.ts +36 -0
- package/vdp/FinanceCalculator.tsx +130 -27
- package/vdp/VdpModules.tsx +66 -665
- package/vdp/index.ts +0 -3
- package/vdp/types.ts +2 -12
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.
|
|
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.215",
|
|
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.30",
|
|
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/theme/md3.css
CHANGED
|
@@ -55,9 +55,31 @@
|
|
|
55
55
|
--md-secondary-container: #e7e9f1;
|
|
56
56
|
--md-on-secondary-container: #3a4150;
|
|
57
57
|
|
|
58
|
-
/* price-rating
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
/* price-rating badges, the same on every page (Figma 474sauvNgCYK2mEq5iks9e 142:3643 "Die
|
|
59
|
+
auto.de Bewertungskategorien"): text (fg) on background (bg) per tier, and the bar segment
|
|
60
|
+
colour (bar). constants/autobahn.ts holds the same values (TIER_TEXT_COLORS,
|
|
61
|
+
TIER_BACKGROUNDS, TIER_COLORS, NO_RATING_*) for the inline-styled pills; fe-main's
|
|
62
|
+
ratingPalette test keeps the two in step. */
|
|
63
|
+
--rating-top-fg: #168a45;
|
|
64
|
+
--rating-top-bg: #dff3e5;
|
|
65
|
+
--rating-top-bar: #168a45;
|
|
66
|
+
--rating-good-fg: #66b84d;
|
|
67
|
+
--rating-good-bg: #e4f3df;
|
|
68
|
+
--rating-good-bar: #66b84d;
|
|
69
|
+
--rating-fair-fg: #ffb800;
|
|
70
|
+
--rating-fair-bg: #fff6db;
|
|
71
|
+
--rating-fair-bar: #f7c544;
|
|
72
|
+
--rating-raised-fg: #f26b43;
|
|
73
|
+
--rating-raised-bg: #ffefd5;
|
|
74
|
+
--rating-raised-bar: #f26b43;
|
|
75
|
+
--rating-high-fg: #e60000;
|
|
76
|
+
--rating-high-bg: #ffd3d3;
|
|
77
|
+
--rating-high-bar: #e60000;
|
|
78
|
+
--rating-none-fg: #5b6b7f;
|
|
79
|
+
--rating-none-bg: #c8d1de;
|
|
80
|
+
|
|
81
|
+
/* deal accent (green) — generic "good" chips (e.g. the price-drop chip); the price-rating
|
|
82
|
+
badges use the --rating-* colours above. */
|
|
61
83
|
--md-good: #0f7b43;
|
|
62
84
|
--md-good-container: color-mix(in srgb, #168a45 16%, transparent);
|
|
63
85
|
--md-on-good-container: #168a45;
|
|
@@ -468,6 +490,32 @@ line-height: 31px;
|
|
|
468
490
|
background: var(--md-warn-container);
|
|
469
491
|
color: var(--md-on-warn-container);
|
|
470
492
|
}
|
|
493
|
+
/* "Keine Bewertung" as a plain tone */
|
|
494
|
+
.md3 .statchip--neutral {
|
|
495
|
+
color: var(--rating-none-fg);
|
|
496
|
+
background: var(--rating-none-bg);
|
|
497
|
+
}
|
|
498
|
+
/* the price-rating chip (StatChip `rating`, VDP header + search list row): each tier its own
|
|
499
|
+
badge colours, the same as every other rating badge (--rating-*). */
|
|
500
|
+
.md3 .statchip--rating-top { color: var(--rating-top-fg); background: var(--rating-top-bg); }
|
|
501
|
+
.md3 .statchip--rating-good { color: var(--rating-good-fg); background: var(--rating-good-bg); }
|
|
502
|
+
.md3 .statchip--rating-fair { color: var(--rating-fair-fg); background: var(--rating-fair-bg); }
|
|
503
|
+
.md3 .statchip--rating-raised { color: var(--rating-raised-fg); background: var(--rating-raised-bg); }
|
|
504
|
+
.md3 .statchip--rating-high { color: var(--rating-high-fg); background: var(--rating-high-bg); }
|
|
505
|
+
.md3 .statchip--rating-none { color: var(--rating-none-fg); background: var(--rating-none-bg); }
|
|
506
|
+
/* a price-rating badge (with its bar) that opens the car's "Preis & Marktwert" section
|
|
507
|
+
(ui/ratingLink.ts ratingLinkProps): pointer cursor, and a focus ring for the keyboard */
|
|
508
|
+
.md3 .rating-link {
|
|
509
|
+
cursor: pointer;
|
|
510
|
+
}
|
|
511
|
+
.md3 span.rating-link {
|
|
512
|
+
display: inline-flex;
|
|
513
|
+
}
|
|
514
|
+
.md3 .rating-link:focus-visible {
|
|
515
|
+
outline: 2px solid var(--md-primary);
|
|
516
|
+
outline-offset: 3px;
|
|
517
|
+
border-radius: 12px;
|
|
518
|
+
}
|
|
471
519
|
/* "4" footnote (VDP header's "Guter Preis" chip) — .statchip is a flex container like
|
|
472
520
|
.fin-eval-pill, so the same position:relative/top lift technique applies, just re-tuned for
|
|
473
521
|
this chip's smaller 12px text. */
|
|
@@ -511,15 +559,6 @@ line-height: 31px;
|
|
|
511
559
|
font-size: 9px;
|
|
512
560
|
line-height: 9px;
|
|
513
561
|
}
|
|
514
|
-
/* 'good' tone here is specifically the "Guter Preis" rating (same canonical green as the
|
|
515
|
-
fin-eval-pill "good" tier elsewhere on this page) — literal color, not the --md-good-container
|
|
516
|
-
token, matching that other pill's own literal-color treatment. --warn (Fairer Preis) is
|
|
517
|
-
untouched, still tokenized. */
|
|
518
|
-
.md3 .vdp-headrow .statchip--good,
|
|
519
|
-
.md3 .listcard-price .statchip--good {
|
|
520
|
-
color: rgb(22, 138, 69);
|
|
521
|
-
background: color-mix(in srgb, rgb(22, 138, 69) 16%, transparent);
|
|
522
|
-
}
|
|
523
562
|
|
|
524
563
|
/* small image label (views, photo count) */
|
|
525
564
|
.md3 .imglabel {
|
|
@@ -2078,10 +2117,10 @@ line-height: 31px;
|
|
|
2078
2117
|
gap: 8px;
|
|
2079
2118
|
flex: none;
|
|
2080
2119
|
align-items: stretch;
|
|
2081
|
-
/* Figma 64860-62117: fixed
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
width:
|
|
2120
|
+
/* Figma 64860-62117: fixed column so the pill and the bar (width:100%) span the same width
|
|
2121
|
+
instead of shrink-wrapping to whichever tier label happens to be widest. 108 (not the frame's
|
|
2122
|
+
106) since the pill is now 108×28 everywhere (EvalPill). */
|
|
2123
|
+
width: 108px;
|
|
2085
2124
|
}
|
|
2086
2125
|
@media (max-width: 600px) {
|
|
2087
2126
|
.md3 .cf-panel .fin-eval-col {
|
|
@@ -9120,7 +9159,7 @@ line-height: 31px;
|
|
|
9120
9159
|
.md3 .cc-price .fin-eval-col {
|
|
9121
9160
|
display: flex;
|
|
9122
9161
|
flex-direction: column;
|
|
9123
|
-
gap:
|
|
9162
|
+
gap: 13px; /* pill → bar, Figma */
|
|
9124
9163
|
width: 112px;
|
|
9125
9164
|
flex: none;
|
|
9126
9165
|
}
|
|
@@ -9128,8 +9167,8 @@ line-height: 31px;
|
|
|
9128
9167
|
.cc-price, incl. the VDP "Ähnliche Fahrzeuge" rail; .fin-calc-card; .fin-modal) — one shared
|
|
9129
9168
|
rule instead of three copies. `background`/`color` are deliberately NOT set here: they stay
|
|
9130
9169
|
driven by the tier-color inline style each render site sets (see PriceEvalCol in
|
|
9131
|
-
cardParts.tsx / FinanceCalculator.tsx / VdpModules.tsx,
|
|
9132
|
-
|
|
9170
|
+
cardParts.tsx / FinanceCalculator.tsx / VdpModules.tsx: evalPillOf, the --rating-* badge
|
|
9171
|
+
colours) — a `!important` used to hardcode this pill's
|
|
9133
9172
|
background to a fixed #dff3e5 here, silently overriding that inline value regardless of tier. */
|
|
9134
9173
|
.md3 .cc-price .fin-eval-pill,
|
|
9135
9174
|
.md3 .fin-calc-card .fin-eval-pill,
|
|
@@ -9165,9 +9204,9 @@ line-height: 31px;
|
|
|
9165
9204
|
line-height: 9px;
|
|
9166
9205
|
}
|
|
9167
9206
|
.md3 .cc-price .fin-eval-bar {
|
|
9168
|
-
/*
|
|
9169
|
-
|
|
9170
|
-
width:
|
|
9207
|
+
/* the full 112px .fin-eval-col, exactly as wide as the pill right above it (which fills the
|
|
9208
|
+
column too, .fin-eval-pill--fit) */
|
|
9209
|
+
width: 100%;
|
|
9171
9210
|
height: 7px;
|
|
9172
9211
|
}
|
|
9173
9212
|
.md3 .cc-price .fin-eval-seg:first-child {
|
|
@@ -9176,15 +9215,13 @@ line-height: 31px;
|
|
|
9176
9215
|
.md3 .cc-price .fin-eval-seg:last-of-type {
|
|
9177
9216
|
border-radius: 0 4px 4px 0;
|
|
9178
9217
|
}
|
|
9218
|
+
/* the ring takes its segment's colour (EvalBar's inline TIER_COLORS), Guter Preis included */
|
|
9179
9219
|
.md3 .cc-price .fin-eval-thumb {
|
|
9180
9220
|
width: 18px;
|
|
9181
9221
|
height: 18px;
|
|
9182
9222
|
border-width: 2px;
|
|
9183
9223
|
border-radius: 9px;
|
|
9184
9224
|
}
|
|
9185
|
-
.md3 .cc-price .fin-eval-thumb--good {
|
|
9186
|
-
border-color: #168a45 !important;
|
|
9187
|
-
}
|
|
9188
9225
|
/* financing/leasing terms line + "Finanzierungsdetails"/"Leasingdetails" link (PriceTerms in
|
|
9189
9226
|
cardParts.tsx), full-width under the price/rating row. Same quiet typography as .pp-hero-terms
|
|
9190
9227
|
(PricePaths); the link resets button chrome and reuses the primary color so it reads as tappable. */
|
|
@@ -9455,7 +9492,7 @@ line-height: 31px;
|
|
|
9455
9492
|
.md3 .fin-calc-card .fin-eval-col {
|
|
9456
9493
|
display: flex;
|
|
9457
9494
|
flex-direction: column;
|
|
9458
|
-
gap:
|
|
9495
|
+
gap: 13px; /* pill → bar, Figma */
|
|
9459
9496
|
grid-area: evalcol;
|
|
9460
9497
|
width: 112px;
|
|
9461
9498
|
justify-self: end;
|
|
@@ -9471,7 +9508,7 @@ line-height: 31px;
|
|
|
9471
9508
|
.md3 .fin-modal .fin-eval-col {
|
|
9472
9509
|
display: flex;
|
|
9473
9510
|
flex-direction: column;
|
|
9474
|
-
gap:
|
|
9511
|
+
gap: 13px; /* pill → bar, Figma */
|
|
9475
9512
|
grid-area: evalcol;
|
|
9476
9513
|
width: 112px;
|
|
9477
9514
|
justify-self: end;
|
|
@@ -9504,6 +9541,40 @@ line-height: 31px;
|
|
|
9504
9541
|
.md3 .fin-eval-pill .lucide {
|
|
9505
9542
|
flex: none;
|
|
9506
9543
|
}
|
|
9544
|
+
/* EvalPill (FinanceCalculator.tsx): the price-rating pill is always 108×28 whatever the rating
|
|
9545
|
+
(Figma "Guter-Preis⁴", 108 Fill × 28 Hug), in the offer card, the finance sheet, the car cards
|
|
9546
|
+
and the checkout. The label keeps 20px either side; EvalPill steps the font size down from this
|
|
9547
|
+
12px until a long label ("Keine Bewertung⁴", "Erhöhter Preis⁴") fits. Later in the file and as
|
|
9548
|
+
specific as the per-location .fin-eval-pill / --good rules above, so it wins over them. */
|
|
9549
|
+
/* "Fill": exactly as wide as the bar below it (PM 2026-11-20) — the column's width (112 in the offer
|
|
9550
|
+
card, the finance sheet and the car cards, 108 in the checkout), the pill-cell stretching to it */
|
|
9551
|
+
.md3 .fin-eval-pill-cell .fin-eval-pill--fit {
|
|
9552
|
+
flex: none;
|
|
9553
|
+
width: 100%;
|
|
9554
|
+
height: 28px;
|
|
9555
|
+
box-sizing: border-box;
|
|
9556
|
+
padding: 0 20px;
|
|
9557
|
+
display: flex;
|
|
9558
|
+
align-items: center;
|
|
9559
|
+
justify-content: center;
|
|
9560
|
+
gap: 0;
|
|
9561
|
+
border-radius: 16px;
|
|
9562
|
+
font-family: 'Arial', 'Arimo', sans-serif;
|
|
9563
|
+
font-weight: 700;
|
|
9564
|
+
font-size: 12px;
|
|
9565
|
+
line-height: 14px;
|
|
9566
|
+
white-space: nowrap;
|
|
9567
|
+
}
|
|
9568
|
+
/* the "4" scales with the fitted label: 9px at the full 12px, raised to the cap height */
|
|
9569
|
+
.md3 .fin-eval-pill-cell .fin-eval-pill--fit .fin-eval-pill-text sup {
|
|
9570
|
+
position: relative;
|
|
9571
|
+
top: -0.3em;
|
|
9572
|
+
left: 0;
|
|
9573
|
+
margin-left: 0.1em;
|
|
9574
|
+
font-size: 0.75em;
|
|
9575
|
+
line-height: 0;
|
|
9576
|
+
vertical-align: baseline;
|
|
9577
|
+
}
|
|
9507
9578
|
/* gradient spectrum bar + circle thumb — replaces opacity-segment design */
|
|
9508
9579
|
/* segmented evaluation bar (Figma round 12/13: discrete tier segments, CONTINUOUS —
|
|
9509
9580
|
no gaps; only the outer corners are rounded so the thumb can overflow) */
|
|
@@ -10075,6 +10146,14 @@ line-height: 31px;
|
|
|
10075
10146
|
padding: 4px 10px;
|
|
10076
10147
|
font-size: 11.5px;
|
|
10077
10148
|
}
|
|
10149
|
+
/* the "4" footnote, raised like on the offer card's pill (the pill is a flex container) */
|
|
10150
|
+
.md3 .bb-eval .fin-eval-pill sup {
|
|
10151
|
+
position: relative;
|
|
10152
|
+
top: -3px;
|
|
10153
|
+
left: -4px;
|
|
10154
|
+
font-size: 9px;
|
|
10155
|
+
line-height: 9px;
|
|
10156
|
+
}
|
|
10078
10157
|
.md3 .bb-cta-row {
|
|
10079
10158
|
display: flex;
|
|
10080
10159
|
gap: 3px;
|
|
@@ -10105,7 +10184,8 @@ line-height: 31px;
|
|
|
10105
10184
|
z-index: 71;
|
|
10106
10185
|
background: var(--md-surface);
|
|
10107
10186
|
border-radius: var(--md-r-xl) var(--md-r-xl) 0 0;
|
|
10108
|
-
|
|
10187
|
+
/* % of the fixed containing block, not vh/dvh: on iOS vh is the toolbars-collapsed height, and Chrome on iOS does not shrink dvh while its toolbars are shown either, so a 92vh/92dvh bottom sheet grew under the address bar and hid its own header (title, download, close). The fixed box itself always matches the visible area. */
|
|
10188
|
+
max-height: 92%;
|
|
10109
10189
|
display: flex;
|
|
10110
10190
|
flex-direction: column;
|
|
10111
10191
|
box-shadow: 0 -8px 30px rgba(16, 22, 42, 0.22);
|
|
@@ -12237,7 +12317,6 @@ color: #005CFF;
|
|
|
12237
12317
|
.md3 .hiw-section,
|
|
12238
12318
|
.md3 #vdp-kontakt,
|
|
12239
12319
|
.md3 #vdp-bewertungen,
|
|
12240
|
-
.md3 #vdp-preis,
|
|
12241
12320
|
.md3 .vdp-similar {
|
|
12242
12321
|
margin-top: 14px !important;
|
|
12243
12322
|
}
|
|
@@ -12250,187 +12329,6 @@ color: #005CFF;
|
|
|
12250
12329
|
border: 1px solid #D4DDE7;
|
|
12251
12330
|
box-shadow: none;
|
|
12252
12331
|
}
|
|
12253
|
-
.md3 #vdp-preis {
|
|
12254
|
-
padding: 0 !important;
|
|
12255
|
-
border: 1px solid #D4DDE7;
|
|
12256
|
-
box-shadow: none;
|
|
12257
|
-
}
|
|
12258
|
-
.md3 #vdp-preis h2 {
|
|
12259
|
-
padding: 22px 22px 0 !important;
|
|
12260
|
-
margin-top: 0;
|
|
12261
|
-
margin-bottom: 11px !important;
|
|
12262
|
-
font-family: Arial, Helvetica, Arimo, sans-serif;
|
|
12263
|
-
font-style: normal;
|
|
12264
|
-
font-weight: 700;
|
|
12265
|
-
font-size: 24px;
|
|
12266
|
-
line-height: 29px;
|
|
12267
|
-
color: #1d2a38;
|
|
12268
|
-
}
|
|
12269
|
-
.md3 #vdp-preis .fin-eval-bar {
|
|
12270
|
-
height: 9px;
|
|
12271
|
-
}
|
|
12272
|
-
.md3 #vdp-preis .fin-eval-seg:first-child {
|
|
12273
|
-
border-radius: 4px 0 0 4px;
|
|
12274
|
-
}
|
|
12275
|
-
.md3 #vdp-preis .fin-eval-seg:last-of-type {
|
|
12276
|
-
border-radius: 0 4px 4px 0;
|
|
12277
|
-
}
|
|
12278
|
-
.md3 #vdp-preis > div:first-of-type {
|
|
12279
|
-
padding-left: 22px;
|
|
12280
|
-
padding-right: 22px;
|
|
12281
|
-
}
|
|
12282
|
-
.md3 #vdp-preis > div:last-child {
|
|
12283
|
-
margin-top: 24px !important;
|
|
12284
|
-
}
|
|
12285
|
-
.md3 .fin-criteria-card {
|
|
12286
|
-
padding: 0 !important;
|
|
12287
|
-
margin: 0 10px;
|
|
12288
|
-
}
|
|
12289
|
-
.md3 .fin-criteria-card > button {
|
|
12290
|
-
padding: 13px 13px 25px 13px !important;
|
|
12291
|
-
}
|
|
12292
|
-
.md3 #vdp-preis .fin-criteria-card > button .md-title-sm {
|
|
12293
|
-
font-family: Arial, Helvetica, Arimo, sans-serif;
|
|
12294
|
-
font-style: normal;
|
|
12295
|
-
font-weight: 700;
|
|
12296
|
-
font-size: 13px !important;
|
|
12297
|
-
line-height: 18px;
|
|
12298
|
-
color: #1d2a38;
|
|
12299
|
-
}
|
|
12300
|
-
.md3 .fin-criteria-card > button > svg:last-child {
|
|
12301
|
-
stroke-width: 2.6px !important;
|
|
12302
|
-
}
|
|
12303
|
-
.md3 .fin-criteria-card > button > svg:last-child path {
|
|
12304
|
-
stroke-width: 2.6px !important;
|
|
12305
|
-
}
|
|
12306
|
-
.md3 .fin-criteria-card .fin-criteria-grid {
|
|
12307
|
-
padding: 0 10px 20px 13px !important;
|
|
12308
|
-
column-gap: 10px !important;
|
|
12309
|
-
row-gap: 14px !important;
|
|
12310
|
-
}
|
|
12311
|
-
.md3 .fin-criteria-card .fin-criteria-icon-grid {
|
|
12312
|
-
padding-top: 13px !important;
|
|
12313
|
-
}
|
|
12314
|
-
.md3 .fin-criteria-card .fin-criteria-grid svg {
|
|
12315
|
-
width: 28px;
|
|
12316
|
-
height: 28px;
|
|
12317
|
-
}
|
|
12318
|
-
.md3 .fin-criteria-card .fin-criteria-grid > div {
|
|
12319
|
-
gap: 3px !important;
|
|
12320
|
-
}
|
|
12321
|
-
.md3 .fin-criteria-card .fin-criteria-grid > div.fin-criteria-tier-row {
|
|
12322
|
-
gap: 12px !important;
|
|
12323
|
-
}
|
|
12324
|
-
.md3 .fin-criteria-card .fin-criteria-grid svg[viewBox="0 0 21 21"] {
|
|
12325
|
-
width: 21px;
|
|
12326
|
-
height: 21px;
|
|
12327
|
-
}
|
|
12328
|
-
.md3 #vdp-preis .fin-criteria-card .md-label-sm {
|
|
12329
|
-
font-family: Arial, Helvetica, Arimo, sans-serif;
|
|
12330
|
-
font-style: normal;
|
|
12331
|
-
font-weight: 400;
|
|
12332
|
-
font-size: 10.3px;
|
|
12333
|
-
line-height: 14px;
|
|
12334
|
-
color: #5b6b7f;
|
|
12335
|
-
}
|
|
12336
|
-
.md3 #vdp-preis .fin-criteria-card .md-title-sm {
|
|
12337
|
-
font-family: Arial, Helvetica, Arimo, sans-serif;
|
|
12338
|
-
font-style: normal;
|
|
12339
|
-
font-weight: 700;
|
|
12340
|
-
font-size: 10.3px !important;
|
|
12341
|
-
line-height: 14px;
|
|
12342
|
-
color: #1d2a38;
|
|
12343
|
-
}
|
|
12344
|
-
.md3 .fin-criteria-note {
|
|
12345
|
-
margin: 0;
|
|
12346
|
-
padding: 0 13px 20px;
|
|
12347
|
-
font-family: Arial, Helvetica, Arimo, sans-serif;
|
|
12348
|
-
font-style: normal;
|
|
12349
|
-
font-weight: 400;
|
|
12350
|
-
font-size: 10px;
|
|
12351
|
-
line-height: 14px;
|
|
12352
|
-
color: #5b6b7f;
|
|
12353
|
-
}
|
|
12354
|
-
.md3 .fin-criteria-divider {
|
|
12355
|
-
width: 310px;
|
|
12356
|
-
height: 1px;
|
|
12357
|
-
background: #e6ecf3;
|
|
12358
|
-
margin: 0 auto;
|
|
12359
|
-
}
|
|
12360
|
-
.md3 #vdp-preis > div:last-child > button {
|
|
12361
|
-
font-family: Arial, Helvetica, Arimo, sans-serif;
|
|
12362
|
-
font-style: normal;
|
|
12363
|
-
font-weight: 700 !important;
|
|
12364
|
-
font-size: 13px !important;
|
|
12365
|
-
line-height: 18px;
|
|
12366
|
-
color: #005cff !important;
|
|
12367
|
-
padding-left: 22px !important;
|
|
12368
|
-
padding-right: 22px !important;
|
|
12369
|
-
}
|
|
12370
|
-
.md3 #vdp-preis > div:last-child > button .lucide {
|
|
12371
|
-
width: 18px;
|
|
12372
|
-
height: 18px;
|
|
12373
|
-
margin-left: auto;
|
|
12374
|
-
stroke-width: 2.6px !important;
|
|
12375
|
-
}
|
|
12376
|
-
.md3 #vdp-preis > div:last-child > button .lucide path {
|
|
12377
|
-
stroke-width: 2.6px !important;
|
|
12378
|
-
}
|
|
12379
|
-
.md3 #vdp-preis .fin-eval-thumb {
|
|
12380
|
-
width: 26px;
|
|
12381
|
-
height: 26px;
|
|
12382
|
-
background: #ffffff;
|
|
12383
|
-
border-width: 2px;
|
|
12384
|
-
border-radius: 13px;
|
|
12385
|
-
}
|
|
12386
|
-
.md3 #vdp-preis .fin-eval-thumb--good {
|
|
12387
|
-
border-color: #66b84d !important;
|
|
12388
|
-
}
|
|
12389
|
-
.md3 #vdp-preis .md-label-sm {
|
|
12390
|
-
font-family: Arial, Helvetica, Arimo, sans-serif;
|
|
12391
|
-
font-style: normal;
|
|
12392
|
-
font-weight: 400;
|
|
12393
|
-
font-size: 11.5px;
|
|
12394
|
-
line-height: 15px;
|
|
12395
|
-
color: #5b6b7f;
|
|
12396
|
-
}
|
|
12397
|
-
.md3 .fin-eval-good-badge {
|
|
12398
|
-
margin-top: 25px !important;
|
|
12399
|
-
height: 56px;
|
|
12400
|
-
width: 100%;
|
|
12401
|
-
box-sizing: border-box;
|
|
12402
|
-
background: #dff3e5 !important;
|
|
12403
|
-
border: 1px solid #a9e0b9;
|
|
12404
|
-
border-radius: 12px !important;
|
|
12405
|
-
padding-left: 22px !important;
|
|
12406
|
-
padding-right: 22px !important;
|
|
12407
|
-
}
|
|
12408
|
-
.md3 .fin-eval-good-badge svg {
|
|
12409
|
-
width: 18px;
|
|
12410
|
-
height: 18px;
|
|
12411
|
-
stroke: #66b84d;
|
|
12412
|
-
}
|
|
12413
|
-
.md3 .fin-eval-good-badge span {
|
|
12414
|
-
font-family: Arial, Helvetica, Arimo, sans-serif;
|
|
12415
|
-
font-style: normal;
|
|
12416
|
-
font-weight: 700 !important;
|
|
12417
|
-
font-size: 13px !important;
|
|
12418
|
-
line-height: 18px;
|
|
12419
|
-
color: #66b84d !important;
|
|
12420
|
-
}
|
|
12421
|
-
.md3 #vdp-preis > p {
|
|
12422
|
-
margin-top: 0;
|
|
12423
|
-
padding-top: 0;
|
|
12424
|
-
padding-left: 22px;
|
|
12425
|
-
padding-right: 22px;
|
|
12426
|
-
margin-bottom: 10px !important;
|
|
12427
|
-
font-family: Arial, Helvetica, Arimo, sans-serif;
|
|
12428
|
-
font-style: normal;
|
|
12429
|
-
font-weight: 400;
|
|
12430
|
-
font-size: 13px;
|
|
12431
|
-
line-height: 18px;
|
|
12432
|
-
color: #5b6b7f;
|
|
12433
|
-
}
|
|
12434
12332
|
.md3 #vdp-bewertungen > div:first-child {
|
|
12435
12333
|
gap: 26px !important;
|
|
12436
12334
|
margin-bottom: 28px !important;
|
|
@@ -13139,7 +13037,7 @@ color: #005CFF;
|
|
|
13139
13037
|
}
|
|
13140
13038
|
/* narrower rating column (figma bar is 115px) frees room for the bigger rate; let the
|
|
13141
13039
|
€ /mtl. suffix wrap under the number instead of pushing the grid wide on 4-digit rates.
|
|
13142
|
-
fin-eval-col becomes a real flex column here (pill above bar, fixed
|
|
13040
|
+
fin-eval-col becomes a real flex column here (pill above bar, fixed 13px gap — see the
|
|
13143
13041
|
shared .fin-eval-col rule below), spanning both grid rows on the right. */
|
|
13144
13042
|
.md3 .fin-price-grid {
|
|
13145
13043
|
grid-template-columns: minmax(0, 1fr) 112px;
|
|
@@ -13175,13 +13073,13 @@ color: #005CFF;
|
|
|
13175
13073
|
.md3 .fin-eval-col {
|
|
13176
13074
|
display: flex;
|
|
13177
13075
|
flex-direction: column;
|
|
13178
|
-
gap:
|
|
13076
|
+
gap: 13px; /* pill → bar, Figma */
|
|
13179
13077
|
grid-area: evalcol;
|
|
13180
13078
|
}
|
|
13181
13079
|
/* box sizing for this pill (all three of its locations) lives in the shared, higher-specificity
|
|
13182
13080
|
.cc-price/.fin-calc-card/.fin-modal rule near the top of this file — this generic, unscoped
|
|
13183
13081
|
copy used to ALSO force `background: #dff3e5 !important`, silently overriding every tier's
|
|
13184
|
-
real inline color
|
|
13082
|
+
real inline color at this breakpoint. */
|
|
13185
13083
|
.md3 .fin-eval-bar {
|
|
13186
13084
|
height: 7px;
|
|
13187
13085
|
}
|
|
@@ -13197,9 +13095,6 @@ color: #005CFF;
|
|
|
13197
13095
|
border-width: 2px;
|
|
13198
13096
|
border-radius: 9px;
|
|
13199
13097
|
}
|
|
13200
|
-
.md3 .fin-eval-thumb--good {
|
|
13201
|
-
border-color: #168a45 !important;
|
|
13202
|
-
}
|
|
13203
13098
|
.md3 .fin-cond {
|
|
13204
13099
|
font-family: Arial, Helvetica, Arimo, sans-serif;
|
|
13205
13100
|
font-style: normal;
|
|
@@ -14263,7 +14158,8 @@ color: #005CFF;
|
|
|
14263
14158
|
flex-direction: column;
|
|
14264
14159
|
width: 100%;
|
|
14265
14160
|
max-width: 560px;
|
|
14266
|
-
|
|
14161
|
+
/* % of the scrim (fixed, inset 0, 16px padding) instead of calc(100vh - 32px): see the iOS note on the mobile .mmodal below */
|
|
14162
|
+
max-height: 100%;
|
|
14267
14163
|
background: var(--md-sc-lowest, #fff);
|
|
14268
14164
|
color: var(--md-on-surface);
|
|
14269
14165
|
border-radius: var(--md-r-lg);
|
|
@@ -14409,7 +14305,8 @@ color: #005CFF;
|
|
|
14409
14305
|
}
|
|
14410
14306
|
.md3 .mmodal {
|
|
14411
14307
|
max-width: 100%;
|
|
14412
|
-
|
|
14308
|
+
/* % of the fixed containing block, not vh/dvh: on iOS vh is the toolbars-collapsed height, and Chrome on iOS does not shrink dvh while its toolbars are shown either, so a 92vh/92dvh bottom sheet grew under the address bar and hid its own header (title, download, close). The fixed box itself always matches the visible area. */
|
|
14309
|
+
max-height: 92%;
|
|
14413
14310
|
border-radius: var(--md-r-lg) var(--md-r-lg) 0 0;
|
|
14414
14311
|
border-bottom: 0;
|
|
14415
14312
|
animation: mmodal-sheet-up 0.25s ease-out;
|
package/ui/StatChip.tsx
CHANGED
|
@@ -2,17 +2,22 @@ import React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import Icon from './Icon';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
/** 'neutral' (grey) is for "Keine Bewertung", which is neither a good nor a warn rating. */
|
|
6
|
+
export type StatChipTone = 'good' | 'warn' | 'neutral';
|
|
6
7
|
|
|
7
8
|
export interface StatChipProps {
|
|
8
9
|
tone?: StatChipTone;
|
|
10
|
+
/** A price-rating chip: the mapRating() `rating` key ('top' … 'high', 'none'). It paints the chip
|
|
11
|
+
* in that tier's badge colours (md3.css .statchip--rating-<key>, the --rating-* palette)
|
|
12
|
+
* instead of the `tone`. */
|
|
13
|
+
rating?: string;
|
|
9
14
|
/** kebab-case lucide icon name rendered before the content. */
|
|
10
15
|
icon?: string;
|
|
11
16
|
children?: React.ReactNode;
|
|
12
17
|
}
|
|
13
18
|
|
|
14
|
-
const StatChip: React.FunctionComponent<StatChipProps> = ({ tone = 'good', icon, children }) => (
|
|
15
|
-
<span className={`statchip statchip--${tone}`}>
|
|
19
|
+
const StatChip: React.FunctionComponent<StatChipProps> = ({ tone = 'good', rating, icon, children }) => (
|
|
20
|
+
<span className={rating ? `statchip statchip--rating statchip--rating-${rating}` : `statchip statchip--${tone}`}>
|
|
16
21
|
{icon && <Icon name={icon} size={14} />}
|
|
17
22
|
{children}
|
|
18
23
|
</span>
|
package/ui/index.ts
CHANGED
|
@@ -29,6 +29,7 @@ export type { ChipProps } from './Chip';
|
|
|
29
29
|
|
|
30
30
|
export { default as StatChip } from './StatChip';
|
|
31
31
|
export type { StatChipProps, StatChipTone } from './StatChip';
|
|
32
|
+
export { ratingLinkProps, PRICE_SECTION_ID, PRICE_SECTION_HASH } from './ratingLink';
|
|
32
33
|
|
|
33
34
|
export { default as CreditCostNotice, CREDIT_COST_WARNING_DE } from './CreditCostNotice';
|
|
34
35
|
export type { CreditCostNoticeProps, CreditCostNoticeTone, CreditCostNoticeSize } from './CreditCostNotice';
|
package/ui/ratingLink.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
/** id of the VDP's "Preis & Marktwert" section (fe-main PriceMarket), where a price-rating
|
|
4
|
+
* badge leads; `PRICE_SECTION_HASH` is the URL fragment that opens a VDP scrolled to it. */
|
|
5
|
+
export const PRICE_SECTION_ID = 'vdp-preis';
|
|
6
|
+
export const PRICE_SECTION_HASH = '#' + PRICE_SECTION_ID;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Props that make a price-rating badge (and the bar next to it) a link to the VDP's
|
|
10
|
+
* "Preis & Marktwert" section: a click, Enter or Space calls `onActivate`. The event is stopped,
|
|
11
|
+
* so the card the badge sits in does not also run its own "open the car" click. The element
|
|
12
|
+
* gets the class `rating-link` (md3.css: pointer cursor, focus ring) — spread these onto it and
|
|
13
|
+
* add that class.
|
|
14
|
+
*/
|
|
15
|
+
export function ratingLinkProps(onActivate: () => void, ariaLabel: string): {
|
|
16
|
+
role: 'link';
|
|
17
|
+
tabIndex: number;
|
|
18
|
+
'aria-label': string;
|
|
19
|
+
onClick: (e: React.MouseEvent) => void;
|
|
20
|
+
onKeyDown: (e: React.KeyboardEvent) => void;
|
|
21
|
+
} {
|
|
22
|
+
const activate = (e: React.SyntheticEvent): void => {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
e.stopPropagation();
|
|
25
|
+
onActivate();
|
|
26
|
+
};
|
|
27
|
+
return {
|
|
28
|
+
role: 'link',
|
|
29
|
+
tabIndex: 0,
|
|
30
|
+
'aria-label': ariaLabel,
|
|
31
|
+
onClick: activate,
|
|
32
|
+
onKeyDown: (e: React.KeyboardEvent) => {
|
|
33
|
+
if (e.key === 'Enter' || e.key === ' ') activate(e);
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
}
|