@stapel/search-react 0.33.0 → 0.33.1
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 +45 -0
- package/README.md +19 -2
- package/dist/default/PartitionChips.d.ts.map +1 -1
- package/dist/default/PartitionChips.js +83 -2
- package/dist/default/PartitionChips.js.map +1 -1
- package/dist/default/SearchResultsPane.d.ts +5 -5
- package/dist/default/SearchResultsPane.d.ts.map +1 -1
- package/dist/default/SearchResultsPane.js +51 -9
- package/dist/default/SearchResultsPane.js.map +1 -1
- package/llms.txt +1 -1
- package/manifest.json +1 -1
- package/nav-manifest.json +1 -1
- package/package.json +1 -1
- package/src/analytics/generated/events.json +1 -1
- package/src/default/PartitionChips.tsx +86 -1
- package/src/default/SearchResultsPane.tsx +74 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# @stapel/search-react
|
|
2
2
|
|
|
3
|
+
## 0.33.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 182a3b4: search: what pins on a results page is one row of controls, and the partition's arrow keys work more than once (D452, D454)
|
|
8
|
+
|
|
9
|
+
**D452 — the heading is out of the pinned block, and has the column to itself.**
|
|
10
|
+
Measured on the stand: the pinned results block on `/s` was **100px** at 1440
|
|
11
|
+
and **150px** at 1280. Both numbers are one `<h1>` wrapped to two lines. In the
|
|
12
|
+
wide header shape the heading was the leading flex item of the very block that
|
|
13
|
+
pins, the `nowrap` controls row beside it (count, sort, page size, view switch)
|
|
14
|
+
took the width it needed, and the heading was left a **415px** sub-column of a
|
|
15
|
+
1200px measure — so the page pinned a third of a laptop's fold under the header
|
|
16
|
+
while the feed scrolled past it.
|
|
17
|
+
|
|
18
|
+
The heading is now a row of its own at the column's full width
|
|
19
|
+
(`search-results-heading-row`, `inline-size: 100%`), and
|
|
20
|
+
`search-results-toolbar` — the element `stickyToolbar` acts on — is the
|
|
21
|
+
controls' line alone, which is what `header="compact"` already did. Nothing
|
|
22
|
+
about a heading belongs in a pinned bar: it is read once, and its length is the
|
|
23
|
+
HOST's (`resultsHeading` carries a surface's own sentence), so it is the one
|
|
24
|
+
element on the page whose height this pair cannot bound.
|
|
25
|
+
|
|
26
|
+
Visible change for a wide-shape host: the heading and the controls are two rows
|
|
27
|
+
rather than one line, separated by the results column's own gap. `resultsHeading`,
|
|
28
|
+
`resultsHeadingLevel`, `resultsHeadingVisible`, `RESULTS_TOOLBAR_CLASS` and
|
|
29
|
+
`stickyToolbar` are unchanged; a host reaching _into_ the toolbar for the
|
|
30
|
+
heading with a descendant selector must aim at `search-results-heading` instead.
|
|
31
|
+
|
|
32
|
+
**D454 — the segmented partition keeps the focus across the choice it just
|
|
33
|
+
made.** Measured on the stand: the first `ArrowRight` moved the rail from "all"
|
|
34
|
+
to "new" and navigated — correct, the choice IS a `category` in the URL — and
|
|
35
|
+
after the navigation `document.activeElement` was `BODY`. Every further arrow
|
|
36
|
+
press then did nothing, so a keyboard user got exactly one move per Tab into the
|
|
37
|
+
row.
|
|
38
|
+
|
|
39
|
+
Choosing re-renders the surface and, while the new category's children are
|
|
40
|
+
resolved, takes the rail down and puts a new one up: new `input`s, a new antd
|
|
41
|
+
`useId()` name, and the focus left on `<body>`. `<PartitionChips>` now restores
|
|
42
|
+
it to the chosen cell after an arrow press — in both variants, on a re-render
|
|
43
|
+
and across a remount — and only after an arrow press, so a page that was loaded,
|
|
44
|
+
clicked or scrolled is never grabbed. Within one mount it also brings the focus
|
|
45
|
+
and the selection back together, which is what makes the control's own focus
|
|
46
|
+
ring (painted on the checked cell) agree with where the keyboard actually is.
|
|
47
|
+
|
|
3
48
|
## 0.33.0
|
|
4
49
|
|
|
5
50
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -497,14 +497,24 @@ header shapes it drew and a sheet has to guess:
|
|
|
497
497
|
|
|
498
498
|
| Header shape | What the class `stapel-search-results-toolbar` / `data-testid="search-results-toolbar"` is on | What pins |
|
|
499
499
|
|---|---|---|
|
|
500
|
-
| `"banner"` (wide) | the
|
|
500
|
+
| `"banner"` (wide) | the controls' line — count at one end, the `toolbar` slot at the other | the row; the heading is a sibling ahead of it, in its own full-width row |
|
|
501
501
|
| `"compact"` (phone) | the toolbar row alone | the row — one line, the height of one phone control |
|
|
502
502
|
|
|
503
|
+
In BOTH shapes the pin acts on the controls' line and never on the heading
|
|
504
|
+
(D452). It used to be the wide header BLOCK, heading included, and an `<h1>`
|
|
505
|
+
squeezed into a 415px flex item beside a `nowrap` controls row wrapped to two
|
|
506
|
+
lines: the pinned block measured 100px at 1440 and 150px at 1280 on a live
|
|
507
|
+
storefront. The wide heading now takes a row of its own
|
|
508
|
+
(`data-testid="search-results-heading-row"`, `inline-size: 100%`) so it has the
|
|
509
|
+
column's full measure to set its line in, and what stands under the header
|
|
510
|
+
while the feed scrolls is one row of controls.
|
|
511
|
+
|
|
503
512
|
The compact stack draws no box of its own (`display: contents`), so its three
|
|
504
513
|
rows are items of the results COLUMN: `position: sticky` travels inside its
|
|
505
514
|
parent, and a toolbar nested in a ~112px stack can move 112px and no further.
|
|
506
515
|
The one visible consequence is that the gap between heading, toolbar and count
|
|
507
|
-
is the column's rather than the stack's
|
|
516
|
+
is the column's rather than the stack's — and the wide shape now takes the same
|
|
517
|
+
gap between its heading row and its toolbar.
|
|
508
518
|
|
|
509
519
|
Two things the pin does NOT do, both deliberate:
|
|
510
520
|
|
|
@@ -598,6 +608,13 @@ come with them. The contract does not vary with the variant, and the per-cell
|
|
|
598
608
|
test ids (`partition-chip-<path>`, `partition-chip-all`, each with
|
|
599
609
|
`data-checked`) are the same in both.
|
|
600
610
|
|
|
611
|
+
An arrow press leaves the focus on the CHOSEN cell — including when choosing
|
|
612
|
+
tore the row down and built it again, which is what a `category` change does to
|
|
613
|
+
it on a real storefront. Without that, the live rail moved once and dropped the
|
|
614
|
+
focus to `<body>`, so a keyboard user got one move per Tab (D454). The row takes
|
|
615
|
+
the focus back only after an arrow press of its own, so a page that was loaded,
|
|
616
|
+
clicked or scrolled is never grabbed.
|
|
617
|
+
|
|
601
618
|
```tsx
|
|
602
619
|
<PartitionChips items={children} value={state.category ?? null}
|
|
603
620
|
variant={isPhone ? "chips" : "segmented"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PartitionChips.d.ts","sourceRoot":"","sources":["../../src/default/PartitionChips.tsx"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAGV,YAAY,EACZ,SAAS,EACV,MAAM,OAAO,CAAC;AAMf;;oDAEoD;AACpD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;IAC1C;iFAC6E;IAC7E,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACjD,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAC9B,uEAAuE;IACvE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;CAC1C;
|
|
1
|
+
{"version":3,"file":"PartitionChips.d.ts","sourceRoot":"","sources":["../../src/default/PartitionChips.tsx"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAGV,YAAY,EACZ,SAAS,EACV,MAAM,OAAO,CAAC;AAMf;;oDAEoD;AACpD,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,8DAA8D;IAC9D,QAAQ,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAC;IAC1C;iFAC6E;IAC7E,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACjD,kEAAkE;IAClE,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAC9B,uEAAuE;IACvE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;CAC1C;AAuED,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,YAAY,CAkKvE"}
|
|
@@ -49,7 +49,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
49
49
|
* they were, plus `data-checked`, so a probe that reads a snapshot still has
|
|
50
50
|
* the chosen cell without asking the accessibility tree.
|
|
51
51
|
*/
|
|
52
|
-
import { useRef } from "react";
|
|
52
|
+
import { useEffect, useRef } from "react";
|
|
53
53
|
import { Button, Segmented } from "antd";
|
|
54
54
|
import { useT } from "@stapel/core";
|
|
55
55
|
import { radii, spacing } from "@stapel/tokens";
|
|
@@ -67,6 +67,44 @@ const ROW = {
|
|
|
67
67
|
flexWrap: "wrap",
|
|
68
68
|
gap: spacing[2],
|
|
69
69
|
};
|
|
70
|
+
/** The keys that move the choice, in both variants. */
|
|
71
|
+
const ARROW_KEYS = new Set(["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"]);
|
|
72
|
+
/**
|
|
73
|
+
* D454 — WHEN AN ARROW KEY LAST MOVED A PARTITION, AS A TIMESTAMP.
|
|
74
|
+
*
|
|
75
|
+
* Module-scoped, and that is the load-bearing part rather than an oversight.
|
|
76
|
+
*
|
|
77
|
+
* Measured on the stand: the first `ArrowRight` moved "all" -> "new" AND
|
|
78
|
+
* navigated to `/c/novye` — which is what the control is FOR, the choice is a
|
|
79
|
+
* `category` in the URL — and after that navigation `document.activeElement`
|
|
80
|
+
* was `BODY`, so every further arrow press did nothing. The row is not the
|
|
81
|
+
* same row afterwards: the storefront resolves the new category's children,
|
|
82
|
+
* the rail unmounts while that is in flight and mounts again with fresh
|
|
83
|
+
* `items`, and antd's `Segmented` takes a new `useId()` name and renders new
|
|
84
|
+
* `input`s. A ref, a piece of state, a `useEffect` cleanup — everything that
|
|
85
|
+
* lives INSIDE the component instance dies with it, so the one fact that has
|
|
86
|
+
* to cross the remount cannot be kept there.
|
|
87
|
+
*
|
|
88
|
+
* The window is short and the flag is spent on use ({@link takeArrowMove}), so
|
|
89
|
+
* this can restore focus exactly once per keypress and never steals it from a
|
|
90
|
+
* page nobody was driving from the keyboard.
|
|
91
|
+
*/
|
|
92
|
+
let lastArrowMove = 0;
|
|
93
|
+
/** How long after an arrow press the row will still take its focus back. Long
|
|
94
|
+
* enough for a navigation and a refetch, short enough that a page left alone
|
|
95
|
+
* and returned to later is never grabbed. */
|
|
96
|
+
const FOCUS_RESTORE_WINDOW_MS = 2000;
|
|
97
|
+
function noteArrowMove(key) {
|
|
98
|
+
if (ARROW_KEYS.has(key))
|
|
99
|
+
lastArrowMove = Date.now();
|
|
100
|
+
}
|
|
101
|
+
/** True once, for the row that acts on it. */
|
|
102
|
+
function takeArrowMove() {
|
|
103
|
+
const fresh = lastArrowMove !== 0 && Date.now() - lastArrowMove < FOCUS_RESTORE_WINDOW_MS;
|
|
104
|
+
if (fresh)
|
|
105
|
+
lastArrowMove = 0;
|
|
106
|
+
return fresh;
|
|
107
|
+
}
|
|
70
108
|
/** The row's cells, as `[value, label]` — the parent first, then the
|
|
71
109
|
* children in catalogue order. */
|
|
72
110
|
function cells(items, allLabel) {
|
|
@@ -101,6 +139,7 @@ export function PartitionChips(props) {
|
|
|
101
139
|
const cell = options[next];
|
|
102
140
|
if (cell === undefined)
|
|
103
141
|
return;
|
|
142
|
+
noteArrowMove(event.key);
|
|
104
143
|
props.onChange(cell[0]);
|
|
105
144
|
const buttons = row.current?.querySelectorAll('[role="radio"]');
|
|
106
145
|
buttons?.[next]?.focus();
|
|
@@ -110,6 +149,40 @@ export function PartitionChips(props) {
|
|
|
110
149
|
// parent chip rather than vanishing.
|
|
111
150
|
const active = options.findIndex(([value]) => value === props.value);
|
|
112
151
|
const stop = active >= 0 ? active : 0;
|
|
152
|
+
/**
|
|
153
|
+
* D454 — after an arrow press, the CHOSEN cell holds the focus.
|
|
154
|
+
*
|
|
155
|
+
* Two different things are repaired by one effect, and the second is the one
|
|
156
|
+
* the stand measured:
|
|
157
|
+
*
|
|
158
|
+
* - within one mount, `Segmented`'s own handler moves the VALUE and leaves
|
|
159
|
+
* the focus on the cell it started from, so the focused radio and the
|
|
160
|
+
* checked radio disagree — and the control paints its focus ring on the
|
|
161
|
+
* checked one, which is not where the keyboard is;
|
|
162
|
+
* - across a REMOUNT — the choice is a `category`, so choosing navigates,
|
|
163
|
+
* and the rail comes back as new elements — the focus is on `<body>` and
|
|
164
|
+
* the row is unreachable by every further arrow press without a Tab.
|
|
165
|
+
*
|
|
166
|
+
* Keyed on `props.value` and on mount, gated by {@link takeArrowMove}, so a
|
|
167
|
+
* page loaded, clicked, or scrolled is never grabbed: only the row whose
|
|
168
|
+
* arrow key started this takes the focus, and it takes it once.
|
|
169
|
+
*/
|
|
170
|
+
useEffect(() => {
|
|
171
|
+
const root = row.current;
|
|
172
|
+
if (root === null)
|
|
173
|
+
return;
|
|
174
|
+
if (!takeArrowMove())
|
|
175
|
+
return;
|
|
176
|
+
const focused = document.activeElement;
|
|
177
|
+
// Somewhere else on purpose — a dialog, a field the person tabbed into
|
|
178
|
+
// while the answer was in flight — is not ours to overrule. `<body>` is
|
|
179
|
+
// what a remount leaves behind, and inside the row is the intra-mount case
|
|
180
|
+
// where focus and selection have to be brought back together.
|
|
181
|
+
if (focused !== null && focused !== document.body && !root.contains(focused))
|
|
182
|
+
return;
|
|
183
|
+
const cells_ = root.querySelectorAll('input[type="radio"], [role="radio"]');
|
|
184
|
+
cells_[stop]?.focus();
|
|
185
|
+
}, [props.value, stop]);
|
|
113
186
|
const name = props.label ?? t(SEARCH_I18N_KEYS.partitionLabel);
|
|
114
187
|
if (props.variant === "segmented") {
|
|
115
188
|
// antd's own control: `.ant-segmented`, one `input[type=radio]` per cell
|
|
@@ -118,7 +191,15 @@ export function PartitionChips(props) {
|
|
|
118
191
|
// `aria-label` reach the root because the component spreads what it is
|
|
119
192
|
// given over its own defaults (which are `radiogroup` and the string
|
|
120
193
|
// "segmented control").
|
|
121
|
-
return (_jsx(Segmented, { block: true, size: "small", role: "radiogroup", "aria-label": name, "data-variant": "segmented", "data-testid": "partition-chips",
|
|
194
|
+
return (_jsx(Segmented, { block: true, size: "small", ref: row, role: "radiogroup", "aria-label": name, "data-variant": "segmented", "data-testid": "partition-chips",
|
|
195
|
+
/* The keypress is noted where it HAPPENS, before antd's own handler
|
|
196
|
+
turns it into a value change and the host turns that into a
|
|
197
|
+
navigation. Capture, because the cell's `input` is where the event
|
|
198
|
+
lands and the row is only its ancestor — and note only, so the
|
|
199
|
+
control's own arrow handling is untouched. */
|
|
200
|
+
onKeyDownCapture: (event) => {
|
|
201
|
+
noteArrowMove(event.key);
|
|
202
|
+
}, value: props.value ?? ALL, options: options.map(([value, label]) => ({
|
|
122
203
|
value: value ?? ALL,
|
|
123
204
|
label: (
|
|
124
205
|
// The cell's test id and its chosen state, on the one node inside
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PartitionChips.js","sourceRoot":"","sources":["../../src/default/PartitionChips.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAC,IAAI,KAAK,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;YACrD,CAAC,GACD,CACH,CAAC;IACJ,CAAC;IAED,OAAO,CACL,cACE,KAAK,EAAE,GAAG,kBACG,OAAO,EACpB,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,YAAY,gBACL,IAAI,iBACJ,iBAAiB,YAE5B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE;YACrC,MAAM,QAAQ,GAAG,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC;YACvC,OAAO,CACL,KAAC,MAAM,IAEL,IAAI,EAAC,OAAO,EACZ,KAAK,EAAC,OAAO,EACb,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EACtC,IAAI,EAAC,OAAO,kBACE,QAAQ;gBACtB,+DAA+D;gBAC/D,0CAA0C;gBAC1C,QAAQ,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACjC,KAAK,EAAE,IAAI,iBACE,kBAAkB,KAAK,IAAI,KAAK,EAAE,oBAChC,MAAM,2BACC,+CAA+C,EACrE,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC,EAC3B,OAAO,EAAE,GAAG,EAAE;oBACZ,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;gBACxB,CAAC,YAEA,KAAK,IAlBD,KAAK,IAAI,GAAG,CAmBV,CACV,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -88,11 +88,11 @@ export declare const RESULTS_MAX_WIDTH = 1400;
|
|
|
88
88
|
* pane's own breakpoint restated in a media query — three rules aimed at a
|
|
89
89
|
* shape the pane could change under them at any release.
|
|
90
90
|
*
|
|
91
|
-
* It is the same class in BOTH header shapes, and in both it names
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
91
|
+
* It is the same class in BOTH header shapes, and in both it names THE SAME
|
|
92
|
+
* THING: the controls' own line, and never the heading beside it (D452). The
|
|
93
|
+
* compact shape always drew it that way; the wide shape did not, and pinning a
|
|
94
|
+
* block that carried the `<h1>` pinned 100px of chrome at 1440 and 150px at
|
|
95
|
+
* 1280 — see `WIDE_HEADING_ROW`.
|
|
96
96
|
*/
|
|
97
97
|
export declare const RESULTS_TOOLBAR_CLASS = "stapel-search-results-toolbar";
|
|
98
98
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResultsPane.d.ts","sourceRoot":"","sources":["../../src/default/SearchResultsPane.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,EAAiB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAYpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAQlD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE,OAAO,KAAK,EACV,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAClC,KAAK,EAAE,SAAS,UAAU,EAAE,KACzB,SAAS,CAAC;AAEf;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,oBAAoB,GAAG,CACjC,KAAK,EAAE,SAAS,UAAU,EAAE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|
40
40
|
* pane's own breakpoint restated in a media query — three rules aimed at a
|
|
41
41
|
* shape the pane could change under them at any release.
|
|
42
42
|
*
|
|
43
|
-
* It is the same class in BOTH header shapes, and in both it names
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
43
|
+
* It is the same class in BOTH header shapes, and in both it names THE SAME
|
|
44
|
+
* THING: the controls' own line, and never the heading beside it (D452). The
|
|
45
|
+
* compact shape always drew it that way; the wide shape did not, and pinning a
|
|
46
|
+
* block that carried the `<h1>` pinned 100px of chrome at 1440 and 150px at
|
|
47
|
+
* 1280 — see `WIDE_HEADING_ROW`.
|
|
48
48
|
*/
|
|
49
49
|
export const RESULTS_TOOLBAR_CLASS = "stapel-search-results-toolbar";
|
|
50
50
|
/**
|
|
@@ -79,6 +79,46 @@ const TOOLBAR_ROW = {
|
|
|
79
79
|
* becomes the column's rather than the stack's.
|
|
80
80
|
*/
|
|
81
81
|
const COMPACT_STACK = { display: "contents" };
|
|
82
|
+
/**
|
|
83
|
+
* The WIDE shape's heading row — a row of its own, at the results column's
|
|
84
|
+
* full measure (D452).
|
|
85
|
+
*
|
|
86
|
+
* The heading used to be the leading flex item of the block that pins, with
|
|
87
|
+
* the controls as the trailing one. Two things followed, and both were
|
|
88
|
+
* measured on the stand:
|
|
89
|
+
*
|
|
90
|
+
* - the controls row is `nowrap` and holds a count, a sort select, a page
|
|
91
|
+
* size and a view switch, so it took whatever width it needed and left the
|
|
92
|
+
* heading **415px** of a 1200px column. An `<h1>` at 42px (50 at 1280) then
|
|
93
|
+
* wrapped to TWO LINES;
|
|
94
|
+
* - those two lines were inside the pinned box, so what stood under the
|
|
95
|
+
* header while the feed scrolled was **100px** of chrome at 1440 and
|
|
96
|
+
* **150px** at 1280 — a third of the fold on a laptop.
|
|
97
|
+
*
|
|
98
|
+
* Nothing about the heading belongs in a pinned bar: it names the page once,
|
|
99
|
+
* it is read once, and it is the one element on the page whose length the pair
|
|
100
|
+
* does not control (`resultsHeading` is the host's sentence — "Buy a
|
|
101
|
+
* Samsung Galaxy S23 in Kazan"). So it takes its own line at the full width,
|
|
102
|
+
* where it has room not to wrap, and the pin acts on the controls alone —
|
|
103
|
+
* which is what `header="compact"` already did.
|
|
104
|
+
*
|
|
105
|
+
* `100%` is DECLARED rather than left to the column's `align-items: stretch`:
|
|
106
|
+
* the row is what a host reads to know the heading is not in the pinned box,
|
|
107
|
+
* and a width that only happens to be full is not a contract.
|
|
108
|
+
*/
|
|
109
|
+
const WIDE_HEADING_ROW = { inlineSize: "100%", minInlineSize: 0 };
|
|
110
|
+
/** The wide heading itself: no margin of its own — the column's gap is the
|
|
111
|
+
* rhythm — and free to shrink inside its row rather than forcing it wider. */
|
|
112
|
+
const WIDE_HEADING = { margin: 0, minInlineSize: 0 };
|
|
113
|
+
/**
|
|
114
|
+
* The wide row's trailing group — the surface's controls.
|
|
115
|
+
*
|
|
116
|
+
* `flex: 0 0 auto`: the count on the leading end is the elastic half (it is
|
|
117
|
+
* one short string and it arrives late), and the controls keep every pixel
|
|
118
|
+
* they need. Both ends shrinking is how a sort select ends up narrower than
|
|
119
|
+
* its own longest option.
|
|
120
|
+
*/
|
|
121
|
+
const TOOLBAR_END = { flex: "0 0 auto" };
|
|
82
122
|
/** The compact shape's toolbar box — the row the pin acts on. */
|
|
83
123
|
const COMPACT_TOOLBAR = {
|
|
84
124
|
display: "flex",
|
|
@@ -283,10 +323,12 @@ export function SearchResultsPane(props) {
|
|
|
283
323
|
items of the results COLUMN, so the toolbar between them has a
|
|
284
324
|
parent as tall as the feed to travel in. */
|
|
285
325
|
_jsxs(Flex, { vertical: true, gap: spacing[2], style: COMPACT_STACK, "data-testid": "search-results-header-compact", children: [_jsx(Typography.Title, { level: props.headingLevel ?? 4, style: compactHeadingSeen ? { margin: 0 } : visuallyHidden, "data-testid": "search-results-heading", "data-heading": compactHeadingSeen ? "seen" : "hidden", children: props.heading ?? t(SEARCH_I18N_KEYS.resultsTitle) }), _jsx("div", { className: RESULTS_TOOLBAR_CLASS, "data-testid": "search-results-toolbar", style: { ...COMPACT_TOOLBAR, ...toolbarPin }, children: props.toolbar }), _jsx(Count, { bag: bag })] })) : (
|
|
286
|
-
/*
|
|
287
|
-
|
|
288
|
-
direct
|
|
289
|
-
|
|
326
|
+
/* D452 — the heading is its OWN row, at the column's full width,
|
|
327
|
+
and the row that pins is the controls. See `WIDE_HEADING_ROW`.
|
|
328
|
+
Both are direct children of the results column: the toolbar
|
|
329
|
+
has a parent as tall as the feed to travel in, and the heading
|
|
330
|
+
has the whole measure to set its line in. */
|
|
331
|
+
_jsxs(_Fragment, { children: [_jsx("div", { style: WIDE_HEADING_ROW, "data-testid": "search-results-heading-row", children: _jsx(Typography.Title, { level: props.headingLevel ?? 4, style: WIDE_HEADING, "data-testid": "search-results-heading", children: props.heading ?? t(SEARCH_I18N_KEYS.resultsTitle) }) }), _jsxs(Flex, { justify: "space-between", align: "center", gap: spacing[3], className: RESULTS_TOOLBAR_CLASS, "data-testid": "search-results-toolbar", style: { ...TOOLBAR_ROW, ...toolbarPin }, children: [_jsx(Count, { bag: bag }), _jsx(Flex, { align: "center", gap: spacing[3], style: TOOLBAR_END, children: props.toolbar })] })] })), _jsx(DegradationNotice, { degradations: bag.degradations, variant: props.degradationNotice ?? "banner", scorerName: scorerName }), props.otherCategories === true && (_jsx(OtherCategoriesLine, { ...(props.enabled !== undefined ? { enabled: props.enabled } : {}), ...(props.categoryName !== undefined
|
|
290
332
|
? { categoryName: props.categoryName }
|
|
291
333
|
: {}), ...(props.categoryHref !== undefined
|
|
292
334
|
? { categoryHref: props.categoryHref }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchResultsPane.js","sourceRoot":"","sources":["../../src/default/SearchResultsPane.tsx"],"names":[],"mappings":";AA2BA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,MAA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AQ;4CAC/B,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC;4CACvB,CAAC,CAAC,YAAY;qCACnB;oCACH,CAAC,CAAC,EAAE,CAAC,aAEN,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,CACtB,gBACE,IAAI,EAAE,0BAA0B,EAChC,UAAU,EAAC,SAAS,YAEnB,WAAW,GACN,CACT,CAAC,CAAC,CAAC,IAAI,EACP,KAAK,CAAC,GAAG,CAAC,CAAC,IAAgB,EAAE,EAAE,CAAC,CAC/B,wBACG,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,CAC1B,UAAU,CAAC,IAAI,CAAC,CACjB,CAAC,CAAC,CAAC,CACF,KAAC,gBAAgB,IAAC,IAAI,EAAE,IAAI,GAAI,CACjC,IALO,IAAI,CAAC,GAAG,CAMZ,CACP,CAAC,IACE,CACP,CAAC;4BACJ,OAAO,CACL,6BAAiB,gBAAgB,YAC9B,WAAW,KAAK,SAAS;oCACxB,CAAC,CAAC,WAAW,CAAC,KAAK,EAAE,WAAW,CAAC;oCACjC,CAAC,CAAC,WAAW,GACX,CACP,CAAC;wBACJ,CAAC,GACQ,EAEX,KAAC,KAAK,IAAC,GAAG,EAAE,GAAG,GAAI,EAClB,KAAK,CAAC,MAAM,IACR,CACR,GACa,GACN,CACb,CAAC;AACJ,CAAC"}
|
package/llms.txt
CHANGED
package/manifest.json
CHANGED
package/nav-manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stapel/search-react",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.1",
|
|
4
4
|
"description": "Headless React pair for stapel-search: a typed query client, TanStack Query hooks, and a URL-first state codec that makes a search shareable by construction (filters, ranges, geo, sort and the keyset cursor all live in the query string). Drill-down facets rendered with their remaining counts and with the server's own honesty flags — approximate, skipped, degraded — never swallowed; keyset pagination with the window refusal named; DSA Art. 26 `promoted` marking carried into every card slot and the P2B Art. 5 ranking disclosure exposed as data. Zero visual opinion in the main entry; an opt-in /default subpath ships the antd skin, and /router binds the codec to react-router's useSearchParams.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
* they were, plus `data-checked`, so a probe that reads a snapshot still has
|
|
49
49
|
* the chosen cell without asking the accessibility tree.
|
|
50
50
|
*/
|
|
51
|
-
import { useRef } from "react";
|
|
51
|
+
import { useEffect, useRef } from "react";
|
|
52
52
|
import type {
|
|
53
53
|
CSSProperties,
|
|
54
54
|
KeyboardEvent as ReactKeyboardEvent,
|
|
@@ -111,6 +111,47 @@ const ROW: CSSProperties = {
|
|
|
111
111
|
gap: spacing[2],
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
+
/** The keys that move the choice, in both variants. */
|
|
115
|
+
const ARROW_KEYS = new Set(["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"]);
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* D454 — WHEN AN ARROW KEY LAST MOVED A PARTITION, AS A TIMESTAMP.
|
|
119
|
+
*
|
|
120
|
+
* Module-scoped, and that is the load-bearing part rather than an oversight.
|
|
121
|
+
*
|
|
122
|
+
* Measured on the stand: the first `ArrowRight` moved "all" -> "new" AND
|
|
123
|
+
* navigated to `/c/novye` — which is what the control is FOR, the choice is a
|
|
124
|
+
* `category` in the URL — and after that navigation `document.activeElement`
|
|
125
|
+
* was `BODY`, so every further arrow press did nothing. The row is not the
|
|
126
|
+
* same row afterwards: the storefront resolves the new category's children,
|
|
127
|
+
* the rail unmounts while that is in flight and mounts again with fresh
|
|
128
|
+
* `items`, and antd's `Segmented` takes a new `useId()` name and renders new
|
|
129
|
+
* `input`s. A ref, a piece of state, a `useEffect` cleanup — everything that
|
|
130
|
+
* lives INSIDE the component instance dies with it, so the one fact that has
|
|
131
|
+
* to cross the remount cannot be kept there.
|
|
132
|
+
*
|
|
133
|
+
* The window is short and the flag is spent on use ({@link takeArrowMove}), so
|
|
134
|
+
* this can restore focus exactly once per keypress and never steals it from a
|
|
135
|
+
* page nobody was driving from the keyboard.
|
|
136
|
+
*/
|
|
137
|
+
let lastArrowMove = 0;
|
|
138
|
+
|
|
139
|
+
/** How long after an arrow press the row will still take its focus back. Long
|
|
140
|
+
* enough for a navigation and a refetch, short enough that a page left alone
|
|
141
|
+
* and returned to later is never grabbed. */
|
|
142
|
+
const FOCUS_RESTORE_WINDOW_MS = 2000;
|
|
143
|
+
|
|
144
|
+
function noteArrowMove(key: string): void {
|
|
145
|
+
if (ARROW_KEYS.has(key)) lastArrowMove = Date.now();
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** True once, for the row that acts on it. */
|
|
149
|
+
function takeArrowMove(): boolean {
|
|
150
|
+
const fresh = lastArrowMove !== 0 && Date.now() - lastArrowMove < FOCUS_RESTORE_WINDOW_MS;
|
|
151
|
+
if (fresh) lastArrowMove = 0;
|
|
152
|
+
return fresh;
|
|
153
|
+
}
|
|
154
|
+
|
|
114
155
|
/** The row's cells, as `[value, label]` — the parent first, then the
|
|
115
156
|
* children in catalogue order. */
|
|
116
157
|
function cells(
|
|
@@ -154,6 +195,7 @@ export function PartitionChips(props: PartitionChipsProps): ReactElement {
|
|
|
154
195
|
const next = (index + step + options.length) % options.length;
|
|
155
196
|
const cell = options[next];
|
|
156
197
|
if (cell === undefined) return;
|
|
198
|
+
noteArrowMove(event.key);
|
|
157
199
|
props.onChange(cell[0]);
|
|
158
200
|
const buttons = row.current?.querySelectorAll<HTMLElement>('[role="radio"]');
|
|
159
201
|
buttons?.[next]?.focus();
|
|
@@ -165,6 +207,40 @@ export function PartitionChips(props: PartitionChipsProps): ReactElement {
|
|
|
165
207
|
const active = options.findIndex(([value]) => value === props.value);
|
|
166
208
|
const stop = active >= 0 ? active : 0;
|
|
167
209
|
|
|
210
|
+
/**
|
|
211
|
+
* D454 — after an arrow press, the CHOSEN cell holds the focus.
|
|
212
|
+
*
|
|
213
|
+
* Two different things are repaired by one effect, and the second is the one
|
|
214
|
+
* the stand measured:
|
|
215
|
+
*
|
|
216
|
+
* - within one mount, `Segmented`'s own handler moves the VALUE and leaves
|
|
217
|
+
* the focus on the cell it started from, so the focused radio and the
|
|
218
|
+
* checked radio disagree — and the control paints its focus ring on the
|
|
219
|
+
* checked one, which is not where the keyboard is;
|
|
220
|
+
* - across a REMOUNT — the choice is a `category`, so choosing navigates,
|
|
221
|
+
* and the rail comes back as new elements — the focus is on `<body>` and
|
|
222
|
+
* the row is unreachable by every further arrow press without a Tab.
|
|
223
|
+
*
|
|
224
|
+
* Keyed on `props.value` and on mount, gated by {@link takeArrowMove}, so a
|
|
225
|
+
* page loaded, clicked, or scrolled is never grabbed: only the row whose
|
|
226
|
+
* arrow key started this takes the focus, and it takes it once.
|
|
227
|
+
*/
|
|
228
|
+
useEffect(() => {
|
|
229
|
+
const root = row.current;
|
|
230
|
+
if (root === null) return;
|
|
231
|
+
if (!takeArrowMove()) return;
|
|
232
|
+
const focused = document.activeElement;
|
|
233
|
+
// Somewhere else on purpose — a dialog, a field the person tabbed into
|
|
234
|
+
// while the answer was in flight — is not ours to overrule. `<body>` is
|
|
235
|
+
// what a remount leaves behind, and inside the row is the intra-mount case
|
|
236
|
+
// where focus and selection have to be brought back together.
|
|
237
|
+
if (focused !== null && focused !== document.body && !root.contains(focused)) return;
|
|
238
|
+
const cells_ = root.querySelectorAll<HTMLElement>(
|
|
239
|
+
'input[type="radio"], [role="radio"]'
|
|
240
|
+
);
|
|
241
|
+
cells_[stop]?.focus();
|
|
242
|
+
}, [props.value, stop]);
|
|
243
|
+
|
|
168
244
|
const name = props.label ?? t(SEARCH_I18N_KEYS.partitionLabel);
|
|
169
245
|
|
|
170
246
|
if (props.variant === "segmented") {
|
|
@@ -178,10 +254,19 @@ export function PartitionChips(props: PartitionChipsProps): ReactElement {
|
|
|
178
254
|
<Segmented
|
|
179
255
|
block
|
|
180
256
|
size="small"
|
|
257
|
+
ref={row}
|
|
181
258
|
role="radiogroup"
|
|
182
259
|
aria-label={name}
|
|
183
260
|
data-variant="segmented"
|
|
184
261
|
data-testid="partition-chips"
|
|
262
|
+
/* The keypress is noted where it HAPPENS, before antd's own handler
|
|
263
|
+
turns it into a value change and the host turns that into a
|
|
264
|
+
navigation. Capture, because the cell's `input` is where the event
|
|
265
|
+
lands and the row is only its ancestor — and note only, so the
|
|
266
|
+
control's own arrow handling is untouched. */
|
|
267
|
+
onKeyDownCapture={(event) => {
|
|
268
|
+
noteArrowMove(event.key);
|
|
269
|
+
}}
|
|
185
270
|
value={props.value ?? ALL}
|
|
186
271
|
options={options.map(([value, label]) => ({
|
|
187
272
|
value: value ?? ALL,
|
|
@@ -120,11 +120,11 @@ export const RESULTS_MAX_WIDTH = 1400;
|
|
|
120
120
|
* pane's own breakpoint restated in a media query — three rules aimed at a
|
|
121
121
|
* shape the pane could change under them at any release.
|
|
122
122
|
*
|
|
123
|
-
* It is the same class in BOTH header shapes, and in both it names
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
123
|
+
* It is the same class in BOTH header shapes, and in both it names THE SAME
|
|
124
|
+
* THING: the controls' own line, and never the heading beside it (D452). The
|
|
125
|
+
* compact shape always drew it that way; the wide shape did not, and pinning a
|
|
126
|
+
* block that carried the `<h1>` pinned 100px of chrome at 1440 and 150px at
|
|
127
|
+
* 1280 — see `WIDE_HEADING_ROW`.
|
|
128
128
|
*/
|
|
129
129
|
export const RESULTS_TOOLBAR_CLASS = "stapel-search-results-toolbar";
|
|
130
130
|
|
|
@@ -173,6 +173,49 @@ const TOOLBAR_ROW: CSSProperties = {
|
|
|
173
173
|
*/
|
|
174
174
|
const COMPACT_STACK: CSSProperties = { display: "contents" };
|
|
175
175
|
|
|
176
|
+
/**
|
|
177
|
+
* The WIDE shape's heading row — a row of its own, at the results column's
|
|
178
|
+
* full measure (D452).
|
|
179
|
+
*
|
|
180
|
+
* The heading used to be the leading flex item of the block that pins, with
|
|
181
|
+
* the controls as the trailing one. Two things followed, and both were
|
|
182
|
+
* measured on the stand:
|
|
183
|
+
*
|
|
184
|
+
* - the controls row is `nowrap` and holds a count, a sort select, a page
|
|
185
|
+
* size and a view switch, so it took whatever width it needed and left the
|
|
186
|
+
* heading **415px** of a 1200px column. An `<h1>` at 42px (50 at 1280) then
|
|
187
|
+
* wrapped to TWO LINES;
|
|
188
|
+
* - those two lines were inside the pinned box, so what stood under the
|
|
189
|
+
* header while the feed scrolled was **100px** of chrome at 1440 and
|
|
190
|
+
* **150px** at 1280 — a third of the fold on a laptop.
|
|
191
|
+
*
|
|
192
|
+
* Nothing about the heading belongs in a pinned bar: it names the page once,
|
|
193
|
+
* it is read once, and it is the one element on the page whose length the pair
|
|
194
|
+
* does not control (`resultsHeading` is the host's sentence — "Buy a
|
|
195
|
+
* Samsung Galaxy S23 in Kazan"). So it takes its own line at the full width,
|
|
196
|
+
* where it has room not to wrap, and the pin acts on the controls alone —
|
|
197
|
+
* which is what `header="compact"` already did.
|
|
198
|
+
*
|
|
199
|
+
* `100%` is DECLARED rather than left to the column's `align-items: stretch`:
|
|
200
|
+
* the row is what a host reads to know the heading is not in the pinned box,
|
|
201
|
+
* and a width that only happens to be full is not a contract.
|
|
202
|
+
*/
|
|
203
|
+
const WIDE_HEADING_ROW: CSSProperties = { inlineSize: "100%", minInlineSize: 0 };
|
|
204
|
+
|
|
205
|
+
/** The wide heading itself: no margin of its own — the column's gap is the
|
|
206
|
+
* rhythm — and free to shrink inside its row rather than forcing it wider. */
|
|
207
|
+
const WIDE_HEADING: CSSProperties = { margin: 0, minInlineSize: 0 };
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* The wide row's trailing group — the surface's controls.
|
|
211
|
+
*
|
|
212
|
+
* `flex: 0 0 auto`: the count on the leading end is the elastic half (it is
|
|
213
|
+
* one short string and it arrives late), and the controls keep every pixel
|
|
214
|
+
* they need. Both ends shrinking is how a sort select ends up narrower than
|
|
215
|
+
* its own longest option.
|
|
216
|
+
*/
|
|
217
|
+
const TOOLBAR_END: CSSProperties = { flex: "0 0 auto" };
|
|
218
|
+
|
|
176
219
|
/** The compact shape's toolbar box — the row the pin acts on. */
|
|
177
220
|
const COMPACT_TOOLBAR: CSSProperties = {
|
|
178
221
|
display: "flex",
|
|
@@ -692,29 +735,35 @@ export function SearchResultsPane(props: SearchResultsPaneProps): ReactElement {
|
|
|
692
735
|
<Count bag={bag} />
|
|
693
736
|
</Flex>
|
|
694
737
|
) : (
|
|
695
|
-
/*
|
|
696
|
-
|
|
697
|
-
direct
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
738
|
+
/* D452 — the heading is its OWN row, at the column's full width,
|
|
739
|
+
and the row that pins is the controls. See `WIDE_HEADING_ROW`.
|
|
740
|
+
Both are direct children of the results column: the toolbar
|
|
741
|
+
has a parent as tall as the feed to travel in, and the heading
|
|
742
|
+
has the whole measure to set its line in. */
|
|
743
|
+
<>
|
|
744
|
+
<div style={WIDE_HEADING_ROW} data-testid="search-results-heading-row">
|
|
745
|
+
<Typography.Title
|
|
746
|
+
level={props.headingLevel ?? 4}
|
|
747
|
+
style={WIDE_HEADING}
|
|
748
|
+
data-testid="search-results-heading"
|
|
749
|
+
>
|
|
750
|
+
{props.heading ?? t(SEARCH_I18N_KEYS.resultsTitle)}
|
|
751
|
+
</Typography.Title>
|
|
752
|
+
</div>
|
|
753
|
+
<Flex
|
|
754
|
+
justify="space-between"
|
|
755
|
+
align="center"
|
|
756
|
+
gap={spacing[3]}
|
|
757
|
+
className={RESULTS_TOOLBAR_CLASS}
|
|
758
|
+
data-testid="search-results-toolbar"
|
|
759
|
+
style={{ ...TOOLBAR_ROW, ...toolbarPin }}
|
|
710
760
|
>
|
|
711
|
-
{props.heading ?? t(SEARCH_I18N_KEYS.resultsTitle)}
|
|
712
|
-
</Typography.Title>
|
|
713
|
-
<Flex align="center" gap={spacing[3]} style={TOOLBAR_ROW}>
|
|
714
761
|
<Count bag={bag} />
|
|
715
|
-
{
|
|
762
|
+
<Flex align="center" gap={spacing[3]} style={TOOLBAR_END}>
|
|
763
|
+
{props.toolbar}
|
|
764
|
+
</Flex>
|
|
716
765
|
</Flex>
|
|
717
|
-
|
|
766
|
+
</>
|
|
718
767
|
)}
|
|
719
768
|
|
|
720
769
|
<DegradationNotice
|