@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,701 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ElementRef, model } from "@angular/core";
3
+ import { ConnectedPosition } from "@angular/cdk/overlay";
4
+ import { FormValueControl } from "@angular/forms/signals";
5
+ /**
6
+ * Date helpers for the calendar controls. All values are local calendar days (time 00:00).
7
+ * Formatting and parsing use `Intl`, so the order of day / month / year follows the locale.
8
+ */
9
+ export interface StarDateRange {
10
+ readonly start: Date | null;
11
+ readonly end: Date | null;
12
+ }
13
+ /** Same calendar day at local midnight. */
14
+ export declare function startOfDay(date: Date): Date;
15
+ export declare function addDays(date: Date, days: number): Date;
16
+ /** Adds months and clamps the day (31 Jan + 1 month = 28/29 Feb). */
17
+ export declare function addMonths(date: Date, months: number): Date;
18
+ export declare function sameDay(a: Date | null | undefined, b: Date | null | undefined): boolean;
19
+ export declare function sameMonth(a: Date, b: Date): boolean;
20
+ /** Negative when `a` is an earlier day than `b`, 0 on the same day. */
21
+ export declare function compareDays(a: Date, b: Date): number;
22
+ /** `yyyy-mm-dd`, stable key for DOM lookups and tracking. */
23
+ export declare function isoDay(date: Date): string;
24
+ /** First day of the week for a locale (0 = Sunday), from `Intl.Locale` week info when available. */
25
+ export declare function localeFirstDay(locale?: string): number;
26
+ /** 6 x 7 days covering the month of `month`, starting on `firstDay`. */
27
+ export declare function monthGrid(month: Date, firstDay: number): Date[][];
28
+ export declare const DEFAULT_DATE_FORMAT: Intl.DateTimeFormatOptions;
29
+ export declare function formatDate(date: Date | null, locale: string | undefined, options: Intl.DateTimeFormatOptions): string;
30
+ /** Placeholder such as `dd/mm/yyyy` or `mm/dd/yyyy` for the locale's numeric date order. */
31
+ export declare function formatHint(locale: string | undefined): string;
32
+ /**
33
+ * Parses typed text. Accepts ISO `yyyy-mm-dd` and the locale's numeric order with any
34
+ * separators (`22/11/2026`, `22.11.26`, `11-22-2026` in en-US). Returns null when invalid.
35
+ */
36
+ export declare function parseDate(text: string, locale: string | undefined): Date | null;
37
+ export type StarCalendarView = 'day' | 'month' | 'year';
38
+ interface DayCell {
39
+ readonly date: Date;
40
+ readonly key: string;
41
+ readonly label: string;
42
+ readonly outside: boolean;
43
+ /** Not rendered: a day of another month when two or more months show. */
44
+ readonly blank: boolean;
45
+ readonly today: boolean;
46
+ readonly disabled: boolean;
47
+ }
48
+ /** ISO 8601 week number of a date (week 1 has the first Thursday of the year). */
49
+ export declare function isoWeek(date: Date): number;
50
+ /**
51
+ * Month grid used by `star-date-picker`, `star-date-range-picker`, or on its own as an inline
52
+ * calendar (PrimeNG `p-datepicker [inline]`). WAI-ARIA date grid keyboard model:
53
+ * arrows move by day / week, Home / End to week start / end, PageUp / PageDown by month,
54
+ * Shift + PageUp / PageDown by year, Enter / Space select. Month and year views for fast jumps.
55
+ */
56
+ export declare class StarCalendar {
57
+ protected readonly text: import("@star-ng/ui/core").StarUiText;
58
+ private readonly host;
59
+ private readonly injector;
60
+ protected readonly titleId: string;
61
+ protected readonly sameDay: typeof sameDay;
62
+ readonly mode: import("@angular/core").InputSignal<"single" | "range" | "multiple">;
63
+ readonly selected: import("@angular/core").InputSignal<Date | null>;
64
+ /** Chosen days in `'multiple'` mode. */
65
+ readonly selectedDates: import("@angular/core").InputSignal<readonly Date[]>;
66
+ /**
67
+ * Smallest unit the user chooses. `'month'` and `'year'` show only the month or year view
68
+ * and emit the first day of the chosen month or year.
69
+ */
70
+ readonly granularity: import("@angular/core").InputSignal<StarCalendarView>;
71
+ /** Months shown side by side in the day view. */
72
+ readonly numberOfMonths: import("@angular/core").InputSignal<number>;
73
+ /** Shows the ISO 8601 week number at the start of each week. */
74
+ readonly showWeek: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
75
+ readonly range: import("@angular/core").InputSignal<StarDateRange | null>;
76
+ readonly minDate: import("@angular/core").InputSignal<Date | null>;
77
+ readonly maxDate: import("@angular/core").InputSignal<Date | null>;
78
+ readonly disabledDates: import("@angular/core").InputSignal<readonly Date[]>;
79
+ /** Weekdays that cannot be chosen (0 = Sunday … 6 = Saturday). */
80
+ readonly disabledDays: import("@angular/core").InputSignal<readonly number[]>;
81
+ /** Extra rule, for example public holidays from the server. */
82
+ readonly dateDisabled: import("@angular/core").InputSignal<((date: Date) => boolean) | null>;
83
+ /** 0 = Sunday. Default: the locale's first day of the week. */
84
+ readonly firstDayOfWeek: import("@angular/core").InputSignal<number | null>;
85
+ readonly locale: import("@angular/core").InputSignal<string | undefined>;
86
+ readonly dateSelect: import("@angular/core").OutputEmitterRef<Date>;
87
+ readonly view: import("@angular/core").WritableSignal<StarCalendarView>;
88
+ protected readonly hover: import("@angular/core").WritableSignal<Date | null>;
89
+ private readonly today;
90
+ private readonly anchor;
91
+ /** Day with keyboard focus; also decides which month is shown. */
92
+ readonly focused: import("@angular/core").WritableSignal<Date>;
93
+ private readonly firstDay;
94
+ protected readonly monthName: import("@angular/core").Signal<string>;
95
+ protected readonly monthLabel: import("@angular/core").Signal<string>;
96
+ protected readonly weekdays: import("@angular/core").Signal<{
97
+ short: string;
98
+ long: string;
99
+ }[]>;
100
+ protected readonly monthCount: import("@angular/core").Signal<number>;
101
+ /**
102
+ * First shown month. It stays while the focused day is inside the shown months, so moving
103
+ * focus between two shown months does not shift the view.
104
+ */
105
+ private readonly viewStart;
106
+ /** One grid per shown month. With two or more months, days of other months are blank. */
107
+ protected readonly grids: import("@angular/core").Signal<{
108
+ key: string;
109
+ label: string;
110
+ weeks: {
111
+ number: number;
112
+ days: DayCell[];
113
+ }[];
114
+ }[]>;
115
+ protected readonly months: import("@angular/core").Signal<string[]>;
116
+ protected readonly years: import("@angular/core").Signal<number[]>;
117
+ isDisabled(date: Date): boolean;
118
+ protected isSelected(date: Date): boolean;
119
+ /** Range fill, including the hover preview while only the start is chosen. */
120
+ protected inRange(date: Date): boolean;
121
+ protected isRangeEdge(date: Date, edge: 'start' | 'end'): boolean;
122
+ protected choose(date: Date): void;
123
+ /** Moves focus into the grid (call after opening a popup). */
124
+ focusActive(): void;
125
+ protected page(step: 1 | -1): void;
126
+ protected onDayKeydown(event: KeyboardEvent): void;
127
+ protected onPickerKeydown(event: KeyboardEvent, kind: 'month' | 'year'): void;
128
+ protected pickMonth(month: number): void;
129
+ protected pickYear(year: number): void;
130
+ protected monthDisabled(month: number): boolean;
131
+ protected yearDisabled(year: number): boolean;
132
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarCalendar, never>;
133
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarCalendar, "star-calendar", never, {
134
+ "mode": {
135
+ "alias": "mode";
136
+ "required": false;
137
+ "isSignal": true;
138
+ };
139
+ "selected": {
140
+ "alias": "selected";
141
+ "required": false;
142
+ "isSignal": true;
143
+ };
144
+ "selectedDates": {
145
+ "alias": "selectedDates";
146
+ "required": false;
147
+ "isSignal": true;
148
+ };
149
+ "granularity": {
150
+ "alias": "granularity";
151
+ "required": false;
152
+ "isSignal": true;
153
+ };
154
+ "numberOfMonths": {
155
+ "alias": "numberOfMonths";
156
+ "required": false;
157
+ "isSignal": true;
158
+ };
159
+ "showWeek": {
160
+ "alias": "showWeek";
161
+ "required": false;
162
+ "isSignal": true;
163
+ };
164
+ "range": {
165
+ "alias": "range";
166
+ "required": false;
167
+ "isSignal": true;
168
+ };
169
+ "minDate": {
170
+ "alias": "minDate";
171
+ "required": false;
172
+ "isSignal": true;
173
+ };
174
+ "maxDate": {
175
+ "alias": "maxDate";
176
+ "required": false;
177
+ "isSignal": true;
178
+ };
179
+ "disabledDates": {
180
+ "alias": "disabledDates";
181
+ "required": false;
182
+ "isSignal": true;
183
+ };
184
+ "disabledDays": {
185
+ "alias": "disabledDays";
186
+ "required": false;
187
+ "isSignal": true;
188
+ };
189
+ "dateDisabled": {
190
+ "alias": "dateDisabled";
191
+ "required": false;
192
+ "isSignal": true;
193
+ };
194
+ "firstDayOfWeek": {
195
+ "alias": "firstDayOfWeek";
196
+ "required": false;
197
+ "isSignal": true;
198
+ };
199
+ "locale": {
200
+ "alias": "locale";
201
+ "required": false;
202
+ "isSignal": true;
203
+ };
204
+ }, {
205
+ "dateSelect": "dateSelect";
206
+ }, never, never, true, never>;
207
+ }
208
+ /**
209
+ * Shared input + popup behaviour of the date controls: typed entry with locale-aware parsing,
210
+ * a calendar popup (native popover, so it works in dialogs), Today / Clear bar, keyboard.
211
+ */
212
+ export declare abstract class StarDateInputBase<TValue> {
213
+ /** Keeps the CDK direction (overlays and menus) in step with `<html dir>`. */
214
+ private readonly directionSync;
215
+ protected readonly text: import("@star-ng/ui/core").StarUiText;
216
+ private readonly ids;
217
+ abstract readonly value: ReturnType<typeof model<TValue>>;
218
+ readonly placeholder: import("@angular/core").InputSignal<string | null>;
219
+ readonly minDate: import("@angular/core").InputSignal<Date | null>;
220
+ readonly maxDate: import("@angular/core").InputSignal<Date | null>;
221
+ readonly disabledDates: import("@angular/core").InputSignal<readonly Date[]>;
222
+ readonly disabledDays: import("@angular/core").InputSignal<readonly number[]>;
223
+ readonly dateDisabled: import("@angular/core").InputSignal<((date: Date) => boolean) | null>;
224
+ readonly firstDayOfWeek: import("@angular/core").InputSignal<number | null>;
225
+ /** BCP 47 locale for names and formats. Default: the browser locale. */
226
+ readonly locale: import("@angular/core").InputSignal<string | undefined>;
227
+ /** `Intl.DateTimeFormat` options for the input text (default numeric day / month / year). */
228
+ readonly dateFormat: import("@angular/core").InputSignal<Intl.DateTimeFormatOptions>;
229
+ /** Months shown side by side in the popup. */
230
+ readonly numberOfMonths: import("@angular/core").InputSignal<number>;
231
+ /** Shows the ISO 8601 week number at the start of each week. */
232
+ readonly showWeek: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
233
+ /**
234
+ * Clock of the typed time with `showTime`: `'24'` (14:30) or `'12'` (2:30 PM). Both forms
235
+ * are accepted when the user types.
236
+ */
237
+ readonly hourFormat: import("@angular/core").InputSignal<"24" | "12">;
238
+ readonly showButtonBar: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
239
+ readonly showClear: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
240
+ /** Disables typing; the date can only be picked. */
241
+ readonly readonlyInput: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
242
+ readonly size: import("@angular/core").InputSignal<"sm" | "md">;
243
+ readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
244
+ readonly inputId: import("@angular/core").InputSignal<string>;
245
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
246
+ readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
247
+ readonly required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
248
+ readonly invalid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
249
+ readonly touched: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
250
+ readonly name: import("@angular/core").InputSignal<string>;
251
+ readonly touch: import("@angular/core").OutputEmitterRef<void>;
252
+ readonly opened: import("@angular/core").OutputEmitterRef<void>;
253
+ readonly closed: import("@angular/core").OutputEmitterRef<void>;
254
+ protected readonly positions: ConnectedPosition[];
255
+ protected readonly panelId: string;
256
+ protected readonly open: import("@angular/core").WritableSignal<boolean>;
257
+ protected readonly showInvalid: import("@angular/core").Signal<boolean>;
258
+ protected readonly interactive: import("@angular/core").Signal<boolean>;
259
+ protected readonly hint: import("@angular/core").Signal<string>;
260
+ /** Time fields in the popup (`showTime` on the single and the range picker). */
261
+ protected readonly timeEnabled: () => boolean;
262
+ protected readonly timeStep: () => number;
263
+ protected timeFields(): readonly StarTimeField[];
264
+ /** Chosen days of the multiple-date picker. */
265
+ protected readonly calendarDates: () => readonly Date[];
266
+ /** Smallest unit the user chooses (the single picker's `view`). */
267
+ protected readonly granularity: () => StarCalendarView;
268
+ protected readonly input: import("@angular/core").Signal<ElementRef<HTMLInputElement>>;
269
+ protected readonly control: import("@angular/core").Signal<ElementRef<HTMLElement>>;
270
+ protected readonly calendar: import("@angular/core").Signal<StarCalendar | undefined>;
271
+ /** Text for the current value. */
272
+ protected abstract readonly displayText: () => string;
273
+ /** Text the user is typing; resets when the value changes. */
274
+ protected readonly typed: import("@angular/core").WritableSignal<string>;
275
+ protected abstract parseText(text: string): TValue | undefined;
276
+ protected abstract emptyValue(): TValue;
277
+ protected abstract pickToday(today: Date): void;
278
+ protected format(date: Date | null): string;
279
+ protected allowed(date: Date): boolean;
280
+ openPanel(): void;
281
+ closePanel(focusInput?: boolean): void;
282
+ protected togglePanel(): void;
283
+ protected onAttached(): void;
284
+ protected onOutsideClick(event: MouseEvent): void;
285
+ /** Applies typed text: valid dates set the value, invalid text reverts. */
286
+ protected commitTyped(): void;
287
+ /**
288
+ * Restores the text of the current value. Also writes the DOM: the `[value]` binding does not
289
+ * update when the signal returns to the value it last rendered.
290
+ */
291
+ private revertText;
292
+ protected onInputBlur(): void;
293
+ protected onInputKeydown(event: KeyboardEvent): void;
294
+ protected onPanelKeydown(event: KeyboardEvent): void;
295
+ protected today(): void;
296
+ clear(): void;
297
+ focus(options?: FocusOptions): void;
298
+ protected parseOne(text: string): Date | null | undefined;
299
+ /**
300
+ * "<date> hh:mm" or "<date>, hh:mm". A date without a time takes the fallback time.
301
+ * `undefined`: the text is not a valid date and time.
302
+ */
303
+ protected parseDateTime(text: string, hours: number, minutes: number): Date | undefined;
304
+ /** `date` moved into `minDate` … `maxDate`, compared to the minute. */
305
+ protected clampTime(date: Date): Date;
306
+ protected timeHint(): string;
307
+ protected formatDateTime(date: Date | null): string;
308
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarDateInputBase<any>, never>;
309
+ static ɵdir: i0.ɵɵDirectiveDeclaration<StarDateInputBase<any>, never, never, {
310
+ "placeholder": {
311
+ "alias": "placeholder";
312
+ "required": false;
313
+ "isSignal": true;
314
+ };
315
+ "minDate": {
316
+ "alias": "minDate";
317
+ "required": false;
318
+ "isSignal": true;
319
+ };
320
+ "maxDate": {
321
+ "alias": "maxDate";
322
+ "required": false;
323
+ "isSignal": true;
324
+ };
325
+ "disabledDates": {
326
+ "alias": "disabledDates";
327
+ "required": false;
328
+ "isSignal": true;
329
+ };
330
+ "disabledDays": {
331
+ "alias": "disabledDays";
332
+ "required": false;
333
+ "isSignal": true;
334
+ };
335
+ "dateDisabled": {
336
+ "alias": "dateDisabled";
337
+ "required": false;
338
+ "isSignal": true;
339
+ };
340
+ "firstDayOfWeek": {
341
+ "alias": "firstDayOfWeek";
342
+ "required": false;
343
+ "isSignal": true;
344
+ };
345
+ "locale": {
346
+ "alias": "locale";
347
+ "required": false;
348
+ "isSignal": true;
349
+ };
350
+ "dateFormat": {
351
+ "alias": "dateFormat";
352
+ "required": false;
353
+ "isSignal": true;
354
+ };
355
+ "numberOfMonths": {
356
+ "alias": "numberOfMonths";
357
+ "required": false;
358
+ "isSignal": true;
359
+ };
360
+ "showWeek": {
361
+ "alias": "showWeek";
362
+ "required": false;
363
+ "isSignal": true;
364
+ };
365
+ "hourFormat": {
366
+ "alias": "hourFormat";
367
+ "required": false;
368
+ "isSignal": true;
369
+ };
370
+ "showButtonBar": {
371
+ "alias": "showButtonBar";
372
+ "required": false;
373
+ "isSignal": true;
374
+ };
375
+ "showClear": {
376
+ "alias": "showClear";
377
+ "required": false;
378
+ "isSignal": true;
379
+ };
380
+ "readonlyInput": {
381
+ "alias": "readonlyInput";
382
+ "required": false;
383
+ "isSignal": true;
384
+ };
385
+ "size": {
386
+ "alias": "size";
387
+ "required": false;
388
+ "isSignal": true;
389
+ };
390
+ "ariaLabel": {
391
+ "alias": "ariaLabel";
392
+ "required": false;
393
+ "isSignal": true;
394
+ };
395
+ "inputId": {
396
+ "alias": "inputId";
397
+ "required": false;
398
+ "isSignal": true;
399
+ };
400
+ "disabled": {
401
+ "alias": "disabled";
402
+ "required": false;
403
+ "isSignal": true;
404
+ };
405
+ "readonly": {
406
+ "alias": "readonly";
407
+ "required": false;
408
+ "isSignal": true;
409
+ };
410
+ "required": {
411
+ "alias": "required";
412
+ "required": false;
413
+ "isSignal": true;
414
+ };
415
+ "invalid": {
416
+ "alias": "invalid";
417
+ "required": false;
418
+ "isSignal": true;
419
+ };
420
+ "touched": {
421
+ "alias": "touched";
422
+ "required": false;
423
+ "isSignal": true;
424
+ };
425
+ "name": {
426
+ "alias": "name";
427
+ "required": false;
428
+ "isSignal": true;
429
+ };
430
+ }, {
431
+ "touch": "touch";
432
+ "opened": "opened";
433
+ "closed": "closed";
434
+ }, never, never, true, never>;
435
+ }
436
+ /** One time input in the popup. */
437
+ export interface StarTimeField {
438
+ readonly label: string;
439
+ /** `hh:mm`, or `''` when the date is not chosen yet. */
440
+ readonly value: string;
441
+ readonly set: (time: string) => void;
442
+ }
443
+ /**
444
+ * Date picker (PrimeNG `p-datepicker`): typed entry (`dd/mm/yyyy` or the locale's order, or ISO),
445
+ * calendar popup with month / year views, min / max, disabled dates and weekdays, Today / Clear.
446
+ *
447
+ * `showTime` adds a time of day: the value keeps hours and minutes, the text is
448
+ * `dd/mm/yyyy, hh:mm` in the 24-hour clock, and the popup has a time field and stays open
449
+ * until the user chooses Done. With `showTime`, `minDate` / `maxDate` also limit the time: a
450
+ * value outside the limits moves to the nearest limit.
451
+ *
452
+ * `view="month"` or `view="year"` chooses a month or a year: the value is its first day and the
453
+ * text is `mm/yyyy` or `yyyy`.
454
+ *
455
+ * `<star-date-picker [formField]="form.receivedOn" [maxDate]="today" showButtonBar />`
456
+ */
457
+ export declare class StarDatePicker extends StarDateInputBase<Date | null> implements FormValueControl<Date | null> {
458
+ readonly value: import("@angular/core").ModelSignal<Date | null>;
459
+ /** Adds a time of day (hours and minutes) to the value. */
460
+ readonly showTime: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
461
+ /** Minute step of the time field. */
462
+ readonly stepMinute: import("@angular/core").InputSignal<number>;
463
+ /** Unit to choose: a day (default), a month or a year. */
464
+ readonly view: import("@angular/core").InputSignal<StarCalendarView>;
465
+ readonly dateSelect: import("@angular/core").OutputEmitterRef<Date>;
466
+ protected readonly mode: "single";
467
+ protected readonly timeEnabled: () => boolean;
468
+ protected readonly timeStep: () => number;
469
+ protected readonly granularity: import("@angular/core").InputSignal<StarCalendarView>;
470
+ protected readonly hint: import("@angular/core").Signal<string>;
471
+ protected readonly displayText: () => string;
472
+ protected readonly hasValue: import("@angular/core").Signal<boolean>;
473
+ protected readonly calendarSelected: import("@angular/core").ModelSignal<Date | null>;
474
+ protected readonly calendarRange: import("@angular/core").WritableSignal<StarDateRange | null>;
475
+ protected parseText(text: string): Date | null | undefined;
476
+ /** `mm/yyyy`, `yyyy-mm` or `yyyy`: the first day of that month or year. */
477
+ private parsePeriod;
478
+ /** A month or year is allowed when any part of it is inside `minDate` … `maxDate`. */
479
+ private periodAllowed;
480
+ protected emptyValue(): Date | null;
481
+ protected pickToday(today: Date): void;
482
+ protected onDateSelect(date: Date): void;
483
+ protected timeFields(): readonly StarTimeField[];
484
+ /** `date` at the current time of day, rounded down to the minute step. */
485
+ private atCurrentTime;
486
+ private setValue;
487
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarDatePicker, never>;
488
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarDatePicker, "star-date-picker", never, {
489
+ "value": {
490
+ "alias": "value";
491
+ "required": false;
492
+ "isSignal": true;
493
+ };
494
+ "showTime": {
495
+ "alias": "showTime";
496
+ "required": false;
497
+ "isSignal": true;
498
+ };
499
+ "stepMinute": {
500
+ "alias": "stepMinute";
501
+ "required": false;
502
+ "isSignal": true;
503
+ };
504
+ "view": {
505
+ "alias": "view";
506
+ "required": false;
507
+ "isSignal": true;
508
+ };
509
+ }, {
510
+ "value": "valueChange";
511
+ "dateSelect": "dateSelect";
512
+ }, never, never, true, never>;
513
+ }
514
+ /**
515
+ * Date range picker (PrimeNG `p-datepicker selectionMode="range"`). Value: `{ start, end }`.
516
+ * First click sets the start, second click the end (swapped if earlier); hovering previews.
517
+ * Type `01/11/2026 – 15/11/2026` (any separator between the two dates).
518
+ */
519
+ export declare class StarDateRangePicker extends StarDateInputBase<StarDateRange | null> implements FormValueControl<StarDateRange | null> {
520
+ readonly value: import("@angular/core").ModelSignal<StarDateRange | null>;
521
+ /**
522
+ * Adds a time of day to both ends. A new start is at 00:00 and a new end at 23:59; the popup
523
+ * has a start and an end time field and stays open until the user chooses Done.
524
+ */
525
+ readonly showTime: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
526
+ /** Minute step of the time fields. */
527
+ readonly stepMinute: import("@angular/core").InputSignal<number>;
528
+ readonly rangeSelect: import("@angular/core").OutputEmitterRef<StarDateRange>;
529
+ protected readonly mode: "range";
530
+ protected readonly timeEnabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
531
+ protected readonly timeStep: () => number;
532
+ protected readonly hint: import("@angular/core").Signal<string>;
533
+ private readonly show;
534
+ protected timeFields(): readonly StarTimeField[];
535
+ protected readonly hasValue: import("@angular/core").Signal<boolean>;
536
+ protected readonly calendarSelected: import("@angular/core").WritableSignal<Date | null>;
537
+ protected readonly calendarRange: import("@angular/core").ModelSignal<StarDateRange | null>;
538
+ protected readonly displayText: () => string;
539
+ protected parseText(text: string): StarDateRange | null | undefined;
540
+ protected emptyValue(): StarDateRange | null;
541
+ protected pickToday(today: Date): void;
542
+ protected onDateSelect(date: Date): void;
543
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarDateRangePicker, never>;
544
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarDateRangePicker, "star-date-range-picker", never, {
545
+ "value": {
546
+ "alias": "value";
547
+ "required": false;
548
+ "isSignal": true;
549
+ };
550
+ "showTime": {
551
+ "alias": "showTime";
552
+ "required": false;
553
+ "isSignal": true;
554
+ };
555
+ "stepMinute": {
556
+ "alias": "stepMinute";
557
+ "required": false;
558
+ "isSignal": true;
559
+ };
560
+ }, {
561
+ "value": "valueChange";
562
+ "rangeSelect": "rangeSelect";
563
+ }, never, never, true, never>;
564
+ }
565
+ /**
566
+ * Multiple-date picker (PrimeNG `p-datepicker selectionMode="multiple"`). Value: a list of
567
+ * days in date order. A click adds a day or removes it; the popup stays open. Type the dates
568
+ * with a comma or a semicolon between them.
569
+ */
570
+ export declare class StarMultiDatePicker extends StarDateInputBase<readonly Date[]> implements FormValueControl<readonly Date[]> {
571
+ readonly value: import("@angular/core").ModelSignal<readonly Date[]>;
572
+ /** Largest number of days (0 = no limit). A click on a new day does nothing at the limit. */
573
+ readonly maxDates: import("@angular/core").InputSignal<number>;
574
+ protected readonly mode: "multiple";
575
+ protected readonly hasValue: import("@angular/core").Signal<boolean>;
576
+ protected readonly calendarSelected: import("@angular/core").WritableSignal<Date | null>;
577
+ protected readonly calendarRange: import("@angular/core").WritableSignal<StarDateRange | null>;
578
+ protected readonly calendarDates: import("@angular/core").ModelSignal<readonly Date[]>;
579
+ protected readonly displayText: () => string;
580
+ protected parseText(text: string): readonly Date[] | undefined;
581
+ protected emptyValue(): readonly Date[];
582
+ protected pickToday(today: Date): void;
583
+ protected onDateSelect(date: Date): void;
584
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarMultiDatePicker, never>;
585
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarMultiDatePicker, "star-multi-date-picker", never, {
586
+ "value": {
587
+ "alias": "value";
588
+ "required": false;
589
+ "isSignal": true;
590
+ };
591
+ "maxDates": {
592
+ "alias": "maxDates";
593
+ "required": false;
594
+ "isSignal": true;
595
+ };
596
+ }, {
597
+ "value": "valueChange";
598
+ }, never, never, true, never>;
599
+ }
600
+ /**
601
+ * Time picker: a time of day without a date (PrimeNG `p-datepicker timeOnly`). The value is
602
+ * 24-hour `HH:mm` text, or `null`. The control is the native time input in the StarNG input
603
+ * style, so the browser gives the keyboard model, the locale's 12 or 24-hour display and the
604
+ * picker on a phone.
605
+ *
606
+ * `<star-time-picker [formField]="form.callAt" min="08:00" max="18:00" [stepMinute]="15" />`
607
+ */
608
+ export declare class StarTimePicker implements FormValueControl<string | null> {
609
+ /** `HH:mm` in the 24-hour clock, or `null`. */
610
+ readonly value: import("@angular/core").ModelSignal<string | null>;
611
+ /** Earliest and latest time, `HH:mm`. */
612
+ readonly min: import("@angular/core").InputSignal<string | undefined>;
613
+ readonly max: import("@angular/core").InputSignal<string | undefined>;
614
+ readonly stepMinute: import("@angular/core").InputSignal<number>;
615
+ readonly size: import("@angular/core").InputSignal<"sm" | "md">;
616
+ readonly ariaLabel: import("@angular/core").InputSignal<string | null>;
617
+ readonly inputId: import("@angular/core").InputSignal<string>;
618
+ readonly name: import("@angular/core").InputSignal<string>;
619
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
620
+ readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
621
+ readonly required: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
622
+ readonly invalid: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
623
+ readonly touched: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
624
+ readonly touch: import("@angular/core").OutputEmitterRef<void>;
625
+ protected readonly step: import("@angular/core").Signal<number>;
626
+ private readonly input;
627
+ protected onChange(text: string): void;
628
+ focus(options?: FocusOptions): void;
629
+ static ɵfac: i0.ɵɵFactoryDeclaration<StarTimePicker, never>;
630
+ static ɵcmp: i0.ɵɵComponentDeclaration<StarTimePicker, "star-time-picker", never, {
631
+ "value": {
632
+ "alias": "value";
633
+ "required": false;
634
+ "isSignal": true;
635
+ };
636
+ "min": {
637
+ "alias": "min";
638
+ "required": false;
639
+ "isSignal": true;
640
+ };
641
+ "max": {
642
+ "alias": "max";
643
+ "required": false;
644
+ "isSignal": true;
645
+ };
646
+ "stepMinute": {
647
+ "alias": "stepMinute";
648
+ "required": false;
649
+ "isSignal": true;
650
+ };
651
+ "size": {
652
+ "alias": "size";
653
+ "required": false;
654
+ "isSignal": true;
655
+ };
656
+ "ariaLabel": {
657
+ "alias": "ariaLabel";
658
+ "required": false;
659
+ "isSignal": true;
660
+ };
661
+ "inputId": {
662
+ "alias": "inputId";
663
+ "required": false;
664
+ "isSignal": true;
665
+ };
666
+ "name": {
667
+ "alias": "name";
668
+ "required": false;
669
+ "isSignal": true;
670
+ };
671
+ "disabled": {
672
+ "alias": "disabled";
673
+ "required": false;
674
+ "isSignal": true;
675
+ };
676
+ "readonly": {
677
+ "alias": "readonly";
678
+ "required": false;
679
+ "isSignal": true;
680
+ };
681
+ "required": {
682
+ "alias": "required";
683
+ "required": false;
684
+ "isSignal": true;
685
+ };
686
+ "invalid": {
687
+ "alias": "invalid";
688
+ "required": false;
689
+ "isSignal": true;
690
+ };
691
+ "touched": {
692
+ "alias": "touched";
693
+ "required": false;
694
+ "isSignal": true;
695
+ };
696
+ }, {
697
+ "value": "valueChange";
698
+ "touch": "touch";
699
+ }, never, never, true, never>;
700
+ }
701
+ export {};