simplesvelte 2.4.4 → 2.4.5

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 (2) hide show
  1. package/dist/Select.svelte +6 -18
  2. package/package.json +1 -1
@@ -405,6 +405,7 @@
405
405
  aria-expanded={dropdownOpen}
406
406
  aria-haspopup="listbox"
407
407
  aria-controls={popoverId}
408
+ tabindex="-1"
408
409
  class="select relative h-max min-h-10 w-full min-w-12 cursor-pointer bg-none! pr-1 text-left"
409
410
  style="anchor-name: {anchorName}"
410
411
  title={tooltipText}
@@ -427,18 +428,11 @@
427
428
  <span class="max-w-[200px] truncate">{selectedItems[0].label}</span>
428
429
  <span
429
430
  role="button"
430
- tabindex="0"
431
+ tabindex="-1"
431
432
  class="btn btn-xs btn-circle btn-ghost hover:bg-base-300"
432
433
  onclick={(e) => {
433
434
  e.stopPropagation()
434
435
  removeSelectedItem(selectedItems[0].value)
435
- }}
436
- onkeydown={(e) => {
437
- if (e.key === 'Enter' || e.key === ' ') {
438
- e.preventDefault()
439
- e.stopPropagation()
440
- removeSelectedItem(selectedItems[0].value)
441
- }
442
436
  }}>
443
437
 
444
438
  </span>
@@ -479,19 +473,12 @@
479
473
  {#if !required && ((multiple && Array.isArray(normalizedValue) && normalizedValue.length > 0) || (!multiple && normalizedValue))}
480
474
  <span
481
475
  role="button"
482
- tabindex="0"
476
+ tabindex="-1"
483
477
  class="btn btn-sm btn-circle btn-ghost bg-base-100 absolute top-1 right-1"
484
478
  onclick={(e) => {
485
479
  e.preventDefault()
486
480
  e.stopPropagation()
487
481
  clearAll()
488
- }}
489
- onkeydown={(e) => {
490
- if (e.key === 'Enter' || e.key === ' ') {
491
- e.preventDefault()
492
- e.stopPropagation()
493
- clearAll()
494
- }
495
482
  }}>
496
483
 
497
484
  </span>
@@ -504,8 +491,9 @@
504
491
  id={popoverId}
505
492
  popover
506
493
  role="listbox"
507
- class="dropdown menu bg-base-100 rounded-box z-50 mt-2 flex flex-col flex-nowrap gap-1 p-2 shadow outline m-0 {!dropdownOpen ? 'pointer-events-none' : ''}"
508
- style="position-anchor: {anchorName}; position: fixed; top: anchor(bottom); left: anchor(left); width: anchor-size(width)"
494
+ inert={!dropdownOpen}
495
+ class="dropdown menu bg-base-100 rounded-box z-50 flex flex-col flex-nowrap gap-1 p-2 shadow outline m-0"
496
+ style="position-anchor: {anchorName}; position: fixed; top: anchor(bottom); left: anchor(left); width: anchor-size(width); margin-block: 0.5rem; position-try-fallbacks: flip-block;"
509
497
  ontoggle={handlePopoverToggle}>
510
498
  {#if multiple && filteredItems.length > 1}
511
499
  <!-- Select All / Clear All options for multi-select -->
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simplesvelte",
3
- "version": "2.4.4",
3
+ "version": "2.4.5",
4
4
  "scripts": {
5
5
  "dev": "bun vite dev",
6
6
  "build": "bun vite build && bun run prepack",