@bytebrand/fe-ui-core-autobahn 1.0.5 → 1.0.6
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/cardParts.tsx +25 -25
- package/cards/types.ts +3 -3
- package/package.json +1 -1
package/cards/cardParts.tsx
CHANGED
|
@@ -494,38 +494,38 @@ export interface GalleryBadgesProps {
|
|
|
494
494
|
}
|
|
495
495
|
|
|
496
496
|
/**
|
|
497
|
-
* Trust/activity badges overlaid on the photo itself, bottom-
|
|
498
|
-
*
|
|
499
|
-
*
|
|
500
|
-
* mobile VDP gallery header (availability · views · favorites · Geprüft).
|
|
497
|
+
* Trust/activity badges overlaid on the photo itself, bottom-right (PM reference, 2026-07-10),
|
|
498
|
+
* Figma pill styling (border/radius/height — see .gallery-pill in md3.css). Mirrors the mobile
|
|
499
|
+
* VDP gallery header (availability · views · favorites · Geprüft).
|
|
501
500
|
*
|
|
502
|
-
*
|
|
503
|
-
*
|
|
504
|
-
*
|
|
505
|
-
*
|
|
501
|
+
* Each pill is independent, not all-or-nothing: a missing or zero view/favorite count just omits
|
|
502
|
+
* THAT pill (never shown as "0×") — availability and Geprüft still render on their own terms.
|
|
503
|
+
* .gallery-badges is anchored via `right`, not `left` (md3.css), so however many pills survive
|
|
504
|
+
* they stay stuck to the right edge instead of drifting to wherever the row happens to start.
|
|
506
505
|
*/
|
|
507
|
-
export const GalleryBadges: React.FunctionComponent<GalleryBadgesProps> = ({ car, t }) =>
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
)}
|
|
506
|
+
export const GalleryBadges: React.FunctionComponent<GalleryBadgesProps> = ({ car, t }) => (
|
|
507
|
+
<div className="gallery-badges">
|
|
508
|
+
{car.availability && (
|
|
509
|
+
<span className="gallery-pill">
|
|
510
|
+
<Icon name="circle-check" size={15} stroke={2} color="var(--md-good)" />
|
|
511
|
+
{car.availability}
|
|
512
|
+
</span>
|
|
513
|
+
)}
|
|
514
|
+
{!!car.viewsCount && (
|
|
517
515
|
<span className="gallery-pill">
|
|
518
516
|
<Icon name="eye" size={15} stroke={1.9} />
|
|
519
517
|
{t('autobahn:card.activity.viewsCount', { count: car.viewsCount })}
|
|
520
518
|
</span>
|
|
519
|
+
)}
|
|
520
|
+
{!!car.favoritesCount && (
|
|
521
521
|
<span className="gallery-pill">
|
|
522
522
|
<Icon name="heart" size={15} stroke={1.9} />
|
|
523
523
|
{t('autobahn:card.activity.favoritesCount', { count: car.favoritesCount })}
|
|
524
524
|
</span>
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
</
|
|
530
|
-
|
|
531
|
-
|
|
525
|
+
)}
|
|
526
|
+
<span className="gallery-pill">
|
|
527
|
+
<Icon name="shield-check" size={15} stroke={1.9} />
|
|
528
|
+
{t('autobahn:card.trust.checked')}
|
|
529
|
+
</span>
|
|
530
|
+
</div>
|
|
531
|
+
);
|
package/cards/types.ts
CHANGED
|
@@ -114,9 +114,9 @@ export interface AutobahnCar {
|
|
|
114
114
|
|
|
115
115
|
// --- gallery activity strip (real data: UserActionsAPI 'stats/viewers', loaded async and
|
|
116
116
|
// keyed by carId in SearchResultsStore.statsData — see fieldMapping.ts). Absent until that
|
|
117
|
-
// fetch resolves.
|
|
118
|
-
//
|
|
119
|
-
//
|
|
117
|
+
// fetch resolves. Each pill in the badge row is independent (GalleryBadges): a missing or
|
|
118
|
+
// zero count omits just that pill (never a "0×"), availability/Geprüft still show on their
|
|
119
|
+
// own terms — the row is anchored to the right edge so it never looks lopsided. ---
|
|
120
120
|
/** total detail-page views (stats totalCarImpCount) — shown as the eye pill under the image. */
|
|
121
121
|
viewsCount?: number;
|
|
122
122
|
/** total users who favorited this car (stats totalFavCount) — shown as the heart pill under the image. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bytebrand/fe-ui-core-autobahn",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
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",
|