@cngx/common 0.1.0-rc.7 → 0.1.0-rc.8

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 (63) hide show
  1. package/card/README.md +2 -1
  2. package/data/README.md +10 -1
  3. package/dialog/README.md +23 -1
  4. package/fesm2022/cngx-common-a11y.mjs +125 -111
  5. package/fesm2022/cngx-common-a11y.mjs.map +1 -1
  6. package/fesm2022/cngx-common-audio.mjs +47 -5
  7. package/fesm2022/cngx-common-audio.mjs.map +1 -1
  8. package/fesm2022/cngx-common-card.mjs +300 -46
  9. package/fesm2022/cngx-common-card.mjs.map +1 -1
  10. package/fesm2022/cngx-common-chart.mjs +1176 -453
  11. package/fesm2022/cngx-common-chart.mjs.map +1 -1
  12. package/fesm2022/cngx-common-command.mjs +37 -10
  13. package/fesm2022/cngx-common-command.mjs.map +1 -1
  14. package/fesm2022/cngx-common-data.mjs +1318 -469
  15. package/fesm2022/cngx-common-data.mjs.map +1 -1
  16. package/fesm2022/cngx-common-dialog.mjs +151 -14
  17. package/fesm2022/cngx-common-dialog.mjs.map +1 -1
  18. package/fesm2022/cngx-common-display.mjs +340 -73
  19. package/fesm2022/cngx-common-display.mjs.map +1 -1
  20. package/fesm2022/cngx-common-interactive.mjs +1744 -952
  21. package/fesm2022/cngx-common-interactive.mjs.map +1 -1
  22. package/fesm2022/cngx-common-layout.mjs +841 -114
  23. package/fesm2022/cngx-common-layout.mjs.map +1 -1
  24. package/fesm2022/cngx-common-popover.mjs +350 -60
  25. package/fesm2022/cngx-common-popover.mjs.map +1 -1
  26. package/fesm2022/cngx-common-stepper.mjs +727 -317
  27. package/fesm2022/cngx-common-stepper.mjs.map +1 -1
  28. package/fesm2022/cngx-common-tabs.mjs +1601 -1243
  29. package/fesm2022/cngx-common-tabs.mjs.map +1 -1
  30. package/fesm2022/cngx-common-timeline.mjs +137 -53
  31. package/fesm2022/cngx-common-timeline.mjs.map +1 -1
  32. package/fesm2022/cngx-common.mjs +1 -1
  33. package/interactive/README.md +15 -4
  34. package/layout/README.md +21 -1
  35. package/package.json +3 -3
  36. package/popover/README.md +18 -2
  37. package/stepper/README.md +6 -4
  38. package/theming/components/cngx-accordion.css +1 -1
  39. package/theming/components/cngx-backdrop.css +12 -0
  40. package/theming/components/cngx-button-toggle.css +29 -3
  41. package/theming/components/cngx-data-grid.css +168 -1
  42. package/theming/components/cngx-dialog.css +13 -0
  43. package/theming/components/cngx-listbox.css +21 -12
  44. package/theming/components/cngx-menu.css +56 -16
  45. package/theming/components/cngx-popover.css +24 -0
  46. package/theming/components/cngx-recycler-placeholder.css +196 -0
  47. package/theming/components/cngx-ripple.css +1 -1
  48. package/theming/components/cngx-slider.css +32 -1
  49. package/theming/components/cngx-tooltip.css +12 -0
  50. package/timeline/README.md +155 -0
  51. package/types/cngx-common-a11y.d.ts +42 -18
  52. package/types/cngx-common-card.d.ts +201 -17
  53. package/types/cngx-common-chart.d.ts +343 -47
  54. package/types/cngx-common-command.d.ts +31 -8
  55. package/types/cngx-common-data.d.ts +581 -68
  56. package/types/cngx-common-dialog.d.ts +158 -3
  57. package/types/cngx-common-display.d.ts +356 -142
  58. package/types/cngx-common-interactive.d.ts +859 -210
  59. package/types/cngx-common-layout.d.ts +567 -28
  60. package/types/cngx-common-popover.d.ts +262 -39
  61. package/types/cngx-common-stepper.d.ts +366 -116
  62. package/types/cngx-common-tabs.d.ts +214 -50
  63. package/types/cngx-common-timeline.d.ts +82 -16
@@ -4,6 +4,7 @@ import { CngxAsyncState, StatusTransition } from '@cngx/core/utils';
4
4
  import { Observable } from 'rxjs';
5
5
  import { CngxErrorAggregatorContract } from '@cngx/common/interactive';
6
6
  import { Router, ActivatedRoute } from '@angular/router';
7
+ import { CngxMessage } from '@cngx/core/i18n';
7
8
  import { CngxCommitController } from '@cngx/common/data';
8
9
  import { CngxDirection } from '@cngx/core';
9
10
  import { CngxActiveDescendant, ActiveDescendantItem } from '@cngx/common/a11y';
@@ -114,7 +115,13 @@ interface CngxTabGroupHost {
114
115
  */
115
116
  readonly originIndexDuringCommit: Signal<number | undefined>;
116
117
  register(handle: CngxTabHandle): void;
117
- unregister(id: string): void;
118
+ /**
119
+ * Remove a registration. Pass the registering `handle` so a destroyed
120
+ * instance can only evict itself: under an id collision the presenter's
121
+ * idempotent re-register replaces the stored handle, and the OLD
122
+ * instance's late destroy must not tear down the NEW instance's entry.
123
+ */
124
+ unregister(id: string, handle?: CngxTabHandle): void;
118
125
  select(index: number): void;
119
126
  selectNext(): void;
120
127
  selectPrevious(): void;
@@ -185,9 +192,20 @@ type CngxTabsCommitAction = (fromIndex: number, toIndex: number) => boolean | Pr
185
192
  * <example-url>http://localhost:4200/#/ui/tabs/tab-commit-action/optimistic-pessimistic-commits-with-bridge-directives</example-url>
186
193
  */
187
194
  declare class CngxTabGroupPresenter implements CngxTabGroupHost {
195
+ private readonly config;
188
196
  readonly activeIndex: i0.ModelSignal<number>;
189
- readonly orientation: i0.InputSignal<"horizontal" | "vertical">;
190
- readonly loop: i0.InputSignal<boolean>;
197
+ /**
198
+ * @internal Two-field alias - bind the public `[orientation]`; read
199
+ * the resolved {@link orientation} computed (input ?? config ?? default).
200
+ */
201
+ readonly orientationInput: i0.InputSignal<"horizontal" | "vertical" | undefined>;
202
+ readonly orientation: Signal<"horizontal" | "vertical">;
203
+ /**
204
+ * @internal Two-field alias - bind the public `[loop]`; read the
205
+ * resolved {@link loop} computed (input ?? config ?? default).
206
+ */
207
+ readonly loopInput: i0.InputSignal<boolean | undefined>;
208
+ readonly loop: Signal<boolean>;
191
209
  /**
192
210
  * Async-commit action gating the transition.
193
211
  * When non-null, `select(...)` routes through {@link CngxTabsCommitHandler}; the
@@ -207,9 +225,9 @@ declare class CngxTabGroupPresenter implements CngxTabGroupHost {
207
225
  *
208
226
  * @internal Two-field alias - bind the public `[commitMode]`; read
209
227
  * the resolved {@link commitMode} computed (DI fallback mode wins
210
- * when a routed action is active).
228
+ * when a routed action is active, else input ?? config ?? default).
211
229
  */
212
- readonly commitModeInput: i0.InputSignal<"optimistic" | "pessimistic">;
230
+ readonly commitModeInput: i0.InputSignal<"optimistic" | "pessimistic" | undefined>;
213
231
  private readonly injector;
214
232
  private injectedActionSource;
215
233
  private resolveInjectedAction;
@@ -229,7 +247,7 @@ declare class CngxTabGroupPresenter implements CngxTabGroupHost {
229
247
  readonly commitMode: Signal<"optimistic" | "pessimistic">;
230
248
  /**
231
249
  * Emitted when a tab's close affordance is activated (the close
232
- * button or Delete/Backspace on the focused tab). The presenter has
250
+ * button or Delete on the focused tab). The presenter has
233
251
  * already moved the active index onto the surviving neighbour; the
234
252
  * consumer removes the tab from its own data in the handler.
235
253
  */
@@ -269,7 +287,7 @@ declare class CngxTabGroupPresenter implements CngxTabGroupHost {
269
287
  private readonly clampedIndex;
270
288
  readonly activeId: Signal<string | null>;
271
289
  register(handle: CngxTabHandle): void;
272
- unregister(id: string): void;
290
+ unregister(id: string, handle?: CngxTabHandle): void;
273
291
  /** {@inheritDoc CngxTabGroupHost.clearLastFailed} */
274
292
  clearLastFailed(): void;
275
293
  select(index: number): void;
@@ -279,7 +297,7 @@ declare class CngxTabGroupPresenter implements CngxTabGroupHost {
279
297
  requestClose(id: string): void;
280
298
  requestAdd(): void;
281
299
  static ɵfac: i0.ɵɵFactoryDeclaration<CngxTabGroupPresenter, never>;
282
- static ɵdir: i0.ɵɵDirectiveDeclaration<CngxTabGroupPresenter, "[cngxTabGroup]", ["cngxTabGroup"], { "activeIndex": { "alias": "activeIndex"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "loop": { "alias": "loop"; "required": false; "isSignal": true; }; "commitActionInput": { "alias": "commitAction"; "required": false; "isSignal": true; }; "commitModeInput": { "alias": "commitMode"; "required": false; "isSignal": true; }; }, { "activeIndex": "activeIndexChange"; "tabClose": "tabClose"; "tabAdd": "tabAdd"; }, never, never, true, never>;
300
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CngxTabGroupPresenter, "[cngxTabGroup]", ["cngxTabGroup"], { "activeIndex": { "alias": "activeIndex"; "required": false; "isSignal": true; }; "orientationInput": { "alias": "orientation"; "required": false; "isSignal": true; }; "loopInput": { "alias": "loop"; "required": false; "isSignal": true; }; "commitActionInput": { "alias": "commitAction"; "required": false; "isSignal": true; }; "commitModeInput": { "alias": "commitMode"; "required": false; "isSignal": true; }; }, { "activeIndex": "activeIndexChange"; "tabClose": "tabClose"; "tabAdd": "tabAdd"; }, never, never, true, never>;
283
301
  }
284
302
 
285
303
  /**
@@ -694,9 +712,11 @@ declare class CngxTabLink implements OnInit {
694
712
  /** `true` when the presenter's `activeId` equals this link's id. */
695
713
  protected readonly selected: Signal<boolean>;
696
714
  /**
697
- * Id of the injected SR error-message descriptor. Always referenced by the
698
- * `aria-describedby` host binding (Pillar 2 - the id is permanent; the
699
- * span's content and `aria-hidden` toggle, never the id itself).
715
+ * Id of the injected SR error-message descriptor. The `aria-describedby`
716
+ * host binding emits it only while `hasError()` - `aria-hidden` on a
717
+ * directly-referenced node does not suppress it (accname 1.2 traverses
718
+ * the reference), so the id reference itself is gated, not just the
719
+ * span's visibility.
700
720
  */
701
721
  protected readonly descriptorId: Signal<string>;
702
722
  /** The injected descriptor `<span>`, created in {@link ngOnInit}. */
@@ -753,8 +773,11 @@ declare class CngxTabLink implements OnInit {
753
773
  * @relatedTo CngxTabGroupPresenter, CngxTab
754
774
  */
755
775
  declare class CngxTabsFragmentSync implements AfterContentInit {
756
- readonly mode: i0.InputSignal<"fragment" | "queryParam">;
757
- readonly paramName: i0.InputSignal<string>;
776
+ readonly modeInput: i0.InputSignal<"fragment" | "queryParam" | undefined>;
777
+ readonly paramNameInput: i0.InputSignal<string | undefined>;
778
+ private readonly config;
779
+ readonly mode: i0.Signal<"fragment" | "queryParam">;
780
+ readonly paramName: i0.Signal<string>;
758
781
  /**
759
782
  * Whether reflecting the active tab into the URL replaces the current
760
783
  * history entry instead of pushing a new one. Default `true`, which is
@@ -799,10 +822,17 @@ declare class CngxTabsFragmentSync implements AfterContentInit {
799
822
  */
800
823
  ngAfterContentInit(): void;
801
824
  private seedFromUrl;
825
+ /**
826
+ * Reflect `id` into the URL. Fragment mode re-serializes the existing
827
+ * fragment params so foreign state (`#foo=1&tab=x`) survives the
828
+ * write; values are URI-encoded symmetric to {@link parseFragment}.
829
+ */
830
+ private writeUrl;
831
+ private serializeFragment;
802
832
  private readUrlValue;
803
833
  private parseFragment;
804
834
  static ɵfac: i0.ɵɵFactoryDeclaration<CngxTabsFragmentSync, never>;
805
- static ɵdir: i0.ɵɵDirectiveDeclaration<CngxTabsFragmentSync, "[cngxTabsFragmentSync]", ["cngxTabsFragmentSync"], { "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "paramName": { "alias": "paramName"; "required": false; "isSignal": true; }; "replaceUrl": { "alias": "replaceUrl"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
835
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CngxTabsFragmentSync, "[cngxTabsFragmentSync]", ["cngxTabsFragmentSync"], { "modeInput": { "alias": "mode"; "required": false; "isSignal": true; }; "paramNameInput": { "alias": "paramName"; "required": false; "isSignal": true; }; "replaceUrl": { "alias": "replaceUrl"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
806
836
  }
807
837
 
808
838
  /**
@@ -1048,19 +1078,22 @@ interface CngxTabRouterCommitOptions {
1048
1078
  /**
1049
1079
  * Builds a {@link CngxTabsCommitAction} that gates a tab switch through
1050
1080
  * `@angular/router`. The action navigates to the target tab's route and
1051
- * resolves on the router's own outcome:
1081
+ * resolves on this navigation's own `navigate()` promise:
1052
1082
  *
1053
- * - `NavigationEnd` → `true` (commit the switch)
1054
- * - `NavigationCancel` (a `CanDeactivate` guard blocked) → `false`
1055
- * - `NavigationError` (guard/resolver threw) → `false`
1083
+ * - resolved `true` (`NavigationEnd`) → `true` (commit the switch)
1084
+ * - resolved `false` (`NavigationCancel` - a `CanDeactivate` guard
1085
+ * blocked, or a newer navigation superseded this one) → `false`
1086
+ * - rejected (`NavigationError` - guard/resolver threw) → `false`
1056
1087
  *
1057
1088
  * Routed tabs reuse the presenter's commit lifecycle verbatim - the
1058
1089
  * router navigation is simply the async op. \
1059
1090
  * In pessimistic mode the active tab follows the *resolved* route, so a cancelled guard keeps
1060
- * the old tab with zero extra gate machinery. The events subscription
1061
- * is opened *before* `navigate(...)` so a synchronously-resolving
1062
- * navigation cannot emit before the action is listening; the commit
1063
- * controller's `cancel()` unsubscribes on supersede.
1091
+ * the old tab with zero extra gate machinery. Correlating on the
1092
+ * promise (not `router.events`) means a concurrent unrelated
1093
+ * navigation's outcome can never resolve this commit; the commit
1094
+ * controller's `cancel()` closes the subscriber on supersede, and a
1095
+ * late promise resolution lands on the closed subscriber and is
1096
+ * dropped by RxJS itself.
1064
1097
  *
1065
1098
  * @category common/tabs
1066
1099
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/router-commit.ts
@@ -1070,7 +1103,7 @@ declare function createTabRouterCommit(opts: CngxTabRouterCommitOptions): CngxTa
1070
1103
 
1071
1104
  /**
1072
1105
  * Context for the `*cngxTabOverflowItem` template. Replaces the
1073
- * default `tab.label() ?? tab.id` text inside the More popover; the
1106
+ * default text (the tab label, or `unlabeledTab(position)`) inside the More popover; the
1074
1107
  * surrounding `<li role="menuitem">` shell (`aria-disabled`, click
1075
1108
  * handler, `data-tab-id`) stays library-owned.
1076
1109
  *
@@ -1240,9 +1273,10 @@ declare class CngxTabCloseIcon {
1240
1273
  }
1241
1274
 
1242
1275
  /**
1243
- * Context for the `*cngxTabErrorBadge` template. Renders only when
1244
- * the tab's `errorAggregator?.shouldShow()` is `true`; the visibility
1245
- * gate stays library-owned. Sibling shape to `CngxStepBadgeContext`.
1276
+ * Context for the `*cngxTabErrorBadge` template. Renders only while
1277
+ * the tab's folded `hasError()` is `true` - the direct `[error]` flag
1278
+ * OR the aggregator's `shouldShow()`; the visibility gate stays
1279
+ * library-owned. Sibling shape to `CngxStepBadgeContext`.
1246
1280
  *
1247
1281
  * @category common/tabs/slots
1248
1282
  */
@@ -1621,8 +1655,10 @@ interface CngxTabsConfig {
1621
1655
  * {@link withTabsAddable}.
1622
1656
  */
1623
1657
  readonly addable?: boolean;
1624
- readonly ariaLabels?: CngxTabsAriaLabels;
1625
- readonly fallbackLabels?: CngxTabsFallbackLabels;
1658
+ /** Landmark labels; a `Signal` switches the language at runtime. */
1659
+ readonly ariaLabels?: CngxTabsAriaLabels | Signal<CngxTabsAriaLabels>;
1660
+ /** Role descriptions; a `Signal` switches the language at runtime. */
1661
+ readonly fallbackLabels?: CngxTabsFallbackLabels | Signal<CngxTabsFallbackLabels>;
1626
1662
  /**
1627
1663
  * Quiescence window (ms) for the overflow IO debounce. Burst
1628
1664
  * emissions during strip animations collapse to one write; the
@@ -1818,17 +1854,19 @@ declare function withTabsAddable(addable: boolean): CngxTabsConfigFeature;
1818
1854
  /**
1819
1855
  * Merge ARIA labels into the cascade. Keys not provided keep their
1820
1856
  * library defaults; per-instance overrides on the tab group still win.
1857
+ * Pass a `Signal` to switch the language at runtime.
1821
1858
  *
1822
1859
  * @category common/tabs
1823
1860
  */
1824
- declare function withTabsAriaLabels(labels: CngxTabsAriaLabels): CngxTabsConfigFeature;
1861
+ declare function withTabsAriaLabels(labels: CngxTabsAriaLabels | Signal<CngxTabsAriaLabels>): CngxTabsConfigFeature;
1825
1862
  /**
1826
- * Merge text fallback labels (overflow trigger, busy / rejection text)
1827
- * into the cascade. Used when a slot directive is not present.
1863
+ * Merge the tablist / tab-panel `aria-roledescription` fallbacks into the
1864
+ * cascade. Keys not provided keep their library defaults. Pass a `Signal`
1865
+ * to switch the language at runtime.
1828
1866
  *
1829
1867
  * @category common/tabs
1830
1868
  */
1831
- declare function withTabsFallbackLabels(labels: CngxTabsFallbackLabels): CngxTabsConfigFeature;
1869
+ declare function withTabsFallbackLabels(labels: CngxTabsFallbackLabels | Signal<CngxTabsFallbackLabels>): CngxTabsConfigFeature;
1832
1870
  /**
1833
1871
  * Override the IO-debounce window (ms). See
1834
1872
  * {@link CngxTabsConfig.overflowStabilizeMs}.
@@ -1988,6 +2026,68 @@ interface CngxTabsHostAttrs {
1988
2026
  */
1989
2027
  declare function createTabsHostAttrs(inputs: CngxTabsHostAttrsInputs): CngxTabsHostAttrs;
1990
2028
 
2029
+ /**
2030
+ * The tabs section of a {@link CngxLanguagePack}: the copy of
2031
+ * `@cngx/common/tabs` and of the tab organisms in `@cngx/ui/tabs` and
2032
+ * `@cngx/ui/mat-tabs`. It feeds `CNGX_TABS_I18N` and the copy keys of
2033
+ * `CNGX_TABS_CONFIG` (`ariaLabels`, `fallbackLabels`). Messages use `{name}`
2034
+ * placeholders; a plural message picks its form from `{count}`.
2035
+ *
2036
+ * @category common/tabs/i18n
2037
+ * @since 0.1.0
2038
+ * @relatedTo CNGX_TABS_I18N, CNGX_TABS_CONFIG
2039
+ */
2040
+ interface CngxTabsLanguageSection {
2041
+ /** Accessible name of the tab-group landmark. */
2042
+ readonly tabsRegion: string;
2043
+ /** Last-tier tab-group label, used when `tabsRegion` is unset. */
2044
+ readonly tabsLabel: string;
2045
+ /** `aria-roledescription` of the tablist. */
2046
+ readonly tabRoleDescription: string;
2047
+ /** `aria-roledescription` of each tab panel. */
2048
+ readonly tabPanelRoleDescription: string;
2049
+ /** `{label}`, `{position}`, `{count}`: the accessible name of a tab. */
2050
+ readonly selectedTab: CngxMessage;
2051
+ /** `{label}`, `{detail}`: a tab label with its secondary label. */
2052
+ readonly tabLabelWithDetail: CngxMessage;
2053
+ /** Plural on `{count}`: the number of errors on a tab. */
2054
+ readonly tabHasErrors: CngxMessage;
2055
+ /** Plural on `{count}`: the overflow trigger label. */
2056
+ readonly moreTabsLabel: CngxMessage;
2057
+ /** `{position}`: the name of a tab without a label, e.g. in the overflow list. */
2058
+ readonly unlabeledTab: CngxMessage;
2059
+ /** `{tab}`: announced after a move to an earlier tab, `{tab}` being its name. */
2060
+ readonly previousTab: CngxMessage;
2061
+ /** `{tab}`: announced after a move to a later tab. */
2062
+ readonly nextTab: CngxMessage;
2063
+ /** `{label}`: accessible name of a tab's close button. */
2064
+ readonly closeTab: CngxMessage;
2065
+ readonly addTab: string;
2066
+ /** `{label}`: announced once a closed tab is removed. */
2067
+ readonly closedTab: CngxMessage;
2068
+ /** Announced once a tab without a label is removed. */
2069
+ readonly closedUnlabeledTab: string;
2070
+ readonly commitFailedRetry: string;
2071
+ /** Announced while a tab commit is in flight. */
2072
+ readonly commitInFlight: string;
2073
+ /** `{origin}`: announced when a failed commit reverts to the origin tab. */
2074
+ readonly commitRolledBackTo: CngxMessage;
2075
+ }
2076
+ /**
2077
+ * The English tabs section: the single source of the tabs' English copy.
2078
+ * `CNGX_TABS_I18N` and the `CNGX_TABS_CONFIG` labels default to it.
2079
+ *
2080
+ * @category common/tabs/i18n
2081
+ * @since 0.1.0
2082
+ * @relatedTo CNGX_TABS_I18N, CNGX_TABS_CONFIG
2083
+ */
2084
+ declare const CNGX_TABS_LANGUAGE_EN: CngxTabsLanguageSection;
2085
+ declare module '@cngx/core/i18n' {
2086
+ interface CngxLanguagePack {
2087
+ readonly tabs: CngxTabsLanguageSection;
2088
+ }
2089
+ }
2090
+
1991
2091
  /**
1992
2092
  * Tabs i18n surface. Library defaults are English; consumers
1993
2093
  * override via {@link provideTabsI18n}. Sibling to
@@ -1996,6 +2096,11 @@ declare function createTabsHostAttrs(inputs: CngxTabsHostAttrsInputs): CngxTabsH
1996
2096
  * @category common/tabs/i18n
1997
2097
  */
1998
2098
  interface CngxTabsI18n {
2099
+ /**
2100
+ * Last tier of the tab-group `aria-label`. It only applies when
2101
+ * `CNGX_TABS_CONFIG.ariaLabels.tabsRegion` is unset; that key defaults
2102
+ * to `'Tabs'`, so localise the landmark through `withTabsAriaLabels(...)`.
2103
+ */
1999
2104
  readonly tabsLabel: string;
2000
2105
  readonly selectedTab: (label: string, position: number, count: number) => string;
2001
2106
  /**
@@ -2008,8 +2113,22 @@ interface CngxTabsI18n {
2008
2113
  readonly tabLabelWithDetail: (label: string, detail: string) => string;
2009
2114
  readonly tabHasErrors: (count: number) => string;
2010
2115
  readonly moreTabsLabel: (count: number) => string;
2011
- readonly previousTab: string;
2012
- readonly nextTab: string;
2116
+ /**
2117
+ * Name of a tab without a label, e.g. a row of the overflow list.
2118
+ * Receives the 1-based position; English `Tab 3`.
2119
+ */
2120
+ readonly unlabeledTab: (position: number) => string;
2121
+ /**
2122
+ * Commit-success announcement after a move to an earlier tab. Receives
2123
+ * the position phrase from {@link selectedTab} and owns the whole
2124
+ * sentence, so a locale can reorder it or drop the separator, e.g.
2125
+ * `Previous tab: Tab 1 of 3: Profile`. Unlike the stepper's
2126
+ * `previousStep` / `nextStep`, which are button labels, this key returns
2127
+ * the full live-region sentence.
2128
+ */
2129
+ readonly previousTab: (positionPhrase: string) => string;
2130
+ /** Sibling of {@link previousTab} after a move to a later tab. */
2131
+ readonly nextTab: (positionPhrase: string) => string;
2013
2132
  /**
2014
2133
  * Accessible name for a tab's close button. Receives the tab label
2015
2134
  * (or a generic fallback when unlabeled) and yields the button's
@@ -2018,6 +2137,12 @@ interface CngxTabsI18n {
2018
2137
  readonly closeTab: (label: string) => string;
2019
2138
  /** Accessible name for the add-tab button. */
2020
2139
  readonly addTab: string;
2140
+ /**
2141
+ * Live-region confirmation once a closed tab's removal has actually
2142
+ * landed in the registry. Receives the closed tab's label (or an
2143
+ * empty string when unlabeled).
2144
+ */
2145
+ readonly closedTab: (label: string) => string;
2021
2146
  /**
2022
2147
  * @deprecated Superseded by {@link commitRolledBackTo}. Retained as
2023
2148
  * the defensive fallback in `liveAnnouncement` when the origin
@@ -2036,15 +2161,18 @@ interface CngxTabsI18n {
2036
2161
  readonly commitRolledBackTo: (originLabel: string) => string;
2037
2162
  }
2038
2163
  /**
2039
- * DI token for the tabs i18n bundle. `providedIn: 'root'` with
2040
- * English defaults.
2164
+ * DI token for the tabs i18n bundle, as a `Signal` so a runtime language
2165
+ * switch re-renders every label it feeds. `providedIn: 'root'`: the tabs
2166
+ * section of the active language pack over the English defaults, formatted
2167
+ * for the app locale. Provide it through {@link provideTabsI18n}; a
2168
+ * `{ provide, useValue }` entry must supply a `Signal<CngxTabsI18n>`.
2041
2169
  *
2042
2170
  * @category common/tabs/i18n
2043
2171
  * @wcag AA
2044
2172
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/i18n/tabs-i18n.ts
2045
2173
  * @since 0.1.0
2046
2174
  */
2047
- declare const CNGX_TABS_I18N: InjectionToken<CngxTabsI18n>;
2175
+ declare const CNGX_TABS_I18N: InjectionToken<Signal<CngxTabsI18n>>;
2048
2176
  /**
2049
2177
  * Branded feature-fn for {@link provideTabsI18n} and
2050
2178
  * {@link provideCngxTabs}. The hidden `_target` discriminator routes
@@ -2053,28 +2181,28 @@ declare const CNGX_TABS_I18N: InjectionToken<CngxTabsI18n>;
2053
2181
  *
2054
2182
  * @category common/tabs/i18n
2055
2183
  */
2056
- type CngxTabsI18nFeature = ((bundle: CngxTabsI18n) => CngxTabsI18n) & {
2184
+ type CngxTabsI18nFeature = ((bundle: Signal<CngxTabsI18n>) => Signal<CngxTabsI18n>) & {
2057
2185
  readonly _target: 'i18n';
2058
2186
  };
2059
2187
  /**
2060
2188
  * Override i18n labels via a partial bundle - unset keys keep the
2061
- * English default. Same shape as `withTabsAriaLabels` /
2189
+ * language pack's copy, or the English default. Same shape as `withTabsAriaLabels` /
2062
2190
  * `withTabsFallbackLabels` so `provideCngxTabs` composes both
2063
- * surfaces uniformly.
2191
+ * surfaces uniformly. Pass a `Signal` to switch the language at runtime.
2064
2192
  *
2065
2193
  * @category common/tabs/i18n
2066
2194
  */
2067
- declare function withTabsI18nLabels(overrides: Partial<CngxTabsI18n>): CngxTabsI18nFeature;
2195
+ declare function withTabsI18nLabels(overrides: Partial<CngxTabsI18n> | Signal<Partial<CngxTabsI18n>>): CngxTabsI18nFeature;
2068
2196
  /**
2069
2197
  * Provider for the tabs i18n bundle. Compose `withTabsI18nLabels(...)`
2070
2198
  * (and future i18n `with*` features); unset keys fall back to the
2071
- * English default.
2199
+ * language pack, then English. The features apply on top of the active pack.
2072
2200
  *
2073
2201
  * ```ts
2074
2202
  * bootstrapApplication(AppComponent, {
2075
2203
  * providers: [
2076
2204
  * provideTabsI18n(
2077
- * withTabsI18nLabels({ tabsLabel: 'Reiter', previousTab: 'Vorheriger' }),
2205
+ * withTabsI18nLabels({ tabsLabel: 'Reiter', addTab: 'Neuer Reiter' }),
2078
2206
  * ),
2079
2207
  * ],
2080
2208
  * });
@@ -2084,11 +2212,12 @@ declare function withTabsI18nLabels(overrides: Partial<CngxTabsI18n>): CngxTabsI
2084
2212
  */
2085
2213
  declare function provideTabsI18n(...features: readonly CngxTabsI18nFeature[]): Provider;
2086
2214
  /**
2087
- * Inject the resolved tabs i18n bundle.
2215
+ * Inject the resolved tabs i18n bundle. Read it inside a `computed()`,
2216
+ * template or handler so a language switch reaches the label.
2088
2217
  *
2089
2218
  * @category common/tabs/i18n
2090
2219
  */
2091
- declare function injectTabsI18n(): CngxTabsI18n;
2220
+ declare function injectTabsI18n(): Signal<CngxTabsI18n>;
2092
2221
 
2093
2222
  /**
2094
2223
  * Union of feature kinds the tabs aggregator accepts. \
@@ -2404,7 +2533,8 @@ declare class CngxTabAddIcon {
2404
2533
  interface CngxTabDismissalsOptions {
2405
2534
  readonly host: CngxTabGroupHost;
2406
2535
  readonly config: CngxTabsConfig;
2407
- readonly i18n: CngxTabsI18n;
2536
+ /** Tabs i18n bundle Signal (`injectTabsI18n()`). */
2537
+ readonly i18n: Signal<CngxTabsI18n>;
2408
2538
  readonly closable: Signal<boolean | undefined>;
2409
2539
  readonly addable: Signal<boolean | undefined>;
2410
2540
  readonly hostElement: HTMLElement;
@@ -2427,6 +2557,15 @@ interface CngxTabDismissals {
2427
2557
  closeButtonLabel(tab: CngxTabHandle): string;
2428
2558
  /** Stable `*cngxTabCloseIcon` context (`{ tab }`) per tab. */
2429
2559
  closeIconContextFor(tab: CngxTabHandle): CngxTabCloseIconContext;
2560
+ /**
2561
+ * Live-region phrase confirming a landed close (`i18n.closedTab`).
2562
+ * Derived from the registry transition - it updates when a requested
2563
+ * close's id actually leaves the registry, so an async consumer
2564
+ * removal announces on completion, not on request. Feed it into
2565
+ * `createTabGroupAnnouncements` (options.closedAnnouncement) so the
2566
+ * live region resolves one priority chain.
2567
+ */
2568
+ readonly closedAnnouncement: Signal<string>;
2430
2569
  /** Close a tab and restore focus to the new active tab / add button. */
2431
2570
  handleClose(tab: CngxTabHandle, event?: Event): void;
2432
2571
  /** Delete on a focused closable tab requests its close (APG). */
@@ -2491,6 +2630,14 @@ interface CngxTabKeyboardNavOptions {
2491
2630
  * `rtl` (APG); the vertical axis and Home/End stay direction-invariant.
2492
2631
  */
2493
2632
  readonly direction: Signal<CngxDirection>;
2633
+ /**
2634
+ * Enables the rejection focus-release effect. Under a pessimistic
2635
+ * commit, focus follows the intended target while the action is in
2636
+ * flight; a rejection keeps the roving stop on the origin, so
2637
+ * without the release the user is stranded on a `tabindex="-1"`
2638
+ * button. Omitted, the effect is skipped (headless usage).
2639
+ */
2640
+ readonly injector?: Injector;
2494
2641
  }
2495
2642
  /**
2496
2643
  * Resolved keyboard surface for `<cngx-tab-group>`'s tablist. The
@@ -2626,12 +2773,20 @@ declare function createTabGroupTemplateBindings(opts: CngxTabGroupTemplateBindin
2626
2773
  */
2627
2774
  interface CngxTabGroupAnnouncementsOptions {
2628
2775
  readonly presenter: CngxTabGroupHost;
2629
- readonly i18n: CngxTabsI18n;
2776
+ /** Tabs i18n bundle Signal (`injectTabsI18n()`). */
2777
+ readonly i18n: Signal<CngxTabsI18n>;
2630
2778
  readonly config: CngxTabsConfig;
2631
2779
  /** Per-instance `aria-label` Input on the organism. */
2632
2780
  readonly ariaLabel: Signal<string | undefined>;
2633
2781
  /** Per-instance `aria-labelledby` Input on the organism. */
2634
2782
  readonly ariaLabelledBy: Signal<string | undefined>;
2783
+ /**
2784
+ * Landed-close phrase from `createTabDismissals`. When supplied,
2785
+ * `liveAnnouncement` surfaces it while no commit phrase applies and
2786
+ * expires it on the next commit activity, so a stale close can never
2787
+ * re-enter (and re-announce through) the live region.
2788
+ */
2789
+ readonly closedAnnouncement?: Signal<string>;
2635
2790
  }
2636
2791
  /**
2637
2792
  * Resolved bundle returned by {@link createTabGroupAnnouncements}.
@@ -2668,7 +2823,7 @@ interface CngxTabGroupAnnouncements {
2668
2823
  * Error arm: `commitRolledBackTo(originLabel)` when origin
2669
2824
  * resolves; otherwise `commitFailedRetry`.
2670
2825
  *
2671
- * Success arm: `${previousTab|nextTab}: selectedTab(...)` when
2826
+ * Success arm: `previousTab|nextTab(selectedTab(...))` when
2672
2827
  * the index moved; bare `selectedTab(...)` when it didn't (initial
2673
2828
  * mount, or commit-success that lands on the same tab).
2674
2829
  */
@@ -2840,6 +2995,10 @@ interface CngxTabOverflowTemplateBindingsOptions {
2840
2995
  readonly hiddenTabs: Signal<readonly CngxTabHandle[]>;
2841
2996
  /** Commit-aware select callback - invoked from `itemContext.pick`. */
2842
2997
  readonly pickTab: (tab: CngxTabHandle) => void;
2998
+ /** Every tab of the strip; an unlabelled tab is named by its position in it. */
2999
+ readonly tabs: Signal<readonly CngxTabHandle[]>;
3000
+ /** Resolved tabs copy (`unlabeledTab`). */
3001
+ readonly i18n: Signal<CngxTabsI18n>;
2843
3002
  }
2844
3003
  /**
2845
3004
  * Output of {@link createTabOverflowTemplateBindings}. Carries the two
@@ -2853,6 +3012,11 @@ interface CngxTabOverflowTemplateBindings {
2853
3012
  readonly itemTemplate: Signal<TemplateRef<CngxTabOverflowItemContext> | null>;
2854
3013
  readonly triggerContext: Signal<CngxTabOverflowTriggerContext>;
2855
3014
  readonly buildItemContext: (tab: CngxTabHandle, index: number) => CngxTabOverflowItemContext;
3015
+ /**
3016
+ * Default text of an overflow row and its typeahead label: the tab label,
3017
+ * or `unlabeledTab(position)` for an unlabelled tab - never the tab id.
3018
+ */
3019
+ readonly itemLabel: (tab: CngxTabHandle) => string;
2856
3020
  /**
2857
3021
  * `ActiveDescendantItem[]` projection of `hiddenTabs()` for
2858
3022
  * `CngxActiveDescendant.items`. \
@@ -3072,5 +3236,5 @@ type CngxDirectiveByIdMapFactory = <T extends {
3072
3236
  */
3073
3237
  declare const CNGX_DIRECTIVE_BY_ID_MAP_FACTORY: InjectionToken<CngxDirectiveByIdMapFactory>;
3074
3238
 
3075
- 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_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 };
3076
- export type { CngxDirectiveByIdMapFactory, CngxDirectiveByIdMapOptions, CngxDomAnchorRetryFactory, CngxDomAnchorRetryHandle, CngxDomAnchorRetryOptions, CngxDomAnchorRetryResult, CngxOrganismScrollSyncFactory, CngxOrganismScrollSyncOptions, CngxOverflowPopoverHighlightSyncFactory, CngxTabAlign, CngxTabBusySpinnerContext, CngxTabCloseEvent, CngxTabCloseIconContext, CngxTabDismissals, CngxTabDismissalsOptions, CngxTabErrorBadgeContext, CngxTabGroupAnnouncements, CngxTabGroupAnnouncementsOptions, CngxTabGroupHost, CngxTabGroupTemplateBindings, CngxTabGroupTemplateBindingsOptions, CngxTabHandle, CngxTabIconContext, CngxTabIconLayout, CngxTabKeyboardNav, CngxTabKeyboardNavOptions, CngxTabMatchMode, CngxTabNavAnnouncement, CngxTabNavAnnouncementOptions, CngxTabOverflowDomAdapter, CngxTabOverflowDomAdapterFactory, CngxTabOverflowItemContext, CngxTabOverflowTemplateBindings, CngxTabOverflowTemplateBindingsOptions, CngxTabOverflowTriggerContext, CngxTabPanelHost, CngxTabRejectionIconContext, CngxTabRouterCommitOptions, CngxTabUrlMatch, CngxTabUrlMatchContext, CngxTabUrlMatchFactory, CngxTabsAriaLabels, CngxTabsCommitAction, CngxTabsCommitActionSource, CngxTabsCommitHandler, CngxTabsCommitHandlerFactory, CngxTabsCommitHandlerOptions, CngxTabsConfig, CngxTabsConfigFeature, CngxTabsFallbackLabels, CngxTabsFeature, CngxTabsHostAttrs, CngxTabsHostAttrsInputs, CngxTabsI18n, CngxTabsI18nFeature, CngxTabsPanelMode, CngxTabsSkin, CngxTabsTemplates };
3239
+ 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 };
3240
+ export type { CngxDirectiveByIdMapFactory, CngxDirectiveByIdMapOptions, CngxDomAnchorRetryFactory, CngxDomAnchorRetryHandle, CngxDomAnchorRetryOptions, CngxDomAnchorRetryResult, CngxOrganismScrollSyncFactory, CngxOrganismScrollSyncOptions, CngxOverflowPopoverHighlightSyncFactory, CngxTabAlign, CngxTabBusySpinnerContext, CngxTabCloseEvent, CngxTabCloseIconContext, CngxTabDismissals, CngxTabDismissalsOptions, CngxTabErrorBadgeContext, CngxTabGroupAnnouncements, CngxTabGroupAnnouncementsOptions, CngxTabGroupHost, CngxTabGroupTemplateBindings, CngxTabGroupTemplateBindingsOptions, CngxTabHandle, CngxTabIconContext, CngxTabIconLayout, CngxTabKeyboardNav, CngxTabKeyboardNavOptions, CngxTabMatchMode, CngxTabNavAnnouncement, CngxTabNavAnnouncementOptions, CngxTabOverflowDomAdapter, CngxTabOverflowDomAdapterFactory, CngxTabOverflowItemContext, CngxTabOverflowTemplateBindings, CngxTabOverflowTemplateBindingsOptions, CngxTabOverflowTriggerContext, CngxTabPanelHost, CngxTabRejectionIconContext, CngxTabRouterCommitOptions, CngxTabUrlMatch, CngxTabUrlMatchContext, CngxTabUrlMatchFactory, CngxTabsAriaLabels, CngxTabsCommitAction, CngxTabsCommitActionSource, CngxTabsCommitHandler, CngxTabsCommitHandlerFactory, CngxTabsCommitHandlerOptions, CngxTabsConfig, CngxTabsConfigFeature, CngxTabsFallbackLabels, CngxTabsFeature, CngxTabsHostAttrs, CngxTabsHostAttrsInputs, CngxTabsI18n, CngxTabsI18nFeature, CngxTabsLanguageSection, CngxTabsPanelMode, CngxTabsSkin, CngxTabsTemplates };