@txstate-mws/svelte-components 1.6.0 → 1.6.2

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.
@@ -81,7 +81,7 @@ function addSelection(e) {
81
81
  const opt = { ...e.detail, label: e.detail.label || e.detail.value };
82
82
  selected = maxSelections === 1 ? [opt] : [...selected, opt];
83
83
  popupvalue = undefined;
84
- announcement = `${maxSelections === 1 ? 'selected' : 'added'} ${opt.value}`;
84
+ announcement = `${maxSelections === 1 ? 'selected' : 'added'} ${opt.label}`;
85
85
  dispatch('change', selected);
86
86
  }
87
87
  function removeSelection(opt, idx, nextfocus = 1) {
@@ -91,7 +91,7 @@ function removeSelection(opt, idx, nextfocus = 1) {
91
91
  selected = selected.filter(s => s.value !== opt.value);
92
92
  if (document.activeElement !== inputelement)
93
93
  inputelement.focus();
94
- announcement = `removed ${opt.value}`;
94
+ announcement = `removed ${opt.label ?? opt.value}`;
95
95
  dispatch('change', selected);
96
96
  }
97
97
  function inputkeydown(e) {
@@ -281,7 +281,7 @@ $: hasSelected = showSelected && !hideSelectedIndicator && items.some(itm => 'va
281
281
  <div use:portal={usePortal === true ? undefined : (usePortal || null)}
282
282
  use:glue={{ target: buttonelement, align, cover, gap, adjustparentheight, store: computedalign }}
283
283
  class={menuContainerClass}>
284
- <ul bind:this={menuelement} id={menuid} role={usemenurole ? 'menu' : 'listbox'} style={width ? `width: ${width}` : ''}
284
+ <ul bind:this={menuelement} id={menuid} role={usemenurole ? 'menu' : 'listbox'} tabindex="-1" style={width ? `width: ${width}` : ''}
285
285
  class={menuClass} class:hasSelected class:defaultmenu={!menuClass && !menuContainerClass}
286
286
  on:keydown={onkeydown}>
287
287
  {#each items as item, i ('value' in item ? item.value : `popupmenu_divider_${i}`)}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- export * from './components/index.js';
2
1
  export * from './actions/index.js';
2
+ export * from './components/index.js';
3
+ export * from './stores/index.js';
3
4
  export * from './types/index.js';
4
5
  export * from './util/index.js';
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
- export * from './components/index.js';
2
1
  export * from './actions/index.js';
2
+ export * from './components/index.js';
3
+ export * from './stores/index.js';
3
4
  export * from './types/index.js';
4
5
  export * from './util/index.js';
@@ -0,0 +1 @@
1
+ export * from './toasts.js';
@@ -0,0 +1 @@
1
+ export * from './toasts.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@txstate-mws/svelte-components",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "Svelte components that are generically useful.",
5
5
  "scripts": {
6
6
  "prepublishOnly": "svelte-package",