@cngx/ui 0.0.1-rc.0 → 0.1.0-rc.1

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.
Files changed (60) hide show
  1. package/README.md +22 -48
  2. package/action-button/README.md +9 -11
  3. package/empty-state/README.md +11 -26
  4. package/feedback/README.md +3 -3
  5. package/fesm2022/cngx-ui-action-button.mjs +30 -26
  6. package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
  7. package/fesm2022/cngx-ui-empty-state.mjs +26 -21
  8. package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
  9. package/fesm2022/cngx-ui-feedback.mjs +498 -261
  10. package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
  11. package/fesm2022/cngx-ui-layout.mjs +32 -5
  12. package/fesm2022/cngx-ui-layout.mjs.map +1 -1
  13. package/fesm2022/cngx-ui-mat-stepper.mjs +119 -297
  14. package/fesm2022/cngx-ui-mat-stepper.mjs.map +1 -1
  15. package/fesm2022/cngx-ui-mat-tabs.mjs +455 -120
  16. package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
  17. package/fesm2022/cngx-ui-material.mjs +14 -3
  18. package/fesm2022/cngx-ui-material.mjs.map +1 -1
  19. package/fesm2022/cngx-ui-overlay.mjs +22 -3
  20. package/fesm2022/cngx-ui-overlay.mjs.map +1 -1
  21. package/fesm2022/cngx-ui-sidenav.mjs +107 -28
  22. package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
  23. package/fesm2022/cngx-ui-skeleton.mjs +61 -20
  24. package/fesm2022/cngx-ui-skeleton.mjs.map +1 -1
  25. package/fesm2022/cngx-ui-speak.mjs +14 -5
  26. package/fesm2022/cngx-ui-speak.mjs.map +1 -1
  27. package/fesm2022/cngx-ui-stepper.mjs +659 -163
  28. package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
  29. package/fesm2022/cngx-ui-tabs.mjs +306 -55
  30. package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
  31. package/fesm2022/cngx-ui.mjs +2 -1
  32. package/fesm2022/cngx-ui.mjs.map +1 -1
  33. package/layout/README.md +9 -44
  34. package/mat-stepper/README.md +37 -17
  35. package/mat-tabs/README.md +13 -13
  36. package/mat-tabs/styles/mat-tabs.css +357 -213
  37. package/material/README.md +19 -19
  38. package/overlay/README.md +11 -11
  39. package/package.json +7 -6
  40. package/sidenav/README.md +4 -19
  41. package/skeleton/README.md +3 -17
  42. package/speak/README.md +15 -15
  43. package/stepper/README.md +213 -5
  44. package/tabs/README.md +22 -4
  45. package/theming/system-tokens.css +29 -0
  46. package/types/cngx-ui-action-button.d.ts +28 -13
  47. package/types/cngx-ui-empty-state.d.ts +21 -9
  48. package/types/cngx-ui-feedback.d.ts +437 -121
  49. package/types/cngx-ui-layout.d.ts +38 -8
  50. package/types/cngx-ui-mat-stepper.d.ts +100 -134
  51. package/types/cngx-ui-mat-tabs.d.ts +291 -84
  52. package/types/cngx-ui-material.d.ts +12 -1
  53. package/types/cngx-ui-overlay.d.ts +25 -4
  54. package/types/cngx-ui-sidenav.d.ts +106 -12
  55. package/types/cngx-ui-skeleton.d.ts +62 -8
  56. package/types/cngx-ui-speak.d.ts +10 -2
  57. package/types/cngx-ui-stepper.d.ts +390 -57
  58. package/types/cngx-ui-tabs.d.ts +182 -18
  59. package/types/cngx-ui.d.ts +1 -0
  60. package/speak/speak-button-theme.scss +0 -78
@@ -1,5 +1,5 @@
1
1
  import * as _cngx_common_tabs from '@cngx/common/tabs';
2
- import { CngxTabPanelHost, CngxTabGroupAnnouncements, CngxTabGroupTemplateBindings, CngxTabHandle, CngxTabErrorBadgeContext, CngxTabBusySpinnerContext, CngxTabRejectionIconContext, tabOverflowOptionId } from '@cngx/common/tabs';
2
+ import { CngxTabPanelHost, CngxTabsSkin, CngxTabIconLayout, CngxTabsPanelMode, CngxTabAlign, CngxTabDismissals, CngxTabKeyboardNav, CngxTabGroupAnnouncements, CngxTabsHostAttrs, CngxTabGroupTemplateBindings, CngxTabHandle, CngxTabIconContext, CngxTabErrorBadgeContext, CngxTabBusySpinnerContext, CngxTabRejectionIconContext, tabOverflowOptionId } from '@cngx/common/tabs';
3
3
  import * as _angular_core from '@angular/core';
4
4
  import { Signal, TemplateRef } from '@angular/core';
5
5
  import * as i2 from '@cngx/common/a11y';
@@ -7,24 +7,90 @@ import { CngxPopover } from '@cngx/common/popover';
7
7
 
8
8
  /**
9
9
  * CNGX tab-group organism. Thin shell over {@link CngxTabGroupPresenter}
10
- * + `CngxRovingTabindex` + `CngxFocusRestore` via `hostDirectives`.
11
- * Material variant lives at `[cngxMatTabs]` in `@cngx/ui/mat-tabs`.
10
+ * + `CngxFocusRestore` via `hostDirectives`. The APG tablist keyboard
11
+ * model (automatic activation: arrow keys move focus AND select; Home/End
12
+ * jump to first/last; the active tab is the lone tab stop) lives in
13
+ * {@link createTabKeyboardNav}, deriving the roving stop from the
14
+ * presenter's `activeId` rather than a competing index. Material variant
15
+ * lives at `[cngxMatTabs]` in `@cngx/ui/mat-tabs`.
12
16
  *
13
- * All ARIA attrs are signal-driven — never one-shot bindings.
17
+ * All ARIA attrs are signal-driven - never one-shot bindings.
14
18
  * `CngxLiveRegion` is mounted as a child `<span>` rather than a
15
19
  * host directive: its `role="status"` would clobber the wrapper's
16
20
  * `role="group"` landmark.
21
+ *
22
+ * @playground Form error aggregation ./examples/form-errors/form-errors.component.ts
23
+ * @see {@link CngxMatTabs} for the Material `<mat-tab-group>` variant with `[cngxMatTabError]`.
24
+ *
25
+ * @category ui/tabs
26
+ * @docsKind primary
27
+ * @wcag AA
28
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/tabs/tab-group.component.ts
29
+ * @since 0.1.0
30
+ * @relatedTo CngxTabOverflow, CngxTabGroupPresenter, CngxTab, CngxFocusRestore
31
+ * <example-url>http://localhost:4200/#/ui/tabs/tab-commit-action/optimistic-pessimistic-commits-with-bridge-directives</example-url>
32
+ * <example-url>http://localhost:4200/#/ui/tabs/tab-error-aggregation/per-tab-error-badges</example-url>
33
+ * <example-url>http://localhost:4200/#/ui/tabs/tab-group-vertical/vertical-sidebar-tabs</example-url>
34
+ * <example-url>http://localhost:4200/#/ui/tabs/tab-group/three-tab-navigation</example-url>
35
+ * <example-url>http://localhost:4200/#/ui/tabs/tab-overflow/8-tabs-in-a-narrow-container</example-url>
36
+ * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-busy-spinner-via-code-cngxtabbusyspinner-code</example-url>
37
+ * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-error-badge-via-code-cngxtaberrorbadge-code</example-url>
38
+ * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/rejection-decoration-via-code-cngxtabrejectionicon-code</example-url>
17
39
  */
18
40
  declare class CngxTabGroup implements CngxTabPanelHost {
19
41
  readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
20
42
  readonly ariaLabelledBy: _angular_core.InputSignal<string | undefined>;
43
+ /**
44
+ * Visual skin. Cascade `input ?? config ?? 'line'`, resolved by
45
+ * {@link hostAttrs} and reflected onto `[data-skin]`. The skin is a
46
+ * pure CSS concern - structure, slots, ARIA, and keyboard behaviour
47
+ * are identical across all values. Public (consumer-facing input,
48
+ * like `ariaLabel`); the resolved value, not the raw input, is what
49
+ * the host binding reads.
50
+ */
51
+ readonly skin: _angular_core.InputSignal<CngxTabsSkin | undefined>;
52
+ /**
53
+ * Icon layout. Cascade `input ?? config ?? 'start'`, reflected onto
54
+ * `[data-icon-layout]`. Orthogonal to skin and orientation.
55
+ */
56
+ readonly iconLayout: _angular_core.InputSignal<CngxTabIconLayout | undefined>;
57
+ /**
58
+ * Panel render strategy. Cascade `input ?? config ?? 'eager'`,
59
+ * reflected onto `[data-panel-mode]`. `'eager'` (default) renders every
60
+ * panel's content up front (byte-identical to before this input
61
+ * existed); `'lazy'` keep-alives content after first activation;
62
+ * `'lazy-destroy'` renders only the active panel's content. The panel
63
+ * `<div>` always stays in the DOM regardless.
64
+ */
65
+ readonly panelMode: _angular_core.InputSignal<CngxTabsPanelMode | undefined>;
66
+ /** Stretch tabs to fill the strip width (horizontal only); reflects `[data-fitted]`. Cascade `input ?? config ?? false`. */
67
+ readonly fitted: _angular_core.InputSignal<boolean | undefined>;
68
+ /** Tab-cluster alignment when not fitted (horizontal only); reflects `[data-tab-align]`. Cascade `input ?? config ?? 'start'`. */
69
+ readonly tabAlign: _angular_core.InputSignal<CngxTabAlign | undefined>;
70
+ /**
71
+ * Whether tabs render a close affordance. Cascade
72
+ * `input ?? config ?? false`. A per-`CngxTab` `[closable]` override
73
+ * wins over this group default. When on, each closable tab gets a
74
+ * close button (and Delete on the focused tab closes it); the
75
+ * `(tabClose)` output fires with the tab id and index for the
76
+ * consumer to remove from its data.
77
+ */
78
+ readonly closable: _angular_core.InputSignal<boolean | undefined>;
79
+ /**
80
+ * Whether the group renders an add-tab button after the strip. Cascade
81
+ * `input ?? config ?? false`. When on, the `(tabAdd)` output fires for
82
+ * the consumer to append a tab to its data.
83
+ */
84
+ readonly addable: _angular_core.InputSignal<boolean | undefined>;
21
85
  protected readonly presenter: _cngx_common_tabs.CngxTabGroupHost;
22
86
  protected readonly i18n: _cngx_common_tabs.CngxTabsI18n;
23
87
  protected readonly config: _cngx_common_tabs.CngxTabsConfig;
24
- /** Default-glyph table for the template's fallback spans. Pillar 1. */
88
+ /** Default-glyph table for the template's fallback spans. */
25
89
  protected readonly glyphs: {
26
90
  readonly errorBadge: "!";
27
91
  readonly rejectionIcon: "!";
92
+ readonly closeIcon: "\u00D7";
93
+ readonly addIcon: "+";
28
94
  };
29
95
  private readonly hostElement;
30
96
  private readonly injector;
@@ -33,11 +99,28 @@ declare class CngxTabGroup implements CngxTabPanelHost {
33
99
  * Per-instance skin slots. Resolved via 3-stage cascade in {@link templates}:
34
100
  * `*cngxTab*` directive > `CNGX_TABS_CONFIG.templates.<key>` > built-in.
35
101
  * AOT (NG8110) requires `contentChild()` to be a direct field initialiser
36
- * on the variant — cascade resolution is delegated to the factory.
102
+ * on the variant - cascade resolution is delegated to the factory.
37
103
  */
38
104
  private readonly errorBadgeSlot;
39
105
  private readonly rejectionIconSlot;
40
106
  private readonly busySpinnerSlot;
107
+ private readonly iconSlot;
108
+ private readonly closeIconSlot;
109
+ private readonly addIconSlot;
110
+ /**
111
+ * Dismissable / addable affordance surface (close + add resolution,
112
+ * close interaction, focus restoration). Level-2 helper keeps the
113
+ * cascade + handlers off the organism class (LOC guard).
114
+ */
115
+ protected readonly dismiss: CngxTabDismissals;
116
+ /**
117
+ * APG tablist keyboard model (automatic activation). Owns arrow / Home /
118
+ * End resolution, the `host.select()` activation, and focus movement;
119
+ * derives each tab's roving `tabindex` from the presenter's `activeId`
120
+ * (single source of truth). Level-2 helper keeps the keyboard logic off
121
+ * the organism class (LOC guard).
122
+ */
123
+ protected readonly keyboard: CngxTabKeyboardNav;
41
124
  /**
42
125
  * AT-announcement bundle from `@cngx/common/tabs/announcements/`.
43
126
  * Owns role descriptions, resolved aria-label, live-region phrasing,
@@ -45,11 +128,28 @@ declare class CngxTabGroup implements CngxTabPanelHost {
45
128
  * direction prefix.
46
129
  */
47
130
  protected readonly announcements: CngxTabGroupAnnouncements;
131
+ /**
132
+ * Resolved skin / icon-layout cascade (`input ?? config ?? default`),
133
+ * read by the `[data-skin]` / `[data-icon-layout]` host bindings. The
134
+ * Level-2 helper keeps the cascade off the organism class (LOC guard).
135
+ */
136
+ protected readonly hostAttrs: CngxTabsHostAttrs;
137
+ /**
138
+ * Whether the active panel contains a natively-focusable descendant.
139
+ * Resolved by a post-render DOM probe (the only way to know - the
140
+ * panel content is consumer-projected). Drives {@link panelTabindex}:
141
+ * a panel with no focusable child earns one tab stop so keyboard users
142
+ * can still reach its content (APG tabpanel pattern); a panel that
143
+ * already has reachable content does not (no redundant stop). Boolean
144
+ * with default `Object.is`, so a stable probe never re-triggers CD.
145
+ */
146
+ private readonly activePanelHasFocusable;
48
147
  constructor();
49
148
  private readonly tabDirectiveById;
50
149
  /**
51
- * Resolved 3-stage cascade for `errorBadge`, `rejectionIcon`, `busySpinner`.
52
- * `null` -> render built-in default span.
150
+ * Resolved 3-stage cascade for `errorBadge`, `rejectionIcon`,
151
+ * `busySpinner`, `icon`. `null` -> render built-in default (or, for
152
+ * `icon`, render nothing).
53
153
  */
54
154
  protected readonly templates: CngxTabGroupTemplateBindings;
55
155
  readonly tabs: Signal<readonly CngxTabHandle[]>;
@@ -60,9 +160,50 @@ declare class CngxTabGroup implements CngxTabPanelHost {
60
160
  protected isTabBusy(tab: CngxTabHandle): boolean;
61
161
  protected tabHeaderId(tab: CngxTabHandle): string;
62
162
  protected tabPanelId(tab: CngxTabHandle): string;
163
+ /**
164
+ * APG tabpanel `tabindex`: `0` only when the selected panel has no
165
+ * focusable descendant (so its content is keyboard-reachable from the
166
+ * tablist), else `null` - never a redundant tab stop. Inactive panels
167
+ * are `null` (they are `[hidden]`).
168
+ */
169
+ protected panelTabindex(tab: CngxTabHandle): 0 | null;
170
+ /**
171
+ * Keep-alive set for `panelMode='lazy'`: the ids of every tab that has
172
+ * ever been activated. Derived history (Pillar 1) - a `linkedSignal`
173
+ * accumulating onto its own previous value as `activeId` moves, NOT an
174
+ * `effect` that writes a set. The structural `equal` (size + membership)
175
+ * means re-activating an already-seen tab returns an equal set, so the
176
+ * reference is stable and downstream `shouldRenderContent` reads do not
177
+ * churn. Unbounded by design: `lazy` trades retention (every visited
178
+ * panel's content stays alive for the directive's life) for keep-alive;
179
+ * the set is bounded by tab count, and `lazy-destroy` is the bounded
180
+ * alternative when retention is unwanted.
181
+ */
182
+ private readonly seenIds;
183
+ /**
184
+ * Whether a tab's panel content should be rendered now. The panel
185
+ * `<div>` is always in the DOM (the `aria-controls` target); only its
186
+ * inner content is gated. `eager` is byte-identical to the original
187
+ * behaviour (everything rendered, visibility toggled via `[hidden]`).
188
+ */
189
+ protected shouldRenderContent(tab: CngxTabHandle): boolean;
63
190
  protected tabDescriptorId(tab: CngxTabHandle): string;
64
- /** `true` when a bound error-aggregator opted in to revealing errors. */
191
+ /**
192
+ * `true` when the tab is in error - the folded `hasError` (direct
193
+ * `[error]` flag OR the aggregator's reveal-gated `shouldShow()`), so
194
+ * a direct-error tab lights the badge without an aggregator while
195
+ * deferred-reveal aggregators stay silent until revealed.
196
+ */
65
197
  protected showErrorBadge(tab: CngxTabHandle): boolean;
198
+ /**
199
+ * Context for `*cngxTabIcon`. Allocates fresh per CD - `active` is
200
+ * reactive (selection), and `*ngTemplateOutlet` only re-evaluates
201
+ * `let-*` bindings when the context reference changes (`Object.is`
202
+ * input-diff); a `WeakMap`-cached object with a mutated `active`
203
+ * would leave consumer bindings stale. Same pattern as
204
+ * {@link busySpinnerContextFor}.
205
+ */
206
+ protected iconContextFor(tab: CngxTabHandle, index: number): CngxTabIconContext;
66
207
  /**
67
208
  * Stable per-tab `*cngxTabErrorBadge` context cache. Context is
68
209
  * `{ tab }` only (no reactive fields), so a `WeakMap` keeps the
@@ -73,12 +214,12 @@ declare class CngxTabGroup implements CngxTabPanelHost {
73
214
  /** `WeakMap`-cached context for `*cngxTabErrorBadge`. Stable ref per tab. */
74
215
  protected errorBadgeContextFor(tab: CngxTabHandle): CngxTabErrorBadgeContext;
75
216
  /**
76
- * Context for `*cngxTabBusySpinner`. Allocates fresh per CD —
217
+ * Context for `*cngxTabBusySpinner`. Allocates fresh per CD -
77
218
  * `intendedIndex` is reactive, and `*ngTemplateOutlet` only
78
219
  * re-evaluates `let-*` bindings when the context reference changes
79
220
  * (`Object.is` input-diff); a cached mutated object would leave
80
221
  * consumer bindings stale. `intendedIndex` is non-undefined by gate
81
- * — `isTabBusy(tab)` returning `true` requires it.
222
+ * - `isTabBusy(tab)` returning `true` requires it.
82
223
  */
83
224
  protected busySpinnerContextFor(tab: CngxTabHandle): CngxTabBusySpinnerContext;
84
225
  /**
@@ -89,17 +230,30 @@ declare class CngxTabGroup implements CngxTabPanelHost {
89
230
  */
90
231
  protected rejectionIconContextFor(failedIndex: number): CngxTabRejectionIconContext;
91
232
  protected handleHeaderClick(tab: CngxTabHandle): void;
233
+ /**
234
+ * Roving `tabindex` for a tab button: `0` for the active tab, `-1` for
235
+ * the rest, so the tablist is a single tab stop (APG) and `Tab` lands
236
+ * on the active tab. Derived in {@link keyboard} from `activeId`.
237
+ */
238
+ protected tabTabindex(tab: CngxTabHandle): 0 | -1;
239
+ /**
240
+ * Single `(keydown)` entry for a tab button: APG navigation
241
+ * (arrows / Home / End, automatic activation) first, then Delete-to-close
242
+ * when navigation did not consume the event.
243
+ */
244
+ protected handleTabKeydown(tab: CngxTabHandle, event: KeyboardEvent): void;
92
245
  selectById(id: string): void;
93
246
  /**
94
- * Clear the presenter's `lastFailedIndex` rejection flag — exposed
247
+ * Clear the presenter's `lastFailedIndex` rejection flag - exposed
95
248
  * so template-ref consumers (`#tg="cngxTabGroup"`) can dismiss the
96
249
  * decoration without injecting the host token.
97
250
  */
98
251
  clearLastFailed(): void;
99
252
  labelTemplateFor(id: string): TemplateRef<unknown> | null;
253
+ subLabelTemplateFor(id: string): TemplateRef<unknown> | null;
100
254
  contentTemplateFor(id: string): TemplateRef<unknown> | null;
101
255
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxTabGroup, never>;
102
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxTabGroup, "cngx-tab-group", ["cngxTabGroup"], { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; }, {}, ["tabDirectives", "errorBadgeSlot", "rejectionIconSlot", "busySpinnerSlot"], ["cngx-tab-overflow", "*"], true, [{ directive: typeof _cngx_common_tabs.CngxTabGroupPresenter; inputs: { "activeIndex": "activeIndex"; "orientation": "orientation"; "loop": "loop"; "commitAction": "commitAction"; "commitMode": "commitMode"; }; outputs: { "activeIndexChange": "activeIndexChange"; }; }, { directive: typeof i2.CngxRovingTabindex; inputs: { "orientation": "orientation"; "loop": "loop"; }; outputs: {}; }, { directive: typeof i2.CngxFocusRestore; inputs: {}; outputs: {}; }]>;
256
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxTabGroup, "cngx-tab-group", ["cngxTabGroup"], { "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "skin": { "alias": "skin"; "required": false; "isSignal": true; }; "iconLayout": { "alias": "iconLayout"; "required": false; "isSignal": true; }; "panelMode": { "alias": "panelMode"; "required": false; "isSignal": true; }; "fitted": { "alias": "fitted"; "required": false; "isSignal": true; }; "tabAlign": { "alias": "tabAlign"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "addable": { "alias": "addable"; "required": false; "isSignal": true; }; }, {}, ["tabDirectives", "errorBadgeSlot", "rejectionIconSlot", "busySpinnerSlot", "iconSlot", "closeIconSlot", "addIconSlot"], ["cngx-tab-overflow", "*"], true, [{ directive: typeof _cngx_common_tabs.CngxTabGroupPresenter; inputs: { "activeIndex": "activeIndex"; "orientation": "orientation"; "loop": "loop"; "commitAction": "commitAction"; "commitMode": "commitMode"; }; outputs: { "activeIndexChange": "activeIndexChange"; "tabClose": "tabClose"; "tabAdd": "tabAdd"; }; }, { directive: typeof i2.CngxFocusRestore; inputs: {}; outputs: {}; }]>;
103
257
  }
104
258
 
105
259
  /**
@@ -108,12 +262,22 @@ declare class CngxTabGroup implements CngxTabPanelHost {
108
262
  * organism only via {@link CNGX_TAB_PANEL_HOST}.
109
263
  *
110
264
  * Visibility is tracked through a native `IntersectionObserver`
111
- * rooted on the parent strip — `CngxIntersectionObserver` doesn't
265
+ * rooted on the parent strip - `CngxIntersectionObserver` doesn't
112
266
  * fit (single-element scope, can't reach sibling `viewChildren`).
113
- * `threshold: 0` — only fully-clipped tabs surface. Combined with
267
+ * `threshold: 0` - only fully-clipped tabs surface. Combined with
114
268
  * the organism's `scrollIntoView` effect this forms the self-healing
115
269
  * loop: pick hidden tab -> strip scrolls -> IO fires -> `hiddenTabs`
116
270
  * self-trims.
271
+ *
272
+ * @playground Overflow showcase ./examples/overflow-showcase/overflow-showcase.component.ts
273
+ *
274
+ * @category ui/tabs
275
+ * @docsKind primary
276
+ * @wcag AA
277
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/tabs/tab-overflow.component.ts
278
+ * @since 0.1.0
279
+ * @relatedTo CngxTabGroup, CngxPopover, CngxActiveDescendant
280
+ * <example-url>http://localhost:4200/#/ui/tabs/tab-overflow/8-tabs-in-a-narrow-container</example-url>
117
281
  */
118
282
  declare class CngxTabOverflow {
119
283
  protected readonly panelHost: CngxTabPanelHost;
@@ -142,12 +306,12 @@ declare class CngxTabOverflow {
142
306
  private readonly attachRetry;
143
307
  constructor();
144
308
  protected pickTab(tab: CngxTabHandle): void;
145
- /** AD `(activated)` — Enter / Space on a highlighted option picks. */
309
+ /** AD `(activated)` - Enter / Space on a highlighted option picks. */
146
310
  protected handleAdActivated(value: unknown): void;
147
311
  /**
148
312
  * Auto-opens popover on nav-key when collapsed. AD's host listener
149
313
  * fires first, so `activeIndex` is already set when this runs.
150
- * No-op while open — AD owns navigation.
314
+ * No-op while open - AD owns navigation.
151
315
  */
152
316
  protected handleTriggerKeydown(event: KeyboardEvent): void;
153
317
  private observeCurrentTabs;
@@ -155,7 +319,7 @@ declare class CngxTabOverflow {
155
319
  private commitPendingVisibility;
156
320
  /**
157
321
  * IO-root resolution via the injected adapter. Returns `null`
158
- * before the molecule is anchored — the rAF retry loop re-polls.
322
+ * before the molecule is anchored - the rAF retry loop re-polls.
159
323
  */
160
324
  private resolveStrip;
161
325
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxTabOverflow, never>;
@@ -13,6 +13,7 @@ export { CngxFailed, CngxPending, CngxSucceeded } from '@cngx/common/interactive
13
13
  * @cngx/ui/layout – CngxStack, CngxGrid
14
14
  * @cngx/ui/overlay – CngxOverlay, CngxOverlayRef
15
15
  */
16
+ /** @internal — replaced at publish time, not part of consumer API. */
16
17
  declare const VERSION: _cngx_utils.Version;
17
18
 
18
19
  export { VERSION };
@@ -1,78 +0,0 @@
1
- @use 'sass:map';
2
- @use 'sass:math';
3
- @use '@angular/material' as mat;
4
-
5
- // Include in your global theme stylesheet alongside the Material theme:
6
- //
7
- // @use '@angular/material' as mat;
8
- // @use '@cngx/ui/speak/speak-button-theme' as speak;
9
- //
10
- // $theme: mat.define-theme((...));
11
- //
12
- // html {
13
- // @include mat.all-component-themes($theme);
14
- // @include speak.theme($theme);
15
- // }
16
-
17
-
18
- @mixin base() {
19
- --cngx-speak-btn-size: 36px;
20
- --cngx-speak-btn-icon-size: 18px;
21
- --cngx-speak-btn-radius: 8px;
22
- --cngx-speak-btn-border-width: 1px;
23
- --cngx-speak-btn-transition: 0.15s;
24
- }
25
-
26
- @mixin color($theme) {
27
- @if mat.get-theme-version($theme) == 1 {
28
- // M3 — use Material sys tokens
29
- --cngx-speak-btn-bg: var(--mat-sys-surface-container-low);
30
- --cngx-speak-btn-hover-bg: var(--mat-sys-surface-container);
31
- --cngx-speak-btn-color: var(--mat-sys-on-surface-variant);
32
- --cngx-speak-btn-active-color: var(--mat-sys-primary);
33
- --cngx-speak-btn-speaking-bg: var(--mat-sys-primary);
34
- --cngx-speak-btn-speaking-color: var(--mat-sys-on-primary);
35
- --cngx-border: var(--mat-sys-outline-variant);
36
- } @else {
37
- // M2 — derive from palette
38
- --cngx-speak-btn-bg: #{mat.get-theme-color($theme, background, card)};
39
- --cngx-speak-btn-hover-bg: #{rgba(mat.get-theme-color($theme, primary), 0.04)};
40
- --cngx-speak-btn-color: rgba(0, 0, 0, 0.54);
41
- --cngx-speak-btn-active-color: #{mat.get-theme-color($theme, primary)};
42
- --cngx-speak-btn-speaking-bg: #{mat.get-theme-color($theme, primary)};
43
- --cngx-speak-btn-speaking-color: #fff;
44
- --cngx-border: rgba(0, 0, 0, 0.12);
45
- }
46
- }
47
-
48
- @mixin density($theme) {
49
- $scale: mat.get-theme-density($theme);
50
- $scale: math.max(-4, math.min(0, $scale));
51
-
52
- $sizes: (
53
- 0: 36px,
54
- -1: 32px,
55
- -2: 28px,
56
- -3: 24px,
57
- -4: 20px,
58
- );
59
- $icon-sizes: (
60
- 0: 18px,
61
- -1: 16px,
62
- -2: 14px,
63
- -3: 12px,
64
- -4: 10px,
65
- );
66
-
67
- --cngx-speak-btn-size: #{map.get($sizes, $scale)};
68
- --cngx-speak-btn-icon-size: #{map.get($icon-sizes, $scale)};
69
- }
70
-
71
-
72
- @mixin theme($theme) {
73
- :where(cngx-speak-button) {
74
- @include base();
75
- @include color($theme);
76
- @include density($theme);
77
- }
78
- }