@reuters-graphics/graphics-components 0.0.7 → 0.0.8

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,10 +258,8 @@
257
258
  </li>
258
259
  {/each}
259
260
  {/if}
260
- {#if $$slots['no-results'] && !hideDropdown && value.length > 0 && results.length === 0}
261
- <div class:no-results="{true}">
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>
@@ -277,7 +276,7 @@ ul {
277
276
  padding: 0;
278
277
  margin: 0;
279
278
  list-style: none;
280
- background-color: inherit;
279
+ background-color: #fff;
281
280
  }
282
281
 
283
282
  [aria-expanded=true] ul {
@@ -288,12 +287,18 @@ ul {
288
287
  }
289
288
 
290
289
  li,
291
- .no-results {
290
+ li.no-results {
292
291
  padding: 0.25rem 1rem;
293
292
  font-family: "Knowledge", "Source Sans Pro", Arial, sans-serif;
294
293
  color: #333;
295
294
  }
296
295
 
296
+ li.no-results {
297
+ color: #333;
298
+ font-size: 0.85rem;
299
+ font-style: italic;
300
+ }
301
+
297
302
  li {
298
303
  cursor: pointer;
299
304
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reuters-graphics/graphics-components",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "homepage": "https://reuters-graphics.github.io/graphics-components",