@reuters-graphics/graphics-components 0.0.6 → 0.0.9
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.
|
@@ -62,9 +62,6 @@ export default class Index extends SvelteComponentTyped<{
|
|
|
62
62
|
index: any;
|
|
63
63
|
value: string;
|
|
64
64
|
};
|
|
65
|
-
'no-results': {
|
|
66
|
-
value: string;
|
|
67
|
-
};
|
|
68
65
|
}> {
|
|
69
66
|
}
|
|
70
67
|
export type IndexProps = typeof __propDef.props;
|
|
@@ -135,9 +132,6 @@ declare const __propDef: {
|
|
|
135
132
|
index: any;
|
|
136
133
|
value: string;
|
|
137
134
|
};
|
|
138
|
-
'no-results': {
|
|
139
|
-
value: string;
|
|
140
|
-
};
|
|
141
135
|
};
|
|
142
136
|
};
|
|
143
137
|
export {};
|
|
@@ -171,7 +171,8 @@
|
|
|
171
171
|
aria-haspopup="listbox"
|
|
172
172
|
aria-owns="{id}-listbox"
|
|
173
173
|
class:dropdown="{results.length > 0}"
|
|
174
|
-
aria-expanded="{showResults
|
|
174
|
+
aria-expanded="{showResults ||
|
|
175
|
+
(isFocused && value.length > 0 && results.length === 0)}"
|
|
175
176
|
id="{id}-typeahead"
|
|
176
177
|
>
|
|
177
178
|
<Search
|
|
@@ -257,28 +258,25 @@
|
|
|
257
258
|
</li>
|
|
258
259
|
{/each}
|
|
259
260
|
{/if}
|
|
260
|
-
{#if
|
|
261
|
-
<
|
|
262
|
-
<slot name="no-results" value="{value}" />
|
|
263
|
-
</div>
|
|
261
|
+
{#if value.length > 0 && results.length === 0}
|
|
262
|
+
<li class="no-results disabled">No embeds found...</li>
|
|
264
263
|
{/if}
|
|
265
264
|
</ul>
|
|
266
265
|
</div>
|
|
267
266
|
|
|
268
267
|
<style>[data-svelte-typeahead] {
|
|
269
268
|
position: relative;
|
|
270
|
-
background-color: #fff;
|
|
271
269
|
}
|
|
272
270
|
|
|
273
271
|
ul {
|
|
274
272
|
position: absolute;
|
|
275
273
|
top: 100%;
|
|
276
274
|
left: 0;
|
|
277
|
-
width:
|
|
275
|
+
width: 100%;
|
|
278
276
|
padding: 0;
|
|
279
277
|
margin: 0;
|
|
280
278
|
list-style: none;
|
|
281
|
-
background-color:
|
|
279
|
+
background-color: #fff;
|
|
282
280
|
}
|
|
283
281
|
|
|
284
282
|
[aria-expanded=true] ul {
|
|
@@ -289,12 +287,18 @@ ul {
|
|
|
289
287
|
}
|
|
290
288
|
|
|
291
289
|
li,
|
|
292
|
-
.no-results {
|
|
290
|
+
li.no-results {
|
|
293
291
|
padding: 0.25rem 1rem;
|
|
294
292
|
font-family: "Knowledge", "Source Sans Pro", Arial, sans-serif;
|
|
295
293
|
color: #333;
|
|
296
294
|
}
|
|
297
295
|
|
|
296
|
+
li.no-results {
|
|
297
|
+
color: #333;
|
|
298
|
+
font-size: 0.85rem;
|
|
299
|
+
font-style: italic;
|
|
300
|
+
}
|
|
301
|
+
|
|
298
302
|
li {
|
|
299
303
|
cursor: pointer;
|
|
300
304
|
}
|
|
@@ -339,6 +343,7 @@ li:hover {
|
|
|
339
343
|
font-size: 1rem;
|
|
340
344
|
border: 0;
|
|
341
345
|
border-radius: 0 !important;
|
|
346
|
+
background-color: #fff;
|
|
342
347
|
border: 1px solid #ddd;
|
|
343
348
|
font-family: var(--theme-font-family-sans-serif, "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif);
|
|
344
349
|
}
|