@cdevhub/ngx-tw 0.2.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 (171) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +134 -0
  3. package/fesm2022/cdevhub-ngx-tw-accordion.mjs +108 -0
  4. package/fesm2022/cdevhub-ngx-tw-accordion.mjs.map +1 -0
  5. package/fesm2022/cdevhub-ngx-tw-alert.mjs +240 -0
  6. package/fesm2022/cdevhub-ngx-tw-alert.mjs.map +1 -0
  7. package/fesm2022/cdevhub-ngx-tw-avatar.mjs +287 -0
  8. package/fesm2022/cdevhub-ngx-tw-avatar.mjs.map +1 -0
  9. package/fesm2022/cdevhub-ngx-tw-badge.mjs +332 -0
  10. package/fesm2022/cdevhub-ngx-tw-badge.mjs.map +1 -0
  11. package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs +452 -0
  12. package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs.map +1 -0
  13. package/fesm2022/cdevhub-ngx-tw-button.mjs +227 -0
  14. package/fesm2022/cdevhub-ngx-tw-button.mjs.map +1 -0
  15. package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs +417 -0
  16. package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs.map +1 -0
  17. package/fesm2022/cdevhub-ngx-tw-calendar-testing.mjs +232 -0
  18. package/fesm2022/cdevhub-ngx-tw-calendar-testing.mjs.map +1 -0
  19. package/fesm2022/cdevhub-ngx-tw-calendar.mjs +4482 -0
  20. package/fesm2022/cdevhub-ngx-tw-calendar.mjs.map +1 -0
  21. package/fesm2022/cdevhub-ngx-tw-card.mjs +157 -0
  22. package/fesm2022/cdevhub-ngx-tw-card.mjs.map +1 -0
  23. package/fesm2022/cdevhub-ngx-tw-carousel.mjs +1454 -0
  24. package/fesm2022/cdevhub-ngx-tw-carousel.mjs.map +1 -0
  25. package/fesm2022/cdevhub-ngx-tw-checkbox.mjs +593 -0
  26. package/fesm2022/cdevhub-ngx-tw-checkbox.mjs.map +1 -0
  27. package/fesm2022/cdevhub-ngx-tw-code-block.mjs +228 -0
  28. package/fesm2022/cdevhub-ngx-tw-code-block.mjs.map +1 -0
  29. package/fesm2022/cdevhub-ngx-tw-collapsible.mjs +510 -0
  30. package/fesm2022/cdevhub-ngx-tw-collapsible.mjs.map +1 -0
  31. package/fesm2022/cdevhub-ngx-tw-combobox.mjs +1721 -0
  32. package/fesm2022/cdevhub-ngx-tw-combobox.mjs.map +1 -0
  33. package/fesm2022/cdevhub-ngx-tw-command-palette.mjs +721 -0
  34. package/fesm2022/cdevhub-ngx-tw-command-palette.mjs.map +1 -0
  35. package/fesm2022/cdevhub-ngx-tw-core.mjs +861 -0
  36. package/fesm2022/cdevhub-ngx-tw-core.mjs.map +1 -0
  37. package/fesm2022/cdevhub-ngx-tw-date-picker.mjs +1558 -0
  38. package/fesm2022/cdevhub-ngx-tw-date-picker.mjs.map +1 -0
  39. package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs +1833 -0
  40. package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs.map +1 -0
  41. package/fesm2022/cdevhub-ngx-tw-dialog.mjs +693 -0
  42. package/fesm2022/cdevhub-ngx-tw-dialog.mjs.map +1 -0
  43. package/fesm2022/cdevhub-ngx-tw-empty-state.mjs +331 -0
  44. package/fesm2022/cdevhub-ngx-tw-empty-state.mjs.map +1 -0
  45. package/fesm2022/cdevhub-ngx-tw-flip-card.mjs +289 -0
  46. package/fesm2022/cdevhub-ngx-tw-flip-card.mjs.map +1 -0
  47. package/fesm2022/cdevhub-ngx-tw-form-field.mjs +572 -0
  48. package/fesm2022/cdevhub-ngx-tw-form-field.mjs.map +1 -0
  49. package/fesm2022/cdevhub-ngx-tw-icon-lucide.mjs +36 -0
  50. package/fesm2022/cdevhub-ngx-tw-icon-lucide.mjs.map +1 -0
  51. package/fesm2022/cdevhub-ngx-tw-icon.mjs +278 -0
  52. package/fesm2022/cdevhub-ngx-tw-icon.mjs.map +1 -0
  53. package/fesm2022/cdevhub-ngx-tw-input.mjs +355 -0
  54. package/fesm2022/cdevhub-ngx-tw-input.mjs.map +1 -0
  55. package/fesm2022/cdevhub-ngx-tw-item.mjs +241 -0
  56. package/fesm2022/cdevhub-ngx-tw-item.mjs.map +1 -0
  57. package/fesm2022/cdevhub-ngx-tw-menu.mjs +433 -0
  58. package/fesm2022/cdevhub-ngx-tw-menu.mjs.map +1 -0
  59. package/fesm2022/cdevhub-ngx-tw-paginator.mjs +691 -0
  60. package/fesm2022/cdevhub-ngx-tw-paginator.mjs.map +1 -0
  61. package/fesm2022/cdevhub-ngx-tw-popover.mjs +678 -0
  62. package/fesm2022/cdevhub-ngx-tw-popover.mjs.map +1 -0
  63. package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs +335 -0
  64. package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs.map +1 -0
  65. package/fesm2022/cdevhub-ngx-tw-radio.mjs +708 -0
  66. package/fesm2022/cdevhub-ngx-tw-radio.mjs.map +1 -0
  67. package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs +319 -0
  68. package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs.map +1 -0
  69. package/fesm2022/cdevhub-ngx-tw-select.mjs +1722 -0
  70. package/fesm2022/cdevhub-ngx-tw-select.mjs.map +1 -0
  71. package/fesm2022/cdevhub-ngx-tw-separator.mjs +115 -0
  72. package/fesm2022/cdevhub-ngx-tw-separator.mjs.map +1 -0
  73. package/fesm2022/cdevhub-ngx-tw-sheet.mjs +768 -0
  74. package/fesm2022/cdevhub-ngx-tw-sheet.mjs.map +1 -0
  75. package/fesm2022/cdevhub-ngx-tw-skeleton.mjs +149 -0
  76. package/fesm2022/cdevhub-ngx-tw-skeleton.mjs.map +1 -0
  77. package/fesm2022/cdevhub-ngx-tw-slider.mjs +1147 -0
  78. package/fesm2022/cdevhub-ngx-tw-slider.mjs.map +1 -0
  79. package/fesm2022/cdevhub-ngx-tw-sort.mjs +346 -0
  80. package/fesm2022/cdevhub-ngx-tw-sort.mjs.map +1 -0
  81. package/fesm2022/cdevhub-ngx-tw-spinner.mjs +186 -0
  82. package/fesm2022/cdevhub-ngx-tw-spinner.mjs.map +1 -0
  83. package/fesm2022/cdevhub-ngx-tw-split.mjs +1082 -0
  84. package/fesm2022/cdevhub-ngx-tw-split.mjs.map +1 -0
  85. package/fesm2022/cdevhub-ngx-tw-stat.mjs +579 -0
  86. package/fesm2022/cdevhub-ngx-tw-stat.mjs.map +1 -0
  87. package/fesm2022/cdevhub-ngx-tw-stepper.mjs +443 -0
  88. package/fesm2022/cdevhub-ngx-tw-stepper.mjs.map +1 -0
  89. package/fesm2022/cdevhub-ngx-tw-switch.mjs +391 -0
  90. package/fesm2022/cdevhub-ngx-tw-switch.mjs.map +1 -0
  91. package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs +315 -0
  92. package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs.map +1 -0
  93. package/fesm2022/cdevhub-ngx-tw-table.mjs +994 -0
  94. package/fesm2022/cdevhub-ngx-tw-table.mjs.map +1 -0
  95. package/fesm2022/cdevhub-ngx-tw-tabs.mjs +508 -0
  96. package/fesm2022/cdevhub-ngx-tw-tabs.mjs.map +1 -0
  97. package/fesm2022/cdevhub-ngx-tw-textarea.mjs +147 -0
  98. package/fesm2022/cdevhub-ngx-tw-textarea.mjs.map +1 -0
  99. package/fesm2022/cdevhub-ngx-tw-theme.mjs +178 -0
  100. package/fesm2022/cdevhub-ngx-tw-theme.mjs.map +1 -0
  101. package/fesm2022/cdevhub-ngx-tw-time-picker.mjs +1344 -0
  102. package/fesm2022/cdevhub-ngx-tw-time-picker.mjs.map +1 -0
  103. package/fesm2022/cdevhub-ngx-tw-timeline.mjs +1136 -0
  104. package/fesm2022/cdevhub-ngx-tw-timeline.mjs.map +1 -0
  105. package/fesm2022/cdevhub-ngx-tw-toast.mjs +1311 -0
  106. package/fesm2022/cdevhub-ngx-tw-toast.mjs.map +1 -0
  107. package/fesm2022/cdevhub-ngx-tw-tooltip.mjs +533 -0
  108. package/fesm2022/cdevhub-ngx-tw-tooltip.mjs.map +1 -0
  109. package/fesm2022/cdevhub-ngx-tw.mjs +61 -0
  110. package/fesm2022/cdevhub-ngx-tw.mjs.map +1 -0
  111. package/package.json +265 -0
  112. package/theme/_base.css +394 -0
  113. package/theme/_dark.css +510 -0
  114. package/theme/_high-contrast.css +290 -0
  115. package/theme/_semantic.css +317 -0
  116. package/theme/_typography.css +9 -0
  117. package/theme/index.css +54 -0
  118. package/types/cdevhub-ngx-tw-accordion.d.ts +48 -0
  119. package/types/cdevhub-ngx-tw-alert.d.ts +67 -0
  120. package/types/cdevhub-ngx-tw-avatar.d.ts +79 -0
  121. package/types/cdevhub-ngx-tw-badge.d.ts +94 -0
  122. package/types/cdevhub-ngx-tw-breadcrumbs.d.ts +227 -0
  123. package/types/cdevhub-ngx-tw-button.d.ts +74 -0
  124. package/types/cdevhub-ngx-tw-calendar-luxon.d.ts +200 -0
  125. package/types/cdevhub-ngx-tw-calendar-testing.d.ts +113 -0
  126. package/types/cdevhub-ngx-tw-calendar.d.ts +1704 -0
  127. package/types/cdevhub-ngx-tw-card.d.ts +48 -0
  128. package/types/cdevhub-ngx-tw-carousel.d.ts +406 -0
  129. package/types/cdevhub-ngx-tw-checkbox.d.ts +136 -0
  130. package/types/cdevhub-ngx-tw-code-block.d.ts +93 -0
  131. package/types/cdevhub-ngx-tw-collapsible.d.ts +151 -0
  132. package/types/cdevhub-ngx-tw-combobox.d.ts +389 -0
  133. package/types/cdevhub-ngx-tw-command-palette.d.ts +215 -0
  134. package/types/cdevhub-ngx-tw-core.d.ts +719 -0
  135. package/types/cdevhub-ngx-tw-date-picker.d.ts +317 -0
  136. package/types/cdevhub-ngx-tw-date-range-picker.d.ts +313 -0
  137. package/types/cdevhub-ngx-tw-dialog.d.ts +303 -0
  138. package/types/cdevhub-ngx-tw-empty-state.d.ts +104 -0
  139. package/types/cdevhub-ngx-tw-flip-card.d.ts +95 -0
  140. package/types/cdevhub-ngx-tw-form-field.d.ts +210 -0
  141. package/types/cdevhub-ngx-tw-icon-lucide.d.ts +29 -0
  142. package/types/cdevhub-ngx-tw-icon.d.ts +134 -0
  143. package/types/cdevhub-ngx-tw-input.d.ts +110 -0
  144. package/types/cdevhub-ngx-tw-item.d.ts +70 -0
  145. package/types/cdevhub-ngx-tw-menu.d.ts +99 -0
  146. package/types/cdevhub-ngx-tw-paginator.d.ts +305 -0
  147. package/types/cdevhub-ngx-tw-popover.d.ts +157 -0
  148. package/types/cdevhub-ngx-tw-progress-bar.d.ts +100 -0
  149. package/types/cdevhub-ngx-tw-radio.d.ts +174 -0
  150. package/types/cdevhub-ngx-tw-segmented-control.d.ts +66 -0
  151. package/types/cdevhub-ngx-tw-select.d.ts +384 -0
  152. package/types/cdevhub-ngx-tw-separator.d.ts +28 -0
  153. package/types/cdevhub-ngx-tw-sheet.d.ts +335 -0
  154. package/types/cdevhub-ngx-tw-skeleton.d.ts +52 -0
  155. package/types/cdevhub-ngx-tw-slider.d.ts +258 -0
  156. package/types/cdevhub-ngx-tw-sort.d.ts +136 -0
  157. package/types/cdevhub-ngx-tw-spinner.d.ts +50 -0
  158. package/types/cdevhub-ngx-tw-split.d.ts +265 -0
  159. package/types/cdevhub-ngx-tw-stat.d.ts +140 -0
  160. package/types/cdevhub-ngx-tw-stepper.d.ts +127 -0
  161. package/types/cdevhub-ngx-tw-switch.d.ts +88 -0
  162. package/types/cdevhub-ngx-tw-tab-nav.d.ts +107 -0
  163. package/types/cdevhub-ngx-tw-table.d.ts +479 -0
  164. package/types/cdevhub-ngx-tw-tabs.d.ts +121 -0
  165. package/types/cdevhub-ngx-tw-textarea.d.ts +62 -0
  166. package/types/cdevhub-ngx-tw-theme.d.ts +106 -0
  167. package/types/cdevhub-ngx-tw-time-picker.d.ts +303 -0
  168. package/types/cdevhub-ngx-tw-timeline.d.ts +278 -0
  169. package/types/cdevhub-ngx-tw-toast.d.ts +388 -0
  170. package/types/cdevhub-ngx-tw-tooltip.d.ts +95 -0
  171. package/types/cdevhub-ngx-tw.d.ts +49 -0
@@ -0,0 +1,479 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { TemplateRef, TrackByFunction } from '@angular/core';
3
+ import { CdkNoDataRow, CdkTableDataSourceInput, CdkTable } from '@angular/cdk/table';
4
+ import { TwBreakpoint, TwSize } from '@cdevhub/ngx-tw/core';
5
+ export { DataSource } from '@angular/cdk/collections';
6
+
7
+ /** Possible values for the `aria-sort` attribute on a sortable column header. */
8
+ type TwColumnAriaSort = 'ascending' | 'descending' | 'none' | null;
9
+ /** Re-export of CDK's accepted data-source shapes: plain array, Observable, or `DataSource<T>`. */
10
+ type TwTableDataSourceInput<T> = CdkTableDataSourceInput<T>;
11
+ /** Visual variant of the table. `'default'` — clean row dividers. `'striped'` — alternating rows. `'bordered'` — full grid with outer rounded border. */
12
+ type TwTableVariant = 'default' | 'striped' | 'bordered';
13
+ /** Row density. `'comfortable'` — larger vertical padding. `'compact'` — tighter padding for dense data. */
14
+ type TwTableDensity = 'comfortable' | 'compact';
15
+ /** Responsive behaviour mode. `'scroll'` — horizontal overflow. `'stack'` — cards per row below a breakpoint. `'hide'` — columns with `hideBelow` are hidden. */
16
+ type TwTableResponsiveMode = 'scroll' | 'stack' | 'hide';
17
+ /** Table layout algorithm. `'auto'` — content-sized columns. `'fixed'` — respects `<tw-column display.width>`. */
18
+ type TwTableLayout = 'auto' | 'fixed';
19
+ /** Horizontal alignment of a column's cells. */
20
+ type TwColumnAlign = 'start' | 'center' | 'end';
21
+ /** Column stickiness. `'start'` pins to leading edge; `'end'` pins to trailing edge; `false` disables. */
22
+ type TwColumnSticky = 'start' | 'end' | false;
23
+ /** Visual configuration. Pass any subset; unset keys fall back to the defaults. */
24
+ interface TwTableAppearance {
25
+ /** Visual variant. Defaults to `'default'`. */
26
+ variant?: TwTableVariant;
27
+ /** Row density (vertical padding only — independent of font size). Defaults to `'comfortable'`. */
28
+ density?: TwTableDensity;
29
+ /** Base font-size scale for header and data cells. Defaults to `'md'`. */
30
+ size?: TwSize;
31
+ /** Table layout algorithm. Defaults to `'auto'`. */
32
+ layout?: TwTableLayout;
33
+ /** When `true`, rows fade in on enter via `animate.enter="fade-in"`. Off by default to avoid flicker on frequent data updates. Defaults to `false`. */
34
+ rowAnimations?: boolean;
35
+ }
36
+ /** Sticky configuration — pinned header/footer rows and an internal scroll region. */
37
+ interface TwTableSticky {
38
+ /** When `true`, the `<thead>` row stays visible while the body scrolls. Requires `scrollHeight` or a scrolling ancestor. Defaults to `false`. */
39
+ header?: boolean;
40
+ /** When `true`, the `<tfoot>` row stays pinned while the body scrolls. Defaults to `false`. */
41
+ footer?: boolean;
42
+ /** Max-height of the internal scroll container. A number is treated as pixels; a string is passed through as a CSS length. When `null`, the table flows with its content. Defaults to `null`. */
43
+ scrollHeight?: string | number | null;
44
+ }
45
+ /** Responsive configuration — how the table adapts to narrow viewports. */
46
+ interface TwTableResponsive {
47
+ /** Narrow-viewport strategy. Defaults to `'scroll'`. */
48
+ mode?: TwTableResponsiveMode;
49
+ /** Breakpoint below which the `'stack'` mode engages. Ignored when `mode !== 'stack'`. Defaults to `'md'`. */
50
+ stackBelow?: TwBreakpoint;
51
+ }
52
+ /** Selection configuration. */
53
+ interface TwTableSelection {
54
+ /** When `true`, exposes a leading `_selection` column slot for checkbox rendering. Defaults to `false`. */
55
+ enabled?: boolean;
56
+ }
57
+ /** Per-column display configuration. */
58
+ interface TwColumnDisplay {
59
+ /** Sticky positioning. `'start'` pins to the leading edge; `'end'` pins to the trailing edge; `false` disables stickiness. Defaults to `false`. */
60
+ sticky?: TwColumnSticky;
61
+ /** Horizontal text alignment. `'end'` is idiomatic for numeric columns. Defaults to `'start'`. */
62
+ align?: TwColumnAlign;
63
+ /** Convenience flag equivalent to `align: 'end'` plus tabular numerals. Overridden by an explicit `align`. Defaults to `false`. */
64
+ numeric?: boolean;
65
+ /** Responsive visibility: when set and the viewport is below this breakpoint, the column is hidden (applies when the table's `responsive.mode === 'hide'`). Defaults to `null`. */
66
+ hideBelow?: TwBreakpoint | null;
67
+ /** CSS column width applied to header and data cells. A number is treated as pixels; a string is passed through. Only honoured when the table's `appearance.layout === 'fixed'`. Defaults to `null`. */
68
+ width?: string | number | null;
69
+ }
70
+ /** String labels used by the table. All keys optional on the `labels` input; unset keys fall back to the English defaults. */
71
+ interface TwTableLabels {
72
+ /** Accessible name used when neither `<caption>`, `ariaLabel`, nor `ariaLabelledby` is provided. Triggers a dev-mode warning. */
73
+ ariaLabel: string;
74
+ /** Default empty-state message rendered when no `[slot="empty"]` content is projected. */
75
+ empty: string;
76
+ /** Default loading message announced politely via `LiveAnnouncer`. */
77
+ loading: string;
78
+ /** Prefix prepended to `String(error)` when no `[slot="error"]` content is projected. */
79
+ errorPrefix: string;
80
+ /** `LiveAnnouncer` template announced on row-count changes. Variable: `{count}`. */
81
+ rowsUpdatedAnnouncement: string;
82
+ /** `LiveAnnouncer` template for selection-change announcements. Variable: `{count}`. */
83
+ selectionAnnouncement: string;
84
+ /** Accessible label for the row-expansion toggle button. */
85
+ expandRowLabel: string;
86
+ /** Accessible label for the collapse-row toggle button. */
87
+ collapseRowLabel: string;
88
+ /** Accessible label for the master "select all" checkbox in the leading selection column. */
89
+ selectAllLabel: string;
90
+ /** Accessible label template for each per-row selection checkbox. Variable: `{index}` (1-based). */
91
+ selectRowLabel: string;
92
+ }
93
+ /** Default English labels for the table. */
94
+ declare const DEFAULT_TABLE_LABELS: Readonly<TwTableLabels>;
95
+ /** Context provided to every data-cell template (`*twCellDef`). Generic over the row type `T`. */
96
+ interface TwCellContext<T> {
97
+ /** The row data (implicit `let-row`). */
98
+ $implicit: T;
99
+ /** The row, aliased for readability. */
100
+ row: T;
101
+ /** The column's declared `name`. */
102
+ column: string;
103
+ /** Zero-based index within the rendered row list. */
104
+ index: number;
105
+ /** Zero-based column index in the visible column set. */
106
+ columnIndex: number;
107
+ /** True when this cell is in the first row. */
108
+ first: boolean;
109
+ /** True when this cell is in the last row. */
110
+ last: boolean;
111
+ /** True when the row index is even. */
112
+ even: boolean;
113
+ /** True when the row index is odd. */
114
+ odd: boolean;
115
+ /** Total number of rendered rows. */
116
+ count: number;
117
+ }
118
+ /** Context provided to every header-cell template (`*twHeaderCellDef`). */
119
+ interface TwHeaderCellContext {
120
+ /** The column's declared `name` (implicit `let-column`). */
121
+ $implicit: string;
122
+ /** The column's declared `name`, aliased. */
123
+ column: string;
124
+ /** Zero-based column index in the visible column set. */
125
+ columnIndex: number;
126
+ }
127
+ /** Context provided to every footer-cell template (`*twFooterCellDef`). Generic over the row type `T`. */
128
+ interface TwFooterCellContext<T> {
129
+ /** The column's declared `name` (implicit). */
130
+ $implicit: string;
131
+ /** The column's declared `name`. */
132
+ column: string;
133
+ /** Zero-based column index in the visible column set. */
134
+ columnIndex: number;
135
+ /** Snapshot of all rows (useful for total/summary computation). */
136
+ rows: readonly T[];
137
+ }
138
+ /** Context surfaced to a `*twRowDef` template. Mirrors `TwCellContext<T>` minus the column-specific fields. */
139
+ interface TwRowContext<T> {
140
+ /** The row data (implicit `let-row`). */
141
+ $implicit: T;
142
+ /** The row, aliased. */
143
+ row: T;
144
+ /** Zero-based index within the rendered row list. */
145
+ index: number;
146
+ /** True when this row is the first rendered row. */
147
+ first: boolean;
148
+ /** True when this row is the last rendered row. */
149
+ last: boolean;
150
+ /** True when the row index is even. */
151
+ even: boolean;
152
+ /** True when the row index is odd. */
153
+ odd: boolean;
154
+ /** Total rendered row count. */
155
+ count: number;
156
+ }
157
+ /** Context provided to `*twRowExpansion`. */
158
+ interface TwRowExpansionContext<T> {
159
+ /** The row whose expansion panel this template renders. */
160
+ $implicit: T;
161
+ /** The row, aliased. */
162
+ row: T;
163
+ /** The data index. */
164
+ index: number;
165
+ /** Collapses this row (removes it from `expandedRows`). */
166
+ collapse: () => void;
167
+ }
168
+ /** Payload emitted by `rowClicked`. */
169
+ interface TwRowClickEvent<T> {
170
+ /** The clicked row. */
171
+ row: T;
172
+ /** Zero-based index in the rendered data. */
173
+ index: number;
174
+ /** The original DOM event. */
175
+ event: MouseEvent;
176
+ }
177
+ /** Payload emitted by `selectionChange`. */
178
+ interface TwSelectionChangeEvent<T> {
179
+ /** The full current selection. */
180
+ selected: readonly T[];
181
+ /** Rows added since the previous selection. */
182
+ added: readonly T[];
183
+ /** Rows removed since the previous selection. */
184
+ removed: readonly T[];
185
+ /** The previous selection. */
186
+ previous: readonly T[];
187
+ }
188
+ /** Payload emitted by `expansionChange`. */
189
+ interface TwRowExpansionChangeEvent<T> {
190
+ /** The row whose expansion state changed. */
191
+ row: T;
192
+ /** Whether the row is now expanded. */
193
+ expanded: boolean;
194
+ /** The full set of expanded rows after the change. */
195
+ expandedRows: ReadonlySet<T>;
196
+ }
197
+ /** Structural directive on an `<ng-template>` (or a star-directive host) defining a column's data-cell template. Typed as `TwCellContext<T>`. */
198
+ declare class CellDefDirective<T = unknown> {
199
+ /** @internal */
200
+ readonly template: TemplateRef<any>;
201
+ /** @internal */
202
+ static ngTemplateContextGuard<T>(_dir: CellDefDirective<T>, _ctx: unknown): _ctx is TwCellContext<T>;
203
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CellDefDirective<any>, never>;
204
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CellDefDirective<any>, "[twCellDef]", never, {}, {}, never, never, true, never>;
205
+ }
206
+ /** Structural directive defining a column's header-cell template. Typed as `TwHeaderCellContext`. */
207
+ declare class HeaderCellDefDirective {
208
+ /** @internal */
209
+ readonly template: TemplateRef<any>;
210
+ /** @internal */
211
+ static ngTemplateContextGuard(_dir: HeaderCellDefDirective, _ctx: unknown): _ctx is TwHeaderCellContext;
212
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HeaderCellDefDirective, never>;
213
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<HeaderCellDefDirective, "[twHeaderCellDef]", never, {}, {}, never, never, true, never>;
214
+ }
215
+ /** Structural directive defining a column's footer-cell template. Typed as `TwFooterCellContext<T>`. */
216
+ declare class FooterCellDefDirective<T = unknown> {
217
+ /** @internal */
218
+ readonly template: TemplateRef<any>;
219
+ /** @internal */
220
+ static ngTemplateContextGuard<T>(_dir: FooterCellDefDirective<T>, _ctx: unknown): _ctx is TwFooterCellContext<T>;
221
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<FooterCellDefDirective<any>, never>;
222
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FooterCellDefDirective<any>, "[twFooterCellDef]", never, {}, {}, never, never, true, never>;
223
+ }
224
+ /** Structural directive on an `<ng-template>` declaring the no-data row fallback. Takes precedence over `[slot="empty"]` when both are present. */
225
+ declare class NoDataRowDirective extends CdkNoDataRow {
226
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NoDataRowDirective, never>;
227
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NoDataRowDirective, "ng-template[twNoDataRow]", never, {}, {}, never, never, true, never>;
228
+ }
229
+ /** Structural directive on an `<ng-template>` declaring the row-expansion template. Requires `[multiTemplateRows]="true"` on the parent `<tw-table>`. */
230
+ declare class RowExpansionDirective<T = unknown> {
231
+ /** Optional predicate that decides whether this expansion renders for a given row. Defaults to `undefined` (render for every expanded row). */
232
+ readonly predicate: _angular_core.InputSignal<((row: T, index: number) => boolean) | undefined>;
233
+ /** @internal */
234
+ readonly template: TemplateRef<any>;
235
+ /** @internal */
236
+ static ngTemplateContextGuard<T>(_dir: RowExpansionDirective<T>, _ctx: unknown): _ctx is TwRowExpansionContext<T>;
237
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RowExpansionDirective<any>, never>;
238
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RowExpansionDirective<any>, "ng-template[twRowExpansion]", never, { "predicate": { "alias": "twRowExpansionWhen"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
239
+ }
240
+ /**
241
+ * Declares a single column of a `<tw-table>`. Pure-metadata component — its
242
+ * host element is `display: none`; the column's `<th>` / `<td>` / `<tfoot>`
243
+ * renderers are emitted by the parent `<tw-table>` using the projected cell
244
+ * templates (`*twHeaderCellDef`, `*twCellDef`, `*twFooterCellDef`).
245
+ */
246
+ declare class ColumnComponent<T = unknown> {
247
+ /** Unique identifier for this column. Required — referenced by `*twRowDef` / `*twHeaderRowDef` and used as the CDK `cdkColumnDef` name. */
248
+ readonly name: _angular_core.InputSignal<string>;
249
+ /** Visual configuration: sticky, align, numeric, hideBelow, width. Accepts any subset; unset keys fall back to the defaults. */
250
+ readonly display: _angular_core.InputSignal<TwColumnDisplay>;
251
+ /** When true, removes this column from the visible column set. Defaults to `false`. */
252
+ readonly hidden: _angular_core.InputSignal<boolean>;
253
+ /** Ordering hint for the default visible-columns list when no `*twRowDef` is declared. Lower renders first. Defaults to `0`. */
254
+ readonly priority: _angular_core.InputSignal<number>;
255
+ /** Plain text header label. Used when no `*twHeaderCellDef` template is projected. Defaults to `undefined`. */
256
+ readonly headerLabel: _angular_core.InputSignal<string | undefined>;
257
+ /** Label used as `data-label` on cells in responsive `'stack'` mode. Falls back to `headerLabel`, then `name`. Defaults to `undefined`. */
258
+ readonly stackLabel: _angular_core.InputSignal<string | undefined>;
259
+ /**
260
+ * Explicit override for the column header's `aria-sort` attribute. When unset (the default),
261
+ * the column derives its `aria-sort` from a parent `[twSort]` directive via the `TW_SORT_HANDLE`
262
+ * token — the column is treated as active when the directive's `active` id matches this column's
263
+ * `name`. Set explicitly to `'ascending'` / `'descending'` / `'none'` to override; `null` disables
264
+ * the attribute entirely. Defaults to `null`.
265
+ */
266
+ readonly sortState: _angular_core.InputSignal<TwColumnAriaSort>;
267
+ /** @internal Stable identifier used for DOM `data-*` hooks. */
268
+ readonly columnId: string;
269
+ private readonly sortHandle;
270
+ /** @internal Consumer-projected header-cell template (optional). */
271
+ readonly headerCellDef: _angular_core.Signal<HeaderCellDefDirective | undefined>;
272
+ /** @internal Consumer-projected data-cell template. */
273
+ readonly cellDef: _angular_core.Signal<CellDefDirective<any> | undefined>;
274
+ /** @internal Consumer-projected footer-cell template (optional). */
275
+ readonly footerCellDef: _angular_core.Signal<FooterCellDefDirective<any> | undefined>;
276
+ /** @internal Index in the visible column set — pushed by the parent table. */
277
+ readonly columnIndex: _angular_core.WritableSignal<number>;
278
+ /** @internal Row snapshot pushed by the parent for footer-cell contexts. */
279
+ readonly rowsSnapshot: _angular_core.WritableSignal<readonly T[]>;
280
+ /** @internal Table-pushed extra classes (sticky / hide-below / responsive decorations). */
281
+ readonly extraCellClass: _angular_core.WritableSignal<string>;
282
+ readonly extraHeaderClass: _angular_core.WritableSignal<string>;
283
+ readonly extraFooterClass: _angular_core.WritableSignal<string>;
284
+ /** Resolved display config — partial input merged with `DISPLAY_DEFAULTS`. */
285
+ readonly resolvedDisplay: _angular_core.Signal<Required<TwColumnDisplay>>;
286
+ /** @internal Convenience accessor for the cdkColumnDef `[sticky]` binding. */
287
+ readonly stickyStart: _angular_core.Signal<boolean>;
288
+ /** @internal Convenience accessor for the cdkColumnDef `[stickyEnd]` binding. */
289
+ readonly stickyEnd: _angular_core.Signal<boolean>;
290
+ /** @internal Effective align — `numeric` forces `'end'` unless `align` is explicitly set to a non-default value. */
291
+ readonly effectiveAlign: _angular_core.Signal<TwColumnAlign>;
292
+ /** @internal CSS width string applied to cells. */
293
+ readonly resolvedWidth: _angular_core.Signal<string | null>;
294
+ /** @internal `data-label` emitted on cells in stack mode. */
295
+ readonly stackDataLabel: _angular_core.Signal<string>;
296
+ /** @internal Align class plus tabular-numerals when `numeric` is true — shared by data and footer cells. */
297
+ private readonly dataCellPrefix;
298
+ readonly cellClasses: _angular_core.Signal<string>;
299
+ readonly headerCellClasses: _angular_core.Signal<string>;
300
+ readonly footerCellClasses: _angular_core.Signal<string>;
301
+ /**
302
+ * @internal `aria-sort` value for the column's `<th>`. Explicit `sortState` wins; otherwise the
303
+ * column auto-resolves against a parent `[twSort]` directive (`TW_SORT_HANDLE`). Returns `null`
304
+ * when no sort is wired or the column is not the active sort, so the attribute is omitted.
305
+ */
306
+ readonly ariaSort: _angular_core.Signal<TwColumnAriaSort>;
307
+ readonly headerContext: _angular_core.Signal<TwHeaderCellContext>;
308
+ readonly footerContext: _angular_core.Signal<TwFooterCellContext<T>>;
309
+ /** @internal Builds the per-cell template context from CDK-provided row variables. */
310
+ buildCellContext(row: T, index: number, count: number, first: boolean, last: boolean, even: boolean, odd: boolean): TwCellContext<T>;
311
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ColumnComponent<any>, never>;
312
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ColumnComponent<any>, "tw-column", never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; "display": { "alias": "display"; "required": false; "isSignal": true; }; "hidden": { "alias": "hidden"; "required": false; "isSignal": true; }; "priority": { "alias": "priority"; "required": false; "isSignal": true; }; "headerLabel": { "alias": "headerLabel"; "required": false; "isSignal": true; }; "stackLabel": { "alias": "stackLabel"; "required": false; "isSignal": true; }; "sortState": { "alias": "sortState"; "required": false; "isSignal": true; }; }, {}, ["headerCellDef", "cellDef", "footerCellDef"], never, true, never>;
313
+ }
314
+ /**
315
+ * A highly customizable data-table component wrapping `@angular/cdk/table`.
316
+ *
317
+ * Composes with other ngx-tw primitives:
318
+ * - Sortable headers: place `[twSort]` on `<tw-table>` and `[tw-sort-header]` inside `*twHeaderCellDef`.
319
+ * - Pagination: project `<tw-paginator slot="pagination">` as a child.
320
+ * - Loading spinner: project `<tw-spinner slot="loading">` or rely on the built-in fallback.
321
+ */
322
+ declare class TableComponent<T = unknown> {
323
+ /** The table's rows. Accepts a plain array, an `Observable<readonly T[]>`, or a CDK `DataSource<T>`. Wired directly to `CdkTable.dataSource`. Defaults to an empty array. */
324
+ readonly data: _angular_core.InputSignal<TwTableDataSourceInput<T>>;
325
+ /** Tracking function used by CDK to identify rows across data changes. When unset, CDK uses identity. */
326
+ readonly trackBy: _angular_core.InputSignal<TrackByFunction<T> | undefined>;
327
+ /** When true, renders the loading slot as an overlay and applies `opacity-60 pointer-events-none` to the body. Defaults to `false`. */
328
+ readonly loading: _angular_core.InputSignal<boolean>;
329
+ /** When non-null, renders the error slot in place of the body. Defaults to `null`. */
330
+ readonly error: _angular_core.InputSignal<unknown>;
331
+ /** Visual configuration — `variant`, `density`, `size`, `layout`, `rowAnimations`. Accepts a partial; unset keys fall back to the defaults. */
332
+ readonly appearance: _angular_core.InputSignal<TwTableAppearance>;
333
+ /** Sticky configuration — `header`, `footer`, `scrollHeight`. Accepts a partial; unset keys fall back to the defaults. */
334
+ readonly sticky: _angular_core.InputSignal<TwTableSticky>;
335
+ /** Responsive configuration — `mode`, `stackBelow`. Accepts a partial; unset keys fall back to the defaults. */
336
+ readonly responsive: _angular_core.InputSignal<TwTableResponsive>;
337
+ /** Selection configuration — `enabled`. Accepts a partial; unset keys fall back to the defaults. */
338
+ readonly selection: _angular_core.InputSignal<TwTableSelection>;
339
+ /** Whether multiple row templates may render per data object. Required for `*twRowExpansion` and advanced `*twRowDef [when]` usage. Defaults to `false`. */
340
+ readonly multiTemplateRows: _angular_core.InputSignal<boolean>;
341
+ /** Overrides for user-facing strings. Unset keys fall back to the English defaults. Defaults to `{}`. */
342
+ readonly labels: _angular_core.InputSignal<Partial<TwTableLabels>>;
343
+ /** Accessible name for the `<table>`. Required when no visible `<caption slot="caption">` is provided. */
344
+ readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
345
+ /** Id of an external element labelling the table. Mirrored to `aria-labelledby` on the `<table>`. */
346
+ readonly ariaLabelledby: _angular_core.InputSignal<string | undefined>;
347
+ /** Two-way bound set of rows currently expanded. Immutable — set a new `Set` on every change; do not mutate in place. */
348
+ readonly expandedRows: _angular_core.ModelSignal<ReadonlySet<T>>;
349
+ /** Two-way bound list of selected rows. Set a new array on every change; do not mutate. Only used when `selection.enabled` is `true`. */
350
+ readonly selected: _angular_core.ModelSignal<readonly T[]>;
351
+ /** Fires when a row is clicked. Suppressed when the click originated inside an interactive descendant (button, link, input, etc.). */
352
+ readonly rowClicked: _angular_core.OutputEmitterRef<TwRowClickEvent<T>>;
353
+ /** Fires after `selected` changes via user interaction (not on programmatic writes). */
354
+ readonly selectionChange: _angular_core.OutputEmitterRef<TwSelectionChangeEvent<T>>;
355
+ /** Fires after a row is expanded or collapsed by user interaction. */
356
+ readonly expansionChange: _angular_core.OutputEmitterRef<TwRowExpansionChangeEvent<T>>;
357
+ /** @internal Projected columns. */
358
+ readonly columns: _angular_core.Signal<readonly ColumnComponent<any>[]>;
359
+ /** @internal Projected custom no-data row (takes precedence over the fallback empty state). */
360
+ readonly noDataRow: _angular_core.Signal<NoDataRowDirective | undefined>;
361
+ /** @internal Projected expansion row template. */
362
+ readonly expansionTemplate: _angular_core.Signal<RowExpansionDirective<T> | undefined>;
363
+ /** @internal The CDK table inside our view. */
364
+ readonly cdkTable: _angular_core.Signal<CdkTable<T>>;
365
+ private readonly _liveAnnouncer;
366
+ private readonly _elementRef;
367
+ private readonly _destroyRef;
368
+ /** Unique per-instance id used to scope row/expansion DOM ids. */
369
+ readonly hostId: string;
370
+ /** Returns the DOM id used for the expansion row of the given data row at the given index. Useful for wiring `aria-controls` from a trigger cell. */
371
+ readonly expansionId: (_row: T, index: number) => string;
372
+ /** @internal Resolved visual configuration. */
373
+ readonly resolvedAppearance: _angular_core.Signal<Required<TwTableAppearance>>;
374
+ /** @internal Resolved sticky configuration. */
375
+ readonly resolvedSticky: _angular_core.Signal<Required<TwTableSticky>>;
376
+ /** @internal Resolved responsive configuration. */
377
+ readonly resolvedResponsive: _angular_core.Signal<Required<TwTableResponsive>>;
378
+ /** @internal Resolved selection configuration. */
379
+ readonly resolvedSelection: _angular_core.Signal<Required<TwTableSelection>>;
380
+ /** @internal Snapshot of the data array (for footer-cell context). Empty array for async data sources. */
381
+ readonly resolvedRows: _angular_core.Signal<readonly T[]>;
382
+ /** @internal Whether the data input is a plain array. */
383
+ readonly dataIsArray: _angular_core.Signal<boolean>;
384
+ /** @internal Snapshot-based empty check; `false` for async sources (we can't know without subscribing). */
385
+ readonly isEmptySnapshot: _angular_core.Signal<boolean>;
386
+ /** @internal Whether the empty overlay fallback should render (no no-data-row projected). */
387
+ readonly shouldRenderEmptyOverlay: _angular_core.Signal<boolean>;
388
+ /** @internal Whether the error overlay should render. */
389
+ readonly shouldRenderErrorOverlay: _angular_core.Signal<boolean>;
390
+ /** @internal Resolved table labels (defaults merged with input overrides). */
391
+ readonly resolvedLabels: _angular_core.Signal<TwTableLabels>;
392
+ /** @internal Computed error message for the default error overlay. Empty when no error is set. */
393
+ readonly errorMessage: _angular_core.Signal<string>;
394
+ /** @internal CSS max-height string for the scroll container. */
395
+ readonly maxHeightStyle: _angular_core.Signal<string | null>;
396
+ /** @internal The visible (non-hidden) columns in render order (by ascending `priority`). */
397
+ readonly visibleColumns: _angular_core.Signal<readonly ColumnComponent<T>[]>;
398
+ /** @internal Column names of the visible set, prefixed with `_selection` when `selection.enabled === true`. */
399
+ readonly visibleColumnNames: _angular_core.Signal<readonly string[]>;
400
+ /** @internal Whether any column has a projected footer-cell template. */
401
+ readonly hasFooterRow: _angular_core.Signal<boolean>;
402
+ /** @internal Whether an expansion template has been declared and multi-template rows are enabled. */
403
+ readonly hasExpansion: _angular_core.Signal<boolean>;
404
+ /** @internal Colspan to use for the expansion `<td>`. */
405
+ readonly expansionColspan: _angular_core.Signal<number>;
406
+ /** @internal Pulled by the template for the `*cdkHeaderRowDef`/`*cdkFooterRowDef` `sticky:` field. */
407
+ readonly stickyHeader: _angular_core.Signal<boolean>;
408
+ readonly stickyFooter: _angular_core.Signal<boolean>;
409
+ private readonly _variantResult;
410
+ readonly hostClasses: _angular_core.Signal<string>;
411
+ readonly toolbarClasses: _angular_core.Signal<string>;
412
+ readonly scrollWrapperClasses: _angular_core.Signal<string>;
413
+ readonly scrollContainerClasses: _angular_core.Signal<string>;
414
+ readonly tableClasses: _angular_core.Signal<string>;
415
+ readonly thClasses: _angular_core.Signal<string>;
416
+ readonly tdClasses: _angular_core.Signal<string>;
417
+ readonly footerTdClasses: _angular_core.Signal<string>;
418
+ readonly emptyStateClasses: _angular_core.Signal<string>;
419
+ readonly emptyIconClasses: _angular_core.Signal<string>;
420
+ readonly emptyMessageClasses: _angular_core.Signal<string>;
421
+ readonly loadingOverlayClasses: _angular_core.Signal<string>;
422
+ readonly loadingMessageClasses: _angular_core.Signal<string>;
423
+ readonly errorStateClasses: _angular_core.Signal<string>;
424
+ readonly errorIconClasses: _angular_core.Signal<string>;
425
+ readonly errorMessageClasses: _angular_core.Signal<string>;
426
+ readonly footerSlotClasses: _angular_core.Signal<string>;
427
+ readonly paginationSlotClasses: _angular_core.Signal<string>;
428
+ readonly expansionRowClasses: _angular_core.Signal<string>;
429
+ readonly expansionCellClasses: _angular_core.Signal<string>;
430
+ readonly selectionHeaderClasses: _angular_core.Signal<string>;
431
+ readonly selectionCellClasses: _angular_core.Signal<string>;
432
+ constructor();
433
+ /** @internal Called by the template when a data row is clicked. */
434
+ handleRowClick(row: T, index: number, event: MouseEvent): void;
435
+ /** @internal Whether a row is currently expanded. */
436
+ isRowExpanded(row: T): boolean;
437
+ /** @internal CDK `when` predicate used for the auto-generated expansion row. */
438
+ readonly expansionWhen: (index: number, row: T) => boolean;
439
+ /** @internal Context object for the expansion template. */
440
+ expansionContext(row: T, index: number): TwRowExpansionContext<T>;
441
+ /** Expands the given row if not already expanded and emits `expansionChange`. */
442
+ expand(row: T): void;
443
+ /** Collapses the given row if currently expanded and emits `expansionChange`. */
444
+ collapse(row: T): void;
445
+ /** Toggles the expansion state of the given row. */
446
+ toggleExpansion(row: T): void;
447
+ /** Whether a given row is currently in the `selected` list. */
448
+ isSelected(row: T): boolean;
449
+ /** Selects or deselects a row and emits `selectionChange`. */
450
+ setSelected(row: T, nextSelected: boolean): void;
451
+ /**
452
+ * Adds every row in the current data snapshot to `selected` that isn't already selected.
453
+ * Emits `selectionChange` if anything changed. Only the array data-source path can compute a
454
+ * full snapshot — for `Observable<T[]>` or `DataSource<T>` data inputs this is a no-op.
455
+ */
456
+ selectAll(): void;
457
+ /** Clears every currently-selected row. Emits `selectionChange` if anything was selected. */
458
+ clearSelection(): void;
459
+ /** @internal Returns `aria-selected` for a data row, or `null` to omit the attribute when selection is disabled. */
460
+ rowAriaSelected(row: T): 'true' | 'false' | null;
461
+ /**
462
+ * @internal Tri-state summary of the current selection vs. the visible data snapshot.
463
+ * `'none'` — nothing selected; `'some'` — partial; `'all'` — every snapshot row is selected.
464
+ */
465
+ readonly masterSelectionState: _angular_core.Signal<"none" | "some" | "all">;
466
+ /** @internal Whether the master "select all" checkbox should render checked. */
467
+ readonly masterChecked: _angular_core.Signal<boolean>;
468
+ /** @internal Whether the master "select all" checkbox should render indeterminate. */
469
+ readonly masterIndeterminate: _angular_core.Signal<boolean>;
470
+ /** @internal Wires the master checkbox change event to `selectAll` / `clearSelection`. */
471
+ toggleMasterSelection(checked: boolean): void;
472
+ /** @internal Formatted accessible label for a per-row selection checkbox. */
473
+ selectRowLabel(rowIndex: number): string;
474
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableComponent<any>, never>;
475
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<TableComponent<any>, "tw-table", ["twTable"], { "data": { "alias": "data"; "required": false; "isSignal": true; }; "trackBy": { "alias": "trackBy"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "sticky": { "alias": "sticky"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "multiTemplateRows": { "alias": "multiTemplateRows"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "expandedRows": { "alias": "expandedRows"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; }, { "expandedRows": "expandedRowsChange"; "selected": "selectedChange"; "rowClicked": "rowClicked"; "selectionChange": "selectionChange"; "expansionChange": "expansionChange"; }, ["columns", "noDataRow", "expansionTemplate"], ["[slot='toolbar']", "[slot='caption']", "*", "[slot='empty']", "[slot='error']", "[slot='loading']", "[slot='footer']", "[slot='pagination']"], true, never>;
476
+ }
477
+
478
+ export { CellDefDirective, ColumnComponent, DEFAULT_TABLE_LABELS, FooterCellDefDirective, HeaderCellDefDirective, NoDataRowDirective, RowExpansionDirective, TableComponent };
479
+ export type { TwCellContext, TwColumnAlign, TwColumnAriaSort, TwColumnDisplay, TwColumnSticky, TwFooterCellContext, TwHeaderCellContext, TwRowClickEvent, TwRowContext, TwRowExpansionChangeEvent, TwRowExpansionContext, TwSelectionChangeEvent, TwTableAppearance, TwTableDataSourceInput, TwTableDensity, TwTableLabels, TwTableLayout, TwTableResponsive, TwTableResponsiveMode, TwTableSelection, TwTableSticky, TwTableVariant };
@@ -0,0 +1,121 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { TemplateRef, AfterViewInit, ElementRef } from '@angular/core';
3
+ import { FocusableOption } from '@angular/cdk/a11y';
4
+ import { TabTriggerVariant, TwColor, TwSize } from '@cdevhub/ngx-tw/core';
5
+
6
+ /** Visual style of the tab strip. */
7
+ type TabsVariant = TabTriggerVariant;
8
+ declare class TabTriggerDirective {
9
+ readonly templateRef: TemplateRef<any>;
10
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabTriggerDirective, never>;
11
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabTriggerDirective, "ng-template[twTabTrigger]", never, {}, {}, never, never, true, never>;
12
+ }
13
+ declare class TabContentDirective {
14
+ readonly templateRef: TemplateRef<any>;
15
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabContentDirective, never>;
16
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabContentDirective, "ng-template[twTabContent]", never, {}, {}, never, never, true, never>;
17
+ }
18
+ declare class TabComponent {
19
+ /** Unique identifier for this tab. Used to match the active tab value. */
20
+ readonly value: _angular_core.InputSignal<string>;
21
+ /** Plain text label shown in the trigger. Ignored when a custom trigger template is provided. */
22
+ readonly label: _angular_core.InputSignal<string>;
23
+ /** When true, the tab cannot be selected and is skipped by keyboard navigation. Defaults to false. */
24
+ readonly disabled: _angular_core.InputSignal<boolean>;
25
+ /** When true, a close button is rendered in the tab trigger. Defaults to false. */
26
+ readonly closable: _angular_core.InputSignal<boolean>;
27
+ /** When true, the tab panel content is only instantiated when the tab becomes active for the first time. Defaults to false. */
28
+ readonly lazy: _angular_core.InputSignal<boolean>;
29
+ /** @internal Custom trigger template, if provided. */
30
+ readonly triggerTemplate: _angular_core.Signal<TabTriggerDirective | undefined>;
31
+ /** @internal Custom content template, if provided via twTabContent. */
32
+ readonly contentTemplate: _angular_core.Signal<TabContentDirective | undefined>;
33
+ /** @internal Implicit content template wrapping ng-content. */
34
+ readonly implicitContentTemplate: _angular_core.Signal<TemplateRef<unknown> | undefined>;
35
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabComponent, never>;
36
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<TabComponent, "tw-tab", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "lazy": { "alias": "lazy"; "required": false; "isSignal": true; }; }, {}, ["triggerTemplate", "contentTemplate"], ["*"], true, never>;
37
+ }
38
+ declare class TabTriggerElementDirective implements FocusableOption {
39
+ readonly elementRef: ElementRef<any>;
40
+ readonly isActive: _angular_core.InputSignal<boolean>;
41
+ readonly isDisabled: _angular_core.InputSignal<boolean>;
42
+ readonly tabIndex: _angular_core.Signal<0 | -1>;
43
+ focus(): void;
44
+ /**
45
+ * FocusableOption getter. NOTE: we cannot expose the `isDisabled` input
46
+ * signal directly — the signal function itself is always truthy, which would
47
+ * make FocusKeyManager treat every trigger as disabled. We resolve the
48
+ * signal here so the manager skips the right items.
49
+ */
50
+ get disabled(): boolean;
51
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabTriggerElementDirective, never>;
52
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TabTriggerElementDirective, "[twTabTriggerElement]", never, { "isActive": { "alias": "isActive"; "required": false; "isSignal": true; }; "isDisabled": { "alias": "isDisabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
53
+ }
54
+ declare class TabsComponent implements AfterViewInit {
55
+ /** Controls the visual style of the tab strip. Defaults to 'underline'. */
56
+ readonly variant: _angular_core.InputSignal<TabTriggerVariant>;
57
+ /** Sets the semantic color for active tab indicators and highlights. Defaults to 'primary'. */
58
+ readonly color: _angular_core.InputSignal<TwColor>;
59
+ /** Controls padding, font size, and icon size of tab triggers. Defaults to 'md'. */
60
+ readonly size: _angular_core.InputSignal<TwSize>;
61
+ /** Layout direction of the tab strip. Defaults to 'horizontal'. */
62
+ readonly orientation: _angular_core.InputSignal<"vertical" | "horizontal">;
63
+ /** When true, tab triggers stretch to fill the available width equally. Defaults to false. */
64
+ readonly fitted: _angular_core.InputSignal<boolean>;
65
+ /** The value of the currently active tab. Two-way bound. Updates when the user selects a tab. */
66
+ readonly value: _angular_core.ModelSignal<string>;
67
+ /** Fires when a closable tab's close button is clicked. Payload is the tab's value. */
68
+ readonly closed: _angular_core.OutputEmitterRef<string>;
69
+ private readonly destroyRef;
70
+ private readonly liveAnnouncer;
71
+ /** @internal */
72
+ readonly tabs: _angular_core.Signal<readonly TabComponent[]>;
73
+ /** @internal */
74
+ readonly triggerElements: _angular_core.Signal<readonly TabTriggerElementDirective[]>;
75
+ /** @internal */
76
+ readonly tablistInnerRef: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
77
+ private readonly componentId;
78
+ readonly activeValue: _angular_core.WritableSignal<string>;
79
+ readonly activatedTabs: _angular_core.WritableSignal<Set<string>>;
80
+ readonly canScrollStart: _angular_core.WritableSignal<boolean>;
81
+ readonly canScrollEnd: _angular_core.WritableSignal<boolean>;
82
+ private resizeObserver;
83
+ private scrollCleanup;
84
+ private readonly layoutResult;
85
+ private readonly triggerResult;
86
+ readonly rootClasses: _angular_core.Signal<string>;
87
+ readonly tablistClasses: _angular_core.Signal<string>;
88
+ readonly tablistInnerClasses: _angular_core.Signal<string>;
89
+ readonly baseTriggerClasses: _angular_core.Signal<string>;
90
+ readonly panelClasses: _angular_core.Signal<string>;
91
+ readonly scrollButtonClasses: _angular_core.Signal<string>;
92
+ readonly closeButtonClasses: _angular_core.Signal<string>;
93
+ /** @internal Get combined trigger classes for a given tab. */
94
+ getTriggerClasses(_tabValue: string, isActive: boolean): string;
95
+ getTabId(tabValue: string): string;
96
+ getPanelId(tabValue: string): string;
97
+ isTabActive(tabValue: string): boolean;
98
+ shouldRenderPanel(tab: TabComponent): boolean;
99
+ selectTab(tab: TabComponent): void;
100
+ closeTab(tab: TabComponent, event: Event): void;
101
+ private findNearestEnabledTab;
102
+ private keyManager;
103
+ /**
104
+ * @internal Handles keyboard navigation. The manager handles Arrow/Home/End;
105
+ * we layer Enter/Space to select the focused tab (the wrapper is a `<div role="tab">`
106
+ * so we lose the native button activation) and Delete to close a closable tab.
107
+ */
108
+ onKeydown(event: KeyboardEvent): void;
109
+ scrollStart(): void;
110
+ scrollEnd(): void;
111
+ private updateScrollState;
112
+ ngAfterViewInit(): void;
113
+ constructor();
114
+ private initializeActiveTab;
115
+ private setupScrollDetection;
116
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabsComponent, never>;
117
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<TabsComponent, "tw-tabs", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "fitted": { "alias": "fitted"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "closed": "closed"; }, ["tabs"], ["*"], true, never>;
118
+ }
119
+
120
+ export { TabComponent, TabContentDirective, TabTriggerDirective, TabsComponent };
121
+ export type { TabsVariant };