@cngx/ui 0.1.0-rc.5 → 0.1.0-rc.7
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 +112 -0
- package/a11y/README.md +81 -0
- package/context-menu/README.md +98 -0
- package/data-grid-accordion/README.md +27 -0
- package/feedback/README.md +2 -0
- package/fesm2022/cngx-ui-a11y.mjs +320 -0
- package/fesm2022/cngx-ui-a11y.mjs.map +1 -0
- package/fesm2022/cngx-ui-accordion.mjs +19 -8
- package/fesm2022/cngx-ui-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-action-button.mjs +5 -2
- package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
- package/fesm2022/cngx-ui-breadcrumb.mjs +11 -6
- package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/cngx-ui-chart-panel.mjs +429 -0
- package/fesm2022/cngx-ui-chart-panel.mjs.map +1 -0
- package/fesm2022/cngx-ui-collection.mjs +15 -6
- package/fesm2022/cngx-ui-collection.mjs.map +1 -1
- package/fesm2022/cngx-ui-command-palette.mjs +1005 -0
- package/fesm2022/cngx-ui-command-palette.mjs.map +1 -0
- package/fesm2022/cngx-ui-context-menu.mjs +742 -0
- package/fesm2022/cngx-ui-context-menu.mjs.map +1 -0
- package/fesm2022/cngx-ui-data-grid-accordion.mjs +90 -20
- package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-feedback.mjs +97 -106
- package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
- package/fesm2022/cngx-ui-layout.mjs +18 -9
- package/fesm2022/cngx-ui-layout.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-accordion.mjs +9 -9
- package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-tabs.mjs +64 -70
- package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-paginator.mjs +18 -8
- package/fesm2022/cngx-ui-paginator.mjs.map +1 -1
- package/fesm2022/cngx-ui-sidenav.mjs +2 -2
- package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
- package/fesm2022/cngx-ui-skeleton.mjs +20 -7
- package/fesm2022/cngx-ui-skeleton.mjs.map +1 -1
- package/fesm2022/cngx-ui-speak.mjs +2 -2
- package/fesm2022/cngx-ui-speak.mjs.map +1 -1
- package/fesm2022/cngx-ui-stat-card.mjs +618 -0
- package/fesm2022/cngx-ui-stat-card.mjs.map +1 -0
- package/fesm2022/cngx-ui-stepper.mjs +38 -19
- package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-tabs.mjs +36 -19
- package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-timeline.mjs +495 -0
- package/fesm2022/cngx-ui-timeline.mjs.map +1 -0
- package/fesm2022/cngx-ui-toc.mjs +704 -0
- package/fesm2022/cngx-ui-toc.mjs.map +1 -0
- package/fesm2022/cngx-ui.mjs +2 -2
- package/fesm2022/cngx-ui.mjs.map +1 -1
- package/mat-accordion/README.md +1 -1
- package/mat-tabs/styles/mat-tabs.css +20 -17
- package/package.json +32 -1
- package/skeleton/README.md +2 -0
- package/stepper/README.md +2 -2
- package/timeline/README.md +350 -0
- package/toc/README.md +183 -0
- package/types/cngx-ui-a11y.d.ts +303 -0
- package/types/cngx-ui-accordion.d.ts +9 -4
- package/types/cngx-ui-action-button.d.ts +3 -0
- package/types/cngx-ui-breadcrumb.d.ts +5 -0
- package/types/cngx-ui-chart-panel.d.ts +278 -0
- package/types/cngx-ui-collection.d.ts +12 -3
- package/types/cngx-ui-command-palette.d.ts +451 -0
- package/types/cngx-ui-context-menu.d.ts +467 -0
- package/types/cngx-ui-data-grid-accordion.d.ts +72 -15
- package/types/cngx-ui-feedback.d.ts +71 -18
- package/types/cngx-ui-layout.d.ts +8 -3
- package/types/cngx-ui-mat-accordion.d.ts +3 -3
- package/types/cngx-ui-mat-tabs.d.ts +11 -9
- package/types/cngx-ui-paginator.d.ts +13 -3
- package/types/cngx-ui-skeleton.d.ts +13 -1
- package/types/cngx-ui-stat-card.d.ts +327 -0
- package/types/cngx-ui-stepper.d.ts +18 -4
- package/types/cngx-ui-tabs.d.ts +20 -4
- package/types/cngx-ui-timeline.d.ts +479 -0
- package/types/cngx-ui-toc.d.ts +514 -0
- package/types/cngx-ui.d.ts +1 -1
|
@@ -17,9 +17,9 @@ type LoadingIndicatorVariant = 'spinner' | 'bar';
|
|
|
17
17
|
* - `spinner` - rotating circle, inline or centered
|
|
18
18
|
* - `bar` - thin line at the top of the container (YouTube-style)
|
|
19
19
|
*
|
|
20
|
-
* Timing:
|
|
21
|
-
* - `delay` (default
|
|
22
|
-
* - `
|
|
20
|
+
* Timing (defaults from `CNGX_LOADING_CONFIG`):
|
|
21
|
+
* - `delay` (default 120ms): operations faster than this never show the indicator
|
|
22
|
+
* - `minDwell` (default 400ms): once visible, stays for at least this long
|
|
23
23
|
*
|
|
24
24
|
* For content-blocking overlays, use `cngx-loading-overlay` instead.
|
|
25
25
|
*
|
|
@@ -45,6 +45,7 @@ type LoadingIndicatorVariant = 'spinner' | 'bar';
|
|
|
45
45
|
*/
|
|
46
46
|
declare class CngxLoadingIndicator {
|
|
47
47
|
private readonly config;
|
|
48
|
+
private readonly loadingConfig;
|
|
48
49
|
/** Bind an async state - shows indicator when `isBusy()`. */
|
|
49
50
|
readonly state: _angular_core.InputSignal<CngxAsyncState<unknown> | undefined>;
|
|
50
51
|
/** Direct boolean control - alternative to `[state]`. */
|
|
@@ -53,18 +54,25 @@ declare class CngxLoadingIndicator {
|
|
|
53
54
|
readonly variant: _angular_core.InputSignal<LoadingIndicatorVariant>;
|
|
54
55
|
/** Screen reader label. */
|
|
55
56
|
readonly label: _angular_core.InputSignal<string>;
|
|
56
|
-
/** Delay in ms before showing the indicator.
|
|
57
|
+
/** Delay in ms before showing the indicator. Defaults to `CNGX_LOADING_CONFIG.showDelay`. */
|
|
57
58
|
readonly delay: _angular_core.InputSignal<number>;
|
|
58
|
-
/** Minimum display time in ms once visible.
|
|
59
|
-
readonly
|
|
59
|
+
/** Minimum display time in ms once visible. Defaults to `CNGX_LOADING_CONFIG.minDwell`. */
|
|
60
|
+
readonly minDwell: _angular_core.InputSignal<number>;
|
|
61
|
+
/**
|
|
62
|
+
* @deprecated Use `minDwell`. Kept one release for migration; when set, it
|
|
63
|
+
* takes precedence over `minDwell`.
|
|
64
|
+
*/
|
|
65
|
+
readonly minDuration: _angular_core.InputSignal<number | undefined>;
|
|
60
66
|
/** @internal - true when the underlying source says "loading". */
|
|
61
67
|
protected readonly isActive: _angular_core.Signal<boolean>;
|
|
62
68
|
/** @internal - custom spinner component from global config. */
|
|
63
69
|
protected readonly customSpinner: _angular_core.Signal<_angular_core.Type<unknown> | null>;
|
|
64
|
-
/** @internal -
|
|
70
|
+
/** @internal - deprecated `minDuration` alias forwards to `minDwell`. */
|
|
71
|
+
protected readonly effectiveMinDwell: _angular_core.Signal<number>;
|
|
72
|
+
/** @internal - final visibility after delay + minDwell. */
|
|
65
73
|
readonly visible: _angular_core.Signal<boolean>;
|
|
66
74
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxLoadingIndicator, never>;
|
|
67
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxLoadingIndicator, "cngx-loading-indicator", never, { "state": { "alias": "state"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "delay": { "alias": "delay"; "required": false; "isSignal": true; }; "minDuration": { "alias": "minDuration"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
75
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxLoadingIndicator, "cngx-loading-indicator", never, { "state": { "alias": "state"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "delay": { "alias": "delay"; "required": false; "isSignal": true; }; "minDwell": { "alias": "minDwell"; "required": false; "isSignal": true; }; "minDuration": { "alias": "minDuration"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
68
76
|
}
|
|
69
77
|
|
|
70
78
|
/**
|
|
@@ -109,17 +117,22 @@ declare class CngxLoadingIndicator {
|
|
|
109
117
|
*/
|
|
110
118
|
declare class CngxLoadingOverlay {
|
|
111
119
|
private readonly doc;
|
|
112
|
-
private readonly
|
|
120
|
+
private readonly loadingConfig;
|
|
113
121
|
/** Bind an async state - shows overlay when `isBusy()`. */
|
|
114
122
|
readonly state: _angular_core.InputSignal<CngxAsyncState<unknown> | undefined>;
|
|
115
123
|
/** Direct boolean control - alternative to `[state]`. */
|
|
116
124
|
readonly loading: _angular_core.InputSignal<boolean>;
|
|
117
125
|
/** Screen reader label for the spinner. */
|
|
118
126
|
readonly label: _angular_core.InputSignal<string>;
|
|
119
|
-
/** Delay in ms before showing the overlay.
|
|
127
|
+
/** Delay in ms before showing the overlay. Defaults to `CNGX_LOADING_CONFIG.showDelay`. */
|
|
120
128
|
readonly delay: _angular_core.InputSignal<number>;
|
|
121
|
-
/** Minimum display time in ms once visible.
|
|
122
|
-
readonly
|
|
129
|
+
/** Minimum display time in ms once visible. Defaults to `CNGX_LOADING_CONFIG.minDwell`. */
|
|
130
|
+
readonly minDwell: _angular_core.InputSignal<number>;
|
|
131
|
+
/**
|
|
132
|
+
* @deprecated Use `minDwell`. Kept one release for migration; when set, it
|
|
133
|
+
* takes precedence over `minDwell`.
|
|
134
|
+
*/
|
|
135
|
+
readonly minDuration: _angular_core.InputSignal<number | undefined>;
|
|
123
136
|
/**
|
|
124
137
|
* When `true`, the overlay only activates during the first load (`isFirstLoad()`),
|
|
125
138
|
* not during refreshes. Use the async container's built-in refresh bar for
|
|
@@ -128,14 +141,16 @@ declare class CngxLoadingOverlay {
|
|
|
128
141
|
readonly firstLoadOnly: _angular_core.InputSignal<boolean>;
|
|
129
142
|
/** @internal */
|
|
130
143
|
protected readonly isActive: _angular_core.Signal<boolean>;
|
|
131
|
-
/** @internal -
|
|
144
|
+
/** @internal - deprecated `minDuration` alias forwards to `minDwell`. */
|
|
145
|
+
protected readonly effectiveMinDwell: _angular_core.Signal<number>;
|
|
146
|
+
/** @internal - debounced visibility via shared gate factory. */
|
|
132
147
|
protected readonly visible: _angular_core.Signal<boolean>;
|
|
133
148
|
private readonly savedFocus;
|
|
134
149
|
private readonly contentWrapper;
|
|
135
150
|
private readonly spinnerEl;
|
|
136
151
|
constructor();
|
|
137
152
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxLoadingOverlay, never>;
|
|
138
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxLoadingOverlay, "cngx-loading-overlay", never, { "state": { "alias": "state"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "delay": { "alias": "delay"; "required": false; "isSignal": true; }; "minDuration": { "alias": "minDuration"; "required": false; "isSignal": true; }; "firstLoadOnly": { "alias": "firstLoadOnly"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
153
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxLoadingOverlay, "cngx-loading-overlay", never, { "state": { "alias": "state"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "delay": { "alias": "delay"; "required": false; "isSignal": true; }; "minDwell": { "alias": "minDwell"; "required": false; "isSignal": true; }; "minDuration": { "alias": "minDuration"; "required": false; "isSignal": true; }; "firstLoadOnly": { "alias": "firstLoadOnly"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
139
154
|
}
|
|
140
155
|
|
|
141
156
|
/**
|
|
@@ -391,9 +406,19 @@ interface FeedbackConfig {
|
|
|
391
406
|
spinnerComponent?: Type<unknown>;
|
|
392
407
|
/** Custom icon components per alert severity. Replaces built-in SVG icons. */
|
|
393
408
|
alertIcons?: Partial<Record<AlertSeverity, Type<unknown>>>;
|
|
394
|
-
/**
|
|
409
|
+
/**
|
|
410
|
+
* Default delay in ms before showing loading indicators.
|
|
411
|
+
*
|
|
412
|
+
* @deprecated Use `provideLoadingConfig(withShowDelay(...))` from `@cngx/core/utils`.
|
|
413
|
+
* Kept one release as a forwarder; `withLoadingDefaults` still writes it.
|
|
414
|
+
*/
|
|
395
415
|
loadingDelay?: number;
|
|
396
|
-
/**
|
|
416
|
+
/**
|
|
417
|
+
* Default minimum display time in ms for loading indicators.
|
|
418
|
+
*
|
|
419
|
+
* @deprecated Use `provideLoadingConfig(withMinDwell(...))` from `@cngx/core/utils`.
|
|
420
|
+
* Kept one release as a forwarder; `withLoadingDefaults` still writes it.
|
|
421
|
+
*/
|
|
397
422
|
loadingMinDuration?: number;
|
|
398
423
|
/** Custom close/dismiss icon component - replaces default X SVG globally. */
|
|
399
424
|
closeIconComponent?: Type<unknown>;
|
|
@@ -481,7 +506,18 @@ declare function withAlertIcons(icons: Partial<Record<AlertSeverity, Type<unknow
|
|
|
481
506
|
/**
|
|
482
507
|
* Set default timing for all loading indicators and overlays.
|
|
483
508
|
*
|
|
484
|
-
*
|
|
509
|
+
* Forwards into the Level-1 `CNGX_LOADING_CONFIG` cascade so the gated
|
|
510
|
+
* surfaces (indicator, overlay, async-container, skeleton) all read the same
|
|
511
|
+
* defaults. Prefer `provideLoadingConfig(withShowDelay(...), withMinDwell(...))`
|
|
512
|
+
* from `@cngx/core/utils` directly; this feature is kept for back-compat.
|
|
513
|
+
*
|
|
514
|
+
* Note: this forwarder provides a full `CNGX_LOADING_CONFIG` value, so under
|
|
515
|
+
* DI last-wins it replaces the whole config - including `spinnerVsSkeletonCutoff`,
|
|
516
|
+
* which resets to its default. Set the cutoff through
|
|
517
|
+
* `provideLoadingConfig(withSpinnerVsSkeletonCutoff(...))` rather than combining
|
|
518
|
+
* it with this back-compat forwarder.
|
|
519
|
+
*
|
|
520
|
+
* Individual components can still override via their `[delay]` and `[minDwell]` inputs.
|
|
485
521
|
*
|
|
486
522
|
* ```ts
|
|
487
523
|
* provideFeedback(withLoadingDefaults({ delay: 300, minDuration: 600 }))
|
|
@@ -1437,6 +1473,10 @@ declare class CngxAsyncErrorTpl {
|
|
|
1437
1473
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/feedback/async-container/async-container.ts
|
|
1438
1474
|
* @since 0.1.0
|
|
1439
1475
|
* @relatedTo CngxLoadingIndicator, CngxLoadingOverlay, CngxAlert, CngxToaster
|
|
1476
|
+
* @slot cngxAsyncContent Rendered on success; gets the resolved value.
|
|
1477
|
+
* @slot cngxAsyncSkeleton Rendered during the first load.
|
|
1478
|
+
* @slot cngxAsyncEmpty Rendered when the value resolves to nothing.
|
|
1479
|
+
* @slot cngxAsyncError Rendered on failure; gets the error and a retry callback.
|
|
1440
1480
|
*
|
|
1441
1481
|
* <example-url>http://localhost:4200/#/forms/filter-builder/filter-builder-async-state/loading-error-content-branches-via-cngx-async-container</example-url>
|
|
1442
1482
|
* <example-url>http://localhost:4200/#/ui/feedback/async-container/cngx-async-container-full-control-toast</example-url>
|
|
@@ -1448,8 +1488,13 @@ declare class CngxAsyncErrorTpl {
|
|
|
1448
1488
|
*/
|
|
1449
1489
|
declare class CngxAsyncContainer<T> {
|
|
1450
1490
|
private readonly toaster;
|
|
1491
|
+
private readonly loadingConfig;
|
|
1451
1492
|
/** The async state to render. */
|
|
1452
1493
|
readonly state: _angular_core.InputSignal<CngxAsyncState<T>>;
|
|
1494
|
+
/** Delay in ms before the skeleton view / refresh bar shows. Defaults to `CNGX_LOADING_CONFIG.showDelay`. */
|
|
1495
|
+
readonly showDelay: _angular_core.InputSignal<number>;
|
|
1496
|
+
/** Minimum time in ms the skeleton view / refresh bar stays once shown. Defaults to `CNGX_LOADING_CONFIG.minDwell`. */
|
|
1497
|
+
readonly minDwell: _angular_core.InputSignal<number>;
|
|
1453
1498
|
/** Show refresh indicator bar during refresh/re-query. */
|
|
1454
1499
|
readonly refreshIndicator: _angular_core.InputSignal<boolean>;
|
|
1455
1500
|
/** ARIA label for the region. */
|
|
@@ -1470,6 +1515,14 @@ declare class CngxAsyncContainer<T> {
|
|
|
1470
1515
|
protected readonly activeView: _angular_core.Signal<AsyncView>;
|
|
1471
1516
|
/** @internal */
|
|
1472
1517
|
protected readonly showRefreshIndicator: _angular_core.Signal<boolean>;
|
|
1518
|
+
/**
|
|
1519
|
+
* @internal - flash-suppressed first-load skeleton view. A sub-`showDelay` first
|
|
1520
|
+
* load never renders the skeleton outlet; once shown it holds for `minDwell`. The
|
|
1521
|
+
* region `aria-busy` stays truthful (`state().isBusy()`); only the visual is gated.
|
|
1522
|
+
*/
|
|
1523
|
+
protected readonly skeletonVisible: _angular_core.Signal<boolean>;
|
|
1524
|
+
/** @internal - flash-suppressed refresh bar, gated by the same showDelay + minDwell. */
|
|
1525
|
+
protected readonly refreshVisible: _angular_core.Signal<boolean>;
|
|
1473
1526
|
/** @internal */
|
|
1474
1527
|
protected readonly contentContext: _angular_core.Signal<{
|
|
1475
1528
|
$implicit: T;
|
|
@@ -1483,7 +1536,7 @@ declare class CngxAsyncContainer<T> {
|
|
|
1483
1536
|
constructor();
|
|
1484
1537
|
private fireToast;
|
|
1485
1538
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxAsyncContainer<any>, never>;
|
|
1486
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxAsyncContainer<any>, "cngx-async-container", never, { "state": { "alias": "state"; "required": true; "isSignal": true; }; "refreshIndicator": { "alias": "refreshIndicator"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "toastSuccess": { "alias": "toastSuccess"; "required": false; "isSignal": true; }; "toastError": { "alias": "toastError"; "required": false; "isSignal": true; }; }, {}, ["skeletonTpl", "contentTpl", "emptyTpl", "errorTpl"], never, true, never>;
|
|
1539
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxAsyncContainer<any>, "cngx-async-container", never, { "state": { "alias": "state"; "required": true; "isSignal": true; }; "showDelay": { "alias": "showDelay"; "required": false; "isSignal": true; }; "minDwell": { "alias": "minDwell"; "required": false; "isSignal": true; }; "refreshIndicator": { "alias": "refreshIndicator"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "toastSuccess": { "alias": "toastSuccess"; "required": false; "isSignal": true; }; "toastError": { "alias": "toastError"; "required": false; "isSignal": true; }; }, {}, ["skeletonTpl", "contentTpl", "emptyTpl", "errorTpl"], never, true, never>;
|
|
1487
1540
|
}
|
|
1488
1541
|
|
|
1489
1542
|
export { CNGX_FEEDBACK_CONFIG, CngxAlert, CngxAlertAction, CngxAlertIcon, CngxAlertOn, CngxAlertStack, CngxAlerter, CngxAsyncContainer, CngxAsyncContentTpl, CngxAsyncEmptyTpl, CngxAsyncErrorTpl, CngxAsyncSkeletonTpl, CngxBanner, CngxBannerOn, CngxBannerOutlet, CngxBannerTrigger, CngxLoadingIndicator, CngxLoadingOverlay, CngxProgress, CngxToast, CngxToastOn, CngxToastOutlet, CngxToaster, provideFeedback, provideToasts, withAlertIcons, withAlerts, withBanners, withCloseIcon, withLoadingDefaults, withSpinnerTemplate, withToasts };
|
|
@@ -22,8 +22,9 @@ type StackGap = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
|
22
22
|
* Composable flex-based stack layout component.
|
|
23
23
|
*
|
|
24
24
|
* Gap tokens use CSS custom properties (`--cngx-gap-xs` through `--cngx-gap-xl`)
|
|
25
|
-
*
|
|
26
|
-
*
|
|
25
|
+
* that fall back to the density scale (`--cngx-space-*`), so a root
|
|
26
|
+
* `[data-density]` swap rescales the stack. Override the `--cngx-gap-*`
|
|
27
|
+
* hooks at any scope to detach a stack from the scale.
|
|
27
28
|
*
|
|
28
29
|
* <cngx-stack direction="row" gap="md" align="center">
|
|
29
30
|
* <div>Item 1</div>
|
|
@@ -74,7 +75,11 @@ declare class CngxStack {
|
|
|
74
75
|
declare class CngxGrid {
|
|
75
76
|
/** Number of equal columns, or a custom `grid-template-columns` value. */
|
|
76
77
|
readonly columns: _angular_core.InputSignalWithTransform<string | number, string | number>;
|
|
77
|
-
/**
|
|
78
|
+
/**
|
|
79
|
+
* CSS gap between cells. The default reads the `--cngx-gap-md` override
|
|
80
|
+
* hook and falls back to the density scale (`--cngx-space-md`), so a root
|
|
81
|
+
* `[data-density]` swap rescales the grid; any CSS gap value is accepted.
|
|
82
|
+
*/
|
|
78
83
|
readonly gap: _angular_core.InputSignal<string>;
|
|
79
84
|
/** @internal */
|
|
80
85
|
protected readonly gridTemplateColumns: _angular_core.Signal<string>;
|
|
@@ -6,7 +6,7 @@ import * as i1 from '@cngx/common/interactive';
|
|
|
6
6
|
* a vanilla `<mat-accordion>` and it is driven by the headless
|
|
7
7
|
* {@link CngxAccordion} brain. Consumers gain the controlled
|
|
8
8
|
* `[(openIds)]` group model and single-open arbitration on Material
|
|
9
|
-
* markup
|
|
9
|
+
* markup - neither of which `<mat-accordion>` exposes (Material has only
|
|
10
10
|
* per-panel `[expanded]`). Mirrors `[cngxMatStepper]` / `[cngxMatTabs]`.
|
|
11
11
|
*
|
|
12
12
|
* This is the instrumentation pattern: Material owns rendering and the
|
|
@@ -29,7 +29,7 @@ import * as i1 from '@cngx/common/interactive';
|
|
|
29
29
|
*
|
|
30
30
|
* `multi` is authoritative on the cngx side. `MatAccordion` inherits its
|
|
31
31
|
* own `multi` input from `CdkAccordion`, and both directives sit on the
|
|
32
|
-
* same host element, so a single `[multi]` binding feeds both
|
|
32
|
+
* same host element, so a single `[multi]` binding feeds both - the
|
|
33
33
|
* directive therefore pins `matAccordion.multi = true` (via an `effect`
|
|
34
34
|
* that re-asserts on every `multi` change) so Material never runs its own
|
|
35
35
|
* single-open close while the cngx `effectiveOpenIds` clamp arbitrates.
|
|
@@ -46,7 +46,7 @@ declare class CngxMatAccordion {
|
|
|
46
46
|
private readonly matAccordion;
|
|
47
47
|
/**
|
|
48
48
|
* The accordion brain on this host element (declared in
|
|
49
|
-
* `hostDirectives`). Same-host ownership
|
|
49
|
+
* `hostDirectives`). Same-host ownership - not a child→parent inject -
|
|
50
50
|
* so it stays decompose-safe.
|
|
51
51
|
*/
|
|
52
52
|
private readonly accordion;
|
|
@@ -188,6 +188,8 @@ declare class CngxMatTabsRegistry implements CngxMatTabsRegistryHost {
|
|
|
188
188
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/mat-tabs/mat-tabs.directive.ts
|
|
189
189
|
* @since 0.1.0
|
|
190
190
|
* @relatedTo CngxMatTabsRegistry, CngxMatTabError, CngxMatStepper
|
|
191
|
+
* @slot cngxMatTabAggregatorContent Replaces the aggregated error summary projected into a Material tab.
|
|
192
|
+
* @slot cngxMatTabRejectionContent Replaces the rejection notice on a rolled-back Material tab.
|
|
191
193
|
*/
|
|
192
194
|
declare class CngxMatTabs {
|
|
193
195
|
private readonly matTabGroup;
|
|
@@ -593,7 +595,7 @@ declare class CngxMatTabRejectionContent {
|
|
|
593
595
|
* Sink callback invoked by `[cngxMatTabs]`'s aggregator-decoration
|
|
594
596
|
* projector when a consumer wires exactly one of
|
|
595
597
|
* `*cngxMatTabAggregatorContent` (the slot template) or
|
|
596
|
-
* `ViewContainerRef` (the embedded-view host)
|
|
598
|
+
* `ViewContainerRef` (the embedded-view host) - the half-wired-slot
|
|
597
599
|
* misconfiguration. The projector silently falls back to the
|
|
598
600
|
* imperative `textContent` path when this happens; the sink is the
|
|
599
601
|
* only deliberate signal that the consumer's slot template will not
|
|
@@ -767,7 +769,7 @@ declare function injectMatTabsConfig(): Required<CngxMatTabsConfig>;
|
|
|
767
769
|
* type façades and the selector constants. The TS namespace also
|
|
768
770
|
* lets cross-package consumers (`@cngx/ui/mat-stepper`) read the
|
|
769
771
|
* grouped name through ESLint's `@typescript-eslint` type resolver
|
|
770
|
-
*
|
|
772
|
+
* - a flat `export * as` re-export from `public-api.ts` does not
|
|
771
773
|
* resolve nested members through the path-alias.
|
|
772
774
|
*
|
|
773
775
|
* @category ui/mat-tabs
|
|
@@ -793,7 +795,7 @@ declare namespace MaterialPrivateSurfaces {
|
|
|
793
795
|
* `afterNextRender` to forward consumer-projected
|
|
794
796
|
* `<ng-template matStepperIcon>` declarations through the wrapper
|
|
795
797
|
* into Material's per-header indicator bindings (the only
|
|
796
|
-
* deterministic forwarding path
|
|
798
|
+
* deterministic forwarding path - `<ng-content>` projection
|
|
797
799
|
* inside `<mat-stepper>` does not reach
|
|
798
800
|
* `@ContentChildren(MatStepperIcon)` due to content-init
|
|
799
801
|
* lifecycle ordering).
|
|
@@ -808,23 +810,23 @@ declare namespace MaterialPrivateSurfaces {
|
|
|
808
810
|
* it through the getter and re-fires whenever Material flips
|
|
809
811
|
* completion. Documented limitation: `hasError` writes that are
|
|
810
812
|
* not paired with a `completed` change do not retrigger the
|
|
811
|
-
* computed
|
|
813
|
+
* computed - sharper note lives on `createMatStepHandle`'s JSDoc.
|
|
812
814
|
*/
|
|
813
815
|
interface CompletedOverrideSource {
|
|
814
816
|
readonly _completedOverride: WritableSignal<boolean | null>;
|
|
815
817
|
}
|
|
816
818
|
/**
|
|
817
|
-
* `.mat-mdc-tab`
|
|
819
|
+
* `.mat-mdc-tab` - the class Material applies to the rendered
|
|
818
820
|
* tab `<button>` elements inside `MatTabHeader`. cngx
|
|
819
821
|
* index-correlates `presenter.tabs()` registration order against
|
|
820
822
|
* `host.querySelectorAll('.mat-mdc-tab')` because `MatTab` is a
|
|
821
|
-
* portal
|
|
823
|
+
* portal - the rendered buttons live inside `MatTabHeader`'s
|
|
822
824
|
* template, not on the `<mat-tab>` declaration site, and Material
|
|
823
825
|
* exposes no public per-tab element accessor.
|
|
824
826
|
*/
|
|
825
827
|
const MAT_MDC_TAB_SELECTOR = ".mat-mdc-tab";
|
|
826
828
|
/**
|
|
827
|
-
* `.mat-mdc-tab-header`
|
|
829
|
+
* `.mat-mdc-tab-header` - the strip element rendered by
|
|
828
830
|
* `MatTabHeader`. `[cngxMatTabs]` walks
|
|
829
831
|
* `host.querySelector('.mat-mdc-tab-header')` to locate the mount
|
|
830
832
|
* anchor for the cngx overflow molecule (so the More button pins
|
|
@@ -833,7 +835,7 @@ declare namespace MaterialPrivateSurfaces {
|
|
|
833
835
|
*/
|
|
834
836
|
const MAT_MDC_TAB_HEADER_SELECTOR = ".mat-mdc-tab-header";
|
|
835
837
|
/**
|
|
836
|
-
* `.mat-mdc-tab-label-container`
|
|
838
|
+
* `.mat-mdc-tab-label-container` - Material's IO-friendly scroll
|
|
837
839
|
* viewport ancestor of the rendered tab buttons. The Material-
|
|
838
840
|
* twin overflow adapter walks `host → header → any tab → closest
|
|
839
841
|
* label-container` to attach the molecule's
|
|
@@ -848,7 +850,7 @@ declare namespace MaterialPrivateSurfaces {
|
|
|
848
850
|
*
|
|
849
851
|
* `resolveStripRoot` walks from host up to `<mat-tab-header>` and
|
|
850
852
|
* locates `.mat-mdc-tab-label-container` via any rendered
|
|
851
|
-
* `.mat-mdc-tab` descendant
|
|
853
|
+
* `.mat-mdc-tab` descendant - Material's IO-friendly scroll
|
|
852
854
|
* container.
|
|
853
855
|
*
|
|
854
856
|
* `resolveTabButton` indexes positionally; Material owns the DOM
|
|
@@ -14,9 +14,19 @@ type CngxPaginatorDensity = 'compact' | 'default' | 'comfortable';
|
|
|
14
14
|
* consumer from projected segment parts in DOM order - no `show*` config inputs.
|
|
15
15
|
* `skin` / `density` are single paint attributes reflected onto `[data-skin]` / `[data-density]`. \
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
17
|
+
* Page bindings are longhand pairs -
|
|
18
|
+
* `[pageIndex]="pageIndex()" (pageIndexChange)="pageIndex.set($event)"` and
|
|
19
|
+
* `[pageSize]="pageSize()" (pageSizeChange)="pageSize.set($event)"`. \
|
|
20
|
+
* The two-way shorthand (banana-in-a-box) fails NG8007 under `strictTemplates`,
|
|
21
|
+
* the consumer-app default: the property half resolves to the `CngxPaginate`
|
|
22
|
+
* host directive (`cngxPageIndex` -> `pageIndex`, `cngxPageSize` -> `pageSize`)
|
|
23
|
+
* while the shell owns the matching `pageIndexChange` / `pageSizeChange`
|
|
24
|
+
* outputs, and Angular requires both halves of the shorthand on one directive
|
|
25
|
+
* instance. \
|
|
26
|
+
* Binding `[pageSize]` alone makes the value controlled: a `cngx-pgn-page-size`
|
|
27
|
+
* pick is swallowed on the next pass because the brain stays pinned to the
|
|
28
|
+
* input. Bind both halves for any page size other than the brain's default. \
|
|
29
|
+
* The shell is the single emitter of both outputs,
|
|
20
30
|
* wired through the shared `connectPaginateEmit` bridge (identical to `CngxIncrementalList`). \
|
|
21
31
|
* The bridge feeds each output once from two paths:
|
|
22
32
|
* (1) a subscription forwards the brain's nav-only `pageChange` /
|
|
@@ -117,12 +117,14 @@ interface CngxSkeletonPlaceholderContext {
|
|
|
117
117
|
* @github https://github.com/cngxjs/cngx/blob/main/projects/ui/skeleton/skeleton-container.ts
|
|
118
118
|
* @since 0.1.0
|
|
119
119
|
* @relatedTo CngxSkeletonPlaceholder, CngxAsyncState, CngxEmptyState
|
|
120
|
+
* @slot cngxSkeletonPlaceholder Replaces the generated placeholder shape.
|
|
120
121
|
* <example-url>http://localhost:4200/#/common/layout/skeleton/basic-skeleton</example-url>
|
|
121
122
|
* <example-url>http://localhost:4200/#/common/layout/skeleton/skeleton-container</example-url>
|
|
122
123
|
* <example-url>http://localhost:4200/#/ui/skeleton/card-skeleton</example-url>
|
|
123
124
|
* <example-url>http://localhost:4200/#/ui/skeleton/template-context</example-url>
|
|
124
125
|
*/
|
|
125
126
|
declare class CngxSkeletonContainer {
|
|
127
|
+
private readonly loadingConfig;
|
|
126
128
|
/** Controls the loading state directly. */
|
|
127
129
|
readonly loading: _angular_core.InputSignal<boolean>;
|
|
128
130
|
/** Bind an async state - shows skeleton during first load. Takes precedence over `loading`. */
|
|
@@ -131,8 +133,18 @@ declare class CngxSkeletonContainer {
|
|
|
131
133
|
readonly shimmer: _angular_core.InputSignal<boolean>;
|
|
132
134
|
/** Repeat count for the placeholder template. */
|
|
133
135
|
readonly count: _angular_core.InputSignal<number>;
|
|
136
|
+
/** Delay in ms before the placeholder shows. Defaults to `CNGX_LOADING_CONFIG.showDelay`. */
|
|
137
|
+
readonly showDelay: _angular_core.InputSignal<number>;
|
|
138
|
+
/** Minimum time in ms the placeholder stays once shown. Defaults to `CNGX_LOADING_CONFIG.minDwell`. */
|
|
139
|
+
readonly minDwell: _angular_core.InputSignal<number>;
|
|
134
140
|
/** Derived loading state: `state.isFirstLoad` takes precedence over `loading` input. */
|
|
135
141
|
protected readonly isLoading: Signal<boolean>;
|
|
142
|
+
/**
|
|
143
|
+
* @internal - flash-suppressed loading. A sub-`showDelay` blip never renders the
|
|
144
|
+
* placeholder; once shown it holds for `minDwell`. Drives the placeholder, the
|
|
145
|
+
* `--loading` class, and `aria-busy` so AT and DOM agree.
|
|
146
|
+
*/
|
|
147
|
+
protected readonly gatedLoading: Signal<boolean>;
|
|
136
148
|
/** @internal - projected placeholder template. */
|
|
137
149
|
protected readonly placeholderTpl: Signal<CngxSkeletonPlaceholder | undefined>;
|
|
138
150
|
/** Array of indices for internal `@for` rendering. */
|
|
@@ -144,7 +156,7 @@ declare class CngxSkeletonContainer {
|
|
|
144
156
|
/** @internal */
|
|
145
157
|
protected getContext(index: number): CngxSkeletonPlaceholderContext;
|
|
146
158
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxSkeletonContainer, never>;
|
|
147
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxSkeletonContainer, "cngx-skeleton", ["cngxSkeletonContainer"], { "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "shimmer": { "alias": "shimmer"; "required": false; "isSignal": true; }; "count": { "alias": "count"; "required": false; "isSignal": true; }; }, {}, ["placeholderTpl"], ["*"], true, never>;
|
|
159
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxSkeletonContainer, "cngx-skeleton", ["cngxSkeletonContainer"], { "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "shimmer": { "alias": "shimmer"; "required": false; "isSignal": true; }; "count": { "alias": "count"; "required": false; "isSignal": true; }; "showDelay": { "alias": "showDelay"; "required": false; "isSignal": true; }; "minDwell": { "alias": "minDwell"; "required": false; "isSignal": true; }; }, {}, ["placeholderTpl"], ["*"], true, never>;
|
|
148
160
|
}
|
|
149
161
|
|
|
150
162
|
export { CngxSkeletonContainer, CngxSkeletonPlaceholder };
|