@iyulab/components 2.3.0 → 2.3.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.3.1] - 2026-10-06
4
+
5
+ ### Fixed
6
+
7
+ - **`Toast` renders its message as text.** `Toast.success`/`error`/`info`/`warning`/`notice`/`message`/`show` set the
8
+ message as the alert's `innerHTML`, so markup inside it became elements — and toasts carry server error messages
9
+ (`Toast.error(err.message)`, a data service's `notify.error`) and user data. Same class as the `Dialog` fix in 2.3.0;
10
+ HTML in a toast was never documented.
11
+
3
12
  ## [2.3.0] - 2026-10-06
4
13
 
5
14
  ### Fixed
@@ -45,7 +45,7 @@ var Toast = class {
45
45
  };
46
46
  const el = new UAlert();
47
47
  el.status = status;
48
- el.innerHTML = content || "";
48
+ el.textContent = content || "";
49
49
  el.appearance = merged.appearance || "soft";
50
50
  el.title = merged.title || "";
51
51
  el.closable = merged.closable ?? true;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@iyulab/components",
3
3
  "description": "web-components library based on lit-element made by iyulab",
4
- "version": "2.3.0",
4
+ "version": "2.3.1",
5
5
  "keywords": [
6
6
  "iyulab",
7
7
  "components",
@@ -6,6 +6,9 @@ import { Toast } from '@iyulab/components';
6
6
 
7
7
  Programmatically display toast notifications. Creates `u-alert` elements dynamically and mounts them in a toast container.
8
8
 
9
+ The message is **text** — it is set as the alert's text content, so an error message from a server or a name typed by
10
+ a user cannot inject markup.
11
+
9
12
  ## Usage
10
13
 
11
14
  ```ts