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

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.
@@ -858,35 +858,21 @@ export const PricePaths: React.FunctionComponent<PricePathsProps> = ({ car, t, c
858
858
  const leasMonths = car.leaseMonths ?? _leasPeriod;
859
859
  const hasLeasTerms = Boolean(leasMileage && leasMonths);
860
860
  const leasMileageStr = leasMileage ? Number(leasMileage).toLocaleString('de-DE') : '';
861
- // same real struck-through reference rate PriceHero shows for the financing tab (oldMonthly) —
862
- // shown here too now that both rows render at once instead of behind a tab.
863
- const showOldMonthly = car.oldMonthly != null && car.oldMonthly > car.monthly;
864
861
  return (
865
862
  <div className={'pricepaths' + (className ? ' ' + className : '')}>
866
- <div className="pp-hero">
867
- <div className="pp-eyebrow">{t('autobahn:card.price.financingFrom')}</div>
868
- <div className="pp-hero-rate">
869
- {showOldMonthly && (
870
- <span className="pp-hero-old">
871
- {(car.oldMonthly as number).toLocaleString('de-DE')} €<sup>2</sup>
872
- </span>
873
- )}
874
- <b className="num pp-hero-val">
875
- {fmtRate(car.monthly)} €<sup>1</sup>
876
- </b>
877
- <span className="pp-hero-unit">
878
- {t('autobahn:card.price.perMonth')}
879
- <sup>3</sup>
880
- </span>
881
- </div>
882
- <div className="pp-hero-terms">
883
- {t('autobahn:card.price.financeTerms', {
884
- firstInstallment: finFirstInstallment,
885
- months: finMonths,
886
- count: finMonths,
887
- })}{' '}
888
- · <span className="pp-details-link">{t('autobahn:card.price.details')}</span>
889
- </div>
863
+ <div className="pp-eyebrow">{t('autobahn:card.price.financingFrom')}</div>
864
+ {/* reuses PriceHero's own financing rendering — the exact same stacked "UVP-Rate ⓘ /
865
+ struck price / mtl." group beside the rate that .cc-price and mobile's tab switcher
866
+ already use, so the rate + unit never fight for room in one flat row (the earlier
867
+ hand-rolled version here put them side by side and wrapped for any 4+-digit rate). */}
868
+ <PriceHero car={car} mode="financing" t={t} />
869
+ <div className="pp-hero-terms">
870
+ {t('autobahn:card.price.financeTerms', {
871
+ firstInstallment: finFirstInstallment,
872
+ months: finMonths,
873
+ count: finMonths,
874
+ })}{' '}
875
+ · <span className="pp-details-link">{t('autobahn:card.price.details')}</span>
890
876
  </div>
891
877
  {hasLease && (
892
878
  <div className="pp-lease-row">
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.67",
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
@@ -4040,6 +4040,11 @@ line-height: 31px;
4040
4040
  .md3 .specstrip > span:nth-child(1) { order: -3; }
4041
4041
  .md3 .specstrip > span:nth-child(2) { order: -2; }
4042
4042
  .md3 .specstrip > span:nth-child(4) { order: -1; }
4043
+ /* a little extra room on the right for the 65px hero rate + its stacked UVP/old-price/unit
4044
+ group — mobile keeps the symmetric 18px (its own hero is 32px, never this tight). */
4045
+ .md3 .listcard-price {
4046
+ padding-right: 6px;
4047
+ }
4043
4048
  }
4044
4049
  /* filter rail: collapsible sections */
4045
4050
  .md3 .frail-group {
@@ -4276,6 +4281,123 @@ line-height: 31px;
4276
4281
  /* struck-through reference rate/price shown next to the tabbed hero price (Figma card) —
4277
4282
  same red strike as .pp-old, sized for the hero context rather than the compact list row. */
4278
4283
  .md3 .pp-hero-old { font-size: 15px; color: var(--md-error); text-decoration: line-through; white-space: nowrap; }
4284
+ /* desktop mcard financing hero: same 65px/18px scale already proven (real car data, no overflow)
4285
+ for the grid CarCard's identical .cc-price hero — `.pricepaths` only ever exists inside the
4286
+ SRP card's desktop-only PricePaths output (mobile's PriceHero, used by the tab switcher, has
4287
+ no `.pricepaths` ancestor), so this can't leak into mobile without an extra media query. */
4288
+ .md3 .listcard-price .pricepaths .pp-hero-val {
4289
+ font-size: 65px;
4290
+ line-height: 58px;
4291
+ letter-spacing: -2px;
4292
+ }
4293
+ .md3 .listcard-price .pricepaths .pp-hero-val--len4 { font-size: 50px; line-height: 53px; }
4294
+ .md3 .listcard-price .pricepaths .pp-hero-val--len5 { font-size: 43px; line-height: 45px; }
4295
+ .md3 .listcard-price .pricepaths .pp-hero-val--len6 { font-size: 37px; line-height: 40px; }
4296
+ .md3 .listcard-price .pricepaths .pp-hero-unit { font-size: 18px; font-weight: 700; color: #5b6b7f; }
4297
+ /* diagonal red strike (Figma), replacing the plain text-decoration:line-through above — same
4298
+ generic technique .cc-price/.fin-calc-card already use, content-width-independent (the ±2px
4299
+ left/right offsets stretch the line across whatever the old price's own width ends up being). */
4300
+ .md3 .listcard-price .pricepaths .pp-hero-old {
4301
+ position: relative;
4302
+ display: inline-block;
4303
+ font-size: 17px;
4304
+ font-weight: 400;
4305
+ color: #0e2238;
4306
+ text-decoration: none;
4307
+ }
4308
+ .md3 .listcard-price .pricepaths .pp-hero-old::after {
4309
+ content: '';
4310
+ position: absolute;
4311
+ left: -2px;
4312
+ right: -2px;
4313
+ top: 50%;
4314
+ border-top: 2px solid #e60000;
4315
+ transform: rotate(12.53deg);
4316
+ transform-origin: center;
4317
+ }
4318
+ /* keep the rate + its UVP/old-price/unit group on ONE line (matches .cc-price's own override) —
4319
+ without this the group wraps below the rate the moment the column runs a few px short. */
4320
+ .md3 .listcard-price .pricepaths .pp-hero-rate {
4321
+ align-items: center;
4322
+ flex-wrap: nowrap;
4323
+ gap: 4px;
4324
+ }
4325
+ /* nowrap on the row alone still lets the flex algorithm SHRINK the rate itself to make room,
4326
+ which wrapped "310 €" into "310" / "€" on two lines — pin both items to their natural size so
4327
+ the row overflows visibly (a signal to trim further) instead of mangling the price digits. */
4328
+ .md3 .listcard-price .pricepaths .pp-hero-val {
4329
+ white-space: nowrap;
4330
+ flex-shrink: 0;
4331
+ }
4332
+ .md3 .listcard-price .pricepaths .pp-hero-unit-group {
4333
+ flex-shrink: 0;
4334
+ }
4335
+ /* the UVP-Rate caption nested inside the hero's own unit-group (PriceHero) — NOT the outer
4336
+ "Finanzierung ab" eyebrow this card renders itself (that one stays at its own 11px above);
4337
+ shrunk to the same 8px .cc-price uses so the 3-line stack stays narrow enough to fit beside
4338
+ the rate without wrapping. The badge has NO base (unscoped) style at all otherwise — it would
4339
+ render as bare, unstyled "3" text without this. */
4340
+ .md3 .listcard-price .pricepaths .pp-hero-unit-group .pp-eyebrow {
4341
+ position: relative;
4342
+ font-size: 8px;
4343
+ font-weight: 400;
4344
+ line-height: 9px;
4345
+ letter-spacing: normal;
4346
+ text-transform: none;
4347
+ color: #0e2238;
4348
+ margin-bottom: 2px;
4349
+ }
4350
+ .md3 .listcard-price .pricepaths .pp-eyebrow-badge {
4351
+ display: inline-flex;
4352
+ align-items: center;
4353
+ justify-content: center;
4354
+ position: absolute;
4355
+ top: -5px;
4356
+ right: -8px;
4357
+ border-radius: 50%;
4358
+ width: 12px;
4359
+ height: 11px;
4360
+ background: rgba(255, 255, 255, 0.96);
4361
+ border: 0.5px solid #005cff;
4362
+ font-size: 8px;
4363
+ line-height: 9px;
4364
+ color: #0e2238;
4365
+ cursor: pointer;
4366
+ }
4367
+ .md3 .listcard-price .pricepaths .pp-hero-old .pp-eyebrow-badge {
4368
+ top: -7px;
4369
+ right: -12px;
4370
+ }
4371
+ .md3 .listcard-price .pricepaths .pp-uvp-tooltip {
4372
+ position: absolute;
4373
+ top: 6px;
4374
+ right: -18px;
4375
+ left: -18px;
4376
+ z-index: 20;
4377
+ padding: 10px 12px;
4378
+ border-radius: 15px;
4379
+ background: #c5c6d2;
4380
+ box-shadow: var(--md-e2, 0 4px 12px rgba(0, 0, 0, 0.15));
4381
+ white-space: normal;
4382
+ cursor: default;
4383
+ }
4384
+ .md3 .listcard-price .pricepaths .pp-uvp-tooltip-close {
4385
+ position: absolute;
4386
+ top: -38px;
4387
+ right: 0;
4388
+ display: flex;
4389
+ align-items: center;
4390
+ justify-content: center;
4391
+ width: 32px;
4392
+ height: 32px;
4393
+ border-radius: 50%;
4394
+ background: rgba(11, 19, 32, 0.35);
4395
+ border: 1.5px solid rgba(255, 255, 255, 0.25);
4396
+ padding: 0;
4397
+ cursor: pointer;
4398
+ }
4399
+ .md3 .listcard-price .pricepaths .pp-uvp-tooltip-close svg { width: 14px; height: 14px; }
4400
+ .md3 .listcard-price .pricepaths .pp-uvp-tooltip-body { font-size: 11px; line-height: 13px; color: #0e2238; }
4279
4401
  .md3 .pp-hero-terms { margin-top: 9px; font-size: 11.5px; color: var(--md-on-surface-variant); }
4280
4402
  /* "Details" link at the end of the financing/leasing terms lines (Figma "mcard") — quiet, same
4281
4403
  color as the rest of the terms line but underlined so it still reads as tappable. */