@cngx/ui 0.1.0-rc.9 → 0.3.0

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 (106) hide show
  1. package/README.md +118 -59
  2. package/action-button/README.md +170 -53
  3. package/breadcrumb/README.md +5 -6
  4. package/collection/README.md +1 -1
  5. package/command-palette/README.md +4 -3
  6. package/data-grid-accordion/README.md +1 -1
  7. package/empty-state/README.md +2 -3
  8. package/feedback/README.md +1 -1
  9. package/fesm2022/cngx-ui-a11y.mjs +13 -23
  10. package/fesm2022/cngx-ui-a11y.mjs.map +1 -1
  11. package/fesm2022/cngx-ui-accordion.mjs +44 -66
  12. package/fesm2022/cngx-ui-accordion.mjs.map +1 -1
  13. package/fesm2022/cngx-ui-action-button.mjs +213 -335
  14. package/fesm2022/cngx-ui-action-button.mjs.map +1 -1
  15. package/fesm2022/cngx-ui-breadcrumb.mjs +60 -80
  16. package/fesm2022/cngx-ui-breadcrumb.mjs.map +1 -1
  17. package/fesm2022/cngx-ui-chart-panel.mjs +18 -31
  18. package/fesm2022/cngx-ui-chart-panel.mjs.map +1 -1
  19. package/fesm2022/cngx-ui-collection.mjs +28 -44
  20. package/fesm2022/cngx-ui-collection.mjs.map +1 -1
  21. package/fesm2022/cngx-ui-command-palette.mjs +29 -51
  22. package/fesm2022/cngx-ui-command-palette.mjs.map +1 -1
  23. package/fesm2022/cngx-ui-context-menu.mjs +78 -83
  24. package/fesm2022/cngx-ui-context-menu.mjs.map +1 -1
  25. package/fesm2022/cngx-ui-data-grid-accordion.mjs +52 -74
  26. package/fesm2022/cngx-ui-data-grid-accordion.mjs.map +1 -1
  27. package/fesm2022/cngx-ui-empty-state.mjs +17 -44
  28. package/fesm2022/cngx-ui-empty-state.mjs.map +1 -1
  29. package/fesm2022/cngx-ui-feedback.mjs +589 -467
  30. package/fesm2022/cngx-ui-feedback.mjs.map +1 -1
  31. package/fesm2022/cngx-ui-layout.mjs +17 -13
  32. package/fesm2022/cngx-ui-layout.mjs.map +1 -1
  33. package/fesm2022/cngx-ui-mat-accordion.mjs +3 -5
  34. package/fesm2022/cngx-ui-mat-accordion.mjs.map +1 -1
  35. package/fesm2022/cngx-ui-mat-paginator.mjs +5 -9
  36. package/fesm2022/cngx-ui-mat-paginator.mjs.map +1 -1
  37. package/fesm2022/cngx-ui-mat-stepper.mjs +6 -9
  38. package/fesm2022/cngx-ui-mat-stepper.mjs.map +1 -1
  39. package/fesm2022/cngx-ui-mat-tabs.mjs +71 -68
  40. package/fesm2022/cngx-ui-mat-tabs.mjs.map +1 -1
  41. package/fesm2022/cngx-ui-nav-rail.mjs +440 -0
  42. package/fesm2022/cngx-ui-nav-rail.mjs.map +1 -0
  43. package/fesm2022/cngx-ui-overlay.mjs +9 -10
  44. package/fesm2022/cngx-ui-overlay.mjs.map +1 -1
  45. package/fesm2022/cngx-ui-paginator.mjs +149 -171
  46. package/fesm2022/cngx-ui-paginator.mjs.map +1 -1
  47. package/fesm2022/cngx-ui-sidenav.mjs +858 -721
  48. package/fesm2022/cngx-ui-sidenav.mjs.map +1 -1
  49. package/fesm2022/cngx-ui-skeleton.mjs +17 -19
  50. package/fesm2022/cngx-ui-skeleton.mjs.map +1 -1
  51. package/fesm2022/cngx-ui-speak.mjs +21 -74
  52. package/fesm2022/cngx-ui-speak.mjs.map +1 -1
  53. package/fesm2022/cngx-ui-stat-card.mjs +39 -62
  54. package/fesm2022/cngx-ui-stat-card.mjs.map +1 -1
  55. package/fesm2022/cngx-ui-stepper.mjs +207 -90
  56. package/fesm2022/cngx-ui-stepper.mjs.map +1 -1
  57. package/fesm2022/cngx-ui-tabs.mjs +71 -32
  58. package/fesm2022/cngx-ui-tabs.mjs.map +1 -1
  59. package/fesm2022/cngx-ui-timeline.mjs +21 -27
  60. package/fesm2022/cngx-ui-timeline.mjs.map +1 -1
  61. package/fesm2022/cngx-ui-toc.mjs +27 -40
  62. package/fesm2022/cngx-ui-toc.mjs.map +1 -1
  63. package/fesm2022/cngx-ui.mjs +5 -5
  64. package/fesm2022/cngx-ui.mjs.map +1 -1
  65. package/mat-tabs/README.md +28 -14
  66. package/mat-tabs/styles/mat-tabs.css +233 -258
  67. package/nav-rail/README.md +325 -0
  68. package/package.json +10 -5
  69. package/paginator/README.md +10 -0
  70. package/schematics/ng-add/index.js +7 -7
  71. package/schematics/ng-add/schema.json +5 -0
  72. package/sidenav/README.md +150 -55
  73. package/skeleton/README.md +1 -1
  74. package/speak/README.md +1 -2
  75. package/stepper/README.md +20 -5
  76. package/tabs/README.md +13 -0
  77. package/timeline/README.md +1 -1
  78. package/toc/README.md +1 -1
  79. package/types/cngx-ui-a11y.d.ts +20 -38
  80. package/types/cngx-ui-accordion.d.ts +45 -77
  81. package/types/cngx-ui-action-button.d.ts +113 -151
  82. package/types/cngx-ui-breadcrumb.d.ts +58 -94
  83. package/types/cngx-ui-chart-panel.d.ts +22 -40
  84. package/types/cngx-ui-collection.d.ts +30 -53
  85. package/types/cngx-ui-command-palette.d.ts +40 -64
  86. package/types/cngx-ui-context-menu.d.ts +67 -44
  87. package/types/cngx-ui-data-grid-accordion.d.ts +49 -77
  88. package/types/cngx-ui-empty-state.d.ts +18 -8
  89. package/types/cngx-ui-feedback.d.ts +264 -289
  90. package/types/cngx-ui-layout.d.ts +4 -12
  91. package/types/cngx-ui-mat-accordion.d.ts +2 -3
  92. package/types/cngx-ui-mat-paginator.d.ts +4 -10
  93. package/types/cngx-ui-mat-stepper.d.ts +5 -10
  94. package/types/cngx-ui-mat-tabs.d.ts +43 -69
  95. package/types/cngx-ui-nav-rail.d.ts +416 -0
  96. package/types/cngx-ui-overlay.d.ts +4 -13
  97. package/types/cngx-ui-paginator.d.ts +164 -154
  98. package/types/cngx-ui-sidenav.d.ts +557 -437
  99. package/types/cngx-ui-skeleton.d.ts +7 -13
  100. package/types/cngx-ui-speak.d.ts +40 -24
  101. package/types/cngx-ui-stat-card.d.ts +45 -36
  102. package/types/cngx-ui-stepper.d.ts +183 -62
  103. package/types/cngx-ui-tabs.d.ts +101 -27
  104. package/types/cngx-ui-timeline.d.ts +20 -48
  105. package/types/cngx-ui-toc.d.ts +30 -51
  106. package/types/cngx-ui.d.ts +1 -1
@@ -1,185 +1,147 @@
1
+ import * as i2 from '@cngx/common/interactive';
2
+ import { CngxAnnouncementCover } from '@cngx/common/interactive';
1
3
  import * as _angular_core from '@angular/core';
2
- import * as _cngx_common_interactive from '@cngx/common/interactive';
3
- import { AsyncAction, CngxPending, CngxSucceeded, CngxFailed } from '@cngx/common/interactive';
4
- import { CngxAsyncState } from '@cngx/core/utils';
4
+ import { Signal } from '@angular/core';
5
+ import * as i1 from '@cngx/common/button';
6
+ import { CngxButtonBrain, CngxButtonStart, CngxButtonEnd } from '@cngx/common/button';
7
+ import { AsyncStatus, CngxAsyncState } from '@cngx/core/utils';
5
8
 
6
9
  /**
7
- * Visual variant for the action button - maps to a CSS class.
10
+ * Raises one toast per outcome of an action host on `CngxActionStatusBrain`: each own settle
11
+ * and each `success` / `error` edge of a bound `[externalState]`, read from
12
+ * `CNGX_ACTION_STATUS.outcome`. Two settles before one render are two toasts.
8
13
  *
9
- * @category ui/action-button
10
- */
11
- type ActionButtonVariant = 'primary' | 'secondary' | 'ghost';
12
- /**
13
- * Action button organism with built-in status communication.
14
+ * Host directive only: `CngxActionButton` co-hosts it, an ejected action host lists it in
15
+ * `hostDirectives`. Without a `CngxToaster` (`provideFeedback(withToasts())` or
16
+ * `provideToasts()`) it does nothing.
14
17
  *
15
- * Coordinates between the `CngxAsyncClick` atom (mechanism, ARIA, lifecycle)
16
- * and the consumer (intent, styling, labels). Provides template projection
17
- * for pending/succeeded/failed states and an `aria-live` region for screen
18
- * reader announcements.
18
+ * A shown toast already announces its outcome, so via `CNGX_ANNOUNCEMENT_COVER` the live region
19
+ * stays empty for that outcome unless the brain's `announce` is `'always'`.
19
20
  *
20
- * Uses `display: contents` - the host produces no DOM box. The inner `<button>`
21
- * carries the `[cngxAsyncClick]` directive directly.
21
+ * Do not combine it with `[cngxToastOn]` on the same element: both toast the same outcome, and
22
+ * development builds warn [`CNGX3008`](/error-codes/cngx3008.md).
22
23
  *
23
- * For full control, use `[cngxAsyncClick]` directly on any element instead.
24
- *
25
- * ### Minimal (covers 80% of cases)
26
- * ```html
27
- * <cngx-action-button [action]="save">Save</cngx-action-button>
28
- * ```
29
- *
30
- * ### With string labels
31
- * ```html
32
- * <cngx-action-button [action]="save"
33
- * pendingLabel="Saving..." succeededLabel="Saved!" failedLabel="Failed">
34
- * Save
35
- * </cngx-action-button>
36
- * ```
37
- *
38
- * ### With template slots
39
- * ```html
40
- * <cngx-action-button [action]="save">
41
- * Save Draft
42
- * <ng-template cngxPending><mat-spinner diameter="18" /> Saving...</ng-template>
43
- * <ng-template cngxSucceeded>Saved!</ng-template>
44
- * <ng-template cngxFailed let-err>{{ err }} - retry?</ng-template>
45
- * </cngx-action-button>
24
+ * ```ts
25
+ * hostDirectives: [
26
+ * // ...button brain, async click, action status brain
27
+ * { directive: CngxActionToast, inputs: ['toastSuccess', 'toastError'] },
28
+ * ],
46
29
  * ```
47
30
  *
48
- * ### With toast feedback
49
- * ```html
50
- * <cngx-action-button [action]="save" toastSuccess="Saved" toastError="Save failed">
51
- * Save
52
- * </cngx-action-button>
53
- * ```
54
- *
55
- * @category ui/action-button
56
- * @docsKind primary
57
31
  * @wcag AA
58
- * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/action-button/action-button.ts
59
- * @since 0.1.0
60
- * @relatedTo CngxAsyncClick, CngxPending, CngxSucceeded, CngxFailed, CngxToaster
61
- * @slot cngxPending Replaces the label while the action runs.
62
- * @slot cngxSucceeded Replaces the label after the action succeeds.
63
- * @slot cngxFailed Replaces the label when the action fails; gets the error.
64
- * <example-url>http://localhost:4200/#/ui/action-button/async-button/random-outcome</example-url>
65
- * <example-url>http://localhost:4200/#/ui/action-button/async-button/string-labels</example-url>
66
- * <example-url>http://localhost:4200/#/ui/action-button/async-button/template-slots</example-url>
32
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/action-button/action-toast.directive.ts
33
+ * @since 0.3.0
34
+ * @relatedTo CngxActionButton, CngxActionStatusBrain, CNGX_ANNOUNCEMENT_COVER, CngxToaster, CngxToastOn, withToasts, provideToasts, withErrorDetail, CNGX_ACTION_STATUS
35
+ * <example-url>/#/ui/action-button/async-button/toasts</example-url>
36
+ * @axis level molecule
67
37
  */
68
- declare class CngxActionButton {
38
+ declare class CngxActionToast implements CngxAnnouncementCover {
39
+ private readonly status;
69
40
  private readonly toaster;
70
41
  private readonly errorDetail;
71
42
  private readonly feedbackI18n;
72
43
  private readonly externalToastOn;
73
- protected readonly i18n: _angular_core.Signal<_cngx_common_interactive.CngxInteractiveI18n>;
74
- /** The async action to execute on click. */
75
- readonly action: _angular_core.InputSignal<AsyncAction>;
76
- /** Duration in ms to show success/error feedback. Passed through to `cngxAsyncClick`. */
77
- readonly feedbackDuration: _angular_core.InputSignal<number>;
78
- /** When `false`, clicks are ignored. Passed through to `cngxAsyncClick`. */
79
- readonly enabled: _angular_core.InputSignal<boolean>;
80
- /** Button type attribute. Defaults to `'button'` to prevent accidental form submits. */
81
- readonly type: _angular_core.InputSignal<"button" | "submit" | "reset">;
82
- /** Visual variant - sets CSS class `cngx-action-button--{variant}`. */
83
- readonly variant: _angular_core.InputSignal<ActionButtonVariant>;
84
- /**
85
- * SR announcement on success. Falls back to `succeededLabel`, then
86
- * `CNGX_INTERACTIVE_I18N.asyncClickSucceeded`.
87
- */
88
- readonly succeededAnnouncement: _angular_core.InputSignal<string | undefined>;
89
- /**
90
- * SR announcement on failure. Falls back to `failedLabel`, then
91
- * `CNGX_INTERACTIVE_I18N.asyncClickFailed`.
92
- */
93
- readonly failedAnnouncement: _angular_core.InputSignal<string | undefined>;
94
- /** Fallback text while pending (when no `cngxPending` template is projected). */
95
- readonly pendingLabel: _angular_core.InputSignal<string | undefined>;
96
- /** Fallback text after success (when no `cngxSucceeded` template is projected). */
97
- readonly succeededLabel: _angular_core.InputSignal<string | undefined>;
98
- /** Fallback text after failure (when no `cngxFailed` template is projected). */
99
- readonly failedLabel: _angular_core.InputSignal<string | undefined>;
100
44
  /**
101
- * Bind an external async state to derive visual status from.
102
- * When set, the button's status display follows `externalState.status()`.
103
- */
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>;
112
- /**
113
- * Toast message on success. Requires `CngxToaster` (via `provideFeedback(withToasts())`
114
- * or `provideToasts()`). Silently ignored when toaster is not provided.
115
- *
116
- * `toastSuccessDuration` should be >= `feedbackDuration` to avoid rapid re-fire
117
- * on repeated clicks that floods the SR announcement queue.
45
+ * Toast message on success. Repeats inside the toaster's dedup window
46
+ * (`withToasts({ dedupWindow })`, 1000 ms by default) merge into one toast with a count.
118
47
  */
119
48
  readonly toastSuccess: _angular_core.InputSignal<string | undefined>;
120
49
  /** Toast message on error. */
121
50
  readonly toastError: _angular_core.InputSignal<string | undefined>;
122
- /** Include the error detail message in the error toast body. */
123
- readonly toastErrorDetail: _angular_core.InputSignal<boolean>;
124
- /** Duration for success toasts in ms. */
125
- readonly toastSuccessDuration: _angular_core.InputSignal<number>;
126
- /** Duration for error toasts - `'persistent'` means manual dismiss only. */
127
- readonly toastErrorDuration: _angular_core.InputSignal<number | "persistent">;
128
- /** @internal - inner CngxAsyncClick directive instance. Non-required to allow safe pre-view-init reads. */
129
- private readonly asyncClick;
130
51
  /**
131
- * @internal - effective status: reflects external `[externalState]` if
132
- * bound (through the shared `CngxAsyncStatus` reflection - one home for
133
- * the state→display-bucket mapping), otherwise reads the inner
134
- * `CngxAsyncClick` directive.
52
+ * Appends the error detail to the error toast message. The detail comes from
53
+ * `provideFeedback(withErrorDetail(...))`. Without a mapping, development builds append the
54
+ * raw error message and warn once ([`CNGX3004`](/error-codes/cngx3004.md)); production builds
55
+ * append nothing.
135
56
  */
136
- protected readonly effectiveStatus: _angular_core.Signal<"idle" | "pending" | "success" | "error" | "loading" | "refreshing">;
137
- /** @internal - effective error value from external state or inner directive. */
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>;
57
+ readonly toastErrorDetail: _angular_core.InputSignal<boolean>;
141
58
  /**
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.
59
+ * Duration for success toasts in ms. Unbound, `CngxToaster` resolves it:
60
+ * `withToasts({ defaultDuration })`, else 5000 ms.
146
61
  */
147
- protected readonly clickEnabled: _angular_core.Signal<boolean>;
62
+ readonly toastSuccessDuration: _angular_core.InputSignal<number | undefined>;
148
63
  /**
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.
64
+ * Duration for error toasts in ms, or `'persistent'` for manual dismiss only. Unbound, the
65
+ * toaster keeps an error toast until it is dismissed.
152
66
  */
153
- protected readonly effectiveAnnouncement: _angular_core.Signal<string>;
154
- /** @internal - stable id for the disabled-reason region. */
155
- protected readonly reasonId: string;
67
+ readonly toastErrorDuration: _angular_core.InputSignal<number | "persistent" | undefined>;
68
+ constructor();
156
69
  /**
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.
70
+ * `true` when a shown toast already announces this outcome, unless the
71
+ * brain's `[announce]` is `'always'`.
161
72
  */
162
- protected readonly describedBy: _angular_core.Signal<string | null>;
163
- private readonly lastUpdatedState;
73
+ covers(status: 'success' | 'error'): boolean;
74
+ private toastCovers;
75
+ private showToast;
76
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxActionToast, never>;
77
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxActionToast, never, ["cngxActionToast"], { "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; }; }, {}, never, never, true, never>;
78
+ }
79
+
80
+ /**
81
+ * Async action button on the cngx button brain. Runs an action on click and reports the
82
+ * outcome in its label, in a live region and, with the toast inputs, in a toast.
83
+ *
84
+ * Use it over `cngxButton` with `[cngxAsyncClick]` when the label should change per outcome,
85
+ * when the button reflects an `[externalState]` it does not own, or when the outcome raises a
86
+ * toast. Variant, tone, size and `disabled` with a reason work as on `cngxButton`.
87
+ *
88
+ * The labels sit stacked in one cell, so the width never jumps. The result label shows once the
89
+ * busy visual releases; `aria-busy` and the click guard hold until then. Each outcome is spoken
90
+ * once in the live region, in the words the button shows.
91
+ *
92
+ * The English language pack ships no status labels. Without a bound label, a template or
93
+ * `withActionStatusLabels` the visible label never changes and only the live region reports
94
+ * the outcome. The slot directives come from `@cngx/common/interactive`.
95
+ *
96
+ * The button publishes `CNGX_BUTTON_STATE`, so it can be the main action of a `cngxSplitButton`.
97
+ *
98
+ * To eject, list `CngxButtonBrain`, `CngxAsyncClick`, `CngxActionStatusBrain` and
99
+ * `CngxActionToast` in `hostDirectives` with `provideButtonHost()` and
100
+ * `provideActionStatusHost()`.
101
+ *
102
+ * ```html
103
+ * <button cngxActionButton [action]="save">
104
+ * Save Draft
105
+ * <ng-template cngxPending>Saving...</ng-template>
106
+ * <ng-template cngxSucceeded>Saved!</ng-template>
107
+ * <ng-template cngxFailed let-err>{{ err }} - retry?</ng-template>
108
+ * </button>
109
+ * ```
110
+ *
111
+ * @wcag AA
112
+ * @github https://github.com/cngxjs/cngx/blob/main/projects/ui/action-button/action-button.ts
113
+ * @since 0.3.0
114
+ * @relatedTo CngxButton, CngxButtonBrain, CngxAsyncClick, CngxActionStatusBrain, CngxActionToast, CngxPending, CngxSucceeded, CngxFailed, CngxSplitButton, CngxToastOn, withActionStatusLabels, withActionStatusTemplates, CngxPopoverAction
115
+ * @slot cngxPending Replaces the label while the action runs, once the run outlasts the show delay.
116
+ * @slot cngxSucceeded Replaces the label after the action succeeds, once the busy visual releases.
117
+ * @slot cngxFailed Replaces the label when the action fails, once the busy visual releases; gets the error.
118
+ * <example-url>/#/ui/action-button/async-button/random-outcome</example-url>
119
+ * <example-url>/#/ui/action-button/async-button/string-labels</example-url>
120
+ * <example-url>/#/ui/action-button/async-button/template-slots</example-url>
121
+ * <example-url>/#/ui/action-button/async-button/external-state</example-url>
122
+ * <example-url>/#/ui/action-button/async-button/toasts</example-url>
123
+ * <example-url>/#/ui/action-button/async-button/disabled-with-reason</example-url>
124
+ * <example-url>/#/ui/action-button/async-button/busy-timing</example-url>
125
+ * <example-url>/#/ui/action-button/async-button/announcements-and-outputs</example-url>
126
+ * <example-url>/#/ui/action-button/async-button/app-wide-labels</example-url>
127
+ * @axis level organism
128
+ */
129
+ declare class CngxActionButton {
130
+ protected readonly brain: CngxButtonBrain;
131
+ protected readonly actionStatus: i2.CngxActionStatus;
132
+ protected readonly startSlot: Signal<CngxButtonStart | undefined>;
133
+ protected readonly endSlot: Signal<CngxButtonEnd | undefined>;
134
+ /** Effective status: `[externalState]` when bound, else the run. Immediate, not gated. */
135
+ readonly status: Signal<AsyncStatus>;
136
+ /** `true` while the busy visual shows (the run after the show delay, held for its min-dwell). */
137
+ readonly busyVisible: Signal<boolean>;
164
138
  /**
165
- * Full `CngxAsyncState` view of this button's effective lifecycle.
166
- *
167
- * Reflects the external state when `[externalState]` is bound,
168
- * otherwise the inner `CngxAsyncClick` directive's state.
169
- *
170
- * Bind to any state consumer: `<cngx-alert [state]="btn.state" />`.
139
+ * Effective lifecycle as `CngxAsyncState`, for `[state]="btn.state"`. `lastUpdated` is the
140
+ * last successful own run, or the bound state's value with no fallback to own runs.
171
141
  */
172
142
  readonly state: CngxAsyncState<unknown>;
173
- /** @internal */
174
- protected readonly pendingTpl: _angular_core.Signal<CngxPending | undefined>;
175
- /** @internal */
176
- protected readonly succeededTpl: _angular_core.Signal<CngxSucceeded | undefined>;
177
- /** @internal */
178
- protected readonly failedTpl: _angular_core.Signal<CngxFailed | undefined>;
179
- constructor();
180
143
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxActionButton, 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>;
144
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CngxActionButton, "button[cngxActionButton]", ["cngxActionButton"], {}, {}, ["startSlot", "endSlot"], ["[cngxButtonStart]", "*", "[cngxButtonEnd]"], true, [{ directive: typeof i1.CngxButtonBrain; inputs: { "variant": "cngxActionButton"; "tone": "tone"; "size": "size"; "disabled": "disabled"; "disabledReason": "disabledReason"; "cngxDescribedBy": "cngxDescribedBy"; "type": "type"; }; outputs: {}; }, { directive: typeof i2.CngxAsyncClick; inputs: { "cngxAsyncClick": "action"; "feedbackDuration": "feedbackDuration"; "showDelay": "showDelay"; "minDwell": "minDwell"; }; outputs: { "settled": "settled"; }; }, { directive: typeof i2.CngxActionStatusBrain; inputs: { "succeededAnnouncement": "succeededAnnouncement"; "failedAnnouncement": "failedAnnouncement"; "announce": "announce"; "pendingLabel": "pendingLabel"; "succeededLabel": "succeededLabel"; "failedLabel": "failedLabel"; "externalState": "externalState"; }; outputs: { "outcome": "outcome"; }; }, { directive: typeof CngxActionToast; inputs: { "toastSuccess": "toastSuccess"; "toastError": "toastError"; "toastErrorDetail": "toastErrorDetail"; "toastSuccessDuration": "toastSuccessDuration"; "toastErrorDuration": "toastErrorDuration"; }; outputs: {}; }]>;
182
145
  }
183
146
 
184
- export { CngxActionButton };
185
- export type { ActionButtonVariant };
147
+ export { CngxActionButton, CngxActionToast };