@cdevhub/ngx-tw 0.4.0 → 0.6.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 (209) hide show
  1. package/README.md +78 -15
  2. package/fesm2022/cdevhub-ngx-tw-accordion.mjs +16 -5
  3. package/fesm2022/cdevhub-ngx-tw-accordion.mjs.map +1 -1
  4. package/fesm2022/cdevhub-ngx-tw-avatar.mjs +26 -15
  5. package/fesm2022/cdevhub-ngx-tw-avatar.mjs.map +1 -1
  6. package/fesm2022/cdevhub-ngx-tw-badge.mjs +17 -5
  7. package/fesm2022/cdevhub-ngx-tw-badge.mjs.map +1 -1
  8. package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs +27 -6
  9. package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs.map +1 -1
  10. package/fesm2022/cdevhub-ngx-tw-button.mjs +23 -11
  11. package/fesm2022/cdevhub-ngx-tw-button.mjs.map +1 -1
  12. package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs +5 -5
  13. package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs.map +1 -1
  14. package/fesm2022/cdevhub-ngx-tw-calendar-testing.mjs +3 -3
  15. package/fesm2022/cdevhub-ngx-tw-calendar-testing.mjs.map +1 -1
  16. package/fesm2022/cdevhub-ngx-tw-calendar.mjs +427 -122
  17. package/fesm2022/cdevhub-ngx-tw-calendar.mjs.map +1 -1
  18. package/fesm2022/cdevhub-ngx-tw-card.mjs +21 -11
  19. package/fesm2022/cdevhub-ngx-tw-card.mjs.map +1 -1
  20. package/fesm2022/cdevhub-ngx-tw-carousel.mjs +215 -96
  21. package/fesm2022/cdevhub-ngx-tw-carousel.mjs.map +1 -1
  22. package/fesm2022/cdevhub-ngx-tw-checkbox.mjs +108 -64
  23. package/fesm2022/cdevhub-ngx-tw-checkbox.mjs.map +1 -1
  24. package/fesm2022/cdevhub-ngx-tw-code-block.mjs +18 -6
  25. package/fesm2022/cdevhub-ngx-tw-code-block.mjs.map +1 -1
  26. package/fesm2022/cdevhub-ngx-tw-collapsible.mjs +55 -30
  27. package/fesm2022/cdevhub-ngx-tw-collapsible.mjs.map +1 -1
  28. package/fesm2022/cdevhub-ngx-tw-combobox-testing.mjs +218 -0
  29. package/fesm2022/cdevhub-ngx-tw-combobox-testing.mjs.map +1 -0
  30. package/fesm2022/cdevhub-ngx-tw-combobox.mjs +236 -211
  31. package/fesm2022/cdevhub-ngx-tw-combobox.mjs.map +1 -1
  32. package/fesm2022/cdevhub-ngx-tw-command-palette-testing.mjs +200 -0
  33. package/fesm2022/cdevhub-ngx-tw-command-palette-testing.mjs.map +1 -0
  34. package/fesm2022/cdevhub-ngx-tw-command-palette.mjs +34 -7
  35. package/fesm2022/cdevhub-ngx-tw-command-palette.mjs.map +1 -1
  36. package/fesm2022/cdevhub-ngx-tw-core.mjs +135 -15
  37. package/fesm2022/cdevhub-ngx-tw-core.mjs.map +1 -1
  38. package/fesm2022/cdevhub-ngx-tw-date-picker-testing.mjs +203 -0
  39. package/fesm2022/cdevhub-ngx-tw-date-picker-testing.mjs.map +1 -0
  40. package/fesm2022/cdevhub-ngx-tw-date-picker.mjs +160 -102
  41. package/fesm2022/cdevhub-ngx-tw-date-picker.mjs.map +1 -1
  42. package/fesm2022/cdevhub-ngx-tw-date-range-picker-testing.mjs +209 -0
  43. package/fesm2022/cdevhub-ngx-tw-date-range-picker-testing.mjs.map +1 -0
  44. package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs +182 -107
  45. package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs.map +1 -1
  46. package/fesm2022/cdevhub-ngx-tw-dialog-dialog-renderer-DoIhoV3d.mjs +198 -0
  47. package/fesm2022/cdevhub-ngx-tw-dialog-dialog-renderer-DoIhoV3d.mjs.map +1 -0
  48. package/fesm2022/cdevhub-ngx-tw-dialog-testing.mjs +122 -0
  49. package/fesm2022/cdevhub-ngx-tw-dialog-testing.mjs.map +1 -0
  50. package/fesm2022/cdevhub-ngx-tw-dialog.mjs +199 -220
  51. package/fesm2022/cdevhub-ngx-tw-dialog.mjs.map +1 -1
  52. package/fesm2022/cdevhub-ngx-tw-empty-state.mjs +1 -1
  53. package/fesm2022/cdevhub-ngx-tw-empty-state.mjs.map +1 -1
  54. package/fesm2022/cdevhub-ngx-tw-file-upload-testing.mjs +149 -0
  55. package/fesm2022/cdevhub-ngx-tw-file-upload-testing.mjs.map +1 -0
  56. package/fesm2022/cdevhub-ngx-tw-file-upload.mjs +57 -67
  57. package/fesm2022/cdevhub-ngx-tw-file-upload.mjs.map +1 -1
  58. package/fesm2022/cdevhub-ngx-tw-flip-card.mjs +42 -24
  59. package/fesm2022/cdevhub-ngx-tw-flip-card.mjs.map +1 -1
  60. package/fesm2022/cdevhub-ngx-tw-form-field.mjs +114 -21
  61. package/fesm2022/cdevhub-ngx-tw-form-field.mjs.map +1 -1
  62. package/fesm2022/cdevhub-ngx-tw-icon.mjs +16 -6
  63. package/fesm2022/cdevhub-ngx-tw-icon.mjs.map +1 -1
  64. package/fesm2022/cdevhub-ngx-tw-input.mjs +52 -61
  65. package/fesm2022/cdevhub-ngx-tw-input.mjs.map +1 -1
  66. package/fesm2022/cdevhub-ngx-tw-item.mjs +18 -3
  67. package/fesm2022/cdevhub-ngx-tw-item.mjs.map +1 -1
  68. package/fesm2022/cdevhub-ngx-tw-menu-testing.mjs +168 -0
  69. package/fesm2022/cdevhub-ngx-tw-menu-testing.mjs.map +1 -0
  70. package/fesm2022/cdevhub-ngx-tw-menu.mjs +58 -21
  71. package/fesm2022/cdevhub-ngx-tw-menu.mjs.map +1 -1
  72. package/fesm2022/cdevhub-ngx-tw-number-input.mjs +34 -1
  73. package/fesm2022/cdevhub-ngx-tw-number-input.mjs.map +1 -1
  74. package/fesm2022/cdevhub-ngx-tw-paginator.mjs +95 -45
  75. package/fesm2022/cdevhub-ngx-tw-paginator.mjs.map +1 -1
  76. package/fesm2022/cdevhub-ngx-tw-popover.mjs +81 -32
  77. package/fesm2022/cdevhub-ngx-tw-popover.mjs.map +1 -1
  78. package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs +1 -1
  79. package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs.map +1 -1
  80. package/fesm2022/cdevhub-ngx-tw-radio.mjs +131 -98
  81. package/fesm2022/cdevhub-ngx-tw-radio.mjs.map +1 -1
  82. package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs +207 -42
  83. package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs.map +1 -1
  84. package/fesm2022/cdevhub-ngx-tw-select-testing.mjs +165 -0
  85. package/fesm2022/cdevhub-ngx-tw-select-testing.mjs.map +1 -0
  86. package/fesm2022/cdevhub-ngx-tw-select.mjs +386 -210
  87. package/fesm2022/cdevhub-ngx-tw-select.mjs.map +1 -1
  88. package/fesm2022/cdevhub-ngx-tw-sheet-sheet-renderer-CqVJwgmp.mjs +256 -0
  89. package/fesm2022/cdevhub-ngx-tw-sheet-sheet-renderer-CqVJwgmp.mjs.map +1 -0
  90. package/fesm2022/cdevhub-ngx-tw-sheet-testing.mjs +129 -0
  91. package/fesm2022/cdevhub-ngx-tw-sheet-testing.mjs.map +1 -0
  92. package/fesm2022/cdevhub-ngx-tw-sheet.mjs +197 -278
  93. package/fesm2022/cdevhub-ngx-tw-sheet.mjs.map +1 -1
  94. package/fesm2022/cdevhub-ngx-tw-slider.mjs +89 -54
  95. package/fesm2022/cdevhub-ngx-tw-slider.mjs.map +1 -1
  96. package/fesm2022/cdevhub-ngx-tw-sort.mjs +122 -17
  97. package/fesm2022/cdevhub-ngx-tw-sort.mjs.map +1 -1
  98. package/fesm2022/cdevhub-ngx-tw-split.mjs +72 -19
  99. package/fesm2022/cdevhub-ngx-tw-split.mjs.map +1 -1
  100. package/fesm2022/cdevhub-ngx-tw-stat.mjs +63 -25
  101. package/fesm2022/cdevhub-ngx-tw-stat.mjs.map +1 -1
  102. package/fesm2022/cdevhub-ngx-tw-stepper.mjs +35 -8
  103. package/fesm2022/cdevhub-ngx-tw-stepper.mjs.map +1 -1
  104. package/fesm2022/cdevhub-ngx-tw-switch.mjs +54 -48
  105. package/fesm2022/cdevhub-ngx-tw-switch.mjs.map +1 -1
  106. package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs +12 -15
  107. package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs.map +1 -1
  108. package/fesm2022/cdevhub-ngx-tw-table.mjs +74 -13
  109. package/fesm2022/cdevhub-ngx-tw-table.mjs.map +1 -1
  110. package/fesm2022/cdevhub-ngx-tw-tabs.mjs +84 -30
  111. package/fesm2022/cdevhub-ngx-tw-tabs.mjs.map +1 -1
  112. package/fesm2022/cdevhub-ngx-tw-tags-input-testing.mjs +172 -0
  113. package/fesm2022/cdevhub-ngx-tw-tags-input-testing.mjs.map +1 -0
  114. package/fesm2022/cdevhub-ngx-tw-tags-input.mjs +107 -71
  115. package/fesm2022/cdevhub-ngx-tw-tags-input.mjs.map +1 -1
  116. package/fesm2022/cdevhub-ngx-tw-textarea.mjs +41 -9
  117. package/fesm2022/cdevhub-ngx-tw-textarea.mjs.map +1 -1
  118. package/fesm2022/cdevhub-ngx-tw-theme.mjs +257 -45
  119. package/fesm2022/cdevhub-ngx-tw-theme.mjs.map +1 -1
  120. package/fesm2022/cdevhub-ngx-tw-time-picker-testing.mjs +201 -0
  121. package/fesm2022/cdevhub-ngx-tw-time-picker-testing.mjs.map +1 -0
  122. package/fesm2022/cdevhub-ngx-tw-time-picker.mjs +184 -77
  123. package/fesm2022/cdevhub-ngx-tw-time-picker.mjs.map +1 -1
  124. package/fesm2022/cdevhub-ngx-tw-timeline.mjs +110 -27
  125. package/fesm2022/cdevhub-ngx-tw-timeline.mjs.map +1 -1
  126. package/fesm2022/cdevhub-ngx-tw-toast-toast-renderer-BlDxemsU.mjs +616 -0
  127. package/fesm2022/cdevhub-ngx-tw-toast-toast-renderer-BlDxemsU.mjs.map +1 -0
  128. package/fesm2022/cdevhub-ngx-tw-toast.mjs +556 -945
  129. package/fesm2022/cdevhub-ngx-tw-toast.mjs.map +1 -1
  130. package/fesm2022/cdevhub-ngx-tw-tooltip.mjs +102 -15
  131. package/fesm2022/cdevhub-ngx-tw-tooltip.mjs.map +1 -1
  132. package/fesm2022/cdevhub-ngx-tw-transfer-testing.mjs +219 -0
  133. package/fesm2022/cdevhub-ngx-tw-transfer-testing.mjs.map +1 -0
  134. package/fesm2022/cdevhub-ngx-tw-transfer.mjs +88 -69
  135. package/fesm2022/cdevhub-ngx-tw-transfer.mjs.map +1 -1
  136. package/fesm2022/cdevhub-ngx-tw-tree.mjs +68 -19
  137. package/fesm2022/cdevhub-ngx-tw-tree.mjs.map +1 -1
  138. package/index.json +1 -1
  139. package/package.json +63 -2
  140. package/theme/_base.css +13 -0
  141. package/theme/_dark.css +110 -36
  142. package/theme/_high-contrast-dark.css +367 -0
  143. package/theme/_high-contrast.css +13 -2
  144. package/theme/_light.css +276 -0
  145. package/theme/_semantic.css +47 -12
  146. package/theme/_typography.css +17 -0
  147. package/theme/index.css +86 -7
  148. package/types/cdevhub-ngx-tw-accordion.d.ts +12 -4
  149. package/types/cdevhub-ngx-tw-avatar.d.ts +10 -3
  150. package/types/cdevhub-ngx-tw-button.d.ts +1 -0
  151. package/types/cdevhub-ngx-tw-calendar-luxon.d.ts +2 -2
  152. package/types/cdevhub-ngx-tw-calendar-testing.d.ts +1 -1
  153. package/types/cdevhub-ngx-tw-calendar.d.ts +179 -73
  154. package/types/cdevhub-ngx-tw-card.d.ts +11 -3
  155. package/types/cdevhub-ngx-tw-carousel.d.ts +89 -20
  156. package/types/cdevhub-ngx-tw-checkbox.d.ts +40 -12
  157. package/types/cdevhub-ngx-tw-code-block.d.ts +11 -2
  158. package/types/cdevhub-ngx-tw-collapsible.d.ts +32 -5
  159. package/types/cdevhub-ngx-tw-combobox-testing.d.ts +157 -0
  160. package/types/cdevhub-ngx-tw-combobox.d.ts +94 -53
  161. package/types/cdevhub-ngx-tw-command-palette-testing.d.ts +136 -0
  162. package/types/cdevhub-ngx-tw-command-palette.d.ts +33 -5
  163. package/types/cdevhub-ngx-tw-core.d.ts +152 -21
  164. package/types/cdevhub-ngx-tw-date-picker-testing.d.ts +141 -0
  165. package/types/cdevhub-ngx-tw-date-picker.d.ts +37 -29
  166. package/types/cdevhub-ngx-tw-date-range-picker-testing.d.ts +148 -0
  167. package/types/cdevhub-ngx-tw-date-range-picker.d.ts +36 -29
  168. package/types/cdevhub-ngx-tw-dialog-testing.d.ts +98 -0
  169. package/types/cdevhub-ngx-tw-dialog.d.ts +89 -19
  170. package/types/cdevhub-ngx-tw-file-upload-testing.d.ts +120 -0
  171. package/types/cdevhub-ngx-tw-file-upload.d.ts +8 -10
  172. package/types/cdevhub-ngx-tw-flip-card.d.ts +18 -11
  173. package/types/cdevhub-ngx-tw-form-field.d.ts +19 -2
  174. package/types/cdevhub-ngx-tw-icon.d.ts +3 -3
  175. package/types/cdevhub-ngx-tw-input.d.ts +5 -8
  176. package/types/cdevhub-ngx-tw-item.d.ts +2 -0
  177. package/types/cdevhub-ngx-tw-menu-testing.d.ts +131 -0
  178. package/types/cdevhub-ngx-tw-menu.d.ts +2 -2
  179. package/types/cdevhub-ngx-tw-number-input.d.ts +20 -0
  180. package/types/cdevhub-ngx-tw-paginator.d.ts +58 -24
  181. package/types/cdevhub-ngx-tw-popover.d.ts +41 -10
  182. package/types/cdevhub-ngx-tw-progress-bar.d.ts +1 -1
  183. package/types/cdevhub-ngx-tw-radio.d.ts +68 -25
  184. package/types/cdevhub-ngx-tw-segmented-control.d.ts +79 -16
  185. package/types/cdevhub-ngx-tw-select-testing.d.ts +114 -0
  186. package/types/cdevhub-ngx-tw-select.d.ts +104 -33
  187. package/types/cdevhub-ngx-tw-sheet-testing.d.ts +104 -0
  188. package/types/cdevhub-ngx-tw-sheet.d.ts +96 -21
  189. package/types/cdevhub-ngx-tw-slider.d.ts +79 -25
  190. package/types/cdevhub-ngx-tw-sort.d.ts +45 -4
  191. package/types/cdevhub-ngx-tw-split.d.ts +32 -2
  192. package/types/cdevhub-ngx-tw-stat.d.ts +14 -4
  193. package/types/cdevhub-ngx-tw-stepper.d.ts +16 -2
  194. package/types/cdevhub-ngx-tw-switch.d.ts +35 -13
  195. package/types/cdevhub-ngx-tw-tab-nav.d.ts +7 -6
  196. package/types/cdevhub-ngx-tw-table.d.ts +53 -10
  197. package/types/cdevhub-ngx-tw-tabs.d.ts +41 -10
  198. package/types/cdevhub-ngx-tw-tags-input-testing.d.ts +135 -0
  199. package/types/cdevhub-ngx-tw-tags-input.d.ts +26 -11
  200. package/types/cdevhub-ngx-tw-textarea.d.ts +3 -2
  201. package/types/cdevhub-ngx-tw-theme.d.ts +245 -39
  202. package/types/cdevhub-ngx-tw-time-picker-testing.d.ts +129 -0
  203. package/types/cdevhub-ngx-tw-time-picker.d.ts +76 -19
  204. package/types/cdevhub-ngx-tw-timeline.d.ts +36 -12
  205. package/types/cdevhub-ngx-tw-toast.d.ts +61 -12
  206. package/types/cdevhub-ngx-tw-tooltip.d.ts +28 -6
  207. package/types/cdevhub-ngx-tw-transfer-testing.d.ts +152 -0
  208. package/types/cdevhub-ngx-tw-transfer.d.ts +21 -8
  209. package/types/cdevhub-ngx-tw-tree.d.ts +6 -1
@@ -83,8 +83,24 @@ declare class SheetConfig<D = unknown, R = unknown> extends DialogConfig<D, R> {
83
83
  restoreFocus?: SheetRestoreFocus;
84
84
  }
85
85
  /** Injection token carrying the `data` value passed via {@link SheetConfig.data}. */
86
- declare const SHEET_DATA: InjectionToken<unknown>;
86
+ declare const TW_SHEET_DATA: InjectionToken<unknown>;
87
87
  /** Injection token for application-wide default sheet options. Set via `provideSheet()`. */
88
+ declare const TW_SHEET_DEFAULT_OPTIONS: InjectionToken<Partial<SheetConfig<unknown, unknown>>>;
89
+ /**
90
+ * @deprecated Renamed to {@link TW_SHEET_DATA} for consistency with every other
91
+ * ngx-tw injection token — and with `TW_DIALOG_DATA`, its direct counterpart.
92
+ * This is the *same token instance*, not a copy — providing under either name
93
+ * and injecting under the other resolves — so the rename is safe to adopt
94
+ * incrementally. Removed in the next major.
95
+ */
96
+ declare const SHEET_DATA: InjectionToken<unknown>;
97
+ /**
98
+ * @deprecated Renamed to {@link TW_SHEET_DEFAULT_OPTIONS} for consistency with
99
+ * every other ngx-tw injection token — and with `TW_DIALOG_DEFAULT_OPTIONS`,
100
+ * its direct counterpart. This is the *same token instance*, not a copy —
101
+ * providing under either name and injecting under the other resolves — so the
102
+ * rename is safe to adopt incrementally. Removed in the next major.
103
+ */
88
104
  declare const SHEET_DEFAULT_OPTIONS: InjectionToken<Partial<SheetConfig<unknown, unknown>>>;
89
105
 
90
106
  /** Lifecycle states a sheet passes through. */
@@ -132,17 +148,19 @@ declare class SheetContainer extends CdkDialogContainer<SheetConfig> {
132
148
  /**
133
149
  * Reference to a sheet opened via {@link Sheet.open}. Drives the sheet
134
150
  * lifecycle (close, state, observables) and forwards useful overlay streams.
151
+ *
152
+ * The ref is returned **synchronously** from `open()`, but the sheet's render
153
+ * layer (`@angular/cdk/dialog` + the Tailwind container) is loaded through a
154
+ * dynamic `import()`. The ref therefore starts *detached*: `id`, `state`,
155
+ * `close()`, the lifecycle observables, and panel mutations all work
156
+ * immediately (mutations are buffered and replayed on attach), but the rendered
157
+ * component instance does not exist yet — read it via {@link whenComponentReady}
158
+ * instead of a synchronous `componentInstance` field.
135
159
  */
136
160
  declare class SheetRef<R = unknown, C = unknown> {
137
- private readonly cdkRef;
138
161
  readonly config: SheetConfig<unknown, R>;
139
- readonly containerInstance: SheetContainer;
140
- /** Unique ID of the sheet. */
162
+ /** Unique ID of the sheet. Generated eagerly by the service, so it is valid the instant `open()` returns. */
141
163
  readonly id: string;
142
- /** Instance of the component rendered inside the sheet, or `null` for template sheets. */
143
- componentInstance: C | null;
144
- /** `ComponentRef` of the content component, or `null` for template sheets. */
145
- readonly componentRef: ComponentRef<C> | null;
146
164
  /** Current lifecycle state. Reactively readable. */
147
165
  readonly state: Signal<SheetState>;
148
166
  /** When `true`, close-via-escape AND close-via-backdrop are both disabled. */
@@ -155,9 +173,50 @@ declare class SheetRef<R = unknown, C = unknown> {
155
173
  private readonly afterOpenedSubject;
156
174
  private readonly beforeClosedSubject;
157
175
  private readonly afterClosedSubject;
176
+ private readonly backdropClickSubject;
177
+ private readonly keydownEventsSubject;
178
+ private cdkRef;
179
+ private container;
180
+ private componentInstanceValue;
181
+ private componentRefValue;
182
+ private resolveComponentReady;
183
+ private readonly componentReadyPromise;
184
+ private readonly pendingPanelAdds;
185
+ private readonly pendingPanelRemoves;
158
186
  private pendingResult;
159
187
  private closeFocusOrigin;
160
- constructor(cdkRef: DialogRef<R, C>, config: SheetConfig<unknown, R>, containerInstance: SheetContainer);
188
+ constructor(id: string, config: SheetConfig<unknown, R>);
189
+ /** The Tailwind container instance, or `null` until the sheet has attached. */
190
+ get containerInstance(): SheetContainer | null;
191
+ /**
192
+ * @internal Wire this facade to its CDK backend. Called from the sheet
193
+ * renderer **inside** `cdkDialog.open()`'s `providers` callback — the same
194
+ * point the constructor ran before deferral — so subscriptions to
195
+ * `animationStateChanged` are in place before the container emits `'open'`.
196
+ */
197
+ _attach(cdkRef: DialogRef<R, C>, container: SheetContainer): void;
198
+ /** @internal Record the rendered component after `cdkDialog.open()` returns. */
199
+ _setComponent(instance: C | null, ref: ComponentRef<C> | null): void;
200
+ /**
201
+ * Resolves with the rendered content-component instance once the sheet's
202
+ * render chunk has loaded and attached. Resolves `null` for template sheets,
203
+ * and for a sheet closed before it ever opened.
204
+ *
205
+ * Replaces the former synchronous `componentInstance` field, which cannot be
206
+ * populated before the deferred render chunk lands.
207
+ *
208
+ * @example
209
+ * ```ts
210
+ * const ref = sheet.open(FilterSheet);
211
+ * const filters = await ref.whenComponentReady();
212
+ * filters?.reset();
213
+ * ```
214
+ */
215
+ whenComponentReady(): Promise<C | null>;
216
+ /** The rendered component instance, or `null` if not yet attached / a template sheet. Prefer {@link whenComponentReady}. */
217
+ get componentInstance(): C | null;
218
+ /** The rendered `ComponentRef`, or `null` if not yet attached / a template sheet. */
219
+ get componentRef(): ComponentRef<C> | null;
161
220
  /**
162
221
  * Closes the sheet. The exit slide animation runs before the overlay is disposed.
163
222
  * @param result Value forwarded to `afterClosed()` subscribers.
@@ -169,13 +228,13 @@ declare class SheetRef<R = unknown, C = unknown> {
169
228
  beforeClosed(): Observable<R | undefined>;
170
229
  /** Observable that emits once after the sheet has fully closed and the overlay is disposed. */
171
230
  afterClosed(): Observable<R | undefined>;
172
- /** Backdrop click stream (emits even when `closeOnBackdropClick` / `disableClose` is set). */
231
+ /** Backdrop click stream (emits even when `closeOnBackdropClick` / `disableClose` is set). Buffered — a subscription made before the sheet attaches receives events once it does. */
173
232
  backdropClick(): Observable<MouseEvent>;
174
- /** Keydown event stream for the overlay. */
233
+ /** Keydown event stream for the overlay. Buffered — a subscription made before the sheet attaches receives events once it does. */
175
234
  keydownEvents(): Observable<KeyboardEvent>;
176
- /** Adds CSS classes to the overlay panel. */
235
+ /** Adds CSS classes to the overlay panel. Buffered until attach. */
177
236
  addPanelClass(classes: string | string[]): this;
178
- /** Removes CSS classes from the overlay panel. */
237
+ /** Removes CSS classes from the overlay panel. Buffered until attach. */
179
238
  removePanelClass(classes: string | string[]): this;
180
239
  private closeWithOrigin;
181
240
  private finishClose;
@@ -187,13 +246,21 @@ declare class SheetRef<R = unknown, C = unknown> {
187
246
  * pinned to the requested viewport edge, a Tailwind container with axis-aware
188
247
  * sizing, slide enter/exit animations, and split close-behavior flags.
189
248
  *
249
+ * The rendering layer (`@angular/cdk/dialog` + the Tailwind container) is loaded
250
+ * through a dynamic `import()` on the first `open()` call, so merely registering
251
+ * this service costs nothing in the initial bundle. `open()` still returns its
252
+ * {@link SheetRef} synchronously — the sheet is rendered once the chunk lands.
253
+ * Read the rendered component via {@link SheetRef.whenComponentReady}.
254
+ *
190
255
  * Not `providedIn: 'root'` — register it via {@link provideSheet}.
191
256
  */
192
257
  declare class Sheet implements OnDestroy {
193
- private readonly cdkDialog;
194
258
  private readonly injector;
195
259
  private readonly defaultOptions;
196
260
  private readonly parentSheet;
261
+ /** Cached renderer chunk import — kicked off on the first `open()`. */
262
+ private rendererPromise;
263
+ private destroyed;
197
264
  private readonly openSheetsAtThisLevel;
198
265
  private readonly afterOpenedSubject;
199
266
  private readonly afterAllClosedSubject;
@@ -210,7 +277,7 @@ declare class Sheet implements OnDestroy {
210
277
  * Opens a sheet using the given component or template.
211
278
  * @param content Component class or `TemplateRef`.
212
279
  * @param config Options merged over the application defaults.
213
- * @returns Reference controlling the opened sheet.
280
+ * @returns Reference controlling the opened sheet, returned synchronously.
214
281
  */
215
282
  open<R = unknown, D = unknown, C = unknown>(content: ComponentType<C> | TemplateRef<C>, config?: SheetConfig<D, R>): SheetRef<R, C>;
216
283
  /** Closes every open sheet managed by this service (and child services). */
@@ -218,12 +285,22 @@ declare class Sheet implements OnDestroy {
218
285
  /** Looks up an open sheet by its id. */
219
286
  getSheetById<R = unknown, C = unknown>(id: string): SheetRef<R, C> | undefined;
220
287
  ngOnDestroy(): void;
288
+ /**
289
+ * @internal Resolves once the renderer chunk has loaded. Exposed for tests,
290
+ * which must await the dynamic import before asserting on rendered DOM.
291
+ */
292
+ _whenRendered(): Promise<void>;
293
+ /**
294
+ * Render a sheet once the renderer chunk has loaded. The ref was already
295
+ * returned to the caller, so it may have been closed (or the service
296
+ * destroyed) while the import was in flight — both skip the actual open.
297
+ */
298
+ private renderWhenReady;
299
+ private loadRenderer;
221
300
  private registerOpen;
222
301
  private unregister;
223
302
  private getAfterAllClosedSource;
224
303
  private resolveConfig;
225
- private resolveScrollStrategy;
226
- private resolvePositionStrategy;
227
304
  static ɵfac: i0.ɵɵFactoryDeclaration<Sheet, never>;
228
305
  static ɵprov: i0.ɵɵInjectableDeclaration<Sheet>;
229
306
  }
@@ -265,7 +342,6 @@ declare class SheetIconDirective {
265
342
  declare class SheetTitleDirective implements OnInit, OnDestroy {
266
343
  private readonly generatedId;
267
344
  private readonly sheetRef;
268
- private readonly container;
269
345
  /** Custom id for the title element. Defaults to a generated unique id. */
270
346
  readonly id: i0.InputSignal<string>;
271
347
  ngOnInit(): void;
@@ -286,7 +362,6 @@ declare class SheetSubtitleDirective {
286
362
  declare class SheetDescriptionDirective implements OnInit, OnDestroy {
287
363
  private readonly generatedId;
288
364
  private readonly sheetRef;
289
- private readonly container;
290
365
  /** Custom id for the description element. Defaults to a generated unique id. */
291
366
  readonly id: i0.InputSignal<string>;
292
367
  ngOnInit(): void;
@@ -321,7 +396,7 @@ declare class SheetActionsDirective {
321
396
  * `[twSheetClose]` value to pass a result to `afterClosed()` subscribers.
322
397
  */
323
398
  declare class SheetCloseDirective {
324
- /** Value passed to `afterClosed()` when the button is clicked. */
399
+ /** Value passed to `afterClosed()` when the button is clicked. Defaults to `undefined`. */
325
400
  readonly twSheetClose: i0.InputSignal<unknown>;
326
401
  /** Native button `type`. Defaults to `'button'` to avoid accidental form submission. */
327
402
  readonly type: i0.InputSignal<"button" | "submit" | "reset">;
@@ -331,5 +406,5 @@ declare class SheetCloseDirective {
331
406
  static ɵdir: i0.ɵɵDirectiveDeclaration<SheetCloseDirective, "[twSheetClose]", never, { "twSheetClose": { "alias": "twSheetClose"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
332
407
  }
333
408
 
334
- export { SHEET_DATA, SHEET_DEFAULT_OPTIONS, Sheet, SheetActionsDirective, SheetCloseDirective, SheetConfig, SheetContainer, SheetContentDirective, SheetDescriptionDirective, SheetHeaderDirective, SheetIconDirective, SheetRef, SheetSubtitleDirective, SheetTitleDirective, provideSheet };
409
+ export { SHEET_DATA, SHEET_DEFAULT_OPTIONS, Sheet, SheetActionsDirective, SheetCloseDirective, SheetConfig, SheetContainer, SheetContentDirective, SheetDescriptionDirective, SheetHeaderDirective, SheetIconDirective, SheetRef, SheetSubtitleDirective, SheetTitleDirective, TW_SHEET_DATA, TW_SHEET_DEFAULT_OPTIONS, provideSheet };
335
410
  export type { SheetActionsAlign, SheetAnimationEvent, SheetAutoFocus, SheetRestoreFocus, SheetRole, SheetScrollStrategy, SheetSide, SheetSize, SheetState };
@@ -16,8 +16,14 @@ interface SliderMark {
16
16
  }
17
17
  /** Format function for the value displayed in the value bubble, min/max labels, and `aria-valuetext`. */
18
18
  type SliderValueFormatter = (value: number) => string;
19
- /** Identifies which thumb is the interaction target in range mode. */
20
- type ThumbId = 'single' | 'start' | 'end';
19
+ /**
20
+ * Identifies which thumb is the interaction target. `'single'` in single-value
21
+ * mode; `'start'` (lower) and `'end'` (upper) in range mode. Named in the
22
+ * public signatures of {@link SliderComponent.onThumbPointerDown} and
23
+ * {@link SliderComponent.onThumbKeyDown}, so it is exported for consumers that
24
+ * script those handlers directly.
25
+ */
26
+ type SliderThumbId = 'single' | 'start' | 'end';
21
27
  /**
22
28
  * Select a single value or a numeric range from a scale.
23
29
  *
@@ -29,10 +35,26 @@ type ThumbId = 'single' | 'start' | 'end';
29
35
  * ```
30
36
  */
31
37
  declare class SliderComponent implements ControlValueAccessor, OnInit {
32
- /** Lower bound of the slider scale. Defaults to `0`. */
33
- readonly min: _angular_core.InputSignal<number>;
34
- /** Upper bound of the slider scale. Defaults to `100`. */
35
- readonly max: _angular_core.InputSignal<number>;
38
+ /**
39
+ * Lower bound of the slider scale. Defaults to `0`.
40
+ *
41
+ * Accepts `undefined` so `[formField]` type-checks under `strictTemplates`:
42
+ * signal forms writes the `min` control binding from the field's own
43
+ * `min()` state, which is `number | undefined`. `undefined` resolves back to
44
+ * the documented default through {@link min}.
45
+ */
46
+ readonly minInput: _angular_core.InputSignal<number | undefined>;
47
+ /**
48
+ * Upper bound of the slider scale. Defaults to `100`.
49
+ *
50
+ * Accepts `undefined` for the same reason as {@link minInput}; `undefined`
51
+ * resolves back to the documented default through {@link max}.
52
+ */
53
+ readonly maxInput: _angular_core.InputSignal<number | undefined>;
54
+ /** @internal Resolved lower bound — the `min` input with its documented `0` default restored when the binding resolves to `undefined`. Every internal reader goes through this, never through the raw input. */
55
+ readonly min: Signal<number>;
56
+ /** @internal Resolved upper bound — the `max` input with its documented `100` default restored when the binding resolves to `undefined`. */
57
+ readonly max: Signal<number>;
36
58
  /** Step increment used for snapping, keyboard nav, and auto-generated marks. Pass `null` for continuous values. Defaults to `1`. */
37
59
  readonly step: _angular_core.InputSignal<number | null>;
38
60
  /** Semantic color for the filled portion and thumb border. Defaults to `'primary'`. */
@@ -43,8 +65,19 @@ declare class SliderComponent implements ControlValueAccessor, OnInit {
43
65
  readonly variant: _angular_core.InputSignal<SliderVariant>;
44
66
  /** When true, prevents interaction and applies muted styling. Defaults to `false`. */
45
67
  readonly disabled: _angular_core.InputSignal<boolean>;
46
- /** When true, sets `aria-required="true"` on the thumb for assistive tech. Defaults to `false`. */
47
- readonly required: _angular_core.InputSignal<boolean>;
68
+ /** When true, sets `aria-required="true"` on the thumb for assistive tech. Also inferred from `Validators.required` on a bound control, so a reactive/template-driven form does not have to state it twice. Defaults to `false`. */
69
+ readonly requiredInput: _angular_core.InputSignal<boolean>;
70
+ /**
71
+ * @internal Shared `errorState` / `required` / `errors` derivation — see
72
+ * `wireErrorState`. Declared here, above `required`, because class field
73
+ * initializers run in declaration order.
74
+ */
75
+ private readonly errorWiring;
76
+ /**
77
+ * @internal Resolved required state: the `required` input OR'd with
78
+ * `Validators.required` on a bound `NgControl`.
79
+ */
80
+ readonly required: Signal<boolean>;
48
81
  /** When true, the slider selects a `[start, end]` range and renders two thumbs. Defaults to `false`. */
49
82
  readonly range: _angular_core.InputSignal<boolean>;
50
83
  /** Tick marks: `true` auto-generates one mark per step, an array supplies custom marks, `false` renders no marks. Defaults to `false`. */
@@ -63,21 +96,47 @@ declare class SliderComponent implements ControlValueAccessor, OnInit {
63
96
  readonly valueFormatter: _angular_core.InputSignal<SliderValueFormatter | undefined>;
64
97
  /** Optional form name attribute. Purely informational — the component does not render a native input. */
65
98
  readonly name: _angular_core.InputSignal<string | undefined>;
66
- /** Accessible name for the single-value thumb when no visible label is provided. */
99
+ /** Accessible name for the single-value thumb when no visible label is provided. Defaults to `undefined`. Alias: `aria-label`. */
67
100
  readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
68
- /** ID of an external element labelling the single-value thumb. */
101
+ /** ID of an external element labelling the single-value thumb. Defaults to `undefined`. Alias: `aria-labelledby`. */
69
102
  readonly ariaLabelledby: _angular_core.InputSignal<string | undefined>;
70
- /** ID of an external element describing the slider. */
103
+ /** ID of an external element describing the slider. Defaults to `undefined`. Alias: `aria-describedby`. */
71
104
  readonly ariaDescribedby: _angular_core.InputSignal<string | undefined>;
72
105
  /** Accessible name for the start (lower) thumb in range mode. Defaults to `"Minimum"`. */
73
106
  readonly ariaLabelStart: _angular_core.InputSignal<string>;
74
107
  /** Accessible name for the end (upper) thumb in range mode. Defaults to `"Maximum"`. */
75
108
  readonly ariaLabelEnd: _angular_core.InputSignal<string>;
76
- /** Two-way bound slider value. A `number` for single mode, or `[start, end]` for range mode. Updates on every interaction. */
109
+ /**
110
+ * Two-way bound slider value. A `number` for single mode, or `[start, end]`
111
+ * for range mode. Updates on every interaction. Defaults to `0`.
112
+ *
113
+ * The two-way binding mints a `valueChange` output, which fires on every
114
+ * value mutation the user causes — each drag move and each key step, plus the
115
+ * commit. Note the slider differs from `tw-checkbox` / `tw-switch` /
116
+ * `tw-radio-group`, where the minted output is the *any-change* channel:
117
+ * here, a programmatic write from a bound form (`FormControl.setValue`,
118
+ * `ngModel`) reaches the rendered value through the CVA path without passing
119
+ * through this model, so it does **not** emit `valueChange`. To observe
120
+ * programmatic writes, use the form control's own `valueChanges`.
121
+ *
122
+ * For the two user-gesture channels, prefer `(input)` for live feedback and
123
+ * `(change)` for commit — see their docs below.
124
+ */
77
125
  readonly value: _angular_core.ModelSignal<SliderValue>;
78
- /** Fires continuously while the user drags or holds a key. Payload matches the current `value`. Template event name is `input` — the TS-side identifier is `valueInput` to avoid shadowing the imported `input` factory. */
126
+ /**
127
+ * Fires continuously while the user drags or holds a key — the *live* channel,
128
+ * for previewing a value that is not yet committed. Payload matches the
129
+ * current `value`. Template event name is `input` — the TS-side identifier is
130
+ * `valueInput` to avoid shadowing the imported `input` factory. Never fires
131
+ * for a programmatic write.
132
+ */
79
133
  readonly valueInput: _angular_core.OutputEmitterRef<SliderValue>;
80
- /** Fires when the user commits a change (pointer release, key release, or blur after keyboard change). Payload matches the current `value`. */
134
+ /**
135
+ * Fires when the user commits a change (pointer release, key release, or blur
136
+ * after keyboard change) — the *commit* channel, for saving or querying on a
137
+ * settled value. Payload matches the current `value`. Never fires for a
138
+ * programmatic write; use `(input)` if you need every intermediate value.
139
+ */
81
140
  readonly change: _angular_core.OutputEmitterRef<SliderValue>;
82
141
  /** Per-instance override of the {@link ErrorStateMatcher}. When omitted, the component uses the `TW_ERROR_STATE_MATCHER` token's value. */
83
142
  readonly errorStateMatcher: _angular_core.InputSignal<ErrorStateMatcher | undefined>;
@@ -86,11 +145,6 @@ declare class SliderComponent implements ControlValueAccessor, OnInit {
86
145
  private readonly destroyRef;
87
146
  private readonly directionality;
88
147
  private readonly ngControl;
89
- private readonly parentForm;
90
- private readonly parentFormGroup;
91
- private readonly defaultMatcher;
92
- private readonly _ngControlRev;
93
- private readonly _formSubmitRev;
94
148
  /** Whether the form control is in an error state per the configured `ErrorStateMatcher`. */
95
149
  readonly errorState: Signal<boolean>;
96
150
  private readonly region;
@@ -117,7 +171,7 @@ declare class SliderComponent implements ControlValueAccessor, OnInit {
117
171
  private readonly internalEnd;
118
172
  private readonly internalSingle;
119
173
  /** @internal Which thumb currently has an active pointer gesture (or null). Bound in the template to drive the pressed-thumb styling. */
120
- readonly activeThumb: _angular_core.WritableSignal<ThumbId | null>;
174
+ readonly activeThumb: _angular_core.WritableSignal<SliderThumbId | null>;
121
175
  /** @internal Which thumb is focused (for bubble visibility). */
122
176
  private readonly focusedThumb;
123
177
  /** @internal Set of pointer IDs currently captured per-thumb for release tracking. */
@@ -205,7 +259,7 @@ declare class SliderComponent implements ControlValueAccessor, OnInit {
205
259
  */
206
260
  private readonly bubbleClassMap;
207
261
  /** @internal Bubble visibility depends on drag / focus / hover state. */
208
- bubbleClassFor(thumb: ThumbId): string;
262
+ bubbleClassFor(thumb: SliderThumbId): string;
209
263
  /** @internal */
210
264
  readonly resolvedAriaDescribedby: Signal<string | null>;
211
265
  /** @internal */
@@ -223,12 +277,12 @@ declare class SliderComponent implements ControlValueAccessor, OnInit {
223
277
  /** Track click: move the nearest thumb to the clicked position and begin a drag. */
224
278
  onTrackPointerDown(event: PointerEvent): void;
225
279
  /** Thumb press: capture pointer and begin a drag gesture. */
226
- onThumbPointerDown(event: PointerEvent, thumb: ThumbId): void;
280
+ onThumbPointerDown(event: PointerEvent, thumb: SliderThumbId): void;
227
281
  private beginDrag;
228
282
  private readonly onPointerMove;
229
283
  private readonly onPointerUp;
230
284
  /** Keyboard navigation: arrows for step, PageUp/Down for 10% jumps, Home/End for extremes. */
231
- onThumbKeyDown(event: KeyboardEvent, thumb: ThumbId): void;
285
+ onThumbKeyDown(event: KeyboardEvent, thumb: SliderThumbId): void;
232
286
  /** @internal */
233
287
  onThumbBlur(): void;
234
288
  /** @internal Clamp to min/max and snap to step. Returns a finite number. */
@@ -251,8 +305,8 @@ declare class SliderComponent implements ControlValueAccessor, OnInit {
251
305
  setDisabledState(isDisabled: boolean): void;
252
306
  ngOnInit(): void;
253
307
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SliderComponent, never>;
254
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SliderComponent, "tw-slider", never, { "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "range": { "alias": "range"; "required": false; "isSignal": true; }; "marks": { "alias": "marks"; "required": false; "isSignal": true; }; "showMarkLabels": { "alias": "showMarkLabels"; "required": false; "isSignal": true; }; "showMinMax": { "alias": "showMinMax"; "required": false; "isSignal": true; }; "showValue": { "alias": "showValue"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "valueFormatter": { "alias": "valueFormatter"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; "ariaLabelStart": { "alias": "ariaLabelStart"; "required": false; "isSignal": true; }; "ariaLabelEnd": { "alias": "ariaLabelEnd"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "valueInput": "input"; "change": "change"; }, never, never, true, never>;
308
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SliderComponent, "tw-slider", never, { "minInput": { "alias": "min"; "required": false; "isSignal": true; }; "maxInput": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "requiredInput": { "alias": "required"; "required": false; "isSignal": true; }; "range": { "alias": "range"; "required": false; "isSignal": true; }; "marks": { "alias": "marks"; "required": false; "isSignal": true; }; "showMarkLabels": { "alias": "showMarkLabels"; "required": false; "isSignal": true; }; "showMinMax": { "alias": "showMinMax"; "required": false; "isSignal": true; }; "showValue": { "alias": "showValue"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "valueFormatter": { "alias": "valueFormatter"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; "ariaLabelStart": { "alias": "ariaLabelStart"; "required": false; "isSignal": true; }; "ariaLabelEnd": { "alias": "ariaLabelEnd"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "valueInput": "input"; "change": "change"; }, never, never, true, never>;
255
309
  }
256
310
 
257
311
  export { SliderComponent };
258
- export type { SliderMark, SliderValue, SliderValueFormatter, SliderVariant };
312
+ export type { SliderMark, SliderThumbId, SliderValue, SliderValueFormatter, SliderVariant };
@@ -49,13 +49,13 @@ declare class SortDirective {
49
49
  readonly active: _angular_core.ModelSignal<string | null>;
50
50
  /** Current sort direction. `null` represents the cleared state. Two-way bindable via `[(twSortDirection)]`. Defaults to `null`. */
51
51
  readonly direction: _angular_core.ModelSignal<SortDirection>;
52
- /** Starting direction used when a header becomes active for the first time. Per-header `start` overrides this. Defaults to `'asc'`. */
52
+ /** Starting direction used when a header becomes active for the first time. Per-header `start` overrides this. Defaults to `'asc'`. Alias: `twSortStart`. */
53
53
  readonly start: _angular_core.InputSignal<"asc" | "desc">;
54
- /** When true, the direction cycle skips the cleared (`null`) state — headers toggle between `'asc'` and `'desc'` only. Per-header `disableClear` overrides this. Defaults to `false`. */
54
+ /** When true, the direction cycle skips the cleared (`null`) state — headers toggle between `'asc'` and `'desc'` only. Per-header `disableClear` overrides this. Defaults to `false`. Alias: `twSortDisableClear`. */
55
55
  readonly disableClear: _angular_core.InputSignal<boolean>;
56
- /** When true, all child sort headers are disabled. Defaults to `false`. */
56
+ /** When true, all child sort headers are disabled. Defaults to `false`. Alias: `twSortDisabled`. */
57
57
  readonly disabled: _angular_core.InputSignal<boolean>;
58
- /** Fires whenever the user changes `active` or `direction` by interacting with a header. Programmatic writes to `[(twSortActive)]` / `[(twSortDirection)]` do NOT emit. */
58
+ /** Fires whenever the user changes `active` or `direction` by interacting with a header. Programmatic writes to `[(twSortActive)]` / `[(twSortDirection)]` do NOT emit. Alias: `twSortChange`. */
59
59
  readonly sortChange: _angular_core.OutputEmitterRef<TwSortEvent>;
60
60
  private readonly sortableIds;
61
61
  /** Registers a header id so duplicates can be detected. Called by `SortHeaderComponent` on init. Throws in dev mode if another header with the same id is already registered. */
@@ -76,6 +76,24 @@ type TwSortArrowPosition = 'before' | 'after';
76
76
  * Turns any element (e.g., `<th>`, `<div>`, `<button>`) into a sortable header under a parent
77
77
  * `SortDirective`. Renders the projected label plus an arrow that reflects the current direction.
78
78
  * Triggers a sort cycle on click or Enter/Space.
79
+ *
80
+ * @remarks
81
+ * **Where the control and `aria-sort` live depends on the host element.** Both are decided once,
82
+ * at construction, from the host's tag name and its *static* `role` attribute:
83
+ *
84
+ * | Host | `aria-sort` | Interactive element |
85
+ * |---|---|---|
86
+ * | `<th>` / `[role="columnheader"\|"rowheader"]` | on the host | inner container (`role="button"`) |
87
+ * | `<span>` / `<div>` (no role) | **not emitted** | inner container (`role="button"`) |
88
+ * | `<button>` / `<a href>` / `[role="button"\|"link"]` | **not emitted** | the host itself |
89
+ *
90
+ * `aria-sort` is only valid on a `columnheader` / `rowheader`, so emitting it on a `<span>` or
91
+ * `<button>` is an axe `aria-allowed-attr` failure and is silently ignored by assistive tech. When
92
+ * the header is composed *inside* a header cell — `<th><span tw-sort-header>…</span></th>`, the
93
+ * shape `tw-table` generates — the `<th>` owns `aria-sort` (see `tw-column`'s `sortState` input,
94
+ * which auto-resolves against the same `[twSort]` directive). Outside a table there is no
95
+ * `columnheader` to carry the state; the header remains a labelled button and the sort direction
96
+ * is conveyed by the arrow plus the consumer's own live region.
79
97
  */
80
98
  declare class SortHeaderComponent implements OnInit, AfterViewInit, OnDestroy {
81
99
  /** Unique id for this header. Required — identifies the field/column this header sorts. */
@@ -97,6 +115,15 @@ declare class SortHeaderComponent implements OnInit, AfterViewInit, OnDestroy {
97
115
  private readonly parent;
98
116
  private readonly focusMonitor;
99
117
  private readonly ariaDescriber;
118
+ private readonly hostEl;
119
+ /**
120
+ * Whether the host element can legally carry `aria-sort`. Resolved once, at construction — the
121
+ * host's tag name and static attributes are already applied by then, and a later `[attr.role]`
122
+ * binding would make this timing-dependent.
123
+ */
124
+ private readonly hostIsHeaderCell;
125
+ /** Whether the host is already a control, in which case the inner container must stay inert. */
126
+ private readonly hostIsControl;
100
127
  private readonly containerRef;
101
128
  private _describedBy;
102
129
  constructor();
@@ -108,8 +135,22 @@ declare class SortHeaderComponent implements OnInit, AfterViewInit, OnDestroy {
108
135
  readonly effectiveDirection: _angular_core.Signal<SortDirection>;
109
136
  /** `aria-sort` value: `'ascending' | 'descending' | 'none'`. */
110
137
  readonly ariaSort: _angular_core.Signal<"none" | "ascending" | "descending">;
138
+ /**
139
+ * @internal Value actually written to the host's `aria-sort` attribute. `null` — i.e. no
140
+ * attribute — unless the host is a `columnheader` / `rowheader`; see the class remarks.
141
+ */
142
+ readonly hostAriaSort: _angular_core.Signal<"none" | "ascending" | "descending" | null>;
143
+ /** @internal `role` for the inner container: `'button'` unless the host is already the control. */
144
+ readonly controlRole: _angular_core.Signal<"button" | null>;
145
+ /** @internal `tabindex` for the inner container. Mirrors `controlRole()`. */
146
+ readonly controlTabIndex: _angular_core.Signal<0 | null>;
111
147
  /** Whether the arrow element should render. Active headers always render; inactive render when not disabled so hover reveals the affordance. */
112
148
  readonly renderArrow: _angular_core.Signal<boolean>;
149
+ /**
150
+ * The element that carries focus and the accessible description — the host when the consumer
151
+ * mounted the header on a control, the inner container otherwise.
152
+ */
153
+ private controlElement;
113
154
  private readonly variantResult;
114
155
  /** @internal */
115
156
  readonly hostClasses: _angular_core.Signal<string>;
@@ -118,7 +118,7 @@ declare class SplitComponent {
118
118
  readonly direction: _angular_core.InputSignal<SplitDirection>;
119
119
  /** How sizes are expressed and reported. A single unit governs the whole container. Defaults to `'percent'`. */
120
120
  readonly unit: _angular_core.InputSignal<SplitUnit>;
121
- /** Thickness of each gutter in pixels, perpendicular to the split axis. Defaults to `6`. */
121
+ /** Painted thickness of each gutter in pixels, perpendicular to the split axis, and the space it takes from the panes. The pointer target is padded out to a 24px minimum independently of this value (WCAG 2.2 SC 2.5.8), so a thin gutter stays thin without becoming hard to grab. Defaults to `6`. */
122
122
  readonly gutterSize: _angular_core.InputSignal<number>;
123
123
  /** When true, all resize interactions are disabled. Gutters are not focusable and do not respond to input. Defaults to `false`. */
124
124
  readonly disabled: _angular_core.InputSignal<boolean>;
@@ -168,7 +168,12 @@ declare class SplitComponent {
168
168
  * Pixel mode: values are absolute pixel sizes.
169
169
  */
170
170
  readonly _sizes: _angular_core.WritableSignal<number[]>;
171
- /** Tracks the live `dir` attribute resolved through CDK Directionality. */
171
+ /**
172
+ * Live `dir` resolved through CDK `Directionality`. Read straight from
173
+ * `valueSignal` (CDK 22+) so `_isRtl` re-evaluates on a runtime `dir` flip
174
+ * with no manual subscription mirror. Falls back to 'ltr' when the consumer's
175
+ * injector cannot supply the token (`{ optional: true }`).
176
+ */
172
177
  private readonly _cdkDir;
173
178
  /** Resolves the effective RTL state: explicit `rtl` input overrides CDK `dir`. */
174
179
  readonly _isRtl: _angular_core.Signal<boolean>;
@@ -179,6 +184,31 @@ declare class SplitComponent {
179
184
  private readonly _classes;
180
185
  readonly _rootClass: _angular_core.Signal<string>;
181
186
  readonly _gutterClass: _angular_core.Signal<string>;
187
+ /**
188
+ * @internal
189
+ * Transparent padding added to each side of the gutter so its pointer target
190
+ * reaches the WCAG 2.2 SC 2.5.8 24x24 floor while the painted line stays
191
+ * `gutterSize` thick (the default gutter is 6px — a quarter of the floor).
192
+ *
193
+ * The padding is cancelled by an equal negative margin on the same side, so
194
+ * the gutter's *layout* footprint is still exactly `gutterSize` and the
195
+ * `availableSpace()` math is untouched; only its border box — which is what
196
+ * receives the pointer and what a target-size audit measures — grows. The
197
+ * overhang reaches `_gutterHitPad` px into each neighbouring pane and takes
198
+ * pointer events there (including over a pane's own scrollbar, if it has
199
+ * one); that is the accepted cost of the technique and mirrors how VS Code
200
+ * and every other thin-sash implementation reaches the floor.
201
+ *
202
+ * Zero once `gutterSize` is 24 or more — a gutter that already clears the
203
+ * floor needs no padding and no overhang.
204
+ */
205
+ readonly _gutterHitPad: _angular_core.Signal<number>;
206
+ /** @internal Horizontal half of `_gutterHitPad` — non-zero only for a horizontal split, where the gutter is thin across the X axis. Physical (not logical) properties: the padding is symmetric, so RTL needs no separate handling. */
207
+ readonly _gutterHitPadX: _angular_core.Signal<number>;
208
+ /** @internal Vertical half of `_gutterHitPad` — non-zero only for a vertical split. */
209
+ readonly _gutterHitPadY: _angular_core.Signal<number>;
210
+ /** @internal Gutter border-box thickness: `gutterSize` plus the SC 2.5.8 hit padding on both sides, i.e. `max(gutterSize, 24)`. The negative margins give back the padding, so the *layout* footprint stays `gutterSize`. */
211
+ readonly _gutterBoxPx: _angular_core.Signal<number>;
182
212
  /** Indices `0..panes.length - 2` representing the gutter between pane[i] and pane[i+1]. */
183
213
  readonly _gutterIndices: _angular_core.Signal<number[]>;
184
214
  /** @internal — drag state for the active pointer. */
@@ -3,7 +3,14 @@ import { ElementRef } from '@angular/core';
3
3
  import { TwSize } from '@cdevhub/ngx-tw/core';
4
4
 
5
5
  /** Surface treatment for the stat tile. */
6
- type StatVariant = 'plain' | 'outlined' | 'elevated' | 'filled';
6
+ type StatVariant = 'ghost' | 'outline' | 'elevated' | 'solid' | StatVariantLegacy;
7
+ /**
8
+ * Legacy `variant` spellings, kept so existing templates keep compiling.
9
+ * @deprecated `'plain'` aliases `'ghost'`, `'outlined'` aliases `'outline'`
10
+ * and `'filled'` aliases `'solid'`. Each renders identically to its
11
+ * replacement and will be removed in the next major.
12
+ */
13
+ type StatVariantLegacy = 'plain' | 'outlined' | 'filled';
7
14
  /** Direction of trend conveyed by the delta indicator. */
8
15
  type StatDeltaDirection = 'up' | 'down' | 'neutral';
9
16
  /** Display style of the trend delta. */
@@ -51,12 +58,13 @@ declare class StatDeltaComponent {
51
58
  readonly variant: _angular_core.InputSignal<StatDeltaVariant>;
52
59
  /** Optional comparison label rendered next to the delta value (e.g. `"vs last week"`, `"since launch"`). Defaults to `undefined`. */
53
60
  readonly comparisonLabel: _angular_core.InputSignal<string | undefined>;
54
- /** Explicit accessible label. When omitted, the component composes one from `direction` + projected text + `comparisonLabel`. Override when projected content is purely symbolic or already localized. Defaults to `undefined`. */
61
+ /** Explicit accessible label, mirrored to `aria-label`. When omitted, the component composes one from `direction` + projected text + `comparisonLabel`. Override when projected content is purely symbolic or already localized. Defaults to `undefined`. */
55
62
  readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
56
63
  /** @internal */
57
64
  protected readonly textEl: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
58
65
  /** @internal */
59
66
  protected readonly projectedText: _angular_core.WritableSignal<string>;
67
+ private readonly destroyRef;
60
68
  constructor();
61
69
  /** @internal */
62
70
  protected readonly effectiveColor: _angular_core.Signal<"neutral" | "success" | "error">;
@@ -70,7 +78,7 @@ declare class StatDeltaComponent {
70
78
  protected readonly textClasses: _angular_core.Signal<string>;
71
79
  protected readonly comparisonClasses: _angular_core.Signal<string>;
72
80
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<StatDeltaComponent, never>;
73
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<StatDeltaComponent, "tw-stat-delta", never, { "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "inverted": { "alias": "inverted"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "comparisonLabel": { "alias": "comparisonLabel"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
81
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<StatDeltaComponent, "tw-stat-delta", never, { "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "inverted": { "alias": "inverted"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "comparisonLabel": { "alias": "comparisonLabel"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
74
82
  }
75
83
  /**
76
84
  * KPI tile — a compact display tile surfacing a single key performance
@@ -91,7 +99,7 @@ declare class StatDeltaComponent {
91
99
  * consumers can compose their own skeleton charts.
92
100
  */
93
101
  declare class StatComponent {
94
- /** Surface treatment. `'plain'` removes border and background; `'outlined'` (default) adds a border on the surface token; `'elevated'` adds shadow and uses the raised surface; `'filled'` uses the muted surface with no border. */
102
+ /** Surface treatment. `'ghost'` removes border and background; `'outline'` (default) adds a border on the surface token; `'elevated'` adds shadow and uses the raised surface; `'solid'` uses the muted surface with no border. `'plain'`, `'outlined'` and `'filled'` are deprecated aliases for `'ghost'`, `'outline'` and `'solid'` and render identically. */
95
103
  readonly variant: _angular_core.InputSignal<StatVariant>;
96
104
  /** Density scale — drives padding, internal gaps, value/label typography, and the skeleton placeholder dimensions. Defaults to `'md'`. */
97
105
  readonly size: _angular_core.InputSignal<TwSize>;
@@ -120,6 +128,8 @@ declare class StatComponent {
120
128
  protected readonly loadingValueWidth: _angular_core.Signal<"4rem" | "5rem" | "6rem" | "8rem" | "10rem">;
121
129
  /** Skeleton height during loading state — matches the value font size. */
122
130
  protected readonly loadingValueHeight: _angular_core.Signal<"0.75rem" | "0.875rem" | "1rem">;
131
+ /** @internal Canonical variant with legacy spellings folded in. */
132
+ private readonly resolvedVariant;
123
133
  private readonly variantResult;
124
134
  protected readonly rootClasses: _angular_core.Signal<string>;
125
135
  protected readonly iconFlexClasses: _angular_core.Signal<string>;
@@ -50,9 +50,9 @@ declare class StepperComponent extends CdkStepper implements AfterViewInit {
50
50
  readonly color: _angular_core.InputSignal<TwColor>;
51
51
  /** Controls indicator size and label typography. Defaults to `'md'`. */
52
52
  readonly size: _angular_core.InputSignal<TwSize>;
53
- /** When true, steps with `hasError` render error styling, icon, and `aria-invalid`. Defaults to `true`. */
53
+ /** When true, steps with `hasError` render error styling, icon, and `aria-invalid`. Defaults to `true` — error states must be visible by default, since silently swallowing a stepped flow's failure state is a UX regression; the special case is opting out per step. */
54
54
  readonly showError: _angular_core.InputSignal<boolean>;
55
- /** When true, clicking a navigable step header selects it. Set to `false` to only allow advancement via `twStepperNext` / `twStepperPrevious`. Defaults to `true`. */
55
+ /** When true, clicking a navigable step header selects it. Set to `false` to only allow advancement via `twStepperNext` / `twStepperPrevious`. Defaults to `true` — free navigation is the standard stepper UX; the special case is a restricted flow such as a wizard that must complete in order. */
56
56
  readonly headerInteractive: _angular_core.InputSignal<boolean>;
57
57
  private readonly _liveAnnouncer;
58
58
  private readonly _destroyRef;
@@ -73,6 +73,19 @@ declare class StepperComponent extends CdkStepper implements AfterViewInit {
73
73
  readonly selectedIndexValue: _angular_core.Signal<number>;
74
74
  set orientation(value: StepperOrientation);
75
75
  get orientation(): StepperOrientation;
76
+ /** @internal Whether the header strip is exposed as a WAI-ARIA tablist. True for horizontal orientation only. */
77
+ readonly usesTabPattern: _angular_core.Signal<boolean>;
78
+ /** @internal Whether a step renders its panel inline beneath its own header (vertical orientation, selected step, step has content). */
79
+ hasInlinePanel(step: StepComponent, index: number): boolean;
80
+ /**
81
+ * @internal Id the step header's `aria-controls` points at, or `null`.
82
+ *
83
+ * Vertical headers only claim control of a panel that is actually in the
84
+ * DOM: an `aria-expanded="true"` button pointing at a missing id is an
85
+ * invalid reference, whereas the collapsed steps simply carry no
86
+ * `aria-controls` at all.
87
+ */
88
+ controlledPanelId(step: StepComponent, index: number): string | null;
76
89
  private readonly _variantResult;
77
90
  readonly rootClasses: _angular_core.Signal<string>;
78
91
  readonly headerClasses: _angular_core.Signal<string>;
@@ -134,6 +147,7 @@ declare class StepperComponent extends CdkStepper implements AfterViewInit {
134
147
  private syncFocusIndex;
135
148
  /** @internal Relays tablist keydown to CdkStepper, then republishes the tab stop. */
136
149
  onTablistKeydown(event: KeyboardEvent): void;
150
+ /** @internal Selects a step from a header click. Ignored when `headerInteractive` is false or the step is not navigable. */
137
151
  onHeaderClick(step: StepComponent, index: number): void;
138
152
  /** @internal Whether the stepper should render the error state for a step. */
139
153
  shouldRenderError(step: StepComponent): boolean;