@bytebrand/fe-ui-core-autobahn 1.0.216 → 1.0.218
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/locales/de/autobahn.json +6 -6
- package/locales/en/autobahn.json +6 -6
- package/package.json +30 -30
- package/theme/md3.css +6 -127
- package/vdp/VdpModules.tsx +6 -273
package/locales/de/autobahn.json
CHANGED
|
@@ -664,27 +664,27 @@
|
|
|
664
664
|
"categories": {
|
|
665
665
|
"topPrice": {
|
|
666
666
|
"label": "Top-Preis",
|
|
667
|
-
"description": "Der Preis
|
|
667
|
+
"description": "Der Preis liegt deutlich unter dem geschätzten Marktwert."
|
|
668
668
|
},
|
|
669
669
|
"goodPrice": {
|
|
670
670
|
"label": "Guter Preis",
|
|
671
|
-
"description": "Der Preis liegt etwas unter dem
|
|
671
|
+
"description": "Der Preis liegt etwas unter dem geschätzten Marktwert."
|
|
672
672
|
},
|
|
673
673
|
"fairPrice": {
|
|
674
674
|
"label": "Fairer Preis",
|
|
675
|
-
"description": "
|
|
675
|
+
"description": "Der Preis entspricht in etwa dem geschätzten Marktwert."
|
|
676
676
|
},
|
|
677
677
|
"increasedPrice": {
|
|
678
678
|
"label": "Erhöhter Preis",
|
|
679
|
-
"description": "Der Preis liegt etwas
|
|
679
|
+
"description": "Der Preis liegt etwas über dem geschätzten Marktwert."
|
|
680
680
|
},
|
|
681
681
|
"highPrice": {
|
|
682
682
|
"label": "Hoher Preis",
|
|
683
|
-
"description": "Der Preis
|
|
683
|
+
"description": "Der Preis liegt deutlich über dem geschätzten Marktwert vergleichbarer Fahrzeuge. Eine umfangreiche Ausstattung, Umbauten oder ein besonders guter Zustand können einen höheren Preis rechtfertigen. Bitte beachten Sie die Fahrzeugbeschreibung."
|
|
684
684
|
},
|
|
685
685
|
"noRating": {
|
|
686
686
|
"label": "Keine Bewertung",
|
|
687
|
-
"description": "
|
|
687
|
+
"description": "Für dieses Fahrzeug ist keine Preisbewertung möglich, z. B. weil nicht genügend vergleichbare Angebote vorliegen (etwa bei seltenen Modellen) oder Fahrzeugangaben fehlen."
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
690
|
},
|
package/locales/en/autobahn.json
CHANGED
|
@@ -664,27 +664,27 @@
|
|
|
664
664
|
"categories": {
|
|
665
665
|
"topPrice": {
|
|
666
666
|
"label": "Top price",
|
|
667
|
-
"description": "The price is
|
|
667
|
+
"description": "The price is well below the estimated market value."
|
|
668
668
|
},
|
|
669
669
|
"goodPrice": {
|
|
670
670
|
"label": "Good price",
|
|
671
|
-
"description": "The price
|
|
671
|
+
"description": "The price is slightly below the estimated market value."
|
|
672
672
|
},
|
|
673
673
|
"fairPrice": {
|
|
674
674
|
"label": "Fair price",
|
|
675
|
-
"description": "The price
|
|
675
|
+
"description": "The price roughly matches the estimated market value."
|
|
676
676
|
},
|
|
677
677
|
"increasedPrice": {
|
|
678
678
|
"label": "Increased price",
|
|
679
|
-
"description": "The price
|
|
679
|
+
"description": "The price is slightly above the estimated market value."
|
|
680
680
|
},
|
|
681
681
|
"highPrice": {
|
|
682
682
|
"label": "High price",
|
|
683
|
-
"description": "The price
|
|
683
|
+
"description": "The price is well above the estimated market value of comparable vehicles. Extensive equipment, conversions or a particularly good condition can justify a higher price. Please note the vehicle description."
|
|
684
684
|
},
|
|
685
685
|
"noRating": {
|
|
686
686
|
"label": "No rating",
|
|
687
|
-
"description": "
|
|
687
|
+
"description": "No price rating is possible for this vehicle, e.g. because there are not enough comparable offers (such as for rare models) or vehicle details are missing."
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
690
|
},
|
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.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
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@bytebrand/fe-ui-core-autobahn",
|
|
3
|
+
"version": "1.0.218",
|
|
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
|
@@ -8852,7 +8852,6 @@ line-height: 31px;
|
|
|
8852
8852
|
price row alone); now applied at every width on request, so mobile CarCard matches too. */
|
|
8853
8853
|
.md3 .cc-price .pp-eyebrow,
|
|
8854
8854
|
.md3 .fin-calc-card .pp-eyebrow,
|
|
8855
|
-
.md3 .vdp-bottom-bar .pp-eyebrow,
|
|
8856
8855
|
.md3 .fin-modal .pp-eyebrow {
|
|
8857
8856
|
position: relative;
|
|
8858
8857
|
font-family: Arial, Helvetica, Arimo, sans-serif;
|
|
@@ -8878,7 +8877,6 @@ line-height: 31px;
|
|
|
8878
8877
|
CarRow's desktop stacked Kaufen row (.listcard-price .pp-old, PpRow's "2" badge). */
|
|
8879
8878
|
.md3 .cc-price .pp-eyebrow-badge,
|
|
8880
8879
|
.md3 .fin-calc-card .pp-eyebrow-badge,
|
|
8881
|
-
.md3 .vdp-bottom-bar .pp-eyebrow-badge,
|
|
8882
8880
|
.md3 .fin-modal .pp-eyebrow-badge,
|
|
8883
8881
|
.md3 .listcard-price .pp-old .pp-eyebrow-badge {
|
|
8884
8882
|
display: inline-flex;
|
|
@@ -8909,7 +8907,6 @@ line-height: 31px;
|
|
|
8909
8907
|
/* mobile-only nudge: same badge, tucked slightly closer to the eyebrow text on narrow cards. */
|
|
8910
8908
|
@media (max-width: 1024px) {
|
|
8911
8909
|
.md3 .cc-price .pp-eyebrow-badge,
|
|
8912
|
-
.md3 .vdp-bottom-bar .pp-eyebrow-badge,
|
|
8913
8910
|
.md3 .fin-modal .pp-eyebrow-badge {
|
|
8914
8911
|
top: -5px;
|
|
8915
8912
|
right: -5px;
|
|
@@ -8919,7 +8916,6 @@ line-height: 31px;
|
|
|
8919
8916
|
figure than the "3" badge's own offsets above. */
|
|
8920
8917
|
.md3 .cc-price .pp-hero-old .pp-eyebrow-badge,
|
|
8921
8918
|
.md3 .fin-calc-card .pp-hero-old .pp-eyebrow-badge,
|
|
8922
|
-
.md3 .vdp-bottom-bar .fin-rate-old-bb .pp-eyebrow-badge,
|
|
8923
8919
|
.md3 .fin-modal .fin-rate-old-list .pp-eyebrow-badge {
|
|
8924
8920
|
top: -7px;
|
|
8925
8921
|
right: -12px;
|
|
@@ -8929,7 +8925,6 @@ line-height: 31px;
|
|
|
8929
8925
|
badge) — same popover, reused rather than re-styled. */
|
|
8930
8926
|
.md3 .cc-price .pp-uvp-tooltip,
|
|
8931
8927
|
.md3 .fin-calc-card .pp-uvp-tooltip,
|
|
8932
|
-
.md3 .vdp-bottom-bar .pp-uvp-tooltip,
|
|
8933
8928
|
.md3 .fin-modal .pp-uvp-tooltip,
|
|
8934
8929
|
.md3 .listcard-price .pp-old .pp-uvp-tooltip {
|
|
8935
8930
|
position: absolute;
|
|
@@ -8944,12 +8939,6 @@ line-height: 31px;
|
|
|
8944
8939
|
white-space: normal;
|
|
8945
8940
|
cursor: default;
|
|
8946
8941
|
}
|
|
8947
|
-
/* the bottom bar spans nearly the full phone width, so the shared -84px offset (tuned for
|
|
8948
|
-
the narrower .cc-price card / .fin-calc-card sheet) leaves the popover sitting too far left. */
|
|
8949
|
-
.md3 .vdp-bottom-bar .pp-uvp-tooltip {
|
|
8950
|
-
top: -20px;
|
|
8951
|
-
right: -110px;
|
|
8952
|
-
}
|
|
8953
8942
|
/* CarRow's desktop stacked Kaufen row is narrower still (.pp-old sits inline in the price
|
|
8954
8943
|
row, not a full-width card), so the shared -84px offset overhangs it — pull it in closer. */
|
|
8955
8944
|
.md3 .listcard-price .pp-old .pp-uvp-tooltip {
|
|
@@ -8983,7 +8972,6 @@ line-height: 31px;
|
|
|
8983
8972
|
same "glass circle" convention as VdpViewer's close/back/next overlay buttons. */
|
|
8984
8973
|
.md3 .cc-price .pp-uvp-tooltip-close,
|
|
8985
8974
|
.md3 .fin-calc-card .pp-uvp-tooltip-close,
|
|
8986
|
-
.md3 .vdp-bottom-bar .pp-uvp-tooltip-close,
|
|
8987
8975
|
.md3 .fin-modal .pp-uvp-tooltip-close,
|
|
8988
8976
|
.md3 .listcard-price .pp-old .pp-uvp-tooltip-close {
|
|
8989
8977
|
position: absolute;
|
|
@@ -9002,7 +8990,6 @@ line-height: 31px;
|
|
|
9002
8990
|
}
|
|
9003
8991
|
.md3 .cc-price .pp-uvp-tooltip-body,
|
|
9004
8992
|
.md3 .fin-calc-card .pp-uvp-tooltip-body,
|
|
9005
|
-
.md3 .vdp-bottom-bar .pp-uvp-tooltip-body,
|
|
9006
8993
|
.md3 .fin-modal .pp-uvp-tooltip-body,
|
|
9007
8994
|
.md3 .listcard-price .pp-old .pp-uvp-tooltip-body {
|
|
9008
8995
|
font-family: Arial, Helvetica, Arimo, sans-serif;
|
|
@@ -9707,41 +9694,6 @@ line-height: 31px;
|
|
|
9707
9694
|
transform: rotate(12.53deg);
|
|
9708
9695
|
transform-origin: center;
|
|
9709
9696
|
}
|
|
9710
|
-
/* sticky bottom bar struck old rate — diagonal red strike (Figma), replacing the shared
|
|
9711
|
-
.fin-rate-old's native horizontal line-through for this instance only. */
|
|
9712
|
-
.md3 .bb-price-row .fin-rate-old.fin-rate-old-bb {
|
|
9713
|
-
position: relative;
|
|
9714
|
-
display: inline-block;
|
|
9715
|
-
font-family: Arial, Helvetica, Arimo, sans-serif;
|
|
9716
|
-
font-style: normal;
|
|
9717
|
-
font-weight: 400;
|
|
9718
|
-
font-size: 17px;
|
|
9719
|
-
line-height: 20px;
|
|
9720
|
-
color: #111820;
|
|
9721
|
-
text-decoration: none;
|
|
9722
|
-
padding-bottom: 4px;
|
|
9723
|
-
}
|
|
9724
|
-
.md3 .bb-price-row .fin-rate-old.fin-rate-old-bb::after {
|
|
9725
|
-
content: "";
|
|
9726
|
-
position: absolute;
|
|
9727
|
-
left: -2px;
|
|
9728
|
-
right: 0px;
|
|
9729
|
-
top: 42%;
|
|
9730
|
-
border-top: 2px solid #E60000;
|
|
9731
|
-
transform: rotate(12.53deg);
|
|
9732
|
-
transform-origin: center;
|
|
9733
|
-
}
|
|
9734
|
-
.md3 .bb-price-row .fin-rate-old.fin-rate-old-bb sup {
|
|
9735
|
-
position: relative;
|
|
9736
|
-
top: -5px;
|
|
9737
|
-
vertical-align: super;
|
|
9738
|
-
font-family: Arial, Helvetica, Arimo, sans-serif;
|
|
9739
|
-
font-style: normal;
|
|
9740
|
-
font-weight: 400;
|
|
9741
|
-
font-size: 8px;
|
|
9742
|
-
line-height: 9px;
|
|
9743
|
-
color: #111820;
|
|
9744
|
-
}
|
|
9745
9697
|
/* stacked unit column beside the hero rate (Figma: struck old rate ABOVE "/mtl.") */
|
|
9746
9698
|
.md3 .fin-rate-unit {
|
|
9747
9699
|
display: flex;
|
|
@@ -10055,9 +10007,9 @@ line-height: 31px;
|
|
|
10055
10007
|
}
|
|
10056
10008
|
}
|
|
10057
10009
|
|
|
10058
|
-
/* sticky mobile bar (VDP) — Figma "Sticky Footer": mode tabs +
|
|
10059
|
-
Hidden (slid off-screen) until the page scrolls past the
|
|
10060
|
-
desktop VdpStickyBar's show/scroll-gated behavior. */
|
|
10010
|
+
/* sticky mobile bar (VDP) — Figma "Sticky Footer": mode tabs + CTA row (ADV-436: nothing else, so
|
|
10011
|
+
the bar is as tall as its content). Hidden (slid off-screen) until the page scrolls past the
|
|
10012
|
+
main offer card, matching the desktop VdpStickyBar's show/scroll-gated behavior. */
|
|
10061
10013
|
.md3 .vdp-bottom-bar {
|
|
10062
10014
|
position: fixed;
|
|
10063
10015
|
left: 0;
|
|
@@ -10065,7 +10017,7 @@ line-height: 31px;
|
|
|
10065
10017
|
bottom: 0;
|
|
10066
10018
|
z-index: 60;
|
|
10067
10019
|
width: auto;
|
|
10068
|
-
height:
|
|
10020
|
+
height: auto;
|
|
10069
10021
|
background: rgba(244, 243, 243, 0.95);
|
|
10070
10022
|
border: 1px solid #D4DDE7;
|
|
10071
10023
|
border-radius: 16px 16px 0 0;
|
|
@@ -10104,61 +10056,12 @@ line-height: 31px;
|
|
|
10104
10056
|
line-height: 16px;
|
|
10105
10057
|
color: #005CFF;
|
|
10106
10058
|
}
|
|
10107
|
-
|
|
10108
|
-
font-size: 42px;
|
|
10109
|
-
line-height: 47px;
|
|
10110
|
-
}
|
|
10111
|
-
.md3 .bb-price-row .num.num--len6 {
|
|
10112
|
-
font-size: 38px;
|
|
10113
|
-
line-height: 42px;
|
|
10114
|
-
}
|
|
10115
|
-
.md3 .bb-price-row {
|
|
10116
|
-
display: flex;
|
|
10117
|
-
align-items: center;
|
|
10118
|
-
gap: 30px;
|
|
10119
|
-
padding-top: 10px;
|
|
10120
|
-
}
|
|
10121
|
-
.md3 .vdp-bottom-bar .fin-cond {
|
|
10122
|
-
margin-top: 4px;
|
|
10123
|
-
}
|
|
10124
|
-
.md3 .bb-price-row .bb-price-cash-sup {
|
|
10125
|
-
position: relative;
|
|
10126
|
-
top: -15px;
|
|
10127
|
-
left: 2px;
|
|
10128
|
-
vertical-align: super;
|
|
10129
|
-
font-family: Arial, Helvetica, Arimo, sans-serif;
|
|
10130
|
-
font-style: normal;
|
|
10131
|
-
font-weight: 400;
|
|
10132
|
-
font-size: 10px;
|
|
10133
|
-
line-height: 11px;
|
|
10134
|
-
color: #111820;
|
|
10135
|
-
}
|
|
10136
|
-
.md3 .bb-eval {
|
|
10137
|
-
display: flex;
|
|
10138
|
-
flex-direction: column;
|
|
10139
|
-
align-items: flex-end;
|
|
10140
|
-
align-self: flex-start;
|
|
10141
|
-
gap: 5px;
|
|
10142
|
-
flex: none;
|
|
10143
|
-
width: 135px;
|
|
10144
|
-
}
|
|
10145
|
-
.md3 .bb-eval .fin-eval-pill {
|
|
10146
|
-
padding: 4px 10px;
|
|
10147
|
-
font-size: 11.5px;
|
|
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
|
-
}
|
|
10059
|
+
/* the space under the tabs (the bar's 15px bottom padding mirrors it) */
|
|
10157
10060
|
.md3 .bb-cta-row {
|
|
10158
10061
|
display: flex;
|
|
10159
10062
|
gap: 3px;
|
|
10160
10063
|
align-items: center;
|
|
10161
|
-
margin-top:
|
|
10064
|
+
margin-top: 15px;
|
|
10162
10065
|
}
|
|
10163
10066
|
.md3 .bb-adjust {
|
|
10164
10067
|
color: var(--md-on-surface);
|
|
@@ -15509,17 +15412,6 @@ color: #005CFF;
|
|
|
15509
15412
|
margin-top: 14px;
|
|
15510
15413
|
}
|
|
15511
15414
|
|
|
15512
|
-
/* ADV-406 Sticky Footer (mobile only) — below .fin-cond (its 12px margin-bottom gives the gap
|
|
15513
|
-
above), 4px to the CTA row. The bar's fixed height grows by the warning (34px + 4px). */
|
|
15514
|
-
.md3 .bb-ccn {
|
|
15515
|
-
--ccn-fs: 13px;
|
|
15516
|
-
--ccn-color: #111820;
|
|
15517
|
-
margin: 0 0 4px;
|
|
15518
|
-
}
|
|
15519
|
-
.md3 .vdp-bottom-bar {
|
|
15520
|
-
height: 234px;
|
|
15521
|
-
}
|
|
15522
|
-
|
|
15523
15415
|
/* ADV-406/410 layers (FinanceDetailsModal, CDP + Checkout) — no conditions line there, so the
|
|
15524
15416
|
Figma master colour; 13px per ADV-406 AC. */
|
|
15525
15417
|
.md3 .fin-modal-ccn {
|
|
@@ -15628,11 +15520,6 @@ color: #005CFF;
|
|
|
15628
15520
|
.md3 .fin-calc-card .show-mobile .pp-uvp-label {
|
|
15629
15521
|
margin-right: 0;
|
|
15630
15522
|
}
|
|
15631
|
-
/* mobile sticky bar: the struck .fin-rate-old-bb carries an inline font-size of 15px (line 20px) */
|
|
15632
|
-
.md3 .vdp-bottom-bar .pp-uvp-label {
|
|
15633
|
-
font-size: 15px;
|
|
15634
|
-
line-height: 20px;
|
|
15635
|
-
}
|
|
15636
15523
|
/* checkout step 3 (.cf-rate-old--buy 15px; the label is desktop-only there) */
|
|
15637
15524
|
.md3 .cf-panel .pp-uvp-label {
|
|
15638
15525
|
font-size: 15px;
|
|
@@ -15720,14 +15607,6 @@ color: #005CFF;
|
|
|
15720
15607
|
color: inherit;
|
|
15721
15608
|
}
|
|
15722
15609
|
|
|
15723
|
-
/* ADV-405 follow-up — mobile sticky footer (VdpBottomBar) of a car WITH financing key figures
|
|
15724
|
-
(.vdp-bottom-bar--kf, set on every tab so the tab row never moves when switching): the key figures
|
|
15725
|
-
always take exactly 2 lines (CreditKeyFigures fits its font), measured bar 251px; Leasing/Kaufen
|
|
15726
|
-
keep the same height (empty space instead of a jump). Cars without key figures keep the 234px. */
|
|
15727
|
-
.md3 .vdp-bottom-bar.vdp-bottom-bar--kf {
|
|
15728
|
-
height: 252px;
|
|
15729
|
-
}
|
|
15730
|
-
|
|
15731
15610
|
/* ADV-405 (PM 19.11): the key figures always take exactly two lines — each line unbroken, the
|
|
15732
15611
|
block's font size steps down in CreditKeyFigures until both fit. The trailing "Details"
|
|
15733
15612
|
link follows that size (its own fixed size would keep the line too wide). */
|
package/vdp/VdpModules.tsx
CHANGED
|
@@ -25,8 +25,7 @@
|
|
|
25
25
|
import React, { useState } from 'react';
|
|
26
26
|
import { TranslationFunction } from '../types';
|
|
27
27
|
|
|
28
|
-
import { Button, CreditCostNotice,
|
|
29
|
-
import type { CreditKeyFiguresData } from '../ui';
|
|
28
|
+
import { Button, CreditCostNotice, Dropdown, DropdownOption, Icon, Modal, Spec, StatChip, Stars } from '../ui';
|
|
30
29
|
import { CO2_CLASSES, CO2_COLORS } from '../constants';
|
|
31
30
|
import { ratingTone } from '../data/toAutobahnCar';
|
|
32
31
|
import { ratingLinkProps } from '../ui/ratingLink';
|
|
@@ -1062,7 +1061,6 @@ export const VdpStickyBar: React.FunctionComponent<VdpStickyBarProps> = ({ vehic
|
|
|
1062
1061
|
// ---------------------------------------------------------------------------
|
|
1063
1062
|
|
|
1064
1063
|
export interface VdpBottomBarProps {
|
|
1065
|
-
vehicle: VehicleDetail;
|
|
1066
1064
|
/**
|
|
1067
1065
|
* Whether the bar is docked/visible — page-owned scroll-position toggle: shows after scrolling
|
|
1068
1066
|
* past the main offer card (same STICKY_SHOW_AT threshold VdpStickyBar uses), and additionally
|
|
@@ -1071,16 +1069,10 @@ export interface VdpBottomBarProps {
|
|
|
1071
1069
|
* VdpStickyBar's own `show` (the desktop bar has no such lower boundary).
|
|
1072
1070
|
*/
|
|
1073
1071
|
show: boolean;
|
|
1074
|
-
/** active payment mode — drives the tabs
|
|
1072
|
+
/** active payment mode — drives the tabs (and hides "Rate anpassen" on Kaufen). */
|
|
1075
1073
|
mode?: FinanceMode;
|
|
1076
1074
|
/** mode tab tapped; when omitted the tabs row is not rendered. */
|
|
1077
1075
|
onModeChange?: (mode: FinanceMode) => void;
|
|
1078
|
-
/** monthly rate for the CURRENT mode (fin/leasing differ); falls back to vehicle.monthly. */
|
|
1079
|
-
monthly?: number;
|
|
1080
|
-
/** struck old rate (oldMonthlyInstallment, isStrikeShown-gated) — Figma sticky footer strike. */
|
|
1081
|
-
oldMonthly?: number;
|
|
1082
|
-
/** price-rating label — drives the eval pill + gradient bar (same as the offer card). */
|
|
1083
|
-
ratingLabel?: string;
|
|
1084
1076
|
/** primary CTA click. */
|
|
1085
1077
|
onSecure?: () => void;
|
|
1086
1078
|
/** true once the customer already has an offer request/checkout in progress for this car —
|
|
@@ -1093,25 +1085,6 @@ export interface VdpBottomBarProps {
|
|
|
1093
1085
|
onCall?: () => void;
|
|
1094
1086
|
/** opens the "Rate anpassen" sheet; when omitted the button is not rendered. */
|
|
1095
1087
|
onOpenAdjust?: () => void;
|
|
1096
|
-
/** current down payment (fin) / Sonderzahlung (leasing) in EUR — drives the .fin-cond line. */
|
|
1097
|
-
down?: number;
|
|
1098
|
-
/** current term in months — drives the .fin-cond line. */
|
|
1099
|
-
term?: number;
|
|
1100
|
-
/** leasing annual mileage (km/yr) — leasing-only part of the .fin-cond line. */
|
|
1101
|
-
annualMileage?: number;
|
|
1102
|
-
/** ADV-405 follow-up: financing key figures (Kerndaten) of the current calculation — see
|
|
1103
|
-
* FinanceCalculatorProps.creditKeyFigures (same values, same rule). Financing only; when at
|
|
1104
|
-
* least one is real they replace the "0 € Anzahlung · 60 Monate" .fin-cond text and the bar
|
|
1105
|
-
* switches to content height (.vdp-bottom-bar--kf). Omit to keep the old line. */
|
|
1106
|
-
creditKeyFigures?: CreditKeyFiguresData;
|
|
1107
|
-
/** ADV-405 follow-up (leasing, 19.11): leasing key figures of the current leasing calculation —
|
|
1108
|
-
* see FinanceCalculatorProps.leasingKeyFigures (same values, same rule). Leasing tab only. */
|
|
1109
|
-
leasingKeyFigures?: CreditKeyFiguresData;
|
|
1110
|
-
/** opens the Finanzierungs-/Leasingdetails popup (expanded); when omitted the link is hidden. */
|
|
1111
|
-
onShowDetails?: () => void;
|
|
1112
|
-
/** the price-rating badge + bar were clicked: the page scrolls to its "Preis & Marktwert"
|
|
1113
|
-
* section (#vdp-preis). Omit and they are not a link. */
|
|
1114
|
-
onShowPriceRating?: () => void;
|
|
1115
1088
|
/** whether leasing is actually offered for this car — see FinanceCalculatorProps.leasingAvailable
|
|
1116
1089
|
* for the full rationale. Default true keeps existing callers' behavior. */
|
|
1117
1090
|
leasingAvailable?: boolean;
|
|
@@ -1119,82 +1092,24 @@ export interface VdpBottomBarProps {
|
|
|
1119
1092
|
t: TranslationFunction;
|
|
1120
1093
|
}
|
|
1121
1094
|
|
|
1122
|
-
/** Mobile sticky bottom bar (Figma "Sticky Footer"): mode tabs,
|
|
1123
|
-
*
|
|
1124
|
-
*
|
|
1095
|
+
/** Mobile sticky bottom bar (Figma "Sticky Footer"): mode tabs, then Angebot anfragen · phone ·
|
|
1096
|
+
* Rate anpassen. ADV-436: nothing else — the rate, the price rating, the conditions / key figures
|
|
1097
|
+
* and the credit-cost warning made the bar too tall; they stay in the offer card above. */
|
|
1125
1098
|
export const VdpBottomBar: React.FunctionComponent<VdpBottomBarProps> = ({
|
|
1126
|
-
vehicle,
|
|
1127
1099
|
show,
|
|
1128
1100
|
mode = 'fin',
|
|
1129
1101
|
onModeChange,
|
|
1130
|
-
monthly,
|
|
1131
|
-
oldMonthly,
|
|
1132
|
-
ratingLabel,
|
|
1133
1102
|
onSecure,
|
|
1134
1103
|
secured,
|
|
1135
1104
|
secureLabel,
|
|
1136
1105
|
onCall,
|
|
1137
1106
|
onOpenAdjust,
|
|
1138
|
-
down,
|
|
1139
|
-
term,
|
|
1140
|
-
annualMileage,
|
|
1141
|
-
creditKeyFigures,
|
|
1142
|
-
leasingKeyFigures,
|
|
1143
|
-
onShowDetails,
|
|
1144
|
-
onShowPriceRating,
|
|
1145
1107
|
leasingAvailable = true,
|
|
1146
1108
|
t,
|
|
1147
1109
|
}) => {
|
|
1148
|
-
const [uvpTooltipOpen, setUvpTooltipOpen] = useState(false);
|
|
1149
1110
|
const isCash = mode === 'cash';
|
|
1150
|
-
// ADV-405 follow-up: financing shows the key figures instead of the conditions text below —
|
|
1151
|
-
// only when at least one figure is real (else the old line stays, and the bar its fixed height).
|
|
1152
|
-
const tabKeyFigures = mode === 'fin' ? creditKeyFigures : mode === 'leasing' ? leasingKeyFigures : undefined;
|
|
1153
|
-
const keyFigures = tabKeyFigures && hasCreditKeyFigures(tabKeyFigures) ? tabKeyFigures : undefined;
|
|
1154
|
-
// the bar's height follows whether the CAR has key figures (financing or leasing), not the active
|
|
1155
|
-
// tab, so the tab row (the bar's top edge) does not move under the finger when switching tabs.
|
|
1156
|
-
const tallBar =
|
|
1157
|
-
!!(creditKeyFigures && hasCreditKeyFigures(creditKeyFigures)) || !!(leasingAvailable && leasingKeyFigures && hasCreditKeyFigures(leasingKeyFigures));
|
|
1158
|
-
const rate = monthly != null ? monthly : vehicle.monthly;
|
|
1159
|
-
// each tier shows its own real label (Top/Guter/Fairer/Erhöht/Hoher Preis), "Keine Bewertung"
|
|
1160
|
-
// grey without a marker; same derivation as FinanceCalculator (evalPillOf).
|
|
1161
|
-
const { tier: evalTier, label: evalTierLabel, color: evalPillColor, background: evalPillBackground } = evalPillOf(ratingLabel, t);
|
|
1162
|
-
// condition summary — same wording/order as FinanceCalculator's own .fin-cond (financing
|
|
1163
|
-
// "0 € Anzahlung · 60 Monate", leasing "0 € Sonderzahlung · 36 Mon. · 10.000 km/Jahr").
|
|
1164
|
-
const condParts: string[] = [];
|
|
1165
|
-
if (mode === 'leasing') {
|
|
1166
|
-
condParts.push(
|
|
1167
|
-
...t('autobahn:card.price.leaseTerms', {
|
|
1168
|
-
firstInstallment: eur(down || 0),
|
|
1169
|
-
months: term,
|
|
1170
|
-
mileage: annualMileage != null ? eur(annualMileage) : '',
|
|
1171
|
-
}).split(' · '),
|
|
1172
|
-
);
|
|
1173
|
-
} else if (!isCash) {
|
|
1174
|
-
condParts.push(t('autobahn:finance.downPaymentLabel', { value: eur(down || 0) }));
|
|
1175
|
-
condParts.push(t('autobahn:finance.monthsLabel', { months: term, count: term }));
|
|
1176
|
-
}
|
|
1177
|
-
const priceStyle: React.CSSProperties = isCash
|
|
1178
|
-
? {
|
|
1179
|
-
fontFamily: 'Arial, Helvetica, Arimo, sans-serif',
|
|
1180
|
-
fontWeight: 700,
|
|
1181
|
-
fontSize: 40,
|
|
1182
|
-
color: '#005CFF',
|
|
1183
|
-
letterSpacing: '-1px',
|
|
1184
|
-
}
|
|
1185
|
-
: {
|
|
1186
|
-
fontFamily: 'Arial, Helvetica, Arimo, sans-serif',
|
|
1187
|
-
fontWeight: 700,
|
|
1188
|
-
fontSize: 52,
|
|
1189
|
-
lineHeight: '58px',
|
|
1190
|
-
color: '#005CFF',
|
|
1191
|
-
letterSpacing: '-1px',
|
|
1192
|
-
};
|
|
1193
|
-
const priceValue = isCash ? vehicle.price : Math.round(rate);
|
|
1194
|
-
const priceLen = String(Math.round(priceValue)).length;
|
|
1195
|
-
const priceLenClass = isCash ? '' : priceLen >= 6 ? ' num--len6' : priceLen === 5 ? ' num--len5' : '';
|
|
1196
1111
|
return (
|
|
1197
|
-
<div className={'vdp-bottom-bar show-mobile' + (show ? ' vdp-bottom-bar--on' : '')
|
|
1112
|
+
<div className={'vdp-bottom-bar show-mobile' + (show ? ' vdp-bottom-bar--on' : '')}>
|
|
1198
1113
|
{onModeChange && (
|
|
1199
1114
|
<div className="fin-tabs bb-tabs" role="tablist">
|
|
1200
1115
|
{(
|
|
@@ -1217,188 +1132,6 @@ export const VdpBottomBar: React.FunctionComponent<VdpBottomBarProps> = ({
|
|
|
1217
1132
|
))}
|
|
1218
1133
|
</div>
|
|
1219
1134
|
)}
|
|
1220
|
-
<div className="bb-price-row">
|
|
1221
|
-
<div style={{ display: 'flex', flexDirection: 'column', minWidth: 0, flex: 1 }}>
|
|
1222
|
-
{isCash && vehicle.listPrice != null && vehicle.listPrice > vehicle.price && (
|
|
1223
|
-
// ADV-423: "UVP" label right before the struck list price (same 15px as the price)
|
|
1224
|
-
<span className="pp-uvp-strike" style={{ alignSelf: 'flex-end' }}>
|
|
1225
|
-
<span
|
|
1226
|
-
className="pp-uvp-label"
|
|
1227
|
-
onClick={(e) => {
|
|
1228
|
-
e.stopPropagation();
|
|
1229
|
-
setUvpTooltipOpen((v) => !v);
|
|
1230
|
-
}}
|
|
1231
|
-
>
|
|
1232
|
-
{t('autobahn:finance.uvp')}
|
|
1233
|
-
</span>
|
|
1234
|
-
<s
|
|
1235
|
-
className="num fin-rate-old fin-rate-old-bb"
|
|
1236
|
-
style={{ paddingBottom: 0, fontSize: 15 }}
|
|
1237
|
-
role="button"
|
|
1238
|
-
tabIndex={0}
|
|
1239
|
-
onClick={(e) => {
|
|
1240
|
-
e.stopPropagation();
|
|
1241
|
-
setUvpTooltipOpen((v) => !v);
|
|
1242
|
-
}}
|
|
1243
|
-
>
|
|
1244
|
-
{eur(vehicle.listPrice)} €
|
|
1245
|
-
<span className="pp-eyebrow-badge">2</span>
|
|
1246
|
-
{uvpTooltipOpen && (
|
|
1247
|
-
<div className="pp-uvp-tooltip" onClick={(e) => e.stopPropagation()}>
|
|
1248
|
-
<button
|
|
1249
|
-
type="button"
|
|
1250
|
-
className="pp-uvp-tooltip-close"
|
|
1251
|
-
aria-label={t('autobahn:modal.close')}
|
|
1252
|
-
onClick={(e) => {
|
|
1253
|
-
e.stopPropagation();
|
|
1254
|
-
setUvpTooltipOpen(false);
|
|
1255
|
-
}}
|
|
1256
|
-
>
|
|
1257
|
-
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1258
|
-
<path d="M5 5L15 15M15 5L5 15" stroke="white" strokeWidth={2.4} strokeLinecap="round" />
|
|
1259
|
-
</svg>
|
|
1260
|
-
</button>
|
|
1261
|
-
<div className="pp-uvp-tooltip-body">{t('autobahn:card.price.uvpListTooltipBody')}</div>
|
|
1262
|
-
</div>
|
|
1263
|
-
)}
|
|
1264
|
-
</s>
|
|
1265
|
-
</span>
|
|
1266
|
-
)}
|
|
1267
|
-
<div style={{ display: 'flex', alignItems: 'center', whiteSpace: 'nowrap', minWidth: 0 }}>
|
|
1268
|
-
<span className={'num' + priceLenClass} style={priceStyle}>
|
|
1269
|
-
{isCash ? eur(vehicle.price) : eur(Math.round(rate))}
|
|
1270
|
-
</span>
|
|
1271
|
-
<span className={'num' + priceLenClass} style={{ ...priceStyle, marginLeft: 10 }}>
|
|
1272
|
-
€
|
|
1273
|
-
</span>
|
|
1274
|
-
{isCash && <sup className="bb-price-cash-sup">1</sup>}
|
|
1275
|
-
{/* <span className="md-label-sm" style={{ fontWeight: 600 }}>{t('autobahn:finance.fixedPrice')}</span> */}
|
|
1276
|
-
{!isCash && (
|
|
1277
|
-
<span className="fin-rate-unit" style={{ fontSize: 12.5, paddingLeft: 15 }}>
|
|
1278
|
-
{oldMonthly != null && (
|
|
1279
|
-
<span
|
|
1280
|
-
style={{ display: 'contents' }}
|
|
1281
|
-
role="button"
|
|
1282
|
-
tabIndex={0}
|
|
1283
|
-
onClick={() => setUvpTooltipOpen((v) => !v)}
|
|
1284
|
-
>
|
|
1285
|
-
<span className="pp-eyebrow">
|
|
1286
|
-
{t('autobahn:card.price.uvpRateLabel')}
|
|
1287
|
-
<span className="pp-eyebrow-badge">3</span>
|
|
1288
|
-
{uvpTooltipOpen && (
|
|
1289
|
-
<div className="pp-uvp-tooltip" onClick={(e) => e.stopPropagation()}>
|
|
1290
|
-
<button
|
|
1291
|
-
type="button"
|
|
1292
|
-
className="pp-uvp-tooltip-close"
|
|
1293
|
-
aria-label={t('autobahn:modal.close')}
|
|
1294
|
-
onClick={(e) => {
|
|
1295
|
-
e.stopPropagation();
|
|
1296
|
-
setUvpTooltipOpen(false);
|
|
1297
|
-
}}
|
|
1298
|
-
>
|
|
1299
|
-
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
1300
|
-
<path d="M5 5L15 15M15 5L5 15" stroke="white" strokeWidth={2.4} strokeLinecap="round" />
|
|
1301
|
-
</svg>
|
|
1302
|
-
</button>
|
|
1303
|
-
<div className="pp-uvp-tooltip-body">
|
|
1304
|
-
{t(mode === 'leasing' ? 'autobahn:card.price.uvpRateTooltipBodyLeasing' : 'autobahn:card.price.uvpRateTooltipBody')}
|
|
1305
|
-
</div>
|
|
1306
|
-
</div>
|
|
1307
|
-
)}
|
|
1308
|
-
</span>
|
|
1309
|
-
<s className="num fin-rate-old fin-rate-old-bb">
|
|
1310
|
-
{eur(Math.round(oldMonthly))} €
|
|
1311
|
-
</s>
|
|
1312
|
-
</span>
|
|
1313
|
-
)}
|
|
1314
|
-
{/* no struck old rate above it (strike hidden) — nudge "/ mtl." down so it
|
|
1315
|
-
sits level with the blue hero rate instead of centering high in the row. */}
|
|
1316
|
-
<span
|
|
1317
|
-
style={{
|
|
1318
|
-
fontFamily: 'Arial, Helvetica, Arimo, sans-serif',
|
|
1319
|
-
fontWeight: 700,
|
|
1320
|
-
fontSize: 18,
|
|
1321
|
-
lineHeight: '21px',
|
|
1322
|
-
color: '#5B6B7F',
|
|
1323
|
-
...(oldMonthly == null ? { paddingTop: 20 } : {}),
|
|
1324
|
-
}}
|
|
1325
|
-
>
|
|
1326
|
-
{t('autobahn:bottom.perMonth').replace(/^\/\s*/, '/ ')}
|
|
1327
|
-
</span>
|
|
1328
|
-
</span>
|
|
1329
|
-
)}
|
|
1330
|
-
</div>
|
|
1331
|
-
</div>
|
|
1332
|
-
{ratingLabel && (
|
|
1333
|
-
<div
|
|
1334
|
-
className={onShowPriceRating ? 'bb-eval rating-link' : 'bb-eval'}
|
|
1335
|
-
{...(onShowPriceRating
|
|
1336
|
-
? ratingLinkProps(onShowPriceRating, t('autobahn:finance.priceRatingLink', { rating: evalTierLabel }))
|
|
1337
|
-
: {})}
|
|
1338
|
-
>
|
|
1339
|
-
<span
|
|
1340
|
-
className="fin-eval-pill"
|
|
1341
|
-
style={{
|
|
1342
|
-
width: '100%',
|
|
1343
|
-
height: 27,
|
|
1344
|
-
padding: 0,
|
|
1345
|
-
marginBottom: 5,
|
|
1346
|
-
boxSizing: 'border-box',
|
|
1347
|
-
display: 'flex',
|
|
1348
|
-
alignItems: 'center',
|
|
1349
|
-
justifyContent: 'center',
|
|
1350
|
-
fontFamily: 'Arial, Helvetica, Arimo, sans-serif',
|
|
1351
|
-
fontWeight: 700,
|
|
1352
|
-
fontSize: 12,
|
|
1353
|
-
lineHeight: '14px',
|
|
1354
|
-
textAlign: 'center',
|
|
1355
|
-
borderRadius: 11,
|
|
1356
|
-
color: evalPillColor,
|
|
1357
|
-
background: evalPillBackground,
|
|
1358
|
-
}}
|
|
1359
|
-
>
|
|
1360
|
-
{evalTierLabel}
|
|
1361
|
-
<sup>4</sup>
|
|
1362
|
-
</span>
|
|
1363
|
-
<EvalBar tier={evalTier} />
|
|
1364
|
-
</div>
|
|
1365
|
-
)}
|
|
1366
|
-
</div>
|
|
1367
|
-
{/* ADV-405 follow-up: financing with real key figures → the Kerndaten (2 lines in the
|
|
1368
|
-
.fin-cond style, wrapping on narrow phones) ending with the same details link. */}
|
|
1369
|
-
{keyFigures ? (
|
|
1370
|
-
<CreditKeyFigures
|
|
1371
|
-
t={t}
|
|
1372
|
-
figures={keyFigures}
|
|
1373
|
-
cls="fin-cond bb-ckf"
|
|
1374
|
-
details={
|
|
1375
|
-
onShowDetails && (
|
|
1376
|
-
<button type="button" className="cc-terms-link" onClick={onShowDetails}>
|
|
1377
|
-
{mode === 'leasing' ? t('autobahn:card.price.detailsLink') : t('autobahn:finance.financingDetails')}
|
|
1378
|
-
</button>
|
|
1379
|
-
)
|
|
1380
|
-
}
|
|
1381
|
-
/>
|
|
1382
|
-
) : !isCash && (
|
|
1383
|
-
<div className="fin-cond">
|
|
1384
|
-
{condParts.map((part, i) => (
|
|
1385
|
-
<React.Fragment key={i}>
|
|
1386
|
-
{i > 0 && <span className="cc-terms-dot"> · </span>}
|
|
1387
|
-
{part}
|
|
1388
|
-
</React.Fragment>
|
|
1389
|
-
))}
|
|
1390
|
-
{onShowDetails && (
|
|
1391
|
-
<>
|
|
1392
|
-
<span className="cc-terms-dot"> · </span>
|
|
1393
|
-
<button type="button" className="cc-terms-link" onClick={onShowDetails}>
|
|
1394
|
-
{mode === 'leasing' ? t('autobahn:card.price.detailsLink') : t('autobahn:finance.financingDetails')}
|
|
1395
|
-
</button>
|
|
1396
|
-
</>
|
|
1397
|
-
)}
|
|
1398
|
-
</div>
|
|
1399
|
-
)}
|
|
1400
|
-
{/* ADV-405/406 Kreditkosten-Hinweis (Sticky Footer): below the conditions line, above the CTAs. */}
|
|
1401
|
-
{!isCash && <CreditCostNotice t={t} cls="bb-ccn" />}
|
|
1402
1135
|
<div className="bb-cta-row">
|
|
1403
1136
|
<Button
|
|
1404
1137
|
variant="filled"
|