@star-ng/ui 0.0.0-placeholder.0 → 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 +147 -3
  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 -5
  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,310 @@
1
+ import * as i0 from "@angular/core";
2
+ import { EffectRef, EnvironmentProviders, InjectionToken, Injector, Provider } from "@angular/core";
3
+ import { FormArray, FormGroup } from "@angular/forms";
4
+ /** Text direction of an element: left-to-right or right-to-left. */
5
+ export type StarDirection = 'ltr' | 'rtl';
6
+ /**
7
+ * Text direction in force at one element. A `dir` attribute on the element or on an ancestor
8
+ * decides; with `dir="auto"` or no attribute the computed `direction` decides. The function
9
+ * reads the DOM each time it is called, so a handler that calls it follows a direction change at
10
+ * run time, and a part of the page that has its own `dir` attribute is respected.
11
+ *
12
+ * Controls use it in key handlers and pointer math: the horizontal arrow keys follow the visual
13
+ * direction, so in `rtl` the left arrow means "next".
14
+ */
15
+ export declare function starDirectionOf(element: Element | null | undefined): StarDirection;
16
+ /** `true` when the element is laid out right-to-left. See `starDirectionOf`. */
17
+ export declare function starIsRtl(element: Element | null | undefined): boolean;
18
+ /**
19
+ * Key of a keyboard event in "inline" terms: `'ArrowRight'` means toward the end of the line and
20
+ * `'ArrowLeft'` toward the start, whatever the direction. In right-to-left the two arrow keys are
21
+ * swapped; every other key is returned as it is. A handler can then be written once, as for
22
+ * left-to-right text:
23
+ *
24
+ * ```ts
25
+ * switch (starInlineKey(event)) {
26
+ * case 'ArrowRight': // next item in reading order
27
+ * }
28
+ * ```
29
+ *
30
+ * The element decides the direction; it defaults to `event.currentTarget`.
31
+ */
32
+ export declare function starInlineKey(event: KeyboardEvent, element?: Element | null): string;
33
+ /**
34
+ * Direction of the application: the `dir` attribute of `<html>` (or `<body>`), followed at run
35
+ * time. Controls that open an overlay or a menu (CDK `Overlay`, `CdkMenu`) inject it. It does
36
+ * two things:
37
+ *
38
+ * 1. `value` is a signal, so a control can react when the application switches the direction.
39
+ * 2. It keeps the root `Directionality` of `@angular/cdk/bidi` in step with the page. That
40
+ * service reads the attribute once when it is created; without this, overlays and menus
41
+ * would keep the old direction after a switch.
42
+ *
43
+ * The application only sets `dir` on `<html>`: `document.documentElement.dir = 'rtl'`.
44
+ */
45
+ export declare class StarDirectionService {
46
+ private readonly document;
47
+ private readonly directionality;
48
+ private readonly current;
49
+ /** The direction of the page now. */
50
+ readonly value: import("@angular/core").Signal<StarDirection>;
51
+ constructor();
52
+ /** Reads the attribute again. The observer calls it; call it by hand after a change that the observer cannot see. */
53
+ refresh(): void;
54
+ private read;
55
+ private sync;
56
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarDirectionService, never>;
57
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
58
+ }
59
+ /**
60
+ * Starts `StarDirectionService` when the application starts. Optional: the controls that open
61
+ * an overlay start the service themselves. Use it when the direction changes at run time before
62
+ * any such control exists, or when your own code reads `StarDirectionService.value`.
63
+ *
64
+ * ```ts
65
+ * bootstrapApplication(App, { providers: [provideStarDirection()] });
66
+ * ```
67
+ */
68
+ export declare function provideStarDirection(): EnvironmentProviders;
69
+ /**
70
+ * How a list control reads a property from an option: a property name or an accessor function.
71
+ * Same idea as PrimeNG `optionLabel` / `optionValue` / `optionDisabled`, but type safe.
72
+ */
73
+ export type StarOptionKey<T, R = unknown> = (keyof T & string) | ((option: T) => R);
74
+ export type StarSeverity = 'primary' | 'secondary' | 'success' | 'info' | 'warn' | 'danger';
75
+ export type StarSize = 'sm' | 'md' | 'lg';
76
+ export declare function readOption<T, R>(option: T, key: StarOptionKey<T, R> | null | undefined): unknown;
77
+ /** Text shown for an option. Falls back to the option itself for primitive options. */
78
+ export declare function optionText<T>(option: T, key: StarOptionKey<T> | null | undefined): string;
79
+ /** Locale-aware compare used by sorting: numbers and dates numerically, text with Intl.Collator. */
80
+ export declare function compareValues(a: unknown, b: unknown): number;
81
+ /** Case- and accent-insensitive "contains" match used by filters. */
82
+ export declare function matchesFilter(text: string, query: string): boolean;
83
+ /**
84
+ * Keeps a Reactive `FormGroup` (or `FormArray`) in step with the `SignalFormControl`s inside it.
85
+ *
86
+ * Angular 22 updates a parent group when a `SignalFormControl` value changes, but not when a
87
+ * Signal Forms rule (for example `disabled({ when })` or a conditional `required`) changes the
88
+ * child's status without a value change. The group then reports a stale `valid` / `status`.
89
+ * This effect watches every signal control's validity, disabled and pending state and calls
90
+ * `updateValueAndValidity()` on the group when one changes.
91
+ *
92
+ * Call it in an injection context (a field initializer or constructor):
93
+ * ```ts
94
+ * readonly form = new FormGroup({ country: new SignalFormControl<string | null>(null, rules) });
95
+ * private readonly sync = syncSignalFormControls(this.form);
96
+ * ```
97
+ */
98
+ export declare function syncSignalFormControls(group: FormGroup | FormArray, injector?: Injector): EffectRef;
99
+ /**
100
+ * Built-in texts of the StarNG UI controls (screen-reader labels, empty states, reports).
101
+ * Defaults are English. Override them once at app level:
102
+ * - `provideStarUiTextFromTransloco()` reads them from the active Transloco language (`ui.*` keys)
103
+ * and updates the controls live when the language changes.
104
+ * - `provideStarUiText({...})` sets fixed texts.
105
+ *
106
+ * Function entries take values (for example a count) and return the full sentence, so word order
107
+ * can change per language. Their parameter names are listed in `STAR_UI_TEXT_PARAMS`.
108
+ */
109
+ export interface StarUiText {
110
+ readonly close: string;
111
+ readonly clear: string;
112
+ readonly loading: string;
113
+ readonly actions: string;
114
+ readonly moreActions: string;
115
+ readonly ofTotal: (index: number, total: number) => string;
116
+ readonly expandItem: (label: string) => string;
117
+ readonly collapseItem: (label: string) => string;
118
+ readonly removeItem: (label: string) => string;
119
+ readonly tagsHint: string;
120
+ readonly tagAdded: (label: string) => string;
121
+ readonly tagRemoved: (label: string) => string;
122
+ readonly tagInvalid: (label: string) => string;
123
+ readonly tagDuplicate: (label: string) => string;
124
+ readonly tagLimit: (max: number) => string;
125
+ readonly notifications: string;
126
+ readonly accept: string;
127
+ readonly reject: string;
128
+ readonly selectPlaceholder: string;
129
+ readonly filterPlaceholder: string;
130
+ readonly emptyMessage: string;
131
+ readonly emptyFilterMessage: string;
132
+ readonly selectAll: string;
133
+ readonly selectedItems: (count: number) => string;
134
+ readonly searching: string;
135
+ readonly showOptions: string;
136
+ readonly resultsAvailable: (count: number) => string;
137
+ readonly pagination: string;
138
+ readonly firstPage: string;
139
+ readonly previousPage: string;
140
+ readonly nextPage: string;
141
+ readonly lastPage: string;
142
+ readonly page: (page: number) => string;
143
+ readonly rowsPerPage: string;
144
+ readonly pageReport: (first: number, last: number, total: number) => string;
145
+ readonly noData: string;
146
+ readonly selectRow: string;
147
+ readonly selectAllRows: string;
148
+ readonly filterBy: (column: string) => string;
149
+ readonly filterAll: string;
150
+ readonly filterMin: (column: string) => string;
151
+ readonly filterMax: (column: string) => string;
152
+ readonly filterMinShort: string;
153
+ readonly filterMaxShort: string;
154
+ readonly expandRow: string;
155
+ readonly collapseRow: string;
156
+ readonly rowDetails: string;
157
+ readonly reorderRows: string;
158
+ readonly sortMultiHint: string;
159
+ readonly terminalCommand: string;
160
+ readonly compareImages: string;
161
+ readonly editCell: (column: string) => string;
162
+ readonly columns: string;
163
+ readonly resizeColumn: (column: string) => string;
164
+ readonly moveColumnEarlier: (column: string) => string;
165
+ readonly moveColumnLater: (column: string) => string;
166
+ readonly layout: string;
167
+ readonly layoutList: string;
168
+ readonly layoutGrid: string;
169
+ readonly moveSelectedItem: string;
170
+ readonly orderListHint: string;
171
+ readonly moveTop: string;
172
+ readonly moveUp: string;
173
+ readonly moveDown: string;
174
+ readonly moveBottom: string;
175
+ readonly itemPosition: (label: string, position: number, total: number) => string;
176
+ readonly transfer: string;
177
+ readonly moveSelectedToTarget: string;
178
+ readonly moveAllToTarget: string;
179
+ readonly moveSelectedToSource: string;
180
+ readonly moveAllToSource: string;
181
+ readonly pickListSource: string;
182
+ readonly pickListTarget: string;
183
+ readonly chooseDate: string;
184
+ readonly chooseMonth: string;
185
+ readonly chooseYear: string;
186
+ readonly previousMonth: string;
187
+ readonly nextMonth: string;
188
+ readonly previousYears: string;
189
+ readonly nextYears: string;
190
+ readonly today: string;
191
+ readonly time: string;
192
+ readonly startTime: string;
193
+ readonly weekNumber: string;
194
+ readonly weekShort: string;
195
+ readonly endTime: string;
196
+ readonly done: string;
197
+ readonly increase: string;
198
+ readonly decrease: string;
199
+ readonly showPassword: string;
200
+ readonly hidePassword: string;
201
+ readonly passwordWeak: string;
202
+ readonly passwordFair: string;
203
+ readonly passwordGood: string;
204
+ readonly passwordStrong: string;
205
+ readonly passwordRuleLength: (min: number) => string;
206
+ readonly passwordRuleUpper: string;
207
+ readonly passwordRuleLower: string;
208
+ readonly passwordRuleNumber: string;
209
+ readonly passwordRuleSymbol: string;
210
+ readonly ruleMet: string;
211
+ readonly ruleNotMet: string;
212
+ readonly otpLabel: string;
213
+ readonly otpCharacter: (position: number, total: number) => string;
214
+ readonly ratingLabel: string;
215
+ readonly sliderMinimum: (label: string) => string;
216
+ readonly sliderMaximum: (label: string) => string;
217
+ readonly colorLabel: string;
218
+ readonly customColor: string;
219
+ readonly hexValue: (label: string) => string;
220
+ readonly chooseFiles: string;
221
+ readonly dropFiles: string;
222
+ readonly fileMaxSize: (size: string) => string;
223
+ readonly fileUpTo: (count: number) => string;
224
+ readonly uploadingFile: (name: string) => string;
225
+ readonly uploaded: string;
226
+ readonly fileTypeNotAllowed: (name: string) => string;
227
+ readonly fileTooLarge: (name: string, max: string) => string;
228
+ readonly fileLimitReached: (limit: number) => string;
229
+ readonly editorLabel: string;
230
+ readonly editorFormatting: (label: string) => string;
231
+ readonly editorBold: string;
232
+ readonly editorItalic: string;
233
+ readonly editorUnderline: string;
234
+ readonly editorHeading: string;
235
+ readonly editorBulletList: string;
236
+ readonly editorNumberedList: string;
237
+ readonly editorClearFormatting: string;
238
+ readonly editorLink: string;
239
+ readonly editorLinkPrompt: string;
240
+ readonly breadcrumb: string;
241
+ readonly stepperLabel: string;
242
+ readonly stepCompleted: string;
243
+ readonly resizePanes: string;
244
+ readonly dock: string;
245
+ readonly scrollToTop: string;
246
+ readonly theme: string;
247
+ readonly themeSystem: string;
248
+ readonly themeLight: string;
249
+ readonly themeDark: string;
250
+ readonly pauseSlides: string;
251
+ readonly playSlides: string;
252
+ readonly previousSlides: string;
253
+ readonly nextSlides: string;
254
+ readonly galleryLabel: string;
255
+ readonly previousImage: string;
256
+ readonly nextImage: string;
257
+ readonly showImage: (alt: string) => string;
258
+ readonly previewImage: (alt: string) => string;
259
+ readonly zoomIn: string;
260
+ readonly zoomOut: string;
261
+ readonly chartView: string;
262
+ readonly tableView: string;
263
+ readonly chartTotal: string;
264
+ readonly chartOther: string;
265
+ readonly chartCategory: string;
266
+ readonly chartValue: string;
267
+ readonly chartShare: string;
268
+ readonly chartSeries: string;
269
+ readonly chartX: string;
270
+ readonly chartY: string;
271
+ readonly chartTypeBar: string;
272
+ readonly chartTypeStackedBar: string;
273
+ readonly chartTypeLine: string;
274
+ readonly chartTypeArea: string;
275
+ readonly chartTypeDoughnut: string;
276
+ readonly chartTypePie: string;
277
+ readonly chartTypeRadar: string;
278
+ readonly chartTypePolarArea: string;
279
+ readonly chartTypeScatter: string;
280
+ readonly chartDescription: (kind: string, series: number, items: number, min: string, max: string) => string;
281
+ readonly meterValue: (value: string, total: number) => string;
282
+ }
283
+ export declare const STAR_UI_TEXT_DEFAULTS: StarUiText;
284
+ /** Parameter names of the function entries, in call order (used for `{{ name }}` in translations). */
285
+ export declare const STAR_UI_TEXT_PARAMS: { readonly [K in keyof StarUiText]?: readonly string[]; };
286
+ export declare const STAR_UI_TEXT: InjectionToken<StarUiText>;
287
+ /** Overrides some or all built-in control texts with fixed values. */
288
+ export declare function provideStarUiText(overrides: Partial<StarUiText>): Provider;
289
+ /**
290
+ * Builds a `StarUiText` whose entries read `source()` on every access. When `source` reads a
291
+ * signal, every OnPush control that renders a built-in text updates when that signal changes.
292
+ * Entries that `source()` does not return fall back to the English default.
293
+ *
294
+ * Use it in a factory when the signal lives in a service:
295
+ * `{ provide: STAR_UI_TEXT, useFactory: () => starUiTextFromSignal(inject(Language).text) }`.
296
+ */
297
+ export declare function starUiTextFromSignal(source: () => Partial<StarUiText>): StarUiText;
298
+ /**
299
+ * Provides the control texts from a function that reads a signal, so the language can change at
300
+ * run time without a translation library:
301
+ *
302
+ * ```ts
303
+ * const language = signal<'en' | 'de'>('en');
304
+ * provideStarUiTextFromSignal(() => (language() === 'de' ? STAR_UI_TEXT_DE : STAR_UI_TEXT_DEFAULTS));
305
+ * ```
306
+ *
307
+ * Do not spread a pack with getters into an object (`{ ...text }`): that reads every getter once and
308
+ * freezes the result. Pass a function, as shown above.
309
+ */
310
+ export declare function provideStarUiTextFromSignal(source: () => Partial<StarUiText>): Provider;
@@ -0,0 +1,339 @@
1
+ import * as i0 from "@angular/core";
2
+ import { TemplateRef } from "@angular/core";
3
+ import { StarOptionKey } from "@star-ng/ui/core";
4
+ import { StarTreeNode } from "@star-ng/ui/tree";
5
+ export interface StarTreeTableColumn {
6
+ readonly field: string;
7
+ readonly header: string;
8
+ readonly width?: string;
9
+ readonly align?: 'start' | 'center' | 'end';
10
+ }
11
+ interface TreeRow {
12
+ readonly node: StarTreeNode<Record<string, unknown>>;
13
+ readonly level: number;
14
+ readonly setSize: number;
15
+ readonly position: number;
16
+ }
17
+ /**
18
+ * Tree table (PrimeNG `p-treetable`): hierarchical rows with expand / collapse in a table,
19
+ * `role="treegrid"`, Right / Left on a row expand / collapse, Up / Down move between rows.
20
+ * Node `data` holds the column values; the first column shows the tree toggle.
21
+ *
22
+ * `<star-tree-table [nodes]="budget" [columns]="cols" [(expanded)]="open" ariaLabel="Budget" />`
23
+ */
24
+ export declare class StarTreeTable {
25
+ protected readonly text: import("@star-ng/ui/core").StarUiText;
26
+ readonly nodes: import("@angular/core").InputSignal<readonly StarTreeNode<Record<string, unknown>>[]>;
27
+ readonly columns: import("@angular/core").InputSignal<readonly StarTreeTableColumn[]>;
28
+ readonly expanded: import("@angular/core").ModelSignal<readonly string[]>;
29
+ readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
30
+ protected readonly rows: import("@angular/core").Signal<TreeRow[]>;
31
+ protected readonly focusKey: import("@angular/core").WritableSignal<string | null>;
32
+ protected isOpen(key: string): boolean;
33
+ toggle(key: string, open?: boolean): void;
34
+ protected onKeydown(event: KeyboardEvent, row: TreeRow): void;
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarTreeTable, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarTreeTable, "star-tree-table", never, {
37
+ "nodes": {
38
+ "alias": "nodes";
39
+ "required": false;
40
+ "isSignal": true;
41
+ };
42
+ "columns": {
43
+ "alias": "columns";
44
+ "required": true;
45
+ "isSignal": true;
46
+ };
47
+ "expanded": {
48
+ "alias": "expanded";
49
+ "required": false;
50
+ "isSignal": true;
51
+ };
52
+ "ariaLabel": {
53
+ "alias": "ariaLabel";
54
+ "required": false;
55
+ "isSignal": true;
56
+ };
57
+ }, {
58
+ "expanded": "expandedChange";
59
+ }, never, never, true, never>;
60
+ }
61
+ /** Item template: `<ng-template starDataViewItem let-item let-layout="layout">`. */
62
+ export declare class StarDataViewItem<T = unknown> {
63
+ readonly starDataViewItemOf: import("@angular/core").InputSignal<readonly T[] | null>;
64
+ readonly template: TemplateRef<{
65
+ $implicit: T;
66
+ layout: "list" | "grid";
67
+ index: number;
68
+ }>;
69
+ static ngTemplateContextGuard<T>(_dir: StarDataViewItem<T>, _ctx: unknown): _ctx is {
70
+ $implicit: T;
71
+ layout: 'list' | 'grid';
72
+ index: number;
73
+ };
74
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarDataViewItem<any>, never>;
75
+ static ɵdir: i0.ɵɵDirectiveDeclaration<StarDataViewItem<any>, "ng-template[starDataViewItem]", never, {
76
+ "starDataViewItemOf": {
77
+ "alias": "starDataViewItemOf";
78
+ "required": false;
79
+ "isSignal": true;
80
+ };
81
+ }, {}, never, never, true, never>;
82
+ }
83
+ /**
84
+ * Data view (PrimeNG `p-dataview`): items in a list or a responsive grid, layout switch,
85
+ * client pagination and an empty state. It does not sort: sort the items before you pass them in.
86
+ * You design each item with a template.
87
+ *
88
+ * ```html
89
+ * <star-data-view [items]="products" [(layout)]="layout" paginator [rows]="6">
90
+ * <ng-template starDataViewItem let-p let-layout="layout">…</ng-template>
91
+ * </star-data-view>
92
+ * ```
93
+ */
94
+ export declare class StarDataView<T = unknown> {
95
+ protected readonly text: import("@star-ng/ui/core").StarUiText;
96
+ protected readonly layouts: ({
97
+ id: "list";
98
+ label: string;
99
+ icon: string;
100
+ } | {
101
+ id: "grid";
102
+ label: string;
103
+ icon: string;
104
+ })[];
105
+ readonly items: import("@angular/core").InputSignal<readonly T[]>;
106
+ readonly layout: import("@angular/core").ModelSignal<"list" | "grid">;
107
+ readonly paginator: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
108
+ readonly rows: import("@angular/core").ModelSignal<number>;
109
+ readonly first: import("@angular/core").ModelSignal<number>;
110
+ readonly emptyMessage: import("@angular/core").InputSignal<string | null>;
111
+ protected readonly itemTemplate: import("@angular/core").Signal<StarDataViewItem<any> | undefined>;
112
+ protected readonly pageItems: import("@angular/core").Signal<readonly T[]>;
113
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarDataView<any>, never>;
114
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarDataView<any>, "star-data-view", never, {
115
+ "items": {
116
+ "alias": "items";
117
+ "required": false;
118
+ "isSignal": true;
119
+ };
120
+ "layout": {
121
+ "alias": "layout";
122
+ "required": false;
123
+ "isSignal": true;
124
+ };
125
+ "paginator": {
126
+ "alias": "paginator";
127
+ "required": false;
128
+ "isSignal": true;
129
+ };
130
+ "rows": {
131
+ "alias": "rows";
132
+ "required": false;
133
+ "isSignal": true;
134
+ };
135
+ "first": {
136
+ "alias": "first";
137
+ "required": false;
138
+ "isSignal": true;
139
+ };
140
+ "emptyMessage": {
141
+ "alias": "emptyMessage";
142
+ "required": false;
143
+ "isSignal": true;
144
+ };
145
+ }, {
146
+ "layout": "layoutChange";
147
+ "rows": "rowsChange";
148
+ "first": "firstChange";
149
+ }, ["itemTemplate"], ["[starDataViewHeader]"], true, never>;
150
+ }
151
+ /**
152
+ * Order list (PrimeNG `p-orderlist`): reorder items with buttons or Alt + Arrow keys; the moved
153
+ * item keeps focus and a live region announces its new position.
154
+ * `<star-order-list [(value)]="priorities" optionLabel="name" ariaLabel="Queue order" />`
155
+ */
156
+ export declare class StarOrderList<T = unknown> {
157
+ protected readonly text: import("@star-ng/ui/core").StarUiText;
158
+ protected readonly hintId: string;
159
+ readonly value: import("@angular/core").ModelSignal<readonly T[]>;
160
+ readonly optionLabel: import("@angular/core").InputSignal<StarOptionKey<T> | null>;
161
+ readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
162
+ protected readonly selected: import("@angular/core").WritableSignal<number>;
163
+ protected readonly announcement: import("@angular/core").WritableSignal<string>;
164
+ protected readonly actions: ({
165
+ id: "top";
166
+ label: string;
167
+ icon: string;
168
+ } | {
169
+ id: "up";
170
+ label: string;
171
+ icon: string;
172
+ } | {
173
+ id: "down";
174
+ label: string;
175
+ icon: string;
176
+ } | {
177
+ id: "bottom";
178
+ label: string;
179
+ icon: string;
180
+ })[];
181
+ protected labelOf(item: T): string;
182
+ protected canMove(direction: 'top' | 'up' | 'down' | 'bottom'): boolean;
183
+ move(direction: 'top' | 'up' | 'down' | 'bottom'): void;
184
+ protected onKeydown(event: KeyboardEvent, index: number): void;
185
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarOrderList<any>, never>;
186
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarOrderList<any>, "star-order-list", never, {
187
+ "value": {
188
+ "alias": "value";
189
+ "required": false;
190
+ "isSignal": true;
191
+ };
192
+ "optionLabel": {
193
+ "alias": "optionLabel";
194
+ "required": false;
195
+ "isSignal": true;
196
+ };
197
+ "ariaLabel": {
198
+ "alias": "ariaLabel";
199
+ "required": false;
200
+ "isSignal": true;
201
+ };
202
+ }, {
203
+ "value": "valueChange";
204
+ }, never, never, true, never>;
205
+ }
206
+ /**
207
+ * Pick list (PrimeNG `p-picklist`): move items between a source and a target list.
208
+ * Double-click or Enter moves one item; buttons move the selection or everything.
209
+ * `<star-pick-list [(source)]="available" [(target)]="assigned" optionLabel="name" sourceHeader="Available" targetHeader="Assigned" />`
210
+ */
211
+ export declare class StarPickList<T = unknown> {
212
+ protected readonly text: import("@star-ng/ui/core").StarUiText;
213
+ private readonly idGen;
214
+ protected readonly ids: {
215
+ source: string;
216
+ target: string;
217
+ };
218
+ protected readonly sides: readonly ["source", "target"];
219
+ readonly source: import("@angular/core").ModelSignal<readonly T[]>;
220
+ readonly target: import("@angular/core").ModelSignal<readonly T[]>;
221
+ readonly optionLabel: import("@angular/core").InputSignal<StarOptionKey<T> | null>;
222
+ readonly sourceHeader: import("@angular/core").InputSignal<string | null>;
223
+ readonly targetHeader: import("@angular/core").InputSignal<string | null>;
224
+ private readonly selection;
225
+ protected labelOf(item: T): string;
226
+ protected picked(side: 'source' | 'target'): readonly T[];
227
+ protected isPicked(side: 'source' | 'target', item: T): boolean;
228
+ protected pick(side: 'source' | 'target', item: T): void;
229
+ transfer(from: 'source' | 'target', items: readonly T[]): void;
230
+ /** Reads a value with an optional key (exposed for custom templates). */
231
+ read(item: T, key: StarOptionKey<T>): unknown;
232
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarPickList<any>, never>;
233
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarPickList<any>, "star-pick-list", never, {
234
+ "source": {
235
+ "alias": "source";
236
+ "required": false;
237
+ "isSignal": true;
238
+ };
239
+ "target": {
240
+ "alias": "target";
241
+ "required": false;
242
+ "isSignal": true;
243
+ };
244
+ "optionLabel": {
245
+ "alias": "optionLabel";
246
+ "required": false;
247
+ "isSignal": true;
248
+ };
249
+ "sourceHeader": {
250
+ "alias": "sourceHeader";
251
+ "required": false;
252
+ "isSignal": true;
253
+ };
254
+ "targetHeader": {
255
+ "alias": "targetHeader";
256
+ "required": false;
257
+ "isSignal": true;
258
+ };
259
+ }, {
260
+ "source": "sourceChange";
261
+ "target": "targetChange";
262
+ }, never, never, true, never>;
263
+ }
264
+ export interface StarOrgNode<T = unknown> {
265
+ /** Unique id of the node in the chart. */
266
+ readonly key: string;
267
+ readonly label: string;
268
+ /** Second line, for example a role. */
269
+ readonly subtitle?: string;
270
+ readonly data?: T;
271
+ readonly children?: readonly StarOrgNode<T>[];
272
+ }
273
+ export interface StarOrgNodeContext<T> {
274
+ readonly $implicit: StarOrgNode<T>;
275
+ readonly level: number;
276
+ }
277
+ /** Custom node content: `<ng-template starOrgNode let-node>…</ng-template>`. */
278
+ export declare class StarOrgNodeTemplate<T = unknown> {
279
+ readonly template: TemplateRef<StarOrgNodeContext<T>>;
280
+ static ngTemplateContextGuard<T>(_dir: StarOrgNodeTemplate<T>, _ctx: unknown): _ctx is StarOrgNodeContext<T>;
281
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarOrgNodeTemplate<any>, never>;
282
+ static ɵdir: i0.ɵɵDirectiveDeclaration<StarOrgNodeTemplate<any>, "ng-template[starOrgNode]", never, {}, {}, never, never, true, never>;
283
+ }
284
+ /**
285
+ * Organization chart (PrimeNG `p-organizationchart`): a hierarchy drawn top-down with
286
+ * connector lines. The markup is a nested list, so assistive technology reads the levels.
287
+ * A node with children has a button that hides or shows its branch.
288
+ *
289
+ * `<star-org-chart ariaLabel="Safety team" [value]="team" [(collapsedKeys)]="closed" selectable />`
290
+ */
291
+ export declare class StarOrgChart<T = unknown> {
292
+ protected readonly text: import("@star-ng/ui/core").StarUiText;
293
+ /** Root node of the chart. */
294
+ readonly value: import("@angular/core").InputSignal<StarOrgNode<T>>;
295
+ readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
296
+ /** Keys of the nodes whose branch is hidden. Two-way. */
297
+ readonly collapsedKeys: import("@angular/core").ModelSignal<readonly string[]>;
298
+ /** Nodes are buttons; one node can be selected. */
299
+ readonly selectable: import("@angular/core").InputSignalWithTransform<boolean, boolean | "">;
300
+ readonly selectedKey: import("@angular/core").ModelSignal<string | null>;
301
+ readonly nodeSelect: import("@angular/core").OutputEmitterRef<StarOrgNode<T>>;
302
+ protected readonly nodeTemplate: import("@angular/core").Signal<StarOrgNodeTemplate<any> | undefined>;
303
+ protected isCollapsed(node: StarOrgNode<T>): boolean;
304
+ protected toggle(node: StarOrgNode<T>): void;
305
+ protected select(node: StarOrgNode<T>): void;
306
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarOrgChart<any>, never>;
307
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarOrgChart<any>, "star-org-chart", never, {
308
+ "value": {
309
+ "alias": "value";
310
+ "required": true;
311
+ "isSignal": true;
312
+ };
313
+ "ariaLabel": {
314
+ "alias": "ariaLabel";
315
+ "required": false;
316
+ "isSignal": true;
317
+ };
318
+ "collapsedKeys": {
319
+ "alias": "collapsedKeys";
320
+ "required": false;
321
+ "isSignal": true;
322
+ };
323
+ "selectable": {
324
+ "alias": "selectable";
325
+ "required": false;
326
+ "isSignal": true;
327
+ };
328
+ "selectedKey": {
329
+ "alias": "selectedKey";
330
+ "required": false;
331
+ "isSignal": true;
332
+ };
333
+ }, {
334
+ "collapsedKeys": "collapsedKeysChange";
335
+ "selectedKey": "selectedKeyChange";
336
+ "nodeSelect": "nodeSelect";
337
+ }, ["nodeTemplate"], never, true, never>;
338
+ }
339
+ export {};