svelte-multiselect 11.5.0 → 11.5.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.
- package/dist/CircleSpinner.svelte +29 -0
- package/dist/CircleSpinner.svelte.d.ts +8 -0
- package/dist/CmdPalette.svelte +74 -0
- package/dist/CmdPalette.svelte.d.ts +76 -0
- package/dist/CodeExample.svelte +85 -0
- package/dist/CodeExample.svelte.d.ts +25 -0
- package/dist/CopyButton.svelte +67 -0
- package/dist/CopyButton.svelte.d.ts +25 -0
- package/dist/FileDetails.svelte +65 -0
- package/dist/FileDetails.svelte.d.ts +22 -0
- package/dist/GitHubCorner.svelte +82 -0
- package/dist/GitHubCorner.svelte.d.ts +13 -0
- package/dist/Icon.svelte +23 -0
- package/dist/Icon.svelte.d.ts +8 -0
- package/dist/MultiSelect.svelte +1725 -0
- package/dist/MultiSelect.svelte.d.ts +25 -0
- package/dist/Nav.svelte +627 -0
- package/dist/Nav.svelte.d.ts +43 -0
- package/dist/PrevNext.svelte +105 -0
- package/dist/PrevNext.svelte.d.ts +56 -0
- package/dist/Toggle.svelte +77 -0
- package/dist/Toggle.svelte.d.ts +11 -0
- package/dist/Wiggle.svelte +22 -0
- package/dist/Wiggle.svelte.d.ts +18 -0
- package/dist/attachments.d.ts +72 -0
- package/dist/attachments.js +698 -0
- package/dist/heading-anchors.d.ts +14 -0
- package/dist/heading-anchors.js +120 -0
- package/dist/icons.d.ts +55 -0
- package/dist/icons.js +54 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +43 -0
- package/dist/types.d.ts +246 -0
- package/dist/types.js +1 -0
- package/dist/utils.d.ts +8 -0
- package/dist/utils.js +63 -0
- package/package.json +20 -17
- package/readme.md +25 -1
package/package.json
CHANGED
|
@@ -5,14 +5,16 @@
|
|
|
5
5
|
"homepage": "https://janosh.github.io/svelte-multiselect",
|
|
6
6
|
"repository": "https://github.com/janosh/svelte-multiselect",
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"version": "11.5.
|
|
8
|
+
"version": "11.5.2",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"dev": "vite dev",
|
|
12
12
|
"build": "vite build",
|
|
13
13
|
"preview": "vite preview",
|
|
14
14
|
"test": "vitest --run && playwright test",
|
|
15
|
-
"check": "svelte-check"
|
|
15
|
+
"check": "svelte-check",
|
|
16
|
+
"package": "svelte-package",
|
|
17
|
+
"prepublishOnly": "svelte-package"
|
|
16
18
|
},
|
|
17
19
|
"svelte": "./dist/index.js",
|
|
18
20
|
"bugs": "https://github.com/janosh/svelte-multiselect/issues",
|
|
@@ -21,30 +23,27 @@
|
|
|
21
23
|
},
|
|
22
24
|
"devDependencies": {
|
|
23
25
|
"@playwright/test": "^1.57.0",
|
|
24
|
-
"@stylistic/eslint-plugin": "^5.
|
|
26
|
+
"@stylistic/eslint-plugin": "^5.7.0",
|
|
25
27
|
"@sveltejs/adapter-static": "^3.0.10",
|
|
26
|
-
"@sveltejs/kit": "^2.
|
|
28
|
+
"@sveltejs/kit": "^2.50.0",
|
|
27
29
|
"@sveltejs/package": "2.5.7",
|
|
28
|
-
"@sveltejs/vite-plugin-svelte": "^6.2.
|
|
29
|
-
"@types/node": "^25.0.
|
|
30
|
-
"@vitest/coverage-v8": "^4.0.
|
|
30
|
+
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
|
31
|
+
"@types/node": "^25.0.9",
|
|
32
|
+
"@vitest/coverage-v8": "^4.0.17",
|
|
31
33
|
"eslint": "^9.39.2",
|
|
32
|
-
"eslint-plugin-svelte": "^3.
|
|
33
|
-
"happy-dom": "^20.
|
|
34
|
-
"hastscript": "^9.0.1",
|
|
34
|
+
"eslint-plugin-svelte": "^3.14.0",
|
|
35
|
+
"happy-dom": "^20.3.1",
|
|
35
36
|
"mdsvex": "^0.12.6",
|
|
36
|
-
"mdsvexamples": "^0.5.
|
|
37
|
-
"
|
|
38
|
-
"rehype-slug": "^6.0.0",
|
|
39
|
-
"svelte": "^5.46.1",
|
|
37
|
+
"mdsvexamples": "^0.5.1",
|
|
38
|
+
"svelte": "^5.46.4",
|
|
40
39
|
"svelte-check": "^4.3.5",
|
|
41
40
|
"svelte-preprocess": "^6.0.3",
|
|
42
41
|
"svelte-toc": "^0.6.2",
|
|
43
42
|
"svelte2tsx": "^0.7.46",
|
|
44
43
|
"typescript": "5.9.3",
|
|
45
|
-
"typescript-eslint": "^8.
|
|
46
|
-
"vite": "^7.3.
|
|
47
|
-
"vitest": "^4.0.
|
|
44
|
+
"typescript-eslint": "^8.53.0",
|
|
45
|
+
"vite": "^7.3.1",
|
|
46
|
+
"vitest": "^4.0.17"
|
|
48
47
|
},
|
|
49
48
|
"keywords": [
|
|
50
49
|
"svelte",
|
|
@@ -70,6 +69,10 @@
|
|
|
70
69
|
"./attachments": {
|
|
71
70
|
"types": "./dist/attachments.d.ts",
|
|
72
71
|
"default": "./dist/attachments.js"
|
|
72
|
+
},
|
|
73
|
+
"./heading-anchors": {
|
|
74
|
+
"types": "./dist/heading-anchors.d.ts",
|
|
75
|
+
"default": "./dist/heading-anchors.js"
|
|
73
76
|
}
|
|
74
77
|
},
|
|
75
78
|
"types": "./dist/index.d.ts",
|
package/readme.md
CHANGED
|
@@ -802,6 +802,30 @@ Example using several snippets:
|
|
|
802
802
|
|
|
803
803
|
Triggers when the dropdown list of options disappears. `event` is the DOM's `FocusEvent`, `KeyboardEvent` or `ClickEvent` that triggered the close.
|
|
804
804
|
|
|
805
|
+
1. ```ts
|
|
806
|
+
onsearch={({ searchText, matchingCount }) => console.log(searchText, matchingCount)}
|
|
807
|
+
```
|
|
808
|
+
|
|
809
|
+
Triggers (debounced, 150ms) when the search text changes. Useful for analytics or loading remote options. `searchText` is the current input value, `matchingCount` is the number of options that match.
|
|
810
|
+
|
|
811
|
+
1. ```ts
|
|
812
|
+
onmaxreached={({ selected, maxSelect, attemptedOption }) => console.log(attemptedOption)}
|
|
813
|
+
```
|
|
814
|
+
|
|
815
|
+
Triggers when a user tries to select more options than `maxSelect` allows. Useful for showing feedback. Does not fire for `maxSelect=1` (which uses replace behavior).
|
|
816
|
+
|
|
817
|
+
1. ```ts
|
|
818
|
+
onduplicate={({ option }) => console.log(`Duplicate:`, option)}
|
|
819
|
+
```
|
|
820
|
+
|
|
821
|
+
Triggers when a user tries to add an already-selected option (when `duplicates=false`). Useful for showing feedback to the user.
|
|
822
|
+
|
|
823
|
+
1. ```ts
|
|
824
|
+
onactivate={({ option, index }) => console.log(`Active:`, option, index)}
|
|
825
|
+
```
|
|
826
|
+
|
|
827
|
+
Triggers during keyboard navigation (ArrowUp/ArrowDown) through options. `option` is the newly active option, `index` is its position. Does not fire on mouse hover.
|
|
828
|
+
|
|
805
829
|
For example, here's how you might annoy your users with an alert every time one or more options are added or removed:
|
|
806
830
|
|
|
807
831
|
```svelte
|
|
@@ -987,7 +1011,7 @@ This simplified version of the DOM structure of the component shows where these
|
|
|
987
1011
|
|
|
988
1012
|
### With global CSS
|
|
989
1013
|
|
|
990
|
-
Odd as it may seem, you get the most fine-grained control over the styling of every part of this component by using the following `:global()` CSS selectors. `ul.selected` is the list of currently selected options rendered inside the component's input whereas `ul.options` is the list of available options that slides out when the component is in its `open` state. See also [simplified DOM structure](
|
|
1014
|
+
Odd as it may seem, you get the most fine-grained control over the styling of every part of this component by using the following `:global()` CSS selectors. `ul.selected` is the list of currently selected options rendered inside the component's input whereas `ul.options` is the list of available options that slides out when the component is in its `open` state. See also [simplified DOM structure](#styling).
|
|
991
1015
|
|
|
992
1016
|
```css
|
|
993
1017
|
:global(div.multiselect) {
|