ng-hub-ui-nav 22.16.0 → 22.17.0

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 CHANGED
@@ -8,7 +8,7 @@
8
8
  A flexible, accessible, and highly customizable navigation component for Angular 21+. It supports horizontal menus, vertical sidebars, mobile collapse modes, stacked drill-down panels, projected start/end slots, and scroll-spy integration.
9
9
 
10
10
  > [!IMPORTANT]
11
- > Version `22.16.0` targets Angular 22 and follows the signal-first architecture used across `ng-hub-ui`.
11
+ > Version `22.17.0` targets Angular 22 and follows the signal-first architecture used across `ng-hub-ui`.
12
12
 
13
13
  ## Documentation and Live Examples
14
14
 
@@ -65,7 +65,7 @@ This library is part of the **ng-hub-ui** ecosystem:
65
65
  - Vertical child expansion modes: `accordion`, `flyout`, and `panel`.
66
66
  - Stacked panel drill-down navigation with configurable visible panel count.
67
67
  - Projected `hubNavStart` and `hubNavEnd` slots.
68
- - Custom item rendering with `hubNavItemTemplate`.
68
+ - Custom item rendering with `hubNavItemTemplate`, and a projected glyph with `hubNavItemIcon`.
69
69
  - Router-aware active states with fragment and query param support.
70
70
  - Scroll-spy helpers for documentation pages and one-page layouts.
71
71
  - Sticky vertical navigation support.
@@ -201,6 +201,7 @@ A toggle button ships on the outer edge of the primary column: an arrow inside a
201
201
  | `config` | `Partial<HubNavConfig>` | `{}` | Per-instance config merged with global defaults. |
202
202
  | `navClass` | `string` | `''` | Additional class applied to the internal `<nav>`. |
203
203
  | `itemTemplate` | `TemplateRef<unknown> \| null` | `null` | Optional custom item template. |
204
+ | `iconTemplate` | `TemplateRef<HubNavItemIconContext> \| null` | `null` | Glyph drawn in place of the icon class, for entries that declare an `icon`. The `hubNavItemIcon` directive is the usual way in; this input is for a host that already holds the template. |
204
205
  | `activeItemId` | `string \| null` (two-way `model`) | `null` | Entry to mark active, by `id` or `fragment`, when the router is not what says where the reader is. While it is set it answers for the whole menu: route matching stands down, so the mark cannot land on two entries at once, and the marked entry announces `aria-current="location"`. Bind with `[(activeItemId)]`. |
205
206
  | `autoOpenFromRoute` | `boolean` | `false` | Opens matching dropdowns/panels from the current route, and leaves exactly one section open when roots expand differently: arriving at an accordion root drops the panel of the panel root you left, and the other way round. It also re-derives the stack when the viewport comes back above `collapseBreakpoint`; with the input off, a stack opened by hand survives that round trip. |
206
207
  | `rail` | `boolean` (two-way `model`) | `false` | Desktop-only icon rail for vertical navs. Ignored below `collapseBreakpoint`. Bind with `[(rail)]`. |
@@ -319,6 +320,7 @@ marked on its exact route:
319
320
  - `hubNavStart`: projects content into the start slot.
320
321
  - `hubNavEnd`: projects content into the end slot.
321
322
  - `hubNavItemTemplate`: overrides item rendering.
323
+ - `hubNavItemIcon`: draws the glyph of every entry that declares an `icon`, leaving the rest of the item alone. Context: the entry as `$implicit`, plus `rail`.
322
324
  - `hubNavScrollSpy`: tracks visible sections in a scroll container. Takes `enabled`, `offset`, `sectionSelector`, `nav`, `scrollContainer` and `clickSettleMs`; emits `activeSectionChange` and exposes `scrollTo(sectionId, behavior?)`.
323
325
  - `hubNavScrollSpySection`: marks a section as spy-trackable.
324
326