@htmlbricks/hb-sidenav-button 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 +35 -0
- package/manifest.json +1 -1
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
## `hb-sidenav-button` — sidenav button
|
|
2
|
+
|
|
3
|
+
**Category:** layout
|
|
4
|
+
**Tags:** layout, navigation
|
|
5
|
+
|
|
6
|
+
### What it does
|
|
7
|
+
|
|
8
|
+
Compact sidebar row as a nav button: optional Bootstrap icon, badge, or visual types (`switch`, `checkbox`, `radio`) from `navlink` JSON; dispatches `pageChange` with the row `key` on click. Used by `hb-sidebar-cards-navigator` and similar stacked menus.
|
|
9
|
+
|
|
10
|
+
### Custom element
|
|
11
|
+
|
|
12
|
+
`hb-sidenav-button`
|
|
13
|
+
|
|
14
|
+
### Attributes (snake_case; use string values in HTML)
|
|
15
|
+
|
|
16
|
+
- `id`, `style` (optional): strings.
|
|
17
|
+
- `navlink` (required): JSON string — `INavLink` (`key`, `text`, optional `bootstrapIcon`, `badge`, `value`, `type`, `selected`).
|
|
18
|
+
|
|
19
|
+
### Events
|
|
20
|
+
|
|
21
|
+
- `pageChange`: `{ page: string }` — typically the link `key`.
|
|
22
|
+
|
|
23
|
+
### Usage notes
|
|
24
|
+
|
|
25
|
+
- **CSS parts:** `li`.
|
|
26
|
+
- **CSS variables:** `--bs-primary`.
|
|
27
|
+
- Storybook `nav_type` is a control helper; the shape lives on `navlink.type`.
|
|
28
|
+
|
|
29
|
+
### Minimal HTML example
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<hb-sidenav-button
|
|
33
|
+
navlink='{"text":"Home","key":"home","bootstrapIcon":"house-door"}'
|
|
34
|
+
></hb-sidenav-button>
|
|
35
|
+
```
|
package/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@htmlbricks/hb-sidenav-button",
|
|
3
|
-
"version": "0.66.
|
|
3
|
+
"version": "0.66.9",
|
|
4
4
|
"contributors": [],
|
|
5
5
|
"description": "Compact sidebar row as a nav button: optional Bootstrap icon, badge, or visual types (switch, checkbox, radio) from navlink JSON; dispatches pageChange with the row key on click. Used by sidebar-cards-navigator and similar stacked menus.",
|
|
6
6
|
"licenses": [
|