@cngx/common 0.1.0-rc.6 → 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.
Files changed (62) hide show
  1. package/chart/README.md +85 -0
  2. package/command/README.md +157 -0
  3. package/data/README.md +23 -0
  4. package/fesm2022/cngx-common-a11y.mjs +247 -85
  5. package/fesm2022/cngx-common-a11y.mjs.map +1 -1
  6. package/fesm2022/cngx-common-audio.mjs +37 -37
  7. package/fesm2022/cngx-common-audio.mjs.map +1 -1
  8. package/fesm2022/cngx-common-card.mjs +13 -9
  9. package/fesm2022/cngx-common-card.mjs.map +1 -1
  10. package/fesm2022/cngx-common-chart.mjs +3404 -1392
  11. package/fesm2022/cngx-common-chart.mjs.map +1 -1
  12. package/fesm2022/cngx-common-command.mjs +144 -0
  13. package/fesm2022/cngx-common-command.mjs.map +1 -0
  14. package/fesm2022/cngx-common-data.mjs +304 -213
  15. package/fesm2022/cngx-common-data.mjs.map +1 -1
  16. package/fesm2022/cngx-common-dialog.mjs +369 -100
  17. package/fesm2022/cngx-common-dialog.mjs.map +1 -1
  18. package/fesm2022/cngx-common-display.mjs +138 -24
  19. package/fesm2022/cngx-common-display.mjs.map +1 -1
  20. package/fesm2022/cngx-common-interactive.mjs +1089 -459
  21. package/fesm2022/cngx-common-interactive.mjs.map +1 -1
  22. package/fesm2022/cngx-common-layout.mjs +113 -61
  23. package/fesm2022/cngx-common-layout.mjs.map +1 -1
  24. package/fesm2022/cngx-common-popover.mjs +430 -54
  25. package/fesm2022/cngx-common-popover.mjs.map +1 -1
  26. package/fesm2022/cngx-common-stepper.mjs +107 -49
  27. package/fesm2022/cngx-common-stepper.mjs.map +1 -1
  28. package/fesm2022/cngx-common-tabs.mjs +1170 -752
  29. package/fesm2022/cngx-common-tabs.mjs.map +1 -1
  30. package/fesm2022/cngx-common-timeline.mjs +1086 -0
  31. package/fesm2022/cngx-common-timeline.mjs.map +1 -0
  32. package/fesm2022/cngx-common.mjs +2 -2
  33. package/fesm2022/cngx-common.mjs.map +1 -1
  34. package/package.json +11 -1
  35. package/stepper/README.md +1 -1
  36. package/theming/components/cngx-accordion.css +3 -0
  37. package/theming/components/cngx-badge.css +22 -0
  38. package/theming/components/cngx-bottom-sheet.css +14 -2
  39. package/theming/components/cngx-breadcrumb.css +8 -0
  40. package/theming/components/cngx-button-toggle.css +44 -2
  41. package/theming/components/cngx-data-grid.css +66 -0
  42. package/theming/components/cngx-dialog.css +12 -0
  43. package/theming/components/cngx-divider.css +12 -0
  44. package/theming/components/cngx-listbox.css +27 -0
  45. package/theming/components/cngx-menu.css +36 -0
  46. package/theming/components/cngx-ripple.css +1 -1
  47. package/theming/components/cngx-tooltip.css +11 -0
  48. package/types/cngx-common-a11y.d.ts +63 -17
  49. package/types/cngx-common-audio.d.ts +32 -32
  50. package/types/cngx-common-card.d.ts +10 -3
  51. package/types/cngx-common-chart.d.ts +1281 -141
  52. package/types/cngx-common-command.d.ts +167 -0
  53. package/types/cngx-common-data.d.ts +264 -98
  54. package/types/cngx-common-dialog.d.ts +214 -25
  55. package/types/cngx-common-display.d.ts +83 -13
  56. package/types/cngx-common-interactive.d.ts +708 -174
  57. package/types/cngx-common-layout.d.ts +48 -1
  58. package/types/cngx-common-popover.d.ts +120 -3
  59. package/types/cngx-common-stepper.d.ts +55 -5
  60. package/types/cngx-common-tabs.d.ts +386 -25
  61. package/types/cngx-common-timeline.d.ts +1059 -0
  62. package/types/cngx-common.d.ts +1 -1
@@ -1,5 +1,6 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { Signal, InjectionToken, Provider, ViewContainerRef, Type, ComponentRef, Injector, TemplateRef } from '@angular/core';
3
+ import * as _cngx_core_utils from '@cngx/core/utils';
3
4
  import { CngxAsyncState } from '@cngx/core/utils';
4
5
  import { Observable } from 'rxjs';
5
6
  import * as _cngx_common_dialog from '@cngx/common/dialog';
@@ -55,6 +56,54 @@ interface DialogRef<T = unknown> {
55
56
  */
56
57
  declare const DIALOG_REF: InjectionToken<DialogRef<unknown>>;
57
58
 
59
+ /**
60
+ * Labelling handle a title or description source registers with the
61
+ * dialog's ARIA registry.
62
+ *
63
+ * `id` feeds the dialog's `aria-labelledby` / `aria-describedby`
64
+ * derivation; `textContent` (title only) is read at announce time so the
65
+ * live region speaks the current DOM text, not a cached first read.
66
+ */
67
+ interface DialogLabelHandle {
68
+ /** Element id referenced from the dialog host's ARIA attributes. */
69
+ readonly id: Signal<string>;
70
+ /** Fresh text read for the open announce. Optional - descriptions are never announced. */
71
+ readonly textContent?: () => string;
72
+ }
73
+ /**
74
+ * Registration contract between `CngxDialog` and its labelling sources.
75
+ *
76
+ * Content queries only see nodes declared in the projection template, so a
77
+ * programmatically opened dialog (content created into the outlet's
78
+ * `ViewContainerRef`) is invisible to `contentChild()`. Sources therefore
79
+ * push their handles through this token instead of being pulled by query -
80
+ * the same inversion as `CNGX_POPOVER_ARROW_BOUNDS`.
81
+ *
82
+ * `CngxDialog` provides the token via `useExisting` and stays the single
83
+ * owner of the `aria-describedby` derivation: directives sharing the dialog
84
+ * host must never bind `attr.aria-describedby` themselves (two host
85
+ * bindings on one attribute clobber each other) - they register an id here
86
+ * and the dialog merges it.
87
+ *
88
+ * Each `register*` call returns a release function (single-slot per kind:
89
+ * one title, one description, N anonymous describedby ids) - tie it to
90
+ * `DestroyRef.onDestroy`.
91
+ *
92
+ * Internal contract - intentionally not exported from `public-api.ts`.
93
+ */
94
+ interface CngxDialogAriaRegistry {
95
+ /** Register the labelling source for `aria-labelledby` and the open announce. */
96
+ registerTitle(handle: DialogLabelHandle): () => void;
97
+ /** Register the primary description source for `aria-describedby`. */
98
+ registerDescription(handle: DialogLabelHandle): () => void;
99
+ /**
100
+ * Register a supplemental `aria-describedby` id (e.g. an interaction
101
+ * instruction). Accepts a plain string for ids that are fixed for the
102
+ * registration's lifetime; pass a signal only when the id itself changes.
103
+ */
104
+ registerDescribedBy(id: string | Signal<string>): () => void;
105
+ }
106
+
58
107
  /**
59
108
  * Signal-driven state machine for native `<dialog>`.
60
109
  *
@@ -128,7 +177,7 @@ declare const DIALOG_REF: InjectionToken<DialogRef<unknown>>;
128
177
  * <example-url>http://localhost:4200/#/common/dialog/programmatic-control</example-url>
129
178
  * <example-url>http://localhost:4200/#/common/dialog/template-directives</example-url>
130
179
  */
131
- declare class CngxDialog<T = unknown> implements DialogRef<T> {
180
+ declare class CngxDialog<T = unknown> implements DialogRef<T>, CngxDialogAriaRegistry {
132
181
  private readonly elRef;
133
182
  private readonly doc;
134
183
  private readonly renderer;
@@ -136,6 +185,9 @@ declare class CngxDialog<T = unknown> implements DialogRef<T> {
136
185
  private readonly dialogStack;
137
186
  private readonly titleDirective;
138
187
  private readonly descriptionDirective;
188
+ private readonly registeredTitle;
189
+ private readonly registeredDescription;
190
+ private readonly supplementalDescribedByIds;
139
191
  /**
140
192
  * Whether the dialog opens as modal (`showModal()`) or non-modal (`show()`).
141
193
  *
@@ -231,7 +283,7 @@ declare class CngxDialog<T = unknown> implements DialogRef<T> {
231
283
  *
232
284
  * Possible values: `'closed'`, `'opening'`, `'open'`, `'closing'`.
233
285
  */
234
- readonly lifecycle: _angular_core.Signal<DialogState>;
286
+ readonly lifecycle: Signal<DialogState>;
235
287
  /**
236
288
  * The typed result of the dialog.
237
289
  *
@@ -239,9 +291,9 @@ declare class CngxDialog<T = unknown> implements DialogRef<T> {
239
291
  * - `'dismissed'` when dismissed via Escape or backdrop click
240
292
  * - `T` when closed with an explicit value via `close(value)`
241
293
  */
242
- readonly result: _angular_core.Signal<"dismissed" | T | undefined>;
294
+ readonly result: Signal<"dismissed" | T | undefined>;
243
295
  /** Unique auto-generated ID for this dialog instance. Used for ARIA and stack tracking. */
244
- readonly id: _angular_core.Signal<string>;
296
+ readonly id: Signal<string>;
245
297
  private readonly submitStatusState;
246
298
  private readonly submitErrorState;
247
299
  /**
@@ -259,21 +311,51 @@ declare class CngxDialog<T = unknown> implements DialogRef<T> {
259
311
  * External `[state]` short-circuits - when set, `submitAction` is ignored by the
260
312
  * `close()` guard (`action && !this.state()`), so `submitStatusState` stays `'idle'`.
261
313
  */
262
- readonly isPending: _angular_core.Signal<boolean>;
314
+ readonly isPending: Signal<boolean>;
263
315
  /**
264
316
  * Resolved error - external `[state]` takes precedence over submit state,
265
317
  * which takes precedence over the boolean `[error]` input.
266
318
  */
267
- protected readonly effectiveError: _angular_core.Signal<boolean>;
268
- protected readonly isOpening: _angular_core.Signal<boolean>;
269
- protected readonly isOpen: _angular_core.Signal<boolean>;
270
- protected readonly isClosing: _angular_core.Signal<boolean>;
271
- protected readonly ariaModal: _angular_core.Signal<"true" | null>;
272
- protected readonly ariaLabelledBy: _angular_core.Signal<string | null>;
273
- protected readonly ariaDescribedBy: _angular_core.Signal<string | null>;
274
- protected readonly backdropOpacity: _angular_core.Signal<"1" | "0">;
319
+ protected readonly effectiveError: Signal<boolean>;
320
+ protected readonly isOpening: Signal<boolean>;
321
+ protected readonly isOpen: Signal<boolean>;
322
+ protected readonly isClosing: Signal<boolean>;
323
+ protected readonly ariaModal: Signal<"true" | null>;
324
+ protected readonly ariaLabelledBy: Signal<string | null>;
325
+ protected readonly ariaDescribedBy: Signal<string | null>;
326
+ protected readonly backdropOpacity: Signal<"0" | "1">;
275
327
  private liveRegion;
328
+ /**
329
+ * The modal mode latched at `open()`. Everything that depends on how the
330
+ * dialog actually opened derives from this - scroll-lock release, stack
331
+ * pop, Escape/backdrop dismissal, focus strategy, and `aria-modal` -
332
+ * so toggling `[modal]` while open can neither unbalance the ref count
333
+ * nor strand a rendered backdrop without its dismissal surface.
334
+ */
335
+ private readonly openedAsModal;
276
336
  constructor();
337
+ /**
338
+ * Register the labelling source for `aria-labelledby` and the open announce.
339
+ *
340
+ * A present content-queried title wins over the registered handle (same
341
+ * directive in the declarative case - identical id either way).
342
+ *
343
+ * @internal CNGX_DIALOG_ARIA_REGISTRY implementation - not public API.
344
+ */
345
+ registerTitle(handle: DialogLabelHandle): () => void;
346
+ /**
347
+ * Register the primary description source for `aria-describedby`.
348
+ *
349
+ * @internal CNGX_DIALOG_ARIA_REGISTRY implementation - not public API.
350
+ */
351
+ registerDescription(handle: DialogLabelHandle): () => void;
352
+ /**
353
+ * Register a supplemental `aria-describedby` id, merged after the
354
+ * description id in registration order.
355
+ *
356
+ * @internal CNGX_DIALOG_ARIA_REGISTRY implementation - not public API.
357
+ */
358
+ registerDescribedBy(id: string | Signal<string>): () => void;
277
359
  /**
278
360
  * Open the dialog.
279
361
  *
@@ -309,15 +391,40 @@ declare class CngxDialog<T = unknown> implements DialogRef<T> {
309
391
  dismiss(): void;
310
392
  private executeSubmit;
311
393
  protected handleCancel(event: Event): void;
394
+ /**
395
+ * `true` when the last pointerdown landed on the backdrop (the dialog
396
+ * element itself, outside the content rect). Backdrop dismissal requires
397
+ * the interaction to START there: a text-selection drag that begins inside
398
+ * the content and releases over the backdrop synthesises a click with
399
+ * outside coordinates and must not dismiss.
400
+ */
401
+ private pointerDownOnBackdrop;
402
+ protected handlePointerDown(event: PointerEvent): void;
312
403
  protected handleClick(event: MouseEvent): void;
404
+ /** Backdrop test: coordinates outside the dialog's content rect. */
405
+ private isOutsideContentRect;
313
406
  private get dialogElement();
314
407
  private startClosing;
315
408
  private finalize;
316
409
  private moveFocus;
317
410
  private returnFocus;
318
411
  private createLiveRegion;
412
+ /**
413
+ * Release function of the currently held scroll lock, `null` while not
414
+ * locked. The shared `createScrollLock` core (single WeakMap owner in
415
+ * `@cngx/common/layout`) keeps this instance's count in the same registry
416
+ * as `CngxScrollLock`, so interleaved dialog + directive locks restore the
417
+ * saved overflow values correctly.
418
+ */
419
+ private scrollLockRelease;
319
420
  private acquireScrollLock;
320
421
  private releaseScrollLock;
422
+ /**
423
+ * The registry is single-slot per kind, so a second live registration
424
+ * silently wins - surface the authoring error instead of letting the
425
+ * two open paths resolve different labelling.
426
+ */
427
+ private warnDoubleRegistration;
321
428
  private warnNonModalA11y;
322
429
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxDialog<any>, never>;
323
430
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxDialog<any>, "dialog[cngxDialog]", ["cngxDialog"], { "modal": { "alias": "modal"; "required": false; "isSignal": true; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "focusFallback": { "alias": "focusFallback"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "submitAction": { "alias": "submitAction"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; }, {}, ["titleDirective", "descriptionDirective"], never, true, never>;
@@ -357,20 +464,26 @@ declare class CngxDialog<T = unknown> implements DialogRef<T> {
357
464
  declare class CngxDialogTitle {
358
465
  private readonly elRef;
359
466
  private readonly dialogRef;
467
+ private readonly ariaRegistry;
468
+ private readonly destroyRef;
469
+ private readonly idState;
360
470
  /**
361
471
  * Auto-generated unique ID bound to the host `[id]` attribute.
362
472
  *
363
473
  * Used by `CngxDialog` for `aria-labelledby`. When a parent `CngxDialog`
364
474
  * is present, the ID is derived from the dialog's ID (e.g. `cngx-dialog-0-title`).
475
+ * Read-only: an externally mutated id would silently break the ARIA wiring.
365
476
  */
366
- readonly id: _angular_core.WritableSignal<string>;
477
+ readonly id: _angular_core.Signal<string>;
367
478
  /**
368
- * Text content of the title element.
479
+ * Text content of the title element, read fresh on every call.
369
480
  *
370
- * Read by `CngxDialog` on open to announce the dialog title via
371
- * an `aria-live` region for screen readers.
481
+ * Read by `CngxDialog` at announce time (each `'open'` transition) so a
482
+ * changed title - translation swap, interpolated data - is what screen
483
+ * readers hear. A `computed` would cache the first non-reactive DOM read
484
+ * forever.
372
485
  */
373
- readonly textContent: _angular_core.Signal<string>;
486
+ readonly textContent: () => string;
374
487
  constructor();
375
488
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxDialogTitle, never>;
376
489
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxDialogTitle, "[cngxDialogTitle]", ["cngxDialogTitle"], {}, {}, never, never, true, never>;
@@ -409,13 +522,17 @@ declare class CngxDialogTitle {
409
522
  */
410
523
  declare class CngxDialogDescription {
411
524
  private readonly dialogRef;
525
+ private readonly ariaRegistry;
526
+ private readonly destroyRef;
527
+ private readonly idState;
412
528
  /**
413
529
  * Auto-generated unique ID bound to the host `[id]` attribute.
414
530
  *
415
531
  * Used by `CngxDialog` for `aria-describedby`. When a parent `CngxDialog`
416
532
  * is present, the ID is derived from the dialog's ID (e.g. `cngx-dialog-0-desc`).
533
+ * Read-only: an externally mutated id would silently break the ARIA wiring.
417
534
  */
418
- readonly id: _angular_core.WritableSignal<string>;
535
+ readonly id: _angular_core.Signal<string>;
419
536
  constructor();
420
537
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxDialogDescription, never>;
421
538
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxDialogDescription, "[cngxDialogDescription]", ["cngxDialogDescription"], {}, {}, never, never, true, never>;
@@ -548,9 +665,13 @@ declare const CNGX_DIALOG_DATA: InjectionToken<unknown>;
548
665
  /**
549
666
  * Configuration for programmatically opened dialogs.
550
667
  *
668
+ * Mirrors the declarative `CngxDialog` input surface - everything a
669
+ * template-driven dialog can bind is also reachable through
670
+ * `CngxDialogOpener.open()`.
671
+ *
551
672
  * @category common/dialog
552
673
  */
553
- interface CngxDialogConfig<D = unknown> {
674
+ interface CngxDialogConfig<D = unknown, T = unknown> {
554
675
  /** Data to inject via `CNGX_DIALOG_DATA` inside the dialog component. */
555
676
  data?: D;
556
677
  /** Whether the dialog opens as modal (`showModal()`) or non-modal (`show()`). Default: `true`. */
@@ -561,12 +682,31 @@ interface CngxDialogConfig<D = unknown> {
561
682
  closeOnEscape?: boolean;
562
683
  /** Focus strategy on open. Default: `'first-focusable'`. */
563
684
  autoFocus?: 'first-focusable' | 'none' | (string & {});
685
+ /**
686
+ * Async action executed when the dialog closes with a value. Same contract
687
+ * as the declarative `[submitAction]` input: on success the dialog
688
+ * auto-closes, on error it stays open with the error announced. The submit
689
+ * lifecycle is exposed on `CngxDialogRef.submitState`.
690
+ */
691
+ submitAction?: (value: T) => Promise<unknown> | Observable<unknown>;
692
+ /**
693
+ * External async state driving pending/error, same contract as the
694
+ * declarative `[state]` input. Takes precedence over `submitAction`.
695
+ */
696
+ state?: CngxAsyncState<unknown>;
697
+ /** Initial error flag, same contract as the declarative `[error]` input. */
698
+ error?: boolean;
699
+ /**
700
+ * Fallback element to focus when the trigger element is gone by the time
701
+ * the dialog closes, same contract as the declarative `[focusFallback]`.
702
+ */
703
+ focusFallback?: HTMLElement;
564
704
  }
565
705
 
566
706
  /**
567
707
  * Internal container component for programmatically opened dialogs.
568
708
  *
569
- * Not part of the public API — instantiated exclusively by `CngxDialogOpener`.
709
+ * Not part of the public API - instantiated exclusively by `CngxDialogOpener`.
570
710
  * Renders the native `<dialog>` shell and exposes a `<ng-container>` outlet
571
711
  * where the content component or template is inserted.
572
712
  *
@@ -577,10 +717,14 @@ declare class CngxDialogOutlet {
577
717
  readonly closeOnBackdropClick: _angular_core.InputSignal<boolean>;
578
718
  readonly closeOnEscape: _angular_core.InputSignal<boolean>;
579
719
  readonly autoFocus: _angular_core.InputSignal<string>;
720
+ readonly submitAction: _angular_core.InputSignal<((value: unknown) => Promise<unknown> | Observable<unknown>) | undefined>;
721
+ readonly state: _angular_core.InputSignal<CngxAsyncState<unknown> | undefined>;
722
+ readonly error: _angular_core.InputSignal<boolean>;
723
+ readonly focusFallback: _angular_core.InputSignal<HTMLElement | undefined>;
580
724
  readonly dialog: _angular_core.Signal<CngxDialog<any>>;
581
725
  readonly contentOutlet: _angular_core.Signal<ViewContainerRef | undefined>;
582
726
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxDialogOutlet, never>;
583
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxDialogOutlet, "cngx-dialog-outlet", never, { "modal": { "alias": "modal"; "required": false; "isSignal": true; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
727
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxDialogOutlet, "cngx-dialog-outlet", never, { "modal": { "alias": "modal"; "required": false; "isSignal": true; }; "closeOnBackdropClick": { "alias": "closeOnBackdropClick"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "submitAction": { "alias": "submitAction"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "focusFallback": { "alias": "focusFallback"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
584
728
  }
585
729
 
586
730
  /**
@@ -634,6 +778,14 @@ declare class CngxDialogRef<T = unknown> {
634
778
  get result(): _angular_core.Signal<"dismissed" | T | undefined>;
635
779
  /** Unique auto-generated ID for this dialog instance. */
636
780
  get id(): _angular_core.Signal<string>;
781
+ /**
782
+ * Async state of the submit channel - same surface a declarative dialog
783
+ * exposes. Populated when the open config carries a `submitAction`;
784
+ * remains at `'idle'` otherwise.
785
+ *
786
+ * Bind to any state consumer: `<cngx-alert [state]="ref.submitState" />`.
787
+ */
788
+ get submitState(): _cngx_core_utils.CngxAsyncState<unknown>;
637
789
  /**
638
790
  * Close the dialog with a typed result value.
639
791
  *
@@ -710,6 +862,13 @@ declare class CngxDialogOpener {
710
862
  private readonly injector;
711
863
  private readonly doc;
712
864
  private readonly openDialogs;
865
+ /**
866
+ * Per-open close-watcher effects, keyed by ref. Owned here (not on the
867
+ * public `CngxDialogRef`) - the effect's injector outlives the dialog, so
868
+ * without the explicit destroy in `cleanup()` every `open()` would leak
869
+ * one live effect.
870
+ */
871
+ private readonly cleanupEffects;
713
872
  /**
714
873
  * Open a dialog with the given component.
715
874
  *
@@ -717,7 +876,7 @@ declare class CngxDialogOpener {
717
876
  * @param config - Optional dialog configuration.
718
877
  * @returns A typed `CngxDialogRef<T>` for reading the result and controlling the dialog.
719
878
  */
720
- open<T = unknown, D = unknown>(component: Type<unknown>, config?: CngxDialogConfig<D>): CngxDialogRef<T>;
879
+ open<T = unknown, D = unknown>(component: Type<unknown>, config?: CngxDialogConfig<D, T>): CngxDialogRef<T>;
721
880
  /**
722
881
  * Open a dialog with the given template.
723
882
  *
@@ -725,7 +884,7 @@ declare class CngxDialogOpener {
725
884
  * @param config - Optional dialog configuration.
726
885
  * @returns A typed `CngxDialogRef<T>`.
727
886
  */
728
- open<T = unknown, D = unknown>(templateRef: TemplateRef<unknown>, config?: CngxDialogConfig<D>): CngxDialogRef<T>;
887
+ open<T = unknown, D = unknown>(templateRef: TemplateRef<unknown>, config?: CngxDialogConfig<D, T>): CngxDialogRef<T>;
729
888
  /**
730
889
  * Dismiss all programmatically opened dialogs.
731
890
  *
@@ -794,7 +953,8 @@ declare class CngxBottomSheet {
794
953
  /**
795
954
  * Whether the drag handle bar is visible.
796
955
  *
797
- * The handle itself is rendered via CSS (`::before` pseudo-element on the host).
956
+ * The handle itself is rendered via CSS (`::before` pseudo-element, gated
957
+ * on the `cngx-bottom-sheet--handle` modifier class this input binds).
798
958
  * Set to `false` to hide it.
799
959
  *
800
960
  * @defaultValue `true`
@@ -817,6 +977,11 @@ declare class CngxBottomSheet {
817
977
  * - Shift + Arrow moves 50px
818
978
  * - Home resets to origin
819
979
  *
980
+ * Keys move the dialog only while the handle element itself has focus -
981
+ * arrows inside form fields keep moving the caret. Without an explicit
982
+ * `[handle]` the dialog element becomes focusable (`tabindex="0"`) and is
983
+ * the keyboard drag surface.
984
+ *
820
985
  * ```html
821
986
  * <dialog cngxDialog cngxDialogDraggable>
822
987
  * <div class="dialog-header" #handle>Title</div>
@@ -851,6 +1016,7 @@ declare class CngxDialogDraggable {
851
1016
  private readonly elRef;
852
1017
  private readonly doc;
853
1018
  private readonly destroyRef;
1019
+ private readonly ariaRegistry;
854
1020
  /** Handle element for initiating drag. If not set, entire dialog is the handle. */
855
1021
  readonly handle: _angular_core.InputSignal<HTMLElement | undefined>;
856
1022
  /** Clamp position to viewport bounds. */
@@ -895,6 +1061,8 @@ declare class CngxDialogDraggable {
895
1061
  private currentHandle;
896
1062
  private boundPointerDown;
897
1063
  private boundKeyDown;
1064
+ private handleAddedTabindex;
1065
+ private handleAddedAria;
898
1066
  /** Attach pointer and keyboard listeners to `el`, cleaning up the previous handle first. */
899
1067
  private setupHandle;
900
1068
  private handlePointerDown;
@@ -903,6 +1071,27 @@ declare class CngxDialogDraggable {
903
1071
  private handleKeyDown;
904
1072
  /** Snap `x`/`y` to the nearest `gridSize` increment. Pass-through when grid is disabled. */
905
1073
  private snap;
1074
+ private instructionNode;
1075
+ private releaseInstruction;
1076
+ private handleAddedDescribedBy;
1077
+ /**
1078
+ * Visually hidden keyboard-drag instruction, appended to the host so it
1079
+ * lives inside the dialog for both handle modes. Same hidden technique as
1080
+ * the dialog's live region - a referenced node must stay perceivable to
1081
+ * AT, not `display: none`.
1082
+ */
1083
+ private createInstructionNode;
1084
+ /**
1085
+ * Detach listeners from the current handle and restore every attribute and
1086
+ * style this directive added. A demoted handle must not stay focusable or
1087
+ * keep announcing "Move dialog" with a dead keyboard path behind it.
1088
+ *
1089
+ * The instruction node and its describedby registration leave atomically
1090
+ * with the capability they describe: a handle swap away from host-as-handle
1091
+ * removes the arrow-keys-on-the-dialog path itself, so keeping an orphan
1092
+ * description would misinform AT, not inform it.
1093
+ */
1094
+ private teardownHandle;
906
1095
  private cleanup;
907
1096
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxDialogDraggable, never>;
908
1097
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxDialogDraggable, "[cngxDialogDraggable]", ["cngxDialogDraggable"], { "handle": { "alias": "handle"; "required": false; "isSignal": true; }; "constrainToViewport": { "alias": "constrainToViewport"; "required": false; "isSignal": true; }; "gridSize": { "alias": "gridSize"; "required": false; "isSignal": true; }; "snapMode": { "alias": "snapMode"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
@@ -361,6 +361,71 @@ declare class CngxChip {
361
361
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxChip, "cngx-chip", ["cngxChip"], { "removable": { "alias": "removable"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "removeAriaLabel": { "alias": "removeAriaLabel"; "required": false; "isSignal": true; }; }, { "remove": "remove"; }, never, ["*", "[cngxChipClose]"], true, never>;
362
362
  }
363
363
 
364
+ /** Semantic health of a {@link CngxStatus}. */
365
+ type StatusTone = 'success' | 'warning' | 'danger' | 'info' | 'neutral';
366
+ /**
367
+ * Semantic health indicator - a decorative tone dot paired with a visible
368
+ * label. Distinct from `CngxBadge` (count overlay), `CngxChip` (interactive)
369
+ * and `CngxTag` (labeled token): its single job is to communicate a status
370
+ * (operational / degraded / down / info).
371
+ *
372
+ * Colour is never the only signal (Pillar 2): the tone drives the dot colour
373
+ * *and* a tone glyph, so a colour-blind reader still distinguishes the states,
374
+ * and the visible `label` carries the meaning for assistive tech (the dot is
375
+ * `aria-hidden`). Set `live` for a status that changes in place.
376
+ *
377
+ * ### Basic
378
+ * ```html
379
+ * <cngx-status tone="success" label="Operational" />
380
+ * ```
381
+ *
382
+ * ### Live-updating
383
+ * ```html
384
+ * <cngx-status tone="danger" label="Outage" live="assertive" />
385
+ * ```
386
+ *
387
+ * ### Dot-only (bare coloured dot + label)
388
+ * ```html
389
+ * <cngx-status tone="success" label="Operational" [glyph]="false" />
390
+ * ```
391
+ * `[glyph]="false"` drops the glyph for a GitHub-style coloured dot. Keep a
392
+ * visible `label`: without the glyph, colour is the dot's only signal, which a
393
+ * sighted colour-blind reader cannot resolve (a dev-mode warning enforces this).
394
+ *
395
+ * @category common/display
396
+ * @docsKind primary
397
+ * @wcag AA
398
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/status/status.component.ts
399
+ * @since 0.1.0
400
+ * @relatedTo CngxBadge, CngxTag, CngxChip
401
+ *
402
+ * <example-url>http://localhost:4200/#/common/display/status/tone-matrix</example-url>
403
+ * <example-url>http://localhost:4200/#/common/display/status/dot-only</example-url>
404
+ */
405
+ declare class CngxStatus {
406
+ private readonly elRef;
407
+ /** Semantic health. Drives both the dot colour and the tone glyph. */
408
+ readonly tone: _angular_core.InputSignal<StatusTone>;
409
+ /** Visible status text. Carries the meaning for assistive tech. */
410
+ readonly label: _angular_core.InputSignal<string | undefined>;
411
+ /**
412
+ * Politeness of the live region. `off` (default) for a static status;
413
+ * `polite` / `assertive` for a status that changes in place.
414
+ */
415
+ readonly live: _angular_core.InputSignal<"off" | "polite" | "assertive">;
416
+ /**
417
+ * Show the tone glyph inside the dot. `false` renders a bare coloured dot
418
+ * (GitHub-style) - sound only when a visible `label` carries the meaning,
419
+ * since colour alone fails a sighted colour-blind reader (Pillar 2).
420
+ */
421
+ readonly glyph: _angular_core.InputSignalWithTransform<boolean, unknown>;
422
+ /** @internal Tone glyph char bound into the decorative dot. */
423
+ protected readonly glyphChar: _angular_core.Signal<string>;
424
+ constructor();
425
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxStatus, never>;
426
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxStatus, "cngx-status", never, { "tone": { "alias": "tone"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "live": { "alias": "live"; "required": false; "isSignal": true; }; "glyph": { "alias": "glyph"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
427
+ }
428
+
364
429
  /**
365
430
  * An inline, wrapping metadata line - a flex row of projected {@link CngxMeta}
366
431
  * pairs separated by a consistent gap. It carries the shared muted colour + gap
@@ -659,11 +724,11 @@ declare class CngxPasswordStrengthMeter {
659
724
  }
660
725
 
661
726
  /**
662
- * Context exposed by the `*cngxTagLabel` slot — the full reactive
727
+ * Context exposed by the `*cngxTagLabel` slot - the full reactive
663
728
  * Tag state bundled so consumer templates can switch on variant /
664
729
  * colour / size / truncate without injecting the directive.
665
730
  *
666
- * `$implicit` is `void` because the slot has no positional payload —
731
+ * `$implicit` is `void` because the slot has no positional payload -
667
732
  * consumers reach for the named fields below. Pattern mirrors
668
733
  * `CngxSelectInputSlotContext` in `@cngx/forms/select/shared`.
669
734
  *
@@ -905,6 +970,9 @@ type CngxTagSize = 'sm' | 'md' | 'lg' | 'xl';
905
970
  * @selector cngx-tag
906
971
  * @since 0.1.0
907
972
  * @relatedTo CngxTagGroup, CngxChip, CngxBadge, CngxTagLabel
973
+ * @slot cngxTagLabel Replaces the tag's text body.
974
+ * @slot cngxTagPrefix Content before the label, typically an icon or swatch.
975
+ * @slot cngxTagSuffix Content after the label, typically a remove affordance.
908
976
  * <example-url>http://localhost:4200/#/common/display/tag/app-wide-defaults-via-providetagconfig</example-url>
909
977
  * <example-url>http://localhost:4200/#/common/display/tag/color-palette</example-url>
910
978
  * <example-url>http://localhost:4200/#/common/display/tag/composition-with-cngxicon</example-url>
@@ -1026,12 +1094,12 @@ declare class CngxTag {
1026
1094
  }
1027
1095
 
1028
1096
  /**
1029
- * Context exposed by the `*cngxTagGroupHeader` slot — the full
1097
+ * Context exposed by the `*cngxTagGroupHeader` slot - the full
1030
1098
  * reactive group state plus the live `count` of projected
1031
1099
  * `CngxTag` children. Lets consumer headers render
1032
1100
  * `"Filters ({{ count }})"` without injecting the group.
1033
1101
  *
1034
- * `$implicit` is `void` because the slot has no positional payload —
1102
+ * `$implicit` is `void` because the slot has no positional payload -
1035
1103
  * consumers reach for the named fields below.
1036
1104
  *
1037
1105
  * @category common/display
@@ -1268,6 +1336,8 @@ type CngxTagGroupAlign = 'start' | 'center' | 'end' | 'between';
1268
1336
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/display/tag-group/tag-group.component.ts
1269
1337
  * @since 0.1.0
1270
1338
  * @relatedTo CngxTag, CngxTagGroupHeader, CngxTagGroupAccessory, CNGX_TAG_GROUP
1339
+ * @slot cngxTagGroupHeader Replaces the group's heading row.
1340
+ * @slot cngxTagGroupAccessory Trailing control beside the header, e.g. a clear-all button.
1271
1341
  * <example-url>http://localhost:4200/#/common/display/tag/app-wide-defaults-via-providetagconfig</example-url>
1272
1342
  * <example-url>http://localhost:4200/#/common/display/tag/color-palette</example-url>
1273
1343
  * <example-url>http://localhost:4200/#/common/display/tag/composition-with-cngxicon</example-url>
@@ -1390,7 +1460,7 @@ declare class CngxTagGroup implements CngxTagGroupHost {
1390
1460
  * 3. `provideTagConfig(...)` at the application root.
1391
1461
  * 4. Library defaults (English; merged in via `CNGX_TAG_DEFAULTS`).
1392
1462
  *
1393
- * Every key is optional — partial overrides are deep-merged with
1463
+ * Every key is optional - partial overrides are deep-merged with
1394
1464
  * the library defaults so consumers only declare the keys they want
1395
1465
  * to override.
1396
1466
  *
@@ -1415,7 +1485,7 @@ interface CngxTagConfig {
1415
1485
  * Consumer-defined colour map. Each entry adds a `[data-color="<key>"]`
1416
1486
  * cascade entry that resolves through `--cngx-tag-bg/-color/-border`
1417
1487
  * custom properties. Predefined keys (`neutral`/`success`/`warning`/
1418
- * `error`/`info`) ship in `tag.css` and are not part of this map —
1488
+ * `error`/`info`) ship in `tag.css` and are not part of this map -
1419
1489
  * extending the predefined palette overrides the consumer key only.
1420
1490
  */
1421
1491
  readonly colors?: Readonly<Record<string, Readonly<{
@@ -1528,7 +1598,7 @@ declare function provideTagConfig(...features: CngxTagConfigFeature[]): Environm
1528
1598
  *
1529
1599
  * Unlike `provideTagConfig` (root-only), `provideTagConfigAt` injects
1530
1600
  * the parent injector's `CNGX_TAG_CONFIG` value (resolves through
1531
- * the priority chain — root provider, library defaults, or another
1601
+ * the priority chain - root provider, library defaults, or another
1532
1602
  * `provideTagConfigAt` further up) and deep-merges the supplied
1533
1603
  * features on top. This produces cumulative cascade behaviour:
1534
1604
  * descendant tag instances see the merged config, sibling sub-trees
@@ -1557,7 +1627,7 @@ declare function provideTagConfigAt(...features: CngxTagConfigFeature[]): Provid
1557
1627
  * (per-instance Input → `provideTagConfigAt` → `provideTagConfig`
1558
1628
  * → library defaults).
1559
1629
  *
1560
- * Equivalent to `inject(CNGX_TAG_CONFIG)` — the helper exists so
1630
+ * Equivalent to `inject(CNGX_TAG_CONFIG)` - the helper exists so
1561
1631
  * consumers don't need to import the token directly. Mirrors
1562
1632
  * `injectSelectConfig` in `@cngx/forms/select`.
1563
1633
  *
@@ -1577,7 +1647,7 @@ declare function injectTagConfig(): CngxTagConfig;
1577
1647
  /**
1578
1648
  * Override the default `CngxTag` input values (`variant`, `color`,
1579
1649
  * `size`, `truncate`, `maxWidth`). Per-instance bindings still win
1580
- * over the cascade — this only sets the *fallback* per directive.
1650
+ * over the cascade - this only sets the *fallback* per directive.
1581
1651
  *
1582
1652
  * ```ts
1583
1653
  * provideTagConfig(
@@ -1630,12 +1700,12 @@ declare function withTagGroupDefaults(payload: NonNullable<CngxTagConfig['groupD
1630
1700
  declare function withTagColors(payload: NonNullable<CngxTagConfig['colors']>): CngxTagConfigFeature;
1631
1701
  /**
1632
1702
  * Register app-wide template overrides for the five Tag-family
1633
- * slots. Resolved in tier 2 of the slot cascade — instance
1703
+ * slots. Resolved in tier 2 of the slot cascade - instance
1634
1704
  * directives still win, the host's `<ng-template>` default body is
1635
1705
  * the floor.
1636
1706
  *
1637
1707
  * **Staging note.** This factory ships ahead of a documented second
1638
- * consumer — the headless `CngxTag` + `CngxTagGroup` are the only
1708
+ * consumer - the headless `CngxTag` + `CngxTagGroup` are the only
1639
1709
  * current consumers. The staging is intentional and tracked in
1640
1710
  * `display-accepted-debt.md §2` (Material organism deferral): a
1641
1711
  * future `cngx-mat-tag` / `cngx-mat-tag-group` wrapper inherits the
@@ -1664,5 +1734,5 @@ declare function withTagColors(payload: NonNullable<CngxTagConfig['colors']>): C
1664
1734
  */
1665
1735
  declare function withTagSlots(payload: NonNullable<CngxTagConfig['templates']>): CngxTagConfigFeature;
1666
1736
 
1667
- export { CNGX_TAG_CONFIG, CNGX_TAG_GROUP, CngxAvatar, CngxAvatarGroup, CngxBadge, CngxCheckboxIndicator, CngxChip, CngxDivider, CngxIcon, CngxMeta, CngxMetaList, CngxPasswordStrengthMeter, CngxRadioIndicator, CngxSegmentedProgress, CngxTag, CngxTagGroup, CngxTagGroupAccessory, CngxTagGroupHeader, CngxTagLabel, CngxTagPrefix, CngxTagSuffix, CngxTime, injectTagConfig, provideTagConfig, provideTagConfigAt, withTagColors, withTagDefaults, withTagGroupDefaults, withTagSlots };
1668
- export type { CngxBadgeColor, CngxBadgePosition, CngxTagColor, CngxTagConfig, CngxTagConfigFeature, CngxTagGroupAccessoryContext, CngxTagGroupAlign, CngxTagGroupGap, CngxTagGroupHeaderContext, CngxTagGroupHost, CngxTagLabelContext, CngxTagPrefixContext, CngxTagSize, CngxTagSuffixContext, CngxTagVariant, SegmentState };
1737
+ export { CNGX_TAG_CONFIG, CNGX_TAG_GROUP, CngxAvatar, CngxAvatarGroup, CngxBadge, CngxCheckboxIndicator, CngxChip, CngxDivider, CngxIcon, CngxMeta, CngxMetaList, CngxPasswordStrengthMeter, CngxRadioIndicator, CngxSegmentedProgress, CngxStatus, CngxTag, CngxTagGroup, CngxTagGroupAccessory, CngxTagGroupHeader, CngxTagLabel, CngxTagPrefix, CngxTagSuffix, CngxTime, injectTagConfig, provideTagConfig, provideTagConfigAt, withTagColors, withTagDefaults, withTagGroupDefaults, withTagSlots };
1738
+ export type { CngxBadgeColor, CngxBadgePosition, CngxTagColor, CngxTagConfig, CngxTagConfigFeature, CngxTagGroupAccessoryContext, CngxTagGroupAlign, CngxTagGroupGap, CngxTagGroupHeaderContext, CngxTagGroupHost, CngxTagLabelContext, CngxTagPrefixContext, CngxTagSize, CngxTagSuffixContext, CngxTagVariant, SegmentState, StatusTone };