@waggylabs/yumekit 0.4.3-beta.49 → 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/CHANGELOG.md
CHANGED
|
@@ -31,6 +31,38 @@ Delete any empty sections before publishing.
|
|
|
31
31
|
<!-- ### Security -->
|
|
32
32
|
<!-- Vulnerability patches or hardening changes -->
|
|
33
33
|
|
|
34
|
+
## [0.4.4] - 2026-04-25
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- `y-badge`: slotted children would disappear when the badge was upgraded before its children were parsed (e.g. when `y-badge.js` loaded before the tag appeared in the HTML stream). The shadow DOM now always includes a `<slot>` and toggles overlay vs. inline layout via a `slotchange`-driven class on an internal root element, so children projected in after upgrade are always picked up. Knock-on: text-only and comment-only children no longer trigger overlay mode (only element children do). This matches how the component is actually used in practice.
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- `y-appbar`: the default (unnamed) slot now lets consumers supply their own link elements (e.g. Vue Router's `<router-link>`, React Router's `<NavLink>`, plain `<a>`) in place of — or in addition to — the auto-generated `y-button` items. Unslotted children render in the appbar body after any items from the `items` attribute, get full-width treatment in vertical mode, and are hidden-overflow when collapsed. In mobile (hamburger) mode the same slot is rendered inside the dropdown panel below the items, preserving the desktop priority order.
|
|
43
|
+
|
|
44
|
+
- `y-menu`: items now accept `href` for navigation, matching `y-appbar`, `y-dock`, and `y-breadcrumbs`. This fixes a bug where `y-appbar` submenu items (which use `href`) would not navigate when passed through to a nested `y-menu`.
|
|
45
|
+
|
|
46
|
+
- `y-menu`: new lifecycle and selection events. `open` and `close` fire on visibility transitions. `select` fires when a leaf item is activated, carrying `detail: { value, item?, element? }` so consumers can react without subscribing to `navigate`.
|
|
47
|
+
|
|
48
|
+
- `y-menu`: items support a new `value` field, used as `event.detail.value` on the `select` event. Defaults to `item.text` when omitted.
|
|
49
|
+
|
|
50
|
+
- `y-menu`: items support a new `icon` field (icon name passed to `<y-icon>`), bringing y-menu in line with `y-appbar`, `y-dock`, and other components that render named icons.
|
|
51
|
+
|
|
52
|
+
- `y-menu`: items support a new `slot` field that names a slot in the menu's light DOM whose content replaces that item's default content (matching the `y-appbar` per-item slot pattern).
|
|
53
|
+
|
|
54
|
+
- `y-menu`: light-DOM children placed directly inside `<y-menu>` (without a `slot` attribute) are now treated as additional menu items. Each child receives `role="menuitem"` and `tabindex="0"` automatically, and clicking fires the `select` event with `detail.value` derived from `data-value` or `textContent`.
|
|
55
|
+
|
|
56
|
+
### Changed
|
|
57
|
+
|
|
58
|
+
- `y-appbar`: mobile hamburger menu replaced its internal `y-menu` with a self-contained dropdown panel so it can host both auto-generated nav buttons and arbitrary slotted nav children. Behaviour is otherwise unchanged — items still drive the menu, the hamburger toggles open/closed, and clicks outside the appbar dismiss the panel.
|
|
59
|
+
|
|
60
|
+
### Deprecated
|
|
61
|
+
|
|
62
|
+
- `y-menu`: `item.url` is deprecated in favour of `item.href`. Existing code keeps working and emits a one-time console warning per page load; `url` will be removed in a future release.
|
|
63
|
+
|
|
64
|
+
- `y-menu`: `item.template` and `item['icon-template']` are deprecated in favour of `item.slot` (named slot for custom item content) and `item.icon` (icon name). Existing code keeps working and emits a one-time console warning per page load; the template fields will be removed in a future release.
|
|
65
|
+
|
|
34
66
|
## [0.4.3] - 2026-04-17
|
|
35
67
|
|
|
36
68
|
### Added
|
|
@@ -5,12 +5,19 @@ export class YumeAppbar extends HTMLElement {
|
|
|
5
5
|
_idCounter: number;
|
|
6
6
|
_mql: MediaQueryList;
|
|
7
7
|
_isMobile: boolean;
|
|
8
|
+
_mobileOutsideClick: (e: any) => void;
|
|
8
9
|
connectedCallback(): void;
|
|
9
10
|
disconnectedCallback(): void;
|
|
10
11
|
attributeChangedCallback(name: any, oldVal: any, newVal: any): void;
|
|
11
12
|
set collapsed(val: boolean);
|
|
12
13
|
/** Whether the sidebar is currently collapsed. */
|
|
13
14
|
get collapsed(): boolean;
|
|
15
|
+
set history(val: string);
|
|
16
|
+
/**
|
|
17
|
+
* Navigation mode: omit for pushState (SPA-friendly), set to "false" for full-page navigation.
|
|
18
|
+
* Regardless of this setting, a cancelable "navigate" event is always dispatched first.
|
|
19
|
+
*/
|
|
20
|
+
get history(): string;
|
|
14
21
|
set items(val: any);
|
|
15
22
|
/** Nav items array parsed from the "items" attribute. */
|
|
16
23
|
get items(): any;
|
|
@@ -34,33 +41,33 @@ export class YumeAppbar extends HTMLElement {
|
|
|
34
41
|
set size(val: string);
|
|
35
42
|
/** Size variant: "small" | "medium" | "large" (default "medium"). */
|
|
36
43
|
get size(): string;
|
|
37
|
-
set history(val: string);
|
|
38
|
-
/**
|
|
39
|
-
* Navigation mode: omit for pushState (SPA-friendly), set to "false" for full-page navigation.
|
|
40
|
-
* Regardless of this setting, a cancelable "navigate" event is always dispatched first.
|
|
41
|
-
*/
|
|
42
|
-
get history(): string;
|
|
43
44
|
set sticky(val: string | false);
|
|
44
45
|
/** Sticky position: "start" | "end" | false. */
|
|
45
46
|
get sticky(): string | false;
|
|
47
|
+
render(): void;
|
|
46
48
|
/** Toggles the collapsed state of the sidebar. */
|
|
47
49
|
toggle(): void;
|
|
48
|
-
|
|
50
|
+
_buildBody(cfg: any, isCollapsed: any, menuDir: any): HTMLElement;
|
|
49
51
|
_buildCollapseButton(cfg: any, isCollapsed: any): HTMLElement;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
_buildDesktopBar(cfg: any, isVertical: any, isCollapsed: any, menuDir: any): HTMLElement;
|
|
53
|
+
_buildDesktopStyles(): string;
|
|
54
|
+
_buildFooter(cfg: any, isVertical: any, isCollapsed: any): HTMLElement;
|
|
55
|
+
_buildHeader(): HTMLElement;
|
|
56
|
+
_buildItemIcon(iconValue: any, cfg: any): HTMLElement;
|
|
57
|
+
_buildMobileBar(cfg: any): HTMLElement;
|
|
58
|
+
_buildMobileCenter(): HTMLElement;
|
|
59
|
+
_buildMobileEnd(): HTMLElement;
|
|
60
|
+
_buildMobileStart(cfg: any): HTMLElement;
|
|
61
|
+
_buildMobileStyles(): string;
|
|
62
|
+
_buildNavItem(item: any, cfg: any, isCollapsed: any, menuDir: any): HTMLElement;
|
|
52
63
|
_getBreakpointPx(): number;
|
|
53
64
|
_initRender(): void;
|
|
54
65
|
_isItemActive(item: any): boolean;
|
|
55
|
-
|
|
66
|
+
_navigateTo(href: any): void;
|
|
56
67
|
_renderDesktop(): void;
|
|
57
68
|
_renderMobile(): void;
|
|
58
69
|
_setupMediaQuery(): void;
|
|
59
70
|
_teardownMediaQuery(): void;
|
|
60
|
-
|
|
61
|
-
* Convert appbar nav items to y-menu item format.
|
|
62
|
-
* Maps `href` → `url` and recursively converts children.
|
|
63
|
-
*/
|
|
64
|
-
_toMenuItems(items: any): any;
|
|
71
|
+
_teardownMobileOutsideClick(): void;
|
|
65
72
|
_uid(prefix: any): string;
|
|
66
73
|
}
|
|
@@ -5,12 +5,19 @@ export class YumeAppbar extends HTMLElement {
|
|
|
5
5
|
_idCounter: number;
|
|
6
6
|
_mql: MediaQueryList;
|
|
7
7
|
_isMobile: boolean;
|
|
8
|
+
_mobileOutsideClick: (e: any) => void;
|
|
8
9
|
connectedCallback(): void;
|
|
9
10
|
disconnectedCallback(): void;
|
|
10
11
|
attributeChangedCallback(name: any, oldVal: any, newVal: any): void;
|
|
11
12
|
set collapsed(val: boolean);
|
|
12
13
|
/** Whether the sidebar is currently collapsed. */
|
|
13
14
|
get collapsed(): boolean;
|
|
15
|
+
set history(val: string);
|
|
16
|
+
/**
|
|
17
|
+
* Navigation mode: omit for pushState (SPA-friendly), set to "false" for full-page navigation.
|
|
18
|
+
* Regardless of this setting, a cancelable "navigate" event is always dispatched first.
|
|
19
|
+
*/
|
|
20
|
+
get history(): string;
|
|
14
21
|
set items(val: any);
|
|
15
22
|
/** Nav items array parsed from the "items" attribute. */
|
|
16
23
|
get items(): any;
|
|
@@ -34,33 +41,33 @@ export class YumeAppbar extends HTMLElement {
|
|
|
34
41
|
set size(val: string);
|
|
35
42
|
/** Size variant: "small" | "medium" | "large" (default "medium"). */
|
|
36
43
|
get size(): string;
|
|
37
|
-
set history(val: string);
|
|
38
|
-
/**
|
|
39
|
-
* Navigation mode: omit for pushState (SPA-friendly), set to "false" for full-page navigation.
|
|
40
|
-
* Regardless of this setting, a cancelable "navigate" event is always dispatched first.
|
|
41
|
-
*/
|
|
42
|
-
get history(): string;
|
|
43
44
|
set sticky(val: string | false);
|
|
44
45
|
/** Sticky position: "start" | "end" | false. */
|
|
45
46
|
get sticky(): string | false;
|
|
47
|
+
render(): void;
|
|
46
48
|
/** Toggles the collapsed state of the sidebar. */
|
|
47
49
|
toggle(): void;
|
|
48
|
-
|
|
50
|
+
_buildBody(cfg: any, isCollapsed: any, menuDir: any): HTMLElement;
|
|
49
51
|
_buildCollapseButton(cfg: any, isCollapsed: any): HTMLElement;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
+
_buildDesktopBar(cfg: any, isVertical: any, isCollapsed: any, menuDir: any): HTMLElement;
|
|
53
|
+
_buildDesktopStyles(): string;
|
|
54
|
+
_buildFooter(cfg: any, isVertical: any, isCollapsed: any): HTMLElement;
|
|
55
|
+
_buildHeader(): HTMLElement;
|
|
56
|
+
_buildItemIcon(iconValue: any, cfg: any): HTMLElement;
|
|
57
|
+
_buildMobileBar(cfg: any): HTMLElement;
|
|
58
|
+
_buildMobileCenter(): HTMLElement;
|
|
59
|
+
_buildMobileEnd(): HTMLElement;
|
|
60
|
+
_buildMobileStart(cfg: any): HTMLElement;
|
|
61
|
+
_buildMobileStyles(): string;
|
|
62
|
+
_buildNavItem(item: any, cfg: any, isCollapsed: any, menuDir: any): HTMLElement;
|
|
52
63
|
_getBreakpointPx(): number;
|
|
53
64
|
_initRender(): void;
|
|
54
65
|
_isItemActive(item: any): boolean;
|
|
55
|
-
|
|
66
|
+
_navigateTo(href: any): void;
|
|
56
67
|
_renderDesktop(): void;
|
|
57
68
|
_renderMobile(): void;
|
|
58
69
|
_setupMediaQuery(): void;
|
|
59
70
|
_teardownMediaQuery(): void;
|
|
60
|
-
|
|
61
|
-
* Convert appbar nav items to y-menu item format.
|
|
62
|
-
* Maps `href` → `url` and recursively converts children.
|
|
63
|
-
*/
|
|
64
|
-
_toMenuItems(items: any): any;
|
|
71
|
+
_teardownMobileOutsideClick(): void;
|
|
65
72
|
_uid(prefix: any): string;
|
|
66
73
|
}
|