@bytebrand/fe-ui-core-autobahn 1.0.192 → 1.0.193
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/cardParts.tsx +43 -18
- package/package.json +30 -30
- package/theme/md3.css +54 -0
- package/vdp/FinanceCalculator.tsx +10 -1
- package/vdp/VdpModules.tsx +3 -1
package/cards/cardParts.tsx
CHANGED
|
@@ -670,6 +670,17 @@ export const PriceHero: React.FunctionComponent<PriceHeroProps> = ({ car, mode,
|
|
|
670
670
|
car.listPrice already used by DropChip/PpRow. */}
|
|
671
671
|
{isMoney && showOld && (
|
|
672
672
|
<span className="pp-hero-unit-group">
|
|
673
|
+
{/* ADV-423: "UVP" label right before the struck list price — desktop only (mobile
|
|
674
|
+
stays as it was); same tooltip toggle as the price itself. */}
|
|
675
|
+
<span
|
|
676
|
+
className="pp-uvp-label hide-mobile"
|
|
677
|
+
onClick={(e) => {
|
|
678
|
+
e.stopPropagation();
|
|
679
|
+
setUvpTooltipOpen((v) => !v);
|
|
680
|
+
}}
|
|
681
|
+
>
|
|
682
|
+
{t('autobahn:finance.uvp')}
|
|
683
|
+
</span>
|
|
673
684
|
<span
|
|
674
685
|
className={'pp-hero-old' + oldLenClass}
|
|
675
686
|
role="button"
|
|
@@ -1072,24 +1083,38 @@ const PpRow: React.FunctionComponent<PpRowProps> = ({ label, value, unit, old, f
|
|
|
1072
1083
|
</span>
|
|
1073
1084
|
<span className="pp-row-price">
|
|
1074
1085
|
{old != null && (
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1086
|
+
// ADV-423: "UVP" label for the struck list price (PpRow only renders in the desktop SRL
|
|
1087
|
+
// column, and `old` is only ever the Kaufen list price). md3.css places it above the
|
|
1088
|
+
// struck amount there — the fixed-width row has no room for it inline.
|
|
1089
|
+
<span className="pp-uvp-strike">
|
|
1090
|
+
<span
|
|
1091
|
+
className="pp-uvp-label"
|
|
1092
|
+
onClick={(e) => {
|
|
1093
|
+
e.stopPropagation();
|
|
1094
|
+
setUvpTooltipOpen((v) => !v);
|
|
1095
|
+
}}
|
|
1096
|
+
>
|
|
1097
|
+
{t('autobahn:finance.uvp')}
|
|
1098
|
+
</span>
|
|
1099
|
+
<span
|
|
1100
|
+
className="pp-old"
|
|
1101
|
+
role="button"
|
|
1102
|
+
tabIndex={0}
|
|
1103
|
+
onClick={(e) => {
|
|
1104
|
+
e.stopPropagation();
|
|
1105
|
+
setUvpTooltipOpen((v) => !v);
|
|
1106
|
+
}}
|
|
1107
|
+
>
|
|
1108
|
+
{old.toLocaleString('de-DE')} €
|
|
1109
|
+
<UvpBadge
|
|
1110
|
+
n={2}
|
|
1111
|
+
open={uvpTooltipOpen}
|
|
1112
|
+
onToggle={() => setUvpTooltipOpen((v) => !v)}
|
|
1113
|
+
onClose={() => setUvpTooltipOpen(false)}
|
|
1114
|
+
closeLabel={t('autobahn:modal.close')}
|
|
1115
|
+
body={t('autobahn:card.price.uvpListTooltipBody')}
|
|
1116
|
+
/>
|
|
1117
|
+
</span>
|
|
1093
1118
|
</span>
|
|
1094
1119
|
)}
|
|
1095
1120
|
<span className="pp-now">
|
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.193",
|
|
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
|
@@ -15688,3 +15688,57 @@ color: #005CFF;
|
|
|
15688
15688
|
padding: 5px 6px;
|
|
15689
15689
|
}
|
|
15690
15690
|
}
|
|
15691
|
+
/* ADV-423 (legal): "UVP" label directly before every desktop UVP strike-through price (Kaufen:
|
|
15692
|
+
CarCard .cc-price, SRL list .listcard-price PpRow, VDP .fin-calc-card, .fin-modal desktop half,
|
|
15693
|
+
checkout step 3 .cf-panel). Same text spec as the existing "UVP-Rate" eyebrow of the financing
|
|
15694
|
+
price in the same component (.pp-eyebrow: Arial 400 8px/9px #0e2238; .cf-panel: 11px/13px).
|
|
15695
|
+
Mobile keeps its current look — the markup hides the label there via .hide-mobile, and the
|
|
15696
|
+
.pp-hero-unit-group row switch below is desktop-only. */
|
|
15697
|
+
.md3 .pp-uvp-label {
|
|
15698
|
+
font-family: Arial, Helvetica, Arimo, sans-serif;
|
|
15699
|
+
font-style: normal;
|
|
15700
|
+
font-weight: 400;
|
|
15701
|
+
font-size: 8px;
|
|
15702
|
+
line-height: 9px;
|
|
15703
|
+
letter-spacing: normal;
|
|
15704
|
+
text-transform: none;
|
|
15705
|
+
color: #0e2238;
|
|
15706
|
+
white-space: nowrap;
|
|
15707
|
+
margin-right: 4px;
|
|
15708
|
+
cursor: pointer;
|
|
15709
|
+
}
|
|
15710
|
+
.md3 .cf-panel .pp-uvp-label {
|
|
15711
|
+
font-family: 'Arial';
|
|
15712
|
+
font-size: 11px;
|
|
15713
|
+
line-height: 13px;
|
|
15714
|
+
color: #0E2238;
|
|
15715
|
+
}
|
|
15716
|
+
/* label + struck price on one baseline (PpRow, checkout step 3) */
|
|
15717
|
+
.md3 .pp-uvp-strike {
|
|
15718
|
+
display: inline-flex;
|
|
15719
|
+
align-items: baseline;
|
|
15720
|
+
white-space: nowrap;
|
|
15721
|
+
}
|
|
15722
|
+
/* SRL desktop list (.listcard-price PpRow Kaufen row): the price column is a fixed 240px and the
|
|
15723
|
+
Kaufen row already uses ~205 of its 215px, so an inline label would wrap the struck amount. Here
|
|
15724
|
+
the label sits above the struck price instead — exactly like the "UVP-Rate" eyebrow over the
|
|
15725
|
+
struck rate in the financing block of the same column — and is taken out of flow, so the row's
|
|
15726
|
+
width and height stay as they were. */
|
|
15727
|
+
.md3 .listcard-price .pp-uvp-strike {
|
|
15728
|
+
position: relative;
|
|
15729
|
+
}
|
|
15730
|
+
.md3 .listcard-price .pp-uvp-strike .pp-uvp-label {
|
|
15731
|
+
position: absolute;
|
|
15732
|
+
left: 0;
|
|
15733
|
+
bottom: 100%;
|
|
15734
|
+
margin: 0 0 1px;
|
|
15735
|
+
}
|
|
15736
|
+
/* CarCard Kaufen: the struck list price group is a 1-item column; on desktop it now holds the
|
|
15737
|
+
label too, so lay it out as a row (still absolutely positioned above the hero figure, so the
|
|
15738
|
+
card height does not change). */
|
|
15739
|
+
@media (min-width: 601px) {
|
|
15740
|
+
.md3 .cc-price .pp-hero--buy .pp-hero-unit-group {
|
|
15741
|
+
flex-direction: row;
|
|
15742
|
+
align-items: baseline;
|
|
15743
|
+
}
|
|
15744
|
+
}
|
|
@@ -680,11 +680,20 @@ const FinanceCalculator: React.FunctionComponent<FinanceCalculatorProps> = ({
|
|
|
680
680
|
{isCash && (
|
|
681
681
|
<div
|
|
682
682
|
className="hide-mobile fin-rate-strike-slot"
|
|
683
|
-
style={{
|
|
683
|
+
style={{
|
|
684
|
+
display: 'flex',
|
|
685
|
+
justifyContent: 'flex-end',
|
|
686
|
+
alignItems: 'baseline',
|
|
687
|
+
lineHeight: 1,
|
|
688
|
+
marginTop: 0,
|
|
689
|
+
cursor: showStrike ? 'pointer' : 'default',
|
|
690
|
+
}}
|
|
684
691
|
role="button"
|
|
685
692
|
tabIndex={0}
|
|
686
693
|
onClick={() => setUvpTooltipOpen((v) => !v)}
|
|
687
694
|
>
|
|
695
|
+
{/* ADV-423: "UVP" label right before the struck list price (this slot is desktop-only) */}
|
|
696
|
+
{showStrike && <span className="pp-uvp-label">{t('autobahn:finance.uvp')}</span>}
|
|
688
697
|
{showStrike && (
|
|
689
698
|
<s className="num fin-rate-old fin-rate-old-list">
|
|
690
699
|
{eur(listPrice as number)} €
|
package/vdp/VdpModules.tsx
CHANGED
|
@@ -2637,11 +2637,13 @@ export const FinanceDetailsModal: React.FunctionComponent<FinanceDetailsModalPro
|
|
|
2637
2637
|
<div className="fin-rate-main">
|
|
2638
2638
|
{isCash && listPrice != null && listPrice > price && (
|
|
2639
2639
|
<div
|
|
2640
|
-
style={{ display: 'flex', justifyContent: 'flex-end', lineHeight: 1, marginTop: 0 }}
|
|
2640
|
+
style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'baseline', lineHeight: 1, marginTop: 0 }}
|
|
2641
2641
|
role="button"
|
|
2642
2642
|
tabIndex={0}
|
|
2643
2643
|
onClick={() => setUvpTooltipOpen((v) => !v)}
|
|
2644
2644
|
>
|
|
2645
|
+
{/* ADV-423: "UVP" label right before the struck list price (desktop half of the modal) */}
|
|
2646
|
+
<span className="pp-uvp-label">{t('autobahn:finance.uvp')}</span>
|
|
2645
2647
|
<s className="num fin-rate-old fin-rate-old-list">
|
|
2646
2648
|
{eur(listPrice)} €
|
|
2647
2649
|
<span
|