@cngx/ui 0.1.0-rc.7 → 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 (96) hide show
  1. package/README.md +0 -1
  2. package/a11y/README.md +11 -5
  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/data-grid-accordion/README.md +76 -2
  8. package/feedback/README.md +40 -0
  9. package/fesm2022/cngx-ui-a11y.mjs +189 -57
  10. package/fesm2022/cngx-ui-a11y.mjs.map +1 -1
  11. package/fesm2022/cngx-ui-accordion.mjs +102 -35
  12. package/fesm2022/cngx-ui-accordion.mjs.map +1 -1
  13. package/fesm2022/cngx-ui-action-button.mjs +112 -50
  14. package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
  15. package/fesm2022/cngx-ui-breadcrumb.mjs +176 -96
  16. package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -1
  17. package/fesm2022/cngx-ui-chart-panel.mjs +180 -23
  18. package/fesm2022/cngx-ui-chart-panel.mjs.map +1 -1
  19. package/fesm2022/cngx-ui-collection.mjs +194 -62
  20. package/fesm2022/cngx-ui-collection.mjs.map +1 -1
  21. package/fesm2022/cngx-ui-command-palette.mjs +395 -119
  22. package/fesm2022/cngx-ui-command-palette.mjs.map +1 -1
  23. package/fesm2022/cngx-ui-context-menu.mjs +149 -34
  24. package/fesm2022/cngx-ui-context-menu.mjs.map +1 -1
  25. package/fesm2022/cngx-ui-data-grid-accordion.mjs +415 -98
  26. package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -1
  27. package/fesm2022/cngx-ui-empty-state.mjs +16 -6
  28. package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
  29. package/fesm2022/cngx-ui-feedback.mjs +1022 -439
  30. package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
  31. package/fesm2022/cngx-ui-mat-accordion.mjs +75 -7
  32. package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -1
  33. package/fesm2022/cngx-ui-mat-paginator.mjs +67 -24
  34. package/fesm2022/cngx-ui-mat-paginator.mjs.map +1 -1
  35. package/fesm2022/cngx-ui-mat-stepper.mjs +72 -47
  36. package/fesm2022/cngx-ui-mat-stepper.mjs.map +1 -1
  37. package/fesm2022/cngx-ui-mat-tabs.mjs +314 -141
  38. package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
  39. package/fesm2022/cngx-ui-overlay.mjs +69 -13
  40. package/fesm2022/cngx-ui-overlay.mjs.map +1 -1
  41. package/fesm2022/cngx-ui-paginator.mjs +487 -178
  42. package/fesm2022/cngx-ui-paginator.mjs.map +1 -1
  43. package/fesm2022/cngx-ui-sidenav.mjs +327 -106
  44. package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
  45. package/fesm2022/cngx-ui-skeleton.mjs +4 -16
  46. package/fesm2022/cngx-ui-skeleton.mjs.map +1 -1
  47. package/fesm2022/cngx-ui-speak.mjs +107 -8
  48. package/fesm2022/cngx-ui-speak.mjs.map +1 -1
  49. package/fesm2022/cngx-ui-stat-card.mjs +146 -46
  50. package/fesm2022/cngx-ui-stat-card.mjs.map +1 -1
  51. package/fesm2022/cngx-ui-stepper.mjs +191 -68
  52. package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
  53. package/fesm2022/cngx-ui-tabs.mjs +10 -6
  54. package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
  55. package/fesm2022/cngx-ui-timeline.mjs +74 -21
  56. package/fesm2022/cngx-ui-timeline.mjs.map +1 -1
  57. package/fesm2022/cngx-ui-toc.mjs +70 -26
  58. package/fesm2022/cngx-ui-toc.mjs.map +1 -1
  59. package/fesm2022/cngx-ui.mjs +15 -20
  60. package/fesm2022/cngx-ui.mjs.map +1 -1
  61. package/mat-paginator/README.md +9 -2
  62. package/mat-tabs/styles/mat-tabs.css +9 -10
  63. package/overlay/README.md +9 -4
  64. package/package.json +4 -4
  65. package/paginator/README.md +8 -4
  66. package/sidenav/README.md +33 -11
  67. package/speak/README.md +3 -2
  68. package/stepper/README.md +13 -1
  69. package/timeline/README.md +1 -1
  70. package/toc/README.md +4 -1
  71. package/types/cngx-ui-a11y.d.ts +121 -30
  72. package/types/cngx-ui-accordion.d.ts +91 -26
  73. package/types/cngx-ui-action-button.d.ts +44 -3
  74. package/types/cngx-ui-breadcrumb.d.ts +154 -58
  75. package/types/cngx-ui-chart-panel.d.ts +122 -18
  76. package/types/cngx-ui-collection.d.ts +147 -55
  77. package/types/cngx-ui-command-palette.d.ts +297 -183
  78. package/types/cngx-ui-context-menu.d.ts +98 -6
  79. package/types/cngx-ui-data-grid-accordion.d.ts +274 -38
  80. package/types/cngx-ui-empty-state.d.ts +9 -2
  81. package/types/cngx-ui-feedback.d.ts +594 -56
  82. package/types/cngx-ui-mat-accordion.d.ts +29 -1
  83. package/types/cngx-ui-mat-paginator.d.ts +37 -8
  84. package/types/cngx-ui-mat-stepper.d.ts +23 -11
  85. package/types/cngx-ui-mat-tabs.d.ts +207 -14
  86. package/types/cngx-ui-overlay.d.ts +56 -10
  87. package/types/cngx-ui-paginator.d.ts +403 -129
  88. package/types/cngx-ui-sidenav.d.ts +248 -74
  89. package/types/cngx-ui-skeleton.d.ts +6 -7
  90. package/types/cngx-ui-speak.d.ts +118 -5
  91. package/types/cngx-ui-stat-card.d.ts +117 -33
  92. package/types/cngx-ui-stepper.d.ts +66 -27
  93. package/types/cngx-ui-tabs.d.ts +2 -2
  94. package/types/cngx-ui-timeline.d.ts +23 -7
  95. package/types/cngx-ui-toc.d.ts +80 -13
  96. package/types/cngx-ui.d.ts +7 -4
@@ -1,8 +1,44 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { TemplateRef, InjectionToken, Signal, EnvironmentProviders, Provider } from '@angular/core';
2
+ import { Signal, TemplateRef, InjectionToken, EnvironmentProviders, Provider } from '@angular/core';
3
3
  import * as _cngx_common_interactive from '@cngx/common/interactive';
4
- import { CngxBreadcrumbWidthTier, CngxBreadcrumbItem } from '@cngx/common/interactive';
5
- import * as i1 from '@cngx/common/layout';
4
+ import { CngxBreadcrumbItem } from '@cngx/common/interactive';
5
+
6
+ /**
7
+ * The breadcrumb section of a {@link CngxLanguagePack}: the accessible names of
8
+ * the breadcrumb family. They feed the `ariaLabels` of `CNGX_BREADCRUMB_CONFIG`;
9
+ * a key set through `withBreadcrumbAriaLabels` still wins. Route labels are app
10
+ * copy and stay out of the pack: route data takes a `Signal` of the label.
11
+ *
12
+ * @category ui/breadcrumb/i18n
13
+ * @since 0.1.0
14
+ * @relatedTo CNGX_BREADCRUMB_CONFIG, withBreadcrumbAriaLabels
15
+ */
16
+ interface CngxBreadcrumbLanguageSection {
17
+ /** Accessible name of the `nav` landmark on `CngxBreadcrumbBar`. */
18
+ readonly bar: string;
19
+ /** Accessible name of the overflow ellipsis trigger. */
20
+ readonly overflowTrigger: string;
21
+ /** Accessible name of the collapsed-crumb menu. */
22
+ readonly overflowMenu: string;
23
+ /** Accessible name of the siblings chevron trigger. */
24
+ readonly siblingsTrigger: string;
25
+ /** Accessible name of the sibling list. */
26
+ readonly siblingsMenu: string;
27
+ }
28
+ /**
29
+ * The English breadcrumb section: the single source of the breadcrumb family's
30
+ * English copy. The `CNGX_BREADCRUMB_CONFIG` names default to it.
31
+ *
32
+ * @category ui/breadcrumb/i18n
33
+ * @since 0.1.0
34
+ * @relatedTo CNGX_BREADCRUMB_CONFIG
35
+ */
36
+ declare const CNGX_BREADCRUMB_LANGUAGE_EN: CngxBreadcrumbLanguageSection;
37
+ declare module '@cngx/core/i18n' {
38
+ interface CngxLanguagePack {
39
+ readonly breadcrumb: CngxBreadcrumbLanguageSection;
40
+ }
41
+ }
6
42
 
7
43
  /**
8
44
  * Selectable visual skin for `CngxBreadcrumbBar`. Every skin keeps the same
@@ -22,6 +58,16 @@ import * as i1 from '@cngx/common/layout';
22
58
  * @since 0.1.0
23
59
  */
24
60
  type CngxBreadcrumbSkin = 'classic' | 'plain' | 'contained' | 'pill' | 'ribbon' | 'editorial' | 'header' | 'metro' | 'toolbar' | 'chips' | 'path' | 'iconlabel' | 'icononly' | 'shell' | 'record';
61
+ /**
62
+ * Accessible names the breadcrumb family renders: the bar landmark and the
63
+ * overflow / siblings triggers and lists. A partial of the `breadcrumb`
64
+ * language section, declared once there; an unset key reads the section
65
+ * (English without a pack).
66
+ *
67
+ * @category ui/breadcrumb
68
+ * @since 0.1.0
69
+ */
70
+ type CngxBreadcrumbAriaLabels = Partial<CngxBreadcrumbLanguageSection>;
25
71
  /**
26
72
  * App-wide cascade for the breadcrumb family's ARIA labels, the router
27
73
  * `dataKey`, and the default visual `skin`.
@@ -31,7 +77,8 @@ type CngxBreadcrumbSkin = 'classic' | 'plain' | 'contained' | 'pill' | 'ribbon'
31
77
  * 2. `provideBreadcrumbConfigAt(...)` in a parent component's
32
78
  * `viewProviders` (component-scoped override).
33
79
  * 3. `provideBreadcrumbConfig(...)` at the application root.
34
- * 4. Library defaults (English; merged in via `CNGX_BREADCRUMB_DEFAULTS`).
80
+ * 4. Library defaults (`CNGX_BREADCRUMB_DEFAULTS`; the accessible names come
81
+ * from the `breadcrumb` section of the language pack).
35
82
  *
36
83
  * Every key is optional - partial overrides deep-merge with the library
37
84
  * defaults, so consumers declare only the keys they want to override.
@@ -43,20 +90,11 @@ interface CngxBreadcrumbConfig {
43
90
  /**
44
91
  * ARIA-string fallbacks for the bar landmark and the overflow/siblings
45
92
  * dropdown triggers and lists. Per-instance `[label]`/`[triggerLabel]`/
46
- * `[menuLabel]` bindings still win over these.
93
+ * `[menuLabel]` bindings still win over these. Accepts a `Signal` so the
94
+ * labels follow a runtime language switch; read the resolved bundle through
95
+ * {@link injectBreadcrumbAriaLabels}.
47
96
  */
48
- readonly ariaLabels?: {
49
- /** Accessible name of the `nav` landmark on `CngxBreadcrumbBar`. */
50
- readonly bar?: string;
51
- /** Accessible name of the overflow ellipsis trigger. */
52
- readonly overflowTrigger?: string;
53
- /** Accessible name of the collapsed-crumb menu. */
54
- readonly overflowMenu?: string;
55
- /** Accessible name of the siblings chevron trigger. */
56
- readonly siblingsTrigger?: string;
57
- /** Accessible name of the sibling list. */
58
- readonly siblingsMenu?: string;
59
- };
97
+ readonly ariaLabels?: CngxBreadcrumbAriaLabels | Signal<CngxBreadcrumbAriaLabels>;
60
98
  /**
61
99
  * Router-sync defaults shared by the trail (`CngxBreadcrumbRouterSync`)
62
100
  * and siblings (`CngxBreadcrumbSiblingsRouterSync`) route directives.
@@ -155,6 +193,12 @@ interface CngxBreadcrumbSibling {
155
193
  * <cngx-breadcrumb [items]="crumbs" [maxVisible]="4" skin="pill" />
156
194
  * ```
157
195
  *
196
+ * Left alone, the crumb cap comes from the bar's own width: 2 crumbs below
197
+ * `30rem`, 4 below `48rem`, 6 above. The thresholds live once, in
198
+ * `breadcrumb-bar.component.css`, as `--cngx-breadcrumb-max-visible` written
199
+ * by `@container` rules on `.cngx-breadcrumb::after`; consumer CSS re-aims
200
+ * them. `[maxVisible]` pins the count and overrides the derivation entirely.
201
+ *
158
202
  * @category ui/breadcrumb
159
203
  * @docsKind primary
160
204
  * @wcag AA
@@ -170,24 +214,22 @@ declare class CngxBreadcrumbBar {
170
214
  /** Uncontrolled trail. Ignored when a {@link CNGX_BREADCRUMB_ITEMS_SOURCE} is provided. */
171
215
  readonly itemsInput: _angular_core.InputSignal<readonly CngxBreadcrumbCrumb[]>;
172
216
  /**
173
- * Maximum crumbs to show before the middle collapses. Unset = never collapse,
174
- * unless {@link responsive} is on. An explicit value always wins over the
175
- * width-derived one (controlled/uncontrolled), resolved by {@link effectiveMaxVisible}.
217
+ * Maximum crumbs to show before the middle collapses. Pins the count: an
218
+ * explicit value always wins over the width-derived one
219
+ * (controlled/uncontrolled), resolved by {@link effectiveMaxVisible}. Unset,
220
+ * the bar derives the count from its own width - that is the default, there
221
+ * is nothing to switch on.
176
222
  */
177
223
  readonly maxVisible: _angular_core.InputSignal<number | undefined>;
224
+ private readonly host;
225
+ private readonly container;
226
+ private readonly cfg;
227
+ private readonly ariaLabels;
178
228
  /**
179
- * Opt in to width-responsive collapse: the bar derives `maxVisible` from its own
180
- * width via the {@link CngxResizeObserver} hostDirective and the pure
181
- * `resolveBreadcrumbTier`. No hand-wired observer or `computed` needed - one
182
- * attribute makes every skin responsive. Ignored when {@link maxVisible} is set.
229
+ * Accessible name of the `nav` landmark. Unbound (`undefined`), it falls back
230
+ * through the config cascade to the EN default and follows a language switch.
183
231
  */
184
- readonly responsive: _angular_core.InputSignalWithTransform<boolean, unknown>;
185
- /** Width tiers driving the responsive collapse. Defaults to {@link DEFAULT_BREADCRUMB_WIDTH_TIERS}. */
186
- readonly responsiveTiers: _angular_core.InputSignal<readonly CngxBreadcrumbWidthTier[]>;
187
- private readonly resize;
188
- private readonly cfg;
189
- /** Accessible name of the `nav` landmark. Falls back through the config cascade to the EN default. */
190
- readonly label: _angular_core.InputSignal<string>;
232
+ readonly label: _angular_core.InputSignal<string | undefined>;
191
233
  /**
192
234
  * Visual skin, reflected onto `[data-skin]`. Cascade `input ?? config.skin ??
193
235
  * 'classic'`, resolved by {@link resolvedSkin}. Pure thematic concern -
@@ -218,23 +260,29 @@ declare class CngxBreadcrumbBar {
218
260
  protected readonly overflowRow: _angular_core.Signal<TemplateRef<any> | undefined>;
219
261
  /** The rendered trail: a provided source wins over the `[items]` input (controlled/uncontrolled). */
220
262
  protected readonly items: _angular_core.Signal<readonly CngxBreadcrumbCrumb[]>;
263
+ /** Resolved landmark name (`input ?? config.ariaLabels.bar ?? EN default`). */
264
+ protected readonly resolvedLabel: _angular_core.Signal<string>;
221
265
  /** Resolved skin (`input ?? config.skin ?? 'classic'`), reflected onto `[data-skin]`. */
222
266
  protected readonly resolvedSkin: _angular_core.Signal<CngxBreadcrumbSkin>;
267
+ /** Raw `--cngx-breadcrumb-max-visible`, resolved on the bar's own `::after`. */
268
+ private readonly capProperty;
223
269
  /**
224
- * Width-derived crumb cap. `undefined` until the observer's first measurement
225
- * ({@link CngxResizeObserver.isReady}), so a narrow mount never mis-collapses on
226
- * a `width() == 0` first read - the sub-frame full-trail transient settles once
227
- * the ResizeObserver fires.
270
+ * Container-derived crumb cap. `undefined` until the first observation (the
271
+ * property reads as the empty string then), so a narrow mount never
272
+ * mis-collapses on a zero-width first read - the sub-frame full-trail
273
+ * transient settles once the `ResizeObserver` fires. The finite check means a
274
+ * malformed consumer override can never reach the collapse as a `NaN`.
228
275
  */
229
276
  protected readonly autoMaxVisible: _angular_core.Signal<number | undefined>;
230
277
  /**
231
- * The `maxVisible` forwarded to the inner collapse: explicit `[maxVisible]` wins,
232
- * else the width-derived value when {@link responsive} is on, else `undefined`
233
- * (no collapse - the current default behaviour).
278
+ * The `maxVisible` forwarded to the inner collapse: an explicit
279
+ * `[maxVisible]` pins the count, otherwise the container-derived value
280
+ * applies. Before the first observation `autoMaxVisible` is `undefined`,
281
+ * which renders the full trail rather than guessing at a width.
234
282
  */
235
283
  protected readonly effectiveMaxVisible: _angular_core.Signal<number | undefined>;
236
284
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxBreadcrumbBar, never>;
237
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxBreadcrumbBar, "cngx-breadcrumb", ["cngxBreadcrumbBar"], { "itemsInput": { "alias": "items"; "required": false; "isSignal": true; }; "maxVisible": { "alias": "maxVisible"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "responsiveTiers": { "alias": "responsiveTiers"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "skin": { "alias": "skin"; "required": false; "isSignal": true; }; }, {}, ["accessory", "icon", "overflowRow"], never, true, [{ directive: typeof i1.CngxResizeObserver; inputs: {}; outputs: {}; }]>;
285
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxBreadcrumbBar, "cngx-breadcrumb", ["cngxBreadcrumbBar"], { "itemsInput": { "alias": "items"; "required": false; "isSignal": true; }; "maxVisible": { "alias": "maxVisible"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "skin": { "alias": "skin"; "required": false; "isSignal": true; }; }, {}, ["accessory", "icon", "overflowRow"], never, true, never>;
238
286
  }
239
287
 
240
288
  /**
@@ -312,11 +360,13 @@ declare class CngxBreadcrumbOverflowItem {
312
360
  declare class CngxBreadcrumbOverflow {
313
361
  /** Collapse-set contract, provided by the surrounding `cngxBreadcrumb`. */
314
362
  protected readonly breadcrumb: _cngx_common_interactive.CngxBreadcrumbHost;
315
- private readonly cfg;
316
- /** Accessible name of the ellipsis trigger. Falls back through the config cascade to the EN default. */
317
- readonly triggerLabel: _angular_core.InputSignal<string>;
318
- /** Accessible name of the collapsed-crumb menu. Falls back through the config cascade to the EN default. */
319
- readonly menuLabel: _angular_core.InputSignal<string>;
363
+ private readonly ariaLabels;
364
+ /** Accessible name of the ellipsis trigger. Unbound (`undefined`), it falls back through the config cascade to the EN default. */
365
+ readonly triggerLabel: _angular_core.InputSignal<string | undefined>;
366
+ /** Accessible name of the collapsed-crumb menu. Unbound (`undefined`), it falls back through the config cascade to the EN default. */
367
+ readonly menuLabel: _angular_core.InputSignal<string | undefined>;
368
+ protected readonly resolvedTriggerLabel: _angular_core.Signal<string>;
369
+ protected readonly resolvedMenuLabel: _angular_core.Signal<string>;
320
370
  /**
321
371
  * Per-row template forwarded by {@link CngxBreadcrumbBar}. Lets the bar pass a
322
372
  * consumer-projected `*cngxBreadcrumbOverflowItem` into this composed overflow,
@@ -371,11 +421,13 @@ declare class CngxBreadcrumbOverflow {
371
421
  declare class CngxBreadcrumbSiblings {
372
422
  /** Static sibling rows. Superseded by a provided `CNGX_BREADCRUMB_SIBLINGS_SOURCE`. */
373
423
  readonly siblingsInput: _angular_core.InputSignal<readonly CngxBreadcrumbSibling[]>;
374
- private readonly cfg;
375
- /** Accessible name of the chevron trigger. Falls back through the config cascade to the EN default. */
376
- readonly triggerLabel: _angular_core.InputSignal<string>;
377
- /** Accessible name of the sibling list (kept as `menuLabel` for overflow symmetry). Falls back through the config cascade to the EN default. */
378
- readonly menuLabel: _angular_core.InputSignal<string>;
424
+ private readonly ariaLabels;
425
+ /** Accessible name of the chevron trigger. Unbound (`undefined`), it falls back through the config cascade to the EN default. */
426
+ readonly triggerLabel: _angular_core.InputSignal<string | undefined>;
427
+ /** Accessible name of the sibling list (kept as `menuLabel` for overflow symmetry). Unbound (`undefined`), it falls back through the config cascade to the EN default. */
428
+ readonly menuLabel: _angular_core.InputSignal<string | undefined>;
429
+ protected readonly resolvedTriggerLabel: _angular_core.Signal<string>;
430
+ protected readonly resolvedMenuLabel: _angular_core.Signal<string>;
379
431
  /** Opt-in controlled source (router-sync directive) - wins over `[siblings]`. */
380
432
  private readonly source;
381
433
  /** Rows the dropdown renders: controlled source wins, else the static input. */
@@ -597,8 +649,9 @@ declare const CNGX_BREADCRUMB_SIBLINGS_SOURCE: InjectionToken<CngxBreadcrumbSibl
597
649
  * Opt-in router mode for {@link CngxBreadcrumbBar}. Add `routerSync` to a
598
650
  * `<cngx-breadcrumb>` and the trail is derived from the activated route tree -
599
651
  * every route whose `data[dataKey]` (default `data.breadcrumb`) is a non-empty
600
- * string contributes a crumb, terminal marking follows from position. The bar
601
- * reads the trail through the {@link CNGX_BREADCRUMB_ITEMS_SOURCE} seam
652
+ * string or a `Signal` of one ({@link CngxBreadcrumbRouteLabel}, the app's own
653
+ * translation) contributes a crumb, terminal marking follows from
654
+ * position. The bar reads the trail through the {@link CNGX_BREADCRUMB_ITEMS_SOURCE} seam
602
655
  * (provided here via `useExisting`), so the directive never writes the bar's
603
656
  * `[items]` input and never injects the concrete bar class - decompose-clean
604
657
  * (Pillar 1; reference_atomic_decompose rule 4).
@@ -667,6 +720,12 @@ declare class CngxBreadcrumbRouterSync implements CngxBreadcrumbItemsSource {
667
720
  * navigation does not cascade. `Router` is optional - without it the directive
668
721
  * logs a dev warning and stays an empty source.
669
722
  *
723
+ * Sibling hrefs are built from the static route-config `path` patterns, so a
724
+ * parameterized sibling (`:id`) emits its pattern verbatim - such routes have
725
+ * no single static URL. Supply `[siblings]` directly (or a custom
726
+ * {@link CNGX_BREADCRUMB_SIBLINGS_SOURCE}) when sibling links need resolved
727
+ * route params.
728
+ *
670
729
  * ```html
671
730
  * <cngx-breadcrumb-siblings cngxRouterSync [depth]="1" />
672
731
  * ```
@@ -747,7 +806,7 @@ declare const CNGX_BREADCRUMB_CONFIG: InjectionToken<CngxBreadcrumbConfig>;
747
806
  */
748
807
  type CngxBreadcrumbConfigFeature = {
749
808
  readonly kind: 'ariaLabels';
750
- readonly payload: NonNullable<CngxBreadcrumbConfig['ariaLabels']>;
809
+ readonly payload: CngxBreadcrumbAriaLabels | Signal<CngxBreadcrumbAriaLabels>;
751
810
  } | {
752
811
  readonly kind: 'router';
753
812
  readonly payload: NonNullable<CngxBreadcrumbConfig['router']>;
@@ -818,7 +877,8 @@ declare function provideBreadcrumbConfigAt(...features: CngxBreadcrumbConfigFeat
818
877
  * Override the breadcrumb family's ARIA-string fallbacks - the bar landmark
819
878
  * name and the overflow/siblings trigger + list labels. Per-instance
820
879
  * `[label]` / `[triggerLabel]` / `[menuLabel]` bindings still win over the
821
- * cascade; this only sets the fallback.
880
+ * cascade; this only sets the fallback. Pass a `Signal` to switch the
881
+ * language at runtime.
822
882
  *
823
883
  * ```ts
824
884
  * provideBreadcrumbConfig(
@@ -829,7 +889,7 @@ declare function provideBreadcrumbConfigAt(...features: CngxBreadcrumbConfigFeat
829
889
  * @category ui/breadcrumb
830
890
  * @since 0.1.0
831
891
  */
832
- declare function withBreadcrumbAriaLabels(payload: NonNullable<CngxBreadcrumbConfig['ariaLabels']>): CngxBreadcrumbConfigFeature;
892
+ declare function withBreadcrumbAriaLabels(payload: CngxBreadcrumbAriaLabels | Signal<CngxBreadcrumbAriaLabels>): CngxBreadcrumbConfigFeature;
833
893
  /**
834
894
  * Override the route-data key the breadcrumb router-sync directives
835
895
  * (`CngxBreadcrumbRouterSync`, `CngxBreadcrumbSiblingsRouterSync`) read
@@ -879,10 +939,13 @@ declare function withBreadcrumbSkin(skin: CngxBreadcrumbSkin): CngxBreadcrumbCon
879
939
  * exists so consumers don't import the token directly. Mirrors
880
940
  * `injectTagConfig` in `@cngx/common/display`.
881
941
  *
942
+ * `ariaLabels` may hold a `Signal`; read the resolved bundle through
943
+ * {@link injectBreadcrumbAriaLabels}.
944
+ *
882
945
  * ```ts
883
- * export class CngxBreadcrumbBar {
946
+ * export class MyTrail {
884
947
  * private readonly cfg = injectBreadcrumbConfig();
885
- * readonly label = input<string>(this.cfg.ariaLabels?.bar ?? 'Breadcrumb');
948
+ * protected readonly skin = computed(() => this.cfg.skin ?? 'classic');
886
949
  * }
887
950
  * ```
888
951
  *
@@ -890,6 +953,39 @@ declare function withBreadcrumbSkin(skin: CngxBreadcrumbSkin): CngxBreadcrumbCon
890
953
  * @since 0.1.0
891
954
  */
892
955
  declare function injectBreadcrumbConfig(): CngxBreadcrumbConfig;
956
+ /**
957
+ * The resolved accessible names of the breadcrumb config in scope, every key
958
+ * the config leaves unset (also a key an override sets to `undefined`) filled
959
+ * from the `breadcrumb` section of the active pack, as a Signal that follows a
960
+ * runtime language switch. Runs in injection context; read it inside a `computed()`,
961
+ * a template or a handler.
962
+ *
963
+ * ```ts
964
+ * export class MyTrail {
965
+ * private readonly labels = injectBreadcrumbAriaLabels();
966
+ * protected readonly name = computed(() => this.labels().bar);
967
+ * }
968
+ * ```
969
+ *
970
+ * @category ui/breadcrumb
971
+ * @since 0.1.0
972
+ */
973
+ declare function injectBreadcrumbAriaLabels(): Signal<Required<CngxBreadcrumbAriaLabels>>;
974
+
975
+ /**
976
+ * A route's breadcrumb data: a plain label, or a `Signal` of one so the crumb
977
+ * follows the app's own translation on a language switch. Route labels are
978
+ * app copy; translate them with the app's i18n, not the cngx language pack.
979
+ *
980
+ * ```ts
981
+ * { path: 'orders', data: { breadcrumb: computed(() => t('nav.orders')) } }
982
+ * ```
983
+ *
984
+ * @category ui/breadcrumb
985
+ * @since 0.1.0
986
+ * @relatedTo CngxBreadcrumbRouterSync, CngxBreadcrumbSiblingsRouterSync
987
+ */
988
+ type CngxBreadcrumbRouteLabel = string | Signal<string>;
893
989
 
894
- export { CNGX_BREADCRUMB_CONFIG, CNGX_BREADCRUMB_ITEMS_SOURCE, CNGX_BREADCRUMB_SIBLINGS_SOURCE, CngxBreadcrumbBar, CngxBreadcrumbIcon, CngxBreadcrumbItemAccessory, CngxBreadcrumbOverflow, CngxBreadcrumbOverflowItem, CngxBreadcrumbRouterSync, CngxBreadcrumbSiblingItem, CngxBreadcrumbSiblings, CngxBreadcrumbSiblingsRouterSync, injectBreadcrumbConfig, provideBreadcrumbConfig, provideBreadcrumbConfigAt, withBreadcrumbAriaLabels, withBreadcrumbDataKey, withBreadcrumbIconKey, withBreadcrumbSkin };
895
- export type { CngxBreadcrumbConfig, CngxBreadcrumbConfigFeature, CngxBreadcrumbCrumb, CngxBreadcrumbIconContext, CngxBreadcrumbItemAccessoryContext, CngxBreadcrumbItemsSource, CngxBreadcrumbOverflowItemContext, CngxBreadcrumbSibling, CngxBreadcrumbSiblingItemContext, CngxBreadcrumbSiblingsSource, CngxBreadcrumbSkin };
990
+ export { CNGX_BREADCRUMB_CONFIG, CNGX_BREADCRUMB_ITEMS_SOURCE, CNGX_BREADCRUMB_LANGUAGE_EN, CNGX_BREADCRUMB_SIBLINGS_SOURCE, CngxBreadcrumbBar, CngxBreadcrumbIcon, CngxBreadcrumbItemAccessory, CngxBreadcrumbOverflow, CngxBreadcrumbOverflowItem, CngxBreadcrumbRouterSync, CngxBreadcrumbSiblingItem, CngxBreadcrumbSiblings, CngxBreadcrumbSiblingsRouterSync, injectBreadcrumbAriaLabels, injectBreadcrumbConfig, provideBreadcrumbConfig, provideBreadcrumbConfigAt, withBreadcrumbAriaLabels, withBreadcrumbDataKey, withBreadcrumbIconKey, withBreadcrumbSkin };
991
+ export type { CngxBreadcrumbAriaLabels, CngxBreadcrumbConfig, CngxBreadcrumbConfigFeature, CngxBreadcrumbCrumb, CngxBreadcrumbIconContext, CngxBreadcrumbItemAccessoryContext, CngxBreadcrumbItemsSource, CngxBreadcrumbLanguageSection, CngxBreadcrumbOverflowItemContext, CngxBreadcrumbRouteLabel, CngxBreadcrumbSibling, CngxBreadcrumbSiblingItemContext, CngxBreadcrumbSiblingsSource, CngxBreadcrumbSkin };
@@ -1,11 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, EnvironmentProviders, Provider } from '@angular/core';
2
+ import { InjectionToken, Signal, EnvironmentProviders, Provider } from '@angular/core';
3
3
  import { CngxAsyncState } from '@cngx/core/utils';
4
4
 
5
5
  /**
6
- * Title-registration contract the panel exposes to its projected title slot.
7
- * The slot registers its generated id on init; the panel derives its
8
- * `aria-labelledby` from it.
6
+ * Contract the panel exposes to its projected slots. The title slot registers
7
+ * its generated id on init and the panel derives its `aria-labelledby` from
8
+ * it; the actions slot reads the panel-level busy state and the id of the
9
+ * node that says why the actions are unavailable.
9
10
  *
10
11
  * Fronted by a DI token rather than the concrete `CngxChartPanel` class so the
11
12
  * slot stays decompose-safe - an ejected skin talks to the same token the
@@ -20,6 +21,16 @@ interface CngxChartPanelRegistry {
20
21
  * registered cannot clear the newer one.
21
22
  */
22
23
  unregisterTitle(id: string): void;
24
+ /**
25
+ * Panel-level busy (the panel `[state]`, never the chart's data). The
26
+ * actions slot reads it to mark each projected action disabled.
27
+ */
28
+ readonly busy: Signal<boolean>;
29
+ /**
30
+ * Id of the always-rendered node naming why the actions are disabled while
31
+ * busy. Referenced only while `busy()` holds.
32
+ */
33
+ readonly busyDescriptionId: string;
23
34
  }
24
35
  /** DI token carrying the {@link CngxChartPanelRegistry} a `CngxChartPanel` provides. */
25
36
  declare const CNGX_CHART_PANEL: InjectionToken<CngxChartPanelRegistry>;
@@ -52,6 +63,8 @@ type CngxChartPanelLegendPosition = 'top' | 'bottom' | 'none';
52
63
  * region would hold back the projected chart's own live announcements and tell
53
64
  * AT that a perfectly stable chart is updating - the same boundary violation in
54
65
  * the a11y layer that duplicating its view switch would be in the state layer.
66
+ * A hidden status region (outside the busy header) announces the configured
67
+ * `ariaLabels.busy` string while the panel-level operation runs.
55
68
  *
56
69
  * ```html
57
70
  * <cngx-chart-panel>
@@ -81,6 +94,7 @@ type CngxChartPanelLegendPosition = 'top' | 'bottom' | 'none';
81
94
  declare class CngxChartPanel implements CngxChartPanelRegistry {
82
95
  private readonly titleId;
83
96
  private readonly config;
97
+ private readonly ariaLabels;
84
98
  /**
85
99
  * Panel-level async envelope - the one driving the header chrome, not the
86
100
  * chart's data. Bind the chart's own `[state]` to the chart; bind a
@@ -94,7 +108,21 @@ declare class CngxChartPanel implements CngxChartPanelRegistry {
94
108
  */
95
109
  readonly legendPosition: i0.InputSignal<CngxChartPanelLegendPosition>;
96
110
  /** @internal Panel-level busy, never the chart's data-loading state. */
97
- protected readonly panelBusy: i0.Signal<boolean>;
111
+ protected readonly panelBusy: Signal<boolean>;
112
+ /** {@inheritDoc CngxChartPanelRegistry.busy} */
113
+ readonly busy: Signal<boolean>;
114
+ /** @internal Names why the action cluster is disabled while busy; follows a language switch. */
115
+ protected readonly busyLabel: Signal<string>;
116
+ /**
117
+ * @internal Text of the hidden status region. The label is read untracked, so
118
+ * a language switch does not re-announce a running busy phase; the next one
119
+ * speaks the new language.
120
+ */
121
+ protected readonly busyStatus: Signal<string>;
122
+ /** {@inheritDoc CngxChartPanelRegistry.busyDescriptionId} */
123
+ readonly busyDescriptionId: string;
124
+ private readonly actionSlot;
125
+ constructor();
98
126
  /** {@inheritDoc CngxChartPanelRegistry.registerTitle} */
99
127
  registerTitle(id: string): void;
100
128
  /** {@inheritDoc CngxChartPanelRegistry.unregisterTitle} */
@@ -104,11 +132,48 @@ declare class CngxChartPanel implements CngxChartPanelRegistry {
104
132
  * `null` when no title was projected - an unnamed group is better than one
105
133
  * pointing at an id that does not exist.
106
134
  */
107
- protected readonly labelledBy: i0.Signal<string | null>;
135
+ protected readonly labelledBy: Signal<string | null>;
108
136
  static ɵfac: i0.ɵɵFactoryDeclaration<CngxChartPanel, never>;
109
137
  static ɵcmp: i0.ɵɵComponentDeclaration<CngxChartPanel, "cngx-chart-panel", never, { "state": { "alias": "state"; "required": false; "isSignal": true; }; "legendPosition": { "alias": "legendPosition"; "required": false; "isSignal": true; }; }, {}, never, ["[cngxChartPanelTitle]", "[cngxChartPanelSubtitle]", "[cngxChartPanelActions]", "cngx-chart-legend", "*", "[cngxChartPanelFooter]"], true, never>;
110
138
  }
111
139
 
140
+ /**
141
+ * The chart-panel section of a {@link CngxLanguagePack}: the copy of
142
+ * `CngxChartPanel`. It feeds the `ariaLabels` of `CNGX_CHART_PANEL_CONFIG`; a
143
+ * key set through `withChartPanelAriaLabels` still wins.
144
+ *
145
+ * @category ui/chart-panel/i18n
146
+ * @since 0.1.0
147
+ * @relatedTo CNGX_CHART_PANEL_CONFIG, withChartPanelAriaLabels
148
+ */
149
+ interface CngxChartPanelLanguageSection {
150
+ /** Accessible name announced while a panel-level operation runs. */
151
+ readonly busy: string;
152
+ }
153
+ /**
154
+ * The English chart-panel section: the single source of the chart panel's
155
+ * English copy. The `CNGX_CHART_PANEL_CONFIG` labels default to it.
156
+ *
157
+ * @category ui/chart-panel/i18n
158
+ * @since 0.1.0
159
+ * @relatedTo CNGX_CHART_PANEL_CONFIG
160
+ */
161
+ declare const CNGX_CHART_PANEL_LANGUAGE_EN: CngxChartPanelLanguageSection;
162
+ declare module '@cngx/core/i18n' {
163
+ interface CngxLanguagePack {
164
+ readonly chartPanel: CngxChartPanelLanguageSection;
165
+ }
166
+ }
167
+
168
+ /**
169
+ * String fallbacks for the chart-panel's non-content states. A partial of the
170
+ * `chartPanel` language section, declared once there; an unset key reads the
171
+ * section (English without a pack).
172
+ *
173
+ * @category ui/chart-panel
174
+ * @since 0.1.0
175
+ */
176
+ type CngxChartPanelAriaLabels = Partial<CngxChartPanelLanguageSection>;
112
177
  /**
113
178
  * App-wide cascade for the chart-panel's ARIA strings and its default legend
114
179
  * placement.
@@ -117,17 +182,19 @@ declare class CngxChartPanel implements CngxChartPanelRegistry {
117
182
  * 1. Per-instance Input binding (e.g. `[legendPosition]`).
118
183
  * 2. `provideChartPanelConfigAt(...)` in a parent component's `viewProviders`.
119
184
  * 3. `provideChartPanelConfig(...)` at the application root.
120
- * 4. Library defaults (English; merged in via `CNGX_CHART_PANEL_DEFAULTS`).
185
+ * 4. Library defaults (`CNGX_CHART_PANEL_DEFAULTS`; the strings come from
186
+ * the `chartPanel` section of the language pack).
121
187
  *
122
188
  * @category ui/chart-panel
123
189
  * @since 0.1.0
124
190
  */
125
191
  interface CngxChartPanelConfig {
126
- /** String fallbacks for the panel's non-content states. */
127
- readonly ariaLabels?: {
128
- /** Accessible name announced while a panel-level operation runs. */
129
- readonly busy?: string;
130
- };
192
+ /**
193
+ * String fallbacks for the panel's non-content states. Accepts a `Signal`
194
+ * so the strings follow a runtime language switch; read the resolved bundle
195
+ * through {@link injectChartPanelAriaLabels}.
196
+ */
197
+ readonly ariaLabels?: CngxChartPanelAriaLabels | Signal<CngxChartPanelAriaLabels>;
131
198
  /** App-wide default legend placement. Per-instance `[legendPosition]` wins. */
132
199
  readonly legendPosition?: CngxChartPanelLegendPosition;
133
200
  }
@@ -154,7 +221,7 @@ declare const CNGX_CHART_PANEL_CONFIG: InjectionToken<CngxChartPanelConfig>;
154
221
  */
155
222
  type CngxChartPanelConfigFeature = {
156
223
  readonly kind: 'ariaLabels';
157
- readonly payload: NonNullable<CngxChartPanelConfig['ariaLabels']>;
224
+ readonly payload: CngxChartPanelAriaLabels | Signal<CngxChartPanelAriaLabels>;
158
225
  } | {
159
226
  readonly kind: 'legendPosition';
160
227
  readonly payload: {
@@ -184,13 +251,16 @@ declare function provideChartPanelConfig(...features: CngxChartPanelConfigFeatur
184
251
  declare function provideChartPanelConfigAt(...features: CngxChartPanelConfigFeature[]): Provider[];
185
252
 
186
253
  /**
187
- * Override the chart-panel's string fallbacks. Library defaults are English;
188
- * this is the hook a localised app uses.
254
+ * Override the chart-panel's string fallbacks. The defaults come from the
255
+ * `chartPanel` section of the language pack (English without one); this
256
+ * overrides single keys on top of it. Pass a `Signal` to switch the
257
+ * language at runtime; the busy status speaks the new language with the next
258
+ * busy phase.
189
259
  *
190
260
  * @category ui/chart-panel
191
261
  * @since 0.1.0
192
262
  */
193
- declare function withChartPanelAriaLabels(labels: NonNullable<CngxChartPanelConfig['ariaLabels']>): CngxChartPanelConfigFeature;
263
+ declare function withChartPanelAriaLabels(labels: CngxChartPanelAriaLabels | Signal<CngxChartPanelAriaLabels>): CngxChartPanelConfigFeature;
194
264
  /**
195
265
  * Move the cascade default for where a projected `cngx-chart-legend` sits.
196
266
  * Per-instance `[legendPosition]` still wins.
@@ -211,6 +281,17 @@ declare function withChartPanelLegendPosition(position: CngxChartPanelLegendPosi
211
281
  * @since 0.1.0
212
282
  */
213
283
  declare function injectChartPanelConfig(): CngxChartPanelConfig;
284
+ /**
285
+ * The resolved strings of the chart-panel config in scope, every key the
286
+ * config leaves unset (also a key an override sets to `undefined`) filled from
287
+ * the `chartPanel` section of the active pack, as a Signal that follows a
288
+ * runtime language switch. Runs in injection context; read it inside a `computed()`, a
289
+ * template or a handler, and untracked where it builds live-region text.
290
+ *
291
+ * @category ui/chart-panel
292
+ * @since 0.1.0
293
+ */
294
+ declare function injectChartPanelAriaLabels(): Signal<Required<CngxChartPanelAriaLabels>>;
214
295
 
215
296
  /**
216
297
  * Marks the panel's title. Its generated id becomes the panel's
@@ -251,12 +332,35 @@ declare class CngxChartPanelSubtitle {
251
332
  * while a panel-level operation runs, so a user cannot fire a second range
252
333
  * change into an in-flight one.
253
334
  *
335
+ * On a control (a native button, link or form field, or any element with an
336
+ * explicit `role`) the marker also puts that state on the control itself:
337
+ * `aria-disabled="true"` plus an `aria-describedby` to the panel's busy reason
338
+ * ("Updating" by default, `ariaLabels.busy`), both only while the panel is
339
+ * busy, so focusing the action announces why it is unavailable. A static
340
+ * `aria-disabled` / `aria-describedby` the consumer wrote on the element is
341
+ * kept and merged. On a plain wrapper element the marker adds nothing (the
342
+ * attribute is not allowed on a generic); the slot group carries the state.
343
+ * Activation stays blocked by the slot (pointer and Enter/Space), so the
344
+ * control keeps its focusability instead of turning natively `disabled`.
345
+ *
254
346
  * @category ui/chart-panel
255
347
  * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/chart-panel/chart-panel-slots.ts
256
348
  * @since 0.1.0
257
349
  * @relatedTo CngxChartPanel
258
350
  */
259
351
  declare class CngxChartPanelActions {
352
+ private readonly panel;
353
+ private readonly ownDisabled;
354
+ private readonly ownDescribedBy;
355
+ private readonly carriesState;
356
+ private readonly busy;
357
+ /** @internal The panel busy state on the control, else the consumer's own value. */
358
+ protected readonly ariaDisabled: i0.Signal<string | null>;
359
+ /**
360
+ * @internal The busy reason, referenced only while busy (the node itself is
361
+ * always rendered), appended to the consumer's own description.
362
+ */
363
+ protected readonly describedBy: i0.Signal<string | null>;
260
364
  static ɵfac: i0.ɵɵFactoryDeclaration<CngxChartPanelActions, never>;
261
365
  static ɵdir: i0.ɵɵDirectiveDeclaration<CngxChartPanelActions, "[cngxChartPanelActions]", never, {}, {}, never, never, true, never>;
262
366
  }
@@ -274,5 +378,5 @@ declare class CngxChartPanelFooter {
274
378
  static ɵdir: i0.ɵɵDirectiveDeclaration<CngxChartPanelFooter, "[cngxChartPanelFooter]", never, {}, {}, never, never, true, never>;
275
379
  }
276
380
 
277
- export { CNGX_CHART_PANEL, CNGX_CHART_PANEL_CONFIG, CngxChartPanel, CngxChartPanelActions, CngxChartPanelFooter, CngxChartPanelSubtitle, CngxChartPanelTitle, injectChartPanelConfig, provideChartPanelConfig, provideChartPanelConfigAt, withChartPanelAriaLabels, withChartPanelLegendPosition };
278
- export type { CngxChartPanelConfig, CngxChartPanelConfigFeature, CngxChartPanelLegendPosition, CngxChartPanelRegistry };
381
+ export { CNGX_CHART_PANEL, CNGX_CHART_PANEL_CONFIG, CNGX_CHART_PANEL_LANGUAGE_EN, CngxChartPanel, CngxChartPanelActions, CngxChartPanelFooter, CngxChartPanelSubtitle, CngxChartPanelTitle, injectChartPanelAriaLabels, injectChartPanelConfig, provideChartPanelConfig, provideChartPanelConfigAt, withChartPanelAriaLabels, withChartPanelLegendPosition };
382
+ export type { CngxChartPanelAriaLabels, CngxChartPanelConfig, CngxChartPanelConfigFeature, CngxChartPanelLanguageSection, CngxChartPanelLegendPosition, CngxChartPanelRegistry };