@cute-widgets/base 20.0.1

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 (183) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/LICENSE.md +191 -0
  3. package/README.md +190 -0
  4. package/abstract/index.d.ts +327 -0
  5. package/alert/index.d.ts +68 -0
  6. package/autocomplete/index.d.ts +442 -0
  7. package/badge/index.d.ts +26 -0
  8. package/bottom-sheet/index.d.ts +231 -0
  9. package/button/index.d.ts +182 -0
  10. package/button-toggle/index.d.ts +225 -0
  11. package/card/index.d.ts +163 -0
  12. package/checkbox/index.d.ts +174 -0
  13. package/chips/index.d.ts +963 -0
  14. package/collapse/index.d.ts +97 -0
  15. package/core/animation/index.d.ts +43 -0
  16. package/core/datetime/index.d.ts +404 -0
  17. package/core/directives/index.d.ts +168 -0
  18. package/core/error/index.d.ts +74 -0
  19. package/core/index.d.ts +1039 -0
  20. package/core/interfaces/index.d.ts +114 -0
  21. package/core/layout/index.d.ts +53 -0
  22. package/core/line/index.d.ts +37 -0
  23. package/core/nav/index.d.ts +321 -0
  24. package/core/observers/index.d.ts +124 -0
  25. package/core/option/index.d.ts +185 -0
  26. package/core/pipes/index.d.ts +53 -0
  27. package/core/ripple/index.d.ts +66 -0
  28. package/core/testing/index.d.ts +154 -0
  29. package/core/theming/index.d.ts +118 -0
  30. package/core/types/index.d.ts +53 -0
  31. package/core/utils/index.d.ts +129 -0
  32. package/cute-widgets-base-20.0.1.tgz +0 -0
  33. package/datepicker/index.d.ts +1817 -0
  34. package/dialog/index.d.ts +484 -0
  35. package/divider/index.d.ts +24 -0
  36. package/expansion/README.md +8 -0
  37. package/expansion/index.d.ts +308 -0
  38. package/fesm2022/cute-widgets-base-abstract.mjs +547 -0
  39. package/fesm2022/cute-widgets-base-abstract.mjs.map +1 -0
  40. package/fesm2022/cute-widgets-base-alert.mjs +198 -0
  41. package/fesm2022/cute-widgets-base-alert.mjs.map +1 -0
  42. package/fesm2022/cute-widgets-base-autocomplete.mjs +1217 -0
  43. package/fesm2022/cute-widgets-base-autocomplete.mjs.map +1 -0
  44. package/fesm2022/cute-widgets-base-badge.mjs +75 -0
  45. package/fesm2022/cute-widgets-base-badge.mjs.map +1 -0
  46. package/fesm2022/cute-widgets-base-bottom-sheet.mjs +416 -0
  47. package/fesm2022/cute-widgets-base-bottom-sheet.mjs.map +1 -0
  48. package/fesm2022/cute-widgets-base-button-toggle.mjs +640 -0
  49. package/fesm2022/cute-widgets-base-button-toggle.mjs.map +1 -0
  50. package/fesm2022/cute-widgets-base-button.mjs +546 -0
  51. package/fesm2022/cute-widgets-base-button.mjs.map +1 -0
  52. package/fesm2022/cute-widgets-base-card.mjs +471 -0
  53. package/fesm2022/cute-widgets-base-card.mjs.map +1 -0
  54. package/fesm2022/cute-widgets-base-checkbox.mjs +390 -0
  55. package/fesm2022/cute-widgets-base-checkbox.mjs.map +1 -0
  56. package/fesm2022/cute-widgets-base-chips.mjs +2360 -0
  57. package/fesm2022/cute-widgets-base-chips.mjs.map +1 -0
  58. package/fesm2022/cute-widgets-base-collapse.mjs +259 -0
  59. package/fesm2022/cute-widgets-base-collapse.mjs.map +1 -0
  60. package/fesm2022/cute-widgets-base-core-animation.mjs +53 -0
  61. package/fesm2022/cute-widgets-base-core-animation.mjs.map +1 -0
  62. package/fesm2022/cute-widgets-base-core-datetime.mjs +568 -0
  63. package/fesm2022/cute-widgets-base-core-datetime.mjs.map +1 -0
  64. package/fesm2022/cute-widgets-base-core-directives.mjs +404 -0
  65. package/fesm2022/cute-widgets-base-core-directives.mjs.map +1 -0
  66. package/fesm2022/cute-widgets-base-core-error.mjs +105 -0
  67. package/fesm2022/cute-widgets-base-core-error.mjs.map +1 -0
  68. package/fesm2022/cute-widgets-base-core-interfaces.mjs +22 -0
  69. package/fesm2022/cute-widgets-base-core-interfaces.mjs.map +1 -0
  70. package/fesm2022/cute-widgets-base-core-layout.mjs +74 -0
  71. package/fesm2022/cute-widgets-base-core-layout.mjs.map +1 -0
  72. package/fesm2022/cute-widgets-base-core-line.mjs +87 -0
  73. package/fesm2022/cute-widgets-base-core-line.mjs.map +1 -0
  74. package/fesm2022/cute-widgets-base-core-nav.mjs +863 -0
  75. package/fesm2022/cute-widgets-base-core-nav.mjs.map +1 -0
  76. package/fesm2022/cute-widgets-base-core-observers.mjs +304 -0
  77. package/fesm2022/cute-widgets-base-core-observers.mjs.map +1 -0
  78. package/fesm2022/cute-widgets-base-core-option.mjs +373 -0
  79. package/fesm2022/cute-widgets-base-core-option.mjs.map +1 -0
  80. package/fesm2022/cute-widgets-base-core-pipes.mjs +97 -0
  81. package/fesm2022/cute-widgets-base-core-pipes.mjs.map +1 -0
  82. package/fesm2022/cute-widgets-base-core-ripple.mjs +172 -0
  83. package/fesm2022/cute-widgets-base-core-ripple.mjs.map +1 -0
  84. package/fesm2022/cute-widgets-base-core-testing.mjs +210 -0
  85. package/fesm2022/cute-widgets-base-core-testing.mjs.map +1 -0
  86. package/fesm2022/cute-widgets-base-core-theming.mjs +314 -0
  87. package/fesm2022/cute-widgets-base-core-theming.mjs.map +1 -0
  88. package/fesm2022/cute-widgets-base-core-types.mjs +22 -0
  89. package/fesm2022/cute-widgets-base-core-types.mjs.map +1 -0
  90. package/fesm2022/cute-widgets-base-core-utils.mjs +257 -0
  91. package/fesm2022/cute-widgets-base-core-utils.mjs.map +1 -0
  92. package/fesm2022/cute-widgets-base-core.mjs +1600 -0
  93. package/fesm2022/cute-widgets-base-core.mjs.map +1 -0
  94. package/fesm2022/cute-widgets-base-datepicker.mjs +4827 -0
  95. package/fesm2022/cute-widgets-base-datepicker.mjs.map +1 -0
  96. package/fesm2022/cute-widgets-base-dialog.mjs +1046 -0
  97. package/fesm2022/cute-widgets-base-dialog.mjs.map +1 -0
  98. package/fesm2022/cute-widgets-base-divider.mjs +86 -0
  99. package/fesm2022/cute-widgets-base-divider.mjs.map +1 -0
  100. package/fesm2022/cute-widgets-base-expansion.mjs +623 -0
  101. package/fesm2022/cute-widgets-base-expansion.mjs.map +1 -0
  102. package/fesm2022/cute-widgets-base-form-field.mjs +969 -0
  103. package/fesm2022/cute-widgets-base-form-field.mjs.map +1 -0
  104. package/fesm2022/cute-widgets-base-grid-list.mjs +715 -0
  105. package/fesm2022/cute-widgets-base-grid-list.mjs.map +1 -0
  106. package/fesm2022/cute-widgets-base-icon.mjs +1105 -0
  107. package/fesm2022/cute-widgets-base-icon.mjs.map +1 -0
  108. package/fesm2022/cute-widgets-base-input.mjs +726 -0
  109. package/fesm2022/cute-widgets-base-input.mjs.map +1 -0
  110. package/fesm2022/cute-widgets-base-layout-container.mjs +95 -0
  111. package/fesm2022/cute-widgets-base-layout-container.mjs.map +1 -0
  112. package/fesm2022/cute-widgets-base-layout-stack.mjs +166 -0
  113. package/fesm2022/cute-widgets-base-layout-stack.mjs.map +1 -0
  114. package/fesm2022/cute-widgets-base-layout.mjs +250 -0
  115. package/fesm2022/cute-widgets-base-layout.mjs.map +1 -0
  116. package/fesm2022/cute-widgets-base-list.mjs +1557 -0
  117. package/fesm2022/cute-widgets-base-list.mjs.map +1 -0
  118. package/fesm2022/cute-widgets-base-menu.mjs +1283 -0
  119. package/fesm2022/cute-widgets-base-menu.mjs.map +1 -0
  120. package/fesm2022/cute-widgets-base-navbar.mjs +359 -0
  121. package/fesm2022/cute-widgets-base-navbar.mjs.map +1 -0
  122. package/fesm2022/cute-widgets-base-paginator.mjs +485 -0
  123. package/fesm2022/cute-widgets-base-paginator.mjs.map +1 -0
  124. package/fesm2022/cute-widgets-base-progress.mjs +321 -0
  125. package/fesm2022/cute-widgets-base-progress.mjs.map +1 -0
  126. package/fesm2022/cute-widgets-base-radio.mjs +637 -0
  127. package/fesm2022/cute-widgets-base-radio.mjs.map +1 -0
  128. package/fesm2022/cute-widgets-base-select.mjs +1208 -0
  129. package/fesm2022/cute-widgets-base-select.mjs.map +1 -0
  130. package/fesm2022/cute-widgets-base-sidenav.mjs +1095 -0
  131. package/fesm2022/cute-widgets-base-sidenav.mjs.map +1 -0
  132. package/fesm2022/cute-widgets-base-slider.mjs +99 -0
  133. package/fesm2022/cute-widgets-base-slider.mjs.map +1 -0
  134. package/fesm2022/cute-widgets-base-snack-bar.mjs +897 -0
  135. package/fesm2022/cute-widgets-base-snack-bar.mjs.map +1 -0
  136. package/fesm2022/cute-widgets-base-sort.mjs +639 -0
  137. package/fesm2022/cute-widgets-base-sort.mjs.map +1 -0
  138. package/fesm2022/cute-widgets-base-spinner.mjs +154 -0
  139. package/fesm2022/cute-widgets-base-spinner.mjs.map +1 -0
  140. package/fesm2022/cute-widgets-base-stepper.mjs +673 -0
  141. package/fesm2022/cute-widgets-base-stepper.mjs.map +1 -0
  142. package/fesm2022/cute-widgets-base-table.mjs +1023 -0
  143. package/fesm2022/cute-widgets-base-table.mjs.map +1 -0
  144. package/fesm2022/cute-widgets-base-tabs.mjs +729 -0
  145. package/fesm2022/cute-widgets-base-tabs.mjs.map +1 -0
  146. package/fesm2022/cute-widgets-base-timepicker.mjs +965 -0
  147. package/fesm2022/cute-widgets-base-timepicker.mjs.map +1 -0
  148. package/fesm2022/cute-widgets-base-toolbar.mjs +120 -0
  149. package/fesm2022/cute-widgets-base-toolbar.mjs.map +1 -0
  150. package/fesm2022/cute-widgets-base-tooltip.mjs +947 -0
  151. package/fesm2022/cute-widgets-base-tooltip.mjs.map +1 -0
  152. package/fesm2022/cute-widgets-base-tree.mjs +598 -0
  153. package/fesm2022/cute-widgets-base-tree.mjs.map +1 -0
  154. package/fesm2022/cute-widgets-base.mjs +68 -0
  155. package/fesm2022/cute-widgets-base.mjs.map +1 -0
  156. package/form-field/index.d.ts +401 -0
  157. package/grid-list/index.d.ts +361 -0
  158. package/icon/index.d.ts +477 -0
  159. package/index.d.ts +3 -0
  160. package/input/index.d.ts +256 -0
  161. package/layout/container/index.d.ts +31 -0
  162. package/layout/index.d.ts +78 -0
  163. package/layout/stack/index.d.ts +52 -0
  164. package/list/index.d.ts +659 -0
  165. package/menu/index.d.ts +497 -0
  166. package/navbar/index.d.ts +91 -0
  167. package/package.json +279 -0
  168. package/paginator/index.d.ts +216 -0
  169. package/progress/index.d.ts +130 -0
  170. package/radio/index.d.ts +259 -0
  171. package/select/index.d.ts +426 -0
  172. package/sidenav/index.d.ts +369 -0
  173. package/slider/index.d.ts +48 -0
  174. package/snack-bar/index.d.ts +374 -0
  175. package/sort/index.d.ts +334 -0
  176. package/spinner/index.d.ts +70 -0
  177. package/stepper/index.d.ts +295 -0
  178. package/table/index.d.ts +395 -0
  179. package/tabs/index.d.ts +307 -0
  180. package/timepicker/index.d.ts +350 -0
  181. package/toolbar/index.d.ts +36 -0
  182. package/tooltip/index.d.ts +299 -0
  183. package/tree/index.d.ts +314 -0
@@ -0,0 +1,1817 @@
1
+ import * as i0 from '@angular/core';
2
+ import { OnChanges, OnDestroy, AfterViewChecked, EventEmitter, SimpleChanges, FactoryProvider, AfterContentInit, ChangeDetectorRef, AfterViewInit, ElementRef, InjectionToken, OnInit, DoCheck, TemplateRef } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+ import * as i2 from '@cute-widgets/base/button';
5
+ import { CuteButton } from '@cute-widgets/base/button';
6
+ import * as i3 from '@angular/cdk/overlay';
7
+ import { ScrollStrategy } from '@angular/cdk/overlay';
8
+ import * as i4 from '@angular/cdk/a11y';
9
+ import { FocusOrigin } from '@angular/cdk/a11y';
10
+ import * as i5 from '@angular/cdk/portal';
11
+ import { ComponentType, Portal, TemplatePortal } from '@angular/cdk/portal';
12
+ import { Observable, Subject } from 'rxjs';
13
+ import { DateAdapter, ThemeColor } from '@cute-widgets/base/core';
14
+ import { ControlValueAccessor, Validator, ValidatorFn, AbstractControl, ValidationErrors, NgForm, FormGroupDirective, NgControl } from '@angular/forms';
15
+ import { Expandable } from '@cute-widgets/base/abstract';
16
+ import { CuteFormFieldControl } from '@cute-widgets/base/form-field';
17
+ import { ErrorStateMatcher } from '@cute-widgets/base/core/error';
18
+ import { Directionality } from '@angular/cdk/bidi';
19
+ import * as i19 from '@angular/cdk/scrolling';
20
+
21
+ /** Extra CSS classes that can be associated with a calendar cell. */
22
+ type CuteCalendarCellCssClasses = string | string[] | Set<string> | {
23
+ [key: string]: any;
24
+ };
25
+ /** Function that can generate the extra classes that should be added to a calendar cell. */
26
+ type CuteCalendarCellClassFunction<D> = (date: D, view: 'month' | 'year' | 'multi-year') => CuteCalendarCellCssClasses;
27
+ /**
28
+ * An internal class that represents the data corresponding to a single calendar cell.
29
+ * @docs-private
30
+ */
31
+ declare class CuteCalendarCell<D = any> {
32
+ value: number;
33
+ displayValue: string;
34
+ ariaLabel: string;
35
+ enabled: boolean;
36
+ cssClasses: CuteCalendarCellCssClasses;
37
+ compareValue: number;
38
+ rawValue?: D | undefined;
39
+ readonly id: number;
40
+ constructor(value: number, displayValue: string, ariaLabel: string, enabled: boolean, cssClasses?: CuteCalendarCellCssClasses, compareValue?: number, rawValue?: D | undefined);
41
+ }
42
+ /** Event emitted when a date inside the calendar is triggered as a result of a user action. */
43
+ interface CuteCalendarUserEvent<D> {
44
+ value: D;
45
+ event: Event;
46
+ }
47
+ /**
48
+ * An internal component used to display calendar data in a table.
49
+ */
50
+ declare class CuteCalendarBody<D = any> implements OnChanges, OnDestroy, AfterViewChecked {
51
+ private _elementRef;
52
+ private _ngZone;
53
+ private _platform;
54
+ private _intl;
55
+ /**
56
+ * Used to skip the next focus event when rendering the preview range.
57
+ * We need a flag like this, because some browsers fire focus events asynchronously.
58
+ */
59
+ private _skipNextFocus;
60
+ /**
61
+ * Used to focus the active cell after change detection has run.
62
+ */
63
+ private _focusActiveCellAfterViewChecked;
64
+ /** The label for the table. (e.g. "Jan 2017"). */
65
+ label: string | undefined;
66
+ /** The cells to display in the table. */
67
+ rows: CuteCalendarCell[][];
68
+ /** The value in the table that corresponds to today. */
69
+ todayValue: number | undefined;
70
+ /** Start value of the selected date range. */
71
+ startValue: number;
72
+ /** End value of the selected date range. */
73
+ endValue: number;
74
+ /** The minimum number of free cells needed to fit the label in the first row. */
75
+ labelMinRequiredCells: number;
76
+ /** The number of columns in the table. */
77
+ numCols: number;
78
+ /** The cell number of the active cell in the table. */
79
+ activeCell: number;
80
+ ngAfterViewChecked(): void;
81
+ /** Whether a range is being selected. */
82
+ isRange: boolean;
83
+ /**
84
+ * The aspect ratio (width / height) to use for the cells in the table. This aspect ratio will be
85
+ * maintained even as the table resizes.
86
+ */
87
+ cellAspectRatio: number;
88
+ /** Start of the comparison range. */
89
+ comparisonStart: number | null;
90
+ /** End of the comparison range. */
91
+ comparisonEnd: number | null;
92
+ /** Start of the preview range. */
93
+ previewStart: number | null;
94
+ /** End of the preview range. */
95
+ previewEnd: number | null;
96
+ /** ARIA-Accessible name of the `<input matStartDate/>` */
97
+ startDateAccessibleName: string | null;
98
+ /** ARIA Accessible name of the `<input matEndDate/>` */
99
+ endDateAccessibleName: string | null;
100
+ /** Emits when a new value is selected. */
101
+ readonly selectedValueChange: EventEmitter<CuteCalendarUserEvent<number>>;
102
+ /** Emits when the preview has changed as a result of a user action. */
103
+ readonly previewChange: EventEmitter<CuteCalendarUserEvent<CuteCalendarCell<any> | null>>;
104
+ readonly activeDateChange: EventEmitter<CuteCalendarUserEvent<number>>;
105
+ /** Emits the date at the possible start of a drag event. */
106
+ readonly dragStarted: EventEmitter<CuteCalendarUserEvent<D>>;
107
+ /** Emits the date at the conclusion of a drag, or null if mouse was not released on a date. */
108
+ readonly dragEnded: EventEmitter<CuteCalendarUserEvent<D | null>>;
109
+ /** The number of blank cells to put at the beginning for the first row. */
110
+ protected _firstRowOffset: number;
111
+ /** Padding for the individual date cells. */
112
+ protected _cellPadding: string | undefined;
113
+ /** Width of an individual cell. */
114
+ protected _cellWidth: string | undefined;
115
+ /** ID for the start date label. */
116
+ protected _startDateLabelId: string | null;
117
+ /** ID for the end date label. */
118
+ protected _endDateLabelId: string | null;
119
+ /** ID for the comparison start date label. */
120
+ protected _comparisonStartDateLabelId: string | null;
121
+ /** ID for the comparison end date label. */
122
+ protected _comparisonEndDateLabelId: string | null;
123
+ private _didDragSinceMouseDown;
124
+ private _injector;
125
+ comparisonDateAccessibleName: string;
126
+ /**
127
+ * Tracking function for rows based on their identity. Ideally we would use some sort of
128
+ * key on the row, but that would require a breaking change for the `rows` input. We don't
129
+ * use the built-in identity tracking, because it logs warnings.
130
+ */
131
+ protected _trackRow: (row: CuteCalendarCell[]) => CuteCalendarCell<any>[];
132
+ constructor(...args: unknown[]);
133
+ /** Called when a cell is clicked. */
134
+ _cellClicked(cell: CuteCalendarCell, event: MouseEvent): void;
135
+ _emitActiveDateChange(cell: CuteCalendarCell, event: FocusEvent): void;
136
+ /** Returns whether a cell should be marked as selected. */
137
+ protected _isSelected(value: number): boolean;
138
+ ngOnChanges(changes: SimpleChanges): void;
139
+ ngOnDestroy(): void;
140
+ /** Returns whether a cell is active. */
141
+ protected _isActiveCell(rowIndex: number, colIndex: number): boolean;
142
+ /**
143
+ * Focuses the active cell after the microtask queue is empty.
144
+ *
145
+ * Adding a 0ms setTimeout seems to fix Voiceover losing focus when pressing PageUp/PageDown
146
+ * (issue #24330).
147
+ *
148
+ * Determined a 0ms by gradually increasing duration from 0 and testing two use cases with screen
149
+ * reader enabled:
150
+ *
151
+ * 1. Pressing PageUp/PageDown repeatedly with pausing between each key press.
152
+ * 2. Pressing and holding the PageDown key with repeated keys enabled.
153
+ *
154
+ * Test 1 worked roughly 95-99% of the time with 0ms and got a little bit better as the duration
155
+ * increased. Test 2 got slightly better until the duration was long enough to interfere with
156
+ * repeated keys. If the repeated key speed was faster than the timeout duration, then pressing
157
+ * and holding pagedown caused the entire page to scroll.
158
+ *
159
+ * Since repeated key speed can verify across machines, determined that any duration could
160
+ * potentially interfere with repeated keys. 0ms would be best because it almost entirely
161
+ * eliminates the focus being lost in Voiceover (#24330) without causing unintended side effects.
162
+ * Adding delay also complicates writing tests.
163
+ */
164
+ _focusActiveCell(movePreview?: boolean): void;
165
+ /** Focuses the active cell after change detection has run and the microtask queue is empty. */
166
+ _scheduleFocusActiveCellAfterViewChecked(): void;
167
+ /** Gets whether a value is the start of the main range. */
168
+ protected _isRangeStart(value: number): boolean;
169
+ /** Gets whether a value is the end of the main range. */
170
+ protected _isRangeEnd(value: number): boolean;
171
+ /** Gets whether a value is within the currently selected range. */
172
+ protected _isInRange(value: number): boolean;
173
+ /** Gets whether a value is the start of the comparison range. */
174
+ protected _isComparisonStart(value: number): boolean;
175
+ /** Whether the cell is a start bridge cell between the main and comparison ranges. */
176
+ protected _isComparisonBridgeStart(value: number, rowIndex: number, colIndex: number): boolean;
177
+ /** Whether the cell is an end bridge cell between the main and comparison ranges. */
178
+ protected _isComparisonBridgeEnd(value: number, rowIndex: number, colIndex: number): boolean;
179
+ /** Gets whether a value is the end of the comparison range. */
180
+ protected _isComparisonEnd(value: number): boolean;
181
+ /** Gets whether a value is within the current comparison range. */
182
+ protected _isInComparisonRange(value: number): boolean;
183
+ /**
184
+ * Gets whether a value is the same as the start and end of the comparison range.
185
+ * For context, the functions that we use to determine whether something is the start/end of
186
+ * a range don't allow for the start and end to be on the same day, because we'd have to use
187
+ * much more specific CSS selectors to style them correctly in all scenarios. This is fine for
188
+ * the regular range, because when it happens, the selected styles take over and still show where
189
+ * the range would've been, however, we don't have these selected styles for a comparison range.
190
+ * This function is used to apply a class that serves the same purpose as the one for selected
191
+ * dates, but it only applies in the context of a comparison range.
192
+ */
193
+ protected _isComparisonIdentical(value: number): boolean;
194
+ /** Gets whether a value is the start of the preview range. */
195
+ protected _isPreviewStart(value: number): boolean;
196
+ /** Gets whether a value is the end of the preview range. */
197
+ protected _isPreviewEnd(value: number): boolean;
198
+ /** Gets whether a value is inside the preview range. */
199
+ protected _isInPreview(value: number): boolean;
200
+ /** Gets ids of aria descriptions for the start and end of a date range. */
201
+ protected _getDescribedby(value: number): string | null;
202
+ /**
203
+ * Event handler for when the user enters an element
204
+ * inside the calendar body (e.g., by hovering in or focus).
205
+ */
206
+ private _enterHandler;
207
+ private _touchmoveHandler;
208
+ /**
209
+ * Event handler for when the user's pointer leaves an element
210
+ * inside the calendar body (e.g., by hovering out or blurring).
211
+ */
212
+ private _leaveHandler;
213
+ /**
214
+ * Triggered on mousedown or touchstart on a date cell.
215
+ * Responsible for starting a drag sequence.
216
+ */
217
+ private _mousedownHandler;
218
+ /** Triggered on mouseup anywhere. Responsible for ending a drag sequence. */
219
+ private _mouseupHandler;
220
+ /** Triggered on touchend anywhere. Responsible for ending a drag sequence. */
221
+ private _touchendHandler;
222
+ /** Finds the CuteCalendarCell that corresponds to a DOM node. */
223
+ private _getCellFromElement;
224
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteCalendarBody<any>, never>;
225
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteCalendarBody<any>, "[cute-calendar-body]", ["cuteCalendarBody"], { "label": { "alias": "label"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "todayValue": { "alias": "todayValue"; "required": false; }; "startValue": { "alias": "startValue"; "required": false; }; "endValue": { "alias": "endValue"; "required": false; }; "labelMinRequiredCells": { "alias": "labelMinRequiredCells"; "required": false; }; "numCols": { "alias": "numCols"; "required": false; }; "activeCell": { "alias": "activeCell"; "required": false; }; "isRange": { "alias": "isRange"; "required": false; }; "cellAspectRatio": { "alias": "cellAspectRatio"; "required": false; }; "comparisonStart": { "alias": "comparisonStart"; "required": false; }; "comparisonEnd": { "alias": "comparisonEnd"; "required": false; }; "previewStart": { "alias": "previewStart"; "required": false; }; "previewEnd": { "alias": "previewEnd"; "required": false; }; "startDateAccessibleName": { "alias": "startDateAccessibleName"; "required": false; }; "endDateAccessibleName": { "alias": "endDateAccessibleName"; "required": false; }; }, { "selectedValueChange": "selectedValueChange"; "previewChange": "previewChange"; "activeDateChange": "activeDateChange"; "dragStarted": "dragStarted"; "dragEnded": "dragEnded"; }, never, never, true, never>;
226
+ }
227
+
228
+ /**
229
+ * @license Apache-2.0
230
+ *
231
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
232
+ *
233
+ * You may not use this file except in compliance with the License
234
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
235
+ *
236
+ * This code is a modification of the `@angular/material` original
237
+ * code licensed under MIT-style License (https://angular.dev/license).
238
+ */
239
+
240
+ /** A class representing a range of dates. */
241
+ declare class DateRange<D> {
242
+ /** The start date of the range. */
243
+ readonly start: D | null;
244
+ /** The end date of the range. */
245
+ readonly end: D | null;
246
+ /**
247
+ * Ensures that objects with a `start` and `end` property can't be assigned to a variable that
248
+ * expects a `DateRange`
249
+ */
250
+ private _disableStructuralEquivalency;
251
+ constructor(
252
+ /** The start date of the range. */
253
+ start: D | null,
254
+ /** The end date of the range. */
255
+ end: D | null);
256
+ }
257
+ /**
258
+ * Conditionally picks the date type if a DateRange is passed in.
259
+ * @docs-private
260
+ */
261
+ type ExtractDateTypeFromSelection<T> = T extends DateRange<infer D> ? D : NonNullable<T>;
262
+ /**
263
+ * Event emitted by the date selection model when its selection changes.
264
+ * @docs-private
265
+ */
266
+ interface DateSelectionModelChange<S> {
267
+ /** New value for the selection. */
268
+ selection: S;
269
+ /** Object that triggered the change. */
270
+ source: unknown;
271
+ /** Previous value */
272
+ oldValue?: S;
273
+ }
274
+ /**
275
+ * A selection model containing a date selection.
276
+ * @docs-private
277
+ */
278
+ declare abstract class CuteDateSelectionModel<S, D = ExtractDateTypeFromSelection<S>> implements OnDestroy {
279
+ /** The current selection. */
280
+ readonly selection: S;
281
+ protected _adapter: DateAdapter<D>;
282
+ private readonly _selectionChanged;
283
+ /** Emits when the selection has changed. */
284
+ selectionChanged: Observable<DateSelectionModelChange<S>>;
285
+ protected constructor(
286
+ /** The current selection. */
287
+ selection: S, _adapter: DateAdapter<D>);
288
+ /**
289
+ * Updates the current selection in the model.
290
+ * @param value New selection that should be assigned.
291
+ * @param source Object that triggered the selection change.
292
+ */
293
+ updateSelection(value: S, source: unknown): void;
294
+ ngOnDestroy(): void;
295
+ protected _isValidDateInstance(date: D): boolean;
296
+ /** Adds a date to the current selection. */
297
+ abstract add(date: D | null): void;
298
+ /** Checks whether the current selection is valid. */
299
+ abstract isValid(): boolean;
300
+ /** Checks whether the current selection is complete. */
301
+ abstract isComplete(): boolean;
302
+ /** Clones the selection model. */
303
+ abstract clone(): CuteDateSelectionModel<S, D>;
304
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDateSelectionModel<any, any>, never>;
305
+ static ɵprov: i0.ɵɵInjectableDeclaration<CuteDateSelectionModel<any, any>>;
306
+ }
307
+ /**
308
+ * A selection model that contains a single date.
309
+ * @docs-private
310
+ */
311
+ declare class CuteSingleDateSelectionModel<D> extends CuteDateSelectionModel<D | null, D> {
312
+ constructor(adapter: DateAdapter<D>);
313
+ /**
314
+ * Adds a date to the current selection. In the case of a single date selection, the added date
315
+ * simply overwrites the previous selection
316
+ */
317
+ add(date: D | null): void;
318
+ /** Checks whether the current selection is valid. */
319
+ isValid(): boolean;
320
+ /**
321
+ * Checks whether the current selection is complete. In the case of a single date selection, this
322
+ * is true if the current selection is not null.
323
+ */
324
+ isComplete(): boolean;
325
+ /** Clones the selection model. */
326
+ clone(): CuteSingleDateSelectionModel<D>;
327
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteSingleDateSelectionModel<any>, never>;
328
+ static ɵprov: i0.ɵɵInjectableDeclaration<CuteSingleDateSelectionModel<any>>;
329
+ }
330
+ /**
331
+ * A selection model that contains a date range.
332
+ * @docs-private
333
+ */
334
+ declare class CuteRangeDateSelectionModel<D> extends CuteDateSelectionModel<DateRange<D>, D> {
335
+ constructor(adapter: DateAdapter<D>);
336
+ /**
337
+ * Adds a date to the current selection. In the case of a date range selection, the added date
338
+ * fills in the next `null` value in the range. If both the start and the end already have a date,
339
+ * the selection is reset so that the given date is the new `start` and the `end` is null.
340
+ */
341
+ add(date: D | null): void;
342
+ /** Checks whether the current selection is valid. */
343
+ isValid(): boolean;
344
+ /**
345
+ * Checks whether the current selection is complete. In the case of a date range selection, this
346
+ * is true if the current selection has a non-null `start` and `end`.
347
+ */
348
+ isComplete(): boolean;
349
+ /** Clones the selection model. */
350
+ clone(): CuteRangeDateSelectionModel<D>;
351
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteRangeDateSelectionModel<any>, never>;
352
+ static ɵprov: i0.ɵɵInjectableDeclaration<CuteRangeDateSelectionModel<any>>;
353
+ }
354
+ /**
355
+ * Used to provide a single selection model to a component.
356
+ * @docs-private
357
+ */
358
+ declare const CUTE_SINGLE_DATE_SELECTION_MODEL_PROVIDER: FactoryProvider;
359
+ /**
360
+ * Used to provide a range selection model to a component.
361
+ * @docs-private
362
+ */
363
+ declare const CUTE_RANGE_DATE_SELECTION_MODEL_PROVIDER: FactoryProvider;
364
+
365
+ /**
366
+ * An internal component used to display a single month in the datepicker.
367
+ * @docs-private
368
+ */
369
+ declare class CuteMonthView<D> implements AfterContentInit, OnChanges, OnDestroy {
370
+ readonly _changeDetectorRef: ChangeDetectorRef;
371
+ private _dateFormats;
372
+ _dateAdapter: DateAdapter<D, any>;
373
+ private _dir;
374
+ private _rangeStrategy;
375
+ private _rerenderSubscription;
376
+ /** Flag used to filter out space/enter keyup events that originated outside the view. */
377
+ private _selectionKeyPressed;
378
+ /**
379
+ * The date to display in this month view (everything other than the month and year is ignored).
380
+ */
381
+ get activeDate(): D;
382
+ set activeDate(value: D);
383
+ private _activeDate;
384
+ /** The currently selected date. */
385
+ get selected(): DateRange<D> | D | null;
386
+ set selected(value: DateRange<D> | D | null);
387
+ private _selected;
388
+ /** The minimum selectable date. */
389
+ get minDate(): D | null;
390
+ set minDate(value: D | null);
391
+ private _minDate;
392
+ /** The maximum selectable date. */
393
+ get maxDate(): D | null;
394
+ set maxDate(value: D | null);
395
+ private _maxDate;
396
+ /** Function used to filter which dates are selectable. */
397
+ dateFilter: ((date: D) => boolean) | null | undefined;
398
+ /** Function that can be used to add custom CSS classes to dates. */
399
+ dateClass: CuteCalendarCellClassFunction<D> | undefined;
400
+ /** Start of the comparison range. */
401
+ comparisonStart: D | null;
402
+ /** End of the comparison range. */
403
+ comparisonEnd: D | null;
404
+ /** ARIA-Accessible name of the `<input cuteStartDate/>` */
405
+ startDateAccessibleName: string | null;
406
+ /** ARIA-Accessible name of the `<input cuteEndDate/>` */
407
+ endDateAccessibleName: string | null;
408
+ /** Origin of active drag, or null when dragging is not active. */
409
+ activeDrag: CuteCalendarUserEvent<D> | null;
410
+ /** Emits when a new date is selected. */
411
+ readonly selectedChange: EventEmitter<D | null>;
412
+ /** Emits when any date is selected. */
413
+ readonly _userSelection: EventEmitter<CuteCalendarUserEvent<D | null>>;
414
+ /** Emits when the user initiates a date range drag via mouse or touch. */
415
+ readonly dragStarted: EventEmitter<CuteCalendarUserEvent<D>>;
416
+ /**
417
+ * Emits when the user completes or cancels a date range drag.
418
+ * Emits null when the drag was canceled or the newly selected date range if completed.
419
+ */
420
+ readonly dragEnded: EventEmitter<CuteCalendarUserEvent<DateRange<D> | null>>;
421
+ /** Emits when any date is activated. */
422
+ readonly activeDateChange: EventEmitter<D>;
423
+ /** The body of calendar table */
424
+ _cuteCalendarBody: CuteCalendarBody | undefined;
425
+ /** The label for this month (e.g. "January 2017"). */
426
+ _monthLabel: string | undefined;
427
+ /** Grid of calendar cells representing the dates of the month. */
428
+ _weeks: CuteCalendarCell[][];
429
+ /** The number of blank cells in the first row before the 1st of the month. */
430
+ _firstWeekOffset: number | null;
431
+ /** Start value of the currently shown date range. */
432
+ _rangeStart: number | null;
433
+ /** End value of the currently shown date range. */
434
+ _rangeEnd: number | null;
435
+ /** Start value of the currently shown comparison date range. */
436
+ _comparisonRangeStart: number | null;
437
+ /** End value of the currently shown comparison date range. */
438
+ _comparisonRangeEnd: number | null;
439
+ /** Start of the preview range. */
440
+ _previewStart: number | null;
441
+ /** End of the preview range. */
442
+ _previewEnd: number | null;
443
+ /** Whether the user is currently selecting a range of dates. */
444
+ _isRange: boolean;
445
+ /** The date of the month that today falls on. Null if today is in another month. */
446
+ _todayDate: number | null;
447
+ /** The names of the weekdays. */
448
+ _weekdays: {
449
+ long: string;
450
+ narrow: string;
451
+ id: number;
452
+ }[];
453
+ constructor(...args: unknown[]);
454
+ ngAfterContentInit(): void;
455
+ ngOnChanges(changes: SimpleChanges): void;
456
+ ngOnDestroy(): void;
457
+ /** Handles when a new date is selected. */
458
+ _dateSelected(event: CuteCalendarUserEvent<number>): void;
459
+ /**
460
+ * Takes the index of a calendar body cell wrapped in an event as argument. For the date that
461
+ * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with
462
+ * that date.
463
+ *
464
+ * This function is used to match each component's model of the active date with the calendar
465
+ * body cell that was focused. It updates its value of `activeDate` synchronously and updates the
466
+ * parent's value asynchronously via the `activeDateChange` event. The child component receives an
467
+ * updated value asynchronously via the `activeCell` Input.
468
+ */
469
+ _updateActiveDate(event: CuteCalendarUserEvent<number>): void;
470
+ /** Handles keydown events on the calendar body when calendar is in month view. */
471
+ _handleCalendarBodyKeydown(event: KeyboardEvent): void;
472
+ /** Handles keyup events on the calendar body when calendar is in month view. */
473
+ _handleCalendarBodyKeyup(event: KeyboardEvent): void;
474
+ /** Initializes this month view. */
475
+ _init(): void;
476
+ /** Focuses the active cell after the microtask queue is empty. */
477
+ _focusActiveCell(movePreview?: boolean): void;
478
+ /** Focuses the active cell after change detection has run and the microtask queue is empty. */
479
+ _focusActiveCellAfterViewChecked(): void;
480
+ /** Called when the user has activated a new cell and the preview needs to be updated. */
481
+ _previewChanged({ event, value: cell }: CuteCalendarUserEvent<CuteCalendarCell<D> | null>): void;
482
+ /**
483
+ * Called when the user has ended a drag. If the drag/drop was successful,
484
+ * computes and emits the new range selection.
485
+ */
486
+ protected _dragEnded(event: CuteCalendarUserEvent<D | null>): void;
487
+ /**
488
+ * Takes a day of the month and returns a new date in the same month and year as the currently
489
+ * active date. The returned date will have the same day of the month as the argument date.
490
+ */
491
+ private _getDateFromDayOfMonth;
492
+ /** Initializes the weekdays. */
493
+ private _initWeekdays;
494
+ /** Creates MatCalendarCells for the dates in this month. */
495
+ private _createWeekCells;
496
+ /** Date filter for the month */
497
+ private _shouldEnableDate;
498
+ /**
499
+ * Gets the date in this month that the given Date falls on.
500
+ * Returns null if the given Date is in another month.
501
+ */
502
+ private _getDateInCurrentMonth;
503
+ /** Checks whether the 2 dates are non-null and fall within the same month of the same year. */
504
+ private _hasSameMonthAndYear;
505
+ /** Gets the value that will be used to one cell to another. */
506
+ private _getCellCompareValue;
507
+ /** Determines whether the user has the RTL layout direction. */
508
+ private _isRtl;
509
+ /** Sets the current range based on a model value. */
510
+ private _setRanges;
511
+ /** Gets whether a date can be selected in the month view. */
512
+ private _canSelect;
513
+ /** Clears out preview state. */
514
+ private _clearPreview;
515
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteMonthView<any>, never>;
516
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteMonthView<any>, "cute-month-view", ["cuteMonthView"], { "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; "comparisonStart": { "alias": "comparisonStart"; "required": false; }; "comparisonEnd": { "alias": "comparisonEnd"; "required": false; }; "startDateAccessibleName": { "alias": "startDateAccessibleName"; "required": false; }; "endDateAccessibleName": { "alias": "endDateAccessibleName"; "required": false; }; "activeDrag": { "alias": "activeDrag"; "required": false; }; }, { "selectedChange": "selectedChange"; "_userSelection": "_userSelection"; "dragStarted": "dragStarted"; "dragEnded": "dragEnded"; "activeDateChange": "activeDateChange"; }, never, never, true, never>;
517
+ }
518
+
519
+ declare const yearsPerPage = 24;
520
+ declare const yearsPerRow = 4;
521
+ /**
522
+ * An internal component used to display a year selector in the datepicker.
523
+ * @docs-private
524
+ */
525
+ declare class CuteMultiYearView<D> implements AfterContentInit, OnDestroy {
526
+ private _changeDetectorRef;
527
+ _dateAdapter: DateAdapter<D, any>;
528
+ private _dir;
529
+ private _rerenderSubscription;
530
+ /** Flag used to filter out space/enter keyup events that originated outside of the view. */
531
+ private _selectionKeyPressed;
532
+ /** The date to display in this multi-year view (everything other than the year is ignored). */
533
+ get activeDate(): D;
534
+ set activeDate(value: D);
535
+ private _activeDate;
536
+ /** The currently selected date. */
537
+ get selected(): DateRange<D> | D | null;
538
+ set selected(value: DateRange<D> | D | null);
539
+ private _selected;
540
+ /** The minimum selectable date. */
541
+ get minDate(): D | null;
542
+ set minDate(value: D | null);
543
+ private _minDate;
544
+ /** The maximum selectable date. */
545
+ get maxDate(): D | null;
546
+ set maxDate(value: D | null);
547
+ private _maxDate;
548
+ /** A function used to filter which dates are selectable. */
549
+ dateFilter: ((date: D) => boolean) | null | undefined;
550
+ /** Function that can be used to add custom CSS classes to date cells. */
551
+ dateClass: CuteCalendarCellClassFunction<D> | undefined;
552
+ /** Emits when a new year is selected. */
553
+ readonly selectedChange: EventEmitter<D>;
554
+ /** Emits the selected year. This doesn't imply a change on the selected date */
555
+ readonly yearSelected: EventEmitter<D>;
556
+ /** Emits when any date is activated. */
557
+ readonly activeDateChange: EventEmitter<D>;
558
+ /** The body of calendar table */
559
+ _cuteCalendarBody: CuteCalendarBody | undefined;
560
+ /** Grid of calendar cells representing the currently displayed years. */
561
+ _years: CuteCalendarCell[][];
562
+ /** The year that today falls on. */
563
+ _todayYear: number;
564
+ /** The year of the selected date. Null if the selected date is null. */
565
+ _selectedYear: number | null;
566
+ constructor(...args: unknown[]);
567
+ ngAfterContentInit(): void;
568
+ ngOnDestroy(): void;
569
+ /** Initializes this multi-year view. */
570
+ _init(): void;
571
+ /** Handles when a new year is selected. */
572
+ _yearSelected(event: CuteCalendarUserEvent<number>): void;
573
+ /**
574
+ * Takes the index of a calendar body cell wrapped in an event as argument. For the date that
575
+ * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with
576
+ * that date.
577
+ *
578
+ * This function is used to match each component's model of the active date with the calendar
579
+ * body cell that was focused. It updates its value of `activeDate` synchronously and updates the
580
+ * parent's value asynchronously via the `activeDateChange` event. The child component receives an
581
+ * updated value asynchronously via the `activeCell` Input.
582
+ */
583
+ _updateActiveDate(event: CuteCalendarUserEvent<number>): void;
584
+ /** Handles keydown events on the calendar body when calendar is in multi-year view. */
585
+ _handleCalendarBodyKeydown(event: KeyboardEvent): void;
586
+ /** Handles keyup events on the calendar body when calendar is in multi-year view. */
587
+ _handleCalendarBodyKeyup(event: KeyboardEvent): void;
588
+ _getActiveCell(): number;
589
+ /** Focuses the active cell after the microtask queue is empty. */
590
+ _focusActiveCell(): void;
591
+ /** Focuses the active cell after change detection has run and the microtask queue is empty. */
592
+ _focusActiveCellAfterViewChecked(): void;
593
+ /**
594
+ * Takes a year and returns a new date on the same day and month as the currently active date
595
+ * The returned date will have the same year as the argument date.
596
+ */
597
+ private _getDateFromYear;
598
+ /** Creates a CuteCalendarCell for the given year. */
599
+ private _createCellForYear;
600
+ /** Whether the given year is enabled. */
601
+ private _shouldEnableYear;
602
+ /** Determines whether the user has the RTL layout direction. */
603
+ private _isRtl;
604
+ /** Sets the currently highlighted year based on a model value. */
605
+ private _setSelectedYear;
606
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteMultiYearView<any>, never>;
607
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteMultiYearView<any>, "cute-multi-year-view", ["cuteMultiYearView"], { "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; }, { "selectedChange": "selectedChange"; "yearSelected": "yearSelected"; "activeDateChange": "activeDateChange"; }, never, never, true, never>;
608
+ }
609
+
610
+ /**
611
+ * An internal component used to display a single year in the datepicker.
612
+ * @docs-private
613
+ */
614
+ declare class CuteYearView<D> implements AfterContentInit, OnDestroy {
615
+ readonly _changeDetectorRef: ChangeDetectorRef;
616
+ private _dateFormats;
617
+ _dateAdapter: DateAdapter<D, any>;
618
+ private _dir;
619
+ private _rerenderSubscription;
620
+ /** Flag used to filter out space/enter keyup events that originated outside of the view. */
621
+ private _selectionKeyPressed;
622
+ /** The date to display in this year view (everything other than the year is ignored). */
623
+ get activeDate(): D;
624
+ set activeDate(value: D);
625
+ private _activeDate;
626
+ /** The currently selected date. */
627
+ get selected(): DateRange<D> | D | null;
628
+ set selected(value: DateRange<D> | D | null);
629
+ private _selected;
630
+ /** The minimum selectable date. */
631
+ get minDate(): D | null;
632
+ set minDate(value: D | null);
633
+ private _minDate;
634
+ /** The maximum selectable date. */
635
+ get maxDate(): D | null;
636
+ set maxDate(value: D | null);
637
+ private _maxDate;
638
+ /** A function used to filter which dates are selectable. */
639
+ dateFilter: ((date: D) => boolean) | null | undefined;
640
+ /** Function that can be used to add custom CSS classes to date cells. */
641
+ dateClass: CuteCalendarCellClassFunction<D> | undefined;
642
+ /** Emits when a new month is selected. */
643
+ readonly selectedChange: EventEmitter<D>;
644
+ /** Emits the selected month. This doesn't imply a change on the selected date */
645
+ readonly monthSelected: EventEmitter<D>;
646
+ /** Emits when any date is activated. */
647
+ readonly activeDateChange: EventEmitter<D>;
648
+ /** The body of calendar table */
649
+ _cuteCalendarBody: CuteCalendarBody | undefined;
650
+ /** Grid of calendar cells representing the months of the year. */
651
+ _months: CuteCalendarCell[][];
652
+ /** The label for this year (e.g. "2017"). */
653
+ _yearLabel: string | undefined;
654
+ /** The month in this year that today falls on. Null if today is in a different year. */
655
+ _todayMonth: number | null;
656
+ /**
657
+ * The month in this year that the selected Date falls on.
658
+ * Null if the selected Date is in a different year.
659
+ */
660
+ _selectedMonth: number | null;
661
+ constructor(...args: unknown[]);
662
+ ngAfterContentInit(): void;
663
+ ngOnDestroy(): void;
664
+ /** Handles when a new month is selected. */
665
+ _monthSelected(event: CuteCalendarUserEvent<number>): void;
666
+ /**
667
+ * Takes the index of a calendar body cell wrapped in an event as argument. For the date that
668
+ * corresponds to the given cell, set `activeDate` to that date and fire `activeDateChange` with
669
+ * that date.
670
+ *
671
+ * This function is used to match each component's model of the active date with the calendar
672
+ * body cell that was focused. It updates its value of `activeDate` synchronously and updates the
673
+ * parent's value asynchronously via the `activeDateChange` event. The child component receives an
674
+ * updated value asynchronously via the `activeCell` Input.
675
+ */
676
+ _updateActiveDate(event: CuteCalendarUserEvent<number>): void;
677
+ /** Handles keydown events on the calendar body when calendar is in year view. */
678
+ _handleCalendarBodyKeydown(event: KeyboardEvent): void;
679
+ /** Handles keyup events on the calendar body when calendar is in year view. */
680
+ _handleCalendarBodyKeyup(event: KeyboardEvent): void;
681
+ /** Initializes this year view. */
682
+ _init(): void;
683
+ /** Focuses the active cell after the microtask queue is empty. */
684
+ _focusActiveCell(): void;
685
+ /** Schedules the matCalendarBody to focus the active cell after change detection has run */
686
+ _focusActiveCellAfterViewChecked(): void;
687
+ /**
688
+ * Gets the month in this year that the given Date falls on.
689
+ * Returns null if the given Date is in another year.
690
+ */
691
+ private _getMonthInCurrentYear;
692
+ /**
693
+ * Takes a month and returns a new date in the same day and year as the currently active date.
694
+ * The returned date will have the same month as the argument date.
695
+ */
696
+ private _getDateFromMonth;
697
+ /** Creates a CuteCalendarCell for the given month. */
698
+ private _createCellForMonth;
699
+ /** Whether the given month is enabled. */
700
+ private _shouldEnableMonth;
701
+ /**
702
+ * Tests whether the combination month/year is after this.maxDate, considering
703
+ * just the month and year of this.maxDate
704
+ */
705
+ private _isYearAndMonthAfterMaxDate;
706
+ /**
707
+ * Tests whether the combination month/year is before this.minDate, considering
708
+ * just the month and year of this.minDate
709
+ */
710
+ private _isYearAndMonthBeforeMinDate;
711
+ /** Determines whether the user has the RTL layout direction. */
712
+ private _isRtl;
713
+ /** Sets the currently selected month based on a model value. */
714
+ private _setSelectedMonth;
715
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteYearView<any>, never>;
716
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteYearView<any>, "cute-year-view", ["cuteYearView"], { "activeDate": { "alias": "activeDate"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; }, { "selectedChange": "selectedChange"; "monthSelected": "monthSelected"; "activeDateChange": "activeDateChange"; }, never, never, true, never>;
717
+ }
718
+
719
+ /**
720
+ * @license Apache-2.0
721
+ *
722
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
723
+ *
724
+ * You may not use this file except in compliance with the License
725
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
726
+ *
727
+ * This code is a modification of the `@angular/material` original
728
+ * code licensed under MIT-style License (https://angular.dev/license).
729
+ */
730
+
731
+ /**
732
+ * Possible views for the calendar.
733
+ * @docs-private
734
+ */
735
+ type CuteCalendarView = 'month' | 'year' | 'multi-year';
736
+ /** Default header for CuteCalendar */
737
+ declare class CuteCalendarHeader<D> {
738
+ private _intl;
739
+ calendar: CuteCalendar<D>;
740
+ private _dateAdapter;
741
+ private _dateFormats;
742
+ constructor(...args: unknown[]);
743
+ /** The display text for the current calendar view. */
744
+ get periodButtonText(): string;
745
+ /** The aria description for the current calendar view. */
746
+ get periodButtonDescription(): string;
747
+ /** The `aria-label` for changing the calendar view. */
748
+ get periodButtonLabel(): string;
749
+ /** The label for the previous button. */
750
+ get prevButtonLabel(): string;
751
+ /** The label for the next button. */
752
+ get nextButtonLabel(): string;
753
+ /** Handles user clicks on the period label. */
754
+ currentPeriodClicked(): void;
755
+ /** Handles user clicks on the previous button. */
756
+ previousClicked(): void;
757
+ /** Handles user clicks on the next button. */
758
+ nextClicked(): void;
759
+ /** Whether the previous period button is enabled. */
760
+ previousEnabled(): boolean;
761
+ /** Whether the next period button is enabled. */
762
+ nextEnabled(): boolean;
763
+ /** Whether the two dates represent the same view in the current view mode (month or year). */
764
+ private _isSameView;
765
+ /**
766
+ * Format two individual labels for the minimum year and maximum year available in the multi-year
767
+ * calendar view. Returns an array of two strings where the first string is the formatted label
768
+ * for the minimum year, and the second string is the formatted label for the maximum year.
769
+ */
770
+ private _formatMinAndMaxYearLabels;
771
+ private _id;
772
+ _periodButtonLabelId: string;
773
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteCalendarHeader<any>, never>;
774
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteCalendarHeader<any>, "cute-calendar-header", ["cuteCalendarHeader"], {}, {}, never, ["*"], true, never>;
775
+ }
776
+ /** A calendar that is used as part of the datepicker. */
777
+ declare class CuteCalendar<D> implements AfterContentInit, AfterViewChecked, OnDestroy, OnChanges {
778
+ private _dateAdapter;
779
+ private _dateFormats;
780
+ private _changeDetectorRef;
781
+ /** An input indicating the type of the header component, if set. */
782
+ headerComponent: ComponentType<any> | undefined;
783
+ /** A portal containing the header component type for this calendar. */
784
+ _calendarHeaderPortal: Portal<any> | undefined;
785
+ private _intlChanges;
786
+ /**
787
+ * Used for scheduling that focus should be moved to the active cell on the next tick.
788
+ * We need to schedule it, rather than do it immediately, because we have to wait
789
+ * for Angular to re-evaluate the view children.
790
+ */
791
+ private _moveFocusOnNextTick;
792
+ /** A date representing the period (month or year) to start the calendar in. */
793
+ get startAt(): D | null;
794
+ set startAt(value: D | null);
795
+ private _startAt;
796
+ /** Whether the calendar should be started in month or year view. */
797
+ startView: CuteCalendarView;
798
+ /** The currently selected date. */
799
+ get selected(): DateRange<D> | D | null;
800
+ set selected(value: DateRange<D> | D | null);
801
+ private _selected;
802
+ /** The minimum selectable date. */
803
+ get minDate(): D | null;
804
+ set minDate(value: D | null);
805
+ private _minDate;
806
+ /** The maximum selectable date. */
807
+ get maxDate(): D | null;
808
+ set maxDate(value: D | null);
809
+ private _maxDate;
810
+ /** Function used to filter which dates are selectable. */
811
+ dateFilter?: ((date: D) => boolean) | null;
812
+ /** Function that can be used to add custom CSS classes to dates. */
813
+ dateClass: CuteCalendarCellClassFunction<D> | undefined;
814
+ /** Start of the comparison range. */
815
+ comparisonStart: D | null;
816
+ /** End of the comparison range. */
817
+ comparisonEnd: D | null;
818
+ /** ARIA-Accessible name of the `<input cuteStartDate/>` */
819
+ startDateAccessibleName: string | null;
820
+ /** ARIA-Accessible name of the `<input cuteEndDate/>` */
821
+ endDateAccessibleName: string | null;
822
+ /** Emits when the currently selected date changes. */
823
+ readonly selectedChange: EventEmitter<D | null>;
824
+ /**
825
+ * Emits the year chosen in multiyear view.
826
+ * This doesn't imply a change on the selected date.
827
+ */
828
+ readonly yearSelected: EventEmitter<D>;
829
+ /**
830
+ * Emits the month chosen in year view.
831
+ * This doesn't imply a change on the selected date.
832
+ */
833
+ readonly monthSelected: EventEmitter<D>;
834
+ /**
835
+ * Emits when the current view changes.
836
+ */
837
+ readonly viewChanged: EventEmitter<CuteCalendarView>;
838
+ /** Emits when any date is selected. */
839
+ readonly _userSelection: EventEmitter<CuteCalendarUserEvent<D | null>>;
840
+ /** Emits a new date range value when the user completes a drag drop operation. */
841
+ readonly _userDragDrop: EventEmitter<CuteCalendarUserEvent<DateRange<D>>>;
842
+ /** Reference to the current month view component. */
843
+ monthView: CuteMonthView<D> | undefined;
844
+ /** Reference to the current year view component. */
845
+ yearView: CuteYearView<D> | undefined;
846
+ /** Reference to the current multi-year view component. */
847
+ multiYearView: CuteMultiYearView<D> | undefined;
848
+ /**
849
+ * The current active date. This determines which time period is shown and which date is
850
+ * highlighted when using keyboard navigation.
851
+ */
852
+ get activeDate(): D;
853
+ set activeDate(value: D);
854
+ private _clampedActiveDate;
855
+ /** Whether the calendar is in month view. */
856
+ get currentView(): CuteCalendarView;
857
+ set currentView(value: CuteCalendarView);
858
+ private _currentView;
859
+ /** Origin of active drag, or null when dragging is not active. */
860
+ protected _activeDrag: CuteCalendarUserEvent<D> | null;
861
+ /**
862
+ * Emits whenever there is a state change that the header may need to respond to.
863
+ */
864
+ readonly stateChanges: Subject<void>;
865
+ constructor(...args: unknown[]);
866
+ ngAfterContentInit(): void;
867
+ ngAfterViewChecked(): void;
868
+ ngOnDestroy(): void;
869
+ ngOnChanges(changes: SimpleChanges): void;
870
+ /** Focuses the active date. */
871
+ focusActiveCell(): void;
872
+ /** Updates today's date after an update of the active date */
873
+ updateTodaysDate(): void;
874
+ /** Handles date selection in the month view. */
875
+ protected _dateSelected(event: CuteCalendarUserEvent<D | null>): void;
876
+ /** Handles year selection in the multiyear view. */
877
+ protected _yearSelectedInMultiYearView(normalizedYear: D): void;
878
+ /** Handles month selection in the year view. */
879
+ protected _monthSelectedInYearView(normalizedMonth: D): void;
880
+ /** Handles year/month selection in the multi-year/year views. */
881
+ protected _goToDateInView(date: D, view: 'month' | 'year' | 'multi-year'): void;
882
+ /** Called when the user starts dragging to change a date range. */
883
+ protected _dragStarted(event: CuteCalendarUserEvent<D>): void;
884
+ /**
885
+ * Called when a drag completes. It may end in cancellation or in the selection
886
+ * of a new range.
887
+ */
888
+ protected _dragEnded(event: CuteCalendarUserEvent<DateRange<D> | null>): void;
889
+ /** Returns the component instance that corresponds to the current calendar view. */
890
+ private _getCurrentViewComponent;
891
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteCalendar<any>, never>;
892
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteCalendar<any>, "cute-calendar", ["cuteCalendar"], { "headerComponent": { "alias": "headerComponent"; "required": false; }; "startAt": { "alias": "startAt"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; "comparisonStart": { "alias": "comparisonStart"; "required": false; }; "comparisonEnd": { "alias": "comparisonEnd"; "required": false; }; "startDateAccessibleName": { "alias": "startDateAccessibleName"; "required": false; }; "endDateAccessibleName": { "alias": "endDateAccessibleName"; "required": false; }; }, { "selectedChange": "selectedChange"; "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "viewChanged": "viewChanged"; "_userSelection": "_userSelection"; "_userDragDrop": "_userDragDrop"; }, never, never, true, never>;
893
+ }
894
+
895
+ /**
896
+ * An event used for datepicker input and change events. We don't always have access to a native
897
+ * input or change event because the event may have been triggered by the user clicking on the
898
+ * calendar popup. For consistency, we always use CuteDatepickerInputEvent instead.
899
+ */
900
+ declare class CuteDatepickerInputEvent<D, S = unknown> {
901
+ /** Reference to the datepicker input component that emitted the event. */
902
+ target: CuteDatepickerInputBase<S, D>;
903
+ /** Reference to the native input element associated with the datepicker input. */
904
+ targetElement: HTMLElement;
905
+ /** The new value for the target datepicker input. */
906
+ value: D | null;
907
+ constructor(
908
+ /** Reference to the datepicker input component that emitted the event. */
909
+ target: CuteDatepickerInputBase<S, D>,
910
+ /** Reference to the native input element associated with the datepicker input. */
911
+ targetElement: HTMLElement);
912
+ }
913
+ /** Function that can be used to filter out dates from a calendar. */
914
+ type DateFilterFn<D> = (date: D | null) => boolean;
915
+ /** Base class for datepicker inputs. */
916
+ declare abstract class CuteDatepickerInputBase<S, D = ExtractDateTypeFromSelection<S>> implements ControlValueAccessor, AfterViewInit, OnChanges, OnDestroy, Validator {
917
+ protected _elementRef: ElementRef<HTMLInputElement>;
918
+ _dateAdapter: DateAdapter<D, any>;
919
+ private _dateFormats;
920
+ /** Whether the component has been initialized. */
921
+ private _isInitialized;
922
+ /** The value of the input. */
923
+ get value(): D | null;
924
+ set value(value: any);
925
+ protected _model: CuteDateSelectionModel<S, D> | undefined;
926
+ /** Whether the datepicker-input is disabled. */
927
+ get disabled(): boolean;
928
+ set disabled(value: boolean);
929
+ private _disabled;
930
+ /** Emits when a `change` event is fired on this `<input>`. */
931
+ readonly dateChange: EventEmitter<CuteDatepickerInputEvent<D, S>>;
932
+ /** Emits when an `input` event is fired on this `<input>`. */
933
+ readonly dateInput: EventEmitter<CuteDatepickerInputEvent<D, S>>;
934
+ /** Emits when the internal state has changed */
935
+ readonly stateChanges: Subject<void>;
936
+ _onTouched: () => void;
937
+ _validatorOnChange: () => void;
938
+ private _cvaOnChange;
939
+ private _valueChangesSubscription;
940
+ private _localeSubscription;
941
+ /**
942
+ * Since the value is kept on the model which is assigned in an Input,
943
+ * we might get a value before we have a model. This property keeps track
944
+ * of the value until we have somewhere to assign it.
945
+ */
946
+ private _pendingValue;
947
+ /** The form control validator for whether the input parses. */
948
+ private _parseValidator;
949
+ /** The form control validator for the date filter. */
950
+ private _filterValidator;
951
+ /** The form control validator for the min date. */
952
+ private _minValidator;
953
+ /** The form control validator for the max date. */
954
+ private _maxValidator;
955
+ /** Gets the base validator functions. */
956
+ protected _getValidators(): ValidatorFn[];
957
+ /** Gets the minimum date for the input. Used for validation. */
958
+ abstract _getMinDate(): D | null;
959
+ /** Gets the maximum date for the input. Used for validation. */
960
+ abstract _getMaxDate(): D | null;
961
+ /** Gets the date filter function. Used for validation. */
962
+ protected abstract _getDateFilter(): DateFilterFn<D> | undefined;
963
+ /** Registers a date selection model with the input. */
964
+ _registerModel(model: CuteDateSelectionModel<S, D>): void;
965
+ /** Opens the popup associated with the input. */
966
+ protected abstract _openPopup(): void;
967
+ /** Assigns a value to the input's model. */
968
+ protected abstract _assignValueToModel(model: D | null): void;
969
+ /** Converts a value from the model into a native value for the input. */
970
+ protected abstract _getValueFromModel(modelValue: S): D | null;
971
+ /** Combined form control validator for this input. */
972
+ protected abstract _validator: ValidatorFn | null;
973
+ /** Predicate that determines whether the input should handle a particular change event. */
974
+ protected abstract _shouldHandleChangeEvent(event: DateSelectionModelChange<S>): boolean;
975
+ /** Whether the last value set on the input was valid. */
976
+ protected _lastValueValid: boolean;
977
+ protected constructor(...args: unknown[]);
978
+ ngAfterViewInit(): void;
979
+ ngOnChanges(changes: SimpleChanges): void;
980
+ ngOnDestroy(): void;
981
+ /** @docs-private */
982
+ registerOnValidatorChange(fn: () => void): void;
983
+ /** @docs-private */
984
+ validate(c: AbstractControl): ValidationErrors | null;
985
+ writeValue(value: D): void;
986
+ registerOnChange(fn: (value: any) => void): void;
987
+ registerOnTouched(fn: () => void): void;
988
+ setDisabledState(isDisabled: boolean): void;
989
+ _onKeydown(event: KeyboardEvent): void;
990
+ _onInput(value: string): void;
991
+ _onChange(): void;
992
+ /** Handles blur events on the input. */
993
+ _onBlur(): void;
994
+ /** Formats a value and sets it on the input element. */
995
+ protected _formatValue(value: D | null): void;
996
+ /** Assigns a value to the model. */
997
+ private _assignValue;
998
+ /** Whether a value is considered valid. */
999
+ private _isValidValue;
1000
+ /**
1001
+ * Checks whether a parent control is disabled. This is in place so that it can be overridden
1002
+ * by inputs extending this one which can be placed inside of a group that can be disabled.
1003
+ */
1004
+ protected _parentDisabled(): boolean;
1005
+ /** Programmatically assigns a value to the input. */
1006
+ protected _assignValueProgrammatically(value: D | null, reformat: boolean): void;
1007
+ /** Gets whether a value matches the current date filter. */
1008
+ _matchesFilter(value: D | null): boolean;
1009
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDatepickerInputBase<any, any>, never>;
1010
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteDatepickerInputBase<any, any>, never, never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "dateChange": "dateChange"; "dateInput": "dateInput"; }, never, never, true, never>;
1011
+ static ngAcceptInputType_disabled: unknown;
1012
+ }
1013
+
1014
+ /** Injection token that determines the scroll handling while the calendar is open. */
1015
+ declare const CUTE_DATEPICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
1016
+ /** Possible positions for the datepicker dropdown along the X axis. */
1017
+ type DatepickerDropdownPositionX = 'start' | 'end';
1018
+ /** Possible positions for the datepicker dropdown along the Y axis. */
1019
+ type DatepickerDropdownPositionY = 'above' | 'below';
1020
+ /**
1021
+ * Component used as the content for the datepicker overlay. We use this instead of using
1022
+ * CuteCalendar directly as the content, so we can control the initial focus. This also gives us a
1023
+ * place to put additional features of the overlay that are not part of the calendar itself in the
1024
+ * future. (e.g., confirmation buttons).
1025
+ */
1026
+ declare class CuteDatepickerContent<S, D = ExtractDateTypeFromSelection<S>> implements AfterViewInit, OnDestroy {
1027
+ protected _elementRef: ElementRef<any>;
1028
+ protected _animationsDisabled: boolean;
1029
+ private _changeDetectorRef;
1030
+ private _globalModel;
1031
+ private _dateAdapter;
1032
+ private _ngZone;
1033
+ private _rangeSelectionStrategy;
1034
+ private _stateChanges;
1035
+ private _model;
1036
+ private _eventCleanups;
1037
+ private _animationFallback;
1038
+ /** Reference to the internal calendar component. */
1039
+ _calendar: CuteCalendar<D> | undefined;
1040
+ /** Palette color of the internal calendar. */
1041
+ color: ThemeColor | undefined;
1042
+ /** Reference to the datepicker that created the overlay. */
1043
+ datepicker: CuteDatepickerBase<any, S, D>;
1044
+ /** Start of the comparison range. */
1045
+ comparisonStart: D | null;
1046
+ /** End of the comparison range. */
1047
+ comparisonEnd: D | null;
1048
+ /** ARIA-Accessible name of the `<input cuteStartDate/>` */
1049
+ startDateAccessibleName: string | null;
1050
+ /** ARIA-Accessible name of the `<input cuteEndDate/>` */
1051
+ endDateAccessibleName: string | null;
1052
+ /** Whether the datepicker is above or below the input. */
1053
+ _isAbove: boolean;
1054
+ /** Emits when an animation has finished. */
1055
+ readonly _animationDone: Subject<void>;
1056
+ /** Whether there is an in-progress animation. */
1057
+ _isAnimating: boolean;
1058
+ /** Text for the close button. */
1059
+ _closeButtonText: string;
1060
+ /** Whether the close button currently has focus. */
1061
+ _closeButtonFocused: boolean;
1062
+ /** Portal with projected action buttons. */
1063
+ _actionsPortal: TemplatePortal | null;
1064
+ /** Id of the label for the `role="dialog"` element. */
1065
+ _dialogLabelId: string | null;
1066
+ constructor(...args: unknown[]);
1067
+ ngAfterViewInit(): void;
1068
+ ngOnDestroy(): void;
1069
+ _handleUserSelection(event: CuteCalendarUserEvent<D | null>): void;
1070
+ _handleUserDragDrop(event: CuteCalendarUserEvent<DateRange<D>>): void;
1071
+ _startExitAnimation(): void;
1072
+ private _handleAnimationEvent;
1073
+ _getSelected(): D | DateRange<D> | null;
1074
+ /** Applies the current pending selection to the global model. */
1075
+ _applyPendingSelection(): void;
1076
+ /**
1077
+ * Assigns a new portal containing the datepicker actions.
1078
+ * @param portal Portal with the actions to be assigned.
1079
+ * @param forceRerender Whether a re-render of the portal should be triggered. This isn't
1080
+ * necessary if the portal is assigned during initialization, but it may be required if it's
1081
+ * added at a later point.
1082
+ */
1083
+ _assignActions(portal: TemplatePortal<any> | null, forceRerender: boolean): void;
1084
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDatepickerContent<any, any>, never>;
1085
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteDatepickerContent<any, any>, "cute-datepicker-content", ["cuteDatepickerContent"], { "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
1086
+ }
1087
+ /** Form control that can be associated with a datepicker. */
1088
+ interface CuteDatepickerControl<D> {
1089
+ getStartValue(): D | null;
1090
+ getThemeColor(): ThemeColor | undefined;
1091
+ min: D | null;
1092
+ max: D | null;
1093
+ disabled: boolean;
1094
+ dateFilter: DateFilterFn<D> | null | undefined;
1095
+ getConnectedOverlayOrigin(): ElementRef;
1096
+ getOverlayLabelId(): string | null;
1097
+ stateChanges: Observable<void>;
1098
+ }
1099
+ /** A datepicker that can be attached to a {@link CuteDatepickerControl}. */
1100
+ interface CuteDatepickerPanel<C extends CuteDatepickerControl<D>, S, D = ExtractDateTypeFromSelection<S>> {
1101
+ /** Stream that emits whenever the date picker is closed. */
1102
+ closedStream: EventEmitter<void>;
1103
+ /** Color palette to use on the datepicker's calendar. */
1104
+ color?: ThemeColor;
1105
+ /** The input element the datepicker is associated with. */
1106
+ datepickerInput: C;
1107
+ /** Whether the datepicker pop-up should be disabled. */
1108
+ disabled: boolean;
1109
+ /** The id for the datepicker's calendar. */
1110
+ id: string;
1111
+ /** Whether the datepicker is open. */
1112
+ opened: boolean;
1113
+ /** Stream that emits whenever the date picker is opened. */
1114
+ openedStream: EventEmitter<void>;
1115
+ /** Emits when the datepicker's state changes. */
1116
+ stateChanges: Subject<void>;
1117
+ /** Opens the datepicker. */
1118
+ open(): void;
1119
+ /** Register an input with the datepicker. */
1120
+ registerInput(input: C): CuteDateSelectionModel<S, D>;
1121
+ }
1122
+ /** Base class for a datepicker. */
1123
+ declare abstract class CuteDatepickerBase<C extends CuteDatepickerControl<D>, S, D = ExtractDateTypeFromSelection<S>> implements CuteDatepickerPanel<C, S, D>, OnDestroy, OnChanges, Expandable {
1124
+ private _injector;
1125
+ private _viewContainerRef;
1126
+ private _dateAdapter;
1127
+ private _dir;
1128
+ private _model;
1129
+ private _animationsDisabled;
1130
+ private _scrollStrategy;
1131
+ private _inputStateChanges;
1132
+ private _document;
1133
+ /** An input indicating the type of the custom header component for the calendar, if set. */
1134
+ calendarHeaderComponent: ComponentType<any>;
1135
+ /** The date to open the calendar to initially. */
1136
+ get startAt(): D | null;
1137
+ set startAt(value: D | null);
1138
+ private _startAt;
1139
+ /** The view that the calendar should start in. */
1140
+ startView: 'month' | 'year' | 'multi-year';
1141
+ /** Color palette to use on the datepicker's calendar. */
1142
+ get color(): ThemeColor | undefined;
1143
+ set color(value: ThemeColor | undefined);
1144
+ _color: ThemeColor | undefined;
1145
+ /**
1146
+ * Whether the calendar UI is in touch mode. In touch mode, the calendar opens in a dialog rather
1147
+ * than a dropdown, and elements have more padding to allow for bigger touch targets.
1148
+ */
1149
+ touchUi: boolean;
1150
+ /** Whether the datepicker pop-up should be disabled. */
1151
+ get disabled(): boolean;
1152
+ set disabled(value: boolean);
1153
+ private _disabled;
1154
+ /** Preferred position of the datepicker in the X axis. */
1155
+ xPosition: DatepickerDropdownPositionX;
1156
+ /** Preferred position of the datepicker in the Y axis. */
1157
+ yPosition: DatepickerDropdownPositionY;
1158
+ /**
1159
+ * Whether to restore focus to the previously focused element when the calendar is closed.
1160
+ * Note that automatic focus restoration is an accessibility feature, and it is recommended that
1161
+ * you provide your own equivalent if you decide to turn it off.
1162
+ */
1163
+ restoreFocus: boolean;
1164
+ /**
1165
+ * Emits selected year in multiyear view.
1166
+ * This doesn't imply a change on the selected date.
1167
+ */
1168
+ readonly yearSelected: EventEmitter<D>;
1169
+ /**
1170
+ * Emits selected month in year view.
1171
+ * This doesn't imply a change on the selected date.
1172
+ */
1173
+ readonly monthSelected: EventEmitter<D>;
1174
+ /**
1175
+ * Emits when the current view changes.
1176
+ */
1177
+ readonly viewChanged: EventEmitter<CuteCalendarView>;
1178
+ /** Function that can be used to add custom CSS classes to dates. */
1179
+ dateClass: CuteCalendarCellClassFunction<D> | undefined;
1180
+ /** Emits when the datepicker has been opened. */
1181
+ readonly openedStream: EventEmitter<void>;
1182
+ /** Emits when the datepicker has been closed. */
1183
+ readonly closedStream: EventEmitter<void>;
1184
+ /** Classes to be passed to the date picker panel. */
1185
+ get panelClass(): string | string[];
1186
+ set panelClass(value: string | string[]);
1187
+ private _panelClass;
1188
+ /** Whether the calendar is open. */
1189
+ get opened(): boolean;
1190
+ set opened(value: boolean);
1191
+ private _opened;
1192
+ /** `Expandable` interface implementation */
1193
+ get expanded(): boolean;
1194
+ /** The id for the datepicker calendar. */
1195
+ id: string;
1196
+ /** The minimum selectable date. */
1197
+ _getMinDate(): D | null;
1198
+ /** The maximum selectable date. */
1199
+ _getMaxDate(): D | null;
1200
+ _getDateFilter(): DateFilterFn<D> | null | undefined;
1201
+ /** A reference to the overlay into which we've rendered the calendar. */
1202
+ private _overlayRef;
1203
+ /** Reference to the component instance rendered in the overlay. */
1204
+ private _componentRef;
1205
+ /** The element that was focused before the datepicker was opened. */
1206
+ private _focusedElementBeforeOpen;
1207
+ /** Unique class that will be added to the backdrop so that the test harnesses can look it up. */
1208
+ private _backdropHarnessClass;
1209
+ /** Currently-registered actions portal. */
1210
+ private _actionsPortal;
1211
+ /** The input element this datepicker is associated with. */
1212
+ datepickerInput: C;
1213
+ /** Emits when the datepicker's state changes. */
1214
+ readonly stateChanges: Subject<void>;
1215
+ private readonly _changeDetectorRef;
1216
+ constructor(...args: unknown[]);
1217
+ ngOnChanges(changes: SimpleChanges): void;
1218
+ ngOnDestroy(): void;
1219
+ /** Selects the given date */
1220
+ select(date: D): void;
1221
+ /** Emits the selected year in multiyear view */
1222
+ _selectYear(normalizedYear: D): void;
1223
+ /** Emits selected month in year view */
1224
+ _selectMonth(normalizedMonth: D): void;
1225
+ /** Emits changed view */
1226
+ _viewChanged(view: CuteCalendarView): void;
1227
+ /**
1228
+ * Register an input with this datepicker.
1229
+ * @param input The datepicker input to register with this datepicker.
1230
+ * @returns Selection model that the input should hook itself up to.
1231
+ */
1232
+ registerInput(input: C): CuteDateSelectionModel<S, D>;
1233
+ /**
1234
+ * Registers a portal containing action buttons with the datepicker.
1235
+ * @param portal Portal to be registered.
1236
+ */
1237
+ registerActions(portal: TemplatePortal): void;
1238
+ /**
1239
+ * Removes a portal containing action buttons from the datepicker.
1240
+ * @param portal Portal to be removed.
1241
+ */
1242
+ removeActions(portal: TemplatePortal): void;
1243
+ /** Open the calendar. */
1244
+ open(): void;
1245
+ /** Close the calendar. */
1246
+ close(): void;
1247
+ /** `Expandable` interface implementation */
1248
+ toggle(): void;
1249
+ /** Applies the current pending selection on the overlay to the model. */
1250
+ _applyPendingSelection(): void;
1251
+ /** Forwards relevant values from the datepicker to the datepicker content inside the overlay. */
1252
+ protected _forwardContentValues(instance: CuteDatepickerContent<S, D>): void;
1253
+ /** Opens the overlay with the calendar. */
1254
+ private _openOverlay;
1255
+ /** Destroys the current overlay. */
1256
+ private _destroyOverlay;
1257
+ /** Gets a position strategy that will open the calendar as a dropdown. */
1258
+ private _getDialogStrategy;
1259
+ /** Gets a position strategy that will open the calendar as a dropdown. */
1260
+ private _getDropdownStrategy;
1261
+ /** Sets the positions of the datepicker in dropdown mode based on the current configuration. */
1262
+ private _setConnectedPositions;
1263
+ /** Gets an observable that will emit when the overlay is supposed to be closed. */
1264
+ private _getCloseStream;
1265
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDatepickerBase<any, any, any>, never>;
1266
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteDatepickerBase<any, any, any>, never, never, { "calendarHeaderComponent": { "alias": "calendarHeaderComponent"; "required": false; }; "startAt": { "alias": "startAt"; "required": false; }; "startView": { "alias": "startView"; "required": false; }; "color": { "alias": "color"; "required": false; }; "touchUi": { "alias": "touchUi"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "xPosition": { "alias": "xPosition"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; }; "dateClass": { "alias": "dateClass"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; }, { "yearSelected": "yearSelected"; "monthSelected": "monthSelected"; "viewChanged": "viewChanged"; "openedStream": "opened"; "closedStream": "closed"; }, never, never, true, never>;
1267
+ static ngAcceptInputType_touchUi: unknown;
1268
+ static ngAcceptInputType_disabled: unknown;
1269
+ static ngAcceptInputType_restoreFocus: unknown;
1270
+ static ngAcceptInputType_opened: unknown;
1271
+ }
1272
+
1273
+ /** Component responsible for managing the datepicker popup/dialog. */
1274
+ declare class CuteDatepicker<D> extends CuteDatepickerBase<CuteDatepickerControl<D>, D | null, D> {
1275
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDatepicker<any>, never>;
1276
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteDatepicker<any>, "cute-datepicker", ["cuteDatepicker"], {}, {}, never, never, true, never>;
1277
+ }
1278
+
1279
+ /** @docs-private */
1280
+ declare const CUTE_DATEPICKER_VALUE_ACCESSOR: any;
1281
+ /** @docs-private */
1282
+ declare const CUTE_DATEPICKER_VALIDATORS: any;
1283
+ /** Directive used to connect an input to a CuteDatepicker. */
1284
+ declare class CuteDatepickerInput<D> extends CuteDatepickerInputBase<D | null, D> implements CuteDatepickerControl<D | null>, OnDestroy {
1285
+ private _formField;
1286
+ private _closedSubscription;
1287
+ private _openedSubscription;
1288
+ /** The datepicker that this input is associated with. */
1289
+ set cuteDatepicker(datepicker: CuteDatepickerPanel<CuteDatepickerControl<D>, D | null, D>);
1290
+ _datepicker: CuteDatepickerPanel<CuteDatepickerControl<D>, D | null, D> | undefined;
1291
+ /** The id of the panel owned by this input. */
1292
+ protected _ariaOwns: i0.WritableSignal<string | null>;
1293
+ /** The minimum valid date. */
1294
+ get min(): D | null;
1295
+ set min(value: D | null);
1296
+ private _min;
1297
+ /** The maximum valid date. */
1298
+ get max(): D | null;
1299
+ set max(value: D | null);
1300
+ private _max;
1301
+ /** Function that can be used to filter out dates within the datepicker. */
1302
+ get dateFilter(): DateFilterFn<D | null> | undefined;
1303
+ set dateFilter(value: DateFilterFn<D | null>);
1304
+ private _dateFilter;
1305
+ /** The combined form control validator for this input. */
1306
+ protected _validator: ValidatorFn | null;
1307
+ constructor(...args: unknown[]);
1308
+ /**
1309
+ * Gets the element that the datepicker popup should be connected to.
1310
+ * @return The element to connect the popup to.
1311
+ */
1312
+ getConnectedOverlayOrigin(): ElementRef;
1313
+ /** Gets the ID of an element that should be used a description for the calendar overlay. */
1314
+ getOverlayLabelId(): string | null;
1315
+ /** Returns the palette used by the input's form field, if any. */
1316
+ getThemeColor(): ThemeColor | undefined;
1317
+ /** Gets the value at which the calendar should start. */
1318
+ getStartValue(): D | null;
1319
+ ngOnDestroy(): void;
1320
+ /** Opens the associated datepicker. */
1321
+ protected _openPopup(): void;
1322
+ protected _getValueFromModel(modelValue: D | null): D | null;
1323
+ protected _assignValueToModel(value: D | null): void;
1324
+ /** Gets the input's minimum date. */
1325
+ _getMinDate(): D | null;
1326
+ /** Gets the input's maximum date. */
1327
+ _getMaxDate(): D | null;
1328
+ /** Gets the input's date filtering function. */
1329
+ protected _getDateFilter(): DateFilterFn<D | null> | undefined;
1330
+ protected _shouldHandleChangeEvent(event: DateSelectionModelChange<D>): boolean;
1331
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDatepickerInput<any>, never>;
1332
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteDatepickerInput<any>, "input[cuteDatepicker]", ["cuteDatepickerInput"], { "cuteDatepicker": { "alias": "cuteDatepicker"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "dateFilter": { "alias": "cuteDatepickerFilter"; "required": false; }; }, {}, never, never, true, never>;
1333
+ }
1334
+
1335
+ /** Datepicker data that requires internationalization. */
1336
+ declare class CuteDatepickerIntl {
1337
+ /**
1338
+ * Stream that emits whenever the labels here are changed. Use this to notify
1339
+ * components if the labels have changed after initialization.
1340
+ */
1341
+ readonly changes: Subject<void>;
1342
+ /** A label for the calendar popup (used by screen readers). */
1343
+ calendarLabel: string;
1344
+ /** A label for the button used to open the calendar popup (used by screen readers). */
1345
+ openCalendarLabel: string;
1346
+ /** Label for the button used to close the calendar popup. */
1347
+ closeCalendarLabel: string;
1348
+ /** A label for the previous month button (used by screen readers). */
1349
+ prevMonthLabel: string;
1350
+ /** A label for the next month button (used by screen readers). */
1351
+ nextMonthLabel: string;
1352
+ /** A label for the previous year button (used by screen readers). */
1353
+ prevYearLabel: string;
1354
+ /** A label for the next year button (used by screen readers). */
1355
+ nextYearLabel: string;
1356
+ /** A label for the previous multi-year button (used by screen readers). */
1357
+ prevMultiYearLabel: string;
1358
+ /** A label for the next multi-year button (used by screen readers). */
1359
+ nextMultiYearLabel: string;
1360
+ /** A label for the 'switch to month view' button (used by screen readers). */
1361
+ switchToMonthViewLabel: string;
1362
+ /** A label for the 'switch to year view' button (used by screen readers). */
1363
+ switchToMultiYearViewLabel: string;
1364
+ /**
1365
+ * A label for the first date of a range of dates (used by screen readers).
1366
+ * @deprecated Provide your own internationalization string.
1367
+ * @breaking-change 17.0.0
1368
+ */
1369
+ startDateLabel: string;
1370
+ /**
1371
+ * A label for the last date of a range of dates (used by screen readers).
1372
+ * @deprecated Provide your own internationalization string.
1373
+ * @breaking-change 17.0.0
1374
+ */
1375
+ endDateLabel: string;
1376
+ /**
1377
+ * A label for the Comparison date of a range of dates (used by screen readers).
1378
+ */
1379
+ comparisonDateLabel: string;
1380
+ /** Formats a range of years (used for visuals). */
1381
+ formatYearRange(start: string, end: string): string;
1382
+ /** Formats a label for a range of years (used by screen readers). */
1383
+ formatYearRangeLabel(start: string, end: string): string;
1384
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDatepickerIntl, never>;
1385
+ static ɵprov: i0.ɵɵInjectableDeclaration<CuteDatepickerIntl>;
1386
+ }
1387
+
1388
+ /**
1389
+ * @license Apache-2.0
1390
+ *
1391
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
1392
+ *
1393
+ * You may not use this file except in compliance with the License
1394
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
1395
+ *
1396
+ * This code is a modification of the `@angular/material` original
1397
+ * code licensed under MIT-style License (https://angular.dev/license).
1398
+ */
1399
+
1400
+ /** Can be used to override the icon of a `cuteDatepickerToggle`. */
1401
+ declare class CuteDatepickerToggleIcon {
1402
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDatepickerToggleIcon, never>;
1403
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteDatepickerToggleIcon, "[cuteDatepickerToggleIcon]", never, {}, {}, never, never, true, never>;
1404
+ }
1405
+ declare class CuteDatepickerToggle<D> implements AfterContentInit, OnChanges, OnDestroy {
1406
+ _intl: CuteDatepickerIntl;
1407
+ private _changeDetectorRef;
1408
+ private _stateChanges;
1409
+ /** Datepicker instance that the button will toggle. */
1410
+ datepicker: CuteDatepickerPanel<CuteDatepickerControl<any>, D> | undefined;
1411
+ /** Tabindex for the toggle. */
1412
+ tabIndex: number | null;
1413
+ /** Screen-reader label for the button. */
1414
+ ariaLabel: string | undefined;
1415
+ /** Whether the toggle button is disabled. */
1416
+ get disabled(): boolean;
1417
+ set disabled(value: boolean);
1418
+ private _disabled;
1419
+ /** Whether ripples on the toggle should be disabled. */
1420
+ disableRipple: boolean;
1421
+ /** Custom icon set by the consumer. */
1422
+ _customIcon: CuteDatepickerToggleIcon | undefined;
1423
+ /** Underlying button element. */
1424
+ _button: CuteButton | undefined;
1425
+ constructor(...args: unknown[]);
1426
+ ngOnChanges(changes: SimpleChanges): void;
1427
+ ngOnDestroy(): void;
1428
+ ngAfterContentInit(): void;
1429
+ _open(event: Event): void;
1430
+ private _watchStateChanges;
1431
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDatepickerToggle<any>, never>;
1432
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteDatepickerToggle<any>, "cute-datepicker-toggle", ["cuteDatepickerToggle"], { "datepicker": { "alias": "for"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; }, {}, ["_customIcon"], ["[cuteDatepickerToggleIcon]"], true, never>;
1433
+ static ngAcceptInputType_disabled: unknown;
1434
+ }
1435
+
1436
+ /**
1437
+ * @license Apache-2.0
1438
+ *
1439
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
1440
+ *
1441
+ * You may not use this file except in compliance with the License
1442
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
1443
+ *
1444
+ * This code is a modification of the `@angular/material` original
1445
+ * code licensed under MIT-style License (https://angular.dev/license).
1446
+ */
1447
+
1448
+ /** Parent component that should be wrapped around `CuteStartDate` and `CuteEndDate`. */
1449
+ interface CuteDateRangeInputParent<D> {
1450
+ id: string;
1451
+ min: D | null;
1452
+ max: D | null;
1453
+ dateFilter: DateFilterFn<D> | undefined;
1454
+ rangePicker: {
1455
+ opened: boolean;
1456
+ id: string;
1457
+ };
1458
+ _startInput: CuteDateRangeInputPartBase<D> | undefined;
1459
+ _endInput: CuteDateRangeInputPartBase<D> | undefined;
1460
+ _groupDisabled: boolean;
1461
+ _handleChildValueChange(): void;
1462
+ _openDatepicker(): void;
1463
+ }
1464
+ /**
1465
+ * Base class for the individual inputs that can be projected inside a `cute-date-range-input`.
1466
+ */
1467
+ declare abstract class CuteDateRangeInputPartBase<D> extends CuteDatepickerInputBase<DateRange<D>> implements OnInit, DoCheck {
1468
+ _rangeInput: CuteDateRangeInputParent<D>;
1469
+ _elementRef: ElementRef<HTMLInputElement>;
1470
+ _defaultErrorStateMatcher: ErrorStateMatcher;
1471
+ private _injector;
1472
+ private _rawValue;
1473
+ _parentForm: NgForm | null;
1474
+ _parentFormGroup: FormGroupDirective | null;
1475
+ /**
1476
+ * Form control bound to this input part.
1477
+ * @docs-private
1478
+ */
1479
+ ngControl: NgControl;
1480
+ protected abstract _validator: ValidatorFn | null;
1481
+ protected abstract _assignValueToModel(value: D | null): void;
1482
+ protected abstract _getValueFromModel(modelValue: DateRange<D>): D | null;
1483
+ protected readonly _dir: Directionality | null;
1484
+ private _errorStateTracker;
1485
+ /** Object used to control when error messages are shown. */
1486
+ get errorStateMatcher(): ErrorStateMatcher;
1487
+ set errorStateMatcher(value: ErrorStateMatcher);
1488
+ /** Whether the input is in an error state. */
1489
+ get errorState(): boolean;
1490
+ set errorState(value: boolean);
1491
+ protected constructor(...args: unknown[]);
1492
+ ngOnInit(): void;
1493
+ ngDoCheck(): void;
1494
+ /** Gets whether the input is empty. */
1495
+ isEmpty(): boolean;
1496
+ /** Gets the placeholder of the input. */
1497
+ _getPlaceholder(): string;
1498
+ /** Focuses the input. */
1499
+ focus(): void;
1500
+ /** Gets the value that should be used when mirroring the input's size. */
1501
+ getMirrorValue(): string;
1502
+ /** Refreshes the error state of the input. */
1503
+ updateErrorState(): void;
1504
+ /** Handles `input` events on the input element. */
1505
+ _onInput(value: string): void;
1506
+ /** Opens the datepicker associated with the input. */
1507
+ protected _openPopup(): void;
1508
+ /** Gets the minimum date from the range input. */
1509
+ _getMinDate(): D | null;
1510
+ /** Gets the maximum date from the range input. */
1511
+ _getMaxDate(): D | null;
1512
+ /** Gets the date filter function from the range input. */
1513
+ protected _getDateFilter(): DateFilterFn<D> | undefined;
1514
+ protected _parentDisabled(): boolean;
1515
+ protected _shouldHandleChangeEvent({ source }: DateSelectionModelChange<DateRange<D>>): boolean;
1516
+ protected _assignValueProgrammatically(value: D | null, reformat: boolean): void;
1517
+ /** return the ARIA accessible name of the input element */
1518
+ _getAccessibleName(): string;
1519
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDateRangeInputPartBase<any>, never>;
1520
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteDateRangeInputPartBase<any>, never, never, { "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; }; }, {}, never, never, true, never>;
1521
+ }
1522
+ /** Input for entering the start date in a `cute-date-range-input`. */
1523
+ declare class CuteStartDate<D> extends CuteDateRangeInputPartBase<D> {
1524
+ /** Validator that checks that the start date isn't after the end date. */
1525
+ private _startValidator;
1526
+ protected _validator: ValidatorFn | null;
1527
+ protected _getValueFromModel(modelValue: DateRange<D>): D | null;
1528
+ protected _shouldHandleChangeEvent(change: DateSelectionModelChange<DateRange<D>>): boolean;
1529
+ protected _assignValueToModel(value: D | null): void;
1530
+ protected _formatValue(value: D | null): void;
1531
+ _onKeydown(event: KeyboardEvent): void;
1532
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteStartDate<any>, never>;
1533
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteStartDate<any>, "input[cuteStartDate]", never, {}, { "dateChange": "dateChange"; "dateInput": "dateInput"; }, never, never, true, never>;
1534
+ }
1535
+ /** Input for entering the end date in a `cute-date-range-input`. */
1536
+ declare class CuteEndDate<D> extends CuteDateRangeInputPartBase<D> {
1537
+ /** Validator that checks that the end date isn't before the start date. */
1538
+ private _endValidator;
1539
+ protected _validator: ValidatorFn | null;
1540
+ protected _getValueFromModel(modelValue: DateRange<D>): D | null;
1541
+ protected _shouldHandleChangeEvent(change: DateSelectionModelChange<DateRange<D>>): boolean;
1542
+ protected _assignValueToModel(value: D | null): void;
1543
+ private _moveCaretToEndOfStartInput;
1544
+ _onKeydown(event: KeyboardEvent): void;
1545
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteEndDate<any>, never>;
1546
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteEndDate<any>, "input[cuteEndDate]", never, {}, { "dateChange": "dateChange"; "dateInput": "dateInput"; }, never, never, true, never>;
1547
+ }
1548
+
1549
+ /**
1550
+ * Input that can be associated with a date range picker.
1551
+ * @docs-private
1552
+ */
1553
+ interface CuteDateRangePickerInput<D> extends CuteDatepickerControl<D> {
1554
+ _getEndDateAccessibleName(): string | null;
1555
+ _getStartDateAccessibleName(): string | null;
1556
+ comparisonStart: D | null;
1557
+ comparisonEnd: D | null;
1558
+ }
1559
+ /** Component responsible for managing the date range picker popup/dialog. */
1560
+ declare class CuteDateRangePicker<D> extends CuteDatepickerBase<CuteDateRangePickerInput<D>, DateRange<D>, D> {
1561
+ protected _forwardContentValues(instance: CuteDatepickerContent<DateRange<D>, D>): void;
1562
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDateRangePicker<any>, never>;
1563
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteDateRangePicker<any>, "cute-date-range-picker", ["cuteDateRangePicker"], {}, {}, never, never, true, never>;
1564
+ }
1565
+
1566
+ declare class CuteDateRangeInput<D> implements CuteFormFieldControl<DateRange<D>>, CuteDatepickerControl<D>, CuteDateRangeInputParent<D>, CuteDateRangePickerInput<D>, AfterContentInit, OnChanges, OnDestroy {
1567
+ private _changeDetectorRef;
1568
+ private _elementRef;
1569
+ private _dateAdapter;
1570
+ private _formField;
1571
+ private _closedSubscription;
1572
+ private _openedSubscription;
1573
+ /** Current value of the range input. */
1574
+ get value(): DateRange<D> | null;
1575
+ /** Unique ID for the group. */
1576
+ id: string;
1577
+ /** Whether the control is focused. */
1578
+ focused: boolean;
1579
+ /** Whether the control's label should float. */
1580
+ get shouldLabelFloat(): boolean;
1581
+ /** Name of the form control. */
1582
+ controlType: string;
1583
+ /**
1584
+ * Implemented as a part of `CuteFormFieldControl`.
1585
+ * Set the placeholder attribute on `cuteStartDate` and `cuteEndDate`.
1586
+ */
1587
+ get placeholder(): string;
1588
+ /** The range picker that this input is associated with. */
1589
+ get rangePicker(): CuteDatepickerPanel<CuteDatepickerControl<D>, DateRange<D>, D>;
1590
+ set rangePicker(rangePicker: CuteDatepickerPanel<CuteDatepickerControl<D>, DateRange<D>, D>);
1591
+ private _rangePicker;
1592
+ /** The id of the panel owned by this input. */
1593
+ _ariaOwns: i0.WritableSignal<string | null>;
1594
+ /** Whether the input is required. */
1595
+ get required(): boolean;
1596
+ set required(value: boolean);
1597
+ private _required;
1598
+ /** Function that can be used to filter out dates within the date range picker. */
1599
+ get dateFilter(): DateFilterFn<D> | undefined;
1600
+ set dateFilter(value: DateFilterFn<D> | null | undefined);
1601
+ private _dateFilter;
1602
+ /** The minimum valid date. */
1603
+ get min(): D | null;
1604
+ set min(value: D | null);
1605
+ private _min;
1606
+ /** The maximum valid date. */
1607
+ get max(): D | null;
1608
+ set max(value: D | null);
1609
+ private _max;
1610
+ /** Whether the input is disabled. */
1611
+ get disabled(): boolean;
1612
+ set disabled(value: boolean);
1613
+ _groupDisabled: boolean;
1614
+ setDisabledState(value: boolean): void;
1615
+ /** Whether the input is in an error state. */
1616
+ get errorState(): boolean;
1617
+ /** Whether the datepicker input is empty. */
1618
+ get empty(): boolean;
1619
+ /** Value for the `aria-describedby` attribute of the inputs. */
1620
+ _ariaDescribedBy: string | null;
1621
+ /** Date selection model currently registered with the input. */
1622
+ private _model;
1623
+ /** Separator text to be shown between the inputs. */
1624
+ separator: string;
1625
+ /** Start of the comparison range that should be shown in the calendar. */
1626
+ comparisonStart: D | null;
1627
+ /** End of the comparison range that should be shown in the calendar. */
1628
+ comparisonEnd: D | null;
1629
+ _startInput: CuteStartDate<D> | undefined;
1630
+ _endInput: CuteEndDate<D> | undefined;
1631
+ /**
1632
+ * Implemented as a part of `CuteFormFieldControl`.
1633
+ * TODO(crisbeto): change type to `AbstractControlDirective` after #18206 lands.
1634
+ * @docs-private
1635
+ */
1636
+ ngControl: NgControl | null;
1637
+ /** Emits when the input's state has changed. */
1638
+ readonly stateChanges: Subject<void>;
1639
+ /**
1640
+ * Disable the automatic labeling to avoid issues like #27241.
1641
+ * @docs-private
1642
+ */
1643
+ readonly disableAutomaticLabeling = true;
1644
+ readonly controlElementRef: ElementRef | undefined;
1645
+ constructor(...args: unknown[]);
1646
+ /**
1647
+ * Implemented as a part of `CuteFormFieldControl`.
1648
+ */
1649
+ setDescribedByIds(ids: string[]): void;
1650
+ /**
1651
+ * Implemented as part of CuteFormFieldControl.
1652
+ */
1653
+ get describedByIds(): string[];
1654
+ /**
1655
+ * Implemented as a part of `CuteFormFieldControl`.
1656
+ */
1657
+ onContainerClick(): void;
1658
+ ngAfterContentInit(): void;
1659
+ ngOnChanges(changes: SimpleChanges): void;
1660
+ ngOnDestroy(): void;
1661
+ /** Gets the date at which the calendar should start. */
1662
+ getStartValue(): D | null;
1663
+ /** Gets the input's theme palette. */
1664
+ getThemeColor(): ThemeColor | undefined;
1665
+ /** Gets the element to which the calendar overlay should be attached. */
1666
+ getConnectedOverlayOrigin(): ElementRef;
1667
+ /** Gets the ID of an element that should be used a description for the calendar overlay. */
1668
+ getOverlayLabelId(): string | null;
1669
+ /** Gets the value that is used to mirror the state input. */
1670
+ protected _getInputMirrorValue(part: 'start' | 'end'): string;
1671
+ /** Whether the input placeholders should be hidden. */
1672
+ protected _shouldHidePlaceholders(): boolean;
1673
+ /**
1674
+ * Handles the value in one of the child inputs changing.
1675
+ * Implementing interface `CuteDateRangeInputParent`.
1676
+ */
1677
+ _handleChildValueChange(): void;
1678
+ /**
1679
+ * Opens the date range picker associated with the input.
1680
+ * Implementing interface `CuteDateRangeInputParent`.
1681
+ */
1682
+ _openDatepicker(): void;
1683
+ /** Whether the separate text should be hidden. */
1684
+ protected _shouldHideSeparator(): boolean | "" | null;
1685
+ /** Gets the value for the `aria-labelledby` attribute of the inputs. */
1686
+ protected _getAriaLabelledby(): string | null;
1687
+ /**
1688
+ * Implementing interface `CuteDateRangeInputParent`.
1689
+ */
1690
+ _getStartDateAccessibleName(): string;
1691
+ /**
1692
+ * Implementing interface `CuteDateRangeInputParent`.
1693
+ */
1694
+ _getEndDateAccessibleName(): string;
1695
+ /** Updates the focused state of the range input. */
1696
+ _updateFocus(origin: FocusOrigin): void;
1697
+ /** Re-runs the validators on the start/end inputs. */
1698
+ private _revalidate;
1699
+ /** Registers the current date selection model with the start/end inputs. */
1700
+ private _registerModel;
1701
+ /** Checks whether a specific range input directive is required. */
1702
+ private _isTargetRequired;
1703
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDateRangeInput<any>, never>;
1704
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteDateRangeInput<any>, "cute-date-range-input", ["cuteDateRangeInput"], { "rangePicker": { "alias": "rangePicker"; "required": false; }; "required": { "alias": "required"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "separator": { "alias": "separator"; "required": false; }; "comparisonStart": { "alias": "comparisonStart"; "required": false; }; "comparisonEnd": { "alias": "comparisonEnd"; "required": false; }; }, {}, ["_startInput", "_endInput"], ["input[cuteStartDate]", "input[cuteEndDate]"], true, never>;
1705
+ static ngAcceptInputType_required: unknown;
1706
+ static ngAcceptInputType_disabled: unknown;
1707
+ }
1708
+
1709
+ /**
1710
+ * @license Apache-2.0
1711
+ *
1712
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
1713
+ *
1714
+ * You may not use this file except in compliance with the License
1715
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
1716
+ *
1717
+ * This code is a modification of the `@angular/material` original
1718
+ * code licensed under MIT-style License (https://angular.dev/license).
1719
+ */
1720
+
1721
+ /** Button that will close the datepicker and assign the current selection to the data model. */
1722
+ declare class CuteDatepickerApply {
1723
+ private _datepicker;
1724
+ constructor(...args: unknown[]);
1725
+ _applySelection(): void;
1726
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDatepickerApply, never>;
1727
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteDatepickerApply, "[cuteDatepickerApply], [cuteDateRangePickerApply]", never, {}, {}, never, never, true, never>;
1728
+ }
1729
+ /** Button that will close the datepicker and discard the current selection. */
1730
+ declare class CuteDatepickerCancel {
1731
+ _datepicker: CuteDatepickerBase<CuteDatepickerControl<any>, unknown, {}>;
1732
+ constructor(...args: unknown[]);
1733
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDatepickerCancel, never>;
1734
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CuteDatepickerCancel, "[cuteDatepickerCancel], [cuteDateRangePickerCancel]", never, {}, {}, never, never, true, never>;
1735
+ }
1736
+ /**
1737
+ * Container that can be used to project a row of action buttons
1738
+ * to the bottom of a datepicker or date range picker.
1739
+ */
1740
+ declare class CuteDatepickerActions implements AfterViewInit, OnDestroy {
1741
+ private _datepicker;
1742
+ private _viewContainerRef;
1743
+ _template: TemplateRef<unknown>;
1744
+ private _portal;
1745
+ constructor(...args: unknown[]);
1746
+ ngAfterViewInit(): void;
1747
+ ngOnDestroy(): void;
1748
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDatepickerActions, never>;
1749
+ static ɵcmp: i0.ɵɵComponentDeclaration<CuteDatepickerActions, "cute-datepicker-actions, cute-date-range-picker-actions", never, {}, {}, never, ["*"], true, never>;
1750
+ }
1751
+
1752
+ declare class CuteDatepickerModule {
1753
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuteDatepickerModule, never>;
1754
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CuteDatepickerModule, never, [typeof i1.CommonModule, typeof i2.CuteButtonModule, typeof i3.OverlayModule, typeof i4.A11yModule, typeof i5.PortalModule, typeof CuteCalendar, typeof CuteCalendarBody, typeof CuteDatepicker, typeof CuteDatepickerContent, typeof CuteDatepickerInput, typeof CuteDatepickerToggle, typeof CuteDatepickerToggleIcon, typeof CuteMonthView, typeof CuteYearView, typeof CuteMultiYearView, typeof CuteCalendarHeader, typeof CuteDateRangeInput, typeof CuteStartDate, typeof CuteEndDate, typeof CuteDateRangePicker, typeof CuteDatepickerActions, typeof CuteDatepickerCancel, typeof CuteDatepickerApply], [typeof i19.CdkScrollableModule, typeof CuteCalendar, typeof CuteCalendarBody, typeof CuteDatepicker, typeof CuteDatepickerContent, typeof CuteDatepickerInput, typeof CuteDatepickerToggle, typeof CuteDatepickerToggleIcon, typeof CuteMonthView, typeof CuteYearView, typeof CuteMultiYearView, typeof CuteCalendarHeader, typeof CuteDateRangeInput, typeof CuteStartDate, typeof CuteEndDate, typeof CuteDateRangePicker, typeof CuteDatepickerActions, typeof CuteDatepickerCancel, typeof CuteDatepickerApply]>;
1755
+ static ɵinj: i0.ɵɵInjectorDeclaration<CuteDatepickerModule>;
1756
+ }
1757
+
1758
+ /**
1759
+ * @license Apache-2.0
1760
+ *
1761
+ * Copyright (c) 2025 CuteWidgets Team. All Rights Reserved.
1762
+ *
1763
+ * You may not use this file except in compliance with the License
1764
+ * that can be found at http://www.apache.org/licenses/LICENSE-2.0
1765
+ *
1766
+ * This code is a modification of the `@angular/material` original
1767
+ * code licensed under MIT-style License (https://angular.dev/license).
1768
+ */
1769
+
1770
+ /** Injection token used to customize the date range selection behavior. */
1771
+ declare const CUTE_DATE_RANGE_SELECTION_STRATEGY: InjectionToken<CuteDateRangeSelectionStrategy<any>>;
1772
+ /** Object that can be provided in order to customize the date range selection behavior. */
1773
+ interface CuteDateRangeSelectionStrategy<D> {
1774
+ /**
1775
+ * Called when the user has finished selecting a value.
1776
+ * @param date Date that was selected. Will be null if the user cleared the selection.
1777
+ * @param currentRange Range that is currently show in the calendar.
1778
+ * @param event DOM event that triggered the selection. Currently only corresponds to a `click`
1779
+ * event, but it may get expanded in the future.
1780
+ */
1781
+ selectionFinished(date: D | null, currentRange: DateRange<D>, event: Event): DateRange<D>;
1782
+ /**
1783
+ * Called when the user has activated a new date (e.g. by hovering over
1784
+ * it or moving focus) and the calendar tries to display a date range.
1785
+ *
1786
+ * @param activeDate Date that the user has activated. Will be null if the user moved
1787
+ * focus to an element that's no a calendar cell.
1788
+ * @param currentRange Range that is currently shown in the calendar.
1789
+ * @param event DOM event that caused the preview to be changed. Will be either a
1790
+ * `mouseenter`/`mouseleave` or `focus`/`blur` depending on how the user is navigating.
1791
+ */
1792
+ createPreview(activeDate: D | null, currentRange: DateRange<D>, event: Event): DateRange<D>;
1793
+ /**
1794
+ * Called when the user has dragged a date in the currently selected range to another
1795
+ * date. Returns the date updated range that should result from this interaction.
1796
+ *
1797
+ * @param dragOrigin The date the user started dragging from.
1798
+ * @param originalRange The originally selected date range.
1799
+ * @param newDate The currently targeted date in the drag operation.
1800
+ * @param event DOM event that triggered the updated drag state. Will be
1801
+ * `mouseenter`/`mouseup` or `touchmove`/`touchend` depending on the device type.
1802
+ */
1803
+ createDrag?(dragOrigin: D, originalRange: DateRange<D>, newDate: D, event: Event): DateRange<D> | null;
1804
+ }
1805
+ /** Provides the default date range selection behavior. */
1806
+ declare class DefaultCuteCalendarRangeStrategy<D> implements CuteDateRangeSelectionStrategy<D> {
1807
+ private _dateAdapter;
1808
+ constructor(_dateAdapter: DateAdapter<D>);
1809
+ selectionFinished(date: D, currentRange: DateRange<D>): DateRange<D>;
1810
+ createPreview(activeDate: D | null, currentRange: DateRange<D>): DateRange<D>;
1811
+ createDrag(dragOrigin: D, originalRange: DateRange<D>, newDate: D): DateRange<D> | null;
1812
+ static ɵfac: i0.ɵɵFactoryDeclaration<DefaultCuteCalendarRangeStrategy<any>, never>;
1813
+ static ɵprov: i0.ɵɵInjectableDeclaration<DefaultCuteCalendarRangeStrategy<any>>;
1814
+ }
1815
+
1816
+ export { CUTE_DATEPICKER_SCROLL_STRATEGY, CUTE_DATEPICKER_VALIDATORS, CUTE_DATEPICKER_VALUE_ACCESSOR, CUTE_DATE_RANGE_SELECTION_STRATEGY, CUTE_RANGE_DATE_SELECTION_MODEL_PROVIDER, CUTE_SINGLE_DATE_SELECTION_MODEL_PROVIDER, CuteCalendar, CuteCalendarBody, CuteCalendarCell, CuteCalendarHeader, CuteDateRangeInput, CuteDateRangePicker, CuteDateSelectionModel, CuteDatepicker, CuteDatepickerActions, CuteDatepickerApply, CuteDatepickerCancel, CuteDatepickerContent, CuteDatepickerInput, CuteDatepickerInputEvent, CuteDatepickerIntl, CuteDatepickerModule, CuteDatepickerToggle, CuteDatepickerToggleIcon, CuteEndDate, CuteMonthView, CuteMultiYearView, CuteRangeDateSelectionModel, CuteSingleDateSelectionModel, CuteStartDate, CuteYearView, DateRange, DefaultCuteCalendarRangeStrategy, yearsPerPage, yearsPerRow };
1817
+ export type { CuteCalendarCellClassFunction, CuteCalendarCellCssClasses, CuteCalendarUserEvent, CuteCalendarView, CuteDateRangeSelectionStrategy, CuteDatepickerControl, CuteDatepickerPanel, DateFilterFn, DateSelectionModelChange, DatepickerDropdownPositionX, DatepickerDropdownPositionY, ExtractDateTypeFromSelection };