@star-ng/ui 0.0.0-stage → 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 (217) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +162 -2
  3. package/fesm2022/star-ng-ui-accordion.mjs +376 -0
  4. package/fesm2022/star-ng-ui-accordion.mjs.map +1 -0
  5. package/fesm2022/star-ng-ui-autocomplete.mjs +786 -0
  6. package/fesm2022/star-ng-ui-autocomplete.mjs.map +1 -0
  7. package/fesm2022/star-ng-ui-avatar.mjs +154 -0
  8. package/fesm2022/star-ng-ui-avatar.mjs.map +1 -0
  9. package/fesm2022/star-ng-ui-badge.mjs +153 -0
  10. package/fesm2022/star-ng-ui-badge.mjs.map +1 -0
  11. package/fesm2022/star-ng-ui-breadcrumb.mjs +199 -0
  12. package/fesm2022/star-ng-ui-breadcrumb.mjs.map +1 -0
  13. package/fesm2022/star-ng-ui-button.mjs +282 -0
  14. package/fesm2022/star-ng-ui-button.mjs.map +1 -0
  15. package/fesm2022/star-ng-ui-card.mjs +112 -0
  16. package/fesm2022/star-ng-ui-card.mjs.map +1 -0
  17. package/fesm2022/star-ng-ui-chart.mjs +1904 -0
  18. package/fesm2022/star-ng-ui-chart.mjs.map +1 -0
  19. package/fesm2022/star-ng-ui-checkbox.mjs +345 -0
  20. package/fesm2022/star-ng-ui-checkbox.mjs.map +1 -0
  21. package/fesm2022/star-ng-ui-core.mjs +484 -0
  22. package/fesm2022/star-ng-ui-core.mjs.map +1 -0
  23. package/fesm2022/star-ng-ui-data-display.mjs +1870 -0
  24. package/fesm2022/star-ng-ui-data-display.mjs.map +1 -0
  25. package/fesm2022/star-ng-ui-date-picker.mjs +2786 -0
  26. package/fesm2022/star-ng-ui-date-picker.mjs.map +1 -0
  27. package/fesm2022/star-ng-ui-dialog.mjs +948 -0
  28. package/fesm2022/star-ng-ui-dialog.mjs.map +1 -0
  29. package/fesm2022/star-ng-ui-drawer.mjs +158 -0
  30. package/fesm2022/star-ng-ui-drawer.mjs.map +1 -0
  31. package/fesm2022/star-ng-ui-editor.mjs +416 -0
  32. package/fesm2022/star-ng-ui-editor.mjs.map +1 -0
  33. package/fesm2022/star-ng-ui-field.mjs +378 -0
  34. package/fesm2022/star-ng-ui-field.mjs.map +1 -0
  35. package/fesm2022/star-ng-ui-file-upload.mjs +762 -0
  36. package/fesm2022/star-ng-ui-file-upload.mjs.map +1 -0
  37. package/fesm2022/star-ng-ui-i18n-de.mjs +179 -0
  38. package/fesm2022/star-ng-ui-i18n-de.mjs.map +1 -0
  39. package/fesm2022/star-ng-ui-i18n-es.mjs +179 -0
  40. package/fesm2022/star-ng-ui-i18n-es.mjs.map +1 -0
  41. package/fesm2022/star-ng-ui-input-group.mjs +188 -0
  42. package/fesm2022/star-ng-ui-input-group.mjs.map +1 -0
  43. package/fesm2022/star-ng-ui-input-mask.mjs +434 -0
  44. package/fesm2022/star-ng-ui-input-mask.mjs.map +1 -0
  45. package/fesm2022/star-ng-ui-input-number.mjs +691 -0
  46. package/fesm2022/star-ng-ui-input-number.mjs.map +1 -0
  47. package/fesm2022/star-ng-ui-input-otp.mjs +343 -0
  48. package/fesm2022/star-ng-ui-input-otp.mjs.map +1 -0
  49. package/fesm2022/star-ng-ui-input-tags.mjs +616 -0
  50. package/fesm2022/star-ng-ui-input-tags.mjs.map +1 -0
  51. package/fesm2022/star-ng-ui-knob.mjs +514 -0
  52. package/fesm2022/star-ng-ui-knob.mjs.map +1 -0
  53. package/fesm2022/star-ng-ui-layout.mjs +608 -0
  54. package/fesm2022/star-ng-ui-layout.mjs.map +1 -0
  55. package/fesm2022/star-ng-ui-listbox.mjs +886 -0
  56. package/fesm2022/star-ng-ui-listbox.mjs.map +1 -0
  57. package/fesm2022/star-ng-ui-media.mjs +833 -0
  58. package/fesm2022/star-ng-ui-media.mjs.map +1 -0
  59. package/fesm2022/star-ng-ui-menu.mjs +1840 -0
  60. package/fesm2022/star-ng-ui-menu.mjs.map +1 -0
  61. package/fesm2022/star-ng-ui-message.mjs +191 -0
  62. package/fesm2022/star-ng-ui-message.mjs.map +1 -0
  63. package/fesm2022/star-ng-ui-paginator.mjs +387 -0
  64. package/fesm2022/star-ng-ui-paginator.mjs.map +1 -0
  65. package/fesm2022/star-ng-ui-panel.mjs +324 -0
  66. package/fesm2022/star-ng-ui-panel.mjs.map +1 -0
  67. package/fesm2022/star-ng-ui-password.mjs +517 -0
  68. package/fesm2022/star-ng-ui-password.mjs.map +1 -0
  69. package/fesm2022/star-ng-ui-popover.mjs +241 -0
  70. package/fesm2022/star-ng-ui-popover.mjs.map +1 -0
  71. package/fesm2022/star-ng-ui-progress-bar.mjs +183 -0
  72. package/fesm2022/star-ng-ui-progress-bar.mjs.map +1 -0
  73. package/fesm2022/star-ng-ui-radio.mjs +411 -0
  74. package/fesm2022/star-ng-ui-radio.mjs.map +1 -0
  75. package/fesm2022/star-ng-ui-rating.mjs +211 -0
  76. package/fesm2022/star-ng-ui-rating.mjs.map +1 -0
  77. package/fesm2022/star-ng-ui-select-button.mjs +613 -0
  78. package/fesm2022/star-ng-ui-select-button.mjs.map +1 -0
  79. package/fesm2022/star-ng-ui-select.mjs +2547 -0
  80. package/fesm2022/star-ng-ui-select.mjs.map +1 -0
  81. package/fesm2022/star-ng-ui-skeleton.mjs +160 -0
  82. package/fesm2022/star-ng-ui-skeleton.mjs.map +1 -0
  83. package/fesm2022/star-ng-ui-slider.mjs +552 -0
  84. package/fesm2022/star-ng-ui-slider.mjs.map +1 -0
  85. package/fesm2022/star-ng-ui-spinner.mjs +148 -0
  86. package/fesm2022/star-ng-ui-spinner.mjs.map +1 -0
  87. package/fesm2022/star-ng-ui-stepper.mjs +360 -0
  88. package/fesm2022/star-ng-ui-stepper.mjs.map +1 -0
  89. package/fesm2022/star-ng-ui-table.mjs +3531 -0
  90. package/fesm2022/star-ng-ui-table.mjs.map +1 -0
  91. package/fesm2022/star-ng-ui-tabs.mjs +464 -0
  92. package/fesm2022/star-ng-ui-tabs.mjs.map +1 -0
  93. package/fesm2022/star-ng-ui-tag.mjs +129 -0
  94. package/fesm2022/star-ng-ui-tag.mjs.map +1 -0
  95. package/fesm2022/star-ng-ui-theme-switch.mjs +105 -0
  96. package/fesm2022/star-ng-ui-theme-switch.mjs.map +1 -0
  97. package/fesm2022/star-ng-ui-theme.mjs +98 -0
  98. package/fesm2022/star-ng-ui-theme.mjs.map +1 -0
  99. package/fesm2022/star-ng-ui-toast.mjs +298 -0
  100. package/fesm2022/star-ng-ui-toast.mjs.map +1 -0
  101. package/fesm2022/star-ng-ui-toggle-switch.mjs +316 -0
  102. package/fesm2022/star-ng-ui-toggle-switch.mjs.map +1 -0
  103. package/fesm2022/star-ng-ui-tooltip.mjs +297 -0
  104. package/fesm2022/star-ng-ui-tooltip.mjs.map +1 -0
  105. package/fesm2022/star-ng-ui-transloco.mjs +40 -0
  106. package/fesm2022/star-ng-ui-transloco.mjs.map +1 -0
  107. package/fesm2022/star-ng-ui-tree.mjs +1446 -0
  108. package/fesm2022/star-ng-ui-tree.mjs.map +1 -0
  109. package/fesm2022/star-ng-ui-utility.mjs +2134 -0
  110. package/fesm2022/star-ng-ui-utility.mjs.map +1 -0
  111. package/fesm2022/star-ng-ui.mjs +51 -0
  112. package/package.json +285 -3
  113. package/styles/_base.scss +70 -0
  114. package/styles/_shared.scss +2 -0
  115. package/styles/_tokens.scss +190 -0
  116. package/styles/controls/_accordion.scss +75 -0
  117. package/styles/controls/_autocomplete.scss +44 -0
  118. package/styles/controls/_avatar.scss +39 -0
  119. package/styles/controls/_breadcrumb.scss +45 -0
  120. package/styles/controls/_button.scss +137 -0
  121. package/styles/controls/_card.scss +38 -0
  122. package/styles/controls/_chart.scss +214 -0
  123. package/styles/controls/_chip.scss +51 -0
  124. package/styles/controls/_choice.scss +153 -0
  125. package/styles/controls/_data-display.scss +124 -0
  126. package/styles/controls/_date-picker.scss +300 -0
  127. package/styles/controls/_dialog.scss +123 -0
  128. package/styles/controls/_drawer.scss +118 -0
  129. package/styles/controls/_editor.scss +74 -0
  130. package/styles/controls/_field.scss +92 -0
  131. package/styles/controls/_file-upload.scss +136 -0
  132. package/styles/controls/_input-group.scss +104 -0
  133. package/styles/controls/_input-mask.scss +46 -0
  134. package/styles/controls/_input-number.scss +125 -0
  135. package/styles/controls/_knob.scss +76 -0
  136. package/styles/controls/_layout.scss +182 -0
  137. package/styles/controls/_listbox.scss +38 -0
  138. package/styles/controls/_media.scss +222 -0
  139. package/styles/controls/_menu.scss +254 -0
  140. package/styles/controls/_message.scss +48 -0
  141. package/styles/controls/_org-chart.scss +128 -0
  142. package/styles/controls/_paginator.scss +59 -0
  143. package/styles/controls/_panel.scss +83 -0
  144. package/styles/controls/_popover.scss +40 -0
  145. package/styles/controls/_progress-bar.scss +74 -0
  146. package/styles/controls/_select-button.scss +61 -0
  147. package/styles/controls/_select.scss +216 -0
  148. package/styles/controls/_skeleton.scss +43 -0
  149. package/styles/controls/_slider.scss +163 -0
  150. package/styles/controls/_spinner.scss +34 -0
  151. package/styles/controls/_stepper.scss +109 -0
  152. package/styles/controls/_table.scss +523 -0
  153. package/styles/controls/_tabs.scss +93 -0
  154. package/styles/controls/_tag.scss +84 -0
  155. package/styles/controls/_toast.scss +141 -0
  156. package/styles/controls/_tooltip.scss +14 -0
  157. package/styles/controls/_tree.scss +113 -0
  158. package/styles/controls/_utility.scss +654 -0
  159. package/styles/star-ng.css +5807 -0
  160. package/styles/star-ng.min.css +1 -0
  161. package/styles/star-ng.scss +50 -0
  162. package/theme/star-theme-first-paint.js +1 -0
  163. package/types/star-ng-ui-accordion.d.ts +82 -0
  164. package/types/star-ng-ui-autocomplete.d.ts +171 -0
  165. package/types/star-ng-ui-avatar.d.ts +43 -0
  166. package/types/star-ng-ui-badge.d.ts +46 -0
  167. package/types/star-ng-ui-breadcrumb.d.ts +39 -0
  168. package/types/star-ng-ui-button.d.ts +79 -0
  169. package/types/star-ng-ui-card.d.ts +29 -0
  170. package/types/star-ng-ui-chart.d.ts +337 -0
  171. package/types/star-ng-ui-checkbox.d.ts +92 -0
  172. package/types/star-ng-ui-core.d.ts +373 -0
  173. package/types/star-ng-ui-data-display.d.ts +438 -0
  174. package/types/star-ng-ui-date-picker.d.ts +701 -0
  175. package/types/star-ng-ui-dialog.d.ts +254 -0
  176. package/types/star-ng-ui-drawer.d.ts +29 -0
  177. package/types/star-ng-ui-editor.d.ts +96 -0
  178. package/types/star-ng-ui-field.d.ts +146 -0
  179. package/types/star-ng-ui-file-upload.d.ts +192 -0
  180. package/types/star-ng-ui-i18n-de.d.ts +7 -0
  181. package/types/star-ng-ui-i18n-es.d.ts +7 -0
  182. package/types/star-ng-ui-input-group.d.ts +58 -0
  183. package/types/star-ng-ui-input-mask.d.ts +126 -0
  184. package/types/star-ng-ui-input-number.d.ts +193 -0
  185. package/types/star-ng-ui-input-otp.d.ts +86 -0
  186. package/types/star-ng-ui-input-tags.d.ts +159 -0
  187. package/types/star-ng-ui-knob.d.ts +121 -0
  188. package/types/star-ng-ui-layout.d.ts +154 -0
  189. package/types/star-ng-ui-listbox.d.ts +170 -0
  190. package/types/star-ng-ui-media.d.ts +161 -0
  191. package/types/star-ng-ui-menu.d.ts +332 -0
  192. package/types/star-ng-ui-message.d.ts +52 -0
  193. package/types/star-ng-ui-paginator.d.ts +85 -0
  194. package/types/star-ng-ui-panel.d.ts +65 -0
  195. package/types/star-ng-ui-password.d.ts +129 -0
  196. package/types/star-ng-ui-popover.d.ts +57 -0
  197. package/types/star-ng-ui-progress-bar.d.ts +49 -0
  198. package/types/star-ng-ui-radio.d.ts +116 -0
  199. package/types/star-ng-ui-rating.d.ts +52 -0
  200. package/types/star-ng-ui-select-button.d.ts +169 -0
  201. package/types/star-ng-ui-select.d.ts +563 -0
  202. package/types/star-ng-ui-skeleton.d.ts +47 -0
  203. package/types/star-ng-ui-slider.d.ts +145 -0
  204. package/types/star-ng-ui-spinner.d.ts +29 -0
  205. package/types/star-ng-ui-stepper.d.ts +89 -0
  206. package/types/star-ng-ui-table.d.ts +885 -0
  207. package/types/star-ng-ui-tabs.d.ts +109 -0
  208. package/types/star-ng-ui-tag.d.ts +35 -0
  209. package/types/star-ng-ui-theme-switch.d.ts +36 -0
  210. package/types/star-ng-ui-theme.d.ts +95 -0
  211. package/types/star-ng-ui-toast.d.ts +84 -0
  212. package/types/star-ng-ui-toggle-switch.d.ts +81 -0
  213. package/types/star-ng-ui-tooltip.d.ts +66 -0
  214. package/types/star-ng-ui-transloco.d.ts +14 -0
  215. package/types/star-ng-ui-tree.d.ts +343 -0
  216. package/types/star-ng-ui-utility.d.ts +533 -0
  217. package/types/star-ng-ui.d.ts +51 -0
@@ -0,0 +1,438 @@
1
+ import * as i0 from "@angular/core";
2
+ import { TemplateRef } from "@angular/core";
3
+ import { StarOptionKey } from "@star-ng/ui/core";
4
+ import { StarTreeNode, TreeRow } from "@star-ng/ui/tree";
5
+ /** The rows in the DOM and the height of the two spacer rows that stand for the others. */
6
+ interface RowWindow {
7
+ /** Index of the first rendered row. */
8
+ readonly start: number;
9
+ /** Index after the last rendered row. */
10
+ readonly end: number;
11
+ /** Height in pixels of the rows before `start`. */
12
+ readonly before: number;
13
+ /** Height in pixels of the rows from `end` on. */
14
+ readonly after: number;
15
+ }
16
+ /** `aria-rowcount`: the visible rows and the header row. */
17
+ declare function ariaRowCount(rowCount: number): number;
18
+ export interface StarTreeTableColumn {
19
+ readonly field: string;
20
+ readonly header: string;
21
+ readonly width?: string;
22
+ readonly align?: 'start' | 'center' | 'end';
23
+ }
24
+ type TreeTableNode = StarTreeNode<Record<string, unknown>>;
25
+ type TreeTableRow = TreeRow<TreeTableNode>;
26
+ /** One rendered row: the row and its `aria-rowindex` (null in the default rendering). */
27
+ interface TreeTableEntry {
28
+ readonly row: TreeTableRow;
29
+ readonly aria: number | null;
30
+ }
31
+ /**
32
+ * Tree table (PrimeNG `p-treetable`): hierarchical rows with expand / collapse in a table,
33
+ * `role="treegrid"`, Right / Left on a row expand / collapse, Up / Down, Home and End move between
34
+ * rows. Node `data` holds the column values; the first column shows the tree toggle.
35
+ *
36
+ * Large tables: `virtualScroll` with `scrollHeight` and `virtualItemSize` renders only the rows in
37
+ * and near the viewport. It is still one `<table>`: a spacer row above and one below the rendered
38
+ * rows stand for the others, the header is sticky, and every row has the fixed height
39
+ * `virtualItemSize`. Keys, `aria-rowcount`, `aria-rowindex`, `aria-level`, `aria-setsize` and
40
+ * `aria-posinset` work over all open rows, also the ones that are not in the DOM.
41
+ *
42
+ * `<star-tree-table [nodes]="budget" [columns]="cols" [(expanded)]="open" ariaLabel="Budget" />`
43
+ */
44
+ export declare class StarTreeTable {
45
+ protected readonly text: import("@star-ng/ui/core").StarUiText;
46
+ private readonly doc;
47
+ readonly nodes: import("@angular/core").InputSignal<readonly TreeTableNode[]>;
48
+ readonly columns: import("@angular/core").InputSignal<readonly StarTreeTableColumn[]>;
49
+ readonly expanded: import("@angular/core").ModelSignal<readonly string[]>;
50
+ readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
51
+ /**
52
+ * Maximum height of the table (a CSS length, for example `20rem`). The table scrolls inside it
53
+ * and the header stays at the top.
54
+ */
55
+ readonly scrollHeight: import("@angular/core").InputSignal<string | null>;
56
+ /**
57
+ * Windowed rendering for large tables: only the rows in and near the viewport are in the DOM.
58
+ * Needs `scrollHeight`, and every row gets the fixed height `virtualItemSize` with its text on
59
+ * one line. Without `scrollHeight` the table renders all rows as usual.
60
+ */
61
+ readonly virtualScroll: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
62
+ /**
63
+ * Row height in pixels in windowed rendering. The default is the natural height of a row of
64
+ * this table.
65
+ */
66
+ readonly virtualItemSize: import("@angular/core").InputSignalWithTransform<number, unknown>;
67
+ private readonly scroller;
68
+ private readonly header;
69
+ private readonly openKeys;
70
+ private readonly parents;
71
+ /** The rows whose parents are open, in order. The sibling numbers come from the data. */
72
+ protected readonly rows: import("@angular/core").Signal<TreeTableRow[]>;
73
+ private readonly rowIndex;
74
+ /**
75
+ * The active row (the one with `tabindex` 0). It stays a row after the rows change, and it is
76
+ * kept in state, not read from the DOM: in windowed rendering its element may not exist.
77
+ */
78
+ protected readonly focusKey: import("@angular/core").WritableSignal<string | null>;
79
+ protected readonly windowed: import("@angular/core").Signal<boolean>;
80
+ private readonly scrollTop;
81
+ private readonly viewportHeight;
82
+ /** The rows that are in the DOM. Without windowed rendering: all of them. */
83
+ protected readonly window: import("@angular/core").Signal<RowWindow>;
84
+ protected readonly entries: import("@angular/core").Signal<TreeTableEntry[]>;
85
+ /** The active row is in the DOM. If it is not, the scroll area takes the Tab stop. */
86
+ protected readonly activeRendered: import("@angular/core").Signal<boolean>;
87
+ protected readonly ariaRowCount: typeof ariaRowCount;
88
+ /** Row to focus as soon as its element exists (it may need scrolling in first). */
89
+ private pendingFocus;
90
+ /** The focus waits on the scroll area because the focused row left the DOM. */
91
+ protected parked: boolean;
92
+ constructor();
93
+ protected isOpen(key: string): boolean;
94
+ toggle(key: string, open?: boolean): void;
95
+ /** Reads the scroll position and the height of the scroll area (windowed rendering). */
96
+ protected syncScroll(): void;
97
+ protected onRowFocus(event: FocusEvent, key: string): void;
98
+ /**
99
+ * Moves the focus to a row. The row becomes the active row at once. In windowed rendering the
100
+ * row is scrolled into the window first, and the focus is applied after its element renders.
101
+ */
102
+ private focusRow;
103
+ /** Scrolls a row fully into view, below the sticky header, with the least movement. */
104
+ private revealRow;
105
+ private rowElement;
106
+ private applyPendingFocus;
107
+ /**
108
+ * The browser drops the focus to the page body when the focused element leaves the DOM. Before
109
+ * the focused row leaves the window, the focus moves to the scroll area; the keys still work
110
+ * there, and the focus returns to the row when it renders again.
111
+ */
112
+ private parkFocus;
113
+ private restoreParkedFocus;
114
+ /** Tab into the scroll area (no row has the Tab stop): the focus goes to the active row. */
115
+ protected onScrollerFocus(): void;
116
+ /** Keys on the scroll area itself (the focus is parked there): they act on the active row. */
117
+ protected onScrollerKeydown(event: KeyboardEvent): void;
118
+ protected onKeydown(event: KeyboardEvent, row: TreeTableRow): void;
119
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarTreeTable, never>;
120
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarTreeTable, "star-tree-table", never, {
121
+ "nodes": {
122
+ "alias": "nodes";
123
+ "required": false;
124
+ "isSignal": true;
125
+ };
126
+ "columns": {
127
+ "alias": "columns";
128
+ "required": true;
129
+ "isSignal": true;
130
+ };
131
+ "expanded": {
132
+ "alias": "expanded";
133
+ "required": false;
134
+ "isSignal": true;
135
+ };
136
+ "ariaLabel": {
137
+ "alias": "ariaLabel";
138
+ "required": false;
139
+ "isSignal": true;
140
+ };
141
+ "scrollHeight": {
142
+ "alias": "scrollHeight";
143
+ "required": false;
144
+ "isSignal": true;
145
+ };
146
+ "virtualScroll": {
147
+ "alias": "virtualScroll";
148
+ "required": false;
149
+ "isSignal": true;
150
+ };
151
+ "virtualItemSize": {
152
+ "alias": "virtualItemSize";
153
+ "required": false;
154
+ "isSignal": true;
155
+ };
156
+ }, {
157
+ "expanded": "expandedChange";
158
+ }, never, never, true, never>;
159
+ }
160
+ /** Item template: `<ng-template starDataViewItem let-item let-layout="layout">`. */
161
+ export declare class StarDataViewItem<T = unknown> {
162
+ readonly starDataViewItemOf: import("@angular/core").InputSignal<readonly T[] | null>;
163
+ readonly template: TemplateRef<{
164
+ $implicit: T;
165
+ layout: "list" | "grid";
166
+ index: number;
167
+ }>;
168
+ static ngTemplateContextGuard<T>(_dir: StarDataViewItem<T>, _ctx: unknown): _ctx is {
169
+ $implicit: T;
170
+ layout: 'list' | 'grid';
171
+ index: number;
172
+ };
173
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarDataViewItem<any>, never>;
174
+ static ɵdir: i0.ɵɵDirectiveDeclaration<StarDataViewItem<any>, "ng-template[starDataViewItem]", never, {
175
+ "starDataViewItemOf": {
176
+ "alias": "starDataViewItemOf";
177
+ "required": false;
178
+ "isSignal": true;
179
+ };
180
+ }, {}, never, never, true, never>;
181
+ }
182
+ /**
183
+ * Data view (PrimeNG `p-dataview`): items in a list or a responsive grid, layout switch,
184
+ * client pagination and an empty state. It does not sort: sort the items before you pass them in.
185
+ * You design each item with a template.
186
+ *
187
+ * ```html
188
+ * <star-data-view [items]="products" [(layout)]="layout" paginator [rows]="6">
189
+ * <ng-template starDataViewItem let-p let-layout="layout">…</ng-template>
190
+ * </star-data-view>
191
+ * ```
192
+ */
193
+ export declare class StarDataView<T = unknown> {
194
+ protected readonly text: import("@star-ng/ui/core").StarUiText;
195
+ protected readonly layouts: ({
196
+ id: "list";
197
+ label: string;
198
+ icon: string;
199
+ } | {
200
+ id: "grid";
201
+ label: string;
202
+ icon: string;
203
+ })[];
204
+ readonly items: import("@angular/core").InputSignal<readonly T[]>;
205
+ readonly layout: import("@angular/core").ModelSignal<"list" | "grid">;
206
+ readonly paginator: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
207
+ readonly rows: import("@angular/core").ModelSignal<number>;
208
+ readonly first: import("@angular/core").ModelSignal<number>;
209
+ readonly emptyMessage: import("@angular/core").InputSignal<string | null>;
210
+ protected readonly itemTemplate: import("@angular/core").Signal<StarDataViewItem<any> | undefined>;
211
+ protected readonly pageItems: import("@angular/core").Signal<readonly T[]>;
212
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarDataView<any>, never>;
213
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarDataView<any>, "star-data-view", never, {
214
+ "items": {
215
+ "alias": "items";
216
+ "required": false;
217
+ "isSignal": true;
218
+ };
219
+ "layout": {
220
+ "alias": "layout";
221
+ "required": false;
222
+ "isSignal": true;
223
+ };
224
+ "paginator": {
225
+ "alias": "paginator";
226
+ "required": false;
227
+ "isSignal": true;
228
+ };
229
+ "rows": {
230
+ "alias": "rows";
231
+ "required": false;
232
+ "isSignal": true;
233
+ };
234
+ "first": {
235
+ "alias": "first";
236
+ "required": false;
237
+ "isSignal": true;
238
+ };
239
+ "emptyMessage": {
240
+ "alias": "emptyMessage";
241
+ "required": false;
242
+ "isSignal": true;
243
+ };
244
+ }, {
245
+ "layout": "layoutChange";
246
+ "rows": "rowsChange";
247
+ "first": "firstChange";
248
+ }, ["itemTemplate"], ["[starDataViewHeader]"], true, never>;
249
+ }
250
+ /**
251
+ * Order list (PrimeNG `p-orderlist`): reorder items with buttons or Alt + Arrow keys; the moved
252
+ * item keeps focus and a live region announces its new position.
253
+ * `<star-order-list [(value)]="priorities" optionLabel="name" ariaLabel="Queue order" />`
254
+ */
255
+ export declare class StarOrderList<T = unknown> {
256
+ protected readonly text: import("@star-ng/ui/core").StarUiText;
257
+ protected readonly hintId: string;
258
+ readonly value: import("@angular/core").ModelSignal<readonly T[]>;
259
+ readonly optionLabel: import("@angular/core").InputSignal<StarOptionKey<T> | null>;
260
+ readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
261
+ protected readonly selected: import("@angular/core").WritableSignal<number>;
262
+ protected readonly announcement: import("@angular/core").WritableSignal<string>;
263
+ protected readonly actions: ({
264
+ id: "top";
265
+ label: string;
266
+ icon: string;
267
+ } | {
268
+ id: "up";
269
+ label: string;
270
+ icon: string;
271
+ } | {
272
+ id: "down";
273
+ label: string;
274
+ icon: string;
275
+ } | {
276
+ id: "bottom";
277
+ label: string;
278
+ icon: string;
279
+ })[];
280
+ protected labelOf(item: T): string;
281
+ protected canMove(direction: 'top' | 'up' | 'down' | 'bottom'): boolean;
282
+ move(direction: 'top' | 'up' | 'down' | 'bottom'): void;
283
+ protected onKeydown(event: KeyboardEvent, index: number): void;
284
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarOrderList<any>, never>;
285
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarOrderList<any>, "star-order-list", never, {
286
+ "value": {
287
+ "alias": "value";
288
+ "required": false;
289
+ "isSignal": true;
290
+ };
291
+ "optionLabel": {
292
+ "alias": "optionLabel";
293
+ "required": false;
294
+ "isSignal": true;
295
+ };
296
+ "ariaLabel": {
297
+ "alias": "ariaLabel";
298
+ "required": false;
299
+ "isSignal": true;
300
+ };
301
+ }, {
302
+ "value": "valueChange";
303
+ }, never, never, true, never>;
304
+ }
305
+ /**
306
+ * Pick list (PrimeNG `p-picklist`): move items between a source and a target list.
307
+ * Double-click or Enter moves one item; buttons move the selection or everything.
308
+ * `<star-pick-list [(source)]="available" [(target)]="assigned" optionLabel="name" sourceHeader="Available" targetHeader="Assigned" />`
309
+ */
310
+ export declare class StarPickList<T = unknown> {
311
+ protected readonly text: import("@star-ng/ui/core").StarUiText;
312
+ private readonly idGen;
313
+ protected readonly ids: {
314
+ source: string;
315
+ target: string;
316
+ };
317
+ protected readonly sides: readonly ["source", "target"];
318
+ readonly source: import("@angular/core").ModelSignal<readonly T[]>;
319
+ readonly target: import("@angular/core").ModelSignal<readonly T[]>;
320
+ readonly optionLabel: import("@angular/core").InputSignal<StarOptionKey<T> | null>;
321
+ readonly sourceHeader: import("@angular/core").InputSignal<string | null>;
322
+ readonly targetHeader: import("@angular/core").InputSignal<string | null>;
323
+ private readonly selection;
324
+ protected labelOf(item: T): string;
325
+ protected picked(side: 'source' | 'target'): readonly T[];
326
+ protected isPicked(side: 'source' | 'target', item: T): boolean;
327
+ protected pick(side: 'source' | 'target', item: T): void;
328
+ transfer(from: 'source' | 'target', items: readonly T[]): void;
329
+ /** Reads a value with an optional key (exposed for custom templates). */
330
+ read(item: T, key: StarOptionKey<T>): unknown;
331
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarPickList<any>, never>;
332
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarPickList<any>, "star-pick-list", never, {
333
+ "source": {
334
+ "alias": "source";
335
+ "required": false;
336
+ "isSignal": true;
337
+ };
338
+ "target": {
339
+ "alias": "target";
340
+ "required": false;
341
+ "isSignal": true;
342
+ };
343
+ "optionLabel": {
344
+ "alias": "optionLabel";
345
+ "required": false;
346
+ "isSignal": true;
347
+ };
348
+ "sourceHeader": {
349
+ "alias": "sourceHeader";
350
+ "required": false;
351
+ "isSignal": true;
352
+ };
353
+ "targetHeader": {
354
+ "alias": "targetHeader";
355
+ "required": false;
356
+ "isSignal": true;
357
+ };
358
+ }, {
359
+ "source": "sourceChange";
360
+ "target": "targetChange";
361
+ }, never, never, true, never>;
362
+ }
363
+ export interface StarOrgNode<T = unknown> {
364
+ /** Unique id of the node in the chart. */
365
+ readonly key: string;
366
+ readonly label: string;
367
+ /** Second line, for example a role. */
368
+ readonly subtitle?: string;
369
+ readonly data?: T;
370
+ readonly children?: readonly StarOrgNode<T>[];
371
+ }
372
+ export interface StarOrgNodeContext<T> {
373
+ readonly $implicit: StarOrgNode<T>;
374
+ readonly level: number;
375
+ }
376
+ /** Custom node content: `<ng-template starOrgNode let-node>…</ng-template>`. */
377
+ export declare class StarOrgNodeTemplate<T = unknown> {
378
+ readonly template: TemplateRef<StarOrgNodeContext<T>>;
379
+ static ngTemplateContextGuard<T>(_dir: StarOrgNodeTemplate<T>, _ctx: unknown): _ctx is StarOrgNodeContext<T>;
380
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarOrgNodeTemplate<any>, never>;
381
+ static ɵdir: i0.ɵɵDirectiveDeclaration<StarOrgNodeTemplate<any>, "ng-template[starOrgNode]", never, {}, {}, never, never, true, never>;
382
+ }
383
+ /**
384
+ * Organization chart (PrimeNG `p-organizationchart`): a hierarchy drawn top-down with
385
+ * connector lines. The markup is a nested list, so assistive technology reads the levels.
386
+ * A node with children has a button that hides or shows its branch.
387
+ *
388
+ * `<star-org-chart ariaLabel="Safety team" [value]="team" [(collapsedKeys)]="closed" selectable />`
389
+ */
390
+ export declare class StarOrgChart<T = unknown> {
391
+ protected readonly text: import("@star-ng/ui/core").StarUiText;
392
+ /** Root node of the chart. */
393
+ readonly value: import("@angular/core").InputSignal<StarOrgNode<T>>;
394
+ readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
395
+ /** Keys of the nodes whose branch is hidden. Two-way. */
396
+ readonly collapsedKeys: import("@angular/core").ModelSignal<readonly string[]>;
397
+ /** Nodes are buttons; one node can be selected. */
398
+ readonly selectable: import("@angular/core").InputSignalWithTransform<boolean, boolean | "">;
399
+ readonly selectedKey: import("@angular/core").ModelSignal<string | null>;
400
+ readonly nodeSelect: import("@angular/core").OutputEmitterRef<StarOrgNode<T>>;
401
+ protected readonly nodeTemplate: import("@angular/core").Signal<StarOrgNodeTemplate<any> | undefined>;
402
+ protected isCollapsed(node: StarOrgNode<T>): boolean;
403
+ protected toggle(node: StarOrgNode<T>): void;
404
+ protected select(node: StarOrgNode<T>): void;
405
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarOrgChart<any>, never>;
406
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarOrgChart<any>, "star-org-chart", never, {
407
+ "value": {
408
+ "alias": "value";
409
+ "required": true;
410
+ "isSignal": true;
411
+ };
412
+ "ariaLabel": {
413
+ "alias": "ariaLabel";
414
+ "required": false;
415
+ "isSignal": true;
416
+ };
417
+ "collapsedKeys": {
418
+ "alias": "collapsedKeys";
419
+ "required": false;
420
+ "isSignal": true;
421
+ };
422
+ "selectable": {
423
+ "alias": "selectable";
424
+ "required": false;
425
+ "isSignal": true;
426
+ };
427
+ "selectedKey": {
428
+ "alias": "selectedKey";
429
+ "required": false;
430
+ "isSignal": true;
431
+ };
432
+ }, {
433
+ "collapsedKeys": "collapsedKeysChange";
434
+ "selectedKey": "selectedKeyChange";
435
+ "nodeSelect": "nodeSelect";
436
+ }, ["nodeTemplate"], never, true, never>;
437
+ }
438
+ export {};