@bytebrand/fe-ui-core-autobahn 1.0.190 → 1.0.191
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/cards/CarCard.tsx +12 -43
- package/cards/CarCardSkeleton.tsx +103 -0
- package/cards/CarRowSkeleton.tsx +152 -0
- package/cards/cardParts.tsx +1253 -1258
- package/cards/index.ts +6 -0
- package/chrome/AccountMenuIcon.tsx +109 -0
- package/chrome/Footer.tsx +16 -3
- package/chrome/TopBar.tsx +139 -266
- package/compat/CookieModal/CookieModal.tsx +20 -6
- package/compat/CookieModal/Modal.tsx +6 -3
- package/compat/CookieModal/modals/ManageCookieModal/ManageCookieModal.tsx +43 -15
- package/compat/CookieModal/modals/PreviewCookieModal/PreviewCookieModal.tsx +4 -3
- package/compat/CookieModal/useModal.ts +5 -1
- package/compat/Loader/Loader.tsx +1 -7
- package/compat/MdField/MdField.tsx +28 -4
- package/compat/TimePicker/TimePicker.tsx +12 -2
- package/constants/app.ts +1 -11
- package/constants/core.ts +1 -12
- package/data/toAutobahnCar.ts +16 -2
- package/iconsvg/IconSVG.tsx +1 -5
- package/locales/de/autobahn.json +880 -848
- package/locales/en/autobahn.json +880 -848
- package/package.json +2 -2
- package/theme/md3.css +5321 -1207
- package/ui/CreditCostNotice.tsx +43 -43
- package/ui/Dropdown.tsx +29 -10
- package/ui/FormCheckbox.tsx +22 -2
- package/ui/FormField.tsx +2 -1
- package/ui/Icon.tsx +6 -0
- package/ui/MfieldCheckIcon.tsx +13 -0
- package/ui/Modal.tsx +84 -6
- package/ui/Skeleton.tsx +79 -20
- package/ui/index.ts +93 -91
- package/ui/scrollFieldIntoView.ts +41 -0
- package/ui/usePortalMenuPosition.ts +27 -15
- package/utils/cookieConsent.ts +84 -0
- package/utils/index.ts +10 -0
- package/vdp/FinanceCalculator.tsx +1095 -1081
- package/vdp/VdpModules.tsx +4417 -4387
- package/vdp/types.ts +5 -5
- package/vehiclesProps/accidentDisclosure.ts +25 -0
- package/vehiclesProps/decoratedLightProps.tsx +4 -0
- package/vehiclesProps/decoratedProps.tsx +4 -0
package/cards/CarCard.tsx
CHANGED
|
@@ -157,8 +157,6 @@ const CarCard: React.FunctionComponent<CarCardProps> = ({
|
|
|
157
157
|
// active that's already 3, so NEU is dropped rather than causing a 4th to overflow.
|
|
158
158
|
const activeDealChips = [showDrop || showSave, showPct, !!car.zeroDown].filter(Boolean).length;
|
|
159
159
|
const showNeu = asGoodAsNew && car.isNew && activeDealChips < 3;
|
|
160
|
-
// tabs the price block can switch to (PriceTabs shows Leasing only when the car has a lease rate)
|
|
161
|
-
const paymentModes: PaymentMode[] = car.lease != null ? ['financing', 'leasing', 'buy'] : ['financing', 'buy'];
|
|
162
160
|
return (
|
|
163
161
|
<article
|
|
164
162
|
className="mcard mcard--interactive cc-card"
|
|
@@ -279,50 +277,21 @@ const CarCard: React.FunctionComponent<CarCardProps> = ({
|
|
|
279
277
|
<div className="cc-price" style={{ marginTop: 0, borderTop: '1px solid var(--md-outline-variant)' }}>
|
|
280
278
|
<PriceTabs car={car} mode={mode} onModeChange={setMode} t={t} />
|
|
281
279
|
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 8, marginTop: 10 }}>
|
|
282
|
-
{
|
|
283
|
-
visible, bottom-aligned — Kaufen's struck list price sits on its own line above
|
|
284
|
-
the price, so without this the row (and the card) grew/shrank by that line on
|
|
285
|
-
every tab switch. Same trick as .cc-terms-stack below. */}
|
|
286
|
-
<div className="cc-hero-stack">
|
|
287
|
-
{paymentModes.map((m) => (
|
|
288
|
-
<div
|
|
289
|
-
key={m}
|
|
290
|
-
className={'cc-hero-slot' + (m === mode ? '' : ' cc-hero-slot--hidden')}
|
|
291
|
-
aria-hidden={m === mode ? undefined : true}
|
|
292
|
-
>
|
|
293
|
-
<PriceHero car={car} mode={m} t={t} alwaysShowUnit />
|
|
294
|
-
</div>
|
|
295
|
-
))}
|
|
296
|
-
</div>
|
|
280
|
+
<PriceHero car={car} mode={mode} t={t} alwaysShowUnit />
|
|
297
281
|
<PriceEvalCol car={car} t={t} />
|
|
298
282
|
</div>
|
|
299
283
|
{/* same fallback CardCtaRow already uses below: pages that haven't wired a real
|
|
300
|
-
"Rate anpassen" sheet yet still get a working "Details" link (opens the car).
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
{
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
>
|
|
312
|
-
<PriceTerms
|
|
313
|
-
car={car}
|
|
314
|
-
mode={m}
|
|
315
|
-
onOpenRateAdjust={onOpenRateAdjust || (() => onOpen(car))}
|
|
316
|
-
onShowDetails={onShowFinancingDetails ? () => onShowFinancingDetails(car, m) : undefined}
|
|
317
|
-
t={t}
|
|
318
|
-
/>
|
|
319
|
-
{/* ADV-405/407 Kreditkosten-Hinweis under the financing/leasing conditions line. Inside the
|
|
320
|
-
slot, so the stack keeps one height across the tabs (no jump on Kaufen); hidden slots
|
|
321
|
-
are visibility:hidden + aria-hidden like their terms line. */}
|
|
322
|
-
{m !== 'buy' && <CreditCostNotice t={t} size="small" cls="cc-ccn" />}
|
|
323
|
-
</div>
|
|
324
|
-
))}
|
|
325
|
-
</div>
|
|
284
|
+
"Rate anpassen" sheet yet still get a working "Details" link (opens the car). */}
|
|
285
|
+
<PriceTerms
|
|
286
|
+
car={car}
|
|
287
|
+
mode={mode}
|
|
288
|
+
onOpenRateAdjust={onOpenRateAdjust || (() => onOpen(car))}
|
|
289
|
+
onShowDetails={onShowFinancingDetails ? () => onShowFinancingDetails(car, mode) : undefined}
|
|
290
|
+
t={t}
|
|
291
|
+
/>
|
|
292
|
+
{/* ADV-405/407 Kreditkosten-Hinweis: below the conditions line, above the CTA row (mobile)
|
|
293
|
+
/ eco line (desktop); not on Kaufen, which shows no financing terms either. */}
|
|
294
|
+
{mode !== 'buy' && <CreditCostNotice t={t} size="small" cls="cc-ccn" />}
|
|
326
295
|
</div>
|
|
327
296
|
{/* Mobile-only row (CardCtaRow itself carries the show-mobile class) — always
|
|
328
297
|
rendered, with real fallbacks the page can override once it wires its own
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// Autobahn (auto.de redesign) — CarCard loading placeholder.
|
|
2
|
+
//
|
|
3
|
+
// The shape of a CarCard while its data is on the way: the same card chrome (.mcard
|
|
4
|
+
// .cc-card — border, 18px radius, shadow) and, inside it, the card's own parts as
|
|
5
|
+
// skeleton bars on the line boxes CarCard's CSS gives them, so a grid of these is as
|
|
6
|
+
// tall as the grid of cards that replaces it and nothing below jumps:
|
|
7
|
+
// - photo: 4:3 plus the carousel's 14px (that's how tall .cc-media really renders), on
|
|
8
|
+
// the lighter --md-sc-low so the big area stays calm and the text bars read as content
|
|
9
|
+
// - title 24/27 (+6), trim 13/17 (+6), spec line 11/15 (+10)
|
|
10
|
+
// - price block on its hairline: tabs (39, +12), rate + price rating (58), terms (2 × 17)
|
|
11
|
+
// - phones (≤600, .show-mobile): the CTA row (9 + 40)
|
|
12
|
+
// - eco line (8 + 3 × 11) pinned to the bottom, like the card's
|
|
13
|
+
// Measured against real cards at 1467 / 768 / 390 px (571 / 541 / 593 tall).
|
|
14
|
+
//
|
|
15
|
+
// Decorative only (aria-hidden): the grid that shows these says what is loading.
|
|
16
|
+
// Renders correctly only inside a `<div className="md3">` subtree.
|
|
17
|
+
|
|
18
|
+
import React from 'react';
|
|
19
|
+
|
|
20
|
+
import Skeleton, { injectStyles } from '../ui/Skeleton';
|
|
21
|
+
|
|
22
|
+
export interface CarCardSkeletonProps {
|
|
23
|
+
className?: string;
|
|
24
|
+
style?: React.CSSProperties;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const CARD_SKELETON_CSS = `
|
|
28
|
+
.md3 .cc-skel { display: flex; flex-direction: column; pointer-events: none; }
|
|
29
|
+
.md3 .cc-skel .cc-skel-photo { height: 0; padding-bottom: calc(75% + 14px); border-radius: 0; --mskeleton-base: var(--md-sc-low); }
|
|
30
|
+
.md3 .cc-skel .cc-skel-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding: 0 18px 8px; margin-top: -3px; }
|
|
31
|
+
.md3 .cc-skel .cc-skel-title { width: 62%; height: 20px; margin: 4px 0 9px; border-radius: var(--md-r-xs); }
|
|
32
|
+
.md3 .cc-skel .cc-skel-trim { width: 82%; height: 11px; margin: 3px 0 9px; border-radius: var(--md-r-full); }
|
|
33
|
+
.md3 .cc-skel .cc-skel-spec { width: 92%; height: 9px; margin: 3px 0 13px; border-radius: var(--md-r-full); }
|
|
34
|
+
.md3 .cc-skel .cc-skel-price { align-self: stretch; border-top: 1px solid var(--md-outline-variant); }
|
|
35
|
+
.md3 .cc-skel .cc-skel-tabs { display: grid; grid-template-columns: repeat(3, 1fr); align-items: center; justify-items: center; height: 39px; margin-bottom: 12px; }
|
|
36
|
+
.md3 .cc-skel .cc-skel-tabs .mskeleton { width: 56%; height: 12px; border-radius: var(--md-r-full); }
|
|
37
|
+
.md3 .cc-skel .cc-skel-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 58px; }
|
|
38
|
+
.md3 .cc-skel .cc-skel-rate { width: 46%; height: 42px; border-radius: var(--md-r-xs); }
|
|
39
|
+
.md3 .cc-skel .cc-skel-eval { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; width: 112px; flex: none; }
|
|
40
|
+
.md3 .cc-skel .cc-skel-eval .mskeleton:first-child { width: 72px; height: 12px; border-radius: var(--md-r-full); }
|
|
41
|
+
.md3 .cc-skel .cc-skel-eval .mskeleton:last-child { width: 100%; height: 7px; border-radius: var(--md-r-full); }
|
|
42
|
+
.md3 .cc-skel .cc-skel-terms,
|
|
43
|
+
.md3 .cc-skel .cc-skel-eco { display: flex; flex-direction: column; }
|
|
44
|
+
.md3 .cc-skel .cc-skel-terms .mskeleton { width: 94%; height: 9px; margin: 4px 0; border-radius: var(--md-r-full); }
|
|
45
|
+
.md3 .cc-skel .cc-skel-terms .mskeleton:last-child { width: 60%; }
|
|
46
|
+
.md3 .cc-skel .cc-skel-cta { align-self: stretch; gap: 6px; margin-top: 9px; }
|
|
47
|
+
.md3 .cc-skel .cc-skel-cta .mskeleton { flex: 1.3 1 0; height: 40px; border-radius: var(--md-r-full); }
|
|
48
|
+
.md3 .cc-skel .cc-skel-cta .mskeleton:nth-child(2) { flex: none; width: 40px; }
|
|
49
|
+
.md3 .cc-skel .cc-skel-cta .mskeleton:last-child { flex: 1 1 0; }
|
|
50
|
+
.md3 .cc-skel .cc-skel-eco { align-self: stretch; margin-top: auto; padding-top: 8px; }
|
|
51
|
+
.md3 .cc-skel .cc-skel-eco .mskeleton { height: 7px; margin: 2px 0; border-radius: var(--md-r-full); }
|
|
52
|
+
.md3 .cc-skel .cc-skel-eco .mskeleton:last-child { width: 66%; }
|
|
53
|
+
@media (max-width: 1024px) {
|
|
54
|
+
.md3 .cc-skel .cc-skel-tabs { height: 38px; }
|
|
55
|
+
}`;
|
|
56
|
+
|
|
57
|
+
const CARD_SKELETON_STYLE_ID = 'md3-card-skeleton-styles';
|
|
58
|
+
|
|
59
|
+
injectStyles(CARD_SKELETON_STYLE_ID, CARD_SKELETON_CSS);
|
|
60
|
+
|
|
61
|
+
const CarCardSkeleton: React.FunctionComponent<CarCardSkeletonProps> = ({ className, style }) => {
|
|
62
|
+
React.useEffect(() => { injectStyles(CARD_SKELETON_STYLE_ID, CARD_SKELETON_CSS); }, []);
|
|
63
|
+
return (
|
|
64
|
+
<div className={'mcard cc-card cc-skel' + (className ? ` ${className}` : '')} style={style} aria-hidden="true">
|
|
65
|
+
<Skeleton className="cc-skel-photo" />
|
|
66
|
+
<div className="cc-skel-body">
|
|
67
|
+
<Skeleton className="cc-skel-title" />
|
|
68
|
+
<Skeleton className="cc-skel-trim" />
|
|
69
|
+
<Skeleton className="cc-skel-spec" />
|
|
70
|
+
<div className="cc-skel-price">
|
|
71
|
+
<div className="cc-skel-tabs">
|
|
72
|
+
<Skeleton />
|
|
73
|
+
<Skeleton />
|
|
74
|
+
<Skeleton />
|
|
75
|
+
</div>
|
|
76
|
+
<div className="cc-skel-hero">
|
|
77
|
+
<Skeleton className="cc-skel-rate" />
|
|
78
|
+
<div className="cc-skel-eval">
|
|
79
|
+
<Skeleton />
|
|
80
|
+
<Skeleton />
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
<div className="cc-skel-terms">
|
|
84
|
+
<Skeleton />
|
|
85
|
+
<Skeleton />
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
<div className="cc-skel-cta show-mobile">
|
|
89
|
+
<Skeleton />
|
|
90
|
+
<Skeleton />
|
|
91
|
+
<Skeleton />
|
|
92
|
+
</div>
|
|
93
|
+
<div className="cc-skel-eco">
|
|
94
|
+
<Skeleton />
|
|
95
|
+
<Skeleton />
|
|
96
|
+
<Skeleton />
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export default CarCardSkeleton;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
// Autobahn (auto.de redesign) — CarRow (SRP list row) loading placeholder.
|
|
2
|
+
//
|
|
3
|
+
// Built on CarRow's own classes (.mcard .listcard / .listcard-info / .specstrip /
|
|
4
|
+
// .listcard-price), so the 320 | 1fr | 240 grid, the column paddings and gaps, the grey
|
|
5
|
+
// price column and the tablet re-flow (≤980: photo + info, price full width below) all
|
|
6
|
+
// come from the same CSS as the real row. Inside, the row's parts as skeleton bars on their
|
|
7
|
+
// line boxes (measured against real rows at 1467 px, 299 / 348 tall):
|
|
8
|
+
// - info: title 22 + trim 18 · spec panel (2 × 3 facts, 85) · feature chips (2 rows, 54)
|
|
9
|
+
// · eco line (3 × 14) at the bottom
|
|
10
|
+
// - price: "Finanzierung ab" + rate + terms (87) · Leasing (66, optional) · Kaufen,
|
|
11
|
+
// rating + meter, CTA (129) at the bottom
|
|
12
|
+
// `withLeasing` toggles the Leasing block, the one thing that changes a real row's height
|
|
13
|
+
// (348 with it, 299 without), so a list can mix both like real results do.
|
|
14
|
+
//
|
|
15
|
+
// Bars on the grey panels (spec strip, price column) use a darker base so they read on
|
|
16
|
+
// --md-sc-low. Decorative only (aria-hidden): the list showing these says what is loading.
|
|
17
|
+
// Renders correctly only inside a `<div className="md3">` subtree.
|
|
18
|
+
|
|
19
|
+
import React from 'react';
|
|
20
|
+
|
|
21
|
+
import Skeleton, { injectStyles } from '../ui/Skeleton';
|
|
22
|
+
|
|
23
|
+
export interface CarRowSkeletonProps {
|
|
24
|
+
/** show the Leasing block in the price column (a real row has it when the car can be leased). */
|
|
25
|
+
withLeasing?: boolean;
|
|
26
|
+
className?: string;
|
|
27
|
+
style?: React.CSSProperties;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const ROW_SKELETON_CSS = `
|
|
31
|
+
.md3 .lc-skel { pointer-events: none; background: var(--md-sc-lowest); }
|
|
32
|
+
.md3 .lc-skel .lc-skel-photo { position: absolute; inset: 0; border-radius: 0; --mskeleton-base: var(--md-sc-low); }
|
|
33
|
+
.md3 .lc-skel .specstrip .mskeleton,
|
|
34
|
+
.md3 .lc-skel .listcard-price .mskeleton { --mskeleton-base: var(--md-sc-highest); }
|
|
35
|
+
.md3 .lc-skel .lc-skel-head { display: flex; flex-direction: column; }
|
|
36
|
+
.md3 .lc-skel .lc-skel-title { width: 44%; height: 16px; margin: 3px 0; border-radius: var(--md-r-xs); }
|
|
37
|
+
.md3 .lc-skel .lc-skel-trim { width: 68%; height: 10px; margin: 4px 0; border-radius: var(--md-r-full); }
|
|
38
|
+
.md3 .lc-skel .lc-skel-fact { display: flex; align-items: center; gap: 7px; height: 15px; }
|
|
39
|
+
.md3 .lc-skel .lc-skel-fact .mskeleton:first-child { flex: none; width: 15px; height: 15px; border-radius: 50%; }
|
|
40
|
+
.md3 .lc-skel .lc-skel-fact .mskeleton:last-child { width: 62%; height: 8px; border-radius: var(--md-r-full); }
|
|
41
|
+
.md3 .lc-skel .lc-skel-fact:nth-child(3n + 2) .mskeleton:last-child { width: 48%; }
|
|
42
|
+
.md3 .lc-skel .lc-skel-chips { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
43
|
+
.md3 .lc-skel .lc-skel-chips .mskeleton { height: 24px; border-radius: 8px; }
|
|
44
|
+
.md3 .lc-skel .lc-skel-chips .mskeleton:nth-child(1) { width: 118px; }
|
|
45
|
+
.md3 .lc-skel .lc-skel-chips .mskeleton:nth-child(2) { width: 112px; }
|
|
46
|
+
.md3 .lc-skel .lc-skel-chips .mskeleton:nth-child(3) { width: 80px; }
|
|
47
|
+
.md3 .lc-skel .lc-skel-chips .mskeleton:nth-child(4) { width: 86px; }
|
|
48
|
+
.md3 .lc-skel .lc-skel-spacer { flex: 1; }
|
|
49
|
+
.md3 .lc-skel .lc-skel-eco { display: flex; flex-direction: column; }
|
|
50
|
+
.md3 .lc-skel .lc-skel-eco .mskeleton { height: 7px; margin: 4px 0 3px; border-radius: var(--md-r-full); }
|
|
51
|
+
.md3 .lc-skel .lc-skel-eco .mskeleton:last-child { width: 55%; }
|
|
52
|
+
.md3 .lc-skel .lc-skel-paths { display: flex; flex-direction: column; align-items: flex-start; }
|
|
53
|
+
.md3 .lc-skel .lc-skel-eyebrow { width: 96px; height: 9px; margin: 2px 0; border-radius: var(--md-r-full); }
|
|
54
|
+
.md3 .lc-skel .lc-skel-rate { display: flex; align-items: center; gap: 8px; height: 49px; margin-top: 4px; }
|
|
55
|
+
.md3 .lc-skel .lc-skel-rate .mskeleton:first-child { width: 120px; height: 38px; border-radius: var(--md-r-xs); }
|
|
56
|
+
.md3 .lc-skel .lc-skel-rate .mskeleton:last-child { width: 28px; height: 9px; border-radius: var(--md-r-full); }
|
|
57
|
+
.md3 .lc-skel .lc-skel-terms { width: 170px; max-width: 100%; height: 8px; margin: 11px 0 2px; border-radius: var(--md-r-full); }
|
|
58
|
+
.md3 .lc-skel .lc-skel-lease,
|
|
59
|
+
.md3 .lc-skel .lc-skel-buy { display: flex; flex-direction: column; border-top: 1px solid var(--md-outline-variant); }
|
|
60
|
+
.md3 .lc-skel .lc-skel-lease { padding-top: 14px; }
|
|
61
|
+
.md3 .lc-skel .lc-skel-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 21px; }
|
|
62
|
+
.md3 .lc-skel .lc-skel-line .mskeleton:first-child { width: 56px; height: 9px; border-radius: var(--md-r-full); }
|
|
63
|
+
.md3 .lc-skel .lc-skel-line .mskeleton:last-child { width: 72px; height: 15px; border-radius: var(--md-r-xs); }
|
|
64
|
+
.md3 .lc-skel .lc-skel-lease-terms { display: flex; flex-direction: column; margin-top: 6px; }
|
|
65
|
+
.md3 .lc-skel .lc-skel-lease-terms .mskeleton { height: 7px; margin: 2px 0 3px; border-radius: var(--md-r-full); }
|
|
66
|
+
.md3 .lc-skel .lc-skel-lease-terms .mskeleton:last-child { width: 62%; }
|
|
67
|
+
.md3 .lc-skel .lc-skel-buy { margin-top: auto; padding-top: 9px; }
|
|
68
|
+
.md3 .lc-skel .lc-skel-buy .lc-skel-line { height: 22px; }
|
|
69
|
+
.md3 .lc-skel .lc-skel-eval { display: flex; align-items: center; gap: 10px; height: 24px; margin-top: 15px; }
|
|
70
|
+
.md3 .lc-skel .lc-skel-eval .mskeleton:first-child { flex: none; width: 84px; height: 24px; border-radius: 12px; }
|
|
71
|
+
.md3 .lc-skel .lc-skel-eval .mskeleton:last-child { flex: 1; height: 8px; border-radius: var(--md-r-full); }
|
|
72
|
+
.md3 .lc-skel .lc-skel-cta { height: 40px; margin-top: 18px; border-radius: var(--md-r-full); }`;
|
|
73
|
+
|
|
74
|
+
const ROW_SKELETON_STYLE_ID = 'md3-row-skeleton-styles';
|
|
75
|
+
|
|
76
|
+
injectStyles(ROW_SKELETON_STYLE_ID, ROW_SKELETON_CSS);
|
|
77
|
+
|
|
78
|
+
const FACTS = [0, 1, 2, 3, 4, 5];
|
|
79
|
+
|
|
80
|
+
const CarRowSkeleton: React.FunctionComponent<CarRowSkeletonProps> = ({ withLeasing = true, className, style }) => {
|
|
81
|
+
React.useEffect(() => { injectStyles(ROW_SKELETON_STYLE_ID, ROW_SKELETON_CSS); }, []);
|
|
82
|
+
return (
|
|
83
|
+
<div className={'mcard listcard lc-skel' + (className ? ` ${className}` : '')} style={style} aria-hidden="true">
|
|
84
|
+
<div className="listcard-media">
|
|
85
|
+
<Skeleton className="lc-skel-photo" />
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<div className="listcard-info">
|
|
89
|
+
<div className="lc-skel-head">
|
|
90
|
+
<Skeleton className="lc-skel-title" />
|
|
91
|
+
<Skeleton className="lc-skel-trim" />
|
|
92
|
+
</div>
|
|
93
|
+
<div className="specstrip">
|
|
94
|
+
{FACTS.map((fact) => (
|
|
95
|
+
<div key={fact} className="lc-skel-fact">
|
|
96
|
+
<Skeleton />
|
|
97
|
+
<Skeleton />
|
|
98
|
+
</div>
|
|
99
|
+
))}
|
|
100
|
+
</div>
|
|
101
|
+
<div className="lc-skel-chips">
|
|
102
|
+
<Skeleton />
|
|
103
|
+
<Skeleton />
|
|
104
|
+
<Skeleton />
|
|
105
|
+
<Skeleton />
|
|
106
|
+
</div>
|
|
107
|
+
<div className="lc-skel-spacer" />
|
|
108
|
+
<div className="lc-skel-eco">
|
|
109
|
+
<Skeleton />
|
|
110
|
+
<Skeleton />
|
|
111
|
+
<Skeleton />
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<div className="listcard-price">
|
|
116
|
+
<div className="lc-skel-paths">
|
|
117
|
+
<Skeleton className="lc-skel-eyebrow" />
|
|
118
|
+
<div className="lc-skel-rate">
|
|
119
|
+
<Skeleton />
|
|
120
|
+
<Skeleton />
|
|
121
|
+
</div>
|
|
122
|
+
<Skeleton className="lc-skel-terms" />
|
|
123
|
+
</div>
|
|
124
|
+
{withLeasing && (
|
|
125
|
+
<div className="lc-skel-lease">
|
|
126
|
+
<div className="lc-skel-line">
|
|
127
|
+
<Skeleton />
|
|
128
|
+
<Skeleton />
|
|
129
|
+
</div>
|
|
130
|
+
<div className="lc-skel-lease-terms">
|
|
131
|
+
<Skeleton />
|
|
132
|
+
<Skeleton />
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
)}
|
|
136
|
+
<div className="lc-skel-buy">
|
|
137
|
+
<div className="lc-skel-line">
|
|
138
|
+
<Skeleton />
|
|
139
|
+
<Skeleton />
|
|
140
|
+
</div>
|
|
141
|
+
<div className="lc-skel-eval">
|
|
142
|
+
<Skeleton />
|
|
143
|
+
<Skeleton />
|
|
144
|
+
</div>
|
|
145
|
+
<Skeleton className="lc-skel-cta" />
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
);
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
export default CarRowSkeleton;
|