@cngx/ui 0.1.0-rc.6 → 0.1.0-rc.8
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 -1
- package/a11y/README.md +87 -0
- package/accordion/README.md +4 -2
- package/breadcrumb/README.md +262 -0
- package/collection/README.md +6 -0
- package/command-palette/README.md +224 -0
- package/context-menu/README.md +98 -0
- package/data-grid-accordion/README.md +103 -2
- package/feedback/README.md +42 -0
- package/fesm2022/cngx-ui-a11y.mjs +452 -0
- package/fesm2022/cngx-ui-a11y.mjs.map +1 -0
- package/fesm2022/cngx-ui-accordion.mjs +116 -38
- package/fesm2022/cngx-ui-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-action-button.mjs +115 -50
- package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
- package/fesm2022/cngx-ui-breadcrumb.mjs +181 -96
- package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -1
- package/fesm2022/cngx-ui-chart-panel.mjs +586 -0
- package/fesm2022/cngx-ui-chart-panel.mjs.map +1 -0
- package/fesm2022/cngx-ui-collection.mjs +207 -66
- package/fesm2022/cngx-ui-collection.mjs.map +1 -1
- package/fesm2022/cngx-ui-command-palette.mjs +1281 -0
- package/fesm2022/cngx-ui-command-palette.mjs.map +1 -0
- package/fesm2022/cngx-ui-context-menu.mjs +857 -0
- package/fesm2022/cngx-ui-context-menu.mjs.map +1 -0
- package/fesm2022/cngx-ui-data-grid-accordion.mjs +498 -111
- package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-empty-state.mjs +16 -6
- package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
- package/fesm2022/cngx-ui-feedback.mjs +1095 -521
- 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 +84 -16
- package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-paginator.mjs +67 -24
- package/fesm2022/cngx-ui-mat-paginator.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-stepper.mjs +72 -47
- package/fesm2022/cngx-ui-mat-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-mat-tabs.mjs +370 -203
- package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-overlay.mjs +69 -13
- package/fesm2022/cngx-ui-overlay.mjs.map +1 -1
- package/fesm2022/cngx-ui-paginator.mjs +501 -182
- package/fesm2022/cngx-ui-paginator.mjs.map +1 -1
- package/fesm2022/cngx-ui-sidenav.mjs +327 -106
- package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
- package/fesm2022/cngx-ui-skeleton.mjs +22 -21
- package/fesm2022/cngx-ui-skeleton.mjs.map +1 -1
- package/fesm2022/cngx-ui-speak.mjs +107 -8
- package/fesm2022/cngx-ui-speak.mjs.map +1 -1
- package/fesm2022/cngx-ui-stat-card.mjs +718 -0
- package/fesm2022/cngx-ui-stat-card.mjs.map +1 -0
- package/fesm2022/cngx-ui-stepper.mjs +217 -76
- package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
- package/fesm2022/cngx-ui-tabs.mjs +40 -19
- package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
- package/fesm2022/cngx-ui-timeline.mjs +548 -0
- package/fesm2022/cngx-ui-timeline.mjs.map +1 -0
- package/fesm2022/cngx-ui-toc.mjs +748 -0
- package/fesm2022/cngx-ui-toc.mjs.map +1 -0
- package/fesm2022/cngx-ui.mjs +16 -21
- package/fesm2022/cngx-ui.mjs.map +1 -1
- package/mat-accordion/README.md +1 -1
- package/mat-paginator/README.md +9 -2
- package/mat-tabs/styles/mat-tabs.css +29 -27
- package/overlay/README.md +9 -4
- package/package.json +32 -1
- package/paginator/README.md +8 -4
- package/sidenav/README.md +33 -11
- package/skeleton/README.md +2 -0
- package/speak/README.md +3 -2
- package/stepper/README.md +15 -3
- package/timeline/README.md +350 -0
- package/toc/README.md +186 -0
- package/types/cngx-ui-a11y.d.ts +394 -0
- package/types/cngx-ui-accordion.d.ts +100 -30
- package/types/cngx-ui-action-button.d.ts +47 -3
- package/types/cngx-ui-breadcrumb.d.ts +159 -58
- package/types/cngx-ui-chart-panel.d.ts +382 -0
- package/types/cngx-ui-collection.d.ts +159 -58
- package/types/cngx-ui-command-palette.d.ts +565 -0
- package/types/cngx-ui-context-menu.d.ts +559 -0
- package/types/cngx-ui-data-grid-accordion.d.ts +344 -51
- package/types/cngx-ui-empty-state.d.ts +9 -2
- package/types/cngx-ui-feedback.d.ts +664 -73
- package/types/cngx-ui-layout.d.ts +8 -3
- package/types/cngx-ui-mat-accordion.d.ts +32 -4
- package/types/cngx-ui-mat-paginator.d.ts +37 -8
- package/types/cngx-ui-mat-stepper.d.ts +23 -11
- package/types/cngx-ui-mat-tabs.d.ts +218 -23
- package/types/cngx-ui-overlay.d.ts +56 -10
- package/types/cngx-ui-paginator.d.ts +416 -132
- package/types/cngx-ui-sidenav.d.ts +248 -74
- package/types/cngx-ui-skeleton.d.ts +18 -7
- package/types/cngx-ui-speak.d.ts +118 -5
- package/types/cngx-ui-stat-card.d.ts +411 -0
- package/types/cngx-ui-stepper.d.ts +81 -29
- package/types/cngx-ui-tabs.d.ts +22 -6
- package/types/cngx-ui-timeline.d.ts +495 -0
- package/types/cngx-ui-toc.d.ts +581 -0
- package/types/cngx-ui.d.ts +8 -5
|
@@ -1,11 +1,33 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Type, EnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { Signal, Type, EnvironmentProviders } from '@angular/core';
|
|
3
3
|
import { OverlayRef, OverlayConfig } from '@angular/cdk/overlay';
|
|
4
4
|
import * as rxjs from 'rxjs';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Construction-time options for a {@link CngxOverlayRef}. Set by
|
|
8
|
+
* {@link CngxOverlay.open}, not by consumers.
|
|
9
|
+
*
|
|
10
|
+
* @category ui/overlay
|
|
11
|
+
*/
|
|
12
|
+
interface CngxOverlayRefConfig {
|
|
13
|
+
/**
|
|
14
|
+
* When `true`, neither Escape nor a backdrop click closes the overlay - the
|
|
15
|
+
* only way out is a programmatic `close()`. Default `false`.
|
|
16
|
+
*/
|
|
17
|
+
readonly disableClose?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Element focus returns to when the overlay closes - captured at open time,
|
|
20
|
+
* before the overlay steals focus. `null` skips restoration.
|
|
21
|
+
*/
|
|
22
|
+
readonly restoreFocusTo?: HTMLElement | null;
|
|
23
|
+
}
|
|
6
24
|
/**
|
|
7
25
|
* Typed wrapper around a CDK OverlayRef that exposes a close result stream.
|
|
8
26
|
*
|
|
27
|
+
* Closes on Escape and on a backdrop click (unless `disableClose`), restores
|
|
28
|
+
* focus to the element that opened it, and surfaces its open state as a signal
|
|
29
|
+
* beside the RxJS `afterClosed$`.
|
|
30
|
+
*
|
|
9
31
|
* @category ui/overlay
|
|
10
32
|
* @docsKind primary
|
|
11
33
|
* @wcag AA
|
|
@@ -18,19 +40,38 @@ declare class CngxOverlayRef<R = unknown> {
|
|
|
18
40
|
private readonly _afterClosed;
|
|
19
41
|
/** Emits once with the close result when the overlay is dismissed, then completes. */
|
|
20
42
|
readonly afterClosed$: rxjs.Observable<R | undefined>;
|
|
21
|
-
|
|
22
|
-
/**
|
|
43
|
+
private readonly openState;
|
|
44
|
+
/**
|
|
45
|
+
* `true` while the overlay is open, `false` once closed. The signal view of
|
|
46
|
+
* the lifecycle beside {@link afterClosed$} - bind it in a template without
|
|
47
|
+
* an `async` pipe.
|
|
48
|
+
*/
|
|
49
|
+
readonly isOpen: Signal<boolean>;
|
|
50
|
+
private readonly restoreFocusTo;
|
|
51
|
+
constructor(cdkRef: OverlayRef, config?: CngxOverlayRefConfig);
|
|
52
|
+
/**
|
|
53
|
+
* Closes the overlay, emitting `result` on `afterClosed$`, disposing the CDK
|
|
54
|
+
* ref, and restoring focus. Idempotent - a second call (e.g. Escape after a
|
|
55
|
+
* scope teardown already closed it) is a no-op.
|
|
56
|
+
*/
|
|
23
57
|
close(result?: R): void;
|
|
24
58
|
}
|
|
25
59
|
|
|
26
60
|
/**
|
|
27
|
-
* Config accepted by {@link CngxOverlay.open}.
|
|
28
|
-
* {@link OverlayConfig} - every field is optional and falls back to
|
|
29
|
-
*
|
|
61
|
+
* Config accepted by {@link CngxOverlay.open}. A partial of CDK's
|
|
62
|
+
* {@link OverlayConfig} - every field is optional and falls back to the CDK
|
|
63
|
+
* overlay default - plus `disableClose`, a cngx addition that turns off the
|
|
64
|
+
* Escape / backdrop dismiss affordances.
|
|
30
65
|
*
|
|
31
66
|
* @category ui/overlay
|
|
32
67
|
*/
|
|
33
|
-
type CngxOverlayConfig = Partial<OverlayConfig
|
|
68
|
+
type CngxOverlayConfig = Partial<OverlayConfig> & {
|
|
69
|
+
/**
|
|
70
|
+
* When `true`, Escape and backdrop clicks do not close the overlay; only a
|
|
71
|
+
* programmatic `close()` does. Default `false`.
|
|
72
|
+
*/
|
|
73
|
+
readonly disableClose?: boolean;
|
|
74
|
+
};
|
|
34
75
|
/**
|
|
35
76
|
* Thin service over CDK Overlay that returns a typed CngxOverlayRef.
|
|
36
77
|
*
|
|
@@ -54,14 +95,19 @@ type CngxOverlayConfig = Partial<OverlayConfig>;
|
|
|
54
95
|
declare class CngxOverlay {
|
|
55
96
|
private readonly overlay;
|
|
56
97
|
private readonly injector;
|
|
98
|
+
private readonly document;
|
|
99
|
+
private readonly openRefs;
|
|
100
|
+
constructor();
|
|
57
101
|
/**
|
|
58
102
|
* Opens `component` in a CDK overlay panel and returns a typed ref.
|
|
59
103
|
*
|
|
60
|
-
* Defaults to a centered, backdropped panel
|
|
61
|
-
*
|
|
104
|
+
* Defaults to a centered, backdropped panel that closes on Escape or a
|
|
105
|
+
* backdrop click; pass `disableClose` to opt out. Focus returns to the
|
|
106
|
+
* element that was focused at open time. Merge `config` to override position
|
|
107
|
+
* strategy, scroll strategy, or any other CDK `OverlayConfig` option.
|
|
62
108
|
*
|
|
63
109
|
* @param component Component class to attach as a portal.
|
|
64
|
-
* @param config CDK
|
|
110
|
+
* @param config Overlay configuration overrides (CDK options + `disableClose`).
|
|
65
111
|
*/
|
|
66
112
|
open<C, R = unknown>(component: Type<C>, config?: CngxOverlayConfig): CngxOverlayRef<R>;
|
|
67
113
|
static ɵfac: i0.ɵɵFactoryDeclaration<CngxOverlay, never>;
|