@keenmate/web-multiselect 2.0.0-rc03 → 2.0.0-rc05
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 +29 -69
- package/custom-elements.json +31 -0
- package/dist/index.d.ts +12 -0
- package/dist/multiselect.js +1667 -1630
- package/dist/multiselect.umd.js +18 -18
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/css/floating.css +105 -8
- package/src/css/variables.css +37 -1
- package/web-types.json +1 -1
package/README.md
CHANGED
|
@@ -21,75 +21,35 @@ 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-
|
|
25
|
-
|
|
26
|
-
**Full-screen dropdown
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
[`@keenmate/web-components-core`](https://www.npmjs.com/package/@keenmate/web-components-core)
|
|
54
|
-
(via `BlissElement`'s `environmentChanged` hook), which this release pins at
|
|
55
|
-
**1.0.0-rc06** — rc04 also **dropped `loglevel`** as a transitive runtime
|
|
56
|
-
dependency. The floating dropdown additionally gains a viewport-width safety cap so
|
|
57
|
-
a wide panel can't overflow the screen edge.
|
|
58
|
-
|
|
59
|
-
**Right-to-left, done properly — including runtime switching.** Give the element (or
|
|
60
|
-
any ancestor) `dir="rtl"` and the whole component mirrors: the toggle and in-input
|
|
61
|
-
counter move to the left, checkboxes sit on the right of each row, badges reverse,
|
|
62
|
-
and the full-screen overlay mirrors too (search/close swap sides, the match
|
|
63
|
-
navigator flips). RTL is now built on CSS **logical properties** driven by the
|
|
64
|
-
inherited direction, which fixes cases that silently never worked before — the
|
|
65
|
-
dropdown, hint, and selected-popover live in the shadow root, so the old `.ms--rtl`
|
|
66
|
-
override rules never reached them. And flipping `dir` at runtime — an app-wide
|
|
67
|
-
language switch — re-mirrors the live picker without a rebuild (via core rc06's new
|
|
68
|
-
`directionChanged` hook).
|
|
69
|
-
|
|
70
|
-
**Friendlier phone browsing.** The full-screen sheet opens with the **keyboard
|
|
71
|
-
closed** by default, so you can scan long lists and reach the bottom action buttons
|
|
72
|
-
before typing (opt into immediate type-to-filter with `fullscreen-autofocus="true"`).
|
|
73
|
-
The phone **Back gesture** now closes the sheet instead of navigating the page away.
|
|
74
|
-
In `search-mode="navigate"`, an on-screen **match navigator** (an `N of M` count plus
|
|
75
|
-
prev/next buttons) stands in for the desktop `Ctrl`+`Arrow` match-stepping that touch
|
|
76
|
-
can't do — and the focused match now stays visible above the keyboard instead of
|
|
77
|
-
scrolling behind it. Tapping an option no longer pops the keyboard mid-browse.
|
|
78
|
-
|
|
79
|
-
See `CHANGELOG.md` for the full list.
|
|
80
|
-
|
|
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.
|
|
24
|
+
## What's New in v2.0.0-rc05
|
|
25
|
+
|
|
26
|
+
- **Full-screen overlays — content no longer clipped under landscape system bars** — Rotating a phone to landscape with the full-screen dropdown (or the selected-items popover) open used to push the search field and option rows *under* the Android navigation bar and camera cutout — the field looked "too wide for the screen" and each row's leading edge was hidden. Cause: the sheets are `width: 100vw` (the full physical width) with no safe-area handling. They now set `box-sizing: border-box` and inset their content box by `env(safe-area-inset-{top,right,bottom,left})` on all four edges — the background stays edge-to-edge (full-bleed, no corner gaps) while the header · list · actions column is pulled into the visible region, and the fullscreen toast lifts above the bottom safe area. `env()` resolves to `0` unless the host page opts into edge-to-edge, so this is a no-op on non-cutout / letterboxed pages — a fix where needed, never a regression. Consumer note: for the insets to engage the host page must set `<meta name="viewport" content="… viewport-fit=cover">` (the mobile examples/tests now do).
|
|
27
|
+
|
|
28
|
+
## What's New in v2.0.0-rc04
|
|
29
|
+
|
|
30
|
+
**Phone search — one-tap clear and a keyboard that gets out of the way** — The
|
|
31
|
+
full-screen search sheet gained the two things it was missing on touch. A clear button
|
|
32
|
+
now sits at the trailing edge of the search field (a distinct Lucide `search-x` glyph,
|
|
33
|
+
so it doesn't read as a second close ✕) to wipe the term in one tap and restore the full
|
|
34
|
+
list. And the soft keyboard, which used to stay pinned open once you focused the field,
|
|
35
|
+
now tucks away on the three natural "done typing" gestures — scrolling the list, tapping
|
|
36
|
+
an option, or pressing Enter/Search — while never dismissing itself mid-type from a
|
|
37
|
+
programmatic scroll-to-match.
|
|
38
|
+
|
|
39
|
+
**A close button you can make your own** — The full-screen close ✕ is now a themeable
|
|
40
|
+
chip: the new `--ms-fullscreen-close-bg`, `--ms-fullscreen-close-border`, and
|
|
41
|
+
`--ms-fullscreen-close-border-radius` variables turn the bare glyph into a bordered
|
|
42
|
+
button (à la a command-palette close) while the defaults keep it a plain round ✕. Its
|
|
43
|
+
tap target was also fixed — the previously-dead padding around the button in the sheet's
|
|
44
|
+
top-trailing corner (the natural place to reach) now dismisses the sheet, without ever
|
|
45
|
+
stealing taps from the first option row or the search field.
|
|
46
|
+
|
|
47
|
+
**Right presentation on every device, via core rc07** — This release pins
|
|
48
|
+
`@keenmate/web-components-core` at `1.0.0-rc07` and adopts its reworked
|
|
49
|
+
`resolvePresentation` / `classifyDevice` API. Behavior is unchanged — full-screen on
|
|
50
|
+
phones, floating on tablet and desktop — with one refinement from the new capability
|
|
51
|
+
gate: a narrowed desktop window (fine pointer, hover) now stays `desktop` and keeps its
|
|
52
|
+
floating dropdown at any width, instead of ever flipping to the full-screen sheet.
|
|
93
53
|
|
|
94
54
|
See `CHANGELOG.md` for the full list.
|
|
95
55
|
|
package/custom-elements.json
CHANGED
|
@@ -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
|
/**
|