@bytebrand/fe-ui-core-autobahn 1.0.228 → 1.0.229

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.
Files changed (62) hide show
  1. package/campaign/CampaignBand.tsx +26 -26
  2. package/campaign/CampaignBanner.tsx +86 -0
  3. package/campaign/CampaignBar.tsx +37 -0
  4. package/campaign/CampaignHero.tsx +52 -0
  5. package/campaign/CampaignSwitch.tsx +43 -0
  6. package/campaign/campaignVars.ts +12 -12
  7. package/campaign/campaigns.ts +77 -74
  8. package/campaign/index.ts +18 -6
  9. package/campaign/openInApp.ts +8 -0
  10. package/campaign/useCountdown.ts +28 -0
  11. package/cards/CarCard.tsx +407 -393
  12. package/cards/CarCardSkeleton.tsx +103 -0
  13. package/cards/CarRow.tsx +46 -22
  14. package/cards/CarRowSkeleton.tsx +152 -0
  15. package/cards/cardParts.tsx +53 -18
  16. package/cards/dealSignals.ts +36 -36
  17. package/cards/index.ts +6 -0
  18. package/chrome/AccountMenuIcon.tsx +109 -0
  19. package/chrome/Footer.tsx +16 -3
  20. package/chrome/TopBar.tsx +139 -266
  21. package/compat/CookieModal/CookieModal.tsx +20 -6
  22. package/compat/CookieModal/Modal.tsx +6 -3
  23. package/compat/CookieModal/modals/ManageCookieModal/ManageCookieModal.tsx +43 -15
  24. package/compat/CookieModal/modals/PreviewCookieModal/PreviewCookieModal.tsx +4 -3
  25. package/compat/CookieModal/useModal.ts +5 -1
  26. package/compat/Loader/Loader.tsx +1 -7
  27. package/compat/MdField/MdField.tsx +28 -4
  28. package/compat/PriceRating/PriceRating.styl +5 -7
  29. package/compat/PriceRatingDetailed/PriceRatingDetailed.styl +8 -6
  30. package/compat/TimePicker/TimePicker.tsx +12 -2
  31. package/compat/legacy-theme/priceReviewColors.styl +18 -5
  32. package/constants/autobahn.ts +39 -0
  33. package/data/fieldMapping.ts +3 -3
  34. package/data/toAutobahnCar.ts +30 -14
  35. package/iconsvg/IconSVG.tsx +1 -5
  36. package/index.ts +19 -19
  37. package/locales/de/autobahn.json +925 -862
  38. package/locales/en/autobahn.json +925 -862
  39. package/package.json +2 -2
  40. package/theme/md3.css +16518 -11808
  41. package/ui/Dropdown.tsx +29 -10
  42. package/ui/FormCheckbox.tsx +22 -2
  43. package/ui/FormField.tsx +2 -1
  44. package/ui/Icon.tsx +6 -0
  45. package/ui/MfieldCheckIcon.tsx +13 -0
  46. package/ui/Modal.tsx +84 -6
  47. package/ui/Skeleton.tsx +79 -20
  48. package/ui/Stars.tsx +36 -18
  49. package/ui/StatChip.tsx +8 -3
  50. package/ui/index.ts +3 -0
  51. package/ui/ratingLink.ts +36 -0
  52. package/ui/scrollFieldIntoView.ts +41 -0
  53. package/ui/usePortalMenuPosition.ts +27 -15
  54. package/utils/cookieConsent.ts +84 -0
  55. package/utils/index.ts +10 -0
  56. package/vdp/FinanceCalculator.tsx +162 -34
  57. package/vdp/VdpModules.tsx +348 -976
  58. package/vdp/index.ts +6 -3
  59. package/vdp/types.ts +25 -15
  60. package/vehiclesProps/accidentDisclosure.ts +25 -0
  61. package/vehiclesProps/decoratedLightProps.tsx +4 -0
  62. package/vehiclesProps/decoratedProps.tsx +4 -0
@@ -0,0 +1,109 @@
1
+ import React from 'react';
2
+
3
+ export type AccountMenuIconName =
4
+ | 'layout-grid' | 'car-front' | 'bookmark' | 'star' | 'scale' | 'user' | 'help-circle' | 'log-out'
5
+ | 'settings' | 'store';
6
+ type FilledIconName = 'settings' | 'store';
7
+
8
+ /**
9
+ * Row icons of the Konto menu (Figma "Konto / Kontomenü", 64243:14111): Lucide-style glyphs in a
10
+ * 22px frame with a 1.8px stroke, but with Figma's own geometry — e.g. its bookmark is narrower and
11
+ * square-cornered, unlike lucide-react 0.288's — so the paths are Figma's export, not the lib Icon.
12
+ * `at` moves each export to where Figma places it in the frame: the group inset minus half the stroke.
13
+ */
14
+ const GLYPHS: Record<Exclude<AccountMenuIconName, FilledIconName>, { at: [number, number]; d: string[] }> = {
15
+ 'layout-grid': {
16
+ at: [1.85, 1.85],
17
+ d: [
18
+ 'M1.81667 0.9H6.4C6.90626 0.9 7.31667 1.31041 7.31667 1.81667V6.4C7.31667 6.90626 6.90626 7.31667 6.4 7.31667H1.81667C1.31041 7.31667 0.9 6.90626 0.9 6.4V1.81667C0.9 1.31041 1.31041 0.9 1.81667 0.9Z',
19
+ 'M11.9 0.9H16.4833C16.9896 0.9 17.4 1.31041 17.4 1.81667V6.4C17.4 6.90626 16.9896 7.31667 16.4833 7.31667H11.9C11.3937 7.31667 10.9833 6.90626 10.9833 6.4V1.81667C10.9833 1.31041 11.3937 0.9 11.9 0.9Z',
20
+ 'M1.81667 10.9833H6.4C6.90626 10.9833 7.31667 11.3937 7.31667 11.9V16.4833C7.31667 16.9896 6.90626 17.4 6.4 17.4H1.81667C1.31041 17.4 0.9 16.9896 0.9 16.4833V11.9C0.9 11.3937 1.31041 10.9833 1.81667 10.9833Z',
21
+ 'M11.9 10.9833H16.4833C16.9896 10.9833 17.4 11.3937 17.4 11.9V16.4833C17.4 16.9896 16.9896 17.4 16.4833 17.4H11.9C11.3937 17.4 10.9833 16.9896 10.9833 16.4833V11.9C10.9833 11.3937 11.3937 10.9833 11.9 10.9833Z',
22
+ ],
23
+ },
24
+ 'car-front': {
25
+ at: [1.85, 3.68333],
26
+ d: [
27
+ 'M2.73333 6.4L4.10833 2.275C4.20846 1.88695 4.43297 1.5424 4.74752 1.29408C5.06206 1.04575 5.44931 0.907329 5.85 0.9H12.45C12.8507 0.907329 13.2379 1.04575 13.5525 1.29408C13.867 1.5424 14.0915 1.88695 14.1917 2.275L15.5667 6.4',
28
+ 'M2.73333 6.4H15.5667C16.5792 6.4 17.4 7.22081 17.4 8.23333V10.9833C17.4 11.9959 16.5792 12.8167 15.5667 12.8167H2.73333C1.72081 12.8167 0.9 11.9959 0.9 10.9833V8.23333C0.9 7.22081 1.72081 6.4 2.73333 6.4Z',
29
+ 'M4.56667 12.8167V14.65M13.7333 12.8167V14.65',
30
+ ],
31
+ },
32
+ bookmark: {
33
+ at: [4.6, 1.85],
34
+ d: ['M0.9 0.9H11.9V17.4L6.4 13.275L0.9 17.4V0.9Z'],
35
+ },
36
+ star: {
37
+ at: [2.03333, 1.85],
38
+ d: ['M8.96669 0.9L11.4417 6.03333L17.0334 6.85833L13 10.8L13.9167 16.3917L8.96669 13.7333L4.01669 16.3917L4.93336 10.8L0.900026 6.85833L6.49169 6.03333L8.96669 0.9Z'],
39
+ },
40
+ scale: {
41
+ at: [1.85, 1.85],
42
+ d: [
43
+ 'M9.15 0.9V4.56667M9.15 4.56667V17.4M9.15 4.56667H3.65M9.15 4.56667H14.65',
44
+ 'M3.65 4.56667L0.900003 10.9833H6.4L3.65 4.56667ZM14.65 4.56667L11.9 10.9833H17.4L14.65 4.56667Z',
45
+ ],
46
+ },
47
+ user: {
48
+ at: [2.76667, 2.76667],
49
+ d: [
50
+ 'M11.9 4.56667C11.9 6.59171 10.2584 8.23333 8.23333 8.23333C6.20829 8.23333 4.56667 6.59171 4.56667 4.56667C4.56667 2.54162 6.20829 0.9 8.23333 0.9C10.2584 0.9 11.9 2.54162 11.9 4.56667Z',
51
+ 'M0.9 16.4833C0.9 12.8167 4.2 10.9833 8.23333 10.9833C12.2667 10.9833 15.5667 12.8167 15.5667 16.4833',
52
+ ],
53
+ },
54
+ 'help-circle': {
55
+ at: [1.85, 1.85],
56
+ d: [
57
+ 'M17.4 9.15C17.4 13.7063 13.7063 17.4 9.15 17.4C4.59365 17.4 0.9 13.7063 0.9 9.15C0.9 4.59365 4.59365 0.9 9.15 0.9C13.7063 0.9 17.4 4.59365 17.4 9.15Z',
58
+ 'M6.85833 6.85833C6.84973 6.4229 6.96538 5.99402 7.19175 5.62195C7.41811 5.24988 7.74582 4.95001 8.13647 4.75748C8.52713 4.56495 8.96456 4.48772 9.39752 4.53485C9.83049 4.58197 10.2411 4.7515 10.5811 5.02357C10.9212 5.29564 11.1767 5.65898 11.3178 6.07104C11.4588 6.4831 11.4795 6.92681 11.3774 7.3502C11.2753 7.77359 11.0547 8.15913 10.7414 8.46165C10.4281 8.76417 10.035 8.97114 9.60833 9.05833V10.25',
59
+ 'M9.15 13.7333H9.16',
60
+ ],
61
+ },
62
+ 'log-out': {
63
+ at: [1.85, 1.85],
64
+ d: [
65
+ 'M6.4 17.4H2.73333C2.2471 17.4 1.78079 17.2068 1.43697 16.863C1.09315 16.5192 0.9 16.0529 0.9 15.5667V2.73333C0.9 2.2471 1.09315 1.78079 1.43697 1.43697C1.78079 1.09315 2.2471 0.9 2.73333 0.9H6.4',
66
+ 'M12.8167 4.56667L17.4 9.15L12.8167 13.7333M17.4 9.15H6.4',
67
+ ],
68
+ },
69
+ };
70
+
71
+ /** Filled Material glyphs supplied for the role rows (2026-10-28): "settings" (Bildeinstellungen)
72
+ * and "store" (the dealer rows). Unlike the stroked Figma glyphs they are filled 24-unit glyphs;
73
+ * viewBox 1 1 22 22 only trims their empty margin, so they keep their own size in the 22px frame.
74
+ * Their masks were full 24px rects (no-ops), so dropped. */
75
+ const FILLED: Record<FilledIconName, string> = {
76
+ settings: 'M13.5 21.5H10.475C10.2583 21.5 10.0667 21.425 9.9 21.275C9.73334 21.125 9.63334 20.9333 9.6 20.7L9.3 18.45C9.03334 18.3667 8.76267 18.2417 8.488 18.075C8.21267 17.9083 7.95834 17.7333 7.725 17.55L5.65 18.45C5.43334 18.5333 5.221 18.5417 5.013 18.475C4.80434 18.4083 4.63334 18.275 4.5 18.075L3 15.45C2.88334 15.25 2.85 15.0373 2.9 14.812C2.95 14.5873 3.05834 14.4083 3.225 14.275L5.05 12.9C5.01667 12.75 4.996 12.6 4.988 12.45C4.97934 12.3 4.975 12.15 4.975 12C4.975 11.8667 4.97934 11.725 4.988 11.575C4.996 11.425 5.01667 11.2667 5.05 11.1L3.225 9.725C3.05834 9.59167 2.95 9.41267 2.9 9.188C2.85 8.96267 2.88334 8.75 3 8.55L4.5 5.95C4.61667 5.75 4.78334 5.61667 5 5.55C5.21667 5.48333 5.425 5.49167 5.625 5.575L7.725 6.45C7.95834 6.26667 8.21267 6.096 8.488 5.938C8.76267 5.77933 9.03334 5.65 9.3 5.55L9.6 3.3C9.63334 3.06667 9.73334 2.875 9.9 2.725C10.0667 2.575 10.2583 2.5 10.475 2.5H13.5C13.7333 2.5 13.9333 2.575 14.1 2.725C14.2667 2.875 14.3667 3.06667 14.4 3.3L14.7 5.55C15 5.66667 15.2707 5.79567 15.512 5.937C15.754 6.079 16 6.25 16.25 6.45L18.375 5.575C18.575 5.49167 18.7793 5.48333 18.988 5.55C19.196 5.61667 19.3667 5.75 19.5 5.95L21 8.55C21.1167 8.75 21.15 8.96267 21.1 9.188C21.05 9.41267 20.9417 9.59167 20.775 9.725L18.925 11.125C18.9583 11.2917 18.975 11.4417 18.975 11.575V12C18.975 12.1333 18.9707 12.2707 18.962 12.412C18.954 12.554 18.9333 12.7167 18.9 12.9L20.725 14.275C20.9083 14.4083 21.025 14.5873 21.075 14.812C21.125 15.0373 21.0833 15.25 20.95 15.45L19.45 18.05C19.3333 18.25 19.1667 18.3833 18.95 18.45C18.7333 18.5167 18.5167 18.5083 18.3 18.425L16.25 17.55C16 17.75 15.746 17.925 15.488 18.075C15.2293 18.225 14.9667 18.35 14.7 18.45L14.4 20.7C14.3667 20.9333 14.2667 21.125 14.1 21.275C13.9333 21.425 13.7333 21.5 13.5 21.5ZM12 15C12.8333 15 13.5417 14.7083 14.125 14.125C14.7083 13.5417 15 12.8333 15 12C15 11.1667 14.7083 10.4583 14.125 9.875C13.5417 9.29167 12.8333 9 12 9C11.1667 9 10.4583 9.29167 9.875 9.875C9.29167 10.4583 9 11.1667 9 12C9 12.8333 9.29167 13.5417 9.875 14.125C10.4583 14.7083 11.1667 15 12 15ZM12 13.5C11.5833 13.5 11.2293 13.354 10.938 13.062C10.646 12.7707 10.5 12.4167 10.5 12C10.5 11.5833 10.646 11.2293 10.938 10.938C11.2293 10.646 11.5833 10.5 12 10.5C12.4167 10.5 12.7707 10.646 13.062 10.938C13.354 11.2293 13.5 11.5833 13.5 12C13.5 12.4167 13.354 12.7707 13.062 13.062C12.7707 13.354 12.4167 13.5 12 13.5ZM11 20H12.975L13.325 17.325C13.8417 17.1917 14.3083 17 14.725 16.75C15.1417 16.5 15.55 16.1833 15.95 15.8L18.425 16.85L19.425 15.15L17.25 13.525C17.3333 13.2583 17.3877 13 17.413 12.75C17.4377 12.5 17.45 12.25 17.45 12C17.45 11.7333 17.4377 11.4793 17.413 11.238C17.3877 10.996 17.3333 10.75 17.25 10.5L19.425 8.85L18.45 7.15L15.925 8.2C15.5917 7.85 15.1917 7.53733 14.725 7.262C14.2583 6.98733 13.7917 6.79167 13.325 6.675L13 4H11.025L10.675 6.675C10.175 6.79167 9.70834 6.975 9.275 7.225C8.84167 7.475 8.425 7.79167 8.025 8.175L5.55 7.15L4.575 8.85L6.725 10.45C6.64167 10.7 6.58334 10.95 6.55 11.2C6.51667 11.45 6.5 11.7167 6.5 12C6.5 12.2667 6.51667 12.525 6.55 12.775C6.58334 13.025 6.64167 13.275 6.725 13.525L4.575 15.15L5.55 16.85L8.025 15.8C8.40834 16.1833 8.81667 16.5 9.25 16.75C9.68334 17 10.1583 17.1917 10.675 17.325L11 20Z',
77
+ store: 'M5 6C4.71666 6 4.479 5.90433 4.287 5.713C4.09566 5.521 4 5.28333 4 5C4 4.71667 4.09566 4.479 4.287 4.287C4.479 4.09567 4.71666 4 5 4H19C19.2833 4 19.5207 4.09567 19.712 4.287C19.904 4.479 20 4.71667 20 5C20 5.28333 19.904 5.521 19.712 5.713C19.5207 5.90433 19.2833 6 19 6H5ZM5 20C4.71666 20 4.479 19.904 4.287 19.712C4.09566 19.5207 4 19.2833 4 19V14H3.825C3.50833 14 3.25 13.879 3.05 13.637C2.85 13.3957 2.78333 13.1167 2.85 12.8L3.85 7.8C3.9 7.56667 4.01666 7.375 4.2 7.225C4.38333 7.075 4.59166 7 4.825 7H19.175C19.4083 7 19.6167 7.075 19.8 7.225C19.9833 7.375 20.1 7.56667 20.15 7.8L21.15 12.8C21.2167 13.1167 21.15 13.3957 20.95 13.637C20.75 13.879 20.4917 14 20.175 14H20V19C20 19.2833 19.904 19.5207 19.712 19.712C19.5207 19.904 19.2833 20 19 20C18.7167 20 18.4793 19.904 18.288 19.712C18.096 19.5207 18 19.2833 18 19V14H14V19C14 19.2833 13.9043 19.5207 13.713 19.712C13.521 19.904 13.2833 20 13 20H5ZM6 18H12V14H6V18ZM5.05 12H18.95L18.35 9H5.65L5.05 12Z',
78
+ };
79
+
80
+ const AccountMenuIcon: React.FunctionComponent<{ name: AccountMenuIconName }> = ({ name }) => {
81
+ if (name === 'settings' || name === 'store') {
82
+ return (
83
+ <svg className="acct-icon" width="22" height="22" viewBox="1 1 22 22" fill="currentColor" aria-hidden="true">
84
+ <path d={FILLED[name]} />
85
+ </svg>
86
+ );
87
+ }
88
+ const { at, d } = GLYPHS[name];
89
+ return (
90
+ <svg
91
+ className="acct-icon"
92
+ width="22"
93
+ height="22"
94
+ viewBox="0 0 22 22"
95
+ fill="none"
96
+ stroke="currentColor"
97
+ strokeWidth="1.8"
98
+ strokeLinecap="round"
99
+ strokeLinejoin="round"
100
+ aria-hidden="true"
101
+ >
102
+ <g transform={`translate(${at[0]} ${at[1]})`}>
103
+ {d.map((path) => <path key={path} d={path} />)}
104
+ </g>
105
+ </svg>
106
+ );
107
+ };
108
+
109
+ export default AccountMenuIcon;
package/chrome/Footer.tsx CHANGED
@@ -86,6 +86,14 @@ export interface FooterProps {
86
86
  * (VehicleDetailedNextPage), never site-wide, since every other page shows only footnotes 1-4.
87
87
  */
88
88
  showCostFootnotes?: boolean;
89
+ /**
90
+ * Hides the brand blurb + "stay in contact"/social + 3 link columns block (the
91
+ * `.footer-grid`), leaving just the legal disclaimer and copyright/"Nach Oben" bar. Opt-in,
92
+ * off by default — every other caller keeps the full footer. Only CheckoutThankYouPage.tsx
93
+ * (checkout step 6 "Danke") uses this today: that page's own Figma reference (64637:37033)
94
+ * has just the compact legal/copyright strip, not the full site footer.
95
+ */
96
+ hideBrandColumns?: boolean;
89
97
  }
90
98
 
91
99
  /**
@@ -93,7 +101,7 @@ export interface FooterProps {
93
101
  * disclaimer block, and a copyright + "Nach Oben" bar. Pure/presentational MD3 chrome — renders
94
102
  * correctly only inside a `<div className="md3">` subtree (scoped theme at source/theme/autobahn).
95
103
  */
96
- const Footer: React.FunctionComponent<FooterProps> = ({ t, showCostFootnotes }) => {
104
+ const Footer: React.FunctionComponent<FooterProps> = ({ t, showCostFootnotes, hideBrandColumns }) => {
97
105
  const scrollTop = (): void => window.scroll({ top: 0, left: 0, behavior: 'smooth' });
98
106
  const now = new Date();
99
107
  const year = now.getFullYear();
@@ -104,6 +112,7 @@ const Footer: React.FunctionComponent<FooterProps> = ({ t, showCostFootnotes })
104
112
 
105
113
  return (
106
114
  <footer style={{ background: 'var(--md-sc-low)', borderTop: '1px solid var(--md-outline-variant)' }}>
115
+ {!hideBrandColumns ? (
107
116
  <div className="container footer-grid" style={{ padding: '40px 24px 24px' }}>
108
117
  <div>
109
118
  <img src={logoUrl} height="30" alt="auto.de" />
@@ -169,10 +178,14 @@ const Footer: React.FunctionComponent<FooterProps> = ({ t, showCostFootnotes })
169
178
  </div>
170
179
  ))}
171
180
  </div>
181
+ ) : null}
172
182
 
173
183
  {/* Legally required disclaimers (PAngV §17a financing example w/ live APR/nominal rate +
174
- term, DAT CO₂-Leitfaden, MwSt, Streichpreis, image notice). Same text as the legacy footer. */}
175
- <div style={{ borderTop: '1px solid var(--md-outline-variant)' }}>
184
+ term, DAT CO₂-Leitfaden, MwSt, Streichpreis, image notice). Same text as the legacy footer.
185
+ The top border separates this from .footer-grid above — with hideBrandColumns that
186
+ block is gone, so the border would just double up against whatever's already directly
187
+ above the footer on the page (CheckoutThankYouPage.tsx's own header border). */}
188
+ <div style={hideBrandColumns ? undefined : { borderTop: '1px solid var(--md-outline-variant)' }}>
176
189
  <div className="container" style={{ padding: '18px 24px' }}>
177
190
  <p
178
191
  className="md-label-sm"