@cngx/ui 0.0.1-rc.0 → 0.1.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +79 -104
- package/fesm2022/cngx-ui-mat-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-tabs.mjs +111 -83
- 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 +484 -161
- package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-tabs.mjs +75 -39
- 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 +7 -10
- package/mat-tabs/README.md +13 -13
- package/mat-tabs/styles/mat-tabs.css +339 -213
- package/material/README.md +19 -19
- package/overlay/README.md +11 -11
- package/package.json +5 -4
- package/sidenav/README.md +4 -19
- package/skeleton/README.md +3 -17
- package/speak/README.md +15 -15
- package/stepper/README.md +139 -5
- package/tabs/README.md +4 -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 +58 -43
- package/types/cngx-ui-mat-tabs.d.ts +122 -72
- 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 +280 -56
- package/types/cngx-ui-tabs.d.ts +38 -10
- package/types/cngx-ui.d.ts +1 -0
- package/speak/speak-button-theme.scss +0 -78
|
@@ -27,23 +27,27 @@ interface CngxMatTabHandleSetup {
|
|
|
27
27
|
* plus a writable `errorAggregator` slot the `[cngxMatTabError]`
|
|
28
28
|
* directive binds.
|
|
29
29
|
*
|
|
30
|
-
* - `id`
|
|
30
|
+
* - `id` - fresh `idSeed()` value; a label-keyed id would collide
|
|
31
31
|
* when two tabs share a label.
|
|
32
|
-
* - `label` / `disabled`
|
|
32
|
+
* - `label` / `disabled` - `computed` signals retriggered by
|
|
33
33
|
* `toSignal(matTab._stateChanges)`. Bridge lifetime is tied to
|
|
34
34
|
* the supplied `injector` (typically a per-tab child
|
|
35
35
|
* `EnvironmentInjector`). `_stateChanges` is a Material-internal
|
|
36
|
-
* surface
|
|
37
|
-
* - `errorAggregator`
|
|
36
|
+
* surface.
|
|
37
|
+
* - `errorAggregator` - writable seeded at `undefined`;
|
|
38
38
|
* `[cngxMatTabError]` writes its bound aggregator in and resets
|
|
39
39
|
* on teardown. The handle exposes `.asReadonly()` to preserve the
|
|
40
40
|
* `CngxTabHandle` contract.
|
|
41
|
+
*
|
|
42
|
+
* @category ui/mat-tabs
|
|
41
43
|
*/
|
|
42
44
|
declare function createMatTabHandle(matTab: MatTab, idSeed: () => string, injector: Injector): CngxMatTabHandleSetup;
|
|
43
45
|
/**
|
|
44
46
|
* Factory signature for {@link createMatTabHandle}. The DI token
|
|
45
47
|
* {@link CNGX_MAT_TAB_HANDLE_FACTORY} resolves to a function with
|
|
46
|
-
* this exact shape
|
|
48
|
+
* this exact shape - overrides match it identically.
|
|
49
|
+
*
|
|
50
|
+
* @category ui/mat-tabs
|
|
47
51
|
*/
|
|
48
52
|
type CngxMatTabHandleFactory = typeof createMatTabHandle;
|
|
49
53
|
/**
|
|
@@ -54,11 +58,8 @@ type CngxMatTabHandleFactory = typeof createMatTabHandle;
|
|
|
54
58
|
*
|
|
55
59
|
* The seam separates handle shape (factory body) from id keying
|
|
56
60
|
* (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`.
|
|
61
|
+
* replace `idSeed` - server-synced ids, deterministic test ids,
|
|
62
|
+
* consumer-domain ids - without touching the factory body.
|
|
62
63
|
*
|
|
63
64
|
* ```ts
|
|
64
65
|
* providers: [
|
|
@@ -72,6 +73,11 @@ type CngxMatTabHandleFactory = typeof createMatTabHandle;
|
|
|
72
73
|
* },
|
|
73
74
|
* ]
|
|
74
75
|
* ```
|
|
76
|
+
*
|
|
77
|
+
* @category ui/mat-tabs
|
|
78
|
+
* @wcag AA
|
|
79
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/material-bridge/handle.ts
|
|
80
|
+
* @since 0.1.0
|
|
75
81
|
*/
|
|
76
82
|
declare const CNGX_MAT_TAB_HANDLE_FACTORY: InjectionToken<typeof createMatTabHandle>;
|
|
77
83
|
|
|
@@ -79,12 +85,14 @@ declare const CNGX_MAT_TAB_HANDLE_FACTORY: InjectionToken<typeof createMatTabHan
|
|
|
79
85
|
* Read-mostly contract for the per-tab handle-setup registry.
|
|
80
86
|
* `[cngxMatTabError]` and any future `[cngxMatTab*]` decoration
|
|
81
87
|
* directive injects this with `{ host: true }` to reach the
|
|
82
|
-
* per-handle `errorAggregator` slot
|
|
83
|
-
*
|
|
88
|
+
* per-handle `errorAggregator` slot without walking the concrete
|
|
89
|
+
* registry class.
|
|
84
90
|
*
|
|
85
91
|
* Return type narrows to `Pick<..., 'errorAggregator'>` so the
|
|
86
92
|
* access path exposes only the per-handle aggregator slot; the
|
|
87
93
|
* rest of the setup stays internal bookkeeping.
|
|
94
|
+
*
|
|
95
|
+
* @category ui/mat-tabs
|
|
88
96
|
*/
|
|
89
97
|
interface CngxMatTabsRegistryHost {
|
|
90
98
|
/**
|
|
@@ -102,13 +110,18 @@ interface CngxMatTabsRegistryHost {
|
|
|
102
110
|
* `useExisting`. Sibling per-tab directives inject this with
|
|
103
111
|
* `{ host: true }` to reach per-handle slots without walking the
|
|
104
112
|
* concrete registry class.
|
|
113
|
+
*
|
|
114
|
+
* @category ui/mat-tabs
|
|
115
|
+
* @wcag AA
|
|
116
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/mat-tabs-registry.directive.ts
|
|
117
|
+
* @since 0.1.0
|
|
105
118
|
*/
|
|
106
119
|
declare const CNGX_MAT_TABS_REGISTRY_HOST: InjectionToken<CngxMatTabsRegistryHost>;
|
|
107
120
|
/**
|
|
108
121
|
* Sibling host-directive that owns the per-MatTab handle registry
|
|
109
|
-
* for `[cngxMatTabs]`.
|
|
110
|
-
*
|
|
111
|
-
*
|
|
122
|
+
* for `[cngxMatTabs]`. Keeps the parent under the level-4 organism
|
|
123
|
+
* LOC guard and lets per-tab decoration directives reach the
|
|
124
|
+
* registry through a typed token.
|
|
112
125
|
*
|
|
113
126
|
* Owns: `contentChildren(MatTab)` query, the `setupsByTab` map
|
|
114
127
|
* (per-tab cngx setup paired with a child `EnvironmentInjector`
|
|
@@ -118,8 +131,14 @@ declare const CNGX_MAT_TABS_REGISTRY_HOST: InjectionToken<CngxMatTabsRegistryHos
|
|
|
118
131
|
*
|
|
119
132
|
* Composition: `[cngxMatTabs]` declares this in `hostDirectives`;
|
|
120
133
|
* both share the parent's `CngxTabGroupPresenter` and the same
|
|
121
|
-
* `<mat-tab-group>` content-children scope.
|
|
122
|
-
*
|
|
134
|
+
* `<mat-tab-group>` content-children scope.
|
|
135
|
+
*
|
|
136
|
+
* @category ui/mat-tabs
|
|
137
|
+
* @docsKind primary
|
|
138
|
+
* @wcag AA
|
|
139
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/mat-tabs-registry.directive.ts
|
|
140
|
+
* @since 0.1.0
|
|
141
|
+
* @relatedTo CngxMatTabs, CngxMatTabError, CNGX_MAT_TABS_REGISTRY_HOST
|
|
123
142
|
*/
|
|
124
143
|
declare class CngxMatTabsRegistry implements CngxMatTabsRegistryHost {
|
|
125
144
|
private readonly presenter;
|
|
@@ -137,20 +156,29 @@ declare class CngxMatTabsRegistry implements CngxMatTabsRegistryHost {
|
|
|
137
156
|
|
|
138
157
|
/**
|
|
139
158
|
* Attaches to an existing `<mat-tab-group>` and wires it to a
|
|
140
|
-
* {@link CngxTabGroupPresenter}
|
|
159
|
+
* {@link CngxTabGroupPresenter} - consumers get the commit-action
|
|
141
160
|
* lifecycle, `CNGX_STATEFUL` (so `<cngx-toast-on />` and
|
|
142
161
|
* `<cngx-banner-on />` compose as children), and the tab-handle
|
|
143
162
|
* registry from one attribute.
|
|
144
163
|
*
|
|
145
164
|
* Topology inverts `<cngx-mat-stepper>`: Material is the host, cngx
|
|
146
165
|
* is the instrumentation layer. `inject(MatTabGroup, { self: true })`
|
|
147
|
-
* resolves on the consumer's own element
|
|
148
|
-
* blocker
|
|
166
|
+
* resolves on the consumer's own element - no content projection
|
|
167
|
+
* blocker applies here.
|
|
149
168
|
*
|
|
150
169
|
* Rejection (`--error`) and aggregator (`--has-errors`) visuals
|
|
151
170
|
* live in the package-private projector factories under
|
|
152
171
|
* `./decorations/`; this directive supplies their reactive triggers
|
|
153
172
|
* and the delegators consumer templates call.
|
|
173
|
+
*
|
|
174
|
+
* @playground Form error aggregation ./examples/form-errors/form-errors.component.ts
|
|
175
|
+
*
|
|
176
|
+
* @category ui/mat-tabs
|
|
177
|
+
* @docsKind primary
|
|
178
|
+
* @wcag AA
|
|
179
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/mat-tabs.directive.ts
|
|
180
|
+
* @since 0.1.0
|
|
181
|
+
* @relatedTo CngxMatTabsRegistry, CngxMatTabError, CngxMatStepperBridge
|
|
154
182
|
*/
|
|
155
183
|
declare class CngxMatTabs {
|
|
156
184
|
private readonly matTabGroup;
|
|
@@ -173,7 +201,7 @@ declare class CngxMatTabs {
|
|
|
173
201
|
/**
|
|
174
202
|
* Clears `presenter.lastFailedIndex`, dismissing the rejection
|
|
175
203
|
* decoration. Mirrors `CngxTabGroup.clearLastFailed()` so a
|
|
176
|
-
* template ref (`#mt="cngxMatTabs"`) is enough
|
|
204
|
+
* template ref (`#mt="cngxMatTabs"`) is enough - no host-token
|
|
177
205
|
* injection needed.
|
|
178
206
|
*/
|
|
179
207
|
clearLastFailed(): void;
|
|
@@ -187,14 +215,14 @@ declare class CngxMatTabs {
|
|
|
187
215
|
* the matching Material tab button (badge + descriptor span) via
|
|
188
216
|
* the Renderer2 effect inside {@link CngxMatTabs}.
|
|
189
217
|
*
|
|
190
|
-
* Material owns `<mat-tab>` declarations
|
|
191
|
-
* here
|
|
218
|
+
* Material owns `<mat-tab>` declarations - `[cngxTab]` cannot host
|
|
219
|
+
* here - so a sibling attribute directive carries the input.
|
|
192
220
|
* Empty-string transform handles the bare-attribute case per
|
|
193
221
|
* `feedback_bridge_input_not_required` (a developer typing
|
|
194
222
|
* `cngxMatTabError` without `[]` brackets must not poison the
|
|
195
223
|
* slot).
|
|
196
224
|
*
|
|
197
|
-
* Locates its target via {@link CNGX_MAT_TABS_REGISTRY_HOST}
|
|
225
|
+
* Locates its target via {@link CNGX_MAT_TABS_REGISTRY_HOST} -
|
|
198
226
|
* the registry provides the token with `useExisting`, so sibling
|
|
199
227
|
* directives reach per-handle slots through a typed contract
|
|
200
228
|
* instead of the concrete class. Tracks `presenter.tabs()` to
|
|
@@ -202,6 +230,12 @@ declare class CngxMatTabs {
|
|
|
202
230
|
* before the registry's sync runs. `destroyRef.onDestroy` clears
|
|
203
231
|
* the slot so an `*ngIf`-toggled binding returns to the
|
|
204
232
|
* no-aggregator default.
|
|
233
|
+
*
|
|
234
|
+
* @category ui/mat-tabs
|
|
235
|
+
* @wcag AA
|
|
236
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/mat-tab-error.directive.ts
|
|
237
|
+
* @since 0.1.0
|
|
238
|
+
* @relatedTo CngxMatTabs, CngxMatTabsRegistry, CngxMatTabRejectionContent
|
|
205
239
|
*/
|
|
206
240
|
declare class CngxMatTabError {
|
|
207
241
|
private readonly matTab;
|
|
@@ -221,7 +255,7 @@ declare class CngxMatTabError {
|
|
|
221
255
|
* appends to a Material tab button when its bound aggregator wants
|
|
222
256
|
* reveal. The surrounding span (with its `cngx-sr-only` class, its
|
|
223
257
|
* stable id, and the `aria-describedby` wiring on the button)
|
|
224
|
-
* stays library-owned
|
|
258
|
+
* stays library-owned - the slot only customises the descriptor
|
|
225
259
|
* text or markup so consumers can swap the announcement phrasing
|
|
226
260
|
* (counter pills, localised templates, branded prefixes) without
|
|
227
261
|
* fighting the AT contract.
|
|
@@ -231,9 +265,11 @@ declare class CngxMatTabError {
|
|
|
231
265
|
* label of the tab (the Material `MatTab.textLabel`);
|
|
232
266
|
* `announcement` is the resolved AT phrase (the same string the
|
|
233
267
|
* imperative `textContent` fallback would write). All three are
|
|
234
|
-
* snapshotted into the decorated entry
|
|
268
|
+
* snapshotted into the decorated entry - re-emissions of the
|
|
235
269
|
* underlying signals re-fire the projector's effect, which
|
|
236
270
|
* re-applies the decoration with the fresh context.
|
|
271
|
+
*
|
|
272
|
+
* @category ui/mat-tabs
|
|
237
273
|
*/
|
|
238
274
|
interface CngxMatTabAggregatorContentContext {
|
|
239
275
|
/** Aggregated error count for this tab (≥ 1 when shown). */
|
|
@@ -242,7 +278,7 @@ interface CngxMatTabAggregatorContentContext {
|
|
|
242
278
|
readonly label: string;
|
|
243
279
|
/**
|
|
244
280
|
* Resolved AT announcement phrase the imperative fallback path
|
|
245
|
-
* would write verbatim
|
|
281
|
+
* would write verbatim - the bound aggregator's `announcement()`
|
|
246
282
|
* value at the moment the decoration was applied. Use this when
|
|
247
283
|
* the consumer template wants to render the canonical phrase
|
|
248
284
|
* alongside its own decoration (counter pill, branded prefix)
|
|
@@ -257,18 +293,14 @@ interface CngxMatTabAggregatorContentContext {
|
|
|
257
293
|
* this template into the SR-only descriptor span instead of writing
|
|
258
294
|
* the aggregator's `announcement()` string verbatim.
|
|
259
295
|
*
|
|
260
|
-
* Pure marker
|
|
296
|
+
* Pure marker - zero logic. Holds only a typed
|
|
261
297
|
* {@link TemplateRef} reference. Mirrors the family-standard slot
|
|
262
298
|
* pattern (`CngxStepBadge`, `CngxTabErrorBadge`, `CngxTabOverflowItem`).
|
|
263
299
|
*
|
|
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.
|
|
300
|
+
* Material owns the tab-button chrome; the cngx descriptor span is
|
|
301
|
+
* the only consumer-visible decoration seam, so this slot directive
|
|
302
|
+
* lands with one in-package consumer (the package-private
|
|
303
|
+
* aggregator-decoration projector).
|
|
272
304
|
*
|
|
273
305
|
* ```html
|
|
274
306
|
* <mat-tab-group cngxMatTabs>
|
|
@@ -282,6 +314,12 @@ interface CngxMatTabAggregatorContentContext {
|
|
|
282
314
|
* <mat-tab label="Profile" cngxMatTabError="profile">…</mat-tab>
|
|
283
315
|
* </mat-tab-group>
|
|
284
316
|
* ```
|
|
317
|
+
*
|
|
318
|
+
* @category ui/mat-tabs
|
|
319
|
+
* @wcag AA
|
|
320
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/decorations/mat-tab-aggregator-content.directive.ts
|
|
321
|
+
* @since 0.1.0
|
|
322
|
+
* @relatedTo CngxMatTabs, CngxMatTabError, CngxMatTabRejectionContent
|
|
285
323
|
*/
|
|
286
324
|
declare class CngxMatTabAggregatorContent {
|
|
287
325
|
readonly templateRef: TemplateRef<CngxMatTabAggregatorContentContext>;
|
|
@@ -296,7 +334,7 @@ declare class CngxMatTabAggregatorContent {
|
|
|
296
334
|
* appends to a Material tab button when its bound `commitAction`
|
|
297
335
|
* rejects a tab change. The surrounding span (with its
|
|
298
336
|
* `cngx-sr-only` class, its stable id, and the `aria-describedby`
|
|
299
|
-
* wiring on the button) stays library-owned
|
|
337
|
+
* wiring on the button) stays library-owned - the slot only
|
|
300
338
|
* customises the descriptor text or markup so consumers can swap
|
|
301
339
|
* the rejection phrasing (branded prefixes, retry CTAs, localised
|
|
302
340
|
* templates) without fighting the AT contract.
|
|
@@ -305,7 +343,7 @@ declare class CngxMatTabAggregatorContent {
|
|
|
305
343
|
* same id the descriptor span uses as its `${id}-rejected` DOM id);
|
|
306
344
|
* `originLabel` is the label the rollback returned to (when the
|
|
307
345
|
* presenter exposes an `originIndexDuringCommit` and that index
|
|
308
|
-
* resolves to a handle with a non-empty label)
|
|
346
|
+
* resolves to a handle with a non-empty label) - `undefined` when
|
|
309
347
|
* no labelled rollback origin is resolvable; `fallbackText` is the
|
|
310
348
|
* built-in i18n phrase the imperative fallback path would write
|
|
311
349
|
* verbatim (typically `commitRolledBackTo(originLabel)` when the
|
|
@@ -313,7 +351,7 @@ declare class CngxMatTabAggregatorContent {
|
|
|
313
351
|
*
|
|
314
352
|
* **Re-instantiation warning.** The decoration projector destroys
|
|
315
353
|
* the embedded view and creates a fresh one on every `descriptorText`
|
|
316
|
-
* re-emission
|
|
354
|
+
* re-emission - typical when the rollback origin label resolves
|
|
317
355
|
* later than the failed-handle id (e.g. `presenter.tabs()` re-emits
|
|
318
356
|
* mid-rejection and the origin label flows in on the second tick).
|
|
319
357
|
* The slot template runs to the end of its lifecycle each time;
|
|
@@ -322,6 +360,8 @@ declare class CngxMatTabAggregatorContent {
|
|
|
322
360
|
* lift heavy state into a sibling `*ngTemplateOutlet`-friendly
|
|
323
361
|
* structure outside the slot. Cheap text + simple markup (the
|
|
324
362
|
* intended use) sees no observable difference.
|
|
363
|
+
*
|
|
364
|
+
* @category ui/mat-tabs
|
|
325
365
|
*/
|
|
326
366
|
interface CngxMatTabRejectionContentContext {
|
|
327
367
|
/** Stable id of the rejected `CngxTabHandle`. */
|
|
@@ -347,22 +387,15 @@ interface CngxMatTabRejectionContentContext {
|
|
|
347
387
|
* this template into the SR-only descriptor span instead of writing
|
|
348
388
|
* the resolved fallback string verbatim.
|
|
349
389
|
*
|
|
350
|
-
* Pure marker
|
|
390
|
+
* Pure marker - zero logic. Holds only a typed
|
|
351
391
|
* {@link TemplateRef} reference. Mirrors the family-standard slot
|
|
352
392
|
* pattern (`CngxMatTabAggregatorContent`, `CngxStepBadge`,
|
|
353
393
|
* `CngxTabErrorBadge`).
|
|
354
394
|
*
|
|
355
|
-
* Cascade resolution
|
|
356
|
-
* `architecture-summary.md` slot-cascade rule):
|
|
395
|
+
* Cascade resolution:
|
|
357
396
|
* 1. Per-instance `*cngxMatTabRejectionContent` template wins
|
|
358
397
|
* 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')`
|
|
398
|
+
* 2. Library default - imperative `Renderer2.createElement('span')`
|
|
366
399
|
* with `textContent = fallbackText` (the resolved
|
|
367
400
|
* `commitRolledBackTo(originLabel)` / `commitFailedRetry`
|
|
368
401
|
* phrase from `injectTabsI18n()`).
|
|
@@ -384,6 +417,12 @@ interface CngxMatTabRejectionContentContext {
|
|
|
384
417
|
* <mat-tab label="Profile">…</mat-tab>
|
|
385
418
|
* </mat-tab-group>
|
|
386
419
|
* ```
|
|
420
|
+
*
|
|
421
|
+
* @category ui/mat-tabs
|
|
422
|
+
* @wcag AA
|
|
423
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/decorations/mat-tab-rejection-content.directive.ts
|
|
424
|
+
* @since 0.1.0
|
|
425
|
+
* @relatedTo CngxMatTabs, CngxMatTabAggregatorContent, CngxMatTabError
|
|
387
426
|
*/
|
|
388
427
|
declare class CngxMatTabRejectionContent {
|
|
389
428
|
readonly templateRef: TemplateRef<CngxMatTabRejectionContentContext>;
|
|
@@ -406,12 +445,14 @@ declare class CngxMatTabRejectionContent {
|
|
|
406
445
|
* fail-fast). The library default is a dev-mode `console.warn`; the
|
|
407
446
|
* exported {@link CNGX_DEFAULT_HALF_WIRED_SLOT_SINK} value lets test
|
|
408
447
|
* doubles compose against a stable reference.
|
|
448
|
+
*
|
|
449
|
+
* @category ui/mat-tabs
|
|
409
450
|
*/
|
|
410
451
|
type CngxMatTabHalfWiredSlotSink = (missing: 'contentTemplate' | 'viewContainerRef') => void;
|
|
411
452
|
|
|
412
453
|
/**
|
|
413
454
|
* Behaviour knobs for `[cngxMatTabs]`. Single canonical surface
|
|
414
|
-
* symmetric to `provideSelectConfig` in the select family
|
|
455
|
+
* symmetric to `provideSelectConfig` in the select family - every
|
|
415
456
|
* tunable is a `with*` feature on the same aggregator instead of
|
|
416
457
|
* a standalone DI token, so consumers configure the directive
|
|
417
458
|
* through one entry point and the API surface stays small.
|
|
@@ -420,6 +461,8 @@ type CngxMatTabHalfWiredSlotSink = (missing: 'contentTemplate' | 'viewContainerR
|
|
|
420
461
|
* (component scope), which wins over `provideMatTabsConfig(...)`
|
|
421
462
|
* (root), which wins over the library defaults captured by
|
|
422
463
|
* {@link CNGX_MAT_TABS_CONFIG_DEFAULTS}.
|
|
464
|
+
*
|
|
465
|
+
* @category ui/mat-tabs
|
|
423
466
|
*/
|
|
424
467
|
interface CngxMatTabsConfig {
|
|
425
468
|
/**
|
|
@@ -430,19 +473,17 @@ interface CngxMatTabsConfig {
|
|
|
430
473
|
* gated behind a never-true `*ngIf` / `@defer`) does not re-arm
|
|
431
474
|
* forever.
|
|
432
475
|
*
|
|
433
|
-
* Default: `5`
|
|
476
|
+
* Default: `5` - well above normal Material render lag (a single
|
|
434
477
|
* `afterNextRender` is enough on every supported version), low
|
|
435
478
|
* enough to surface a dev-mode `console.warn` promptly when the
|
|
436
479
|
* consumer DOM never appears.
|
|
437
480
|
*
|
|
438
481
|
* Note: `<cngx-tab-overflow>`'s own attach loop uses `60` rAF
|
|
439
|
-
* frames, not `5`
|
|
482
|
+
* frames, not `5` - different scheduler, different budget. The
|
|
440
483
|
* two caps are intentionally independent because the underlying
|
|
441
484
|
* timing primitives differ; a shared "anchor max attempts" knob
|
|
442
485
|
* 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.
|
|
486
|
+
* frame, which they are not.
|
|
446
487
|
*/
|
|
447
488
|
readonly anchorMaxAttempts?: number;
|
|
448
489
|
/**
|
|
@@ -460,6 +501,10 @@ interface CngxMatTabsConfig {
|
|
|
460
501
|
* {@link provideMatTabsConfigAt} (component scope). Read via
|
|
461
502
|
* {@link injectMatTabsConfig}, which merges with the library
|
|
462
503
|
* defaults so callers never see `undefined`.
|
|
504
|
+
*
|
|
505
|
+
* @category ui/mat-tabs
|
|
506
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/mat-tabs-config.ts
|
|
507
|
+
* @since 0.1.0
|
|
463
508
|
*/
|
|
464
509
|
declare const CNGX_MAT_TABS_CONFIG: InjectionToken<CngxMatTabsConfig>;
|
|
465
510
|
/**
|
|
@@ -467,8 +512,10 @@ declare const CNGX_MAT_TABS_CONFIG: InjectionToken<CngxMatTabsConfig>;
|
|
|
467
512
|
* by {@link provideMatTabsConfig} / {@link provideMatTabsConfigAt}.
|
|
468
513
|
* The optional `_target` discriminator is reserved for a future
|
|
469
514
|
* cross-family aggregator (`provideCngxMatTabs`) that dispatches
|
|
470
|
-
* features to the right provider
|
|
515
|
+
* features to the right provider - analogous to `_target: 'select'`
|
|
471
516
|
* in the select family.
|
|
517
|
+
*
|
|
518
|
+
* @category ui/mat-tabs
|
|
472
519
|
*/
|
|
473
520
|
interface CngxMatTabsConfigFeature {
|
|
474
521
|
readonly config: Partial<CngxMatTabsConfig>;
|
|
@@ -478,11 +525,15 @@ interface CngxMatTabsConfigFeature {
|
|
|
478
525
|
/**
|
|
479
526
|
* Cap on the `[cngxMatTabs]` overflow-anchor retry loop.
|
|
480
527
|
* See {@link CngxMatTabsConfig.anchorMaxAttempts} for default + rationale.
|
|
528
|
+
*
|
|
529
|
+
* @category ui/mat-tabs
|
|
481
530
|
*/
|
|
482
531
|
declare function withAnchorRetryAttempts(n: number): CngxMatTabsConfigFeature;
|
|
483
532
|
/**
|
|
484
533
|
* Override the half-wired-slot diagnostic sink.
|
|
485
534
|
* See {@link CngxMatTabsConfig.halfWiredSlotSink}.
|
|
535
|
+
*
|
|
536
|
+
* @category ui/mat-tabs
|
|
486
537
|
*/
|
|
487
538
|
declare function withHalfWiredSlotSink(sink: CngxMatTabHalfWiredSlotSink): CngxMatTabsConfigFeature;
|
|
488
539
|
/**
|
|
@@ -500,6 +551,8 @@ declare function withHalfWiredSlotSink(sink: CngxMatTabHalfWiredSlotSink): CngxM
|
|
|
500
551
|
* ],
|
|
501
552
|
* });
|
|
502
553
|
* ```
|
|
554
|
+
*
|
|
555
|
+
* @category ui/mat-tabs
|
|
503
556
|
*/
|
|
504
557
|
declare function provideMatTabsConfig(...features: CngxMatTabsConfigFeature[]): EnvironmentProviders;
|
|
505
558
|
/**
|
|
@@ -517,6 +570,8 @@ declare function provideMatTabsConfig(...features: CngxMatTabsConfigFeature[]):
|
|
|
517
570
|
* ...
|
|
518
571
|
* })
|
|
519
572
|
* ```
|
|
573
|
+
*
|
|
574
|
+
* @category ui/mat-tabs
|
|
520
575
|
*/
|
|
521
576
|
declare function provideMatTabsConfigAt(...features: CngxMatTabsConfigFeature[]): Provider[];
|
|
522
577
|
/**
|
|
@@ -528,6 +583,8 @@ declare function provideMatTabsConfigAt(...features: CngxMatTabsConfigFeature[])
|
|
|
528
583
|
* 1. `CNGX_MAT_TABS_CONFIG` value (set via
|
|
529
584
|
* {@link provideMatTabsConfig} / {@link provideMatTabsConfigAt}).
|
|
530
585
|
* 2. {@link CNGX_MAT_TABS_CONFIG_DEFAULTS} (library default).
|
|
586
|
+
*
|
|
587
|
+
* @category ui/mat-tabs
|
|
531
588
|
*/
|
|
532
589
|
declare function injectMatTabsConfig(): Required<CngxMatTabsConfig>;
|
|
533
590
|
|
|
@@ -541,21 +598,10 @@ declare function injectMatTabsConfig(): Required<CngxMatTabsConfig>;
|
|
|
541
598
|
* Every leading-underscore field cngx reaches into and every
|
|
542
599
|
* Material-internal CSS selector cngx queries against has its
|
|
543
600
|
* 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.
|
|
601
|
+
* grep this file. The grep value is the consumer-facing benefit, so
|
|
602
|
+
* this namespace is part of the published surface of
|
|
603
|
+
* `@cngx/ui/mat-tabs` (re-exported from the package barrel) rather
|
|
604
|
+
* than a private implementation detail.
|
|
559
605
|
*
|
|
560
606
|
* The grouping uses a TypeScript `namespace` so a single
|
|
561
607
|
* `MaterialPrivateSurfaces.<member>` access path covers both the
|
|
@@ -564,6 +610,8 @@ declare function injectMatTabsConfig(): Required<CngxMatTabsConfig>;
|
|
|
564
610
|
* grouped name through ESLint's `@typescript-eslint` type resolver
|
|
565
611
|
* — a flat `export * as` re-export from `public-api.ts` does not
|
|
566
612
|
* resolve nested members through the path-alias.
|
|
613
|
+
*
|
|
614
|
+
* @category ui/mat-tabs
|
|
567
615
|
*/
|
|
568
616
|
|
|
569
617
|
declare namespace MaterialPrivateSurfaces {
|
|
@@ -642,7 +690,7 @@ declare namespace MaterialPrivateSurfaces {
|
|
|
642
690
|
* `resolveStripRoot` walks from host up to `<mat-tab-header>` and
|
|
643
691
|
* locates `.mat-mdc-tab-label-container` via any rendered
|
|
644
692
|
* `.mat-mdc-tab` descendant — Material's IO-friendly scroll
|
|
645
|
-
* container
|
|
693
|
+
* container.
|
|
646
694
|
*
|
|
647
695
|
* `resolveTabButton` indexes positionally; Material owns the DOM
|
|
648
696
|
* and cngx handle ids never reach the button elements. Index
|
|
@@ -657,6 +705,8 @@ declare namespace MaterialPrivateSurfaces {
|
|
|
657
705
|
* useValue: createCngxMatTabOverflowDomAdapter }
|
|
658
706
|
* ]
|
|
659
707
|
* ```
|
|
708
|
+
*
|
|
709
|
+
* @category ui/mat-tabs
|
|
660
710
|
*/
|
|
661
711
|
declare function createCngxMatTabOverflowDomAdapter(): CngxTabOverflowDomAdapter;
|
|
662
712
|
|
|
@@ -4,7 +4,7 @@ import { CngxPaginate } from '@cngx/common/data';
|
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Material paginator wrapper that connects to a {@link CngxPaginate} directive
|
|
7
|
-
* via an explicit `[cngxPaginateRef]` input
|
|
7
|
+
* via an explicit `[cngxPaginateRef]` input - no ancestor injection.
|
|
8
8
|
*
|
|
9
9
|
* ```html
|
|
10
10
|
* <div cngxPaginate #pg="cngxPaginate" [total]="items.length">
|
|
@@ -21,6 +21,17 @@ import { CngxPaginate } from '@cngx/common/data';
|
|
|
21
21
|
* </div>
|
|
22
22
|
* <cngx-mat-paginator [cngxPaginateRef]="pg" />
|
|
23
23
|
* ```
|
|
24
|
+
*
|
|
25
|
+
* @category ui/material
|
|
26
|
+
* @docsKind primary
|
|
27
|
+
* @wcag AA
|
|
28
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/material/mat-paginator.ts
|
|
29
|
+
* @since 0.1.0
|
|
30
|
+
* @relatedTo CngxPaginate, CngxDataSource
|
|
31
|
+
* <example-url>http://localhost:4200/#/common/data/data-source/datasource-cngxpaginate-manual-pipeline</example-url>
|
|
32
|
+
* <example-url>http://localhost:4200/#/common/data/data-source/signal-observable-bridge</example-url>
|
|
33
|
+
* <example-url>http://localhost:4200/#/common/data/paginate-list/paginated-list-cngxpaginate-cngxmatpaginator</example-url>
|
|
34
|
+
* <example-url>http://localhost:4200/#/common/data/paginate-list/uncontrolled-mode-zero-class-boilerplate</example-url>
|
|
24
35
|
*/
|
|
25
36
|
declare class CngxMatPaginator {
|
|
26
37
|
/** The `CngxPaginate` directive instance to connect to. */
|
|
@@ -5,6 +5,13 @@ import * as rxjs from 'rxjs';
|
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Typed wrapper around a CDK OverlayRef that exposes a close result stream.
|
|
8
|
+
*
|
|
9
|
+
* @category ui/overlay
|
|
10
|
+
* @docsKind primary
|
|
11
|
+
* @wcag AA
|
|
12
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/overlay/overlay-ref.ts
|
|
13
|
+
* @since 0.1.0
|
|
14
|
+
* @relatedTo CngxOverlay, provideOverlay
|
|
8
15
|
*/
|
|
9
16
|
declare class CngxOverlayRef<R = unknown> {
|
|
10
17
|
private readonly cdkRef;
|
|
@@ -18,21 +25,31 @@ declare class CngxOverlayRef<R = unknown> {
|
|
|
18
25
|
|
|
19
26
|
/**
|
|
20
27
|
* Config accepted by {@link CngxOverlay.open}. Partial alias of CDK's
|
|
21
|
-
* {@link OverlayConfig}
|
|
28
|
+
* {@link OverlayConfig} - every field is optional and falls back to
|
|
22
29
|
* the CDK overlay default.
|
|
30
|
+
*
|
|
31
|
+
* @category ui/overlay
|
|
23
32
|
*/
|
|
24
33
|
type CngxOverlayConfig = Partial<OverlayConfig>;
|
|
25
34
|
/**
|
|
26
35
|
* Thin service over CDK Overlay that returns a typed CngxOverlayRef.
|
|
27
36
|
*
|
|
28
37
|
* Must be provided via `provideOverlay()` in application or component providers.
|
|
29
|
-
*
|
|
38
|
+
* ```ts
|
|
30
39
|
* // app.config.ts
|
|
31
40
|
* provideOverlay()
|
|
32
|
-
|
|
41
|
+
|
|
33
42
|
* // usage
|
|
34
43
|
* const ref = overlayService.open(MyComponent, { hasBackdrop: true });
|
|
35
44
|
* ref.afterClosed$.subscribe(result => console.log(result));
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @category ui/overlay
|
|
48
|
+
* @docsKind primary
|
|
49
|
+
* @wcag AA
|
|
50
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/overlay/overlay.service.ts
|
|
51
|
+
* @since 0.1.0
|
|
52
|
+
* @relatedTo CngxOverlayRef, provideOverlay
|
|
36
53
|
*/
|
|
37
54
|
declare class CngxOverlay {
|
|
38
55
|
private readonly overlay;
|
|
@@ -50,7 +67,11 @@ declare class CngxOverlay {
|
|
|
50
67
|
static ɵfac: i0.ɵɵFactoryDeclaration<CngxOverlay, never>;
|
|
51
68
|
static ɵprov: i0.ɵɵInjectableDeclaration<CngxOverlay>;
|
|
52
69
|
}
|
|
53
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Provides `CngxOverlay` as an environment-scoped service.
|
|
72
|
+
*
|
|
73
|
+
* @category ui/overlay
|
|
74
|
+
*/
|
|
54
75
|
declare function provideOverlay(): EnvironmentProviders;
|
|
55
76
|
|
|
56
77
|
export { CngxOverlay, CngxOverlayRef, provideOverlay };
|