@waggylabs/yumekit 0.4.3 → 0.4.4
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 +32 -0
- package/dist/components/y-appbar/y-appbar.d.ts +22 -15
- package/dist/components/y-appbar.d.ts +22 -15
- package/dist/components/y-appbar.js +659 -454
- package/dist/components/y-badge/y-badge.d.ts +1 -1
- package/dist/components/y-badge.d.ts +1 -1
- package/dist/components/y-badge.js +31 -15
- package/dist/components/y-menu/y-menu.d.ts +57 -1
- package/dist/components/y-menu.d.ts +57 -1
- package/dist/components/y-menu.js +477 -158
- package/dist/index.js +693 -462
- package/dist/yumekit.min.js +1 -1
- package/llm.txt +43 -12
- package/package.json +1 -1
package/llm.txt
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
A modern, framework-agnostic Web Components UI kit providing 35 production-ready custom HTML elements. Built entirely on native web standards with zero external runtime dependencies.
|
|
4
4
|
|
|
5
5
|
## Version
|
|
6
|
-
0.4.
|
|
6
|
+
0.4.4
|
|
7
7
|
|
|
8
8
|
## License
|
|
9
9
|
MIT
|
|
@@ -569,15 +569,33 @@ Slots: `image` (flush, no padding, clips to card border radius), `header`, `foot
|
|
|
569
569
|
---
|
|
570
570
|
|
|
571
571
|
### y-appbar
|
|
572
|
-
Top/side navigation bar.
|
|
572
|
+
Top/side navigation bar with collapsible vertical sidebar mode and a mobile hamburger fallback.
|
|
573
573
|
|
|
574
574
|
Tag: `<y-appbar>`
|
|
575
575
|
Attributes:
|
|
576
|
-
- `orientation` — `"
|
|
577
|
-
- `
|
|
578
|
-
- `
|
|
576
|
+
- `orientation` — `"vertical"` (default) | `"horizontal"`
|
|
577
|
+
- `collapsed` — boolean, vertical only — collapses sidebar to icon-only width
|
|
578
|
+
- `items` — JSON array of `{ text, icon?, href?, selected?, slot?, children? }` objects driving the auto-generated nav buttons
|
|
579
|
+
- `size` — `"small"` | `"medium"` (default) | `"large"`
|
|
580
|
+
- `menu-direction` — `"right"` | `"down"` — direction submenus pop out (auto: vertical → right, horizontal → down)
|
|
581
|
+
- `sticky` — `"start"` | `"end"` — sticks the appbar to the named edge
|
|
582
|
+
- `mobile-breakpoint` — number (px) — viewport width below which horizontal appbar switches to mobile hamburger mode (default 768)
|
|
583
|
+
- `history` — omit (default) for `pushState` SPA navigation; `"false"` for full-page `window.location.href`
|
|
584
|
+
|
|
585
|
+
Events: `navigate` (cancelable, `detail: { href }`)
|
|
579
586
|
|
|
580
|
-
|
|
587
|
+
Methods: `toggle()` — flip collapsed state
|
|
588
|
+
|
|
589
|
+
Slots: `logo`, `title`, `header`, `footer`, default (user-supplied link elements rendered in the body alongside `items` — use this for framework router links like Vue Router's `<router-link>` or React Router's `<NavLink>`. In mobile mode the same unslotted children are rendered inside the hamburger dropdown panel after the items.)
|
|
590
|
+
|
|
591
|
+
```html
|
|
592
|
+
<!-- Mix items array with framework router links -->
|
|
593
|
+
<y-appbar orientation="vertical" items='[{"text":"Home","icon":"home","href":"/"}]'>
|
|
594
|
+
<span slot="title">MyApp</span>
|
|
595
|
+
<router-link to="/projects">Projects</router-link>
|
|
596
|
+
<router-link to="/settings">Settings</router-link>
|
|
597
|
+
</y-appbar>
|
|
598
|
+
```
|
|
581
599
|
|
|
582
600
|
---
|
|
583
601
|
|
|
@@ -687,25 +705,38 @@ CSS Custom Properties: `--component-dock-height`, `--component-dock-background`,
|
|
|
687
705
|
---
|
|
688
706
|
|
|
689
707
|
### y-menu
|
|
690
|
-
Dropdown menu. Positioned relative to an anchor element.
|
|
708
|
+
Dropdown menu. Positioned relative to an anchor element. Items can be defined via the `items` JSON attribute or as light-DOM children.
|
|
691
709
|
|
|
692
710
|
Tag: `<y-menu>`
|
|
693
711
|
Attributes:
|
|
694
|
-
- `items` — JSON string: `[{"text": "Edit", "
|
|
712
|
+
- `items` — JSON string: `[{"text": "Edit", "value": "edit", "href": "...", "icon": "edit", "slot": "name", "selected": true, "children": [...]}, ...]`
|
|
695
713
|
- `anchor` — CSS selector or element ID of the trigger element
|
|
696
714
|
- `visible` — boolean
|
|
697
715
|
- `direction` — `"down"` (default) | `"up"` | `"left"` | `"right"`
|
|
698
716
|
- `size` — `"small"` | `"medium"` | `"large"`
|
|
717
|
+
- `history` — omit (default) for SPA `pushState` navigation; `"false"` for full-page `window.location.href`
|
|
699
718
|
|
|
700
|
-
Events:
|
|
719
|
+
Events:
|
|
720
|
+
- `open` — fires when the menu becomes visible
|
|
721
|
+
- `close` — fires when the menu is dismissed
|
|
722
|
+
- `select` — fires when a leaf item is activated. `event.detail = { value, item?, element? }`. `item` is set for JSON-defined items; `element` is set for slotted children.
|
|
723
|
+
- `navigate` — cancelable; `event.detail.href`. Fires before navigation when an item with `href` is clicked.
|
|
701
724
|
|
|
702
725
|
Item object fields:
|
|
703
726
|
- `text` — display text
|
|
704
|
-
- `
|
|
727
|
+
- `value` — value reported in the `select` event (defaults to `text`)
|
|
728
|
+
- `href` — optional navigation URL
|
|
729
|
+
- `icon` — icon name rendered via `<y-icon>` (e.g. `"edit"`, `"trash"`)
|
|
730
|
+
- `slot` — named slot in light DOM whose content replaces this item's default content
|
|
705
731
|
- `selected` — boolean, highlights the active item
|
|
706
732
|
- `children` — array of sub-items (nested submenu)
|
|
707
|
-
|
|
708
|
-
|
|
733
|
+
|
|
734
|
+
Deprecated item fields (still work; will be removed in a future release):
|
|
735
|
+
- `url` — use `href`
|
|
736
|
+
- `icon-template` — use `icon`
|
|
737
|
+
- `template` — use `slot`
|
|
738
|
+
|
|
739
|
+
Light-DOM children of `<y-menu>` (without a `slot` attribute) become additional menu items. Each child is automatically given `role="menuitem"` and `tabindex="0"`. On click the menu fires `select` with `detail.value` from the child's `data-value` (or its `textContent`) and closes.
|
|
709
740
|
|
|
710
741
|
```html
|
|
711
742
|
<y-button id="options-btn">Options</y-button>
|