@remit/ui 0.0.10 → 0.0.11
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/package.json
CHANGED
|
@@ -72,6 +72,44 @@ const resultSections: SearchResultSection[] = [
|
|
|
72
72
|
{ id: "related", label: "Related", results: related },
|
|
73
73
|
];
|
|
74
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Matches from outside the inbox — Archive, Sent, Spam and a custom folder.
|
|
77
|
+
* These are the rows an unscoped search returns that an INBOX-only one could
|
|
78
|
+
* not, so they only ever appear under the brief's sections.
|
|
79
|
+
*/
|
|
80
|
+
const crossFolderMatches: SearchResult[] = [
|
|
81
|
+
{
|
|
82
|
+
id: "x1",
|
|
83
|
+
sender: "Mollie",
|
|
84
|
+
subject: "Invoice 2026-02 — archived",
|
|
85
|
+
snippet: "Filed to Archive last month; payment already settled.",
|
|
86
|
+
date: "Feb 24",
|
|
87
|
+
category: { label: "Receipt", tone: "positive" },
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: "x2",
|
|
91
|
+
sender: "me",
|
|
92
|
+
subject: "Re: invoice query",
|
|
93
|
+
snippet: "Sent — attaching the invoice you asked for.",
|
|
94
|
+
date: "Feb 18",
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: "x3",
|
|
98
|
+
sender: "billing@unknown-vendor.test",
|
|
99
|
+
subject: "URGENT invoice attached",
|
|
100
|
+
snippet: "Marked as spam, but it is the invoice the user is looking for.",
|
|
101
|
+
date: "Feb 11",
|
|
102
|
+
category: { label: "Spam", tone: "warning" },
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: "x4",
|
|
106
|
+
sender: "Accountant",
|
|
107
|
+
subject: "Invoices for the quarter",
|
|
108
|
+
snippet: "Filed under Projects/Bookkeeping.",
|
|
109
|
+
date: "Jan 30",
|
|
110
|
+
},
|
|
111
|
+
];
|
|
112
|
+
|
|
75
113
|
const emptySections: SearchResultSection[] = [
|
|
76
114
|
{ id: "top", label: "Top matches", results: [] },
|
|
77
115
|
];
|
|
@@ -111,6 +149,50 @@ export const Idle: Story = {
|
|
|
111
149
|
render: () => <Harness value="" recentSearches={recentSearches} />,
|
|
112
150
|
};
|
|
113
151
|
|
|
152
|
+
/**
|
|
153
|
+
* The daily brief's unscoped search: no scope chip in the bar, and the literal
|
|
154
|
+
* section carries matches from every folder — Archive, Sent, Spam and custom
|
|
155
|
+
* folders alongside the inbox. Before the listing behind it took a search mode
|
|
156
|
+
* it could only ever return inbox mail, so this section was silently narrower
|
|
157
|
+
* than the bar promised.
|
|
158
|
+
*
|
|
159
|
+
* The rows themselves do not say which folder they came from; the sections are
|
|
160
|
+
* ordered newest first regardless of where each message is filed.
|
|
161
|
+
*/
|
|
162
|
+
export const UnscopedAcrossFolders: Story = {
|
|
163
|
+
render: () => (
|
|
164
|
+
<Harness
|
|
165
|
+
value="invoice"
|
|
166
|
+
sections={[
|
|
167
|
+
{
|
|
168
|
+
id: "top",
|
|
169
|
+
label: "Top matches",
|
|
170
|
+
results: [...topMatches, ...crossFolderMatches],
|
|
171
|
+
},
|
|
172
|
+
{ id: "related", label: "Related", results: related },
|
|
173
|
+
]}
|
|
174
|
+
/>
|
|
175
|
+
),
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* A scoped view (a mailbox route, its `in:` chip in the bar). Both sections are
|
|
180
|
+
* scoped to that folder and take the kit's default labels — the semantic
|
|
181
|
+
* section used to run unscoped here under an "Everywhere" heading, which
|
|
182
|
+
* contradicted the chip the same bar was showing.
|
|
183
|
+
*/
|
|
184
|
+
export const ScopedToOneFolder: Story = {
|
|
185
|
+
render: () => (
|
|
186
|
+
<Harness
|
|
187
|
+
value="invoice"
|
|
188
|
+
sections={[
|
|
189
|
+
{ id: "top", label: "Top matches", results: topMatches.slice(0, 2) },
|
|
190
|
+
{ id: "related", label: "Related", results: related.slice(0, 1) },
|
|
191
|
+
]}
|
|
192
|
+
/>
|
|
193
|
+
),
|
|
194
|
+
};
|
|
195
|
+
|
|
114
196
|
/** Typed filter tokens (`from:`, `has:attachment`, …) render as removable chips above the sections. */
|
|
115
197
|
export const WithFilterTokens: Story = {
|
|
116
198
|
render: () => (
|