@onsvisual/svelte-components 1.0.56 → 1.0.57

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.
@@ -1,7 +1,6 @@
1
1
  <script>
2
2
  // @ts-nocheck
3
3
  import { onMount, createEventDispatcher } from "svelte";
4
- import accessibleAutocomplete from "accessible-autocomplete";
5
4
  import Dropdown from "../Dropdown/Dropdown.svelte";
6
5
  import Input from "../Input/Input.svelte";
7
6
 
@@ -12,6 +11,7 @@
12
11
 
13
12
  let mounted = false;
14
13
  let inputElement;
14
+ let accessibleAutocomplete;
15
15
  let hideMenu = false;
16
16
 
17
17
  /**
@@ -160,7 +160,9 @@
160
160
  if (!e.target.value) select(null);
161
161
  }
162
162
 
163
- function initAutocomplete(element) {
163
+ async function initAutocomplete(element) {
164
+ if (!accessibleAutocomplete) accessibleAutocomplete = (await import("accessible-autocomplete")).default;
165
+
164
166
  accessibleAutocomplete({
165
167
  element,
166
168
  id,
@@ -195,7 +197,9 @@
195
197
  }
196
198
  $: bindInputValue(value);
197
199
 
198
- onMount(() => mounted = true);
200
+ onMount(async () => {
201
+ mounted = true;
202
+ });
199
203
  </script>
200
204
 
201
205
  {#if renderFallback && !mounted}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onsvisual/svelte-components",
3
- "version": "1.0.56",
3
+ "version": "1.0.57",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "npm run build:package && npm run build:docs",