places-autocomplete-svelte 2.2.7 → 2.2.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.
- package/dist/PlaceAutocomplete.svelte +9 -1
- package/package.json +10 -10
|
@@ -273,9 +273,17 @@
|
|
|
273
273
|
resetKbdClasses();
|
|
274
274
|
}, 300);
|
|
275
275
|
}
|
|
276
|
+
|
|
277
|
+
// Handle click outside the input
|
|
278
|
+
// to reset the search input and results
|
|
279
|
+
function handleClickOutside(event: MouseEvent) {
|
|
280
|
+
if (inputRef && !inputRef.contains(event.target as Node)) {
|
|
281
|
+
reset();
|
|
282
|
+
}
|
|
283
|
+
}
|
|
276
284
|
</script>
|
|
277
285
|
|
|
278
|
-
<svelte:window onkeydown={onKeyDown} />
|
|
286
|
+
<svelte:window onkeydown={onKeyDown} onclick={handleClickOutside}/>
|
|
279
287
|
|
|
280
288
|
<section class={options.classes?.section}>
|
|
281
289
|
{#if options?.label ?? ''}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "places-autocomplete-svelte",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "2.2.
|
|
4
|
+
"version": "2.2.8",
|
|
5
5
|
"description": "A flexible and customizable Svelte component leveraging the Google Maps Places (New) Autocomplete API to provide a user-friendly way to search for and retrieve detailed address information within your SvelteKit applications.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"svelte",
|
|
@@ -73,16 +73,16 @@
|
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@sveltejs/adapter-auto": "^6.0.0",
|
|
76
|
-
"@sveltejs/adapter-cloudflare": "^7.0.
|
|
77
|
-
"@sveltejs/kit": "^2.20.
|
|
76
|
+
"@sveltejs/adapter-cloudflare": "^7.0.2",
|
|
77
|
+
"@sveltejs/kit": "^2.20.8",
|
|
78
78
|
"@sveltejs/package": "^2.3.11",
|
|
79
79
|
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
|
80
|
-
"@tailwindcss/postcss": "^4.1.
|
|
80
|
+
"@tailwindcss/postcss": "^4.1.5",
|
|
81
81
|
"@tailwindcss/typography": "^0.5.16",
|
|
82
|
-
"@tailwindcss/vite": "^4.1.
|
|
82
|
+
"@tailwindcss/vite": "^4.1.5",
|
|
83
83
|
"@types/eslint": "^9.6.1",
|
|
84
84
|
"autoprefixer": "^10.4.21",
|
|
85
|
-
"eslint": "^9.25.
|
|
85
|
+
"eslint": "^9.25.1",
|
|
86
86
|
"eslint-config-prettier": "^10.1.2",
|
|
87
87
|
"eslint-plugin-svelte": "^3.5.1",
|
|
88
88
|
"globals": "^16.0.0",
|
|
@@ -90,13 +90,13 @@
|
|
|
90
90
|
"prettier": "^3.5.3",
|
|
91
91
|
"prettier-plugin-svelte": "^3.3.3",
|
|
92
92
|
"publint": "^0.3.12",
|
|
93
|
-
"svelte": "^5.28.
|
|
93
|
+
"svelte": "^5.28.2",
|
|
94
94
|
"svelte-check": "^4.1.6",
|
|
95
|
-
"tailwindcss": "^4.1.
|
|
95
|
+
"tailwindcss": "^4.1.5",
|
|
96
96
|
"tslib": "^2.8.1",
|
|
97
97
|
"typescript": "^5.8.3",
|
|
98
|
-
"typescript-eslint": "^8.
|
|
99
|
-
"vite": "^6.3.
|
|
98
|
+
"typescript-eslint": "^8.31.1",
|
|
99
|
+
"vite": "^6.3.4"
|
|
100
100
|
},
|
|
101
101
|
"svelte": "./dist/index.js",
|
|
102
102
|
"types": "./dist/PlaceAutocomplete.svelte.d.ts",
|