@cngx/common 0.0.1-rc.0 → 0.1.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/a11y/README.md +13 -16
- package/card/README.md +2 -21
- package/chart/README.md +5 -8
- package/data/README.md +45 -47
- package/dialog/README.md +12 -15
- package/display/README.md +5 -9
- package/fesm2022/cngx-common-a11y.mjs +164 -51
- package/fesm2022/cngx-common-a11y.mjs.map +1 -1
- package/fesm2022/cngx-common-card.mjs +157 -69
- package/fesm2022/cngx-common-card.mjs.map +1 -1
- package/fesm2022/cngx-common-chart.mjs +389 -92
- package/fesm2022/cngx-common-chart.mjs.map +1 -1
- package/fesm2022/cngx-common-data.mjs +311 -151
- package/fesm2022/cngx-common-data.mjs.map +1 -1
- package/fesm2022/cngx-common-dialog.mjs +167 -29
- package/fesm2022/cngx-common-dialog.mjs.map +1 -1
- package/fesm2022/cngx-common-display.mjs +445 -110
- package/fesm2022/cngx-common-display.mjs.map +1 -1
- package/fesm2022/cngx-common-interactive.mjs +2059 -435
- package/fesm2022/cngx-common-interactive.mjs.map +1 -1
- package/fesm2022/cngx-common-layout.mjs +188 -31
- package/fesm2022/cngx-common-layout.mjs.map +1 -1
- package/fesm2022/cngx-common-popover.mjs +711 -90
- package/fesm2022/cngx-common-popover.mjs.map +1 -1
- package/fesm2022/cngx-common-stepper.mjs +1479 -73
- package/fesm2022/cngx-common-stepper.mjs.map +1 -1
- package/fesm2022/cngx-common-tabs.mjs +1144 -85
- package/fesm2022/cngx-common-tabs.mjs.map +1 -1
- package/fesm2022/cngx-common.mjs +2 -2
- package/fesm2022/cngx-common.mjs.map +1 -1
- package/interactive/README.md +5 -5
- package/layout/README.md +2 -2
- package/package.json +7 -6
- package/popover/README.md +8 -34
- package/stepper/README.md +69 -8
- package/tabs/README.md +6 -6
- package/theming/components/cngx-async.css +74 -0
- package/theming/components/cngx-backdrop.css +73 -0
- package/theming/components/cngx-badge.css +340 -0
- package/theming/components/cngx-bottom-sheet.css +201 -0
- package/theming/components/cngx-button-toggle.css +99 -0
- package/theming/components/cngx-dialog.css +358 -0
- package/theming/components/cngx-divider.css +145 -0
- package/theming/components/cngx-listbox.css +220 -0
- package/theming/components/cngx-menu.css +371 -0
- package/theming/components/cngx-ripple.css +116 -0
- package/theming/components/cngx-tooltip.css +265 -0
- package/theming/system-tokens.css +24 -0
- package/types/cngx-common-a11y.d.ts +159 -38
- package/types/cngx-common-card.d.ts +137 -22
- package/types/cngx-common-chart.d.ts +337 -40
- package/types/cngx-common-data.d.ts +277 -45
- package/types/cngx-common-dialog.d.ts +162 -22
- package/types/cngx-common-display.d.ts +422 -78
- package/types/cngx-common-interactive.d.ts +1880 -305
- package/types/cngx-common-layout.d.ts +191 -28
- package/types/cngx-common-popover.d.ts +632 -87
- package/types/cngx-common-stepper.d.ts +1360 -45
- package/types/cngx-common-tabs.d.ts +1139 -56
- package/types/cngx-common.d.ts +1 -1
- package/README.md +0 -18
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Signal, InjectionToken, ModelSignal, TemplateRef, EnvironmentProviders, Provider, Injector } from '@angular/core';
|
|
2
|
+
import { Signal, InjectionToken, ModelSignal, TemplateRef, OnInit, EnvironmentProviders, Provider, Injector } from '@angular/core';
|
|
3
3
|
import { CngxAsyncState, StatusTransition } from '@cngx/core/utils';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import { CngxErrorAggregatorContract } from '@cngx/common/interactive';
|
|
6
|
+
import { Router } from '@angular/router';
|
|
6
7
|
import { CngxCommitController } from '@cngx/common/data';
|
|
7
8
|
import { CngxActiveDescendant, ActiveDescendantItem } from '@cngx/common/a11y';
|
|
8
9
|
import { CngxPopover } from '@cngx/common/popover';
|
|
@@ -13,17 +14,64 @@ import { CngxPopover } from '@cngx/common/popover';
|
|
|
13
14
|
* so subsequent input changes propagate without re-registration.
|
|
14
15
|
* `errorAggregator` is a `Signal<...>` slot so consumer aggregators
|
|
15
16
|
* resolved via `viewChild` after first registration still bind.
|
|
17
|
+
*
|
|
18
|
+
* @category common/tabs
|
|
16
19
|
*/
|
|
17
20
|
interface CngxTabHandle {
|
|
18
21
|
readonly id: string;
|
|
19
22
|
readonly label: Signal<string | undefined>;
|
|
23
|
+
/**
|
|
24
|
+
* Optional secondary label line. Rendered stacked under the primary
|
|
25
|
+
* label by the organism and folded into the tab's accessible name.
|
|
26
|
+
* `undefined` (default) renders byte-identically to a single-line
|
|
27
|
+
* tab. `[cngxMatTabs]` pins this to `undefined` - Material owns its
|
|
28
|
+
* own tab chrome.
|
|
29
|
+
*/
|
|
30
|
+
readonly subLabel: Signal<string | undefined>;
|
|
20
31
|
readonly disabled: Signal<boolean>;
|
|
21
32
|
readonly errorAggregator: Signal<CngxErrorAggregatorContract | undefined>;
|
|
33
|
+
/**
|
|
34
|
+
* Folded per-tab error state, exposed by reference. `true` when the
|
|
35
|
+
* direct `[error]` flag is set OR the aggregator wants to reveal
|
|
36
|
+
* (`shouldShow()`, so deferred-reveal validation stays silent until
|
|
37
|
+
* revealed). The organism gates the error badge + SR descriptor on
|
|
38
|
+
* this; both handle producers (`CngxTab`, `createMatTabHandle`)
|
|
39
|
+
* carry it.
|
|
40
|
+
*/
|
|
41
|
+
readonly hasError: Signal<boolean>;
|
|
42
|
+
/**
|
|
43
|
+
* Resolved direct-error message - the `[error]` string when non-empty,
|
|
44
|
+
* else `undefined`. Rides the handle so the error badge slot can render
|
|
45
|
+
* it via `ctx.tab.errorMessage()`. `[cngxMatTabs]` pins this to
|
|
46
|
+
* `undefined` - Material owns its own tab chrome.
|
|
47
|
+
*/
|
|
48
|
+
readonly errorMessage: Signal<string | undefined>;
|
|
49
|
+
/**
|
|
50
|
+
* Per-tab closable override. `undefined` (default) inherits the
|
|
51
|
+
* group-level `closable` resolution; `true`/`false` pin this tab's
|
|
52
|
+
* close affordance regardless of the group default (e.g. a
|
|
53
|
+
* non-closable "Home" tab inside an otherwise dismissable group).
|
|
54
|
+
*/
|
|
55
|
+
readonly closable: Signal<boolean | undefined>;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Payload of {@link CngxTabGroupHost.tabClose}. Carries the closed
|
|
59
|
+
* tab's id and its index at close time. The consumer removes the tab
|
|
60
|
+
* from its own data in response; the presenter has already moved the
|
|
61
|
+
* active index to the surviving neighbour.
|
|
62
|
+
*
|
|
63
|
+
* @category common/tabs
|
|
64
|
+
*/
|
|
65
|
+
interface CngxTabCloseEvent {
|
|
66
|
+
readonly id: string;
|
|
67
|
+
readonly index: number;
|
|
22
68
|
}
|
|
23
69
|
/**
|
|
24
70
|
* Contract atoms see when they inject the presenter via
|
|
25
71
|
* {@link CNGX_TAB_GROUP_HOST}. Atoms never reach into the concrete
|
|
26
|
-
* class
|
|
72
|
+
* class - keeps layering cycle-free and the decompose schematic clean.
|
|
73
|
+
*
|
|
74
|
+
* @category common/tabs
|
|
27
75
|
*/
|
|
28
76
|
interface CngxTabGroupHost {
|
|
29
77
|
readonly tabs: Signal<readonly CngxTabHandle[]>;
|
|
@@ -48,7 +96,7 @@ interface CngxTabGroupHost {
|
|
|
48
96
|
*
|
|
49
97
|
* @remarks
|
|
50
98
|
* The `pending → error` pulse keyframe (`cngx-tab-pulse-error`)
|
|
51
|
-
* does not retrigger on rapid supersede sequences
|
|
99
|
+
* does not retrigger on rapid supersede sequences - CSS animations
|
|
52
100
|
* only fire on fresh class application. See `tabs-accepted-debt §3`;
|
|
53
101
|
* the persistent icon plus static red outline carry the durable
|
|
54
102
|
* signal in the no-pulse case.
|
|
@@ -59,7 +107,7 @@ interface CngxTabGroupHost {
|
|
|
59
107
|
* commit window. Written when `select()` opens a transition under
|
|
60
108
|
* `commitAction`; retained on `error` so the live-region phrase
|
|
61
109
|
* can resolve the origin label; cleared on `success`. Outside the
|
|
62
|
-
* commit window the slot may carry a stale value
|
|
110
|
+
* commit window the slot may carry a stale value - consumers must
|
|
63
111
|
* gate reads by joining with `lastFailedIndex`. The origin is
|
|
64
112
|
* meaningful only when `lastFailedIndex !== undefined`.
|
|
65
113
|
*/
|
|
@@ -70,6 +118,20 @@ interface CngxTabGroupHost {
|
|
|
70
118
|
selectNext(): void;
|
|
71
119
|
selectPrevious(): void;
|
|
72
120
|
selectById(id: string): void;
|
|
121
|
+
/**
|
|
122
|
+
* Request closing the tab with the given id. The presenter moves the
|
|
123
|
+
* active index onto the surviving neighbour (APG: next tab, or the
|
|
124
|
+
* previous one when closing the last tab) and emits `tabClose`; the
|
|
125
|
+
* consumer performs the actual removal from its data. No-op for an
|
|
126
|
+
* unknown id.
|
|
127
|
+
*/
|
|
128
|
+
requestClose(id: string): void;
|
|
129
|
+
/**
|
|
130
|
+
* Request adding a new tab. Emits `tabAdd`; the consumer appends to
|
|
131
|
+
* its data. The presenter owns no tab-creation logic - tabs are
|
|
132
|
+
* derived from consumer data (Ableitung statt Verwaltung).
|
|
133
|
+
*/
|
|
134
|
+
requestAdd(): void;
|
|
73
135
|
/**
|
|
74
136
|
* Clear {@link lastFailedIndex} without unwinding
|
|
75
137
|
* {@link originIndexDuringCommit} (consumers gate reads on
|
|
@@ -81,7 +143,14 @@ interface CngxTabGroupHost {
|
|
|
81
143
|
/**
|
|
82
144
|
* DI token for the tab presenter's contract. Presenter provides via
|
|
83
145
|
* `useExisting`; `CngxTab` injects to register; the organism injects
|
|
84
|
-
* to
|
|
146
|
+
* to drive the APG tablist keyboard model (automatic activation via
|
|
147
|
+
* `select()`, roving stop derived from `activeId`) through
|
|
148
|
+
* `createTabKeyboardNav`.
|
|
149
|
+
*
|
|
150
|
+
* @category common/tabs
|
|
151
|
+
* @wcag AA
|
|
152
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab-group-host.token.ts
|
|
153
|
+
* @since 0.1.0
|
|
85
154
|
*/
|
|
86
155
|
declare const CNGX_TAB_GROUP_HOST: InjectionToken<CngxTabGroupHost>;
|
|
87
156
|
|
|
@@ -90,19 +159,29 @@ declare const CNGX_TAB_GROUP_HOST: InjectionToken<CngxTabGroupHost>;
|
|
|
90
159
|
* and target indices; resolves `true` to commit, `false` to refuse.
|
|
91
160
|
* `Observable | Promise | sync` union mirrors the rest of the cngx
|
|
92
161
|
* commit-action family.
|
|
162
|
+
*
|
|
163
|
+
* @category common/tabs
|
|
93
164
|
*/
|
|
94
165
|
type CngxTabsCommitAction = (fromIndex: number, toIndex: number) => boolean | Promise<boolean> | Observable<boolean>;
|
|
95
166
|
/**
|
|
96
|
-
* Tab-group presenter
|
|
167
|
+
* Tab-group presenter - brain of every cngx tab flow. Owns the
|
|
97
168
|
* active-index model, the tab registry, orientation, loop policy,
|
|
98
169
|
* and the commit-controller lifecycle. Provides
|
|
99
170
|
* {@link CNGX_TAB_GROUP_HOST} for atoms and {@link CNGX_STATEFUL}
|
|
100
171
|
* so `<cngx-toast-on />` / `<cngx-banner-on />` compose without
|
|
101
172
|
* `[state]` wiring.
|
|
102
173
|
*
|
|
103
|
-
* **Layer:** `@cngx/common/tabs` (Level 2). Directive-only
|
|
174
|
+
* **Layer:** `@cngx/common/tabs` (Level 2). Directive-only -
|
|
104
175
|
* organisms compose via `hostDirectives`, consumers attach
|
|
105
176
|
* `[cngxTabGroup]` directly.
|
|
177
|
+
*
|
|
178
|
+
* @category common/tabs
|
|
179
|
+
* @docsKind primary
|
|
180
|
+
* @wcag AA
|
|
181
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/presenter.directive.ts
|
|
182
|
+
* @since 0.1.0
|
|
183
|
+
* @relatedTo CngxTab, CngxTabContent, CngxTabLabel, CngxTabsFragmentSync
|
|
184
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-commit-action/optimistic-pessimistic-commits-with-bridge-directives</example-url>
|
|
106
185
|
*/
|
|
107
186
|
declare class CngxTabGroupPresenter implements CngxTabGroupHost {
|
|
108
187
|
readonly activeIndex: i0.ModelSignal<number>;
|
|
@@ -112,17 +191,53 @@ declare class CngxTabGroupPresenter implements CngxTabGroupHost {
|
|
|
112
191
|
* Async-commit action gating the transition. When non-null,
|
|
113
192
|
* `select(...)` routes through {@link CngxTabsCommitHandler}; the
|
|
114
193
|
* action's resolution decides whether the change lands. Supersede
|
|
115
|
-
* semantics come from the commit-controller
|
|
194
|
+
* semantics come from the commit-controller - a rapid second
|
|
116
195
|
* `select(...)` cancels the in-flight runner.
|
|
196
|
+
*
|
|
197
|
+
* @internal Two-field alias - bind the public `[commitAction]`; read
|
|
198
|
+
* the resolved {@link commitAction} computed (input ?? DI fallback).
|
|
117
199
|
*/
|
|
118
|
-
readonly
|
|
200
|
+
readonly commitActionInput: i0.InputSignal<CngxTabsCommitAction | null>;
|
|
119
201
|
/**
|
|
120
|
-
* Default `'optimistic'`
|
|
202
|
+
* Default `'optimistic'` - tab change is navigation, not a save,
|
|
121
203
|
* so eager visual feedback matches the user's mental model.
|
|
122
204
|
* Switch to `'pessimistic'` when the new tab must wait for the
|
|
123
205
|
* action to confirm.
|
|
206
|
+
*
|
|
207
|
+
* @internal Two-field alias - bind the public `[commitMode]`; read
|
|
208
|
+
* the resolved {@link commitMode} computed (DI fallback mode wins
|
|
209
|
+
* when a routed action is active).
|
|
210
|
+
*/
|
|
211
|
+
readonly commitModeInput: i0.InputSignal<"optimistic" | "pessimistic">;
|
|
212
|
+
private readonly injector;
|
|
213
|
+
private injectedActionSource;
|
|
214
|
+
private resolveInjectedAction;
|
|
215
|
+
/**
|
|
216
|
+
* Resolved commit-action: the `[commitAction]` input when bound, else
|
|
217
|
+
* the {@link CNGX_TABS_COMMIT_ACTION} DI fallback (routed path), else
|
|
218
|
+
* `null`. `select()` reads this.
|
|
124
219
|
*/
|
|
125
|
-
readonly
|
|
220
|
+
readonly commitAction: Signal<CngxTabsCommitAction | null>;
|
|
221
|
+
/**
|
|
222
|
+
* Resolved commit mode. When the DI fallback supplies an active
|
|
223
|
+
* action its `mode` wins - the routed path pins `'pessimistic'` so a
|
|
224
|
+
* stray `[commitMode]="'optimistic'"` cannot break the
|
|
225
|
+
* route-follows-resolution invariant. Otherwise the `[commitMode]`
|
|
226
|
+
* input drives.
|
|
227
|
+
*/
|
|
228
|
+
readonly commitMode: Signal<"optimistic" | "pessimistic">;
|
|
229
|
+
/**
|
|
230
|
+
* Emitted when a tab's close affordance is activated (the close
|
|
231
|
+
* button or Delete/Backspace on the focused tab). The presenter has
|
|
232
|
+
* already moved the active index onto the surviving neighbour; the
|
|
233
|
+
* consumer removes the tab from its own data in the handler.
|
|
234
|
+
*/
|
|
235
|
+
readonly tabClose: i0.OutputEmitterRef<CngxTabCloseEvent>;
|
|
236
|
+
/**
|
|
237
|
+
* Emitted when the add-tab affordance is activated. The consumer
|
|
238
|
+
* appends a tab to its own data; the presenter owns no creation logic.
|
|
239
|
+
*/
|
|
240
|
+
readonly tabAdd: i0.OutputEmitterRef<void>;
|
|
126
241
|
private readonly genericFactory;
|
|
127
242
|
private readonly commitController;
|
|
128
243
|
private readonly commitHandler;
|
|
@@ -160,20 +275,24 @@ declare class CngxTabGroupPresenter implements CngxTabGroupHost {
|
|
|
160
275
|
selectNext(): void;
|
|
161
276
|
selectPrevious(): void;
|
|
162
277
|
selectById(id: string): void;
|
|
278
|
+
requestClose(id: string): void;
|
|
279
|
+
requestAdd(): void;
|
|
163
280
|
static ɵfac: i0.ɵɵFactoryDeclaration<CngxTabGroupPresenter, never>;
|
|
164
|
-
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; }; "
|
|
281
|
+
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>;
|
|
165
282
|
}
|
|
166
283
|
|
|
167
284
|
/**
|
|
168
285
|
* Read-mostly panel-surface contract for the overflow molecule, skin
|
|
169
286
|
* sub-components, and future panel-level helpers. Narrower than
|
|
170
|
-
* {@link CngxTabGroupHost}
|
|
287
|
+
* {@link CngxTabGroupHost} - register / unregister stay on the brain.
|
|
171
288
|
*
|
|
172
289
|
* The single write path is `selectById`; routing back through the
|
|
173
290
|
* presenter preserves clamping, disabled-skip, and commit-action
|
|
174
291
|
* gating. Template resolvers let skin sub-components project the
|
|
175
292
|
* `*cngxTabLabel` / `*cngxTabContent` slots without depending on the
|
|
176
293
|
* concrete `CngxTabGroup` class.
|
|
294
|
+
*
|
|
295
|
+
* @category common/tabs
|
|
177
296
|
*/
|
|
178
297
|
interface CngxTabPanelHost {
|
|
179
298
|
readonly tabs: Signal<readonly CngxTabHandle[]>;
|
|
@@ -189,6 +308,11 @@ interface CngxTabPanelHost {
|
|
|
189
308
|
* DI token the organism provides via `useExisting`. The overflow
|
|
190
309
|
* molecule and consumer-authored skin sub-components inject this
|
|
191
310
|
* instead of the concrete component class.
|
|
311
|
+
*
|
|
312
|
+
* @category common/tabs
|
|
313
|
+
* @wcag AA
|
|
314
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab-panel-host.token.ts
|
|
315
|
+
* @since 0.1.0
|
|
192
316
|
*/
|
|
193
317
|
declare const CNGX_TAB_PANEL_HOST: InjectionToken<CngxTabPanelHost>;
|
|
194
318
|
|
|
@@ -205,6 +329,20 @@ declare const CNGX_TAB_PANEL_HOST: InjectionToken<CngxTabPanelHost>;
|
|
|
205
329
|
* </ng-template>
|
|
206
330
|
* </div>
|
|
207
331
|
* ```
|
|
332
|
+
*
|
|
333
|
+
* @category common/tabs
|
|
334
|
+
* @wcag AA
|
|
335
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab-content.directive.ts
|
|
336
|
+
* @since 0.1.0
|
|
337
|
+
* @relatedTo CngxTab, CngxTabLabel
|
|
338
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-commit-action/optimistic-pessimistic-commits-with-bridge-directives</example-url>
|
|
339
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-error-aggregation/per-tab-error-badges</example-url>
|
|
340
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-group-vertical/vertical-sidebar-tabs</example-url>
|
|
341
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-group/three-tab-navigation</example-url>
|
|
342
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-overflow/8-tabs-in-a-narrow-container</example-url>
|
|
343
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-busy-spinner-via-code-cngxtabbusyspinner-code</example-url>
|
|
344
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-error-badge-via-code-cngxtaberrorbadge-code</example-url>
|
|
345
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/rejection-decoration-via-code-cngxtabrejectionicon-code</example-url>
|
|
208
346
|
*/
|
|
209
347
|
declare class CngxTabContent {
|
|
210
348
|
readonly templateRef: TemplateRef<any>;
|
|
@@ -223,6 +361,14 @@ declare class CngxTabContent {
|
|
|
223
361
|
* <ng-template cngxTabContent>...</ng-template>
|
|
224
362
|
* </div>
|
|
225
363
|
* ```
|
|
364
|
+
*
|
|
365
|
+
* @category common/tabs
|
|
366
|
+
* @wcag AA
|
|
367
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab-label.directive.ts
|
|
368
|
+
* @since 0.1.0
|
|
369
|
+
* @relatedTo CngxTab, CngxTabContent
|
|
370
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-group-vertical/vertical-sidebar-tabs</example-url>
|
|
371
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-group/three-tab-navigation</example-url>
|
|
226
372
|
*/
|
|
227
373
|
declare class CngxTabLabel {
|
|
228
374
|
readonly templateRef: TemplateRef<any>;
|
|
@@ -230,27 +376,113 @@ declare class CngxTabLabel {
|
|
|
230
376
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxTabLabel, "ng-template[cngxTabLabel]", ["cngxTabLabel"], {}, {}, never, never, true, never>;
|
|
231
377
|
}
|
|
232
378
|
|
|
379
|
+
/**
|
|
380
|
+
* Structural slot directive marking a tab's secondary label template.
|
|
381
|
+
* Discovered by `<cngx-tab-group>` via `contentChild` on each
|
|
382
|
+
* `CngxTab` and rendered as a stacked second line under the primary
|
|
383
|
+
* label. Per-tab content, mirroring `CngxTabLabel` - the convenience
|
|
384
|
+
* `[subLabel]` string input on `CngxTab` covers the plain-text case.
|
|
385
|
+
*
|
|
386
|
+
* ```html
|
|
387
|
+
* <div cngxTab id="bookmarks">
|
|
388
|
+
* <ng-template cngxTabLabel>Bookmarks</ng-template>
|
|
389
|
+
* <ng-template cngxTabSubLabel>45 saved</ng-template>
|
|
390
|
+
* <ng-template cngxTabContent>...</ng-template>
|
|
391
|
+
* </div>
|
|
392
|
+
* ```
|
|
393
|
+
*
|
|
394
|
+
* @category common/tabs
|
|
395
|
+
* @wcag AA
|
|
396
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-sub-label.directive.ts
|
|
397
|
+
* @since 0.1.0
|
|
398
|
+
* @relatedTo CngxTab, CngxTabLabel, CngxTabContent
|
|
399
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-sub-label/label-with-count</example-url>
|
|
400
|
+
*/
|
|
401
|
+
declare class CngxTabSubLabel {
|
|
402
|
+
readonly templateRef: TemplateRef<any>;
|
|
403
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CngxTabSubLabel, never>;
|
|
404
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxTabSubLabel, "ng-template[cngxTabSubLabel]", ["cngxTabSubLabel"], {}, {}, never, never, true, never>;
|
|
405
|
+
}
|
|
406
|
+
|
|
233
407
|
/**
|
|
234
408
|
* Single-tab atom. Registers with the enclosing presenter via
|
|
235
409
|
* {@link CNGX_TAB_GROUP_HOST} on construction; deregisters via
|
|
236
410
|
* {@link DestroyRef} on teardown. The presenter holds the atom's
|
|
237
411
|
* input signals by reference, so input changes propagate without
|
|
238
412
|
* re-registration. `labelTemplate` / `contentTemplate` are projected
|
|
239
|
-
* by the organism
|
|
240
|
-
|
|
241
|
-
|
|
413
|
+
* by the organism - the atom carries no rendering logic.
|
|
414
|
+
*
|
|
415
|
+
* @category common/tabs
|
|
416
|
+
* @docsKind primary
|
|
417
|
+
* @wcag AA
|
|
418
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tab.directive.ts
|
|
419
|
+
* @since 0.1.0
|
|
420
|
+
* @relatedTo CngxTabGroupPresenter, CngxTabLabel, CngxTabContent, CngxTabErrorBadge
|
|
421
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-commit-action/optimistic-pessimistic-commits-with-bridge-directives</example-url>
|
|
422
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-error-aggregation/per-tab-error-badges</example-url>
|
|
423
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-group-vertical/vertical-sidebar-tabs</example-url>
|
|
424
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-group/three-tab-navigation</example-url>
|
|
425
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-overflow/8-tabs-in-a-narrow-container</example-url>
|
|
426
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-busy-spinner-via-code-cngxtabbusyspinner-code</example-url>
|
|
427
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-error-badge-via-code-cngxtaberrorbadge-code</example-url>
|
|
428
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/rejection-decoration-via-code-cngxtabrejectionicon-code</example-url>
|
|
429
|
+
*/
|
|
430
|
+
declare class CngxTab implements OnInit {
|
|
242
431
|
readonly id: i0.InputSignal<string>;
|
|
243
432
|
readonly disabled: i0.InputSignal<boolean>;
|
|
244
433
|
readonly label: i0.InputSignal<string | undefined>;
|
|
434
|
+
/**
|
|
435
|
+
* Optional secondary text line under the primary label (a count, a
|
|
436
|
+
* status word, a short detail). Convenience for the common text
|
|
437
|
+
* case, parallel to `[label]`; the `*cngxTabSubLabel` slot covers
|
|
438
|
+
* richer content. Folds into the tab's accessible name.
|
|
439
|
+
*/
|
|
440
|
+
readonly subLabel: i0.InputSignal<string | undefined>;
|
|
245
441
|
readonly errorAggregator: i0.InputSignal<CngxErrorAggregatorContract | undefined>;
|
|
442
|
+
/**
|
|
443
|
+
* Direct error flag for the common "this tab is invalid" case - no
|
|
444
|
+
* `errorAggregator` boilerplate required. `true` or a non-empty string
|
|
445
|
+
* drives the error state; a string doubles as the inline message
|
|
446
|
+
* (surfaced via the `*cngxTabErrorBadge` slot context). `false` / `''`
|
|
447
|
+
* clear it. The aggregator stays the rich multi-source forms path; the
|
|
448
|
+
* two channels compose (either errors). Mirrors `CngxStep.error`.
|
|
449
|
+
*/
|
|
450
|
+
readonly error: i0.InputSignal<string | boolean>;
|
|
451
|
+
/**
|
|
452
|
+
* Resolved direct-error message: the `[error]` string when non-empty,
|
|
453
|
+
* else `undefined`. Carried onto the registration handle so the error
|
|
454
|
+
* badge slot can render it. `computed` over the input - never written.
|
|
455
|
+
*/
|
|
456
|
+
readonly errorMessage: Signal<string | undefined>;
|
|
457
|
+
/**
|
|
458
|
+
* Per-tab error fold driving the badge + SR descriptor. `true` when
|
|
459
|
+
* the direct `[error]` flag is set OR the optional aggregator wants to
|
|
460
|
+
* reveal (`shouldShow()` = `hasError` AND scope reveal-state). The
|
|
461
|
+
* aggregator arm reads `shouldShow`, not `hasError`, so deferred-reveal
|
|
462
|
+
* validation stays silent until revealed - the direct flag has no
|
|
463
|
+
* reveal concept (the consumer sets it when it wants it shown). A
|
|
464
|
+
* boolean, not a status enum: tabs carry no success/completed/disabled
|
|
465
|
+
* model (Pillar 3).
|
|
466
|
+
*/
|
|
467
|
+
readonly hasError: Signal<boolean>;
|
|
468
|
+
/**
|
|
469
|
+
* Per-tab close-affordance override. `undefined` (default) inherits
|
|
470
|
+
* the group-level `[closable]` resolution; set `false` to pin this
|
|
471
|
+
* tab open inside a dismissable group, or `true` to make a single tab
|
|
472
|
+
* closable while the group default is off.
|
|
473
|
+
*/
|
|
474
|
+
readonly closable: i0.InputSignal<boolean | undefined>;
|
|
246
475
|
readonly labelTemplate: Signal<CngxTabLabel | undefined>;
|
|
476
|
+
readonly subLabelTemplate: Signal<CngxTabSubLabel | undefined>;
|
|
247
477
|
readonly contentTemplate: Signal<CngxTabContent | undefined>;
|
|
248
478
|
private readonly host;
|
|
479
|
+
private readonly destroyRef;
|
|
249
480
|
/** `true` when the presenter's `activeId` equals this tab's id. */
|
|
250
481
|
readonly selected: Signal<boolean>;
|
|
251
482
|
constructor();
|
|
483
|
+
ngOnInit(): void;
|
|
252
484
|
static ɵfac: i0.ɵɵFactoryDeclaration<CngxTab, never>;
|
|
253
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxTab, "[cngxTab]", ["cngxTab"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "errorAggregator": { "alias": "errorAggregator"; "required": false; "isSignal": true; }; }, {}, ["labelTemplate", "contentTemplate"], never, true, never>;
|
|
485
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxTab, "[cngxTab]", ["cngxTab"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "subLabel": { "alias": "subLabel"; "required": false; "isSignal": true; }; "errorAggregator": { "alias": "errorAggregator"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; }, {}, ["labelTemplate", "subLabelTemplate", "contentTemplate"], never, true, never>;
|
|
254
486
|
}
|
|
255
487
|
|
|
256
488
|
/**
|
|
@@ -261,9 +493,16 @@ declare class CngxTab {
|
|
|
261
493
|
* - `mode = 'fragment'` (default) → `#tab=settings`
|
|
262
494
|
* - `mode = 'queryParam'` with `paramName = 'tab'` → `?tab=settings`
|
|
263
495
|
*
|
|
264
|
-
* `Router` is optional
|
|
496
|
+
* `Router` is optional - without it the directive logs a dev warning
|
|
265
497
|
* via `afterNextRender` and becomes a no-op. Every `router.navigate`
|
|
266
498
|
* and `host.selectById` inside the effects sits in `untracked()`.
|
|
499
|
+
*
|
|
500
|
+
* @category common/tabs
|
|
501
|
+
* @docsKind primary
|
|
502
|
+
* @wcag AA
|
|
503
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/router-sync.directive.ts
|
|
504
|
+
* @since 0.1.0
|
|
505
|
+
* @relatedTo CngxTabGroupPresenter, CngxTab
|
|
267
506
|
*/
|
|
268
507
|
declare class CngxTabsFragmentSync {
|
|
269
508
|
readonly mode: i0.InputSignal<"fragment" | "queryParam">;
|
|
@@ -277,14 +516,163 @@ declare class CngxTabsFragmentSync {
|
|
|
277
516
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxTabsFragmentSync, "[cngxTabsFragmentSync]", ["cngxTabsFragmentSync"], { "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "paramName": { "alias": "paramName"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
278
517
|
}
|
|
279
518
|
|
|
519
|
+
/**
|
|
520
|
+
* Source supplied through {@link CNGX_TABS_COMMIT_ACTION}. A sync
|
|
521
|
+
* directive (e.g. `[cngxTabsRouteSync]`) provides one so the presenter
|
|
522
|
+
* picks up a commit-action without the consumer hand-binding
|
|
523
|
+
* `[commitAction]`. Carries `mode` alongside `action` so the routed
|
|
524
|
+
* path can pin pessimistic - the active tab must follow the *resolved*
|
|
525
|
+
* route, and a stray `[commitMode]="'optimistic'"` must not override
|
|
526
|
+
* that invariant.
|
|
527
|
+
*
|
|
528
|
+
* @category common/tabs
|
|
529
|
+
*/
|
|
530
|
+
interface CngxTabsCommitActionSource {
|
|
531
|
+
readonly action: Signal<CngxTabsCommitAction | null>;
|
|
532
|
+
readonly mode: Signal<'optimistic' | 'pessimistic'>;
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* DI fallback the presenter reads when its `[commitAction]` input is
|
|
536
|
+
* unbound. Directives compose via DI tokens, not by hand-binding
|
|
537
|
+
* another directive's input (Pillar 3). When a source is present and
|
|
538
|
+
* exposes a non-null `action()`, its `mode()` wins over the
|
|
539
|
+
* `[commitMode]` input.
|
|
540
|
+
*
|
|
541
|
+
* @category common/tabs
|
|
542
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/commit-action.token.ts
|
|
543
|
+
* @since 0.1.0
|
|
544
|
+
*/
|
|
545
|
+
declare const CNGX_TABS_COMMIT_ACTION: InjectionToken<CngxTabsCommitActionSource>;
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Router-outlet integration for tab groups. Opt-in via
|
|
549
|
+
* `[cngxTabsRouteSync]` on the presenter element. Each tab is an
|
|
550
|
+
* Angular child route whose component renders into a `<router-outlet>`;
|
|
551
|
+
* switching tabs navigates, and a `CanDeactivate` guard can gate the
|
|
552
|
+
* leave.
|
|
553
|
+
*
|
|
554
|
+
* Supplies the presenter's commit-action through the
|
|
555
|
+
* {@link CNGX_TABS_COMMIT_ACTION} DI fallback (no consumer
|
|
556
|
+
* `[commitAction]` hand-binding) and pins **pessimistic** mode so the
|
|
557
|
+
* active tab follows the *resolved* route - a guard-cancelled switch
|
|
558
|
+
* keeps the old tab. The routing gate reuses the presenter's commit
|
|
559
|
+
* lifecycle verbatim; the router navigation is the async op.
|
|
560
|
+
*
|
|
561
|
+
* Seeds the active tab from the current URL on mount and reflects
|
|
562
|
+
* external navigations (back/forward, direct URL) into `activeIndex`
|
|
563
|
+
* *without* re-navigating - those writes bypass the commit-action,
|
|
564
|
+
* since the router is already at the resolved route.
|
|
565
|
+
*
|
|
566
|
+
* `Router` is optional - without it the directive logs a single dev
|
|
567
|
+
* warning via `afterNextRender`, exposes a null action, and becomes a
|
|
568
|
+
* no-op. Mirrors {@link CngxTabsFragmentSync}; every `activeIndex`
|
|
569
|
+
* write inside an effect sits in `untracked()`.
|
|
570
|
+
*
|
|
571
|
+
* @category common/tabs
|
|
572
|
+
* @docsKind primary
|
|
573
|
+
* @wcag AA
|
|
574
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/route-sync.directive.ts
|
|
575
|
+
* @since 0.1.0
|
|
576
|
+
* @relatedTo CngxTabGroupPresenter, CngxTabsFragmentSync, createTabRouterCommit
|
|
577
|
+
*/
|
|
578
|
+
declare class CngxTabsRouteSync implements CngxTabsCommitActionSource {
|
|
579
|
+
/**
|
|
580
|
+
* Maps a tab handle to its router command array. Default
|
|
581
|
+
* `(handle) => [handle.id]` - the tab id is the child segment.
|
|
582
|
+
* Override for real route paths.
|
|
583
|
+
*/
|
|
584
|
+
readonly routeFor: i0.InputSignal<(handle: CngxTabHandle) => unknown[]>;
|
|
585
|
+
private readonly host;
|
|
586
|
+
private readonly router;
|
|
587
|
+
/**
|
|
588
|
+
* Pessimistic-only - not exposed as an input. The route-sync owns the
|
|
589
|
+
* mode so optimistic (show-then-revert) can never flash the target
|
|
590
|
+
* tab before a `CanDeactivate` guard decides.
|
|
591
|
+
*/
|
|
592
|
+
readonly mode: Signal<'optimistic' | 'pessimistic'>;
|
|
593
|
+
/**
|
|
594
|
+
* Router commit-action read by the presenter via the DI fallback.
|
|
595
|
+
* `null` when no `Router` is available (graceful no-op). Rebuilt only
|
|
596
|
+
* when `routeFor` changes; the navigation gate itself is the async
|
|
597
|
+
* op inside the action.
|
|
598
|
+
*/
|
|
599
|
+
readonly action: Signal<CngxTabsCommitAction | null>;
|
|
600
|
+
constructor();
|
|
601
|
+
/**
|
|
602
|
+
* Mirror the URL's active tab onto `activeIndex` without navigating.
|
|
603
|
+
* Writing the index directly (not via `select()`) is the re-entry
|
|
604
|
+
* guard: `select()` would re-run the commit-action and navigate to
|
|
605
|
+
* the route the router is already on, leaving the commit pending
|
|
606
|
+
* forever.
|
|
607
|
+
*/
|
|
608
|
+
private reflectFromUrl;
|
|
609
|
+
/**
|
|
610
|
+
* Find the tab whose route is the trailing segment(s) of the current
|
|
611
|
+
* URL path. Anchors on position (a suffix match), not a loose
|
|
612
|
+
* "appears anywhere" scan - a tab id that happens to equal an
|
|
613
|
+
* unrelated parent segment cannot win. The path is taken before any
|
|
614
|
+
* query/fragment. If two tabs produce the same trailing segment(s)
|
|
615
|
+
* (only possible with a custom `routeFor` that collides), the first
|
|
616
|
+
* registered tab wins - the default id-based mapping never collides.
|
|
617
|
+
*/
|
|
618
|
+
private readActiveId;
|
|
619
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CngxTabsRouteSync, never>;
|
|
620
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxTabsRouteSync, "[cngxTabsRouteSync]", ["cngxTabsRouteSync"], { "routeFor": { "alias": "routeFor"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Options for {@link createTabRouterCommit}.
|
|
625
|
+
*
|
|
626
|
+
* `tabs` is the presenter's live handle list - the action receives the
|
|
627
|
+
* target *index*, so it needs the registry to resolve the matching
|
|
628
|
+
* {@link CngxTabHandle} before computing its route. `[cngxTabsRouteSync]`
|
|
629
|
+
* passes the host's `tabs` signal straight through.
|
|
630
|
+
*
|
|
631
|
+
* @category common/tabs
|
|
632
|
+
*/
|
|
633
|
+
interface CngxTabRouterCommitOptions {
|
|
634
|
+
readonly router: Router;
|
|
635
|
+
readonly tabs: () => readonly CngxTabHandle[];
|
|
636
|
+
/**
|
|
637
|
+
* Maps a tab handle to its router command array. Default
|
|
638
|
+
* `(handle) => [handle.id]` - the tab id is the child segment.
|
|
639
|
+
* Override for real route paths (`(h) => ['settings', h.id]`).
|
|
640
|
+
*/
|
|
641
|
+
readonly routeFor?: (handle: CngxTabHandle) => unknown[];
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* Builds a {@link CngxTabsCommitAction} that gates a tab switch through
|
|
645
|
+
* `@angular/router`. The action navigates to the target tab's route and
|
|
646
|
+
* resolves on the router's own outcome:
|
|
647
|
+
*
|
|
648
|
+
* - `NavigationEnd` → `true` (commit the switch)
|
|
649
|
+
* - `NavigationCancel` (a `CanDeactivate` guard blocked) → `false`
|
|
650
|
+
* - `NavigationError` (guard/resolver threw) → `false`
|
|
651
|
+
*
|
|
652
|
+
* Routed tabs reuse the presenter's commit lifecycle verbatim - the
|
|
653
|
+
* router navigation is simply the async op. In pessimistic mode the
|
|
654
|
+
* active tab follows the *resolved* route, so a cancelled guard keeps
|
|
655
|
+
* the old tab with zero extra gate machinery. The events subscription
|
|
656
|
+
* is opened *before* `navigate(...)` so a synchronously-resolving
|
|
657
|
+
* navigation cannot emit before the action is listening; the commit
|
|
658
|
+
* controller's `cancel()` unsubscribes on supersede.
|
|
659
|
+
*
|
|
660
|
+
* @category common/tabs
|
|
661
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/router-commit.ts
|
|
662
|
+
* @since 0.1.0
|
|
663
|
+
*/
|
|
664
|
+
declare function createTabRouterCommit(opts: CngxTabRouterCommitOptions): CngxTabsCommitAction;
|
|
665
|
+
|
|
280
666
|
/**
|
|
281
667
|
* Context for the `*cngxTabOverflowItem` template. Replaces the
|
|
282
668
|
* default `tab.label() ?? tab.id` text inside the More popover; the
|
|
283
669
|
* surrounding `<li role="menuitem">` shell (`aria-disabled`, click
|
|
284
670
|
* handler, `data-tab-id`) stays library-owned.
|
|
671
|
+
*
|
|
672
|
+
* @category common/tabs/overflow
|
|
285
673
|
*/
|
|
286
674
|
interface CngxTabOverflowItemContext {
|
|
287
|
-
/** Convenience alias for `tab`
|
|
675
|
+
/** Convenience alias for `tab` - usable as `let-tab` shorthand. */
|
|
288
676
|
readonly $implicit: CngxTabHandle;
|
|
289
677
|
/** The hidden tab the row represents. */
|
|
290
678
|
readonly tab: CngxTabHandle;
|
|
@@ -293,7 +681,7 @@ interface CngxTabOverflowItemContext {
|
|
|
293
681
|
* and dismisses the popover; no-op when `disabled`.
|
|
294
682
|
*/
|
|
295
683
|
readonly pick: () => void;
|
|
296
|
-
/** Mirrors `tab.disabled()`
|
|
684
|
+
/** Mirrors `tab.disabled()` - pre-resolved for consumer convenience. */
|
|
297
685
|
readonly disabled: boolean;
|
|
298
686
|
/** Row index inside `hiddenTabs()`, starting at 0. */
|
|
299
687
|
readonly index: number;
|
|
@@ -313,6 +701,12 @@ interface CngxTabOverflowItemContext {
|
|
|
313
701
|
* </ng-template>
|
|
314
702
|
* </cngx-tab-overflow>
|
|
315
703
|
* ```
|
|
704
|
+
*
|
|
705
|
+
* @category common/tabs/overflow
|
|
706
|
+
* @wcag AA
|
|
707
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/overflow/tab-overflow-item.directive.ts
|
|
708
|
+
* @since 0.1.0
|
|
709
|
+
* @relatedTo CngxTabOverflowTrigger, CngxTab
|
|
316
710
|
*/
|
|
317
711
|
declare class CngxTabOverflowItem {
|
|
318
712
|
readonly templateRef: TemplateRef<CngxTabOverflowItemContext>;
|
|
@@ -325,9 +719,11 @@ declare class CngxTabOverflowItem {
|
|
|
325
719
|
* default `i18n.moreTabsLabel(count)` text on the More button; the
|
|
326
720
|
* surrounding `<button cngxPopoverTrigger>` shell (`aria-haspopup`,
|
|
327
721
|
* `aria-expanded`, click handler, hidden binding) stays library-owned.
|
|
722
|
+
*
|
|
723
|
+
* @category common/tabs/overflow
|
|
328
724
|
*/
|
|
329
725
|
interface CngxTabOverflowTriggerContext {
|
|
330
|
-
/** Convenience alias for `count`
|
|
726
|
+
/** Convenience alias for `count` - usable as `let-count` shorthand. */
|
|
331
727
|
readonly $implicit: number;
|
|
332
728
|
/** Number of hidden tabs currently surfaced through the overflow popover. */
|
|
333
729
|
readonly count: number;
|
|
@@ -347,6 +743,12 @@ interface CngxTabOverflowTriggerContext {
|
|
|
347
743
|
* </ng-template>
|
|
348
744
|
* </cngx-tab-overflow>
|
|
349
745
|
* ```
|
|
746
|
+
*
|
|
747
|
+
* @category common/tabs/overflow
|
|
748
|
+
* @wcag AA
|
|
749
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/overflow/tab-overflow-trigger.directive.ts
|
|
750
|
+
* @since 0.1.0
|
|
751
|
+
* @relatedTo CngxTabOverflowItem, CngxTab
|
|
350
752
|
*/
|
|
351
753
|
declare class CngxTabOverflowTrigger {
|
|
352
754
|
readonly templateRef: TemplateRef<CngxTabOverflowTriggerContext>;
|
|
@@ -360,6 +762,8 @@ declare class CngxTabOverflowTrigger {
|
|
|
360
762
|
* with `commitState.status() === 'pending'`); the visibility gate
|
|
361
763
|
* stays library-owned. `intendedIndex` is exposed so positional
|
|
362
764
|
* variants (progress bars, step counters) read the same source.
|
|
765
|
+
*
|
|
766
|
+
* @category common/tabs/slots
|
|
363
767
|
*/
|
|
364
768
|
interface CngxTabBusySpinnerContext {
|
|
365
769
|
/** The tab handle carrying id / label / disabled / aggregator signals. */
|
|
@@ -379,6 +783,15 @@ interface CngxTabBusySpinnerContext {
|
|
|
379
783
|
* </ng-template>
|
|
380
784
|
* </cngx-tab-group>
|
|
381
785
|
* ```
|
|
786
|
+
*
|
|
787
|
+
* @category common/tabs/slots
|
|
788
|
+
* @wcag AA
|
|
789
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-busy-spinner.directive.ts
|
|
790
|
+
* @since 0.1.0
|
|
791
|
+
* @relatedTo CngxTabErrorBadge, CngxTabRejectionIcon, CngxTab
|
|
792
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-busy-spinner-via-code-cngxtabbusyspinner-code</example-url>
|
|
793
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-error-badge-via-code-cngxtaberrorbadge-code</example-url>
|
|
794
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/rejection-decoration-via-code-cngxtabrejectionicon-code</example-url>
|
|
382
795
|
*/
|
|
383
796
|
declare class CngxTabBusySpinner {
|
|
384
797
|
readonly templateRef: TemplateRef<CngxTabBusySpinnerContext>;
|
|
@@ -386,10 +799,48 @@ declare class CngxTabBusySpinner {
|
|
|
386
799
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxTabBusySpinner, "ng-template[cngxTabBusySpinner]", ["cngxTabBusySpinner"], {}, {}, never, never, true, never>;
|
|
387
800
|
}
|
|
388
801
|
|
|
802
|
+
/**
|
|
803
|
+
* Context for the `*cngxTabCloseIcon` template. Rendered inside each
|
|
804
|
+
* closable tab's close button (the button itself owns the
|
|
805
|
+
* `aria-label`); the template paints only the glyph, so it carries the
|
|
806
|
+
* tab handle in case the visual varies per tab.
|
|
807
|
+
*
|
|
808
|
+
* @category common/tabs/slots
|
|
809
|
+
*/
|
|
810
|
+
interface CngxTabCloseIconContext {
|
|
811
|
+
/** The tab handle whose close button this icon paints. */
|
|
812
|
+
readonly tab: CngxTabHandle;
|
|
813
|
+
}
|
|
814
|
+
/**
|
|
815
|
+
* Structural slot for a tab's close-button glyph. 3-stage cascade:
|
|
816
|
+
* per-instance directive > `CNGX_TABS_CONFIG.templates.closeIcon` >
|
|
817
|
+
* `CNGX_TABS_GLYPHS.closeIcon`.
|
|
818
|
+
*
|
|
819
|
+
* ```html
|
|
820
|
+
* <cngx-tab-group closable (tabClose)="remove($event.id)">
|
|
821
|
+
* <ng-template cngxTabCloseIcon><cngx-icon name="close" /></ng-template>
|
|
822
|
+
* ...
|
|
823
|
+
* </cngx-tab-group>
|
|
824
|
+
* ```
|
|
825
|
+
*
|
|
826
|
+
* @category common/tabs/slots
|
|
827
|
+
* @wcag AA
|
|
828
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-close-icon.directive.ts
|
|
829
|
+
* @since 0.1.0
|
|
830
|
+
* @relatedTo CngxTabAddIcon, CngxTabGroup
|
|
831
|
+
*/
|
|
832
|
+
declare class CngxTabCloseIcon {
|
|
833
|
+
readonly templateRef: TemplateRef<CngxTabCloseIconContext>;
|
|
834
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CngxTabCloseIcon, never>;
|
|
835
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxTabCloseIcon, "ng-template[cngxTabCloseIcon]", ["cngxTabCloseIcon"], {}, {}, never, never, true, never>;
|
|
836
|
+
}
|
|
837
|
+
|
|
389
838
|
/**
|
|
390
839
|
* Context for the `*cngxTabErrorBadge` template. Renders only when
|
|
391
840
|
* the tab's `errorAggregator?.shouldShow()` is `true`; the visibility
|
|
392
841
|
* gate stays library-owned. Sibling shape to `CngxStepBadgeContext`.
|
|
842
|
+
*
|
|
843
|
+
* @category common/tabs/slots
|
|
393
844
|
*/
|
|
394
845
|
interface CngxTabErrorBadgeContext {
|
|
395
846
|
/** The tab handle carrying id / label / disabled / aggregator signals. */
|
|
@@ -410,6 +861,15 @@ interface CngxTabErrorBadgeContext {
|
|
|
410
861
|
* </ng-template>
|
|
411
862
|
* </cngx-tab-group>
|
|
412
863
|
* ```
|
|
864
|
+
*
|
|
865
|
+
* @category common/tabs/slots
|
|
866
|
+
* @wcag AA
|
|
867
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-error-badge.directive.ts
|
|
868
|
+
* @since 0.1.0
|
|
869
|
+
* @relatedTo CngxTabRejectionIcon, CngxTabBusySpinner, CngxTab
|
|
870
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-busy-spinner-via-code-cngxtabbusyspinner-code</example-url>
|
|
871
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-error-badge-via-code-cngxtaberrorbadge-code</example-url>
|
|
872
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/rejection-decoration-via-code-cngxtabrejectionicon-code</example-url>
|
|
413
873
|
*/
|
|
414
874
|
declare class CngxTabErrorBadge {
|
|
415
875
|
readonly templateRef: TemplateRef<CngxTabErrorBadgeContext>;
|
|
@@ -417,13 +877,59 @@ declare class CngxTabErrorBadge {
|
|
|
417
877
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxTabErrorBadge, "ng-template[cngxTabErrorBadge]", ["cngxTabErrorBadge"], {}, {}, never, never, true, never>;
|
|
418
878
|
}
|
|
419
879
|
|
|
880
|
+
/**
|
|
881
|
+
* Context for the `*cngxTabIcon` template. Rendered once per tab in the
|
|
882
|
+
* header, ahead of the label. Carries the tab handle plus the two
|
|
883
|
+
* per-tab signals a consumer icon usually keys off - whether the tab is
|
|
884
|
+
* the active one and its positional index. Richer than
|
|
885
|
+
* {@link CngxTabErrorBadgeContext} (which only needs `tab`) because an
|
|
886
|
+
* icon commonly swaps glyph on the active tab.
|
|
887
|
+
*
|
|
888
|
+
* @category common/tabs/slots
|
|
889
|
+
*/
|
|
890
|
+
interface CngxTabIconContext {
|
|
891
|
+
/** The tab handle carrying id / label / disabled / aggregator signals. */
|
|
892
|
+
readonly tab: CngxTabHandle;
|
|
893
|
+
/** Whether this tab is the currently active one. */
|
|
894
|
+
readonly active: boolean;
|
|
895
|
+
/** Zero-based position of the tab in the strip. */
|
|
896
|
+
readonly index: number;
|
|
897
|
+
}
|
|
898
|
+
/**
|
|
899
|
+
* Structural slot for the tab-icon template. One group-level slot with
|
|
900
|
+
* per-tab context (stepper-slot parity), not a per-`CngxTab` input.
|
|
901
|
+
* 3-stage cascade: per-instance directive >
|
|
902
|
+
* `CNGX_TABS_CONFIG.templates.icon` > none (no icon rendered).
|
|
903
|
+
*
|
|
904
|
+
* ```html
|
|
905
|
+
* <cngx-tab-group iconLayout="start">
|
|
906
|
+
* <ng-template cngxTabIcon let-tab="tab" let-active="active">
|
|
907
|
+
* <cngx-icon [name]="active ? 'folder-open' : 'folder'" />
|
|
908
|
+
* </ng-template>
|
|
909
|
+
* </cngx-tab-group>
|
|
910
|
+
* ```
|
|
911
|
+
*
|
|
912
|
+
* @category common/tabs/slots
|
|
913
|
+
* @wcag AA
|
|
914
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-icon.directive.ts
|
|
915
|
+
* @since 0.1.0
|
|
916
|
+
* @relatedTo CngxTabErrorBadge, CngxTab, CngxTabGroup
|
|
917
|
+
*/
|
|
918
|
+
declare class CngxTabIcon {
|
|
919
|
+
readonly templateRef: TemplateRef<CngxTabIconContext>;
|
|
920
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CngxTabIcon, never>;
|
|
921
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxTabIcon, "ng-template[cngxTabIcon]", ["cngxTabIcon"], {}, {}, never, never, true, never>;
|
|
922
|
+
}
|
|
923
|
+
|
|
420
924
|
/**
|
|
421
925
|
* Context for the `*cngxTabRejectionIcon` template. Renders only on
|
|
422
926
|
* the tab matching `presenter.lastFailedIndex()`; the visibility
|
|
423
927
|
* gate stays library-owned. `originLabel` is the safe-harbour tab,
|
|
424
|
-
* derived from `presenter.originIndexDuringCommit()`
|
|
928
|
+
* derived from `presenter.originIndexDuringCommit()` - `undefined`
|
|
425
929
|
* for the synchronous-rejection edge case. Sibling shape to
|
|
426
930
|
* `CngxStepRejectionContext`.
|
|
931
|
+
*
|
|
932
|
+
* @category common/tabs/slots
|
|
427
933
|
*/
|
|
428
934
|
interface CngxTabRejectionIconContext {
|
|
429
935
|
/** Flat-index of the rejected tab (`presenter.lastFailedIndex()`). */
|
|
@@ -451,6 +957,15 @@ interface CngxTabRejectionIconContext {
|
|
|
451
957
|
* </ng-template>
|
|
452
958
|
* </cngx-tab-group>
|
|
453
959
|
* ```
|
|
960
|
+
*
|
|
961
|
+
* @category common/tabs/slots
|
|
962
|
+
* @wcag AA
|
|
963
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-rejection-icon.directive.ts
|
|
964
|
+
* @since 0.1.0
|
|
965
|
+
* @relatedTo CngxTabErrorBadge, CngxTabBusySpinner, CngxTab
|
|
966
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-busy-spinner-via-code-cngxtabbusyspinner-code</example-url>
|
|
967
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/custom-error-badge-via-code-cngxtaberrorbadge-code</example-url>
|
|
968
|
+
* <example-url>http://localhost:4200/#/ui/tabs/tab-slot-overrides/rejection-decoration-via-code-cngxtabrejectionicon-code</example-url>
|
|
454
969
|
*/
|
|
455
970
|
declare class CngxTabRejectionIcon {
|
|
456
971
|
readonly templateRef: TemplateRef<CngxTabRejectionIconContext>;
|
|
@@ -464,8 +979,10 @@ declare class CngxTabRejectionIcon {
|
|
|
464
979
|
* {@link withTabsAriaLabels}.
|
|
465
980
|
*
|
|
466
981
|
* Per-tab nav phrasing (`previousTab`, `nextTab`) lives in
|
|
467
|
-
* {@link CngxTabsI18n}, not here
|
|
982
|
+
* {@link CngxTabsI18n}, not here - landmark naming and SR phrasing
|
|
468
983
|
* stay on separate override paths.
|
|
984
|
+
*
|
|
985
|
+
* @category common/tabs
|
|
469
986
|
*/
|
|
470
987
|
interface CngxTabsAriaLabels {
|
|
471
988
|
readonly tabsRegion?: string;
|
|
@@ -474,6 +991,8 @@ interface CngxTabsAriaLabels {
|
|
|
474
991
|
* Fallback labels for derived strings (role descriptions, badge SR
|
|
475
992
|
* announcements). Library defaults are English; consumers override
|
|
476
993
|
* per locale.
|
|
994
|
+
*
|
|
995
|
+
* @category common/tabs
|
|
477
996
|
*/
|
|
478
997
|
interface CngxTabsFallbackLabels {
|
|
479
998
|
readonly tabRoleDescription?: string;
|
|
@@ -482,10 +1001,12 @@ interface CngxTabsFallbackLabels {
|
|
|
482
1001
|
/**
|
|
483
1002
|
* App-wide template overrides for `<cngx-tab-group>` and
|
|
484
1003
|
* `<cngx-tab-overflow>` skin regions. Middle tier of the 3-stage
|
|
485
|
-
* cascade
|
|
1004
|
+
* cascade - per-instance directive > this field > built-in markup.
|
|
486
1005
|
* Apply via the matching `with*Template` builders. Shape mirrors
|
|
487
1006
|
* `CngxStepperTemplates` so consumer templates port across
|
|
488
1007
|
* families.
|
|
1008
|
+
*
|
|
1009
|
+
* @category common/tabs
|
|
489
1010
|
*/
|
|
490
1011
|
interface CngxTabsTemplates {
|
|
491
1012
|
readonly overflowTrigger?: TemplateRef<CngxTabOverflowTriggerContext>;
|
|
@@ -493,18 +1014,119 @@ interface CngxTabsTemplates {
|
|
|
493
1014
|
readonly errorBadge?: TemplateRef<CngxTabErrorBadgeContext>;
|
|
494
1015
|
readonly rejectionIcon?: TemplateRef<CngxTabRejectionIconContext>;
|
|
495
1016
|
readonly busySpinner?: TemplateRef<CngxTabBusySpinnerContext>;
|
|
1017
|
+
readonly icon?: TemplateRef<CngxTabIconContext>;
|
|
1018
|
+
readonly closeIcon?: TemplateRef<CngxTabCloseIconContext>;
|
|
1019
|
+
readonly addIcon?: TemplateRef<void>;
|
|
496
1020
|
}
|
|
1021
|
+
/**
|
|
1022
|
+
* Selectable visual skin for `<cngx-tab-group>`. The skin is a pure
|
|
1023
|
+
* thematic concern - every value renders the same `tablist` / `tab` /
|
|
1024
|
+
* `tabpanel` structure, slots, ARIA, and keyboard behaviour, and only
|
|
1025
|
+
* redirects CSS via the `[data-skin]` host attribute. `'line'`
|
|
1026
|
+
* (default) is the underline indicator; `'contained'` fuses the active
|
|
1027
|
+
* tab with the panel surface; `'segmented'` sits the tabs in a muted
|
|
1028
|
+
* track and lifts the active tab onto a raised surface; `'pill'`
|
|
1029
|
+
* renders rounded solid fills; `'pill-outline'` renders the same pill
|
|
1030
|
+
* geometry with a tinted, outlined active state instead of a solid
|
|
1031
|
+
* fill. Sized to the tab use cases - not a 1:1 copy of the stepper's
|
|
1032
|
+
* seven skins. The Material twin (`[cngxMatTabs]`) ignores this setting.
|
|
1033
|
+
*
|
|
1034
|
+
* @category common/tabs
|
|
1035
|
+
*/
|
|
1036
|
+
type CngxTabsSkin = 'line' | 'contained' | 'segmented' | 'pill' | 'pill-outline';
|
|
1037
|
+
/**
|
|
1038
|
+
* Icon-layout axis for `<cngx-tab-group>`, orthogonal to both skin and
|
|
1039
|
+
* orientation. Positions the `*cngxTabIcon` slot relative to the tab
|
|
1040
|
+
* label: `'start'` (default) places the icon before the label in a row;
|
|
1041
|
+
* `'end'` places it after the label in a row; `'top'` stacks the icon
|
|
1042
|
+
* above the label in a column; `'only'` hides the label visually while
|
|
1043
|
+
* keeping it in the DOM as the accessible name. Redirected purely via
|
|
1044
|
+
* the `[data-icon-layout]` host attribute.
|
|
1045
|
+
*
|
|
1046
|
+
* @category common/tabs
|
|
1047
|
+
*/
|
|
1048
|
+
type CngxTabIconLayout = 'start' | 'end' | 'top' | 'only';
|
|
1049
|
+
/**
|
|
1050
|
+
* Panel render strategy for `<cngx-tab-group>`. The panel `<div>` (the
|
|
1051
|
+
* `aria-controls` target) always stays in the DOM; only its content is
|
|
1052
|
+
* rendered per mode. `'eager'` (default) renders every panel's content
|
|
1053
|
+
* up front and toggles visibility via `[hidden]` - today's behaviour,
|
|
1054
|
+
* byte-identical. `'lazy'` renders a panel's content the first time it
|
|
1055
|
+
* is activated and keeps it (keep-alive). `'lazy-destroy'` renders only
|
|
1056
|
+
* the active panel's content and destroys it on leave.
|
|
1057
|
+
*
|
|
1058
|
+
* @category common/tabs
|
|
1059
|
+
*/
|
|
1060
|
+
type CngxTabsPanelMode = 'eager' | 'lazy' | 'lazy-destroy';
|
|
1061
|
+
/**
|
|
1062
|
+
* Horizontal alignment of the tab cluster along the strip, set via the
|
|
1063
|
+
* `[tabAlign]` Input and reflected onto `[data-tab-align]`. `'start'`
|
|
1064
|
+
* (default), `'center'`, or `'end'`. Horizontal only - ignored under
|
|
1065
|
+
* `orientation="vertical"` (tabs fill the column) and when `[fitted]`
|
|
1066
|
+
* stretches them to the full width.
|
|
1067
|
+
*
|
|
1068
|
+
* @category common/tabs
|
|
1069
|
+
*/
|
|
1070
|
+
type CngxTabAlign = 'start' | 'center' | 'end';
|
|
497
1071
|
/**
|
|
498
1072
|
* Tab-group config surface. Resolution priority: per-instance Input
|
|
499
1073
|
* → `provideTabsConfigAt` (viewProviders) → `provideTabsConfig`
|
|
500
1074
|
* (root) → library default.
|
|
1075
|
+
*
|
|
1076
|
+
* @category common/tabs
|
|
501
1077
|
*/
|
|
502
1078
|
interface CngxTabsConfig {
|
|
503
1079
|
readonly defaultOrientation?: 'horizontal' | 'vertical';
|
|
504
1080
|
readonly defaultLoop?: boolean;
|
|
505
1081
|
readonly defaultCommitMode?: 'optimistic' | 'pessimistic';
|
|
506
|
-
readonly
|
|
507
|
-
readonly
|
|
1082
|
+
readonly fragmentSyncMode?: 'fragment' | 'queryParam';
|
|
1083
|
+
readonly fragmentSyncParam?: string;
|
|
1084
|
+
/**
|
|
1085
|
+
* App-wide default visual skin. Default `'line'`. Per-instance
|
|
1086
|
+
* `[skin]` Input still wins; the cascade default itself lives in
|
|
1087
|
+
* `createTabsHostAttrs`, not here (mirrors the stepper). Override via
|
|
1088
|
+
* {@link withTabsSkin}.
|
|
1089
|
+
*/
|
|
1090
|
+
readonly skin?: CngxTabsSkin;
|
|
1091
|
+
/**
|
|
1092
|
+
* App-wide default icon layout. Default `'start'`. Per-instance
|
|
1093
|
+
* `[iconLayout]` Input still wins; the cascade default lives in
|
|
1094
|
+
* `createTabsHostAttrs`. Override via {@link withTabsIconLayout}.
|
|
1095
|
+
*/
|
|
1096
|
+
readonly iconLayout?: CngxTabIconLayout;
|
|
1097
|
+
/**
|
|
1098
|
+
* App-wide default panel render strategy. Default `'eager'`.
|
|
1099
|
+
* Per-instance `[panelMode]` Input still wins; the cascade default
|
|
1100
|
+
* lives in `createTabsHostAttrs`. Override via
|
|
1101
|
+
* {@link withTabsPanelMode}.
|
|
1102
|
+
*/
|
|
1103
|
+
readonly panelMode?: CngxTabsPanelMode;
|
|
1104
|
+
/**
|
|
1105
|
+
* App-wide default for stretching tabs to the full strip width
|
|
1106
|
+
* (horizontal only). Default `false`. Per-instance `[fitted]` Input
|
|
1107
|
+
* wins; the cascade default lives in `createTabsHostAttrs`. Override
|
|
1108
|
+
* via {@link withTabsFitted}.
|
|
1109
|
+
*/
|
|
1110
|
+
readonly fitted?: boolean;
|
|
1111
|
+
/**
|
|
1112
|
+
* App-wide default tab-cluster alignment (horizontal only). Default
|
|
1113
|
+
* `'start'`. Per-instance `[tabAlign]` Input wins; the cascade default
|
|
1114
|
+
* lives in `createTabsHostAttrs`. Override via {@link withTabsAlign}.
|
|
1115
|
+
*/
|
|
1116
|
+
readonly tabAlign?: CngxTabAlign;
|
|
1117
|
+
/**
|
|
1118
|
+
* App-wide default for whether tabs render a close affordance.
|
|
1119
|
+
* Default `false`. Per-instance `[closable]` Input wins, and a
|
|
1120
|
+
* per-`CngxTab` `[closable]` override wins over both. The cascade
|
|
1121
|
+
* default lives in the organism. Override via {@link withTabsClosable}.
|
|
1122
|
+
*/
|
|
1123
|
+
readonly closable?: boolean;
|
|
1124
|
+
/**
|
|
1125
|
+
* App-wide default for whether the group renders an add-tab button.
|
|
1126
|
+
* Default `false`. Per-instance `[addable]` Input wins. Override via
|
|
1127
|
+
* {@link withTabsAddable}.
|
|
1128
|
+
*/
|
|
1129
|
+
readonly addable?: boolean;
|
|
508
1130
|
readonly ariaLabels?: CngxTabsAriaLabels;
|
|
509
1131
|
readonly fallbackLabels?: CngxTabsFallbackLabels;
|
|
510
1132
|
/**
|
|
@@ -516,7 +1138,7 @@ interface CngxTabsConfig {
|
|
|
516
1138
|
readonly overflowStabilizeMs?: number;
|
|
517
1139
|
/**
|
|
518
1140
|
* Hard ceiling (ms) on commit deferral while IO bursts keep
|
|
519
|
-
* arriving
|
|
1141
|
+
* arriving - without it, sustained churn (momentum scroll,
|
|
520
1142
|
* continuous resize) would clear the stabilize timer forever and
|
|
521
1143
|
* the More counter would freeze on a stale value, breaking
|
|
522
1144
|
* Pillar 2. Default 250ms.
|
|
@@ -533,6 +1155,11 @@ interface CngxTabsConfig {
|
|
|
533
1155
|
* DI token for the resolved tabs config. `providedIn: 'root'` with
|
|
534
1156
|
* the library defaults; override via {@link provideTabsConfig}
|
|
535
1157
|
* (root) or {@link provideTabsConfigAt} (component scope).
|
|
1158
|
+
*
|
|
1159
|
+
* @category common/tabs
|
|
1160
|
+
* @wcag AA
|
|
1161
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/tabs-config.ts
|
|
1162
|
+
* @since 0.1.0
|
|
536
1163
|
*/
|
|
537
1164
|
declare const CNGX_TABS_CONFIG: InjectionToken<CngxTabsConfig>;
|
|
538
1165
|
/**
|
|
@@ -540,6 +1167,8 @@ declare const CNGX_TABS_CONFIG: InjectionToken<CngxTabsConfig>;
|
|
|
540
1167
|
* `_target` discriminator lets {@link provideCngxTabs} dispatch
|
|
541
1168
|
* config features to {@link provideTabsConfig} while i18n features
|
|
542
1169
|
* route to {@link provideTabsI18n}.
|
|
1170
|
+
*
|
|
1171
|
+
* @category common/tabs
|
|
543
1172
|
*/
|
|
544
1173
|
type CngxTabsConfigFeature = ((config: CngxTabsConfig) => CngxTabsConfig) & {
|
|
545
1174
|
readonly _target: 'config';
|
|
@@ -547,6 +1176,8 @@ type CngxTabsConfigFeature = ((config: CngxTabsConfig) => CngxTabsConfig) & {
|
|
|
547
1176
|
/**
|
|
548
1177
|
* Override the default orientation. Per-instance `[orientation]`
|
|
549
1178
|
* still wins; this changes the cascade default only.
|
|
1179
|
+
*
|
|
1180
|
+
* @category common/tabs
|
|
550
1181
|
*/
|
|
551
1182
|
declare function withTabsDefaultOrientation(orientation: 'horizontal' | 'vertical'): CngxTabsConfigFeature;
|
|
552
1183
|
/**
|
|
@@ -554,11 +1185,15 @@ declare function withTabsDefaultOrientation(orientation: 'horizontal' | 'vertica
|
|
|
554
1185
|
* collides with the stepper family's identical symbol when both libs
|
|
555
1186
|
* are auto-imported. The alias stays for one minor release before
|
|
556
1187
|
* removal.
|
|
1188
|
+
*
|
|
1189
|
+
* @category common/tabs
|
|
557
1190
|
*/
|
|
558
1191
|
declare const withDefaultOrientation: typeof withTabsDefaultOrientation;
|
|
559
1192
|
/**
|
|
560
1193
|
* Override whether roving-tabindex navigation loops from last back to
|
|
561
1194
|
* first (and vice versa). Per-instance `[loop]` Input still wins.
|
|
1195
|
+
*
|
|
1196
|
+
* @category common/tabs
|
|
562
1197
|
*/
|
|
563
1198
|
declare function withTabsRovingLoop(loop: boolean): CngxTabsConfigFeature;
|
|
564
1199
|
/**
|
|
@@ -566,32 +1201,118 @@ declare function withTabsRovingLoop(loop: boolean): CngxTabsConfigFeature;
|
|
|
566
1201
|
* `'optimistic'` activates the tab on action dispatch and rolls back
|
|
567
1202
|
* on error; `'pessimistic'` waits for success. Per-instance
|
|
568
1203
|
* `[commitMode]` Input still wins.
|
|
1204
|
+
*
|
|
1205
|
+
* @category common/tabs
|
|
569
1206
|
*/
|
|
570
1207
|
declare function withTabsCommitMode(mode: 'optimistic' | 'pessimistic'): CngxTabsConfigFeature;
|
|
571
1208
|
/**
|
|
572
|
-
* Configure
|
|
573
|
-
* the
|
|
574
|
-
*
|
|
1209
|
+
* Configure URL fragment / query-param deep-linking for the active tab
|
|
1210
|
+
* (the {@link CngxTabsFragmentSync} directive). `mode` chooses the URL
|
|
1211
|
+
* surface (URL fragment or query parameter); `param` names the key
|
|
1212
|
+
* (default `'tab'`).
|
|
1213
|
+
*
|
|
1214
|
+
* Not to be confused with `[cngxTabsRouteSync]`, the router-outlet
|
|
1215
|
+
* integration - this feature configures fragment deep-linking only.
|
|
1216
|
+
*
|
|
1217
|
+
* @category common/tabs
|
|
1218
|
+
*/
|
|
1219
|
+
declare function withTabsFragmentSync(mode: 'fragment' | 'queryParam', param?: string): CngxTabsConfigFeature;
|
|
1220
|
+
/**
|
|
1221
|
+
* @deprecated Use {@link withTabsFragmentSync}. "Router sync" collided
|
|
1222
|
+
* with the new `[cngxTabsRouteSync]` router-outlet directive; this
|
|
1223
|
+
* feature only ever configured fragment / query-param deep-linking. The
|
|
1224
|
+
* alias stays for one minor release before removal.
|
|
1225
|
+
*
|
|
1226
|
+
* @category common/tabs
|
|
1227
|
+
*/
|
|
1228
|
+
declare const withTabsRouterSync: typeof withTabsFragmentSync;
|
|
1229
|
+
/**
|
|
1230
|
+
* Select the app-wide default visual skin for `<cngx-tab-group>`.
|
|
1231
|
+
* Default `'line'`. Per-instance `[skin]` Input still wins; this moves
|
|
1232
|
+
* the cascade default. Structure, slots, ARIA, and keyboard behaviour
|
|
1233
|
+
* are identical across skins - only the `[data-skin]` host attribute
|
|
1234
|
+
* changes the CSS layer. The Material twin (`[cngxMatTabs]`) ignores it.
|
|
1235
|
+
*
|
|
1236
|
+
* @category common/tabs
|
|
1237
|
+
*/
|
|
1238
|
+
declare function withTabsSkin(skin: CngxTabsSkin): CngxTabsConfigFeature;
|
|
1239
|
+
/**
|
|
1240
|
+
* Set the app-wide default icon layout for `<cngx-tab-group>`. Default
|
|
1241
|
+
* `'start'`. Per-instance `[iconLayout]` Input still wins. Orthogonal to
|
|
1242
|
+
* skin and orientation - only the `[data-icon-layout]` host attribute
|
|
1243
|
+
* changes.
|
|
1244
|
+
*
|
|
1245
|
+
* @category common/tabs
|
|
1246
|
+
*/
|
|
1247
|
+
declare function withTabsIconLayout(layout: CngxTabIconLayout): CngxTabsConfigFeature;
|
|
1248
|
+
/**
|
|
1249
|
+
* Set the app-wide default panel render strategy for `<cngx-tab-group>`.
|
|
1250
|
+
* Default `'eager'` (every panel's content rendered up front, toggled
|
|
1251
|
+
* via `[hidden]`). `'lazy'` keep-alives content after first activation;
|
|
1252
|
+
* `'lazy-destroy'` renders only the active panel's content. Per-instance
|
|
1253
|
+
* `[panelMode]` Input still wins. The panel `<div>` always stays in the
|
|
1254
|
+
* DOM regardless of mode (the `aria-controls` target).
|
|
1255
|
+
*
|
|
1256
|
+
* @category common/tabs
|
|
575
1257
|
*/
|
|
576
|
-
declare function
|
|
1258
|
+
declare function withTabsPanelMode(mode: CngxTabsPanelMode): CngxTabsConfigFeature;
|
|
1259
|
+
/**
|
|
1260
|
+
* Set the app-wide default for stretching tabs to the full strip width
|
|
1261
|
+
* (horizontal only). Default `false`. Per-instance `[fitted]` Input still
|
|
1262
|
+
* wins. No effect under `orientation="vertical"`.
|
|
1263
|
+
*
|
|
1264
|
+
* @category common/tabs
|
|
1265
|
+
*/
|
|
1266
|
+
declare function withTabsFitted(fitted: boolean): CngxTabsConfigFeature;
|
|
1267
|
+
/**
|
|
1268
|
+
* Set the app-wide default tab-cluster alignment (horizontal only).
|
|
1269
|
+
* Default `'start'`. Per-instance `[tabAlign]` Input still wins. Ignored
|
|
1270
|
+
* under `orientation="vertical"` and when the group is `fitted`.
|
|
1271
|
+
*
|
|
1272
|
+
* @category common/tabs
|
|
1273
|
+
*/
|
|
1274
|
+
declare function withTabsAlign(align: CngxTabAlign): CngxTabsConfigFeature;
|
|
1275
|
+
/**
|
|
1276
|
+
* Set the app-wide default for whether tabs render a close affordance.
|
|
1277
|
+
* Default `false`. Per-instance `[closable]` Input wins; a per-`CngxTab`
|
|
1278
|
+
* `[closable]` override wins over both.
|
|
1279
|
+
*
|
|
1280
|
+
* @category common/tabs
|
|
1281
|
+
*/
|
|
1282
|
+
declare function withTabsClosable(closable: boolean): CngxTabsConfigFeature;
|
|
1283
|
+
/**
|
|
1284
|
+
* Set the app-wide default for whether the group renders an add-tab
|
|
1285
|
+
* button. Default `false`. Per-instance `[addable]` Input wins.
|
|
1286
|
+
*
|
|
1287
|
+
* @category common/tabs
|
|
1288
|
+
*/
|
|
1289
|
+
declare function withTabsAddable(addable: boolean): CngxTabsConfigFeature;
|
|
577
1290
|
/**
|
|
578
1291
|
* Merge ARIA labels into the cascade. Keys not provided keep their
|
|
579
1292
|
* library defaults; per-instance overrides on the tab group still win.
|
|
1293
|
+
*
|
|
1294
|
+
* @category common/tabs
|
|
580
1295
|
*/
|
|
581
1296
|
declare function withTabsAriaLabels(labels: CngxTabsAriaLabels): CngxTabsConfigFeature;
|
|
582
1297
|
/**
|
|
583
1298
|
* Merge text fallback labels (overflow trigger, busy / rejection text)
|
|
584
1299
|
* into the cascade. Used when a slot directive is not present.
|
|
1300
|
+
*
|
|
1301
|
+
* @category common/tabs
|
|
585
1302
|
*/
|
|
586
1303
|
declare function withTabsFallbackLabels(labels: CngxTabsFallbackLabels): CngxTabsConfigFeature;
|
|
587
1304
|
/**
|
|
588
1305
|
* Override the IO-debounce window (ms). See
|
|
589
1306
|
* {@link CngxTabsConfig.overflowStabilizeMs}.
|
|
1307
|
+
*
|
|
1308
|
+
* @category common/tabs
|
|
590
1309
|
*/
|
|
591
1310
|
declare function withTabOverflowStabilizeMs(ms: number): CngxTabsConfigFeature;
|
|
592
1311
|
/**
|
|
593
1312
|
* Override the worst-case staleness ceiling on the visibility-map
|
|
594
1313
|
* commit. See {@link CngxTabsConfig.overflowMaxDeferMs}.
|
|
1314
|
+
*
|
|
1315
|
+
* @category common/tabs
|
|
595
1316
|
*/
|
|
596
1317
|
declare function withTabOverflowMaxDeferMs(ms: number): CngxTabsConfigFeature;
|
|
597
1318
|
/**
|
|
@@ -604,35 +1325,69 @@ declare function withTabOverflowMaxDeferMs(ms: number): CngxTabsConfigFeature;
|
|
|
604
1325
|
*
|
|
605
1326
|
* providers: [provideTabsConfig(withTabOverflowTriggerTemplate(this.moreTrigger))]
|
|
606
1327
|
* ```
|
|
1328
|
+
*
|
|
1329
|
+
* @category common/tabs
|
|
607
1330
|
*/
|
|
608
1331
|
declare function withTabOverflowTriggerTemplate(template: TemplateRef<CngxTabOverflowTriggerContext>): CngxTabsConfigFeature;
|
|
609
1332
|
/**
|
|
610
1333
|
* App-wide override for each row inside the overflow popover.
|
|
611
1334
|
* Middle tier; per-instance `*cngxTabOverflowItem` still wins.
|
|
1335
|
+
*
|
|
1336
|
+
* @category common/tabs
|
|
612
1337
|
*/
|
|
613
1338
|
declare function withTabOverflowItemTemplate(template: TemplateRef<CngxTabOverflowItemContext>): CngxTabsConfigFeature;
|
|
614
1339
|
/**
|
|
615
1340
|
* App-wide override for the error-badge decoration. Middle tier;
|
|
616
1341
|
* per-instance `*cngxTabErrorBadge` still wins. Sibling of the
|
|
617
1342
|
* stepper family's `withStepBadgeTemplate`.
|
|
1343
|
+
*
|
|
1344
|
+
* @category common/tabs
|
|
618
1345
|
*/
|
|
619
1346
|
declare function withTabErrorBadgeTemplate(template: TemplateRef<CngxTabErrorBadgeContext>): CngxTabsConfigFeature;
|
|
620
1347
|
/**
|
|
621
1348
|
* App-wide override for the rejection-icon decoration. Middle
|
|
622
1349
|
* tier; per-instance `*cngxTabRejectionIcon` still wins. Sibling
|
|
623
1350
|
* of {@link withStepRejectionTemplate}.
|
|
1351
|
+
*
|
|
1352
|
+
* @category common/tabs
|
|
624
1353
|
*/
|
|
625
1354
|
declare function withTabRejectionIconTemplate(template: TemplateRef<CngxTabRejectionIconContext>): CngxTabsConfigFeature;
|
|
626
1355
|
/**
|
|
627
1356
|
* App-wide override for the commit-pending busy-spinner overlay.
|
|
628
1357
|
* Middle tier; per-instance `*cngxTabBusySpinner` still wins.
|
|
629
1358
|
* Sibling of {@link withStepBusySpinnerTemplate}.
|
|
1359
|
+
*
|
|
1360
|
+
* @category common/tabs
|
|
630
1361
|
*/
|
|
631
1362
|
declare function withTabBusySpinnerTemplate(template: TemplateRef<CngxTabBusySpinnerContext>): CngxTabsConfigFeature;
|
|
1363
|
+
/**
|
|
1364
|
+
* App-wide override for the tab-icon slot. Middle tier of the 3-stage
|
|
1365
|
+
* cascade; per-instance `*cngxTabIcon` still wins. Sibling of
|
|
1366
|
+
* {@link withStepIndicatorTemplate}.
|
|
1367
|
+
*
|
|
1368
|
+
* @category common/tabs
|
|
1369
|
+
*/
|
|
1370
|
+
declare function withTabIconTemplate(template: TemplateRef<CngxTabIconContext>): CngxTabsConfigFeature;
|
|
1371
|
+
/**
|
|
1372
|
+
* App-wide override for a tab's close-button glyph. Middle tier;
|
|
1373
|
+
* per-instance `*cngxTabCloseIcon` still wins.
|
|
1374
|
+
*
|
|
1375
|
+
* @category common/tabs
|
|
1376
|
+
*/
|
|
1377
|
+
declare function withTabCloseIconTemplate(template: TemplateRef<CngxTabCloseIconContext>): CngxTabsConfigFeature;
|
|
1378
|
+
/**
|
|
1379
|
+
* App-wide override for the add-tab button glyph. Middle tier;
|
|
1380
|
+
* per-instance `*cngxTabAddIcon` still wins.
|
|
1381
|
+
*
|
|
1382
|
+
* @category common/tabs
|
|
1383
|
+
*/
|
|
1384
|
+
declare function withTabAddIconTemplate(template: TemplateRef<void>): CngxTabsConfigFeature;
|
|
632
1385
|
/**
|
|
633
1386
|
* Root-level provider. Apply once in `bootstrapApplication` /
|
|
634
1387
|
* `appConfig.providers`. Returns {@link EnvironmentProviders} per
|
|
635
1388
|
* the canonical cngx config-cascade signature.
|
|
1389
|
+
*
|
|
1390
|
+
* @category common/tabs
|
|
636
1391
|
*/
|
|
637
1392
|
declare function provideTabsConfig(...features: readonly CngxTabsConfigFeature[]): EnvironmentProviders;
|
|
638
1393
|
/**
|
|
@@ -646,29 +1401,96 @@ declare function provideTabsConfig(...features: readonly CngxTabsConfigFeature[]
|
|
|
646
1401
|
* viewProviders: [...provideTabsConfigAt(withTabsDefaultOrientation('vertical'))],
|
|
647
1402
|
* })
|
|
648
1403
|
* ```
|
|
1404
|
+
*
|
|
1405
|
+
* @category common/tabs
|
|
649
1406
|
*/
|
|
650
1407
|
declare function provideTabsConfigAt(...features: readonly CngxTabsConfigFeature[]): Provider[];
|
|
651
1408
|
/**
|
|
652
1409
|
* Inject the resolved tabs config in an injection context.
|
|
1410
|
+
*
|
|
1411
|
+
* @category common/tabs
|
|
653
1412
|
*/
|
|
654
1413
|
declare function injectTabsConfig(): CngxTabsConfig;
|
|
655
1414
|
|
|
1415
|
+
/**
|
|
1416
|
+
* Input bundle for {@link createTabsHostAttrs}: the per-instance inputs
|
|
1417
|
+
* (each `Signal<T | undefined>`) and the resolved config (read
|
|
1418
|
+
* synchronously at construction). Each cascade collapses through
|
|
1419
|
+
* `input ?? config ?? library-default`.
|
|
1420
|
+
*
|
|
1421
|
+
* @internal
|
|
1422
|
+
*/
|
|
1423
|
+
interface CngxTabsHostAttrsInputs {
|
|
1424
|
+
readonly skin: Signal<CngxTabsSkin | undefined>;
|
|
1425
|
+
readonly iconLayout: Signal<CngxTabIconLayout | undefined>;
|
|
1426
|
+
readonly panelMode: Signal<CngxTabsPanelMode | undefined>;
|
|
1427
|
+
readonly fitted: Signal<boolean | undefined>;
|
|
1428
|
+
readonly tabAlign: Signal<CngxTabAlign | undefined>;
|
|
1429
|
+
readonly config: CngxTabsConfig;
|
|
1430
|
+
}
|
|
1431
|
+
/**
|
|
1432
|
+
* Host-attribute signals for `<cngx-tab-group>`. Each is read by a
|
|
1433
|
+
* `[attr.data-*]` host binding on the organism.
|
|
1434
|
+
*
|
|
1435
|
+
* @internal
|
|
1436
|
+
*/
|
|
1437
|
+
interface CngxTabsHostAttrs {
|
|
1438
|
+
readonly resolvedSkin: Signal<CngxTabsSkin>;
|
|
1439
|
+
readonly resolvedIconLayout: Signal<CngxTabIconLayout>;
|
|
1440
|
+
readonly resolvedPanelMode: Signal<CngxTabsPanelMode>;
|
|
1441
|
+
readonly resolvedFitted: Signal<boolean>;
|
|
1442
|
+
readonly resolvedTabAlign: Signal<CngxTabAlign>;
|
|
1443
|
+
}
|
|
1444
|
+
/**
|
|
1445
|
+
* Level-2 helper resolving the host-attribute cascades for
|
|
1446
|
+
* `<cngx-tab-group>` (skin / iconLayout). Keeps the organism class
|
|
1447
|
+
* under the LOC guard while making the cascade pattern reusable. Sibling
|
|
1448
|
+
* shape to `createStepperHostAttrs`; the resolved-type unions differ per
|
|
1449
|
+
* family, so the helpers are siblings, not shared code.
|
|
1450
|
+
*
|
|
1451
|
+
* Each computed honors Pillar 1 (Ableitung statt Verwaltung):
|
|
1452
|
+
* per-instance input wins over root config wins over library default. No
|
|
1453
|
+
* manual sync. The library defaults (`'line'` / `'start'`) live here,
|
|
1454
|
+
* not in `TABS_CONFIG_DEFAULTS` - mirroring the stepper.
|
|
1455
|
+
*
|
|
1456
|
+
* @internal
|
|
1457
|
+
*/
|
|
1458
|
+
declare function createTabsHostAttrs(inputs: CngxTabsHostAttrsInputs): CngxTabsHostAttrs;
|
|
1459
|
+
|
|
656
1460
|
/**
|
|
657
1461
|
* Tabs i18n surface. Library defaults are English; consumers
|
|
658
1462
|
* override via {@link provideTabsI18n}. Sibling to
|
|
659
1463
|
* `CNGX_STEPPER_I18N` and `CNGX_CHART_I18N`.
|
|
1464
|
+
*
|
|
1465
|
+
* @category common/tabs/i18n
|
|
660
1466
|
*/
|
|
661
1467
|
interface CngxTabsI18n {
|
|
662
1468
|
readonly tabsLabel: string;
|
|
663
1469
|
readonly selectedTab: (label: string, position: number, count: number) => string;
|
|
1470
|
+
/**
|
|
1471
|
+
* Folds a tab's optional secondary label into its accessible name.
|
|
1472
|
+
* Receives the primary label and the sub-label detail; the result
|
|
1473
|
+
* is passed to {@link selectedTab} as the label part, e.g.
|
|
1474
|
+
* `Tab 2 of 5: Bookmarks, 45`. Only invoked when a sub-label is
|
|
1475
|
+
* present.
|
|
1476
|
+
*/
|
|
1477
|
+
readonly tabLabelWithDetail: (label: string, detail: string) => string;
|
|
664
1478
|
readonly tabHasErrors: (count: number) => string;
|
|
665
1479
|
readonly moreTabsLabel: (count: number) => string;
|
|
666
1480
|
readonly previousTab: string;
|
|
667
1481
|
readonly nextTab: string;
|
|
1482
|
+
/**
|
|
1483
|
+
* Accessible name for a tab's close button. Receives the tab label
|
|
1484
|
+
* (or a generic fallback when unlabeled) and yields the button's
|
|
1485
|
+
* `aria-label`, e.g. `Close "Profile"`.
|
|
1486
|
+
*/
|
|
1487
|
+
readonly closeTab: (label: string) => string;
|
|
1488
|
+
/** Accessible name for the add-tab button. */
|
|
1489
|
+
readonly addTab: string;
|
|
668
1490
|
/**
|
|
669
1491
|
* @deprecated Superseded by {@link commitRolledBackTo}. Retained as
|
|
670
1492
|
* the defensive fallback in `liveAnnouncement` when the origin
|
|
671
|
-
* label is unresolvable
|
|
1493
|
+
* label is unresolvable - fires for unlabeled tabs or programmatic
|
|
672
1494
|
* `commitState` writes that bypass `select()`. See
|
|
673
1495
|
* `tabs-accepted-debt §4`.
|
|
674
1496
|
*/
|
|
@@ -685,6 +1507,11 @@ interface CngxTabsI18n {
|
|
|
685
1507
|
/**
|
|
686
1508
|
* DI token for the tabs i18n bundle. `providedIn: 'root'` with
|
|
687
1509
|
* English defaults.
|
|
1510
|
+
*
|
|
1511
|
+
* @category common/tabs/i18n
|
|
1512
|
+
* @wcag AA
|
|
1513
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/i18n/tabs-i18n.ts
|
|
1514
|
+
* @since 0.1.0
|
|
688
1515
|
*/
|
|
689
1516
|
declare const CNGX_TABS_I18N: InjectionToken<CngxTabsI18n>;
|
|
690
1517
|
/**
|
|
@@ -692,15 +1519,19 @@ declare const CNGX_TABS_I18N: InjectionToken<CngxTabsI18n>;
|
|
|
692
1519
|
* {@link provideCngxTabs}. The hidden `_target` discriminator routes
|
|
693
1520
|
* i18n features to `provideTabsI18n` and config features to
|
|
694
1521
|
* `provideTabsConfig` from the unified aggregator.
|
|
1522
|
+
*
|
|
1523
|
+
* @category common/tabs/i18n
|
|
695
1524
|
*/
|
|
696
1525
|
type CngxTabsI18nFeature = ((bundle: CngxTabsI18n) => CngxTabsI18n) & {
|
|
697
1526
|
readonly _target: 'i18n';
|
|
698
1527
|
};
|
|
699
1528
|
/**
|
|
700
|
-
* Override i18n labels via a partial bundle
|
|
1529
|
+
* Override i18n labels via a partial bundle - unset keys keep the
|
|
701
1530
|
* English default. Same shape as `withTabsAriaLabels` /
|
|
702
1531
|
* `withTabsFallbackLabels` so `provideCngxTabs` composes both
|
|
703
1532
|
* surfaces uniformly.
|
|
1533
|
+
*
|
|
1534
|
+
* @category common/tabs/i18n
|
|
704
1535
|
*/
|
|
705
1536
|
declare function withTabsI18nLabels(overrides: Partial<CngxTabsI18n>): CngxTabsI18nFeature;
|
|
706
1537
|
/**
|
|
@@ -717,10 +1548,14 @@ declare function withTabsI18nLabels(overrides: Partial<CngxTabsI18n>): CngxTabsI
|
|
|
717
1548
|
* ],
|
|
718
1549
|
* });
|
|
719
1550
|
* ```
|
|
1551
|
+
*
|
|
1552
|
+
* @category common/tabs/i18n
|
|
720
1553
|
*/
|
|
721
1554
|
declare function provideTabsI18n(...features: readonly CngxTabsI18nFeature[]): Provider;
|
|
722
1555
|
/**
|
|
723
1556
|
* Inject the resolved tabs i18n bundle.
|
|
1557
|
+
*
|
|
1558
|
+
* @category common/tabs/i18n
|
|
724
1559
|
*/
|
|
725
1560
|
declare function injectTabsI18n(): CngxTabsI18n;
|
|
726
1561
|
|
|
@@ -728,6 +1563,8 @@ declare function injectTabsI18n(): CngxTabsI18n;
|
|
|
728
1563
|
* Union of feature kinds the tabs aggregator accepts. Today: config
|
|
729
1564
|
* + i18n; future surfaces widen the union and dispatch via the
|
|
730
1565
|
* hidden `_target` discriminator.
|
|
1566
|
+
*
|
|
1567
|
+
* @category common/tabs
|
|
731
1568
|
*/
|
|
732
1569
|
type CngxTabsFeature = CngxTabsConfigFeature | CngxTabsI18nFeature;
|
|
733
1570
|
/**
|
|
@@ -750,6 +1587,8 @@ type CngxTabsFeature = CngxTabsConfigFeature | CngxTabsI18nFeature;
|
|
|
750
1587
|
* ],
|
|
751
1588
|
* });
|
|
752
1589
|
* ```
|
|
1590
|
+
*
|
|
1591
|
+
* @category common/tabs
|
|
753
1592
|
*/
|
|
754
1593
|
declare function provideCngxTabs(...features: readonly CngxTabsFeature[]): EnvironmentProviders;
|
|
755
1594
|
/**
|
|
@@ -767,6 +1606,8 @@ declare function provideCngxTabs(...features: readonly CngxTabsFeature[]): Envir
|
|
|
767
1606
|
* ],
|
|
768
1607
|
* })
|
|
769
1608
|
* ```
|
|
1609
|
+
*
|
|
1610
|
+
* @category common/tabs
|
|
770
1611
|
*/
|
|
771
1612
|
declare function provideCngxTabsAt(...features: readonly CngxTabsFeature[]): Provider[];
|
|
772
1613
|
|
|
@@ -774,10 +1615,12 @@ declare function provideCngxTabsAt(...features: readonly CngxTabsFeature[]): Pro
|
|
|
774
1615
|
* Adapts the shared commit-controller to the tabs action shape. The
|
|
775
1616
|
* presenter delegates to {@link beginTransition} when `commitAction`
|
|
776
1617
|
* is bound.
|
|
1618
|
+
*
|
|
1619
|
+
* @category common/tabs
|
|
777
1620
|
*/
|
|
778
1621
|
interface CngxTabsCommitHandler {
|
|
779
1622
|
/**
|
|
780
|
-
* Start a tab-transition commit. Returns synchronously
|
|
1623
|
+
* Start a tab-transition commit. Returns synchronously - read the
|
|
781
1624
|
* controller's `state` signal for in-flight status. `onResolve`
|
|
782
1625
|
* fires once with `accept = true` on success or `false` on
|
|
783
1626
|
* rejection; skipped on supersede.
|
|
@@ -790,6 +1633,8 @@ interface CngxTabsCommitHandler {
|
|
|
790
1633
|
}
|
|
791
1634
|
/**
|
|
792
1635
|
* Options for {@link createTabsCommitHandler}.
|
|
1636
|
+
*
|
|
1637
|
+
* @category common/tabs
|
|
793
1638
|
*/
|
|
794
1639
|
interface CngxTabsCommitHandlerOptions {
|
|
795
1640
|
readonly controller: CngxCommitController<number>;
|
|
@@ -798,12 +1643,16 @@ interface CngxTabsCommitHandlerOptions {
|
|
|
798
1643
|
* Wraps a {@link CngxCommitController} with the action-shape adapter
|
|
799
1644
|
* that collapses `Observable<boolean>` / `Promise<boolean>` /
|
|
800
1645
|
* `boolean` returns into a single `accept: boolean` outcome.
|
|
1646
|
+
*
|
|
1647
|
+
* @category common/tabs
|
|
801
1648
|
*/
|
|
802
1649
|
declare function createTabsCommitHandler(opts: CngxTabsCommitHandlerOptions): CngxTabsCommitHandler;
|
|
803
1650
|
/**
|
|
804
1651
|
* Factory signature for {@link CNGX_TABS_COMMIT_HANDLER_FACTORY}.
|
|
805
1652
|
* Override to wrap the default with retry-with-backoff, telemetry,
|
|
806
1653
|
* or offline queues.
|
|
1654
|
+
*
|
|
1655
|
+
* @category common/tabs
|
|
807
1656
|
*/
|
|
808
1657
|
type CngxTabsCommitHandlerFactory = (opts: CngxTabsCommitHandlerOptions) => CngxTabsCommitHandler;
|
|
809
1658
|
/**
|
|
@@ -811,6 +1660,10 @@ type CngxTabsCommitHandlerFactory = (opts: CngxTabsCommitHandlerOptions) => Cngx
|
|
|
811
1660
|
* {@link createTabsCommitHandler}. Sibling to
|
|
812
1661
|
* `CNGX_ARRAY_COMMIT_HANDLER_FACTORY` (select) and
|
|
813
1662
|
* `CNGX_STEPPER_COMMIT_HANDLER_FACTORY`.
|
|
1663
|
+
*
|
|
1664
|
+
* @category common/tabs
|
|
1665
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/commit-handler.ts
|
|
1666
|
+
* @since 0.1.0
|
|
814
1667
|
*/
|
|
815
1668
|
declare const CNGX_TABS_COMMIT_HANDLER_FACTORY: InjectionToken<CngxTabsCommitHandlerFactory>;
|
|
816
1669
|
|
|
@@ -821,10 +1674,12 @@ declare const CNGX_TABS_COMMIT_HANDLER_FACTORY: InjectionToken<CngxTabsCommitHan
|
|
|
821
1674
|
* Material's rendered DOM). The molecule is variant-agnostic and
|
|
822
1675
|
* consumes whichever adapter
|
|
823
1676
|
* {@link CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY} provides.
|
|
1677
|
+
*
|
|
1678
|
+
* @category common/tabs/overflow
|
|
824
1679
|
*/
|
|
825
1680
|
interface CngxTabOverflowDomAdapter {
|
|
826
1681
|
/**
|
|
827
|
-
* Resolve the IntersectionObserver root
|
|
1682
|
+
* Resolve the IntersectionObserver root - the scroll viewport the
|
|
828
1683
|
* molecule observes. Returning `null` short-circuits the attach;
|
|
829
1684
|
* the molecule's rAF retry loop polls again next frame.
|
|
830
1685
|
*/
|
|
@@ -837,12 +1692,16 @@ interface CngxTabOverflowDomAdapter {
|
|
|
837
1692
|
}
|
|
838
1693
|
/**
|
|
839
1694
|
* Factory signature for {@link CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY}.
|
|
1695
|
+
*
|
|
1696
|
+
* @category common/tabs/overflow
|
|
840
1697
|
*/
|
|
841
1698
|
type CngxTabOverflowDomAdapterFactory = () => CngxTabOverflowDomAdapter;
|
|
842
1699
|
/**
|
|
843
1700
|
* Default adapter for the cngx-native `<cngx-tab-group>` strip:
|
|
844
1701
|
* walks `host.closest('.cngx-tabs__strip-wrapper')` for the IO root,
|
|
845
1702
|
* then `[id="${handle.id}-header"]` for each button.
|
|
1703
|
+
*
|
|
1704
|
+
* @category common/tabs/overflow
|
|
846
1705
|
*/
|
|
847
1706
|
declare function createCngxTabOverflowDefaultDomAdapter(): CngxTabOverflowDomAdapter;
|
|
848
1707
|
/**
|
|
@@ -851,16 +1710,24 @@ declare function createCngxTabOverflowDefaultDomAdapter(): CngxTabOverflowDomAda
|
|
|
851
1710
|
* swap in a Material, custom-skin, or test-double adapter without
|
|
852
1711
|
* forking the molecule. Defaults to
|
|
853
1712
|
* {@link createCngxTabOverflowDefaultDomAdapter}.
|
|
1713
|
+
*
|
|
1714
|
+
* @category common/tabs/overflow
|
|
1715
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/overflow/dom-adapter.ts
|
|
1716
|
+
* @since 0.1.0
|
|
854
1717
|
*/
|
|
855
1718
|
declare const CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY: InjectionToken<CngxTabOverflowDomAdapterFactory>;
|
|
856
1719
|
|
|
857
1720
|
/**
|
|
858
1721
|
* Outcome reported by an `attempt` callback. `true` halts the loop
|
|
859
1722
|
* (success); `false` or `null` schedules another tick.
|
|
1723
|
+
*
|
|
1724
|
+
* @category common/tabs/overflow
|
|
860
1725
|
*/
|
|
861
1726
|
type CngxDomAnchorRetryResult = true | false | null;
|
|
862
1727
|
/**
|
|
863
1728
|
* Configuration for {@link createDomAnchorRetry}.
|
|
1729
|
+
*
|
|
1730
|
+
* @category common/tabs/overflow
|
|
864
1731
|
*/
|
|
865
1732
|
interface CngxDomAnchorRetryOptions {
|
|
866
1733
|
/**
|
|
@@ -870,14 +1737,14 @@ interface CngxDomAnchorRetryOptions {
|
|
|
870
1737
|
readonly attempt: () => CngxDomAnchorRetryResult;
|
|
871
1738
|
/**
|
|
872
1739
|
* Cap on unsuccessful attempts before {@link onGiveUp} fires.
|
|
873
|
-
* The first synchronous call counts as attempt #1
|
|
1740
|
+
* The first synchronous call counts as attempt #1 - `5` permits
|
|
874
1741
|
* four scheduled retries after the initial.
|
|
875
1742
|
*/
|
|
876
1743
|
readonly maxAttempts: number;
|
|
877
1744
|
/**
|
|
878
1745
|
* Schedules the next attempt (rAF / `afterNextRender` /
|
|
879
1746
|
* `setTimeout` / `queueMicrotask`). Returns a cancellation
|
|
880
|
-
* closure
|
|
1747
|
+
* closure - return a noop when the scheduler doesn't expose one.
|
|
881
1748
|
*/
|
|
882
1749
|
readonly schedule: (cb: () => void) => () => void;
|
|
883
1750
|
/** Fires once after the `maxAttempts`-th unsuccessful attempt. */
|
|
@@ -885,6 +1752,8 @@ interface CngxDomAnchorRetryOptions {
|
|
|
885
1752
|
}
|
|
886
1753
|
/**
|
|
887
1754
|
* Imperative handle returned by {@link createDomAnchorRetry}.
|
|
1755
|
+
*
|
|
1756
|
+
* @category common/tabs/overflow
|
|
888
1757
|
*/
|
|
889
1758
|
interface CngxDomAnchorRetryHandle {
|
|
890
1759
|
/** Begin (or restart) the retry loop. Resets the attempt counter. */
|
|
@@ -893,7 +1762,7 @@ interface CngxDomAnchorRetryHandle {
|
|
|
893
1762
|
cancel(): void;
|
|
894
1763
|
}
|
|
895
1764
|
/**
|
|
896
|
-
* Bounded retry loop for DOM-anchoring patterns
|
|
1765
|
+
* Bounded retry loop for DOM-anchoring patterns - shared
|
|
897
1766
|
* attempt-counter + give-up + cancellation contract. Used by
|
|
898
1767
|
* `<cngx-tab-overflow>`'s rAF strip-attach loop and `[cngxMatTabs]`'s
|
|
899
1768
|
* `afterNextRender` header-anchor loop. Consumer-supplied scheduler
|
|
@@ -917,16 +1786,20 @@ interface CngxDomAnchorRetryHandle {
|
|
|
917
1786
|
* afterNextRender(() => retry.start());
|
|
918
1787
|
* destroyRef.onDestroy(() => retry.cancel());
|
|
919
1788
|
* ```
|
|
1789
|
+
*
|
|
1790
|
+
* @category common/tabs/overflow
|
|
920
1791
|
*/
|
|
921
1792
|
declare function createDomAnchorRetry(options: CngxDomAnchorRetryOptions): CngxDomAnchorRetryHandle;
|
|
922
1793
|
/**
|
|
923
|
-
* Factory signature for {@link CNGX_DOM_ANCHOR_RETRY_FACTORY}
|
|
1794
|
+
* Factory signature for {@link CNGX_DOM_ANCHOR_RETRY_FACTORY} -
|
|
924
1795
|
* matches {@link createDomAnchorRetry} for drop-in overrides.
|
|
1796
|
+
*
|
|
1797
|
+
* @category common/tabs/overflow
|
|
925
1798
|
*/
|
|
926
1799
|
type CngxDomAnchorRetryFactory = (options: CngxDomAnchorRetryOptions) => CngxDomAnchorRetryHandle;
|
|
927
1800
|
/**
|
|
928
1801
|
* DI token for the DOM-anchor retry policy. Default
|
|
929
|
-
* {@link createDomAnchorRetry}. Two real consumers today
|
|
1802
|
+
* {@link createDomAnchorRetry}. Two real consumers today -
|
|
930
1803
|
* `<cngx-tab-overflow>`'s rAF strip-attach loop and
|
|
931
1804
|
* `[cngxMatTabs]`'s `afterNextRender` header-anchor loop. Override
|
|
932
1805
|
* via `providers` / `viewProviders` for retry-with-backoff,
|
|
@@ -934,38 +1807,197 @@ type CngxDomAnchorRetryFactory = (options: CngxDomAnchorRetryOptions) => CngxDom
|
|
|
934
1807
|
* `CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY`,
|
|
935
1808
|
* `CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY`, and
|
|
936
1809
|
* `CNGX_TABS_COMMIT_HANDLER_FACTORY`.
|
|
1810
|
+
*
|
|
1811
|
+
* @category common/tabs/overflow
|
|
1812
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/overflow/dom-anchor-retry.ts
|
|
1813
|
+
* @since 0.1.0
|
|
937
1814
|
*/
|
|
938
1815
|
declare const CNGX_DOM_ANCHOR_RETRY_FACTORY: InjectionToken<CngxDomAnchorRetryFactory>;
|
|
939
1816
|
|
|
1817
|
+
/**
|
|
1818
|
+
* Structural slot for the add-tab button glyph. 3-stage cascade:
|
|
1819
|
+
* per-instance directive > `CNGX_TABS_CONFIG.templates.addIcon` >
|
|
1820
|
+
* `CNGX_TABS_GLYPHS.addIcon`. The button owns its `aria-label`; the
|
|
1821
|
+
* template paints only the glyph, so its context is `void`.
|
|
1822
|
+
*
|
|
1823
|
+
* ```html
|
|
1824
|
+
* <cngx-tab-group addable (tabAdd)="add()">
|
|
1825
|
+
* <ng-template cngxTabAddIcon><cngx-icon name="plus" /></ng-template>
|
|
1826
|
+
* ...
|
|
1827
|
+
* </cngx-tab-group>
|
|
1828
|
+
* ```
|
|
1829
|
+
*
|
|
1830
|
+
* @category common/tabs/slots
|
|
1831
|
+
* @wcag AA
|
|
1832
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/slots/tab-add-icon.directive.ts
|
|
1833
|
+
* @since 0.1.0
|
|
1834
|
+
* @relatedTo CngxTabCloseIcon, CngxTabGroup
|
|
1835
|
+
*/
|
|
1836
|
+
declare class CngxTabAddIcon {
|
|
1837
|
+
readonly templateRef: TemplateRef<void>;
|
|
1838
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CngxTabAddIcon, never>;
|
|
1839
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxTabAddIcon, "ng-template[cngxTabAddIcon]", ["cngxTabAddIcon"], {}, {}, never, never, true, never>;
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
/**
|
|
1843
|
+
* Inputs to {@link createTabDismissals}. The organism owns the
|
|
1844
|
+
* `[closable]` / `[addable]` inputs and the DOM handle; the factory runs
|
|
1845
|
+
* the cascade + the close/add interaction so the organism class stays
|
|
1846
|
+
* under the LOC guard. Sibling shape to `createTabGroupAnnouncements`.
|
|
1847
|
+
*
|
|
1848
|
+
* @category common/tabs
|
|
1849
|
+
*/
|
|
1850
|
+
interface CngxTabDismissalsOptions {
|
|
1851
|
+
readonly host: CngxTabGroupHost;
|
|
1852
|
+
readonly config: CngxTabsConfig;
|
|
1853
|
+
readonly i18n: CngxTabsI18n;
|
|
1854
|
+
readonly closable: Signal<boolean | undefined>;
|
|
1855
|
+
readonly addable: Signal<boolean | undefined>;
|
|
1856
|
+
readonly hostElement: HTMLElement;
|
|
1857
|
+
readonly injector: Injector;
|
|
1858
|
+
}
|
|
1859
|
+
/**
|
|
1860
|
+
* Resolved dismissable/addable surface for `<cngx-tab-group>`. The
|
|
1861
|
+
* organism holds this as one field and the template reads it.
|
|
1862
|
+
*
|
|
1863
|
+
* @category common/tabs
|
|
1864
|
+
*/
|
|
1865
|
+
interface CngxTabDismissals {
|
|
1866
|
+
/** Effective group-level close affordance (`input ?? config ?? false`). */
|
|
1867
|
+
readonly resolvedClosable: Signal<boolean>;
|
|
1868
|
+
/** Effective group-level add affordance (`input ?? config ?? false`). */
|
|
1869
|
+
readonly resolvedAddable: Signal<boolean>;
|
|
1870
|
+
/** Per-tab closable: per-tab override > group resolution. */
|
|
1871
|
+
isTabClosable(tab: CngxTabHandle): boolean;
|
|
1872
|
+
/** i18n accessible name for a tab's close button. */
|
|
1873
|
+
closeButtonLabel(tab: CngxTabHandle): string;
|
|
1874
|
+
/** Stable `*cngxTabCloseIcon` context (`{ tab }`) per tab. */
|
|
1875
|
+
closeIconContextFor(tab: CngxTabHandle): CngxTabCloseIconContext;
|
|
1876
|
+
/** Close a tab and restore focus to the new active tab / add button. */
|
|
1877
|
+
handleClose(tab: CngxTabHandle, event?: Event): void;
|
|
1878
|
+
/** Delete on a focused closable tab requests its close (APG). */
|
|
1879
|
+
handleTabKeydown(tab: CngxTabHandle, event: KeyboardEvent): void;
|
|
1880
|
+
/** Request a new tab via the add button. */
|
|
1881
|
+
handleAdd(): void;
|
|
1882
|
+
}
|
|
1883
|
+
/**
|
|
1884
|
+
* Level-2 helper resolving the dismissable/addable affordances for
|
|
1885
|
+
* `<cngx-tab-group>`. Keeps the close/add cascade + interaction off the
|
|
1886
|
+
* organism class (LOC guard). Pillar 1: each cascade is one `computed()`.
|
|
1887
|
+
* The actual tab removal is the consumer's (Ableitung statt Verwaltung) -
|
|
1888
|
+
* `handleClose` only routes through the presenter's `requestClose`, which
|
|
1889
|
+
* moves the active index, and restores focus once the consumer's removal
|
|
1890
|
+
* has rendered.
|
|
1891
|
+
*
|
|
1892
|
+
* @category common/tabs
|
|
1893
|
+
*/
|
|
1894
|
+
declare function createTabDismissals(opts: CngxTabDismissalsOptions): CngxTabDismissals;
|
|
1895
|
+
|
|
1896
|
+
/**
|
|
1897
|
+
* Inputs to {@link createTabKeyboardNav}. The organism owns the DOM
|
|
1898
|
+
* handle and the presenter contract; the factory runs the APG tablist
|
|
1899
|
+
* keyboard model so the organism class stays under the LOC guard.
|
|
1900
|
+
* Sibling shape to `createTabDismissals`.
|
|
1901
|
+
*
|
|
1902
|
+
* @category common/tabs
|
|
1903
|
+
*/
|
|
1904
|
+
interface CngxTabKeyboardNavOptions {
|
|
1905
|
+
readonly host: CngxTabGroupHost;
|
|
1906
|
+
readonly hostElement: HTMLElement;
|
|
1907
|
+
}
|
|
1908
|
+
/**
|
|
1909
|
+
* Resolved keyboard surface for `<cngx-tab-group>`'s tablist. The
|
|
1910
|
+
* organism holds this as one field; the template reads `tabTabindex`
|
|
1911
|
+
* for the roving stop and routes the tab buttons' `(keydown)` through
|
|
1912
|
+
* `handleKeydown`.
|
|
1913
|
+
*
|
|
1914
|
+
* @category common/tabs
|
|
1915
|
+
*/
|
|
1916
|
+
interface CngxTabKeyboardNav {
|
|
1917
|
+
/**
|
|
1918
|
+
* Roving `tabindex` for a tab button: `0` for the selected tab, `-1`
|
|
1919
|
+
* for every other. Derived from `host.activeId()` (Pillar 1: a single
|
|
1920
|
+
* source, never a second index to keep in sync) so the active tab is
|
|
1921
|
+
* the group's lone tab stop and `Tab` always lands on it.
|
|
1922
|
+
*/
|
|
1923
|
+
tabTabindex(tab: CngxTabHandle): 0 | -1;
|
|
1924
|
+
/**
|
|
1925
|
+
* APG tablist navigation: arrow keys (axis from orientation), Home,
|
|
1926
|
+
* and End move between tabs with disabled-skip + loop, activate the
|
|
1927
|
+
* target through `host.select()` (automatic activation), and move DOM
|
|
1928
|
+
* focus to it. Returns silently for any other key so the caller can
|
|
1929
|
+
* chain further handlers (e.g. Delete-to-close).
|
|
1930
|
+
*/
|
|
1931
|
+
handleKeydown(event: KeyboardEvent): void;
|
|
1932
|
+
}
|
|
1933
|
+
/**
|
|
1934
|
+
* Level-2 helper implementing the WAI-ARIA APG tabs keyboard model for
|
|
1935
|
+
* `<cngx-tab-group>` with **automatic activation**: an arrow press moves
|
|
1936
|
+
* focus AND activates the target tab in one step, so focus and selection
|
|
1937
|
+
* never diverge. Keeps the keyboard logic off the organism class (LOC
|
|
1938
|
+
* guard) and out of a competing roving-tabindex state machine.
|
|
1939
|
+
*
|
|
1940
|
+
* Pillar 1 (Ableitung statt Verwaltung): the tab stop is derived from the
|
|
1941
|
+
* presenter's `activeId`, not managed as a second index. Pillar 2
|
|
1942
|
+
* (Kommunikation): activation routes through `host.select()`, which owns
|
|
1943
|
+
* disabled-skip, loop, commit gating, and the live-region announcement -
|
|
1944
|
+
* the keyboard layer adds only focus movement (a DOM concern the
|
|
1945
|
+
* presenter, living in `@cngx/common`, must not own).
|
|
1946
|
+
*
|
|
1947
|
+
* Navigation always originates from the active tab: under automatic
|
|
1948
|
+
* activation the focused tab is always the active one, so the clamped
|
|
1949
|
+
* active index is the correct origin.
|
|
1950
|
+
*
|
|
1951
|
+
* @category common/tabs
|
|
1952
|
+
*/
|
|
1953
|
+
declare function createTabKeyboardNav(opts: CngxTabKeyboardNavOptions): CngxTabKeyboardNav;
|
|
1954
|
+
|
|
940
1955
|
/**
|
|
941
1956
|
* Inputs to {@link createTabGroupTemplateBindings}. The organism owns
|
|
942
1957
|
* the `contentChild()` queries (NG8110 — must run in component
|
|
943
1958
|
* injection context) and the resolved {@link CngxTabsConfig}; the
|
|
944
1959
|
* factory runs the 3-stage cascade per slot key. Sibling shape to
|
|
945
1960
|
* `createStepperTemplateBindings`.
|
|
1961
|
+
*
|
|
1962
|
+
* @category common/tabs/slots
|
|
946
1963
|
*/
|
|
947
1964
|
interface CngxTabGroupTemplateBindingsOptions {
|
|
948
1965
|
readonly errorBadgeSlot: Signal<CngxTabErrorBadge | undefined>;
|
|
949
1966
|
readonly rejectionIconSlot: Signal<CngxTabRejectionIcon | undefined>;
|
|
950
1967
|
readonly busySpinnerSlot: Signal<CngxTabBusySpinner | undefined>;
|
|
1968
|
+
readonly iconSlot: Signal<CngxTabIcon | undefined>;
|
|
1969
|
+
/** Per-instance `*cngxTabCloseIcon` slot. Optional - close is opt-in. */
|
|
1970
|
+
readonly closeIconSlot?: Signal<CngxTabCloseIcon | undefined>;
|
|
1971
|
+
/** Per-instance `*cngxTabAddIcon` slot. Optional - add is opt-in. */
|
|
1972
|
+
readonly addIconSlot?: Signal<CngxTabAddIcon | undefined>;
|
|
951
1973
|
readonly config: CngxTabsConfig;
|
|
952
1974
|
}
|
|
953
1975
|
/**
|
|
954
1976
|
* Output of {@link createTabGroupTemplateBindings}. One resolved
|
|
955
1977
|
* `Signal<TemplateRef | null>` per slot; `null` means the organism
|
|
956
1978
|
* renders its built-in default.
|
|
1979
|
+
*
|
|
1980
|
+
* @category common/tabs/slots
|
|
957
1981
|
*/
|
|
958
1982
|
interface CngxTabGroupTemplateBindings {
|
|
959
1983
|
readonly errorBadge: Signal<TemplateRef<CngxTabErrorBadgeContext> | null>;
|
|
960
1984
|
readonly rejectionIcon: Signal<TemplateRef<CngxTabRejectionIconContext> | null>;
|
|
961
1985
|
readonly busySpinner: Signal<TemplateRef<CngxTabBusySpinnerContext> | null>;
|
|
1986
|
+
readonly icon: Signal<TemplateRef<CngxTabIconContext> | null>;
|
|
1987
|
+
readonly closeIcon: Signal<TemplateRef<CngxTabCloseIconContext> | null>;
|
|
1988
|
+
readonly addIcon: Signal<TemplateRef<void> | null>;
|
|
962
1989
|
}
|
|
963
1990
|
/**
|
|
964
|
-
* Wires the 3-stage template cascade for the
|
|
965
|
-
*
|
|
1991
|
+
* Wires the 3-stage template cascade for the `<cngx-tab-group>` skin
|
|
1992
|
+
* slots (errorBadge / rejectionIcon / busySpinner / icon / closeIcon /
|
|
1993
|
+
* addIcon):
|
|
966
1994
|
* per-instance directive >
|
|
967
1995
|
* `CNGX_TABS_CONFIG.templates.<key>` >
|
|
968
|
-
* `null
|
|
1996
|
+
* `null`.
|
|
1997
|
+
*
|
|
1998
|
+
* `null` means the organism renders its built-in default - a default
|
|
1999
|
+
* span for the state decorations, the `CNGX_TABS_GLYPHS` glyph for
|
|
2000
|
+
* `closeIcon` / `addIcon`, and nothing for `icon`.
|
|
969
2001
|
*
|
|
970
2002
|
* Pure — no DI, no side effects. Safe in field-init. Sibling to
|
|
971
2003
|
* `createStepperTemplateBindings` and `createTabOverflowTemplateBindings`.
|
|
@@ -973,6 +2005,8 @@ interface CngxTabGroupTemplateBindings {
|
|
|
973
2005
|
* Single-consumer today: `[cngxMatTabs]` does not consume this —
|
|
974
2006
|
* Material owns the rendered tab-button chrome via its own MDC
|
|
975
2007
|
* template, leaving no DOM seam. See `tabs-accepted-debt §9`.
|
|
2008
|
+
*
|
|
2009
|
+
* @category common/tabs/slots
|
|
976
2010
|
*/
|
|
977
2011
|
declare function createTabGroupTemplateBindings(opts: CngxTabGroupTemplateBindingsOptions): CngxTabGroupTemplateBindings;
|
|
978
2012
|
|
|
@@ -981,6 +2015,8 @@ declare function createTabGroupTemplateBindings(opts: CngxTabGroupTemplateBindin
|
|
|
981
2015
|
* Passing presenter / i18n / config in (instead of re-injecting)
|
|
982
2016
|
* keeps the factory pure — one call returns the bundle, no
|
|
983
2017
|
* injection context required.
|
|
2018
|
+
*
|
|
2019
|
+
* @category common/tabs/announcements
|
|
984
2020
|
*/
|
|
985
2021
|
interface CngxTabGroupAnnouncementsOptions {
|
|
986
2022
|
readonly presenter: CngxTabGroupHost;
|
|
@@ -996,6 +2032,8 @@ interface CngxTabGroupAnnouncementsOptions {
|
|
|
996
2032
|
* Host bindings and template outlets read these directly. Owns one
|
|
997
2033
|
* internal `linkedSignal` slot (prior-active-index tracker driving
|
|
998
2034
|
* the success-arm direction prefix); consumers never touch it.
|
|
2035
|
+
*
|
|
2036
|
+
* @category common/tabs/announcements
|
|
999
2037
|
*/
|
|
1000
2038
|
interface CngxTabGroupAnnouncements {
|
|
1001
2039
|
/**
|
|
@@ -1030,11 +2068,13 @@ interface CngxTabGroupAnnouncements {
|
|
|
1030
2068
|
*/
|
|
1031
2069
|
readonly liveAnnouncement: Signal<string>;
|
|
1032
2070
|
/**
|
|
1033
|
-
* SR descriptor phrase for a tab's `cngx-sr-only` span.
|
|
1034
|
-
* `
|
|
1035
|
-
*
|
|
1036
|
-
*
|
|
1037
|
-
*
|
|
2071
|
+
* SR descriptor phrase for a tab's `cngx-sr-only` span. Gated on the
|
|
2072
|
+
* folded `tab.hasError()` so a direct `[error]` tab announces without
|
|
2073
|
+
* an aggregator. Resolution: `aggregator.announcement()` →
|
|
2074
|
+
* `tab.errorMessage()` (the direct-channel message) →
|
|
2075
|
+
* `i18n.tabHasErrors(errorCount)`. Empty string when the tab has no
|
|
2076
|
+
* error. The span itself is always rendered (cngx ARIA-by-value
|
|
2077
|
+
* rule); this returns its content.
|
|
1038
2078
|
*/
|
|
1039
2079
|
statusPhrase(tab: CngxTabHandle): string;
|
|
1040
2080
|
/**
|
|
@@ -1051,6 +2091,8 @@ interface CngxTabGroupAnnouncements {
|
|
|
1051
2091
|
* (prior-active-index, drives the success-arm direction prefix) —
|
|
1052
2092
|
* lazy by `linkedSignal` semantics, so the organism reads
|
|
1053
2093
|
* `liveAnnouncement` once at construction to seed it.
|
|
2094
|
+
*
|
|
2095
|
+
* @category common/tabs/announcements
|
|
1054
2096
|
*/
|
|
1055
2097
|
declare function createTabGroupAnnouncements(options: CngxTabGroupAnnouncementsOptions): CngxTabGroupAnnouncements;
|
|
1056
2098
|
|
|
@@ -1064,12 +2106,17 @@ declare function createTabGroupAnnouncements(options: CngxTabGroupAnnouncementsO
|
|
|
1064
2106
|
* directives or `withTab*Template` config features.
|
|
1065
2107
|
*
|
|
1066
2108
|
* @internal
|
|
2109
|
+
* @category common/tabs
|
|
1067
2110
|
*/
|
|
1068
2111
|
declare const CNGX_TABS_GLYPHS: {
|
|
1069
2112
|
/** Default visual for `*cngxTabErrorBadge` when no override is bound. */
|
|
1070
2113
|
readonly errorBadge: "!";
|
|
1071
2114
|
/** Default visual for `*cngxTabRejectionIcon` when no override is bound. */
|
|
1072
2115
|
readonly rejectionIcon: "!";
|
|
2116
|
+
/** Default visual for a tab's close button when no override is bound. */
|
|
2117
|
+
readonly closeIcon: "×";
|
|
2118
|
+
/** Default visual for the add-tab button when no override is bound. */
|
|
2119
|
+
readonly addIcon: "+";
|
|
1073
2120
|
};
|
|
1074
2121
|
|
|
1075
2122
|
/**
|
|
@@ -1077,6 +2124,8 @@ declare const CNGX_TABS_GLYPHS: {
|
|
|
1077
2124
|
* Stable across CD passes so `aria-activedescendant` resolves to
|
|
1078
2125
|
* the same `<li>`. `-overflow-option` suffix avoids collision with
|
|
1079
2126
|
* the strip-button (`-header`) and per-tab descriptor (`-desc`).
|
|
2127
|
+
*
|
|
2128
|
+
* @category common/tabs/overflow
|
|
1080
2129
|
*/
|
|
1081
2130
|
declare function tabOverflowOptionId(tab: CngxTabHandle): string;
|
|
1082
2131
|
/**
|
|
@@ -1084,6 +2133,8 @@ declare function tabOverflowOptionId(tab: CngxTabHandle): string;
|
|
|
1084
2133
|
* runs the `contentChild()` queries (injection-context-only) and
|
|
1085
2134
|
* supplies the reactive sources; the factory owns cascade
|
|
1086
2135
|
* resolution and per-context builders.
|
|
2136
|
+
*
|
|
2137
|
+
* @category common/tabs/overflow
|
|
1087
2138
|
*/
|
|
1088
2139
|
interface CngxTabOverflowTemplateBindingsOptions {
|
|
1089
2140
|
/** `contentChild(CngxTabOverflowTrigger)` from the molecule. */
|
|
@@ -1096,13 +2147,15 @@ interface CngxTabOverflowTemplateBindingsOptions {
|
|
|
1096
2147
|
readonly hiddenCount: Signal<number>;
|
|
1097
2148
|
/** Live hidden-tab list (drives `triggerContext.hiddenTabs`). */
|
|
1098
2149
|
readonly hiddenTabs: Signal<readonly CngxTabHandle[]>;
|
|
1099
|
-
/** Commit-aware select callback
|
|
2150
|
+
/** Commit-aware select callback - invoked from `itemContext.pick`. */
|
|
1100
2151
|
readonly pickTab: (tab: CngxTabHandle) => void;
|
|
1101
2152
|
}
|
|
1102
2153
|
/**
|
|
1103
2154
|
* Output of {@link createTabOverflowTemplateBindings}. Carries the two
|
|
1104
2155
|
* resolved templates plus a stable trigger-context signal and an
|
|
1105
2156
|
* imperative item-context builder.
|
|
2157
|
+
*
|
|
2158
|
+
* @category common/tabs/overflow
|
|
1106
2159
|
*/
|
|
1107
2160
|
interface CngxTabOverflowTemplateBindings {
|
|
1108
2161
|
readonly triggerTemplate: Signal<TemplateRef<CngxTabOverflowTriggerContext> | null>;
|
|
@@ -1128,24 +2181,30 @@ interface CngxTabOverflowTemplateBindings {
|
|
|
1128
2181
|
* `CNGX_TABS_CONFIG.templates.overflow*` > built-in markup
|
|
1129
2182
|
* (template-outlet returns `null`).
|
|
1130
2183
|
*
|
|
1131
|
-
* Pure
|
|
2184
|
+
* Pure - no DI, no side effects, no destroy hooks. Safe to call
|
|
1132
2185
|
* from a component's field-init block. Mirrors the select-family
|
|
1133
2186
|
* `createTemplateRegistry` pattern.
|
|
2187
|
+
*
|
|
2188
|
+
* @category common/tabs/overflow
|
|
1134
2189
|
*/
|
|
1135
2190
|
declare function createTabOverflowTemplateBindings(opts: CngxTabOverflowTemplateBindingsOptions): CngxTabOverflowTemplateBindings;
|
|
1136
2191
|
/**
|
|
1137
2192
|
* Resets the AD highlight on popover close. Keyboard-open paths
|
|
1138
2193
|
* (ArrowDown / End / typeahead on the closed trigger) set
|
|
1139
|
-
* `activeIndex` via AD's own keydown listener before opening
|
|
2194
|
+
* `activeIndex` via AD's own keydown listener before opening -
|
|
1140
2195
|
* unaffected. Mouse-open leaves `activeIndex === -1` so the popover
|
|
1141
2196
|
* renders unhighlighted. Without this reset, the next open would
|
|
1142
2197
|
* inherit a stale index from the prior keyboard session.
|
|
1143
2198
|
*
|
|
1144
2199
|
* Must run in injection context.
|
|
2200
|
+
*
|
|
2201
|
+
* @category common/tabs/overflow
|
|
1145
2202
|
*/
|
|
1146
2203
|
declare function createOverflowPopoverHighlightSync(popover: Signal<CngxPopover>, ad: Signal<CngxActiveDescendant>): void;
|
|
1147
2204
|
/**
|
|
1148
2205
|
* Factory signature for {@link CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY}.
|
|
2206
|
+
*
|
|
2207
|
+
* @category common/tabs/overflow
|
|
1149
2208
|
*/
|
|
1150
2209
|
type CngxOverflowPopoverHighlightSyncFactory = (popover: Signal<CngxPopover>, ad: Signal<CngxActiveDescendant>) => void;
|
|
1151
2210
|
/**
|
|
@@ -1155,18 +2214,24 @@ type CngxOverflowPopoverHighlightSyncFactory = (popover: Signal<CngxPopover>, ad
|
|
|
1155
2214
|
* telemetry on close, custom highlight rules. Symmetric to
|
|
1156
2215
|
* `CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY` and
|
|
1157
2216
|
* `CNGX_TABS_COMMIT_HANDLER_FACTORY`.
|
|
2217
|
+
*
|
|
2218
|
+
* @category common/tabs/overflow
|
|
2219
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/overflow/overflow-template-cascade.ts
|
|
2220
|
+
* @since 0.1.0
|
|
1158
2221
|
*/
|
|
1159
2222
|
declare const CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY: InjectionToken<CngxOverflowPopoverHighlightSyncFactory>;
|
|
1160
2223
|
|
|
1161
2224
|
/**
|
|
1162
2225
|
* Options for {@link createOrganismScrollSync}.
|
|
2226
|
+
*
|
|
2227
|
+
* @category common/tabs/scroll-sync
|
|
1163
2228
|
*/
|
|
1164
2229
|
interface CngxOrganismScrollSyncOptions {
|
|
1165
2230
|
/** Reactive source for the active item id; tracked by the effect. */
|
|
1166
2231
|
readonly activeId: Signal<string | null>;
|
|
1167
2232
|
/**
|
|
1168
2233
|
* Host element containing the per-item buttons. Items must carry
|
|
1169
|
-
* `id="${itemId}-header"`
|
|
2234
|
+
* `id="${itemId}-header"` - the convention used by
|
|
1170
2235
|
* `<cngx-tab-group>` and `<cngx-stepper>`.
|
|
1171
2236
|
*/
|
|
1172
2237
|
readonly hostElement: HTMLElement;
|
|
@@ -1184,11 +2249,15 @@ interface CngxOrganismScrollSyncOptions {
|
|
|
1184
2249
|
* scrolls the matching `[id="<itemId>-header"]` into view.
|
|
1185
2250
|
*
|
|
1186
2251
|
* The DOM call sits in `untracked()` (only `activeId` is tracked).
|
|
1187
|
-
* `scrollIntoView` is missing in jsdom
|
|
2252
|
+
* `scrollIntoView` is missing in jsdom - guarded with optional chain.
|
|
2253
|
+
*
|
|
2254
|
+
* @category common/tabs/scroll-sync
|
|
1188
2255
|
*/
|
|
1189
2256
|
declare function createOrganismScrollSync(opts: CngxOrganismScrollSyncOptions): void;
|
|
1190
2257
|
/**
|
|
1191
2258
|
* Factory signature for {@link CNGX_ORGANISM_SCROLL_SYNC_FACTORY}.
|
|
2259
|
+
*
|
|
2260
|
+
* @category common/tabs/scroll-sync
|
|
1192
2261
|
*/
|
|
1193
2262
|
type CngxOrganismScrollSyncFactory = (opts: CngxOrganismScrollSyncOptions) => void;
|
|
1194
2263
|
/**
|
|
@@ -1197,16 +2266,22 @@ type CngxOrganismScrollSyncFactory = (opts: CngxOrganismScrollSyncOptions) => vo
|
|
|
1197
2266
|
* custom selector, telemetry, or `prefers-reduced-motion` opt-out.
|
|
1198
2267
|
* Sibling to `CNGX_DOM_ANCHOR_RETRY_FACTORY` and
|
|
1199
2268
|
* `CNGX_OVERFLOW_POPOVER_HIGHLIGHT_FACTORY`.
|
|
2269
|
+
*
|
|
2270
|
+
* @category common/tabs/scroll-sync
|
|
2271
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/scroll-sync/organism-scroll-sync.ts
|
|
2272
|
+
* @since 0.1.0
|
|
1200
2273
|
*/
|
|
1201
2274
|
declare const CNGX_ORGANISM_SCROLL_SYNC_FACTORY: InjectionToken<CngxOrganismScrollSyncFactory>;
|
|
1202
2275
|
|
|
1203
2276
|
/**
|
|
1204
2277
|
* Options for {@link createDirectiveByIdMap}.
|
|
2278
|
+
*
|
|
2279
|
+
* @category common/tabs/registry
|
|
1205
2280
|
*/
|
|
1206
2281
|
interface CngxDirectiveByIdMapOptions<T extends {
|
|
1207
2282
|
id: () => string;
|
|
1208
2283
|
}> {
|
|
1209
|
-
/** Reactive source
|
|
2284
|
+
/** Reactive source - typically `contentChildren(...)`. */
|
|
1210
2285
|
readonly source: Signal<readonly T[]>;
|
|
1211
2286
|
}
|
|
1212
2287
|
/**
|
|
@@ -1214,12 +2289,16 @@ interface CngxDirectiveByIdMapOptions<T extends {
|
|
|
1214
2289
|
* directives keyed by `id()`. Structural equal prevents cascade when
|
|
1215
2290
|
* `contentChildren` re-emits an unchanged child set. Shared by
|
|
1216
2291
|
* `<cngx-tab-group>`, `<cngx-stepper>`, and `<cngx-mat-stepper>`.
|
|
2292
|
+
*
|
|
2293
|
+
* @category common/tabs/registry
|
|
1217
2294
|
*/
|
|
1218
2295
|
declare function createDirectiveByIdMap<T extends {
|
|
1219
2296
|
id: () => string;
|
|
1220
2297
|
}>(opts: CngxDirectiveByIdMapOptions<T>): Signal<Map<string, T>>;
|
|
1221
2298
|
/**
|
|
1222
2299
|
* Factory signature for {@link CNGX_DIRECTIVE_BY_ID_MAP_FACTORY}.
|
|
2300
|
+
*
|
|
2301
|
+
* @category common/tabs/registry
|
|
1223
2302
|
*/
|
|
1224
2303
|
type CngxDirectiveByIdMapFactory = <T extends {
|
|
1225
2304
|
id: () => string;
|
|
@@ -1230,8 +2309,12 @@ type CngxDirectiveByIdMapFactory = <T extends {
|
|
|
1230
2309
|
* telemetry, or custom equality. Sibling to
|
|
1231
2310
|
* `CNGX_DOM_ANCHOR_RETRY_FACTORY` and
|
|
1232
2311
|
* `CNGX_ORGANISM_SCROLL_SYNC_FACTORY`.
|
|
2312
|
+
*
|
|
2313
|
+
* @category common/tabs/registry
|
|
2314
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/tabs/registry/directive-by-id-map.ts
|
|
2315
|
+
* @since 0.1.0
|
|
1233
2316
|
*/
|
|
1234
2317
|
declare const CNGX_DIRECTIVE_BY_ID_MAP_FACTORY: InjectionToken<CngxDirectiveByIdMapFactory>;
|
|
1235
2318
|
|
|
1236
|
-
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_HANDLER_FACTORY, CNGX_TABS_CONFIG, CNGX_TABS_GLYPHS, CNGX_TABS_I18N, CNGX_TAB_GROUP_HOST, CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY, CNGX_TAB_PANEL_HOST, CngxTab, CngxTabBusySpinner, CngxTabContent, CngxTabErrorBadge, CngxTabGroupPresenter, CngxTabLabel, CngxTabOverflowItem, CngxTabOverflowTrigger, CngxTabRejectionIcon, CngxTabsFragmentSync, createCngxTabOverflowDefaultDomAdapter, createDirectiveByIdMap, createDomAnchorRetry, createOrganismScrollSync, createOverflowPopoverHighlightSync, createTabGroupAnnouncements, createTabGroupTemplateBindings, createTabOverflowTemplateBindings, createTabsCommitHandler, injectTabsConfig, injectTabsI18n, provideCngxTabs, provideCngxTabsAt, provideTabsConfig, provideTabsConfigAt, provideTabsI18n, tabOverflowOptionId, withDefaultOrientation, withTabBusySpinnerTemplate, withTabErrorBadgeTemplate, withTabOverflowItemTemplate, withTabOverflowMaxDeferMs, withTabOverflowStabilizeMs, withTabOverflowTriggerTemplate, withTabRejectionIconTemplate, withTabsAriaLabels, withTabsCommitMode, withTabsDefaultOrientation, withTabsFallbackLabels, withTabsI18nLabels, withTabsRouterSync, withTabsRovingLoop };
|
|
1237
|
-
export type { CngxDirectiveByIdMapFactory, CngxDirectiveByIdMapOptions, CngxDomAnchorRetryFactory, CngxDomAnchorRetryHandle, CngxDomAnchorRetryOptions, CngxDomAnchorRetryResult, CngxOrganismScrollSyncFactory, CngxOrganismScrollSyncOptions, CngxOverflowPopoverHighlightSyncFactory, CngxTabBusySpinnerContext, CngxTabErrorBadgeContext, CngxTabGroupAnnouncements, CngxTabGroupAnnouncementsOptions, CngxTabGroupHost, CngxTabGroupTemplateBindings, CngxTabGroupTemplateBindingsOptions, CngxTabHandle, CngxTabOverflowDomAdapter, CngxTabOverflowDomAdapterFactory, CngxTabOverflowItemContext, CngxTabOverflowTemplateBindings, CngxTabOverflowTemplateBindingsOptions, CngxTabOverflowTriggerContext, CngxTabPanelHost, CngxTabRejectionIconContext, CngxTabsAriaLabels, CngxTabsCommitAction, CngxTabsCommitHandler, CngxTabsCommitHandlerFactory, CngxTabsCommitHandlerOptions, CngxTabsConfig, CngxTabsConfigFeature, CngxTabsFallbackLabels, CngxTabsFeature, CngxTabsI18n, CngxTabsI18nFeature, CngxTabsTemplates };
|
|
2319
|
+
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_OVERFLOW_DOM_ADAPTER_FACTORY, CNGX_TAB_PANEL_HOST, CngxTab, CngxTabAddIcon, CngxTabBusySpinner, CngxTabCloseIcon, CngxTabContent, CngxTabErrorBadge, CngxTabGroupPresenter, CngxTabIcon, CngxTabLabel, CngxTabOverflowItem, CngxTabOverflowTrigger, CngxTabRejectionIcon, CngxTabSubLabel, CngxTabsFragmentSync, CngxTabsRouteSync, createCngxTabOverflowDefaultDomAdapter, createDirectiveByIdMap, createDomAnchorRetry, createOrganismScrollSync, createOverflowPopoverHighlightSync, createTabDismissals, createTabGroupAnnouncements, createTabGroupTemplateBindings, createTabKeyboardNav, createTabOverflowTemplateBindings, createTabRouterCommit, 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, withTabsPanelMode, withTabsRouterSync, withTabsRovingLoop, withTabsSkin };
|
|
2320
|
+
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, CngxTabOverflowDomAdapter, CngxTabOverflowDomAdapterFactory, CngxTabOverflowItemContext, CngxTabOverflowTemplateBindings, CngxTabOverflowTemplateBindingsOptions, CngxTabOverflowTriggerContext, CngxTabPanelHost, CngxTabRejectionIconContext, CngxTabRouterCommitOptions, CngxTabsAriaLabels, CngxTabsCommitAction, CngxTabsCommitActionSource, CngxTabsCommitHandler, CngxTabsCommitHandlerFactory, CngxTabsCommitHandlerOptions, CngxTabsConfig, CngxTabsConfigFeature, CngxTabsFallbackLabels, CngxTabsFeature, CngxTabsHostAttrs, CngxTabsHostAttrsInputs, CngxTabsI18n, CngxTabsI18nFeature, CngxTabsPanelMode, CngxTabsSkin, CngxTabsTemplates };
|