@keenmate/web-multiselect 2.0.0-rc03 → 2.0.0-rc04

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
@@ -21,6 +21,34 @@ Reads `--base-*` variables from the page if [`@keenmate/theme-designer`](https:/
21
21
  - Custom rendering callbacks for options, badges, and group headers.
22
22
  - Form integration via standard hidden inputs (FormData-compatible).
23
23
 
24
+ ## What's New in v2.0.0-rc04
25
+
26
+ **Phone search — one-tap clear and a keyboard that gets out of the way** — The
27
+ full-screen search sheet gained the two things it was missing on touch. A clear button
28
+ now sits at the trailing edge of the search field (a distinct Lucide `search-x` glyph,
29
+ so it doesn't read as a second close ✕) to wipe the term in one tap and restore the full
30
+ list. And the soft keyboard, which used to stay pinned open once you focused the field,
31
+ now tucks away on the three natural "done typing" gestures — scrolling the list, tapping
32
+ an option, or pressing Enter/Search — while never dismissing itself mid-type from a
33
+ programmatic scroll-to-match.
34
+
35
+ **A close button you can make your own** — The full-screen close ✕ is now a themeable
36
+ chip: the new `--ms-fullscreen-close-bg`, `--ms-fullscreen-close-border`, and
37
+ `--ms-fullscreen-close-border-radius` variables turn the bare glyph into a bordered
38
+ button (à la a command-palette close) while the defaults keep it a plain round ✕. Its
39
+ tap target was also fixed — the previously-dead padding around the button in the sheet's
40
+ top-trailing corner (the natural place to reach) now dismisses the sheet, without ever
41
+ stealing taps from the first option row or the search field.
42
+
43
+ **Right presentation on every device, via core rc07** — This release pins
44
+ `@keenmate/web-components-core` at `1.0.0-rc07` and adopts its reworked
45
+ `resolvePresentation` / `classifyDevice` API. Behavior is unchanged — full-screen on
46
+ phones, floating on tablet and desktop — with one refinement from the new capability
47
+ gate: a narrowed desktop window (fine pointer, hover) now stays `desktop` and keeps its
48
+ floating dropdown at any width, instead of ever flipping to the full-screen sheet.
49
+
50
+ See `CHANGELOG.md` for the full list.
51
+
24
52
  ## What's New in v2.0.0-rc03
25
53
 
26
54
  **Full-screen dropdown on phones (`mobile-presentation`).** On a phone, a dropdown
@@ -78,21 +106,6 @@ scrolling behind it. Tapping an option no longer pops the keyboard mid-browse.
78
106
 
79
107
  See `CHANGELOG.md` for the full list.
80
108
 
81
- ## What's New in v2.0.0-rc02
82
-
83
- **Form association restored for host frameworks (`el.form`).** Selecting inside a
84
- `<web-multiselect>` that lives in a `<form>` again delivers changes to frameworks
85
- that resolve the parent form via `event.target.form` — most notably Phoenix
86
- LiveView's `phx-change` delegation, which silently dropped changes in rc01.
87
- `<web-multiselect>` is a form-associated custom element, so it now exposes a real
88
- `el.form` / `event.target.form` like a native control. (rc01 had hardened its
89
- internal `ElementInternals` handle to a true `#private` field, which killed the
90
- `.form` that host-framework wrappers read.) The fix lives upstream in
91
- [`@keenmate/web-components-core`](https://www.npmjs.com/package/@keenmate/web-components-core)
92
- 1.0.0-rc02 (the `el.form` getter), which this release pins.
93
-
94
- See `CHANGELOG.md` for the full list.
95
-
96
109
  ## Demos & docs
97
110
 
98
111
  - 🚀 [Live demo](https://web-multiselect.keenmate.dev)
@@ -487,6 +487,15 @@
487
487
  "privacy": "private",
488
488
  "default": "null"
489
489
  },
490
+ {
491
+ "kind": "field",
492
+ "name": "fullscreenSearchClear",
493
+ "type": {
494
+ "text": "HTMLButtonElement | null"
495
+ },
496
+ "privacy": "private",
497
+ "default": "null"
498
+ },
490
499
  {
491
500
  "kind": "field",
492
501
  "name": "fullscreenNav",
@@ -2132,6 +2141,28 @@
2132
2141
  },
2133
2142
  "description": "Sync the fullscreen match navigator (navigate mode only) with the current search\r\nstate: hide it until there's a term, then show \"N of M\" while a match is focused\r\n(or \"M matches\" / \"No matches\"), and disable the prev/next buttons when there's\r\nnothing to step through. No-op when the navigator isn't built (floating panel,\r\nfilter mode, or search disabled)."
2134
2143
  },
2144
+ {
2145
+ "kind": "method",
2146
+ "name": "updateFullscreenSearchClear",
2147
+ "privacy": "private",
2148
+ "return": {
2149
+ "type": {
2150
+ "text": "void"
2151
+ }
2152
+ },
2153
+ "description": "Show the fullscreen search's inline clear (✕) only while the field has text.\r\nNo-op when the button isn't built (floating panel, readonly/hidden search)."
2154
+ },
2155
+ {
2156
+ "kind": "method",
2157
+ "name": "clearFullscreenSearch",
2158
+ "privacy": "private",
2159
+ "return": {
2160
+ "type": {
2161
+ "text": "void"
2162
+ }
2163
+ },
2164
+ "description": "Clear the fullscreen search term via the same path a keystroke takes, then\r\nrefocus the field so the user can keep typing. Touch has no keyboard Escape,\r\nso this button is the on-screen way to reset a search."
2165
+ },
2135
2166
  {
2136
2167
  "kind": "method",
2137
2168
  "name": "positionHint",
package/dist/index.d.ts CHANGED
@@ -777,6 +777,7 @@ export declare class WebMultiSelect<T = any> {
777
777
  private presentationMode;
778
778
  private fullscreenHeader;
779
779
  private fullscreenSearchInput;
780
+ private fullscreenSearchClear;
780
781
  private fullscreenNav;
781
782
  private fullscreenNavCount;
782
783
  private fullscreenNavPrev;
@@ -1175,6 +1176,17 @@ export declare class WebMultiSelect<T = any> {
1175
1176
  * filter mode, or search disabled).
1176
1177
  */
1177
1178
  private updateFullscreenNav;
1179
+ /**
1180
+ * Show the fullscreen search's inline clear (✕) only while the field has text.
1181
+ * No-op when the button isn't built (floating panel, readonly/hidden search).
1182
+ */
1183
+ private updateFullscreenSearchClear;
1184
+ /**
1185
+ * Clear the fullscreen search term via the same path a keystroke takes, then
1186
+ * refocus the field so the user can keep typing. Touch has no keyboard Escape,
1187
+ * so this button is the on-screen way to reset a search.
1188
+ */
1189
+ private clearFullscreenSearch;
1178
1190
  private positionHint;
1179
1191
  private parseInitialSelection;
1180
1192
  /**