svelte-multiselect 8.2.2 → 8.2.3
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/MultiSelect.svelte +38 -39
- package/changelog.md +7 -0
- package/package.json +1 -1
- package/readme.md +2 -2
package/MultiSelect.svelte
CHANGED
|
@@ -399,36 +399,39 @@ const dragstart = (idx) => (event) => {
|
|
|
399
399
|
{/if}
|
|
400
400
|
</li>
|
|
401
401
|
{/each}
|
|
402
|
+
<li style="display: contents;">
|
|
403
|
+
<input
|
|
404
|
+
class={inputClass}
|
|
405
|
+
bind:this={input}
|
|
406
|
+
{autocomplete}
|
|
407
|
+
bind:value={searchText}
|
|
408
|
+
on:mouseup|self|stopPropagation={open_dropdown}
|
|
409
|
+
on:keydown|stopPropagation={handle_keydown}
|
|
410
|
+
on:focus
|
|
411
|
+
on:focus={open_dropdown}
|
|
412
|
+
{id}
|
|
413
|
+
{disabled}
|
|
414
|
+
{inputmode}
|
|
415
|
+
{pattern}
|
|
416
|
+
placeholder={selected.length == 0 ? placeholder : null}
|
|
417
|
+
aria-invalid={invalid ? `true` : null}
|
|
418
|
+
ondrop="return false"
|
|
419
|
+
on:blur
|
|
420
|
+
on:change
|
|
421
|
+
on:click
|
|
422
|
+
on:keydown
|
|
423
|
+
on:keyup
|
|
424
|
+
on:mousedown
|
|
425
|
+
on:mouseenter
|
|
426
|
+
on:mouseleave
|
|
427
|
+
on:touchcancel
|
|
428
|
+
on:touchend
|
|
429
|
+
on:touchmove
|
|
430
|
+
on:touchstart
|
|
431
|
+
/>
|
|
432
|
+
<!-- the above on:* lines forward potentially useful DOM events -->
|
|
433
|
+
</li>
|
|
402
434
|
</ul>
|
|
403
|
-
<input
|
|
404
|
-
class={inputClass}
|
|
405
|
-
bind:this={input}
|
|
406
|
-
{autocomplete}
|
|
407
|
-
bind:value={searchText}
|
|
408
|
-
on:mouseup|self|stopPropagation={open_dropdown}
|
|
409
|
-
on:keydown|stopPropagation={handle_keydown}
|
|
410
|
-
on:focus
|
|
411
|
-
on:focus={open_dropdown}
|
|
412
|
-
{id}
|
|
413
|
-
{disabled}
|
|
414
|
-
{inputmode}
|
|
415
|
-
{pattern}
|
|
416
|
-
placeholder={selected.length == 0 ? placeholder : null}
|
|
417
|
-
aria-invalid={invalid ? `true` : null}
|
|
418
|
-
on:blur
|
|
419
|
-
on:change
|
|
420
|
-
on:click
|
|
421
|
-
on:keydown
|
|
422
|
-
on:keyup
|
|
423
|
-
on:mousedown
|
|
424
|
-
on:mouseenter
|
|
425
|
-
on:mouseleave
|
|
426
|
-
on:touchcancel
|
|
427
|
-
on:touchend
|
|
428
|
-
on:touchmove
|
|
429
|
-
on:touchstart
|
|
430
|
-
/>
|
|
431
|
-
<!-- the above on:* lines forward potentially useful DOM events -->
|
|
432
435
|
{#if loading}
|
|
433
436
|
<slot name="spinner">
|
|
434
437
|
<CircleSpinner />
|
|
@@ -538,8 +541,8 @@ const dragstart = (idx) => (event) => {
|
|
|
538
541
|
border: var(--sms-border, 1pt solid lightgray);
|
|
539
542
|
border-radius: var(--sms-border-radius, 3pt);
|
|
540
543
|
background: var(--sms-bg);
|
|
541
|
-
width: var(--sms-width
|
|
542
|
-
max-width: var(--sms-max-width
|
|
544
|
+
width: var(--sms-width);
|
|
545
|
+
max-width: var(--sms-max-width);
|
|
543
546
|
padding: var(--sms-padding, 0 3pt);
|
|
544
547
|
color: var(--sms-text-color);
|
|
545
548
|
font-size: var(--sms-font-size, inherit);
|
|
@@ -608,23 +611,19 @@ const dragstart = (idx) => (event) => {
|
|
|
608
611
|
margin: auto 0; /* CSS reset */
|
|
609
612
|
padding: 0; /* CSS reset */
|
|
610
613
|
}
|
|
611
|
-
:where(div.multiselect > ul.selected
|
|
614
|
+
:where(div.multiselect > ul.selected > li > input) {
|
|
612
615
|
border: none;
|
|
613
616
|
outline: none;
|
|
614
617
|
background: none;
|
|
618
|
+
flex: 1; /* this + next line fix issue #12 https://git.io/JiDe3 */
|
|
619
|
+
min-width: 2em;
|
|
615
620
|
/* ensure input uses text color and not --sms-selected-text-color */
|
|
616
621
|
color: var(--sms-text-color);
|
|
617
622
|
font-size: inherit;
|
|
618
623
|
cursor: inherit; /* needed for disabled state */
|
|
619
624
|
border-radius: 0; /* reset ul.selected > li */
|
|
620
|
-
width: 0;
|
|
621
|
-
visibility: hidden;
|
|
622
|
-
}
|
|
623
|
-
:where(div.multiselect:focus-within > ul.selected + input) {
|
|
624
|
-
visibility: visible;
|
|
625
|
-
width: 3em;
|
|
626
625
|
}
|
|
627
|
-
:where(div.multiselect > ul.selected
|
|
626
|
+
:where(div.multiselect > ul.selected > li > input::placeholder) {
|
|
628
627
|
padding-left: 5pt;
|
|
629
628
|
color: var(--sms-placeholder-color);
|
|
630
629
|
opacity: var(--sms-placeholder-opacity);
|
package/changelog.md
CHANGED
|
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
<!-- auto-changelog-above -->
|
|
6
6
|
|
|
7
|
+
#### [v8.2.3](https://github.com/janosh/svelte-multiselect/compare/v8.2.2...v8.2.3)
|
|
8
|
+
|
|
9
|
+
> 28 December 2022
|
|
10
|
+
|
|
11
|
+
- add 'Open in StackBlitz' links to example code fences [`ac07557`](https://github.com/janosh/svelte-multiselect/commit/ac075576c261892807faa0071b5f3e0b5b4fcd2c)
|
|
12
|
+
- v8.2.2 contains unintended breaking changes and was deprecated on NPM (see [#188](https://github.com/janosh/svelte-multiselect/issues/188)). Use this fixed release instead. [`ef4d669`](https://github.com/janosh/svelte-multiselect/commit/ef4d669)
|
|
13
|
+
|
|
7
14
|
#### [v8.2.2](https://github.com/janosh/svelte-multiselect/compare/v8.2.1...v8.2.2)
|
|
8
15
|
|
|
9
16
|
> 18 December 2022
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -485,8 +485,8 @@ If you only want to make small adjustments, you can pass the following CSS varia
|
|
|
485
485
|
- `background: var(--sms-bg)`
|
|
486
486
|
- `color: var(--sms-text-color)`
|
|
487
487
|
- `min-height: var(--sms-min-height, 22pt)`
|
|
488
|
-
- `width: var(--sms-width
|
|
489
|
-
- `max-width: var(--sms-max-width
|
|
488
|
+
- `width: var(--sms-width)`
|
|
489
|
+
- `max-width: var(--sms-max-width)`
|
|
490
490
|
- `margin: var(--sms-margin)`
|
|
491
491
|
- `font-size: var(--sms-font-size, inherit)`
|
|
492
492
|
- `div.multiselect.open`
|