@keenmate/web-multiselect 1.12.0-rc08 → 2.0.0-rc01

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,37 @@ 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-rc01
25
+
26
+ **The core-adoption major.** `<web-multiselect>` is now built on
27
+ [`@keenmate/web-components-core`](https://www.npmjs.com/package/@keenmate/web-components-core)
28
+ (`BlissElement`) — shared, tested custom-element plumbing (attribute parsing,
29
+ reactivity, reflection, event handling, logging, registration, positioning). The
30
+ dropdown, tree, virtual scroll, theming, and every attribute behave the same; the
31
+ change is under the hood, with three **breaking** API changes to be aware of:
32
+
33
+ - **`onSelect` / `onDeselect` / `onChange` are event-handler properties now.** They
34
+ receive the `CustomEvent` (like `el.onclick`), so read `e.detail.option` /
35
+ `e.detail.selectedOptions` / `e.detail.selectedValues` instead of a bare
36
+ argument — equivalent to `addEventListener('select', …)`. The bubbling
37
+ `select` / `deselect` / `change` events are unchanged.
38
+ - **`setAttributes()` takes typed property values by camelCase key.**
39
+ `el.setAttributes({ searchPlaceholder: 'Search…', isCounterShown: true })`. To
40
+ batch attribute **strings**, use `el.batch(() => { el.setAttribute('search-placeholder', 'Search…'); … })`.
41
+ - **Property writes are async (coalesced).** Setting a property (e.g.
42
+ `el.options = […]`) applies on a microtask; `await el.whenSettled()` before
43
+ reading back rendered state. `setAttributes()` / `batch()` still flush
44
+ synchronously.
45
+ - **`data-options` gains CSV & plain formats.** The `data-options` attribute now
46
+ takes `data-options-format="json|csv|plain"` (default `json`) — feed a CSV table
47
+ (first row is a header; columns mapped via `*-member`) or a bare, newline-
48
+ delimited value list without hand-writing JSON. Field and row delimiters are
49
+ configurable via `data-options-splitter` / `data-options-row-splitter` (so TSV
50
+ or a custom separator is expressible in the attribute), and `data-options` is
51
+ now a fully reactive, shape-validated input — changing any of these re-renders.
52
+
53
+ See `CHANGELOG.md` for the full list.
54
+
24
55
  ## What's New in v1.12.0-rc08
25
56
 
26
57
  - **Panel sizing — dropdown and popover are independently sizable via CSS variables** — The options dropdown and selected-items popover no longer inherit the input's width. `--ms-dropdown-width` (defaults to the live input width) and `--ms-selected-popover-width` (intrinsic 32rem) drive them, alongside the existing max-height variables. Set them at app level (`web-multiselect { --ms-dropdown-width: 60rem }`) or override a single instance with the new `dropdown-width` / `selected-popover-width` attributes, which write those variables inline on the element. This also fixes a latent bug where `--ms-selected-popover-width` was dead (an internal width-sync always overrode it), so the popover now honours its 32rem default. See section 14 of `examples-tree.html`.
@@ -29,12 +60,6 @@ Reads `--base-*` variables from the page if [`@keenmate/theme-designer`](https:/
29
60
  - **Theming cleanup — dead input size-variant surface removed from the bundle** — The unused `.ms__input--xs/sm/lg/xl` preset classes and their `--ms-input-size-*` variable chain were never wired to anything (no `size` attribute toggles them), so they've been commented out — kept for a possible future preset API but no longer shipped as dead CSS (the compiled stylesheet shrank ~2 kB). Input sizing still works through `--ms-rem` for proportional global scale or the individual `--ms-input-*` variables for targeted overrides.
30
61
  - **Fixes — badge hover and live cascade switching** — Badge hover no longer washes the chip to white (the hover background fell through to the white input background; it now deepens the accent tint, dark-mode aware). And switching `checkbox-mode` or `cascade-select-policy` live rebuilds the cascade index and silently re-projects the current selection, so badges, form value, and checkboxes all reflect the new mode instantly.
31
62
 
32
- ## What's New in v1.12.0-rc07
33
-
34
- - **Selection — `setSelected(values, { notify: true })` announces programmatic changes** — `setSelected()` stays silent by default (restoring saved state, cascade/dependent resets, and server-authoritative corrections must not re-fire `change`, or they trip "the user changed it" handlers and can bounce in a feedback loop), but the new `{ notify: true }` option fires a **single aggregate `change`** — no per-item `select`/`deselect` flood — for when a programmatic change is a deliberate user gesture, e.g. a custom action button that sets the selection and should reach the same listeners a manual pick does. Threaded through both the internal picker and the web component's `setSelected`.
35
- - **Cascade mode — Select All now honours the value policy** — the built-in `select-all` action added every selectable node's value directly, bypassing the cascade projection, so with `checkbox-mode="cascade"` + `cascade-select-policy="rolled-up"` it emitted every node instead of the rolled-up roots (unlike a click, which rolls up). `selectAll()` is now cascade-aware — it fills the checked-atom set from the visible nodes and projects through the active policy via a shared `commitCascadeAtoms` helper — so Select All emits the same shape a click does. Shown in the new "Action Buttons" section of `examples-tree.html`.
36
- - **Options no longer text-select on click-drag** — clicking a row, or dragging across the dropdown, used to highlight the labels like selectable text, which reads as broken for a pure selection gesture (most visible on the denser tree rows). Options now set `user-select: none` (with the `-webkit-` prefix) on `.ms__option`. Purely presentational — no API or behaviour change.
37
-
38
63
  > ⚠️ **Security notice:** This component intentionally allows raw HTML in rendering callbacks to give developers full control over content display. If you display user-generated content, you must sanitize it yourself. See [docs/examples.md → HTML Injection (XSS) notice](./docs/examples.md#html-injection-xss-notice) for the complete list of affected callbacks.
39
64
 
40
65
  ## Demos & docs