@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,254 @@
1
+ import { StarButtonVariant } from "@star-ng/ui/button";
2
+ import * as i0 from "@angular/core";
3
+ import { InjectionToken, Injector, Type } from "@angular/core";
4
+ export interface StarConfirmOptions {
5
+ readonly header: string;
6
+ readonly message: string;
7
+ /** Phosphor icon class, for example `ph-bold ph-warning`. */
8
+ readonly icon?: string;
9
+ readonly acceptLabel?: string;
10
+ readonly rejectLabel?: string;
11
+ readonly acceptVariant?: StarButtonVariant;
12
+ /** Hide the reject button (acknowledge-only dialog). */
13
+ readonly rejectVisible?: boolean;
14
+ /** `reject` (default) puts first focus on the safe choice. */
15
+ readonly defaultFocus?: 'accept' | 'reject';
16
+ /**
17
+ * Anchor element: shows a small popup next to it (PrimeNG `p-confirmpopup`) instead of a
18
+ * modal dialog. Use for low-risk confirmations on a row or button.
19
+ */
20
+ readonly target?: HTMLElement;
21
+ }
22
+ interface PendingConfirm extends StarConfirmOptions {
23
+ readonly resolve: (accepted: boolean) => void;
24
+ }
25
+ /**
26
+ * Promise-based confirmation (PrimeNG `ConfirmationService` + `p-confirmdialog` /
27
+ * `p-confirmpopup`). Requests queue; place one `<star-confirm-host />` in the app shell.
28
+ * Pass `target` to anchor a popup to an element instead of opening a dialog.
29
+ *
30
+ * ```ts
31
+ * if (await this.confirm.ask({ header: 'Delete order', message: 'This cannot be undone.',
32
+ * acceptVariant: 'danger', icon: 'ph-bold ph-trash' })) { ... }
33
+ * ```
34
+ */
35
+ export declare class StarConfirmService {
36
+ private readonly queue;
37
+ readonly current: import("@angular/core").Signal<PendingConfirm>;
38
+ ask(options: StarConfirmOptions): Promise<boolean>;
39
+ /** Resolves the visible request. */
40
+ settle(accepted: boolean): void;
41
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarConfirmService, never>;
42
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
43
+ }
44
+ export declare class StarConfirmHost {
45
+ protected readonly confirm: StarConfirmService;
46
+ protected readonly text: import("@star-ng/ui/core").StarUiText;
47
+ private readonly popover;
48
+ protected readonly dialogRequest: import("@angular/core").Signal<PendingConfirm | null>;
49
+ protected readonly popupRequest: import("@angular/core").Signal<PendingConfirm | null>;
50
+ private shownPopup;
51
+ constructor();
52
+ /** Outside click or Escape closes the popup: treat as reject. */
53
+ protected onPopupHidden(): void;
54
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarConfirmHost, never>;
55
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarConfirmHost, "star-confirm-host", never, {}, {}, never, never, true, never>;
56
+ }
57
+ export type StarDialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
58
+ /**
59
+ * Dialog (PrimeNG `p-dialog`) built on the native `<dialog>` element: top-layer rendering,
60
+ * focus trap, focus restore and Escape handling come from the browser. Entry / exit animate
61
+ * with `@starting-style`; page scroll locks with `:has(dialog[open])`.
62
+ *
63
+ * ```html
64
+ * <star-dialog [(visible)]="editOpen" header="Edit order" size="lg">
65
+ * ...body...
66
+ * <div starDialogFooter>
67
+ * <star-button variant="ghost" (pressed)="editOpen.set(false)">Cancel</star-button>
68
+ * <star-button (pressed)="save()">Save</star-button>
69
+ * </div>
70
+ * </star-dialog>
71
+ * ```
72
+ * Put `autofocus` (native elements) or `data-autofocus` (components) on the element that
73
+ * should receive focus first.
74
+ */
75
+ export declare class StarDialog {
76
+ protected readonly text: import("@star-ng/ui/core").StarUiText;
77
+ readonly visible: import("@angular/core").ModelSignal<boolean>;
78
+ readonly header: import("@angular/core").InputSignal<string>;
79
+ readonly size: import("@angular/core").InputSignal<StarDialogSize>;
80
+ /** Fixed CSS width; overrides `size`. */
81
+ readonly width: import("@angular/core").InputSignal<string | null>;
82
+ /** Modal blocks the page behind (backdrop). Non-modal dialogs float above it. */
83
+ readonly modal: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
84
+ readonly closable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
85
+ readonly closeOnEscape: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
86
+ /** Clicking the backdrop closes the dialog. */
87
+ readonly dismissableMask: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
88
+ readonly showHeader: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
89
+ readonly role: import("@angular/core").InputSignal<"dialog" | "alertdialog">;
90
+ readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
91
+ readonly shown: import("@angular/core").OutputEmitterRef<void>;
92
+ readonly hidden: import("@angular/core").OutputEmitterRef<void>;
93
+ protected readonly headerId: string;
94
+ private readonly dialog;
95
+ private isOpen;
96
+ constructor();
97
+ close(): void;
98
+ /**
99
+ * Native `autofocus` only works on focusable elements. `data-autofocus` also works on a
100
+ * wrapper component such as `<star-button data-autofocus>`: its first focusable child gets focus.
101
+ */
102
+ private focusInitial;
103
+ protected onCancel(event: Event): void;
104
+ /** Browser-initiated close (for example a form with method="dialog"). */
105
+ protected onNativeClose(): void;
106
+ /** Emits `hidden` once per open. */
107
+ private markHidden;
108
+ protected onDialogClick(event: MouseEvent): void;
109
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarDialog, never>;
110
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarDialog, "star-dialog", never, {
111
+ "visible": {
112
+ "alias": "visible";
113
+ "required": false;
114
+ "isSignal": true;
115
+ };
116
+ "header": {
117
+ "alias": "header";
118
+ "required": false;
119
+ "isSignal": true;
120
+ };
121
+ "size": {
122
+ "alias": "size";
123
+ "required": false;
124
+ "isSignal": true;
125
+ };
126
+ "width": {
127
+ "alias": "width";
128
+ "required": false;
129
+ "isSignal": true;
130
+ };
131
+ "modal": {
132
+ "alias": "modal";
133
+ "required": false;
134
+ "isSignal": true;
135
+ };
136
+ "closable": {
137
+ "alias": "closable";
138
+ "required": false;
139
+ "isSignal": true;
140
+ };
141
+ "closeOnEscape": {
142
+ "alias": "closeOnEscape";
143
+ "required": false;
144
+ "isSignal": true;
145
+ };
146
+ "dismissableMask": {
147
+ "alias": "dismissableMask";
148
+ "required": false;
149
+ "isSignal": true;
150
+ };
151
+ "showHeader": {
152
+ "alias": "showHeader";
153
+ "required": false;
154
+ "isSignal": true;
155
+ };
156
+ "role": {
157
+ "alias": "role";
158
+ "required": false;
159
+ "isSignal": true;
160
+ };
161
+ "ariaLabel": {
162
+ "alias": "ariaLabel";
163
+ "required": false;
164
+ "isSignal": true;
165
+ };
166
+ }, {
167
+ "visible": "visibleChange";
168
+ "shown": "shown";
169
+ "hidden": "hidden";
170
+ }, never, ["[starDialogHeader]", "*", "[starDialogFooter]"], true, never>;
171
+ }
172
+ /** Data passed to the component opened by `StarDialogService.open()`. */
173
+ export declare const STAR_DIALOG_DATA: InjectionToken<unknown>;
174
+ export interface StarDialogConfig<D = unknown> {
175
+ readonly header?: string;
176
+ readonly size?: StarDialogSize;
177
+ readonly width?: string;
178
+ readonly data?: D;
179
+ /** Default true. */
180
+ readonly closable?: boolean;
181
+ /** Default true. */
182
+ readonly closeOnEscape?: boolean;
183
+ /** Close on a backdrop click. Default false. */
184
+ readonly dismissableMask?: boolean;
185
+ readonly role?: 'dialog' | 'alertdialog';
186
+ /** Accessible name when there is no header. */
187
+ readonly ariaLabel?: string;
188
+ }
189
+ /**
190
+ * Handle of a dialog opened from code. The opened component injects it to close itself with a
191
+ * result: `inject(StarDialogRef<Result>).close(result)`.
192
+ */
193
+ export declare class StarDialogRef<R = unknown> {
194
+ private readonly hide;
195
+ private resolve;
196
+ /** Resolves when the dialog has closed: the result, or `undefined` (Escape, ×, backdrop). */
197
+ readonly closed: Promise<R | undefined>;
198
+ private result;
199
+ private done;
200
+ constructor(hide: () => void);
201
+ close(result?: R): void;
202
+ /** Called by the container once the native dialog has closed. */
203
+ settle(): void;
204
+ }
205
+ /** Internal host: an `star-dialog` whose body is the requested component. */
206
+ export declare class StarDialogContainer {
207
+ readonly component: import("@angular/core").InputSignal<Type<unknown>>;
208
+ readonly config: import("@angular/core").InputSignal<StarDialogConfig<unknown>>;
209
+ readonly contentInjector: import("@angular/core").InputSignal<Injector>;
210
+ readonly visible: import("@angular/core").WritableSignal<boolean>;
211
+ /** Set by the service; runs after the native dialog closed. */
212
+ hidden: () => void;
213
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarDialogContainer, never>;
214
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarDialogContainer, "star-dialog-container", never, {
215
+ "component": {
216
+ "alias": "component";
217
+ "required": true;
218
+ "isSignal": true;
219
+ };
220
+ "config": {
221
+ "alias": "config";
222
+ "required": true;
223
+ "isSignal": true;
224
+ };
225
+ "contentInjector": {
226
+ "alias": "contentInjector";
227
+ "required": true;
228
+ "isSignal": true;
229
+ };
230
+ }, {}, never, never, true, never>;
231
+ }
232
+ /**
233
+ * Opens a component in a modal `star-dialog` from code (PrimeNG `DialogService` /
234
+ * `DynamicDialog`). No host element in the template is needed; dialogs stack in the top layer.
235
+ *
236
+ * ```ts
237
+ * const ref = this.dialogs.open(EditOrder, { header: 'Edit order', size: 'lg', data: { id } });
238
+ * const saved = await ref.closed; // value passed to ref.close(...) inside EditOrder
239
+ * ```
240
+ * Inside the opened component: `inject(STAR_DIALOG_DATA)` and `inject(StarDialogRef)`.
241
+ * Put its action buttons in an element with class `star-dialog__footer`.
242
+ */
243
+ export declare class StarDialogService {
244
+ private readonly appRef;
245
+ private readonly environment;
246
+ private readonly openRefs;
247
+ open<C, D = unknown, R = unknown>(component: Type<C>, config?: StarDialogConfig<D>, injector?: Injector): StarDialogRef<R>;
248
+ /** Closes every open dialog (for example on sign-out). */
249
+ closeAll(): void;
250
+ private destroy;
251
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarDialogService, never>;
252
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
253
+ }
254
+ export {};
@@ -0,0 +1,29 @@
1
+ import { StarDialog } from "@star-ng/ui/dialog";
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * Drawer (PrimeNG `p-drawer`): side sheet on the native `<dialog>` element. Same API as
5
+ * `star-dialog` (`[(visible)]`, `header`, `modal`, `dismissableMask`, `closeOnEscape`, footer slot)
6
+ * plus `position` and a CSS `size`. `left` and `right` are the physical edges of the screen, as in
7
+ * CSS; `start` and `end` follow the writing direction (`end` is the right edge in LTR and the left
8
+ * edge in RTL). Use `start` / `end` for a drawer that must switch sides in right-to-left.
9
+ *
10
+ * `<star-drawer [(visible)]="detailsOpen" header="ORD-1042" position="right" size="32rem">…</star-drawer>`
11
+ */
12
+ export declare class StarDrawer extends StarDialog {
13
+ readonly position: import("@angular/core").InputSignal<"left" | "right" | "start" | "end" | "top" | "bottom">;
14
+ /** Width (left / right / start / end) or height (top / bottom). */
15
+ readonly drawerSize: import("@angular/core").InputSignal<string>;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarDrawer, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarDrawer, "star-drawer", never, {
18
+ "position": {
19
+ "alias": "position";
20
+ "required": false;
21
+ "isSignal": true;
22
+ };
23
+ "drawerSize": {
24
+ "alias": "drawerSize";
25
+ "required": false;
26
+ "isSignal": true;
27
+ };
28
+ }, {}, never, ["[starDialogHeader]", "*", "[starDialogFooter]"], true, never>;
29
+ }
@@ -0,0 +1,96 @@
1
+ import { FormValueControl } from "@angular/forms/signals";
2
+ import { StarUiText } from "@star-ng/ui/core";
3
+ import * as i0 from "@angular/core";
4
+ interface EditorCommand {
5
+ readonly command: string;
6
+ readonly label: keyof StarUiText;
7
+ readonly icon: string;
8
+ readonly value?: string;
9
+ }
10
+ /**
11
+ * Rich text field (PrimeNG `p-editor`, without Quill): a `contenteditable` area with a
12
+ * formatting toolbar (bold, italic, underline, heading, lists, link, clear). Value is HTML,
13
+ * sanitized with Angular's `DomSanitizer` both when it is shown and when it is stored.
14
+ *
15
+ * Note: formatting uses `document.execCommand`, which browsers still support but no longer
16
+ * develop. For complex documents use a dedicated editor library.
17
+ *
18
+ * `<star-editor [formField]="form.response" ariaLabel="Response" />`
19
+ */
20
+ export declare class StarEditor implements FormValueControl<string> {
21
+ protected readonly text: StarUiText;
22
+ private readonly sanitizer;
23
+ /** The content as HTML. Edits by the user are stored sanitized. */
24
+ readonly value: import("@angular/core").ModelSignal<string>;
25
+ /** Text shown while the editor is empty. */
26
+ readonly placeholder: import("@angular/core").InputSignal<string>;
27
+ /** CSS `min-height` of the editing area. */
28
+ readonly minHeight: import("@angular/core").InputSignal<string>;
29
+ /** Accessible name of the editing area. */
30
+ readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
31
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
32
+ readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
33
+ readonly invalid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
34
+ readonly touched: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
35
+ readonly touch: import("@angular/core").OutputEmitterRef<void>;
36
+ protected readonly commands: readonly EditorCommand[];
37
+ protected label(cmd: EditorCommand): string;
38
+ private readonly area;
39
+ private readonly active;
40
+ private lastWritten;
41
+ constructor();
42
+ private sanitize;
43
+ protected onInput(): void;
44
+ protected run(cmd: EditorCommand): void;
45
+ protected link(): void;
46
+ protected isActive(cmd: EditorCommand): boolean | null;
47
+ protected refreshState(): void;
48
+ focus(): void;
49
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarEditor, never>;
50
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarEditor, "star-editor", never, {
51
+ "value": {
52
+ "alias": "value";
53
+ "required": false;
54
+ "isSignal": true;
55
+ };
56
+ "placeholder": {
57
+ "alias": "placeholder";
58
+ "required": false;
59
+ "isSignal": true;
60
+ };
61
+ "minHeight": {
62
+ "alias": "minHeight";
63
+ "required": false;
64
+ "isSignal": true;
65
+ };
66
+ "ariaLabel": {
67
+ "alias": "ariaLabel";
68
+ "required": false;
69
+ "isSignal": true;
70
+ };
71
+ "disabled": {
72
+ "alias": "disabled";
73
+ "required": false;
74
+ "isSignal": true;
75
+ };
76
+ "readonly": {
77
+ "alias": "readonly";
78
+ "required": false;
79
+ "isSignal": true;
80
+ };
81
+ "invalid": {
82
+ "alias": "invalid";
83
+ "required": false;
84
+ "isSignal": true;
85
+ };
86
+ "touched": {
87
+ "alias": "touched";
88
+ "required": false;
89
+ "isSignal": true;
90
+ };
91
+ }, {
92
+ "value": "valueChange";
93
+ "touch": "touch";
94
+ }, never, never, true, never>;
95
+ }
96
+ export {};
@@ -0,0 +1,146 @@
1
+ import * as i0 from "@angular/core";
2
+ import { Signal } from "@angular/core";
3
+ /** The part of a Signal Forms `FieldState` that the field wrapper reads. */
4
+ export interface StarFieldStateLike {
5
+ touched(): boolean;
6
+ invalid(): boolean;
7
+ required?(): boolean;
8
+ errors(): readonly {
9
+ readonly kind: string;
10
+ readonly message?: string;
11
+ }[];
12
+ }
13
+ /**
14
+ * Form field wrapper: uppercase label, the control, a hint and an error message
15
+ * (PrimeNG `p-floatlabel` / `p-iftalabel` + `p-message` in one, StarNG style).
16
+ *
17
+ * Pass a Signal Forms field state to show its first error after the user touches the control:
18
+ * ```html
19
+ * <star-field label="Email" hint="Work address" [state]="form.email()">
20
+ * <input starInput [formField]="form.email" type="email" />
21
+ * </star-field>
22
+ * ```
23
+ */
24
+ export declare class StarField {
25
+ readonly label: import("@angular/core").InputSignal<string>;
26
+ readonly hint: import("@angular/core").InputSignal<string>;
27
+ /** Explicit error text. Wins over `state` errors. */
28
+ readonly error: import("@angular/core").InputSignal<string | null>;
29
+ readonly state: import("@angular/core").InputSignal<StarFieldStateLike | null>;
30
+ readonly required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
31
+ /** Messages per validation error kind, for errors without a `message`. */
32
+ readonly messages: import("@angular/core").InputSignal<Readonly<Record<string, string>>>;
33
+ /**
34
+ * Id of the labelled control. Set automatically by `starInput` and by StarNG controls that
35
+ * render their own input (`star-password`, `star-input-number`, `star-input-mask`).
36
+ */
37
+ readonly for: import("@angular/core").InputSignal<string | null>;
38
+ private readonly ids;
39
+ readonly labelId: string;
40
+ readonly hintId: string;
41
+ readonly errorId: string;
42
+ readonly defaultControlId: string;
43
+ /** Input id registered by a StarNG control inside the field (see `linkControl`). */
44
+ private readonly linkedControlId;
45
+ protected readonly controlId: Signal<string>;
46
+ protected readonly isRequired: Signal<boolean>;
47
+ readonly errorText: Signal<string | null>;
48
+ /** Ids for `aria-describedby` of the control. */
49
+ readonly describedBy: Signal<string | null>;
50
+ /**
51
+ * Called by a StarNG control that renders its own `<input>` inside this field, so the label
52
+ * points at that input. The control also reads `describedBy()` and `errorText()`.
53
+ */
54
+ linkControl(inputId: Signal<string>): void;
55
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarField, never>;
56
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarField, "star-field", never, {
57
+ "label": {
58
+ "alias": "label";
59
+ "required": false;
60
+ "isSignal": true;
61
+ };
62
+ "hint": {
63
+ "alias": "hint";
64
+ "required": false;
65
+ "isSignal": true;
66
+ };
67
+ "error": {
68
+ "alias": "error";
69
+ "required": false;
70
+ "isSignal": true;
71
+ };
72
+ "state": {
73
+ "alias": "state";
74
+ "required": false;
75
+ "isSignal": true;
76
+ };
77
+ "required": {
78
+ "alias": "required";
79
+ "required": false;
80
+ "isSignal": true;
81
+ };
82
+ "messages": {
83
+ "alias": "messages";
84
+ "required": false;
85
+ "isSignal": true;
86
+ };
87
+ "for": {
88
+ "alias": "for";
89
+ "required": false;
90
+ "isSignal": true;
91
+ };
92
+ }, {}, never, ["*"], true, never>;
93
+ }
94
+ /**
95
+ * Applies StarNG input styling to a native `input` or `textarea` (PrimeNG `pInputText` /
96
+ * `pTextarea`). Inside `star-field` it links label, hint and error automatically.
97
+ * `autoResize` on a textarea grows it with its content (CSS `field-sizing: content`,
98
+ * with a script fallback for browsers without it).
99
+ */
100
+ export declare class StarInput {
101
+ protected readonly field: StarField | null;
102
+ private readonly host;
103
+ readonly size: import("@angular/core").InputSignal<"sm" | "md" | "lg">;
104
+ readonly invalid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
105
+ /**
106
+ * Signal Forms binds this with `[formField]`, so a field shows as invalid only after the user
107
+ * has touched it. Left unbound (`undefined`), a plain `invalid` shows at once.
108
+ */
109
+ readonly touched: import("@angular/core").InputSignal<boolean | undefined>;
110
+ readonly autoResize: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
111
+ /** Explicit id of the control. Defaults to the id generated by the parent `star-field`. */
112
+ readonly id: import("@angular/core").InputSignal<string | null>;
113
+ protected readonly resolvedId: Signal<string | null>;
114
+ protected readonly showInvalid: Signal<boolean>;
115
+ private readonly needsFallback;
116
+ constructor();
117
+ protected resizeFallback(): void;
118
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarInput, never>;
119
+ static ɵdir: i0.ɵɵDirectiveDeclaration<StarInput, "input[starInput], textarea[starInput]", never, {
120
+ "size": {
121
+ "alias": "size";
122
+ "required": false;
123
+ "isSignal": true;
124
+ };
125
+ "invalid": {
126
+ "alias": "invalid";
127
+ "required": false;
128
+ "isSignal": true;
129
+ };
130
+ "touched": {
131
+ "alias": "touched";
132
+ "required": false;
133
+ "isSignal": true;
134
+ };
135
+ "autoResize": {
136
+ "alias": "autoResize";
137
+ "required": false;
138
+ "isSignal": true;
139
+ };
140
+ "id": {
141
+ "alias": "id";
142
+ "required": false;
143
+ "isSignal": true;
144
+ };
145
+ }, {}, never, never, true, never>;
146
+ }