@star-ng/ui 0.0.0-stage → 0.1.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 +148 -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 +782 -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 +392 -0
  22. package/fesm2022/star-ng-ui-core.mjs.map +1 -0
  23. package/fesm2022/star-ng-ui-data-display.mjs +1556 -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 +978 -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 +2523 -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 +3477 -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 +281 -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 +118 -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 +5803 -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 +310 -0
  173. package/types/star-ng-ui-data-display.d.ts +339 -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 +197 -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 +540 -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 +829 -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 +310 -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,540 @@
1
+ import { FormValueControl } from "@angular/forms/signals";
2
+ import { StarOptionKey } from "@star-ng/ui/core";
3
+ import { StarMenuItem } from "@star-ng/ui/menu";
4
+ import * as i0 from "@angular/core";
5
+ import { ElementRef, TemplateRef } from "@angular/core";
6
+ import { ConnectedPosition } from "@angular/cdk/overlay";
7
+ interface Leaf<TOption, TValue> {
8
+ readonly option: TOption;
9
+ readonly value: TValue;
10
+ /** Labels from the top level to the leaf. */
11
+ readonly path: readonly string[];
12
+ }
13
+ /**
14
+ * Cascade select (PrimeNG `p-cascadeselect`): choose one leaf of nested options, for example
15
+ * country → state → city. The popup is a menu with submenus (CDK Menu: arrow keys, typeahead,
16
+ * Escape). The value is the leaf (`optionValue`, or the whole option).
17
+ *
18
+ * ```html
19
+ * <star-cascade-select [options]="countries" optionLabel="name" optionChildren="children"
20
+ * optionValue="code" [(value)]="city" showPath />
21
+ * ```
22
+ */
23
+ export declare class StarCascadeSelect<TOption, TValue = TOption> implements FormValueControl<TValue | null> {
24
+ /** Keeps the CDK direction (overlays and menus) in step with `<html dir>`. */
25
+ private readonly directionSync;
26
+ protected readonly text: import("@star-ng/ui/core").StarUiText;
27
+ protected readonly positions: import("@angular/cdk/overlay").ConnectedPosition[];
28
+ readonly value: import("@angular/core").ModelSignal<TValue | null>;
29
+ readonly options: import("@angular/core").InputSignal<readonly TOption[]>;
30
+ readonly optionLabel: import("@angular/core").InputSignal<StarOptionKey<TOption> | null>;
31
+ /** Value stored in the form, read from the leaf. Omit to store the whole leaf option. */
32
+ readonly optionValue: import("@angular/core").InputSignal<StarOptionKey<TOption> | null>;
33
+ /** Property (or function) with the child options. An option without children is a leaf. */
34
+ readonly optionChildren: import("@angular/core").InputSignal<StarOptionKey<TOption, readonly TOption[] | null | undefined>>;
35
+ readonly optionDisabled: import("@angular/core").InputSignal<StarOptionKey<TOption> | null>;
36
+ readonly compareWith: import("@angular/core").InputSignal<(a: TValue, b: TValue) => boolean>;
37
+ readonly placeholder: import("@angular/core").InputSignal<string | null>;
38
+ /** Show the whole path ("Germany / Bavaria / Munich") instead of the leaf label. */
39
+ readonly showPath: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
40
+ readonly showClear: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
41
+ readonly size: import("@angular/core").InputSignal<"sm" | "md">;
42
+ readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
43
+ readonly inputId: import("@angular/core").InputSignal<string>;
44
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
45
+ readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
46
+ readonly required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
47
+ readonly invalid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
48
+ readonly touched: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
49
+ readonly touch: import("@angular/core").OutputEmitterRef<void>;
50
+ /** The user chose a leaf. */
51
+ readonly optionSelect: import("@angular/core").OutputEmitterRef<TOption>;
52
+ private childrenOf;
53
+ private labelOf;
54
+ /** Every leaf with its path, in display order. */
55
+ private readonly leaves;
56
+ protected readonly selected: import("@angular/core").Signal<Leaf<TOption, TValue> | null>;
57
+ /** The options as menu items: a parent opens a submenu, a leaf sets the value. */
58
+ protected readonly menuItems: import("@angular/core").Signal<readonly StarMenuItem[]>;
59
+ /**
60
+ * Accessible name of the trigger button: the label and the text on the button, so the visible
61
+ * text is part of the name (WCAG 2.5.3). `null` without `ariaLabel`: a `star-field` label then
62
+ * names the button.
63
+ */
64
+ protected readonly triggerName: import("@angular/core").Signal<string | null>;
65
+ protected display(leaf: Leaf<TOption, TValue>): string;
66
+ private choose;
67
+ clear(): void;
68
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarCascadeSelect<any, any>, never>;
69
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarCascadeSelect<any, any>, "star-cascade-select", never, {
70
+ "value": {
71
+ "alias": "value";
72
+ "required": false;
73
+ "isSignal": true;
74
+ };
75
+ "options": {
76
+ "alias": "options";
77
+ "required": false;
78
+ "isSignal": true;
79
+ };
80
+ "optionLabel": {
81
+ "alias": "optionLabel";
82
+ "required": false;
83
+ "isSignal": true;
84
+ };
85
+ "optionValue": {
86
+ "alias": "optionValue";
87
+ "required": false;
88
+ "isSignal": true;
89
+ };
90
+ "optionChildren": {
91
+ "alias": "optionChildren";
92
+ "required": false;
93
+ "isSignal": true;
94
+ };
95
+ "optionDisabled": {
96
+ "alias": "optionDisabled";
97
+ "required": false;
98
+ "isSignal": true;
99
+ };
100
+ "compareWith": {
101
+ "alias": "compareWith";
102
+ "required": false;
103
+ "isSignal": true;
104
+ };
105
+ "placeholder": {
106
+ "alias": "placeholder";
107
+ "required": false;
108
+ "isSignal": true;
109
+ };
110
+ "showPath": {
111
+ "alias": "showPath";
112
+ "required": false;
113
+ "isSignal": true;
114
+ };
115
+ "showClear": {
116
+ "alias": "showClear";
117
+ "required": false;
118
+ "isSignal": true;
119
+ };
120
+ "size": {
121
+ "alias": "size";
122
+ "required": false;
123
+ "isSignal": true;
124
+ };
125
+ "ariaLabel": {
126
+ "alias": "ariaLabel";
127
+ "required": false;
128
+ "isSignal": true;
129
+ };
130
+ "inputId": {
131
+ "alias": "inputId";
132
+ "required": false;
133
+ "isSignal": true;
134
+ };
135
+ "disabled": {
136
+ "alias": "disabled";
137
+ "required": false;
138
+ "isSignal": true;
139
+ };
140
+ "readonly": {
141
+ "alias": "readonly";
142
+ "required": false;
143
+ "isSignal": true;
144
+ };
145
+ "required": {
146
+ "alias": "required";
147
+ "required": false;
148
+ "isSignal": true;
149
+ };
150
+ "invalid": {
151
+ "alias": "invalid";
152
+ "required": false;
153
+ "isSignal": true;
154
+ };
155
+ "touched": {
156
+ "alias": "touched";
157
+ "required": false;
158
+ "isSignal": true;
159
+ };
160
+ }, {
161
+ "value": "valueChange";
162
+ "touch": "touch";
163
+ "optionSelect": "optionSelect";
164
+ }, never, never, true, never>;
165
+ }
166
+ /** Context of the custom option template: `<ng-template starOption let-option let-selected="selected">`. */
167
+ export interface StarOptionContext<T> {
168
+ readonly $implicit: T;
169
+ readonly selected: boolean;
170
+ readonly index: number;
171
+ }
172
+ /** Custom option row template for `star-select` and `star-multi-select`. */
173
+ export declare class StarOptionTemplate<T = unknown> {
174
+ /** Optional: pass the options array to type `let-option` in strict templates. */
175
+ readonly starOptionOf: import("@angular/core").InputSignal<readonly T[] | null>;
176
+ readonly template: TemplateRef<StarOptionContext<T>>;
177
+ static ngTemplateContextGuard<T>(_dir: StarOptionTemplate<T>, _ctx: unknown): _ctx is StarOptionContext<T>;
178
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarOptionTemplate<any>, never>;
179
+ static ɵdir: i0.ɵɵDirectiveDeclaration<StarOptionTemplate<any>, "ng-template[starOption]", never, {
180
+ "starOptionOf": {
181
+ "alias": "starOptionOf";
182
+ "required": false;
183
+ "isSignal": true;
184
+ };
185
+ }, {}, never, never, true, never>;
186
+ }
187
+ /** One rendered line of the option list: a group heading or an option. */
188
+ export type StarListRow<T> = {
189
+ readonly kind: 'group';
190
+ readonly key: string;
191
+ readonly label: string;
192
+ readonly id: string;
193
+ } | {
194
+ readonly kind: 'option';
195
+ readonly key: string;
196
+ readonly option: T;
197
+ /** Index in the visible options (keyboard order). */
198
+ readonly index: number;
199
+ readonly groupId: string | null;
200
+ };
201
+ /**
202
+ * Shared state and keyboard model of the dropdown list controls (WAI-ARIA combobox +
203
+ * listbox with `aria-activedescendant`). Subclasses add the selection model.
204
+ */
205
+ export declare abstract class StarOptionListBase<TOption, TValue> {
206
+ /** Keeps the CDK direction (overlays and menus) in step with `<html dir>`. */
207
+ private readonly directionSync;
208
+ protected readonly text: import("@star-ng/ui/core").StarUiText;
209
+ private readonly ids;
210
+ readonly options: import("@angular/core").InputSignal<readonly TOption[]>;
211
+ readonly optionLabel: import("@angular/core").InputSignal<StarOptionKey<TOption> | null>;
212
+ /** Value stored in the form. Omit to store the whole option. */
213
+ readonly optionValue: import("@angular/core").InputSignal<StarOptionKey<TOption> | null>;
214
+ readonly optionDisabled: import("@angular/core").InputSignal<StarOptionKey<TOption> | null>;
215
+ /** Equality for values (default `Object.is`). Use for object values from the server. */
216
+ readonly compareWith: import("@angular/core").InputSignal<(a: TValue, b: TValue) => boolean>;
217
+ /**
218
+ * Group heading of an option (property name or function). Options with the same heading
219
+ * show together under it, in the order in which the headings first appear.
220
+ */
221
+ readonly optionGroup: import("@angular/core").InputSignal<StarOptionKey<TOption> | null>;
222
+ /**
223
+ * Renders only the lines in view, for long option lists. Every line has the height
224
+ * `virtualItemSize` and option text stays on one line.
225
+ */
226
+ readonly virtualScroll: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
227
+ /** Line height in pixels with `virtualScroll`. */
228
+ readonly virtualItemSize: import("@angular/core").InputSignal<number>;
229
+ readonly placeholder: import("@angular/core").InputSignal<string | null>;
230
+ readonly filter: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
231
+ readonly filterPlaceholder: import("@angular/core").InputSignal<string | null>;
232
+ readonly showClear: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
233
+ readonly loading: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
234
+ readonly emptyMessage: import("@angular/core").InputSignal<string | null>;
235
+ readonly scrollHeight: import("@angular/core").InputSignal<string>;
236
+ readonly size: import("@angular/core").InputSignal<"sm" | "md">;
237
+ readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
238
+ readonly ariaLabelledBy: import("@angular/core").InputSignal<string | null>;
239
+ readonly inputId: import("@angular/core").InputSignal<string>;
240
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
241
+ readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
242
+ readonly required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
243
+ readonly invalid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
244
+ readonly touched: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
245
+ readonly name: import("@angular/core").InputSignal<string>;
246
+ readonly touch: import("@angular/core").OutputEmitterRef<void>;
247
+ readonly opened: import("@angular/core").OutputEmitterRef<void>;
248
+ readonly closed: import("@angular/core").OutputEmitterRef<void>;
249
+ readonly filterChange: import("@angular/core").OutputEmitterRef<string>;
250
+ protected readonly optionTemplate: import("@angular/core").Signal<StarOptionTemplate<any> | undefined>;
251
+ protected readonly trigger: import("@angular/core").Signal<ElementRef<HTMLElement>>;
252
+ private readonly filterInput;
253
+ protected readonly positions: ConnectedPosition[];
254
+ protected readonly listId: string;
255
+ protected readonly open: import("@angular/core").WritableSignal<boolean>;
256
+ protected readonly filterValue: import("@angular/core").WritableSignal<string>;
257
+ protected readonly activeIndex: import("@angular/core").WritableSignal<number>;
258
+ protected readonly showInvalid: import("@angular/core").Signal<boolean>;
259
+ protected readonly interactive: import("@angular/core").Signal<boolean>;
260
+ protected readonly visibleOptions: import("@angular/core").Signal<readonly TOption[]>;
261
+ /** With `optionGroup`: keeps each group together, in the order the groups first appear. */
262
+ protected groupedOrder(options: readonly TOption[]): readonly TOption[];
263
+ /** Group headings and options, in display order. */
264
+ protected readonly rows: import("@angular/core").Signal<readonly StarListRow<TOption>[]>;
265
+ private readonly listScrollTop;
266
+ private readonly listHeight;
267
+ /** First and last rendered line, and the heights of the lines left out. */
268
+ protected readonly virtualWindow: import("@angular/core").Signal<{
269
+ start: number;
270
+ end: number;
271
+ before: number;
272
+ after: number;
273
+ }>;
274
+ protected readonly renderedRows: import("@angular/core").Signal<readonly StarListRow<TOption>[]>;
275
+ protected onListScroll(event: Event): void;
276
+ protected readonly activeId: import("@angular/core").Signal<string | null>;
277
+ protected readonly emptyText: import("@angular/core").Signal<string>;
278
+ private typeahead;
279
+ private typeaheadTimer;
280
+ constructor();
281
+ /** True when the option is part of the current value. */
282
+ protected abstract isSelected(option: TOption): boolean;
283
+ /** Applies the user's choice of an option. */
284
+ protected abstract choose(option: TOption): void;
285
+ /** Index to highlight when the panel opens. */
286
+ protected abstract initialActiveIndex(): number;
287
+ /** Whether choosing an option closes the panel. */
288
+ protected abstract readonly closeOnChoose: boolean;
289
+ labelOf(option: TOption): string;
290
+ protected groupOf(option: TOption): string;
291
+ protected valueOf(option: TOption): TValue;
292
+ protected isDisabled(option: TOption): boolean;
293
+ protected equals(a: TValue, b: TValue): boolean;
294
+ protected optionId(index: number): string;
295
+ protected optionContext(option: TOption, index: number): StarOptionContext<TOption>;
296
+ openPanel(): void;
297
+ closePanel(focusTrigger?: boolean): void;
298
+ protected toggle(): void;
299
+ focus(options?: FocusOptions): void;
300
+ protected onPanelAttached(): void;
301
+ protected onOutsideClick(event: MouseEvent): void;
302
+ /** Keeps focus on the trigger (or filter) while the user clicks inside the panel. */
303
+ protected onPanelMousedown(event: MouseEvent): void;
304
+ protected onTriggerBlur(): void;
305
+ protected onFilterInput(value: string): void;
306
+ protected onOptionClick(option: TOption, index: number): void;
307
+ /** Keyboard model for both the trigger and the filter input. */
308
+ protected onKeydown(event: KeyboardEvent): void;
309
+ private chooseActive;
310
+ private moveActive;
311
+ protected firstEnabledFrom(start: number, step: 1 | -1): number;
312
+ /** Type a letter to jump to the next option whose label starts with the typed text. */
313
+ private runTypeahead;
314
+ private scrollActiveIntoView;
315
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarOptionListBase<any, any>, never>;
316
+ static ɵdir: i0.ɵɵDirectiveDeclaration<StarOptionListBase<any, any>, never, never, {
317
+ "options": {
318
+ "alias": "options";
319
+ "required": false;
320
+ "isSignal": true;
321
+ };
322
+ "optionLabel": {
323
+ "alias": "optionLabel";
324
+ "required": false;
325
+ "isSignal": true;
326
+ };
327
+ "optionValue": {
328
+ "alias": "optionValue";
329
+ "required": false;
330
+ "isSignal": true;
331
+ };
332
+ "optionDisabled": {
333
+ "alias": "optionDisabled";
334
+ "required": false;
335
+ "isSignal": true;
336
+ };
337
+ "compareWith": {
338
+ "alias": "compareWith";
339
+ "required": false;
340
+ "isSignal": true;
341
+ };
342
+ "optionGroup": {
343
+ "alias": "optionGroup";
344
+ "required": false;
345
+ "isSignal": true;
346
+ };
347
+ "virtualScroll": {
348
+ "alias": "virtualScroll";
349
+ "required": false;
350
+ "isSignal": true;
351
+ };
352
+ "virtualItemSize": {
353
+ "alias": "virtualItemSize";
354
+ "required": false;
355
+ "isSignal": true;
356
+ };
357
+ "placeholder": {
358
+ "alias": "placeholder";
359
+ "required": false;
360
+ "isSignal": true;
361
+ };
362
+ "filter": {
363
+ "alias": "filter";
364
+ "required": false;
365
+ "isSignal": true;
366
+ };
367
+ "filterPlaceholder": {
368
+ "alias": "filterPlaceholder";
369
+ "required": false;
370
+ "isSignal": true;
371
+ };
372
+ "showClear": {
373
+ "alias": "showClear";
374
+ "required": false;
375
+ "isSignal": true;
376
+ };
377
+ "loading": {
378
+ "alias": "loading";
379
+ "required": false;
380
+ "isSignal": true;
381
+ };
382
+ "emptyMessage": {
383
+ "alias": "emptyMessage";
384
+ "required": false;
385
+ "isSignal": true;
386
+ };
387
+ "scrollHeight": {
388
+ "alias": "scrollHeight";
389
+ "required": false;
390
+ "isSignal": true;
391
+ };
392
+ "size": {
393
+ "alias": "size";
394
+ "required": false;
395
+ "isSignal": true;
396
+ };
397
+ "ariaLabel": {
398
+ "alias": "ariaLabel";
399
+ "required": false;
400
+ "isSignal": true;
401
+ };
402
+ "ariaLabelledBy": {
403
+ "alias": "ariaLabelledBy";
404
+ "required": false;
405
+ "isSignal": true;
406
+ };
407
+ "inputId": {
408
+ "alias": "inputId";
409
+ "required": false;
410
+ "isSignal": true;
411
+ };
412
+ "disabled": {
413
+ "alias": "disabled";
414
+ "required": false;
415
+ "isSignal": true;
416
+ };
417
+ "readonly": {
418
+ "alias": "readonly";
419
+ "required": false;
420
+ "isSignal": true;
421
+ };
422
+ "required": {
423
+ "alias": "required";
424
+ "required": false;
425
+ "isSignal": true;
426
+ };
427
+ "invalid": {
428
+ "alias": "invalid";
429
+ "required": false;
430
+ "isSignal": true;
431
+ };
432
+ "touched": {
433
+ "alias": "touched";
434
+ "required": false;
435
+ "isSignal": true;
436
+ };
437
+ "name": {
438
+ "alias": "name";
439
+ "required": false;
440
+ "isSignal": true;
441
+ };
442
+ }, {
443
+ "touch": "touch";
444
+ "opened": "opened";
445
+ "closed": "closed";
446
+ "filterChange": "filterChange";
447
+ }, ["optionTemplate"], never, true, never>;
448
+ }
449
+ /**
450
+ * Multiple-choice dropdown (PrimeNG `p-multiselect`): checkbox list, "select all", filter,
451
+ * chip or comma display, `maxSelectedLabels`, `selectionLimit` and clear. Same keyboard model
452
+ * as `star-select`; Enter / Space toggle the active option and keep the panel open.
453
+ *
454
+ * `<star-multi-select [options]="tags" optionLabel="name" optionValue="id" [(value)]="ids" display="chip" filter />`
455
+ */
456
+ export declare class StarMultiSelect<TOption = unknown, TValue = TOption> extends StarOptionListBase<TOption, TValue> implements FormValueControl<readonly TValue[]> {
457
+ readonly value: import("@angular/core").ModelSignal<readonly TValue[]>;
458
+ /** `comma`: "A, B, C". `chip`: removable chips. */
459
+ readonly display: import("@angular/core").InputSignal<"comma" | "chip">;
460
+ /** Above this count the trigger shows "{n} items selected". */
461
+ readonly maxSelectedLabels: import("@angular/core").InputSignal<number>;
462
+ /** Maximum number of selected items (0 = no limit). Hides "select all". */
463
+ readonly selectionLimit: import("@angular/core").InputSignal<number>;
464
+ readonly showToggleAll: import("@angular/core").InputSignal<boolean>;
465
+ protected readonly closeOnChoose = false;
466
+ protected readonly selectedOptions: import("@angular/core").Signal<TOption[]>;
467
+ protected readonly collapsed: import("@angular/core").Signal<boolean>;
468
+ protected readonly selectedLabels: import("@angular/core").Signal<string>;
469
+ private readonly selectableVisible;
470
+ /** `true`, `false` or `'mixed'` for the "select all" box (over visible, enabled options). */
471
+ protected readonly allState: import("@angular/core").Signal<boolean | "mixed">;
472
+ protected isSelected(option: TOption): boolean;
473
+ protected choose(option: TOption): void;
474
+ protected initialActiveIndex(): number;
475
+ remove(option: TOption): void;
476
+ protected toggleAll(): void;
477
+ clear(): void;
478
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarMultiSelect<any, any>, never>;
479
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarMultiSelect<any, any>, "star-multi-select", never, {
480
+ "value": {
481
+ "alias": "value";
482
+ "required": false;
483
+ "isSignal": true;
484
+ };
485
+ "display": {
486
+ "alias": "display";
487
+ "required": false;
488
+ "isSignal": true;
489
+ };
490
+ "maxSelectedLabels": {
491
+ "alias": "maxSelectedLabels";
492
+ "required": false;
493
+ "isSignal": true;
494
+ };
495
+ "selectionLimit": {
496
+ "alias": "selectionLimit";
497
+ "required": false;
498
+ "isSignal": true;
499
+ };
500
+ "showToggleAll": {
501
+ "alias": "showToggleAll";
502
+ "required": false;
503
+ "isSignal": true;
504
+ };
505
+ }, {
506
+ "value": "valueChange";
507
+ }, never, never, true, never>;
508
+ }
509
+ /**
510
+ * Single-choice dropdown (PrimeNG `p-select`): typed options, `optionLabel` / `optionValue` /
511
+ * `optionDisabled`, filter, clear button, loading state, typeahead and full keyboard support
512
+ * (WAI-ARIA select-only combobox). The panel is a native popover, so it also works inside
513
+ * modal `star-dialog`s.
514
+ *
515
+ * ```html
516
+ * <star-select [options]="countries" optionLabel="name" optionValue="code"
517
+ * [formField]="form.country" filter showClear placeholder="Country" />
518
+ * ```
519
+ */
520
+ export declare class StarSelect<TOption = unknown, TValue = TOption> extends StarOptionListBase<TOption, TValue> implements FormValueControl<TValue | null> {
521
+ readonly value: import("@angular/core").ModelSignal<TValue | null>;
522
+ protected readonly closeOnChoose = true;
523
+ /** The option that matches the current value, or `undefined`. */
524
+ protected readonly selectedOption: import("@angular/core").Signal<TOption | undefined>;
525
+ protected isSelected(option: TOption): boolean;
526
+ protected choose(option: TOption): void;
527
+ protected initialActiveIndex(): number;
528
+ clear(): void;
529
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarSelect<any, any>, never>;
530
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarSelect<any, any>, "star-select", never, {
531
+ "value": {
532
+ "alias": "value";
533
+ "required": false;
534
+ "isSignal": true;
535
+ };
536
+ }, {
537
+ "value": "valueChange";
538
+ }, never, never, true, never>;
539
+ }
540
+ export {};
@@ -0,0 +1,47 @@
1
+ import * as i0 from "@angular/core";
2
+ /**
3
+ * Loading placeholder (PrimeNG `p-skeleton`). Respects `prefers-reduced-motion`.
4
+ * `<star-skeleton width="60%" height="1rem" />`, `<star-skeleton shape="circle" size="2.5rem" />`
5
+ */
6
+ export declare class StarSkeleton {
7
+ readonly shape: import("@angular/core").InputSignal<"rectangle" | "circle">;
8
+ readonly width: import("@angular/core").InputSignal<string>;
9
+ readonly height: import("@angular/core").InputSignal<string>;
10
+ /** Width and height together (squares and circles). */
11
+ readonly size: import("@angular/core").InputSignal<string | null>;
12
+ readonly borderRadius: import("@angular/core").InputSignal<string | null>;
13
+ readonly animation: import("@angular/core").InputSignal<"wave" | "none">;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarSkeleton, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarSkeleton, "star-skeleton", never, {
16
+ "shape": {
17
+ "alias": "shape";
18
+ "required": false;
19
+ "isSignal": true;
20
+ };
21
+ "width": {
22
+ "alias": "width";
23
+ "required": false;
24
+ "isSignal": true;
25
+ };
26
+ "height": {
27
+ "alias": "height";
28
+ "required": false;
29
+ "isSignal": true;
30
+ };
31
+ "size": {
32
+ "alias": "size";
33
+ "required": false;
34
+ "isSignal": true;
35
+ };
36
+ "borderRadius": {
37
+ "alias": "borderRadius";
38
+ "required": false;
39
+ "isSignal": true;
40
+ };
41
+ "animation": {
42
+ "alias": "animation";
43
+ "required": false;
44
+ "isSignal": true;
45
+ };
46
+ }, {}, never, never, true, never>;
47
+ }