@tectra-ng/ui 0.1.1 → 0.1.3

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 (145) hide show
  1. package/README.md +36 -19
  2. package/analog-clock/README.md +31 -0
  3. package/countdown/README.md +45 -0
  4. package/country/README.md +14 -4
  5. package/data-view/README.md +71 -0
  6. package/datepicker/README.md +109 -0
  7. package/export/README.md +79 -0
  8. package/export-font/OFL.txt +93 -0
  9. package/export-font/README.md +7 -0
  10. package/fesm2022/tectra-ng-ui-analog-clock.mjs +386 -0
  11. package/fesm2022/tectra-ng-ui-analog-clock.mjs.map +1 -0
  12. package/fesm2022/tectra-ng-ui-autocomplete.mjs +2 -2
  13. package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -1
  14. package/fesm2022/tectra-ng-ui-cascade-select.mjs +2 -2
  15. package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -1
  16. package/fesm2022/tectra-ng-ui-chip.mjs +2 -2
  17. package/fesm2022/tectra-ng-ui-chip.mjs.map +1 -1
  18. package/fesm2022/tectra-ng-ui-chips-input.mjs +2 -2
  19. package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
  20. package/fesm2022/tectra-ng-ui-color-picker.mjs +2 -2
  21. package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -1
  22. package/fesm2022/tectra-ng-ui-countdown.mjs +513 -0
  23. package/fesm2022/tectra-ng-ui-countdown.mjs.map +1 -0
  24. package/fesm2022/tectra-ng-ui-country.mjs +47 -6
  25. package/fesm2022/tectra-ng-ui-country.mjs.map +1 -1
  26. package/fesm2022/tectra-ng-ui-data-view.mjs +1370 -0
  27. package/fesm2022/tectra-ng-ui-data-view.mjs.map +1 -0
  28. package/fesm2022/tectra-ng-ui-datepicker.mjs +2640 -0
  29. package/fesm2022/tectra-ng-ui-datepicker.mjs.map +1 -0
  30. package/fesm2022/tectra-ng-ui-export-font.mjs +7 -0
  31. package/fesm2022/tectra-ng-ui-export-font.mjs.map +1 -0
  32. package/fesm2022/tectra-ng-ui-export.mjs +2574 -0
  33. package/fesm2022/tectra-ng-ui-export.mjs.map +1 -0
  34. package/fesm2022/tectra-ng-ui-fieldset.mjs +2 -2
  35. package/fesm2022/tectra-ng-ui-fieldset.mjs.map +1 -1
  36. package/fesm2022/tectra-ng-ui-input-number.mjs +2 -2
  37. package/fesm2022/tectra-ng-ui-input-number.mjs.map +1 -1
  38. package/fesm2022/tectra-ng-ui-input.mjs +2 -2
  39. package/fesm2022/tectra-ng-ui-input.mjs.map +1 -1
  40. package/fesm2022/tectra-ng-ui-label.mjs +4 -4
  41. package/fesm2022/tectra-ng-ui-label.mjs.map +1 -1
  42. package/fesm2022/tectra-ng-ui-listbox.mjs +2 -2
  43. package/fesm2022/tectra-ng-ui-listbox.mjs.map +1 -1
  44. package/fesm2022/tectra-ng-ui-menu.mjs +2 -2
  45. package/fesm2022/tectra-ng-ui-menu.mjs.map +1 -1
  46. package/fesm2022/tectra-ng-ui-message.mjs +2 -2
  47. package/fesm2022/tectra-ng-ui-message.mjs.map +1 -1
  48. package/fesm2022/tectra-ng-ui-month-calendar.mjs +601 -0
  49. package/fesm2022/tectra-ng-ui-month-calendar.mjs.map +1 -0
  50. package/fesm2022/tectra-ng-ui-multiselect.mjs +2 -2
  51. package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -1
  52. package/fesm2022/tectra-ng-ui-paginator.mjs +2 -2
  53. package/fesm2022/tectra-ng-ui-paginator.mjs.map +1 -1
  54. package/fesm2022/tectra-ng-ui-select.mjs +4 -4
  55. package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
  56. package/fesm2022/tectra-ng-ui-slider.mjs +2 -2
  57. package/fesm2022/tectra-ng-ui-slider.mjs.map +1 -1
  58. package/fesm2022/tectra-ng-ui-sparkline.mjs +240 -0
  59. package/fesm2022/tectra-ng-ui-sparkline.mjs.map +1 -0
  60. package/fesm2022/tectra-ng-ui-stat-tiles.mjs +661 -0
  61. package/fesm2022/tectra-ng-ui-stat-tiles.mjs.map +1 -0
  62. package/fesm2022/tectra-ng-ui-table.mjs +1368 -1348
  63. package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
  64. package/fesm2022/tectra-ng-ui-tag.mjs +2 -2
  65. package/fesm2022/tectra-ng-ui-tag.mjs.map +1 -1
  66. package/fesm2022/tectra-ng-ui-timeline.mjs +407 -0
  67. package/fesm2022/tectra-ng-ui-timeline.mjs.map +1 -0
  68. package/fesm2022/tectra-ng-ui-toggle-switch.mjs +2 -2
  69. package/fesm2022/tectra-ng-ui-toggle-switch.mjs.map +1 -1
  70. package/fesm2022/tectra-ng-ui-tree-select.mjs +7 -46
  71. package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
  72. package/fesm2022/tectra-ng-ui-tree-table.mjs +901 -0
  73. package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -0
  74. package/fesm2022/tectra-ng-ui-tree.mjs +1940 -0
  75. package/fesm2022/tectra-ng-ui-tree.mjs.map +1 -0
  76. package/fesm2022/tectra-ng-ui-virtual-scroller.mjs +928 -0
  77. package/fesm2022/tectra-ng-ui-virtual-scroller.mjs.map +1 -0
  78. package/month-calendar/README.md +46 -0
  79. package/package.json +56 -4
  80. package/sparkline/README.md +27 -0
  81. package/stat-tiles/README.md +53 -0
  82. package/timeline/README.md +42 -0
  83. package/tree/README.md +93 -0
  84. package/tree-table/README.md +84 -0
  85. package/types/tectra-ng-ui-analog-clock.d.ts +127 -0
  86. package/types/tectra-ng-ui-analog-clock.d.ts.map +1 -0
  87. package/types/tectra-ng-ui-autocomplete.d.ts +11 -0
  88. package/types/tectra-ng-ui-autocomplete.d.ts.map +1 -1
  89. package/types/tectra-ng-ui-chip.d.ts +3 -0
  90. package/types/tectra-ng-ui-chip.d.ts.map +1 -1
  91. package/types/tectra-ng-ui-countdown.d.ts +150 -0
  92. package/types/tectra-ng-ui-countdown.d.ts.map +1 -0
  93. package/types/tectra-ng-ui-country-select.d.ts +11 -0
  94. package/types/tectra-ng-ui-country-select.d.ts.map +1 -1
  95. package/types/tectra-ng-ui-country.d.ts +9 -3
  96. package/types/tectra-ng-ui-country.d.ts.map +1 -1
  97. package/types/tectra-ng-ui-data-view.d.ts +363 -0
  98. package/types/tectra-ng-ui-data-view.d.ts.map +1 -0
  99. package/types/tectra-ng-ui-datepicker.d.ts +801 -0
  100. package/types/tectra-ng-ui-datepicker.d.ts.map +1 -0
  101. package/types/tectra-ng-ui-export-font.d.ts +5 -0
  102. package/types/tectra-ng-ui-export-font.d.ts.map +1 -0
  103. package/types/tectra-ng-ui-export.d.ts +427 -0
  104. package/types/tectra-ng-ui-export.d.ts.map +1 -0
  105. package/types/tectra-ng-ui-fieldset.d.ts +8 -0
  106. package/types/tectra-ng-ui-fieldset.d.ts.map +1 -1
  107. package/types/tectra-ng-ui-input-number.d.ts +1 -0
  108. package/types/tectra-ng-ui-input-number.d.ts.map +1 -1
  109. package/types/tectra-ng-ui-input.d.ts +4 -0
  110. package/types/tectra-ng-ui-input.d.ts.map +1 -1
  111. package/types/tectra-ng-ui-menu.d.ts +2 -0
  112. package/types/tectra-ng-ui-menu.d.ts.map +1 -1
  113. package/types/tectra-ng-ui-message.d.ts +5 -0
  114. package/types/tectra-ng-ui-message.d.ts.map +1 -1
  115. package/types/tectra-ng-ui-month-calendar.d.ts +287 -0
  116. package/types/tectra-ng-ui-month-calendar.d.ts.map +1 -0
  117. package/types/tectra-ng-ui-multiselect.d.ts +11 -0
  118. package/types/tectra-ng-ui-multiselect.d.ts.map +1 -1
  119. package/types/tectra-ng-ui-paginator.d.ts +1 -0
  120. package/types/tectra-ng-ui-paginator.d.ts.map +1 -1
  121. package/types/tectra-ng-ui-select.d.ts +11 -0
  122. package/types/tectra-ng-ui-select.d.ts.map +1 -1
  123. package/types/tectra-ng-ui-slider.d.ts +1 -0
  124. package/types/tectra-ng-ui-slider.d.ts.map +1 -1
  125. package/types/tectra-ng-ui-sparkline.d.ts +80 -0
  126. package/types/tectra-ng-ui-sparkline.d.ts.map +1 -0
  127. package/types/tectra-ng-ui-stat-tiles.d.ts +287 -0
  128. package/types/tectra-ng-ui-stat-tiles.d.ts.map +1 -0
  129. package/types/tectra-ng-ui-table.d.ts +181 -15
  130. package/types/tectra-ng-ui-table.d.ts.map +1 -1
  131. package/types/tectra-ng-ui-tag.d.ts +8 -0
  132. package/types/tectra-ng-ui-tag.d.ts.map +1 -1
  133. package/types/tectra-ng-ui-timeline.d.ts +129 -0
  134. package/types/tectra-ng-ui-timeline.d.ts.map +1 -0
  135. package/types/tectra-ng-ui-toggle-switch.d.ts +5 -0
  136. package/types/tectra-ng-ui-toggle-switch.d.ts.map +1 -1
  137. package/types/tectra-ng-ui-tree-select.d.ts +19 -22
  138. package/types/tectra-ng-ui-tree-select.d.ts.map +1 -1
  139. package/types/tectra-ng-ui-tree-table.d.ts +94 -0
  140. package/types/tectra-ng-ui-tree-table.d.ts.map +1 -0
  141. package/types/tectra-ng-ui-tree.d.ts +571 -0
  142. package/types/tectra-ng-ui-tree.d.ts.map +1 -0
  143. package/types/tectra-ng-ui-virtual-scroller.d.ts +297 -0
  144. package/types/tectra-ng-ui-virtual-scroller.d.ts.map +1 -0
  145. package/virtual-scroller/README.md +60 -0
@@ -0,0 +1,2640 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, DestroyRef, Directive, Injector, TemplateRef, ViewContainerRef, afterNextRender, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, numberAttribute, output, signal, untracked, viewChild } from "@angular/core";
3
+ import { CdkTrapFocus } from "@angular/cdk/a11y";
4
+ import { CdkConnectedOverlay, CdkOverlayOrigin, Overlay } from "@angular/cdk/overlay";
5
+ import { TemplatePortal } from "@angular/cdk/portal";
6
+ import { DOCUMENT, NgTemplateOutlet } from "@angular/common";
7
+ import { NG_VALUE_ACCESSOR } from "@angular/forms";
8
+ import { TxAnnouncer, uniqueId } from "@tectra-ng/core/a11y";
9
+ import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
10
+ import { injectFluid } from "@tectra-ng/core/fluid";
11
+ import { TxFormControlBase, injectFieldInvalid } from "@tectra-ng/core/forms";
12
+ import { TxLocaleService, injectTranslations } from "@tectra-ng/core/i18n";
13
+ import { TxOverlayAnchor, TxOverlayInsets, placementFromPosition, txAnimateEnter, txAnimateLeave, txPositions, txScrollStrategy, watchOrigin } from "@tectra-ng/core/overlay";
14
+ import { optionalBoolean } from "@tectra-ng/core/utils";
15
+ import { TxIcon } from "@tectra-ng/icons";
16
+ import { toStyleObject } from "@tectra-ng/themes";
17
+ import { TxButton } from "@tectra-ng/ui/button";
18
+ import { TxInput } from "@tectra-ng/ui/input";
19
+ var TxDatePickerDate = class TxDatePickerDate {
20
+ templateRef = inject(TemplateRef);
21
+ static ɵfac = i0.ɵɵngDeclareFactory({
22
+ minVersion: "12.0.0",
23
+ version: "22.2.3",
24
+ ngImport: i0,
25
+ type: TxDatePickerDate,
26
+ deps: [],
27
+ target: i0.ɵɵFactoryTarget.Directive
28
+ });
29
+ static ɵdir = i0.ɵɵngDeclareDirective({
30
+ minVersion: "14.0.0",
31
+ version: "22.2.3",
32
+ type: TxDatePickerDate,
33
+ isStandalone: true,
34
+ selector: "ng-template[txDatePickerDate]",
35
+ ngImport: i0
36
+ });
37
+ };
38
+ i0.ɵɵngDeclareClassMetadata({
39
+ minVersion: "12.0.0",
40
+ version: "22.2.3",
41
+ ngImport: i0,
42
+ type: TxDatePickerDate,
43
+ decorators: [{
44
+ type: Directive,
45
+ args: [{ selector: "ng-template[txDatePickerDate]" }]
46
+ }]
47
+ });
48
+ var TxDatePickerHeader = class TxDatePickerHeader {
49
+ templateRef = inject(TemplateRef);
50
+ static ɵfac = i0.ɵɵngDeclareFactory({
51
+ minVersion: "12.0.0",
52
+ version: "22.2.3",
53
+ ngImport: i0,
54
+ type: TxDatePickerHeader,
55
+ deps: [],
56
+ target: i0.ɵɵFactoryTarget.Directive
57
+ });
58
+ static ɵdir = i0.ɵɵngDeclareDirective({
59
+ minVersion: "14.0.0",
60
+ version: "22.2.3",
61
+ type: TxDatePickerHeader,
62
+ isStandalone: true,
63
+ selector: "ng-template[txDatePickerHeader]",
64
+ ngImport: i0
65
+ });
66
+ };
67
+ i0.ɵɵngDeclareClassMetadata({
68
+ minVersion: "12.0.0",
69
+ version: "22.2.3",
70
+ ngImport: i0,
71
+ type: TxDatePickerHeader,
72
+ decorators: [{
73
+ type: Directive,
74
+ args: [{ selector: "ng-template[txDatePickerHeader]" }]
75
+ }]
76
+ });
77
+ var TxDatePickerFooter = class TxDatePickerFooter {
78
+ templateRef = inject(TemplateRef);
79
+ static ɵfac = i0.ɵɵngDeclareFactory({
80
+ minVersion: "12.0.0",
81
+ version: "22.2.3",
82
+ ngImport: i0,
83
+ type: TxDatePickerFooter,
84
+ deps: [],
85
+ target: i0.ɵɵFactoryTarget.Directive
86
+ });
87
+ static ɵdir = i0.ɵɵngDeclareDirective({
88
+ minVersion: "14.0.0",
89
+ version: "22.2.3",
90
+ type: TxDatePickerFooter,
91
+ isStandalone: true,
92
+ selector: "ng-template[txDatePickerFooter]",
93
+ ngImport: i0
94
+ });
95
+ };
96
+ i0.ɵɵngDeclareClassMetadata({
97
+ minVersion: "12.0.0",
98
+ version: "22.2.3",
99
+ ngImport: i0,
100
+ type: TxDatePickerFooter,
101
+ decorators: [{
102
+ type: Directive,
103
+ args: [{ selector: "ng-template[txDatePickerFooter]" }]
104
+ }]
105
+ });
106
+ var TxDatePickerDecade = class TxDatePickerDecade {
107
+ templateRef = inject(TemplateRef);
108
+ static ɵfac = i0.ɵɵngDeclareFactory({
109
+ minVersion: "12.0.0",
110
+ version: "22.2.3",
111
+ ngImport: i0,
112
+ type: TxDatePickerDecade,
113
+ deps: [],
114
+ target: i0.ɵɵFactoryTarget.Directive
115
+ });
116
+ static ɵdir = i0.ɵɵngDeclareDirective({
117
+ minVersion: "14.0.0",
118
+ version: "22.2.3",
119
+ type: TxDatePickerDecade,
120
+ isStandalone: true,
121
+ selector: "ng-template[txDatePickerDecade]",
122
+ ngImport: i0
123
+ });
124
+ };
125
+ i0.ɵɵngDeclareClassMetadata({
126
+ minVersion: "12.0.0",
127
+ version: "22.2.3",
128
+ ngImport: i0,
129
+ type: TxDatePickerDecade,
130
+ decorators: [{
131
+ type: Directive,
132
+ args: [{ selector: "ng-template[txDatePickerDecade]" }]
133
+ }]
134
+ });
135
+ var TxDatePickerButtonBar = class TxDatePickerButtonBar {
136
+ templateRef = inject(TemplateRef);
137
+ static ɵfac = i0.ɵɵngDeclareFactory({
138
+ minVersion: "12.0.0",
139
+ version: "22.2.3",
140
+ ngImport: i0,
141
+ type: TxDatePickerButtonBar,
142
+ deps: [],
143
+ target: i0.ɵɵFactoryTarget.Directive
144
+ });
145
+ static ɵdir = i0.ɵɵngDeclareDirective({
146
+ minVersion: "14.0.0",
147
+ version: "22.2.3",
148
+ type: TxDatePickerButtonBar,
149
+ isStandalone: true,
150
+ selector: "ng-template[txDatePickerButtonBar]",
151
+ ngImport: i0
152
+ });
153
+ };
154
+ i0.ɵɵngDeclareClassMetadata({
155
+ minVersion: "12.0.0",
156
+ version: "22.2.3",
157
+ ngImport: i0,
158
+ type: TxDatePickerButtonBar,
159
+ decorators: [{
160
+ type: Directive,
161
+ args: [{ selector: "ng-template[txDatePickerButtonBar]" }]
162
+ }]
163
+ });
164
+ var TxDatePickerTriggerIcon = class TxDatePickerTriggerIcon {
165
+ templateRef = inject(TemplateRef);
166
+ static ɵfac = i0.ɵɵngDeclareFactory({
167
+ minVersion: "12.0.0",
168
+ version: "22.2.3",
169
+ ngImport: i0,
170
+ type: TxDatePickerTriggerIcon,
171
+ deps: [],
172
+ target: i0.ɵɵFactoryTarget.Directive
173
+ });
174
+ static ɵdir = i0.ɵɵngDeclareDirective({
175
+ minVersion: "14.0.0",
176
+ version: "22.2.3",
177
+ type: TxDatePickerTriggerIcon,
178
+ isStandalone: true,
179
+ selector: "ng-template[txDatePickerTriggerIcon]",
180
+ ngImport: i0
181
+ });
182
+ };
183
+ i0.ɵɵngDeclareClassMetadata({
184
+ minVersion: "12.0.0",
185
+ version: "22.2.3",
186
+ ngImport: i0,
187
+ type: TxDatePickerTriggerIcon,
188
+ decorators: [{
189
+ type: Directive,
190
+ args: [{ selector: "ng-template[txDatePickerTriggerIcon]" }]
191
+ }]
192
+ });
193
+ var TxDatePickerInputIcon = class TxDatePickerInputIcon {
194
+ templateRef = inject(TemplateRef);
195
+ static ɵfac = i0.ɵɵngDeclareFactory({
196
+ minVersion: "12.0.0",
197
+ version: "22.2.3",
198
+ ngImport: i0,
199
+ type: TxDatePickerInputIcon,
200
+ deps: [],
201
+ target: i0.ɵɵFactoryTarget.Directive
202
+ });
203
+ static ɵdir = i0.ɵɵngDeclareDirective({
204
+ minVersion: "14.0.0",
205
+ version: "22.2.3",
206
+ type: TxDatePickerInputIcon,
207
+ isStandalone: true,
208
+ selector: "ng-template[txDatePickerInputIcon]",
209
+ ngImport: i0
210
+ });
211
+ };
212
+ i0.ɵɵngDeclareClassMetadata({
213
+ minVersion: "12.0.0",
214
+ version: "22.2.3",
215
+ ngImport: i0,
216
+ type: TxDatePickerInputIcon,
217
+ decorators: [{
218
+ type: Directive,
219
+ args: [{ selector: "ng-template[txDatePickerInputIcon]" }]
220
+ }]
221
+ });
222
+ function startOfDay(date) {
223
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate());
224
+ }
225
+ function sameDay(a, b) {
226
+ return !!a && !!b && a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
227
+ }
228
+ function compareDays(a, b) {
229
+ return startOfDay(a).getTime() - startOfDay(b).getTime();
230
+ }
231
+ function addDays(date, days) {
232
+ const next = new Date(date);
233
+ next.setDate(next.getDate() + days);
234
+ return next;
235
+ }
236
+ function addMonths(date, months) {
237
+ const next = new Date(date.getFullYear(), date.getMonth() + months, 1, date.getHours(), date.getMinutes(), date.getSeconds());
238
+ next.setDate(Math.min(date.getDate(), new Date(next.getFullYear(), next.getMonth() + 1, 0).getDate()));
239
+ return next;
240
+ }
241
+ function isSelectable(date, rules) {
242
+ if (rules.minDate && compareDays(date, rules.minDate) < 0) return false;
243
+ if (rules.maxDate && compareDays(date, rules.maxDate) > 0) return false;
244
+ if (rules.disabledDays?.includes(date.getDay())) return false;
245
+ if (rules.disabledDates?.some((disabled) => sameDay(disabled, date))) return false;
246
+ return true;
247
+ }
248
+ function isMonthSelectable(year, month, rules) {
249
+ const first = new Date(year, month, 1);
250
+ const last = new Date(year, month + 1, 0);
251
+ return !(rules.minDate && compareDays(last, rules.minDate) < 0) && !(rules.maxDate && compareDays(first, rules.maxDate) > 0);
252
+ }
253
+ function isYearSelectable(year, rules) {
254
+ return !(rules.minDate && year < rules.minDate.getFullYear()) && !(rules.maxDate && year > rules.maxDate.getFullYear());
255
+ }
256
+ function weekNumber(date, fromFirstDayOfYear = false) {
257
+ if (fromFirstDayOfYear) {
258
+ const start = new Date(date.getFullYear(), 0, 1);
259
+ return Math.floor((compareDays(date, start) / 864e5 + start.getDay()) / 7) + 1;
260
+ }
261
+ const thursday = new Date(date.getFullYear(), date.getMonth(), date.getDate() + 3 - (date.getDay() + 6) % 7);
262
+ const firstThursday = new Date(thursday.getFullYear(), 0, 4);
263
+ return 1 + Math.round((compareDays(thursday, firstThursday) / 864e5 - 3 + (firstThursday.getDay() + 6) % 7) / 7);
264
+ }
265
+ function buildMonth(year, month, firstDayOfWeek, rules, today, fromFirstDayOfYear = false) {
266
+ const offset = (new Date(year, month, 1).getDay() - firstDayOfWeek + 7) % 7;
267
+ const daysInMonth = new Date(year, month + 1, 0).getDate();
268
+ const count = Math.ceil((offset + daysInMonth) / 7);
269
+ const weeks = [];
270
+ for (let week = 0; week < count; week++) {
271
+ const days = [];
272
+ for (let column = 0; column < 7; column++) {
273
+ const date = new Date(year, month, 1 - offset + week * 7 + column);
274
+ days.push({
275
+ date,
276
+ day: date.getDate(),
277
+ month: date.getMonth(),
278
+ year: date.getFullYear(),
279
+ otherMonth: date.getMonth() !== month,
280
+ today: sameDay(date, today),
281
+ selectable: isSelectable(date, rules)
282
+ });
283
+ }
284
+ const thursdayIndex = days.findIndex((day) => day.date.getDay() === 4);
285
+ weeks.push({
286
+ number: weekNumber(days[thursdayIndex >= 0 ? thursdayIndex : 0].date, fromFirstDayOfYear),
287
+ days
288
+ });
289
+ }
290
+ return {
291
+ month,
292
+ year,
293
+ weeks
294
+ };
295
+ }
296
+ function weekdayOrder(firstDayOfWeek) {
297
+ return Array.from({ length: 7 }, (_, index) => (firstDayOfWeek + index) % 7);
298
+ }
299
+ const TICKS_TO_UNIX_EPOCH = 0x89f7ff5f7b58000;
300
+ function dateNames(locale) {
301
+ const day = (style) => Array.from({ length: 7 }, (_, index) => new Intl.DateTimeFormat(locale, { weekday: style }).format(new Date(2024, 0, 7 + index)));
302
+ const month = (style) => Array.from({ length: 12 }, (_, index) => new Intl.DateTimeFormat(locale, { month: style }).format(new Date(2024, index, 1)));
303
+ return {
304
+ dayNames: day("long"),
305
+ dayNamesShort: day("short"),
306
+ monthNames: month("long"),
307
+ monthNamesShort: month("short")
308
+ };
309
+ }
310
+ function dayOfYear(date) {
311
+ return Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 864e5);
312
+ }
313
+ function formatDate(date, format, names) {
314
+ if (!date || Number.isNaN(date.getTime())) return "";
315
+ let output = "";
316
+ let literal = false;
317
+ let index = 0;
318
+ const repeated = (char) => {
319
+ const matches = index + 1 < format.length && format.charAt(index + 1) === char;
320
+ if (matches) index++;
321
+ return matches;
322
+ };
323
+ const number = (char, value, size) => {
324
+ let text = String(value);
325
+ if (repeated(char)) while (text.length < size) text = `0${text}`;
326
+ return text;
327
+ };
328
+ const name = (char, value, short, long) => repeated(char) ? long[value] : short[value];
329
+ for (; index < format.length; index++) {
330
+ const char = format.charAt(index);
331
+ if (literal) {
332
+ if (char === "'" && !repeated("'")) literal = false;
333
+ else output += char;
334
+ continue;
335
+ }
336
+ switch (char) {
337
+ case "d":
338
+ output += number("d", date.getDate(), 2);
339
+ break;
340
+ case "D":
341
+ output += name("D", date.getDay(), names.dayNamesShort, names.dayNames);
342
+ break;
343
+ case "o":
344
+ output += number("o", dayOfYear(date), 3);
345
+ break;
346
+ case "m":
347
+ output += number("m", date.getMonth() + 1, 2);
348
+ break;
349
+ case "M":
350
+ output += name("M", date.getMonth(), names.monthNamesShort, names.monthNames);
351
+ break;
352
+ case "y":
353
+ output += repeated("y") ? date.getFullYear() : String(date.getFullYear() % 100).padStart(2, "0");
354
+ break;
355
+ case "@":
356
+ output += date.getTime();
357
+ break;
358
+ case "!":
359
+ output += date.getTime() * 1e4 + TICKS_TO_UNIX_EPOCH;
360
+ break;
361
+ case "'":
362
+ if (repeated("'")) output += "'";
363
+ else literal = true;
364
+ break;
365
+ default: output += char;
366
+ }
367
+ }
368
+ return output;
369
+ }
370
+ function formatTime(date, format) {
371
+ if (!date || Number.isNaN(date.getTime())) return "";
372
+ const pad = (value) => String(value).padStart(2, "0");
373
+ let hours = date.getHours();
374
+ let suffix = "";
375
+ if (format.hourFormat === "12") {
376
+ suffix = ` ${hours >= 12 ? format.pm : format.am}`;
377
+ hours = hours % 12 || 12;
378
+ }
379
+ const seconds = format.showSeconds ? `${format.separator}${pad(date.getSeconds())}` : "";
380
+ return `${pad(hours)}${format.separator}${pad(date.getMinutes())}${seconds}${suffix}`;
381
+ }
382
+ function resolveCutoff(cutoff, now = /* @__PURE__ */ new Date()) {
383
+ return typeof cutoff === "string" && cutoff.startsWith("+") ? now.getFullYear() % 100 + parseInt(cutoff.slice(1), 10) : Number(cutoff);
384
+ }
385
+ function parseDate(text, format, names, shortYearCutoff = "+10", now = /* @__PURE__ */ new Date()) {
386
+ const value = text.trim();
387
+ if (!value) return null;
388
+ let position = 0;
389
+ let year = -1;
390
+ let month = -1;
391
+ let day = -1;
392
+ let doy = -1;
393
+ let literal = false;
394
+ let index = 0;
395
+ const repeated = (char) => {
396
+ const matches = index + 1 < format.length && format.charAt(index + 1) === char;
397
+ if (matches) index++;
398
+ return matches;
399
+ };
400
+ const number = (char) => {
401
+ const twice = repeated(char);
402
+ const size = char === "@" ? 14 : char === "!" ? 20 : char === "y" && twice ? 4 : char === "o" ? 3 : 2;
403
+ const match = new RegExp(`^\\d{${char === "y" ? size : 1},${size}}`).exec(value.slice(position));
404
+ if (!match) throw new Error("number");
405
+ position += match[0].length;
406
+ return parseInt(match[0], 10);
407
+ };
408
+ const name = (char, short, long) => {
409
+ const list = (repeated(char) ? long : short).map((entry, entryIndex) => [entryIndex, entry]).sort((a, b) => b[1].length - a[1].length);
410
+ const rest = value.slice(position).toLowerCase();
411
+ for (const [entryIndex, entry] of list) if (rest.startsWith(entry.toLowerCase())) {
412
+ position += entry.length;
413
+ return entryIndex + 1;
414
+ }
415
+ throw new Error("name");
416
+ };
417
+ const literalChar = (char) => {
418
+ if (value.charAt(position) !== char) throw new Error("literal");
419
+ position++;
420
+ };
421
+ try {
422
+ for (; index < format.length; index++) {
423
+ const char = format.charAt(index);
424
+ if (literal) {
425
+ if (char === "'" && !repeated("'")) literal = false;
426
+ else literalChar(char);
427
+ continue;
428
+ }
429
+ switch (char) {
430
+ case "d":
431
+ day = number("d");
432
+ break;
433
+ case "D":
434
+ name("D", names.dayNamesShort, names.dayNames);
435
+ break;
436
+ case "o":
437
+ doy = number("o");
438
+ break;
439
+ case "m":
440
+ month = number("m");
441
+ break;
442
+ case "M":
443
+ month = name("M", names.monthNamesShort, names.monthNames);
444
+ break;
445
+ case "y":
446
+ year = number("y");
447
+ break;
448
+ case "@": {
449
+ const date = new Date(number("@"));
450
+ year = date.getFullYear();
451
+ month = date.getMonth() + 1;
452
+ day = date.getDate();
453
+ break;
454
+ }
455
+ case "!": {
456
+ const date = /* @__PURE__ */ new Date((number("!") - TICKS_TO_UNIX_EPOCH) / 1e4);
457
+ year = date.getFullYear();
458
+ month = date.getMonth() + 1;
459
+ day = date.getDate();
460
+ break;
461
+ }
462
+ case "'":
463
+ if (repeated("'")) literalChar("'");
464
+ else literal = true;
465
+ break;
466
+ default: literalChar(char);
467
+ }
468
+ }
469
+ } catch {
470
+ return null;
471
+ }
472
+ if (position < value.length) return null;
473
+ if (year === -1) year = now.getFullYear();
474
+ else if (year < 100) year += now.getFullYear() - now.getFullYear() % 100 + (year <= resolveCutoff(shortYearCutoff, now) ? 0 : -100);
475
+ if (doy > -1) {
476
+ month = 1;
477
+ day = doy;
478
+ for (;;) {
479
+ const days = new Date(year, month, 0).getDate();
480
+ if (day <= days) break;
481
+ month++;
482
+ day -= days;
483
+ }
484
+ }
485
+ if (month < 1 || day < 1) return null;
486
+ const date = new Date(year, month - 1, day);
487
+ return date.getFullYear() === year && date.getMonth() === month - 1 && date.getDate() === day ? date : null;
488
+ }
489
+ function parseTime(text, format) {
490
+ const value = text.trim();
491
+ const twelve = format.hourFormat === "12";
492
+ const match = new RegExp(`^(\\d{1,2})${escapeRegExp(format.separator)}(\\d{1,2})(?:${escapeRegExp(format.separator)}(\\d{1,2}))?\\s*(${escapeRegExp(format.am)}|${escapeRegExp(format.pm)})?$`, "i").exec(value);
493
+ if (!match) return null;
494
+ let hours = Number(match[1]);
495
+ const minutes = Number(match[2]);
496
+ const seconds = Number(match[3] ?? 0);
497
+ const period = match[4]?.toLowerCase();
498
+ if (twelve) {
499
+ if (hours < 1 || hours > 12 || !period) return null;
500
+ hours = hours % 12 + (period === format.pm.toLowerCase() ? 12 : 0);
501
+ } else if (hours > 23 || period) return null;
502
+ if (minutes > 59 || seconds > 59) return null;
503
+ return {
504
+ hours,
505
+ minutes,
506
+ seconds
507
+ };
508
+ }
509
+ function escapeRegExp(text) {
510
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
511
+ }
512
+ const REPEAT_DELAY = 400;
513
+ const REPEAT_INTERVAL = 80;
514
+ function isoDay(date) {
515
+ return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
516
+ }
517
+ var TxDatePicker = class TxDatePicker extends TxFormControlBase {
518
+ selectionMode = input("single", ...ngDevMode ? [{ debugName: "selectionMode" }] : /* istanbul ignore next */ []);
519
+ dateFormat = input(void 0, ...ngDevMode ? [{ debugName: "dateFormat" }] : /* istanbul ignore next */ []);
520
+ placeholder = input(void 0, ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
521
+ inputId = input(void 0, ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
522
+ name = input(void 0, ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
523
+ ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
524
+ ariaLabelledBy = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
525
+ iconAriaLabel = input(void 0, ...ngDevMode ? [{ debugName: "iconAriaLabel" }] : /* istanbul ignore next */ []);
526
+ inline = input(false, {
527
+ ...ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {},
528
+ transform: booleanAttribute
529
+ });
530
+ showIcon = input(false, {
531
+ ...ngDevMode ? { debugName: "showIcon" } : /* istanbul ignore next */ {},
532
+ transform: booleanAttribute
533
+ });
534
+ iconDisplay = input("button", ...ngDevMode ? [{ debugName: "iconDisplay" }] : /* istanbul ignore next */ []);
535
+ icon = input("calendar", ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
536
+ showClear = input(false, {
537
+ ...ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {},
538
+ transform: booleanAttribute
539
+ });
540
+ showButtonBar = input(false, {
541
+ ...ngDevMode ? { debugName: "showButtonBar" } : /* istanbul ignore next */ {},
542
+ transform: booleanAttribute
543
+ });
544
+ showOtherMonths = input(true, {
545
+ ...ngDevMode ? { debugName: "showOtherMonths" } : /* istanbul ignore next */ {},
546
+ transform: booleanAttribute
547
+ });
548
+ selectOtherMonths = input(true, {
549
+ ...ngDevMode ? { debugName: "selectOtherMonths" } : /* istanbul ignore next */ {},
550
+ transform: booleanAttribute
551
+ });
552
+ showWeek = input(false, {
553
+ ...ngDevMode ? { debugName: "showWeek" } : /* istanbul ignore next */ {},
554
+ transform: booleanAttribute
555
+ });
556
+ startWeekFromFirstDayOfYear = input(false, {
557
+ ...ngDevMode ? { debugName: "startWeekFromFirstDayOfYear" } : /* istanbul ignore next */ {},
558
+ transform: booleanAttribute
559
+ });
560
+ showTime = input(false, {
561
+ ...ngDevMode ? { debugName: "showTime" } : /* istanbul ignore next */ {},
562
+ transform: booleanAttribute
563
+ });
564
+ timeOnly = input(false, {
565
+ ...ngDevMode ? { debugName: "timeOnly" } : /* istanbul ignore next */ {},
566
+ transform: booleanAttribute
567
+ });
568
+ hourFormat = input("24", ...ngDevMode ? [{ debugName: "hourFormat" }] : /* istanbul ignore next */ []);
569
+ showSeconds = input(false, {
570
+ ...ngDevMode ? { debugName: "showSeconds" } : /* istanbul ignore next */ {},
571
+ transform: booleanAttribute
572
+ });
573
+ stepHour = input(1, {
574
+ ...ngDevMode ? { debugName: "stepHour" } : /* istanbul ignore next */ {},
575
+ transform: numberAttribute
576
+ });
577
+ stepMinute = input(1, {
578
+ ...ngDevMode ? { debugName: "stepMinute" } : /* istanbul ignore next */ {},
579
+ transform: numberAttribute
580
+ });
581
+ stepSecond = input(1, {
582
+ ...ngDevMode ? { debugName: "stepSecond" } : /* istanbul ignore next */ {},
583
+ transform: numberAttribute
584
+ });
585
+ timeSeparator = input(":", ...ngDevMode ? [{ debugName: "timeSeparator" }] : /* istanbul ignore next */ []);
586
+ view = input("date", ...ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []);
587
+ numberOfMonths = input(1, {
588
+ ...ngDevMode ? { debugName: "numberOfMonths" } : /* istanbul ignore next */ {},
589
+ transform: numberAttribute
590
+ });
591
+ responsiveOptions = input(void 0, ...ngDevMode ? [{ debugName: "responsiveOptions" }] : /* istanbul ignore next */ []);
592
+ firstDayOfWeek = input(void 0, ...ngDevMode ? [{ debugName: "firstDayOfWeek" }] : /* istanbul ignore next */ []);
593
+ minDate = input(void 0, ...ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []);
594
+ maxDate = input(void 0, ...ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []);
595
+ disabledDates = input(void 0, ...ngDevMode ? [{ debugName: "disabledDates" }] : /* istanbul ignore next */ []);
596
+ disabledDays = input(void 0, ...ngDevMode ? [{ debugName: "disabledDays" }] : /* istanbul ignore next */ []);
597
+ maxDateCount = input(void 0, ...ngDevMode ? [{ debugName: "maxDateCount" }] : /* istanbul ignore next */ []);
598
+ defaultDate = input(void 0, ...ngDevMode ? [{ debugName: "defaultDate" }] : /* istanbul ignore next */ []);
599
+ readonlyInput = input(false, {
600
+ ...ngDevMode ? { debugName: "readonlyInput" } : /* istanbul ignore next */ {},
601
+ transform: booleanAttribute
602
+ });
603
+ keepInvalid = input(false, {
604
+ ...ngDevMode ? { debugName: "keepInvalid" } : /* istanbul ignore next */ {},
605
+ transform: booleanAttribute
606
+ });
607
+ hideOnDateTimeSelect = input(true, {
608
+ ...ngDevMode ? { debugName: "hideOnDateTimeSelect" } : /* istanbul ignore next */ {},
609
+ transform: booleanAttribute
610
+ });
611
+ showOnFocus = input(true, {
612
+ ...ngDevMode ? { debugName: "showOnFocus" } : /* istanbul ignore next */ {},
613
+ transform: booleanAttribute
614
+ });
615
+ touchUI = input(false, {
616
+ ...ngDevMode ? { debugName: "touchUI" } : /* istanbul ignore next */ {},
617
+ transform: booleanAttribute
618
+ });
619
+ dataType = input("date", ...ngDevMode ? [{ debugName: "dataType" }] : /* istanbul ignore next */ []);
620
+ multipleSeparator = input(",", ...ngDevMode ? [{ debugName: "multipleSeparator" }] : /* istanbul ignore next */ []);
621
+ rangeSeparator = input("-", ...ngDevMode ? [{ debugName: "rangeSeparator" }] : /* istanbul ignore next */ []);
622
+ shortYearCutoff = input("+10", ...ngDevMode ? [{ debugName: "shortYearCutoff" }] : /* istanbul ignore next */ []);
623
+ size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
624
+ variant = input("outlined", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
625
+ fluid = input(void 0, {
626
+ ...ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {},
627
+ transform: optionalBoolean
628
+ });
629
+ invalid = input(void 0, {
630
+ ...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
631
+ transform: optionalBoolean
632
+ });
633
+ disabledInput = input(false, {
634
+ ...ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {},
635
+ alias: "disabled",
636
+ transform: booleanAttribute
637
+ });
638
+ readonly = input(false, {
639
+ ...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
640
+ transform: booleanAttribute
641
+ });
642
+ required = input(false, {
643
+ ...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
644
+ transform: booleanAttribute
645
+ });
646
+ dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
647
+ pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
648
+ ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
649
+ unstyled = input(void 0, {
650
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
651
+ transform: optionalBoolean
652
+ });
653
+ selected = output();
654
+ cleared = output();
655
+ todayClicked = output();
656
+ clearClicked = output();
657
+ monthChange = output();
658
+ yearChange = output();
659
+ opened = output();
660
+ closed = output();
661
+ focused = output();
662
+ blurred = output();
663
+ typed = output();
664
+ dateTemplate = contentChild(TxDatePickerDate, ...ngDevMode ? [{ debugName: "dateTemplate" }] : /* istanbul ignore next */ []);
665
+ headerTemplate = contentChild(TxDatePickerHeader, ...ngDevMode ? [{ debugName: "headerTemplate" }] : /* istanbul ignore next */ []);
666
+ footerTemplate = contentChild(TxDatePickerFooter, ...ngDevMode ? [{ debugName: "footerTemplate" }] : /* istanbul ignore next */ []);
667
+ decadeTemplate = contentChild(TxDatePickerDecade, ...ngDevMode ? [{ debugName: "decadeTemplate" }] : /* istanbul ignore next */ []);
668
+ buttonBarTemplate = contentChild(TxDatePickerButtonBar, ...ngDevMode ? [{ debugName: "buttonBarTemplate" }] : /* istanbul ignore next */ []);
669
+ triggerIconTemplate = contentChild(TxDatePickerTriggerIcon, ...ngDevMode ? [{ debugName: "triggerIconTemplate" }] : /* istanbul ignore next */ []);
670
+ inputIconTemplate = contentChild(TxDatePickerInputIcon, ...ngDevMode ? [{ debugName: "inputIconTemplate" }] : /* istanbul ignore next */ []);
671
+ inputRef = viewChild("input", ...ngDevMode ? [{ debugName: "inputRef" }] : /* istanbul ignore next */ []);
672
+ fieldRef = viewChild("field", ...ngDevMode ? [{ debugName: "fieldRef" }] : /* istanbul ignore next */ []);
673
+ panelRef = viewChild("panel", ...ngDevMode ? [{ debugName: "panelRef" }] : /* istanbul ignore next */ []);
674
+ panelTemplate = viewChild.required("panelTemplate", ...ngDevMode ? [{ debugName: "panelTemplate" }] : /* istanbul ignore next */ []);
675
+ connectedOverlay = viewChild(CdkConnectedOverlay, ...ngDevMode ? [{ debugName: "connectedOverlay" }] : /* istanbul ignore next */ []);
676
+ document = inject(DOCUMENT);
677
+ injector = inject(Injector);
678
+ overlay = inject(Overlay);
679
+ viewContainer = inject(ViewContainerRef);
680
+ overlayInsets = inject(TxOverlayInsets);
681
+ announcer = inject(TxAnnouncer);
682
+ localeService = inject(TxLocaleService);
683
+ touchRef = null;
684
+ repeatTimer = null;
685
+ hasEntered = false;
686
+ focusPanelOnOpen = false;
687
+ restoringFocus = false;
688
+ translations = injectTranslations();
689
+ isUnstyled = injectUnstyled(this.unstyled);
690
+ isFluid = injectFluid(this.fluid);
691
+ isInvalid = injectFieldInvalid(this.invalid);
692
+ passThrough = injectPassThrough("datePicker", this, this.pt, this.ptOptions);
693
+ positions = txPositions("bottom-start", 4);
694
+ scrollStrategy = txScrollStrategy(this.injector);
695
+ panelId = uniqueId("tx-datepicker");
696
+ generatedInputId = `${this.panelId}-input`;
697
+ isOpen = signal(false, ...ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []);
698
+ isPanelMounted = signal(false, ...ngDevMode ? [{ debugName: "isPanelMounted" }] : /* istanbul ignore next */ []);
699
+ placement = signal("bottom-start", ...ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []);
700
+ draft = signal(null, ...ngDevMode ? [{ debugName: "draft" }] : /* istanbul ignore next */ []);
701
+ viewMonth = signal((/* @__PURE__ */ new Date()).getMonth(), ...ngDevMode ? [{ debugName: "viewMonth" }] : /* istanbul ignore next */ []);
702
+ viewYear = signal((/* @__PURE__ */ new Date()).getFullYear(), ...ngDevMode ? [{ debugName: "viewYear" }] : /* istanbul ignore next */ []);
703
+ currentView = signal("date", ...ngDevMode ? [{ debugName: "currentView" }] : /* istanbul ignore next */ []);
704
+ focusedDate = signal(startOfDay(/* @__PURE__ */ new Date()), ...ngDevMode ? [{ debugName: "focusedDate" }] : /* istanbul ignore next */ []);
705
+ focusedMonth = signal(0, ...ngDevMode ? [{ debugName: "focusedMonth" }] : /* istanbul ignore next */ []);
706
+ focusedYear = signal((/* @__PURE__ */ new Date()).getFullYear(), ...ngDevMode ? [{ debugName: "focusedYear" }] : /* istanbul ignore next */ []);
707
+ pendingTime = signal(null, ...ngDevMode ? [{ debugName: "pendingTime" }] : /* istanbul ignore next */ []);
708
+ previewDate = signal(null, ...ngDevMode ? [{ debugName: "previewDate" }] : /* istanbul ignore next */ []);
709
+ panelMinWidth = signal(0, ...ngDevMode ? [{ debugName: "panelMinWidth" }] : /* istanbul ignore next */ []);
710
+ matchedMonths = signal(null, ...ngDevMode ? [{ debugName: "matchedMonths" }] : /* istanbul ignore next */ []);
711
+ isDisabled = computed(() => this.disabled() || this.disabledInput(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
712
+ isEditable = computed(() => !this.isDisabled() && !this.readonly(), ...ngDevMode ? [{ debugName: "isEditable" }] : /* istanbul ignore next */ []);
713
+ resolvedInputId = computed(() => this.inputId() ?? this.generatedInputId, ...ngDevMode ? [{ debugName: "resolvedInputId" }] : /* istanbul ignore next */ []);
714
+ hasTime = computed(() => this.showTime() || this.timeOnly(), ...ngDevMode ? [{ debugName: "hasTime" }] : /* istanbul ignore next */ []);
715
+ locale = computed(() => this.localeService.locale().intl, ...ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []);
716
+ names = computed(() => dateNames(this.locale()), ...ngDevMode ? [{ debugName: "names" }] : /* istanbul ignore next */ []);
717
+ resolvedFormat = computed(() => this.dateFormat() ?? this.localeService.locale().dateFormat ?? "mm/dd/yy", ...ngDevMode ? [{ debugName: "resolvedFormat" }] : /* istanbul ignore next */ []);
718
+ resolvedFirstDay = computed(() => this.firstDayOfWeek() ?? this.localeService.locale().firstDayOfWeek, ...ngDevMode ? [{ debugName: "resolvedFirstDay" }] : /* istanbul ignore next */ []);
719
+ timeFormat = computed(() => ({
720
+ hourFormat: this.hourFormat(),
721
+ showSeconds: this.showSeconds(),
722
+ separator: this.timeSeparator(),
723
+ am: this.translations().am,
724
+ pm: this.translations().pm
725
+ }), ...ngDevMode ? [{ debugName: "timeFormat" }] : /* istanbul ignore next */ []);
726
+ rules = computed(() => ({
727
+ minDate: this.minDate(),
728
+ maxDate: this.maxDate(),
729
+ disabledDates: this.disabledDates(),
730
+ disabledDays: this.disabledDays()
731
+ }), ...ngDevMode ? [{ debugName: "rules" }] : /* istanbul ignore next */ []);
732
+ dates = computed(() => this.normalize(this.value()), ...ngDevMode ? [{ debugName: "dates" }] : /* istanbul ignore next */ []);
733
+ inputText = computed(() => this.draft() ?? this.formatValue(this.dates()), ...ngDevMode ? [{ debugName: "inputText" }] : /* istanbul ignore next */ []);
734
+ isFilled = computed(() => !!this.inputText(), ...ngDevMode ? [{ debugName: "isFilled" }] : /* istanbul ignore next */ []);
735
+ canClear = computed(() => this.showClear() && this.isEditable() && this.dates().some(Boolean) && !this.inline(), ...ngDevMode ? [{ debugName: "canClear" }] : /* istanbul ignore next */ []);
736
+ monthCount = computed(() => this.timeOnly() ? 1 : this.matchedMonths() ?? Math.max(1, this.numberOfMonths()), ...ngDevMode ? [{ debugName: "monthCount" }] : /* istanbul ignore next */ []);
737
+ weekdays = computed(() => {
738
+ const names = this.names();
739
+ return weekdayOrder(this.resolvedFirstDay()).map((day) => ({
740
+ short: names.dayNamesShort[day].slice(0, 2),
741
+ long: names.dayNames[day]
742
+ }));
743
+ }, ...ngDevMode ? [{ debugName: "weekdays" }] : /* istanbul ignore next */ []);
744
+ today = computed(() => startOfDay(/* @__PURE__ */ new Date()), ...ngDevMode ? [{ debugName: "today" }] : /* istanbul ignore next */ []);
745
+ months = computed(() => Array.from({ length: this.monthCount() }, (_, index) => {
746
+ const first = new Date(this.viewYear(), this.viewMonth() + index, 1);
747
+ return buildMonth(first.getFullYear(), first.getMonth(), this.resolvedFirstDay(), this.rules(), this.today(), this.startWeekFromFirstDayOfYear());
748
+ }), ...ngDevMode ? [{ debugName: "months" }] : /* istanbul ignore next */ []);
749
+ decade = computed(() => {
750
+ const start = this.viewYear() - this.viewYear() % 10;
751
+ return Array.from({ length: 10 }, (_, index) => start + index);
752
+ }, ...ngDevMode ? [{ debugName: "decade" }] : /* istanbul ignore next */ []);
753
+ timeSource = computed(() => this.pendingTime() ?? this.lastDate() ?? this.defaultDate() ?? null, ...ngDevMode ? [{ debugName: "timeSource" }] : /* istanbul ignore next */ []);
754
+ hours = computed(() => {
755
+ const hours = this.timeSource()?.getHours() ?? 0;
756
+ return this.hourFormat() === "12" ? hours % 12 || 12 : hours;
757
+ }, ...ngDevMode ? [{ debugName: "hours" }] : /* istanbul ignore next */ []);
758
+ minutes = computed(() => this.timeSource()?.getMinutes() ?? 0, ...ngDevMode ? [{ debugName: "minutes" }] : /* istanbul ignore next */ []);
759
+ seconds = computed(() => this.timeSource()?.getSeconds() ?? 0, ...ngDevMode ? [{ debugName: "seconds" }] : /* istanbul ignore next */ []);
760
+ isPm = computed(() => (this.timeSource()?.getHours() ?? 0) >= 12, ...ngDevMode ? [{ debugName: "isPm" }] : /* istanbul ignore next */ []);
761
+ hostStyle = computed(() => ({
762
+ ...toStyleObject(this.dt(), "--tx-date-picker"),
763
+ ...this.passThrough().root?.style
764
+ }), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
765
+ panelStyle = computed(() => ({
766
+ ...toStyleObject(this.dt(), "--tx-date-picker"),
767
+ ...this.passThrough().panel?.style
768
+ }), ...ngDevMode ? [{ debugName: "panelStyle" }] : /* istanbul ignore next */ []);
769
+ showPanel = computed(() => this.inline() || this.isPanelMounted(), ...ngDevMode ? [{ debugName: "showPanel" }] : /* istanbul ignore next */ []);
770
+ syncView = effect(() => this.currentView.set(this.view()), ...ngDevMode ? [{ debugName: "syncView" }] : /* istanbul ignore next */ []);
771
+ syncDefault = effect(() => {
772
+ const base = this.defaultDate();
773
+ if (base && !untracked(() => this.dates().length)) this.showMonthOf(base);
774
+ }, ...ngDevMode ? [{ debugName: "syncDefault" }] : /* istanbul ignore next */ []);
775
+ followOrigin = effect((onCleanup) => {
776
+ const field = this.fieldRef()?.nativeElement;
777
+ if (!this.isOpen() || this.touchUI() || !field) return;
778
+ onCleanup(watchOrigin(field, this.overlayInsets, {
779
+ insetsChange: () => this.connectedOverlay()?.overlayRef?.updatePosition(),
780
+ containerScroll: () => this.close(false)
781
+ }));
782
+ }, ...ngDevMode ? [{ debugName: "followOrigin" }] : /* istanbul ignore next */ []);
783
+ responsive = effect((onCleanup) => {
784
+ const options = [...this.responsiveOptions() ?? []].sort((a, b) => parseFloat(b.breakpoint) - parseFloat(a.breakpoint));
785
+ const view = this.document.defaultView;
786
+ if (!options.length || !view?.matchMedia) {
787
+ this.matchedMonths.set(null);
788
+ return;
789
+ }
790
+ const queries = options.map((option) => ({
791
+ option,
792
+ query: view.matchMedia(`(max-width: ${option.breakpoint})`)
793
+ }));
794
+ const update = () => this.matchedMonths.set([...queries].reverse().find(({ query }) => query.matches)?.option.numberOfMonths ?? null);
795
+ update();
796
+ queries.forEach(({ query }) => query.addEventListener?.("change", update));
797
+ onCleanup(() => queries.forEach(({ query }) => query.removeEventListener?.("change", update)));
798
+ }, ...ngDevMode ? [{ debugName: "responsive" }] : /* istanbul ignore next */ []);
799
+ cleanup = inject(DestroyRef).onDestroy(() => {
800
+ this.stopRepeat();
801
+ this.touchRef?.dispose();
802
+ });
803
+ writeValue(value) {
804
+ super.writeValue(value);
805
+ this.draft.set(null);
806
+ this.pendingTime.set(null);
807
+ const first = this.dates().find((date) => !!date) ?? this.defaultDate();
808
+ if (first) this.showMonthOf(first);
809
+ }
810
+ showMonthOf(date) {
811
+ this.viewMonth.set(date.getMonth());
812
+ this.viewYear.set(date.getFullYear());
813
+ this.focusedDate.set(startOfDay(date));
814
+ }
815
+ open(focusPanel = false) {
816
+ if (this.inline() || this.isOpen() || !this.isEditable()) return;
817
+ this.focusPanelOnOpen = focusPanel;
818
+ this.resetFocus();
819
+ this.isOpen.set(true);
820
+ this.hasEntered = false;
821
+ this.panelMinWidth.set(this.fieldRef()?.nativeElement.offsetWidth ?? 0);
822
+ if (this.touchUI()) this.openTouch();
823
+ else this.isPanelMounted.set(true);
824
+ this.opened.emit();
825
+ }
826
+ close(focusInput = true) {
827
+ if (!this.isOpen()) return;
828
+ this.isOpen.set(false);
829
+ this.previewDate.set(null);
830
+ this.stopRepeat();
831
+ this.markTouched();
832
+ this.closed.emit();
833
+ if (this.draft() !== null) this.commitDraft();
834
+ if (focusInput) this.focusInput();
835
+ const panel = this.panelRef()?.nativeElement;
836
+ (panel ? txAnimateLeave(panel, this.placement()) : Promise.resolve()).then(() => {
837
+ if (this.isOpen()) return;
838
+ this.isPanelMounted.set(false);
839
+ this.touchRef?.detach();
840
+ this.touchRef?.dispose();
841
+ this.touchRef = null;
842
+ });
843
+ }
844
+ toggle(focusPanel = true) {
845
+ if (this.isOpen()) this.close();
846
+ else this.open(focusPanel);
847
+ }
848
+ onAttach() {
849
+ if (this.focusPanelOnOpen) this.focusActive();
850
+ }
851
+ onPositionChange(change) {
852
+ this.placement.set(placementFromPosition(change.connectionPair) ?? "bottom-start");
853
+ const panel = this.panelRef()?.nativeElement;
854
+ if (!this.hasEntered && panel) {
855
+ this.hasEntered = true;
856
+ txAnimateEnter(panel, this.placement());
857
+ }
858
+ }
859
+ onOutsideClick(event) {
860
+ if (!this.fieldRef()?.nativeElement.contains(event.target)) this.close(false);
861
+ }
862
+ onInputFocus(event) {
863
+ this.focused.emit(event);
864
+ if (this.showOnFocus() && !this.isOpen() && !this.restoringFocus) this.open(false);
865
+ }
866
+ focusInput() {
867
+ this.restoringFocus = true;
868
+ this.inputRef()?.nativeElement.focus();
869
+ this.restoringFocus = false;
870
+ }
871
+ onInputClick() {
872
+ if (this.showOnFocus() && !this.isOpen()) this.open(false);
873
+ }
874
+ onInputBlur(event) {
875
+ this.blurred.emit(event);
876
+ const next = event.relatedTarget;
877
+ if (!(!!next && !!this.panelRef()?.nativeElement.contains(next))) {
878
+ this.commitDraft();
879
+ if (this.isOpen() && !this.touchUI() && !this.fieldRef()?.nativeElement.contains(next)) this.close(false);
880
+ this.markTouched();
881
+ }
882
+ }
883
+ onInput(event) {
884
+ const text = event.target.value;
885
+ this.draft.set(text);
886
+ this.typed.emit(text);
887
+ if (!text.trim()) {
888
+ this.setDates([], false);
889
+ return;
890
+ }
891
+ const parsed = this.parseValue(text);
892
+ if (parsed) {
893
+ this.setDates(parsed, false);
894
+ const first = parsed.find((date) => !!date);
895
+ if (first) {
896
+ this.viewMonth.set(first.getMonth());
897
+ this.viewYear.set(first.getFullYear());
898
+ }
899
+ }
900
+ }
901
+ onInputKeydown(event) {
902
+ if (event.key === "ArrowDown" && (event.altKey || !this.isOpen())) {
903
+ event.preventDefault();
904
+ if (this.isOpen()) this.focusActive();
905
+ else this.open(true);
906
+ } else if (event.key === "ArrowDown" && this.isOpen()) {
907
+ event.preventDefault();
908
+ this.focusActive();
909
+ } else if (event.key === "Escape" && this.isOpen()) {
910
+ event.preventDefault();
911
+ this.close();
912
+ } else if (event.key === "Enter") {
913
+ this.commitDraft();
914
+ if (this.isOpen()) this.close();
915
+ } else if (event.key === "Tab" && this.isOpen() && !this.touchUI()) {
916
+ this.commitDraft();
917
+ this.close(false);
918
+ }
919
+ }
920
+ onPanelKeydown(event) {
921
+ if (event.key === "Escape" && !this.inline()) {
922
+ event.preventDefault();
923
+ event.stopPropagation();
924
+ this.close();
925
+ }
926
+ }
927
+ onPanelFocusOut(event) {
928
+ const next = event.relatedTarget;
929
+ if (this.isOpen() && !this.touchUI() && next && !this.panelRef()?.nativeElement.contains(next) && !this.fieldRef()?.nativeElement.contains(next)) this.close(false);
930
+ }
931
+ previous() {
932
+ this.step(-1);
933
+ }
934
+ next() {
935
+ this.step(1);
936
+ }
937
+ showMonthView() {
938
+ this.focusedMonth.set(this.viewMonth());
939
+ this.currentView.set("month");
940
+ this.focusActive();
941
+ }
942
+ showYearView() {
943
+ this.focusedYear.set(this.viewYear());
944
+ this.currentView.set("year");
945
+ this.focusActive();
946
+ }
947
+ pickMonth(month) {
948
+ if (!isMonthSelectable(this.viewYear(), month, this.rules())) return;
949
+ if (this.view() === "month") {
950
+ this.selectDay(new Date(this.viewYear(), month, 1));
951
+ return;
952
+ }
953
+ this.viewMonth.set(month);
954
+ this.currentView.set("date");
955
+ this.monthChange.emit({
956
+ month: month + 1,
957
+ year: this.viewYear()
958
+ });
959
+ this.focusedDate.set(this.clampToMonth(this.focusedDate(), this.viewYear(), month));
960
+ this.focusActive();
961
+ }
962
+ pickYear(year) {
963
+ if (!isYearSelectable(year, this.rules())) return;
964
+ if (this.view() === "year") {
965
+ this.selectDay(new Date(year, 0, 1));
966
+ return;
967
+ }
968
+ this.viewYear.set(year);
969
+ this.yearChange.emit({
970
+ month: this.viewMonth() + 1,
971
+ year
972
+ });
973
+ this.focusedMonth.set(this.viewMonth());
974
+ this.currentView.set("month");
975
+ this.focusActive();
976
+ }
977
+ onDayClick(day) {
978
+ if (!day.selectable || day.otherMonth && !this.selectOtherMonths() || !this.isEditable()) return;
979
+ this.focusedDate.set(day.date);
980
+ this.selectDay(day.date);
981
+ }
982
+ onDayKeydown(event, day) {
983
+ const date = day.date;
984
+ const firstDay = this.resolvedFirstDay();
985
+ const moves = {
986
+ ArrowLeft: () => addDays(date, -1),
987
+ ArrowRight: () => addDays(date, 1),
988
+ ArrowUp: () => addDays(date, -7),
989
+ ArrowDown: () => addDays(date, 7),
990
+ Home: () => addDays(date, -((date.getDay() - firstDay + 7) % 7)),
991
+ End: () => addDays(date, 6 - (date.getDay() - firstDay + 7) % 7),
992
+ PageUp: () => addMonths(date, event.shiftKey ? -12 : -1),
993
+ PageDown: () => addMonths(date, event.shiftKey ? 12 : 1)
994
+ };
995
+ if (moves[event.key]) {
996
+ event.preventDefault();
997
+ this.moveFocus(moves[event.key]());
998
+ } else if (event.key === "Enter" || event.key === " ") {
999
+ event.preventDefault();
1000
+ this.onDayClick(day);
1001
+ }
1002
+ }
1003
+ onMonthKeydown(event, month) {
1004
+ const moves = {
1005
+ ArrowLeft: -1,
1006
+ ArrowRight: 1,
1007
+ ArrowUp: -3,
1008
+ ArrowDown: 3
1009
+ };
1010
+ if (moves[event.key] !== void 0) {
1011
+ event.preventDefault();
1012
+ const next = month + moves[event.key];
1013
+ if (next < 0 || next > 11) {
1014
+ this.viewYear.update((year) => year + (next < 0 ? -1 : 1));
1015
+ this.focusedMonth.set((next + 12) % 12);
1016
+ } else this.focusedMonth.set(next);
1017
+ this.focusActive();
1018
+ } else if (event.key === "Enter" || event.key === " ") {
1019
+ event.preventDefault();
1020
+ this.pickMonth(month);
1021
+ }
1022
+ }
1023
+ onYearKeydown(event, year) {
1024
+ const moves = {
1025
+ ArrowLeft: -1,
1026
+ ArrowRight: 1,
1027
+ ArrowUp: -2,
1028
+ ArrowDown: 2
1029
+ };
1030
+ if (moves[event.key] !== void 0) {
1031
+ event.preventDefault();
1032
+ const next = year + moves[event.key];
1033
+ this.focusedYear.set(next);
1034
+ if (next < this.decade()[0] || next > this.decade()[9]) this.viewYear.set(next);
1035
+ this.focusActive();
1036
+ } else if (event.key === "Enter" || event.key === " ") {
1037
+ event.preventDefault();
1038
+ this.pickYear(year);
1039
+ }
1040
+ }
1041
+ isSelected(date) {
1042
+ const [start, end] = this.dates();
1043
+ if (this.selectionMode() === "range" && start && end) return sameDay(date, start) || sameDay(date, end);
1044
+ return this.dates().some((value) => sameDay(value, date));
1045
+ }
1046
+ isInRange(date) {
1047
+ if (this.selectionMode() !== "range") return false;
1048
+ const [start, end] = this.dates();
1049
+ return !!start && !!end && compareDays(date, start) > 0 && compareDays(date, end) < 0;
1050
+ }
1051
+ isPreview(date) {
1052
+ const preview = this.previewDate();
1053
+ if (this.selectionMode() !== "range" || !preview) return false;
1054
+ const [start, end] = this.dates();
1055
+ if (!start || end || compareDays(preview, start) <= 0) return false;
1056
+ return compareDays(date, start) > 0 && compareDays(date, preview) <= 0;
1057
+ }
1058
+ onDayEnter(day) {
1059
+ if (this.selectionMode() === "range") this.previewDate.set(day.selectable ? day.date : null);
1060
+ }
1061
+ onGridLeave() {
1062
+ this.previewDate.set(null);
1063
+ }
1064
+ isMonthSelected(month) {
1065
+ return this.dates().some((date) => !!date && date.getMonth() === month && date.getFullYear() === this.viewYear());
1066
+ }
1067
+ isYearSelected(year) {
1068
+ return this.dates().some((date) => !!date && date.getFullYear() === year);
1069
+ }
1070
+ monthSelectable(month) {
1071
+ return isMonthSelectable(this.viewYear(), month, this.rules());
1072
+ }
1073
+ yearSelectable(year) {
1074
+ return isYearSelectable(year, this.rules());
1075
+ }
1076
+ dayKey(date) {
1077
+ return isoDay(date);
1078
+ }
1079
+ dayLabel(date) {
1080
+ return new Intl.DateTimeFormat(this.locale(), {
1081
+ weekday: "long",
1082
+ year: "numeric",
1083
+ month: "long",
1084
+ day: "numeric"
1085
+ }).format(date);
1086
+ }
1087
+ isFocusedDay(day) {
1088
+ return sameDay(day.date, this.focusedDate()) && !day.otherMonth;
1089
+ }
1090
+ selectToday() {
1091
+ const today = /* @__PURE__ */ new Date();
1092
+ const time = this.timeSource();
1093
+ if (time && this.hasTime()) today.setHours(time.getHours(), time.getMinutes(), time.getSeconds(), 0);
1094
+ else today.setHours(0, 0, 0, 0);
1095
+ this.viewMonth.set(today.getMonth());
1096
+ this.viewYear.set(today.getFullYear());
1097
+ this.focusedDate.set(startOfDay(today));
1098
+ this.currentView.set("date");
1099
+ if (isSelectable(today, this.rules())) this.selectDay(today, true);
1100
+ this.todayClicked.emit(today);
1101
+ }
1102
+ clear() {
1103
+ this.setDates([], true);
1104
+ this.pendingTime.set(null);
1105
+ this.cleared.emit();
1106
+ }
1107
+ onClearButton() {
1108
+ this.clear();
1109
+ this.clearClicked.emit();
1110
+ if (!this.inline()) this.close();
1111
+ }
1112
+ onClearIcon() {
1113
+ this.clear();
1114
+ this.focusInput();
1115
+ }
1116
+ startRepeat(event, unit, direction) {
1117
+ if (event.button !== 0) return;
1118
+ event.preventDefault();
1119
+ this.stopRepeat();
1120
+ this.shiftTime(unit, direction);
1121
+ const repeat = (delay) => {
1122
+ this.repeatTimer = setTimeout(() => {
1123
+ this.shiftTime(unit, direction);
1124
+ repeat(REPEAT_INTERVAL);
1125
+ }, delay);
1126
+ };
1127
+ repeat(REPEAT_DELAY);
1128
+ }
1129
+ stopRepeat() {
1130
+ if (this.repeatTimer) clearTimeout(this.repeatTimer);
1131
+ this.repeatTimer = null;
1132
+ }
1133
+ onTimeKeydown(event, unit, direction) {
1134
+ if (event.key === "Enter" || event.key === " ") {
1135
+ event.preventDefault();
1136
+ this.shiftTime(unit, direction);
1137
+ }
1138
+ }
1139
+ toggleMeridiem() {
1140
+ const base = this.timeBase();
1141
+ base.setHours((base.getHours() + 12) % 24);
1142
+ this.applyTime(base);
1143
+ }
1144
+ formatPart(value) {
1145
+ return String(value).padStart(2, "0");
1146
+ }
1147
+ shiftTime(unit, direction) {
1148
+ if (!this.isEditable()) return;
1149
+ const base = this.timeBase();
1150
+ if (unit === "hour") base.setHours(base.getHours() + direction * this.stepHour());
1151
+ if (unit === "minute") base.setMinutes(base.getMinutes() + direction * this.stepMinute());
1152
+ if (unit === "second") base.setSeconds(base.getSeconds() + direction * this.stepSecond());
1153
+ const source = this.timeSource();
1154
+ if (source && !this.timeOnly()) base.setFullYear(source.getFullYear(), source.getMonth(), source.getDate());
1155
+ this.applyTime(base);
1156
+ }
1157
+ timeBase() {
1158
+ const source = this.timeSource();
1159
+ return source ? new Date(source) : new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0));
1160
+ }
1161
+ applyTime(time) {
1162
+ const dates = this.dates();
1163
+ if (this.timeOnly()) {
1164
+ this.setDates([time], true);
1165
+ return;
1166
+ }
1167
+ const lastIndex = dates.map((date, index) => date ? index : -1).filter((index) => index >= 0).pop();
1168
+ if (lastIndex === void 0) {
1169
+ this.pendingTime.set(time);
1170
+ return;
1171
+ }
1172
+ const next = [...dates];
1173
+ const target = new Date(next[lastIndex]);
1174
+ target.setHours(time.getHours(), time.getMinutes(), time.getSeconds(), 0);
1175
+ next[lastIndex] = target;
1176
+ this.setDates(next, true);
1177
+ }
1178
+ lastDate() {
1179
+ return [...this.dates()].reverse().find((date) => !!date) ?? null;
1180
+ }
1181
+ selectDay(day, fromToday = false) {
1182
+ const date = new Date(day);
1183
+ const time = this.timeSource();
1184
+ if (this.hasTime() && time) date.setHours(time.getHours(), time.getMinutes(), time.getSeconds(), 0);
1185
+ else if (!fromToday) date.setHours(0, 0, 0, 0);
1186
+ const current = this.dates();
1187
+ let next;
1188
+ switch (this.selectionMode()) {
1189
+ case "multiple":
1190
+ if (current.some((value) => sameDay(value, date))) next = current.filter((value) => !sameDay(value, date));
1191
+ else if (this.maxDateCount() && current.length >= this.maxDateCount()) return;
1192
+ else next = [...current.filter(Boolean), date];
1193
+ break;
1194
+ case "range": {
1195
+ const [start, end] = current;
1196
+ next = !start || end || compareDays(date, start) < 0 ? [date, null] : [start, date];
1197
+ break;
1198
+ }
1199
+ default: next = [date];
1200
+ }
1201
+ this.pendingTime.set(null);
1202
+ this.previewDate.set(null);
1203
+ this.setDates(next, true);
1204
+ this.selected.emit(date);
1205
+ this.announcer.announce(this.translations().dateSelected.replace("{date}", this.formatValue(next)));
1206
+ if ((this.selectionMode() === "single" || this.selectionMode() === "range" && !!next[1]) && this.hideOnDateTimeSelect() && !this.hasTime() && !this.inline()) this.close();
1207
+ }
1208
+ setDates(dates, resetDraft) {
1209
+ if (resetDraft) this.draft.set(null);
1210
+ this.updateValue(this.toValue(dates));
1211
+ }
1212
+ commitDraft() {
1213
+ const text = this.draft();
1214
+ if (text === null) return;
1215
+ if (!text.trim()) {
1216
+ this.draft.set(null);
1217
+ this.setDates([], true);
1218
+ return;
1219
+ }
1220
+ const parsed = this.parseValue(text);
1221
+ if (parsed) this.setDates(parsed, true);
1222
+ else if (!this.keepInvalid()) this.draft.set(null);
1223
+ }
1224
+ step(direction) {
1225
+ const view = this.currentView();
1226
+ if (view === "year") {
1227
+ this.viewYear.update((year) => year + direction * 10);
1228
+ return;
1229
+ }
1230
+ if (view === "month") {
1231
+ this.viewYear.update((year) => year + direction);
1232
+ this.yearChange.emit({
1233
+ month: this.viewMonth() + 1,
1234
+ year: this.viewYear()
1235
+ });
1236
+ return;
1237
+ }
1238
+ const next = new Date(this.viewYear(), this.viewMonth() + direction, 1);
1239
+ const yearChanged = next.getFullYear() !== this.viewYear();
1240
+ this.viewMonth.set(next.getMonth());
1241
+ this.viewYear.set(next.getFullYear());
1242
+ this.monthChange.emit({
1243
+ month: next.getMonth() + 1,
1244
+ year: next.getFullYear()
1245
+ });
1246
+ if (yearChanged) this.yearChange.emit({
1247
+ month: next.getMonth() + 1,
1248
+ year: next.getFullYear()
1249
+ });
1250
+ this.focusedDate.set(this.clampToMonth(this.focusedDate(), next.getFullYear(), next.getMonth()));
1251
+ }
1252
+ clampToMonth(date, year, month) {
1253
+ return new Date(year, month, Math.min(date.getDate(), new Date(year, month + 1, 0).getDate()));
1254
+ }
1255
+ moveFocus(date) {
1256
+ const first = new Date(this.viewYear(), this.viewMonth(), 1);
1257
+ const last = new Date(this.viewYear(), this.viewMonth() + this.monthCount(), 0);
1258
+ if (compareDays(date, first) < 0 || compareDays(date, last) > 0) {
1259
+ const target = (compareDays(date, first) < 0 ? -1 : 1) < 0 ? new Date(date.getFullYear(), date.getMonth(), 1) : new Date(date.getFullYear(), date.getMonth() - this.monthCount() + 1, 1);
1260
+ this.viewMonth.set(target.getMonth());
1261
+ this.viewYear.set(target.getFullYear());
1262
+ this.monthChange.emit({
1263
+ month: target.getMonth() + 1,
1264
+ year: target.getFullYear()
1265
+ });
1266
+ }
1267
+ this.focusedDate.set(startOfDay(date));
1268
+ if (this.selectionMode() === "range") this.previewDate.set(isSelectable(date, this.rules()) ? startOfDay(date) : null);
1269
+ this.focusActive();
1270
+ }
1271
+ resetFocus() {
1272
+ const base = this.dates().find((date) => !!date) ?? this.defaultDate() ?? /* @__PURE__ */ new Date();
1273
+ this.currentView.set(this.view());
1274
+ this.viewMonth.set(base.getMonth());
1275
+ this.viewYear.set(base.getFullYear());
1276
+ this.focusedDate.set(startOfDay(base));
1277
+ this.focusedMonth.set(base.getMonth());
1278
+ this.focusedYear.set(base.getFullYear());
1279
+ }
1280
+ focusActive() {
1281
+ afterNextRender(() => {
1282
+ const panel = this.panelRef()?.nativeElement;
1283
+ (panel?.querySelector("[data-active=\"true\"]") ?? panel?.querySelector("[tabindex=\"0\"]"))?.focus();
1284
+ }, { injector: this.injector });
1285
+ }
1286
+ openTouch() {
1287
+ const ref = this.overlay.create({
1288
+ positionStrategy: this.overlay.position().global().centerHorizontally().centerVertically(),
1289
+ hasBackdrop: true,
1290
+ backdropClass: "tx-datepicker-mask",
1291
+ scrollStrategy: this.overlay.scrollStrategies.block()
1292
+ });
1293
+ this.touchRef = ref;
1294
+ ref.attach(new TemplatePortal(this.panelTemplate(), this.viewContainer));
1295
+ if (ref.backdropElement) ref.backdropElement.style.background = "var(--tx-date-picker-touch-mask-background)";
1296
+ ref.backdropClick().subscribe(() => this.close(false));
1297
+ ref.keydownEvents().subscribe((event) => {
1298
+ if (event.key === "Escape") this.close();
1299
+ });
1300
+ afterNextRender(() => {
1301
+ const panel = this.panelRef()?.nativeElement;
1302
+ if (panel) txAnimateEnter(panel, "bottom");
1303
+ this.focusActive();
1304
+ }, { injector: this.injector });
1305
+ }
1306
+ normalize(value) {
1307
+ const one = (entry) => {
1308
+ if (entry instanceof Date) return Number.isNaN(entry.getTime()) ? null : entry;
1309
+ if (typeof entry === "string" && entry) return this.parseOne(entry);
1310
+ return null;
1311
+ };
1312
+ if (value === null || value === void 0) return [];
1313
+ if (Array.isArray(value)) {
1314
+ const list = value.map(one);
1315
+ return this.selectionMode() === "range" ? [list[0] ?? null, list[1] ?? null] : list.filter((date) => !!date);
1316
+ }
1317
+ const single = one(value);
1318
+ return single ? [single] : [];
1319
+ }
1320
+ toValue(dates) {
1321
+ const out = (date) => date && this.dataType() === "string" ? this.formatOne(date) : date;
1322
+ switch (this.selectionMode()) {
1323
+ case "multiple": {
1324
+ const list = dates.filter((date) => !!date);
1325
+ return list.length ? list.map(out) : null;
1326
+ }
1327
+ case "range": return dates[0] ? [out(dates[0]), out(dates[1] ?? null)] : null;
1328
+ default: return dates[0] ? out(dates[0]) : null;
1329
+ }
1330
+ }
1331
+ formatOne(date) {
1332
+ if (this.timeOnly()) return formatTime(date, this.timeFormat());
1333
+ const day = formatDate(date, this.resolvedFormat(), this.names());
1334
+ return this.showTime() ? `${day} ${formatTime(date, this.timeFormat())}` : day;
1335
+ }
1336
+ formatValue(dates) {
1337
+ const present = dates.filter((date) => !!date);
1338
+ if (!present.length) return "";
1339
+ switch (this.selectionMode()) {
1340
+ case "multiple": return present.map((date) => this.formatOne(date)).join(`${this.multipleSeparator()} `);
1341
+ case "range": return dates[0] ? `${this.formatOne(dates[0])}${dates[1] ? ` ${this.rangeSeparator()} ${this.formatOne(dates[1])}` : ""}` : "";
1342
+ default: return this.formatOne(present[0]);
1343
+ }
1344
+ }
1345
+ parseOne(text) {
1346
+ const value = text.trim();
1347
+ const timeFormat = this.timeFormat();
1348
+ if (this.timeOnly()) {
1349
+ const time = parseTime(value, timeFormat);
1350
+ if (!time) return null;
1351
+ const date = /* @__PURE__ */ new Date();
1352
+ date.setHours(time.hours, time.minutes, time.seconds, 0);
1353
+ return date;
1354
+ }
1355
+ let datePart = value;
1356
+ let time = null;
1357
+ if (this.showTime()) {
1358
+ const separator = timeFormat.separator.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1359
+ const match = new RegExp(`\\s+(\\d{1,2}${separator}\\d{1,2}(?:${separator}\\d{1,2})?(?:\\s*[^\\s\\d]+)?)$`).exec(value);
1360
+ if (!match) return null;
1361
+ time = parseTime(match[1], timeFormat);
1362
+ if (!time) return null;
1363
+ datePart = value.slice(0, match.index);
1364
+ }
1365
+ const date = parseDate(datePart, this.resolvedFormat(), this.names(), this.shortYearCutoff());
1366
+ if (!date || !isSelectable(date, this.rules())) return null;
1367
+ if (time) date.setHours(time.hours, time.minutes, time.seconds, 0);
1368
+ return date;
1369
+ }
1370
+ parseValue(text) {
1371
+ const mode = this.selectionMode();
1372
+ if (mode === "single") {
1373
+ const date = this.parseOne(text);
1374
+ return date ? [date] : null;
1375
+ }
1376
+ if (mode === "range") {
1377
+ const separator = ` ${this.rangeSeparator()} `;
1378
+ const parts = text.includes(separator) ? text.split(separator) : [text];
1379
+ if (parts.length > 2) return null;
1380
+ const start = this.parseOne(parts[0]);
1381
+ const end = parts[1]?.trim() ? this.parseOne(parts[1]) : null;
1382
+ if (!start || parts[1]?.trim() && !end || end && compareDays(end, start) < 0) return null;
1383
+ return [start, end];
1384
+ }
1385
+ const list = text.split(this.multipleSeparator()).map((part) => part.trim()).filter(Boolean).map((part) => this.parseOne(part));
1386
+ if (list.some((date) => !date)) return null;
1387
+ const max = this.maxDateCount();
1388
+ return max ? list.slice(0, max) : list;
1389
+ }
1390
+ static ɵfac = i0.ɵɵngDeclareFactory({
1391
+ minVersion: "12.0.0",
1392
+ version: "22.2.3",
1393
+ ngImport: i0,
1394
+ type: TxDatePicker,
1395
+ deps: null,
1396
+ target: i0.ɵɵFactoryTarget.Component
1397
+ });
1398
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1399
+ minVersion: "17.0.0",
1400
+ version: "22.2.3",
1401
+ type: TxDatePicker,
1402
+ isStandalone: true,
1403
+ selector: "tx-datepicker",
1404
+ inputs: {
1405
+ selectionMode: {
1406
+ classPropertyName: "selectionMode",
1407
+ publicName: "selectionMode",
1408
+ isSignal: true,
1409
+ isRequired: false,
1410
+ transformFunction: null
1411
+ },
1412
+ dateFormat: {
1413
+ classPropertyName: "dateFormat",
1414
+ publicName: "dateFormat",
1415
+ isSignal: true,
1416
+ isRequired: false,
1417
+ transformFunction: null
1418
+ },
1419
+ placeholder: {
1420
+ classPropertyName: "placeholder",
1421
+ publicName: "placeholder",
1422
+ isSignal: true,
1423
+ isRequired: false,
1424
+ transformFunction: null
1425
+ },
1426
+ inputId: {
1427
+ classPropertyName: "inputId",
1428
+ publicName: "inputId",
1429
+ isSignal: true,
1430
+ isRequired: false,
1431
+ transformFunction: null
1432
+ },
1433
+ name: {
1434
+ classPropertyName: "name",
1435
+ publicName: "name",
1436
+ isSignal: true,
1437
+ isRequired: false,
1438
+ transformFunction: null
1439
+ },
1440
+ ariaLabel: {
1441
+ classPropertyName: "ariaLabel",
1442
+ publicName: "ariaLabel",
1443
+ isSignal: true,
1444
+ isRequired: false,
1445
+ transformFunction: null
1446
+ },
1447
+ ariaLabelledBy: {
1448
+ classPropertyName: "ariaLabelledBy",
1449
+ publicName: "ariaLabelledBy",
1450
+ isSignal: true,
1451
+ isRequired: false,
1452
+ transformFunction: null
1453
+ },
1454
+ iconAriaLabel: {
1455
+ classPropertyName: "iconAriaLabel",
1456
+ publicName: "iconAriaLabel",
1457
+ isSignal: true,
1458
+ isRequired: false,
1459
+ transformFunction: null
1460
+ },
1461
+ inline: {
1462
+ classPropertyName: "inline",
1463
+ publicName: "inline",
1464
+ isSignal: true,
1465
+ isRequired: false,
1466
+ transformFunction: null
1467
+ },
1468
+ showIcon: {
1469
+ classPropertyName: "showIcon",
1470
+ publicName: "showIcon",
1471
+ isSignal: true,
1472
+ isRequired: false,
1473
+ transformFunction: null
1474
+ },
1475
+ iconDisplay: {
1476
+ classPropertyName: "iconDisplay",
1477
+ publicName: "iconDisplay",
1478
+ isSignal: true,
1479
+ isRequired: false,
1480
+ transformFunction: null
1481
+ },
1482
+ icon: {
1483
+ classPropertyName: "icon",
1484
+ publicName: "icon",
1485
+ isSignal: true,
1486
+ isRequired: false,
1487
+ transformFunction: null
1488
+ },
1489
+ showClear: {
1490
+ classPropertyName: "showClear",
1491
+ publicName: "showClear",
1492
+ isSignal: true,
1493
+ isRequired: false,
1494
+ transformFunction: null
1495
+ },
1496
+ showButtonBar: {
1497
+ classPropertyName: "showButtonBar",
1498
+ publicName: "showButtonBar",
1499
+ isSignal: true,
1500
+ isRequired: false,
1501
+ transformFunction: null
1502
+ },
1503
+ showOtherMonths: {
1504
+ classPropertyName: "showOtherMonths",
1505
+ publicName: "showOtherMonths",
1506
+ isSignal: true,
1507
+ isRequired: false,
1508
+ transformFunction: null
1509
+ },
1510
+ selectOtherMonths: {
1511
+ classPropertyName: "selectOtherMonths",
1512
+ publicName: "selectOtherMonths",
1513
+ isSignal: true,
1514
+ isRequired: false,
1515
+ transformFunction: null
1516
+ },
1517
+ showWeek: {
1518
+ classPropertyName: "showWeek",
1519
+ publicName: "showWeek",
1520
+ isSignal: true,
1521
+ isRequired: false,
1522
+ transformFunction: null
1523
+ },
1524
+ startWeekFromFirstDayOfYear: {
1525
+ classPropertyName: "startWeekFromFirstDayOfYear",
1526
+ publicName: "startWeekFromFirstDayOfYear",
1527
+ isSignal: true,
1528
+ isRequired: false,
1529
+ transformFunction: null
1530
+ },
1531
+ showTime: {
1532
+ classPropertyName: "showTime",
1533
+ publicName: "showTime",
1534
+ isSignal: true,
1535
+ isRequired: false,
1536
+ transformFunction: null
1537
+ },
1538
+ timeOnly: {
1539
+ classPropertyName: "timeOnly",
1540
+ publicName: "timeOnly",
1541
+ isSignal: true,
1542
+ isRequired: false,
1543
+ transformFunction: null
1544
+ },
1545
+ hourFormat: {
1546
+ classPropertyName: "hourFormat",
1547
+ publicName: "hourFormat",
1548
+ isSignal: true,
1549
+ isRequired: false,
1550
+ transformFunction: null
1551
+ },
1552
+ showSeconds: {
1553
+ classPropertyName: "showSeconds",
1554
+ publicName: "showSeconds",
1555
+ isSignal: true,
1556
+ isRequired: false,
1557
+ transformFunction: null
1558
+ },
1559
+ stepHour: {
1560
+ classPropertyName: "stepHour",
1561
+ publicName: "stepHour",
1562
+ isSignal: true,
1563
+ isRequired: false,
1564
+ transformFunction: null
1565
+ },
1566
+ stepMinute: {
1567
+ classPropertyName: "stepMinute",
1568
+ publicName: "stepMinute",
1569
+ isSignal: true,
1570
+ isRequired: false,
1571
+ transformFunction: null
1572
+ },
1573
+ stepSecond: {
1574
+ classPropertyName: "stepSecond",
1575
+ publicName: "stepSecond",
1576
+ isSignal: true,
1577
+ isRequired: false,
1578
+ transformFunction: null
1579
+ },
1580
+ timeSeparator: {
1581
+ classPropertyName: "timeSeparator",
1582
+ publicName: "timeSeparator",
1583
+ isSignal: true,
1584
+ isRequired: false,
1585
+ transformFunction: null
1586
+ },
1587
+ view: {
1588
+ classPropertyName: "view",
1589
+ publicName: "view",
1590
+ isSignal: true,
1591
+ isRequired: false,
1592
+ transformFunction: null
1593
+ },
1594
+ numberOfMonths: {
1595
+ classPropertyName: "numberOfMonths",
1596
+ publicName: "numberOfMonths",
1597
+ isSignal: true,
1598
+ isRequired: false,
1599
+ transformFunction: null
1600
+ },
1601
+ responsiveOptions: {
1602
+ classPropertyName: "responsiveOptions",
1603
+ publicName: "responsiveOptions",
1604
+ isSignal: true,
1605
+ isRequired: false,
1606
+ transformFunction: null
1607
+ },
1608
+ firstDayOfWeek: {
1609
+ classPropertyName: "firstDayOfWeek",
1610
+ publicName: "firstDayOfWeek",
1611
+ isSignal: true,
1612
+ isRequired: false,
1613
+ transformFunction: null
1614
+ },
1615
+ minDate: {
1616
+ classPropertyName: "minDate",
1617
+ publicName: "minDate",
1618
+ isSignal: true,
1619
+ isRequired: false,
1620
+ transformFunction: null
1621
+ },
1622
+ maxDate: {
1623
+ classPropertyName: "maxDate",
1624
+ publicName: "maxDate",
1625
+ isSignal: true,
1626
+ isRequired: false,
1627
+ transformFunction: null
1628
+ },
1629
+ disabledDates: {
1630
+ classPropertyName: "disabledDates",
1631
+ publicName: "disabledDates",
1632
+ isSignal: true,
1633
+ isRequired: false,
1634
+ transformFunction: null
1635
+ },
1636
+ disabledDays: {
1637
+ classPropertyName: "disabledDays",
1638
+ publicName: "disabledDays",
1639
+ isSignal: true,
1640
+ isRequired: false,
1641
+ transformFunction: null
1642
+ },
1643
+ maxDateCount: {
1644
+ classPropertyName: "maxDateCount",
1645
+ publicName: "maxDateCount",
1646
+ isSignal: true,
1647
+ isRequired: false,
1648
+ transformFunction: null
1649
+ },
1650
+ defaultDate: {
1651
+ classPropertyName: "defaultDate",
1652
+ publicName: "defaultDate",
1653
+ isSignal: true,
1654
+ isRequired: false,
1655
+ transformFunction: null
1656
+ },
1657
+ readonlyInput: {
1658
+ classPropertyName: "readonlyInput",
1659
+ publicName: "readonlyInput",
1660
+ isSignal: true,
1661
+ isRequired: false,
1662
+ transformFunction: null
1663
+ },
1664
+ keepInvalid: {
1665
+ classPropertyName: "keepInvalid",
1666
+ publicName: "keepInvalid",
1667
+ isSignal: true,
1668
+ isRequired: false,
1669
+ transformFunction: null
1670
+ },
1671
+ hideOnDateTimeSelect: {
1672
+ classPropertyName: "hideOnDateTimeSelect",
1673
+ publicName: "hideOnDateTimeSelect",
1674
+ isSignal: true,
1675
+ isRequired: false,
1676
+ transformFunction: null
1677
+ },
1678
+ showOnFocus: {
1679
+ classPropertyName: "showOnFocus",
1680
+ publicName: "showOnFocus",
1681
+ isSignal: true,
1682
+ isRequired: false,
1683
+ transformFunction: null
1684
+ },
1685
+ touchUI: {
1686
+ classPropertyName: "touchUI",
1687
+ publicName: "touchUI",
1688
+ isSignal: true,
1689
+ isRequired: false,
1690
+ transformFunction: null
1691
+ },
1692
+ dataType: {
1693
+ classPropertyName: "dataType",
1694
+ publicName: "dataType",
1695
+ isSignal: true,
1696
+ isRequired: false,
1697
+ transformFunction: null
1698
+ },
1699
+ multipleSeparator: {
1700
+ classPropertyName: "multipleSeparator",
1701
+ publicName: "multipleSeparator",
1702
+ isSignal: true,
1703
+ isRequired: false,
1704
+ transformFunction: null
1705
+ },
1706
+ rangeSeparator: {
1707
+ classPropertyName: "rangeSeparator",
1708
+ publicName: "rangeSeparator",
1709
+ isSignal: true,
1710
+ isRequired: false,
1711
+ transformFunction: null
1712
+ },
1713
+ shortYearCutoff: {
1714
+ classPropertyName: "shortYearCutoff",
1715
+ publicName: "shortYearCutoff",
1716
+ isSignal: true,
1717
+ isRequired: false,
1718
+ transformFunction: null
1719
+ },
1720
+ size: {
1721
+ classPropertyName: "size",
1722
+ publicName: "size",
1723
+ isSignal: true,
1724
+ isRequired: false,
1725
+ transformFunction: null
1726
+ },
1727
+ variant: {
1728
+ classPropertyName: "variant",
1729
+ publicName: "variant",
1730
+ isSignal: true,
1731
+ isRequired: false,
1732
+ transformFunction: null
1733
+ },
1734
+ fluid: {
1735
+ classPropertyName: "fluid",
1736
+ publicName: "fluid",
1737
+ isSignal: true,
1738
+ isRequired: false,
1739
+ transformFunction: null
1740
+ },
1741
+ invalid: {
1742
+ classPropertyName: "invalid",
1743
+ publicName: "invalid",
1744
+ isSignal: true,
1745
+ isRequired: false,
1746
+ transformFunction: null
1747
+ },
1748
+ disabledInput: {
1749
+ classPropertyName: "disabledInput",
1750
+ publicName: "disabled",
1751
+ isSignal: true,
1752
+ isRequired: false,
1753
+ transformFunction: null
1754
+ },
1755
+ readonly: {
1756
+ classPropertyName: "readonly",
1757
+ publicName: "readonly",
1758
+ isSignal: true,
1759
+ isRequired: false,
1760
+ transformFunction: null
1761
+ },
1762
+ required: {
1763
+ classPropertyName: "required",
1764
+ publicName: "required",
1765
+ isSignal: true,
1766
+ isRequired: false,
1767
+ transformFunction: null
1768
+ },
1769
+ dt: {
1770
+ classPropertyName: "dt",
1771
+ publicName: "dt",
1772
+ isSignal: true,
1773
+ isRequired: false,
1774
+ transformFunction: null
1775
+ },
1776
+ pt: {
1777
+ classPropertyName: "pt",
1778
+ publicName: "pt",
1779
+ isSignal: true,
1780
+ isRequired: false,
1781
+ transformFunction: null
1782
+ },
1783
+ ptOptions: {
1784
+ classPropertyName: "ptOptions",
1785
+ publicName: "ptOptions",
1786
+ isSignal: true,
1787
+ isRequired: false,
1788
+ transformFunction: null
1789
+ },
1790
+ unstyled: {
1791
+ classPropertyName: "unstyled",
1792
+ publicName: "unstyled",
1793
+ isSignal: true,
1794
+ isRequired: false,
1795
+ transformFunction: null
1796
+ }
1797
+ },
1798
+ outputs: {
1799
+ selected: "selected",
1800
+ cleared: "cleared",
1801
+ todayClicked: "todayClicked",
1802
+ clearClicked: "clearClicked",
1803
+ monthChange: "monthChange",
1804
+ yearChange: "yearChange",
1805
+ opened: "opened",
1806
+ closed: "closed",
1807
+ focused: "focused",
1808
+ blurred: "blurred",
1809
+ typed: "typed"
1810
+ },
1811
+ host: {
1812
+ properties: {
1813
+ "class": "passThrough().root?.class",
1814
+ "style": "hostStyle()",
1815
+ "attr.data-styled": "!isUnstyled() || null",
1816
+ "attr.data-size": "size()",
1817
+ "attr.data-variant": "variant()",
1818
+ "class.tx-datepicker--inline": "inline()",
1819
+ "class.tx-datepicker--open": "isOpen()",
1820
+ "class.tx-datepicker--filled": "isFilled()",
1821
+ "class.tx-datepicker--invalid": "isInvalid()",
1822
+ "class.tx-datepicker--disabled": "isDisabled()",
1823
+ "class.tx-datepicker--fluid": "isFluid()",
1824
+ "class.tx-datepicker--button": "showIcon() && iconDisplay() === \"button\" && !inline()"
1825
+ },
1826
+ classAttribute: "tx-datepicker"
1827
+ },
1828
+ providers: [{
1829
+ provide: NG_VALUE_ACCESSOR,
1830
+ useExisting: forwardRef(() => TxDatePicker),
1831
+ multi: true
1832
+ }],
1833
+ queries: [
1834
+ {
1835
+ propertyName: "dateTemplate",
1836
+ first: true,
1837
+ predicate: TxDatePickerDate,
1838
+ descendants: true,
1839
+ isSignal: true
1840
+ },
1841
+ {
1842
+ propertyName: "headerTemplate",
1843
+ first: true,
1844
+ predicate: TxDatePickerHeader,
1845
+ descendants: true,
1846
+ isSignal: true
1847
+ },
1848
+ {
1849
+ propertyName: "footerTemplate",
1850
+ first: true,
1851
+ predicate: TxDatePickerFooter,
1852
+ descendants: true,
1853
+ isSignal: true
1854
+ },
1855
+ {
1856
+ propertyName: "decadeTemplate",
1857
+ first: true,
1858
+ predicate: TxDatePickerDecade,
1859
+ descendants: true,
1860
+ isSignal: true
1861
+ },
1862
+ {
1863
+ propertyName: "buttonBarTemplate",
1864
+ first: true,
1865
+ predicate: TxDatePickerButtonBar,
1866
+ descendants: true,
1867
+ isSignal: true
1868
+ },
1869
+ {
1870
+ propertyName: "triggerIconTemplate",
1871
+ first: true,
1872
+ predicate: TxDatePickerTriggerIcon,
1873
+ descendants: true,
1874
+ isSignal: true
1875
+ },
1876
+ {
1877
+ propertyName: "inputIconTemplate",
1878
+ first: true,
1879
+ predicate: TxDatePickerInputIcon,
1880
+ descendants: true,
1881
+ isSignal: true
1882
+ }
1883
+ ],
1884
+ viewQueries: [
1885
+ {
1886
+ propertyName: "inputRef",
1887
+ first: true,
1888
+ predicate: ["input"],
1889
+ descendants: true,
1890
+ isSignal: true
1891
+ },
1892
+ {
1893
+ propertyName: "fieldRef",
1894
+ first: true,
1895
+ predicate: ["field"],
1896
+ descendants: true,
1897
+ isSignal: true
1898
+ },
1899
+ {
1900
+ propertyName: "panelRef",
1901
+ first: true,
1902
+ predicate: ["panel"],
1903
+ descendants: true,
1904
+ isSignal: true
1905
+ },
1906
+ {
1907
+ propertyName: "panelTemplate",
1908
+ first: true,
1909
+ predicate: ["panelTemplate"],
1910
+ descendants: true,
1911
+ isSignal: true
1912
+ },
1913
+ {
1914
+ propertyName: "connectedOverlay",
1915
+ first: true,
1916
+ predicate: CdkConnectedOverlay,
1917
+ descendants: true,
1918
+ isSignal: true
1919
+ }
1920
+ ],
1921
+ usesInheritance: true,
1922
+ ngImport: i0,
1923
+ template: "@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"panelTemplate\" />\n} @else {\n <div #field #origin=\"cdkOverlayOrigin\" cdkOverlayOrigin class=\"tx-datepicker__field\">\n <input\n #input\n txInput\n type=\"text\"\n role=\"combobox\"\n autocomplete=\"off\"\n aria-autocomplete=\"none\"\n aria-haspopup=\"dialog\"\n class=\"tx-datepicker__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [id]=\"resolvedInputId()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [fluid]=\"true\"\n [invalid]=\"isInvalid()\"\n [unstyled]=\"isUnstyled()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly() || readonlyInput()\"\n [required]=\"required()\"\n [value]=\"inputText()\"\n [attr.inputmode]=\"readonlyInput() || touchUI() ? 'none' : null\"\n [attr.placeholder]=\"placeholder() ?? null\"\n [attr.name]=\"name() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n (click)=\"onInputClick()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onInputKeydown($event)\"\n />\n @if (canClear()) {\n <button\n type=\"button\"\n class=\"tx-datepicker__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"translations().clear\"\n (click)=\"onClearIcon()\"\n >\n <tx-icon name=\"times\" />\n </button>\n }\n @if (showIcon() && iconDisplay() === 'input') {\n <span\n class=\"tx-datepicker__input-icon\"\n aria-hidden=\"true\"\n [class]=\"passThrough().inputIcon?.class\"\n [style]=\"passThrough().inputIcon?.style\"\n (click)=\"toggle(false)\"\n >\n @if (inputIconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: toggle.bind(this, false) }\" />\n } @else {\n <tx-icon [name]=\"icon()\" />\n }\n </span>\n }\n @if (showIcon() && iconDisplay() === 'button') {\n <button\n type=\"button\"\n class=\"tx-datepicker__dropdown\"\n aria-haspopup=\"dialog\"\n tabindex=\"-1\"\n [class]=\"passThrough().dropdown?.class\"\n [style]=\"passThrough().dropdown?.style\"\n [disabled]=\"!isEditable()\"\n [attr.aria-label]=\"iconAriaLabel() ?? translations().chooseDate\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\n (click)=\"toggle(true)\"\n >\n @if (triggerIconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" />\n } @else {\n <tx-icon [name]=\"icon()\" />\n }\n </button>\n }\n </div>\n\n <ng-template\n cdkConnectedOverlay\n txOverlayAnchor\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"isPanelMounted() && !touchUI()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayMinWidth]=\"panelMinWidth()\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n (attach)=\"onAttach()\"\n (positionChange)=\"onPositionChange($event)\"\n (overlayOutsideClick)=\"onOutsideClick($event)\"\n (detach)=\"close(false)\"\n >\n <ng-container [ngTemplateOutlet]=\"panelTemplate\" />\n </ng-template>\n}\n\n<ng-template #panelTemplate>\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- the panel only listens to keys and focus that bubble from its controls -->\n <div\n #panel\n class=\"tx-datepicker__panel\"\n [cdkTrapFocus]=\"!inline()\"\n [attr.id]=\"panelId\"\n [attr.role]=\"inline() ? 'group' : 'dialog'\"\n [attr.aria-modal]=\"inline() ? null : 'true'\"\n [attr.aria-label]=\"ariaLabel() ?? translations().chooseDate\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [attr.data-view]=\"currentView()\"\n [class.tx-datepicker__panel--inline]=\"inline()\"\n [class.tx-datepicker__panel--touch]=\"touchUI() && !inline()\"\n [class.tx-datepicker__panel--time-only]=\"timeOnly()\"\n [class.tx-datepicker__panel--disabled]=\"isDisabled()\"\n [class]=\"passThrough().panel?.class\"\n [style]=\"panelStyle()\"\n [style.min-width.px]=\"inline() ? null : panelMinWidth()\"\n (keydown)=\"onPanelKeydown($event)\"\n (focusout)=\"onPanelFocusOut($event)\"\n >\n @if (headerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" />\n }\n @if (!timeOnly()) {\n <div class=\"tx-datepicker__calendars\">\n @for (month of currentView() === 'date' ? months() : [months()[0]]; track month.year * 12 + month.month; let first = $first; let last = $last) {\n <div class=\"tx-datepicker__calendar\" [class]=\"passThrough().calendar?.class\" [style]=\"passThrough().calendar?.style\">\n <div class=\"tx-datepicker__header\" [class]=\"passThrough().header?.class\" [style]=\"passThrough().header?.style\">\n <button\n txButton\n type=\"button\"\n icon=\"chevron-left\"\n severity=\"secondary\"\n variant=\"text\"\n class=\"tx-datepicker__previous\"\n [rounded]=\"true\"\n [unstyled]=\"isUnstyled()\"\n [class.tx-datepicker__nav--hidden]=\"!first\"\n [class]=\"passThrough().previous?.class\"\n [style]=\"passThrough().previous?.style\"\n [disabled]=\"isDisabled()\"\n [attr.aria-hidden]=\"first ? null : 'true'\"\n [attr.tabindex]=\"first ? null : -1\"\n [attr.aria-label]=\"currentView() === 'year' ? translations().previousDecade : currentView() === 'month' ? translations().previousYear : translations().previousMonth\"\n (click)=\"previous()\"\n ></button>\n <div class=\"tx-datepicker__title\" [class]=\"passThrough().title?.class\" [style]=\"passThrough().title?.style\">\n @switch (currentView()) {\n @case ('date') {\n <button\n type=\"button\"\n class=\"tx-datepicker__select-month\"\n [class]=\"passThrough().selectMonth?.class\"\n [style]=\"passThrough().selectMonth?.style\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"translations().chooseMonth + ', ' + names().monthNames[month.month]\"\n (click)=\"showMonthView()\"\n >\n {{ names().monthNames[month.month] }}\n </button>\n <button\n type=\"button\"\n class=\"tx-datepicker__select-year\"\n [class]=\"passThrough().selectYear?.class\"\n [style]=\"passThrough().selectYear?.style\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"translations().chooseYear + ', ' + month.year\"\n (click)=\"showYearView()\"\n >\n {{ month.year }}\n </button>\n }\n @case ('month') {\n <button\n type=\"button\"\n class=\"tx-datepicker__select-year\"\n [class]=\"passThrough().selectYear?.class\"\n [style]=\"passThrough().selectYear?.style\"\n [disabled]=\"isDisabled() || view() === 'year'\"\n [attr.aria-label]=\"translations().chooseYear + ', ' + viewYear()\"\n (click)=\"showYearView()\"\n >\n {{ viewYear() }}\n </button>\n }\n @case ('year') {\n <span class=\"tx-datepicker__decade\">\n @if (decadeTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: decade() }\" />\n } @else {\n {{ decade()[0] }} – {{ decade()[9] }}\n }\n </span>\n }\n }\n </div>\n <button\n txButton\n type=\"button\"\n icon=\"chevron-right\"\n severity=\"secondary\"\n variant=\"text\"\n class=\"tx-datepicker__next\"\n [rounded]=\"true\"\n [unstyled]=\"isUnstyled()\"\n [class.tx-datepicker__nav--hidden]=\"!last\"\n [class]=\"passThrough().next?.class\"\n [style]=\"passThrough().next?.style\"\n [disabled]=\"isDisabled()\"\n [attr.aria-hidden]=\"last ? null : 'true'\"\n [attr.tabindex]=\"last ? null : -1\"\n [attr.aria-label]=\"currentView() === 'year' ? translations().nextDecade : currentView() === 'month' ? translations().nextYear : translations().nextMonth\"\n (click)=\"next()\"\n ></button>\n </div>\n\n @switch (currentView()) {\n @case ('date') {\n <table\n role=\"grid\"\n class=\"tx-datepicker__day-view\"\n (mouseleave)=\"onGridLeave()\"\n [attr.aria-label]=\"names().monthNames[month.month] + ' ' + month.year\"\n [class]=\"passThrough().table?.class\"\n [style]=\"passThrough().table?.style\"\n >\n <thead>\n <tr>\n @if (showWeek()) {\n <th scope=\"col\" class=\"tx-datepicker__weekday tx-datepicker__weekheader\" [class]=\"passThrough().weekday?.class\" [style]=\"passThrough().weekday?.style\">\n {{ translations().weekHeader }}\n </th>\n }\n @for (weekday of weekdays(); track weekday.long) {\n <th scope=\"col\" class=\"tx-datepicker__weekday\" [attr.abbr]=\"weekday.long\" [class]=\"passThrough().weekday?.class\" [style]=\"passThrough().weekday?.style\">\n {{ weekday.short }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (week of month.weeks; track week.number + '-' + $index) {\n <tr>\n @if (showWeek()) {\n <th scope=\"row\" class=\"tx-datepicker__week-number\" [class]=\"passThrough().weekNumber?.class\" [style]=\"passThrough().weekNumber?.style\">\n {{ week.number }}\n </th>\n }\n @for (day of week.days; track dayKey(day.date)) {\n @if (day.otherMonth && !showOtherMonths()) {\n <td role=\"gridcell\" class=\"tx-datepicker__day-cell tx-datepicker__day-cell--empty\"></td>\n } @else {\n <td\n role=\"gridcell\"\n class=\"tx-datepicker__day-cell\"\n [class.tx-datepicker__day-cell--today]=\"day.today\"\n [class.tx-datepicker__day-cell--other]=\"day.otherMonth\"\n [attr.data-date]=\"dayKey(day.date)\"\n [attr.data-active]=\"isFocusedDay(day) || null\"\n [attr.tabindex]=\"isFocusedDay(day) ? 0 : -1\"\n [attr.aria-label]=\"dayLabel(day.date)\"\n [attr.aria-selected]=\"isSelected(day.date) || isInRange(day.date)\"\n [attr.aria-disabled]=\"!day.selectable || (day.otherMonth && !selectOtherMonths()) || null\"\n [attr.aria-current]=\"day.today ? 'date' : null\"\n (click)=\"onDayClick(day)\"\n (mouseenter)=\"onDayEnter(day)\"\n (keydown)=\"onDayKeydown($event, day)\"\n >\n <span\n class=\"tx-datepicker__day\"\n [class.tx-datepicker__day--selected]=\"isSelected(day.date)\"\n [class.tx-datepicker__day--range]=\"isInRange(day.date)\"\n [class.tx-datepicker__day--preview]=\"isPreview(day.date)\"\n [class.tx-datepicker__day--disabled]=\"!day.selectable\"\n [class]=\"passThrough().day?.class\"\n [style]=\"passThrough().day?.style\"\n >\n @if (dateTemplate(); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: day, selected: isSelected(day.date), inRange: isInRange(day.date) }\"\n />\n } @else {\n {{ day.day }}\n }\n </span>\n </td>\n }\n }\n </tr>\n }\n </tbody>\n </table>\n }\n @case ('month') {\n <div\n role=\"grid\"\n class=\"tx-datepicker__month-view\"\n [attr.aria-label]=\"translations().chooseMonth\"\n [class]=\"passThrough().monthView?.class\"\n [style]=\"passThrough().monthView?.style\"\n >\n @for (row of [0, 1, 2, 3]; track row) {\n <div role=\"row\" class=\"tx-datepicker__row\">\n @for (column of [0, 1, 2]; track column) {\n @let monthIndex = row * 3 + column;\n <span\n role=\"gridcell\"\n class=\"tx-datepicker__month\"\n [class.tx-datepicker__month--selected]=\"isMonthSelected(monthIndex)\"\n [class.tx-datepicker__month--disabled]=\"!monthSelectable(monthIndex)\"\n [class]=\"passThrough().month?.class\"\n [style]=\"passThrough().month?.style\"\n [attr.data-active]=\"focusedMonth() === monthIndex || null\"\n [attr.tabindex]=\"focusedMonth() === monthIndex ? 0 : -1\"\n [attr.aria-label]=\"names().monthNames[monthIndex] + ' ' + viewYear()\"\n [attr.aria-selected]=\"isMonthSelected(monthIndex)\"\n [attr.aria-disabled]=\"!monthSelectable(monthIndex) || null\"\n (click)=\"pickMonth(monthIndex)\"\n (keydown)=\"onMonthKeydown($event, monthIndex)\"\n >{{ names().monthNamesShort[monthIndex] }}</span\n >\n }\n </div>\n }\n </div>\n }\n @case ('year') {\n <div\n role=\"grid\"\n class=\"tx-datepicker__year-view\"\n [attr.aria-label]=\"translations().chooseYear\"\n [class]=\"passThrough().yearView?.class\"\n [style]=\"passThrough().yearView?.style\"\n >\n @for (row of [0, 1, 2, 3, 4]; track row) {\n <div role=\"row\" class=\"tx-datepicker__row\">\n @for (column of [0, 1]; track column) {\n @let year = decade()[row * 2 + column];\n <span\n role=\"gridcell\"\n class=\"tx-datepicker__year\"\n [class.tx-datepicker__year--selected]=\"isYearSelected(year)\"\n [class.tx-datepicker__year--disabled]=\"!yearSelectable(year)\"\n [class]=\"passThrough().year?.class\"\n [style]=\"passThrough().year?.style\"\n [attr.data-active]=\"focusedYear() === year || null\"\n [attr.tabindex]=\"focusedYear() === year ? 0 : -1\"\n [attr.aria-selected]=\"isYearSelected(year)\"\n [attr.aria-disabled]=\"!yearSelectable(year) || null\"\n (click)=\"pickYear(year)\"\n (keydown)=\"onYearKeydown($event, year)\"\n >{{ year }}</span\n >\n }\n </div>\n }\n </div>\n }\n }\n </div>\n }\n </div>\n }\n\n @if (hasTime() && currentView() === 'date') {\n <div class=\"tx-datepicker__time\" [class]=\"passThrough().timePicker?.class\" [style]=\"passThrough().timePicker?.style\">\n <ng-container [ngTemplateOutlet]=\"spinner\" [ngTemplateOutletContext]=\"{ unit: 'hour', value: hours() }\" />\n <span class=\"tx-datepicker__time-separator\" aria-hidden=\"true\">{{ timeSeparator() }}</span>\n <ng-container [ngTemplateOutlet]=\"spinner\" [ngTemplateOutletContext]=\"{ unit: 'minute', value: minutes() }\" />\n @if (showSeconds()) {\n <span class=\"tx-datepicker__time-separator\" aria-hidden=\"true\">{{ timeSeparator() }}</span>\n <ng-container [ngTemplateOutlet]=\"spinner\" [ngTemplateOutletContext]=\"{ unit: 'second', value: seconds() }\" />\n }\n @if (hourFormat() === '12') {\n <div class=\"tx-datepicker__time-unit\">\n <button\n txButton\n type=\"button\"\n icon=\"chevron-up\"\n severity=\"secondary\"\n variant=\"text\"\n [rounded]=\"true\"\n [unstyled]=\"isUnstyled()\"\n [disabled]=\"!isEditable()\"\n [attr.aria-label]=\"translations().toggleAmPm\"\n (click)=\"toggleMeridiem()\"\n ></button>\n <span class=\"tx-datepicker__time-value\">{{ isPm() ? translations().pm : translations().am }}</span>\n <button\n txButton\n type=\"button\"\n icon=\"chevron-down\"\n severity=\"secondary\"\n variant=\"text\"\n [rounded]=\"true\"\n [unstyled]=\"isUnstyled()\"\n [disabled]=\"!isEditable()\"\n [attr.aria-label]=\"translations().toggleAmPm\"\n (click)=\"toggleMeridiem()\"\n ></button>\n </div>\n }\n </div>\n }\n\n @if (showButtonBar()) {\n <div class=\"tx-datepicker__buttonbar\" [class]=\"passThrough().buttonbar?.class\" [style]=\"passThrough().buttonbar?.style\">\n @if (buttonBarTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ today: selectToday.bind(this), clear: onClearButton.bind(this) }\" />\n } @else {\n <button\n txButton\n type=\"button\"\n size=\"small\"\n severity=\"secondary\"\n variant=\"text\"\n [unstyled]=\"isUnstyled()\"\n [label]=\"translations().today\"\n [disabled]=\"!isEditable()\"\n (click)=\"selectToday()\"\n ></button>\n <button\n txButton\n type=\"button\"\n size=\"small\"\n severity=\"secondary\"\n variant=\"text\"\n [unstyled]=\"isUnstyled()\"\n [label]=\"translations().clear\"\n [disabled]=\"!isEditable()\"\n (click)=\"onClearButton()\"\n ></button>\n }\n </div>\n }\n @if (footerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" />\n }\n </div>\n</ng-template>\n\n<ng-template #spinner let-unit=\"unit\" let-value=\"value\">\n <div class=\"tx-datepicker__time-unit\" role=\"group\" [attr.aria-label]=\"unit === 'hour' ? translations().hour : unit === 'minute' ? translations().minute : translations().second\">\n <button\n txButton\n type=\"button\"\n icon=\"chevron-up\"\n severity=\"secondary\"\n variant=\"text\"\n [rounded]=\"true\"\n [unstyled]=\"isUnstyled()\"\n [disabled]=\"!isEditable()\"\n [attr.aria-label]=\"unit === 'hour' ? translations().nextHour : unit === 'minute' ? translations().nextMinute : translations().nextSecond\"\n (pointerdown)=\"startRepeat($event, unit, 1)\"\n (pointerup)=\"stopRepeat()\"\n (pointerleave)=\"stopRepeat()\"\n (pointercancel)=\"stopRepeat()\"\n (keydown)=\"onTimeKeydown($event, unit, 1)\"\n ></button>\n <span class=\"tx-datepicker__time-value\" aria-live=\"polite\">{{ formatPart(value) }}</span>\n <button\n txButton\n type=\"button\"\n icon=\"chevron-down\"\n severity=\"secondary\"\n variant=\"text\"\n [rounded]=\"true\"\n [unstyled]=\"isUnstyled()\"\n [disabled]=\"!isEditable()\"\n [attr.aria-label]=\"unit === 'hour' ? translations().previousHour : unit === 'minute' ? translations().previousMinute : translations().previousSecond\"\n (pointerdown)=\"startRepeat($event, unit, -1)\"\n (pointerup)=\"stopRepeat()\"\n (pointerleave)=\"stopRepeat()\"\n (pointercancel)=\"stopRepeat()\"\n (keydown)=\"onTimeKeydown($event, unit, -1)\"\n ></button>\n </div>\n</ng-template>\n",
1924
+ styles: [":host{display:inline-flex;max-width:100%;vertical-align:top}:host(.tx-datepicker--fluid){display:flex;width:100%}:host(.tx-datepicker--inline){display:inline-block}.tx-datepicker__field{position:relative;display:flex;flex:1 1 auto;align-items:stretch;min-width:0}.tx-datepicker__input{flex:1 1 auto;width:1%;min-width:0}.tx-datepicker__clear,.tx-datepicker__input-icon{position:absolute;top:50%;transform:translateY(-50%)}.tx-datepicker__dropdown{display:inline-flex;flex:none;align-items:center;justify-content:center;cursor:pointer}.tx-datepicker__nav--hidden{visibility:hidden}:host([data-styled]){--_icon-room: 0px;--_clear-room: 0px}:host([data-styled]) .tx-datepicker__input{--tx-field-inset-end: calc(var(--_icon-room) + var(--_clear-room))}:host([data-styled]) .tx-datepicker__clear{display:grid;place-items:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}:host([data-styled]) .tx-datepicker__clear:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}:host([data-styled]) .tx-datepicker__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}:host([data-styled]) .tx-datepicker__clear{right:calc(var(--_icon-room) + var(--_button-room, 0px) + 8px)}:host([data-styled]) .tx-datepicker__input-icon{right:var(--tx-form-field-padding-x);display:inline-flex;color:var(--tx-date-picker-input-icon-color);font-size:var(--tx-form-field-font-size);line-height:1;cursor:pointer}:host([data-styled]) .tx-datepicker__dropdown{box-sizing:border-box;width:var(--tx-date-picker-dropdown-width);padding:0;border:1px solid var(--tx-date-picker-dropdown-border-color);border-inline-start:0 none;border-start-end-radius:var(--tx-date-picker-dropdown-border-radius);border-end-end-radius:var(--tx-date-picker-dropdown-border-radius);outline-color:transparent;background:var(--tx-date-picker-dropdown-background);color:var(--tx-date-picker-dropdown-color);font-size:var(--tx-form-field-font-size);transition:background-color var(--tx-date-picker-transition-duration),color var(--tx-date-picker-transition-duration),border-color var(--tx-date-picker-transition-duration),outline-color var(--tx-date-picker-transition-duration)}:host([data-styled]) .tx-datepicker__dropdown:not(:disabled):hover{border-color:var(--tx-date-picker-dropdown-hover-border-color);background:var(--tx-date-picker-dropdown-hover-background);color:var(--tx-date-picker-dropdown-hover-color)}:host([data-styled]) .tx-datepicker__dropdown:not(:disabled):active{border-color:var(--tx-date-picker-dropdown-active-border-color);background:var(--tx-date-picker-dropdown-active-background);color:var(--tx-date-picker-dropdown-active-color)}:host([data-styled]) .tx-datepicker__dropdown:focus-visible{outline:var(--tx-date-picker-dropdown-focus-ring-width) var(--tx-date-picker-dropdown-focus-ring-style) var(--tx-date-picker-dropdown-focus-ring-color);outline-offset:var(--tx-date-picker-dropdown-focus-ring-offset);box-shadow:var(--tx-date-picker-dropdown-focus-ring-shadow)}:host([data-styled]) .tx-datepicker__dropdown:disabled{cursor:not-allowed;opacity:.6}:host([data-styled]:has(.tx-datepicker__input-icon)){--_icon-room: calc(var(--tx-form-field-padding-x) + 1em)}:host([data-styled]:has(.tx-datepicker__clear)){--_clear-room: 28px}:host([data-styled].tx-datepicker--button){--_button-room: var(--tx-date-picker-dropdown-width)}:host([data-styled].tx-datepicker--button[data-size=small]){--_button-room: var(--tx-date-picker-dropdown-sm-width)}:host([data-styled].tx-datepicker--button[data-size=large]){--_button-room: var(--tx-date-picker-dropdown-lg-width)}:host([data-styled].tx-datepicker--button) .tx-datepicker__input{border-start-end-radius:0;border-end-end-radius:0}:host([data-styled][data-size=small]) .tx-datepicker__dropdown{width:var(--tx-date-picker-dropdown-sm-width);font-size:var(--tx-form-field-sm-font-size)}:host([data-styled][data-size=large]) .tx-datepicker__dropdown{width:var(--tx-date-picker-dropdown-lg-width);font-size:var(--tx-form-field-lg-font-size)}.tx-datepicker__panel{box-sizing:border-box}.tx-datepicker__calendars{display:flex}.tx-datepicker__header,.tx-datepicker__title,.tx-datepicker__time,.tx-datepicker__buttonbar{display:flex;align-items:center}.tx-datepicker__header,.tx-datepicker__buttonbar{justify-content:space-between}.tx-datepicker__time{justify-content:center}.tx-datepicker__time-unit{display:flex;flex-direction:column;align-items:center}.tx-datepicker__day-view{width:100%;border-collapse:collapse}.tx-datepicker__day-cell{cursor:pointer}.tx-datepicker__day-cell[aria-disabled=true]{cursor:default}.tx-datepicker__day{display:flex;align-items:center;justify-content:center;margin:0 auto}.tx-datepicker__row{display:flex}.tx-datepicker__month,.tx-datepicker__year{display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.tx-datepicker__month{width:33.3%}.tx-datepicker__year{width:50%}.tx-datepicker__month--disabled,.tx-datepicker__year--disabled{cursor:default}.tx-datepicker__panel[data-styled]{padding:var(--tx-date-picker-panel-padding);border:1px solid var(--tx-date-picker-panel-border-color);border-radius:var(--tx-date-picker-panel-border-radius);background:var(--tx-date-picker-panel-background);box-shadow:var(--tx-date-picker-panel-shadow);color:var(--tx-date-picker-panel-color);font-family:var(--tx-font-family)}.tx-datepicker__panel[data-styled].tx-datepicker__panel--inline{display:inline-block;overflow-x:auto;box-shadow:none}.tx-datepicker__panel[data-styled].tx-datepicker__panel--touch{width:var(--tx-date-picker-touch-width);max-height:92vh;overflow:auto}.tx-datepicker__panel[data-styled].tx-datepicker__panel--disabled{opacity:.6}.tx-datepicker__panel[data-styled] .tx-datepicker__calendar{flex:1 1 auto;padding-inline:var(--tx-date-picker-group-gap);border-inline-start:1px solid var(--tx-date-picker-group-border-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__calendar:first-child{padding-inline-start:0;border-inline-start:0 none}.tx-datepicker__panel[data-styled] .tx-datepicker__calendar:last-child{padding-inline-end:0}.tx-datepicker__panel[data-styled] .tx-datepicker__header{padding:var(--tx-date-picker-header-padding);border-bottom:1px solid var(--tx-date-picker-header-border-color);background:var(--tx-date-picker-header-background);color:var(--tx-date-picker-header-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__title{gap:var(--tx-date-picker-title-gap);font-size:var(--tx-date-picker-title-font-size);font-weight:var(--tx-date-picker-title-font-weight)}.tx-datepicker__panel[data-styled] .tx-datepicker__select-month,.tx-datepicker__panel[data-styled] .tx-datepicker__select-year{margin:0;border:none;outline-color:transparent;background:transparent;font-family:inherit;cursor:pointer;transition:background-color var(--tx-date-picker-transition-duration),color var(--tx-date-picker-transition-duration),outline-color var(--tx-date-picker-transition-duration)}.tx-datepicker__panel[data-styled] .tx-datepicker__select-month:focus-visible,.tx-datepicker__panel[data-styled] .tx-datepicker__select-year:focus-visible{outline:var(--tx-date-picker-date-focus-ring-width) var(--tx-date-picker-date-focus-ring-style) var(--tx-date-picker-date-focus-ring-color);outline-offset:var(--tx-date-picker-date-focus-ring-offset)}.tx-datepicker__panel[data-styled] .tx-datepicker__select-month:disabled,.tx-datepicker__panel[data-styled] .tx-datepicker__select-year:disabled{cursor:default}.tx-datepicker__panel[data-styled] .tx-datepicker__select-month{padding:var(--tx-date-picker-select-month-padding);border-radius:var(--tx-date-picker-select-month-border-radius);color:var(--tx-date-picker-select-month-color);font-size:var(--tx-date-picker-select-month-font-size);font-weight:var(--tx-date-picker-select-month-font-weight)}.tx-datepicker__panel[data-styled] .tx-datepicker__select-month:enabled:hover{background:var(--tx-date-picker-select-month-hover-background);color:var(--tx-date-picker-select-month-hover-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__select-year{padding:var(--tx-date-picker-select-year-padding);border-radius:var(--tx-date-picker-select-year-border-radius);color:var(--tx-date-picker-select-year-color);font-size:var(--tx-date-picker-select-year-font-size);font-weight:var(--tx-date-picker-select-year-font-weight)}.tx-datepicker__panel[data-styled] .tx-datepicker__select-year:enabled:hover{background:var(--tx-date-picker-select-year-hover-background);color:var(--tx-date-picker-select-year-hover-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__decade{padding:var(--tx-date-picker-select-year-padding)}.tx-datepicker__panel[data-styled] .tx-datepicker__day-view{margin:var(--tx-date-picker-day-view-margin);font-size:var(--tx-date-picker-date-font-size)}.tx-datepicker__panel[data-styled] .tx-datepicker__weekday{padding:var(--tx-date-picker-week-day-padding);color:var(--tx-date-picker-week-day-color);font-size:var(--tx-date-picker-week-day-font-size);font-weight:var(--tx-date-picker-week-day-font-weight)}.tx-datepicker__panel[data-styled] .tx-datepicker__week-number{padding:var(--tx-date-picker-date-padding);color:var(--tx-date-picker-week-number-color);font-size:var(--tx-date-picker-week-number-font-size);font-weight:var(--tx-date-picker-date-font-weight);text-align:center}.tx-datepicker__panel[data-styled] .tx-datepicker__day-cell{padding:var(--tx-date-picker-date-padding);outline:none}.tx-datepicker__panel[data-styled] .tx-datepicker__day{box-sizing:border-box;width:var(--tx-date-picker-date-width);height:var(--tx-date-picker-date-height);border:1px solid transparent;border-radius:var(--tx-date-picker-date-border-radius);color:var(--tx-date-picker-date-color);font-size:var(--tx-date-picker-date-font-size);font-weight:var(--tx-date-picker-date-font-weight);transition:background-color var(--tx-date-picker-transition-duration),color var(--tx-date-picker-transition-duration),box-shadow var(--tx-date-picker-transition-duration)}.tx-datepicker__panel[data-styled] .tx-datepicker__day-cell--today .tx-datepicker__day{background:var(--tx-date-picker-today-background);color:var(--tx-date-picker-today-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__day-cell:not([aria-disabled=true]):hover .tx-datepicker__day:not(.tx-datepicker__day--selected,.tx-datepicker__day--preview){background:var(--tx-date-picker-date-hover-background);color:var(--tx-date-picker-date-hover-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__day-cell:focus-visible .tx-datepicker__day{outline:var(--tx-date-picker-date-focus-ring-width) var(--tx-date-picker-date-focus-ring-style) var(--tx-date-picker-date-focus-ring-color);outline-offset:var(--tx-date-picker-date-focus-ring-offset);box-shadow:var(--tx-date-picker-date-focus-ring-shadow)}.tx-datepicker__panel[data-styled] .tx-datepicker__day--range,.tx-datepicker__panel[data-styled] .tx-datepicker__day--preview,.tx-datepicker__panel[data-styled] .tx-datepicker__day-cell--today .tx-datepicker__day--range,.tx-datepicker__panel[data-styled] .tx-datepicker__day-cell--today .tx-datepicker__day--preview{background:var(--tx-date-picker-date-range-selected-background);color:var(--tx-date-picker-date-range-selected-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__day--selected,.tx-datepicker__panel[data-styled] .tx-datepicker__day-cell--today .tx-datepicker__day--selected{background:var(--tx-date-picker-date-selected-background);color:var(--tx-date-picker-date-selected-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__day--disabled{opacity:var(--tx-date-picker-date-disabled-opacity)}.tx-datepicker__panel[data-styled] .tx-datepicker__month-view{margin:var(--tx-date-picker-month-view-margin)}.tx-datepicker__panel[data-styled] .tx-datepicker__year-view{margin:var(--tx-date-picker-year-view-margin)}.tx-datepicker__panel[data-styled] .tx-datepicker__month,.tx-datepicker__panel[data-styled] .tx-datepicker__year{box-sizing:border-box;outline-color:transparent;color:var(--tx-date-picker-date-color);font-size:var(--tx-date-picker-date-font-size);font-weight:var(--tx-date-picker-date-font-weight);transition:background-color var(--tx-date-picker-transition-duration),color var(--tx-date-picker-transition-duration),outline-color var(--tx-date-picker-transition-duration)}.tx-datepicker__panel[data-styled] .tx-datepicker__month:not(.tx-datepicker__month--disabled,.tx-datepicker__year--disabled,.tx-datepicker__month--selected,.tx-datepicker__year--selected):hover,.tx-datepicker__panel[data-styled] .tx-datepicker__year:not(.tx-datepicker__month--disabled,.tx-datepicker__year--disabled,.tx-datepicker__month--selected,.tx-datepicker__year--selected):hover{background:var(--tx-date-picker-date-hover-background);color:var(--tx-date-picker-date-hover-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__month:focus-visible,.tx-datepicker__panel[data-styled] .tx-datepicker__year:focus-visible{outline:var(--tx-date-picker-date-focus-ring-width) var(--tx-date-picker-date-focus-ring-style) var(--tx-date-picker-date-focus-ring-color);outline-offset:var(--tx-date-picker-date-focus-ring-offset)}.tx-datepicker__panel[data-styled] .tx-datepicker__month{padding:var(--tx-date-picker-month-padding);border-radius:var(--tx-date-picker-month-border-radius)}.tx-datepicker__panel[data-styled] .tx-datepicker__year{padding:var(--tx-date-picker-year-padding);border-radius:var(--tx-date-picker-year-border-radius)}.tx-datepicker__panel[data-styled] .tx-datepicker__month--selected,.tx-datepicker__panel[data-styled] .tx-datepicker__year--selected{background:var(--tx-date-picker-date-selected-background);color:var(--tx-date-picker-date-selected-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__month--disabled,.tx-datepicker__panel[data-styled] .tx-datepicker__year--disabled{opacity:var(--tx-date-picker-date-disabled-opacity)}.tx-datepicker__panel[data-styled] .tx-datepicker__time{gap:var(--tx-date-picker-time-picker-gap);padding:0;color:var(--tx-date-picker-time-picker-color);font-size:var(--tx-date-picker-time-picker-font-size);font-weight:var(--tx-date-picker-time-picker-font-weight)}.tx-datepicker__panel[data-styled] .tx-datepicker__calendars+.tx-datepicker__time{margin-top:var(--tx-date-picker-time-picker-gap);padding:var(--tx-date-picker-time-picker-padding);border-top:1px solid var(--tx-date-picker-time-picker-border-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__time-unit{gap:var(--tx-date-picker-time-picker-button-gap)}.tx-datepicker__panel[data-styled] .tx-datepicker__time-value{font-variant-numeric:tabular-nums}.tx-datepicker__panel[data-styled] .tx-datepicker__buttonbar{padding:var(--tx-date-picker-buttonbar-padding);border-top:1px solid var(--tx-date-picker-buttonbar-border-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__calendars+.tx-datepicker__buttonbar,.tx-datepicker__panel[data-styled] .tx-datepicker__time+.tx-datepicker__buttonbar{margin-top:var(--tx-date-picker-time-picker-gap)}.tx-datepicker__panel[data-styled] .tx-datepicker__month-view,.tx-datepicker__panel[data-styled] .tx-datepicker__year-view,.tx-datepicker__panel[data-styled] .tx-datepicker__day-view{animation:tx-datepicker-view var(--tx-date-picker-transition-duration) ease-out}@keyframes tx-datepicker-view{0%{opacity:0}}@media(prefers-reduced-motion:reduce){.tx-datepicker__panel[data-styled] .tx-datepicker__month-view,.tx-datepicker__panel[data-styled] .tx-datepicker__year-view,.tx-datepicker__panel[data-styled] .tx-datepicker__day-view{animation:none}}\n"],
1925
+ dependencies: [
1926
+ {
1927
+ kind: "directive",
1928
+ type: CdkOverlayOrigin,
1929
+ selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]",
1930
+ exportAs: ["cdkOverlayOrigin"]
1931
+ },
1932
+ {
1933
+ kind: "directive",
1934
+ type: CdkConnectedOverlay,
1935
+ selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]",
1936
+ inputs: [
1937
+ "cdkConnectedOverlayOrigin",
1938
+ "cdkConnectedOverlayPositions",
1939
+ "cdkConnectedOverlayPositionStrategy",
1940
+ "cdkConnectedOverlayOffsetX",
1941
+ "cdkConnectedOverlayOffsetY",
1942
+ "cdkConnectedOverlayWidth",
1943
+ "cdkConnectedOverlayHeight",
1944
+ "cdkConnectedOverlayMinWidth",
1945
+ "cdkConnectedOverlayMinHeight",
1946
+ "cdkConnectedOverlayBackdropClass",
1947
+ "cdkConnectedOverlayPanelClass",
1948
+ "cdkConnectedOverlayViewportMargin",
1949
+ "cdkConnectedOverlayScrollStrategy",
1950
+ "cdkConnectedOverlayOpen",
1951
+ "cdkConnectedOverlayDisableClose",
1952
+ "cdkConnectedOverlayTransformOriginOn",
1953
+ "cdkConnectedOverlayHasBackdrop",
1954
+ "cdkConnectedOverlayLockPosition",
1955
+ "cdkConnectedOverlayFlexibleDimensions",
1956
+ "cdkConnectedOverlayGrowAfterOpen",
1957
+ "cdkConnectedOverlayPush",
1958
+ "cdkConnectedOverlayDisposeOnNavigation",
1959
+ "cdkConnectedOverlayUsePopover",
1960
+ "cdkConnectedOverlayMatchWidth",
1961
+ "cdkConnectedOverlay"
1962
+ ],
1963
+ outputs: [
1964
+ "backdropClick",
1965
+ "positionChange",
1966
+ "attach",
1967
+ "detach",
1968
+ "overlayKeydown",
1969
+ "overlayOutsideClick"
1970
+ ],
1971
+ exportAs: ["cdkConnectedOverlay"]
1972
+ },
1973
+ {
1974
+ kind: "directive",
1975
+ type: CdkTrapFocus,
1976
+ selector: "[cdkTrapFocus]",
1977
+ inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"],
1978
+ exportAs: ["cdkTrapFocus"]
1979
+ },
1980
+ {
1981
+ kind: "directive",
1982
+ type: TxOverlayAnchor,
1983
+ selector: "[cdkConnectedOverlay][txOverlayAnchor]"
1984
+ },
1985
+ {
1986
+ kind: "directive",
1987
+ type: NgTemplateOutlet,
1988
+ selector: "[ngTemplateOutlet]",
1989
+ inputs: [
1990
+ "ngTemplateOutletContext",
1991
+ "ngTemplateOutlet",
1992
+ "ngTemplateOutletInjector"
1993
+ ]
1994
+ },
1995
+ {
1996
+ kind: "component",
1997
+ type: TxIcon,
1998
+ selector: "tx-icon",
1999
+ inputs: ["name"]
2000
+ },
2001
+ {
2002
+ kind: "directive",
2003
+ type: TxInput,
2004
+ selector: "input[txInput], textarea[txInput]",
2005
+ inputs: [
2006
+ "invalid",
2007
+ "size",
2008
+ "variant",
2009
+ "fluid",
2010
+ "dt",
2011
+ "pt",
2012
+ "ptOptions",
2013
+ "unstyled"
2014
+ ]
2015
+ },
2016
+ {
2017
+ kind: "component",
2018
+ type: TxButton,
2019
+ selector: "button[txButton], a[txButton]",
2020
+ inputs: [
2021
+ "label",
2022
+ "severity",
2023
+ "size",
2024
+ "variant",
2025
+ "outlined",
2026
+ "text",
2027
+ "link",
2028
+ "rounded",
2029
+ "raised",
2030
+ "plain",
2031
+ "fluid",
2032
+ "disabled",
2033
+ "tabindex",
2034
+ "icon",
2035
+ "iconPos",
2036
+ "iconOnly",
2037
+ "loading",
2038
+ "loadingIcon",
2039
+ "badge",
2040
+ "badgeSeverity",
2041
+ "dt",
2042
+ "pt",
2043
+ "ptOptions",
2044
+ "unstyled"
2045
+ ]
2046
+ }
2047
+ ],
2048
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
2049
+ });
2050
+ };
2051
+ i0.ɵɵngDeclareClassMetadata({
2052
+ minVersion: "12.0.0",
2053
+ version: "22.2.3",
2054
+ ngImport: i0,
2055
+ type: TxDatePicker,
2056
+ decorators: [{
2057
+ type: Component,
2058
+ args: [{
2059
+ selector: "tx-datepicker",
2060
+ imports: [
2061
+ CdkOverlayOrigin,
2062
+ CdkConnectedOverlay,
2063
+ CdkTrapFocus,
2064
+ TxOverlayAnchor,
2065
+ NgTemplateOutlet,
2066
+ TxIcon,
2067
+ TxInput,
2068
+ TxButton
2069
+ ],
2070
+ changeDetection: ChangeDetectionStrategy.OnPush,
2071
+ providers: [{
2072
+ provide: NG_VALUE_ACCESSOR,
2073
+ useExisting: forwardRef(() => TxDatePicker),
2074
+ multi: true
2075
+ }],
2076
+ host: {
2077
+ class: "tx-datepicker",
2078
+ "[class]": "passThrough().root?.class",
2079
+ "[style]": "hostStyle()",
2080
+ "[attr.data-styled]": "!isUnstyled() || null",
2081
+ "[attr.data-size]": "size()",
2082
+ "[attr.data-variant]": "variant()",
2083
+ "[class.tx-datepicker--inline]": "inline()",
2084
+ "[class.tx-datepicker--open]": "isOpen()",
2085
+ "[class.tx-datepicker--filled]": "isFilled()",
2086
+ "[class.tx-datepicker--invalid]": "isInvalid()",
2087
+ "[class.tx-datepicker--disabled]": "isDisabled()",
2088
+ "[class.tx-datepicker--fluid]": "isFluid()",
2089
+ "[class.tx-datepicker--button]": "showIcon() && iconDisplay() === \"button\" && !inline()"
2090
+ },
2091
+ template: "@if (inline()) {\n <ng-container [ngTemplateOutlet]=\"panelTemplate\" />\n} @else {\n <div #field #origin=\"cdkOverlayOrigin\" cdkOverlayOrigin class=\"tx-datepicker__field\">\n <input\n #input\n txInput\n type=\"text\"\n role=\"combobox\"\n autocomplete=\"off\"\n aria-autocomplete=\"none\"\n aria-haspopup=\"dialog\"\n class=\"tx-datepicker__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [id]=\"resolvedInputId()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [fluid]=\"true\"\n [invalid]=\"isInvalid()\"\n [unstyled]=\"isUnstyled()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly() || readonlyInput()\"\n [required]=\"required()\"\n [value]=\"inputText()\"\n [attr.inputmode]=\"readonlyInput() || touchUI() ? 'none' : null\"\n [attr.placeholder]=\"placeholder() ?? null\"\n [attr.name]=\"name() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\n (focus)=\"onInputFocus($event)\"\n (blur)=\"onInputBlur($event)\"\n (click)=\"onInputClick()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onInputKeydown($event)\"\n />\n @if (canClear()) {\n <button\n type=\"button\"\n class=\"tx-datepicker__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"translations().clear\"\n (click)=\"onClearIcon()\"\n >\n <tx-icon name=\"times\" />\n </button>\n }\n @if (showIcon() && iconDisplay() === 'input') {\n <span\n class=\"tx-datepicker__input-icon\"\n aria-hidden=\"true\"\n [class]=\"passThrough().inputIcon?.class\"\n [style]=\"passThrough().inputIcon?.style\"\n (click)=\"toggle(false)\"\n >\n @if (inputIconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: toggle.bind(this, false) }\" />\n } @else {\n <tx-icon [name]=\"icon()\" />\n }\n </span>\n }\n @if (showIcon() && iconDisplay() === 'button') {\n <button\n type=\"button\"\n class=\"tx-datepicker__dropdown\"\n aria-haspopup=\"dialog\"\n tabindex=\"-1\"\n [class]=\"passThrough().dropdown?.class\"\n [style]=\"passThrough().dropdown?.style\"\n [disabled]=\"!isEditable()\"\n [attr.aria-label]=\"iconAriaLabel() ?? translations().chooseDate\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"isOpen() ? panelId : null\"\n (click)=\"toggle(true)\"\n >\n @if (triggerIconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" />\n } @else {\n <tx-icon [name]=\"icon()\" />\n }\n </button>\n }\n </div>\n\n <ng-template\n cdkConnectedOverlay\n txOverlayAnchor\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"isPanelMounted() && !touchUI()\"\n [cdkConnectedOverlayPositions]=\"positions\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayMinWidth]=\"panelMinWidth()\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n (attach)=\"onAttach()\"\n (positionChange)=\"onPositionChange($event)\"\n (overlayOutsideClick)=\"onOutsideClick($event)\"\n (detach)=\"close(false)\"\n >\n <ng-container [ngTemplateOutlet]=\"panelTemplate\" />\n </ng-template>\n}\n\n<ng-template #panelTemplate>\n <!-- eslint-disable-next-line @angular-eslint/template/interactive-supports-focus -- the panel only listens to keys and focus that bubble from its controls -->\n <div\n #panel\n class=\"tx-datepicker__panel\"\n [cdkTrapFocus]=\"!inline()\"\n [attr.id]=\"panelId\"\n [attr.role]=\"inline() ? 'group' : 'dialog'\"\n [attr.aria-modal]=\"inline() ? null : 'true'\"\n [attr.aria-label]=\"ariaLabel() ?? translations().chooseDate\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [attr.data-view]=\"currentView()\"\n [class.tx-datepicker__panel--inline]=\"inline()\"\n [class.tx-datepicker__panel--touch]=\"touchUI() && !inline()\"\n [class.tx-datepicker__panel--time-only]=\"timeOnly()\"\n [class.tx-datepicker__panel--disabled]=\"isDisabled()\"\n [class]=\"passThrough().panel?.class\"\n [style]=\"panelStyle()\"\n [style.min-width.px]=\"inline() ? null : panelMinWidth()\"\n (keydown)=\"onPanelKeydown($event)\"\n (focusout)=\"onPanelFocusOut($event)\"\n >\n @if (headerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" />\n }\n @if (!timeOnly()) {\n <div class=\"tx-datepicker__calendars\">\n @for (month of currentView() === 'date' ? months() : [months()[0]]; track month.year * 12 + month.month; let first = $first; let last = $last) {\n <div class=\"tx-datepicker__calendar\" [class]=\"passThrough().calendar?.class\" [style]=\"passThrough().calendar?.style\">\n <div class=\"tx-datepicker__header\" [class]=\"passThrough().header?.class\" [style]=\"passThrough().header?.style\">\n <button\n txButton\n type=\"button\"\n icon=\"chevron-left\"\n severity=\"secondary\"\n variant=\"text\"\n class=\"tx-datepicker__previous\"\n [rounded]=\"true\"\n [unstyled]=\"isUnstyled()\"\n [class.tx-datepicker__nav--hidden]=\"!first\"\n [class]=\"passThrough().previous?.class\"\n [style]=\"passThrough().previous?.style\"\n [disabled]=\"isDisabled()\"\n [attr.aria-hidden]=\"first ? null : 'true'\"\n [attr.tabindex]=\"first ? null : -1\"\n [attr.aria-label]=\"currentView() === 'year' ? translations().previousDecade : currentView() === 'month' ? translations().previousYear : translations().previousMonth\"\n (click)=\"previous()\"\n ></button>\n <div class=\"tx-datepicker__title\" [class]=\"passThrough().title?.class\" [style]=\"passThrough().title?.style\">\n @switch (currentView()) {\n @case ('date') {\n <button\n type=\"button\"\n class=\"tx-datepicker__select-month\"\n [class]=\"passThrough().selectMonth?.class\"\n [style]=\"passThrough().selectMonth?.style\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"translations().chooseMonth + ', ' + names().monthNames[month.month]\"\n (click)=\"showMonthView()\"\n >\n {{ names().monthNames[month.month] }}\n </button>\n <button\n type=\"button\"\n class=\"tx-datepicker__select-year\"\n [class]=\"passThrough().selectYear?.class\"\n [style]=\"passThrough().selectYear?.style\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"translations().chooseYear + ', ' + month.year\"\n (click)=\"showYearView()\"\n >\n {{ month.year }}\n </button>\n }\n @case ('month') {\n <button\n type=\"button\"\n class=\"tx-datepicker__select-year\"\n [class]=\"passThrough().selectYear?.class\"\n [style]=\"passThrough().selectYear?.style\"\n [disabled]=\"isDisabled() || view() === 'year'\"\n [attr.aria-label]=\"translations().chooseYear + ', ' + viewYear()\"\n (click)=\"showYearView()\"\n >\n {{ viewYear() }}\n </button>\n }\n @case ('year') {\n <span class=\"tx-datepicker__decade\">\n @if (decadeTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: decade() }\" />\n } @else {\n {{ decade()[0] }} – {{ decade()[9] }}\n }\n </span>\n }\n }\n </div>\n <button\n txButton\n type=\"button\"\n icon=\"chevron-right\"\n severity=\"secondary\"\n variant=\"text\"\n class=\"tx-datepicker__next\"\n [rounded]=\"true\"\n [unstyled]=\"isUnstyled()\"\n [class.tx-datepicker__nav--hidden]=\"!last\"\n [class]=\"passThrough().next?.class\"\n [style]=\"passThrough().next?.style\"\n [disabled]=\"isDisabled()\"\n [attr.aria-hidden]=\"last ? null : 'true'\"\n [attr.tabindex]=\"last ? null : -1\"\n [attr.aria-label]=\"currentView() === 'year' ? translations().nextDecade : currentView() === 'month' ? translations().nextYear : translations().nextMonth\"\n (click)=\"next()\"\n ></button>\n </div>\n\n @switch (currentView()) {\n @case ('date') {\n <table\n role=\"grid\"\n class=\"tx-datepicker__day-view\"\n (mouseleave)=\"onGridLeave()\"\n [attr.aria-label]=\"names().monthNames[month.month] + ' ' + month.year\"\n [class]=\"passThrough().table?.class\"\n [style]=\"passThrough().table?.style\"\n >\n <thead>\n <tr>\n @if (showWeek()) {\n <th scope=\"col\" class=\"tx-datepicker__weekday tx-datepicker__weekheader\" [class]=\"passThrough().weekday?.class\" [style]=\"passThrough().weekday?.style\">\n {{ translations().weekHeader }}\n </th>\n }\n @for (weekday of weekdays(); track weekday.long) {\n <th scope=\"col\" class=\"tx-datepicker__weekday\" [attr.abbr]=\"weekday.long\" [class]=\"passThrough().weekday?.class\" [style]=\"passThrough().weekday?.style\">\n {{ weekday.short }}\n </th>\n }\n </tr>\n </thead>\n <tbody>\n @for (week of month.weeks; track week.number + '-' + $index) {\n <tr>\n @if (showWeek()) {\n <th scope=\"row\" class=\"tx-datepicker__week-number\" [class]=\"passThrough().weekNumber?.class\" [style]=\"passThrough().weekNumber?.style\">\n {{ week.number }}\n </th>\n }\n @for (day of week.days; track dayKey(day.date)) {\n @if (day.otherMonth && !showOtherMonths()) {\n <td role=\"gridcell\" class=\"tx-datepicker__day-cell tx-datepicker__day-cell--empty\"></td>\n } @else {\n <td\n role=\"gridcell\"\n class=\"tx-datepicker__day-cell\"\n [class.tx-datepicker__day-cell--today]=\"day.today\"\n [class.tx-datepicker__day-cell--other]=\"day.otherMonth\"\n [attr.data-date]=\"dayKey(day.date)\"\n [attr.data-active]=\"isFocusedDay(day) || null\"\n [attr.tabindex]=\"isFocusedDay(day) ? 0 : -1\"\n [attr.aria-label]=\"dayLabel(day.date)\"\n [attr.aria-selected]=\"isSelected(day.date) || isInRange(day.date)\"\n [attr.aria-disabled]=\"!day.selectable || (day.otherMonth && !selectOtherMonths()) || null\"\n [attr.aria-current]=\"day.today ? 'date' : null\"\n (click)=\"onDayClick(day)\"\n (mouseenter)=\"onDayEnter(day)\"\n (keydown)=\"onDayKeydown($event, day)\"\n >\n <span\n class=\"tx-datepicker__day\"\n [class.tx-datepicker__day--selected]=\"isSelected(day.date)\"\n [class.tx-datepicker__day--range]=\"isInRange(day.date)\"\n [class.tx-datepicker__day--preview]=\"isPreview(day.date)\"\n [class.tx-datepicker__day--disabled]=\"!day.selectable\"\n [class]=\"passThrough().day?.class\"\n [style]=\"passThrough().day?.style\"\n >\n @if (dateTemplate(); as template) {\n <ng-container\n [ngTemplateOutlet]=\"template.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: day, selected: isSelected(day.date), inRange: isInRange(day.date) }\"\n />\n } @else {\n {{ day.day }}\n }\n </span>\n </td>\n }\n }\n </tr>\n }\n </tbody>\n </table>\n }\n @case ('month') {\n <div\n role=\"grid\"\n class=\"tx-datepicker__month-view\"\n [attr.aria-label]=\"translations().chooseMonth\"\n [class]=\"passThrough().monthView?.class\"\n [style]=\"passThrough().monthView?.style\"\n >\n @for (row of [0, 1, 2, 3]; track row) {\n <div role=\"row\" class=\"tx-datepicker__row\">\n @for (column of [0, 1, 2]; track column) {\n @let monthIndex = row * 3 + column;\n <span\n role=\"gridcell\"\n class=\"tx-datepicker__month\"\n [class.tx-datepicker__month--selected]=\"isMonthSelected(monthIndex)\"\n [class.tx-datepicker__month--disabled]=\"!monthSelectable(monthIndex)\"\n [class]=\"passThrough().month?.class\"\n [style]=\"passThrough().month?.style\"\n [attr.data-active]=\"focusedMonth() === monthIndex || null\"\n [attr.tabindex]=\"focusedMonth() === monthIndex ? 0 : -1\"\n [attr.aria-label]=\"names().monthNames[monthIndex] + ' ' + viewYear()\"\n [attr.aria-selected]=\"isMonthSelected(monthIndex)\"\n [attr.aria-disabled]=\"!monthSelectable(monthIndex) || null\"\n (click)=\"pickMonth(monthIndex)\"\n (keydown)=\"onMonthKeydown($event, monthIndex)\"\n >{{ names().monthNamesShort[monthIndex] }}</span\n >\n }\n </div>\n }\n </div>\n }\n @case ('year') {\n <div\n role=\"grid\"\n class=\"tx-datepicker__year-view\"\n [attr.aria-label]=\"translations().chooseYear\"\n [class]=\"passThrough().yearView?.class\"\n [style]=\"passThrough().yearView?.style\"\n >\n @for (row of [0, 1, 2, 3, 4]; track row) {\n <div role=\"row\" class=\"tx-datepicker__row\">\n @for (column of [0, 1]; track column) {\n @let year = decade()[row * 2 + column];\n <span\n role=\"gridcell\"\n class=\"tx-datepicker__year\"\n [class.tx-datepicker__year--selected]=\"isYearSelected(year)\"\n [class.tx-datepicker__year--disabled]=\"!yearSelectable(year)\"\n [class]=\"passThrough().year?.class\"\n [style]=\"passThrough().year?.style\"\n [attr.data-active]=\"focusedYear() === year || null\"\n [attr.tabindex]=\"focusedYear() === year ? 0 : -1\"\n [attr.aria-selected]=\"isYearSelected(year)\"\n [attr.aria-disabled]=\"!yearSelectable(year) || null\"\n (click)=\"pickYear(year)\"\n (keydown)=\"onYearKeydown($event, year)\"\n >{{ year }}</span\n >\n }\n </div>\n }\n </div>\n }\n }\n </div>\n }\n </div>\n }\n\n @if (hasTime() && currentView() === 'date') {\n <div class=\"tx-datepicker__time\" [class]=\"passThrough().timePicker?.class\" [style]=\"passThrough().timePicker?.style\">\n <ng-container [ngTemplateOutlet]=\"spinner\" [ngTemplateOutletContext]=\"{ unit: 'hour', value: hours() }\" />\n <span class=\"tx-datepicker__time-separator\" aria-hidden=\"true\">{{ timeSeparator() }}</span>\n <ng-container [ngTemplateOutlet]=\"spinner\" [ngTemplateOutletContext]=\"{ unit: 'minute', value: minutes() }\" />\n @if (showSeconds()) {\n <span class=\"tx-datepicker__time-separator\" aria-hidden=\"true\">{{ timeSeparator() }}</span>\n <ng-container [ngTemplateOutlet]=\"spinner\" [ngTemplateOutletContext]=\"{ unit: 'second', value: seconds() }\" />\n }\n @if (hourFormat() === '12') {\n <div class=\"tx-datepicker__time-unit\">\n <button\n txButton\n type=\"button\"\n icon=\"chevron-up\"\n severity=\"secondary\"\n variant=\"text\"\n [rounded]=\"true\"\n [unstyled]=\"isUnstyled()\"\n [disabled]=\"!isEditable()\"\n [attr.aria-label]=\"translations().toggleAmPm\"\n (click)=\"toggleMeridiem()\"\n ></button>\n <span class=\"tx-datepicker__time-value\">{{ isPm() ? translations().pm : translations().am }}</span>\n <button\n txButton\n type=\"button\"\n icon=\"chevron-down\"\n severity=\"secondary\"\n variant=\"text\"\n [rounded]=\"true\"\n [unstyled]=\"isUnstyled()\"\n [disabled]=\"!isEditable()\"\n [attr.aria-label]=\"translations().toggleAmPm\"\n (click)=\"toggleMeridiem()\"\n ></button>\n </div>\n }\n </div>\n }\n\n @if (showButtonBar()) {\n <div class=\"tx-datepicker__buttonbar\" [class]=\"passThrough().buttonbar?.class\" [style]=\"passThrough().buttonbar?.style\">\n @if (buttonBarTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ today: selectToday.bind(this), clear: onClearButton.bind(this) }\" />\n } @else {\n <button\n txButton\n type=\"button\"\n size=\"small\"\n severity=\"secondary\"\n variant=\"text\"\n [unstyled]=\"isUnstyled()\"\n [label]=\"translations().today\"\n [disabled]=\"!isEditable()\"\n (click)=\"selectToday()\"\n ></button>\n <button\n txButton\n type=\"button\"\n size=\"small\"\n severity=\"secondary\"\n variant=\"text\"\n [unstyled]=\"isUnstyled()\"\n [label]=\"translations().clear\"\n [disabled]=\"!isEditable()\"\n (click)=\"onClearButton()\"\n ></button>\n }\n </div>\n }\n @if (footerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" />\n }\n </div>\n</ng-template>\n\n<ng-template #spinner let-unit=\"unit\" let-value=\"value\">\n <div class=\"tx-datepicker__time-unit\" role=\"group\" [attr.aria-label]=\"unit === 'hour' ? translations().hour : unit === 'minute' ? translations().minute : translations().second\">\n <button\n txButton\n type=\"button\"\n icon=\"chevron-up\"\n severity=\"secondary\"\n variant=\"text\"\n [rounded]=\"true\"\n [unstyled]=\"isUnstyled()\"\n [disabled]=\"!isEditable()\"\n [attr.aria-label]=\"unit === 'hour' ? translations().nextHour : unit === 'minute' ? translations().nextMinute : translations().nextSecond\"\n (pointerdown)=\"startRepeat($event, unit, 1)\"\n (pointerup)=\"stopRepeat()\"\n (pointerleave)=\"stopRepeat()\"\n (pointercancel)=\"stopRepeat()\"\n (keydown)=\"onTimeKeydown($event, unit, 1)\"\n ></button>\n <span class=\"tx-datepicker__time-value\" aria-live=\"polite\">{{ formatPart(value) }}</span>\n <button\n txButton\n type=\"button\"\n icon=\"chevron-down\"\n severity=\"secondary\"\n variant=\"text\"\n [rounded]=\"true\"\n [unstyled]=\"isUnstyled()\"\n [disabled]=\"!isEditable()\"\n [attr.aria-label]=\"unit === 'hour' ? translations().previousHour : unit === 'minute' ? translations().previousMinute : translations().previousSecond\"\n (pointerdown)=\"startRepeat($event, unit, -1)\"\n (pointerup)=\"stopRepeat()\"\n (pointerleave)=\"stopRepeat()\"\n (pointercancel)=\"stopRepeat()\"\n (keydown)=\"onTimeKeydown($event, unit, -1)\"\n ></button>\n </div>\n</ng-template>\n",
2092
+ styles: [":host{display:inline-flex;max-width:100%;vertical-align:top}:host(.tx-datepicker--fluid){display:flex;width:100%}:host(.tx-datepicker--inline){display:inline-block}.tx-datepicker__field{position:relative;display:flex;flex:1 1 auto;align-items:stretch;min-width:0}.tx-datepicker__input{flex:1 1 auto;width:1%;min-width:0}.tx-datepicker__clear,.tx-datepicker__input-icon{position:absolute;top:50%;transform:translateY(-50%)}.tx-datepicker__dropdown{display:inline-flex;flex:none;align-items:center;justify-content:center;cursor:pointer}.tx-datepicker__nav--hidden{visibility:hidden}:host([data-styled]){--_icon-room: 0px;--_clear-room: 0px}:host([data-styled]) .tx-datepicker__input{--tx-field-inset-end: calc(var(--_icon-room) + var(--_clear-room))}:host([data-styled]) .tx-datepicker__clear{display:grid;place-items:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}:host([data-styled]) .tx-datepicker__clear:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}:host([data-styled]) .tx-datepicker__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}:host([data-styled]) .tx-datepicker__clear{right:calc(var(--_icon-room) + var(--_button-room, 0px) + 8px)}:host([data-styled]) .tx-datepicker__input-icon{right:var(--tx-form-field-padding-x);display:inline-flex;color:var(--tx-date-picker-input-icon-color);font-size:var(--tx-form-field-font-size);line-height:1;cursor:pointer}:host([data-styled]) .tx-datepicker__dropdown{box-sizing:border-box;width:var(--tx-date-picker-dropdown-width);padding:0;border:1px solid var(--tx-date-picker-dropdown-border-color);border-inline-start:0 none;border-start-end-radius:var(--tx-date-picker-dropdown-border-radius);border-end-end-radius:var(--tx-date-picker-dropdown-border-radius);outline-color:transparent;background:var(--tx-date-picker-dropdown-background);color:var(--tx-date-picker-dropdown-color);font-size:var(--tx-form-field-font-size);transition:background-color var(--tx-date-picker-transition-duration),color var(--tx-date-picker-transition-duration),border-color var(--tx-date-picker-transition-duration),outline-color var(--tx-date-picker-transition-duration)}:host([data-styled]) .tx-datepicker__dropdown:not(:disabled):hover{border-color:var(--tx-date-picker-dropdown-hover-border-color);background:var(--tx-date-picker-dropdown-hover-background);color:var(--tx-date-picker-dropdown-hover-color)}:host([data-styled]) .tx-datepicker__dropdown:not(:disabled):active{border-color:var(--tx-date-picker-dropdown-active-border-color);background:var(--tx-date-picker-dropdown-active-background);color:var(--tx-date-picker-dropdown-active-color)}:host([data-styled]) .tx-datepicker__dropdown:focus-visible{outline:var(--tx-date-picker-dropdown-focus-ring-width) var(--tx-date-picker-dropdown-focus-ring-style) var(--tx-date-picker-dropdown-focus-ring-color);outline-offset:var(--tx-date-picker-dropdown-focus-ring-offset);box-shadow:var(--tx-date-picker-dropdown-focus-ring-shadow)}:host([data-styled]) .tx-datepicker__dropdown:disabled{cursor:not-allowed;opacity:.6}:host([data-styled]:has(.tx-datepicker__input-icon)){--_icon-room: calc(var(--tx-form-field-padding-x) + 1em)}:host([data-styled]:has(.tx-datepicker__clear)){--_clear-room: 28px}:host([data-styled].tx-datepicker--button){--_button-room: var(--tx-date-picker-dropdown-width)}:host([data-styled].tx-datepicker--button[data-size=small]){--_button-room: var(--tx-date-picker-dropdown-sm-width)}:host([data-styled].tx-datepicker--button[data-size=large]){--_button-room: var(--tx-date-picker-dropdown-lg-width)}:host([data-styled].tx-datepicker--button) .tx-datepicker__input{border-start-end-radius:0;border-end-end-radius:0}:host([data-styled][data-size=small]) .tx-datepicker__dropdown{width:var(--tx-date-picker-dropdown-sm-width);font-size:var(--tx-form-field-sm-font-size)}:host([data-styled][data-size=large]) .tx-datepicker__dropdown{width:var(--tx-date-picker-dropdown-lg-width);font-size:var(--tx-form-field-lg-font-size)}.tx-datepicker__panel{box-sizing:border-box}.tx-datepicker__calendars{display:flex}.tx-datepicker__header,.tx-datepicker__title,.tx-datepicker__time,.tx-datepicker__buttonbar{display:flex;align-items:center}.tx-datepicker__header,.tx-datepicker__buttonbar{justify-content:space-between}.tx-datepicker__time{justify-content:center}.tx-datepicker__time-unit{display:flex;flex-direction:column;align-items:center}.tx-datepicker__day-view{width:100%;border-collapse:collapse}.tx-datepicker__day-cell{cursor:pointer}.tx-datepicker__day-cell[aria-disabled=true]{cursor:default}.tx-datepicker__day{display:flex;align-items:center;justify-content:center;margin:0 auto}.tx-datepicker__row{display:flex}.tx-datepicker__month,.tx-datepicker__year{display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.tx-datepicker__month{width:33.3%}.tx-datepicker__year{width:50%}.tx-datepicker__month--disabled,.tx-datepicker__year--disabled{cursor:default}.tx-datepicker__panel[data-styled]{padding:var(--tx-date-picker-panel-padding);border:1px solid var(--tx-date-picker-panel-border-color);border-radius:var(--tx-date-picker-panel-border-radius);background:var(--tx-date-picker-panel-background);box-shadow:var(--tx-date-picker-panel-shadow);color:var(--tx-date-picker-panel-color);font-family:var(--tx-font-family)}.tx-datepicker__panel[data-styled].tx-datepicker__panel--inline{display:inline-block;overflow-x:auto;box-shadow:none}.tx-datepicker__panel[data-styled].tx-datepicker__panel--touch{width:var(--tx-date-picker-touch-width);max-height:92vh;overflow:auto}.tx-datepicker__panel[data-styled].tx-datepicker__panel--disabled{opacity:.6}.tx-datepicker__panel[data-styled] .tx-datepicker__calendar{flex:1 1 auto;padding-inline:var(--tx-date-picker-group-gap);border-inline-start:1px solid var(--tx-date-picker-group-border-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__calendar:first-child{padding-inline-start:0;border-inline-start:0 none}.tx-datepicker__panel[data-styled] .tx-datepicker__calendar:last-child{padding-inline-end:0}.tx-datepicker__panel[data-styled] .tx-datepicker__header{padding:var(--tx-date-picker-header-padding);border-bottom:1px solid var(--tx-date-picker-header-border-color);background:var(--tx-date-picker-header-background);color:var(--tx-date-picker-header-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__title{gap:var(--tx-date-picker-title-gap);font-size:var(--tx-date-picker-title-font-size);font-weight:var(--tx-date-picker-title-font-weight)}.tx-datepicker__panel[data-styled] .tx-datepicker__select-month,.tx-datepicker__panel[data-styled] .tx-datepicker__select-year{margin:0;border:none;outline-color:transparent;background:transparent;font-family:inherit;cursor:pointer;transition:background-color var(--tx-date-picker-transition-duration),color var(--tx-date-picker-transition-duration),outline-color var(--tx-date-picker-transition-duration)}.tx-datepicker__panel[data-styled] .tx-datepicker__select-month:focus-visible,.tx-datepicker__panel[data-styled] .tx-datepicker__select-year:focus-visible{outline:var(--tx-date-picker-date-focus-ring-width) var(--tx-date-picker-date-focus-ring-style) var(--tx-date-picker-date-focus-ring-color);outline-offset:var(--tx-date-picker-date-focus-ring-offset)}.tx-datepicker__panel[data-styled] .tx-datepicker__select-month:disabled,.tx-datepicker__panel[data-styled] .tx-datepicker__select-year:disabled{cursor:default}.tx-datepicker__panel[data-styled] .tx-datepicker__select-month{padding:var(--tx-date-picker-select-month-padding);border-radius:var(--tx-date-picker-select-month-border-radius);color:var(--tx-date-picker-select-month-color);font-size:var(--tx-date-picker-select-month-font-size);font-weight:var(--tx-date-picker-select-month-font-weight)}.tx-datepicker__panel[data-styled] .tx-datepicker__select-month:enabled:hover{background:var(--tx-date-picker-select-month-hover-background);color:var(--tx-date-picker-select-month-hover-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__select-year{padding:var(--tx-date-picker-select-year-padding);border-radius:var(--tx-date-picker-select-year-border-radius);color:var(--tx-date-picker-select-year-color);font-size:var(--tx-date-picker-select-year-font-size);font-weight:var(--tx-date-picker-select-year-font-weight)}.tx-datepicker__panel[data-styled] .tx-datepicker__select-year:enabled:hover{background:var(--tx-date-picker-select-year-hover-background);color:var(--tx-date-picker-select-year-hover-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__decade{padding:var(--tx-date-picker-select-year-padding)}.tx-datepicker__panel[data-styled] .tx-datepicker__day-view{margin:var(--tx-date-picker-day-view-margin);font-size:var(--tx-date-picker-date-font-size)}.tx-datepicker__panel[data-styled] .tx-datepicker__weekday{padding:var(--tx-date-picker-week-day-padding);color:var(--tx-date-picker-week-day-color);font-size:var(--tx-date-picker-week-day-font-size);font-weight:var(--tx-date-picker-week-day-font-weight)}.tx-datepicker__panel[data-styled] .tx-datepicker__week-number{padding:var(--tx-date-picker-date-padding);color:var(--tx-date-picker-week-number-color);font-size:var(--tx-date-picker-week-number-font-size);font-weight:var(--tx-date-picker-date-font-weight);text-align:center}.tx-datepicker__panel[data-styled] .tx-datepicker__day-cell{padding:var(--tx-date-picker-date-padding);outline:none}.tx-datepicker__panel[data-styled] .tx-datepicker__day{box-sizing:border-box;width:var(--tx-date-picker-date-width);height:var(--tx-date-picker-date-height);border:1px solid transparent;border-radius:var(--tx-date-picker-date-border-radius);color:var(--tx-date-picker-date-color);font-size:var(--tx-date-picker-date-font-size);font-weight:var(--tx-date-picker-date-font-weight);transition:background-color var(--tx-date-picker-transition-duration),color var(--tx-date-picker-transition-duration),box-shadow var(--tx-date-picker-transition-duration)}.tx-datepicker__panel[data-styled] .tx-datepicker__day-cell--today .tx-datepicker__day{background:var(--tx-date-picker-today-background);color:var(--tx-date-picker-today-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__day-cell:not([aria-disabled=true]):hover .tx-datepicker__day:not(.tx-datepicker__day--selected,.tx-datepicker__day--preview){background:var(--tx-date-picker-date-hover-background);color:var(--tx-date-picker-date-hover-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__day-cell:focus-visible .tx-datepicker__day{outline:var(--tx-date-picker-date-focus-ring-width) var(--tx-date-picker-date-focus-ring-style) var(--tx-date-picker-date-focus-ring-color);outline-offset:var(--tx-date-picker-date-focus-ring-offset);box-shadow:var(--tx-date-picker-date-focus-ring-shadow)}.tx-datepicker__panel[data-styled] .tx-datepicker__day--range,.tx-datepicker__panel[data-styled] .tx-datepicker__day--preview,.tx-datepicker__panel[data-styled] .tx-datepicker__day-cell--today .tx-datepicker__day--range,.tx-datepicker__panel[data-styled] .tx-datepicker__day-cell--today .tx-datepicker__day--preview{background:var(--tx-date-picker-date-range-selected-background);color:var(--tx-date-picker-date-range-selected-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__day--selected,.tx-datepicker__panel[data-styled] .tx-datepicker__day-cell--today .tx-datepicker__day--selected{background:var(--tx-date-picker-date-selected-background);color:var(--tx-date-picker-date-selected-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__day--disabled{opacity:var(--tx-date-picker-date-disabled-opacity)}.tx-datepicker__panel[data-styled] .tx-datepicker__month-view{margin:var(--tx-date-picker-month-view-margin)}.tx-datepicker__panel[data-styled] .tx-datepicker__year-view{margin:var(--tx-date-picker-year-view-margin)}.tx-datepicker__panel[data-styled] .tx-datepicker__month,.tx-datepicker__panel[data-styled] .tx-datepicker__year{box-sizing:border-box;outline-color:transparent;color:var(--tx-date-picker-date-color);font-size:var(--tx-date-picker-date-font-size);font-weight:var(--tx-date-picker-date-font-weight);transition:background-color var(--tx-date-picker-transition-duration),color var(--tx-date-picker-transition-duration),outline-color var(--tx-date-picker-transition-duration)}.tx-datepicker__panel[data-styled] .tx-datepicker__month:not(.tx-datepicker__month--disabled,.tx-datepicker__year--disabled,.tx-datepicker__month--selected,.tx-datepicker__year--selected):hover,.tx-datepicker__panel[data-styled] .tx-datepicker__year:not(.tx-datepicker__month--disabled,.tx-datepicker__year--disabled,.tx-datepicker__month--selected,.tx-datepicker__year--selected):hover{background:var(--tx-date-picker-date-hover-background);color:var(--tx-date-picker-date-hover-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__month:focus-visible,.tx-datepicker__panel[data-styled] .tx-datepicker__year:focus-visible{outline:var(--tx-date-picker-date-focus-ring-width) var(--tx-date-picker-date-focus-ring-style) var(--tx-date-picker-date-focus-ring-color);outline-offset:var(--tx-date-picker-date-focus-ring-offset)}.tx-datepicker__panel[data-styled] .tx-datepicker__month{padding:var(--tx-date-picker-month-padding);border-radius:var(--tx-date-picker-month-border-radius)}.tx-datepicker__panel[data-styled] .tx-datepicker__year{padding:var(--tx-date-picker-year-padding);border-radius:var(--tx-date-picker-year-border-radius)}.tx-datepicker__panel[data-styled] .tx-datepicker__month--selected,.tx-datepicker__panel[data-styled] .tx-datepicker__year--selected{background:var(--tx-date-picker-date-selected-background);color:var(--tx-date-picker-date-selected-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__month--disabled,.tx-datepicker__panel[data-styled] .tx-datepicker__year--disabled{opacity:var(--tx-date-picker-date-disabled-opacity)}.tx-datepicker__panel[data-styled] .tx-datepicker__time{gap:var(--tx-date-picker-time-picker-gap);padding:0;color:var(--tx-date-picker-time-picker-color);font-size:var(--tx-date-picker-time-picker-font-size);font-weight:var(--tx-date-picker-time-picker-font-weight)}.tx-datepicker__panel[data-styled] .tx-datepicker__calendars+.tx-datepicker__time{margin-top:var(--tx-date-picker-time-picker-gap);padding:var(--tx-date-picker-time-picker-padding);border-top:1px solid var(--tx-date-picker-time-picker-border-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__time-unit{gap:var(--tx-date-picker-time-picker-button-gap)}.tx-datepicker__panel[data-styled] .tx-datepicker__time-value{font-variant-numeric:tabular-nums}.tx-datepicker__panel[data-styled] .tx-datepicker__buttonbar{padding:var(--tx-date-picker-buttonbar-padding);border-top:1px solid var(--tx-date-picker-buttonbar-border-color)}.tx-datepicker__panel[data-styled] .tx-datepicker__calendars+.tx-datepicker__buttonbar,.tx-datepicker__panel[data-styled] .tx-datepicker__time+.tx-datepicker__buttonbar{margin-top:var(--tx-date-picker-time-picker-gap)}.tx-datepicker__panel[data-styled] .tx-datepicker__month-view,.tx-datepicker__panel[data-styled] .tx-datepicker__year-view,.tx-datepicker__panel[data-styled] .tx-datepicker__day-view{animation:tx-datepicker-view var(--tx-date-picker-transition-duration) ease-out}@keyframes tx-datepicker-view{0%{opacity:0}}@media(prefers-reduced-motion:reduce){.tx-datepicker__panel[data-styled] .tx-datepicker__month-view,.tx-datepicker__panel[data-styled] .tx-datepicker__year-view,.tx-datepicker__panel[data-styled] .tx-datepicker__day-view{animation:none}}\n"]
2093
+ }]
2094
+ }],
2095
+ propDecorators: {
2096
+ selectionMode: [{
2097
+ type: i0.Input,
2098
+ args: [{
2099
+ isSignal: true,
2100
+ alias: "selectionMode",
2101
+ required: false
2102
+ }]
2103
+ }],
2104
+ dateFormat: [{
2105
+ type: i0.Input,
2106
+ args: [{
2107
+ isSignal: true,
2108
+ alias: "dateFormat",
2109
+ required: false
2110
+ }]
2111
+ }],
2112
+ placeholder: [{
2113
+ type: i0.Input,
2114
+ args: [{
2115
+ isSignal: true,
2116
+ alias: "placeholder",
2117
+ required: false
2118
+ }]
2119
+ }],
2120
+ inputId: [{
2121
+ type: i0.Input,
2122
+ args: [{
2123
+ isSignal: true,
2124
+ alias: "inputId",
2125
+ required: false
2126
+ }]
2127
+ }],
2128
+ name: [{
2129
+ type: i0.Input,
2130
+ args: [{
2131
+ isSignal: true,
2132
+ alias: "name",
2133
+ required: false
2134
+ }]
2135
+ }],
2136
+ ariaLabel: [{
2137
+ type: i0.Input,
2138
+ args: [{
2139
+ isSignal: true,
2140
+ alias: "ariaLabel",
2141
+ required: false
2142
+ }]
2143
+ }],
2144
+ ariaLabelledBy: [{
2145
+ type: i0.Input,
2146
+ args: [{
2147
+ isSignal: true,
2148
+ alias: "ariaLabelledBy",
2149
+ required: false
2150
+ }]
2151
+ }],
2152
+ iconAriaLabel: [{
2153
+ type: i0.Input,
2154
+ args: [{
2155
+ isSignal: true,
2156
+ alias: "iconAriaLabel",
2157
+ required: false
2158
+ }]
2159
+ }],
2160
+ inline: [{
2161
+ type: i0.Input,
2162
+ args: [{
2163
+ isSignal: true,
2164
+ alias: "inline",
2165
+ required: false
2166
+ }]
2167
+ }],
2168
+ showIcon: [{
2169
+ type: i0.Input,
2170
+ args: [{
2171
+ isSignal: true,
2172
+ alias: "showIcon",
2173
+ required: false
2174
+ }]
2175
+ }],
2176
+ iconDisplay: [{
2177
+ type: i0.Input,
2178
+ args: [{
2179
+ isSignal: true,
2180
+ alias: "iconDisplay",
2181
+ required: false
2182
+ }]
2183
+ }],
2184
+ icon: [{
2185
+ type: i0.Input,
2186
+ args: [{
2187
+ isSignal: true,
2188
+ alias: "icon",
2189
+ required: false
2190
+ }]
2191
+ }],
2192
+ showClear: [{
2193
+ type: i0.Input,
2194
+ args: [{
2195
+ isSignal: true,
2196
+ alias: "showClear",
2197
+ required: false
2198
+ }]
2199
+ }],
2200
+ showButtonBar: [{
2201
+ type: i0.Input,
2202
+ args: [{
2203
+ isSignal: true,
2204
+ alias: "showButtonBar",
2205
+ required: false
2206
+ }]
2207
+ }],
2208
+ showOtherMonths: [{
2209
+ type: i0.Input,
2210
+ args: [{
2211
+ isSignal: true,
2212
+ alias: "showOtherMonths",
2213
+ required: false
2214
+ }]
2215
+ }],
2216
+ selectOtherMonths: [{
2217
+ type: i0.Input,
2218
+ args: [{
2219
+ isSignal: true,
2220
+ alias: "selectOtherMonths",
2221
+ required: false
2222
+ }]
2223
+ }],
2224
+ showWeek: [{
2225
+ type: i0.Input,
2226
+ args: [{
2227
+ isSignal: true,
2228
+ alias: "showWeek",
2229
+ required: false
2230
+ }]
2231
+ }],
2232
+ startWeekFromFirstDayOfYear: [{
2233
+ type: i0.Input,
2234
+ args: [{
2235
+ isSignal: true,
2236
+ alias: "startWeekFromFirstDayOfYear",
2237
+ required: false
2238
+ }]
2239
+ }],
2240
+ showTime: [{
2241
+ type: i0.Input,
2242
+ args: [{
2243
+ isSignal: true,
2244
+ alias: "showTime",
2245
+ required: false
2246
+ }]
2247
+ }],
2248
+ timeOnly: [{
2249
+ type: i0.Input,
2250
+ args: [{
2251
+ isSignal: true,
2252
+ alias: "timeOnly",
2253
+ required: false
2254
+ }]
2255
+ }],
2256
+ hourFormat: [{
2257
+ type: i0.Input,
2258
+ args: [{
2259
+ isSignal: true,
2260
+ alias: "hourFormat",
2261
+ required: false
2262
+ }]
2263
+ }],
2264
+ showSeconds: [{
2265
+ type: i0.Input,
2266
+ args: [{
2267
+ isSignal: true,
2268
+ alias: "showSeconds",
2269
+ required: false
2270
+ }]
2271
+ }],
2272
+ stepHour: [{
2273
+ type: i0.Input,
2274
+ args: [{
2275
+ isSignal: true,
2276
+ alias: "stepHour",
2277
+ required: false
2278
+ }]
2279
+ }],
2280
+ stepMinute: [{
2281
+ type: i0.Input,
2282
+ args: [{
2283
+ isSignal: true,
2284
+ alias: "stepMinute",
2285
+ required: false
2286
+ }]
2287
+ }],
2288
+ stepSecond: [{
2289
+ type: i0.Input,
2290
+ args: [{
2291
+ isSignal: true,
2292
+ alias: "stepSecond",
2293
+ required: false
2294
+ }]
2295
+ }],
2296
+ timeSeparator: [{
2297
+ type: i0.Input,
2298
+ args: [{
2299
+ isSignal: true,
2300
+ alias: "timeSeparator",
2301
+ required: false
2302
+ }]
2303
+ }],
2304
+ view: [{
2305
+ type: i0.Input,
2306
+ args: [{
2307
+ isSignal: true,
2308
+ alias: "view",
2309
+ required: false
2310
+ }]
2311
+ }],
2312
+ numberOfMonths: [{
2313
+ type: i0.Input,
2314
+ args: [{
2315
+ isSignal: true,
2316
+ alias: "numberOfMonths",
2317
+ required: false
2318
+ }]
2319
+ }],
2320
+ responsiveOptions: [{
2321
+ type: i0.Input,
2322
+ args: [{
2323
+ isSignal: true,
2324
+ alias: "responsiveOptions",
2325
+ required: false
2326
+ }]
2327
+ }],
2328
+ firstDayOfWeek: [{
2329
+ type: i0.Input,
2330
+ args: [{
2331
+ isSignal: true,
2332
+ alias: "firstDayOfWeek",
2333
+ required: false
2334
+ }]
2335
+ }],
2336
+ minDate: [{
2337
+ type: i0.Input,
2338
+ args: [{
2339
+ isSignal: true,
2340
+ alias: "minDate",
2341
+ required: false
2342
+ }]
2343
+ }],
2344
+ maxDate: [{
2345
+ type: i0.Input,
2346
+ args: [{
2347
+ isSignal: true,
2348
+ alias: "maxDate",
2349
+ required: false
2350
+ }]
2351
+ }],
2352
+ disabledDates: [{
2353
+ type: i0.Input,
2354
+ args: [{
2355
+ isSignal: true,
2356
+ alias: "disabledDates",
2357
+ required: false
2358
+ }]
2359
+ }],
2360
+ disabledDays: [{
2361
+ type: i0.Input,
2362
+ args: [{
2363
+ isSignal: true,
2364
+ alias: "disabledDays",
2365
+ required: false
2366
+ }]
2367
+ }],
2368
+ maxDateCount: [{
2369
+ type: i0.Input,
2370
+ args: [{
2371
+ isSignal: true,
2372
+ alias: "maxDateCount",
2373
+ required: false
2374
+ }]
2375
+ }],
2376
+ defaultDate: [{
2377
+ type: i0.Input,
2378
+ args: [{
2379
+ isSignal: true,
2380
+ alias: "defaultDate",
2381
+ required: false
2382
+ }]
2383
+ }],
2384
+ readonlyInput: [{
2385
+ type: i0.Input,
2386
+ args: [{
2387
+ isSignal: true,
2388
+ alias: "readonlyInput",
2389
+ required: false
2390
+ }]
2391
+ }],
2392
+ keepInvalid: [{
2393
+ type: i0.Input,
2394
+ args: [{
2395
+ isSignal: true,
2396
+ alias: "keepInvalid",
2397
+ required: false
2398
+ }]
2399
+ }],
2400
+ hideOnDateTimeSelect: [{
2401
+ type: i0.Input,
2402
+ args: [{
2403
+ isSignal: true,
2404
+ alias: "hideOnDateTimeSelect",
2405
+ required: false
2406
+ }]
2407
+ }],
2408
+ showOnFocus: [{
2409
+ type: i0.Input,
2410
+ args: [{
2411
+ isSignal: true,
2412
+ alias: "showOnFocus",
2413
+ required: false
2414
+ }]
2415
+ }],
2416
+ touchUI: [{
2417
+ type: i0.Input,
2418
+ args: [{
2419
+ isSignal: true,
2420
+ alias: "touchUI",
2421
+ required: false
2422
+ }]
2423
+ }],
2424
+ dataType: [{
2425
+ type: i0.Input,
2426
+ args: [{
2427
+ isSignal: true,
2428
+ alias: "dataType",
2429
+ required: false
2430
+ }]
2431
+ }],
2432
+ multipleSeparator: [{
2433
+ type: i0.Input,
2434
+ args: [{
2435
+ isSignal: true,
2436
+ alias: "multipleSeparator",
2437
+ required: false
2438
+ }]
2439
+ }],
2440
+ rangeSeparator: [{
2441
+ type: i0.Input,
2442
+ args: [{
2443
+ isSignal: true,
2444
+ alias: "rangeSeparator",
2445
+ required: false
2446
+ }]
2447
+ }],
2448
+ shortYearCutoff: [{
2449
+ type: i0.Input,
2450
+ args: [{
2451
+ isSignal: true,
2452
+ alias: "shortYearCutoff",
2453
+ required: false
2454
+ }]
2455
+ }],
2456
+ size: [{
2457
+ type: i0.Input,
2458
+ args: [{
2459
+ isSignal: true,
2460
+ alias: "size",
2461
+ required: false
2462
+ }]
2463
+ }],
2464
+ variant: [{
2465
+ type: i0.Input,
2466
+ args: [{
2467
+ isSignal: true,
2468
+ alias: "variant",
2469
+ required: false
2470
+ }]
2471
+ }],
2472
+ fluid: [{
2473
+ type: i0.Input,
2474
+ args: [{
2475
+ isSignal: true,
2476
+ alias: "fluid",
2477
+ required: false
2478
+ }]
2479
+ }],
2480
+ invalid: [{
2481
+ type: i0.Input,
2482
+ args: [{
2483
+ isSignal: true,
2484
+ alias: "invalid",
2485
+ required: false
2486
+ }]
2487
+ }],
2488
+ disabledInput: [{
2489
+ type: i0.Input,
2490
+ args: [{
2491
+ isSignal: true,
2492
+ alias: "disabled",
2493
+ required: false
2494
+ }]
2495
+ }],
2496
+ readonly: [{
2497
+ type: i0.Input,
2498
+ args: [{
2499
+ isSignal: true,
2500
+ alias: "readonly",
2501
+ required: false
2502
+ }]
2503
+ }],
2504
+ required: [{
2505
+ type: i0.Input,
2506
+ args: [{
2507
+ isSignal: true,
2508
+ alias: "required",
2509
+ required: false
2510
+ }]
2511
+ }],
2512
+ dt: [{
2513
+ type: i0.Input,
2514
+ args: [{
2515
+ isSignal: true,
2516
+ alias: "dt",
2517
+ required: false
2518
+ }]
2519
+ }],
2520
+ pt: [{
2521
+ type: i0.Input,
2522
+ args: [{
2523
+ isSignal: true,
2524
+ alias: "pt",
2525
+ required: false
2526
+ }]
2527
+ }],
2528
+ ptOptions: [{
2529
+ type: i0.Input,
2530
+ args: [{
2531
+ isSignal: true,
2532
+ alias: "ptOptions",
2533
+ required: false
2534
+ }]
2535
+ }],
2536
+ unstyled: [{
2537
+ type: i0.Input,
2538
+ args: [{
2539
+ isSignal: true,
2540
+ alias: "unstyled",
2541
+ required: false
2542
+ }]
2543
+ }],
2544
+ selected: [{
2545
+ type: i0.Output,
2546
+ args: ["selected"]
2547
+ }],
2548
+ cleared: [{
2549
+ type: i0.Output,
2550
+ args: ["cleared"]
2551
+ }],
2552
+ todayClicked: [{
2553
+ type: i0.Output,
2554
+ args: ["todayClicked"]
2555
+ }],
2556
+ clearClicked: [{
2557
+ type: i0.Output,
2558
+ args: ["clearClicked"]
2559
+ }],
2560
+ monthChange: [{
2561
+ type: i0.Output,
2562
+ args: ["monthChange"]
2563
+ }],
2564
+ yearChange: [{
2565
+ type: i0.Output,
2566
+ args: ["yearChange"]
2567
+ }],
2568
+ opened: [{
2569
+ type: i0.Output,
2570
+ args: ["opened"]
2571
+ }],
2572
+ closed: [{
2573
+ type: i0.Output,
2574
+ args: ["closed"]
2575
+ }],
2576
+ focused: [{
2577
+ type: i0.Output,
2578
+ args: ["focused"]
2579
+ }],
2580
+ blurred: [{
2581
+ type: i0.Output,
2582
+ args: ["blurred"]
2583
+ }],
2584
+ typed: [{
2585
+ type: i0.Output,
2586
+ args: ["typed"]
2587
+ }],
2588
+ dateTemplate: [{
2589
+ type: i0.ContentChild,
2590
+ args: [i0.forwardRef(() => TxDatePickerDate), { isSignal: true }]
2591
+ }],
2592
+ headerTemplate: [{
2593
+ type: i0.ContentChild,
2594
+ args: [i0.forwardRef(() => TxDatePickerHeader), { isSignal: true }]
2595
+ }],
2596
+ footerTemplate: [{
2597
+ type: i0.ContentChild,
2598
+ args: [i0.forwardRef(() => TxDatePickerFooter), { isSignal: true }]
2599
+ }],
2600
+ decadeTemplate: [{
2601
+ type: i0.ContentChild,
2602
+ args: [i0.forwardRef(() => TxDatePickerDecade), { isSignal: true }]
2603
+ }],
2604
+ buttonBarTemplate: [{
2605
+ type: i0.ContentChild,
2606
+ args: [i0.forwardRef(() => TxDatePickerButtonBar), { isSignal: true }]
2607
+ }],
2608
+ triggerIconTemplate: [{
2609
+ type: i0.ContentChild,
2610
+ args: [i0.forwardRef(() => TxDatePickerTriggerIcon), { isSignal: true }]
2611
+ }],
2612
+ inputIconTemplate: [{
2613
+ type: i0.ContentChild,
2614
+ args: [i0.forwardRef(() => TxDatePickerInputIcon), { isSignal: true }]
2615
+ }],
2616
+ inputRef: [{
2617
+ type: i0.ViewChild,
2618
+ args: ["input", { isSignal: true }]
2619
+ }],
2620
+ fieldRef: [{
2621
+ type: i0.ViewChild,
2622
+ args: ["field", { isSignal: true }]
2623
+ }],
2624
+ panelRef: [{
2625
+ type: i0.ViewChild,
2626
+ args: ["panel", { isSignal: true }]
2627
+ }],
2628
+ panelTemplate: [{
2629
+ type: i0.ViewChild,
2630
+ args: ["panelTemplate", { isSignal: true }]
2631
+ }],
2632
+ connectedOverlay: [{
2633
+ type: i0.ViewChild,
2634
+ args: [i0.forwardRef(() => CdkConnectedOverlay), { isSignal: true }]
2635
+ }]
2636
+ }
2637
+ });
2638
+ export { TxDatePicker, TxDatePickerButtonBar, TxDatePickerDate, TxDatePickerDecade, TxDatePickerFooter, TxDatePickerHeader, TxDatePickerInputIcon, TxDatePickerTriggerIcon, addDays, addMonths, buildMonth, compareDays, dateNames, formatDate, formatTime, isMonthSelectable, isSelectable, isYearSelectable, parseDate, parseTime, resolveCutoff, sameDay, startOfDay, weekNumber, weekdayOrder };
2639
+
2640
+ //# sourceMappingURL=tectra-ng-ui-datepicker.mjs.map