@bytebrand/fe-ui-core-autobahn 1.0.192 → 1.0.194

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/fe-ui-core-autobahn",
3
- "version": "1.0.192",
3
+ "version": "1.0.194",
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
@@ -15688,3 +15688,57 @@ 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. */
15697
+ .md3 .pp-uvp-label {
15698
+ font-family: Arial, Helvetica, Arimo, sans-serif;
15699
+ font-style: normal;
15700
+ font-weight: 400;
15701
+ font-size: 8px;
15702
+ line-height: 9px;
15703
+ letter-spacing: normal;
15704
+ text-transform: none;
15705
+ color: #0e2238;
15706
+ white-space: nowrap;
15707
+ margin-right: 4px;
15708
+ cursor: pointer;
15709
+ }
15710
+ .md3 .cf-panel .pp-uvp-label {
15711
+ font-family: 'Arial';
15712
+ font-size: 11px;
15713
+ line-height: 13px;
15714
+ color: #0E2238;
15715
+ }
15716
+ /* label + struck price on one baseline (PpRow, checkout step 3) */
15717
+ .md3 .pp-uvp-strike {
15718
+ display: inline-flex;
15719
+ align-items: baseline;
15720
+ white-space: nowrap;
15721
+ }
15722
+ /* SRL desktop list (.listcard-price PpRow Kaufen row): the price column is a fixed 240px and the
15723
+ 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
15726
+ width and height stay as they were. */
15727
+ .md3 .listcard-price .pp-uvp-strike {
15728
+ position: relative;
15729
+ }
15730
+ .md3 .listcard-price .pp-uvp-strike .pp-uvp-label {
15731
+ position: absolute;
15732
+ left: 0;
15733
+ bottom: 100%;
15734
+ margin: 0 0 1px;
15735
+ }
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;
15743
+ }
15744
+ }
@@ -1,43 +1,44 @@
1
- import React from 'react';
2
-
3
- import Icon from './Icon';
4
- import { TranslationFunction } from '../types';
5
-
6
- /** ADV-405 statutory wording. Kept as the i18n fallback so a stale locale cache never shows the raw key. */
7
- export const CREDIT_COST_WARNING_DE = 'Achtung! Kreditaufnahme kostet Geld.';
8
-
9
- export type CreditCostNoticeTone = 'light' | 'dark';
10
- export type CreditCostNoticeSize = 'standard' | 'small';
11
-
12
- export interface CreditCostNoticeProps {
13
- t: TranslationFunction;
14
- /** light = Figma "Ton=Hell" (default), dark = "Ton=Dunkel" (dark hero backgrounds only). */
15
- tone?: CreditCostNoticeTone;
16
- /** standard ≈ 8×10 px padding, small ≈ 5×6 px (small cards / narrow price columns). */
17
- size?: CreditCostNoticeSize;
18
- /** extra class(es) for the host's size/colour/spacing rules (font size and colour follow the host block's conditions line). */
19
- cls?: string;
20
- }
21
-
22
- /**
23
- * Kreditkosten-Hinweis (ADV-405, Verbraucherkreditreform 2026): the warning
24
- * "Achtung! Kreditaufnahme kostet Geld." with a Lucide info icon. Static, always
25
- * visible, real text; the icon is hidden from screen readers. The sentence is the
26
- * statutory German wording, so it is marked lang="de" and is NOT translated on the
27
- * English locale. Hosts decide visibility (financing/leasing shown, Kaufen hidden).
28
- */
29
- const CreditCostNotice: React.FunctionComponent<CreditCostNoticeProps> = ({ t, tone = 'light', size = 'standard', cls }) => {
30
- const className = ['ccn', `ccn--${tone}`, size === 'small' ? 'ccn--small' : '', cls || ''].filter(Boolean).join(' ');
31
- return (
32
- <div className={className}>
33
- <span className="ccn-icon" aria-hidden="true">
34
- <Icon name="info" size={16} stroke={2} />
35
- </span>
36
- <span className="ccn-text" lang="de">
37
- {t('autobahn:finance.creditCostWarning', { defaultValue: CREDIT_COST_WARNING_DE })}
38
- </span>
39
- </div>
40
- );
41
- };
42
-
43
- export default CreditCostNotice;
1
+ import React from 'react';
2
+
3
+ import Icon from './Icon';
4
+ import { TranslationFunction } from '../types';
5
+
6
+ /** ADV-405 statutory German wording. The i18n fallback, so a stale locale cache (or a host that only loads the de locale) never shows the raw key. */
7
+ export const CREDIT_COST_WARNING_DE = 'Achtung! Kreditaufnahme kostet Geld.';
8
+
9
+ export type CreditCostNoticeTone = 'light' | 'dark';
10
+ export type CreditCostNoticeSize = 'standard' | 'small';
11
+
12
+ export interface CreditCostNoticeProps {
13
+ t: TranslationFunction;
14
+ /** light = Figma "Ton=Hell" (default), dark = "Ton=Dunkel" (dark hero backgrounds only). */
15
+ tone?: CreditCostNoticeTone;
16
+ /** standard ≈ 8×10 px padding, small ≈ 5×6 px (small cards / narrow price columns). */
17
+ size?: CreditCostNoticeSize;
18
+ /** extra class(es) for the host's size/colour/spacing rules (font size and colour follow the host block's conditions line). */
19
+ cls?: string;
20
+ }
21
+
22
+ /**
23
+ * Kreditkosten-Hinweis (ADV-405, Verbraucherkreditreform 2026): the warning
24
+ * "Achtung! Kreditaufnahme kostet Geld." with a Lucide info icon. Static, always
25
+ * visible, real text; the icon is hidden from screen readers. The English locale
26
+ * shows "Warning! Financing comes at a cost." (the text follows the page language,
27
+ * so no lang attribute of its own). Hosts decide visibility (financing/leasing
28
+ * shown, Kaufen hidden).
29
+ */
30
+ const CreditCostNotice: React.FunctionComponent<CreditCostNoticeProps> = ({ t, tone = 'light', size = 'standard', cls }) => {
31
+ const className = ['ccn', `ccn--${tone}`, size === 'small' ? 'ccn--small' : '', cls || ''].filter(Boolean).join(' ');
32
+ return (
33
+ <div className={className}>
34
+ <span className="ccn-icon" aria-hidden="true">
35
+ <Icon name="info" size={16} stroke={2} />
36
+ </span>
37
+ <span className="ccn-text">
38
+ {t('autobahn:finance.creditCostWarning', { defaultValue: CREDIT_COST_WARNING_DE })}
39
+ </span>
40
+ </div>
41
+ );
42
+ };
43
+
44
+ export default CreditCostNotice;
@@ -680,11 +680,20 @@ const FinanceCalculator: React.FunctionComponent<FinanceCalculatorProps> = ({
680
680
  {isCash && (
681
681
  <div
682
682
  className="hide-mobile fin-rate-strike-slot"
683
- style={{ display: 'flex', justifyContent: 'flex-end', lineHeight: 1, marginTop: 0, cursor: showStrike ? 'pointer' : 'default' }}
683
+ style={{
684
+ display: 'flex',
685
+ justifyContent: 'flex-end',
686
+ alignItems: 'baseline',
687
+ lineHeight: 1,
688
+ marginTop: 0,
689
+ cursor: showStrike ? 'pointer' : 'default',
690
+ }}
684
691
  role="button"
685
692
  tabIndex={0}
686
693
  onClick={() => setUvpTooltipOpen((v) => !v)}
687
694
  >
695
+ {/* ADV-423: "UVP" label right before the struck list price (this slot is desktop-only) */}
696
+ {showStrike && <span className="pp-uvp-label">{t('autobahn:finance.uvp')}</span>}
688
697
  {showStrike && (
689
698
  <s className="num fin-rate-old fin-rate-old-list">
690
699
  {eur(listPrice as number)} €
@@ -2637,11 +2637,13 @@ export const FinanceDetailsModal: React.FunctionComponent<FinanceDetailsModalPro
2637
2637
  <div className="fin-rate-main">
2638
2638
  {isCash && listPrice != null && listPrice > price && (
2639
2639
  <div
2640
- style={{ display: 'flex', justifyContent: 'flex-end', lineHeight: 1, marginTop: 0 }}
2640
+ style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'baseline', lineHeight: 1, marginTop: 0 }}
2641
2641
  role="button"
2642
2642
  tabIndex={0}
2643
2643
  onClick={() => setUvpTooltipOpen((v) => !v)}
2644
2644
  >
2645
+ {/* ADV-423: "UVP" label right before the struck list price (desktop half of the modal) */}
2646
+ <span className="pp-uvp-label">{t('autobahn:finance.uvp')}</span>
2645
2647
  <s className="num fin-rate-old fin-rate-old-list">
2646
2648
  {eur(listPrice)} €
2647
2649
  <span