@bytebrand/fe-ui-core-autobahn 1.0.133 → 1.0.134
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/chrome/Footer.tsx +9 -1
- package/package.json +1 -1
- package/theme/md3.css +1 -0
- package/vdp/VdpModules.tsx +18 -61
- package/vdp/index.ts +0 -2
package/chrome/Footer.tsx
CHANGED
|
@@ -79,6 +79,13 @@ export interface FooterProps {
|
|
|
79
79
|
* strings as the legacy footer so /search stays compliant where prices/rates are shown.
|
|
80
80
|
*/
|
|
81
81
|
t: TranslationFunction;
|
|
82
|
+
/**
|
|
83
|
+
* Adds footnotes ⁵ (Pkw-EnVKV possible CO₂ costs) and ⁶ (§3d KraftStG EV tax exemption) to the
|
|
84
|
+
* disclaimer block, right after ⁴ (price evaluation) and before the WLTP consumption note. Real
|
|
85
|
+
* legal copy tied to the "Laufende Kosten pro Jahr" cards on the CDP — only pass true there
|
|
86
|
+
* (VehicleDetailedNextPage), never site-wide, since every other page shows only footnotes 1-4.
|
|
87
|
+
*/
|
|
88
|
+
showCostFootnotes?: boolean;
|
|
82
89
|
}
|
|
83
90
|
|
|
84
91
|
/**
|
|
@@ -86,7 +93,7 @@ export interface FooterProps {
|
|
|
86
93
|
* disclaimer block, and a copyright + "Nach Oben" bar. Pure/presentational MD3 chrome — renders
|
|
87
94
|
* correctly only inside a `<div className="md3">` subtree (scoped theme at source/theme/autobahn).
|
|
88
95
|
*/
|
|
89
|
-
const Footer: React.FunctionComponent<FooterProps> = ({ t }) => {
|
|
96
|
+
const Footer: React.FunctionComponent<FooterProps> = ({ t, showCostFootnotes }) => {
|
|
90
97
|
const scrollTop = (): void => window.scroll({ top: 0, left: 0, behavior: 'smooth' });
|
|
91
98
|
const now = new Date();
|
|
92
99
|
const year = now.getFullYear();
|
|
@@ -179,6 +186,7 @@ const Footer: React.FunctionComponent<FooterProps> = ({ t }) => {
|
|
|
179
186
|
t('footer:manufacturerUvp'),
|
|
180
187
|
t('footer:uvpComparisonRate'),
|
|
181
188
|
t('footer:priceEvaluation', { date: today }),
|
|
189
|
+
...(showCostFootnotes ? [t('footer:co2CostsInfo'), t('footer:evTaxExemption')] : []),
|
|
182
190
|
t('footer:consumptionInfo'),
|
|
183
191
|
t('footer:vehicleImages'),
|
|
184
192
|
].join('<br />'),
|
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.134",
|
|
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
package/vdp/VdpModules.tsx
CHANGED
|
@@ -417,7 +417,7 @@ const footnoteStyle: React.CSSProperties = {
|
|
|
417
417
|
fontWeight: 700,
|
|
418
418
|
fontSize: 18,
|
|
419
419
|
lineHeight: '24px',
|
|
420
|
-
color: '#
|
|
420
|
+
color: '#0E2238',
|
|
421
421
|
};
|
|
422
422
|
|
|
423
423
|
const summaryCardTitleStyle: React.CSSProperties = {
|
|
@@ -445,9 +445,8 @@ export const VdpEnergyTaxSummary: React.FunctionComponent<VdpEnergyTaxSummaryPro
|
|
|
445
445
|
display: 'flex',
|
|
446
446
|
width: '100%',
|
|
447
447
|
gap: 4,
|
|
448
|
-
background: '
|
|
449
|
-
borderRadius:
|
|
450
|
-
border: '1px solid var(--md-outline-variant)',
|
|
448
|
+
background: '#F5F7FA',
|
|
449
|
+
borderRadius: 12,
|
|
451
450
|
}}
|
|
452
451
|
>
|
|
453
452
|
<div className="vdp-ets-col vdp-ets-col--first" style={{ flex: 1 }}>
|
|
@@ -500,9 +499,8 @@ export const VdpCo2CostsSummary: React.FunctionComponent<VdpCo2CostsSummaryProps
|
|
|
500
499
|
display: 'flex',
|
|
501
500
|
width: '100%',
|
|
502
501
|
gap: 4,
|
|
503
|
-
background: '
|
|
504
|
-
borderRadius:
|
|
505
|
-
border: '1px solid var(--md-outline-variant)',
|
|
502
|
+
background: '#F5F7FA',
|
|
503
|
+
borderRadius: 12,
|
|
506
504
|
}}
|
|
507
505
|
>
|
|
508
506
|
{rows.map((row, i) => (
|
|
@@ -520,60 +518,6 @@ export const VdpCo2CostsSummary: React.FunctionComponent<VdpCo2CostsSummaryProps
|
|
|
520
518
|
);
|
|
521
519
|
};
|
|
522
520
|
|
|
523
|
-
// ---------------------------------------------------------------------------
|
|
524
|
-
// Legal footnote text for the "⁵"/"⁶" markers used in VdpCo2CostsSummary/VdpEnergyTaxSummary
|
|
525
|
-
// above — real Pkw-EnVKV/§3d KraftStG disclosure copy (verbatim, not paraphrased), plain
|
|
526
|
-
// text (no card/background). Needs-data: each paragraph only shows when its corresponding
|
|
527
|
-
// card above actually rendered (never an orphaned footnote for a marker nobody saw).
|
|
528
|
-
// ---------------------------------------------------------------------------
|
|
529
|
-
|
|
530
|
-
export interface VdpCostFootnotesProps {
|
|
531
|
-
vehicle: VehicleDetail;
|
|
532
|
-
t: TranslationFunction;
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
const costFootnoteStyle: React.CSSProperties = {
|
|
536
|
-
fontFamily: 'Arimo',
|
|
537
|
-
fontStyle: 'normal',
|
|
538
|
-
fontWeight: 700,
|
|
539
|
-
fontSize: 13.5,
|
|
540
|
-
lineHeight: '16px',
|
|
541
|
-
color: '#000000',
|
|
542
|
-
};
|
|
543
|
-
|
|
544
|
-
export const VdpCostFootnotes: React.FunctionComponent<VdpCostFootnotesProps> = ({ vehicle, t }) => {
|
|
545
|
-
const showCo2Footnote = !!vehicle.co2CostsSummary;
|
|
546
|
-
const showTaxFootnote = !!vehicle.energyTaxSummary;
|
|
547
|
-
if (!showCo2Footnote && !showTaxFootnote) return null;
|
|
548
|
-
return (
|
|
549
|
-
<div id="vdp-cost-footnotes" style={costFootnoteStyle}>
|
|
550
|
-
{showCo2Footnote && (
|
|
551
|
-
<>
|
|
552
|
-
{t('vehicleProps:value.co2CostsFootnoteTitle')}
|
|
553
|
-
<br />
|
|
554
|
-
<br />
|
|
555
|
-
{t('vehicleProps:value.co2CostsFootnote')}
|
|
556
|
-
</>
|
|
557
|
-
)}
|
|
558
|
-
{showCo2Footnote && showTaxFootnote && (
|
|
559
|
-
<>
|
|
560
|
-
<br />
|
|
561
|
-
<br />
|
|
562
|
-
<br />
|
|
563
|
-
</>
|
|
564
|
-
)}
|
|
565
|
-
{showTaxFootnote && (
|
|
566
|
-
<>
|
|
567
|
-
{t('vehicleProps:value.taxExemptFootnoteTitle')}
|
|
568
|
-
<br />
|
|
569
|
-
<br />
|
|
570
|
-
{t('vehicleProps:value.taxExemptFootnote')}
|
|
571
|
-
</>
|
|
572
|
-
)}
|
|
573
|
-
</div>
|
|
574
|
-
);
|
|
575
|
-
};
|
|
576
|
-
|
|
577
521
|
// ---------------------------------------------------------------------------
|
|
578
522
|
// Equipment list (grouped + searchable)
|
|
579
523
|
// ---------------------------------------------------------------------------
|
|
@@ -734,6 +678,19 @@ export const Co2Label: React.FunctionComponent<Co2LabelProps> = ({ vehicle, t })
|
|
|
734
678
|
</div>
|
|
735
679
|
{/* no EnVKV footer line — Figma drops it (the * on the heading refers to the page-footer
|
|
736
680
|
disclaimer instead); the scale caption above carries the WLTP-kombiniert wording */}
|
|
681
|
+
|
|
682
|
+
{/* Pkw-EnVKV mandatory cost disclosure — moved to the bottom of this same card (Figma) rather
|
|
683
|
+
than standing as its own top-level block; each still gates on its own vehicle data. */}
|
|
684
|
+
{vehicle.energyTaxSummary && (
|
|
685
|
+
<div style={{ paddingTop: 20, borderTop: '1px solid #C5C6D2' }}>
|
|
686
|
+
<VdpEnergyTaxSummary vehicle={vehicle} t={t} />
|
|
687
|
+
</div>
|
|
688
|
+
)}
|
|
689
|
+
{vehicle.co2CostsSummary && (
|
|
690
|
+
<div style={{ marginTop: 22 }}>
|
|
691
|
+
<VdpCo2CostsSummary vehicle={vehicle} t={t} />
|
|
692
|
+
</div>
|
|
693
|
+
)}
|
|
737
694
|
</div>
|
|
738
695
|
);
|
|
739
696
|
};
|
package/vdp/index.ts
CHANGED
|
@@ -31,7 +31,6 @@ export {
|
|
|
31
31
|
VdpSpecTable,
|
|
32
32
|
VdpEnergyTaxSummary,
|
|
33
33
|
VdpCo2CostsSummary,
|
|
34
|
-
VdpCostFootnotes,
|
|
35
34
|
EquipmentList,
|
|
36
35
|
Co2Label,
|
|
37
36
|
VehicleDescription,
|
|
@@ -54,7 +53,6 @@ export type {
|
|
|
54
53
|
VdpSpecTableProps,
|
|
55
54
|
VdpEnergyTaxSummaryProps,
|
|
56
55
|
VdpCo2CostsSummaryProps,
|
|
57
|
-
VdpCostFootnotesProps,
|
|
58
56
|
EquipmentListProps,
|
|
59
57
|
Co2LabelProps,
|
|
60
58
|
VehicleDescriptionProps,
|