svelte-multiselect 3.2.0 → 3.2.1

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.
@@ -227,22 +227,22 @@ display above those of another following shortly after it -->
227
227
  {/if}
228
228
  </li>
229
229
  {/each}
230
- <input
231
- bind:this={input}
232
- autocomplete="off"
233
- bind:value={searchText}
234
- on:mouseup|self|stopPropagation={() => setOptionsVisible(true)}
235
- on:keydown={handleKeydown}
236
- on:focus={() => setOptionsVisible(true)}
237
- {id}
238
- {name}
239
- placeholder={selectedLabels.length ? `` : placeholder}
240
- />
241
230
  </ul>
231
+ <input
232
+ bind:this={input}
233
+ autocomplete="off"
234
+ bind:value={searchText}
235
+ on:mouseup|self|stopPropagation={() => setOptionsVisible(true)}
236
+ on:keydown={handleKeydown}
237
+ on:focus={() => setOptionsVisible(true)}
238
+ {id}
239
+ {name}
240
+ placeholder={selectedLabels.length ? `` : placeholder}
241
+ />
242
242
  {#if readonly}
243
243
  <ReadOnlyIcon height="14pt" />
244
244
  {:else if selected.length > 0}
245
- {#if maxSelect !== null && maxSelect > 1}
245
+ {#if maxSelect !== null && maxSelectMsg !== null}
246
246
  <Wiggle bind:wiggle angle={20}>
247
247
  <span style="padding: 0 3pt;">{maxSelectMsg(selected.length, maxSelect)}</span>
248
248
  </Wiggle>
@@ -314,6 +314,12 @@ display above those of another following shortly after it -->
314
314
  background: var(--sms-readonly-bg, lightgray);
315
315
  }
316
316
 
317
+ :where(ul.selected) {
318
+ display: flex;
319
+ padding: 0;
320
+ margin: 0;
321
+ flex-wrap: wrap;
322
+ }
317
323
  :where(ul.selected > li) {
318
324
  background: var(--sms-selected-bg, var(--sms-active-color, cornflowerblue));
319
325
  align-items: center;
@@ -347,7 +353,7 @@ display above those of another following shortly after it -->
347
353
  transform: scale(1.04);
348
354
  }
349
355
 
350
- :where(div.multiselect input) {
356
+ :where(div.multiselect > input) {
351
357
  border: none;
352
358
  outline: none;
353
359
  background: none;
@@ -359,15 +365,6 @@ display above those of another following shortly after it -->
359
365
  font-size: calc(16px + 0.1vw);
360
366
  }
361
367
 
362
- :where(ul.selected) {
363
- display: flex;
364
- padding: 0;
365
- margin: 0;
366
- flex-wrap: wrap;
367
- flex: 1;
368
- overscroll-behavior: none;
369
- }
370
-
371
368
  :where(ul.options) {
372
369
  list-style: none;
373
370
  max-height: 50vh;
@@ -378,6 +375,7 @@ display above those of another following shortly after it -->
378
375
  border-radius: 1ex;
379
376
  overflow: auto;
380
377
  background: var(--sms-options-bg, white);
378
+ overscroll-behavior: var(--sms-options-overscroll, none);
381
379
  }
382
380
  :where(ul.options.hidden) {
383
381
  visibility: hidden;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "homepage": "https://svelte-multiselect.netlify.app",
6
6
  "repository": "https://github.com/janosh/svelte-multiselect",
7
7
  "license": "MIT",
8
- "version": "3.2.0",
8
+ "version": "3.2.1",
9
9
  "type": "module",
10
10
  "svelte": "index.js",
11
11
  "bugs": "https://github.com/janosh/svelte-multiselect/issues",
package/readme.md CHANGED
@@ -203,7 +203,7 @@ If you only want to make small adjustments, you can pass the following CSS varia
203
203
  - `background: var(--sms-readonly-bg, lightgray)`: Background when in readonly state.
204
204
  - `div.multiselect.open`:
205
205
  - `z-index: var(--sms-open-z-index, 4)`: Useful to ensure the dropdown list of options is displayed on top of other page elements of increased `z-index`.
206
- - `div.multiselect input`
206
+ - `div.multiselect > input`
207
207
  - `color: var(--sms-text-color, inherit)`: Input text color.
208
208
  - `ul.selected > li`:
209
209
  - `background: var(--sms-selected-bg, var(--sms-active-color, cornflowerblue))`: Background of selected options.
@@ -211,6 +211,7 @@ If you only want to make small adjustments, you can pass the following CSS varia
211
211
  - `color: var(--sms-remove-x-hover-focus-color, lightskyblue)`: Color of the cross-icon buttons for removing all or individual selected options when in `:focus` or `:hover` state.
212
212
  - `ul.options`
213
213
  - `background: var(--sms-options-bg, white)`: Background of options list.
214
+ - `background: var(--sms-options-overscroll, none)`: Whether scroll events bubble to parent elements when reaching the top/bottom of the options dropdown. See [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/overscroll-behavior).
214
215
  - `ul.options > li.selected`
215
216
  - `background: var(--sms-li-selected-bg, inherit)`: Background of selected list items in options pane.
216
217
  - `color: var(--sms-li-selected-color, inherit)`: Text color of selected list items in options pane.