@bytebrand/fe-ui-core-autobahn 1.0.67 → 1.0.69
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 +11 -2
- package/package.json +1 -1
- package/theme/md3.css +9 -3
package/cards/cardParts.tsx
CHANGED
|
@@ -475,6 +475,11 @@ export interface PriceHeroProps {
|
|
|
475
475
|
car: AutobahnCar;
|
|
476
476
|
mode: PaymentMode;
|
|
477
477
|
t: TranslationFunction;
|
|
478
|
+
/** opt-in: render the "/mtl." unit next to the rate even without a struck old price to caption
|
|
479
|
+
* (default false keeps every existing caller's behavior — the unit only ever showed alongside
|
|
480
|
+
* the UVP-Rate/old-price group). The SRP desktop card wants the unit on every financing/leasing
|
|
481
|
+
* rate, discounted or not. */
|
|
482
|
+
alwaysShowUnit?: boolean;
|
|
478
483
|
}
|
|
479
484
|
|
|
480
485
|
/** footnote badge + click-to-open popover, shared by the Finanzierung/Leasing "UVP-Rate" (³) and
|
|
@@ -529,7 +534,7 @@ const UvpBadge: React.FunctionComponent<{
|
|
|
529
534
|
* superscript footnote markers (¹ price, ² struck reference, ³ "/mtl.") match the Figma card —
|
|
530
535
|
* their legal text lives in the page's own footnote block, not duplicated per-card.
|
|
531
536
|
*/
|
|
532
|
-
export const PriceHero: React.FunctionComponent<PriceHeroProps> = ({ car, mode, t }) => {
|
|
537
|
+
export const PriceHero: React.FunctionComponent<PriceHeroProps> = ({ car, mode, t, alwaysShowUnit }) => {
|
|
533
538
|
const [uvpTooltipOpen, setUvpTooltipOpen] = useState(false);
|
|
534
539
|
const isMoney = mode === 'buy';
|
|
535
540
|
const value = mode === 'financing' ? car.monthly : mode === 'leasing' ? (car.lease as number) : car.price;
|
|
@@ -578,6 +583,10 @@ export const PriceHero: React.FunctionComponent<PriceHeroProps> = ({ car, mode,
|
|
|
578
583
|
<span className="pp-hero-unit">{t('autobahn:card.price.perMonth')}</span>
|
|
579
584
|
</span>
|
|
580
585
|
)}
|
|
586
|
+
{/* opt-in (alwaysShowUnit): no discount to caption, so just the plain unit next to the
|
|
587
|
+
rate instead of the full UVP-Rate/old-price group — existing callers that don't pass
|
|
588
|
+
this prop keep showing nothing here, exactly as before. */}
|
|
589
|
+
{!isMoney && !showOld && alwaysShowUnit && <span className="pp-hero-unit">{t('autobahn:card.price.perMonth')}</span>}
|
|
581
590
|
{/* Kaufen: no rate/unit to caption, just the real list price struck through — same
|
|
582
591
|
car.listPrice already used by DropChip/PpRow. */}
|
|
583
592
|
{isMoney && showOld && (
|
|
@@ -865,7 +874,7 @@ export const PricePaths: React.FunctionComponent<PricePathsProps> = ({ car, t, c
|
|
|
865
874
|
struck price / mtl." group beside the rate that .cc-price and mobile's tab switcher
|
|
866
875
|
already use, so the rate + unit never fight for room in one flat row (the earlier
|
|
867
876
|
hand-rolled version here put them side by side and wrapped for any 4+-digit rate). */}
|
|
868
|
-
<PriceHero car={car} mode="financing" t={t} />
|
|
877
|
+
<PriceHero car={car} mode="financing" t={t} alwaysShowUnit />
|
|
869
878
|
<div className="pp-hero-terms">
|
|
870
879
|
{t('autobahn:card.price.financeTerms', {
|
|
871
880
|
firstInstallment: finFirstInstallment,
|
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.69",
|
|
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
|
@@ -4290,10 +4290,16 @@ line-height: 31px;
|
|
|
4290
4290
|
line-height: 58px;
|
|
4291
4291
|
letter-spacing: -2px;
|
|
4292
4292
|
}
|
|
4293
|
-
.md3 .listcard-price .pricepaths .pp-hero-val--len4 { font-size:
|
|
4294
|
-
.md3 .listcard-price .pricepaths .pp-hero-val--len5 { font-size:
|
|
4295
|
-
.md3 .listcard-price .pricepaths .pp-hero-val--len6 { font-size:
|
|
4293
|
+
.md3 .listcard-price .pricepaths .pp-hero-val--len4 { font-size: 42px; line-height: 45px; }
|
|
4294
|
+
.md3 .listcard-price .pricepaths .pp-hero-val--len5 { font-size: 36px; line-height: 39px; }
|
|
4295
|
+
.md3 .listcard-price .pricepaths .pp-hero-val--len6 { font-size: 31px; line-height: 34px; }
|
|
4296
4296
|
.md3 .listcard-price .pricepaths .pp-hero-unit { font-size: 18px; font-weight: 700; color: #5b6b7f; }
|
|
4297
|
+
/* the plain "/mtl." unit (alwaysShowUnit, no discount to show it in the narrower stacked
|
|
4298
|
+
UVP-Rate/old-price column instead) sits INLINE right after the rate — unlike that stacked
|
|
4299
|
+
group it doesn't get to be narrow, so at the base 18px a 4+-digit rate pushed it past the
|
|
4300
|
+
240px column edge (reported: "1.612 €/mtl." clipped to "/mt"). Shrunk to fit every rate
|
|
4301
|
+
length within the column instead of only the short ones. */
|
|
4302
|
+
.md3 .listcard-price .pricepaths .pp-hero-val + .pp-hero-unit { font-size: 13px; }
|
|
4297
4303
|
/* diagonal red strike (Figma), replacing the plain text-decoration:line-through above — same
|
|
4298
4304
|
generic technique .cc-price/.fin-calc-card already use, content-width-independent (the ±2px
|
|
4299
4305
|
left/right offsets stretch the line across whatever the old price's own width ends up being). */
|