ngx-com 0.0.1 → 0.0.4

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 (82) hide show
  1. package/fesm2022/ngx-com-components-avatar.mjs +772 -0
  2. package/fesm2022/ngx-com-components-avatar.mjs.map +1 -0
  3. package/fesm2022/ngx-com-components-badge.mjs +138 -0
  4. package/fesm2022/ngx-com-components-badge.mjs.map +1 -0
  5. package/fesm2022/ngx-com-components-button.mjs +146 -0
  6. package/fesm2022/ngx-com-components-button.mjs.map +1 -0
  7. package/fesm2022/ngx-com-components-calendar.mjs +5046 -0
  8. package/fesm2022/ngx-com-components-calendar.mjs.map +1 -0
  9. package/fesm2022/ngx-com-components-card.mjs +590 -0
  10. package/fesm2022/ngx-com-components-card.mjs.map +1 -0
  11. package/fesm2022/ngx-com-components-checkbox.mjs +344 -0
  12. package/fesm2022/ngx-com-components-checkbox.mjs.map +1 -0
  13. package/fesm2022/ngx-com-components-collapsible.mjs +612 -0
  14. package/fesm2022/ngx-com-components-collapsible.mjs.map +1 -0
  15. package/fesm2022/ngx-com-components-confirm.mjs +562 -0
  16. package/fesm2022/ngx-com-components-confirm.mjs.map +1 -0
  17. package/fesm2022/ngx-com-components-dropdown-testing.mjs +255 -0
  18. package/fesm2022/ngx-com-components-dropdown-testing.mjs.map +1 -0
  19. package/fesm2022/ngx-com-components-dropdown.mjs +2692 -0
  20. package/fesm2022/ngx-com-components-dropdown.mjs.map +1 -0
  21. package/fesm2022/ngx-com-components-empty-state.mjs +382 -0
  22. package/fesm2022/ngx-com-components-empty-state.mjs.map +1 -0
  23. package/fesm2022/ngx-com-components-form-field.mjs +924 -0
  24. package/fesm2022/ngx-com-components-form-field.mjs.map +1 -0
  25. package/fesm2022/ngx-com-components-icon.mjs +183 -0
  26. package/fesm2022/ngx-com-components-icon.mjs.map +1 -0
  27. package/fesm2022/ngx-com-components-item.mjs +578 -0
  28. package/fesm2022/ngx-com-components-item.mjs.map +1 -0
  29. package/fesm2022/ngx-com-components-menu.mjs +1200 -0
  30. package/fesm2022/ngx-com-components-menu.mjs.map +1 -0
  31. package/fesm2022/ngx-com-components-paginator.mjs +823 -0
  32. package/fesm2022/ngx-com-components-paginator.mjs.map +1 -0
  33. package/fesm2022/ngx-com-components-popover.mjs +901 -0
  34. package/fesm2022/ngx-com-components-popover.mjs.map +1 -0
  35. package/fesm2022/ngx-com-components-radio.mjs +621 -0
  36. package/fesm2022/ngx-com-components-radio.mjs.map +1 -0
  37. package/fesm2022/ngx-com-components-segmented-control.mjs +538 -0
  38. package/fesm2022/ngx-com-components-segmented-control.mjs.map +1 -0
  39. package/fesm2022/ngx-com-components-sort.mjs +368 -0
  40. package/fesm2022/ngx-com-components-sort.mjs.map +1 -0
  41. package/fesm2022/ngx-com-components-spinner.mjs +189 -0
  42. package/fesm2022/ngx-com-components-spinner.mjs.map +1 -0
  43. package/fesm2022/ngx-com-components-tabs.mjs +1522 -0
  44. package/fesm2022/ngx-com-components-tabs.mjs.map +1 -0
  45. package/fesm2022/ngx-com-components-tooltip.mjs +625 -0
  46. package/fesm2022/ngx-com-components-tooltip.mjs.map +1 -0
  47. package/fesm2022/ngx-com-components.mjs +17 -0
  48. package/fesm2022/ngx-com-components.mjs.map +1 -0
  49. package/fesm2022/ngx-com-tokens.mjs +12 -0
  50. package/fesm2022/ngx-com-tokens.mjs.map +1 -0
  51. package/fesm2022/ngx-com-utils.mjs +601 -0
  52. package/fesm2022/ngx-com-utils.mjs.map +1 -0
  53. package/fesm2022/ngx-com.mjs +9 -23
  54. package/fesm2022/ngx-com.mjs.map +1 -1
  55. package/package.json +105 -1
  56. package/types/ngx-com-components-avatar.d.ts +409 -0
  57. package/types/ngx-com-components-badge.d.ts +97 -0
  58. package/types/ngx-com-components-button.d.ts +69 -0
  59. package/types/ngx-com-components-calendar.d.ts +1665 -0
  60. package/types/ngx-com-components-card.d.ts +373 -0
  61. package/types/ngx-com-components-checkbox.d.ts +116 -0
  62. package/types/ngx-com-components-collapsible.d.ts +379 -0
  63. package/types/ngx-com-components-confirm.d.ts +160 -0
  64. package/types/ngx-com-components-dropdown-testing.d.ts +116 -0
  65. package/types/ngx-com-components-dropdown.d.ts +938 -0
  66. package/types/ngx-com-components-empty-state.d.ts +269 -0
  67. package/types/ngx-com-components-form-field.d.ts +531 -0
  68. package/types/ngx-com-components-icon.d.ts +94 -0
  69. package/types/ngx-com-components-item.d.ts +336 -0
  70. package/types/ngx-com-components-menu.d.ts +479 -0
  71. package/types/ngx-com-components-paginator.d.ts +265 -0
  72. package/types/ngx-com-components-popover.d.ts +309 -0
  73. package/types/ngx-com-components-radio.d.ts +258 -0
  74. package/types/ngx-com-components-segmented-control.d.ts +274 -0
  75. package/types/ngx-com-components-sort.d.ts +133 -0
  76. package/types/ngx-com-components-spinner.d.ts +120 -0
  77. package/types/ngx-com-components-tabs.d.ts +396 -0
  78. package/types/ngx-com-components-tooltip.d.ts +200 -0
  79. package/types/ngx-com-components.d.ts +12 -0
  80. package/types/ngx-com-tokens.d.ts +7 -0
  81. package/types/ngx-com-utils.d.ts +424 -0
  82. package/types/ngx-com.d.ts +10 -7
@@ -0,0 +1,1665 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, InputSignal, TemplateRef, OutputEmitterRef, Signal, WritableSignal, Provider, OnDestroy } from '@angular/core';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ import { ControlValueAccessor, Validator, ValidationErrors } from '@angular/forms';
5
+
6
+ /**
7
+ * Calendar shared types and interfaces
8
+ */
9
+ /** Represents a date range with a start and end date */
10
+ interface DateRange<D> {
11
+ /** Start of the date range */
12
+ start: D | null;
13
+ /** End of the date range */
14
+ end: D | null;
15
+ }
16
+ /** Factory function to create a DateRange */
17
+ declare function createDateRange<D>(start: D | null, end: D | null): DateRange<D>;
18
+ /** Available calendar views */
19
+ type CalendarView = 'month' | 'year' | 'multi-year';
20
+ /** Cell states for styling */
21
+ type CalendarCellState = 'default' | 'today' | 'selected' | 'range-start' | 'range-middle' | 'range-end' | 'disabled' | 'preview-start' | 'preview-middle' | 'preview-end';
22
+ /** Data structure representing a calendar cell */
23
+ interface CalendarCell<D> {
24
+ /** The date value this cell represents */
25
+ value: D;
26
+ /** Display text for the cell */
27
+ displayValue: string;
28
+ /** Accessible label for screen readers */
29
+ ariaLabel: string;
30
+ /** Whether this cell is enabled/selectable */
31
+ enabled: boolean;
32
+ /** CSS classes to apply (from dateClass input) */
33
+ cssClasses: string;
34
+ /** Whether this cell represents today */
35
+ isToday: boolean;
36
+ /** Whether this cell is currently selected */
37
+ isSelected: boolean;
38
+ /** Whether this cell is the start of a range */
39
+ isRangeStart: boolean;
40
+ /** Whether this cell is in the middle of a range */
41
+ isRangeMiddle: boolean;
42
+ /** Whether this cell is the end of a range */
43
+ isRangeEnd: boolean;
44
+ /** Whether this cell is the start of a preview range */
45
+ isPreviewStart: boolean;
46
+ /** Whether this cell is in the middle of a preview range */
47
+ isPreviewMiddle: boolean;
48
+ /** Whether this cell is the end of a preview range */
49
+ isPreviewEnd: boolean;
50
+ /** Comparison value for keyboard navigation and selection */
51
+ compareValue: number;
52
+ }
53
+ /** Configuration for creating a calendar cell */
54
+ interface CalendarCellConfig<D> {
55
+ value: D;
56
+ displayValue: string;
57
+ ariaLabel: string;
58
+ enabled?: boolean;
59
+ cssClasses?: string;
60
+ compareValue: number;
61
+ }
62
+ /** Factory function to create a CalendarCell with defaults */
63
+ declare function createCalendarCell<D>(config: CalendarCellConfig<D>): CalendarCell<D>;
64
+ /** Style format for month and day names */
65
+ type NameStyle = 'long' | 'short' | 'narrow';
66
+ /** Number of days in a week */
67
+ declare const DAYS_PER_WEEK = 7;
68
+ /** Number of weeks displayed in month view */
69
+ declare const WEEKS_PER_MONTH = 6;
70
+ /** Number of years displayed in multi-year view */
71
+ declare const YEARS_PER_PAGE = 24;
72
+ /** Number of rows in multi-year view */
73
+ declare const YEARS_PER_ROW = 4;
74
+ /** Number of months per row in year view */
75
+ declare const MONTHS_PER_ROW = 4;
76
+ /** Function type for custom date filtering */
77
+ type DateFilterFn<D> = (date: D) => boolean;
78
+ /** Function type for applying custom CSS classes to dates */
79
+ type DateClassFn<D> = (date: D, view: CalendarView) => string;
80
+
81
+ /**
82
+ * Abstract date adapter class that provides date manipulation operations.
83
+ * Implement this class to support different date libraries (date-fns, Luxon, Temporal, etc.)
84
+ */
85
+ declare abstract class DateAdapter<D> {
86
+ /** The locale to use for formatting. Can be overridden. */
87
+ locale: string;
88
+ /** Gets today's date */
89
+ abstract today(): D;
90
+ /** Gets the year component of the given date */
91
+ abstract getYear(date: D): number;
92
+ /** Gets the month component of the given date (0-indexed, 0 = January) */
93
+ abstract getMonth(date: D): number;
94
+ /** Gets the day of month component of the given date */
95
+ abstract getDate(date: D): number;
96
+ /** Gets the day of the week (0 = Sunday, 6 = Saturday) */
97
+ abstract getDayOfWeek(date: D): number;
98
+ /** Adds the given number of days to the date */
99
+ abstract addDays(date: D, days: number): D;
100
+ /** Adds the given number of months to the date */
101
+ abstract addMonths(date: D, months: number): D;
102
+ /** Adds the given number of years to the date */
103
+ abstract addYears(date: D, years: number): D;
104
+ /** Creates a new date with the given year, month (0-indexed), and day */
105
+ abstract createDate(year: number, month: number, date: number): D;
106
+ /** Gets the number of days in the month of the given date */
107
+ abstract getNumDaysInMonth(date: D): number;
108
+ /** Gets the first day of the week (0 = Sunday, 1 = Monday, etc.) */
109
+ abstract getFirstDayOfWeek(): number;
110
+ /** Gets the names of the months */
111
+ abstract getMonthNames(style: NameStyle): string[];
112
+ /** Gets the names of the days of the week */
113
+ abstract getDayOfWeekNames(style: NameStyle): string[];
114
+ /** Gets the display name for a year */
115
+ abstract getYearName(date: D): string;
116
+ /** Formats the date according to the given format string */
117
+ abstract format(date: D, displayFormat: string): string;
118
+ /** Parses a date string into a date object */
119
+ abstract parse(value: string, parseFormat: string): D | null;
120
+ /** Checks whether the given date is valid */
121
+ abstract isValid(date: D): boolean;
122
+ /** Checks whether two dates are the same day */
123
+ abstract isSameDay(first: D, second: D): boolean;
124
+ /** Compares two dates. Returns -1 if first < second, 0 if equal, 1 if first > second */
125
+ abstract compareDate(first: D, second: D): number;
126
+ /** Clamps the given date to the specified min/max range */
127
+ abstract clampDate(date: D, min: D | null, max: D | null): D;
128
+ /**
129
+ * Gets the first day of the month for the given date
130
+ */
131
+ getFirstDayOfMonth(date: D): D;
132
+ /**
133
+ * Checks whether two dates are in the same month and year
134
+ */
135
+ isSameMonthAndYear(first: D, second: D): boolean;
136
+ /**
137
+ * Checks whether the given date is within the specified range
138
+ */
139
+ isDateInRange(date: D, start: D | null, end: D | null): boolean;
140
+ /**
141
+ * Gets a unique identifier for the date (useful for trackBy)
142
+ */
143
+ getId(date: D): string;
144
+ /**
145
+ * Sets the locale for the adapter
146
+ */
147
+ setLocale(locale: string): void;
148
+ }
149
+ /** Injection token for the DateAdapter */
150
+ declare const DATE_ADAPTER: InjectionToken<DateAdapter<unknown>>;
151
+
152
+ /**
153
+ * DateAdapter implementation using the native JavaScript Date object.
154
+ * This is the default adapter shipped with the library.
155
+ */
156
+ declare class NativeDateAdapter extends DateAdapter<Date> {
157
+ private readonly localeId;
158
+ constructor();
159
+ today(): Date;
160
+ getYear(date: Date): number;
161
+ getMonth(date: Date): number;
162
+ getDate(date: Date): number;
163
+ getDayOfWeek(date: Date): number;
164
+ addDays(date: Date, days: number): Date;
165
+ addMonths(date: Date, months: number): Date;
166
+ addYears(date: Date, years: number): Date;
167
+ createDate(year: number, month: number, day: number): Date;
168
+ getNumDaysInMonth(date: Date): number;
169
+ getFirstDayOfWeek(): number;
170
+ setLocale(locale: string): void;
171
+ getMonthNames(style: NameStyle): string[];
172
+ getDayOfWeekNames(style: NameStyle): string[];
173
+ getYearName(date: Date): string;
174
+ format(date: Date, displayFormat: string): string;
175
+ parse(value: string, _parseFormat: string): Date | null;
176
+ isValid(date: Date): boolean;
177
+ isSameDay(first: Date, second: Date): boolean;
178
+ compareDate(first: Date, second: Date): number;
179
+ clampDate(date: Date, min: Date | null, max: Date | null): Date;
180
+ /**
181
+ * Strips the time component from a date, returning midnight
182
+ */
183
+ private stripTime;
184
+ /**
185
+ * Gets the number of days in a specific month
186
+ */
187
+ private getDaysInMonth;
188
+ /**
189
+ * Parses a format string into Intl.DateTimeFormat options
190
+ */
191
+ private parseFormatString;
192
+ static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateAdapter, never>;
193
+ static ɵprov: i0.ɵɵInjectableDeclaration<NativeDateAdapter>;
194
+ }
195
+
196
+ type CellView = 'month' | 'year' | 'multi-year';
197
+ type CellState = 'default' | 'today' | 'selected' | 'range-start' | 'range-middle' | 'range-end' | 'preview-start' | 'preview-middle' | 'preview-end' | 'disabled';
198
+ type WrapperRange = 'none' | 'start' | 'middle' | 'end' | 'single';
199
+ /**
200
+ * CVA variants for calendar cell styling.
201
+ * Uses semantic theme tokens for consistent cross-theme styling.
202
+ *
203
+ * @tokens `--color-ring`, `--color-foreground`, `--color-muted`,
204
+ * `--color-primary`, `--color-primary-foreground`, `--color-primary-hover`,
205
+ * `--color-primary-subtle`, `--color-primary-subtle-foreground`,
206
+ * `--color-disabled-foreground`, `--radius-calendar-cell`
207
+ */
208
+ declare const calendarCellVariants: (props?: {
209
+ view?: CellView;
210
+ state?: CellState;
211
+ outside?: boolean;
212
+ }) => string;
213
+ type CalendarCellVariants = {
214
+ view?: CellView;
215
+ state?: CellState;
216
+ outside?: boolean;
217
+ };
218
+ /**
219
+ * CVA variants for the calendar cell wrapper (used for range backgrounds)
220
+ *
221
+ * @tokens `--color-primary-subtle`
222
+ */
223
+ declare const calendarCellWrapperVariants: (props?: {
224
+ range?: WrapperRange | undefined;
225
+ }) => string;
226
+ type CalendarCellWrapperVariants = {
227
+ range?: WrapperRange | undefined;
228
+ };
229
+
230
+ type ButtonType = 'navigation' | 'period';
231
+ /**
232
+ * CVA variants for the calendar header container.
233
+ */
234
+ declare const calendarHeaderVariants: () => string;
235
+ type CalendarHeaderVariants = Record<string, never>;
236
+ /**
237
+ * CVA variants for the calendar header buttons.
238
+ *
239
+ * @tokens `--color-foreground`, `--color-ring`, `--color-muted`,
240
+ * `--color-disabled-foreground`, `--radius-calendar-cell`
241
+ */
242
+ declare const calendarHeaderButtonVariants: (props?: {
243
+ type?: ButtonType;
244
+ }) => string;
245
+ type CalendarHeaderButtonVariants = {
246
+ type?: ButtonType;
247
+ };
248
+
249
+ /**
250
+ * CVA variants for the main calendar container.
251
+ *
252
+ * @tokens `--color-background`, `--color-border-subtle`, `--radius-calendar`
253
+ */
254
+ declare const calendarVariants: (props?: {
255
+ bordered?: boolean;
256
+ }) => string;
257
+ type CalendarVariants = VariantProps<typeof calendarVariants>;
258
+
259
+ /**
260
+ * Creates a 2D grid from a flat array of items.
261
+ *
262
+ * @param items The flat array of items to arrange into a grid
263
+ * @param columns Number of columns per row
264
+ * @returns 2D array where each inner array is a row
265
+ */
266
+ declare function createGrid<T>(items: T[], columns: number): T[][];
267
+ /**
268
+ * Calculates the new index when navigating a grid with arrow keys.
269
+ *
270
+ * @param currentIndex Current position in the flat array
271
+ * @param direction Navigation direction ('left' | 'right' | 'up' | 'down')
272
+ * @param totalItems Total number of items in the grid
273
+ * @param columns Number of columns per row
274
+ * @returns New index or null if navigation would go out of bounds
275
+ */
276
+ declare function navigateGrid(currentIndex: number, direction: 'left' | 'right' | 'up' | 'down', totalItems: number, columns: number): number | null;
277
+ /**
278
+ * Weekday header information for the month view.
279
+ */
280
+ interface WeekdayHeader {
281
+ /** Full label for the weekday (used in aria-label) */
282
+ label: string;
283
+ /** Narrow/abbreviated label (displayed in the header cell) */
284
+ narrow: string;
285
+ }
286
+ /**
287
+ * Gets weekday headers for the calendar month view.
288
+ * The headers are ordered starting from the first day of the week.
289
+ *
290
+ * @param adapter Date adapter to use for getting weekday names
291
+ * @param style Style for the full label ('long' | 'short' | 'narrow')
292
+ * @param firstDayOfWeek Optional override for first day of week (0=Sun, 1=Mon, ..., 6=Sat)
293
+ * @returns Array of weekday headers starting from first day of week
294
+ */
295
+ declare function getWeekdayHeaders<D>(adapter: DateAdapter<D>, style?: NameStyle, firstDayOfWeek?: number): WeekdayHeader[];
296
+ /**
297
+ * Checks whether a date should be disabled based on constraints.
298
+ *
299
+ * @param date The date to check
300
+ * @param minDate Minimum allowed date (inclusive)
301
+ * @param maxDate Maximum allowed date (inclusive)
302
+ * @param dateFilter Custom filter function
303
+ * @param adapter Date adapter for comparisons
304
+ * @returns true if the date should be disabled
305
+ */
306
+ declare function isDateDisabled<D>(date: D, minDate: D | null, maxDate: D | null, dateFilter: ((d: D) => boolean) | null, adapter: DateAdapter<D>): boolean;
307
+ /**
308
+ * Checks whether a month should be disabled based on constraints.
309
+ * A month is disabled if ALL days in that month are disabled.
310
+ *
311
+ * @param year The year of the month to check
312
+ * @param month The month to check (0-indexed)
313
+ * @param minDate Minimum allowed date
314
+ * @param maxDate Maximum allowed date
315
+ * @param adapter Date adapter for date operations
316
+ * @returns true if the entire month should be disabled
317
+ */
318
+ declare function isMonthDisabled<D>(year: number, month: number, minDate: D | null, maxDate: D | null, adapter: DateAdapter<D>): boolean;
319
+ /**
320
+ * Checks whether a year should be disabled based on constraints.
321
+ * A year is disabled if ALL months in that year are disabled.
322
+ *
323
+ * @param year The year to check
324
+ * @param minDate Minimum allowed date
325
+ * @param maxDate Maximum allowed date
326
+ * @param adapter Date adapter for date operations
327
+ * @returns true if the entire year should be disabled
328
+ */
329
+ declare function isYearDisabled<D>(year: number, minDate: D | null, maxDate: D | null, adapter: DateAdapter<D>): boolean;
330
+ /**
331
+ * Gets the starting year for the multi-year view grid.
332
+ * Aligns the year to be at the start of a YEARS_PER_PAGE block.
333
+ *
334
+ * @param activeYear The currently active year
335
+ * @param yearsPerPage Number of years shown per page (default 24)
336
+ * @returns The first year of the multi-year page
337
+ */
338
+ declare function getMultiYearStartingYear(activeYear: number, yearsPerPage?: number): number;
339
+
340
+ /** Event emitted when a navigation key is pressed */
341
+ interface CalendarCellKeyNavEvent<D> {
342
+ direction: string;
343
+ cell: CalendarCell<D>;
344
+ }
345
+ /**
346
+ * A single cell in the calendar grid.
347
+ * This is a shared, stateless component used across all calendar views.
348
+ *
349
+ * @example
350
+ * ```html
351
+ * <com-calendar-cell
352
+ * [cell]="dayCell"
353
+ * [view]="'month'"
354
+ * (selected)="onSelect($event)"
355
+ * />
356
+ * ```
357
+ *
358
+ * @tokens `--color-ring`, `--color-foreground`, `--color-muted`, `--color-muted-foreground`,
359
+ * `--color-primary`, `--color-primary-foreground`, `--color-primary-hover`,
360
+ * `--color-primary-subtle`, `--color-primary-subtle-foreground`,
361
+ * `--color-disabled-foreground`, `--radius-calendar-cell`
362
+ */
363
+ declare class ComCalendarCell<D> {
364
+ /** Reference to the button element for focus management */
365
+ private readonly buttonRef;
366
+ /** The cell data to render */
367
+ readonly cell: InputSignal<CalendarCell<D>>;
368
+ /** The current calendar view */
369
+ readonly view: InputSignal<CalendarView>;
370
+ /** Whether this cell is outside the current month (for month view) */
371
+ readonly outside: InputSignal<boolean>;
372
+ /** Tab index for keyboard navigation (-1 for not focusable, 0 for focusable) */
373
+ readonly tabindex: InputSignal<number>;
374
+ /** Custom template for cell content */
375
+ readonly cellTemplate: InputSignal<TemplateRef<{
376
+ $implicit: CalendarCell<D>;
377
+ }> | null>;
378
+ /** Emitted when the cell is selected */
379
+ readonly selected: OutputEmitterRef<CalendarCell<D>>;
380
+ /** Emitted when the cell is focused */
381
+ readonly focused: OutputEmitterRef<CalendarCell<D>>;
382
+ /** Emitted when the mouse enters the cell (for range preview) */
383
+ readonly previewed: OutputEmitterRef<CalendarCell<D>>;
384
+ /** Emitted when a navigation key is pressed */
385
+ readonly keyNav: OutputEmitterRef<CalendarCellKeyNavEvent<D>>;
386
+ /** Computed cell state for styling */
387
+ protected readonly cellState: Signal<CalendarCellState>;
388
+ /** Computed wrapper range state */
389
+ protected readonly wrapperRange: Signal<'none' | 'start' | 'middle' | 'end' | 'single'>;
390
+ /** Computed CSS classes for the cell button */
391
+ protected readonly cellClasses: Signal<string>;
392
+ /** Computed CSS classes for the wrapper div */
393
+ protected readonly wrapperClasses: Signal<string>;
394
+ protected onCellClick(): void;
395
+ protected onKeydown(event: KeyboardEvent): void;
396
+ protected onMouseEnter(): void;
397
+ protected onFocus(): void;
398
+ /** Focuses the button element within this cell */
399
+ focusButton(): void;
400
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComCalendarCell<any>, never>;
401
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComCalendarCell<any>, "com-calendar-cell", never, { "cell": { "alias": "cell"; "required": true; "isSignal": true; }; "view": { "alias": "view"; "required": false; "isSignal": true; }; "outside": { "alias": "outside"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; "cellTemplate": { "alias": "cellTemplate"; "required": false; "isSignal": true; }; }, { "selected": "selected"; "focused": "focused"; "previewed": "previewed"; "keyNav": "keyNav"; }, never, never, true, never>;
402
+ }
403
+
404
+ /**
405
+ * Navigation header component for the calendar.
406
+ * Provides prev/next buttons and a clickable period label for view switching.
407
+ *
408
+ * @example
409
+ * ```html
410
+ * <com-calendar-header
411
+ * [periodLabel]="'January 2024'"
412
+ * [periodAriaLabel]="'January 2024, click to switch view'"
413
+ * [prevDisabled]="false"
414
+ * [nextDisabled]="false"
415
+ * [canSwitchView]="true"
416
+ * (prevClicked)="onPrev()"
417
+ * (nextClicked)="onNext()"
418
+ * (periodClicked)="onPeriodClick()"
419
+ * />
420
+ * ```
421
+ *
422
+ * @tokens `--color-foreground`, `--color-ring`, `--color-muted`,
423
+ * `--color-disabled-foreground`, `--radius-calendar-cell`
424
+ */
425
+ declare class ComCalendarHeader {
426
+ /** Display text (e.g., "January 2024", "2024", "2000 – 2023") */
427
+ readonly periodLabel: InputSignal<string>;
428
+ /** Accessible label for period button */
429
+ readonly periodAriaLabel: InputSignal<string>;
430
+ /** Accessible label for previous button */
431
+ readonly prevAriaLabel: InputSignal<string>;
432
+ /** Accessible label for next button */
433
+ readonly nextAriaLabel: InputSignal<string>;
434
+ /** Disable previous button */
435
+ readonly prevDisabled: InputSignal<boolean>;
436
+ /** Disable next button */
437
+ readonly nextDisabled: InputSignal<boolean>;
438
+ /** Whether clicking period label switches view */
439
+ readonly canSwitchView: InputSignal<boolean>;
440
+ /** Emitted when previous button is clicked */
441
+ readonly prevClicked: OutputEmitterRef<void>;
442
+ /** Emitted when next button is clicked */
443
+ readonly nextClicked: OutputEmitterRef<void>;
444
+ /** Emitted when period label is clicked (switch view) */
445
+ readonly periodClicked: OutputEmitterRef<void>;
446
+ /** Computed header container classes */
447
+ protected readonly headerClasses: Signal<string>;
448
+ /** Computed navigation button classes */
449
+ protected readonly navButtonClasses: Signal<string>;
450
+ /** Computed period button classes */
451
+ protected readonly periodButtonClasses: Signal<string>;
452
+ /**
453
+ * Handles period button click.
454
+ * Only emits if view switching is allowed.
455
+ */
456
+ protected onPeriodClick(): void;
457
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComCalendarHeader, never>;
458
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComCalendarHeader, "com-calendar-header", never, { "periodLabel": { "alias": "periodLabel"; "required": true; "isSignal": true; }; "periodAriaLabel": { "alias": "periodAriaLabel"; "required": true; "isSignal": true; }; "prevAriaLabel": { "alias": "prevAriaLabel"; "required": false; "isSignal": true; }; "nextAriaLabel": { "alias": "nextAriaLabel"; "required": false; "isSignal": true; }; "prevDisabled": { "alias": "prevDisabled"; "required": false; "isSignal": true; }; "nextDisabled": { "alias": "nextDisabled"; "required": false; "isSignal": true; }; "canSwitchView": { "alias": "canSwitchView"; "required": false; "isSignal": true; }; }, { "prevClicked": "prevClicked"; "nextClicked": "nextClicked"; "periodClicked": "periodClicked"; }, never, never, true, never>;
459
+ }
460
+
461
+ /**
462
+ * Main calendar orchestrator component.
463
+ * Composes the calendar header and view components (month, year, multi-year)
464
+ * with view switching, navigation, and enhanced accessibility.
465
+ *
466
+ * @tokens `--color-background`, `--color-foreground`, `--color-border-subtle`,
467
+ * `--color-ring`, `--color-muted`, `--color-muted-foreground`,
468
+ * `--color-primary`, `--color-primary-foreground`, `--color-primary-hover`,
469
+ * `--color-primary-subtle`, `--color-primary-subtle-foreground`,
470
+ * `--color-disabled-foreground`
471
+ *
472
+ * @example
473
+ * ```html
474
+ * <com-calendar
475
+ * [activeDate]="activeDate"
476
+ * [selected]="selectedDate"
477
+ * [minDate]="minDate"
478
+ * [maxDate]="maxDate"
479
+ * (selectedChange)="onDateSelected($event)"
480
+ * (viewChanged)="onViewChanged($event)"
481
+ * />
482
+ * ```
483
+ */
484
+ declare class ComCalendar<D> {
485
+ /** Date adapter for date operations */
486
+ private readonly dateAdapter;
487
+ /** Optional selection strategy for custom selection behaviors */
488
+ private readonly selectionStrategy;
489
+ /** Query for month views for cross-grid focus management */
490
+ private readonly monthViews;
491
+ /** The date to display and navigate from */
492
+ readonly activeDate: InputSignal<D | undefined>;
493
+ /** The currently selected date or date range */
494
+ readonly selected: InputSignal<D | DateRange<D> | null>;
495
+ /** Minimum selectable date */
496
+ readonly minDate: InputSignal<D | null>;
497
+ /** Maximum selectable date */
498
+ readonly maxDate: InputSignal<D | null>;
499
+ /** Custom filter function to disable specific dates */
500
+ readonly dateFilter: InputSignal<DateFilterFn<D> | null>;
501
+ /** Custom function to add CSS classes to dates */
502
+ readonly dateClass: InputSignal<DateClassFn<D> | null>;
503
+ /** Whether to show the card border and shadow. Set to false when used inside datepicker panel. */
504
+ readonly bordered: InputSignal<boolean>;
505
+ /** Initial view to display */
506
+ readonly startView: InputSignal<CalendarView>;
507
+ /** Override first day of week (0=Sun, 1=Mon, ..., 6=Sat). Uses locale default if null. */
508
+ readonly firstDayOfWeek: InputSignal<number | null>;
509
+ /** Number of months to display side-by-side (1 or 2). Defaults to 2 when RangeSelectionStrategy is used. */
510
+ readonly monthColumns: InputSignal<number>;
511
+ /** Computed first day of week (input override or adapter default) */
512
+ readonly computedFirstDayOfWeek: Signal<number>;
513
+ /** Effective number of month columns (auto-defaults to 2 for RangeSelectionStrategy) */
514
+ readonly effectiveMonthColumns: Signal<number>;
515
+ /** Secondary active date for dual-month display (+1 month from primary) */
516
+ readonly secondaryActiveDate: Signal<D | null>;
517
+ /** Custom template for cell content */
518
+ readonly cellTemplate: InputSignal<TemplateRef<{
519
+ $implicit: CalendarCell<D>;
520
+ }> | null>;
521
+ /** Emitted when a date is selected */
522
+ readonly selectedChange: OutputEmitterRef<D>;
523
+ /** Emitted when the view changes */
524
+ readonly viewChanged: OutputEmitterRef<CalendarView>;
525
+ /** Emitted when the active date changes */
526
+ readonly activeDateChange: OutputEmitterRef<D>;
527
+ /** Current view state (synced from startView input, writable for view switching) */
528
+ readonly currentView: WritableSignal<CalendarView>;
529
+ /** Internal active date (synced from activeDate input, writable for navigation) */
530
+ readonly internalActiveDate: WritableSignal<D>;
531
+ /** Live announcement for screen readers */
532
+ readonly liveAnnouncement: WritableSignal<string>;
533
+ /** Internal selection state managed by strategy (synced from selected input) */
534
+ readonly internalSelection: WritableSignal<unknown>;
535
+ /** Currently hovered/previewed date */
536
+ readonly previewDate: WritableSignal<D | null>;
537
+ /** Computed preview range from strategy */
538
+ readonly previewRange: Signal<DateRange<D> | null>;
539
+ /** Calendar container classes */
540
+ readonly calendarClasses: Signal<string>;
541
+ /** Months container classes for single/dual-month layout */
542
+ readonly monthsContainerClasses: Signal<string>;
543
+ /** Month names for formatting */
544
+ private readonly monthNames;
545
+ /** Period label for the header (e.g., "January 2024", "January – February 2024", "2024", "2000 – 2023") */
546
+ readonly periodLabel: Signal<string>;
547
+ /** Accessible label for the period button */
548
+ readonly periodAriaLabel: Signal<string>;
549
+ /** Accessible label for the previous button */
550
+ readonly prevAriaLabel: Signal<string>;
551
+ /** Accessible label for the next button */
552
+ readonly nextAriaLabel: Signal<string>;
553
+ /** Whether the previous button is disabled */
554
+ readonly prevDisabled: Signal<boolean>;
555
+ /** Whether the next button is disabled */
556
+ readonly nextDisabled: Signal<boolean>;
557
+ /**
558
+ * Handles previous button click.
559
+ * Navigates to the previous period based on current view.
560
+ */
561
+ onPrevClicked(): void;
562
+ /**
563
+ * Handles next button click.
564
+ * Navigates to the next period based on current view.
565
+ */
566
+ onNextClicked(): void;
567
+ /**
568
+ * Handles period label click.
569
+ * Switches to the next higher view (month → year → multi-year).
570
+ */
571
+ onPeriodClicked(): void;
572
+ /**
573
+ * Handles date selection from month view.
574
+ * Uses selection strategy if available, otherwise emits directly.
575
+ */
576
+ onDateSelected(date: D): void;
577
+ /**
578
+ * Handles preview change from views (mouse hover).
579
+ * Updates the preview date for strategy to compute preview range.
580
+ */
581
+ onPreviewChange(date: D | null): void;
582
+ /**
583
+ * Handles month selection from year view.
584
+ * Drills down to month view with the selected month.
585
+ */
586
+ onMonthSelected(date: D): void;
587
+ /**
588
+ * Handles year selection from multi-year view.
589
+ * Drills down to year view with the selected year.
590
+ */
591
+ onYearSelected(date: D): void;
592
+ /**
593
+ * Handles active date change from child views (keyboard navigation).
594
+ * In dual-month mode, handles cross-grid focus transitions.
595
+ */
596
+ onActiveDateChange(date: D, gridIndex?: number): void;
597
+ /**
598
+ * Computes a unique compare value from a date for focus management.
599
+ */
600
+ private computeCompareValue;
601
+ /**
602
+ * Announces a view change to screen readers.
603
+ */
604
+ private announceViewChange;
605
+ /**
606
+ * Announces navigation to screen readers.
607
+ */
608
+ private announceNavigation;
609
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComCalendar<any>, never>;
610
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComCalendar<any>, "com-calendar", never, { "activeDate": { "alias": "activeDate"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "dateClass": { "alias": "dateClass"; "required": false; "isSignal": true; }; "bordered": { "alias": "bordered"; "required": false; "isSignal": true; }; "startView": { "alias": "startView"; "required": false; "isSignal": true; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "monthColumns": { "alias": "monthColumns"; "required": false; "isSignal": true; }; "cellTemplate": { "alias": "cellTemplate"; "required": false; "isSignal": true; }; }, { "selectedChange": "selectedChange"; "viewChanged": "viewChanged"; "activeDateChange": "activeDateChange"; }, never, never, true, never>;
611
+ }
612
+
613
+ /**
614
+ * Abstract base class for calendar view components.
615
+ * Provides shared inputs, outputs, and utility methods for month, year, and multi-year views.
616
+ *
617
+ * @tokens None - abstract base class, tokens are defined in concrete view components
618
+ */
619
+ declare abstract class CalendarViewBase<D> {
620
+ /** Date adapter for date operations */
621
+ protected readonly dateAdapter: DateAdapter<D>;
622
+ /** The date to display and navigate from */
623
+ readonly activeDate: InputSignal<D>;
624
+ /** The currently selected date or date range */
625
+ readonly selected: InputSignal<D | DateRange<D> | null>;
626
+ /** Minimum selectable date */
627
+ readonly minDate: InputSignal<D | null>;
628
+ /** Maximum selectable date */
629
+ readonly maxDate: InputSignal<D | null>;
630
+ /** Custom filter function to disable specific dates */
631
+ readonly dateFilter: InputSignal<DateFilterFn<D> | null>;
632
+ /** Custom function to add CSS classes to dates */
633
+ readonly dateClass: InputSignal<DateClassFn<D> | null>;
634
+ /** Start date for range preview (hover state) */
635
+ readonly previewStart: InputSignal<D | null>;
636
+ /** End date for range preview (hover state) */
637
+ readonly previewEnd: InputSignal<D | null>;
638
+ /** Custom template for cell content */
639
+ readonly cellTemplate: InputSignal<TemplateRef<{
640
+ $implicit: CalendarCell<D>;
641
+ }> | null>;
642
+ /** Emitted when a date is selected */
643
+ readonly selectedChange: OutputEmitterRef<D>;
644
+ /** Emitted when the active date changes (keyboard navigation) */
645
+ readonly activeDateChange: OutputEmitterRef<D>;
646
+ /** Emitted when the preview range changes (mouse hover) */
647
+ readonly previewChange: OutputEmitterRef<D | null>;
648
+ /** The calendar view type for this component */
649
+ protected abstract readonly view: CalendarView;
650
+ /** Cell components for focus management. Must be implemented by each view using viewChildren. */
651
+ protected abstract readonly cellComponents: Signal<readonly ComCalendarCell<D>[]>;
652
+ /** Internal signal for tracking the focused cell's compare value */
653
+ protected readonly focusedCellValue: WritableSignal<number | null>;
654
+ /** Signal for pending focus operation (set by focusCell, consumed by afterRender) */
655
+ protected readonly focusPending: WritableSignal<number | null>;
656
+ constructor();
657
+ /**
658
+ * The grid of cells to display.
659
+ * Must be implemented by each view to generate the appropriate cells.
660
+ */
661
+ abstract readonly cells: Signal<CalendarCell<D>[][]>;
662
+ /**
663
+ * Accessible label for the grid (e.g., "January 2024").
664
+ * Must be implemented by each view.
665
+ */
666
+ abstract readonly gridLabel: Signal<string>;
667
+ /** Today's date for comparison */
668
+ protected readonly today: Signal<D>;
669
+ /**
670
+ * Checks if a date is the currently selected date.
671
+ */
672
+ protected isSelected(date: D): boolean;
673
+ /**
674
+ * Checks if a date is the start of a selected range.
675
+ */
676
+ protected isRangeStart(date: D): boolean;
677
+ /**
678
+ * Checks if a date is the end of a selected range.
679
+ */
680
+ protected isRangeEnd(date: D): boolean;
681
+ /**
682
+ * Checks if a date is in the middle of a selected range.
683
+ */
684
+ protected isRangeMiddle(date: D): boolean;
685
+ /**
686
+ * Checks if a date is the start of the preview range.
687
+ */
688
+ protected isPreviewStart(date: D): boolean;
689
+ /**
690
+ * Checks if a date is the end of the preview range.
691
+ */
692
+ protected isPreviewEnd(date: D): boolean;
693
+ /**
694
+ * Checks if a date is in the middle of the preview range.
695
+ */
696
+ protected isPreviewMiddle(date: D): boolean;
697
+ /**
698
+ * Type guard to check if a value is a DateRange.
699
+ */
700
+ protected isDateRange(value: D | DateRange<D>): value is DateRange<D>;
701
+ /**
702
+ * Handles cell selection events.
703
+ */
704
+ onCellSelected(cell: CalendarCell<D>): void;
705
+ /**
706
+ * Handles cell preview events (mouse hover).
707
+ */
708
+ onCellPreviewed(cell: CalendarCell<D>): void;
709
+ /**
710
+ * Clears the preview when mouse leaves the grid.
711
+ */
712
+ onGridMouseLeave(): void;
713
+ /**
714
+ * Handles keyboard navigation within the grid.
715
+ * Must be implemented by each view to handle view-specific navigation.
716
+ */
717
+ abstract onKeyNav(event: {
718
+ direction: string;
719
+ cell: CalendarCell<D>;
720
+ }): void;
721
+ /**
722
+ * Checks if a cell should have tabindex="0" (be the focusable cell).
723
+ */
724
+ isActiveCell(cell: CalendarCell<D>): boolean;
725
+ /**
726
+ * Gets the compare value for the active date.
727
+ * Must be implemented by each view.
728
+ */
729
+ protected abstract getActiveCompareValue(): number;
730
+ /**
731
+ * Focuses the cell with the given compare value.
732
+ * Uses afterRender to ensure DOM is updated before focusing.
733
+ * Public to allow parent components to manage cross-grid focus in dual-month mode.
734
+ */
735
+ focusCell(compareValue: number): void;
736
+ static ɵfac: i0.ɵɵFactoryDeclaration<CalendarViewBase<any>, never>;
737
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CalendarViewBase<any>, never, never, { "activeDate": { "alias": "activeDate"; "required": true; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "dateClass": { "alias": "dateClass"; "required": false; "isSignal": true; }; "previewStart": { "alias": "previewStart"; "required": false; "isSignal": true; }; "previewEnd": { "alias": "previewEnd"; "required": false; "isSignal": true; }; "cellTemplate": { "alias": "cellTemplate"; "required": false; "isSignal": true; }; }, { "selectedChange": "selectedChange"; "activeDateChange": "activeDateChange"; "previewChange": "previewChange"; }, never, never, true, never>;
738
+ }
739
+
740
+ /**
741
+ * Month view component displaying a 7x6 grid of days.
742
+ * Shows the days of the current month with leading/trailing days from adjacent months.
743
+ *
744
+ * @example
745
+ * ```html
746
+ * <com-calendar-month-view
747
+ * [activeDate]="activeDate()"
748
+ * [selected]="selected()"
749
+ * (selectedChange)="onDateSelected($event)"
750
+ * (activeDateChange)="onActiveDateChange($event)"
751
+ * />
752
+ * ```
753
+ *
754
+ * @tokens `--color-muted-foreground`
755
+ */
756
+ declare class ComCalendarMonthView<D> extends CalendarViewBase<D> {
757
+ protected readonly view: CalendarView;
758
+ /** Cell components for focus management */
759
+ protected readonly cellComponents: Signal<readonly ComCalendarCell<D>[]>;
760
+ /** Override first day of week (0=Sun, 1=Mon, ..., 6=Sat) */
761
+ readonly firstDayOfWeek: InputSignal<number>;
762
+ /** Grid index for dual-month display (0=left, 1=right) */
763
+ readonly gridIndex: InputSignal<number>;
764
+ /** Weekday header labels */
765
+ readonly weekdayHeaders: Signal<WeekdayHeader[]>;
766
+ /** The month being displayed (0-indexed) */
767
+ readonly displayMonth: Signal<number>;
768
+ /** The year being displayed */
769
+ readonly displayYear: Signal<number>;
770
+ /** Grid of day cells (7 columns x 6 rows = 42 cells) */
771
+ readonly cells: Signal<CalendarCell<D>[][]>;
772
+ /** Accessible label for the grid showing month and year */
773
+ readonly gridLabel: Signal<string>;
774
+ /** First date of the displayed month */
775
+ private readonly firstOfMonth;
776
+ protected getActiveCompareValue(): number;
777
+ /**
778
+ * Checks if a cell is outside the current displayed month.
779
+ */
780
+ isOutsideMonth(cell: CalendarCell<D>): boolean;
781
+ /**
782
+ * Handles keyboard navigation for the month view.
783
+ * - Arrow left/right: ±1 day
784
+ * - Arrow up/down: ±7 days (one week)
785
+ * - Home: First day of week
786
+ * - End: Last day of week
787
+ * - PageUp: Previous month
788
+ * - PageDown: Next month
789
+ */
790
+ onKeyNav(event: CalendarCellKeyNavEvent<D>): void;
791
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComCalendarMonthView<any>, never>;
792
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComCalendarMonthView<any>, "com-calendar-month-view", never, { "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "gridIndex": { "alias": "gridIndex"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
793
+ }
794
+
795
+ /**
796
+ * Year view component displaying a 4x3 grid of months.
797
+ * Allows the user to select a month within the currently active year.
798
+ *
799
+ * @example
800
+ * ```html
801
+ * <com-calendar-year-view
802
+ * [activeDate]="activeDate()"
803
+ * [selected]="selected()"
804
+ * (selectedChange)="onMonthSelected($event)"
805
+ * (activeDateChange)="onActiveMonthChange($event)"
806
+ * />
807
+ * ```
808
+ *
809
+ * @tokens None - uses ComCalendarCell which provides all token styling
810
+ */
811
+ declare class ComCalendarYearView<D> extends CalendarViewBase<D> {
812
+ protected readonly view: CalendarView;
813
+ /** Cell components for focus management */
814
+ protected readonly cellComponents: Signal<readonly ComCalendarCell<D>[]>;
815
+ /** The year being displayed */
816
+ readonly displayYear: Signal<number>;
817
+ /** Grid of month cells (4 columns x 3 rows = 12 months) */
818
+ readonly cells: Signal<CalendarCell<D>[][]>;
819
+ /** Accessible label for the grid */
820
+ readonly gridLabel: Signal<string>;
821
+ protected getActiveCompareValue(): number;
822
+ /**
823
+ * Handles keyboard navigation for the year view.
824
+ * - Arrow left/right: ±1 month
825
+ * - Arrow up/down: ±4 months (one row)
826
+ * - Home: January
827
+ * - End: December
828
+ * - PageUp: Previous year
829
+ * - PageDown: Next year
830
+ */
831
+ onKeyNav(event: CalendarCellKeyNavEvent<D>): void;
832
+ private isMonthSelected;
833
+ private isMonthRangeStart;
834
+ private isMonthRangeEnd;
835
+ private isMonthRangeMiddle;
836
+ private isMonthPreviewStart;
837
+ private isMonthPreviewEnd;
838
+ private isMonthPreviewMiddle;
839
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComCalendarYearView<any>, never>;
840
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComCalendarYearView<any>, "com-calendar-year-view", never, {}, {}, never, never, true, never>;
841
+ }
842
+
843
+ /**
844
+ * Multi-year view component displaying a 4x6 grid of years (24 years total).
845
+ * Allows the user to select a year within the displayed range.
846
+ *
847
+ * @example
848
+ * ```html
849
+ * <com-calendar-multi-year-view
850
+ * [activeDate]="activeDate()"
851
+ * [selected]="selected()"
852
+ * (selectedChange)="onYearSelected($event)"
853
+ * (activeDateChange)="onActiveYearChange($event)"
854
+ * />
855
+ * ```
856
+ *
857
+ * @tokens None - uses ComCalendarCell which provides all token styling
858
+ */
859
+ declare class ComCalendarMultiYearView<D> extends CalendarViewBase<D> {
860
+ protected readonly view: CalendarView;
861
+ /** Cell components for focus management */
862
+ protected readonly cellComponents: Signal<readonly ComCalendarCell<D>[]>;
863
+ /** The first year in the displayed range */
864
+ readonly startYear: Signal<number>;
865
+ /** The last year in the displayed range */
866
+ readonly endYear: Signal<number>;
867
+ /** Grid of year cells (4 columns x 6 rows = 24 years) */
868
+ readonly cells: Signal<CalendarCell<D>[][]>;
869
+ /** Accessible label for the grid showing the year range */
870
+ readonly gridLabel: Signal<string>;
871
+ protected getActiveCompareValue(): number;
872
+ /**
873
+ * Handles keyboard navigation for the multi-year view.
874
+ * - Arrow left/right: ±1 year
875
+ * - Arrow up/down: ±4 years (one row)
876
+ * - Home: First year in range
877
+ * - End: Last year in range
878
+ * - PageUp: Previous 24 years
879
+ * - PageDown: Next 24 years
880
+ */
881
+ onKeyNav(event: CalendarCellKeyNavEvent<D>): void;
882
+ private isYearSelected;
883
+ private isYearRangeStart;
884
+ private isYearRangeEnd;
885
+ private isYearRangeMiddle;
886
+ private isYearPreviewStart;
887
+ private isYearPreviewEnd;
888
+ private isYearPreviewMiddle;
889
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComCalendarMultiYearView<any>, never>;
890
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComCalendarMultiYearView<any>, "com-calendar-multi-year-view", never, {}, {}, never, never, true, never>;
891
+ }
892
+
893
+ /**
894
+ * Result returned from a selection strategy's select method.
895
+ */
896
+ interface SelectionResult<D, S> {
897
+ /** The new selection value */
898
+ selection: S;
899
+ /** Whether the selection is complete (emit to consumer) */
900
+ isComplete: boolean;
901
+ /** Optional: dates to highlight during incomplete selection */
902
+ preview?: DateRange<D> | null;
903
+ }
904
+ /**
905
+ * Abstract selection strategy that defines how dates are selected and previewed.
906
+ * Implement this class to create custom selection behaviors.
907
+ *
908
+ * @typeParam D - The date type (e.g., Date, Luxon DateTime)
909
+ * @typeParam S - The selection type (e.g., D | null, DateRange<D>, D[])
910
+ */
911
+ declare abstract class CalendarSelectionStrategy<D, S = unknown> {
912
+ /**
913
+ * Process a date selection. Called when user clicks a date cell.
914
+ * @param date The clicked date
915
+ * @param currentSelection The current selection state
916
+ * @returns Object with new selection and whether selection is complete
917
+ */
918
+ abstract select(date: D, currentSelection: S): SelectionResult<D, S>;
919
+ /**
920
+ * Create a preview range based on current selection and hovered date.
921
+ * Used for showing range preview while hovering.
922
+ * @param activeDate The currently hovered date
923
+ * @param currentSelection The current selection state
924
+ * @returns DateRange for preview styling, or null if no preview
925
+ */
926
+ abstract createPreview(activeDate: D | null, currentSelection: S): DateRange<D> | null;
927
+ /**
928
+ * Check if a date is part of the current selection.
929
+ * Used for styling cells.
930
+ */
931
+ abstract isSelected(date: D, currentSelection: S): boolean;
932
+ /**
933
+ * Check if a date is the start of a selected range.
934
+ */
935
+ abstract isRangeStart(date: D, currentSelection: S): boolean;
936
+ /**
937
+ * Check if a date is the end of a selected range.
938
+ */
939
+ abstract isRangeEnd(date: D, currentSelection: S): boolean;
940
+ /**
941
+ * Check if a date is in the middle of a selected range.
942
+ */
943
+ abstract isRangeMiddle(date: D, currentSelection: S): boolean;
944
+ }
945
+ /** Injection token for the selection strategy */
946
+ declare const CALENDAR_SELECTION_STRATEGY: InjectionToken<CalendarSelectionStrategy<unknown, unknown>>;
947
+
948
+ /**
949
+ * Selection strategy for single date selection.
950
+ *
951
+ * Behavior:
952
+ * - Click date → immediately selects it
953
+ * - No preview range
954
+ * - Output: single date D
955
+ *
956
+ * @example
957
+ * ```typescript
958
+ * @Component({
959
+ * providers: [
960
+ * { provide: CALENDAR_SELECTION_STRATEGY, useClass: SingleSelectionStrategy }
961
+ * ],
962
+ * template: `<com-calendar (selectedChange)="onSelect($event)" />`
963
+ * })
964
+ * export class SinglePickerComponent {
965
+ * onSelect(date: Date) {
966
+ * console.log('Selected:', date);
967
+ * }
968
+ * }
969
+ * ```
970
+ */
971
+ declare class SingleSelectionStrategy<D> extends CalendarSelectionStrategy<D, D | null> {
972
+ private readonly dateAdapter;
973
+ select(date: D, _currentSelection: D | null): SelectionResult<D, D | null>;
974
+ createPreview(_activeDate: D | null, _currentSelection: D | null): DateRange<D> | null;
975
+ isSelected(date: D, currentSelection: D | null): boolean;
976
+ isRangeStart(_date: D, _currentSelection: D | null): boolean;
977
+ isRangeEnd(_date: D, _currentSelection: D | null): boolean;
978
+ isRangeMiddle(_date: D, _currentSelection: D | null): boolean;
979
+ static ɵfac: i0.ɵɵFactoryDeclaration<SingleSelectionStrategy<any>, never>;
980
+ static ɵprov: i0.ɵɵInjectableDeclaration<SingleSelectionStrategy<any>>;
981
+ }
982
+
983
+ /**
984
+ * Selection strategy for date range selection.
985
+ *
986
+ * Behavior:
987
+ * - First click → sets range start, selection incomplete
988
+ * - Second click → sets range end, selection complete
989
+ * - If second date is before first, swap them
990
+ * - Hovering after first click shows preview range
991
+ * - Output: DateRange<D>
992
+ *
993
+ * @example
994
+ * ```typescript
995
+ * @Component({
996
+ * providers: [
997
+ * { provide: CALENDAR_SELECTION_STRATEGY, useClass: RangeSelectionStrategy }
998
+ * ],
999
+ * template: `
1000
+ * <com-calendar
1001
+ * [selected]="selectedRange()"
1002
+ * (selectedChange)="onRangeSelect($event)"
1003
+ * />
1004
+ * `
1005
+ * })
1006
+ * export class RangePickerComponent {
1007
+ * selectedRange = signal<DateRange<Date> | null>(null);
1008
+ *
1009
+ * onRangeSelect(range: DateRange<Date>) {
1010
+ * this.selectedRange.set(range);
1011
+ * }
1012
+ * }
1013
+ * ```
1014
+ */
1015
+ declare class RangeSelectionStrategy<D> extends CalendarSelectionStrategy<D, DateRange<D> | null> {
1016
+ private readonly dateAdapter;
1017
+ select(date: D, currentSelection: DateRange<D> | null): SelectionResult<D, DateRange<D> | null>;
1018
+ createPreview(activeDate: D | null, currentSelection: DateRange<D> | null): DateRange<D> | null;
1019
+ isSelected(date: D, currentSelection: DateRange<D> | null): boolean;
1020
+ isRangeStart(date: D, currentSelection: DateRange<D> | null): boolean;
1021
+ isRangeEnd(date: D, currentSelection: DateRange<D> | null): boolean;
1022
+ isRangeMiddle(date: D, currentSelection: DateRange<D> | null): boolean;
1023
+ static ɵfac: i0.ɵɵFactoryDeclaration<RangeSelectionStrategy<any>, never>;
1024
+ static ɵprov: i0.ɵɵInjectableDeclaration<RangeSelectionStrategy<any>>;
1025
+ }
1026
+
1027
+ /**
1028
+ * Selection strategy for multiple date selection.
1029
+ *
1030
+ * Behavior:
1031
+ * - Click date → toggles it in/out of selection array
1032
+ * - Each click is complete (emits immediately)
1033
+ * - No preview range
1034
+ * - Output: D[]
1035
+ *
1036
+ * @example
1037
+ * ```typescript
1038
+ * @Component({
1039
+ * providers: [
1040
+ * { provide: CALENDAR_SELECTION_STRATEGY, useClass: MultiSelectionStrategy }
1041
+ * ],
1042
+ * template: `<com-calendar (selectedChange)="onMultiSelect($event)" />`
1043
+ * })
1044
+ * export class MultiPickerComponent {
1045
+ * selectedDates = signal<Date[]>([]);
1046
+ *
1047
+ * onMultiSelect(dates: Date[]) {
1048
+ * this.selectedDates.set(dates);
1049
+ * }
1050
+ * }
1051
+ * ```
1052
+ */
1053
+ declare class MultiSelectionStrategy<D> extends CalendarSelectionStrategy<D, D[]> {
1054
+ private readonly dateAdapter;
1055
+ select(date: D, currentSelection: D[]): SelectionResult<D, D[]>;
1056
+ createPreview(_activeDate: D | null, _currentSelection: D[]): DateRange<D> | null;
1057
+ isSelected(date: D, currentSelection: D[]): boolean;
1058
+ isRangeStart(_date: D, _currentSelection: D[]): boolean;
1059
+ isRangeEnd(_date: D, _currentSelection: D[]): boolean;
1060
+ isRangeMiddle(_date: D, _currentSelection: D[]): boolean;
1061
+ static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectionStrategy<any>, never>;
1062
+ static ɵprov: i0.ɵɵInjectableDeclaration<MultiSelectionStrategy<any>>;
1063
+ }
1064
+
1065
+ /**
1066
+ * Selection strategy for week selection.
1067
+ *
1068
+ * Behavior:
1069
+ * - Click any day → selects the entire week containing that day
1070
+ * - Week starts based on DateAdapter.getFirstDayOfWeek()
1071
+ * - Single click completes selection
1072
+ * - Output: DateRange<D> (Monday–Sunday or Sunday–Saturday)
1073
+ *
1074
+ * @example
1075
+ * ```typescript
1076
+ * @Component({
1077
+ * providers: [
1078
+ * { provide: CALENDAR_SELECTION_STRATEGY, useClass: WeekSelectionStrategy }
1079
+ * ],
1080
+ * template: `<com-calendar (selectedChange)="onWeekSelect($event)" />`
1081
+ * })
1082
+ * export class WeekPickerComponent {
1083
+ * onWeekSelect(week: DateRange<Date>) {
1084
+ * console.log('Week:', week.start, 'to', week.end);
1085
+ * }
1086
+ * }
1087
+ * ```
1088
+ */
1089
+ declare class WeekSelectionStrategy<D> extends CalendarSelectionStrategy<D, DateRange<D> | null> {
1090
+ private readonly dateAdapter;
1091
+ select(date: D, _currentSelection: DateRange<D> | null): SelectionResult<D, DateRange<D> | null>;
1092
+ createPreview(activeDate: D | null, _currentSelection: DateRange<D> | null): DateRange<D> | null;
1093
+ isSelected(date: D, currentSelection: DateRange<D> | null): boolean;
1094
+ isRangeStart(date: D, currentSelection: DateRange<D> | null): boolean;
1095
+ isRangeEnd(date: D, currentSelection: DateRange<D> | null): boolean;
1096
+ isRangeMiddle(date: D, currentSelection: DateRange<D> | null): boolean;
1097
+ /** Compute the week range for a given date */
1098
+ private getWeekRange;
1099
+ static ɵfac: i0.ɵɵFactoryDeclaration<WeekSelectionStrategy<any>, never>;
1100
+ static ɵprov: i0.ɵɵInjectableDeclaration<WeekSelectionStrategy<any>>;
1101
+ }
1102
+
1103
+ /**
1104
+ * Provides the native JavaScript Date adapter for the calendar.
1105
+ * This is required for the calendar component to work with native Date objects.
1106
+ *
1107
+ * @example
1108
+ * ```typescript
1109
+ * @Component({
1110
+ * providers: [provideNativeDateAdapter()],
1111
+ * })
1112
+ * export class MyComponent {}
1113
+ * ```
1114
+ */
1115
+ declare function provideNativeDateAdapter(): Provider;
1116
+ /**
1117
+ * Provides the single selection strategy (default behavior).
1118
+ * Allows selecting one date at a time.
1119
+ *
1120
+ * @example
1121
+ * ```typescript
1122
+ * @Component({
1123
+ * providers: [
1124
+ * provideNativeDateAdapter(),
1125
+ * provideSingleSelectionStrategy(),
1126
+ * ],
1127
+ * })
1128
+ * export class MyComponent {}
1129
+ * ```
1130
+ */
1131
+ declare function provideSingleSelectionStrategy(): Provider;
1132
+ /**
1133
+ * Provides the range selection strategy.
1134
+ * Allows selecting a start and end date to create a date range.
1135
+ *
1136
+ * @example
1137
+ * ```typescript
1138
+ * @Component({
1139
+ * providers: [
1140
+ * provideNativeDateAdapter(),
1141
+ * provideRangeSelectionStrategy(),
1142
+ * ],
1143
+ * })
1144
+ * export class MyComponent {
1145
+ * range = signal<DateRange<Date> | null>(null);
1146
+ * }
1147
+ * ```
1148
+ */
1149
+ declare function provideRangeSelectionStrategy(): Provider;
1150
+ /**
1151
+ * Provides the multi selection strategy.
1152
+ * Allows selecting multiple individual dates.
1153
+ *
1154
+ * @example
1155
+ * ```typescript
1156
+ * @Component({
1157
+ * providers: [
1158
+ * provideNativeDateAdapter(),
1159
+ * provideMultiSelectionStrategy(),
1160
+ * ],
1161
+ * })
1162
+ * export class MyComponent {
1163
+ * dates = signal<Date[]>([]);
1164
+ * }
1165
+ * ```
1166
+ */
1167
+ declare function provideMultiSelectionStrategy(): Provider;
1168
+ /**
1169
+ * Provides the week selection strategy.
1170
+ * Allows selecting entire weeks at a time.
1171
+ *
1172
+ * @example
1173
+ * ```typescript
1174
+ * @Component({
1175
+ * providers: [
1176
+ * provideNativeDateAdapter(),
1177
+ * provideWeekSelectionStrategy(),
1178
+ * ],
1179
+ * })
1180
+ * export class MyComponent {
1181
+ * range = signal<DateRange<Date> | null>(null);
1182
+ * }
1183
+ * ```
1184
+ */
1185
+ declare function provideWeekSelectionStrategy(): Provider;
1186
+
1187
+ /**
1188
+ * Types and interfaces for DatePicker and DateRangePicker components.
1189
+ */
1190
+ /** Date format preset names */
1191
+ type DateFormatPreset = 'short' | 'medium' | 'long' | 'full';
1192
+ /** Panel width configuration */
1193
+ type DatepickerPanelWidth = 'auto' | 'trigger' | `${number}px` | `${number}rem`;
1194
+ /** Size variants for datepicker components */
1195
+ type DatepickerSize = 'sm' | 'default' | 'lg';
1196
+ /** Visual variant for datepicker trigger */
1197
+ type DatepickerVariant = 'default' | 'outline' | 'ghost' | 'filled';
1198
+ /** Validation state for datepicker */
1199
+ type DatepickerState = 'default' | 'error' | 'success';
1200
+ /** Configuration for datepicker footer actions */
1201
+ interface DatepickerFooterConfig {
1202
+ /** Show today button */
1203
+ showToday?: boolean;
1204
+ /** Show clear button */
1205
+ showClear?: boolean;
1206
+ /** Custom today button label */
1207
+ todayLabel?: string;
1208
+ /** Custom clear button label */
1209
+ clearLabel?: string;
1210
+ }
1211
+ /** Value type for DateRangePicker */
1212
+ interface DateRangeValue<D> {
1213
+ /** Start date of the range */
1214
+ start: D | null;
1215
+ /** End date of the range */
1216
+ end: D | null;
1217
+ }
1218
+ /** Creates a DateRangeValue */
1219
+ declare function createDateRangeValue<D>(start?: D | null, end?: D | null): DateRangeValue<D>;
1220
+ declare function generateDatepickerId(): string;
1221
+
1222
+ /**
1223
+ * CVA variants for the datepicker trigger input.
1224
+ * Uses semantic theme tokens for consistent cross-theme styling.
1225
+ *
1226
+ * @tokens `--color-input-background`, `--color-input-foreground`, `--color-input-border`,
1227
+ * `--color-input-placeholder`, `--color-ring`, `--color-muted`, `--color-muted-hover`,
1228
+ * `--color-warn`, `--color-success`, `--color-primary`, `--color-border`,
1229
+ * `--color-disabled`, `--color-disabled-foreground`, `--radius-input`
1230
+ */
1231
+ declare const datepickerTriggerVariants: (props?: {
1232
+ variant?: DatepickerVariant;
1233
+ size?: DatepickerSize;
1234
+ state?: DatepickerState;
1235
+ open?: boolean;
1236
+ }) => string;
1237
+ type DatepickerTriggerVariants = VariantProps<typeof datepickerTriggerVariants>;
1238
+ /**
1239
+ * CVA variants for the disabled state of datepicker trigger.
1240
+ *
1241
+ * @tokens `--color-disabled`, `--color-disabled-foreground`
1242
+ */
1243
+ declare const datepickerDisabledVariants: () => string;
1244
+ type DatepickerDisabledVariants = VariantProps<typeof datepickerDisabledVariants>;
1245
+ /**
1246
+ * CVA variants for the datepicker input field.
1247
+ *
1248
+ * @tokens `--color-input-foreground`, `--color-input-placeholder`
1249
+ */
1250
+ declare const datepickerInputVariants: (props?: {
1251
+ size?: DatepickerSize;
1252
+ }) => string;
1253
+ type DatepickerInputVariants = VariantProps<typeof datepickerInputVariants>;
1254
+ /**
1255
+ * CVA variants for the calendar icon button.
1256
+ *
1257
+ * @tokens `--color-ring`, `--color-muted-foreground`, `--radius-interactive-sm`
1258
+ */
1259
+ declare const datepickerIconVariants: (props?: {
1260
+ size?: DatepickerSize;
1261
+ }) => string;
1262
+ type DatepickerIconVariants = VariantProps<typeof datepickerIconVariants>;
1263
+ /**
1264
+ * CVA variants for the clear button.
1265
+ *
1266
+ * @tokens `--color-ring`, `--color-muted-foreground`, `--radius-interactive-sm`
1267
+ */
1268
+ declare const datepickerClearVariants: (props?: {
1269
+ size?: DatepickerSize;
1270
+ }) => string;
1271
+ type DatepickerClearVariants = VariantProps<typeof datepickerClearVariants>;
1272
+ /**
1273
+ * CVA variants for the datepicker panel (overlay).
1274
+ *
1275
+ * @tokens `--color-popover`, `--color-popover-foreground`, `--color-border-subtle`, `--radius-overlay`
1276
+ */
1277
+ declare const datepickerPanelVariants: (props?: {
1278
+ size?: DatepickerSize;
1279
+ }) => string;
1280
+ type DatepickerPanelVariants = VariantProps<typeof datepickerPanelVariants>;
1281
+ /**
1282
+ * CVA variants for the footer section of the datepicker panel.
1283
+ *
1284
+ * @tokens `--color-border-subtle`
1285
+ */
1286
+ declare const datepickerFooterVariants: (props?: {
1287
+ size?: DatepickerSize;
1288
+ }) => string;
1289
+ type DatepickerFooterVariants = VariantProps<typeof datepickerFooterVariants>;
1290
+ /**
1291
+ * CVA variants for the footer buttons.
1292
+ *
1293
+ * @tokens `--color-primary`, `--color-primary-foreground`, `--color-primary-hover`,
1294
+ * `--color-muted`, `--color-muted-foreground`, `--color-muted-hover`, `--radius-control-sm`
1295
+ */
1296
+ declare const datepickerFooterButtonVariants: (props?: {
1297
+ size?: DatepickerSize;
1298
+ variant?: 'primary' | 'secondary';
1299
+ }) => string;
1300
+ type DatepickerFooterButtonVariants = VariantProps<typeof datepickerFooterButtonVariants>;
1301
+ /**
1302
+ * CVA variants for the range separator.
1303
+ *
1304
+ * @tokens `--color-muted-foreground`
1305
+ */
1306
+ declare const datepickerRangeSeparatorVariants: (props?: {
1307
+ size?: DatepickerSize;
1308
+ }) => string;
1309
+ type DatepickerRangeSeparatorVariants = VariantProps<typeof datepickerRangeSeparatorVariants>;
1310
+
1311
+ /**
1312
+ * Single date picker component with calendar popup.
1313
+ * Implements ControlValueAccessor for Reactive Forms and Template-driven Forms.
1314
+ *
1315
+ * @tokens `--color-input-background`, `--color-input-foreground`, `--color-input-border`,
1316
+ * `--color-input-placeholder`, `--color-ring`, `--color-muted`, `--color-muted-foreground`,
1317
+ * `--color-popover`, `--color-popover-foreground`, `--color-border-subtle`,
1318
+ * `--color-primary`, `--color-primary-foreground`, `--color-primary-hover`,
1319
+ * `--color-warn`, `--color-success`, `--color-disabled`, `--color-disabled-foreground`
1320
+ *
1321
+ * @example
1322
+ * ```html
1323
+ * <com-datepicker
1324
+ * formControlName="birthDate"
1325
+ * placeholder="Select date..."
1326
+ * [min]="minDate"
1327
+ * [max]="maxDate"
1328
+ * [showTodayButton]="true"
1329
+ * [showClearButton]="true"
1330
+ * />
1331
+ * ```
1332
+ */
1333
+ declare class ComDatepicker<D> implements ControlValueAccessor, Validator, OnDestroy {
1334
+ private readonly elementRef;
1335
+ private readonly destroyRef;
1336
+ private readonly overlay;
1337
+ private readonly viewContainerRef;
1338
+ private readonly document;
1339
+ private readonly dateAdapter;
1340
+ /** Optional NgControl for form integration. */
1341
+ private readonly ngControl;
1342
+ /** Reference to the trigger element. */
1343
+ private readonly triggerRef;
1344
+ /** Reference to the input element. */
1345
+ private readonly inputRef;
1346
+ /** Reference to the panel template. */
1347
+ private readonly panelTemplateRef;
1348
+ /** Overlay reference. */
1349
+ private overlayRef;
1350
+ /** Unique ID for the datepicker. */
1351
+ private readonly datepickerId;
1352
+ /** Current value. */
1353
+ readonly value: InputSignal<D | null>;
1354
+ /** Minimum selectable date. */
1355
+ readonly min: InputSignal<D | null>;
1356
+ /** Maximum selectable date. */
1357
+ readonly max: InputSignal<D | null>;
1358
+ /** Custom filter function to disable specific dates. */
1359
+ readonly dateFilter: InputSignal<DateFilterFn<D> | null>;
1360
+ /** Date the calendar opens to (defaults to selected or today). */
1361
+ readonly startAt: InputSignal<D | null>;
1362
+ /** Initial calendar view. */
1363
+ readonly startView: InputSignal<CalendarView>;
1364
+ /** First day of week override (0=Sun, 1=Mon, ..., 6=Sat). */
1365
+ readonly firstDayOfWeek: InputSignal<number | null>;
1366
+ /** Placeholder text. */
1367
+ readonly placeholder: InputSignal<string>;
1368
+ /** Whether the datepicker is disabled. */
1369
+ readonly disabled: InputSignal<boolean>;
1370
+ /** Whether the datepicker is required. */
1371
+ readonly required: InputSignal<boolean>;
1372
+ /** Display format for the date. */
1373
+ readonly dateFormat: InputSignal<DateFormatPreset>;
1374
+ /** Show a clear button in the trigger. */
1375
+ readonly showClearButton: InputSignal<boolean>;
1376
+ /** Show a today button in the footer. */
1377
+ readonly showTodayButton: InputSignal<boolean>;
1378
+ /** Show a clear button in the footer. */
1379
+ readonly showFooterClearButton: InputSignal<boolean>;
1380
+ /** Don't auto-close on selection. */
1381
+ readonly keepOpen: InputSignal<boolean>;
1382
+ /** Allow manual text input. */
1383
+ readonly allowManualInput: InputSignal<boolean>;
1384
+ /** Additional CSS classes for the panel. */
1385
+ readonly panelClass: InputSignal<string>;
1386
+ /** Panel width strategy. */
1387
+ readonly panelWidth: InputSignal<DatepickerPanelWidth>;
1388
+ /** CVA variant for trigger styling. */
1389
+ readonly variant: InputSignal<DatepickerVariant>;
1390
+ /** Size variant. */
1391
+ readonly size: InputSignal<DatepickerSize>;
1392
+ /** Validation state. */
1393
+ readonly state: InputSignal<DatepickerState>;
1394
+ /** Additional CSS classes for the trigger. */
1395
+ readonly userClass: InputSignal<string>;
1396
+ /** Accessible label for the input. */
1397
+ readonly ariaLabel: InputSignal<string | null>;
1398
+ /** ID of element describing the input. */
1399
+ readonly ariaDescribedBy: InputSignal<string | null>;
1400
+ /** Emitted when a date is selected. */
1401
+ readonly dateChange: OutputEmitterRef<D | null>;
1402
+ /** Emitted when the panel opens. */
1403
+ readonly opened: OutputEmitterRef<void>;
1404
+ /** Emitted when the panel closes. */
1405
+ readonly closed: OutputEmitterRef<void>;
1406
+ /** Whether the panel is open. */
1407
+ readonly isOpen: WritableSignal<boolean>;
1408
+ /** Internal value state (managed by CVA or input). */
1409
+ readonly internalValue: WritableSignal<D | null>;
1410
+ /** Calendar active date for navigation. */
1411
+ readonly calendarActiveDate: WritableSignal<D>;
1412
+ /** Live announcements for screen readers. */
1413
+ readonly liveAnnouncement: WritableSignal<string>;
1414
+ /** Input element ID. */
1415
+ readonly inputId: Signal<string>;
1416
+ /** Panel element ID. */
1417
+ readonly panelId: Signal<string>;
1418
+ /** Whether the datepicker has a value. */
1419
+ readonly hasValue: Signal<boolean>;
1420
+ /** Formatted display value. */
1421
+ readonly displayValue: Signal<string>;
1422
+ /** Computed trigger classes. */
1423
+ readonly triggerClasses: Signal<string>;
1424
+ /** Computed input classes. */
1425
+ readonly inputClasses: Signal<string>;
1426
+ /** Computed icon classes. */
1427
+ readonly iconClasses: Signal<string>;
1428
+ /** Computed clear button classes. */
1429
+ readonly clearClasses: Signal<string>;
1430
+ /** Computed panel classes. */
1431
+ readonly panelClasses: Signal<string>;
1432
+ /** Computed footer classes. */
1433
+ readonly footerClasses: Signal<string>;
1434
+ /** Computed today button classes. */
1435
+ readonly todayButtonClasses: Signal<string>;
1436
+ /** Computed clear button classes (footer). */
1437
+ readonly clearButtonClasses: Signal<string>;
1438
+ private onChange;
1439
+ private onTouched;
1440
+ private onValidatorChange;
1441
+ constructor();
1442
+ ngOnDestroy(): void;
1443
+ writeValue(value: D | null): void;
1444
+ registerOnChange(fn: (value: D | null) => void): void;
1445
+ registerOnTouched(fn: () => void): void;
1446
+ setDisabledState(_isDisabled: boolean): void;
1447
+ validate(): ValidationErrors | null;
1448
+ registerOnValidatorChange(fn: () => void): void;
1449
+ /** Opens the datepicker panel. */
1450
+ open(): void;
1451
+ /** Closes the datepicker panel. */
1452
+ close(): void;
1453
+ /** Toggles the datepicker panel. */
1454
+ toggle(): void;
1455
+ /** Clears the selected date. */
1456
+ clear(event?: Event): void;
1457
+ /** Selects today's date. */
1458
+ selectToday(): void;
1459
+ protected onTriggerClick(): void;
1460
+ protected onTriggerKeydown(event: KeyboardEvent): void;
1461
+ protected onInputKeydown(event: KeyboardEvent): void;
1462
+ protected onInputChange(event: Event): void;
1463
+ protected onInputBlur(): void;
1464
+ protected onPanelKeydown(event: KeyboardEvent): void;
1465
+ protected onDateSelected(date: D): void;
1466
+ protected onActiveDateChange(date: D): void;
1467
+ private createOverlay;
1468
+ private destroyOverlay;
1469
+ private updateValue;
1470
+ private parseAndSetValue;
1471
+ private isDateValid;
1472
+ private announce;
1473
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComDatepicker<any>, never>;
1474
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComDatepicker<any>, "com-datepicker", ["comDatepicker"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "required": false; "isSignal": true; }; "startView": { "alias": "startView"; "required": false; "isSignal": true; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "dateFormat": { "alias": "dateFormat"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "showTodayButton": { "alias": "showTodayButton"; "required": false; "isSignal": true; }; "showFooterClearButton": { "alias": "showFooterClearButton"; "required": false; "isSignal": true; }; "keepOpen": { "alias": "keepOpen"; "required": false; "isSignal": true; }; "allowManualInput": { "alias": "allowManualInput"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "panelWidth": { "alias": "panelWidth"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; }, { "dateChange": "dateChange"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
1475
+ }
1476
+
1477
+ /**
1478
+ * Date range picker component with calendar popup.
1479
+ * Allows selecting a start and end date via a two-click interaction.
1480
+ * Implements ControlValueAccessor for Reactive Forms and Template-driven Forms.
1481
+ *
1482
+ * @tokens `--color-input-background`, `--color-input-foreground`, `--color-input-border`,
1483
+ * `--color-input-placeholder`, `--color-ring`, `--color-muted`, `--color-muted-foreground`,
1484
+ * `--color-popover`, `--color-popover-foreground`, `--color-border-subtle`,
1485
+ * `--color-primary`, `--color-primary-foreground`, `--color-primary-hover`,
1486
+ * `--color-warn`, `--color-success`, `--color-disabled`, `--color-disabled-foreground`
1487
+ *
1488
+ * @example
1489
+ * ```html
1490
+ * <com-date-range-picker
1491
+ * formControlName="dateRange"
1492
+ * startPlaceholder="Start date"
1493
+ * endPlaceholder="End date"
1494
+ * [min]="minDate"
1495
+ * [max]="maxDate"
1496
+ * [showTodayButton]="true"
1497
+ * />
1498
+ * ```
1499
+ */
1500
+ declare class ComDateRangePicker<D> implements ControlValueAccessor, Validator, OnDestroy {
1501
+ private readonly elementRef;
1502
+ private readonly destroyRef;
1503
+ private readonly overlay;
1504
+ private readonly viewContainerRef;
1505
+ private readonly document;
1506
+ private readonly dateAdapter;
1507
+ /** Optional NgControl for form integration. */
1508
+ private readonly ngControl;
1509
+ /** Reference to the trigger element. */
1510
+ private readonly triggerRef;
1511
+ /** Reference to the start input element. */
1512
+ private readonly startInputRef;
1513
+ /** Reference to the end input element. */
1514
+ private readonly endInputRef;
1515
+ /** Reference to the panel template. */
1516
+ private readonly panelTemplateRef;
1517
+ /** Overlay reference. */
1518
+ private overlayRef;
1519
+ /** Unique ID for the datepicker. */
1520
+ private readonly datepickerId;
1521
+ /** Current value. */
1522
+ readonly value: InputSignal<DateRangeValue<D> | null>;
1523
+ /** Minimum selectable date. */
1524
+ readonly min: InputSignal<D | null>;
1525
+ /** Maximum selectable date. */
1526
+ readonly max: InputSignal<D | null>;
1527
+ /** Custom filter function to disable specific dates. */
1528
+ readonly dateFilter: InputSignal<DateFilterFn<D> | null>;
1529
+ /** Date the calendar opens to (defaults to start date or today). */
1530
+ readonly startAt: InputSignal<D | null>;
1531
+ /** Initial calendar view. */
1532
+ readonly startView: InputSignal<CalendarView>;
1533
+ /** First day of week override (0=Sun, 1=Mon, ..., 6=Sat). */
1534
+ readonly firstDayOfWeek: InputSignal<number | null>;
1535
+ /** Placeholder text for start date. */
1536
+ readonly startPlaceholder: InputSignal<string>;
1537
+ /** Placeholder text for end date. */
1538
+ readonly endPlaceholder: InputSignal<string>;
1539
+ /** Whether the datepicker is disabled. */
1540
+ readonly disabled: InputSignal<boolean>;
1541
+ /** Whether the datepicker is required. */
1542
+ readonly required: InputSignal<boolean>;
1543
+ /** Display format for the date. */
1544
+ readonly dateFormat: InputSignal<DateFormatPreset>;
1545
+ /** Show a clear button in the trigger. */
1546
+ readonly showClearButton: InputSignal<boolean>;
1547
+ /** Show a today button in the footer. */
1548
+ readonly showTodayButton: InputSignal<boolean>;
1549
+ /** Show a clear button in the footer. */
1550
+ readonly showFooterClearButton: InputSignal<boolean>;
1551
+ /** Don't auto-close on complete range selection. */
1552
+ readonly keepOpen: InputSignal<boolean>;
1553
+ /** Allow manual text input. */
1554
+ readonly allowManualInput: InputSignal<boolean>;
1555
+ /** Additional CSS classes for the panel. */
1556
+ readonly panelClass: InputSignal<string>;
1557
+ /** Panel width strategy. */
1558
+ readonly panelWidth: InputSignal<DatepickerPanelWidth>;
1559
+ /** CVA variant for trigger styling. */
1560
+ readonly variant: InputSignal<DatepickerVariant>;
1561
+ /** Size variant. */
1562
+ readonly size: InputSignal<DatepickerSize>;
1563
+ /** Validation state. */
1564
+ readonly state: InputSignal<DatepickerState>;
1565
+ /** Additional CSS classes for the trigger. */
1566
+ readonly userClass: InputSignal<string>;
1567
+ /** Accessible label for the start input. */
1568
+ readonly startAriaLabel: InputSignal<string | null>;
1569
+ /** Accessible label for the end input. */
1570
+ readonly endAriaLabel: InputSignal<string | null>;
1571
+ /** Emitted when a complete range is selected. */
1572
+ readonly rangeChange: OutputEmitterRef<DateRangeValue<D> | null>;
1573
+ /** Emitted when the panel opens. */
1574
+ readonly opened: OutputEmitterRef<void>;
1575
+ /** Emitted when the panel closes. */
1576
+ readonly closed: OutputEmitterRef<void>;
1577
+ /** Whether the panel is open. */
1578
+ readonly isOpen: WritableSignal<boolean>;
1579
+ /** Which input is currently focused. */
1580
+ readonly activeInput: WritableSignal<'start' | 'end' | null>;
1581
+ /** Internal value state (managed by CVA or input). */
1582
+ readonly internalValue: WritableSignal<DateRangeValue<D> | null>;
1583
+ /** Calendar active date for navigation. */
1584
+ readonly calendarActiveDate: WritableSignal<D>;
1585
+ /** Live announcements for screen readers. */
1586
+ readonly liveAnnouncement: WritableSignal<string>;
1587
+ /** Start input element ID. */
1588
+ readonly startInputId: Signal<string>;
1589
+ /** End input element ID. */
1590
+ readonly endInputId: Signal<string>;
1591
+ /** Panel element ID. */
1592
+ readonly panelId: Signal<string>;
1593
+ /** Whether the datepicker has a value. */
1594
+ readonly hasValue: Signal<boolean>;
1595
+ /** Calendar selection (converts DateRangeValue to DateRange for calendar). */
1596
+ readonly calendarSelection: Signal<DateRange<D> | null>;
1597
+ /** Formatted start display value. */
1598
+ readonly startDisplayValue: Signal<string>;
1599
+ /** Formatted end display value. */
1600
+ readonly endDisplayValue: Signal<string>;
1601
+ /** Computed trigger classes. */
1602
+ readonly triggerClasses: Signal<string>;
1603
+ /** Computed input classes. */
1604
+ readonly inputClasses: Signal<string>;
1605
+ /** Computed separator classes. */
1606
+ readonly separatorClasses: Signal<string>;
1607
+ /** Computed icon classes. */
1608
+ readonly iconClasses: Signal<string>;
1609
+ /** Computed clear button classes. */
1610
+ readonly clearClasses: Signal<string>;
1611
+ /** Computed panel classes. */
1612
+ readonly panelClasses: Signal<string>;
1613
+ /** Computed footer classes. */
1614
+ readonly footerClasses: Signal<string>;
1615
+ /** Computed today button classes. */
1616
+ readonly todayButtonClasses: Signal<string>;
1617
+ /** Computed clear button classes (footer). */
1618
+ readonly clearButtonClasses: Signal<string>;
1619
+ private onChange;
1620
+ private onTouched;
1621
+ private onValidatorChange;
1622
+ constructor();
1623
+ ngOnDestroy(): void;
1624
+ writeValue(value: DateRangeValue<D> | null): void;
1625
+ registerOnChange(fn: (value: DateRangeValue<D> | null) => void): void;
1626
+ registerOnTouched(fn: () => void): void;
1627
+ setDisabledState(_isDisabled: boolean): void;
1628
+ validate(): ValidationErrors | null;
1629
+ registerOnValidatorChange(fn: () => void): void;
1630
+ /** Opens the datepicker panel. */
1631
+ open(): void;
1632
+ /** Closes the datepicker panel. */
1633
+ close(): void;
1634
+ /** Toggles the datepicker panel. */
1635
+ toggle(): void;
1636
+ /** Clears the selected date range. */
1637
+ clear(event?: Event): void;
1638
+ /** Selects today's date as the start date. */
1639
+ selectToday(): void;
1640
+ protected onTriggerClick(): void;
1641
+ protected onTriggerKeydown(event: KeyboardEvent): void;
1642
+ protected onStartInputFocus(): void;
1643
+ protected onEndInputFocus(): void;
1644
+ protected onInputKeydown(event: KeyboardEvent, inputType: 'start' | 'end'): void;
1645
+ protected onStartInputChange(_event: Event): void;
1646
+ protected onEndInputChange(_event: Event): void;
1647
+ protected onStartInputBlur(): void;
1648
+ protected onEndInputBlur(): void;
1649
+ protected onPanelKeydown(event: KeyboardEvent): void;
1650
+ protected onCalendarSelectionChange(selection: unknown): void;
1651
+ protected onActiveDateChange(date: D): void;
1652
+ private createOverlay;
1653
+ private destroyOverlay;
1654
+ private updateValue;
1655
+ private parseAndSetStart;
1656
+ private parseAndSetEnd;
1657
+ private isDateValid;
1658
+ private formatDate;
1659
+ private announce;
1660
+ static ɵfac: i0.ɵɵFactoryDeclaration<ComDateRangePicker<any>, never>;
1661
+ static ɵcmp: i0.ɵɵComponentDeclaration<ComDateRangePicker<any>, "com-date-range-picker", ["comDateRangePicker"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "required": false; "isSignal": true; }; "startView": { "alias": "startView"; "required": false; "isSignal": true; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "startPlaceholder": { "alias": "startPlaceholder"; "required": false; "isSignal": true; }; "endPlaceholder": { "alias": "endPlaceholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "dateFormat": { "alias": "dateFormat"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "showTodayButton": { "alias": "showTodayButton"; "required": false; "isSignal": true; }; "showFooterClearButton": { "alias": "showFooterClearButton"; "required": false; "isSignal": true; }; "keepOpen": { "alias": "keepOpen"; "required": false; "isSignal": true; }; "allowManualInput": { "alias": "allowManualInput"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "panelWidth": { "alias": "panelWidth"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "startAriaLabel": { "alias": "startAriaLabel"; "required": false; "isSignal": true; }; "endAriaLabel": { "alias": "endAriaLabel"; "required": false; "isSignal": true; }; }, { "rangeChange": "rangeChange"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
1662
+ }
1663
+
1664
+ export { CALENDAR_SELECTION_STRATEGY, CalendarSelectionStrategy, CalendarViewBase, ComCalendar, ComCalendarCell, ComCalendarHeader, ComCalendarMonthView, ComCalendarMultiYearView, ComCalendarYearView, ComDateRangePicker, ComDatepicker, DATE_ADAPTER, DAYS_PER_WEEK, DateAdapter, MONTHS_PER_ROW, MultiSelectionStrategy, NativeDateAdapter, RangeSelectionStrategy, SingleSelectionStrategy, WEEKS_PER_MONTH, WeekSelectionStrategy, YEARS_PER_PAGE, YEARS_PER_ROW, calendarCellVariants, calendarCellWrapperVariants, calendarHeaderButtonVariants, calendarHeaderVariants, calendarVariants, createCalendarCell, createDateRange, createDateRangeValue, createGrid, datepickerClearVariants, datepickerDisabledVariants, datepickerFooterButtonVariants, datepickerFooterVariants, datepickerIconVariants, datepickerInputVariants, datepickerPanelVariants, datepickerRangeSeparatorVariants, datepickerTriggerVariants, generateDatepickerId, getMultiYearStartingYear, getWeekdayHeaders, isDateDisabled, isMonthDisabled, isYearDisabled, navigateGrid, provideMultiSelectionStrategy, provideNativeDateAdapter, provideRangeSelectionStrategy, provideSingleSelectionStrategy, provideWeekSelectionStrategy };
1665
+ export type { CalendarCell, CalendarCellConfig, CalendarCellKeyNavEvent, CalendarCellState, CalendarCellVariants, CalendarCellWrapperVariants, CalendarHeaderButtonVariants, CalendarHeaderVariants, CalendarVariants, CalendarView, DateClassFn, DateFilterFn, DateFormatPreset, DateRange, DateRangeValue, DatepickerClearVariants, DatepickerDisabledVariants, DatepickerFooterButtonVariants, DatepickerFooterConfig, DatepickerFooterVariants, DatepickerIconVariants, DatepickerInputVariants, DatepickerPanelVariants, DatepickerPanelWidth, DatepickerRangeSeparatorVariants, DatepickerSize, DatepickerState, DatepickerTriggerVariants, DatepickerVariant, NameStyle, SelectionResult, WeekdayHeader };