svelte-select-5 6.0.0

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.
Files changed (123) hide show
  1. package/.claude/settings.local.json +20 -0
  2. package/.prettierignore +2 -0
  3. package/.prettierrc +17 -0
  4. package/CHANGELOG.md +571 -0
  5. package/LICENSE +9 -0
  6. package/MIGRATION_GUIDE.md +98 -0
  7. package/README.md +316 -0
  8. package/docs/generate_theming_variables_md.cjs +53 -0
  9. package/docs/theming_variables.md +113 -0
  10. package/jsconfig.json +3 -0
  11. package/package.json +77 -0
  12. package/rollup.config.js +33 -0
  13. package/src/app.html +29 -0
  14. package/src/global.d.ts +1 -0
  15. package/src/lib/ChevronIcon.svelte +22 -0
  16. package/src/lib/ClearIcon.svelte +22 -0
  17. package/src/lib/LoadingIcon.svelte +33 -0
  18. package/src/lib/Select.svelte +1345 -0
  19. package/src/lib/filter.js +38 -0
  20. package/src/lib/get-items.js +25 -0
  21. package/src/lib/index.js +1 -0
  22. package/src/lib/tailwind.css +130 -0
  23. package/src/post-prepare.cjs +6 -0
  24. package/src/remove-styles.cjs +22 -0
  25. package/src/routes/+layout.js +1 -0
  26. package/src/routes/+layout.svelte +263 -0
  27. package/src/routes/+page.js +5 -0
  28. package/src/routes/+page.svelte +0 -0
  29. package/src/routes/examples/+page.svelte +84 -0
  30. package/src/routes/examples/advanced/create-item/+page.svelte +36 -0
  31. package/src/routes/examples/advanced/create-item-multiple/+page.svelte +38 -0
  32. package/src/routes/examples/advanced/floating-ui/+page.svelte +22 -0
  33. package/src/routes/examples/advanced/form-action/+page.server.js +10 -0
  34. package/src/routes/examples/advanced/form-action/+page.svelte +20 -0
  35. package/src/routes/examples/advanced/limit-multi-value/+page.svelte +31 -0
  36. package/src/routes/examples/advanced/long-item/+page.svelte +38 -0
  37. package/src/routes/examples/advanced/multi-item-checkboxes/+page.svelte +49 -0
  38. package/src/routes/examples/advanced/style-props/+page.svelte +14 -0
  39. package/src/routes/examples/advanced/virtual-list/+page.svelte +95 -0
  40. package/src/routes/examples/events/blur/+page.svelte +19 -0
  41. package/src/routes/examples/events/change/+page.svelte +16 -0
  42. package/src/routes/examples/events/clear/+page.svelte +18 -0
  43. package/src/routes/examples/events/error/+page.svelte +17 -0
  44. package/src/routes/examples/events/filter/+page.svelte +16 -0
  45. package/src/routes/examples/events/focus/+page.svelte +16 -0
  46. package/src/routes/examples/events/hoverItem/+page.svelte +16 -0
  47. package/src/routes/examples/events/input/+page.svelte +16 -0
  48. package/src/routes/examples/events/loaded/+page.svelte +23 -0
  49. package/src/routes/examples/props/class/+page.svelte +17 -0
  50. package/src/routes/examples/props/clearFilterTextOnBlur/+page.svelte +13 -0
  51. package/src/routes/examples/props/clearable/+page.svelte +13 -0
  52. package/src/routes/examples/props/closeListOnChange/+page.svelte +12 -0
  53. package/src/routes/examples/props/container-styles/+page.svelte +11 -0
  54. package/src/routes/examples/props/debounce-wait/+page.svelte +19 -0
  55. package/src/routes/examples/props/disabled/+page.svelte +15 -0
  56. package/src/routes/examples/props/filter-text/+page.svelte +14 -0
  57. package/src/routes/examples/props/floating-config/+page.svelte +42 -0
  58. package/src/routes/examples/props/focused/+page.svelte +16 -0
  59. package/src/routes/examples/props/group-header-selectable/+page.svelte +18 -0
  60. package/src/routes/examples/props/hide-empty-state/+page.svelte +8 -0
  61. package/src/routes/examples/props/id/+page.svelte +15 -0
  62. package/src/routes/examples/props/input-attributes/+page.svelte +11 -0
  63. package/src/routes/examples/props/item-id/+page.svelte +15 -0
  64. package/src/routes/examples/props/items/+page.svelte +15 -0
  65. package/src/routes/examples/props/just-value/+page.svelte +16 -0
  66. package/src/routes/examples/props/label/+page.svelte +15 -0
  67. package/src/routes/examples/props/list-auto-width/+page.svelte +21 -0
  68. package/src/routes/examples/props/list-offset/+page.svelte +21 -0
  69. package/src/routes/examples/props/list-open/+page.svelte +31 -0
  70. package/src/routes/examples/props/loadOptions/+page.svelte +16 -0
  71. package/src/routes/examples/props/loading/+page.svelte +15 -0
  72. package/src/routes/examples/props/multiFullItemClearable/+page.svelte +12 -0
  73. package/src/routes/examples/props/multiple/+page.svelte +12 -0
  74. package/src/routes/examples/props/name/+page.svelte +13 -0
  75. package/src/routes/examples/props/placeholder/+page.svelte +14 -0
  76. package/src/routes/examples/props/placeholder-always-show/+page.svelte +11 -0
  77. package/src/routes/examples/props/required/+page.svelte +14 -0
  78. package/src/routes/examples/props/searchable/+page.svelte +15 -0
  79. package/src/routes/examples/props/show-chevron/+page.svelte +15 -0
  80. package/src/routes/examples/props/value/+page.svelte +19 -0
  81. package/src/routes/examples/slots/chevron-icon/+page.svelte +16 -0
  82. package/src/routes/examples/slots/clear-icon/+page.svelte +21 -0
  83. package/src/routes/examples/slots/empty/+page.svelte +18 -0
  84. package/src/routes/examples/slots/input-hidden/+page.server.js +10 -0
  85. package/src/routes/examples/slots/input-hidden/+page.svelte +22 -0
  86. package/src/routes/examples/slots/item/+page.svelte +15 -0
  87. package/src/routes/examples/slots/list/+page.svelte +49 -0
  88. package/src/routes/examples/slots/list-append/+page.svelte +16 -0
  89. package/src/routes/examples/slots/list-prepend/+page.svelte +16 -0
  90. package/src/routes/examples/slots/loading-icon/+page.svelte +29 -0
  91. package/src/routes/examples/slots/multi-clear-icon/+page.svelte +16 -0
  92. package/src/routes/examples/slots/prepend/+page.svelte +22 -0
  93. package/src/routes/examples/slots/required/+page.svelte +31 -0
  94. package/src/routes/examples/slots/selection/+page.svelte +25 -0
  95. package/static/nav-icon.svg +2 -0
  96. package/static/svelte-select.png +0 -0
  97. package/svelte-select.png +0 -0
  98. package/svelte.config.js +10 -0
  99. package/tailwind.config.cjs +4 -0
  100. package/test/public/favicon.ico +0 -0
  101. package/test/public/index.html +15 -0
  102. package/test/src/ChevronSlotTest.svelte +19 -0
  103. package/test/src/ClearIconSlotTest.svelte +12 -0
  104. package/test/src/CustomItem.svelte +78 -0
  105. package/test/src/GroupHeaderNotSelectable.svelte +17 -0
  106. package/test/src/HoverItemIndexTest.svelte +21 -0
  107. package/test/src/InputHiddenSlotTest.svelte +12 -0
  108. package/test/src/ItemHeightTest.svelte +7 -0
  109. package/test/src/ItemSlotTest.svelte +11 -0
  110. package/test/src/ListSlotTest.svelte +14 -0
  111. package/test/src/LoadOptionsGroup.svelte +21 -0
  112. package/test/src/MultiItemColor.svelte +7 -0
  113. package/test/src/OuterListTest.svelte +16 -0
  114. package/test/src/PrependSlotTest.svelte +12 -0
  115. package/test/src/Select/ParentContainer.svelte +11 -0
  116. package/test/src/SelectionSlotMultipleTest.svelte +12 -0
  117. package/test/src/SelectionSlotTest.svelte +12 -0
  118. package/test/src/TestClearIcon.svelte +1 -0
  119. package/test/src/TestIcon.svelte +15 -0
  120. package/test/src/env.js +1 -0
  121. package/test/src/test-utils.js +124 -0
  122. package/test/src/tests.js +3745 -0
  123. package/vite.config.js +9 -0
@@ -0,0 +1,20 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(ls:*)",
5
+ "WebSearch",
6
+ "mcp__plugin_context7_context7__resolve-library-id",
7
+ "mcp__plugin_context7_context7__query-docs",
8
+ "Bash(npm install)",
9
+ "Bash(timeout 15 npm run dev:*)",
10
+ "Bash(pkill:*)",
11
+ "Bash(npm run build:*)",
12
+ "Bash(npm test:*)",
13
+ "Bash(npx rollup:*)",
14
+ "Bash(git add:*)",
15
+ "Bash(git commit:*)",
16
+ "Bash(git push:*)",
17
+ "Bash(npm outdated:*)"
18
+ ]
19
+ }
20
+ }
@@ -0,0 +1,2 @@
1
+ /test/src/index.js
2
+ *.md
package/.prettierrc ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "useTabs": false,
3
+ "singleQuote": true,
4
+ "tabWidth": 4,
5
+ "printWidth": 120,
6
+ "bracketSameLine": true,
7
+ "overrides": [
8
+ {
9
+ "files": ["*.svelte"],
10
+ "options": {
11
+ "singleQuote": true
12
+ }
13
+ }
14
+ ],
15
+ "svelteSortOrder": "scripts-markup-styles",
16
+ "svelteBracketNewLine": false
17
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,571 @@
1
+ # svelte-select-5 changelog
2
+
3
+ ## 6.0.0 (Fork - Svelte 5)
4
+
5
+ **BREAKING CHANGES:**
6
+ - Requires Svelte 5
7
+ - Slot names changed to camelCase (e.g., `clear-icon` → `clearIcon`)
8
+ - Events changed from `on:event` to callback props (e.g., `on:select` → `onselect`)
9
+ - Slots replaced with Svelte 5 snippets
10
+
11
+ **Changes:**
12
+ - Full migration to Svelte 5 runes ($state, $derived, $effect, $props, $bindable)
13
+ - All examples updated to Svelte 5 syntax
14
+ - Fixed build warnings (A11y, state capture)
15
+ - This is a fork of [rob-balfre/svelte-select](https://github.com/rob-balfre/svelte-select)
16
+
17
+ ---
18
+
19
+ ## 5.8.3
20
+
21
+ * #651 Fixed: unknown extension .svelte (thanks to @happysalada)
22
+
23
+ ## 5.8.2
24
+
25
+ * #658 Fixed ARIA + vite-plugin-svelte warnings (thanks to @stephenlrandall)
26
+
27
+ ## 5.8.0
28
+
29
+ * #626 added clearFilterTextOnBlur prop (thanks to @mBoegvald)
30
+ * #644 Fixed input focus issue (thanks to @524c)
31
+
32
+ ## 5.7.0
33
+
34
+ * #617 added custom group title border variable support (thanks to @lipe-dev)
35
+ * #610 resolved ARIA warnings by defining a role on interactive divs (thanks to @josdejong)
36
+
37
+ ## 5.6.2
38
+
39
+ * #525 set clear button to `type="button"` (thanks to @CanRau)
40
+
41
+ ## 5.6.1
42
+
43
+ * #525 set clear button to `type="button"` (thanks to @CanRau)
44
+
45
+
46
+ ## 5.6.0
47
+
48
+ * #579 added named slot `input-hidden` (thanks to @Ennoriel)
49
+
50
+ ## 5.5.3
51
+
52
+ * #578 `required` `tabindex` fix (thanks to @Ennoriel)
53
+
54
+ ## 5.5.2
55
+
56
+ * #570 `on:blur` bug fix (thanks to @cyaris)
57
+
58
+ ## 5.5.1
59
+
60
+ * npm will be the death of me...
61
+
62
+ ## 5.5.0
63
+
64
+ * #564 added named slots `list-prepend` and `list-append` (thanks to @sawyerclick)
65
+
66
+ ## 5.4.0
67
+
68
+ * #561 added some needed CSS custom properties, `--max-height`,`--value-container-overflow`,`--value-container-padding`, `--indicators-position`, `--indicators-top`, `--indicators-right`, `--indicators-bottom` (thanks to @Edward-Heales)
69
+
70
+ ## 5.3.1
71
+
72
+ * Reverted a dep bump for `@sveltejs/package` - has a breaking change for non-kit setups. Will bake into v6 instead.
73
+
74
+ ## 5.3.0
75
+
76
+ * Added prop `closeListOnChange`
77
+ * Fixes for #548, #549, #551 and #554
78
+
79
+ ## 5.2.1
80
+
81
+ * #544 Fix for `--border-radius` and `--border-radius-focused` fallbacks (thanks to @schibrikov)
82
+ * Added example for style props
83
+
84
+ ## 5.2.0
85
+
86
+ * #541 Added CSS custom property `--border-radius-focused` (thanks to @schibrikov)
87
+ * Added example for create item when `multiple` is `true`
88
+
89
+ ## 5.1.4
90
+
91
+ * #534 fix for Select's TypeScript declaration file (thanks to @hughlaw)
92
+ * #535 fix for icons touch events (thanks to @miXwui)
93
+
94
+ ## 5.1.3
95
+
96
+ * #523 fix for hoverItemIndex becoming -1 (thanks to @geminway92)
97
+
98
+ ## 5.1.2
99
+
100
+ * #520 fix for autoUpdate and floating UI when list is above select (thanks to @aureleoules)
101
+
102
+ ## 5.1.1
103
+
104
+ * `.list-item` and safari fix for tailwind (thanks to @sawyerclick)
105
+
106
+ ## 5.1.0
107
+
108
+ * #513 `on:clear` event now includes item data for single selects too (thanks to @libklein)
109
+ * `floatingConfig` default now includes `autoUpdate: true`
110
+ * Added `--item-transition`
111
+
112
+ ## 5.0.2
113
+
114
+ * #509 Fix null error when using loadOptions and value (thanks to @dlebech)
115
+
116
+
117
+ ## 5.0.1
118
+
119
+ * #459 Firefox pointerdown fix (thanks to @mikekok)
120
+
121
+ ## 5.0.0
122
+
123
+ * Added hoverItemIndex and hoverItem event
124
+ * Default font-size set to `16px`, iOS will zoom the UI if set smaller (thanks to @rchrdnsh)
125
+ * Added `--border-hover`, `--border-focused`, `--item-height`, `--item-line-height` and `--multi-item-color`
126
+ * Removed `--borderFocusColor` and `--borderHoverColor`
127
+ * Remove `getSelectionLabel` use slots instead
128
+ * Added `floatingConfig`
129
+ * Removed `listPlacement`
130
+ * Removed `computePlacement`
131
+ * Removed CSS prop `--input-font-size`
132
+ * Removed CSS prop `--multi-item-border`
133
+ * Removed CSS prop `--multi-label-margin`
134
+ * Added CSS props `--loading--margin , --loading-color, --loading-height, --loading-width`
135
+ * Added CSS prop `--chevron-border`
136
+ * Added CSS prop `--font-size`
137
+ * Added CSS prop `--multi-item-gap`
138
+ * Added named slot `multi-clear-icon`
139
+ * Added named slot `list`
140
+ * Added named slot `item`
141
+ * Removed Virtual list
142
+ * noOptionsMessage removed
143
+ * optionIdentifier -> itemId
144
+ * getOptionLabel removed
145
+ * getGroupHeaderLabel removed
146
+ * itemCreated event removed
147
+ * labelIdentifier -> label
148
+ * creatable removed, use named slots and bake in your create own logic
149
+ * isGroupHeaderSelectable -> groupHeaderSelectable
150
+ * isSearchable -> searchable
151
+ * isFocused -> focused
152
+ * isCreatable -> creatable
153
+ * isClearable -> clearable
154
+ * isWaiting -> loading
155
+ * Added named slot `prepend`
156
+ * Added named slot `chevron`
157
+ * Added named slot `clear-icon`
158
+ * Added named slot `loading-icon`
159
+ * Removed iconProps
160
+ * Removed ClearIcon component
161
+ * Removed ChevronIcon component
162
+ * Removed MultiSelection component
163
+ * Added named slot `selection`
164
+ * Removed Selection component
165
+ * isMulti -> multiple
166
+ * Other improvements (see docs)
167
+ * select-container -> svelte-select
168
+ * added justValue
169
+ * Placeholder default change from 'Select...' to 'Please select'
170
+ * added blur and focus events
171
+ * removed isOutOfViewport and clickOutside
172
+ * new debounce method
173
+ * filterMethod changed to filter
174
+ * added support for svelte-tiny-virtual-list
175
+ * removed virtual-list class and css props
176
+ * loadOptionsInterval -> debounceWait
177
+ * selectedValue removed
178
+ * MultiSelection removed
179
+ * added postcss to example, tests
180
+ * tailwind css option
181
+ * breaking: containerClasses -> class
182
+ * listGroupTitle -> list-group-title
183
+ * listContainer -> list
184
+ * selectContainer and other CSS class names updated, selectContainer -> svelte-select for example
185
+ * LoadingIcon prop added
186
+ * CSS props updates. Added .icons and removed some css vars
187
+ * Removed logic to show chevron if isSearchable is false
188
+ * indicator class renamed to chevron
189
+ * showIndicator renamed showChevron
190
+ * indicatorSvg removed, use ChevronIcon going forward
191
+ * removed playwright and puppeteer, tests now just run in the browser with sirv
192
+ * debounce method is now exported as a prop
193
+ * Convert repo to use SvelteKit
194
+ * Change licence from LIL to ISC
195
+
196
+ # 4.4.7
197
+
198
+ Temp fix for SvelteKit and scrollbar issues - thanks to @sethvincent
199
+
200
+ # 4.4.6
201
+
202
+ Bug fix for isOutOfViewport - thanks to @alexkuzmin
203
+
204
+ ## 4.4.5
205
+
206
+ * NPM blunder (sorry!)
207
+
208
+ ## 4.4.4
209
+
210
+ * Bug fix for #346 out of viewport - thanks to @nickyrferry
211
+
212
+ ## 4.4.3
213
+
214
+ * listOffset was missing from typings - thanks to @blake-regalia
215
+
216
+ ## 4.4.2
217
+
218
+ * Bug fix for #309 - thanks to @ABarnob
219
+
220
+ ## 4.4.1
221
+
222
+ * Added missing prop 'placeholderAlwaysShow' to TypeScript declaration file (#305) - thanks to @paolotiu
223
+
224
+ ## 4.4.0
225
+
226
+ * Added support for non-selectable items - thanks to @mpdaugherty
227
+
228
+ ## 4.3.1
229
+
230
+ * TextFilter bug fix (#291)
231
+
232
+ ## 4.3.0
233
+
234
+ * Added A11y support (#286) - thanks to @fedoskina
235
+ * Added id prop
236
+
237
+ ## 4.2.7
238
+
239
+ * Bug fixes for #278, #279, #280, #285 - thanks to @davidfou
240
+
241
+ ## 4.2.6
242
+
243
+ * TypeScript declaration in package.json (#277) - thanks to @davidfou
244
+
245
+ ## 4.2.5
246
+
247
+ * multiple on:select fix (#276)
248
+
249
+ ## 4.2.4
250
+
251
+ * CreateGroupHeaderItem fix (#275)
252
+
253
+ ## 4.2.3
254
+
255
+ * Filtering refactor (#274)
256
+
257
+ ## 4.2.2
258
+
259
+ * Bug fix for filtering items (#274)
260
+
261
+ ## 4.2.1
262
+
263
+ * Bug fix to remove focus when an external field is focused programmatically - thanks to @davidfou
264
+
265
+ ## 4.2.0
266
+
267
+ * Added listOffset prop
268
+ * Added CSS custom props '--listRight' and '--listLeft'
269
+
270
+ ## 4.1.0
271
+
272
+ * Added labelIdentifier prop - thanks to @martgnz
273
+
274
+ ## 4.0.0
275
+
276
+ * selectedValue deprecated please use value going forward
277
+ * Lots of bug fixes
278
+ * Internals reworked and (hopefully) improved
279
+ * File size reduced
280
+
281
+ ## 3.17.0
282
+
283
+ * Added ClearIcon prop
284
+ * Added docs for filteredItems
285
+ * loadOptions res now checked for cancelled value
286
+
287
+ ## 3.16.1
288
+
289
+ * Bug fix for loadOptions and list causing blur to not close list - thanks to @Ginfone for reporting
290
+
291
+ ## 3.16.0
292
+
293
+ * New CSS custom props '--placeholderOpacity' and 'disabledPlaceholderOpacity' added - thanks to @tiaanduplessis
294
+
295
+ ## 3.15.0
296
+
297
+ * Added new prop multiFullItemClearable for easier clearable items when multiple is true - thanks to @stephenlrandall
298
+
299
+ ## 3.14.3
300
+
301
+ * Regression fix for 3.14.2 clearing selectedValue if not found in items - thanks to @frederikhors for reporting
302
+
303
+ ## 3.14.2
304
+
305
+ * Fix so selectedValue updates on items change - thanks to @stephenlrandall
306
+
307
+ ## 3.14.1
308
+
309
+ * Fix input attributes so the defaults can be overwritten
310
+
311
+ ## 3.14.0
312
+
313
+ * Added event 'loaded' when loadOptions resolves - thanks to @singingwolfboy
314
+
315
+ ## 3.13.0
316
+
317
+ * Added TypeScript declaration file - thanks to @singingwolfboy
318
+
319
+ ## 3.12.0
320
+
321
+ * new event 'error' is dispatched on caught errors
322
+ * loadOptions now catches errors
323
+ * new CSS custom prop '--errorBackground' added
324
+ * CSS fix for long multi items wrapping text
325
+
326
+ ## 3.11.1
327
+
328
+ * Fix to prevent multiple updates on focus events - thanks to @stephenlrandall
329
+
330
+ ## 3.11.0
331
+
332
+ * README reformatted
333
+ * iconProps added for Icon component - thanks to @stephenlrandall
334
+
335
+ ## 3.10.1
336
+
337
+ * Fix for noOptionsMessage not updating when changed - thanks to @frederikhors
338
+
339
+ ## 3.10.0
340
+
341
+ * Added indicatorSvg prop - thanks to @oharsta (again!)
342
+
343
+ ## 3.9.0
344
+
345
+ * Added showIndicator prop - thanks to @oharsta
346
+
347
+ ## 3.8.1
348
+
349
+ * Fix for containerClasses repeating
350
+
351
+ ## 3.8.0
352
+
353
+ * Added containerClasses prop - thanks to @0xCAP
354
+
355
+ ## 3.7.2
356
+
357
+ * Fix for loadOptions with items opening list by default
358
+
359
+ ## 3.7.1
360
+
361
+ * Fix for groupHeader selection on enter - thanks to @KiwiJuicer
362
+
363
+ ## 3.7.0
364
+
365
+ * Added new CSS vars for groupTitleFontWeight, groupItemPaddingLeft and itemColor - thanks to @john-trieu-nguyen
366
+
367
+ ## 3.6.2
368
+
369
+ * CSS vars padding default fix
370
+
371
+ ## 3.6.1
372
+
373
+ * CSS vars typo fix
374
+
375
+ ## 3.6.0
376
+
377
+ * Added CSS vars for input padding and left
378
+
379
+ ## 3.5.0
380
+
381
+ * Added Icon and showChevron props
382
+
383
+ ## 3.4.0
384
+
385
+ * Bumped version of Svelte to 3.19.1 and fixed up some tests
386
+
387
+ ## 3.3.7
388
+
389
+ * Virtual list height fix
390
+
391
+ ## 3.3.6
392
+
393
+ * Thanks for @jpz for this update... Fix input blurring issue when within shadow DOM
394
+
395
+ ## 3.3.5
396
+
397
+ * MS Edge fix: Replaced object literal spreading
398
+
399
+ ## 3.3.4
400
+
401
+ * Fix for fix for a fix for IE11 disable input fix 😿
402
+
403
+ ## 3.3.3
404
+
405
+ * Fix for a fix for IE11 disable input fix (don't code tired!)
406
+
407
+ ## 3.3.2
408
+
409
+ * IE11 disable input fix
410
+
411
+ ## 3.3.0
412
+
413
+ * Thanks to @jackc for this update... Added itemFilter method
414
+
415
+ ## 3.2.0
416
+
417
+ * List will now close if active item gets selected
418
+
419
+ ## 3.1.2
420
+
421
+ * Thanks to @dimfeld for these updates...
422
+ * Removing unused properties from List.svelte
423
+ * Fix handling of console message type "warning"
424
+
425
+ ## 3.1.1
426
+
427
+ * README updated for Sapper SSR
428
+
429
+ ## 3.1.0
430
+
431
+ * added prop listAutoWidth - List width will grow wider than the Select container (depending on list item content length)
432
+ * README updated
433
+
434
+ ## 3.0.2
435
+
436
+ * selectedValue that are strings now look-up and set correct value
437
+ * README / demo updates
438
+
439
+ ## 3.0.1
440
+
441
+ * Item created bug fix
442
+ * Virtual list scroll fix
443
+
444
+ ## 3.0.0
445
+
446
+ * Breaking change: isCreatable refactor
447
+ * getCreateLabel has been removed
448
+ * If using isCreatable and custom list or item components would need to implement filterText prop
449
+
450
+ ## 2.1.0
451
+
452
+ * CSS vars for theme control
453
+ * Clear event improved for multi-select support
454
+ * Grouping improvements
455
+ * Svelte v3 upgrade bug fixes
456
+
457
+ ## 2.0.3
458
+
459
+ * allow html content in multi selection
460
+
461
+ ## 2.0.2
462
+
463
+ * CSS height bug fix
464
+ * Fix for Async loading (again)
465
+
466
+ ## 2.0.1
467
+
468
+ * Nothing, just npm being weird!
469
+
470
+ ## 2.0.0
471
+
472
+ * Upgrade to Svelte v3
473
+ * Added isCreatable
474
+
475
+ ## 1.7.6
476
+
477
+ * Fix for Async loading
478
+ * Security patch
479
+
480
+ ## 1.7.5
481
+
482
+ * Disabled colour values updated
483
+
484
+
485
+ ## 1.7.4
486
+
487
+ * Fix for destroy method
488
+
489
+ ## 1.7.3
490
+
491
+ * Fix for isOutOfViewport.js import typo
492
+
493
+
494
+ ## 1.7.2
495
+
496
+ * Moved svelte-virtual-list into source
497
+
498
+ ## 1.7.1
499
+
500
+ * Fix for svelte-virtual-list
501
+
502
+ ## 1.7.0
503
+
504
+ * Multi-select bug fixes
505
+ * Added hasError prop and styles
506
+ * Added isVirtualList prop (Experimental)
507
+
508
+ ## 1.6.0
509
+
510
+ * Added menuPlacement
511
+
512
+ ## 1.5.5
513
+
514
+ * multiple on:select bug fix
515
+
516
+ ## 1.5.4
517
+
518
+ * Set background default to #fff
519
+ * Only fire select event when a new item is selected
520
+
521
+ ## 1.5.3
522
+
523
+ * Removed unused class causing warnings
524
+ * README typo
525
+
526
+ ## 1.5.2
527
+
528
+ * Reset highlighted item index to 0 when list updates or filters
529
+
530
+ ## 1.5.1
531
+
532
+ * Fix for npm publish missing a file
533
+
534
+ ## 1.5.0
535
+
536
+ * Added events for select and clear
537
+ * Updated README
538
+ * Added tests
539
+
540
+ ## 1.4.0
541
+
542
+ * Added hideEmptyState
543
+ * Updated README
544
+ * Added tests
545
+
546
+ ## 1.3.0
547
+
548
+ * Updated README
549
+ * Updated filtering with loadOptions
550
+ * LeftArrow and RightArrow now remove highlight from list items
551
+ * Added tests
552
+ * Updated examples
553
+
554
+ ## 1.2.0
555
+
556
+ * Updated README
557
+ * Added Async (loadOptions)
558
+ * Added noOptionsMessage
559
+ * Bug fixes
560
+ * Updated examples
561
+
562
+ ## 1.1.0
563
+
564
+ * Updated README
565
+ * Added Multi-select
566
+ * Added Grouping
567
+ * IE11 support
568
+
569
+ ## 1.0.0
570
+
571
+ * First release
package/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ Copyright (c) 2019 Robert Balfre
2
+
3
+ Permission is hereby granted by the authors of this software, to any person, to use the software for any purpose, free of charge, including the rights to run, read, copy, change, distribute and sell it, and including usage rights to any patents the authors may hold on it, subject to the following conditions:
4
+
5
+ This license, or a link to its text, must be included with all copies of the software and any derivative works.
6
+
7
+ Any modification to the software submitted to the authors may be incorporated into the software under the terms of this license.
8
+
9
+ The software is provided "as is", without warranty of any kind, including but not limited to the warranties of title, fitness, merchantability and non-infringement. The authors have no obligation to provide support or updates for the software, and may not be held liable for any damages, claims or other liability arising from its use.
@@ -0,0 +1,98 @@
1
+ ## Migrating for v4 to v5
2
+
3
+ v5 is a major release that that includes some ⚠️ BREAKING CHANGES ⚠️
4
+
5
+ ### Event changes:
6
+ Updated in `5.0.0-beta.39`
7
+
8
+ `on:change` event fires when the user selects an option.
9
+
10
+ `on:input` event fires when the value has been changed.
11
+
12
+ ### Removed
13
+ Removed `getOptionLabel`, `getGroupHeaderLabel` and `noOptionsMessage`.
14
+
15
+ Removed `Selection`, `ChevronIcon`, `ClearIcon`, `LoadingIcon`, `Icon`, `List` and `Item` components. Please use named slots instead:
16
+
17
+ ```html
18
+ <Select bind:items bind:value>
19
+ <div slot="prepend" />
20
+ <div slot="selection" let:selection />
21
+ <div slot="clear-icon" />
22
+ <div slot="multi-clear-icon" />
23
+ <div slot="loading-icon" />
24
+ <div slot="chevron-icon" />
25
+ <div slot="list" let:filteredItems />
26
+ <div slot="item" let:item let:index />
27
+ <div slot="empty" />
28
+ </Select>
29
+ ```
30
+
31
+ ### `isVirtualList` Removed
32
+ You can use named slots to achieve the same results, with more flexibility.
33
+ Example at [svelte-select-examples](https://svelte-select-examples.vercel.app/examples/advanced/virtual-list)
34
+
35
+ ### `isCreatable` Removed
36
+ Removed `isCreatable` prop and `itemCreated` event, named slots can be used to build your own create method.
37
+ Example at [svelte-select-examples](https://svelte-select-examples.vercel.app/examples/advanced/create-item)
38
+
39
+ ### CSS Camel to kebab:
40
+
41
+ CSS classes and custom properties changed (only depreciated, no need to update if upgrading from v4) from camel to kebab case. For example `selectedItem` → `selected-item` and `--borderRadius` → `--border-radius`
42
+
43
+ ### Redundant CSS custom properties:
44
+
45
+ The following CSS custom properties were removed in v5.
46
+
47
+ ```css
48
+ --clearSelectColor
49
+ --clearSelectFocusColor
50
+ --clearSelectHoverColor
51
+ --groupTitleTextTransform
52
+ --indicatorColor
53
+ --indicatorFill
54
+ --indicatorHeight
55
+ --listLeft
56
+ --listRight
57
+ --multiClearBG
58
+ --multiClearFill
59
+ --multiClearHeight
60
+ --multiClearHoverBG
61
+ --multiClearHoverFill
62
+ --multiClearPadding
63
+ --multiClearRadius
64
+ --multiClearTextAlign
65
+ --multiClearTop
66
+ --multiClearWidth
67
+ --multiItemActiveBG
68
+ --multiItemActiveColor
69
+ --spinnerLeft
70
+ --spinnerRight
71
+ --virtualListHeight
72
+ ```
73
+
74
+
75
+ ### Other CSS class name changes:
76
+ `selectContainer` → `svelte-select`<br/>
77
+ `listContainer` → `svelte-select-list`<br/>
78
+ `indicator` → `chevron`<br/>
79
+ `--clear-icon-colour` → `--clear-icon-color`<br/>
80
+ `virtual-list` removed
81
+
82
+
83
+ ### Prop changes:
84
+ `containerClasses` → `class`<br/>
85
+ `MultiSelection` → `Multi`<br/>
86
+ `indicatorSvg` → `ChevronIcon`<br/>
87
+ `showIndicator` → `showChevron`<br/>
88
+ `loadOptionsInterval` → `debounceWait`<br/>
89
+ `isMulti` → `multiple`<br/>
90
+ `isWaiting` → `loading`<br/>
91
+ `isClearable` → `clearable`<br/>
92
+ `isFocused` → `focused`<br/>
93
+ `isGroupHeaderSelectable` → `groupHeaderSelectable`<br/>
94
+ `isDisabled` → `disabled`<br/>
95
+ `isSearchable` → `searchable`<br/>
96
+ `labelIdentifier` -> `label`<br/>
97
+ `optionIdentifier` -> `itemId`<br/>
98
+ `selectedValue` removed (was already deprecated in v4 in favour of `value`)<br/>