@cngx/ui 0.1.0-rc.9 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +118 -59
- package/action-button/README.md +170 -53
- package/breadcrumb/README.md +5 -6
- package/collection/README.md +1 -1
- package/command-palette/README.md +4 -3
- package/data-grid-accordion/README.md +1 -1
- package/empty-state/README.md +2 -3
- package/feedback/README.md +1 -1
- package/fesm2022/cngx-ui-a11y.mjs +13 -23
- package/fesm2022/cngx-ui-a11y.mjs.map +1 -1
- package/fesm2022/cngx-ui-accordion.mjs +44 -66
- package/fesm2022/cngx-ui-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-action-button.mjs +213 -335
- package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
- package/fesm2022/cngx-ui-breadcrumb.mjs +60 -80
- package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/cngx-ui-chart-panel.mjs +18 -31
- package/fesm2022/cngx-ui-chart-panel.mjs.map +1 -1
- package/fesm2022/cngx-ui-collection.mjs +28 -44
- package/fesm2022/cngx-ui-collection.mjs.map +1 -1
- package/fesm2022/cngx-ui-command-palette.mjs +29 -51
- package/fesm2022/cngx-ui-command-palette.mjs.map +1 -1
- package/fesm2022/cngx-ui-context-menu.mjs +78 -83
- package/fesm2022/cngx-ui-context-menu.mjs.map +1 -1
- package/fesm2022/cngx-ui-data-grid-accordion.mjs +52 -74
- package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-empty-state.mjs +17 -44
- package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
- package/fesm2022/cngx-ui-feedback.mjs +589 -467
- package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
- package/fesm2022/cngx-ui-layout.mjs +17 -13
- package/fesm2022/cngx-ui-layout.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-accordion.mjs +3 -5
- package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-paginator.mjs +5 -9
- package/fesm2022/cngx-ui-mat-paginator.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-stepper.mjs +6 -9
- package/fesm2022/cngx-ui-mat-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-tabs.mjs +71 -68
- package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-nav-rail.mjs +440 -0
- package/fesm2022/cngx-ui-nav-rail.mjs.map +1 -0
- package/fesm2022/cngx-ui-overlay.mjs +9 -10
- package/fesm2022/cngx-ui-overlay.mjs.map +1 -1
- package/fesm2022/cngx-ui-paginator.mjs +149 -171
- package/fesm2022/cngx-ui-paginator.mjs.map +1 -1
- package/fesm2022/cngx-ui-sidenav.mjs +858 -721
- package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
- package/fesm2022/cngx-ui-skeleton.mjs +17 -19
- package/fesm2022/cngx-ui-skeleton.mjs.map +1 -1
- package/fesm2022/cngx-ui-speak.mjs +21 -74
- package/fesm2022/cngx-ui-speak.mjs.map +1 -1
- package/fesm2022/cngx-ui-stat-card.mjs +39 -62
- package/fesm2022/cngx-ui-stat-card.mjs.map +1 -1
- package/fesm2022/cngx-ui-stepper.mjs +207 -90
- package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-tabs.mjs +71 -32
- package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-timeline.mjs +21 -27
- package/fesm2022/cngx-ui-timeline.mjs.map +1 -1
- package/fesm2022/cngx-ui-toc.mjs +27 -40
- package/fesm2022/cngx-ui-toc.mjs.map +1 -1
- package/fesm2022/cngx-ui.mjs +5 -5
- package/fesm2022/cngx-ui.mjs.map +1 -1
- package/mat-tabs/README.md +28 -14
- package/mat-tabs/styles/mat-tabs.css +233 -258
- package/nav-rail/README.md +325 -0
- package/package.json +10 -5
- package/paginator/README.md +10 -0
- package/schematics/ng-add/index.js +7 -7
- package/schematics/ng-add/schema.json +5 -0
- package/sidenav/README.md +150 -55
- package/skeleton/README.md +1 -1
- package/speak/README.md +1 -2
- package/stepper/README.md +20 -5
- package/tabs/README.md +13 -0
- package/timeline/README.md +1 -1
- package/toc/README.md +1 -1
- package/types/cngx-ui-a11y.d.ts +20 -38
- package/types/cngx-ui-accordion.d.ts +45 -77
- package/types/cngx-ui-action-button.d.ts +113 -151
- package/types/cngx-ui-breadcrumb.d.ts +58 -94
- package/types/cngx-ui-chart-panel.d.ts +22 -40
- package/types/cngx-ui-collection.d.ts +30 -53
- package/types/cngx-ui-command-palette.d.ts +40 -64
- package/types/cngx-ui-context-menu.d.ts +67 -44
- package/types/cngx-ui-data-grid-accordion.d.ts +49 -77
- package/types/cngx-ui-empty-state.d.ts +18 -8
- package/types/cngx-ui-feedback.d.ts +264 -289
- package/types/cngx-ui-layout.d.ts +4 -12
- package/types/cngx-ui-mat-accordion.d.ts +2 -3
- package/types/cngx-ui-mat-paginator.d.ts +4 -10
- package/types/cngx-ui-mat-stepper.d.ts +5 -10
- package/types/cngx-ui-mat-tabs.d.ts +43 -69
- package/types/cngx-ui-nav-rail.d.ts +416 -0
- package/types/cngx-ui-overlay.d.ts +4 -13
- package/types/cngx-ui-paginator.d.ts +164 -154
- package/types/cngx-ui-sidenav.d.ts +557 -437
- package/types/cngx-ui-skeleton.d.ts +7 -13
- package/types/cngx-ui-speak.d.ts +40 -24
- package/types/cngx-ui-stat-card.d.ts +45 -36
- package/types/cngx-ui-stepper.d.ts +183 -62
- package/types/cngx-ui-tabs.d.ts +101 -27
- package/types/cngx-ui-timeline.d.ts +20 -48
- package/types/cngx-ui-toc.d.ts +30 -51
- package/types/cngx-ui.d.ts +1 -1
|
@@ -16,8 +16,6 @@ import { CngxAsyncState } from '@cngx/core/utils';
|
|
|
16
16
|
* timestamp after the body on one line - a feed someone scans. Purely
|
|
17
17
|
* visual: same DOM, same ARIA, same slots, only the `[data-mode]` host
|
|
18
18
|
* attribute changes.
|
|
19
|
-
*
|
|
20
|
-
* @category ui/timeline
|
|
21
19
|
*/
|
|
22
20
|
type CngxTimelineMode = 'narrative' | 'activity';
|
|
23
21
|
/**
|
|
@@ -27,8 +25,6 @@ type CngxTimelineMode = 'narrative' | 'activity';
|
|
|
27
25
|
* `line` (default) is the bare rail. `card` lifts each event body onto its
|
|
28
26
|
* own surface. `bands` tints alternating groups so long timelines stay
|
|
29
27
|
* scannable.
|
|
30
|
-
*
|
|
31
|
-
* @category ui/timeline
|
|
32
28
|
*/
|
|
33
29
|
type CngxTimelineSkin = 'line' | 'card' | 'bands';
|
|
34
30
|
/**
|
|
@@ -45,8 +41,6 @@ type CngxTimelineSkin = 'line' | 'card' | 'bands';
|
|
|
45
41
|
*
|
|
46
42
|
* `alternate` is not supported with `mode="activity"`: alternating a
|
|
47
43
|
* scan-feed defeats the scan. Those rows render `start` and dev mode warns.
|
|
48
|
-
*
|
|
49
|
-
* @category ui/timeline
|
|
50
44
|
*/
|
|
51
45
|
type CngxTimelinePlacement = 'start' | 'end' | 'alternate';
|
|
52
46
|
/**
|
|
@@ -60,8 +54,6 @@ type CngxTimelinePlacement = 'start' | 'end' | 'alternate';
|
|
|
60
54
|
* so a `rejected` stretch stays red and an `upcoming` tail stays dashed.
|
|
61
55
|
* It applies within a band; the gap between groups stays open, because a
|
|
62
56
|
* band is a semantic boundary rather than a rendering accident.
|
|
63
|
-
*
|
|
64
|
-
* @category ui/timeline
|
|
65
57
|
*/
|
|
66
58
|
type CngxTimelineRail = 'segmented' | 'continuous';
|
|
67
59
|
/**
|
|
@@ -77,8 +69,6 @@ type CngxTimelineRail = 'segmented' | 'continuous';
|
|
|
77
69
|
*
|
|
78
70
|
* Named `orientation` rather than `direction` because `[direction]` is
|
|
79
71
|
* already the sort order on this component.
|
|
80
|
-
*
|
|
81
|
-
* @category ui/timeline
|
|
82
72
|
*/
|
|
83
73
|
type CngxTimelineOrientation = 'vertical' | 'horizontal';
|
|
84
74
|
/**
|
|
@@ -116,8 +106,6 @@ type CngxTimelineOrientation = 'vertical' | 'horizontal';
|
|
|
116
106
|
* </cngx-timeline>
|
|
117
107
|
* ```
|
|
118
108
|
*
|
|
119
|
-
* @category ui/timeline
|
|
120
|
-
* @docsKind primary
|
|
121
109
|
* @wcag AA
|
|
122
110
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/timeline/timeline.component.ts
|
|
123
111
|
* @relatedTo CngxTimelineItem, CngxTimelineItemTpl, CNGX_TIMELINE_GROUPING_FACTORY, CNGX_TIMELINE_CONFIG
|
|
@@ -129,20 +117,21 @@ type CngxTimelineOrientation = 'vertical' | 'horizontal';
|
|
|
129
117
|
* @slot cngxTimelineError Rendered when the load fails; gets the error and a retry callback.
|
|
130
118
|
* @slot cngxTimelineRetryButton Replaces the retry control on the error surface.
|
|
131
119
|
* @slot cngxTimelineLoadingTail Rendered below the rows while more history streams in.
|
|
132
|
-
* <example-url
|
|
133
|
-
* <example-url
|
|
134
|
-
* <example-url
|
|
135
|
-
* <example-url
|
|
136
|
-
* <example-url
|
|
137
|
-
* <example-url
|
|
138
|
-
* <example-url
|
|
139
|
-
* <example-url
|
|
140
|
-
* <example-url
|
|
141
|
-
* <example-url
|
|
142
|
-
* <example-url
|
|
143
|
-
* <example-url
|
|
144
|
-
* <example-url
|
|
145
|
-
* @since 0.
|
|
120
|
+
* <example-url>/#/ui/timeline/basics/flat-array</example-url>
|
|
121
|
+
* <example-url>/#/ui/timeline/basics/group-by-week</example-url>
|
|
122
|
+
* <example-url>/#/ui/timeline/basics/direction</example-url>
|
|
123
|
+
* <example-url>/#/ui/timeline/basics/ungrouped</example-url>
|
|
124
|
+
* <example-url>/#/ui/timeline/layout/horizontal</example-url>
|
|
125
|
+
* <example-url>/#/ui/timeline/layout/alternating-infographic</example-url>
|
|
126
|
+
* <example-url>/#/ui/timeline/layout/opposite-time</example-url>
|
|
127
|
+
* <example-url>/#/ui/timeline/integration/data-source</example-url>
|
|
128
|
+
* <example-url>/#/ui/timeline/integration/scroll-spy-nav</example-url>
|
|
129
|
+
* <example-url>/#/ui/timeline/async/error-retry</example-url>
|
|
130
|
+
* <example-url>/#/ui/timeline/async/refreshing-tail</example-url>
|
|
131
|
+
* <example-url>/#/ui/timeline/skins/activity-vs-narrative</example-url>
|
|
132
|
+
* <example-url>/#/ui/timeline/skins/dark</example-url>
|
|
133
|
+
* @since 0.3.0
|
|
134
|
+
* @axis level organism
|
|
146
135
|
*/
|
|
147
136
|
declare class CngxTimeline<T = unknown> implements CngxTimelineMarkerHost {
|
|
148
137
|
private readonly config;
|
|
@@ -311,8 +300,6 @@ declare class CngxTimeline<T = unknown> implements CngxTimelineMarkerHost {
|
|
|
311
300
|
/**
|
|
312
301
|
* The fallback copy the timeline renders when a consumer bound no slot for
|
|
313
302
|
* a surface, resolved from the config cascade.
|
|
314
|
-
*
|
|
315
|
-
* @category ui/timeline
|
|
316
303
|
*/
|
|
317
304
|
interface CngxTimelineFallbackCopy {
|
|
318
305
|
readonly retry: string;
|
|
@@ -336,15 +323,12 @@ interface CngxTimelineFallbackCopy {
|
|
|
336
323
|
* clears the formatter should still get a legible header rather than an
|
|
337
324
|
* empty one that leaves the group unnamed.
|
|
338
325
|
*
|
|
339
|
-
* @
|
|
340
|
-
* @since 0.1.0
|
|
326
|
+
* @since 0.3.0
|
|
341
327
|
*/
|
|
342
328
|
declare function createTimelineFallbackCopy(config: CngxTimelineConfig): Signal<CngxTimelineFallbackCopy>;
|
|
343
329
|
|
|
344
330
|
/**
|
|
345
331
|
* Everything the template needs to decide what the body shows.
|
|
346
|
-
*
|
|
347
|
-
* @category ui/timeline
|
|
348
332
|
*/
|
|
349
333
|
interface CngxTimelineView {
|
|
350
334
|
readonly activeView: Signal<AsyncView>;
|
|
@@ -378,15 +362,12 @@ interface CngxTimelineView {
|
|
|
378
362
|
* than forking the organism - treating `pending` as content, or holding the
|
|
379
363
|
* skeleton through a refresh, is a per-app decision.
|
|
380
364
|
*
|
|
381
|
-
* @category ui/timeline
|
|
382
365
|
* @relatedTo CNGX_TIMELINE_VIEW_FACTORY
|
|
383
|
-
* @since 0.
|
|
366
|
+
* @since 0.3.0
|
|
384
367
|
*/
|
|
385
368
|
declare function createTimelineView(state: () => CngxAsyncState<unknown> | undefined, isEmpty: () => boolean, labels: Signal<CngxTimelineFallbackCopy>): CngxTimelineView;
|
|
386
369
|
/**
|
|
387
370
|
* The shape {@link CNGX_TIMELINE_VIEW_FACTORY} hands out.
|
|
388
|
-
*
|
|
389
|
-
* @category ui/timeline
|
|
390
371
|
*/
|
|
391
372
|
type CngxTimelineViewFactory = (state: () => CngxAsyncState<unknown> | undefined, isEmpty: () => boolean, labels: Signal<CngxTimelineFallbackCopy>) => CngxTimelineView;
|
|
392
373
|
/**
|
|
@@ -412,9 +393,8 @@ type CngxTimelineViewFactory = (state: () => CngxAsyncState<unknown> | undefined
|
|
|
412
393
|
* ]
|
|
413
394
|
* ```
|
|
414
395
|
*
|
|
415
|
-
* @category ui/timeline
|
|
416
396
|
* @relatedTo createTimelineView
|
|
417
|
-
* @since 0.
|
|
397
|
+
* @since 0.3.0
|
|
418
398
|
*/
|
|
419
399
|
declare const CNGX_TIMELINE_VIEW_FACTORY: InjectionToken<CngxTimelineViewFactory>;
|
|
420
400
|
|
|
@@ -422,8 +402,6 @@ declare const CNGX_TIMELINE_VIEW_FACTORY: InjectionToken<CngxTimelineViewFactory
|
|
|
422
402
|
* Anything a cngx slot directive exposes: its own `TemplateRef`. Structural
|
|
423
403
|
* rather than a base class, so a consumer's own slot directive satisfies it
|
|
424
404
|
* by shape alone.
|
|
425
|
-
*
|
|
426
|
-
* @category ui/timeline
|
|
427
405
|
*/
|
|
428
406
|
interface CngxTimelineSlotSource<C> {
|
|
429
407
|
readonly templateRef: TemplateRef<C>;
|
|
@@ -446,16 +424,13 @@ interface CngxTimelineSlotSource<C> {
|
|
|
446
424
|
* Exported because an ejected skin resolves the same three tiers and would
|
|
447
425
|
* otherwise have to restate the rule.
|
|
448
426
|
*
|
|
449
|
-
* @category ui/timeline
|
|
450
427
|
* @relatedTo createTimelineSlots
|
|
451
|
-
* @since 0.
|
|
428
|
+
* @since 0.3.0
|
|
452
429
|
*/
|
|
453
430
|
declare function createTimelineSlotBinding<C>(instance: Signal<CngxTimelineSlotSource<C> | undefined>, configured: () => TemplateRef<C> | undefined): Signal<TemplateRef<C> | null>;
|
|
454
431
|
/**
|
|
455
432
|
* The eight `contentChild()` queries a timeline runs, handed over as one bag
|
|
456
433
|
* because AOT requires them to be declared on the component itself.
|
|
457
|
-
*
|
|
458
|
-
* @category ui/timeline
|
|
459
434
|
*/
|
|
460
435
|
interface CngxTimelineSlotQueries<T> {
|
|
461
436
|
readonly item: Signal<CngxTimelineSlotSource<CngxTimelineItemContext<T>> | undefined>;
|
|
@@ -470,8 +445,6 @@ interface CngxTimelineSlotQueries<T> {
|
|
|
470
445
|
/**
|
|
471
446
|
* The same eight, resolved. Every member is already through the cascade, so
|
|
472
447
|
* the template reads one signal per region and never restates the rule.
|
|
473
|
-
*
|
|
474
|
-
* @category ui/timeline
|
|
475
448
|
*/
|
|
476
449
|
interface CngxTimelineSlots<T> {
|
|
477
450
|
readonly item: Signal<TemplateRef<CngxTimelineItemContext<T>> | null>;
|
|
@@ -493,9 +466,8 @@ interface CngxTimelineSlots<T> {
|
|
|
493
466
|
* slots are generic. `TemplateRef` is method-bivariant, so a consumer's
|
|
494
467
|
* concrete template still assigns in.
|
|
495
468
|
*
|
|
496
|
-
* @category ui/timeline
|
|
497
469
|
* @relatedTo createTimelineSlotBinding
|
|
498
|
-
* @since 0.
|
|
470
|
+
* @since 0.3.0
|
|
499
471
|
*/
|
|
500
472
|
declare function createTimelineSlots<T>(queries: CngxTimelineSlotQueries<T>, templates: () => CngxTimelineTemplates | undefined): CngxTimelineSlots<T>;
|
|
501
473
|
|
package/types/cngx-ui-toc.d.ts
CHANGED
|
@@ -10,8 +10,7 @@ import { InjectionToken, Signal, OutputRef, TemplateRef, EnvironmentProviders, P
|
|
|
10
10
|
* the document for headings in this release (see the deferred auto-discovery
|
|
11
11
|
* phase).
|
|
12
12
|
*
|
|
13
|
-
* @
|
|
14
|
-
* @since 0.1.0
|
|
13
|
+
* @since 0.3.0
|
|
15
14
|
*/
|
|
16
15
|
interface CngxTocItem {
|
|
17
16
|
/** Section element id this entry links to and scrolls into view. */
|
|
@@ -28,8 +27,7 @@ interface CngxTocItem {
|
|
|
28
27
|
* `aria-current` state; `depth` is the zero-based nesting level for
|
|
29
28
|
* indentation-aware custom markup.
|
|
30
29
|
*
|
|
31
|
-
* @
|
|
32
|
-
* @since 0.1.0
|
|
30
|
+
* @since 0.3.0
|
|
33
31
|
*/
|
|
34
32
|
interface CngxTocItemContext {
|
|
35
33
|
/** The item being rendered (`let-item`). */
|
|
@@ -52,8 +50,7 @@ interface CngxTocItemContext {
|
|
|
52
50
|
* rail owns the state (`activeId`, `scrollTo`) and the collaborator consumes
|
|
53
51
|
* it, so the toc *provides* the token and the sync directive *injects* it.
|
|
54
52
|
*
|
|
55
|
-
* @
|
|
56
|
-
* @since 0.1.0
|
|
53
|
+
* @since 0.3.0
|
|
57
54
|
* @relatedTo CngxToc, CngxTocRouterSync
|
|
58
55
|
*/
|
|
59
56
|
interface CngxTocContract {
|
|
@@ -69,8 +66,7 @@ interface CngxTocContract {
|
|
|
69
66
|
* `{ provide: CNGX_TOC, useExisting: CngxToc }`, so a collaborator injects the
|
|
70
67
|
* narrow {@link CngxTocContract} instead of the concrete class.
|
|
71
68
|
*
|
|
72
|
-
* @
|
|
73
|
-
* @since 0.1.0
|
|
69
|
+
* @since 0.3.0
|
|
74
70
|
* @relatedTo CngxToc, CngxTocRouterSync
|
|
75
71
|
*/
|
|
76
72
|
declare const CNGX_TOC: InjectionToken<CngxTocContract>;
|
|
@@ -89,21 +85,20 @@ declare const CNGX_TOC: InjectionToken<CngxTocContract>;
|
|
|
89
85
|
* a required input. The spy resolves its targets through `getElementById`, so
|
|
90
86
|
* its host placement is irrelevant to its function.
|
|
91
87
|
*
|
|
92
|
-
* @category ui/toc
|
|
93
|
-
* @docsKind primary
|
|
94
88
|
* @wcag AA
|
|
95
89
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/toc/toc.component.ts
|
|
96
|
-
* @since 0.
|
|
90
|
+
* @since 0.3.0
|
|
97
91
|
* @relatedTo CngxScrollSpy, CngxTocRouterSync, CngxSidenav
|
|
98
|
-
* <example-url
|
|
99
|
-
* <example-url
|
|
92
|
+
* <example-url>/#/ui/toc/basic/on-this-page-rail</example-url>
|
|
93
|
+
* <example-url>/#/ui/toc/auto/heading-auto-discovery</example-url>
|
|
100
94
|
* @slot cngxTocItem Replaces the plain label inside each item's link at every depth, ahead of CNGX_TOC_CONFIG.templates.item; gets the item as $implicit, plus active and the zero-based depth.
|
|
95
|
+
* @axis level organism
|
|
101
96
|
*/
|
|
102
97
|
declare class CngxToc implements CngxTocContract {
|
|
103
98
|
private readonly doc;
|
|
104
99
|
private readonly cfg;
|
|
105
100
|
private readonly ariaLabels;
|
|
106
|
-
private readonly
|
|
101
|
+
private readonly motion;
|
|
107
102
|
private readonly isBrowser;
|
|
108
103
|
/**
|
|
109
104
|
* The outline to render. Tree-shaped; nested `children` become sub-lists.
|
|
@@ -165,8 +160,8 @@ declare class CngxToc implements CngxTocContract {
|
|
|
165
160
|
protected readonly resolvedItemTpl: Signal<_angular_core.TemplateRef<_cngx_ui_toc.CngxTocItemContext> | null>;
|
|
166
161
|
/**
|
|
167
162
|
* Scroll the section with this id into view and move focus to it. Honours
|
|
168
|
-
*
|
|
169
|
-
* `'auto'` (instant)
|
|
163
|
+
* reduced motion (the in-app `CNGX_MOTION` pick or the OS query) - the
|
|
164
|
+
* configured `scrollBehavior` is swapped for `'auto'` (instant). A visual-only
|
|
170
165
|
* jump is a silent state change for screen-reader users, so focus follows
|
|
171
166
|
* the scroll (Pillar 2).
|
|
172
167
|
*/
|
|
@@ -230,12 +225,11 @@ declare class CngxToc implements CngxTocContract {
|
|
|
230
225
|
* otherwise outlive route changes. Without `@angular/router` the directive
|
|
231
226
|
* dev-warns once and no-ops.
|
|
232
227
|
*
|
|
233
|
-
* @category ui/toc
|
|
234
|
-
* @docsKind primary
|
|
235
228
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/toc/toc-router-sync.directive.ts
|
|
236
|
-
* @since 0.
|
|
229
|
+
* @since 0.3.0
|
|
237
230
|
* @relatedTo CngxToc, CNGX_TOC
|
|
238
|
-
* <example-url
|
|
231
|
+
* <example-url>/#/ui/toc/router/fragment-deep-link</example-url>
|
|
232
|
+
* @axis level organism
|
|
239
233
|
*/
|
|
240
234
|
declare class CngxTocRouterSync {
|
|
241
235
|
private readonly toc;
|
|
@@ -265,11 +259,10 @@ declare class CngxTocRouterSync {
|
|
|
265
259
|
* rule; the selector stays `cngxTocItem`, which is what consumers write.
|
|
266
260
|
* Resolves ahead of `CNGX_TOC_CONFIG.templates.item` and the built-in label.
|
|
267
261
|
*
|
|
268
|
-
* @category ui/toc
|
|
269
262
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/toc/toc-item-slot.ts
|
|
270
|
-
* @since 0.
|
|
263
|
+
* @since 0.3.0
|
|
271
264
|
* @relatedTo CngxToc
|
|
272
|
-
* <example-url
|
|
265
|
+
* <example-url>/#/ui/toc/slots/custom-item-template</example-url>
|
|
273
266
|
*/
|
|
274
267
|
declare class CngxTocItemSlot {
|
|
275
268
|
readonly templateRef: TemplateRef<CngxTocItemContext>;
|
|
@@ -283,8 +276,7 @@ declare class CngxTocItemSlot {
|
|
|
283
276
|
* `CngxToc`. It feeds the `ariaLabels` of `CNGX_TOC_CONFIG`; a key set through
|
|
284
277
|
* `withTocAriaLabels` still wins.
|
|
285
278
|
*
|
|
286
|
-
* @
|
|
287
|
-
* @since 0.1.0
|
|
279
|
+
* @since 0.3.0
|
|
288
280
|
* @relatedTo CNGX_TOC_CONFIG, withTocAriaLabels
|
|
289
281
|
*/
|
|
290
282
|
interface CngxTocLanguageSection {
|
|
@@ -295,8 +287,7 @@ interface CngxTocLanguageSection {
|
|
|
295
287
|
* The English toc section: the single source of the toc's English copy. The
|
|
296
288
|
* `CNGX_TOC_CONFIG` labels default to it.
|
|
297
289
|
*
|
|
298
|
-
* @
|
|
299
|
-
* @since 0.1.0
|
|
290
|
+
* @since 0.3.0
|
|
300
291
|
* @relatedTo CNGX_TOC_CONFIG
|
|
301
292
|
*/
|
|
302
293
|
declare const CNGX_TOC_LANGUAGE_EN: CngxTocLanguageSection;
|
|
@@ -311,8 +302,7 @@ declare module '@cngx/core/i18n' {
|
|
|
311
302
|
* declared once there; an unset key reads the section (English without a
|
|
312
303
|
* pack).
|
|
313
304
|
*
|
|
314
|
-
* @
|
|
315
|
-
* @since 0.1.0
|
|
305
|
+
* @since 0.3.0
|
|
316
306
|
*/
|
|
317
307
|
type CngxTocAriaLabels = Partial<CngxTocLanguageSection>;
|
|
318
308
|
/**
|
|
@@ -331,8 +321,7 @@ type CngxTocAriaLabels = Partial<CngxTocLanguageSection>;
|
|
|
331
321
|
* Every key is optional - partial overrides deep-merge with the library
|
|
332
322
|
* defaults, so consumers declare only the keys they want to override.
|
|
333
323
|
*
|
|
334
|
-
* @
|
|
335
|
-
* @since 0.1.0
|
|
324
|
+
* @since 0.3.0
|
|
336
325
|
*/
|
|
337
326
|
interface CngxTocConfig {
|
|
338
327
|
/**
|
|
@@ -405,9 +394,8 @@ declare const CNGX_TOC_DEFAULTS: CngxTocConfig;
|
|
|
405
394
|
* `bootstrapApplication` providers (root cascade) or `provideTocConfigAt(...)`
|
|
406
395
|
* in a component's `viewProviders` (sub-tree cascade).
|
|
407
396
|
*
|
|
408
|
-
* @category ui/toc
|
|
409
397
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/toc/config/toc.config.defaults.ts
|
|
410
|
-
* @since 0.
|
|
398
|
+
* @since 0.3.0
|
|
411
399
|
*/
|
|
412
400
|
declare const CNGX_TOC_CONFIG: InjectionToken<CngxTocConfig>;
|
|
413
401
|
|
|
@@ -420,8 +408,7 @@ declare const CNGX_TOC_CONFIG: InjectionToken<CngxTocConfig>;
|
|
|
420
408
|
* `CngxBreadcrumbConfigFeature` so the consumer's mental model is one across
|
|
421
409
|
* feature areas.
|
|
422
410
|
*
|
|
423
|
-
* @
|
|
424
|
-
* @since 0.1.0
|
|
411
|
+
* @since 0.3.0
|
|
425
412
|
*/
|
|
426
413
|
type CngxTocConfigFeature = {
|
|
427
414
|
readonly kind: 'ariaLabels';
|
|
@@ -463,8 +450,7 @@ type CngxTocConfigFeature = {
|
|
|
463
450
|
* });
|
|
464
451
|
* ```
|
|
465
452
|
*
|
|
466
|
-
* @
|
|
467
|
-
* @since 0.1.0
|
|
453
|
+
* @since 0.3.0
|
|
468
454
|
*/
|
|
469
455
|
declare function provideTocConfig(...features: CngxTocConfigFeature[]): EnvironmentProviders;
|
|
470
456
|
/**
|
|
@@ -485,8 +471,7 @@ declare function provideTocConfig(...features: CngxTocConfigFeature[]): Environm
|
|
|
485
471
|
* class Guide {}
|
|
486
472
|
* ```
|
|
487
473
|
*
|
|
488
|
-
* @
|
|
489
|
-
* @since 0.1.0
|
|
474
|
+
* @since 0.3.0
|
|
490
475
|
*/
|
|
491
476
|
declare function provideTocConfigAt(...features: CngxTocConfigFeature[]): Provider[];
|
|
492
477
|
|
|
@@ -499,8 +484,7 @@ declare function provideTocConfigAt(...features: CngxTocConfigFeature[]): Provid
|
|
|
499
484
|
* provideTocConfig(withTocAriaLabels({ nav: 'Auf dieser Seite' }));
|
|
500
485
|
* ```
|
|
501
486
|
*
|
|
502
|
-
* @
|
|
503
|
-
* @since 0.1.0
|
|
487
|
+
* @since 0.3.0
|
|
504
488
|
*/
|
|
505
489
|
declare function withTocAriaLabels(payload: CngxTocAriaLabels | Signal<CngxTocAriaLabels>): CngxTocConfigFeature;
|
|
506
490
|
/**
|
|
@@ -513,8 +497,7 @@ declare function withTocAriaLabels(payload: CngxTocAriaLabels | Signal<CngxTocAr
|
|
|
513
497
|
* provideTocConfig(withTocScrollBehavior('auto'));
|
|
514
498
|
* ```
|
|
515
499
|
*
|
|
516
|
-
* @
|
|
517
|
-
* @since 0.1.0
|
|
500
|
+
* @since 0.3.0
|
|
518
501
|
*/
|
|
519
502
|
declare function withTocScrollBehavior(scrollBehavior: NonNullable<CngxTocConfig['scrollBehavior']>): CngxTocConfigFeature;
|
|
520
503
|
/**
|
|
@@ -527,8 +510,7 @@ declare function withTocScrollBehavior(scrollBehavior: NonNullable<CngxTocConfig
|
|
|
527
510
|
* provideTocConfig(withTocSpy({ rootMargin: '-80px 0px 0px 0px' }));
|
|
528
511
|
* ```
|
|
529
512
|
*
|
|
530
|
-
* @
|
|
531
|
-
* @since 0.1.0
|
|
513
|
+
* @since 0.3.0
|
|
532
514
|
*/
|
|
533
515
|
declare function withTocSpy(payload: NonNullable<CngxTocConfig['spy']>): CngxTocConfigFeature;
|
|
534
516
|
/**
|
|
@@ -552,8 +534,7 @@ declare function withTocSpy(payload: NonNullable<CngxTocConfig['spy']>): CngxToc
|
|
|
552
534
|
* // <ng-container *ngTemplateOutlet="tocTpl; injector: tocScope()" />
|
|
553
535
|
* ```
|
|
554
536
|
*
|
|
555
|
-
* @
|
|
556
|
-
* @since 0.1.0
|
|
537
|
+
* @since 0.3.0
|
|
557
538
|
*/
|
|
558
539
|
declare function withTocTemplates(payload: NonNullable<CngxTocConfig['templates']>): CngxTocConfigFeature;
|
|
559
540
|
|
|
@@ -571,8 +552,7 @@ declare function withTocTemplates(payload: NonNullable<CngxTocConfig['templates'
|
|
|
571
552
|
* }
|
|
572
553
|
* ```
|
|
573
554
|
*
|
|
574
|
-
* @
|
|
575
|
-
* @since 0.1.0
|
|
555
|
+
* @since 0.3.0
|
|
576
556
|
*/
|
|
577
557
|
declare function injectTocConfig(): CngxTocConfig;
|
|
578
558
|
/**
|
|
@@ -582,8 +562,7 @@ declare function injectTocConfig(): CngxTocConfig;
|
|
|
582
562
|
* language switch. Runs in injection context; read it inside a `computed()`, a template
|
|
583
563
|
* or a handler.
|
|
584
564
|
*
|
|
585
|
-
* @
|
|
586
|
-
* @since 0.1.0
|
|
565
|
+
* @since 0.3.0
|
|
587
566
|
*/
|
|
588
567
|
declare function injectTocAriaLabels(): Signal<Required<CngxTocAriaLabels>>;
|
|
589
568
|
|
package/types/cngx-ui.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export * from '@cngx/ui/speak';
|
|
|
6
6
|
export { CngxFailed, CngxPending, CngxSucceeded } from '@cngx/common/interactive';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* `@cngx/ui`
|
|
10
10
|
*
|
|
11
11
|
* Organism layer of cngx: 26 secondary entry points (layout, overlay,
|
|
12
12
|
* feedback, stepper/mat-stepper, tabs/mat-tabs, accordion/mat-accordion,
|