@bytebrand/fe-ui-core-autobahn 1.0.67 → 1.0.68

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.
@@ -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.67",
3
+ "version": "1.0.68",
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",