@cngx/ui 0.1.0-rc.7 → 0.1.0-rc.9

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 (101) 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 +227 -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 +120 -36
  12. package/fesm2022/cngx-ui-accordion.mjs.map +1 -1
  13. package/fesm2022/cngx-ui-action-button.mjs +121 -56
  14. package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
  15. package/fesm2022/cngx-ui-breadcrumb.mjs +228 -108
  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 +204 -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 +209 -40
  24. package/fesm2022/cngx-ui-context-menu.mjs.map +1 -1
  25. package/fesm2022/cngx-ui-data-grid-accordion.mjs +498 -101
  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 +1074 -460
  30. package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
  31. package/fesm2022/cngx-ui-mat-accordion.mjs +76 -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 +555 -204
  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 +553 -198
  42. package/fesm2022/cngx-ui-paginator.mjs.map +1 -1
  43. package/fesm2022/cngx-ui-sidenav.mjs +344 -109
  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 +234 -99
  52. package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
  53. package/fesm2022/cngx-ui-tabs.mjs +88 -25
  54. package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
  55. package/fesm2022/cngx-ui-timeline.mjs +98 -23
  56. package/fesm2022/cngx-ui-timeline.mjs.map +1 -1
  57. package/fesm2022/cngx-ui-toc.mjs +101 -33
  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/README.md +30 -6
  63. package/mat-tabs/styles/mat-tabs.css +188 -42
  64. package/overlay/README.md +9 -4
  65. package/package.json +31 -7
  66. package/paginator/README.md +8 -4
  67. package/schematics/collection.json +9 -0
  68. package/schematics/ng-add/index.js +9 -0
  69. package/schematics/ng-add/schema.json +91 -0
  70. package/schematics/package.json +3 -0
  71. package/sidenav/README.md +33 -11
  72. package/speak/README.md +3 -2
  73. package/stepper/README.md +14 -2
  74. package/timeline/README.md +1 -1
  75. package/toc/README.md +4 -1
  76. package/types/cngx-ui-a11y.d.ts +121 -30
  77. package/types/cngx-ui-accordion.d.ts +100 -28
  78. package/types/cngx-ui-action-button.d.ts +44 -3
  79. package/types/cngx-ui-breadcrumb.d.ts +167 -60
  80. package/types/cngx-ui-chart-panel.d.ts +122 -18
  81. package/types/cngx-ui-collection.d.ts +157 -55
  82. package/types/cngx-ui-command-palette.d.ts +297 -183
  83. package/types/cngx-ui-context-menu.d.ts +140 -10
  84. package/types/cngx-ui-data-grid-accordion.d.ts +278 -39
  85. package/types/cngx-ui-empty-state.d.ts +9 -2
  86. package/types/cngx-ui-feedback.d.ts +605 -59
  87. package/types/cngx-ui-mat-accordion.d.ts +30 -1
  88. package/types/cngx-ui-mat-paginator.d.ts +37 -8
  89. package/types/cngx-ui-mat-stepper.d.ts +23 -11
  90. package/types/cngx-ui-mat-tabs.d.ts +250 -34
  91. package/types/cngx-ui-overlay.d.ts +56 -10
  92. package/types/cngx-ui-paginator.d.ts +425 -136
  93. package/types/cngx-ui-sidenav.d.ts +248 -74
  94. package/types/cngx-ui-skeleton.d.ts +6 -7
  95. package/types/cngx-ui-speak.d.ts +118 -5
  96. package/types/cngx-ui-stat-card.d.ts +117 -33
  97. package/types/cngx-ui-stepper.d.ts +88 -49
  98. package/types/cngx-ui-tabs.d.ts +6 -4
  99. package/types/cngx-ui-timeline.d.ts +35 -11
  100. package/types/cngx-ui-toc.d.ts +93 -16
  101. package/types/cngx-ui.d.ts +7 -4
@@ -2,7 +2,6 @@ import * as _angular_core from '@angular/core';
2
2
  import { InjectionToken, Signal, TemplateRef, EnvironmentProviders, Provider } from '@angular/core';
3
3
  import { AsyncStatus, CngxAsyncState } from '@cngx/core/utils';
4
4
  import * as i1 from '@cngx/common/interactive';
5
- import * as _cngx_ui_accordion from '@cngx/ui/accordion';
6
5
 
7
6
  /**
8
7
  * UI-local context a {@link CngxAccordionGroup} exposes so each
@@ -124,11 +123,12 @@ type CngxAccordionSeverity = 'error' | 'warning' | 'info';
124
123
  * 2. `provideAccordionConfigAt(...)` in a parent component's `viewProviders`
125
124
  * (component-scoped override).
126
125
  * 3. `provideAccordionConfig(...)` at the application root.
127
- * 4. Library defaults (English; `CNGX_ACCORDION_DEFAULTS`).
126
+ * 4. Library defaults (`CNGX_ACCORDION_DEFAULTS`; the copy comes from the
127
+ * `accordion` section of the language pack).
128
128
  *
129
- * Both keys are required on the resolved config - the token ships a complete
130
- * default, and every `with*` feature overrides a whole key, so no consumer ever
131
- * observes a partial shape.
129
+ * The copy keys are overrides only: the token's default leaves them unset, and
130
+ * {@link injectAccordionLabels} fills every unset key from the `accordion`
131
+ * section of the language pack, so a reader never observes a partial shape.
132
132
  *
133
133
  * @category ui/accordion
134
134
  * @since 0.1.0
@@ -136,17 +136,22 @@ type CngxAccordionSeverity = 'error' | 'warning' | 'info';
136
136
  interface CngxAccordionConfig {
137
137
  /**
138
138
  * Reason announced to assistive tech when an item is disabled, bound through
139
- * the item's always-present `aria-describedby` reason element. English
140
- * default; a per-instance `[disabledReason]` still wins over the cascade.
139
+ * the item's always-present `aria-describedby` reason element. An override
140
+ * only: unset, the reason comes from the `accordion` section of the language
141
+ * pack. A per-instance `[disabledReason]` still wins over the cascade.
142
+ * Accepts a `Signal` so the reason follows a runtime language switch.
141
143
  */
142
- readonly disabledReason: string;
144
+ readonly disabledReason?: string | Signal<string>;
143
145
  /**
144
146
  * Message announced (via a `role="alert"`) when an item's `[state]` is error
145
- * and no `*cngxAccordionItemError` slot is provided. English default; a
146
- * per-instance `[errorMessage]` or the error slot still wins. Ships a spoken
147
+ * and no `*cngxAccordionItemError` slot is provided. An override only:
148
+ * unset, the message comes from the `accordion` section of the language
149
+ * pack. A per-instance `[errorMessage]` or the error slot still wins. Ships a spoken
147
150
  * default so the error state is never silent to assistive tech (Pillar 2).
151
+ * Accepts a `Signal`; a shown message keeps its text on a language switch and
152
+ * speaks the new language with the next error.
148
153
  */
149
- readonly errorMessage: string;
154
+ readonly errorMessage?: string | Signal<string>;
150
155
  /**
151
156
  * Default `aria-level` (2-6) every `CngxAccordionGroup` heading wrapper
152
157
  * reflects when `[headingLevel]` is not bound. Clamped into the ARIA range by
@@ -214,7 +219,15 @@ interface CngxAccordionConfig {
214
219
  * <example-url>http://localhost:4200/#/ui/accordion/multi-open/independent</example-url>
215
220
  * <example-url>http://localhost:4200/#/ui/accordion/controlled-open/initial-open</example-url>
216
221
  * <example-url>http://localhost:4200/#/ui/accordion/config/app-wide-labels</example-url>
222
+ * <example-url>http://localhost:4200/#/ui/accordion/skins/bento</example-url>
223
+ * <example-url>http://localhost:4200/#/ui/accordion/skins/categorized</example-url>
217
224
  * <example-url>http://localhost:4200/#/ui/accordion/skins/editorial</example-url>
225
+ * <example-url>http://localhost:4200/#/ui/accordion/skins/lux</example-url>
226
+ * <example-url>http://localhost:4200/#/ui/accordion/skins/plus-minus</example-url>
227
+ * <example-url>http://localhost:4200/#/ui/accordion/skins/primary-frame</example-url>
228
+ * <example-url>http://localhost:4200/#/ui/accordion/skins/section-bands</example-url>
229
+ * <example-url>http://localhost:4200/#/ui/accordion/skins/severity-spine</example-url>
230
+ * <example-url>http://localhost:4200/#/ui/accordion/skins/timeline</example-url>
218
231
  */
219
232
  declare class CngxAccordionGroup implements CngxAccordionGroupContext {
220
233
  private readonly config;
@@ -397,6 +410,7 @@ declare class CngxAccordionItemSubtitle {
397
410
  */
398
411
  declare class CngxAccordionItem {
399
412
  private readonly config;
413
+ private readonly copy;
400
414
  /**
401
415
  * Disabled item: the header reports `tabindex="-1"` + `aria-disabled="true"`,
402
416
  * is skipped by roving, and its click never expands. The reason text is
@@ -414,18 +428,19 @@ declare class CngxAccordionItem {
414
428
  * Reason announced to assistive tech when the item is disabled, bound through
415
429
  * the always-present `aria-describedby` reason element. Resolves
416
430
  * `input ?? CNGX_ACCORDION_CONFIG.disabledReason ?? EN default`: an unbound
417
- * input falls back to the app-wide config (English out of the box, overridden
418
- * via `withAccordionLabels`).
431
+ * input (`undefined`) falls back to the app-wide config (English out of the
432
+ * box, overridden via `withAccordionLabels`) and follows a language switch.
419
433
  */
420
- readonly disabledReason: _angular_core.InputSignal<string>;
434
+ readonly disabledReason: _angular_core.InputSignal<string | undefined>;
421
435
  /**
422
436
  * Message announced through a `role="alert"` when `[state]` is error and no
423
437
  * `*cngxAccordionItemError` slot is provided. Resolves
424
438
  * `input ?? CNGX_ACCORDION_CONFIG.errorMessage ?? EN default`, mirroring
425
439
  * {@link disabledReason}: a spoken default so the error state is never silent
426
- * to assistive tech. The error slot, when present, wins over this string.
440
+ * to assistive tech. The error slot, when present, wins over this string. An
441
+ * unbound input reads `undefined`.
427
442
  */
428
- readonly errorMessage: _angular_core.InputSignal<string>;
443
+ readonly errorMessage: _angular_core.InputSignal<string | undefined>;
429
444
  /**
430
445
  * Stable id this item registers under in the coordinator's open-set. Defaults
431
446
  * to a generated id; bind `[panelId]` to a stable consumer value to address
@@ -442,13 +457,15 @@ declare class CngxAccordionItem {
442
457
  * consumer wires the fetch; the item only communicates the state it is handed.
443
458
  */
444
459
  readonly state: _angular_core.InputSignal<AsyncStatus | CngxAsyncState<unknown> | undefined>;
460
+ protected readonly group: CngxAccordionGroupContext;
445
461
  private readonly accordion;
446
- protected readonly group: _cngx_ui_accordion.CngxAccordionGroupContext;
447
462
  protected readonly regionId: string;
448
463
  protected readonly headerId: string;
449
464
  protected readonly titleId: string;
450
465
  protected readonly subtitleId: string;
451
466
  protected readonly reasonId: string;
467
+ /** The disabled reason: the bound input, else the cascade default. */
468
+ protected readonly resolvedDisabledReason: _angular_core.Signal<string>;
452
469
  /**
453
470
  * The button's `aria-describedby`: subtitle first (an informative secondary
454
471
  * line the title-only name-pin would otherwise hide from AT), then the
@@ -502,6 +519,13 @@ declare class CngxAccordionItem {
502
519
  * pending) so the string and object input forms agree. Boolean, no `equal`.
503
520
  */
504
521
  protected readonly busy: _angular_core.Signal<boolean>;
522
+ /**
523
+ * Text of the `role="alert"`. A bound `[errorMessage]` is tracked; the cascade
524
+ * default is read untracked and re-read on a status change, so a language
525
+ * switch does not re-announce a shown error - the next error speaks the new
526
+ * language.
527
+ */
528
+ protected readonly resolvedErrorMessage: _angular_core.Signal<string>;
505
529
  /** Whether this item's region is open, derived from the coordinator's open-set. */
506
530
  protected readonly expanded: _angular_core.Signal<boolean>;
507
531
  /**
@@ -637,8 +661,8 @@ declare const CNGX_ACCORDION_CONFIG: InjectionToken<CngxAccordionConfig>;
637
661
  type CngxAccordionConfigFeature = {
638
662
  readonly kind: 'labels';
639
663
  readonly payload: {
640
- readonly disabledReason?: string;
641
- readonly errorMessage?: string;
664
+ readonly disabledReason?: string | Signal<string>;
665
+ readonly errorMessage?: string | Signal<string>;
642
666
  };
643
667
  } | {
644
668
  readonly kind: 'headingLevel';
@@ -716,7 +740,8 @@ declare function provideAccordionConfigAt(...features: CngxAccordionConfigFeatur
716
740
  * (spoken when an item is disabled) and `errorMessage` (spoken via `role="alert"`
717
741
  * when an item's `[state]` is error and no error slot is given). Pass either or
718
742
  * both. Per-instance `[disabledReason]` / `[errorMessage]` still win over the
719
- * cascade; this only sets the fallback.
743
+ * cascade; this only sets the fallback. Pass a `Signal` for either string to
744
+ * switch the language at runtime.
720
745
  *
721
746
  * ```ts
722
747
  * provideAccordionConfig(
@@ -731,8 +756,8 @@ declare function provideAccordionConfigAt(...features: CngxAccordionConfigFeatur
731
756
  * @since 0.1.0
732
757
  */
733
758
  declare function withAccordionLabels(payload: {
734
- disabledReason?: string;
735
- errorMessage?: string;
759
+ disabledReason?: string | Signal<string>;
760
+ errorMessage?: string | Signal<string>;
736
761
  }): CngxAccordionConfigFeature;
737
762
  /**
738
763
  * Override the default heading level (`aria-level`) a `CngxAccordionGroup`
@@ -782,6 +807,37 @@ declare function withAccordionSkin(skin: CngxAccordionSkin): CngxAccordionConfig
782
807
  */
783
808
  declare function withAccordionTemplates(payload: NonNullable<CngxAccordionConfig['templates']>): CngxAccordionConfigFeature;
784
809
 
810
+ /**
811
+ * The accordion section of a {@link CngxLanguagePack}: the copy
812
+ * `CngxAccordionItem` speaks on its own behalf. It feeds the copy keys of
813
+ * `CNGX_ACCORDION_CONFIG`; a key set through `withAccordionLabels` or a bound
814
+ * `[disabledReason]` / `[errorMessage]` still wins.
815
+ *
816
+ * @category ui/accordion/i18n
817
+ * @since 0.1.0
818
+ * @relatedTo CNGX_ACCORDION_CONFIG, withAccordionLabels
819
+ */
820
+ interface CngxAccordionLanguageSection {
821
+ /** Reason announced when an item is disabled. */
822
+ readonly disabledReason: string;
823
+ /** Announced through `role="alert"` when an item's state is error. */
824
+ readonly errorMessage: string;
825
+ }
826
+ /**
827
+ * The English accordion section: the single source of the accordion's English
828
+ * copy. The `CNGX_ACCORDION_CONFIG` copy keys default to it.
829
+ *
830
+ * @category ui/accordion/i18n
831
+ * @since 0.1.0
832
+ * @relatedTo CNGX_ACCORDION_CONFIG
833
+ */
834
+ declare const CNGX_ACCORDION_LANGUAGE_EN: CngxAccordionLanguageSection;
835
+ declare module '@cngx/core/i18n' {
836
+ interface CngxLanguagePack {
837
+ readonly accordion: CngxAccordionLanguageSection;
838
+ }
839
+ }
840
+
785
841
  /**
786
842
  * Convenience accessor for the accordion configuration cascade. Runs in
787
843
  * injection context; resolves through the priority chain (per-instance Input
@@ -790,17 +846,33 @@ declare function withAccordionTemplates(payload: NonNullable<CngxAccordionConfig
790
846
  * so consumers don't import the token directly. Mirrors `injectBreadcrumbConfig`
791
847
  * in `@cngx/ui/breadcrumb`.
792
848
  *
849
+ * The copy keys `disabledReason` and `errorMessage` hold overrides only; read
850
+ * the resolved copy (overrides over the language pack) through
851
+ * {@link injectAccordionLabels}.
852
+ *
853
+ * @category ui/accordion
854
+ * @since 0.1.0
855
+ */
856
+ declare function injectAccordionConfig(): CngxAccordionConfig;
857
+ /**
858
+ * The accordion copy in scope - `disabledReason` and `errorMessage` - as a
859
+ * Signal that follows a runtime language switch. A key the config sets wins;
860
+ * a key it leaves unset, `null` or `undefined` reads the `accordion` section
861
+ * of the active pack (English without one). Runs in injection context; read it
862
+ * inside a `computed()`, a template or a handler, and untracked where it
863
+ * builds live-region text.
864
+ *
793
865
  * ```ts
794
- * export class CngxAccordionItem {
795
- * private readonly config = injectAccordionConfig();
796
- * readonly disabledReason = input<string>(this.config.disabledReason);
866
+ * export class MyAccordionReason {
867
+ * private readonly copy = injectAccordionLabels();
868
+ * protected readonly reason = computed(() => this.copy().disabledReason);
797
869
  * }
798
870
  * ```
799
871
  *
800
872
  * @category ui/accordion
801
873
  * @since 0.1.0
802
874
  */
803
- declare function injectAccordionConfig(): CngxAccordionConfig;
875
+ declare function injectAccordionLabels(): Signal<CngxAccordionLanguageSection>;
804
876
 
805
- export { CNGX_ACCORDION_CONFIG, CNGX_ACCORDION_GROUP, CngxAccordionGroup, CngxAccordionItem, CngxAccordionItemBusy, CngxAccordionItemContent, CngxAccordionItemError, CngxAccordionItemIcon, CngxAccordionItemLeading, CngxAccordionItemMeta, CngxAccordionItemSubtitle, CngxAccordionItemTitle, injectAccordionConfig, provideAccordionConfig, provideAccordionConfigAt, withAccordionLabels, withAccordionSkin, withAccordionTemplates, withDefaultHeadingLevel };
806
- export type { CngxAccordionConfig, CngxAccordionConfigFeature, CngxAccordionGroupContext, CngxAccordionItemIconContext, CngxAccordionItemStateContext, CngxAccordionSeverity, CngxAccordionSkin };
877
+ export { CNGX_ACCORDION_CONFIG, CNGX_ACCORDION_GROUP, CNGX_ACCORDION_LANGUAGE_EN, CngxAccordionGroup, CngxAccordionItem, CngxAccordionItemBusy, CngxAccordionItemContent, CngxAccordionItemError, CngxAccordionItemIcon, CngxAccordionItemLeading, CngxAccordionItemMeta, CngxAccordionItemSubtitle, CngxAccordionItemTitle, injectAccordionConfig, injectAccordionLabels, provideAccordionConfig, provideAccordionConfigAt, withAccordionLabels, withAccordionSkin, withAccordionTemplates, withDefaultHeadingLevel };
878
+ export type { CngxAccordionConfig, CngxAccordionConfigFeature, CngxAccordionGroupContext, CngxAccordionItemIconContext, CngxAccordionItemStateContext, CngxAccordionLanguageSection, CngxAccordionSeverity, CngxAccordionSkin };
@@ -1,4 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
+ import * as _cngx_common_interactive from '@cngx/common/interactive';
2
3
  import { AsyncAction, CngxPending, CngxSucceeded, CngxFailed } from '@cngx/common/interactive';
3
4
  import { CngxAsyncState } from '@cngx/core/utils';
4
5
 
@@ -66,7 +67,10 @@ type ActionButtonVariant = 'primary' | 'secondary' | 'ghost';
66
67
  */
67
68
  declare class CngxActionButton {
68
69
  private readonly toaster;
70
+ private readonly errorDetail;
71
+ private readonly feedbackI18n;
69
72
  private readonly externalToastOn;
73
+ protected readonly i18n: _angular_core.Signal<_cngx_common_interactive.CngxInteractiveI18n>;
70
74
  /** The async action to execute on click. */
71
75
  readonly action: _angular_core.InputSignal<AsyncAction>;
72
76
  /** Duration in ms to show success/error feedback. Passed through to `cngxAsyncClick`. */
@@ -77,9 +81,15 @@ declare class CngxActionButton {
77
81
  readonly type: _angular_core.InputSignal<"button" | "submit" | "reset">;
78
82
  /** Visual variant - sets CSS class `cngx-action-button--{variant}`. */
79
83
  readonly variant: _angular_core.InputSignal<ActionButtonVariant>;
80
- /** SR announcement on success. Falls back to `succeededLabel`, then `'Action succeeded'`. */
84
+ /**
85
+ * SR announcement on success. Falls back to `succeededLabel`, then
86
+ * `CNGX_INTERACTIVE_I18N.asyncClickSucceeded`.
87
+ */
81
88
  readonly succeededAnnouncement: _angular_core.InputSignal<string | undefined>;
82
- /** SR announcement on failure. Falls back to `failedLabel`, then `'Action failed'`. */
89
+ /**
90
+ * SR announcement on failure. Falls back to `failedLabel`, then
91
+ * `CNGX_INTERACTIVE_I18N.asyncClickFailed`.
92
+ */
83
93
  readonly failedAnnouncement: _angular_core.InputSignal<string | undefined>;
84
94
  /** Fallback text while pending (when no `cngxPending` template is projected). */
85
95
  readonly pendingLabel: _angular_core.InputSignal<string | undefined>;
@@ -92,6 +102,13 @@ declare class CngxActionButton {
92
102
  * When set, the button's status display follows `externalState.status()`.
93
103
  */
94
104
  readonly externalState: _angular_core.InputSignal<CngxAsyncState<unknown> | undefined>;
105
+ /**
106
+ * Reason the button is disabled, announced to screen readers while
107
+ * `[enabled]` is `false`. Rendered into a hidden region and referenced by
108
+ * `aria-describedby` only while disabled - an enabled button never carries
109
+ * the reference. No effect when `[enabled]` is `true`.
110
+ */
111
+ readonly disabledReason: _angular_core.InputSignal<string | undefined>;
95
112
  /**
96
113
  * Toast message on success. Requires `CngxToaster` (via `provideFeedback(withToasts())`
97
114
  * or `provideToasts()`). Silently ignored when toaster is not provided.
@@ -119,6 +136,30 @@ declare class CngxActionButton {
119
136
  protected readonly effectiveStatus: _angular_core.Signal<"idle" | "pending" | "success" | "error" | "loading" | "refreshing">;
120
137
  /** @internal - effective error value from external state or inner directive. */
121
138
  protected readonly effectiveError: _angular_core.Signal<unknown>;
139
+ /** @internal - busy while the effective status (inner or external) is pending. */
140
+ protected readonly effectiveBusy: _angular_core.Signal<boolean>;
141
+ /**
142
+ * @internal - what the inner `CngxAsyncClick` may act on: only when the
143
+ * consumer enabled it AND no effective operation is in flight. Feeding this
144
+ * as `[enabled]` routes external-pending through the atom's own click guard,
145
+ * so a click cannot start a second run while an external state is pending.
146
+ */
147
+ protected readonly clickEnabled: _angular_core.Signal<boolean>;
148
+ /**
149
+ * @internal - SR announcement derived from the effective status, so an
150
+ * external success/error settles audibly too (the inner directive only
151
+ * knows its own runs). Mirrors the label fallback chain the template uses.
152
+ */
153
+ protected readonly effectiveAnnouncement: _angular_core.Signal<string>;
154
+ /** @internal - stable id for the disabled-reason region. */
155
+ protected readonly reasonId: string;
156
+ /**
157
+ * @internal - reference the reason region only while actually disabled by
158
+ * intent and a reason exists. accname traverses a directly referenced hidden
159
+ * node, so the id must be gated on the state it describes rather than left
160
+ * permanently pointing at a hidden region.
161
+ */
162
+ protected readonly describedBy: _angular_core.Signal<string | null>;
122
163
  private readonly lastUpdatedState;
123
164
  /**
124
165
  * Full `CngxAsyncState` view of this button's effective lifecycle.
@@ -137,7 +178,7 @@ declare class CngxActionButton {
137
178
  protected readonly failedTpl: _angular_core.Signal<CngxFailed | undefined>;
138
179
  constructor();
139
180
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxActionButton, never>;
140
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxActionButton, "cngx-action-button", ["cngxActionButton"], { "action": { "alias": "action"; "required": true; "isSignal": true; }; "feedbackDuration": { "alias": "feedbackDuration"; "required": false; "isSignal": true; }; "enabled": { "alias": "enabled"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "succeededAnnouncement": { "alias": "succeededAnnouncement"; "required": false; "isSignal": true; }; "failedAnnouncement": { "alias": "failedAnnouncement"; "required": false; "isSignal": true; }; "pendingLabel": { "alias": "pendingLabel"; "required": false; "isSignal": true; }; "succeededLabel": { "alias": "succeededLabel"; "required": false; "isSignal": true; }; "failedLabel": { "alias": "failedLabel"; "required": false; "isSignal": true; }; "externalState": { "alias": "externalState"; "required": false; "isSignal": true; }; "toastSuccess": { "alias": "toastSuccess"; "required": false; "isSignal": true; }; "toastError": { "alias": "toastError"; "required": false; "isSignal": true; }; "toastErrorDetail": { "alias": "toastErrorDetail"; "required": false; "isSignal": true; }; "toastSuccessDuration": { "alias": "toastSuccessDuration"; "required": false; "isSignal": true; }; "toastErrorDuration": { "alias": "toastErrorDuration"; "required": false; "isSignal": true; }; }, {}, ["pendingTpl", "succeededTpl", "failedTpl"], ["*"], true, never>;
181
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxActionButton, "cngx-action-button", ["cngxActionButton"], { "action": { "alias": "action"; "required": true; "isSignal": true; }; "feedbackDuration": { "alias": "feedbackDuration"; "required": false; "isSignal": true; }; "enabled": { "alias": "enabled"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "succeededAnnouncement": { "alias": "succeededAnnouncement"; "required": false; "isSignal": true; }; "failedAnnouncement": { "alias": "failedAnnouncement"; "required": false; "isSignal": true; }; "pendingLabel": { "alias": "pendingLabel"; "required": false; "isSignal": true; }; "succeededLabel": { "alias": "succeededLabel"; "required": false; "isSignal": true; }; "failedLabel": { "alias": "failedLabel"; "required": false; "isSignal": true; }; "externalState": { "alias": "externalState"; "required": false; "isSignal": true; }; "disabledReason": { "alias": "disabledReason"; "required": false; "isSignal": true; }; "toastSuccess": { "alias": "toastSuccess"; "required": false; "isSignal": true; }; "toastError": { "alias": "toastError"; "required": false; "isSignal": true; }; "toastErrorDetail": { "alias": "toastErrorDetail"; "required": false; "isSignal": true; }; "toastSuccessDuration": { "alias": "toastSuccessDuration"; "required": false; "isSignal": true; }; "toastErrorDuration": { "alias": "toastErrorDuration"; "required": false; "isSignal": true; }; }, {}, ["pendingTpl", "succeededTpl", "failedTpl"], ["*"], true, never>;
141
182
  }
142
183
 
143
184
  export { CngxActionButton };