@bytebrand/fe-ui-core-autobahn 1.0.197 → 1.0.199

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.
@@ -614,6 +614,8 @@ export const PriceHero: React.FunctionComponent<PriceHeroProps> = ({ car, mode,
614
614
  const buyLen6Class = buyDigits >= 7 ? ' pp-hero-val--buy-len7' : buyDigits === 6 ? ' pp-hero-val--buy-len6' : '';
615
615
  const oldDigits = showOld ? String(Math.round(oldValue as number)).length : 0;
616
616
  const oldLenClass = oldDigits === 5 ? ' pp-hero-old--len5' : oldDigits === 4 ? ' pp-hero-old--len4' : '';
617
+ // ADV-423: the "UVP" label shrinks together with the struck price it captions
618
+ const uvpLenClass = oldDigits === 5 ? ' pp-uvp-label--len5' : oldDigits === 4 ? ' pp-uvp-label--len4' : '';
617
619
  return (
618
620
  <div className={'pp-hero' + (isMoney ? ' pp-hero--buy' : '')}>
619
621
  <div className="pp-hero-rate">
@@ -670,10 +672,10 @@ export const PriceHero: React.FunctionComponent<PriceHeroProps> = ({ car, mode,
670
672
  car.listPrice already used by DropChip/PpRow. */}
671
673
  {isMoney && showOld && (
672
674
  <span className="pp-hero-unit-group">
673
- {/* ADV-423: "UVP" label right before the struck list price — desktop only (mobile
674
- stays as it was); same tooltip toggle as the price itself. */}
675
+ {/* ADV-423: "UVP" label right before the struck list price, same size as that price
676
+ (md3.css); same tooltip toggle as the price itself. */}
675
677
  <span
676
- className="pp-uvp-label hide-mobile"
678
+ className={'pp-uvp-label' + uvpLenClass}
677
679
  onClick={(e) => {
678
680
  e.stopPropagation();
679
681
  setUvpTooltipOpen((v) => !v);
package/package.json CHANGED
@@ -1,30 +1,30 @@
1
- {
2
- "name": "@bytebrand/fe-ui-core-autobahn",
3
- "version": "1.0.197",
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
- "main": "index.ts",
6
- "license": "UNLICENSED",
7
- "peerDependencies": {
8
- "react": "^18.0.0",
9
- "react-dom": "^18.0.0"
10
- },
11
- "dependencies": {
12
- "@bytebrand/car-schema-selectors": "^2.0.7",
13
- "@bytebrand/fe-financing": "^5.14.30",
14
- "classnames": "2.2.6",
15
- "clsx": "^2.1.1",
16
- "d3-format": "1.4.5",
17
- "js-cookie": "^2.2.0",
18
- "lodash": "^4.17.21",
19
- "lucide-react": "^0.288.0",
20
- "mobx-react": "^7.6.0",
21
- "moment": "^2.29.1",
22
- "qs": "^6.6.0",
23
- "react-device-detect": "^2.1.2",
24
- "react-grid-system": "^5.0.2",
25
- "react-lazyload": "^3.2.0",
26
- "react-scroll": "^1.9.3",
27
- "react-slick": "^0.29.0",
28
- "slick-carousel": "1.8.1"
29
- }
30
- }
1
+ {
2
+ "name": "@bytebrand/fe-ui-core-autobahn",
3
+ "version": "1.0.199",
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
+ "main": "index.ts",
6
+ "license": "UNLICENSED",
7
+ "peerDependencies": {
8
+ "react": "^18.0.0",
9
+ "react-dom": "^18.0.0"
10
+ },
11
+ "dependencies": {
12
+ "@bytebrand/car-schema-selectors": "^2.0.7",
13
+ "@bytebrand/fe-financing": "^5.14.30",
14
+ "classnames": "2.2.6",
15
+ "clsx": "^2.1.1",
16
+ "d3-format": "1.4.5",
17
+ "js-cookie": "^2.2.0",
18
+ "lodash": "^4.17.21",
19
+ "lucide-react": "^0.288.0",
20
+ "mobx-react": "^7.6.0",
21
+ "moment": "^2.29.1",
22
+ "qs": "^6.6.0",
23
+ "react-device-detect": "^2.1.2",
24
+ "react-grid-system": "^5.0.2",
25
+ "react-lazyload": "^3.2.0",
26
+ "react-scroll": "^1.9.3",
27
+ "react-slick": "^0.29.0",
28
+ "slick-carousel": "1.8.1"
29
+ }
30
+ }
package/theme/md3.css CHANGED
@@ -15688,32 +15688,58 @@ color: #005CFF;
15688
15688
  padding: 5px 6px;
15689
15689
  }
15690
15690
  }
15691
- /* ADV-423 (legal): "UVP" label directly before every desktop UVP strike-through price (Kaufen:
15692
- CarCard .cc-price, SRL list .listcard-price PpRow, VDP .fin-calc-card, .fin-modal desktop half,
15693
- checkout step 3 .cf-panel). Same text spec as the existing "UVP-Rate" eyebrow of the financing
15694
- price in the same component (.pp-eyebrow: Arial 400 8px/9px #0e2238; .cf-panel: 11px/13px).
15695
- Mobile keeps its current look — the markup hides the label there via .hide-mobile, and the
15696
- .pp-hero-unit-group row switch below is desktop-only. */
15691
+ /* ADV-423 (legal): "UVP" label directly before every UVP strike-through price (Kaufen): CarCard
15692
+ .cc-price, SRL list .listcard-price (desktop PpRow + mobile PriceHero), VDP .fin-calc-card,
15693
+ .fin-modal (desktop half + mobile sheet), mobile sticky bar .vdp-bottom-bar, checkout step 3
15694
+ .cf-panel (desktop only). The label has the SAME font-size/line-height as the struck amount next to it in that
15695
+ component (incl. the --len4/--len5 shrink of the card/VDP struck price), plain dark text, no
15696
+ strike. Base = the unscoped .pp-hero-old/.fin-rate-old size (15px). */
15697
15697
  .md3 .pp-uvp-label {
15698
15698
  font-family: Arial, Helvetica, Arimo, sans-serif;
15699
15699
  font-style: normal;
15700
15700
  font-weight: 400;
15701
- font-size: 8px;
15702
- line-height: 9px;
15701
+ font-size: 15px;
15702
+ line-height: normal;
15703
15703
  letter-spacing: normal;
15704
15704
  text-transform: none;
15705
+ text-decoration: none;
15705
15706
  color: #0e2238;
15706
15707
  white-space: nowrap;
15707
15708
  margin-right: 4px;
15708
15709
  cursor: pointer;
15709
15710
  }
15711
+ /* CarCard (.cc-price .pp-hero-old 17/20, --len4 13/17, --len5 14/16) and the VDP calculator
15712
+ (desktop .fin-rate-old-list 17/20; mobile .num.pp-hero-old 17/20 with the same len classes) */
15713
+ .md3 .cc-price .pp-uvp-label,
15714
+ .md3 .fin-calc-card .pp-uvp-label {
15715
+ font-size: 17px;
15716
+ line-height: 20px;
15717
+ }
15718
+ .md3 .cc-price .pp-uvp-label--len4,
15719
+ .md3 .fin-calc-card .pp-uvp-label--len4 {
15720
+ font-size: 13px;
15721
+ line-height: 17px;
15722
+ }
15723
+ .md3 .cc-price .pp-uvp-label--len5,
15724
+ .md3 .fin-calc-card .pp-uvp-label--len5 {
15725
+ font-size: 14px;
15726
+ line-height: 16px;
15727
+ }
15728
+ /* mobile VDP calculator: the row already has a 4px gap */
15729
+ .md3 .fin-calc-card .show-mobile .pp-uvp-label {
15730
+ margin-right: 0;
15731
+ }
15732
+ /* mobile sticky bar: the struck .fin-rate-old-bb carries an inline font-size of 15px (line 20px) */
15733
+ .md3 .vdp-bottom-bar .pp-uvp-label {
15734
+ font-size: 15px;
15735
+ line-height: 20px;
15736
+ }
15737
+ /* checkout step 3 (.cf-rate-old--buy 15px; the label is desktop-only there) */
15710
15738
  .md3 .cf-panel .pp-uvp-label {
15711
- font-family: 'Arial';
15712
- font-size: 11px;
15713
- line-height: 13px;
15714
- color: #0E2238;
15739
+ font-size: 15px;
15740
+ line-height: normal;
15715
15741
  }
15716
- /* label + struck price on one baseline (PpRow, checkout step 3) */
15742
+ /* label + struck price on one baseline (PpRow, checkout step 3, sticky bar) */
15717
15743
  .md3 .pp-uvp-strike {
15718
15744
  display: inline-flex;
15719
15745
  align-items: baseline;
@@ -15721,8 +15747,8 @@ color: #005CFF;
15721
15747
  }
15722
15748
  /* SRL desktop list (.listcard-price PpRow Kaufen row): the price column is a fixed 240px and the
15723
15749
  Kaufen row already uses ~205 of its 215px, so an inline label would wrap the struck amount. Here
15724
- the label sits above the struck price instead — exactly like the "UVP-Rate" eyebrow over the
15725
- struck rate in the financing block of the same column — and is taken out of flow, so the row's
15750
+ the label sits above the struck price (11.5px, like .pp-old) — the same place as the "UVP-Rate"
15751
+ eyebrow over the struck rate in the financing block of that column — out of flow, so the row's
15726
15752
  width and height stay as they were. */
15727
15753
  .md3 .listcard-price .pp-uvp-strike {
15728
15754
  position: relative;
@@ -15732,13 +15758,49 @@ color: #005CFF;
15732
15758
  left: 0;
15733
15759
  bottom: 100%;
15734
15760
  margin: 0 0 1px;
15761
+ font-size: 11.5px;
15762
+ line-height: normal;
15735
15763
  }
15736
- /* CarCard Kaufen: the struck list price group is a 1-item column; on desktop it now holds the
15737
- label too, so lay it out as a row (still absolutely positioned above the hero figure, so the
15738
- card height does not change). */
15739
- @media (min-width: 601px) {
15740
- .md3 .cc-price .pp-hero--buy .pp-hero-unit-group {
15741
- flex-direction: row;
15742
- align-items: baseline;
15764
+ /* Kaufen PriceHero (CarCard, SRL mobile): the struck list price group is a 1-item column; it now
15765
+ holds the label too, so lay it out as a row (on the CarCard it stays absolutely positioned
15766
+ above the hero figure, so the card height does not change). */
15767
+ .md3 .pp-hero--buy .pp-hero-unit-group {
15768
+ flex-direction: row;
15769
+ align-items: baseline;
15770
+ }
15771
+ @media (max-width: 600px) {
15772
+ /* mobile VDP finance sheet (.fin-modal .fin-rate-main .fin-rate-old-list 14/16) */
15773
+ .md3 .fin-modal .fin-rate-main .pp-uvp-label {
15774
+ font-size: 14px;
15775
+ line-height: 16px;
15743
15776
  }
15744
15777
  }
15778
+ /* ADV-423 design spec (18.11): on the CarCard Kaufen tab (all widths — one component) and on the
15779
+ desktop VDP calculator Kaufen tab the struck UVP price is 20px and the "UVP" label 17px (Figma).
15780
+ This replaces the 17px / --len5 14px / --len4 13px struck sizes there; the line-height stays at
15781
+ the previous 20px, so the hero/slot height (and the cross-tab height parity) does not change. */
15782
+ .md3 .cc-price .pp-hero--buy .pp-hero-old,
15783
+ .md3 .cc-price .pp-hero--buy .pp-hero-old--len4,
15784
+ .md3 .cc-price .pp-hero--buy .pp-hero-old--len5,
15785
+ .md3 .fin-calc-card .fin-rate-strike-slot .fin-rate-old.fin-rate-old-list {
15786
+ font-size: 20px;
15787
+ line-height: 20px;
15788
+ }
15789
+ .md3 .cc-price .pp-hero--buy .pp-uvp-label,
15790
+ .md3 .cc-price .pp-hero--buy .pp-uvp-label--len4,
15791
+ .md3 .cc-price .pp-hero--buy .pp-uvp-label--len5,
15792
+ .md3 .fin-calc-card .fin-rate-strike-slot .pp-uvp-label {
15793
+ font-size: 17px;
15794
+ line-height: 20px;
15795
+ }
15796
+ /* the 20px struck price (was 14/16 for 5-digit prices) makes the absolutely positioned Kaufen
15797
+ group 6px taller upwards (incl. the 2px of baseline-aligning the 17px label) — lower it by those
15798
+ 6px so the "2" badge keeps its previous position at the tab underline (was: calc(100% - 11px)). */
15799
+ .md3 .cc-price .pp-hero--buy .pp-hero-unit-group {
15800
+ bottom: calc(100% - 17px);
15801
+ }
15802
+ /* baseline-aligning the 17px label with the 20px price adds 2px to the row; keep the desktop
15803
+ Kaufen strike slot at its 20px so the card keeps the same height on every tab */
15804
+ .md3 .fin-calc-card .fin-rate-strike-slot {
15805
+ height: 20px;
15806
+ }
@@ -626,7 +626,18 @@ const FinanceCalculator: React.FunctionComponent<FinanceCalculatorProps> = ({
626
626
  tabIndex={0}
627
627
  onClick={() => setUvpTooltipOpen((v) => !v)}
628
628
  >
629
- <span style={{ fontSize: 13, color: 'var(--md-on-surface-variant)' }}>{t('autobahn:finance.uvp')}</span>
629
+ {/* ADV-423: same size as the struck price next to it (md3.css .pp-uvp-label) */}
630
+ <span
631
+ className={`pp-uvp-label${
632
+ String(Math.round(listPrice as number)).length === 5
633
+ ? ' pp-uvp-label--len5'
634
+ : String(Math.round(listPrice as number)).length === 4
635
+ ? ' pp-uvp-label--len4'
636
+ : ''
637
+ }`}
638
+ >
639
+ {t('autobahn:finance.uvp')}
640
+ </span>
630
641
  <span
631
642
  className={`num pp-hero-old${
632
643
  String(Math.round(listPrice as number)).length === 5
@@ -1798,37 +1798,49 @@ export const VdpBottomBar: React.FunctionComponent<VdpBottomBarProps> = ({
1798
1798
  <div className="bb-price-row">
1799
1799
  <div style={{ display: 'flex', flexDirection: 'column', minWidth: 0, flex: 1 }}>
1800
1800
  {isCash && vehicle.listPrice != null && vehicle.listPrice > vehicle.price && (
1801
- <s
1802
- className="num fin-rate-old fin-rate-old-bb"
1803
- style={{ alignSelf: 'flex-end', paddingBottom: 0, fontSize: 15 }}
1804
- role="button"
1805
- tabIndex={0}
1806
- onClick={(e) => {
1807
- e.stopPropagation();
1808
- setUvpTooltipOpen((v) => !v);
1809
- }}
1810
- >
1811
- {eur(vehicle.listPrice)} €
1812
- <span className="pp-eyebrow-badge">2</span>
1813
- {uvpTooltipOpen && (
1814
- <div className="pp-uvp-tooltip" onClick={(e) => e.stopPropagation()}>
1815
- <button
1816
- type="button"
1817
- className="pp-uvp-tooltip-close"
1818
- aria-label={t('autobahn:modal.close')}
1819
- onClick={(e) => {
1820
- e.stopPropagation();
1821
- setUvpTooltipOpen(false);
1822
- }}
1823
- >
1824
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
1825
- <path d="M5 5L15 15M15 5L5 15" stroke="white" strokeWidth={2.4} strokeLinecap="round" />
1826
- </svg>
1827
- </button>
1828
- <div className="pp-uvp-tooltip-body">{t('autobahn:card.price.uvpListTooltipBody')}</div>
1829
- </div>
1830
- )}
1831
- </s>
1801
+ // ADV-423: "UVP" label right before the struck list price (same 15px as the price)
1802
+ <span className="pp-uvp-strike" style={{ alignSelf: 'flex-end' }}>
1803
+ <span
1804
+ className="pp-uvp-label"
1805
+ onClick={(e) => {
1806
+ e.stopPropagation();
1807
+ setUvpTooltipOpen((v) => !v);
1808
+ }}
1809
+ >
1810
+ {t('autobahn:finance.uvp')}
1811
+ </span>
1812
+ <s
1813
+ className="num fin-rate-old fin-rate-old-bb"
1814
+ style={{ paddingBottom: 0, fontSize: 15 }}
1815
+ role="button"
1816
+ tabIndex={0}
1817
+ onClick={(e) => {
1818
+ e.stopPropagation();
1819
+ setUvpTooltipOpen((v) => !v);
1820
+ }}
1821
+ >
1822
+ {eur(vehicle.listPrice)} €
1823
+ <span className="pp-eyebrow-badge">2</span>
1824
+ {uvpTooltipOpen && (
1825
+ <div className="pp-uvp-tooltip" onClick={(e) => e.stopPropagation()}>
1826
+ <button
1827
+ type="button"
1828
+ className="pp-uvp-tooltip-close"
1829
+ aria-label={t('autobahn:modal.close')}
1830
+ onClick={(e) => {
1831
+ e.stopPropagation();
1832
+ setUvpTooltipOpen(false);
1833
+ }}
1834
+ >
1835
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
1836
+ <path d="M5 5L15 15M15 5L5 15" stroke="white" strokeWidth={2.4} strokeLinecap="round" />
1837
+ </svg>
1838
+ </button>
1839
+ <div className="pp-uvp-tooltip-body">{t('autobahn:card.price.uvpListTooltipBody')}</div>
1840
+ </div>
1841
+ )}
1842
+ </s>
1843
+ </span>
1832
1844
  )}
1833
1845
  <div style={{ display: 'flex', alignItems: 'center', whiteSpace: 'nowrap', minWidth: 0 }}>
1834
1846
  <span className={'num' + priceLenClass} style={priceStyle}>
@@ -3176,11 +3188,13 @@ export const FinanceDetailsModal: React.FunctionComponent<FinanceDetailsModalPro
3176
3188
  edge (inline-beside wraps — the 44px phone hero fills the whole column) */}
3177
3189
  {isCash && listPrice != null && listPrice > price && (
3178
3190
  <div
3179
- style={{ display: 'flex', justifyContent: 'flex-end', lineHeight: 1, marginTop: 0 }}
3191
+ style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'baseline', lineHeight: 1, marginTop: 0 }}
3180
3192
  role="button"
3181
3193
  tabIndex={0}
3182
3194
  onClick={() => setUvpTooltipOpen((v) => !v)}
3183
3195
  >
3196
+ {/* ADV-423: "UVP" label right before the struck list price (mobile sheet) */}
3197
+ <span className="pp-uvp-label">{t('autobahn:finance.uvp')}</span>
3184
3198
  <s className="num fin-rate-old fin-rate-old-list">
3185
3199
  {eur(listPrice)} €
3186
3200
  <span