ng-hub-ui-panels 22.2.0 β†’ 22.4.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
@@ -74,6 +74,7 @@ The components are standalone β€” import them directly where you use them:
74
74
  import {
75
75
  PanelsComponent,
76
76
  PanelComponent,
77
+ HubTabNavComponent,
77
78
  PanelHeadingDirective,
78
79
  PanelHeaderDirective,
79
80
  PanelFooterDirective
@@ -105,6 +106,7 @@ its own.
105
106
  ## 🎯 Features
106
107
 
107
108
  - **Four visualizations** β€” `tabs`, `pills`, `accordion` and `card`, switched with a single `type` input.
109
+ - **Lightweight value-bound strip** β€” `<hub-tab-nav>` is a content-less, controlled tab strip: it emits the selected `value` from a plain `items` array and lets you render the view yourself (segmented controls, filter switches, tabs with external content).
108
110
  - **Card layout & standalone** β€” `type="card"` renders every panel as an always-visible card; a single `<hub-panel>` also works on its own, outside any container.
109
111
  - **Content header/footer slots** β€” `hubPanelHeader` and `hubPanelFooter` mark header/footer bands that render in every view (distinct from the `hubPanelHeading` nav label).
110
112
  - **Semantic alerts** β€” `appearance="alert"` with a `variant` turns a panel into a themed callout (`role="alert"`) driven by the design-system semantic tokens, no per-colour CSS.
@@ -202,6 +204,29 @@ card by itself:
202
204
  > render in **every** view. They are different from `hubPanelHeading`, which is the
203
205
  > navigational tab label / accordion disclosure button.
204
206
 
207
+ #### Card slots β€” `variant`, `flush`, `fill`
208
+
209
+ A plain card exposes three inputs:
210
+
211
+ - **`variant`** β€” tints the whole card β€” background / text / border **and the `hubPanelHeader` / `hubPanelFooter` bands** (a slightly stronger tint of the same accent) β€” from a single semantic accent (`primary` … `neutral`, or any custom colour), with the same `color-mix` model the alert uses (no colour values added). `--hub-panels-card-border-style` sets the frame style, e.g. `dashed` for an empty-state card.
212
+ - **`flush`** β€” removes the card body padding so it can host a table / list / media block edge-to-edge.
213
+ - **`fill`** β€” makes the card fill its parent's height and its body scroll, so an inner `flex: 1` region is finally bounded. `--hub-panels-body-gap` spaces stacked body children.
214
+
215
+ > **Two different `flush` inputs.** `<hub-panel flush>` (this one) zeroes the **card body padding** so projected content touches the card's inner edges. `<hub-panels flush>` is a separate input on the **container** that, in the accordion view, strips the accordion's **outer chrome** (side borders + radius). Different element, different view, different effect β€” they never collide.
216
+
217
+ ```html
218
+ <hub-panel variant="success"><div hubPanelHeader>Success</div> Tinted card.</hub-panel>
219
+
220
+ <hub-panel flush>
221
+ <div hubPanelHeader>Flush</div>
222
+ <div>Runs edge-to-edge to the card sides.</div>
223
+ </hub-panel>
224
+
225
+ <div style="height: 240px; display: flex;">
226
+ <hub-panel fill style="flex: 1;"> …long, scrolling content… </hub-panel>
227
+ </div>
228
+ ```
229
+
205
230
  ### Alerts
206
231
 
207
232
  A standalone `<hub-panel>` becomes a semantic **alert** with
@@ -355,6 +380,10 @@ the active panel follows the current URL (`tabs` / `pills` views only).
355
380
  | Input | Type | Default | Description |
356
381
  | --- | --- | --- | --- |
357
382
  | `heading` | `string` | `undefined` | Plain-text header (ignored when a `hubPanelHeading` template is present). |
383
+ | `variant` | `HubSemanticColor \| string` | `undefined` | Card only: tints the whole card from one semantic accent (reflected as `data-variant`). |
384
+ | `flush` | `boolean` | `false` | Card only: removes the body padding for edge-to-edge content. |
385
+ | `fill` | `boolean` | `false` | Card only: fills the parent's height and scrolls the body. |
386
+ | `standalone` | attribute | β€” | Static attribute: opts a loose `<hub-panel>` OUT of an ancestor `<hub-panels>` so it renders as a plain card. |
358
387
  | `id` | `string` | auto | ARIA pairing id. |
359
388
  | `value` | `unknown` | `id` | Value contributed to the form control. |
360
389
  | `active` | `boolean` (model) | `false` | Two-way active/expanded state. |
@@ -373,6 +402,27 @@ the active panel follows the current URL (`tabs` / `pills` views only).
373
402
  | `deselectPanel` | `PanelComponent` | Emitted when the panel stops being active. |
374
403
  | `removed` | `PanelComponent` | Emitted on removal (βœ• or Delete). |
375
404
 
405
+ ### `<hub-tab-nav>` β€” lightweight value-bound strip
406
+
407
+ A content-less, controlled tab strip. It renders the header row only and emits the
408
+ selected `value`; the consumer renders the active view itself.
409
+
410
+ ```html
411
+ <hub-tab-nav [items]="tabs" [(active)]="selected" appearance="pills" />
412
+ ```
413
+
414
+ | Input | Type | Default | Description |
415
+ | --- | --- | --- | --- |
416
+ | `items` | `HubTabNavItem[]` | `[]` | The selectable tabs (`{ value, label, disabled?, id? }`). |
417
+ | `active` | `unknown` (model) | `undefined` | Two-way selected value; `activeChange` fires on change. |
418
+ | `appearance` | `'tabs' \| 'pills'` | `'tabs'` | Underlined tabs or rounded pills. |
419
+ | `justified` | `boolean` | `false` | Stretches tabs to equal width. |
420
+ | `vertical` | `boolean` | `false` | Stacks the strip vertically. |
421
+
422
+ | Output | Payload | Description |
423
+ | --- | --- | --- |
424
+ | `activeChange` | `unknown` | Emitted with the new value when the selected tab changes. |
425
+
376
426
  ### Directives
377
427
 
378
428
  - `hubPanelHeading` β€” marks an `<ng-template>` inside a `hub-panel` as its custom **navigational** header (tab/pill link or accordion disclosure button).