@keenmate/web-multiselect 1.0.0-rc08 → 1.0.0-rc10

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/README.md CHANGED
@@ -12,7 +12,7 @@ A lightweight, accessible multiselect web component with typeahead search, RTL l
12
12
  - 🔍 **Flexible Search Modes** - Filter (hide non-matches) or navigate (jump to matches, keep all visible)
13
13
  - ⌨️ **Keyboard Navigation** - Full keyboard support (arrows, Enter, Esc, Tab)
14
14
  - 🎨 **Rich Content** - Icons, subtitles, and multiline text support
15
- - 📊 **Multiple Display Modes** - Pills, count, compact, or partial (pills + threshold)
15
+ - 📊 **Multiple Display Modes** - Pills, count, compact, partial, or none (minimal UI)
16
16
  - 💬 **Pill Tooltips** - Customizable tooltips on selected items with placement control
17
17
  - 🎯 **Single & Multi-Select** - Switch between single and multiple selection modes
18
18
  - 🔄 **Async Data Loading** - On-demand data fetching support
@@ -116,7 +116,7 @@ multiselect.setSelected(['js', 'ts']);
116
116
  | `show-checkboxes` | `boolean` | `true` | Show checkboxes next to options |
117
117
  | `close-on-select` | `boolean` | `false` | Close dropdown after selecting |
118
118
  | `dropdown-min-width` | `string` | - | Min width for dropdown (e.g., '20rem') |
119
- | `pills-display-mode` | `'pills' \| 'count' \| 'compact' \| 'partial'` | `'pills'` | How to display selected items |
119
+ | `pills-display-mode` | `'pills' \| 'count' \| 'compact' \| 'partial' \| 'none'` | `'pills'` | How to display selected items. `compact`: first item + count. `none`: no display |
120
120
  | `pills-threshold` | `number` | - | Auto-switch mode when exceeded (see pills-threshold-mode) |
121
121
  | `pills-threshold-mode` | `'count' \| 'partial'` | `'count'` | Mode after threshold: 'count' shows badge, 'partial' shows limited pills + more badge |
122
122
  | `pills-max-visible` | `number` | `3` | Max pills shown in partial mode |
@@ -563,11 +563,16 @@ Perfect for different use cases and space constraints:
563
563
  <!-- Pills mode (default) - Show all selections as removable pills -->
564
564
  <web-multiselect pills-display-mode="pills"></web-multiselect>
565
565
 
566
- <!-- Count mode - Show only count badge -->
566
+ <!-- Count mode - Show "X selected" text with clear button -->
567
567
  <web-multiselect pills-display-mode="count" show-count-badge="true"></web-multiselect>
568
568
 
569
- <!-- Compact mode - Show first item + count -->
569
+ <!-- Compact mode - Show first item + count in a single removable pill -->
570
570
  <web-multiselect pills-display-mode="compact"></web-multiselect>
571
+ <!-- Example output: [JavaScript (+2 more) | x] -->
572
+
573
+ <!-- None mode - No display in pills area (minimal UI) -->
574
+ <web-multiselect pills-display-mode="none" show-count-badge="true"></web-multiselect>
575
+ <!-- Only shows [X] badge next to toggle icon -->
571
576
 
572
577
  <!-- Auto-switch from pills to count at threshold -->
573
578
  <web-multiselect
@@ -584,6 +589,15 @@ Perfect for different use cases and space constraints:
584
589
  </web-multiselect>
585
590
  ```
586
591
 
592
+ **Display Mode Behavior:**
593
+ - **`pills`**: Individual removable pills for each selected item. Calls `getPillDisplayCallback` for each item.
594
+ - **`count`**: Shows "X selected" text with clear button. Calls `getCountPillCallback(count)`.
595
+ - **`compact`**: Shows first item + count in single pill (e.g., "JavaScript (+2 more)"). Calls `getPillDisplayCallback(firstItem)` and `getCountPillCallback(count, remainingCount)`.
596
+ - **`partial`**: Shows first N pills + "+X more" badge. Calls `getPillDisplayCallback` for visible items and `getCountPillCallback(count, remainingCount)` for badge.
597
+ - **`none`**: No display in pills area. No callbacks invoked. Use with `show-count-badge="true"` for minimal UI.
598
+
599
+ **Count Badge (`show-count-badge="true"`)**: Independent feature showing `[X]` next to toggle icon. Works with all display modes. Not affected by callbacks.
600
+
587
601
  ### Pills Positioning
588
602
 
589
603
  Control where selected item badges appear relative to the input: