@stapel/listings-react 0.4.0 → 0.8.0
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/CHANGELOG.md +180 -0
- package/dist/api/generated/schema.d.ts +94 -4
- package/dist/api/generated/schema.d.ts.map +1 -1
- package/dist/default/FavoritesPane.d.ts +40 -3
- package/dist/default/FavoritesPane.d.ts.map +1 -1
- package/dist/default/FavoritesPane.js +30 -18
- package/dist/default/FavoritesPane.js.map +1 -1
- package/dist/default/ListingCard.d.ts +81 -4
- package/dist/default/ListingCard.d.ts.map +1 -1
- package/dist/default/ListingCard.js +97 -27
- package/dist/default/ListingCard.js.map +1 -1
- package/dist/default/ListingComposerPage.d.ts +163 -23
- package/dist/default/ListingComposerPage.d.ts.map +1 -1
- package/dist/default/ListingComposerPage.js +85 -43
- package/dist/default/ListingComposerPage.js.map +1 -1
- package/dist/default/ListingDetailPane.d.ts +41 -4
- package/dist/default/ListingDetailPane.d.ts.map +1 -1
- package/dist/default/ListingDetailPane.js +38 -25
- package/dist/default/ListingDetailPane.js.map +1 -1
- package/dist/default/ListingPhoto.d.ts +13 -1
- package/dist/default/ListingPhoto.d.ts.map +1 -1
- package/dist/default/ListingPhoto.js +47 -9
- package/dist/default/ListingPhoto.js.map +1 -1
- package/dist/default/ListingPrice.d.ts +13 -0
- package/dist/default/ListingPrice.d.ts.map +1 -0
- package/dist/default/ListingPrice.js +60 -0
- package/dist/default/ListingPrice.js.map +1 -0
- package/dist/default/MyListingsPane.d.ts +7 -28
- package/dist/default/MyListingsPane.d.ts.map +1 -1
- package/dist/default/MyListingsPane.js +136 -67
- package/dist/default/MyListingsPane.js.map +1 -1
- package/dist/default/SignInLink.js +8 -7
- package/dist/default/SignInLink.js.map +1 -1
- package/dist/default/StatusTags.d.ts +16 -5
- package/dist/default/StatusTags.d.ts.map +1 -1
- package/dist/default/StatusTags.js +19 -13
- package/dist/default/StatusTags.js.map +1 -1
- package/dist/default/index.d.ts +15 -9
- package/dist/default/index.d.ts.map +1 -1
- package/dist/default/index.js +13 -6
- package/dist/default/index.js.map +1 -1
- package/dist/headless/Favorites.d.ts +6 -0
- package/dist/headless/Favorites.d.ts.map +1 -1
- package/dist/headless/Favorites.js +23 -7
- package/dist/headless/Favorites.js.map +1 -1
- package/dist/headless/ListingActions.d.ts +12 -0
- package/dist/headless/ListingActions.d.ts.map +1 -1
- package/dist/headless/ListingActions.js +3 -0
- package/dist/headless/ListingActions.js.map +1 -1
- package/dist/headless/ListingComposer.d.ts +23 -0
- package/dist/headless/ListingComposer.d.ts.map +1 -1
- package/dist/headless/ListingComposer.js +33 -7
- package/dist/headless/ListingComposer.js.map +1 -1
- package/dist/headless/ListingDetail.d.ts.map +1 -1
- package/dist/headless/ListingDetail.js +7 -5
- package/dist/headless/ListingDetail.js.map +1 -1
- package/dist/headless/useMandateGate.d.ts +33 -2
- package/dist/headless/useMandateGate.d.ts.map +1 -1
- package/dist/headless/useMandateGate.js +42 -4
- package/dist/headless/useMandateGate.js.map +1 -1
- package/dist/i18n/es.d.ts +6 -1
- package/dist/i18n/es.d.ts.map +1 -1
- package/dist/i18n/es.js +23 -5
- package/dist/i18n/es.js.map +1 -1
- package/dist/i18n/generated/errors.es.gen.d.ts +1 -1
- package/dist/i18n/generated/errors.es.gen.js +1 -1
- package/dist/i18n/generated/errors.gen.d.ts +6 -0
- package/dist/i18n/generated/errors.gen.d.ts.map +1 -1
- package/dist/i18n/generated/errors.gen.js +3 -0
- package/dist/i18n/generated/errors.gen.js.map +1 -1
- package/dist/i18n/generated/errors.ru.gen.d.ts +1 -1
- package/dist/i18n/generated/errors.ru.gen.js +1 -1
- package/dist/i18n/keys.d.ts +30 -3
- package/dist/i18n/keys.d.ts.map +1 -1
- package/dist/i18n/keys.js +47 -7
- package/dist/i18n/keys.js.map +1 -1
- package/dist/i18n/ru.d.ts +16 -1
- package/dist/i18n/ru.d.ts.map +1 -1
- package/dist/i18n/ru.js +35 -5
- package/dist/i18n/ru.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/model/draft.d.ts +9 -6
- package/dist/model/draft.d.ts.map +1 -1
- package/dist/model/draft.js +3 -1
- package/dist/model/draft.js.map +1 -1
- package/dist/model/features.d.ts +21 -7
- package/dist/model/features.d.ts.map +1 -1
- package/dist/model/features.js +26 -0
- package/dist/model/features.js.map +1 -1
- package/llms.txt +9 -8
- package/manifest.json +82 -31
- package/nav-manifest.json +1 -1
- package/package.json +19 -14
- package/src/analytics/generated/events.json +1 -1
- package/src/api/generated/schema.ts +94 -4
- package/src/default/FavoritesPane.tsx +156 -82
- package/src/default/ListingCard.tsx +283 -116
- package/src/default/ListingComposerPage.tsx +403 -187
- package/src/default/ListingDetailPane.tsx +200 -98
- package/src/default/ListingPhoto.tsx +89 -16
- package/src/default/ListingPrice.tsx +77 -0
- package/src/default/MyListingsPane.tsx +286 -228
- package/src/default/SignInLink.tsx +4 -4
- package/src/default/StatusTags.tsx +36 -18
- package/src/default/index.ts +18 -7
- package/src/headless/Favorites.tsx +36 -7
- package/src/headless/ListingActions.tsx +19 -0
- package/src/headless/ListingComposer.tsx +56 -5
- package/src/headless/ListingDetail.tsx +12 -5
- package/src/headless/useMandateGate.ts +49 -5
- package/src/i18n/es.ts +29 -5
- package/src/i18n/generated/errors.es.gen.ts +1 -1
- package/src/i18n/generated/errors.gen.ts +3 -0
- package/src/i18n/generated/errors.json +7 -0
- package/src/i18n/generated/errors.ru.gen.ts +1 -1
- package/src/i18n/keys.ts +54 -7
- package/src/i18n/ru.ts +41 -5
- package/src/index.ts +5 -1
- package/src/model/draft.ts +12 -7
- package/src/model/features.ts +48 -7
- package/dist/default/ErrorAlert.d.ts +0 -9
- package/dist/default/ErrorAlert.d.ts.map +0 -1
- package/dist/default/ErrorAlert.js +0 -27
- package/dist/default/ErrorAlert.js.map +0 -1
- package/dist/default/theme.d.ts +0 -25
- package/dist/default/theme.d.ts.map +0 -1
- package/dist/default/theme.js +0 -40
- package/dist/default/theme.js.map +0 -1
- package/src/default/ErrorAlert.tsx +0 -46
- package/src/default/theme.tsx +0 -67
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Flex, Typography } from "antd";
|
|
3
|
+
import { EmptyState, ErrorAlert, SkinTheme, } from "@stapel/tokens-antd/skin";
|
|
4
|
+
import { matchList, useT } from "@stapel/core";
|
|
5
|
+
import { spacing } from "@stapel/tokens";
|
|
4
6
|
import { useFavorites } from "../headless/Favorites.js";
|
|
5
7
|
import { LISTINGS_I18N_KEYS } from "../i18n/keys.js";
|
|
6
|
-
import { ErrorAlert } from "./ErrorAlert.js";
|
|
7
8
|
import { ListingCard } from "./ListingCard.js";
|
|
8
|
-
import {
|
|
9
|
+
import { SignInLink } from "./SignInLink.js";
|
|
10
|
+
/** The narrowest a card may get before the grid drops a column — the same
|
|
11
|
+
* element-relative rule the detail gallery uses. It was `width: 240`, which
|
|
12
|
+
* left two cards floating in a 2560px pane and overflowed a 390px one. */
|
|
13
|
+
export const FAVORITES_CARD_MIN = "15rem";
|
|
14
|
+
/** How wide the saved grid may get before it stops being a grid and becomes
|
|
15
|
+
* three cards adrift in a 1280px window. A measure, not a breakpoint: the
|
|
16
|
+
* cards keep filling it, and past it the page centres. */
|
|
17
|
+
export const FAVORITES_MEASURE = "72rem";
|
|
9
18
|
/** The card's own open props for one row. One arm, never two. */
|
|
10
19
|
function cardOpenProps(props, id) {
|
|
11
20
|
if (props.hrefFor !== undefined) {
|
|
@@ -20,19 +29,22 @@ function cardOpenProps(props, id) {
|
|
|
20
29
|
}
|
|
21
30
|
export function FavoritesPane(props) {
|
|
22
31
|
const t = useT();
|
|
23
|
-
const describe = useDescribeFlowError();
|
|
24
32
|
const bag = useFavorites();
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
status:
|
|
31
|
-
message:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
const paged = bag.prevPage.available || bag.nextPage.available;
|
|
34
|
+
return (_jsx(SkinTheme, { surface: "base", style: { padding: spacing[4], maxWidth: FAVORITES_MEASURE }, ...(props.mode !== undefined ? { mode: props.mode } : {}), children: _jsxs(Flex, { vertical: true, gap: spacing[4], "data-testid": "listings-favorites", children: [_jsx(Typography.Title, { level: 3, children: t(LISTINGS_I18N_KEYS.favoritesTitle) }), !bag.gate.available ? (
|
|
35
|
+
// The whole body, not a banner over a spinner. A blocked screen has
|
|
36
|
+
// one state and it carries its own way out.
|
|
37
|
+
_jsx(EmptyState, { testId: "listings-favorites-blocked", title: t(bag.gate.block.code, bag.gate.block.params), hint: t(LISTINGS_I18N_KEYS.favoritesSignInHint), action: _jsx(SignInLink, { cta: props.signIn, testId: "listings-favorites-sign-in" }) })) : (_jsxs(_Fragment, { children: [matchList(bag.rows, {
|
|
38
|
+
loading: () => (_jsx("div", { role: "status", "aria-busy": "true", "aria-label": t(LISTINGS_I18N_KEYS.favoritesLoading), "data-testid": "listings-favorites-loading", "data-stapel-load-state": "loading" })),
|
|
39
|
+
failed: (error) => (_jsx(ErrorAlert, { testId: "listings-favorites-error", thrown: error, message: t(LISTINGS_I18N_KEYS.favoritesLoadFailed), onRetry: bag.refetch, retryLabel: t(LISTINGS_I18N_KEYS.mineRetry) })),
|
|
40
|
+
empty: () => (_jsx(EmptyState, { testId: "listings-favorites-empty", title: t(LISTINGS_I18N_KEYS.favoritesEmpty), hint: t(LISTINGS_I18N_KEYS.favoritesEmptyHint), ...(props.browseCta !== undefined
|
|
41
|
+
? { action: props.browseCta }
|
|
42
|
+
: {}) })),
|
|
43
|
+
ready: (rows) => (_jsx("div", { "data-testid": "listings-favorites-grid", style: {
|
|
44
|
+
display: "grid",
|
|
45
|
+
gridTemplateColumns: `repeat(auto-fill, minmax(${FAVORITES_CARD_MIN}, 1fr))`,
|
|
46
|
+
gap: spacing[4],
|
|
47
|
+
}, children: rows.map((row) => (_jsx(ListingCard, { listing: row, blockedReason: "line", ...(props.signIn !== undefined ? { signIn: props.signIn } : {}), ...cardOpenProps(props, row.id) }, row.id))) })),
|
|
48
|
+
}), paged ? (_jsxs(Flex, { gap: spacing[3], wrap: true, align: "center", children: [bag.prevPage.available ? (_jsx(Button, { size: "small", "data-testid": "listings-favorites-prev", "data-analytics": "none", "data-analytics-reason": "paging a list the person is already reading; not a business action", onClick: bag.goPrev, children: t(LISTINGS_I18N_KEYS.pagePrev) })) : null, _jsx(Typography.Text, { type: "secondary", "data-testid": "listings-favorites-page", children: t(LISTINGS_I18N_KEYS.pageIndicator, { page: bag.pageNumber }) }), bag.nextPage.available ? (_jsx(Button, { size: "small", "data-testid": "listings-favorites-next", "data-analytics": "none", "data-analytics-reason": "paging a list the person is already reading; not a business action", onClick: bag.goNext, children: t(LISTINGS_I18N_KEYS.pageNext) })) : null] })) : null] }))] }) }));
|
|
37
49
|
}
|
|
38
50
|
//# sourceMappingURL=FavoritesPane.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FavoritesPane.js","sourceRoot":"","sources":["../../src/default/FavoritesPane.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"FavoritesPane.js","sourceRoot":"","sources":["../../src/default/FavoritesPane.tsx"],"names":[],"mappings":";AA6BA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAChD,OAAO,EACL,UAAU,EACV,UAAU,EACV,SAAS,GACV,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,OAAO,EAAE,MAAM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,CAAC,MAAM,YAElB,CAAC,CAAC,kBAAkB,CAAC,QAAQ,CAAC,GACxB,CACV,CAAC,CAAC,CAAC,IAAI,EACR,KAAC,UAAU,CAAC,IAAI,IACd,IAAI,EAAC,WAAW,iBACJ,yBAAyB,YAEpC,CAAC,CAAC,kBAAkB,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC,GAC9C,EACjB,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CACxB,KAAC,MAAM,IACL,IAAI,EAAC,OAAO,iBACA,yBAAyB,oBACtB,MAAM,2BACC,oEAAoE,EAC1F,OAAO,EAAE,GAAG,CAAC,MAAM,YAElB,CAAC,CAAC,kBAAkB,CAAC,QAAQ,CAAC,GACxB,CACV,CAAC,CAAC,CAAC,IAAI,IACH,CACR,CAAC,CAAC,CAAC,IAAI,IACP,CACJ,IACI,GACG,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -6,6 +6,26 @@
|
|
|
6
6
|
* the CONTAINER is the seam, which is why this component takes a plain card
|
|
7
7
|
* row and a plain `href` rather than reaching for a router.
|
|
8
8
|
*
|
|
9
|
+
* ── The CARD is the link ───────────────────────────────────────────────────
|
|
10
|
+
*
|
|
11
|
+
* Owner ruling (2026-08-28, from the live stand): a card carrying its own
|
|
12
|
+
* "view" button is plainly wrong. The card used to render a separate "Open"
|
|
13
|
+
* control under its own content — a full-width primary button captioned with
|
|
14
|
+
* `listings.card.open` — so a person looking at a photo, a price and a title
|
|
15
|
+
* had to find and press a fourth thing to act on the three they were reading.
|
|
16
|
+
* Nothing on a classified works that way: the card IS the target, and the only
|
|
17
|
+
* separate control on it is the favourite heart.
|
|
18
|
+
*
|
|
19
|
+
* So the photo, the price, the title, the badges and the location now live
|
|
20
|
+
* INSIDE one anchor that covers the whole card, and `listings.card.open` is
|
|
21
|
+
* retired rather than left orphaned in three catalogues.
|
|
22
|
+
*
|
|
23
|
+
* What that must not cost is the anchor semantics won earlier: this is a real
|
|
24
|
+
* `<a href>`, so middle-click opens a tab, ⌘-click opens a tab, "copy link
|
|
25
|
+
* address" works and a crawler can follow it. It is NOT an `onClick` on a div,
|
|
26
|
+
* which is the shape every "whole card clickable" rewrite reaches for first
|
|
27
|
+
* and which has none of those properties.
|
|
28
|
+
*
|
|
9
29
|
* ── One click, one navigation ──────────────────────────────────────────────
|
|
10
30
|
*
|
|
11
31
|
* `href` and `onOpen` used to be two optional props, and a card given both
|
|
@@ -14,6 +34,25 @@
|
|
|
14
34
|
* button, or neither — and `linkComponent` rides on the link arm so a
|
|
15
35
|
* container can hand in its router's `<Link>` and keep the anchor.
|
|
16
36
|
*
|
|
37
|
+
* ── The accessible name is the TITLE, and only the title ───────────────────
|
|
38
|
+
*
|
|
39
|
+
* An anchor's name is computed from its contents unless it is given one, and
|
|
40
|
+
* the contents here are a photo, a price, three badges and a place: a screen
|
|
41
|
+
* reader reading a list of forty of those announces forty paragraphs. The
|
|
42
|
+
* anchor therefore carries an explicit `aria-label` — the listing's title,
|
|
43
|
+
* nothing else — and everything inside it stays readable by ordinary browsing.
|
|
44
|
+
* A listing with no title falls back to `listings.card.untitled`, because a
|
|
45
|
+
* link announced as nothing is worse than one announced as untitled.
|
|
46
|
+
*
|
|
47
|
+
* ── Why the heart is a row under the card and not floating on the photo ────
|
|
48
|
+
*
|
|
49
|
+
* Because for a signed-out visitor — which is most of the traffic a storefront
|
|
50
|
+
* gets — the heart is BLOCKED, and a blocked control states its reason as text
|
|
51
|
+
* beside it. There is nowhere to put that sentence on top of a photograph. The
|
|
52
|
+
* heart therefore sits in its own row beneath the content, outside the anchor
|
|
53
|
+
* (a button inside a link is neither valid nor operable), where the reason has
|
|
54
|
+
* a line to live on.
|
|
55
|
+
*
|
|
17
56
|
* ── What it renders without asking the server anything else ────────────────
|
|
18
57
|
*
|
|
19
58
|
* Badges. `features_badges` is a stored DAO projection, and a DAO carries the
|
|
@@ -22,14 +61,17 @@
|
|
|
22
61
|
* card. That property is the whole reason the projection exists, and it is
|
|
23
62
|
* what makes a grid of forty cards cost one query.
|
|
24
63
|
*
|
|
25
|
-
* ── The heart is never hidden
|
|
64
|
+
* ── The heart is never hidden, and never explained by hover ────────────────
|
|
26
65
|
*
|
|
27
66
|
* A visitor sees it, blocked, with the reason IN WORDS beside it and the
|
|
28
67
|
* sign-in link the container supplies (`signIn`, typically `?next=<current>`).
|
|
29
68
|
* Hiding it would teach nobody that favourites exist (private-space canon
|
|
30
|
-
* §6.3, spec §6.2 item 6)
|
|
31
|
-
*
|
|
32
|
-
*
|
|
69
|
+
* §6.3, spec §6.2 item 6). The reason itself goes through the shared
|
|
70
|
+
* `<GatedControl>`, which renders it as text linked by `aria-describedby` —
|
|
71
|
+
* a disabled antd button receives no pointer events and is not focusable, so
|
|
72
|
+
* the `Tooltip` this component used to offer as a "quieter" volume was a
|
|
73
|
+
* reason nobody could read on any device. That arm is gone; `blockedReason`
|
|
74
|
+
* is now "text" (reason + door) or "line" (reason alone, for a grid).
|
|
33
75
|
*/
|
|
34
76
|
import type { ReactElement, ReactNode } from "react";
|
|
35
77
|
import type { LinkComponent, SignInCtaProp } from "@stapel/core";
|
|
@@ -71,8 +113,43 @@ export type ListingCardOpenProps = {
|
|
|
71
113
|
readonly onOpen?: undefined;
|
|
72
114
|
readonly linkComponent?: undefined;
|
|
73
115
|
};
|
|
116
|
+
/**
|
|
117
|
+
* How loudly a blocked favourite states its reason on THIS surface.
|
|
118
|
+
*
|
|
119
|
+
* `"text"` (the default) is the sentence under the controls, with the sign-in
|
|
120
|
+
* door beside it — the right volume for a card that stands alone.
|
|
121
|
+
*
|
|
122
|
+
* `"line"` collapses it to the reason alone, no door: a grid of forty cards
|
|
123
|
+
* repeating "sign in to do this — sign in" forty times is not forty pieces of
|
|
124
|
+
* help, it is the loudest thing on the page, and every one of those doors
|
|
125
|
+
* leads where the header's own sign-in button already leads.
|
|
126
|
+
*
|
|
127
|
+
* There is no third setting. The reason is on screen in both, because the only
|
|
128
|
+
* way to make it quieter than a line of text is to hide it behind hover, and
|
|
129
|
+
* hover does not exist on the device most of these cards are read on.
|
|
130
|
+
*/
|
|
131
|
+
export type ListingCardBlockedReason = "text" | "line";
|
|
132
|
+
/** The class the whole-card target carries, for {@link cardTargetCss}. */
|
|
133
|
+
export declare const CARD_TARGET_CLASS = "stapel-listing-card-target";
|
|
134
|
+
/** The `href` the hoisted card stylesheet is deduplicated by. */
|
|
135
|
+
export declare const CARD_TARGET_STYLE_HREF = "stapel-listings-card-target";
|
|
136
|
+
/**
|
|
137
|
+
* The one rule an inline style cannot express: `:focus-visible`.
|
|
138
|
+
*
|
|
139
|
+
* A whole-card link is the largest focus target on a results page and it must
|
|
140
|
+
* SHOW that it has focus — a keyboard visitor tabbing a grid of forty cards
|
|
141
|
+
* with no ring has no idea which one Enter will open. The outline is drawn
|
|
142
|
+
* from the theme's own focus colour, which arrives as a custom property on the
|
|
143
|
+
* element (the sheet is static, so one hoisted copy serves either theme).
|
|
144
|
+
*
|
|
145
|
+
* `--listing-*` rather than `--stapel-*`: the `--stapel-` namespace is the
|
|
146
|
+
* design system's ROLE catalogue and this is a component's private plumbing.
|
|
147
|
+
*/
|
|
148
|
+
export declare function cardTargetCss(): string;
|
|
74
149
|
export interface ListingCardBaseProps extends ThemeModeProp, SignInCtaProp {
|
|
75
150
|
readonly listing: ListingCardData;
|
|
151
|
+
/** See {@link ListingCardBlockedReason}. Default `"text"`. */
|
|
152
|
+
readonly blockedReason?: ListingCardBlockedReason;
|
|
76
153
|
/** Extra chrome the container adds (a `promoted` tag from search, say —
|
|
77
154
|
* DSA Art. 26 marking belongs to the pair that receives it). */
|
|
78
155
|
readonly badge?: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListingCard.d.ts","sourceRoot":"","sources":["../../src/default/ListingCard.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ListingCard.d.ts","sourceRoot":"","sources":["../../src/default/ListingCard.tsx"],"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MAAM,CAKtC;AAwBD,MAAM,WAAW,oBAAqB,SAAQ,aAAa,EAAE,aAAa;IACxE,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,8DAA8D;IAC9D,QAAQ,CAAC,aAAa,CAAC,EAAE,wBAAwB,CAAC;IAClD;oEACgE;IAChE,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAC3B;gFAC4E;IAC5E,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG,oBAAoB,CAAC;AA+E3E,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,YAAY,CA6KjE"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Button, Card, Flex,
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Card, Flex, Typography, theme as antdTheme } from "antd";
|
|
3
|
+
import { GatedControl, SkinTheme } from "@stapel/tokens-antd/skin";
|
|
3
4
|
import { useActionGate, useT } from "@stapel/core";
|
|
5
|
+
import { spacing } from "@stapel/tokens";
|
|
4
6
|
import { FeatureBadges } from "@stapel/attributes-react/default";
|
|
5
7
|
import { asFeatureDaoList, featuresDtoFromDaoList, featuresFromDaoList } from "../model/features.js";
|
|
6
8
|
import { lifecycleCaption } from "../model/status.js";
|
|
@@ -9,56 +11,124 @@ import { LISTINGS_I18N_KEYS } from "../i18n/keys.js";
|
|
|
9
11
|
import { HeartIcon } from "./icons.js";
|
|
10
12
|
import { SignInLink } from "./SignInLink.js";
|
|
11
13
|
import { ListingPhoto } from "./ListingPhoto.js";
|
|
12
|
-
import {
|
|
14
|
+
import { ListingPrice } from "./ListingPrice.js";
|
|
15
|
+
/** The class the whole-card target carries, for {@link cardTargetCss}. */
|
|
16
|
+
export const CARD_TARGET_CLASS = "stapel-listing-card-target";
|
|
17
|
+
/** The `href` the hoisted card stylesheet is deduplicated by. */
|
|
18
|
+
export const CARD_TARGET_STYLE_HREF = "stapel-listings-card-target";
|
|
13
19
|
/**
|
|
14
|
-
* The one
|
|
20
|
+
* The one rule an inline style cannot express: `:focus-visible`.
|
|
21
|
+
*
|
|
22
|
+
* A whole-card link is the largest focus target on a results page and it must
|
|
23
|
+
* SHOW that it has focus — a keyboard visitor tabbing a grid of forty cards
|
|
24
|
+
* with no ring has no idea which one Enter will open. The outline is drawn
|
|
25
|
+
* from the theme's own focus colour, which arrives as a custom property on the
|
|
26
|
+
* element (the sheet is static, so one hoisted copy serves either theme).
|
|
27
|
+
*
|
|
28
|
+
* `--listing-*` rather than `--stapel-*`: the `--stapel-` namespace is the
|
|
29
|
+
* design system's ROLE catalogue and this is a component's private plumbing.
|
|
30
|
+
*/
|
|
31
|
+
export function cardTargetCss() {
|
|
32
|
+
return [
|
|
33
|
+
`.${CARD_TARGET_CLASS}{display:block;color:inherit;text-decoration:none}`,
|
|
34
|
+
`.${CARD_TARGET_CLASS}:focus-visible{outline:2px solid var(--listing-card-focus);outline-offset:2px}`,
|
|
35
|
+
].join("");
|
|
36
|
+
}
|
|
37
|
+
/** The anchor: a block that inherits the card's own type colour rather than
|
|
38
|
+
* painting every card's contents link-blue. */
|
|
39
|
+
const TARGET_STYLE = {
|
|
40
|
+
display: "block",
|
|
41
|
+
color: "inherit",
|
|
42
|
+
textDecoration: "none",
|
|
43
|
+
};
|
|
44
|
+
/** The callback arm's button, reset to look like the anchor does. A card that
|
|
45
|
+
* is a target on one deployment and a card-plus-a-button on another would be
|
|
46
|
+
* two different products. */
|
|
47
|
+
const BUTTON_TARGET_STYLE = {
|
|
48
|
+
...TARGET_STYLE,
|
|
49
|
+
width: "100%",
|
|
50
|
+
padding: 0,
|
|
51
|
+
border: "none",
|
|
52
|
+
background: "none",
|
|
53
|
+
font: "inherit",
|
|
54
|
+
textAlign: "start",
|
|
55
|
+
cursor: "pointer",
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* The card's own body, wrapped in whatever makes it openable: an anchor, a
|
|
59
|
+
* button, or nothing at all.
|
|
15
60
|
*
|
|
16
61
|
* Exactly one of the three renders, so exactly one navigation happens per
|
|
17
|
-
* click
|
|
18
|
-
*
|
|
62
|
+
* click — the branch below has no arm in which both a handler and an `href`
|
|
63
|
+
* reach the DOM.
|
|
64
|
+
*
|
|
65
|
+
* The BUTTON arm exists for a container that routes by callback. It wraps the
|
|
66
|
+
* same content in a `<button>` reset to look like nothing, rather than drawing
|
|
67
|
+
* a separate captioned control: a card that is a target on one deployment and
|
|
68
|
+
* a card-plus-a-button on another would be two different products.
|
|
19
69
|
*/
|
|
20
|
-
function
|
|
21
|
-
const
|
|
22
|
-
const label = t(LISTINGS_I18N_KEYS.cardOpen);
|
|
70
|
+
function CardTarget(props) {
|
|
71
|
+
const { label, children } = props;
|
|
23
72
|
if (props.href !== undefined) {
|
|
24
73
|
const Link = props.linkComponent;
|
|
25
74
|
// The host's component is rendered as it comes: this pair has no CSS and
|
|
26
|
-
// no way to hand
|
|
27
|
-
//
|
|
28
|
-
|
|
29
|
-
// written once, and it is already the thing that knows the design system.
|
|
30
|
-
return Link !== undefined ? (_jsx(Link, { href: props.href, "aria-label": label, "data-testid": "listings-card-open", "data-analytics": "none", "data-analytics-reason": "business action \u2014 host app wraps with its own tracked()", children: label })) : (_jsx(Button, { size: "small", type: "link", href: props.href, "data-testid": "listings-card-open", "data-analytics": "none", "data-analytics-reason": "business action \u2014 host app wraps with its own tracked()", children: label }));
|
|
75
|
+
// no way to hand its own styling to a foreign element. A wrapper element
|
|
76
|
+
// around a link would be a click target that is not the link.
|
|
77
|
+
return Link !== undefined ? (_jsx(Link, { href: props.href, "aria-label": label, className: CARD_TARGET_CLASS, "data-testid": "listings-card-open", "data-analytics": "none", "data-analytics-reason": "business action \u2014 host app wraps with its own tracked()", children: children })) : (_jsx("a", { href: props.href, "aria-label": label, className: CARD_TARGET_CLASS, style: TARGET_STYLE, "data-testid": "listings-card-open", "data-analytics": "none", "data-analytics-reason": "business action \u2014 host app wraps with its own tracked()", children: children }));
|
|
31
78
|
}
|
|
32
79
|
if (props.onOpen !== undefined) {
|
|
33
80
|
const onOpen = props.onOpen;
|
|
34
|
-
return (_jsx(
|
|
81
|
+
return (_jsx("button", { type: "button", "aria-label": label, className: CARD_TARGET_CLASS, style: BUTTON_TARGET_STYLE, "data-testid": "listings-card-open", "data-analytics": "none", "data-analytics-reason": "business action \u2014 host app wraps with its own tracked()", onClick: () => {
|
|
35
82
|
onOpen(props.listingId);
|
|
36
|
-
}, children:
|
|
83
|
+
}, children: children }));
|
|
37
84
|
}
|
|
38
|
-
|
|
85
|
+
// No open control at all — a card inside a screen that IS the listing.
|
|
86
|
+
return _jsx("div", { "data-testid": "listings-card-body", children: children });
|
|
39
87
|
}
|
|
40
88
|
export function ListingCard(props) {
|
|
41
89
|
const t = useT();
|
|
42
90
|
const { listing } = props;
|
|
43
91
|
const favorite = useFavoriteToggle(listing.id, listing.is_favorited);
|
|
92
|
+
const { token } = antdTheme.useToken();
|
|
44
93
|
const badgeDaos = asFeatureDaoList(listing.features_badges);
|
|
45
94
|
const badgeFeatures = featuresFromDaoList(badgeDaos);
|
|
46
95
|
const badgeValues = featuresDtoFromDaoList(badgeDaos);
|
|
47
96
|
const titleDaos = asFeatureDaoList(listing.features_title);
|
|
48
97
|
const status = listing.status === undefined ? undefined : lifecycleCaption(listing.status);
|
|
49
|
-
const price = listing.price !== undefined && listing.price.length > 0
|
|
50
|
-
? `${listing.price} ${listing.currency ?? ""}`.trim()
|
|
51
|
-
: t(LISTINGS_I18N_KEYS.cardPriceAbsent);
|
|
52
98
|
const favoriteGate = useActionGate(favorite.gate);
|
|
99
|
+
const blockedReason = props.blockedReason ?? "text";
|
|
53
100
|
const favoriteLabel = t(favorite.favorited
|
|
54
101
|
? LISTINGS_I18N_KEYS.cardFavoriteRemove
|
|
55
102
|
: LISTINGS_I18N_KEYS.cardFavoriteAdd);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
103
|
+
const title = listing.title ?? "";
|
|
104
|
+
// The anchor's name is the TITLE and nothing else. A card with no title is
|
|
105
|
+
// still a link, and a link announced as nothing is worse than one announced
|
|
106
|
+
// as untitled.
|
|
107
|
+
const targetLabel = title.length > 0 ? title : t(LISTINGS_I18N_KEYS.cardUntitled);
|
|
108
|
+
/**
|
|
109
|
+
* Everything a person reads on the card, in the order a classified reads it:
|
|
110
|
+
* photo, price, title, the seller's own spec line, the badges, the place.
|
|
111
|
+
*
|
|
112
|
+
* The search projection carries `title`, `price`, `currency`,
|
|
113
|
+
* `location_label`, `image` and `published_at` and NO feature badges — so
|
|
114
|
+
* every line below is conditional and the card has to look deliberate with
|
|
115
|
+
* all of them absent. That is why the photo and the price carry the layout:
|
|
116
|
+
* they are the two fields a result always has.
|
|
117
|
+
*/
|
|
118
|
+
const content = (_jsxs(_Fragment, { children: [_jsx(ListingPhoto, { imageRef: listing.images?.[0], alt: title.length > 0 ? title : String(listing.id) }), _jsxs(Flex, { vertical: true, gap: spacing[1], style: { minWidth: 0, padding: token.paddingSM }, children: [props.badge, _jsx(Typography.Text, { strong: true, "data-testid": "listings-card-price", children: _jsx(ListingPrice, { amount: listing.price, ...(listing.currency !== undefined ? { currency: listing.currency } : {}) }) }), _jsx(Typography.Text, { ellipsis: true, "data-testid": "listings-card-title", children: title }), titleDaos.length > 0 ? (_jsx(Typography.Text, { type: "secondary", ellipsis: true, children: _jsx(FeatureBadges, { features: featuresFromDaoList(titleDaos).map((view) => view.feature), values: featuresDtoFromDaoList(titleDaos) }) })) : null, badgeFeatures.length > 0 ? (_jsx(FeatureBadges, { features: badgeFeatures.map((view) => view.feature), values: badgeValues })) : null, listing.location_label !== undefined &&
|
|
119
|
+
listing.location_label.length > 0 ? (_jsx(Typography.Text, { type: "secondary", "data-testid": "listings-card-location", children: listing.location_label })) : null] })] }));
|
|
120
|
+
return (_jsxs(SkinTheme, { surface: "bare", ...(props.mode !== undefined ? { mode: props.mode } : {}), children: [_jsx("style", { href: CARD_TARGET_STYLE_HREF, precedence: "default", children: cardTargetCss() }), _jsxs(Card, { size: "small", "data-testid": "listings-card", "data-listing-id": listing.id, ...(status !== undefined
|
|
121
|
+
? { "data-listing-status": status.status }
|
|
122
|
+
: {}),
|
|
123
|
+
// The body's own padding is zero because the ANCHOR fills the card:
|
|
124
|
+
// padding outside it would be a strip of card that looks pressable and
|
|
125
|
+
// is not. The text block inside the anchor carries the same padding
|
|
126
|
+
// back, from the same token.
|
|
127
|
+
styles: { body: { minWidth: 0, padding: 0 } }, style: { ["--listing-card-focus"]: token.colorPrimary }, children: [_jsx(CardTarget, { ...props, listingId: listing.id, label: targetLabel, children: content }), props.showFavorite === false ? null : (_jsxs("div", { style: {
|
|
128
|
+
paddingInline: token.paddingSM,
|
|
129
|
+
paddingBlockEnd: token.paddingSM,
|
|
130
|
+
}, children: [_jsx(GatedControl, { gate: favorite.gate, testId: "listings-card-actions", style: { width: "100%" }, children: (bind) => (_jsx(Flex, { justify: "flex-end", style: { width: "100%" }, children: _jsx(Button, { disabled: bind.disabled, "data-disabled-reason": "the enclosing <GatedControl> renders the gate's reason beside this button", ...(bind["aria-describedby"] !== undefined
|
|
131
|
+
? { "aria-describedby": bind["aria-describedby"] }
|
|
132
|
+
: {}), "aria-label": favoriteLabel, "aria-pressed": favorite.favorited, "data-testid": "listings-card-favorite", "data-favorited": String(favorite.favorited), "data-analytics": "none", "data-analytics-reason": "business action \u2014 host app wraps with its own tracked()", onClick: favorite.toggle, icon: _jsx(HeartIcon, { filled: favorite.favorited }) }) })) }), favoriteGate.reason === undefined || blockedReason === "line" ? null : (_jsx(Typography.Text, { type: "secondary", "data-testid": "listings-card-favorite-blocked", children: _jsx(SignInLink, { cta: props.signIn, testId: "listings-card-sign-in" }) }))] }))] })] }));
|
|
63
133
|
}
|
|
64
134
|
//# sourceMappingURL=ListingCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListingCard.js","sourceRoot":"","sources":["../../src/default/ListingCard.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ListingCard.js","sourceRoot":"","sources":["../../src/default/ListingCard.tsx"],"names":[],"mappings":";AA4EA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAEjE,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACrG,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AA4DjD,0EAA0E;AAC1E,MAAM,CAAC,MAAM,iBAAiB,GAAG,4BAA4B,CAAC;AAE9D,iEAAiE;AACjE,MAAM,CAAC,MAAM,sBAAsB,GAAG,6BAA6B,CAAC;AAEpE;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO;QACL,IAAI,iBAAi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