@cngx/ui 0.1.0-rc.6 → 0.1.0-rc.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/README.md +112 -1
  2. package/a11y/README.md +87 -0
  3. package/accordion/README.md +4 -2
  4. package/breadcrumb/README.md +262 -0
  5. package/collection/README.md +6 -0
  6. package/command-palette/README.md +224 -0
  7. package/context-menu/README.md +98 -0
  8. package/data-grid-accordion/README.md +103 -2
  9. package/feedback/README.md +42 -0
  10. package/fesm2022/cngx-ui-a11y.mjs +452 -0
  11. package/fesm2022/cngx-ui-a11y.mjs.map +1 -0
  12. package/fesm2022/cngx-ui-accordion.mjs +116 -38
  13. package/fesm2022/cngx-ui-accordion.mjs.map +1 -1
  14. package/fesm2022/cngx-ui-action-button.mjs +115 -50
  15. package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
  16. package/fesm2022/cngx-ui-breadcrumb.mjs +181 -96
  17. package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -1
  18. package/fesm2022/cngx-ui-chart-panel.mjs +586 -0
  19. package/fesm2022/cngx-ui-chart-panel.mjs.map +1 -0
  20. package/fesm2022/cngx-ui-collection.mjs +207 -66
  21. package/fesm2022/cngx-ui-collection.mjs.map +1 -1
  22. package/fesm2022/cngx-ui-command-palette.mjs +1281 -0
  23. package/fesm2022/cngx-ui-command-palette.mjs.map +1 -0
  24. package/fesm2022/cngx-ui-context-menu.mjs +857 -0
  25. package/fesm2022/cngx-ui-context-menu.mjs.map +1 -0
  26. package/fesm2022/cngx-ui-data-grid-accordion.mjs +498 -111
  27. package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -1
  28. package/fesm2022/cngx-ui-empty-state.mjs +16 -6
  29. package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
  30. package/fesm2022/cngx-ui-feedback.mjs +1095 -521
  31. package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
  32. package/fesm2022/cngx-ui-layout.mjs +18 -9
  33. package/fesm2022/cngx-ui-layout.mjs.map +1 -1
  34. package/fesm2022/cngx-ui-mat-accordion.mjs +84 -16
  35. package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -1
  36. package/fesm2022/cngx-ui-mat-paginator.mjs +67 -24
  37. package/fesm2022/cngx-ui-mat-paginator.mjs.map +1 -1
  38. package/fesm2022/cngx-ui-mat-stepper.mjs +72 -47
  39. package/fesm2022/cngx-ui-mat-stepper.mjs.map +1 -1
  40. package/fesm2022/cngx-ui-mat-tabs.mjs +370 -203
  41. package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
  42. package/fesm2022/cngx-ui-overlay.mjs +69 -13
  43. package/fesm2022/cngx-ui-overlay.mjs.map +1 -1
  44. package/fesm2022/cngx-ui-paginator.mjs +501 -182
  45. package/fesm2022/cngx-ui-paginator.mjs.map +1 -1
  46. package/fesm2022/cngx-ui-sidenav.mjs +327 -106
  47. package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
  48. package/fesm2022/cngx-ui-skeleton.mjs +22 -21
  49. package/fesm2022/cngx-ui-skeleton.mjs.map +1 -1
  50. package/fesm2022/cngx-ui-speak.mjs +107 -8
  51. package/fesm2022/cngx-ui-speak.mjs.map +1 -1
  52. package/fesm2022/cngx-ui-stat-card.mjs +718 -0
  53. package/fesm2022/cngx-ui-stat-card.mjs.map +1 -0
  54. package/fesm2022/cngx-ui-stepper.mjs +217 -76
  55. package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
  56. package/fesm2022/cngx-ui-tabs.mjs +40 -19
  57. package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
  58. package/fesm2022/cngx-ui-timeline.mjs +548 -0
  59. package/fesm2022/cngx-ui-timeline.mjs.map +1 -0
  60. package/fesm2022/cngx-ui-toc.mjs +748 -0
  61. package/fesm2022/cngx-ui-toc.mjs.map +1 -0
  62. package/fesm2022/cngx-ui.mjs +16 -21
  63. package/fesm2022/cngx-ui.mjs.map +1 -1
  64. package/mat-accordion/README.md +1 -1
  65. package/mat-paginator/README.md +9 -2
  66. package/mat-tabs/styles/mat-tabs.css +29 -27
  67. package/overlay/README.md +9 -4
  68. package/package.json +32 -1
  69. package/paginator/README.md +8 -4
  70. package/sidenav/README.md +33 -11
  71. package/skeleton/README.md +2 -0
  72. package/speak/README.md +3 -2
  73. package/stepper/README.md +15 -3
  74. package/timeline/README.md +350 -0
  75. package/toc/README.md +186 -0
  76. package/types/cngx-ui-a11y.d.ts +394 -0
  77. package/types/cngx-ui-accordion.d.ts +100 -30
  78. package/types/cngx-ui-action-button.d.ts +47 -3
  79. package/types/cngx-ui-breadcrumb.d.ts +159 -58
  80. package/types/cngx-ui-chart-panel.d.ts +382 -0
  81. package/types/cngx-ui-collection.d.ts +159 -58
  82. package/types/cngx-ui-command-palette.d.ts +565 -0
  83. package/types/cngx-ui-context-menu.d.ts +559 -0
  84. package/types/cngx-ui-data-grid-accordion.d.ts +344 -51
  85. package/types/cngx-ui-empty-state.d.ts +9 -2
  86. package/types/cngx-ui-feedback.d.ts +664 -73
  87. package/types/cngx-ui-layout.d.ts +8 -3
  88. package/types/cngx-ui-mat-accordion.d.ts +32 -4
  89. package/types/cngx-ui-mat-paginator.d.ts +37 -8
  90. package/types/cngx-ui-mat-stepper.d.ts +23 -11
  91. package/types/cngx-ui-mat-tabs.d.ts +218 -23
  92. package/types/cngx-ui-overlay.d.ts +56 -10
  93. package/types/cngx-ui-paginator.d.ts +416 -132
  94. package/types/cngx-ui-sidenav.d.ts +248 -74
  95. package/types/cngx-ui-skeleton.d.ts +18 -7
  96. package/types/cngx-ui-speak.d.ts +118 -5
  97. package/types/cngx-ui-stat-card.d.ts +411 -0
  98. package/types/cngx-ui-stepper.d.ts +81 -29
  99. package/types/cngx-ui-tabs.d.ts +22 -6
  100. package/types/cngx-ui-timeline.d.ts +495 -0
  101. package/types/cngx-ui-toc.d.ts +581 -0
  102. package/types/cngx-ui.d.ts +8 -5
@@ -1,6 +1,8 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { ElementRef, InjectionToken, ModelSignal, EnvironmentProviders, Provider } from '@angular/core';
2
+ import { ElementRef, InjectionToken, ModelSignal, Signal, EnvironmentProviders, Provider } from '@angular/core';
3
3
  import * as i1 from '@cngx/common/interactive';
4
+ import * as i1$1 from '@cngx/common/layout';
5
+ import { CngxMessage } from '@cngx/core/i18n';
4
6
 
5
7
  /**
6
8
  * Logical position - flips in RTL.
@@ -18,18 +20,31 @@ type SidenavPosition = 'start' | 'end';
18
20
  *
19
21
  * @category ui/sidenav
20
22
  */
21
- type SidenavMode = 'over' | 'push' | 'side' | 'mini';
23
+ type SidenavMode = 'auto' | 'over' | 'push' | 'side' | 'mini';
24
+ /**
25
+ * A resolved mode - what `'auto'` settles on plus every pinnable value.
26
+ *
27
+ * @category ui/sidenav
28
+ */
29
+ type ResolvedSidenavMode = Exclude<SidenavMode, 'auto'>;
22
30
  /**
23
31
  * Declarative sidebar component for the four drawer modes (`over`,
24
- * `push`, `side`, `mini`), with responsive mode switching, two-way
32
+ * `push`, `side`, `mini`) plus an `auto` default, two-way
25
33
  * `[(opened)]` binding, and content projection via header/footer
26
34
  * slots.
27
35
  *
36
+ * Responsive out of the box: `mode` defaults to `'auto'`, which docks the
37
+ * rail beside the content once the surrounding `CngxSidenavLayout` is
38
+ * `64rem` or wider and overlays it below that. Nothing needs to be bound.
39
+ * The threshold lives in `sidenav-layout.css` and nowhere else - a
40
+ * `@container` rule writes `--cngx-sidenav-layout-wide` on the rail and
41
+ * this component reads the resolved value, so ejecting the skin moves the
42
+ * breakpoint with it. Any explicit `mode` pins that mode at every width.
43
+ *
28
44
  * In overlay (`over`) mode it drives a CDK focus trap directly via
29
45
  * `FocusTrapFactory` (the same primitive `CngxFocusTrap` wraps): focus
30
46
  * moves into the rail on open and is restored to the opener on close.
31
- * Responsive switching runs off an inline `matchMedia` listener; the
32
- * shared backdrop and document scroll lock are coordinated by
47
+ * The shared backdrop and document scroll lock are coordinated by
33
48
  * `CngxSidenavLayout`. It does not compose `CngxDrawer` and has no
34
49
  * swipe-to-dismiss.
35
50
  *
@@ -38,8 +53,7 @@ type SidenavMode = 'over' | 'push' | 'side' | 'mini';
38
53
  *
39
54
  * ```html
40
55
  * <cngx-sidenav-layout>
41
- * <cngx-sidenav position="start" [(opened)]="navOpen"
42
- * [responsive]="'(min-width: 1024px)'">
56
+ * <cngx-sidenav position="start" [(opened)]="navOpen">
43
57
  * <cngx-sidenav-header>Logo</cngx-sidenav-header>
44
58
  * <a cngxNavLink [active]="true">Dashboard</a>
45
59
  * <cngx-sidenav-footer>v1.0</cngx-sidenav-footer>
@@ -56,14 +70,15 @@ type SidenavMode = 'over' | 'push' | 'side' | 'mini';
56
70
  * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/sidenav/sidenav.ts
57
71
  * @since 0.1.0
58
72
  * @relatedTo CngxSidenavLayout, CngxSidenavContent, CngxSidenavHeader, CngxSidenavFooter
73
+ * <example-url>http://localhost:4200/#/ui/sidenav/auto-mode</example-url>
59
74
  * <example-url>http://localhost:4200/#/ui/sidenav/dual-sidebar-master-detail</example-url>
60
75
  * <example-url>http://localhost:4200/#/ui/sidenav/full-navigation-sidebar</example-url>
61
76
  * <example-url>http://localhost:4200/#/ui/sidenav/material-theming-light-vs-dark</example-url>
62
77
  */
63
78
  declare class CngxSidenav {
64
79
  /**
65
- * Resolved sidenav configuration cascade. Seeds the dimension, `responsive`,
66
- * and `shortcut` input defaults below so a per-instance binding still wins
80
+ * Resolved sidenav configuration cascade. Seeds the dimension and
81
+ * `shortcut` input defaults below so a per-instance binding still wins
67
82
  * (Controlled+Uncontrolled), an app-wide `provideSidenavConfig(...)` moves the
68
83
  * default, and an un-configured consumer keeps the byte-identical literals.
69
84
  * Declared first so the input field initialisers can read it.
@@ -73,14 +88,12 @@ declare class CngxSidenav {
73
88
  readonly position: _angular_core.InputSignal<SidenavPosition>;
74
89
  /** Accessible label for the complementary landmark. */
75
90
  readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
76
- /** Drawer mode. Overridden by `responsive` when set. */
77
- readonly mode: _angular_core.InputSignal<SidenavMode>;
78
91
  /**
79
- * CSS media query string for responsive mode switching.
80
- * When the query matches, mode becomes `'side'` (permanent).
81
- * When it doesn't match, mode becomes `'over'` (overlay).
92
+ * Drawer mode. `'auto'` (the default) resolves to `'side'` once the
93
+ * surrounding layout is `64rem` or wider and to `'over'` below that; any
94
+ * other value pins that mode at every width.
82
95
  */
83
- readonly responsive: _angular_core.InputSignal<string | undefined>;
96
+ readonly mode: _angular_core.InputSignal<SidenavMode>;
84
97
  /** Width of the sidenav panel. Supports two-way `[(width)]` for resize. */
85
98
  readonly width: _angular_core.ModelSignal<string>;
86
99
  /** Width of the collapsed rail in `mini` mode. Any CSS value. */
@@ -89,9 +102,27 @@ declare class CngxSidenav {
89
102
  readonly expandOnHover: _angular_core.InputSignal<boolean>;
90
103
  /** Whether the sidebar is user-resizable via a drag handle. */
91
104
  readonly resizable: _angular_core.InputSignal<boolean>;
92
- /** Minimum width constraint during resize. */
105
+ /**
106
+ * Accessible name of the resize separator. Unbound, the `resizeHandle` label
107
+ * (`withSidenavLabels`) applies; per-instance like `ariaLabel`, since it
108
+ * names this rail's handle.
109
+ */
110
+ readonly resizeLabel: _angular_core.InputSignal<string | undefined>;
111
+ private readonly labels;
112
+ private readonly locale;
113
+ /** @internal */
114
+ protected readonly resolvedResizeLabel: _angular_core.Signal<string>;
115
+ /**
116
+ * Minimum width constraint during resize. Use a px value: drag and keyboard
117
+ * clamping (and `aria-valuemin`) resolve px only; a rem/ch constraint falls
118
+ * back to the 120px default for clamping and omits the ARIA value.
119
+ */
93
120
  readonly minWidth: _angular_core.InputSignal<string>;
94
- /** Maximum width constraint during resize. */
121
+ /**
122
+ * Maximum width constraint during resize. Use a px value: drag and keyboard
123
+ * clamping (and `aria-valuemax`) resolve px only; a rem/ch constraint falls
124
+ * back to the 600px default for clamping and omits the ARIA value.
125
+ */
95
126
  readonly maxWidth: _angular_core.InputSignal<string>;
96
127
  /**
97
128
  * Keyboard shortcut to toggle the sidenav, e.g. `'ctrl+b'` or `'meta+b'`.
@@ -131,9 +162,24 @@ declare class CngxSidenav {
131
162
  readonly expanded: _angular_core.Signal<boolean>;
132
163
  /** @internal Reference to host element for layout positioning. */
133
164
  readonly elementRef: ElementRef<any>;
134
- private readonly mediaMatches;
135
- /** Resolved mode - responsive overrides to `'side'` when matching, falls back to `mode()`. */
136
- readonly effectiveMode: _angular_core.Signal<SidenavMode>;
165
+ /** The layout's query container, absent when the rail is mounted standalone. */
166
+ private readonly container;
167
+ /**
168
+ * `'1'` while the layout is at or above the docking threshold, set by the
169
+ * `@container` rule in `sidenav-layout.css` on this rail. The rule styles
170
+ * the rail rather than the layout because a container query resolves
171
+ * against an *ancestor* container - a rule whose subject is the container
172
+ * itself would never match.
173
+ *
174
+ * Empty until the layout's first `ResizeObserver` entry arrives, so `auto`
175
+ * resolves to `over` for that first frame. The observer's initial callback
176
+ * runs after layout and before paint, so nothing flashes; do NOT seed this
177
+ * with a constructor-time `getComputedStyle`, which would read before the
178
+ * first layout and report `'0'` regardless of the real width.
179
+ */
180
+ private readonly layoutWide;
181
+ /** Resolved mode - `'auto'` derives from the layout width, anything else pins. */
182
+ readonly effectiveMode: _angular_core.Signal<ResolvedSidenavMode>;
137
183
  /** Whether this sidenav is in overlay mode (over). */
138
184
  readonly isOverlay: _angular_core.Signal<boolean>;
139
185
  /** Whether the sidenav is currently a modal overlay: overlay mode and open. */
@@ -143,11 +189,11 @@ declare class CngxSidenav {
143
189
  private readonly doc;
144
190
  private readonly win;
145
191
  /**
146
- * Current/previous effective-mode pair for transition detection. Mirrors the
147
- * `createTransitionTracker` shape from `@cngx/core/utils`, inlined because that
148
- * helper is typed to `AsyncStatus`; `SidenavMode` needs the same `linkedSignal`
149
- * pattern. Replaces the hand-rolled `prevMode` signal that was `.set()` inside
150
- * the mode effect.
192
+ * Current/previous effective-mode pair for transition detection. The shared
193
+ * `createTransitionTracker` is generic since it stopped being `AsyncStatus`-
194
+ * typed, so the hand-rolled `linkedSignal` twin this class used to carry is
195
+ * gone. `previous` seeds to `current` on the first run, which the consumer
196
+ * effect's equality guard already treats as "no transition".
151
197
  */
152
198
  private readonly modeTransition;
153
199
  /** CDK focus trap over the host; enabled only while a modal overlay is open. */
@@ -187,14 +233,45 @@ declare class CngxSidenav {
187
233
  * authoritative while `expandOnHover=false`.
188
234
  */
189
235
  collapse(): void;
190
- /** @internal Parse a CSS px value to a number. */
191
- protected readonly widthPx: _angular_core.Signal<number>;
192
- protected readonly minWidthPx: _angular_core.Signal<number>;
193
- protected readonly maxWidthPx: _angular_core.Signal<number>;
236
+ /** @internal Numeric px of the current width, or null for non-px units. */
237
+ protected readonly widthPx: _angular_core.Signal<number | null>;
238
+ protected readonly minWidthPx: _angular_core.Signal<number | null>;
239
+ protected readonly maxWidthPx: _angular_core.Signal<number | null>;
240
+ /**
241
+ * Rect-measured width for non-px rails: seeded after first render (a
242
+ * focusable separator must expose `aria-valuenow` before it is ever
243
+ * focused) and refreshed each time the separator gains focus, so the value
244
+ * AT reads at interaction time is current.
245
+ */
246
+ private readonly measuredWidthPx;
247
+ /**
248
+ * @internal `aria-valuenow` of the separator: the px width when parseable,
249
+ * else the rect measurement - the window-splitter pattern wants a valuenow
250
+ * on a focusable separator even for rem-sized rails.
251
+ */
252
+ protected readonly widthValueNow: _angular_core.Signal<number | null>;
253
+ /**
254
+ * @internal `aria-valuetext` of the separator: its position as a percent of
255
+ * the min-max range, formatted in the locale, so AT speaks where the handle
256
+ * sits instead of a bare pixel count. `null` (AT reads `aria-valuenow`) while
257
+ * the width or a bound is not in px.
258
+ */
259
+ protected readonly widthValueText: _angular_core.Signal<string | null>;
260
+ private measureWidth;
261
+ /** @internal Refresh the measurement the moment AT is about to read it. */
262
+ protected handleResizeFocus(): void;
263
+ /**
264
+ * @internal Arrow-key resize on the separator, so the handle is operable
265
+ * without a pointer (WCAG 2.1.1): arrows step by 16px (direction-aware for
266
+ * `position="end"`), Home/End jump to the min/max constraint. Any modified
267
+ * key (shift included) passes through untouched - browser and AT shortcuts
268
+ * stay theirs.
269
+ */
270
+ protected handleResizeKeydown(event: KeyboardEvent): void;
194
271
  /** @internal */
195
- handleResizeStart(e: PointerEvent): void;
272
+ protected handleResizeStart(e: PointerEvent): void;
196
273
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxSidenav, never>;
197
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxSidenav, "cngx-sidenav", ["cngxSidenav"], { "position": { "alias": "position"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "miniWidth": { "alias": "miniWidth"; "required": false; "isSignal": true; }; "expandOnHover": { "alias": "expandOnHover"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; "minWidth": { "alias": "minWidth"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "shortcut": { "alias": "shortcut"; "required": false; "isSignal": true; }; "opened": { "alias": "opened"; "required": false; "isSignal": true; }; }, { "width": "widthChange"; "opened": "openedChange"; }, never, ["cngx-sidenav-header, [cngxSidenavHeader]", "*", "cngx-sidenav-footer, [cngxSidenavFooter]"], true, [{ directive: typeof i1.CngxHoverIntent; inputs: { "enterDelay": "expandDelay"; "leaveDelay": "collapseDelay"; }; outputs: {}; }]>;
274
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxSidenav, "cngx-sidenav", ["cngxSidenav"], { "position": { "alias": "position"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "miniWidth": { "alias": "miniWidth"; "required": false; "isSignal": true; }; "expandOnHover": { "alias": "expandOnHover"; "required": false; "isSignal": true; }; "resizable": { "alias": "resizable"; "required": false; "isSignal": true; }; "resizeLabel": { "alias": "resizeLabel"; "required": false; "isSignal": true; }; "minWidth": { "alias": "minWidth"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "shortcut": { "alias": "shortcut"; "required": false; "isSignal": true; }; "opened": { "alias": "opened"; "required": false; "isSignal": true; }; }, { "width": "widthChange"; "opened": "openedChange"; }, never, ["cngx-sidenav-header, [cngxSidenavHeader]", "*", "cngx-sidenav-footer, [cngxSidenavFooter]"], true, [{ directive: typeof i1.CngxHoverIntent; inputs: { "enterDelay": "expandDelay"; "leaveDelay": "collapseDelay"; }; outputs: {}; }]>;
198
275
  }
199
276
 
200
277
  /**
@@ -203,11 +280,17 @@ declare class CngxSidenav {
203
280
  * Manages shared backdrop, scroll lock, and click-outside coordination.
204
281
  * Supports up to two sidenavs: one `position="start"` and one `position="end"`.
205
282
  *
283
+ * It is also the query container the rails resolve their `'auto'` mode
284
+ * against: the stylesheet declares and names the container
285
+ * (`cngx-sidenav-layout`) and carries the single docking threshold, the
286
+ * composed `CngxContainer` observes it and publishes the resolved value. A
287
+ * rail mounted without this layout has no container and falls back to
288
+ * `over`.
289
+ *
206
290
  * ### Dual sidebar
207
291
  * ```html
208
292
  * <cngx-sidenav-layout>
209
- * <cngx-sidenav position="start" [(opened)]="navOpen"
210
- * [responsive]="'(min-width: 1024px)'">
293
+ * <cngx-sidenav position="start" [(opened)]="navOpen">
211
294
  * Left nav
212
295
  * </cngx-sidenav>
213
296
  * <cngx-sidenav-content>
@@ -227,8 +310,9 @@ declare class CngxSidenav {
227
310
  * @relatedTo CngxSidenav, CngxSidenavContent, CngxSidenavHeader, CngxSidenavFooter
228
311
  */
229
312
  declare class CngxSidenavLayout {
230
- /** @internal */
231
- readonly ready: _angular_core.WritableSignal<boolean>;
313
+ private readonly readyState;
314
+ /** @internal First render done - gates transitions against an open-on-load flash. */
315
+ protected readonly ready: _angular_core.Signal<boolean>;
232
316
  private readonly sidenavs;
233
317
  /** The start-positioned sidenav, if any. */
234
318
  readonly startSidenav: _angular_core.Signal<CngxSidenav | null>;
@@ -240,7 +324,7 @@ declare class CngxSidenavLayout {
240
324
  /** Closes all sidenavs that are currently in overlay mode. */
241
325
  closeAllOverlays(): void;
242
326
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxSidenavLayout, never>;
243
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxSidenavLayout, "cngx-sidenav-layout", ["cngxSidenavLayout"], {}, {}, ["sidenavs"], ["cngx-sidenav[position=start], cngx-sidenav:not([position])", "cngx-sidenav-content", "cngx-sidenav[position=end]"], true, never>;
327
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxSidenavLayout, "cngx-sidenav-layout", ["cngxSidenavLayout"], {}, {}, ["sidenavs"], ["cngx-sidenav[position=start], cngx-sidenav:not([position])", "cngx-sidenav-content", "cngx-sidenav[position=end]"], true, [{ directive: typeof i1$1.CngxContainer; inputs: {}; outputs: {}; }]>;
244
328
  }
245
329
 
246
330
  /**
@@ -430,7 +514,7 @@ declare class CngxSidenavFooter {
430
514
 
431
515
  /**
432
516
  * App-wide cascade for the sidenav family's dimension defaults, the mini
433
- * expand-on-hover dwell, and the `responsive` / `shortcut` behaviour knobs.
517
+ * expand-on-hover dwell, and the `shortcut` behaviour knob.
434
518
  *
435
519
  * Resolution priority (high -> low):
436
520
  * 1. Per-instance Input binding (e.g. `[width]="'320px'"`, `[shortcut]="'mod+b'"`).
@@ -442,13 +526,14 @@ declare class CngxSidenavFooter {
442
526
  * Every key is optional - partial overrides deep-merge with the library
443
527
  * defaults, so consumers declare only the keys they want to override. The
444
528
  * `dimensions`, `hover`, and `routerSync` sub-trees are one level deep
445
- * (spread-merged per key); `responsive` and `shortcut` are flat top-level
446
- * scalars.
529
+ * (spread-merged per key); `shortcut` is a flat top-level scalar.
447
530
  *
448
531
  * The cascaded keys are the dimension inputs, the mini hover dwell, the
449
- * `responsive` and `shortcut` defaults, and the router-sync `param`.
450
- * `ariaLabel`, `position`, and `mode` stay per-instance only, since they
451
- * describe an individual rail rather than an app-wide default.
532
+ * `shortcut` default, and the router-sync `param`. `ariaLabel`, `position`,
533
+ * and `mode` stay per-instance only, since they describe an individual rail
534
+ * rather than an app-wide default. The docking threshold behind `mode="auto"`
535
+ * is deliberately not here: it lives in `sidenav-layout.css` as a
536
+ * `@container` rule, so a consumer moves it by overriding that rule.
452
537
  *
453
538
  * @category ui/sidenav
454
539
  * @since 0.1.0
@@ -491,18 +576,60 @@ interface CngxSidenavConfig {
491
576
  /** Query-param key the sidenav's `opened` state syncs to. Defaults to `'nav'`. */
492
577
  readonly param?: string;
493
578
  };
494
- /**
495
- * Default CSS media-query string for responsive mode switching. Per-instance
496
- * `[responsive]` still wins. A flat top-level scalar, not a nested sub-tree.
497
- */
498
- readonly responsive?: string;
499
579
  /**
500
580
  * Default keyboard shortcut to toggle the sidenav (e.g. `'mod+b'`).
501
581
  * Per-instance `[shortcut]` still wins. A flat top-level scalar.
502
582
  */
503
583
  readonly shortcut?: string;
584
+ /**
585
+ * App-wide sidenav copy overrides. Reactive from birth: pass a partial
586
+ * bundle or a `Signal` of one; unset keys read the `sidenav` section of the
587
+ * language pack (English without one). Override via `withSidenavLabels(...)`.
588
+ * A later feature replaces the whole bundle.
589
+ */
590
+ readonly labels?: Partial<CngxSidenavLabels> | Signal<Partial<CngxSidenavLabels>>;
591
+ }
592
+ /**
593
+ * User-facing copy of the sidenav. The defaults come from the `sidenav` section
594
+ * of the language pack (English without one).
595
+ *
596
+ * @category ui/sidenav
597
+ * @since 0.1.0
598
+ */
599
+ interface CngxSidenavLabels {
600
+ /**
601
+ * Default of `[resizeLabel]`, the accessible name of the resize separator.
602
+ */
603
+ readonly resizeHandle: string;
604
+ /**
605
+ * `aria-valuetext` of the resize separator. Receives the separator position
606
+ * as a rounded percent (0-100) of its min-max range and that value already
607
+ * formatted as a percent in the app locale; the default returns the
608
+ * formatted string. Same shape as the feedback `progressValueText`.
609
+ */
610
+ readonly resizeValueText: (percent: number, formatted: string) => string;
504
611
  }
505
612
 
613
+ /**
614
+ * Library defaults for the sidenav configuration cascade. The values are
615
+ * byte-identical to the per-instance input defaults `CngxSidenav` shipped
616
+ * before the cascade (`width '280px'`, `miniWidth '56px'`, `minWidth '120px'`,
617
+ * `maxWidth '600px'`, `enterDelay 120`, `leaveDelay 0`; `shortcut` omitted =
618
+ * `undefined`), so an un-configured consumer sees no change.
619
+ *
620
+ * The `leaveDelay 0` default is kept deliberately (instant collapse, asymmetric
621
+ * with the 120ms enter): the dwell becomes tunable via `[leaveDelay]` /
622
+ * `withSidenavHoverDwell(...)`, not silently changed - the breadcrumb
623
+ * "un-configured consumer sees no change" principle.
624
+ *
625
+ * Exported for intra-lib consumers (`provideSidenavConfig` deep-merges with
626
+ * this base) but **NOT** re-exported from `public-api.ts` - downstream
627
+ * consumers reach the defaults via `inject(CNGX_SIDENAV_CONFIG)` so
628
+ * `provideSidenavConfig` / `provideSidenavConfigAt` overrides take precedence.
629
+ *
630
+ * @internal
631
+ */
632
+ declare const CNGX_SIDENAV_DEFAULTS: CngxSidenavConfig;
506
633
  /**
507
634
  * App-wide configuration cascade for the sidenav family. Resolves in priority
508
635
  * order:
@@ -526,12 +653,11 @@ declare const CNGX_SIDENAV_CONFIG: InjectionToken<CngxSidenavConfig>;
526
653
 
527
654
  /**
528
655
  * Discriminated-union shape returned by the sidenav config features -
529
- * `withSidenavDimensions`, `withSidenavResponsive`, `withSidenavShortcut`,
530
- * `withSidenavHoverDwell`, and `withSidenavRouterSync`. The reducer in
531
- * `provideSidenavConfig` / `provideSidenavConfigAt` matches on `kind` and merges
532
- * `payload` into the corresponding config sub-tree: `dimensions`, `hover`, and
533
- * `routerSync` are one-level nested sub-trees, `responsive` and `shortcut` are
534
- * flat top-level scalars. Mirrors `CngxBreadcrumbConfigFeature` from
656
+ * `withSidenavDimensions`, `withSidenavShortcut`, `withSidenavHoverDwell`, and
657
+ * `withSidenavRouterSync`. The reducer in `provideSidenavConfig` /
658
+ * `provideSidenavConfigAt` matches on `kind` and merges `payload` into the
659
+ * corresponding config sub-tree: `dimensions`, `hover`, and `routerSync` are
660
+ * one-level nested sub-trees, `shortcut` is a flat top-level scalar. Mirrors `CngxBreadcrumbConfigFeature` from
535
661
  * `@cngx/ui/breadcrumb` (nested-sub-tree style; the stepper family uses flat
536
662
  * scalar keys instead).
537
663
  *
@@ -548,19 +674,19 @@ type CngxSidenavConfigFeature = {
548
674
  readonly kind: 'routerSync';
549
675
  readonly payload: NonNullable<CngxSidenavConfig['routerSync']>;
550
676
  } | {
551
- readonly kind: 'responsive';
677
+ readonly kind: 'shortcut';
552
678
  readonly payload: {
553
- readonly responsive: string;
679
+ readonly shortcut: string;
554
680
  };
555
681
  } | {
556
- readonly kind: 'shortcut';
682
+ readonly kind: 'labels';
557
683
  readonly payload: {
558
- readonly shortcut: string;
684
+ readonly labels: Partial<CngxSidenavLabels> | Signal<Partial<CngxSidenavLabels>>;
559
685
  };
560
686
  };
561
687
  /**
562
688
  * Application-root configuration cascade for the sidenav family. Pass any
563
- * combination of `withSidenavDimensions`, `withSidenavResponsive`,
689
+ * combination of `withSidenavDimensions`,
564
690
  * `withSidenavShortcut`, `withSidenavHoverDwell`, and `withSidenavRouterSync`
565
691
  * features in `bootstrapApplication`'s providers array.
566
692
  *
@@ -630,20 +756,6 @@ declare function provideSidenavConfigAt(...features: CngxSidenavConfigFeature[])
630
756
  * @since 0.1.0
631
757
  */
632
758
  declare function withSidenavDimensions(payload: NonNullable<CngxSidenavConfig['dimensions']>): CngxSidenavConfigFeature;
633
- /**
634
- * Set the app-wide default CSS media-query string for responsive mode
635
- * switching. When the query matches, the sidenav resolves to `'side'`;
636
- * otherwise it falls back to its `mode`. Per-instance `[responsive]` still
637
- * wins.
638
- *
639
- * ```ts
640
- * provideSidenavConfig(withSidenavResponsive('(min-width: 1024px)'));
641
- * ```
642
- *
643
- * @category ui/sidenav
644
- * @since 0.1.0
645
- */
646
- declare function withSidenavResponsive(query: string): CngxSidenavConfigFeature;
647
759
  /**
648
760
  * Set the app-wide default keyboard shortcut to toggle the sidenav (e.g.
649
761
  * `'mod+b'`, which resolves to `ctrl` on Windows/Linux and `meta` on macOS).
@@ -686,6 +798,20 @@ declare function withSidenavHoverDwell(payload: NonNullable<CngxSidenavConfig['h
686
798
  * @since 0.1.0
687
799
  */
688
800
  declare function withSidenavRouterSync(payload: NonNullable<CngxSidenavConfig['routerSync']>): CngxSidenavConfigFeature;
801
+ /**
802
+ * Override the app-wide sidenav copy. Unset keys read the `sidenav` section of
803
+ * the language pack (English without one); pass a `Signal` of a partial bundle
804
+ * to switch languages at runtime. A per-instance `[resizeLabel]` still wins
805
+ * over `resizeHandle`. A later call replaces the whole bundle.
806
+ *
807
+ * ```ts
808
+ * provideSidenavConfig(withSidenavLabels({ resizeHandle: 'Navigation anpassen' }));
809
+ * ```
810
+ *
811
+ * @category ui/sidenav
812
+ * @since 0.1.0
813
+ */
814
+ declare function withSidenavLabels(labels: Partial<CngxSidenavLabels> | Signal<Partial<CngxSidenavLabels>>): CngxSidenavConfigFeature;
689
815
 
690
816
  /**
691
817
  * Convenience accessor for the sidenav configuration cascade. Runs in injection
@@ -706,6 +832,54 @@ declare function withSidenavRouterSync(payload: NonNullable<CngxSidenavConfig['r
706
832
  * @since 0.1.0
707
833
  */
708
834
  declare function injectSidenavConfig(): CngxSidenavConfig;
835
+ /**
836
+ * The resolved sidenav labels in scope, as a Signal that follows a runtime
837
+ * language switch: the `sidenav` section of the active pack formatted for the
838
+ * locale of the reading injector, with the `CNGX_SIDENAV_CONFIG` labels on
839
+ * top. A key the config sets wins; a key it leaves unset, `null` or
840
+ * `undefined` reads the section. Runs in injection context; read it inside a
841
+ * `computed()`, a template or a handler.
842
+ *
843
+ * @category ui/sidenav
844
+ * @since 0.1.0
845
+ * @relatedTo withSidenavLabels
846
+ */
847
+ declare function injectSidenavLabels(): Signal<CngxSidenavLabels>;
848
+
849
+ /**
850
+ * The sidenav section of a {@link CngxLanguagePack}: the copy of `CngxSidenav`.
851
+ * It feeds the `labels` of `CNGX_SIDENAV_CONFIG`; a key set through
852
+ * `withSidenavLabels` still wins. Messages use `{name}` placeholders, numbers
853
+ * are formatted for the locale.
854
+ *
855
+ * @category ui/sidenav/i18n
856
+ * @since 0.1.0
857
+ * @relatedTo CNGX_SIDENAV_CONFIG, withSidenavLabels
858
+ */
859
+ interface CngxSidenavLanguageSection {
860
+ /** Accessible name of the resize separator while `[resizeLabel]` is unbound. */
861
+ readonly resizeHandle: string;
862
+ /**
863
+ * `{value}` (the separator position as a percent of its min-max range,
864
+ * formatted in the locale, `40%`), `{percent}` (the rounded number): the
865
+ * separator's `aria-valuetext`.
866
+ */
867
+ readonly resizeValueText: CngxMessage;
868
+ }
869
+ /**
870
+ * The English sidenav section: the single source of the sidenav's English
871
+ * copy. The `CNGX_SIDENAV_CONFIG` labels default to it.
872
+ *
873
+ * @category ui/sidenav/i18n
874
+ * @since 0.1.0
875
+ * @relatedTo CNGX_SIDENAV_CONFIG
876
+ */
877
+ declare const CNGX_SIDENAV_LANGUAGE_EN: CngxSidenavLanguageSection;
878
+ declare module '@cngx/core/i18n' {
879
+ interface CngxLanguagePack {
880
+ readonly sidenav: CngxSidenavLanguageSection;
881
+ }
882
+ }
709
883
 
710
- export { CNGX_SIDENAV, CNGX_SIDENAV_CONFIG, CngxSidenav, CngxSidenavContent, CngxSidenavFooter, CngxSidenavHeader, CngxSidenavLayout, CngxSidenavRouterSync, injectSidenavConfig, provideSidenavConfig, provideSidenavConfigAt, withSidenavDimensions, withSidenavHoverDwell, withSidenavResponsive, withSidenavRouterSync, withSidenavShortcut };
711
- export type { CngxSidenavConfig, CngxSidenavConfigFeature, CngxSidenavContract, SidenavMode, SidenavPosition };
884
+ export { CNGX_SIDENAV, CNGX_SIDENAV_CONFIG, CNGX_SIDENAV_DEFAULTS, CNGX_SIDENAV_LANGUAGE_EN, CngxSidenav, CngxSidenavContent, CngxSidenavFooter, CngxSidenavHeader, CngxSidenavLayout, CngxSidenavRouterSync, injectSidenavConfig, injectSidenavLabels, provideSidenavConfig, provideSidenavConfigAt, withSidenavDimensions, withSidenavHoverDwell, withSidenavLabels, withSidenavRouterSync, withSidenavShortcut };
885
+ export type { CngxSidenavConfig, CngxSidenavConfigFeature, CngxSidenavContract, CngxSidenavLabels, CngxSidenavLanguageSection, SidenavMode, SidenavPosition };
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { TemplateRef, Signal } from '@angular/core';
2
+ import { TemplateRef } from '@angular/core';
3
3
  import { CngxAsyncState } from '@cngx/core/utils';
4
4
 
5
5
  /**
@@ -117,12 +117,14 @@ interface CngxSkeletonPlaceholderContext {
117
117
  * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/skeleton/skeleton-container.ts
118
118
  * @since 0.1.0
119
119
  * @relatedTo CngxSkeletonPlaceholder, CngxAsyncState, CngxEmptyState
120
+ * @slot cngxSkeletonPlaceholder Replaces the generated placeholder shape.
120
121
  * <example-url>http://localhost:4200/#/common/layout/skeleton/basic-skeleton</example-url>
121
122
  * <example-url>http://localhost:4200/#/common/layout/skeleton/skeleton-container</example-url>
122
123
  * <example-url>http://localhost:4200/#/ui/skeleton/card-skeleton</example-url>
123
124
  * <example-url>http://localhost:4200/#/ui/skeleton/template-context</example-url>
124
125
  */
125
126
  declare class CngxSkeletonContainer {
127
+ private readonly loadingConfig;
126
128
  /** Controls the loading state directly. */
127
129
  readonly loading: _angular_core.InputSignal<boolean>;
128
130
  /** Bind an async state - shows skeleton during first load. Takes precedence over `loading`. */
@@ -131,20 +133,29 @@ declare class CngxSkeletonContainer {
131
133
  readonly shimmer: _angular_core.InputSignal<boolean>;
132
134
  /** Repeat count for the placeholder template. */
133
135
  readonly count: _angular_core.InputSignal<number>;
136
+ /** Delay in ms before the placeholder shows. Defaults to `CNGX_LOADING_CONFIG.showDelay`. */
137
+ readonly showDelay: _angular_core.InputSignal<number>;
138
+ /** Minimum time in ms the placeholder stays once shown. Defaults to `CNGX_LOADING_CONFIG.minDwell`. */
139
+ readonly minDwell: _angular_core.InputSignal<number>;
134
140
  /** Derived loading state: `state.isFirstLoad` takes precedence over `loading` input. */
135
- protected readonly isLoading: Signal<boolean>;
141
+ protected readonly isLoading: _angular_core.Signal<boolean>;
142
+ /**
143
+ * @internal - flash-suppressed loading. A sub-`showDelay` blip never renders the
144
+ * placeholder; once shown it holds for `minDwell`. Drives the placeholder, the
145
+ * `--loading` class, and `aria-busy` so AT and DOM agree.
146
+ */
147
+ protected readonly gatedLoading: _angular_core.Signal<boolean>;
136
148
  /** @internal - projected placeholder template. */
137
- protected readonly placeholderTpl: Signal<CngxSkeletonPlaceholder | undefined>;
149
+ protected readonly placeholderTpl: _angular_core.Signal<CngxSkeletonPlaceholder | undefined>;
138
150
  /** Array of indices for internal `@for` rendering. */
139
- readonly indices: Signal<number[]>;
151
+ readonly indices: _angular_core.Signal<number[]>;
140
152
  private readonly prefersReducedMotion;
141
- constructor();
142
153
  /** @internal */
143
- protected readonly showShimmer: Signal<boolean>;
154
+ protected readonly showShimmer: _angular_core.Signal<boolean>;
144
155
  /** @internal */
145
156
  protected getContext(index: number): CngxSkeletonPlaceholderContext;
146
157
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxSkeletonContainer, never>;
147
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxSkeletonContainer, "cngx-skeleton", ["cngxSkeletonContainer"], { "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "shimmer": { "alias": "shimmer"; "required": false; "isSignal": true; }; "count": { "alias": "count"; "required": false; "isSignal": true; }; }, {}, ["placeholderTpl"], ["*"], true, never>;
158
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxSkeletonContainer, "cngx-skeleton", ["cngxSkeletonContainer"], { "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "shimmer": { "alias": "shimmer"; "required": false; "isSignal": true; }; "count": { "alias": "count"; "required": false; "isSignal": true; }; "showDelay": { "alias": "showDelay"; "required": false; "isSignal": true; }; "minDwell": { "alias": "minDwell"; "required": false; "isSignal": true; }; }, {}, ["placeholderTpl"], ["*"], true, never>;
148
159
  }
149
160
 
150
161
  export { CngxSkeletonContainer, CngxSkeletonPlaceholder };