@htmlbricks/hb-toast 0.66.8 → 0.66.9

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 ADDED
@@ -0,0 +1,46 @@
1
+ ## `hb-toast` — toast
2
+
3
+ **Category:** overlays
4
+ **Tags:** overlays, notifications
5
+
6
+ ### What it does
7
+
8
+ Bootstrap-styled toast: `show` (`yes` / `no`), `title`, `content`, optional `img`, `small`, `level`, `position`, `timeout`, string `progress` for a progress bar, and `buttons` for actions. Slots customize header and body; dispatches visibility and button `action` events. Theme aligns with Bootstrap CSS variables in docs.
9
+
10
+ ### Custom element
11
+
12
+ `hb-toast`
13
+
14
+ ### Attributes (snake_case; use string values in HTML)
15
+
16
+ - `id` (optional), `style` (optional): strings.
17
+ - `show` (required): `"yes"` | `"no"`.
18
+ - `title` (required), `content` (required), `img` (required per typings): strings (`img` may be URL or data URI).
19
+ - `small` (optional): string (e.g. timestamp line).
20
+ - `level` (optional): `"primary"` | `"secondary"` | `"success"` | `"danger"` | `"warning"` | `"info"` | `"light"` | `"dark"`.
21
+ - `position` (optional): `"top-left"` | `"top-center"` | `"top-right"` | `"bottom-left"` | `"bottom-center"` | `"bottom-right"`.
22
+ - `timeout` (optional): number or string — auto-hide ms.
23
+ - `progress` (optional): string — progress bar value/label semantics per Storybook.
24
+ - `buttons` (optional): JSON string — `TToastButton[]` (`type` confirm/cancel, optional `action`, `text`, `icon`, colors).
25
+
26
+ ### Events
27
+
28
+ - `changeVisibility`: `{ id: string; show: boolean; disappear?: boolean }`.
29
+ - `action`: `{ id: string; action?: string }`.
30
+
31
+ ### Usage notes
32
+
33
+ - **Slots:** `header_img`, `header_strong`, `header_small`, `body`.
34
+ - **CSS vars** in docs reference Bootstrap semantic colors.
35
+
36
+ ### Minimal HTML example
37
+
38
+ ```html
39
+ <hb-toast
40
+ show="yes"
41
+ title="Notice"
42
+ content="Hello, world!"
43
+ img="https://via.placeholder.com/64"
44
+ level="primary"
45
+ ></hb-toast>
46
+ ```
package/manifest.json CHANGED
@@ -450,5 +450,5 @@
450
450
  "size": {},
451
451
  "iifePath": "main.iife.js",
452
452
  "repoName": "@htmlbricks/hb-toast",
453
- "version": "0.66.8"
453
+ "version": "0.66.9"
454
454
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlbricks/hb-toast",
3
- "version": "0.66.8",
3
+ "version": "0.66.9",
4
4
  "contributors": [],
5
5
  "description": "Bootstrap-styled toast: `show`, `title`, `content`, optional `img`, `small`, `level`, `position`, `timeout`, string `progress` for a bar, and `buttons` for actions. Slots customize header and body; dispatches visibility and button `action` events.",
6
6
  "licenses": [