@cngx/ui 0.0.1-rc.0 → 0.1.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -48
- package/action-button/README.md +9 -11
- package/empty-state/README.md +11 -26
- package/feedback/README.md +3 -3
- package/fesm2022/cngx-ui-action-button.mjs +30 -26
- package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
- package/fesm2022/cngx-ui-empty-state.mjs +26 -21
- package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
- package/fesm2022/cngx-ui-feedback.mjs +498 -261
- package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
- package/fesm2022/cngx-ui-layout.mjs +32 -5
- package/fesm2022/cngx-ui-layout.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-stepper.mjs +119 -297
- package/fesm2022/cngx-ui-mat-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-tabs.mjs +455 -120
- package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-material.mjs +14 -3
- package/fesm2022/cngx-ui-material.mjs.map +1 -1
- package/fesm2022/cngx-ui-overlay.mjs +22 -3
- package/fesm2022/cngx-ui-overlay.mjs.map +1 -1
- package/fesm2022/cngx-ui-sidenav.mjs +107 -28
- package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
- package/fesm2022/cngx-ui-skeleton.mjs +61 -20
- package/fesm2022/cngx-ui-skeleton.mjs.map +1 -1
- package/fesm2022/cngx-ui-speak.mjs +14 -5
- package/fesm2022/cngx-ui-speak.mjs.map +1 -1
- package/fesm2022/cngx-ui-stepper.mjs +659 -163
- package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-tabs.mjs +306 -55
- package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui.mjs +2 -1
- package/fesm2022/cngx-ui.mjs.map +1 -1
- package/layout/README.md +9 -44
- package/mat-stepper/README.md +37 -17
- package/mat-tabs/README.md +13 -13
- package/mat-tabs/styles/mat-tabs.css +357 -213
- package/material/README.md +19 -19
- package/overlay/README.md +11 -11
- package/package.json +7 -6
- package/sidenav/README.md +4 -19
- package/skeleton/README.md +3 -17
- package/speak/README.md +15 -15
- package/stepper/README.md +213 -5
- package/tabs/README.md +22 -4
- package/theming/system-tokens.css +29 -0
- package/types/cngx-ui-action-button.d.ts +28 -13
- package/types/cngx-ui-empty-state.d.ts +21 -9
- package/types/cngx-ui-feedback.d.ts +437 -121
- package/types/cngx-ui-layout.d.ts +38 -8
- package/types/cngx-ui-mat-stepper.d.ts +100 -134
- package/types/cngx-ui-mat-tabs.d.ts +291 -84
- package/types/cngx-ui-material.d.ts +12 -1
- package/types/cngx-ui-overlay.d.ts +25 -4
- package/types/cngx-ui-sidenav.d.ts +106 -12
- package/types/cngx-ui-skeleton.d.ts +62 -8
- package/types/cngx-ui-speak.d.ts +10 -2
- package/types/cngx-ui-stepper.d.ts +390 -57
- package/types/cngx-ui-tabs.d.ts +182 -18
- package/types/cngx-ui.d.ts +1 -0
- package/speak/speak-button-theme.scss +0 -78
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i1 from '@cngx/common/tabs';
|
|
2
2
|
import { CngxTabHandle, CngxTabOverflowDomAdapter } from '@cngx/common/tabs';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Signal, WritableSignal, InjectionToken, Injector, TemplateRef, EnvironmentProviders, Provider } from '@angular/core';
|
|
4
|
+
import { Signal, WritableSignal, InjectionToken, Injector, OnInit, TemplateRef, EnvironmentProviders, Provider } from '@angular/core';
|
|
5
5
|
import { MatTab } from '@angular/material/tabs';
|
|
6
6
|
import { CngxErrorAggregatorContract } from '@cngx/common/interactive';
|
|
7
7
|
import { MatStepperIconContext } from '@angular/material/stepper';
|
|
@@ -21,29 +21,42 @@ interface CngxMatTabHandleSetup {
|
|
|
21
21
|
/** Convenience mirror of `handle.disabled`. */
|
|
22
22
|
readonly disabled: Signal<boolean>;
|
|
23
23
|
readonly errorAggregator: WritableSignal<CngxErrorAggregatorContract | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* Direct invalid flag the `[cngxMatTabErrorFlag]` directive writes -
|
|
26
|
+
* `string | boolean`, mirroring `CngxTab.error`. Folds into the
|
|
27
|
+
* handle's `hasError` / `errorMessage` alongside the aggregator.
|
|
28
|
+
*/
|
|
29
|
+
readonly directError: WritableSignal<string | boolean>;
|
|
24
30
|
}
|
|
25
31
|
/**
|
|
26
32
|
* Translates a Material `MatTab` into a cngx {@link CngxTabHandle}
|
|
27
33
|
* plus a writable `errorAggregator` slot the `[cngxMatTabError]`
|
|
28
34
|
* directive binds.
|
|
29
35
|
*
|
|
30
|
-
* - `id`
|
|
36
|
+
* - `id` - fresh `idSeed()` value; a label-keyed id would collide
|
|
31
37
|
* when two tabs share a label.
|
|
32
|
-
* - `label` / `disabled`
|
|
38
|
+
* - `label` / `disabled` - `computed` signals retriggered by
|
|
33
39
|
* `toSignal(matTab._stateChanges)`. Bridge lifetime is tied to
|
|
34
40
|
* the supplied `injector` (typically a per-tab child
|
|
35
41
|
* `EnvironmentInjector`). `_stateChanges` is a Material-internal
|
|
36
|
-
* surface
|
|
37
|
-
* - `errorAggregator`
|
|
42
|
+
* surface.
|
|
43
|
+
* - `errorAggregator` - writable seeded at `undefined`;
|
|
38
44
|
* `[cngxMatTabError]` writes its bound aggregator in and resets
|
|
39
45
|
* on teardown. The handle exposes `.asReadonly()` to preserve the
|
|
40
46
|
* `CngxTabHandle` contract.
|
|
47
|
+
* - `directError` - writable seeded at `false`;
|
|
48
|
+
* `[cngxMatTabErrorFlag]` writes its `string | boolean` value in
|
|
49
|
+
* and resets on teardown. Folds into `hasError` / `errorMessage`.
|
|
50
|
+
*
|
|
51
|
+
* @category ui/mat-tabs
|
|
41
52
|
*/
|
|
42
53
|
declare function createMatTabHandle(matTab: MatTab, idSeed: () => string, injector: Injector): CngxMatTabHandleSetup;
|
|
43
54
|
/**
|
|
44
55
|
* Factory signature for {@link createMatTabHandle}. The DI token
|
|
45
56
|
* {@link CNGX_MAT_TAB_HANDLE_FACTORY} resolves to a function with
|
|
46
|
-
* this exact shape
|
|
57
|
+
* this exact shape - overrides match it identically.
|
|
58
|
+
*
|
|
59
|
+
* @category ui/mat-tabs
|
|
47
60
|
*/
|
|
48
61
|
type CngxMatTabHandleFactory = typeof createMatTabHandle;
|
|
49
62
|
/**
|
|
@@ -54,11 +67,8 @@ type CngxMatTabHandleFactory = typeof createMatTabHandle;
|
|
|
54
67
|
*
|
|
55
68
|
* The seam separates handle shape (factory body) from id keying
|
|
56
69
|
* (the supplied `idSeed` closure). Overrides may call, ignore, or
|
|
57
|
-
* replace `idSeed`
|
|
58
|
-
* consumer-domain ids
|
|
59
|
-
*
|
|
60
|
-
* Tracked-debt: family-uniformity staging, single in-package
|
|
61
|
-
* consumer today. See `tabs-accepted-debt §10`.
|
|
70
|
+
* replace `idSeed` - server-synced ids, deterministic test ids,
|
|
71
|
+
* consumer-domain ids - without touching the factory body.
|
|
62
72
|
*
|
|
63
73
|
* ```ts
|
|
64
74
|
* providers: [
|
|
@@ -72,6 +82,11 @@ type CngxMatTabHandleFactory = typeof createMatTabHandle;
|
|
|
72
82
|
* },
|
|
73
83
|
* ]
|
|
74
84
|
* ```
|
|
85
|
+
*
|
|
86
|
+
* @category ui/mat-tabs
|
|
87
|
+
* @wcag AA
|
|
88
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/material-bridge/handle.ts
|
|
89
|
+
* @since 0.1.0
|
|
75
90
|
*/
|
|
76
91
|
declare const CNGX_MAT_TAB_HANDLE_FACTORY: InjectionToken<typeof createMatTabHandle>;
|
|
77
92
|
|
|
@@ -79,36 +94,43 @@ declare const CNGX_MAT_TAB_HANDLE_FACTORY: InjectionToken<typeof createMatTabHan
|
|
|
79
94
|
* Read-mostly contract for the per-tab handle-setup registry.
|
|
80
95
|
* `[cngxMatTabError]` and any future `[cngxMatTab*]` decoration
|
|
81
96
|
* directive injects this with `{ host: true }` to reach the
|
|
82
|
-
* per-handle `errorAggregator` slot
|
|
83
|
-
*
|
|
97
|
+
* per-handle `errorAggregator` slot without walking the concrete
|
|
98
|
+
* registry class.
|
|
84
99
|
*
|
|
85
100
|
* Return type narrows to `Pick<..., 'errorAggregator'>` so the
|
|
86
101
|
* access path exposes only the per-handle aggregator slot; the
|
|
87
102
|
* rest of the setup stays internal bookkeeping.
|
|
103
|
+
*
|
|
104
|
+
* @category ui/mat-tabs
|
|
88
105
|
*/
|
|
89
106
|
interface CngxMatTabsRegistryHost {
|
|
90
107
|
/**
|
|
91
|
-
* Returns the per-handle
|
|
92
|
-
* before the tab is registered. The
|
|
93
|
-
* query lands during content-init, so a
|
|
94
|
-
* from an attribute directive can race;
|
|
95
|
-
* tracking `presenter.tabs()` and re-attempting
|
|
96
|
-
* tick.
|
|
108
|
+
* Returns the per-handle writable slots (`errorAggregator`,
|
|
109
|
+
* `directError`), or `undefined` before the tab is registered. The
|
|
110
|
+
* `contentChildren(MatTab)` query lands during content-init, so a
|
|
111
|
+
* same-microtask injection from an attribute directive can race;
|
|
112
|
+
* consumers recover by tracking `presenter.tabs()` and re-attempting
|
|
113
|
+
* on the next sync tick.
|
|
97
114
|
*/
|
|
98
|
-
getHandleSetup(matTab: MatTab): Pick<CngxMatTabHandleSetup, 'errorAggregator'> | undefined;
|
|
115
|
+
getHandleSetup(matTab: MatTab): Pick<CngxMatTabHandleSetup, 'errorAggregator' | 'directError'> | undefined;
|
|
99
116
|
}
|
|
100
117
|
/**
|
|
101
118
|
* DI token the {@link CngxMatTabsRegistry} directive provides via
|
|
102
119
|
* `useExisting`. Sibling per-tab directives inject this with
|
|
103
120
|
* `{ host: true }` to reach per-handle slots without walking the
|
|
104
121
|
* concrete registry class.
|
|
122
|
+
*
|
|
123
|
+
* @category ui/mat-tabs
|
|
124
|
+
* @wcag AA
|
|
125
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/mat-tabs-registry.directive.ts
|
|
126
|
+
* @since 0.1.0
|
|
105
127
|
*/
|
|
106
128
|
declare const CNGX_MAT_TABS_REGISTRY_HOST: InjectionToken<CngxMatTabsRegistryHost>;
|
|
107
129
|
/**
|
|
108
130
|
* Sibling host-directive that owns the per-MatTab handle registry
|
|
109
|
-
* for `[cngxMatTabs]`.
|
|
110
|
-
*
|
|
111
|
-
*
|
|
131
|
+
* for `[cngxMatTabs]`. Keeps the parent under the level-4 organism
|
|
132
|
+
* LOC guard and lets per-tab decoration directives reach the
|
|
133
|
+
* registry through a typed token.
|
|
112
134
|
*
|
|
113
135
|
* Owns: `contentChildren(MatTab)` query, the `setupsByTab` map
|
|
114
136
|
* (per-tab cngx setup paired with a child `EnvironmentInjector`
|
|
@@ -118,8 +140,14 @@ declare const CNGX_MAT_TABS_REGISTRY_HOST: InjectionToken<CngxMatTabsRegistryHos
|
|
|
118
140
|
*
|
|
119
141
|
* Composition: `[cngxMatTabs]` declares this in `hostDirectives`;
|
|
120
142
|
* both share the parent's `CngxTabGroupPresenter` and the same
|
|
121
|
-
* `<mat-tab-group>` content-children scope.
|
|
122
|
-
*
|
|
143
|
+
* `<mat-tab-group>` content-children scope.
|
|
144
|
+
*
|
|
145
|
+
* @category ui/mat-tabs
|
|
146
|
+
* @docsKind primary
|
|
147
|
+
* @wcag AA
|
|
148
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/mat-tabs-registry.directive.ts
|
|
149
|
+
* @since 0.1.0
|
|
150
|
+
* @relatedTo CngxMatTabs, CngxMatTabError, CNGX_MAT_TABS_REGISTRY_HOST
|
|
123
151
|
*/
|
|
124
152
|
declare class CngxMatTabsRegistry implements CngxMatTabsRegistryHost {
|
|
125
153
|
private readonly presenter;
|
|
@@ -129,7 +157,7 @@ declare class CngxMatTabsRegistry implements CngxMatTabsRegistryHost {
|
|
|
129
157
|
private readonly matTabs;
|
|
130
158
|
private readonly setupsByTab;
|
|
131
159
|
constructor();
|
|
132
|
-
getHandleSetup(matTab: MatTab): Pick<CngxMatTabHandleSetup, 'errorAggregator'> | undefined;
|
|
160
|
+
getHandleSetup(matTab: MatTab): Pick<CngxMatTabHandleSetup, 'errorAggregator' | 'directError'> | undefined;
|
|
133
161
|
private syncHandles;
|
|
134
162
|
static ɵfac: i0.ɵɵFactoryDeclaration<CngxMatTabsRegistry, never>;
|
|
135
163
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxMatTabsRegistry, "[cngxMatTabsRegistry]", ["cngxMatTabsRegistry"], {}, {}, ["matTabs"], never, true, never>;
|
|
@@ -137,20 +165,29 @@ declare class CngxMatTabsRegistry implements CngxMatTabsRegistryHost {
|
|
|
137
165
|
|
|
138
166
|
/**
|
|
139
167
|
* Attaches to an existing `<mat-tab-group>` and wires it to a
|
|
140
|
-
* {@link CngxTabGroupPresenter}
|
|
168
|
+
* {@link CngxTabGroupPresenter} - consumers get the commit-action
|
|
141
169
|
* lifecycle, `CNGX_STATEFUL` (so `<cngx-toast-on />` and
|
|
142
170
|
* `<cngx-banner-on />` compose as children), and the tab-handle
|
|
143
171
|
* registry from one attribute.
|
|
144
172
|
*
|
|
145
173
|
* Topology inverts `<cngx-mat-stepper>`: Material is the host, cngx
|
|
146
174
|
* is the instrumentation layer. `inject(MatTabGroup, { self: true })`
|
|
147
|
-
* resolves on the consumer's own element
|
|
148
|
-
* blocker
|
|
175
|
+
* resolves on the consumer's own element - no content projection
|
|
176
|
+
* blocker applies here.
|
|
149
177
|
*
|
|
150
178
|
* Rejection (`--error`) and aggregator (`--has-errors`) visuals
|
|
151
179
|
* live in the package-private projector factories under
|
|
152
180
|
* `./decorations/`; this directive supplies their reactive triggers
|
|
153
181
|
* and the delegators consumer templates call.
|
|
182
|
+
*
|
|
183
|
+
* @playground Form error aggregation ./examples/form-errors/form-errors.component.ts
|
|
184
|
+
*
|
|
185
|
+
* @category ui/mat-tabs
|
|
186
|
+
* @docsKind primary
|
|
187
|
+
* @wcag AA
|
|
188
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/mat-tabs.directive.ts
|
|
189
|
+
* @since 0.1.0
|
|
190
|
+
* @relatedTo CngxMatTabsRegistry, CngxMatTabError, CngxMatStepper
|
|
154
191
|
*/
|
|
155
192
|
declare class CngxMatTabs {
|
|
156
193
|
private readonly matTabGroup;
|
|
@@ -173,12 +210,124 @@ declare class CngxMatTabs {
|
|
|
173
210
|
/**
|
|
174
211
|
* Clears `presenter.lastFailedIndex`, dismissing the rejection
|
|
175
212
|
* decoration. Mirrors `CngxTabGroup.clearLastFailed()` so a
|
|
176
|
-
* template ref (`#mt="cngxMatTabs"`) is enough
|
|
213
|
+
* template ref (`#mt="cngxMatTabs"`) is enough - no host-token
|
|
177
214
|
* injection needed.
|
|
178
215
|
*/
|
|
179
216
|
clearLastFailed(): void;
|
|
180
217
|
static ɵfac: i0.ɵɵFactoryDeclaration<CngxMatTabs, never>;
|
|
181
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxMatTabs, "[cngxMatTabs]", ["cngxMatTabs"], {}, {}, ["aggregatorContentSlot", "rejectionContentSlot"], never, true, [{ directive: typeof
|
|
218
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxMatTabs, "[cngxMatTabs]", ["cngxMatTabs"], {}, {}, ["aggregatorContentSlot", "rejectionContentSlot"], never, true, [{ directive: typeof i1.CngxTabGroupPresenter; inputs: { "activeIndex": "activeIndex"; "orientation": "orientation"; "loop": "loop"; "commitAction": "commitAction"; "commitMode": "commitMode"; }; outputs: { "activeIndexChange": "activeIndexChange"; }; }, { directive: typeof CngxMatTabsRegistry; inputs: {}; outputs: {}; }]>;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Layers the cngx error / rejection / announcement layer onto
|
|
223
|
+
* Material's native router tabs (`<nav mat-tab-nav-bar>` /
|
|
224
|
+
* `<a mat-tab-link>` / `<mat-tab-nav-panel>`). The parallel bridge to
|
|
225
|
+
* {@link CngxMatTabs}: `MatTabNav` has no `MatTab` and no
|
|
226
|
+
* `selectedIndex`, so handles register per `<a mat-tab-link>` via
|
|
227
|
+
* {@link CngxMatTabLink}, and the decoration projectors target
|
|
228
|
+
* `.mat-mdc-tab-link` instead of `.mat-mdc-tab`.
|
|
229
|
+
*
|
|
230
|
+
* Gating is **native**: each link is a `routerLink`, so the router runs
|
|
231
|
+
* `CanDeactivate` directly and this directive installs no
|
|
232
|
+
* commit-action. The active index follows the route - add
|
|
233
|
+
* `[cngxTabsRouteSync]` to the same `<nav>` and give each
|
|
234
|
+
* `[cngxMatTabLink]` an `id` matching its route segment; route-sync
|
|
235
|
+
* reflects `NavigationEnd` onto `activeIndex` (its commit-action stays
|
|
236
|
+
* dormant because link clicks navigate natively, never through
|
|
237
|
+
* `presenter.select`). Ableitung statt Verwaltung - the route-active
|
|
238
|
+
* link is the single source of the active index.
|
|
239
|
+
*
|
|
240
|
+
* Composes {@link CngxTabGroupPresenter} via `hostDirectives` so the
|
|
241
|
+
* `CNGX_STATEFUL` producer, the `lastFailedIndex` rejection slot, and
|
|
242
|
+
* the live-region announcer come for free, identical to the cngx
|
|
243
|
+
* organism (Pillar 2 - same communication across skins).
|
|
244
|
+
*
|
|
245
|
+
* Decoration content-template slots (`*cngxMatTabRejectionContent` /
|
|
246
|
+
* `*cngxMatTabAggregatorContent`) are not forwarded on this bridge yet -
|
|
247
|
+
* the projectors render their built-in `cngx-sr-only` spans. The slot
|
|
248
|
+
* inputs that `[cngxMatTabs]` exposes are a deferred follow-up.
|
|
249
|
+
*
|
|
250
|
+
* @category ui/mat-tabs
|
|
251
|
+
* @docsKind primary
|
|
252
|
+
* @wcag AA
|
|
253
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/mat-tab-nav.directive.ts
|
|
254
|
+
* @since 0.1.0
|
|
255
|
+
* @relatedTo CngxMatTabLink, CngxMatTabs, CngxTabsRouteSync
|
|
256
|
+
*/
|
|
257
|
+
declare class CngxMatTabNav {
|
|
258
|
+
private readonly presenter;
|
|
259
|
+
private readonly destroyRef;
|
|
260
|
+
private readonly injector;
|
|
261
|
+
private readonly renderer;
|
|
262
|
+
private readonly hostEl;
|
|
263
|
+
private readonly i18n;
|
|
264
|
+
private readonly failedHandleId;
|
|
265
|
+
private readonly rejectionState;
|
|
266
|
+
private readonly aggregatedErrorTabs;
|
|
267
|
+
constructor();
|
|
268
|
+
/**
|
|
269
|
+
* Clears `presenter.lastFailedIndex`, dismissing the rejection
|
|
270
|
+
* decoration. Mirrors {@link CngxMatTabs.clearLastFailed} so a
|
|
271
|
+
* template ref (`#nav="cngxMatTabNav"`) is enough.
|
|
272
|
+
*/
|
|
273
|
+
clearLastFailed(): void;
|
|
274
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CngxMatTabNav, never>;
|
|
275
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxMatTabNav, "[cngxMatTabNav]", ["cngxMatTabNav"], {}, {}, never, never, true, [{ directive: typeof i1.CngxTabGroupPresenter; inputs: {}; outputs: {}; }]>;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Registers an `<a mat-tab-link>` anchor as a {@link CngxTabHandle}
|
|
280
|
+
* with the enclosing {@link CngxMatTabNav} presenter. `mat-tab-nav-bar`
|
|
281
|
+
* has no `MatTab` to hang a handle on (the links are the tabs), so this
|
|
282
|
+
* per-link directive is the registration seam - symmetric with how
|
|
283
|
+
* `CngxTab` registers in the cngx-native path and how
|
|
284
|
+
* {@link CngxMatTabsRegistry} registers each `<mat-tab>`.
|
|
285
|
+
*
|
|
286
|
+
* Registration order follows DOM order (Angular instantiates content
|
|
287
|
+
* directives top-to-bottom), so the presenter's `tabs()` index aligns
|
|
288
|
+
* with `nav.querySelectorAll('.mat-mdc-tab-link')` - the index the
|
|
289
|
+
* decoration projectors correlate against.
|
|
290
|
+
*
|
|
291
|
+
* Gating is native: the link's `routerLink` runs `CanDeactivate`
|
|
292
|
+
* directly, so this directive installs no commit-action. The active
|
|
293
|
+
* index follows the route through `[cngxTabsRouteSync]` on the nav,
|
|
294
|
+
* which matches each handle's `id` (set to the route segment) against
|
|
295
|
+
* the URL.
|
|
296
|
+
*
|
|
297
|
+
* @category ui/mat-tabs
|
|
298
|
+
* @docsKind primary
|
|
299
|
+
* @wcag AA
|
|
300
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/mat-tab-link.directive.ts
|
|
301
|
+
* @since 0.1.0
|
|
302
|
+
* @relatedTo CngxMatTabNav, CngxMatTabs, CngxTab
|
|
303
|
+
*/
|
|
304
|
+
declare class CngxMatTabLink implements OnInit {
|
|
305
|
+
private readonly matLink;
|
|
306
|
+
private readonly host;
|
|
307
|
+
private readonly destroyRef;
|
|
308
|
+
/**
|
|
309
|
+
* Handle id. Set it to the link's route segment so the nav's
|
|
310
|
+
* `[cngxTabsRouteSync]` reflects the active route onto this tab via
|
|
311
|
+
* the default `(h) => [h.id]` mapping. Defaults to a fresh uid when
|
|
312
|
+
* route-sync is not used.
|
|
313
|
+
*/
|
|
314
|
+
readonly id: i0.InputSignal<string>;
|
|
315
|
+
/** Accessible label fed to the live-region announcer. */
|
|
316
|
+
readonly label: i0.InputSignal<string | undefined>;
|
|
317
|
+
/**
|
|
318
|
+
* Direct error flag for the link - `true` or a non-empty string marks
|
|
319
|
+
* it invalid (the string doubles as the message). Mirrors
|
|
320
|
+
* `CngxTab.error` and `[cngxMatTabErrorFlag]`.
|
|
321
|
+
*/
|
|
322
|
+
readonly error: i0.InputSignal<string | boolean>;
|
|
323
|
+
/** Optional rich error aggregator for the link. */
|
|
324
|
+
readonly errorAggregator: i0.InputSignal<CngxErrorAggregatorContract | undefined>;
|
|
325
|
+
private readonly errorMessage;
|
|
326
|
+
private readonly hasError;
|
|
327
|
+
private readonly disabledState;
|
|
328
|
+
ngOnInit(): void;
|
|
329
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CngxMatTabLink, never>;
|
|
330
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxMatTabLink, "[cngxMatTabLink]", ["cngxMatTabLink"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "errorAggregator": { "alias": "errorAggregator"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
182
331
|
}
|
|
183
332
|
|
|
184
333
|
/**
|
|
@@ -187,14 +336,14 @@ declare class CngxMatTabs {
|
|
|
187
336
|
* the matching Material tab button (badge + descriptor span) via
|
|
188
337
|
* the Renderer2 effect inside {@link CngxMatTabs}.
|
|
189
338
|
*
|
|
190
|
-
* Material owns `<mat-tab>` declarations
|
|
191
|
-
* here
|
|
339
|
+
* Material owns `<mat-tab>` declarations - `[cngxTab]` cannot host
|
|
340
|
+
* here - so a sibling attribute directive carries the input.
|
|
192
341
|
* Empty-string transform handles the bare-attribute case per
|
|
193
342
|
* `feedback_bridge_input_not_required` (a developer typing
|
|
194
343
|
* `cngxMatTabError` without `[]` brackets must not poison the
|
|
195
344
|
* slot).
|
|
196
345
|
*
|
|
197
|
-
* Locates its target via {@link CNGX_MAT_TABS_REGISTRY_HOST}
|
|
346
|
+
* Locates its target via {@link CNGX_MAT_TABS_REGISTRY_HOST} -
|
|
198
347
|
* the registry provides the token with `useExisting`, so sibling
|
|
199
348
|
* directives reach per-handle slots through a typed contract
|
|
200
349
|
* instead of the concrete class. Tracks `presenter.tabs()` to
|
|
@@ -202,6 +351,12 @@ declare class CngxMatTabs {
|
|
|
202
351
|
* before the registry's sync runs. `destroyRef.onDestroy` clears
|
|
203
352
|
* the slot so an `*ngIf`-toggled binding returns to the
|
|
204
353
|
* no-aggregator default.
|
|
354
|
+
*
|
|
355
|
+
* @category ui/mat-tabs
|
|
356
|
+
* @wcag AA
|
|
357
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/mat-tab-error.directive.ts
|
|
358
|
+
* @since 0.1.0
|
|
359
|
+
* @relatedTo CngxMatTabs, CngxMatTabsRegistry, CngxMatTabRejectionContent
|
|
205
360
|
*/
|
|
206
361
|
declare class CngxMatTabError {
|
|
207
362
|
private readonly matTab;
|
|
@@ -214,6 +369,42 @@ declare class CngxMatTabError {
|
|
|
214
369
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxMatTabError, "[cngxMatTabError]", ["cngxMatTabError"], { "aggregator": { "alias": "cngxMatTabError"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
215
370
|
}
|
|
216
371
|
|
|
372
|
+
/**
|
|
373
|
+
* Per-tab direct invalid flag for `[cngxMatTabs]` - the simple-case
|
|
374
|
+
* sibling to `[cngxMatTabError]`. Attach to a `<mat-tab>`; the bound
|
|
375
|
+
* `string | boolean` writes the per-handle `directError` slot, which
|
|
376
|
+
* folds into the handle's `hasError` / `errorMessage`. A non-empty
|
|
377
|
+
* string doubles as the SR descriptor message; `true` marks the tab
|
|
378
|
+
* invalid with no message; `false` / `''` clear it.
|
|
379
|
+
*
|
|
380
|
+
* Symmetric with `[cngxMatTabError]` (one directive, one
|
|
381
|
+
* responsibility - Pillar 3): the aggregator stays the rich
|
|
382
|
+
* multi-source path, this is the "this tab is invalid" marker that
|
|
383
|
+
* needs no aggregator boilerplate. A bare `cngxMatTabErrorFlag`
|
|
384
|
+
* attribute (no brackets) binds the empty string and is coerced to
|
|
385
|
+
* `true` so presence alone marks the tab invalid.
|
|
386
|
+
*
|
|
387
|
+
* Locates its target via {@link CNGX_MAT_TABS_REGISTRY_HOST}, tracks
|
|
388
|
+
* `presenter.tabs()` to recover from the content-init race, and
|
|
389
|
+
* clears the slot on destroy - exactly as {@link CngxMatTabError}.
|
|
390
|
+
*
|
|
391
|
+
* @category ui/mat-tabs
|
|
392
|
+
* @wcag AA
|
|
393
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/mat-tab-error-flag.directive.ts
|
|
394
|
+
* @since 0.1.0
|
|
395
|
+
* @relatedTo CngxMatTabs, CngxMatTabError, CngxMatTabsRegistry
|
|
396
|
+
*/
|
|
397
|
+
declare class CngxMatTabErrorFlag {
|
|
398
|
+
private readonly matTab;
|
|
399
|
+
private readonly registry;
|
|
400
|
+
private readonly presenter;
|
|
401
|
+
private readonly destroyRef;
|
|
402
|
+
readonly error: i0.InputSignalWithTransform<string | boolean, string | boolean>;
|
|
403
|
+
constructor();
|
|
404
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CngxMatTabErrorFlag, never>;
|
|
405
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CngxMatTabErrorFlag, "[cngxMatTabErrorFlag]", ["cngxMatTabErrorFlag"], { "error": { "alias": "cngxMatTabErrorFlag"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
406
|
+
}
|
|
407
|
+
|
|
217
408
|
/**
|
|
218
409
|
* Context passed to the `*cngxMatTabAggregatorContent` template.
|
|
219
410
|
* Drives the SR-descriptor content rendered inside the
|
|
@@ -221,7 +412,7 @@ declare class CngxMatTabError {
|
|
|
221
412
|
* appends to a Material tab button when its bound aggregator wants
|
|
222
413
|
* reveal. The surrounding span (with its `cngx-sr-only` class, its
|
|
223
414
|
* stable id, and the `aria-describedby` wiring on the button)
|
|
224
|
-
* stays library-owned
|
|
415
|
+
* stays library-owned - the slot only customises the descriptor
|
|
225
416
|
* text or markup so consumers can swap the announcement phrasing
|
|
226
417
|
* (counter pills, localised templates, branded prefixes) without
|
|
227
418
|
* fighting the AT contract.
|
|
@@ -231,9 +422,11 @@ declare class CngxMatTabError {
|
|
|
231
422
|
* label of the tab (the Material `MatTab.textLabel`);
|
|
232
423
|
* `announcement` is the resolved AT phrase (the same string the
|
|
233
424
|
* imperative `textContent` fallback would write). All three are
|
|
234
|
-
* snapshotted into the decorated entry
|
|
425
|
+
* snapshotted into the decorated entry - re-emissions of the
|
|
235
426
|
* underlying signals re-fire the projector's effect, which
|
|
236
427
|
* re-applies the decoration with the fresh context.
|
|
428
|
+
*
|
|
429
|
+
* @category ui/mat-tabs
|
|
237
430
|
*/
|
|
238
431
|
interface CngxMatTabAggregatorContentContext {
|
|
239
432
|
/** Aggregated error count for this tab (≥ 1 when shown). */
|
|
@@ -242,7 +435,7 @@ interface CngxMatTabAggregatorContentContext {
|
|
|
242
435
|
readonly label: string;
|
|
243
436
|
/**
|
|
244
437
|
* Resolved AT announcement phrase the imperative fallback path
|
|
245
|
-
* would write verbatim
|
|
438
|
+
* would write verbatim - the bound aggregator's `announcement()`
|
|
246
439
|
* value at the moment the decoration was applied. Use this when
|
|
247
440
|
* the consumer template wants to render the canonical phrase
|
|
248
441
|
* alongside its own decoration (counter pill, branded prefix)
|
|
@@ -257,18 +450,14 @@ interface CngxMatTabAggregatorContentContext {
|
|
|
257
450
|
* this template into the SR-only descriptor span instead of writing
|
|
258
451
|
* the aggregator's `announcement()` string verbatim.
|
|
259
452
|
*
|
|
260
|
-
* Pure marker
|
|
453
|
+
* Pure marker - zero logic. Holds only a typed
|
|
261
454
|
* {@link TemplateRef} reference. Mirrors the family-standard slot
|
|
262
455
|
* pattern (`CngxStepBadge`, `CngxTabErrorBadge`, `CngxTabOverflowItem`).
|
|
263
456
|
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
* consumer-visible decoration seam, so this slot directive lands
|
|
269
|
-
* with one consumer (the package-private aggregator-decoration
|
|
270
|
-
* projector). The shape is uniform with the rest of the family
|
|
271
|
-
* pattern; the staging is acknowledged debt.
|
|
457
|
+
* Material owns the tab-button chrome; the cngx descriptor span is
|
|
458
|
+
* the only consumer-visible decoration seam, so this slot directive
|
|
459
|
+
* lands with one in-package consumer (the package-private
|
|
460
|
+
* aggregator-decoration projector).
|
|
272
461
|
*
|
|
273
462
|
* ```html
|
|
274
463
|
* <mat-tab-group cngxMatTabs>
|
|
@@ -282,6 +471,12 @@ interface CngxMatTabAggregatorContentContext {
|
|
|
282
471
|
* <mat-tab label="Profile" cngxMatTabError="profile">…</mat-tab>
|
|
283
472
|
* </mat-tab-group>
|
|
284
473
|
* ```
|
|
474
|
+
*
|
|
475
|
+
* @category ui/mat-tabs
|
|
476
|
+
* @wcag AA
|
|
477
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/decorations/mat-tab-aggregator-content.directive.ts
|
|
478
|
+
* @since 0.1.0
|
|
479
|
+
* @relatedTo CngxMatTabs, CngxMatTabError, CngxMatTabRejectionContent
|
|
285
480
|
*/
|
|
286
481
|
declare class CngxMatTabAggregatorContent {
|
|
287
482
|
readonly templateRef: TemplateRef<CngxMatTabAggregatorContentContext>;
|
|
@@ -296,7 +491,7 @@ declare class CngxMatTabAggregatorContent {
|
|
|
296
491
|
* appends to a Material tab button when its bound `commitAction`
|
|
297
492
|
* rejects a tab change. The surrounding span (with its
|
|
298
493
|
* `cngx-sr-only` class, its stable id, and the `aria-describedby`
|
|
299
|
-
* wiring on the button) stays library-owned
|
|
494
|
+
* wiring on the button) stays library-owned - the slot only
|
|
300
495
|
* customises the descriptor text or markup so consumers can swap
|
|
301
496
|
* the rejection phrasing (branded prefixes, retry CTAs, localised
|
|
302
497
|
* templates) without fighting the AT contract.
|
|
@@ -305,7 +500,7 @@ declare class CngxMatTabAggregatorContent {
|
|
|
305
500
|
* same id the descriptor span uses as its `${id}-rejected` DOM id);
|
|
306
501
|
* `originLabel` is the label the rollback returned to (when the
|
|
307
502
|
* presenter exposes an `originIndexDuringCommit` and that index
|
|
308
|
-
* resolves to a handle with a non-empty label)
|
|
503
|
+
* resolves to a handle with a non-empty label) - `undefined` when
|
|
309
504
|
* no labelled rollback origin is resolvable; `fallbackText` is the
|
|
310
505
|
* built-in i18n phrase the imperative fallback path would write
|
|
311
506
|
* verbatim (typically `commitRolledBackTo(originLabel)` when the
|
|
@@ -313,7 +508,7 @@ declare class CngxMatTabAggregatorContent {
|
|
|
313
508
|
*
|
|
314
509
|
* **Re-instantiation warning.** The decoration projector destroys
|
|
315
510
|
* the embedded view and creates a fresh one on every `descriptorText`
|
|
316
|
-
* re-emission
|
|
511
|
+
* re-emission - typical when the rollback origin label resolves
|
|
317
512
|
* later than the failed-handle id (e.g. `presenter.tabs()` re-emits
|
|
318
513
|
* mid-rejection and the origin label flows in on the second tick).
|
|
319
514
|
* The slot template runs to the end of its lifecycle each time;
|
|
@@ -322,6 +517,8 @@ declare class CngxMatTabAggregatorContent {
|
|
|
322
517
|
* lift heavy state into a sibling `*ngTemplateOutlet`-friendly
|
|
323
518
|
* structure outside the slot. Cheap text + simple markup (the
|
|
324
519
|
* intended use) sees no observable difference.
|
|
520
|
+
*
|
|
521
|
+
* @category ui/mat-tabs
|
|
325
522
|
*/
|
|
326
523
|
interface CngxMatTabRejectionContentContext {
|
|
327
524
|
/** Stable id of the rejected `CngxTabHandle`. */
|
|
@@ -347,22 +544,15 @@ interface CngxMatTabRejectionContentContext {
|
|
|
347
544
|
* this template into the SR-only descriptor span instead of writing
|
|
348
545
|
* the resolved fallback string verbatim.
|
|
349
546
|
*
|
|
350
|
-
* Pure marker
|
|
547
|
+
* Pure marker - zero logic. Holds only a typed
|
|
351
548
|
* {@link TemplateRef} reference. Mirrors the family-standard slot
|
|
352
549
|
* pattern (`CngxMatTabAggregatorContent`, `CngxStepBadge`,
|
|
353
550
|
* `CngxTabErrorBadge`).
|
|
354
551
|
*
|
|
355
|
-
* Cascade resolution
|
|
356
|
-
* `architecture-summary.md` slot-cascade rule):
|
|
552
|
+
* Cascade resolution:
|
|
357
553
|
* 1. Per-instance `*cngxMatTabRejectionContent` template wins
|
|
358
554
|
* via `contentChild(CngxMatTabRejectionContent)`.
|
|
359
|
-
* 2.
|
|
360
|
-
* lands on main, the config-tier
|
|
361
|
-
* `CNGX_MAT_TABS_CONFIG.templates.rejection` slot fills the
|
|
362
|
-
* middle tier (planned follow-up — gated by Phase 2 merge;
|
|
363
|
-
* `tabs-accepted-debt §12` binds the staging with
|
|
364
|
-
* Re-Eval Triggers).
|
|
365
|
-
* 3. Library default — imperative `Renderer2.createElement('span')`
|
|
555
|
+
* 2. Library default - imperative `Renderer2.createElement('span')`
|
|
366
556
|
* with `textContent = fallbackText` (the resolved
|
|
367
557
|
* `commitRolledBackTo(originLabel)` / `commitFailedRetry`
|
|
368
558
|
* phrase from `injectTabsI18n()`).
|
|
@@ -384,6 +574,12 @@ interface CngxMatTabRejectionContentContext {
|
|
|
384
574
|
* <mat-tab label="Profile">…</mat-tab>
|
|
385
575
|
* </mat-tab-group>
|
|
386
576
|
* ```
|
|
577
|
+
*
|
|
578
|
+
* @category ui/mat-tabs
|
|
579
|
+
* @wcag AA
|
|
580
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/decorations/mat-tab-rejection-content.directive.ts
|
|
581
|
+
* @since 0.1.0
|
|
582
|
+
* @relatedTo CngxMatTabs, CngxMatTabAggregatorContent, CngxMatTabError
|
|
387
583
|
*/
|
|
388
584
|
declare class CngxMatTabRejectionContent {
|
|
389
585
|
readonly templateRef: TemplateRef<CngxMatTabRejectionContentContext>;
|
|
@@ -406,12 +602,14 @@ declare class CngxMatTabRejectionContent {
|
|
|
406
602
|
* fail-fast). The library default is a dev-mode `console.warn`; the
|
|
407
603
|
* exported {@link CNGX_DEFAULT_HALF_WIRED_SLOT_SINK} value lets test
|
|
408
604
|
* doubles compose against a stable reference.
|
|
605
|
+
*
|
|
606
|
+
* @category ui/mat-tabs
|
|
409
607
|
*/
|
|
410
608
|
type CngxMatTabHalfWiredSlotSink = (missing: 'contentTemplate' | 'viewContainerRef') => void;
|
|
411
609
|
|
|
412
610
|
/**
|
|
413
611
|
* Behaviour knobs for `[cngxMatTabs]`. Single canonical surface
|
|
414
|
-
* symmetric to `provideSelectConfig` in the select family
|
|
612
|
+
* symmetric to `provideSelectConfig` in the select family - every
|
|
415
613
|
* tunable is a `with*` feature on the same aggregator instead of
|
|
416
614
|
* a standalone DI token, so consumers configure the directive
|
|
417
615
|
* through one entry point and the API surface stays small.
|
|
@@ -420,6 +618,8 @@ type CngxMatTabHalfWiredSlotSink = (missing: 'contentTemplate' | 'viewContainerR
|
|
|
420
618
|
* (component scope), which wins over `provideMatTabsConfig(...)`
|
|
421
619
|
* (root), which wins over the library defaults captured by
|
|
422
620
|
* {@link CNGX_MAT_TABS_CONFIG_DEFAULTS}.
|
|
621
|
+
*
|
|
622
|
+
* @category ui/mat-tabs
|
|
423
623
|
*/
|
|
424
624
|
interface CngxMatTabsConfig {
|
|
425
625
|
/**
|
|
@@ -430,19 +630,17 @@ interface CngxMatTabsConfig {
|
|
|
430
630
|
* gated behind a never-true `*ngIf` / `@defer`) does not re-arm
|
|
431
631
|
* forever.
|
|
432
632
|
*
|
|
433
|
-
* Default: `5`
|
|
633
|
+
* Default: `5` - well above normal Material render lag (a single
|
|
434
634
|
* `afterNextRender` is enough on every supported version), low
|
|
435
635
|
* enough to surface a dev-mode `console.warn` promptly when the
|
|
436
636
|
* consumer DOM never appears.
|
|
437
637
|
*
|
|
438
638
|
* Note: `<cngx-tab-overflow>`'s own attach loop uses `60` rAF
|
|
439
|
-
* frames, not `5`
|
|
639
|
+
* frames, not `5` - different scheduler, different budget. The
|
|
440
640
|
* two caps are intentionally independent because the underlying
|
|
441
641
|
* timing primitives differ; a shared "anchor max attempts" knob
|
|
442
642
|
* would conflate one frame of `afterNextRender` with one rAF
|
|
443
|
-
* frame, which they are not.
|
|
444
|
-
* `tabs-accepted-debt §11`; consumers needing cngx-native rAF
|
|
445
|
-
* tuning should re-evaluate that entry.
|
|
643
|
+
* frame, which they are not.
|
|
446
644
|
*/
|
|
447
645
|
readonly anchorMaxAttempts?: number;
|
|
448
646
|
/**
|
|
@@ -460,6 +658,10 @@ interface CngxMatTabsConfig {
|
|
|
460
658
|
* {@link provideMatTabsConfigAt} (component scope). Read via
|
|
461
659
|
* {@link injectMatTabsConfig}, which merges with the library
|
|
462
660
|
* defaults so callers never see `undefined`.
|
|
661
|
+
*
|
|
662
|
+
* @category ui/mat-tabs
|
|
663
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/mat-tabs-config.ts
|
|
664
|
+
* @since 0.1.0
|
|
463
665
|
*/
|
|
464
666
|
declare const CNGX_MAT_TABS_CONFIG: InjectionToken<CngxMatTabsConfig>;
|
|
465
667
|
/**
|
|
@@ -467,8 +669,10 @@ declare const CNGX_MAT_TABS_CONFIG: InjectionToken<CngxMatTabsConfig>;
|
|
|
467
669
|
* by {@link provideMatTabsConfig} / {@link provideMatTabsConfigAt}.
|
|
468
670
|
* The optional `_target` discriminator is reserved for a future
|
|
469
671
|
* cross-family aggregator (`provideCngxMatTabs`) that dispatches
|
|
470
|
-
* features to the right provider
|
|
672
|
+
* features to the right provider - analogous to `_target: 'select'`
|
|
471
673
|
* in the select family.
|
|
674
|
+
*
|
|
675
|
+
* @category ui/mat-tabs
|
|
472
676
|
*/
|
|
473
677
|
interface CngxMatTabsConfigFeature {
|
|
474
678
|
readonly config: Partial<CngxMatTabsConfig>;
|
|
@@ -478,11 +682,15 @@ interface CngxMatTabsConfigFeature {
|
|
|
478
682
|
/**
|
|
479
683
|
* Cap on the `[cngxMatTabs]` overflow-anchor retry loop.
|
|
480
684
|
* See {@link CngxMatTabsConfig.anchorMaxAttempts} for default + rationale.
|
|
685
|
+
*
|
|
686
|
+
* @category ui/mat-tabs
|
|
481
687
|
*/
|
|
482
688
|
declare function withAnchorRetryAttempts(n: number): CngxMatTabsConfigFeature;
|
|
483
689
|
/**
|
|
484
690
|
* Override the half-wired-slot diagnostic sink.
|
|
485
691
|
* See {@link CngxMatTabsConfig.halfWiredSlotSink}.
|
|
692
|
+
*
|
|
693
|
+
* @category ui/mat-tabs
|
|
486
694
|
*/
|
|
487
695
|
declare function withHalfWiredSlotSink(sink: CngxMatTabHalfWiredSlotSink): CngxMatTabsConfigFeature;
|
|
488
696
|
/**
|
|
@@ -500,6 +708,8 @@ declare function withHalfWiredSlotSink(sink: CngxMatTabHalfWiredSlotSink): CngxM
|
|
|
500
708
|
* ],
|
|
501
709
|
* });
|
|
502
710
|
* ```
|
|
711
|
+
*
|
|
712
|
+
* @category ui/mat-tabs
|
|
503
713
|
*/
|
|
504
714
|
declare function provideMatTabsConfig(...features: CngxMatTabsConfigFeature[]): EnvironmentProviders;
|
|
505
715
|
/**
|
|
@@ -517,6 +727,8 @@ declare function provideMatTabsConfig(...features: CngxMatTabsConfigFeature[]):
|
|
|
517
727
|
* ...
|
|
518
728
|
* })
|
|
519
729
|
* ```
|
|
730
|
+
*
|
|
731
|
+
* @category ui/mat-tabs
|
|
520
732
|
*/
|
|
521
733
|
declare function provideMatTabsConfigAt(...features: CngxMatTabsConfigFeature[]): Provider[];
|
|
522
734
|
/**
|
|
@@ -528,6 +740,8 @@ declare function provideMatTabsConfigAt(...features: CngxMatTabsConfigFeature[])
|
|
|
528
740
|
* 1. `CNGX_MAT_TABS_CONFIG` value (set via
|
|
529
741
|
* {@link provideMatTabsConfig} / {@link provideMatTabsConfigAt}).
|
|
530
742
|
* 2. {@link CNGX_MAT_TABS_CONFIG_DEFAULTS} (library default).
|
|
743
|
+
*
|
|
744
|
+
* @category ui/mat-tabs
|
|
531
745
|
*/
|
|
532
746
|
declare function injectMatTabsConfig(): Required<CngxMatTabsConfig>;
|
|
533
747
|
|
|
@@ -541,21 +755,10 @@ declare function injectMatTabsConfig(): Required<CngxMatTabsConfig>;
|
|
|
541
755
|
* Every leading-underscore field cngx reaches into and every
|
|
542
756
|
* Material-internal CSS selector cngx queries against has its
|
|
543
757
|
* declaration here. A Material-version upgrade audit only needs to
|
|
544
|
-
* grep this file
|
|
545
|
-
*
|
|
546
|
-
*
|
|
547
|
-
*
|
|
548
|
-
*
|
|
549
|
-
* Tracked-debt cross-links:
|
|
550
|
-
* - tabs-accepted-debt §5 — `MatTab._stateChanges` plus the three
|
|
551
|
-
* `.mat-mdc-tab*` selectors used by `[cngxMatTabs]` and the
|
|
552
|
-
* Material-twin overflow adapter. The closing paragraph of §5
|
|
553
|
-
* explicitly names this namespace as the family-shared
|
|
554
|
-
* upgrade-watch surface.
|
|
555
|
-
* - stepper-accepted-debt §4 — `MatStepper._iconOverrides` reach
|
|
556
|
-
* from `<cngx-mat-stepper>`.
|
|
557
|
-
* - stepper-accepted-debt §1, handle.ts JSDoc — `CdkStep._completedOverride`
|
|
558
|
-
* read from `createMatStepHandle`'s `state` computed.
|
|
758
|
+
* grep this file. The grep value is the consumer-facing benefit, so
|
|
759
|
+
* this namespace is part of the published surface of
|
|
760
|
+
* `@cngx/ui/mat-tabs` (re-exported from the package barrel) rather
|
|
761
|
+
* than a private implementation detail.
|
|
559
762
|
*
|
|
560
763
|
* The grouping uses a TypeScript `namespace` so a single
|
|
561
764
|
* `MaterialPrivateSurfaces.<member>` access path covers both the
|
|
@@ -564,6 +767,8 @@ declare function injectMatTabsConfig(): Required<CngxMatTabsConfig>;
|
|
|
564
767
|
* grouped name through ESLint's `@typescript-eslint` type resolver
|
|
565
768
|
* — a flat `export * as` re-export from `public-api.ts` does not
|
|
566
769
|
* resolve nested members through the path-alias.
|
|
770
|
+
*
|
|
771
|
+
* @category ui/mat-tabs
|
|
567
772
|
*/
|
|
568
773
|
|
|
569
774
|
declare namespace MaterialPrivateSurfaces {
|
|
@@ -642,7 +847,7 @@ declare namespace MaterialPrivateSurfaces {
|
|
|
642
847
|
* `resolveStripRoot` walks from host up to `<mat-tab-header>` and
|
|
643
848
|
* locates `.mat-mdc-tab-label-container` via any rendered
|
|
644
849
|
* `.mat-mdc-tab` descendant — Material's IO-friendly scroll
|
|
645
|
-
* container
|
|
850
|
+
* container.
|
|
646
851
|
*
|
|
647
852
|
* `resolveTabButton` indexes positionally; Material owns the DOM
|
|
648
853
|
* and cngx handle ids never reach the button elements. Index
|
|
@@ -657,8 +862,10 @@ declare namespace MaterialPrivateSurfaces {
|
|
|
657
862
|
* useValue: createCngxMatTabOverflowDomAdapter }
|
|
658
863
|
* ]
|
|
659
864
|
* ```
|
|
865
|
+
*
|
|
866
|
+
* @category ui/mat-tabs
|
|
660
867
|
*/
|
|
661
868
|
declare function createCngxMatTabOverflowDomAdapter(): CngxTabOverflowDomAdapter;
|
|
662
869
|
|
|
663
|
-
export { CNGX_MAT_TABS_CONFIG, CNGX_MAT_TABS_REGISTRY_HOST, CNGX_MAT_TAB_HANDLE_FACTORY, CngxMatTabAggregatorContent, CngxMatTabError, CngxMatTabRejectionContent, CngxMatTabs, CngxMatTabsRegistry, MaterialPrivateSurfaces, createCngxMatTabOverflowDomAdapter, createMatTabHandle, injectMatTabsConfig, provideMatTabsConfig, provideMatTabsConfigAt, withAnchorRetryAttempts, withHalfWiredSlotSink };
|
|
870
|
+
export { CNGX_MAT_TABS_CONFIG, CNGX_MAT_TABS_REGISTRY_HOST, CNGX_MAT_TAB_HANDLE_FACTORY, CngxMatTabAggregatorContent, CngxMatTabError, CngxMatTabErrorFlag, CngxMatTabLink, CngxMatTabNav, CngxMatTabRejectionContent, CngxMatTabs, CngxMatTabsRegistry, MaterialPrivateSurfaces, createCngxMatTabOverflowDomAdapter, createMatTabHandle, injectMatTabsConfig, provideMatTabsConfig, provideMatTabsConfigAt, withAnchorRetryAttempts, withHalfWiredSlotSink };
|
|
664
871
|
export type { CngxMatTabAggregatorContentContext, CngxMatTabHalfWiredSlotSink, CngxMatTabHandleFactory, CngxMatTabRejectionContentContext, CngxMatTabsConfig, CngxMatTabsConfigFeature, CngxMatTabsRegistryHost };
|