@bytebrand/fe-ui-core-autobahn 1.0.65 → 1.0.66

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.
@@ -861,6 +861,11 @@ export const PricePaths: React.FunctionComponent<PricePathsProps> = ({ car, t, c
861
861
  // same real struck-through reference rate PriceHero shows for the financing tab (oldMonthly) —
862
862
  // shown here too now that both rows render at once instead of behind a tab.
863
863
  const showOldMonthly = car.oldMonthly != null && car.oldMonthly > car.monthly;
864
+ // same digit-length shrink technique as PriceHero's own rateLenClass, so a long rate (e.g.
865
+ // 1.612 €) doesn't overflow the desktop hero's much larger 65px base size.
866
+ const rateDigits = String(Math.round(car.monthly)).length;
867
+ const rateLenClass =
868
+ rateDigits >= 6 ? ' pp-hero-val--len6' : rateDigits === 5 ? ' pp-hero-val--len5' : rateDigits === 4 ? ' pp-hero-val--len4' : '';
864
869
  return (
865
870
  <div className={'pricepaths' + (className ? ' ' + className : '')}>
866
871
  <div className="pp-hero">
@@ -871,7 +876,7 @@ export const PricePaths: React.FunctionComponent<PricePathsProps> = ({ car, t, c
871
876
  {(car.oldMonthly as number).toLocaleString('de-DE')} €<sup>2</sup>
872
877
  </span>
873
878
  )}
874
- <b className="num pp-hero-val">
879
+ <b className={'num pp-hero-val' + rateLenClass}>
875
880
  {fmtRate(car.monthly)} €<sup>1</sup>
876
881
  </b>
877
882
  <span className="pp-hero-unit">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/fe-ui-core-autobahn",
3
- "version": "1.0.65",
3
+ "version": "1.0.66",
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
@@ -4276,6 +4276,40 @@ line-height: 31px;
4276
4276
  /* struck-through reference rate/price shown next to the tabbed hero price (Figma card) —
4277
4277
  same red strike as .pp-old, sized for the hero context rather than the compact list row. */
4278
4278
  .md3 .pp-hero-old { font-size: 15px; color: var(--md-error); text-decoration: line-through; white-space: nowrap; }
4279
+ /* desktop mcard financing hero: same 65px/18px scale already proven (real car data, no overflow)
4280
+ for the grid CarCard's identical .cc-price hero — `.pricepaths` only ever exists inside the
4281
+ SRP card's desktop-only PricePaths output (mobile's PriceHero, used by the tab switcher, has
4282
+ no `.pricepaths` ancestor), so this can't leak into mobile without an extra media query. */
4283
+ .md3 .listcard-price .pricepaths .pp-hero-val {
4284
+ font-size: 65px;
4285
+ line-height: 58px;
4286
+ letter-spacing: -2px;
4287
+ }
4288
+ .md3 .listcard-price .pricepaths .pp-hero-val--len4 { font-size: 50px; line-height: 53px; }
4289
+ .md3 .listcard-price .pricepaths .pp-hero-val--len5 { font-size: 43px; line-height: 45px; }
4290
+ .md3 .listcard-price .pricepaths .pp-hero-val--len6 { font-size: 37px; line-height: 40px; }
4291
+ .md3 .listcard-price .pricepaths .pp-hero-unit { font-size: 18px; font-weight: 700; color: #5b6b7f; }
4292
+ /* diagonal red strike (Figma), replacing the plain text-decoration:line-through above — same
4293
+ generic technique .cc-price/.fin-calc-card already use, content-width-independent (the ±2px
4294
+ left/right offsets stretch the line across whatever the old price's own width ends up being). */
4295
+ .md3 .listcard-price .pricepaths .pp-hero-old {
4296
+ position: relative;
4297
+ display: inline-block;
4298
+ font-size: 17px;
4299
+ font-weight: 400;
4300
+ color: #0e2238;
4301
+ text-decoration: none;
4302
+ }
4303
+ .md3 .listcard-price .pricepaths .pp-hero-old::after {
4304
+ content: '';
4305
+ position: absolute;
4306
+ left: -2px;
4307
+ right: -2px;
4308
+ top: 50%;
4309
+ border-top: 2px solid #e60000;
4310
+ transform: rotate(12.53deg);
4311
+ transform-origin: center;
4312
+ }
4279
4313
  .md3 .pp-hero-terms { margin-top: 9px; font-size: 11.5px; color: var(--md-on-surface-variant); }
4280
4314
  /* "Details" link at the end of the financing/leasing terms lines (Figma "mcard") — quiet, same
4281
4315
  color as the rest of the terms line but underlined so it still reads as tappable. */