@cngx/common 0.1.0-rc.9 → 0.3.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.
Files changed (88) hide show
  1. package/a11y/README.md +15 -2
  2. package/button/README.md +258 -0
  3. package/command/README.md +19 -8
  4. package/data/README.md +10 -10
  5. package/fesm2022/cngx-common-a11y.mjs +701 -263
  6. package/fesm2022/cngx-common-a11y.mjs.map +1 -1
  7. package/fesm2022/cngx-common-audio.mjs +83 -64
  8. package/fesm2022/cngx-common-audio.mjs.map +1 -1
  9. package/fesm2022/cngx-common-button.mjs +1084 -0
  10. package/fesm2022/cngx-common-button.mjs.map +1 -0
  11. package/fesm2022/cngx-common-card.mjs +135 -76
  12. package/fesm2022/cngx-common-card.mjs.map +1 -1
  13. package/fesm2022/cngx-common-chart.mjs +749 -296
  14. package/fesm2022/cngx-common-chart.mjs.map +1 -1
  15. package/fesm2022/cngx-common-command.mjs +51 -29
  16. package/fesm2022/cngx-common-command.mjs.map +1 -1
  17. package/fesm2022/cngx-common-data.mjs +695 -405
  18. package/fesm2022/cngx-common-data.mjs.map +1 -1
  19. package/fesm2022/cngx-common-dialog.mjs +112 -112
  20. package/fesm2022/cngx-common-dialog.mjs.map +1 -1
  21. package/fesm2022/cngx-common-display.mjs +668 -308
  22. package/fesm2022/cngx-common-display.mjs.map +1 -1
  23. package/fesm2022/cngx-common-interactive.mjs +7066 -2739
  24. package/fesm2022/cngx-common-interactive.mjs.map +1 -1
  25. package/fesm2022/cngx-common-layout.mjs +2121 -492
  26. package/fesm2022/cngx-common-layout.mjs.map +1 -1
  27. package/fesm2022/cngx-common-menu-button.mjs +557 -0
  28. package/fesm2022/cngx-common-menu-button.mjs.map +1 -0
  29. package/fesm2022/cngx-common-popover.mjs +1207 -569
  30. package/fesm2022/cngx-common-popover.mjs.map +1 -1
  31. package/fesm2022/cngx-common-stepper.mjs +256 -261
  32. package/fesm2022/cngx-common-stepper.mjs.map +1 -1
  33. package/fesm2022/cngx-common-tabs.mjs +202 -262
  34. package/fesm2022/cngx-common-tabs.mjs.map +1 -1
  35. package/fesm2022/cngx-common-timeline.mjs +28 -61
  36. package/fesm2022/cngx-common-timeline.mjs.map +1 -1
  37. package/fesm2022/cngx-common.mjs +10 -10
  38. package/fesm2022/cngx-common.mjs.map +1 -1
  39. package/interactive/README.md +30 -19
  40. package/layout/README.md +1 -1
  41. package/menu-button/README.md +234 -0
  42. package/package.json +14 -4
  43. package/popover/README.md +42 -5
  44. package/popover/tooltip-indicator.scss +52 -0
  45. package/schematics/ng-add/index.js +7 -7
  46. package/schematics/ng-add/schema.json +5 -0
  47. package/stepper/README.md +0 -1
  48. package/theming/components/cngx-accordion.css +36 -7
  49. package/theming/components/cngx-async.css +185 -37
  50. package/theming/components/cngx-backdrop.css +3 -1
  51. package/theming/components/cngx-badge.css +20 -5
  52. package/theming/components/cngx-bottom-sheet.css +2 -0
  53. package/theming/components/cngx-breadcrumb.css +3 -1
  54. package/theming/components/cngx-button-group.css +325 -0
  55. package/theming/components/cngx-button-toggle.css +55 -23
  56. package/theming/components/cngx-button.css +975 -0
  57. package/theming/components/cngx-data-grid.css +2 -0
  58. package/theming/components/cngx-dialog.css +3 -1
  59. package/theming/components/cngx-divider.css +24 -9
  60. package/theming/components/cngx-drawer.css +153 -0
  61. package/theming/components/cngx-icon-glyph.css +76 -0
  62. package/theming/components/cngx-listbox.css +79 -25
  63. package/theming/components/cngx-menu.css +112 -52
  64. package/theming/components/cngx-nav.css +1220 -0
  65. package/theming/components/cngx-popover-sheet.css +43 -11
  66. package/theming/components/cngx-popover.css +37 -13
  67. package/theming/components/cngx-recycler-placeholder.css +2 -0
  68. package/theming/components/cngx-ripple.css +74 -16
  69. package/theming/components/cngx-sidebar.css +71 -0
  70. package/theming/components/cngx-slider.css +3 -1
  71. package/theming/components/cngx-tooltip.css +2 -0
  72. package/timeline/README.md +2 -2
  73. package/types/cngx-common-a11y.d.ts +343 -120
  74. package/types/cngx-common-audio.d.ts +60 -88
  75. package/types/cngx-common-button.d.ts +698 -0
  76. package/types/cngx-common-card.d.ts +104 -78
  77. package/types/cngx-common-chart.d.ts +671 -384
  78. package/types/cngx-common-command.d.ts +44 -47
  79. package/types/cngx-common-data.d.ts +350 -342
  80. package/types/cngx-common-dialog.d.ts +91 -120
  81. package/types/cngx-common-display.d.ts +475 -300
  82. package/types/cngx-common-interactive.d.ts +4350 -1723
  83. package/types/cngx-common-layout.d.ts +1365 -286
  84. package/types/cngx-common-menu-button.d.ts +382 -0
  85. package/types/cngx-common-popover.d.ts +671 -289
  86. package/types/cngx-common-stepper.d.ts +217 -347
  87. package/types/cngx-common-tabs.d.ts +173 -386
  88. package/types/cngx-common-timeline.d.ts +25 -104
@@ -1,14 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, computed, makeEnvironmentProviders, model, input, Injector, output, signal, Directive, TemplateRef, contentChild, DestroyRef, Renderer2, ElementRef, effect, afterNextRender, untracked, linkedSignal, runInInjectionContext } from '@angular/core';
2
+ import { InjectionToken, inject, computed, makeEnvironmentProviders, model, input, Injector, output, signal, Directive, TemplateRef, contentChild, DestroyRef, Renderer2, ElementRef, effect, afterRenderEffect, afterNextRender, untracked, linkedSignal, runInInjectionContext } from '@angular/core';
3
3
  import { CNGX_COMMIT_CONTROLLER_FACTORY, createRefusedPhrase } from '@cngx/common/data';
4
4
  import { createOverrideMerge, createTransitionTracker, CNGX_STATEFUL, nextUid, coerceSignal, createAnnouncementPhrase } from '@cngx/core/utils';
5
- import { recordEqual, CngxRuntimeError, cngxDevWarn, arrayEqual } from '@cngx/utils';
5
+ import { recordEqual, CngxRuntimeError, CNGX_ICON_ALERT, cngxDevWarn, arrayEqual } from '@cngx/utils';
6
6
  import { createLanguageSection, formatMessage, createSectionBundle } from '@cngx/core/i18n';
7
7
  import { isObservable, Observable } from 'rxjs';
8
8
  import { PRIMARY_OUTLET, Router, ActivatedRoute, NavigationEnd } from '@angular/router';
9
+ import { createIconSvgElement } from '@cngx/common/display';
9
10
  import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
10
11
  import { filter } from 'rxjs/operators';
11
- import { resolveInlineStep } from '@cngx/core';
12
+ import { resolveInlineStep, injectEffectiveMotion } from '@cngx/core';
12
13
 
13
14
  /**
14
15
  * DI fallback the presenter reads when its `[commitAction]` input is
@@ -17,9 +18,8 @@ import { resolveInlineStep } from '@cngx/core';
17
18
  * exposes a non-null `action()`, its `mode()` wins over the
18
19
  * `[commitMode]` input.
19
20
  *
20
- * @category common/tabs
21
21
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/commit-action.token.ts
22
- * @since 0.1.0
22
+ * @since 0.3.0
23
23
  */
24
24
  const CNGX_TABS_COMMIT_ACTION = new InjectionToken('CngxTabsCommitAction');
25
25
 
@@ -27,12 +27,10 @@ const CNGX_TABS_COMMIT_ACTION = new InjectionToken('CngxTabsCommitAction');
27
27
  * The English tabs section: the single source of the tabs' English copy.
28
28
  * `CNGX_TABS_I18N` and the `CNGX_TABS_CONFIG` labels default to it.
29
29
  *
30
- * @category common/tabs/i18n
31
- * @since 0.1.0
30
+ * @since 0.3.0
32
31
  * @relatedTo CNGX_TABS_I18N, CNGX_TABS_CONFIG
33
32
  */
34
33
  const CNGX_TABS_LANGUAGE_EN = {
35
- tabsRegion: 'Tabs',
36
34
  tabsLabel: 'Tabs',
37
35
  tabRoleDescription: 'tab list',
38
36
  tabPanelRoleDescription: 'tab panel',
@@ -98,10 +96,9 @@ const tabsBundle = createSectionBundle({
98
96
  * for the app locale. Provide it through {@link provideTabsI18n}; a
99
97
  * `{ provide, useValue }` entry must supply a `Signal<CngxTabsI18n>`.
100
98
  *
101
- * @category common/tabs/i18n
102
99
  * @wcag AA
103
100
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/i18n/tabs-i18n.ts
104
- * @since 0.1.0
101
+ * @since 0.3.0
105
102
  */
106
103
  const CNGX_TABS_I18N = new InjectionToken('CngxTabsI18n', {
107
104
  providedIn: 'root',
@@ -117,11 +114,10 @@ function defineTabsI18nFeature(fn) {
117
114
  }
118
115
  /**
119
116
  * Override i18n labels via a partial bundle - unset keys keep the
120
- * language pack's copy, or the English default. Same shape as `withTabsAriaLabels` /
121
- * `withTabsFallbackLabels` so `provideCngxTabs` composes both
122
- * surfaces uniformly. Pass a `Signal` to switch the language at runtime.
123
- *
124
- * @category common/tabs/i18n
117
+ * language pack's copy, or the English default. Same shape as
118
+ * `withTabsFallbackLabels`, so `provideCngxTabs` composes the i18n and
119
+ * the config feature uniformly. Pass a `Signal` to switch the language
120
+ * at runtime.
125
121
  */
126
122
  function withTabsI18nLabels(overrides) {
127
123
  return defineTabsI18nFeature((bundle) => createOverrideMerge(bundle, overrides));
@@ -140,8 +136,6 @@ function withTabsI18nLabels(overrides) {
140
136
  * ],
141
137
  * });
142
138
  * ```
143
- *
144
- * @category common/tabs/i18n
145
139
  */
146
140
  function provideTabsI18n(...features) {
147
141
  return {
@@ -152,8 +146,6 @@ function provideTabsI18n(...features) {
152
146
  /**
153
147
  * Inject the resolved tabs i18n bundle. Read it inside a `computed()`,
154
148
  * template or handler so a language switch reaches the label.
155
- *
156
- * @category common/tabs/i18n
157
149
  */
158
150
  function injectTabsI18n() {
159
151
  return tabsBundle.resolve(inject(CNGX_TABS_I18N));
@@ -174,9 +166,6 @@ const TABS_CONFIG_DEFAULTS = {
174
166
  // for both organisms, and pinning one here would silently flip the
175
167
  // other. linkAriaCurrent defaults at the link, not here.
176
168
  linkAriaCurrent: 'page',
177
- ariaLabels: {
178
- tabsRegion: CNGX_TABS_LANGUAGE_EN.tabsRegion,
179
- },
180
169
  fallbackLabels: {
181
170
  // W3C ARIA tablist convention - kept distinct from
182
171
  // `i18n.tabsLabel` so AT doesn't read the same string twice
@@ -193,10 +182,9 @@ const TABS_CONFIG_DEFAULTS = {
193
182
  * `providedIn: 'root'` with the library defaults; override via {@link provideTabsConfig}
194
183
  * (root) or {@link provideTabsConfigAt} (component scope).
195
184
  *
196
- * @category common/tabs
197
185
  * @wcag AA
198
186
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tabs-config.ts
199
- * @since 0.1.0
187
+ * @since 0.3.0
200
188
  */
201
189
  const CNGX_TABS_CONFIG = new InjectionToken('CngxTabsConfig', {
202
190
  providedIn: 'root',
@@ -216,8 +204,6 @@ function defineTabsConfigFeature(fn) {
216
204
  /**
217
205
  * Override the default orientation. Per-instance `[orientation]`
218
206
  * still wins; this changes the cascade default only.
219
- *
220
- * @category common/tabs
221
207
  */
222
208
  function withTabsDefaultOrientation(orientation) {
223
209
  return defineTabsConfigFeature((cfg) => ({
@@ -230,15 +216,11 @@ function withTabsDefaultOrientation(orientation) {
230
216
  * collides with the stepper family's identical symbol when both libs
231
217
  * are auto-imported. The alias stays for one minor release before
232
218
  * removal.
233
- *
234
- * @category common/tabs
235
219
  */
236
220
  const withDefaultOrientation = withTabsDefaultOrientation;
237
221
  /**
238
222
  * Override whether roving-tabindex navigation loops from last back to
239
223
  * first (and vice versa). Per-instance `[loop]` Input still wins.
240
- *
241
- * @category common/tabs
242
224
  */
243
225
  function withTabsRovingLoop(loop) {
244
226
  return defineTabsConfigFeature((cfg) => ({ ...cfg, defaultLoop: loop }));
@@ -248,8 +230,6 @@ function withTabsRovingLoop(loop) {
248
230
  * `'optimistic'` activates the tab on action dispatch and rolls back
249
231
  * on error; `'pessimistic'` waits for success. Per-instance
250
232
  * `[commitMode]` Input still wins.
251
- *
252
- * @category common/tabs
253
233
  */
254
234
  function withTabsCommitMode(mode) {
255
235
  return defineTabsConfigFeature((cfg) => ({
@@ -265,8 +245,6 @@ function withTabsCommitMode(mode) {
265
245
  *
266
246
  * Not to be confused with `[cngxTabsRouteSync]`, the router-outlet
267
247
  * integration - this feature configures fragment deep-linking only.
268
- *
269
- * @category common/tabs
270
248
  */
271
249
  function withTabsFragmentSync(mode, param = 'tab') {
272
250
  return defineTabsConfigFeature((cfg) => ({
@@ -287,8 +265,6 @@ function withTabsFragmentSync(mode, param = 'tab') {
287
265
  *
288
266
  * Changes which policy runs, not the policies themselves - swap those via
289
267
  * {@link CNGX_TAB_URL_MATCH_STRATEGY}.
290
- *
291
- * @category common/tabs
292
268
  */
293
269
  function withTabsRouteMatch(mode) {
294
270
  return defineTabsConfigFeature((cfg) => ({ ...cfg, routeMatch: mode }));
@@ -303,8 +279,6 @@ function withTabsRouteMatch(mode) {
303
279
  * `provideTabsConfigAt` in that component's `viewProviders` rather than
304
280
  * setting it app-wide, unless every nav in the app is section-shaped.
305
281
  * Per-link `[ariaCurrent]` still wins.
306
- *
307
- * @category common/tabs
308
282
  */
309
283
  function withTabsLinkAriaCurrent(token) {
310
284
  return defineTabsConfigFeature((cfg) => ({ ...cfg, linkAriaCurrent: token }));
@@ -314,8 +288,6 @@ function withTabsLinkAriaCurrent(token) {
314
288
  * with the new `[cngxTabsRouteSync]` router-outlet directive; this
315
289
  * feature only ever configured fragment / query-param deep-linking. The
316
290
  * alias stays for one minor release before removal.
317
- *
318
- * @category common/tabs
319
291
  */
320
292
  const withTabsRouterSync = withTabsFragmentSync;
321
293
  /**
@@ -324,8 +296,6 @@ const withTabsRouterSync = withTabsFragmentSync;
324
296
  * the cascade default. Structure, slots, ARIA, and keyboard behaviour
325
297
  * are identical across skins - only the `[data-skin]` host attribute
326
298
  * changes the CSS layer. The Material twin (`[cngxMatTabs]`) ignores it.
327
- *
328
- * @category common/tabs
329
299
  */
330
300
  function withTabsSkin(skin) {
331
301
  return defineTabsConfigFeature((cfg) => ({ ...cfg, skin }));
@@ -335,8 +305,6 @@ function withTabsSkin(skin) {
335
305
  * Default`'start'`. Per-instance `[iconLayout]` Input still wins. Orthogonal to
336
306
  * skin and orientation - only the `[data-icon-layout]` host attribute
337
307
  * changes.
338
- *
339
- * @category common/tabs
340
308
  */
341
309
  function withTabsIconLayout(layout) {
342
310
  return defineTabsConfigFeature((cfg) => ({ ...cfg, iconLayout: layout }));
@@ -351,8 +319,6 @@ function withTabsIconLayout(layout) {
351
319
  *
352
320
  * Under `'lazy'`, a deep link mounts only the panel it names: both sync
353
321
  * directives seed the active tab before the first panel render.
354
- *
355
- * @category common/tabs
356
322
  */
357
323
  function withTabsPanelMode(mode) {
358
324
  return defineTabsConfigFeature((cfg) => ({ ...cfg, panelMode: mode }));
@@ -362,8 +328,6 @@ function withTabsPanelMode(mode) {
362
328
  * (horizontal only). \
363
329
  * Default `false`. Per-instance `[fitted]` Input still
364
330
  * wins. No effect under `orientation="vertical"`.
365
- *
366
- * @category common/tabs
367
331
  */
368
332
  function withTabsFitted(fitted) {
369
333
  return defineTabsConfigFeature((cfg) => ({ ...cfg, fitted }));
@@ -372,8 +336,6 @@ function withTabsFitted(fitted) {
372
336
  * Set the app-wide default tab-cluster alignment (horizontal only). \
373
337
  * Default `'start'`. Per-instance `[tabAlign]` Input still wins. Ignored
374
338
  * under `orientation="vertical"` and when the group is `fitted`.
375
- *
376
- * @category common/tabs
377
339
  */
378
340
  function withTabsAlign(align) {
379
341
  return defineTabsConfigFeature((cfg) => ({ ...cfg, tabAlign: align }));
@@ -382,8 +344,6 @@ function withTabsAlign(align) {
382
344
  * Set the app-wide default for whether tabs render a close affordance. \
383
345
  * Default `false`. Per-instance `[closable]` Input wins; a per-`CngxTab`
384
346
  * `[closable]` override wins over both.
385
- *
386
- * @category common/tabs
387
347
  */
388
348
  function withTabsClosable(closable) {
389
349
  return defineTabsConfigFeature((cfg) => ({ ...cfg, closable }));
@@ -392,33 +352,16 @@ function withTabsClosable(closable) {
392
352
  * Set the app-wide default for whether the group renders an add-tab
393
353
  * button. \
394
354
  * Default `false`. Per-instance `[addable]` Input wins.
395
- *
396
- * @category common/tabs
397
355
  */
398
356
  function withTabsAddable(addable) {
399
357
  return defineTabsConfigFeature((cfg) => ({ ...cfg, addable }));
400
358
  }
401
359
  /** @internal - shared empty base, so label merges over an unset key memoize. */
402
360
  const NO_LABELS = {};
403
- /**
404
- * Merge ARIA labels into the cascade. Keys not provided keep their
405
- * library defaults; per-instance overrides on the tab group still win.
406
- * Pass a `Signal` to switch the language at runtime.
407
- *
408
- * @category common/tabs
409
- */
410
- function withTabsAriaLabels(labels) {
411
- return defineTabsConfigFeature((cfg) => ({
412
- ...cfg,
413
- ariaLabels: createOverrideMerge(cfg.ariaLabels ?? NO_LABELS, labels),
414
- }));
415
- }
416
361
  /**
417
362
  * Merge the tablist / tab-panel `aria-roledescription` fallbacks into the
418
363
  * cascade. Keys not provided keep their library defaults. Pass a `Signal`
419
364
  * to switch the language at runtime.
420
- *
421
- * @category common/tabs
422
365
  */
423
366
  function withTabsFallbackLabels(labels) {
424
367
  return defineTabsConfigFeature((cfg) => ({
@@ -429,8 +372,6 @@ function withTabsFallbackLabels(labels) {
429
372
  /**
430
373
  * Override the IO-debounce window (ms). See
431
374
  * {@link CngxTabsConfig.overflowStabilizeMs}.
432
- *
433
- * @category common/tabs
434
375
  */
435
376
  function withTabOverflowStabilizeMs(ms) {
436
377
  return defineTabsConfigFeature((cfg) => ({
@@ -441,8 +382,6 @@ function withTabOverflowStabilizeMs(ms) {
441
382
  /**
442
383
  * Override the worst-case staleness ceiling on the visibility-map
443
384
  * commit. See {@link CngxTabsConfig.overflowMaxDeferMs}.
444
- *
445
- * @category common/tabs
446
385
  */
447
386
  function withTabOverflowMaxDeferMs(ms) {
448
387
  return defineTabsConfigFeature((cfg) => ({
@@ -462,8 +401,6 @@ function withTabOverflowMaxDeferMs(ms) {
462
401
  *
463
402
  * providers: [provideTabsConfig(withTabOverflowTriggerTemplate(this.moreTrigger()))]
464
403
  * ```
465
- *
466
- * @category common/tabs
467
404
  */
468
405
  function withTabOverflowTriggerTemplate(template) {
469
406
  return defineTabsConfigFeature((cfg) => ({
@@ -474,8 +411,6 @@ function withTabOverflowTriggerTemplate(template) {
474
411
  /**
475
412
  * App-wide override for each row inside the overflow popover. \
476
413
  * Middle tier; per-instance `*cngxTabOverflowItem` still wins.
477
- *
478
- * @category common/tabs
479
414
  */
480
415
  function withTabOverflowItemTemplate(template) {
481
416
  return defineTabsConfigFeature((cfg) => ({
@@ -487,8 +422,6 @@ function withTabOverflowItemTemplate(template) {
487
422
  * App-wide override for the error-badge decoration. Middle tier;
488
423
  * per-instance `*cngxTabErrorBadge` still wins. Sibling of the
489
424
  * stepper family's `withStepBadgeTemplate`.
490
- *
491
- * @category common/tabs
492
425
  */
493
426
  function withTabErrorBadgeTemplate(template) {
494
427
  return defineTabsConfigFeature((cfg) => ({
@@ -501,8 +434,6 @@ function withTabErrorBadgeTemplate(template) {
501
434
  * tier; \
502
435
  * per-instance `*cngxTabRejectionIcon` still wins. Sibling
503
436
  * of {@link withStepRejectionTemplate}.
504
- *
505
- * @category common/tabs
506
437
  */
507
438
  function withTabRejectionIconTemplate(template) {
508
439
  return defineTabsConfigFeature((cfg) => ({
@@ -514,8 +445,6 @@ function withTabRejectionIconTemplate(template) {
514
445
  * App-wide override for the commit-pending busy-spinner overlay.
515
446
  * Middle tier; per-instance `*cngxTabBusySpinner` still wins.
516
447
  * Sibling of {@link withStepBusySpinnerTemplate}.
517
- *
518
- * @category common/tabs
519
448
  */
520
449
  function withTabBusySpinnerTemplate(template) {
521
450
  return defineTabsConfigFeature((cfg) => ({
@@ -527,8 +456,6 @@ function withTabBusySpinnerTemplate(template) {
527
456
  * App-wide override for the tab-icon slot. Middle tier of the 3-stage
528
457
  * cascade; per-instance `*cngxTabIcon` still wins. Sibling of
529
458
  * {@link withStepIndicatorTemplate}.
530
- *
531
- * @category common/tabs
532
459
  */
533
460
  function withTabIconTemplate(template) {
534
461
  return defineTabsConfigFeature((cfg) => ({
@@ -539,8 +466,6 @@ function withTabIconTemplate(template) {
539
466
  /**
540
467
  * App-wide override for a tab's close-button glyph. Middle tier;
541
468
  * per-instance `*cngxTabCloseIcon` still wins.
542
- *
543
- * @category common/tabs
544
469
  */
545
470
  function withTabCloseIconTemplate(template) {
546
471
  return defineTabsConfigFeature((cfg) => ({
@@ -551,8 +476,6 @@ function withTabCloseIconTemplate(template) {
551
476
  /**
552
477
  * App-wide override for the add-tab button glyph. Middle tier;
553
478
  * per-instance `*cngxTabAddIcon` still wins.
554
- *
555
- * @category common/tabs
556
479
  */
557
480
  function withTabAddIconTemplate(template) {
558
481
  return defineTabsConfigFeature((cfg) => ({
@@ -568,7 +491,6 @@ function tabsConfigDefaultsFromPack() {
568
491
  const language = injectTabsLanguage();
569
492
  return {
570
493
  ...TABS_CONFIG_DEFAULTS,
571
- ariaLabels: computed(() => ({ tabsRegion: language().tabsRegion }), { equal: recordEqual }),
572
494
  fallbackLabels: computed(() => ({
573
495
  tabRoleDescription: language().tabRoleDescription,
574
496
  tabPanelRoleDescription: language().tabPanelRoleDescription,
@@ -583,8 +505,6 @@ function resolveFeatures(features) {
583
505
  * Root-level provider. Apply once in `bootstrapApplication` /
584
506
  * `appConfig.providers`. Returns {@link EnvironmentProviders} per
585
507
  * the canonical cngx config-cascade signature.
586
- *
587
- * @category common/tabs
588
508
  */
589
509
  function provideTabsConfig(...features) {
590
510
  return makeEnvironmentProviders([
@@ -602,16 +522,12 @@ function provideTabsConfig(...features) {
602
522
  * viewProviders: [...provideTabsConfigAt(withTabsDefaultOrientation('vertical'))],
603
523
  * })
604
524
  * ```
605
- *
606
- * @category common/tabs
607
525
  */
608
526
  function provideTabsConfigAt(...features) {
609
527
  return [{ provide: CNGX_TABS_CONFIG, useFactory: () => resolveFeatures(features) }];
610
528
  }
611
529
  /**
612
530
  * Inject the resolved tabs config in an injection context.
613
- *
614
- * @category common/tabs
615
531
  */
616
532
  function injectTabsConfig() {
617
533
  return inject(CNGX_TABS_CONFIG);
@@ -623,8 +539,6 @@ function injectTabsConfig() {
623
539
  * returns into one {@link CngxTabsCommitResolution}: `true` accepts,
624
540
  * `false` refuses (the controller settles to `'idle'` and stores no
625
541
  * error), a throw fails.
626
- *
627
- * @category common/tabs
628
542
  */
629
543
  function createTabsCommitHandler(opts) {
630
544
  const { controller } = opts;
@@ -734,9 +648,8 @@ function runTabsAction(action, fromIndex, toIndex, handlers) {
734
648
  * - `CNGX_ARRAY_COMMIT_HANDLER_FACTORY` (select) and
735
649
  * - `CNGX_STEPPER_COMMIT_HANDLER_FACTORY`.
736
650
  *
737
- * @category common/tabs
738
651
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/commit-handler.ts
739
- * @since 0.1.0
652
+ * @since 0.3.0
740
653
  */
741
654
  const CNGX_TABS_COMMIT_HANDLER_FACTORY = new InjectionToken('CngxTabsCommitHandlerFactory', {
742
655
  providedIn: 'root',
@@ -750,10 +663,9 @@ const CNGX_TABS_COMMIT_HANDLER_FACTORY = new InjectionToken('CngxTabsCommitHandl
750
663
  * `select()`, roving stop derived from `activeId`) through
751
664
  * `createTabKeyboardNav`.
752
665
  *
753
- * @category common/tabs
754
666
  * @wcag AA
755
667
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab-group-host.token.ts
756
- * @since 0.1.0
668
+ * @since 0.3.0
757
669
  */
758
670
  const CNGX_TAB_GROUP_HOST = new InjectionToken('CngxTabGroupHost');
759
671
  /**
@@ -787,26 +699,31 @@ function injectTabGroupHost(selector) {
787
699
  * Directive-only - organisms compose via `hostDirectives`, consumers attach
788
700
  * `[cngxTabGroup]` directly.
789
701
  *
790
- * @category common/tabs
791
- * @docsKind primary
792
702
  * @wcag AA
793
703
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/presenter.directive.ts
794
- * @since 0.1.0
704
+ * @since 0.3.0
795
705
  * @relatedTo CngxTab, CngxTabContent, CngxTabLabel, CngxTabsFragmentSync
796
- * <example-url>http://localhost:4200/#/ui/tabs/tab-commit-action/optimistic-pessimistic-commits-with-bridge-directives</example-url>
706
+ * <example-url>/#/ui/tabs/tab-commit-action/optimistic-pessimistic-commits-with-bridge-directives</example-url>
797
707
  */
798
708
  class CngxTabGroupPresenter {
799
709
  config = injectTabsConfig();
710
+ /**
711
+ * Zero-based index of the active tab, two-way bindable as `[(activeIndex)]`. Defaults to `0`. The
712
+ * presenter writes it on navigation, so with a `commitAction` in `'pessimistic'` mode it changes only
713
+ * after the action resolves `true`; `activeId` reads it clamped to the registered tab count.
714
+ */
800
715
  activeIndex = model(0, ...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
801
716
  /**
802
- * @internal Two-field alias - bind the public `[orientation]`; read
803
- * the resolved {@link orientation} computed (input ?? config ?? default).
717
+ * Axis of the tab list: `'horizontal'` or `'vertical'`, bound as `[orientation]`. The tab organisms
718
+ * reflect the resolved value as `aria-orientation` and `data-orientation`. Unbound, the
719
+ * {@link orientation} computed falls back to the tabs config `defaultOrientation`, then `'horizontal'`.
804
720
  */
805
721
  orientationInput = input(undefined, { ...(ngDevMode ? { debugName: "orientationInput" } : /* istanbul ignore next */ {}), alias: 'orientation' });
806
722
  orientation = computed(() => this.orientationInput() ?? this.config.defaultOrientation ?? 'horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
807
723
  /**
808
- * @internal Two-field alias - bind the public `[loop]`; read the
809
- * resolved {@link loop} computed (input ?? config ?? default).
724
+ * Whether `selectNext` and `selectPrevious` wrap from the last enabled tab to the first and back,
725
+ * bound as `[loop]`. Unbound, the {@link loop} computed falls back to the tabs config `defaultLoop`,
726
+ * then `true`.
810
727
  */
811
728
  loopInput = input(undefined, { ...(ngDevMode ? { debugName: "loopInput" } : /* istanbul ignore next */ {}), alias: 'loop' });
812
729
  loop = computed(() => this.loopInput() ?? this.config.defaultLoop ?? true, ...(ngDevMode ? [{ debugName: "loop" }] : /* istanbul ignore next */ []));
@@ -817,19 +734,19 @@ class CngxTabGroupPresenter {
817
734
  * semantics come from the commit-controller - a rapid second
818
735
  * `select(...)` cancels the in-flight runner.
819
736
  *
820
- * @internal Two-field alias - bind the public `[commitAction]`; read
821
- * the resolved {@link commitAction} computed (input ?? DI fallback).
737
+ * Bound as `[commitAction]`. The {@link commitAction} computed resolves the input first, then the
738
+ * `CNGX_TABS_COMMIT_ACTION` DI fallback used by the router sync, then `null`; there is no config
739
+ * tier.
822
740
  */
823
741
  commitActionInput = input(null, { ...(ngDevMode ? { debugName: "commitActionInput" } : /* istanbul ignore next */ {}), alias: 'commitAction' });
824
742
  /**
825
- * Default `'optimistic'` - tab change is navigation, not a save,
826
- * so eager visual feedback matches the user's mental model.
827
- * Switch to `'pessimistic'` when the new tab must wait for the
828
- * action to confirm.
743
+ * Whether a tab change lands before (`'optimistic'`) or after (`'pessimistic'`) the commit action
744
+ * resolves, bound as `[commitMode]`. A tab change is navigation, not a save, so the default is
745
+ * `'optimistic'`; choose `'pessimistic'` when the new tab must wait for the action to confirm.
829
746
  *
830
- * @internal Two-field alias - bind the public `[commitMode]`; read
831
- * the resolved {@link commitMode} computed (DI fallback mode wins
832
- * when a routed action is active, else input ?? config ?? default).
747
+ * The {@link commitMode} computed lets the mode of an active `CNGX_TABS_COMMIT_ACTION` DI fallback
748
+ * win (the routed path pins `'pessimistic'`); otherwise it resolves the input, then the tabs config
749
+ * `defaultCommitMode`, then `'optimistic'`.
833
750
  */
834
751
  commitModeInput = input(undefined, { ...(ngDevMode ? { debugName: "commitModeInput" } : /* istanbul ignore next */ {}), alias: 'commitMode' });
835
752
  injector = inject(Injector);
@@ -930,6 +847,11 @@ class CngxTabGroupPresenter {
930
847
  return Math.max(0, Math.min(this.activeIndex(), count - 1));
931
848
  }, ...(ngDevMode ? [{ debugName: "clampedIndex" }] : /* istanbul ignore next */ []));
932
849
  activeId = computed(() => this.tabs()[this.clampedIndex()]?.id ?? null, { ...(ngDevMode ? { debugName: "activeId" } : /* istanbul ignore next */ {}), equal: Object.is });
850
+ /**
851
+ * `CngxTabGroupHost` contract, called by `CngxTab` in its `ngOnInit` and by `CngxTabLink`. Appends the
852
+ * handle to the tab list in registration order; a second call with a known id replaces the stored
853
+ * handle and keeps its position.
854
+ */
933
855
  register(handle) {
934
856
  const current = this.tabsState();
935
857
  const idx = current.findIndex((h) => h.id === handle.id);
@@ -941,6 +863,11 @@ class CngxTabGroupPresenter {
941
863
  }
942
864
  this.tabsState.set([...current, handle]);
943
865
  }
866
+ /**
867
+ * `CngxTabGroupHost` contract, called from the destroy hook of `CngxTab` and `CngxTabLink`. Removes the
868
+ * tab from the list; when `handle` is passed and is no longer the stored one (it was replaced by a
869
+ * re-register), the call does nothing.
870
+ */
944
871
  unregister(id, handle) {
945
872
  const current = this.tabsState();
946
873
  const entry = current.find((h) => h.id === id);
@@ -958,6 +885,11 @@ class CngxTabGroupPresenter {
958
885
  clearLastFailed() {
959
886
  this.clearedSequenceState.set(this.lastOutcomeState()?.sequence);
960
887
  }
888
+ /**
889
+ * Activates the tab at the given index, clamped to the registered range. Does nothing when the target is
890
+ * the active tab or is disabled. Without a `commitAction` the change is synchronous; with one, it follows
891
+ * `commitMode`, and a newer call supersedes the pending one.
892
+ */
961
893
  select(index) {
962
894
  const tabs = this.tabs();
963
895
  if (tabs.length === 0) {
@@ -1017,6 +949,10 @@ class CngxTabGroupPresenter {
1017
949
  }
1018
950
  });
1019
951
  }
952
+ /**
953
+ * Activates the next enabled tab after the active one, through `select`. At the end of the list it wraps
954
+ * to the first enabled tab when `loop` is on, otherwise it does nothing.
955
+ */
1020
956
  selectNext() {
1021
957
  const tabs = this.tabs();
1022
958
  if (tabs.length === 0) {
@@ -1040,6 +976,10 @@ class CngxTabGroupPresenter {
1040
976
  }
1041
977
  }
1042
978
  }
979
+ /**
980
+ * Activates the previous enabled tab before the active one, through `select`. At the start of the list it
981
+ * wraps to the last enabled tab when `loop` is on, otherwise it does nothing.
982
+ */
1043
983
  selectPrevious() {
1044
984
  const tabs = this.tabs();
1045
985
  if (tabs.length === 0) {
@@ -1063,6 +1003,9 @@ class CngxTabGroupPresenter {
1063
1003
  }
1064
1004
  }
1065
1005
  }
1006
+ /**
1007
+ * Activates the tab registered under the given id, through `select`. Unknown ids are ignored.
1008
+ */
1066
1009
  selectById(id) {
1067
1010
  const tabs = this.tabs();
1068
1011
  const idx = tabs.findIndex((h) => h.id === id);
@@ -1070,6 +1013,12 @@ class CngxTabGroupPresenter {
1070
1013
  this.select(idx);
1071
1014
  }
1072
1015
  }
1016
+ /**
1017
+ * Asks to close the tab with the given id: when an earlier tab closes it shifts `activeIndex` and the
1018
+ * rejection markers so the same tab stays active; closing the active tab hands over to its neighbour.
1019
+ * Then emits `tabClose` with the id and index. It does not remove the tab; the consumer
1020
+ * drops it from its own data in the `(tabClose)` handler. Unknown ids are ignored.
1021
+ */
1073
1022
  requestClose(id) {
1074
1023
  const tabs = this.tabs();
1075
1024
  const index = tabs.findIndex((h) => h.id === id);
@@ -1103,6 +1052,10 @@ class CngxTabGroupPresenter {
1103
1052
  this.originIndexDuringCommitState.update((origin) => shiftIndexOnClose(origin, index));
1104
1053
  this.tabClose.emit({ id, index });
1105
1054
  }
1055
+ /**
1056
+ * Emits `tabAdd`. The presenter creates no tab; the consumer appends one to its own data in the
1057
+ * `(tabAdd)` handler.
1058
+ */
1106
1059
  requestAdd() {
1107
1060
  this.tabAdd.emit();
1108
1061
  }
@@ -1193,10 +1146,9 @@ function tabsEqual(a, b) {
1193
1146
  * The overflow molecule and consumer-authored skin sub-components inject this
1194
1147
  * instead of the concrete component class.
1195
1148
  *
1196
- * @category common/tabs
1197
1149
  * @wcag AA
1198
1150
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab-panel-host.token.ts
1199
- * @since 0.1.0
1151
+ * @since 0.3.0
1200
1152
  */
1201
1153
  const CNGX_TAB_PANEL_HOST = new InjectionToken('CngxTabPanelHost');
1202
1154
 
@@ -1235,10 +1187,9 @@ const CNGX_TAB_PANEL_HOST = new InjectionToken('CngxTabPanelHost');
1235
1187
  * export class MySectionNav {}
1236
1188
  * ```
1237
1189
  *
1238
- * @category common/tabs
1239
1190
  * @wcag AA
1240
1191
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab-nav-host.token.ts
1241
- * @since 0.1.0
1192
+ * @since 0.3.0
1242
1193
  * @relatedTo CngxTabsRouteSync, CNGX_TAB_GROUP_HOST, CngxTabNav, CngxMatTabNav
1243
1194
  */
1244
1195
  const CNGX_TAB_NAV_HOST = new InjectionToken('CngxTabNavHost');
@@ -1349,8 +1300,6 @@ function resolveByPrefix(ctx) {
1349
1300
  *
1350
1301
  * Pure: no injection context, no signal reads. The directive resolves the
1351
1302
  * mode cascade and the tab registry, then hands both in.
1352
- *
1353
- * @category common/tabs
1354
1303
  */
1355
1304
  function createTabUrlMatch() {
1356
1305
  return {
@@ -1373,10 +1322,9 @@ function createTabUrlMatch() {
1373
1322
  * navigation a tab switch performs is already swappable, so the read that
1374
1323
  * mirrors navigation back onto `activeIndex` should be too.
1375
1324
  *
1376
- * @category common/tabs
1377
1325
  * @wcag AA
1378
1326
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/url-match.ts
1379
- * @since 0.1.0
1327
+ * @since 0.3.0
1380
1328
  * @relatedTo CngxTabsRouteSync, createTabUrlMatch, createTabRouterCommit
1381
1329
  */
1382
1330
  const CNGX_TAB_URL_MATCH_STRATEGY = new InjectionToken('CngxTabUrlMatchStrategy', {
@@ -1397,10 +1345,9 @@ const CNGX_TAB_URL_MATCH_STRATEGY = new InjectionToken('CngxTabUrlMatchStrategy'
1397
1345
  * </div>
1398
1346
  * ```
1399
1347
  *
1400
- * @category common/tabs
1401
1348
  * @wcag AA
1402
1349
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab-content.directive.ts
1403
- * @since 0.1.0
1350
+ * @since 0.3.0
1404
1351
  * @relatedTo CngxTab, CngxTabLabel
1405
1352
  */
1406
1353
  class CngxTabContent {
@@ -1429,10 +1376,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
1429
1376
  * </div>
1430
1377
  * ```
1431
1378
  *
1432
- * @category common/tabs
1433
1379
  * @wcag AA
1434
1380
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab-label.directive.ts
1435
- * @since 0.1.0
1381
+ * @since 0.3.0
1436
1382
  * @relatedTo CngxTab, CngxTabContent
1437
1383
  */
1438
1384
  class CngxTabLabel {
@@ -1466,12 +1412,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
1466
1412
  * </div>
1467
1413
  * ```
1468
1414
  *
1469
- * @category common/tabs/slots
1470
1415
  * @wcag AA
1471
1416
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-sub-label.directive.ts
1472
- * @since 0.1.0
1417
+ * @since 0.3.0
1473
1418
  * @relatedTo CngxTab, CngxTabLabel, CngxTabContent
1474
- * <example-url>http://localhost:4200/#/ui/tabs/tab-sub-label/label-with-count</example-url>
1419
+ * <example-url>/#/ui/tabs/tab-sub-label/label-with-count</example-url>
1475
1420
  */
1476
1421
  class CngxTabSubLabel {
1477
1422
  /**
@@ -1507,19 +1452,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
1507
1452
  * ... content templates here ...
1508
1453
  * </div>
1509
1454
  * ```
1510
- * @category common/tabs
1511
- * @docsKind primary
1512
1455
  * @wcag AA
1513
1456
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab.directive.ts
1514
- * @since 0.1.0
1457
+ * @since 0.3.0
1515
1458
  * @relatedTo CngxTabGroupPresenter, CngxTabLabel, CngxTabContent, CngxTabErrorBadge
1516
1459
  * @slot cngxTabLabel The tab's own header label.
1517
1460
  * @slot cngxTabSubLabel Secondary line under the label, e.g. a count or status.
1518
1461
  * @slot cngxTabContent The panel body, rendered lazily when the tab activates.
1519
1462
  */
1520
1463
  class CngxTab {
1464
+ /**
1465
+ * Identifier the tab registers under with its group. Defaults to an auto-generated `cngx-tab-` uid.
1466
+ * It is captured once in `ngOnInit`, so a later rebind does not re-register; `selectById`, the
1467
+ * `(tabClose)` event and the fragment-sync deep link match against it.
1468
+ */
1521
1469
  id = input(nextUid('cngx-tab-'), ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
1470
+ /**
1471
+ * Marks the tab as not selectable. Defaults to `false`. A disabled tab is skipped by next/previous
1472
+ * navigation and refused by `select`, and the strip header reflects it through `aria-disabled`.
1473
+ */
1522
1474
  disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
1475
+ /**
1476
+ * Header text of the tab, shown in the strip. Defaults to `undefined`; the `*cngxTabLabel` slot
1477
+ * provides richer content.
1478
+ */
1523
1479
  label = input(undefined, ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
1524
1480
  /**
1525
1481
  * Optional secondary text line under the primary label (a count, a
@@ -1528,6 +1484,11 @@ class CngxTab {
1528
1484
  * richer content. Folds into the tab's accessible name.
1529
1485
  */
1530
1486
  subLabel = input(undefined, ...(ngDevMode ? [{ debugName: "subLabel" }] : /* istanbul ignore next */ []));
1487
+ /**
1488
+ * Optional error aggregator for forms with several error sources. Defaults to `undefined`. The tab
1489
+ * counts as errored when the aggregator's `shouldShow()` is `true`, so a deferred-reveal validation stays
1490
+ * silent until it is revealed; it composes with `[error]`, either one errors the tab.
1491
+ */
1531
1492
  errorAggregator = input(undefined, ...(ngDevMode ? [{ debugName: "errorAggregator" }] : /* istanbul ignore next */ []));
1532
1493
  /**
1533
1494
  * Direct error flag for the common "this tab is invalid" case - no
@@ -1634,8 +1595,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
1634
1595
  * There is no `select()` call - invoking it would re-enter the commit path the
1635
1596
  * routed-nav model deliberately keeps dormant.
1636
1597
  *
1637
- * **Error communication is reactive:** `aria-invalid` plus the
1638
- * `--error` skin glyph signal the state, and an injected screen-reader
1598
+ * **Error communication is reactive:** `aria-invalid` plus a leading
1599
+ * `aria-hidden` alert icon (`.cngx-tab-link__error-icon`, built from the
1600
+ * shared icon data) signal the state, and an injected screen-reader
1639
1601
  * descriptor span (referenced by a permanent `aria-describedby`) carries the
1640
1602
  * direct `[error]` message string so assistive tech reads *why* the link is
1641
1603
  * invalid.
@@ -1647,11 +1609,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
1647
1609
  * </cngx-tab-nav>
1648
1610
  * ```
1649
1611
  *
1650
- * @category common/tabs
1651
- * @docsKind primary
1652
1612
  * @wcag AA
1653
1613
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab-link.directive.ts
1654
- * @since 0.1.0
1614
+ * @since 0.3.0
1655
1615
  * @relatedTo CngxTabNav, CngxTabsRouteSync, CngxTab, CngxMatTabLink
1656
1616
  */
1657
1617
  class CngxTabLink {
@@ -1728,6 +1688,8 @@ class CngxTabLink {
1728
1688
  descriptorId = computed(() => `${this.id()}-desc`, ...(ngDevMode ? [{ debugName: "descriptorId" }] : /* istanbul ignore next */ []));
1729
1689
  /** The injected descriptor `<span>`, created in {@link ngOnInit}. */
1730
1690
  descriptorEl = null;
1691
+ /** The leading alert icon, present while {@link hasError} holds. */
1692
+ errorIconEl = null;
1731
1693
  constructor() {
1732
1694
  if (!this.host) {
1733
1695
  throw new CngxRuntimeError('CNGX1045', typeof ngDevMode !== 'undefined' &&
@@ -1743,6 +1705,11 @@ class CngxTabLink {
1743
1705
  this.syncDescriptor(el);
1744
1706
  }
1745
1707
  });
1708
+ // The anchor is consumer DOM, so the alert icon is built here rather
1709
+ // than templated: leading child, `aria-hidden`, so the link's name and
1710
+ // its textContent stay the label alone. An after-render effect never
1711
+ // runs on the server, so hydration meets the template's own DOM.
1712
+ afterRenderEffect({ write: () => this.syncErrorIcon(this.hasError()) });
1746
1713
  }
1747
1714
  ngOnInit() {
1748
1715
  // Register in ngOnInit, NOT the constructor: a dynamically-bound `[id]`
@@ -1779,6 +1746,30 @@ class CngxTabLink {
1779
1746
  }
1780
1747
  });
1781
1748
  }
1749
+ /**
1750
+ * Insert or remove the leading `aria-hidden` alert icon. The svg is
1751
+ * legible bare (see `createIconSvgElement`); a styled tab organism sizes
1752
+ * it through the `.cngx-tab-link__error-icon` hook.
1753
+ */
1754
+ syncErrorIcon(show) {
1755
+ if (!show) {
1756
+ if (this.errorIconEl) {
1757
+ this.renderer.removeChild(this.hostEl, this.errorIconEl);
1758
+ this.errorIconEl = null;
1759
+ }
1760
+ return;
1761
+ }
1762
+ if (this.errorIconEl) {
1763
+ return;
1764
+ }
1765
+ const span = this.renderer.createElement('span');
1766
+ this.renderer.addClass(span, 'cngx-tab-link__error-icon');
1767
+ this.renderer.setAttribute(span, 'aria-hidden', 'true');
1768
+ const svg = createIconSvgElement(this.renderer, CNGX_ICON_ALERT, 'cngx-tab-link__icon-svg');
1769
+ this.renderer.appendChild(span, svg.element);
1770
+ this.renderer.insertBefore(this.hostEl, span, this.hostEl.firstChild);
1771
+ this.errorIconEl = span;
1772
+ }
1782
1773
  /**
1783
1774
  * Write the current direct-error message into the descriptor span and
1784
1775
  * toggle its `aria-hidden` so a clear link exposes no description. Keeps
@@ -1865,19 +1856,29 @@ function warnTabsRouterAbsent(selector, enables) {
1865
1856
  * </cngx-tab-group>
1866
1857
  * ```
1867
1858
  *
1868
- * @category common/tabs
1869
- * @docsKind primary
1870
1859
  * @wcag AA
1871
1860
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/router-sync.directive.ts
1872
- * @since 0.1.0
1861
+ * @since 0.3.0
1873
1862
  * @relatedTo CngxTabGroupPresenter, CngxTab
1863
+ * @axis level organism
1874
1864
  */
1875
1865
  class CngxTabsFragmentSync {
1876
1866
  // Default undefined so the cascade resolves through CNGX_TABS_CONFIG.
1877
- // Init-only: the seed and the write effect capture the resolved mode /
1878
- // param on their first run; changing either after init leaves the old
1879
- // URL key behind. Rebuild the directive to change them.
1867
+ // The resolved mode / param are read on every URL write and read, not
1868
+ // only at init; changing either after init applies to the next one and
1869
+ // leaves the previous key behind in the URL.
1870
+ /**
1871
+ * Binding `[mode]`: where the active tab id is kept in the URL, `'fragment'` (`#tab=settings`) or
1872
+ * `'queryParam'` (`?tab=settings`). Unset, it resolves through `fragmentSyncMode` of the tabs config and
1873
+ * then `'fragment'`. A change after init applies to the next URL write or read and leaves the previous
1874
+ * key in the URL.
1875
+ */
1880
1876
  modeInput = input(undefined, { ...(ngDevMode ? { debugName: "modeInput" } : /* istanbul ignore next */ {}), alias: 'mode' });
1877
+ /**
1878
+ * Binding `[paramName]`: name of the fragment or query key that carries the tab id. Unset, it resolves
1879
+ * through `fragmentSyncParam` of the tabs config and then `'tab'`. A change after init applies to the next URL write or read and leaves the previous
1880
+ * key in the URL.
1881
+ */
1881
1882
  paramNameInput = input(undefined, { ...(ngDevMode ? { debugName: "paramNameInput" } : /* istanbul ignore next */ {}), alias: 'paramName' });
1882
1883
  config = injectTabsConfig();
1883
1884
  mode = computed(() => this.modeInput() ?? this.config.fragmentSyncMode ?? 'fragment', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
@@ -2091,9 +2092,8 @@ const cngxDefaultTabRoute = (handle) => [handle.id];
2091
2092
  * late promise resolution lands on the closed subscriber and is
2092
2093
  * dropped by RxJS itself.
2093
2094
  *
2094
- * @category common/tabs
2095
2095
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/router-commit.ts
2096
- * @since 0.1.0
2096
+ * @since 0.3.0
2097
2097
  */
2098
2098
  function createTabRouterCommit(opts) {
2099
2099
  const routeFor = opts.routeFor ?? cngxDefaultTabRoute;
@@ -2217,11 +2217,9 @@ function createTabRouterCommit(opts) {
2217
2217
  * <router-outlet></router-outlet>
2218
2218
  * ```
2219
2219
  *
2220
- * @category common/tabs
2221
- * @docsKind primary
2222
2220
  * @wcag AA
2223
2221
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/route-sync.directive.ts
2224
- * @since 0.1.0
2222
+ * @since 0.3.0
2225
2223
  * @relatedTo CngxTabGroupPresenter, CngxTabsFragmentSync, createTabRouterCommit, CngxTabNav, CngxTabLink
2226
2224
  */
2227
2225
  class CngxTabsRouteSync {
@@ -2440,7 +2438,6 @@ function partitionFeatures(features, caller) {
2440
2438
  * providers: [
2441
2439
  * provideCngxTabs(
2442
2440
  * withTabsDefaultOrientation('vertical'),
2443
- * withTabsAriaLabels({ tabsRegion: 'Bereiche' }),
2444
2441
  * withTabsI18nLabels({ tabsLabel: 'Bereiche', moreTabsLabel: (n) => `${n} mehr` }),
2445
2442
  * withTabOverflowStabilizeMs(150),
2446
2443
  * ),
@@ -2448,9 +2445,8 @@ function partitionFeatures(features, caller) {
2448
2445
  * });
2449
2446
  * ```
2450
2447
  *
2451
- * @category common/tabs
2452
2448
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/provide-cngx-tabs.ts
2453
- * @since 0.1.0
2449
+ * @since 0.3.0
2454
2450
  * @relatedTo CngxTabGroup, CngxTabsConfig, provideCngxTabsAt
2455
2451
  */
2456
2452
  function provideCngxTabs(...features) {
@@ -2476,9 +2472,8 @@ function provideCngxTabs(...features) {
2476
2472
  * })
2477
2473
  * ```
2478
2474
  *
2479
- * @category common/tabs
2480
2475
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/provide-cngx-tabs.ts
2481
- * @since 0.1.0
2476
+ * @since 0.3.0
2482
2477
  * @relatedTo CngxTabGroup, CngxTabsConfig, provideCngxTabs
2483
2478
  */
2484
2479
  function provideCngxTabsAt(...features) {
@@ -2495,8 +2490,6 @@ function provideCngxTabsAt(...features) {
2495
2490
  * Default adapter for the cngx-native `<cngx-tab-group>` strip: \
2496
2491
  * walks `host.closest('.cngx-tabs__strip-wrapper')` for the IO root,
2497
2492
  * then `[id="${handle.id}-header"]` for each button.
2498
- *
2499
- * @category common/tabs/overflow
2500
2493
  */
2501
2494
  function createCngxTabOverflowDefaultDomAdapter() {
2502
2495
  return {
@@ -2516,9 +2509,8 @@ function createCngxTabOverflowDefaultDomAdapter() {
2516
2509
  * forking the molecule. Defaults to
2517
2510
  * {@link createCngxTabOverflowDefaultDomAdapter}.
2518
2511
  *
2519
- * @category common/tabs/overflow
2520
2512
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/overflow/dom-adapter.ts
2521
- * @since 0.1.0
2513
+ * @since 0.3.0
2522
2514
  */
2523
2515
  const CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY = new InjectionToken('CngxTabOverflowDomAdapterFactory', {
2524
2516
  providedIn: 'root',
@@ -2553,8 +2545,6 @@ const CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY = new InjectionToken('CngxTabOverflo
2553
2545
  * afterNextRender(() => retry.start());
2554
2546
  * destroyRef.onDestroy(() => retry.cancel());
2555
2547
  * ```
2556
- *
2557
- * @category common/tabs/overflow
2558
2548
  */
2559
2549
  function createDomAnchorRetry(options) {
2560
2550
  let attempts = 0;
@@ -2617,9 +2607,8 @@ function createDomAnchorRetry(options) {
2617
2607
  * - `CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY`, and
2618
2608
  * - `CNGX_TABS_COMMIT_HANDLER_FACTORY`.
2619
2609
  *
2620
- * @category common/tabs/overflow
2621
2610
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/overflow/dom-anchor-retry.ts
2622
- * @since 0.1.0
2611
+ * @since 0.3.0
2623
2612
  */
2624
2613
  const CNGX_DOM_ANCHOR_RETRY_FACTORY = new InjectionToken('CngxDomAnchorRetryFactory', {
2625
2614
  providedIn: 'root',
@@ -2640,10 +2629,9 @@ const CNGX_DOM_ANCHOR_RETRY_FACTORY = new InjectionToken('CngxDomAnchorRetryFact
2640
2629
  * </cngx-tab-overflow>
2641
2630
  * ```
2642
2631
  *
2643
- * @category common/tabs/overflow
2644
2632
  * @wcag AA
2645
2633
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/overflow/tab-overflow-trigger.directive.ts
2646
- * @since 0.1.0
2634
+ * @since 0.3.0
2647
2635
  * @relatedTo CngxTabOverflowItem, CngxTab
2648
2636
  */
2649
2637
  class CngxTabOverflowTrigger {
@@ -2676,10 +2664,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
2676
2664
  * </cngx-tab-overflow>
2677
2665
  * ```
2678
2666
  *
2679
- * @category common/tabs/overflow
2680
2667
  * @wcag AA
2681
2668
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/overflow/tab-overflow-item.directive.ts
2682
- * @since 0.1.0
2669
+ * @since 0.3.0
2683
2670
  * @relatedTo CngxTabOverflowTrigger, CngxTab
2684
2671
  */
2685
2672
  class CngxTabOverflowItem {
@@ -2700,7 +2687,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
2700
2687
  * Structural slot for the error-badge template. 3-stage cascade:
2701
2688
  * per-instance directive >
2702
2689
  * `CNGX_TABS_CONFIG.templates.errorBadge` >
2703
- * `CNGX_TABS_GLYPHS.errorBadge`.
2690
+ * the default alert icon.
2704
2691
  *
2705
2692
  * ```html
2706
2693
  * <cngx-tab-group>
@@ -2712,12 +2699,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
2712
2699
  * </cngx-tab-group>
2713
2700
  * ```
2714
2701
  *
2715
- * @category common/tabs/slots
2716
2702
  * @wcag AA
2717
2703
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-error-badge.directive.ts
2718
- * @since 0.1.0
2704
+ * @since 0.3.0
2719
2705
  * @relatedTo CngxTabRejectionIcon, CngxTabBusySpinner, CngxTab
2720
- * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-error-badge-via-code-cngxtaberrorbadge-code</example-url>
2706
+ * <example-url>/#/ui/tabs/tab-slot-overrides/custom-error-badge-via-code-cngxtaberrorbadge-code</example-url>
2721
2707
  */
2722
2708
  class CngxTabErrorBadge {
2723
2709
  templateRef = inject(TemplateRef);
@@ -2737,8 +2723,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
2737
2723
  * Structural slot for the rejection-decoration template. 3-stage
2738
2724
  * cascade: per-instance directive >
2739
2725
  * `CNGX_TABS_CONFIG.templates.rejectionIcon` >
2740
- * `CNGX_TABS_GLYPHS.rejectionIcon` (a failed commit) or
2741
- * `CNGX_TABS_GLYPHS.refusedIcon` (a refused one).
2726
+ * the default alert icon (a failed commit) or ban icon (a refused
2727
+ * one).
2742
2728
  *
2743
2729
  * ```html
2744
2730
  * <cngx-tab-group>
@@ -2755,12 +2741,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
2755
2741
  * </cngx-tab-group>
2756
2742
  * ```
2757
2743
  *
2758
- * @category common/tabs/slots
2759
2744
  * @wcag AA
2760
2745
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-rejection-icon.directive.ts
2761
- * @since 0.1.0
2746
+ * @since 0.3.0
2762
2747
  * @relatedTo CngxTabErrorBadge, CngxTabBusySpinner, CngxTab
2763
- * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/rejection-decoration-via-code-cngxtabrejectionicon-code</example-url>
2748
+ * <example-url>/#/ui/tabs/tab-slot-overrides/rejection-decoration-via-code-cngxtabrejectionicon-code</example-url>
2764
2749
  */
2765
2750
  class CngxTabRejectionIcon {
2766
2751
  templateRef = inject(TemplateRef);
@@ -2789,12 +2774,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
2789
2774
  * </cngx-tab-group>
2790
2775
  * ```
2791
2776
  *
2792
- * @category common/tabs/slots
2793
2777
  * @wcag AA
2794
2778
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-busy-spinner.directive.ts
2795
- * @since 0.1.0
2779
+ * @since 0.3.0
2796
2780
  * @relatedTo CngxTabErrorBadge, CngxTabRejectionIcon, CngxTab
2797
- * <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-busy-spinner-via-code-cngxtabbusyspinner-code</example-url>
2781
+ * <example-url>/#/ui/tabs/tab-slot-overrides/custom-busy-spinner-via-code-cngxtabbusyspinner-code</example-url>
2798
2782
  */
2799
2783
  class CngxTabBusySpinner {
2800
2784
  templateRef = inject(TemplateRef);
@@ -2822,16 +2806,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
2822
2806
  * </ng-template>
2823
2807
  * ```
2824
2808
  *
2825
- * @category common/tabs/slots
2826
2809
  * @wcag AA
2827
2810
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-icon.directive.ts
2828
- * @since 0.1.0
2811
+ * @since 0.3.0
2829
2812
  * @relatedTo CngxTabErrorBadge, CngxTab, CngxTabGroup
2830
- * <example-url>http://localhost:4200/#/ui/tabs/tab-icons/icon-end</example-url>
2831
- * <example-url>http://localhost:4200/#/ui/tabs/tab-icons/icon-only</example-url>
2832
- * <example-url>http://localhost:4200/#/ui/tabs/tab-icons/icon-start</example-url>
2833
- * <example-url>http://localhost:4200/#/ui/tabs/tab-icons/icon-top</example-url>
2834
- * <example-url>http://localhost:4200/#/ui/tabs/tab-icons/icon-vertical-sidebar</example-url>
2813
+ * <example-url>/#/ui/tabs/tab-icons/icon-end</example-url>
2814
+ * <example-url>/#/ui/tabs/tab-icons/icon-only</example-url>
2815
+ * <example-url>/#/ui/tabs/tab-icons/icon-start</example-url>
2816
+ * <example-url>/#/ui/tabs/tab-icons/icon-top</example-url>
2817
+ * <example-url>/#/ui/tabs/tab-icons/icon-vertical-sidebar</example-url>
2835
2818
  */
2836
2819
  class CngxTabIcon {
2837
2820
  templateRef = inject(TemplateRef);
@@ -2850,7 +2833,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
2850
2833
  /**
2851
2834
  * Structural slot for a tab's close-button glyph. 3-stage cascade:
2852
2835
  * per-instance directive > `CNGX_TABS_CONFIG.templates.closeIcon` >
2853
- * `CNGX_TABS_GLYPHS.closeIcon`.
2836
+ * the default close icon.
2854
2837
  *
2855
2838
  * ```html
2856
2839
  * <cngx-tab-group closable (tabClose)="remove($event.id)">
@@ -2859,12 +2842,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
2859
2842
  * </cngx-tab-group>
2860
2843
  * ```
2861
2844
  *
2862
- * @category common/tabs/slots
2863
2845
  * @wcag AA
2864
2846
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-close-icon.directive.ts
2865
- * @since 0.1.0
2847
+ * @since 0.3.0
2866
2848
  * @relatedTo CngxTabAddIcon, CngxTabGroup
2867
- * <example-url>http://localhost:4200/#/ui/tabs/tab-dismissable/dismissable-and-addable</example-url>
2849
+ * <example-url>/#/ui/tabs/tab-dismissable/dismissable-and-addable</example-url>
2868
2850
  */
2869
2851
  class CngxTabCloseIcon {
2870
2852
  templateRef = inject(TemplateRef);
@@ -2883,7 +2865,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
2883
2865
  /**
2884
2866
  * Structural slot for the add-tab button glyph. 3-stage cascade:
2885
2867
  * per-instance directive > `CNGX_TABS_CONFIG.templates.addIcon` >
2886
- * `CNGX_TABS_GLYPHS.addIcon`. The button owns its `aria-label`; the
2868
+ * the default plus icon. The button owns its `aria-label`; the
2887
2869
  * template paints only the glyph, so its context is `void`.
2888
2870
  *
2889
2871
  * ```html
@@ -2893,13 +2875,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
2893
2875
  * </cngx-tab-group>
2894
2876
  * ```
2895
2877
  *
2896
- * @category common/tabs/slots
2897
2878
  * @wcag AA
2898
2879
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-add-icon.directive.ts
2899
- * @since 0.1.0
2880
+ * @since 0.3.0
2900
2881
  * @relatedTo CngxTabCloseIcon, CngxTabGroup
2901
- * <example-url>http://localhost:4200/#/ui/tabs/tab-dismissable/dismissable-and-addable</example-url>
2902
- * <example-url>http://localhost:4200/#/ui/tabs/tab-group/addable-tabs</example-url>
2882
+ * <example-url>/#/ui/tabs/tab-dismissable/dismissable-and-addable</example-url>
2883
+ * <example-url>/#/ui/tabs/tab-group/addable-tabs</example-url>
2903
2884
  */
2904
2885
  class CngxTabAddIcon {
2905
2886
  templateRef = inject(TemplateRef);
@@ -2949,9 +2930,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
2949
2930
  * dismiss.handleAdd(); // routes through presenter.requestAdd
2950
2931
  * ```
2951
2932
  *
2952
- * @category common/tabs
2953
2933
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/dismissals/tab-dismissals.ts
2954
- * @since 0.1.0
2934
+ * @since 0.3.0
2955
2935
  * @relatedTo CngxTabGroup, CngxTabCloseIcon, CngxTabAddIcon
2956
2936
  */
2957
2937
  function createTabDismissals(opts) {
@@ -3098,9 +3078,8 @@ function createTabDismissals(opts) {
3098
3078
  * activation the focused tab is always the active one, so the clamped
3099
3079
  * active index is the correct origin.
3100
3080
  *
3101
- * @category common/tabs
3102
3081
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/keyboard/tab-keyboard-nav.ts
3103
- * @since 0.1.0
3082
+ * @since 0.3.0
3104
3083
  * @relatedTo CngxTabGroupPresenter, CngxTabGroup, createTabGroupAnnouncements
3105
3084
  */
3106
3085
  function createTabKeyboardNav(opts) {
@@ -3257,7 +3236,7 @@ function createTabKeyboardNav(opts) {
3257
3236
  * `null`.
3258
3237
  *
3259
3238
  * `null` means the organism renders its built-in default - a default
3260
- * span for the state decorations, the `CNGX_TABS_GLYPHS` glyph for
3239
+ * span for the state decorations, the default icon for
3261
3240
  * `closeIcon` / `addIcon`, and nothing for `icon`.
3262
3241
  *
3263
3242
  * Pure - no DI, no side effects. Safe in field-init. Sibling to
@@ -3277,10 +3256,9 @@ function createTabKeyboardNav(opts) {
3277
3256
  * - An unbound `icon` slot resolves to nothing, which is correct - the
3278
3257
  * icon is decorative and the label carries the accessible name.
3279
3258
  *
3280
- * @category common/tabs/slots
3281
3259
  * @wcag AA
3282
3260
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-group-template-cascade.ts
3283
- * @since 0.1.0
3261
+ * @since 0.3.0
3284
3262
  * @relatedTo CngxTabGroup, CngxTabErrorBadge, CngxTabBusySpinner, CngxTabRejectionIcon
3285
3263
  */
3286
3264
  function createTabGroupTemplateBindings(opts) {
@@ -3322,10 +3300,9 @@ function createTabGroupTemplateBindings(opts) {
3322
3300
  * always in the DOM; `statusPhrase` only fills its content, keeping the
3323
3301
  * `aria-describedby` reference stable.
3324
3302
  *
3325
- * @category common/tabs/announcements
3326
3303
  * @wcag AA
3327
3304
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/announcements/tab-group-announcements.ts
3328
- * @since 0.1.0
3305
+ * @since 0.3.0
3329
3306
  * @relatedTo CngxTabGroup, CngxLiveRegion, createTabKeyboardNav
3330
3307
  */
3331
3308
  function createTabGroupAnnouncements(options) {
@@ -3333,7 +3310,6 @@ function createTabGroupAnnouncements(options) {
3333
3310
  const closedAnnouncement = options.closedAnnouncement ?? (() => '');
3334
3311
  const fallbackLabels = coerceSignal(config.fallbackLabels);
3335
3312
  const defaultFallbackLabels = coerceSignal(TABS_CONFIG_DEFAULTS.fallbackLabels);
3336
- const ariaLabels = coerceSignal(config.ariaLabels);
3337
3313
  const tabsRoleDescription = computed(() => fallbackLabels()?.tabRoleDescription ?? defaultFallbackLabels().tabRoleDescription, ...(ngDevMode ? [{ debugName: "tabsRoleDescription" }] : /* istanbul ignore next */ []));
3338
3314
  const tabPanelRoleDescription = computed(() => fallbackLabels()?.tabPanelRoleDescription ??
3339
3315
  defaultFallbackLabels().tabPanelRoleDescription, ...(ngDevMode ? [{ debugName: "tabPanelRoleDescription" }] : /* istanbul ignore next */ []));
@@ -3341,7 +3317,7 @@ function createTabGroupAnnouncements(options) {
3341
3317
  if (ariaLabelledBy()) {
3342
3318
  return null;
3343
3319
  }
3344
- return ariaLabel() ?? ariaLabels()?.tabsRegion ?? i18n().tabsLabel;
3320
+ return ariaLabel() ?? i18n().tabsLabel;
3345
3321
  }, ...(ngDevMode ? [{ debugName: "resolvedAriaLabel" }] : /* istanbul ignore next */ []));
3346
3322
  // `prev?.source` = source value before the most recent change -
3347
3323
  // prior activeIndex without an `effect`-driven slot (Pillar 1).
@@ -3547,10 +3523,9 @@ function createTabGroupAnnouncements(options) {
3547
3523
  * point instead of as the first announcement. Returning to a section
3548
3524
  * that was active at mount still announces.
3549
3525
  *
3550
- * @category common/tabs/announcements
3551
3526
  * @wcag AA
3552
3527
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/announcements/tab-nav-announcement.ts
3553
- * @since 0.1.0
3528
+ * @since 0.3.0
3554
3529
  * @relatedTo CngxTabNav, CngxLiveRegion, createTabGroupAnnouncements
3555
3530
  */
3556
3531
  function createTabNavAnnouncement(options) {
@@ -3586,42 +3561,11 @@ function createTabNavAnnouncement(options) {
3586
3561
  return { liveAnnouncement };
3587
3562
  }
3588
3563
 
3589
- /**
3590
- * Default glyph fallbacks for `<cngx-tab-group>` skin slots. Read by
3591
- * the organism when neither a per-instance slot directive nor
3592
- * `CNGX_TABS_CONFIG.templates.<key>` is bound. Sibling to
3593
- * `CNGX_SELECT_GLYPHS` and `CNGX_STEPPER_GLYPHS`. Exported because
3594
- * Sheriff forbids deep-relative imports across library boundaries;
3595
- * `@internal` enforces consumer intent. Consumers customise via slot
3596
- * directives or `withTab*Template` config features.
3597
- *
3598
- * @internal
3599
- * @category common/tabs
3600
- */
3601
- const CNGX_TABS_GLYPHS = {
3602
- /** Default visual for `*cngxTabErrorBadge` when no override is bound. */
3603
- errorBadge: '!',
3604
- /** Default visual for `*cngxTabRejectionIcon` on a failed commit when no override is bound. */
3605
- rejectionIcon: '!',
3606
- /**
3607
- * Default visual for `*cngxTabRejectionIcon` on a refused commit (the
3608
- * action answered `false`). A distinct glyph, so a refusal never differs
3609
- * from a failure by colour alone (WCAG 1.4.1).
3610
- */
3611
- refusedIcon: '\u2298',
3612
- /** Default visual for a tab's close button when no override is bound. */
3613
- closeIcon: '×',
3614
- /** Default visual for the add-tab button when no override is bound. */
3615
- addIcon: '+',
3616
- };
3617
-
3618
3564
  /**
3619
3565
  * DOM `id` for a hidden-tab option row in the overflow listbox. \
3620
3566
  * Stable across CD passes so `aria-activedescendant` resolves to
3621
3567
  * the same `<li>`. `-overflow-option` suffix avoids collision with
3622
3568
  * the strip-button (`-header`) and per-tab descriptor (`-desc`).
3623
- *
3624
- * @category common/tabs/overflow
3625
3569
  */
3626
3570
  function tabOverflowOptionId(tab) {
3627
3571
  return `${tab.id}-overflow-option`;
@@ -3670,8 +3614,6 @@ function adItemsEqual(a, b) {
3670
3614
  * Pure - no DI, no side effects, no destroy hooks. Safe to call
3671
3615
  * from a component's field-init block. Mirrors the select-family
3672
3616
  * `createTemplateRegistry` pattern.
3673
- *
3674
- * @category common/tabs/overflow
3675
3617
  */
3676
3618
  function createTabOverflowTemplateBindings(opts) {
3677
3619
  const triggerTemplate = computed(() => opts.triggerSlot()?.templateRef ?? opts.config.templates?.overflowTrigger ?? null, ...(ngDevMode ? [{ debugName: "triggerTemplate" }] : /* istanbul ignore next */ []));
@@ -3744,7 +3686,6 @@ function createTabOverflowTemplateBindings(opts) {
3744
3686
  * `aria-activedescendant` while real focus stays on the trigger (APG
3745
3687
  * menu-button); the rows are never tab stops.
3746
3688
  *
3747
- * @category common/tabs/overflow
3748
3689
  * @wcag AA
3749
3690
  */
3750
3691
  function createOverflowPopoverHighlightSync(popover, ad) {
@@ -3766,9 +3707,8 @@ function createOverflowPopoverHighlightSync(popover, ad) {
3766
3707
  * - `CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY` and
3767
3708
  * - `CNGX_TABS_COMMIT_HANDLER_FACTORY`.
3768
3709
  *
3769
- * @category common/tabs/overflow
3770
3710
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/overflow/overflow-template-cascade.ts
3771
- * @since 0.1.0
3711
+ * @since 0.3.0
3772
3712
  */
3773
3713
  const CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY = new InjectionToken('CngxOverflowPopoverHighlightSyncFactory', {
3774
3714
  providedIn: 'root',
@@ -3797,9 +3737,10 @@ const DEFAULT_SCROLL_OPTIONS = {
3797
3737
  * popover scrolls it back into the strip, and the overflow recompute
3798
3738
  * then self-trims - keyboard navigation and the overflow list stay in
3799
3739
  * sync.
3800
- * - Motion is overridable for reduced motion: the default is smooth-center
3801
- * along the inline axis; pass `scrollOptions` (e.g. `behavior: 'auto'`)
3802
- * to honour `prefers-reduced-motion` or to scroll vertically.
3740
+ * - The default is smooth-center along the inline axis, instant under
3741
+ * reduced motion (the in-app `CNGX_MOTION` pick or the OS query, via
3742
+ * `injectEffectiveMotion`); pass `scrollOptions` to replace it, for
3743
+ * example to scroll vertically.
3803
3744
  *
3804
3745
  * ```ts
3805
3746
  * // Install once from the organism's field-init (needs an injection context).
@@ -3812,22 +3753,25 @@ const DEFAULT_SCROLL_OPTIONS = {
3812
3753
  * });
3813
3754
  * ```
3814
3755
  *
3815
- * @category common/tabs/scroll-sync
3816
3756
  * @wcag AA
3817
3757
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/scroll-sync/organism-scroll-sync.ts
3818
- * @since 0.1.0
3758
+ * @since 0.3.0
3819
3759
  * @relatedTo CngxTabGroup, CngxTabOverflow, CNGX_ORGANISM_SCROLL_SYNC_FACTORY
3820
3760
  */
3821
3761
  function createOrganismScrollSync(opts) {
3822
3762
  const { activeId, hostElement, scrollOptions, injector } = opts;
3823
- const resolvedOptions = scrollOptions ?? DEFAULT_SCROLL_OPTIONS;
3824
3763
  runInInjectionContext(injector, () => {
3764
+ const motion = scrollOptions ? undefined : injectEffectiveMotion();
3825
3765
  effect(() => {
3826
3766
  const id = activeId();
3827
3767
  if (!id) {
3828
3768
  return;
3829
3769
  }
3830
3770
  untracked(() => {
3771
+ const resolvedOptions = scrollOptions ?? {
3772
+ ...DEFAULT_SCROLL_OPTIONS,
3773
+ behavior: motion?.() === 'reduced' ? 'auto' : DEFAULT_SCROLL_OPTIONS.behavior,
3774
+ };
3831
3775
  const button = hostElement.querySelector(`[id="${id}-header"]`);
3832
3776
  button?.scrollIntoView?.(resolvedOptions);
3833
3777
  });
@@ -3850,7 +3794,7 @@ function createOrganismScrollSync(opts) {
3850
3794
  * - `CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY`.
3851
3795
  *
3852
3796
  * ```ts
3853
- * // Honour prefers-reduced-motion app-wide:
3797
+ * // Always scroll instantly, motion preference or not:
3854
3798
  * providers: [
3855
3799
  * {
3856
3800
  * provide: CNGX_ORGANISM_SCROLL_SYNC_FACTORY,
@@ -3861,10 +3805,9 @@ function createOrganismScrollSync(opts) {
3861
3805
  * // Or disable scroll-into-view entirely: useValue: () => {}
3862
3806
  * ```
3863
3807
  *
3864
- * @category common/tabs/scroll-sync
3865
3808
  * @wcag AA
3866
3809
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/scroll-sync/organism-scroll-sync.ts
3867
- * @since 0.1.0
3810
+ * @since 0.3.0
3868
3811
  * @relatedTo createOrganismScrollSync, CngxOrganismScrollSyncFactory
3869
3812
  */
3870
3813
  const CNGX_ORGANISM_SCROLL_SYNC_FACTORY = new InjectionToken('CngxOrganismScrollSyncFactory', {
@@ -3897,8 +3840,6 @@ function directiveMapEqual(a, b) {
3897
3840
  * directives keyed by `id()`. Structural equal prevents cascade when
3898
3841
  * `contentChildren` re-emits an unchanged child set. Shared by
3899
3842
  * `<cngx-tab-group>`, `<cngx-stepper>`, and `<cngx-mat-stepper>`.
3900
- *
3901
- * @category common/tabs/registry
3902
3843
  */
3903
3844
  function createDirectiveByIdMap(opts) {
3904
3845
  return computed(() => {
@@ -3917,9 +3858,8 @@ function createDirectiveByIdMap(opts) {
3917
3858
  * - `CNGX_DOM_ANCHOR_RETRY_FACTORY` and
3918
3859
  * - `CNGX_ORGANISM_SCROLL_SYNC_FACTORY`.
3919
3860
  *
3920
- * @category common/tabs/registry
3921
3861
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/registry/directive-by-id-map.ts
3922
- * @since 0.1.0
3862
+ * @since 0.3.0
3923
3863
  */
3924
3864
  const CNGX_DIRECTIVE_BY_ID_MAP_FACTORY = new InjectionToken('CngxDirectiveByIdMapFactory', {
3925
3865
  providedIn: 'root',
@@ -3927,12 +3867,12 @@ const CNGX_DIRECTIVE_BY_ID_MAP_FACTORY = new InjectionToken('CngxDirectiveByIdMa
3927
3867
  });
3928
3868
 
3929
3869
  /**
3930
- * @module @cngx/common/tabs
3870
+ * @module `@cngx/common/tabs`
3931
3871
  */
3932
3872
 
3933
3873
  /**
3934
3874
  * Generated bundle index. Do not edit.
3935
3875
  */
3936
3876
 
3937
- export { CNGX_DIRECTIVE_BY_ID_MAP_FACTORY, CNGX_DOM_ANCHOR_RETRY_FACTORY, CNGX_ORGANISM_SCROLL_SYNC_FACTORY, CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY, CNGX_TABS_COMMIT_ACTION, CNGX_TABS_COMMIT_HANDLER_FACTORY, CNGX_TABS_CONFIG, CNGX_TABS_GLYPHS, CNGX_TABS_I18N, CNGX_TABS_LANGUAGE_EN, CNGX_TAB_GROUP_HOST, CNGX_TAB_NAV_HOST, CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY, CNGX_TAB_PANEL_HOST, CNGX_TAB_URL_MATCH_STRATEGY, CngxTab, CngxTabAddIcon, CngxTabBusySpinner, CngxTabCloseIcon, CngxTabContent, CngxTabErrorBadge, CngxTabGroupPresenter, CngxTabIcon, CngxTabLabel, CngxTabLink, CngxTabOverflowItem, CngxTabOverflowTrigger, CngxTabRejectionIcon, CngxTabSubLabel, CngxTabsFragmentSync, CngxTabsRouteSync, createCngxTabOverflowDefaultDomAdapter, createDirectiveByIdMap, createDomAnchorRetry, createOrganismScrollSync, createOverflowPopoverHighlightSync, createTabDismissals, createTabGroupAnnouncements, createTabGroupTemplateBindings, createTabKeyboardNav, createTabNavAnnouncement, createTabOverflowTemplateBindings, createTabRouterCommit, createTabUrlMatch, createTabsCommitHandler, createTabsHostAttrs, injectTabsConfig, injectTabsI18n, provideCngxTabs, provideCngxTabsAt, provideTabsConfig, provideTabsConfigAt, provideTabsI18n, tabOverflowOptionId, withDefaultOrientation, withTabAddIconTemplate, withTabBusySpinnerTemplate, withTabCloseIconTemplate, withTabErrorBadgeTemplate, withTabIconTemplate, withTabOverflowItemTemplate, withTabOverflowMaxDeferMs, withTabOverflowStabilizeMs, withTabOverflowTriggerTemplate, withTabRejectionIconTemplate, withTabsAddable, withTabsAlign, withTabsAriaLabels, withTabsClosable, withTabsCommitMode, withTabsDefaultOrientation, withTabsFallbackLabels, withTabsFitted, withTabsFragmentSync, withTabsI18nLabels, withTabsIconLayout, withTabsLinkAriaCurrent, withTabsPanelMode, withTabsRouteMatch, withTabsRouterSync, withTabsRovingLoop, withTabsSkin };
3877
+ export { CNGX_DIRECTIVE_BY_ID_MAP_FACTORY, CNGX_DOM_ANCHOR_RETRY_FACTORY, CNGX_ORGANISM_SCROLL_SYNC_FACTORY, CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY, CNGX_TABS_COMMIT_ACTION, CNGX_TABS_COMMIT_HANDLER_FACTORY, CNGX_TABS_CONFIG, CNGX_TABS_I18N, CNGX_TABS_LANGUAGE_EN, CNGX_TAB_GROUP_HOST, CNGX_TAB_NAV_HOST, CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY, CNGX_TAB_PANEL_HOST, CNGX_TAB_URL_MATCH_STRATEGY, CngxTab, CngxTabAddIcon, CngxTabBusySpinner, CngxTabCloseIcon, CngxTabContent, CngxTabErrorBadge, CngxTabGroupPresenter, CngxTabIcon, CngxTabLabel, CngxTabLink, CngxTabOverflowItem, CngxTabOverflowTrigger, CngxTabRejectionIcon, CngxTabSubLabel, CngxTabsFragmentSync, CngxTabsRouteSync, createCngxTabOverflowDefaultDomAdapter, createDirectiveByIdMap, createDomAnchorRetry, createOrganismScrollSync, createOverflowPopoverHighlightSync, createTabDismissals, createTabGroupAnnouncements, createTabGroupTemplateBindings, createTabKeyboardNav, createTabNavAnnouncement, createTabOverflowTemplateBindings, createTabRouterCommit, createTabUrlMatch, createTabsCommitHandler, createTabsHostAttrs, injectTabsConfig, injectTabsI18n, provideCngxTabs, provideCngxTabsAt, provideTabsConfig, provideTabsConfigAt, provideTabsI18n, tabOverflowOptionId, withDefaultOrientation, withTabAddIconTemplate, withTabBusySpinnerTemplate, withTabCloseIconTemplate, withTabErrorBadgeTemplate, withTabIconTemplate, withTabOverflowItemTemplate, withTabOverflowMaxDeferMs, withTabOverflowStabilizeMs, withTabOverflowTriggerTemplate, withTabRejectionIconTemplate, withTabsAddable, withTabsAlign, withTabsClosable, withTabsCommitMode, withTabsDefaultOrientation, withTabsFallbackLabels, withTabsFitted, withTabsFragmentSync, withTabsI18nLabels, withTabsIconLayout, withTabsLinkAriaCurrent, withTabsPanelMode, withTabsRouteMatch, withTabsRouterSync, withTabsRovingLoop, withTabsSkin };
3938
3878
  //# sourceMappingURL=cngx-common-tabs.mjs.map