@cngx/common 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.
Files changed (63) 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 +144 -30
  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 +20 -6
  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 +9 -1
  40. package/theming/components/cngx-button-toggle.css +44 -2
  41. package/theming/components/cngx-data-grid.css +69 -4
  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-slider.css +1 -1
  48. package/theming/components/cngx-tooltip.css +11 -0
  49. package/types/cngx-common-a11y.d.ts +63 -17
  50. package/types/cngx-common-audio.d.ts +32 -32
  51. package/types/cngx-common-card.d.ts +10 -3
  52. package/types/cngx-common-chart.d.ts +1281 -141
  53. package/types/cngx-common-command.d.ts +167 -0
  54. package/types/cngx-common-data.d.ts +264 -98
  55. package/types/cngx-common-dialog.d.ts +214 -25
  56. package/types/cngx-common-display.d.ts +83 -13
  57. package/types/cngx-common-interactive.d.ts +708 -174
  58. package/types/cngx-common-layout.d.ts +48 -1
  59. package/types/cngx-common-popover.d.ts +120 -3
  60. package/types/cngx-common-stepper.d.ts +55 -5
  61. package/types/cngx-common-tabs.d.ts +386 -25
  62. package/types/cngx-common-timeline.d.ts +1059 -0
  63. package/types/cngx-common.d.ts +1 -1
@@ -516,6 +516,35 @@ declare class CngxScrollLock {
516
516
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxScrollLock, "[cngxScrollLock]", ["cngxScrollLock"], { "enabled": { "alias": "cngxScrollLock"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
517
517
  }
518
518
 
519
+ /**
520
+ * Acquire a ref-counted scroll lock on a document root and get back the
521
+ * matching release function.
522
+ *
523
+ * The first active lock saves the current `overflow` / `scrollbar-gutter`
524
+ * inline styles and sets `overflow: hidden` + `scrollbar-gutter: stable`
525
+ * (no layout shift when the scrollbar disappears). Releasing the last active
526
+ * lock restores the saved values. The returned release function is
527
+ * idempotent - calling it twice cannot over-decrement the count.
528
+ *
529
+ * Shared engine behind `CngxScrollLock` and `CngxDialog`'s modal scroll lock;
530
+ * consumers composing their own overlay primitives can use it directly.
531
+ *
532
+ * ```typescript
533
+ * const release = createScrollLock(document.documentElement);
534
+ * // ... overlay open ...
535
+ * release();
536
+ * ```
537
+ *
538
+ * @param html - The document root (`document.documentElement`) to lock.
539
+ * @returns Release function for this acquisition. Idempotent.
540
+ *
541
+ * @category common/layout
542
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/common/layout/scroll/scroll-lock-core.ts
543
+ * @since 0.1.0
544
+ * @relatedTo CngxScrollLock, CngxDialog
545
+ */
546
+ declare function createScrollLock(html: HTMLElement): () => void;
547
+
519
548
  /**
520
549
  * Headless skeleton loading placeholder.
521
550
  *
@@ -669,6 +698,14 @@ declare class CngxInfiniteScroll {
669
698
  * meaning the header is now stuck. Toggles a CSS class for shadow,
670
699
  * elevation, or background changes.
671
700
  *
701
+ * The sentinel is observed against the **nearest scroll-container ancestor**
702
+ * (the first ancestor whose computed `overflow-y` is not `visible`), not the
703
+ * page - that is the scrollport `position: sticky` resolves against, so
704
+ * `isSticky()` reports the state the host actually has. A scrollport whose
705
+ * height is content-driven never scrolls in the block axis, so a header inside
706
+ * it never pins; in dev mode the directive warns once when it resolves against
707
+ * such a scrollport.
708
+ *
672
709
  * ### Sticky header with shadow
673
710
  * ```html
674
711
  * <header cngxStickyHeader #sh="cngxStickyHeader"
@@ -700,6 +737,15 @@ declare class CngxStickyHeader {
700
737
  private readonly el;
701
738
  private readonly doc;
702
739
  constructor();
740
+ /**
741
+ * The nearest ancestor that is a scroll container in the block axis - the scrollport
742
+ * `position: sticky` resolves against. Walks up from the host's parent to the first
743
+ * ancestor whose computed `overflow-y` is not `visible`; `null` means no such
744
+ * ancestor, i.e. the header sticks to the viewport. A used `overflow-x` other than
745
+ * `visible` coerces the computed `overflow-y` to `auto`, so this also catches a
746
+ * horizontal scroll container (e.g. a data grid that scrolls sideways).
747
+ */
748
+ private resolveScrollParent;
703
749
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxStickyHeader, never>;
704
750
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxStickyHeader, "[cngxStickyHeader]", ["cngxStickyHeader"], { "threshold": { "alias": "threshold"; "required": false; "isSignal": true; }; }, { "stickyChange": "stickyChange"; }, never, never, true, never>;
705
751
  }
@@ -960,6 +1006,7 @@ declare class CngxExpandableToggle {
960
1006
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/layout/text/expandable-text.ts
961
1007
  * @since 0.1.0
962
1008
  * @relatedTo CngxTruncate, CngxExpandableToggle, CngxHighlight
1009
+ * @slot cngxExpandableToggle Replaces the show-more control; gets the current expanded state.
963
1010
  * <example-url>http://localhost:4200/#/common/layout/expandable-text/auto-toggle</example-url>
964
1011
  * <example-url>http://localhost:4200/#/common/layout/expandable-text/custom-labels</example-url>
965
1012
  * <example-url>http://localhost:4200/#/common/layout/expandable-text/custom-toggle-template</example-url>
@@ -981,5 +1028,5 @@ declare class CngxExpandableText {
981
1028
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxExpandableText, "cngx-expandable-text", ["cngxExpandableText"], { "lines": { "alias": "lines"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "moreLabel": { "alias": "moreLabel"; "required": false; "isSignal": true; }; "lessLabel": { "alias": "lessLabel"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; }, ["customToggle"], ["*"], true, never>;
982
1029
  }
983
1030
 
984
- export { CngxBackdrop, CngxDrawer, CngxDrawerContent, CngxDrawerPanel, CngxExpandableText, CngxExpandableToggle, CngxHighlight, CngxInfiniteScroll, CngxIntersectionObserver, CngxMediaQuery, CngxResizeObserver, CngxScrollLock, CngxScrollSpy, CngxSkeleton, CngxStickyHeader, CngxTruncate, injectMediaQuery, injectQueryParamSync };
1031
+ export { CngxBackdrop, CngxDrawer, CngxDrawerContent, CngxDrawerPanel, CngxExpandableText, CngxExpandableToggle, CngxHighlight, CngxInfiniteScroll, CngxIntersectionObserver, CngxMediaQuery, CngxResizeObserver, CngxScrollLock, CngxScrollSpy, CngxSkeleton, CngxStickyHeader, CngxTruncate, createScrollLock, injectMediaQuery, injectQueryParamSync };
985
1032
  export type { CngxExpandableToggleContext, DrawerMode, DrawerPosition, QueryParamSyncOptions };
@@ -1,7 +1,7 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { ElementRef, InjectionToken, Provider, TemplateRef } from '@angular/core';
3
3
  import * as i1 from '@cngx/common/a11y';
4
- import { CngxAsyncState } from '@cngx/core/utils';
4
+ import { CngxAsyncState, AsyncStatus } from '@cngx/core/utils';
5
5
  import { AsyncAction, CngxPending, CngxSucceeded, CngxFailed } from '@cngx/common/interactive';
6
6
  import * as i1$1 from '@cngx/common/display';
7
7
 
@@ -154,6 +154,7 @@ declare class CngxPopover {
154
154
  private readonly doc;
155
155
  private readonly floatingFallback;
156
156
  private readonly _injector;
157
+ private readonly direction;
157
158
  /**
158
159
  * Arrow-bounds contract resolved lazily on first use.
159
160
  * Eager inject() would loop: CngxPopover (host directive on the panel)
@@ -194,8 +195,63 @@ declare class CngxPopover {
194
195
  * When `true` (default), opening this popover closes any other open
195
196
  * `CngxPopover` instance. Set to `false` to allow multiple popovers
196
197
  * open simultaneously.
198
+ *
199
+ * Exclusivity governs sibling popovers only: a popover nested inside
200
+ * another open popover (a select panel or submenu opening within a
201
+ * popover-hosted surface) is that container's child, not a rival, and
202
+ * never evicts its ancestor.
197
203
  */
198
204
  readonly exclusive: _angular_core.InputSignal<boolean>;
205
+ /**
206
+ * @internal
207
+ * Programmatic override of {@link exclusive}. `null` (default) defers to the
208
+ * `[exclusive]` input; a boolean wins over it. Lets a composing organism
209
+ * (e.g. a submenu wiring in `@cngx/ui/context-menu`) open a nested panel
210
+ * non-exclusively without a consumer-side `[exclusive]="false"` handgrip.
211
+ * Controlled+uncontrolled derivation: {@link effectiveExclusive} resolves
212
+ * the override first, then the input.
213
+ */
214
+ readonly exclusiveOverride: _angular_core.WritableSignal<boolean | null>;
215
+ /** Effective exclusivity - override wins, else the `[exclusive]` input. */
216
+ private readonly effectiveExclusive;
217
+ /**
218
+ * @internal
219
+ * Programmatic override of {@link placement}. `null` (default) defers to the
220
+ * `[placement]` input; a value wins over it. Lets a composing organism (the
221
+ * submenu wiring in `@cngx/ui/context-menu`) flank a nested panel to the
222
+ * inline-end without a consumer-side `[placement]` handgrip. Mirrors
223
+ * {@link exclusiveOverride}; {@link effectivePlacement} resolves the override
224
+ * first, then the input.
225
+ */
226
+ readonly placementOverride: _angular_core.WritableSignal<PopoverPlacement | null>;
227
+ /**
228
+ * Effective placement for the CSS-anchor path - override wins, else the
229
+ * `[placement]` input, then fully mirrored against the ambient writing
230
+ * direction. Feeds the `POSITION_AREA` write, the token-split arrow edge,
231
+ * and `resolveActualEdge`: `POSITION_AREA` uses physical keywords with no
232
+ * direction awareness, so the whole mirror happens here. A submenu that
233
+ * flanks inline-end under `ltr` flanks the physically-opposite side under
234
+ * `rtl`, matching the shipped keyboard direction-awareness.
235
+ */
236
+ private readonly effectivePlacement;
237
+ /**
238
+ * Effective placement for the floating-ui fallback path - the same source
239
+ * as {@link effectivePlacement} but mirrored side-only. `@floating-ui/dom`
240
+ * flips the inline alignment of vertical placements under `rtl` itself, so
241
+ * feeding it the fully-mirrored token would double-flip `top-start` /
242
+ * `bottom-end`. This path mirrors the side and defers alignment to
243
+ * floating-ui.
244
+ */
245
+ private readonly floatingPlacement;
246
+ /**
247
+ * @internal
248
+ * Programmatic override of {@link positionTryFallbacks}, paired with
249
+ * {@link placementOverride} so a submenu wiring installs the flip chain too.
250
+ * `null` (default) defers to the `[positionTryFallbacks]` input.
251
+ */
252
+ readonly positionTryFallbacksOverride: _angular_core.WritableSignal<readonly PopoverPositionTryFallback[] | null>;
253
+ /** Effective try-fallbacks - override wins, else the `[positionTryFallbacks]` input. */
254
+ private readonly effectivePositionTryFallbacks;
199
255
  private readonly stateSignal;
200
256
  private readonly idSignal;
201
257
  /** Current lifecycle state. */
@@ -281,6 +337,11 @@ declare class CngxPopover {
281
337
  * pointerdown landed outside both its panel and its anchor (trigger).
282
338
  */
283
339
  closeIfOutsidePointerDown(target: EventTarget | null): void;
340
+ /**
341
+ * Shared fallback engine - offset middleware, scroll/resize re-run while
342
+ * open, state-guarded writes. `null` when no fallback is provided.
343
+ */
344
+ private readonly floatingPositioner;
284
345
  /**
285
346
  * Apply Floating UI positioning when CSS Anchor is not supported
286
347
  * and the consumer has provided the fallback via `provideFloatingFallback()`.
@@ -413,10 +474,26 @@ declare class CngxTooltip {
413
474
  private readonly elRef;
414
475
  private readonly destroyRef;
415
476
  private readonly floatingFallback;
477
+ private readonly direction;
416
478
  /** Tooltip text content. */
417
479
  readonly text: _angular_core.InputSignal<string>;
418
480
  /** Anchor-relative placement. */
419
481
  readonly placement: _angular_core.InputSignal<PopoverPlacement>;
482
+ /**
483
+ * @internal
484
+ * `placement` fully mirrored against the ambient writing direction, for the
485
+ * CSS-anchor path (`POSITION_AREA`, physical keywords, no direction
486
+ * awareness).
487
+ */
488
+ private readonly directionalPlacement;
489
+ /**
490
+ * @internal
491
+ * `placement` mirrored side-only, for the floating-ui fallback path.
492
+ * `@floating-ui/dom` flips the inline alignment of vertical placements under
493
+ * `rtl` itself, so a full mirror would double-flip `top-start` / `bottom-end`
494
+ * here. This path mirrors the side and defers alignment to floating-ui.
495
+ */
496
+ private readonly floatingPlacement;
420
497
  /** Gap between trigger and tooltip in px. */
421
498
  readonly offset: _angular_core.InputSignal<number>;
422
499
  /** Delay in ms before opening on mouseenter. */
@@ -457,7 +534,21 @@ declare class CngxTooltip {
457
534
  protected handleMouseLeave(): void;
458
535
  protected handleFocus(): void;
459
536
  protected handleBlur(): void;
460
- protected handleEscape(event: Event): void;
537
+ /**
538
+ * Document-level Escape while open (capture phase). A hover-opened tooltip
539
+ * has no focus relationship with its trigger, so a host keydown binding
540
+ * never fires - WCAG 1.4.13 requires Escape to dismiss regardless of where
541
+ * the keyboard focus sits. stopPropagation keeps parent overlays (dialog,
542
+ * popover) open: Escape dismisses the innermost surface only.
543
+ */
544
+ private readonly handleDocumentEscape;
545
+ /**
546
+ * Shared fallback engine (same as `CngxPopover`) - offset middleware,
547
+ * scroll/resize re-run while open, state-guarded writes. First step of
548
+ * folding the tooltip onto the popover state machine. `null` when no
549
+ * fallback is provided.
550
+ */
551
+ private readonly floatingPositioner;
461
552
  private applyFloatingPosition;
462
553
  private createTooltipElement;
463
554
  private finalize;
@@ -692,7 +783,7 @@ interface CngxPopoverPanelConfig {
692
783
  showArrow?: boolean;
693
784
  /**
694
785
  * App-wide template overrides for the panel's visible regions. Each
695
- * entry is the third tier of the slot cascade — per-instance
786
+ * entry is the third tier of the slot cascade - per-instance
696
787
  * `contentChild` directives still win, the library defaults still
697
788
  * lose. Set via `withArrowTemplate(...)` and friends.
698
789
  */
@@ -868,6 +959,11 @@ declare const CNGX_POPOVER_ARROW_BOUNDS: InjectionToken<CngxPopoverArrowBounds>;
868
959
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-panel.component.ts
869
960
  * @since 0.1.0
870
961
  * @relatedTo CngxPopover, CngxPopoverAction, CngxPopoverHeader, CngxPopoverBody, CngxPopoverFooter
962
+ * @slot cngxPopoverArrow Replaces the pointer that ties the panel to its trigger.
963
+ * @slot cngxPopoverClose Replaces the dismiss control.
964
+ * @slot cngxPopoverLoading Rendered while the panel's content is loading.
965
+ * @slot cngxPopoverEmpty Rendered when the panel has nothing to show.
966
+ * @slot cngxPopoverError Rendered when the panel's content failed to load.
871
967
  * <example-url>http://localhost:4200/#/common/popover/popover-panel/content-states</example-url>
872
968
  * <example-url>http://localhost:4200/#/common/popover/popover-panel/variants</example-url>
873
969
  * <example-url>http://localhost:4200/#/common/popover/popover-panel/with-footer-actions</example-url>
@@ -960,6 +1056,12 @@ declare class CngxPopoverPanel implements CngxPopoverArrowBounds {
960
1056
  private readonly uid;
961
1057
  protected readonly headerId: string;
962
1058
  protected readonly bodyId: string;
1059
+ /**
1060
+ * Only point to the header when one is projected - a bare id reference
1061
+ * resolves even against an element that never renders (the header row is
1062
+ * gated on `hasHeader()`), leaving AT with an empty accessible name.
1063
+ */
1064
+ protected readonly ariaLabelledBy: _angular_core.Signal<string | null>;
963
1065
  /** Only point to body when default content is showing (not loading/error/empty). */
964
1066
  protected readonly ariaDescribedBy: _angular_core.Signal<string | null>;
965
1067
  protected readonly hostClass: _angular_core.Signal<string>;
@@ -1018,12 +1120,17 @@ type PopoverActionVariant = 'primary' | 'secondary' | 'danger' | 'ghost';
1018
1120
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-action.component.ts
1019
1121
  * @since 0.1.0
1020
1122
  * @relatedTo CngxPopoverPanel, CngxPopoverFooter
1123
+ * @slot cngxPending Rendered while the action is running.
1124
+ * @slot cngxSucceeded Rendered after the action succeeds.
1125
+ * @slot cngxFailed Rendered when the action fails; gets the error.
1021
1126
  * <example-url>http://localhost:4200/#/common/popover/popover-panel/content-states</example-url>
1022
1127
  * <example-url>http://localhost:4200/#/common/popover/popover-panel/variants</example-url>
1023
1128
  * <example-url>http://localhost:4200/#/common/popover/popover-panel/with-footer-actions</example-url>
1024
1129
  */
1025
1130
  declare class CngxPopoverAction {
1026
1131
  private readonly popover;
1132
+ private readonly config;
1133
+ private readonly destroyRef;
1027
1134
  /** Button role: `'dismiss'` closes immediately, `'confirm'` runs an async action. */
1028
1135
  readonly role: _angular_core.InputSignal<"dismiss" | "confirm">;
1029
1136
  /** The async action to execute (only for `role="confirm"`). */
@@ -1035,7 +1142,17 @@ declare class CngxPopoverAction {
1035
1142
  protected readonly pendingTpl: _angular_core.Signal<CngxPending | undefined>;
1036
1143
  protected readonly succeededTpl: _angular_core.Signal<CngxSucceeded | undefined>;
1037
1144
  protected readonly failedTpl: _angular_core.Signal<CngxFailed | undefined>;
1145
+ private readonly asyncClick;
1146
+ /**
1147
+ * Lifecycle status of the confirm action - `'idle' | 'pending' | 'success'
1148
+ * | 'error'`, mirroring the internal `CngxAsyncClick`. Always `'idle'` for
1149
+ * `role="dismiss"` (there is no async lifecycle to report).
1150
+ */
1151
+ readonly status: _angular_core.Signal<AsyncStatus>;
1152
+ private closeOnSuccessTimer;
1153
+ constructor();
1038
1154
  protected handleDismiss(): void;
1155
+ private clearCloseOnSuccessTimer;
1039
1156
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxPopoverAction, never>;
1040
1157
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxPopoverAction, "cngx-popover-action", ["cngxPopoverAction"], { "role": { "alias": "role"; "required": false; "isSignal": true; }; "action": { "alias": "action"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "feedbackDuration": { "alias": "feedbackDuration"; "required": false; "isSignal": true; }; }, {}, ["pendingTpl", "succeededTpl", "failedTpl"], ["*"], true, never>;
1041
1158
  }
@@ -1,9 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Signal, InjectionToken, TemplateRef, EnvironmentProviders, Provider, DestroyRef, Injector } from '@angular/core';
2
+ import { Signal, InjectionToken, TemplateRef, OnInit, EnvironmentProviders, Provider, AfterContentInit, DestroyRef, Injector } from '@angular/core';
3
3
  import { CngxAsyncState, StatusTransition } from '@cngx/core/utils';
4
4
  import { Observable } from 'rxjs';
5
5
  import * as i1 from '@cngx/common/interactive';
6
6
  import { CngxErrorAggregatorContract, SwipeDirection } from '@cngx/common/interactive';
7
+ import { CngxDirection } from '@cngx/core';
7
8
  import { CngxCommitController } from '@cngx/common/data';
8
9
 
9
10
  /**
@@ -547,9 +548,11 @@ declare class CngxStepLabel {
547
548
  * @github https://github.com/cngxjs/cngx/blob/main/projects/common/stepper/step.directive.ts
548
549
  * @since 0.1.0
549
550
  * @relatedTo CngxStepGroup, CngxStepperPresenter, CngxStepLabel, CngxStepContent
551
+ * @slot cngxStepLabel The step's own header label.
552
+ * @slot cngxStepContent The step body, rendered lazily when the step activates.
550
553
  * <example-url>http://localhost:4200/#/ui/stepper/stepper-step-content/typed-lazy-panels</example-url>
551
554
  */
552
- declare class CngxStep {
555
+ declare class CngxStep implements OnInit {
553
556
  readonly id: i0.InputSignal<string>;
554
557
  readonly disabled: i0.InputSignal<boolean>;
555
558
  readonly completed: i0.InputSignal<boolean>;
@@ -580,7 +583,11 @@ declare class CngxStep {
580
583
  * with structural equal - never written via `effect`.
581
584
  */
582
585
  readonly state: Signal<CngxStepStatus>;
586
+ private readonly groupHost;
587
+ private readonly stepperHost;
588
+ private readonly destroyRef;
583
589
  constructor();
590
+ ngOnInit(): void;
584
591
  static ɵfac: i0.ɵɵFactoryDeclaration<CngxStep, never>;
585
592
  static ɵdir: i0.ɵɵDirectiveDeclaration<CngxStep, "[cngxStep]", ["cngxStep"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "completed": { "alias": "completed"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "errorAggregator": { "alias": "errorAggregator"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; }, {}, ["labelSlot", "contentSlot"], never, true, never>;
586
593
  }
@@ -604,7 +611,7 @@ declare class CngxStep {
604
611
  * <example-url>http://localhost:4200/#/ui/stepper/stepper-hierarchical/expand-active-group-collapse</example-url>
605
612
  * <example-url>http://localhost:4200/#/ui/stepper/stepper-hierarchical/group-collapse-summary-count</example-url>
606
613
  */
607
- declare class CngxStepGroup implements CngxStepGroupHost {
614
+ declare class CngxStepGroup implements CngxStepGroupHost, OnInit {
608
615
  readonly id: i0.InputSignal<string>;
609
616
  readonly disabled: i0.InputSignal<boolean>;
610
617
  readonly label: i0.InputSignal<string>;
@@ -612,6 +619,7 @@ declare class CngxStepGroup implements CngxStepGroupHost {
612
619
  private readonly childRegistry;
613
620
  readonly aggregatedStatus: Signal<CngxStepStatus>;
614
621
  private readonly stepperHost;
622
+ private readonly destroyRef;
615
623
  /**
616
624
  * `true` when this group's children are collapsed to the header node:
617
625
  * the focus-driven policy is `'expand-active'`, this group does not
@@ -627,6 +635,7 @@ declare class CngxStepGroup implements CngxStepGroupHost {
627
635
  */
628
636
  readonly isCollapsed: Signal<boolean>;
629
637
  constructor();
638
+ ngOnInit(): void;
630
639
  register(handle: CngxStepRegistration): void;
631
640
  unregister(id: string): void;
632
641
  static ɵfac: i0.ɵɵFactoryDeclaration<CngxStepGroup, never>;
@@ -1605,7 +1614,7 @@ declare const CNGX_STEPPER_GLYPHS: {
1605
1614
  * @relatedTo CngxStepperPresenter, CNGX_STEPPER_CONFIG
1606
1615
  * <example-url>http://localhost:4200/#/ui/stepper/stepper-router-sync/deep-linking-with-fragment-queryparam-modes</example-url>
1607
1616
  */
1608
- declare class CngxStepperRouterSync {
1617
+ declare class CngxStepperRouterSync implements AfterContentInit {
1609
1618
  readonly modeInput: i0.InputSignal<"fragment" | "queryParam" | undefined>;
1610
1619
  readonly paramNameInput: i0.InputSignal<string | undefined>;
1611
1620
  private readonly config;
@@ -1615,7 +1624,32 @@ declare class CngxStepperRouterSync {
1615
1624
  readonly syncError: i0.OutputEmitterRef<unknown>;
1616
1625
  private readonly host;
1617
1626
  private readonly router;
1627
+ /**
1628
+ * Latched once the URL seed has reached a registered step, so the
1629
+ * `afterNextRender` fallback cannot run it twice.
1630
+ *
1631
+ * The latch is load-bearing, not decorative: the seed goes through
1632
+ * `selectById` → `select()`, which opens a commit window. Under a
1633
+ * pessimistic commit `activeStepIndex` still holds the *previous* index
1634
+ * while the action is in flight, so the presenter's `target === previous`
1635
+ * bail does not catch the repeat - an unlatched fallback would fire the
1636
+ * consumer's commit-action a second time and supersede the first.
1637
+ */
1638
+ private seeded;
1618
1639
  constructor();
1640
+ /**
1641
+ * Seed from the URL before the stepper renders its panels. `CngxStep`
1642
+ * registers in its constructor, so the registry is populated by the time
1643
+ * this runs, and the host view has not rendered yet - which is what keeps
1644
+ * a `panelMode="lazy"` default step from counting its first render as a
1645
+ * first activation on a deep link that named another step.
1646
+ *
1647
+ * Own router guard: the constructor's early return does not stop
1648
+ * lifecycle hooks from running.
1649
+ */
1650
+ ngAfterContentInit(): void;
1651
+ private seedFromUrl;
1652
+ private readUrlValue;
1619
1653
  private parseFragment;
1620
1654
  static ɵfac: i0.ɵɵFactoryDeclaration<CngxStepperRouterSync, never>;
1621
1655
  static ɵdir: i0.ɵɵDirectiveDeclaration<CngxStepperRouterSync, "[cngxStepperRouterSync]", ["cngxStepperRouterSync"], { "modeInput": { "alias": "mode"; "required": false; "isSignal": true; }; "paramNameInput": { "alias": "paramName"; "required": false; "isSignal": true; }; }, { "syncError": "syncError"; }, never, never, true, never>;
@@ -1789,7 +1823,8 @@ declare function resolveStepperStatusLabel(node: CngxStepNode, i18n: CngxStepper
1789
1823
  * `<cngx-stepper>` to drive its mobile auto-collapse template branch.
1790
1824
  *
1791
1825
  * In SSR / non-DOM environments the signal stays `false` and the
1792
- * listener is never wired.
1826
+ * listener is never wired. Thin wrapper over `createMediaQuerySignal`
1827
+ * from `@cngx/core/utils`, bound to `globalThis`.
1793
1828
  *
1794
1829
  * @category common/stepper
1795
1830
  */
@@ -2008,6 +2043,11 @@ interface CngxStepperStripKeyboardNavOptions {
2008
2043
  readonly presenter: CngxStepperHost;
2009
2044
  /** Host element used to locate the active step button after the move. */
2010
2045
  readonly hostElement: HTMLElement;
2046
+ /**
2047
+ * Document writing direction. Flips the horizontal-strip inline arrows
2048
+ * under `rtl` (APG); the vertical strip and Home/End stay invariant.
2049
+ */
2050
+ readonly direction: Signal<CngxDirection>;
2011
2051
  /** Returns the current flat-step count so `End` lands on the last step. */
2012
2052
  readonly flatStepCount: () => number;
2013
2053
  /**
@@ -2225,6 +2265,16 @@ interface CngxStepperAnnouncementBuilders {
2225
2265
  readonly statusPhrase: (node: CngxStepNode) => string;
2226
2266
  /** Group descriptor - rolls up children's aggregated status. */
2227
2267
  readonly groupStatusPhrase: (node: CngxStepNode) => string;
2268
+ /** Stable descriptor-span id for a node (`<node-id>-desc`). */
2269
+ readonly descriptorId: (node: CngxStepNode) => string;
2270
+ /**
2271
+ * `aria-describedby` value for a node: `descriptorId(node)` while the
2272
+ * node's phrase (`statusPhrase` for steps, `groupStatusPhrase` for
2273
+ * groups) is non-empty, else `null`. The descriptor span stays in the
2274
+ * DOM; only the reference is gated - accname 1.2 §2A traverses a
2275
+ * directly-referenced node even when it is empty or hidden.
2276
+ */
2277
+ readonly describedBy: (node: CngxStepNode) => string | null;
2228
2278
  }
2229
2279
  /**
2230
2280
  * Build the reactive SR-announcement surface for `<cngx-stepper>`.