@cngx/common 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/a11y/README.md +13 -16
- package/card/README.md +2 -21
- package/chart/README.md +5 -8
- package/data/README.md +45 -47
- package/dialog/README.md +12 -15
- package/display/README.md +5 -9
- package/fesm2022/cngx-common-a11y.mjs +140 -40
- package/fesm2022/cngx-common-a11y.mjs.map +1 -1
- package/fesm2022/cngx-common-card.mjs +157 -69
- package/fesm2022/cngx-common-card.mjs.map +1 -1
- package/fesm2022/cngx-common-chart.mjs +389 -92
- package/fesm2022/cngx-common-chart.mjs.map +1 -1
- package/fesm2022/cngx-common-data.mjs +311 -151
- package/fesm2022/cngx-common-data.mjs.map +1 -1
- package/fesm2022/cngx-common-dialog.mjs +167 -29
- package/fesm2022/cngx-common-dialog.mjs.map +1 -1
- package/fesm2022/cngx-common-display.mjs +445 -110
- package/fesm2022/cngx-common-display.mjs.map +1 -1
- package/fesm2022/cngx-common-interactive.mjs +2025 -435
- package/fesm2022/cngx-common-interactive.mjs.map +1 -1
- package/fesm2022/cngx-common-layout.mjs +188 -31
- package/fesm2022/cngx-common-layout.mjs.map +1 -1
- package/fesm2022/cngx-common-popover.mjs +711 -90
- package/fesm2022/cngx-common-popover.mjs.map +1 -1
- package/fesm2022/cngx-common-stepper.mjs +1258 -60
- package/fesm2022/cngx-common-stepper.mjs.map +1 -1
- package/fesm2022/cngx-common-tabs.mjs +247 -41
- package/fesm2022/cngx-common-tabs.mjs.map +1 -1
- package/fesm2022/cngx-common.mjs +2 -2
- package/fesm2022/cngx-common.mjs.map +1 -1
- package/interactive/README.md +5 -5
- package/layout/README.md +2 -2
- package/package.json +5 -4
- package/popover/README.md +8 -34
- package/stepper/README.md +49 -8
- package/tabs/README.md +6 -6
- package/theming/components/cngx-async.css +74 -0
- package/theming/components/cngx-backdrop.css +73 -0
- package/theming/components/cngx-badge.css +340 -0
- package/theming/components/cngx-bottom-sheet.css +201 -0
- package/theming/components/cngx-button-toggle.css +99 -0
- package/theming/components/cngx-dialog.css +358 -0
- package/theming/components/cngx-divider.css +145 -0
- package/theming/components/cngx-listbox.css +220 -0
- package/theming/components/cngx-menu.css +371 -0
- package/theming/components/cngx-ripple.css +116 -0
- package/theming/components/cngx-tooltip.css +265 -0
- package/theming/system-tokens.css +24 -0
- package/types/cngx-common-a11y.d.ts +136 -36
- package/types/cngx-common-card.d.ts +137 -22
- package/types/cngx-common-chart.d.ts +337 -40
- package/types/cngx-common-data.d.ts +277 -45
- package/types/cngx-common-dialog.d.ts +162 -22
- package/types/cngx-common-display.d.ts +422 -78
- package/types/cngx-common-interactive.d.ts +1862 -305
- package/types/cngx-common-layout.d.ts +191 -28
- package/types/cngx-common-popover.d.ts +632 -87
- package/types/cngx-common-stepper.d.ts +1110 -38
- package/types/cngx-common-tabs.d.ts +306 -32
- package/types/cngx-common.d.ts +1 -1
- package/README.md +0 -18
|
@@ -6,13 +6,17 @@ import * as _cngx_common_dialog from '@cngx/common/dialog';
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Lifecycle states of a `CngxDialog`.
|
|
9
|
+
*
|
|
10
|
+
* @category common/dialog
|
|
9
11
|
*/
|
|
10
12
|
type DialogState = 'closed' | 'opening' | 'open' | 'closing';
|
|
11
13
|
/**
|
|
12
14
|
* Signal-based dialog reference.
|
|
13
15
|
*
|
|
14
|
-
* - **Outside** (parent template): access via `exportAs`
|
|
15
|
-
* - **Inside** (dialog content): access via DI
|
|
16
|
+
* - **Outside** (parent template): access via `exportAs` - `#dlg="cngxDialog"`
|
|
17
|
+
* - **Inside** (dialog content): access via DI - `inject(DIALOG_REF)`
|
|
18
|
+
*
|
|
19
|
+
* @category common/dialog
|
|
16
20
|
*/
|
|
17
21
|
interface DialogRef<T = unknown> {
|
|
18
22
|
/** Current lifecycle state of the dialog. */
|
|
@@ -30,7 +34,7 @@ interface DialogRef<T = unknown> {
|
|
|
30
34
|
/**
|
|
31
35
|
* Async state of the submit channel.
|
|
32
36
|
*
|
|
33
|
-
* Populated when `[submitAction]` is set
|
|
37
|
+
* Populated when `[submitAction]` is set - tracks the submit lifecycle
|
|
34
38
|
* (`idle` -> `pending` -> `success`/`error`). When `submitAction` is not set,
|
|
35
39
|
* this is a static idle state.
|
|
36
40
|
*
|
|
@@ -42,7 +46,13 @@ interface DialogRef<T = unknown> {
|
|
|
42
46
|
/** Dismiss the dialog without a result (Escape / backdrop). */
|
|
43
47
|
dismiss(): void;
|
|
44
48
|
}
|
|
45
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Injection token to access the nearest `DialogRef` from inside a dialog.
|
|
51
|
+
*
|
|
52
|
+
* @category common/dialog
|
|
53
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/dialog/dialog-ref.ts
|
|
54
|
+
* @since 0.1.0
|
|
55
|
+
*/
|
|
46
56
|
declare const DIALOG_REF: InjectionToken<DialogRef<unknown>>;
|
|
47
57
|
|
|
48
58
|
/**
|
|
@@ -100,6 +110,23 @@ declare const DIALOG_REF: InjectionToken<DialogRef<unknown>>;
|
|
|
100
110
|
* <input id="name-input" />
|
|
101
111
|
* </dialog>
|
|
102
112
|
* ```
|
|
113
|
+
*
|
|
114
|
+
* @category common/dialog
|
|
115
|
+
* @docsKind primary
|
|
116
|
+
* @wcag AA
|
|
117
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/dialog/dialog.directive.ts
|
|
118
|
+
* @since 0.1.0
|
|
119
|
+
* @relatedTo CngxBottomSheet, CngxDialogOpener, CngxDialogTitle, CngxDialogClose, CngxDialogDraggable
|
|
120
|
+
* <example-url>http://localhost:4200/#/common/dialog/alert-dialog</example-url>
|
|
121
|
+
* <example-url>http://localhost:4200/#/common/dialog/bottom-sheet</example-url>
|
|
122
|
+
* <example-url>http://localhost:4200/#/common/dialog/cngxdialogopener-programmatic</example-url>
|
|
123
|
+
* <example-url>http://localhost:4200/#/common/dialog/draggable-dialog</example-url>
|
|
124
|
+
* <example-url>http://localhost:4200/#/common/dialog/fully-declarative</example-url>
|
|
125
|
+
* <example-url>http://localhost:4200/#/common/dialog/grid-snap-live-vs-release</example-url>
|
|
126
|
+
* <example-url>http://localhost:4200/#/common/dialog/nested-dialogs-cngxdialogstack</example-url>
|
|
127
|
+
* <example-url>http://localhost:4200/#/common/dialog/non-modal-panel</example-url>
|
|
128
|
+
* <example-url>http://localhost:4200/#/common/dialog/programmatic-control</example-url>
|
|
129
|
+
* <example-url>http://localhost:4200/#/common/dialog/template-directives</example-url>
|
|
103
130
|
*/
|
|
104
131
|
declare class CngxDialog<T = unknown> implements DialogRef<T> {
|
|
105
132
|
private readonly elRef;
|
|
@@ -158,7 +185,7 @@ declare class CngxDialog<T = unknown> implements DialogRef<T> {
|
|
|
158
185
|
*/
|
|
159
186
|
readonly focusFallback: _angular_core.InputSignal<HTMLElement | undefined>;
|
|
160
187
|
/**
|
|
161
|
-
* Bind an async state
|
|
188
|
+
* Bind an async state - drives pending (aria-busy, prevents close) and
|
|
162
189
|
* error from a single source. When set, takes precedence over the
|
|
163
190
|
* `[error]` boolean input and `[submitAction]`.
|
|
164
191
|
*
|
|
@@ -174,7 +201,7 @@ declare class CngxDialog<T = unknown> implements DialogRef<T> {
|
|
|
174
201
|
* On error, the dialog stays open with `cngx-dialog--error` and the error
|
|
175
202
|
* is announced to screen readers.
|
|
176
203
|
*
|
|
177
|
-
* When set, `close(value)` no longer closes immediately
|
|
204
|
+
* When set, `close(value)` no longer closes immediately - it enters a
|
|
178
205
|
* `submitting` phase (`isPending() = true`, `aria-busy`, close blocked).
|
|
179
206
|
*
|
|
180
207
|
* The submit lifecycle is exposed via `submitState: CngxAsyncState<unknown>`.
|
|
@@ -229,12 +256,12 @@ declare class CngxDialog<T = unknown> implements DialogRef<T> {
|
|
|
229
256
|
/**
|
|
230
257
|
* `true` when any async operation is pending. Blocks close/dismiss and sets `aria-busy`.
|
|
231
258
|
*
|
|
232
|
-
* External `[state]` short-circuits
|
|
259
|
+
* External `[state]` short-circuits - when set, `submitAction` is ignored by the
|
|
233
260
|
* `close()` guard (`action && !this.state()`), so `submitStatusState` stays `'idle'`.
|
|
234
261
|
*/
|
|
235
262
|
readonly isPending: _angular_core.Signal<boolean>;
|
|
236
263
|
/**
|
|
237
|
-
* Resolved error
|
|
264
|
+
* Resolved error - external `[state]` takes precedence over submit state,
|
|
238
265
|
* which takes precedence over the boolean `[error]` input.
|
|
239
266
|
*/
|
|
240
267
|
protected readonly effectiveError: _angular_core.Signal<boolean>;
|
|
@@ -244,7 +271,7 @@ declare class CngxDialog<T = unknown> implements DialogRef<T> {
|
|
|
244
271
|
protected readonly ariaModal: _angular_core.Signal<"true" | null>;
|
|
245
272
|
protected readonly ariaLabelledBy: _angular_core.Signal<string | null>;
|
|
246
273
|
protected readonly ariaDescribedBy: _angular_core.Signal<string | null>;
|
|
247
|
-
protected readonly backdropOpacity: _angular_core.Signal<"
|
|
274
|
+
protected readonly backdropOpacity: _angular_core.Signal<"1" | "0">;
|
|
248
275
|
private liveRegion;
|
|
249
276
|
constructor();
|
|
250
277
|
/**
|
|
@@ -262,7 +289,7 @@ declare class CngxDialog<T = unknown> implements DialogRef<T> {
|
|
|
262
289
|
*
|
|
263
290
|
* When `[submitAction]` is set and `[state]` is not set, executes the action
|
|
264
291
|
* with `value` before closing. The dialog enters a submitting phase
|
|
265
|
-
* (`isPending() = true`)
|
|
292
|
+
* (`isPending() = true`) - on success it auto-closes, on error it stays open.
|
|
266
293
|
*
|
|
267
294
|
* When `[submitAction]` is not set (or `[state]` overrides), closes immediately.
|
|
268
295
|
*
|
|
@@ -309,6 +336,23 @@ declare class CngxDialog<T = unknown> implements DialogRef<T> {
|
|
|
309
336
|
* …
|
|
310
337
|
* </dialog>
|
|
311
338
|
* ```
|
|
339
|
+
*
|
|
340
|
+
* @category common/dialog
|
|
341
|
+
* @docsKind primary
|
|
342
|
+
* @wcag AA
|
|
343
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/dialog/dialog-title.directive.ts
|
|
344
|
+
* @since 0.1.0
|
|
345
|
+
* @relatedTo CngxDialog, CngxDialogDescription, CngxDialogClose
|
|
346
|
+
* <example-url>http://localhost:4200/#/common/dialog/alert-dialog</example-url>
|
|
347
|
+
* <example-url>http://localhost:4200/#/common/dialog/bottom-sheet</example-url>
|
|
348
|
+
* <example-url>http://localhost:4200/#/common/dialog/cngxdialogopener-programmatic</example-url>
|
|
349
|
+
* <example-url>http://localhost:4200/#/common/dialog/draggable-dialog</example-url>
|
|
350
|
+
* <example-url>http://localhost:4200/#/common/dialog/fully-declarative</example-url>
|
|
351
|
+
* <example-url>http://localhost:4200/#/common/dialog/grid-snap-live-vs-release</example-url>
|
|
352
|
+
* <example-url>http://localhost:4200/#/common/dialog/nested-dialogs-cngxdialogstack</example-url>
|
|
353
|
+
* <example-url>http://localhost:4200/#/common/dialog/non-modal-panel</example-url>
|
|
354
|
+
* <example-url>http://localhost:4200/#/common/dialog/programmatic-control</example-url>
|
|
355
|
+
* <example-url>http://localhost:4200/#/common/dialog/template-directives</example-url>
|
|
312
356
|
*/
|
|
313
357
|
declare class CngxDialogTitle {
|
|
314
358
|
private readonly elRef;
|
|
@@ -345,6 +389,23 @@ declare class CngxDialogTitle {
|
|
|
345
389
|
* …
|
|
346
390
|
* </dialog>
|
|
347
391
|
* ```
|
|
392
|
+
*
|
|
393
|
+
* @category common/dialog
|
|
394
|
+
* @docsKind primary
|
|
395
|
+
* @wcag AA
|
|
396
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/dialog/dialog-description.directive.ts
|
|
397
|
+
* @since 0.1.0
|
|
398
|
+
* @relatedTo CngxDialog, CngxDialogTitle, CngxDialogClose
|
|
399
|
+
* <example-url>http://localhost:4200/#/common/dialog/alert-dialog</example-url>
|
|
400
|
+
* <example-url>http://localhost:4200/#/common/dialog/bottom-sheet</example-url>
|
|
401
|
+
* <example-url>http://localhost:4200/#/common/dialog/cngxdialogopener-programmatic</example-url>
|
|
402
|
+
* <example-url>http://localhost:4200/#/common/dialog/draggable-dialog</example-url>
|
|
403
|
+
* <example-url>http://localhost:4200/#/common/dialog/fully-declarative</example-url>
|
|
404
|
+
* <example-url>http://localhost:4200/#/common/dialog/grid-snap-live-vs-release</example-url>
|
|
405
|
+
* <example-url>http://localhost:4200/#/common/dialog/nested-dialogs-cngxdialogstack</example-url>
|
|
406
|
+
* <example-url>http://localhost:4200/#/common/dialog/non-modal-panel</example-url>
|
|
407
|
+
* <example-url>http://localhost:4200/#/common/dialog/programmatic-control</example-url>
|
|
408
|
+
* <example-url>http://localhost:4200/#/common/dialog/template-directives</example-url>
|
|
348
409
|
*/
|
|
349
410
|
declare class CngxDialogDescription {
|
|
350
411
|
private readonly dialogRef;
|
|
@@ -376,6 +437,23 @@ declare class CngxDialogDescription {
|
|
|
376
437
|
* <button [cngxDialogClose]="true">Confirm</button>
|
|
377
438
|
* </dialog>
|
|
378
439
|
* ```
|
|
440
|
+
*
|
|
441
|
+
* @category common/dialog
|
|
442
|
+
* @docsKind primary
|
|
443
|
+
* @wcag AA
|
|
444
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/dialog/dialog-close.directive.ts
|
|
445
|
+
* @since 0.1.0
|
|
446
|
+
* @relatedTo CngxDialog, CngxDialogTitle, CngxDialogDescription
|
|
447
|
+
* <example-url>http://localhost:4200/#/common/dialog/alert-dialog</example-url>
|
|
448
|
+
* <example-url>http://localhost:4200/#/common/dialog/bottom-sheet</example-url>
|
|
449
|
+
* <example-url>http://localhost:4200/#/common/dialog/cngxdialogopener-programmatic</example-url>
|
|
450
|
+
* <example-url>http://localhost:4200/#/common/dialog/draggable-dialog</example-url>
|
|
451
|
+
* <example-url>http://localhost:4200/#/common/dialog/fully-declarative</example-url>
|
|
452
|
+
* <example-url>http://localhost:4200/#/common/dialog/grid-snap-live-vs-release</example-url>
|
|
453
|
+
* <example-url>http://localhost:4200/#/common/dialog/nested-dialogs-cngxdialogstack</example-url>
|
|
454
|
+
* <example-url>http://localhost:4200/#/common/dialog/non-modal-panel</example-url>
|
|
455
|
+
* <example-url>http://localhost:4200/#/common/dialog/programmatic-control</example-url>
|
|
456
|
+
* <example-url>http://localhost:4200/#/common/dialog/template-directives</example-url>
|
|
379
457
|
*/
|
|
380
458
|
declare class CngxDialogClose {
|
|
381
459
|
private readonly dialogRef;
|
|
@@ -408,10 +486,25 @@ declare class CngxDialogClose {
|
|
|
408
486
|
/**
|
|
409
487
|
* Tracks open dialog instances as a stack for backdrop management.
|
|
410
488
|
*
|
|
411
|
-
* Provided in root
|
|
489
|
+
* Provided in root - always available, no manual provider setup needed.
|
|
412
490
|
* When multiple modal dialogs are stacked, only the topmost shows
|
|
413
491
|
* its `::backdrop`. Each `CngxDialog` reads `isTopmost` from this service
|
|
414
492
|
* to control `--cngx-dialog-backdrop-opacity`.
|
|
493
|
+
*
|
|
494
|
+
* @category common/dialog
|
|
495
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/dialog/dialog-stack.ts
|
|
496
|
+
* @since 0.1.0
|
|
497
|
+
* @relatedTo CngxDialog, CngxDialogOpener
|
|
498
|
+
* <example-url>http://localhost:4200/#/common/dialog/alert-dialog</example-url>
|
|
499
|
+
* <example-url>http://localhost:4200/#/common/dialog/bottom-sheet</example-url>
|
|
500
|
+
* <example-url>http://localhost:4200/#/common/dialog/cngxdialogopener-programmatic</example-url>
|
|
501
|
+
* <example-url>http://localhost:4200/#/common/dialog/draggable-dialog</example-url>
|
|
502
|
+
* <example-url>http://localhost:4200/#/common/dialog/fully-declarative</example-url>
|
|
503
|
+
* <example-url>http://localhost:4200/#/common/dialog/grid-snap-live-vs-release</example-url>
|
|
504
|
+
* <example-url>http://localhost:4200/#/common/dialog/nested-dialogs-cngxdialogstack</example-url>
|
|
505
|
+
* <example-url>http://localhost:4200/#/common/dialog/non-modal-panel</example-url>
|
|
506
|
+
* <example-url>http://localhost:4200/#/common/dialog/programmatic-control</example-url>
|
|
507
|
+
* <example-url>http://localhost:4200/#/common/dialog/template-directives</example-url>
|
|
415
508
|
*/
|
|
416
509
|
declare class CngxDialogStack {
|
|
417
510
|
private readonly stackState;
|
|
@@ -439,13 +532,23 @@ declare class CngxDialogStack {
|
|
|
439
532
|
* })
|
|
440
533
|
* export class NestedDialogHost { }
|
|
441
534
|
* ```
|
|
535
|
+
*
|
|
536
|
+
* @category common/dialog
|
|
442
537
|
*/
|
|
443
538
|
declare function provideDialogStack(): Provider;
|
|
444
539
|
|
|
445
|
-
/**
|
|
540
|
+
/**
|
|
541
|
+
* Injection token for data passed to a programmatically opened dialog via `CngxDialogOpener.open()`.
|
|
542
|
+
*
|
|
543
|
+
* @category common/dialog
|
|
544
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/dialog/dialog-config.ts
|
|
545
|
+
* @since 0.1.0
|
|
546
|
+
*/
|
|
446
547
|
declare const CNGX_DIALOG_DATA: InjectionToken<unknown>;
|
|
447
548
|
/**
|
|
448
549
|
* Configuration for programmatically opened dialogs.
|
|
550
|
+
*
|
|
551
|
+
* @category common/dialog
|
|
449
552
|
*/
|
|
450
553
|
interface CngxDialogConfig<D = unknown> {
|
|
451
554
|
/** Data to inject via `CNGX_DIALOG_DATA` inside the dialog component. */
|
|
@@ -501,6 +604,11 @@ declare class CngxDialogOutlet {
|
|
|
501
604
|
* if (result !== 'dismissed') console.log('Confirmed:', result);
|
|
502
605
|
* });
|
|
503
606
|
* ```
|
|
607
|
+
*
|
|
608
|
+
* @category common/dialog
|
|
609
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/dialog/dialog.service.ts
|
|
610
|
+
* @since 0.1.0
|
|
611
|
+
* @relatedTo CngxDialogOpener, CngxDialog, CNGX_DIALOG_DATA
|
|
504
612
|
*/
|
|
505
613
|
declare class CngxDialogRef<T = unknown> {
|
|
506
614
|
private readonly inner;
|
|
@@ -564,7 +672,7 @@ declare class CngxDialogRef<T = unknown> {
|
|
|
564
672
|
/**
|
|
565
673
|
* Service for opening dialogs programmatically.
|
|
566
674
|
*
|
|
567
|
-
* Works like `MatDialog.open()`
|
|
675
|
+
* Works like `MatDialog.open()` - pass a component type and config,
|
|
568
676
|
* get back a typed `CngxDialogRef<T>`.
|
|
569
677
|
*
|
|
570
678
|
* Must be provided via `provideDialog()`.
|
|
@@ -589,6 +697,12 @@ declare class CngxDialogRef<T = unknown> {
|
|
|
589
697
|
* save(user: User) { this.dialogRef.close(user); }
|
|
590
698
|
* }
|
|
591
699
|
* ```
|
|
700
|
+
*
|
|
701
|
+
* @category common/dialog
|
|
702
|
+
* @docsKind primary
|
|
703
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/dialog/dialog.service.ts
|
|
704
|
+
* @since 0.1.0
|
|
705
|
+
* @relatedTo CngxDialog, CngxDialogRef, CNGX_DIALOG_DATA, CngxDialogStack
|
|
592
706
|
*/
|
|
593
707
|
declare class CngxDialogOpener {
|
|
594
708
|
private readonly appRef;
|
|
@@ -599,16 +713,16 @@ declare class CngxDialogOpener {
|
|
|
599
713
|
/**
|
|
600
714
|
* Open a dialog with the given component.
|
|
601
715
|
*
|
|
602
|
-
* @param component
|
|
603
|
-
* @param config
|
|
716
|
+
* @param component - The component type to render inside the dialog.
|
|
717
|
+
* @param config - Optional dialog configuration.
|
|
604
718
|
* @returns A typed `CngxDialogRef<T>` for reading the result and controlling the dialog.
|
|
605
719
|
*/
|
|
606
720
|
open<T = unknown, D = unknown>(component: Type<unknown>, config?: CngxDialogConfig<D>): CngxDialogRef<T>;
|
|
607
721
|
/**
|
|
608
722
|
* Open a dialog with the given template.
|
|
609
723
|
*
|
|
610
|
-
* @param templateRef
|
|
611
|
-
* @param config
|
|
724
|
+
* @param templateRef - The template to render inside the dialog.
|
|
725
|
+
* @param config - Optional dialog configuration.
|
|
612
726
|
* @returns A typed `CngxDialogRef<T>`.
|
|
613
727
|
*/
|
|
614
728
|
open<T = unknown, D = unknown>(templateRef: TemplateRef<unknown>, config?: CngxDialogConfig<D>): CngxDialogRef<T>;
|
|
@@ -634,17 +748,19 @@ declare class CngxDialogOpener {
|
|
|
634
748
|
* providers: [provideDialog()],
|
|
635
749
|
* });
|
|
636
750
|
* ```
|
|
751
|
+
*
|
|
752
|
+
* @category common/dialog
|
|
637
753
|
*/
|
|
638
754
|
declare function provideDialog(): Provider[];
|
|
639
755
|
|
|
640
756
|
/**
|
|
641
|
-
* Bottom sheet molecule
|
|
757
|
+
* Bottom sheet molecule - a `CngxDialog` positioned at the viewport bottom
|
|
642
758
|
* with swipe-to-dismiss support.
|
|
643
759
|
*
|
|
644
760
|
* Place on the same `<dialog>` element alongside `cngxDialog`. Adds the
|
|
645
761
|
* `cngx-bottom-sheet` CSS class (styled by `bottom-sheet-theme.scss`).
|
|
646
762
|
* When `CngxSwipeDismiss` is also present, auto-wires the swipe output
|
|
647
|
-
* to `dialogRef.dismiss()`
|
|
763
|
+
* to `dialogRef.dismiss()` - no manual `(swiped)` binding needed.
|
|
648
764
|
*
|
|
649
765
|
* ### Basic bottom sheet
|
|
650
766
|
* ```html
|
|
@@ -664,6 +780,13 @@ declare function provideDialog(): Provider[];
|
|
|
664
780
|
* <p>Content positioned at the bottom.</p>
|
|
665
781
|
* </dialog>
|
|
666
782
|
* ```
|
|
783
|
+
*
|
|
784
|
+
* @category common/dialog
|
|
785
|
+
* @docsKind primary
|
|
786
|
+
* @wcag AA
|
|
787
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/bottom-sheet/bottom-sheet.directive.ts
|
|
788
|
+
* @since 0.1.0
|
|
789
|
+
* @relatedTo CngxDialog, CngxSwipeDismiss, CngxDialogClose
|
|
667
790
|
*/
|
|
668
791
|
declare class CngxBottomSheet {
|
|
669
792
|
private readonly dialogRef;
|
|
@@ -686,7 +809,7 @@ declare class CngxBottomSheet {
|
|
|
686
809
|
* Opt-in drag behavior for `CngxDialog`.
|
|
687
810
|
*
|
|
688
811
|
* Uses Pointer Events for unified mouse/touch handling. Position is exposed
|
|
689
|
-
* as CSS custom properties `--cngx-dialog-x` and `--cngx-dialog-y`
|
|
812
|
+
* as CSS custom properties `--cngx-dialog-x` and `--cngx-dialog-y` - the
|
|
690
813
|
* consumer applies the transform via CSS.
|
|
691
814
|
*
|
|
692
815
|
* Keyboard-based moving is mandatory for accessibility:
|
|
@@ -706,6 +829,23 @@ declare class CngxBottomSheet {
|
|
|
706
829
|
* transform: translate(var(--cngx-dialog-x, 0px), var(--cngx-dialog-y, 0px));
|
|
707
830
|
* }
|
|
708
831
|
* ```
|
|
832
|
+
*
|
|
833
|
+
* @category common/dialog
|
|
834
|
+
* @docsKind primary
|
|
835
|
+
* @wcag AA
|
|
836
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/dialog/draggable/dialog-draggable.directive.ts
|
|
837
|
+
* @since 0.1.0
|
|
838
|
+
* @relatedTo CngxDialog, CngxBottomSheet
|
|
839
|
+
* <example-url>http://localhost:4200/#/common/dialog/alert-dialog</example-url>
|
|
840
|
+
* <example-url>http://localhost:4200/#/common/dialog/bottom-sheet</example-url>
|
|
841
|
+
* <example-url>http://localhost:4200/#/common/dialog/cngxdialogopener-programmatic</example-url>
|
|
842
|
+
* <example-url>http://localhost:4200/#/common/dialog/draggable-dialog</example-url>
|
|
843
|
+
* <example-url>http://localhost:4200/#/common/dialog/fully-declarative</example-url>
|
|
844
|
+
* <example-url>http://localhost:4200/#/common/dialog/grid-snap-live-vs-release</example-url>
|
|
845
|
+
* <example-url>http://localhost:4200/#/common/dialog/nested-dialogs-cngxdialogstack</example-url>
|
|
846
|
+
* <example-url>http://localhost:4200/#/common/dialog/non-modal-panel</example-url>
|
|
847
|
+
* <example-url>http://localhost:4200/#/common/dialog/programmatic-control</example-url>
|
|
848
|
+
* <example-url>http://localhost:4200/#/common/dialog/template-directives</example-url>
|
|
709
849
|
*/
|
|
710
850
|
declare class CngxDialogDraggable {
|
|
711
851
|
private readonly elRef;
|
|
@@ -728,8 +868,8 @@ declare class CngxDialogDraggable {
|
|
|
728
868
|
/**
|
|
729
869
|
* When to apply grid snapping.
|
|
730
870
|
*
|
|
731
|
-
* - `'live'`
|
|
732
|
-
* - `'release'`
|
|
871
|
+
* - `'live'` - position snaps continuously during drag (default)
|
|
872
|
+
* - `'release'` - position is free during drag, snaps on pointer up
|
|
733
873
|
*
|
|
734
874
|
* @defaultValue `'live'`
|
|
735
875
|
*/
|