@nanahoshi/mona-ui 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/auto-complete/package.json +4 -0
  2. package/avatar/package.json +4 -0
  3. package/breadcrumb/package.json +4 -0
  4. package/button/package.json +4 -0
  5. package/button-group/package.json +4 -0
  6. package/calendar/package.json +4 -0
  7. package/check-box/package.json +4 -0
  8. package/chip/package.json +4 -0
  9. package/circular-progress-bar/package.json +4 -0
  10. package/color-gradient/package.json +4 -0
  11. package/color-palette/package.json +4 -0
  12. package/color-picker/package.json +4 -0
  13. package/combo-box/package.json +4 -0
  14. package/common/package.json +4 -0
  15. package/contextmenu/package.json +4 -0
  16. package/date-input/package.json +4 -0
  17. package/date-picker/package.json +4 -0
  18. package/datetime-picker/package.json +4 -0
  19. package/dialog/package.json +4 -0
  20. package/dropdown-button/package.json +4 -0
  21. package/dropdown-list/package.json +4 -0
  22. package/dropdowns/package.json +4 -0
  23. package/editor/package.json +4 -0
  24. package/expansion-panel/package.json +4 -0
  25. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +40 -55
  26. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +24 -58
  27. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +37 -48
  28. package/fesm2022/nanahoshi-mona-ui-button.mjs +130 -129
  29. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +69 -165
  30. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +81 -128
  31. package/fesm2022/nanahoshi-mona-ui-chip.mjs +102 -112
  32. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +11 -25
  33. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +41 -92
  34. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +27 -49
  35. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +64 -65
  36. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +39 -61
  37. package/fesm2022/nanahoshi-mona-ui-date-input.mjs +12 -15
  38. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +44 -33
  39. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +58 -60
  40. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +52 -165
  41. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +36 -59
  42. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +56 -61
  43. package/fesm2022/nanahoshi-mona-ui-editor.mjs +302 -81
  44. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +33 -84
  45. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +12 -45
  46. package/fesm2022/nanahoshi-mona-ui-filter.mjs +18 -48
  47. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-cell.component-B9SQH5N-.mjs → nanahoshi-mona-ui-grid-grid-footer-cell.component-B6FBLtrr.mjs} +14 -14
  48. package/fesm2022/{nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-DlLwcCFT.mjs → nanahoshi-mona-ui-grid-grid-footer-table-cell.directive-OJe4UYuw.mjs} +4 -8
  49. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-DCd8K6ng.mjs +121 -0
  50. package/fesm2022/{nanahoshi-mona-ui-grid-grid-toggle.component-DIUutx9s.mjs → nanahoshi-mona-ui-grid-grid-toggle.component-Dl8Hlkhj.mjs} +26 -55
  51. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-C5FRZlvv.mjs +231 -0
  52. package/fesm2022/{nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-C3eZIaJK.mjs → nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-BRZUd8cE.mjs} +167 -451
  53. package/fesm2022/nanahoshi-mona-ui-grid.mjs +1 -1
  54. package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +10 -28
  55. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +57 -87
  56. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +48 -139
  57. package/fesm2022/nanahoshi-mona-ui-internal.mjs +29 -1
  58. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +10 -32
  59. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +8 -21
  60. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +50 -156
  61. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +40 -69
  62. package/fesm2022/nanahoshi-mona-ui-notification.mjs +32 -116
  63. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +81 -107
  64. package/fesm2022/nanahoshi-mona-ui-pager.mjs +33 -85
  65. package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +12 -34
  66. package/fesm2022/nanahoshi-mona-ui-popover.mjs +31 -52
  67. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +38 -110
  68. package/fesm2022/nanahoshi-mona-ui-popup.mjs +4 -4
  69. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +21 -62
  70. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +66 -111
  71. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +60 -151
  72. package/fesm2022/nanahoshi-mona-ui-slider.mjs +117 -173
  73. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +32 -45
  74. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +29 -64
  75. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +38 -101
  76. package/fesm2022/nanahoshi-mona-ui-switch.mjs +58 -79
  77. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +42 -118
  78. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +29 -37
  79. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +60 -81
  80. package/fesm2022/nanahoshi-mona-ui-theme.mjs +1111 -269
  81. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +45 -39
  82. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +45 -109
  83. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +54 -82
  84. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +2 -2
  85. package/fesm2022/nanahoshi-mona-ui-window.mjs +35 -115
  86. package/fieldset/package.json +4 -0
  87. package/filter/package.json +4 -0
  88. package/grid/package.json +4 -0
  89. package/internal/filter-input/package.json +4 -0
  90. package/internal/indicator-icon/package.json +4 -0
  91. package/internal/list/package.json +4 -0
  92. package/internal/package.json +4 -0
  93. package/internal/tree/package.json +4 -0
  94. package/list/package.json +4 -0
  95. package/list-box/package.json +4 -0
  96. package/list-view/package.json +4 -0
  97. package/menubar/package.json +4 -0
  98. package/multi-select/package.json +4 -0
  99. package/notification/package.json +4 -0
  100. package/numeric-text-box/package.json +4 -0
  101. package/package.json +31 -5
  102. package/pager/package.json +4 -0
  103. package/placeholder/package.json +4 -0
  104. package/popover/package.json +4 -0
  105. package/popup/package.json +4 -0
  106. package/popup-menu/package.json +4 -0
  107. package/progress-bar/package.json +4 -0
  108. package/query/package.json +4 -0
  109. package/radio-button/package.json +4 -0
  110. package/scroll-view/package.json +4 -0
  111. package/slider/package.json +4 -0
  112. package/split-button/package.json +4 -0
  113. package/splitter/package.json +4 -0
  114. package/stepper/package.json +4 -0
  115. package/switch/package.json +4 -0
  116. package/tabs/package.json +4 -0
  117. package/text-area/package.json +4 -0
  118. package/text-box/package.json +4 -0
  119. package/theme/package.json +4 -0
  120. package/time-picker/package.json +4 -0
  121. package/time-selector/package.json +4 -0
  122. package/tooltip/package.json +4 -0
  123. package/tree-view/package.json +4 -0
  124. package/types/nanahoshi-mona-ui-auto-complete.d.ts +6 -7
  125. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +4 -6
  126. package/types/nanahoshi-mona-ui-button-group.d.ts +2 -3
  127. package/types/nanahoshi-mona-ui-button.d.ts +6 -6
  128. package/types/nanahoshi-mona-ui-calendar.d.ts +21 -22
  129. package/types/nanahoshi-mona-ui-check-box.d.ts +6 -9
  130. package/types/nanahoshi-mona-ui-chip.d.ts +2 -3
  131. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +2 -4
  132. package/types/nanahoshi-mona-ui-color-gradient.d.ts +10 -11
  133. package/types/nanahoshi-mona-ui-color-palette.d.ts +4 -5
  134. package/types/nanahoshi-mona-ui-color-picker.d.ts +6 -8
  135. package/types/nanahoshi-mona-ui-combo-box.d.ts +6 -7
  136. package/types/nanahoshi-mona-ui-date-input.d.ts +2 -3
  137. package/types/nanahoshi-mona-ui-date-picker.d.ts +2 -3
  138. package/types/nanahoshi-mona-ui-dialog.d.ts +7 -8
  139. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +6 -7
  140. package/types/nanahoshi-mona-ui-dropdowns.d.ts +2 -3
  141. package/types/nanahoshi-mona-ui-editor.d.ts +17 -17
  142. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +8 -10
  143. package/types/nanahoshi-mona-ui-fieldset.d.ts +6 -8
  144. package/types/nanahoshi-mona-ui-filter.d.ts +3 -4
  145. package/types/nanahoshi-mona-ui-grid.d.ts +16 -17
  146. package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +0 -1
  147. package/types/nanahoshi-mona-ui-internal-tree.d.ts +16 -16
  148. package/types/nanahoshi-mona-ui-internal.d.ts +8 -1
  149. package/types/nanahoshi-mona-ui-list-box.d.ts +4 -5
  150. package/types/nanahoshi-mona-ui-list-view.d.ts +2 -3
  151. package/types/nanahoshi-mona-ui-menubar.d.ts +7 -8
  152. package/types/nanahoshi-mona-ui-multi-select.d.ts +8 -9
  153. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +2 -3
  154. package/types/nanahoshi-mona-ui-pager.d.ts +6 -7
  155. package/types/nanahoshi-mona-ui-placeholder.d.ts +4 -6
  156. package/types/nanahoshi-mona-ui-popover.d.ts +8 -9
  157. package/types/nanahoshi-mona-ui-popup-menu.d.ts +12 -13
  158. package/types/nanahoshi-mona-ui-progress-bar.d.ts +8 -9
  159. package/types/nanahoshi-mona-ui-radio-button.d.ts +8 -11
  160. package/types/nanahoshi-mona-ui-scroll-view.d.ts +18 -20
  161. package/types/nanahoshi-mona-ui-slider.d.ts +18 -18
  162. package/types/nanahoshi-mona-ui-split-button.d.ts +2 -3
  163. package/types/nanahoshi-mona-ui-splitter.d.ts +6 -8
  164. package/types/nanahoshi-mona-ui-stepper.d.ts +13 -14
  165. package/types/nanahoshi-mona-ui-switch.d.ts +6 -7
  166. package/types/nanahoshi-mona-ui-tabs.d.ts +15 -17
  167. package/types/nanahoshi-mona-ui-text-area.d.ts +2 -4
  168. package/types/nanahoshi-mona-ui-text-box.d.ts +4 -6
  169. package/types/nanahoshi-mona-ui-theme.d.ts +111 -12
  170. package/types/nanahoshi-mona-ui-time-picker.d.ts +2 -3
  171. package/types/nanahoshi-mona-ui-time-selector.d.ts +10 -11
  172. package/types/nanahoshi-mona-ui-tooltip.d.ts +4 -5
  173. package/types/nanahoshi-mona-ui-window.d.ts +16 -17
  174. package/window/package.json +4 -0
  175. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-Dgea-O0X.mjs +0 -130
  176. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DRHycGIh.mjs +0 -240
@@ -3,12 +3,11 @@ import * as i0 from '@angular/core';
3
3
  import { inject, TemplateRef, Directive, computed, input, output, DestroyRef, ElementRef, signal, contentChild, linkedSignal, model, afterNextRender, effect, untracked, Component } from '@angular/core';
4
4
  import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
5
  import { LucideChevronLeft, LucideChevronRight } from '@lucide/angular';
6
+ import { any, exactly, Dictionary, lastOrDefault, range, index, select } from '@mirei/ts-collections';
6
7
  import { ButtonDirective } from '@nanahoshi/mona-ui/button';
7
8
  import { PreventableEvent, TakeFirstPipe } from '@nanahoshi/mona-ui/common';
8
9
  import { CalendarService } from '@nanahoshi/mona-ui/date-input';
9
- import { createElementControlId, rxTimeout } from '@nanahoshi/mona-ui/internal';
10
- import { ThemeService } from '@nanahoshi/mona-ui/theme';
11
- import { any, exactly, Dictionary, lastOrDefault, range, index, select } from '@mirei/ts-collections';
10
+ import { themeRaisedBackdropClasses, createElementControlId, rxTimeout } from '@nanahoshi/mona-ui/internal';
12
11
  import { DateTime } from 'luxon';
13
12
  import { skip, fromEvent } from 'rxjs';
14
13
  import { twMerge } from 'tailwind-merge';
@@ -56,17 +55,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
56
55
  }]
57
56
  }] });
58
57
 
59
- const calendarBaseVariants = cva(`
60
- flex flex-col gap-2 p-2 min-w-64
61
- bg-background text-foreground
62
- border border-input-border
63
- shadow-sm select-none
64
- data-[invalid='true']:border-error
65
- data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/40
58
+ const calendarBaseThemeVariants = cva(`
59
+ flex min-w-64 flex-col gap-2 p-2
60
+ select-none
61
+ bg-(--mona-calendar-background) ${themeRaisedBackdropClasses} text-foreground
62
+ border border-border shadow-(--mona-calendar-shadow)
63
+ data-[invalid='true']:border-error
64
+ data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
66
65
  `, {
67
66
  variants: {
68
67
  disabled: {
69
- true: "opacity-50 cursor-not-allowed pointer-events-none"
68
+ true: "pointer-events-none cursor-not-allowed opacity-50"
70
69
  },
71
70
  readonly: {
72
71
  true: "pointer-events-none"
@@ -80,31 +79,32 @@ const calendarBaseVariants = cva(`
80
79
  }
81
80
  }
82
81
  });
83
- const calendarHeaderVariants = cva(`
84
- flex items-center justify-center
85
- [&>button+button]:not-focus:border-s-0
86
- [&>button:nth-of-type(2)]:flex-1
87
- [&>button:nth-of-type(3)]:rounded-se-none
88
- [&>button:nth-of-type(3)]:rounded-ee-none
89
- [&>button:nth-of-type(4)]:rounded-ss-none
90
- [&>button:nth-of-type(4)]:rounded-es-none
91
- [&>button]:outline-none
82
+ const calendarHeaderThemeVariants = cva(`
83
+ flex items-center justify-center
84
+ [&>button+button]:not-focus:border-s-0
85
+ [&>button:nth-of-type(2)]:flex-1
86
+ [&>button:nth-of-type(3)]:rounded-se-none
87
+ [&>button:nth-of-type(3)]:rounded-ee-none
88
+ [&>button:nth-of-type(4)]:rounded-ss-none
89
+ [&>button:nth-of-type(4)]:rounded-es-none
90
+ [&>button]:outline-none
92
91
  `);
93
- const calendarMonthViewDayVariants = cva(`
94
- hover:bg-hover cursor-pointer
92
+ const calendarMonthViewDayThemeVariants = cva(`
93
+ cursor-pointer
94
+ hover:bg-hover active:bg-active
95
95
  `, {
96
96
  variants: {
97
97
  disabled: {
98
- true: "opacity-50 cursor-not-allowed pointer-events-none"
98
+ true: "pointer-events-none cursor-not-allowed text-disabled-foreground"
99
99
  },
100
100
  focused: {
101
- true: "ring-1 ring-inset ring-primary/40 bg-accent outline-none"
101
+ true: "bg-hover outline-none ring-2 ring-inset ring-focus-indicator/35"
102
102
  },
103
103
  outside: {
104
- true: "opacity-50"
104
+ true: "text-muted-foreground"
105
105
  },
106
106
  rangePreview: {
107
- true: "bg-primary/20 hover:bg-primary/30"
107
+ true: "bg-active hover:bg-active"
108
108
  },
109
109
  rounded: {
110
110
  none: "rounded-none",
@@ -117,7 +117,7 @@ const calendarMonthViewDayVariants = cva(`
117
117
  true: "bg-primary text-primary-foreground hover:bg-primary-hover"
118
118
  },
119
119
  today: {
120
- true: "font-bold text-primary"
120
+ true: "font-bold text-foreground"
121
121
  }
122
122
  },
123
123
  compoundVariants: [
@@ -131,35 +131,31 @@ const calendarMonthViewDayVariants = cva(`
131
131
  rounded: "medium"
132
132
  }
133
133
  });
134
- const calendarMonthViewGridVariants = cva(`
135
- grid gap-0.5
136
- justify-center
137
- [&>div]:h-full [&>div]:flex
138
- [&>div]:items-center [&>div]:justify-center
139
- [&>div]:aspect-square
134
+ const calendarMonthViewGridThemeVariants = cva(`
135
+ grid justify-center gap-0.5
136
+ [&>div]:aspect-square
137
+ [&>div]:flex [&>div]:h-full
138
+ [&>div]:items-center [&>div]:justify-center
140
139
  `);
141
- const calendarMonthViewGridHeaderVariants = cva(`
142
- grid justify-center
143
- gap-0.5 font-semibold text-sm
144
- [&>div]:h-full [&>div]:flex
145
- [&>div]:items-center [&>div]:justify-center
146
- [&>div]:aspect-square
140
+ const calendarMonthViewGridHeaderThemeVariants = cva(`
141
+ grid justify-center gap-0.5
142
+ text-sm font-semibold text-muted-foreground
143
+ [&>div]:aspect-square
144
+ [&>div]:flex [&>div]:h-full
145
+ [&>div]:items-center [&>div]:justify-center
147
146
  `);
148
- const calendarYearViewGridVariants = cva(`
149
- grid grid-cols-3 gap-0.5
150
- justify-center
151
- [&>div]:h-full [&>div]:flex
152
- [&>div]:items-center [&>div]:justify-center
153
- [&>div]:h-12
147
+ const calendarYearViewGridThemeVariants = cva(`
148
+ grid grid-cols-3 justify-center gap-0.5
149
+ [&>div]:flex [&>div]:h-12
150
+ [&>div]:items-center [&>div]:justify-center
154
151
  `);
155
- const calendarYearViewCellVariants = cva(`
156
- py-2 cursor-pointer
157
- hover:bg-hover
158
- active:bg-active
152
+ const calendarYearViewCellThemeVariants = cva(`
153
+ cursor-pointer py-2
154
+ hover:bg-hover active:bg-active
159
155
  `, {
160
156
  variants: {
161
157
  focused: {
162
- true: "ring-1 ring-inset ring-primary/40 bg-accent outline-none"
158
+ true: "bg-hover outline-none ring-2 ring-inset ring-focus-indicator/35"
163
159
  },
164
160
  rounded: {
165
161
  none: "rounded-none",
@@ -170,21 +166,18 @@ const calendarYearViewCellVariants = cva(`
170
166
  }
171
167
  }
172
168
  });
173
- const calendarDecadeViewGridVariants = cva(`
174
- grid grid-cols-4 gap-0.5
175
- justify-center
176
- [&>div]:h-full [&>div]:flex
177
- [&>div]:items-center [&>div]:justify-center
178
- [&>div]:h-12
169
+ const calendarDecadeViewGridThemeVariants = cva(`
170
+ grid grid-cols-4 justify-center gap-0.5
171
+ [&>div]:flex [&>div]:h-12
172
+ [&>div]:items-center [&>div]:justify-center
179
173
  `);
180
- const calendarDecadeViewCellVariants = cva(`
181
- py-2 cursor-pointer
182
- hover:bg-hover
183
- active:bg-active
174
+ const calendarDecadeViewCellThemeVariants = cva(`
175
+ cursor-pointer py-2
176
+ hover:bg-hover active:bg-active
184
177
  `, {
185
178
  variants: {
186
179
  focused: {
187
- true: "ring-1 ring-inset ring-primary/40 bg-accent outline-none"
180
+ true: "bg-hover outline-none ring-2 ring-inset ring-focus-indicator/35"
188
181
  },
189
182
  rounded: {
190
183
  none: "rounded-none",
@@ -196,89 +189,14 @@ const calendarDecadeViewCellVariants = cva(`
196
189
  }
197
190
  });
198
191
 
199
- const calendarBaseThemeVariants = (theme) => {
200
- switch (theme) {
201
- case "mona":
202
- return calendarBaseVariants;
203
- default:
204
- return calendarBaseVariants;
205
- }
206
- };
207
- const calendarHeaderThemeVariants = (theme) => {
208
- switch (theme) {
209
- case "mona":
210
- return calendarHeaderVariants;
211
- default:
212
- return calendarHeaderVariants;
213
- }
214
- };
215
- const calendarDecadeViewGridThemeVariants = (theme) => {
216
- switch (theme) {
217
- case "mona":
218
- return calendarDecadeViewGridVariants;
219
- default:
220
- return calendarDecadeViewGridVariants;
221
- }
222
- };
223
- const calendarDecadeViewCellThemeVariants = (theme) => {
224
- switch (theme) {
225
- case "mona":
226
- return calendarDecadeViewCellVariants;
227
- default:
228
- return calendarDecadeViewCellVariants;
229
- }
230
- };
231
- const calendarMonthViewDayThemeVariants = (theme) => {
232
- switch (theme) {
233
- case "mona":
234
- return calendarMonthViewDayVariants;
235
- default:
236
- return calendarMonthViewDayVariants;
237
- }
238
- };
239
- const calendarMonthViewGridThemeVariants = (theme) => {
240
- switch (theme) {
241
- case "mona":
242
- return calendarMonthViewGridVariants;
243
- default:
244
- return calendarMonthViewGridVariants;
245
- }
246
- };
247
- const calendarMonthViewGridHeaderThemeVariants = (theme) => {
248
- switch (theme) {
249
- case "mona":
250
- return calendarMonthViewGridHeaderVariants;
251
- default:
252
- return calendarMonthViewGridHeaderVariants;
253
- }
254
- };
255
- const calendarYearViewGridThemeVariants = (theme) => {
256
- switch (theme) {
257
- case "mona":
258
- return calendarYearViewGridVariants;
259
- default:
260
- return calendarYearViewGridVariants;
261
- }
262
- };
263
- const calendarYearViewCellThemeVariants = (theme) => {
264
- switch (theme) {
265
- case "mona":
266
- return calendarYearViewCellVariants;
267
- default:
268
- return calendarYearViewCellVariants;
269
- }
270
- };
271
-
272
192
  class DecadeYearDirective {
273
193
  constructor() {
274
- this.#themeService = inject(ThemeService);
275
194
  this.ariaLabel = computed(() => `Year ${this.year()}`, /* @ts-ignore */
276
195
  ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
277
196
  this.baseClass = computed(() => {
278
- const theme = this.#themeService.theme();
279
197
  const focused = this.focused();
280
198
  const rounded = this.rounded();
281
- return calendarDecadeViewCellThemeVariants(theme)({ focused, rounded });
199
+ return calendarDecadeViewCellThemeVariants({ focused, rounded });
282
200
  }, /* @ts-ignore */
283
201
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
284
202
  this.focused = computed(() => {
@@ -307,7 +225,6 @@ class DecadeYearDirective {
307
225
  this.year = input.required(/* @ts-ignore */
308
226
  ...(ngDevMode ? [{ debugName: "year" }] : /* istanbul ignore next */ []));
309
227
  }
310
- #themeService;
311
228
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DecadeYearDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
312
229
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: DecadeYearDirective, isStandalone: true, selector: "[monaDecadeYear]", inputs: { navigatedDate: { classPropertyName: "navigatedDate", publicName: "navigatedDate", isSignal: true, isRequired: true, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: true, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: false, transformFunction: null }, year: { classPropertyName: "year", publicName: "year", isSignal: true, isRequired: true, transformFunction: null } }, host: { attributes: { "role": "gridcell" }, properties: { "attr.tabindex": "focused() ? 0 : -1", "attr.aria-current": "isCurrent() ? 'true' : null", "attr.aria-label": "ariaLabel()", "attr.aria-selected": "selected() ? 'true' : null", "class": "baseClass()" } }, ngImport: i0 }); }
313
230
  }
@@ -369,9 +286,7 @@ const compareDates = (date1, date2, operator) => {
369
286
 
370
287
  class MonthDayDirective {
371
288
  constructor() {
372
- this.#themeService = inject(ThemeService);
373
289
  this.baseClass = computed(() => {
374
- const theme = this.#themeService.theme();
375
290
  const disabled = this.dayDisabled();
376
291
  const focused = this.focused();
377
292
  const outside = this.outside();
@@ -379,7 +294,7 @@ class MonthDayDirective {
379
294
  const rounded = this.rounded();
380
295
  const selected = this.selected();
381
296
  const today = this.isToday();
382
- return calendarMonthViewDayThemeVariants(theme)({
297
+ return calendarMonthViewDayThemeVariants({
383
298
  disabled,
384
299
  focused,
385
300
  outside,
@@ -462,7 +377,6 @@ class MonthDayDirective {
462
377
  this.value = input.required(/* @ts-ignore */
463
378
  ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
464
379
  }
465
- #themeService;
466
380
  onClick(event) {
467
381
  if (this.dayDisabled()) {
468
382
  return;
@@ -477,7 +391,7 @@ class MonthDayDirective {
477
391
  this.dayPointerEnter.emit(this.entry().key);
478
392
  }
479
393
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: MonthDayDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
480
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: MonthDayDirective, isStandalone: true, selector: "[monaMonthDay]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: true, transformFunction: null }, disabledDates: { classPropertyName: "disabledDates", publicName: "disabledDates", isSignal: true, isRequired: true, transformFunction: null }, entry: { classPropertyName: "entry", publicName: "entry", isSignal: true, isRequired: true, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: true, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: true, transformFunction: null }, monthBounds: { classPropertyName: "monthBounds", publicName: "monthBounds", isSignal: true, isRequired: true, transformFunction: null }, navigatedDate: { classPropertyName: "navigatedDate", publicName: "navigatedDate", isSignal: true, isRequired: true, transformFunction: null }, rangePreview: { classPropertyName: "rangePreview", publicName: "rangePreview", isSignal: true, isRequired: true, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { dayPointerEnter: "dayPointerEnter", daySelect: "daySelect" }, host: { listeners: { "click": "onClick($event)", "pointerenter": "onPointerEnter()" }, properties: { "attr.tabindex": "focused() ? 0 : -1", "attr.aria-selected": "selected() ? 'true' : null", "attr.aria-current": "isToday() ? 'date' : null", "attr.aria-disabled": "dayDisabled() ? 'true' : null", "attr.data-range-preview": "rangePreviewed() ? 'true' : null", "class": "baseClass()" } }, ngImport: i0 }); }
394
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: MonthDayDirective, isStandalone: true, selector: "[monaMonthDay]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: true, transformFunction: null }, disabledDates: { classPropertyName: "disabledDates", publicName: "disabledDates", isSignal: true, isRequired: true, transformFunction: null }, entry: { classPropertyName: "entry", publicName: "entry", isSignal: true, isRequired: true, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: true, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: true, transformFunction: null }, monthBounds: { classPropertyName: "monthBounds", publicName: "monthBounds", isSignal: true, isRequired: true, transformFunction: null }, navigatedDate: { classPropertyName: "navigatedDate", publicName: "navigatedDate", isSignal: true, isRequired: true, transformFunction: null }, rangePreview: { classPropertyName: "rangePreview", publicName: "rangePreview", isSignal: true, isRequired: true, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { dayPointerEnter: "dayPointerEnter", daySelect: "daySelect" }, host: { attributes: { "role": "button" }, listeners: { "click": "onClick($event)", "pointerenter": "onPointerEnter()" }, properties: { "attr.tabindex": "focused() ? 0 : -1", "attr.aria-pressed": "selected() ? 'true' : 'false'", "attr.aria-current": "isToday() ? 'date' : null", "attr.aria-disabled": "dayDisabled() ? 'true' : null", "attr.data-range-preview": "rangePreviewed() ? 'true' : null", "class": "baseClass()" } }, ngImport: i0 }); }
481
395
  }
482
396
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: MonthDayDirective, decorators: [{
483
397
  type: Directive,
@@ -485,30 +399,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
485
399
  selector: "[monaMonthDay]",
486
400
  host: {
487
401
  "[attr.tabindex]": "focused() ? 0 : -1",
488
- "[attr.aria-selected]": "selected() ? 'true' : null",
402
+ "[attr.aria-pressed]": "selected() ? 'true' : 'false'",
489
403
  "[attr.aria-current]": "isToday() ? 'date' : null",
490
404
  "[attr.aria-disabled]": "dayDisabled() ? 'true' : null",
491
405
  "[attr.data-range-preview]": "rangePreviewed() ? 'true' : null",
492
406
  "[class]": "baseClass()",
493
407
  "(click)": "onClick($event)",
494
- "(pointerenter)": "onPointerEnter()"
408
+ "(pointerenter)": "onPointerEnter()",
409
+ role: "button"
495
410
  }
496
411
  }]
497
412
  }], propDecorators: { dayPointerEnter: [{ type: i0.Output, args: ["dayPointerEnter"] }], daySelect: [{ type: i0.Output, args: ["daySelect"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: true }] }], disabledDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDates", required: true }] }], entry: [{ type: i0.Input, args: [{ isSignal: true, alias: "entry", required: true }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: true }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: true }] }], monthBounds: [{ type: i0.Input, args: [{ isSignal: true, alias: "monthBounds", required: true }] }], navigatedDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "navigatedDate", required: true }] }], rangePreview: [{ type: i0.Input, args: [{ isSignal: true, alias: "rangePreview", required: true }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }] } });
498
413
 
499
414
  class YearMonthDirective {
500
415
  constructor() {
501
- this.#themeService = inject(ThemeService);
502
416
  this.ariaLabel = computed(() => {
503
417
  const monthName = this.monthName();
504
418
  return `${monthName} ${this.navigatedDate().getFullYear()}`;
505
419
  }, /* @ts-ignore */
506
420
  ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
507
421
  this.baseClass = computed(() => {
508
- const theme = this.#themeService.theme();
509
422
  const focused = this.focused();
510
423
  const rounded = this.rounded();
511
- return calendarYearViewCellThemeVariants(theme)({ focused, rounded });
424
+ return calendarYearViewCellThemeVariants({ focused, rounded });
512
425
  }, /* @ts-ignore */
513
426
  ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
514
427
  this.focused = computed(() => {
@@ -543,7 +456,6 @@ class YearMonthDirective {
543
456
  this.selectedDate = input(/* @ts-ignore */
544
457
  ...(ngDevMode ? [undefined, { debugName: "selectedDate" }] : /* istanbul ignore next */ []));
545
458
  }
546
- #themeService;
547
459
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: YearMonthDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
548
460
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: YearMonthDirective, isStandalone: true, selector: "[monaYearMonth]", inputs: { month: { classPropertyName: "month", publicName: "month", isSignal: true, isRequired: true, transformFunction: null }, monthName: { classPropertyName: "monthName", publicName: "monthName", isSignal: true, isRequired: true, transformFunction: null }, navigatedDate: { classPropertyName: "navigatedDate", publicName: "navigatedDate", isSignal: true, isRequired: true, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: true, transformFunction: null }, selectedDate: { classPropertyName: "selectedDate", publicName: "selectedDate", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "gridcell" }, properties: { "attr.tabindex": "focused() ? 0 : -1", "attr.aria-current": "isCurrent() ? 'date' : null", "attr.aria-label": "ariaLabel()", "attr.aria-selected": "selected() ? 'true' : null", "class": "baseClass()" } }, ngImport: i0 }); }
549
461
  }
@@ -568,7 +480,6 @@ class CalendarComponent {
568
480
  #hostElementRef;
569
481
  #monthDict;
570
482
  #outputValue;
571
- #themeService;
572
483
  constructor() {
573
484
  this.#calendarService = inject(CalendarService, { optional: true });
574
485
  this.#destroyRef = inject(DestroyRef);
@@ -629,7 +540,6 @@ class CalendarComponent {
629
540
  return [];
630
541
  }, /* @ts-ignore */
631
542
  ...(ngDevMode ? [{ debugName: "#outputValue" }] : /* istanbul ignore next */ []));
632
- this.#themeService = inject(ThemeService);
633
543
  this.ariaLabel = computed(() => {
634
544
  const view = this.calendarView();
635
545
  const navigatedDate = this.navigatedDate();
@@ -645,11 +555,10 @@ class CalendarComponent {
645
555
  }, /* @ts-ignore */
646
556
  ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
647
557
  this.baseClass = computed(() => {
648
- const theme = this.#themeService.theme();
649
558
  const disabled = this.disabled();
650
559
  const readonly = this.readonly();
651
560
  const rounded = this.rounded() === "full" ? "large" : this.rounded();
652
- const variantClass = calendarBaseThemeVariants(theme)({ disabled, readonly, rounded });
561
+ const variantClass = calendarBaseThemeVariants({ disabled, readonly, rounded });
653
562
  const userClass = this.userClass();
654
563
  return twMerge(variantClass, userClass);
655
564
  }, /* @ts-ignore */
@@ -663,8 +572,7 @@ class CalendarComponent {
663
572
  }, /* @ts-ignore */
664
573
  ...(ngDevMode ? [{ debugName: "decadeEnd" }] : /* istanbul ignore next */ []));
665
574
  this.decadeGridClass = computed(() => {
666
- const theme = this.#themeService.theme();
667
- return calendarDecadeViewGridThemeVariants(theme)();
575
+ return calendarDecadeViewGridThemeVariants();
668
576
  }, /* @ts-ignore */
669
577
  ...(ngDevMode ? [{ debugName: "decadeGridClass" }] : /* istanbul ignore next */ []));
670
578
  this.decadeStart = computed(() => {
@@ -684,8 +592,7 @@ class CalendarComponent {
684
592
  ...(ngDevMode ? [{ debugName: "decadeYears" }] : /* istanbul ignore next */ []));
685
593
  this.gridId = createElementControlId();
686
594
  this.headerClass = computed(() => {
687
- const theme = this.#themeService.theme();
688
- return calendarHeaderThemeVariants(theme)({});
595
+ return calendarHeaderThemeVariants({});
689
596
  }, /* @ts-ignore */
690
597
  ...(ngDevMode ? [{ debugName: "headerClass" }] : /* istanbul ignore next */ []));
691
598
  this.invalidState = computed(() => this.invalid() || (this.required() && this.touched() && this.isEmptyValue()), /* @ts-ignore */
@@ -708,13 +615,11 @@ class CalendarComponent {
708
615
  }, /* @ts-ignore */
709
616
  ...(ngDevMode ? [{ debugName: "monthDictChunked" }] : /* istanbul ignore next */ []));
710
617
  this.monthGridClass = computed(() => {
711
- const theme = this.#themeService.theme();
712
- return calendarMonthViewGridThemeVariants(theme)();
618
+ return calendarMonthViewGridThemeVariants();
713
619
  }, /* @ts-ignore */
714
620
  ...(ngDevMode ? [{ debugName: "monthGridClass" }] : /* istanbul ignore next */ []));
715
621
  this.monthGridHeaderClass = computed(() => {
716
- const theme = this.#themeService.theme();
717
- return calendarMonthViewGridHeaderThemeVariants(theme)();
622
+ return calendarMonthViewGridHeaderThemeVariants();
718
623
  }, /* @ts-ignore */
719
624
  ...(ngDevMode ? [{ debugName: "monthGridHeaderClass" }] : /* istanbul ignore next */ []));
720
625
  this.months = computed(() => {
@@ -821,8 +726,7 @@ class CalendarComponent {
821
726
  this.yearCellTemplate = contentChild(CalendarYearCellTemplateDirective, /* @ts-ignore */
822
727
  ...(ngDevMode ? [{ debugName: "yearCellTemplate" }] : /* istanbul ignore next */ []));
823
728
  this.yearGridClass = computed(() => {
824
- const theme = this.#themeService.theme();
825
- return calendarYearViewGridThemeVariants(theme)();
729
+ return calendarYearViewGridThemeVariants();
826
730
  }, /* @ts-ignore */
827
731
  ...(ngDevMode ? [{ debugName: "yearGridClass" }] : /* istanbul ignore next */ []));
828
732
  /**
@@ -1532,7 +1436,7 @@ class CalendarComponent {
1532
1436
  }
1533
1437
  }
1534
1438
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1535
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: CalendarComponent, isStandalone: true, selector: "mona-calendar", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, disabledDates: { classPropertyName: "disabledDates", publicName: "disabledDates", isSignal: true, isRequired: false, transformFunction: null }, firstDay: { classPropertyName: "firstDay", publicName: "firstDay", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, weekNumber: { classPropertyName: "weekNumber", publicName: "weekNumber", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", touch: "touch", value: "valueChange" }, host: { attributes: { "role": "application" }, properties: { "attr.aria-label": "ariaLabel()", "attr.aria-invalid": "invalidState() ? 'true' : null", "attr.data-invalid": "invalidState() || null", "attr.data-required": "required() || null", "attr.tabindex": "disabled() ? -1 : 0", "class": "baseClass()" } }, queries: [{ propertyName: "decadeCellTemplate", first: true, predicate: CalendarDecadeCellTemplateDirective, descendants: true, isSignal: true }, { propertyName: "monthCellTemplate", first: true, predicate: CalendarMonthCellTemplateDirective, descendants: true, isSignal: true }, { propertyName: "yearCellTemplate", first: true, predicate: CalendarYearCellTemplateDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"headerClass()\">\r\n <button\r\n monaButton\r\n look=\"ghost\"\r\n [rounded]=\"rounded()\"\r\n [size]=\"'small'\"\r\n (click)=\"onTodayButtonClick()\"\r\n [attr.aria-label]=\"todayButtonLabel()\">\r\n <span>Today</span>\r\n </button>\r\n @switch (calendarView()) {\r\n @case (\"month\") {\r\n <button\r\n monaButton\r\n look=\"ghost\"\r\n [rounded]=\"rounded()\"\r\n (click)=\"onViewChangeClick('year')\"\r\n [attr.aria-label]=\"viewSwitchButtonLabel()\">\r\n <span class=\"text-primary font-semibold\" [id]=\"gridId + '-heading'\">{{\r\n navigatedDate() | date: \"MMMM yyyy\" : timezone\r\n }}</span>\r\n </button>\r\n }\r\n @case (\"year\") {\r\n <button\r\n monaButton\r\n look=\"ghost\"\r\n [rounded]=\"rounded()\"\r\n (click)=\"onViewChangeClick('decade')\"\r\n [attr.aria-label]=\"viewSwitchButtonLabel()\">\r\n <span class=\"text-primary font-semibold\" [id]=\"gridId + '-heading'\">{{\r\n navigatedDate() | date: \"yyyy\" : timezone\r\n }}</span>\r\n </button>\r\n }\r\n @case (\"decade\") {\r\n <button monaButton look=\"ghost\" [rounded]=\"rounded()\" [attr.aria-label]=\"viewSwitchButtonLabel()\">\r\n <span class=\"text-primary font-semibold\" [id]=\"gridId + '-heading'\"\r\n >{{ decadeStart() }} - {{ decadeEnd() }}</span\r\n >\r\n </button>\r\n }\r\n }\r\n <button\r\n monaButton\r\n look=\"ghost\"\r\n [rounded]=\"rounded()\"\r\n [iconOnly]=\"true\"\r\n [size]=\"'small'\"\r\n (click)=\"onNavigationClick('prev')\"\r\n [attr.aria-label]=\"prevButtonLabel()\">\r\n <svg lucideChevronLeft></svg>\r\n </button>\r\n <button\r\n monaButton\r\n look=\"ghost\"\r\n [rounded]=\"rounded()\"\r\n [iconOnly]=\"true\"\r\n [size]=\"'small'\"\r\n (click)=\"onNavigationClick('next')\"\r\n [attr.aria-label]=\"nextButtonLabel()\">\r\n <svg lucideChevronRight></svg>\r\n </button>\r\n</div>\r\n\r\n<div aria-live=\"polite\" aria-atomic=\"true\" class=\"sr-only\">{{ ariaLabel() }}</div>\r\n\r\n@if (calendarView() === \"month\") {\r\n @let columnCount = weekNumber() ? 8 : 7;\r\n <div [class]=\"monthGridHeaderClass()\" [style.grid-template-columns]=\"`repeat(${columnCount}, 32px)`\">\r\n @if (weekNumber()) {\r\n <div></div>\r\n }\r\n @for (day of weekdays(); track day.short) {\r\n <div>{{ day.short }}</div>\r\n }\r\n </div>\r\n <div\r\n [class]=\"monthGridClass()\"\r\n [attr.aria-labelledby]=\"gridId + '-heading'\"\r\n (pointerleave)=\"onMonthGridPointerLeave()\"\r\n [style.grid-template-columns]=\"`repeat(${columnCount}, 32px)`\">\r\n @for (row of monthDictChunked(); track $index) {\r\n @if (weekNumber()) {\r\n @let firstEntry = row | monaTakeFirst;\r\n @if (firstEntry) {\r\n @let week = firstEntry.key | date: \"w\";\r\n <div>{{ week }}</div>\r\n }\r\n }\r\n @for (entry of row; track entry.key) {\r\n <div\r\n (dayPointerEnter)=\"onDayPointerEnter($event)\"\r\n (daySelect)=\"onDayClick($event.date, $event.event)\"\r\n monaMonthDay\r\n [disabled]=\"disabled()\"\r\n [disabledDates]=\"disabledDates()\"\r\n [min]=\"minDate()\"\r\n [max]=\"maxDate()\"\r\n [monthBounds]=\"[monthBounds().start, monthBounds().end]\"\r\n [navigatedDate]=\"navigatedDate()\"\r\n [rangePreview]=\"rangePreviewDates()\"\r\n [rounded]=\"rounded()\"\r\n [value]=\"selectedDates()\"\r\n [entry]=\"entry\">\r\n @if (monthCellTemplate()) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"monthCellTemplate()?.templateRef\"\r\n [ngTemplateOutletContext]=\"{ $implicit: entry.value, date: entry.key }\"></ng-container>\r\n } @else {\r\n <span>{{ entry.value }}</span>\r\n }\r\n </div>\r\n }\r\n }\r\n </div>\r\n} @else if (calendarView() === \"year\") {\r\n <div [class]=\"yearGridClass()\" [attr.aria-labelledby]=\"gridId + '-heading'\">\r\n @for (row of months(); track $index) {\r\n @for (monthItem of row; track monthItem) {\r\n <div\r\n (click)=\"onMonthClick(monthItem[0])\"\r\n monaYearMonth\r\n [month]=\"monthItem[0]\"\r\n [monthName]=\"monthItem[1]\"\r\n [navigatedDate]=\"navigatedDate()\"\r\n [rounded]=\"rounded()\"\r\n [selectedDate]=\"selectedDates()[0]\">\r\n @if (yearCellTemplate()) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"yearCellTemplate()?.templateRef\"\r\n [ngTemplateOutletContext]=\"{ $implicit: monthItem[0], text: monthItem[1] }\">\r\n </ng-container>\r\n } @else {\r\n <span>{{ monthItem[1] }}</span>\r\n }\r\n </div>\r\n }\r\n }\r\n </div>\r\n} @else if (calendarView() === \"decade\") {\r\n <div [class]=\"decadeGridClass()\" [attr.aria-labelledby]=\"gridId + '-heading'\">\r\n @for (row of decadeYears(); track $index) {\r\n @for (year of row; track year) {\r\n <div\r\n (click)=\"onYearClick(year)\"\r\n monaDecadeYear\r\n [navigatedDate]=\"navigatedDate()\"\r\n [rounded]=\"rounded()\"\r\n [year]=\"year\"\r\n [selectedDate]=\"selectedDates()[0]\">\r\n @if (decadeCellTemplate()) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"decadeCellTemplate()?.templateRef\"\r\n [ngTemplateOutletContext]=\"{ $implicit: year }\">\r\n </ng-container>\r\n } @else {\r\n <span>{{ year }}</span>\r\n }\r\n </div>\r\n }\r\n }\r\n </div>\r\n}\r\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "directive", type: MonthDayDirective, selector: "[monaMonthDay]", inputs: ["disabled", "disabledDates", "entry", "max", "min", "monthBounds", "navigatedDate", "rangePreview", "rounded", "value"], outputs: ["dayPointerEnter", "daySelect"] }, { kind: "directive", type: DecadeYearDirective, selector: "[monaDecadeYear]", inputs: ["navigatedDate", "rounded", "selectedDate", "year"] }, { kind: "directive", type: YearMonthDirective, selector: "[monaYearMonth]", inputs: ["month", "monthName", "navigatedDate", "rounded", "selectedDate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LucideChevronLeft, selector: "svg[lucideChevronLeft]" }, { kind: "component", type: LucideChevronRight, selector: "svg[lucideChevronRight]" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: TakeFirstPipe, name: "monaTakeFirst" }] }); }
1439
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: CalendarComponent, isStandalone: true, selector: "mona-calendar", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, disabledDates: { classPropertyName: "disabledDates", publicName: "disabledDates", isSignal: true, isRequired: false, transformFunction: null }, firstDay: { classPropertyName: "firstDay", publicName: "firstDay", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, selection: { classPropertyName: "selection", publicName: "selection", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, weekNumber: { classPropertyName: "weekNumber", publicName: "weekNumber", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", touch: "touch", value: "valueChange" }, host: { attributes: { "role": "application" }, properties: { "attr.aria-label": "ariaLabel()", "attr.aria-invalid": "invalidState() ? 'true' : null", "attr.data-invalid": "invalidState() || null", "attr.data-required": "required() || null", "attr.tabindex": "disabled() ? -1 : 0", "class": "baseClass()" } }, queries: [{ propertyName: "decadeCellTemplate", first: true, predicate: CalendarDecadeCellTemplateDirective, descendants: true, isSignal: true }, { propertyName: "monthCellTemplate", first: true, predicate: CalendarMonthCellTemplateDirective, descendants: true, isSignal: true }, { propertyName: "yearCellTemplate", first: true, predicate: CalendarYearCellTemplateDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<div [class]=\"headerClass()\">\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"'small'\"\n (click)=\"onTodayButtonClick()\"\n [attr.aria-label]=\"todayButtonLabel()\">\n <span>Today</span>\n </button>\n @switch (calendarView()) {\n @case (\"month\") {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n (click)=\"onViewChangeClick('year')\"\n [attr.aria-label]=\"viewSwitchButtonLabel()\">\n <span class=\"text-primary font-semibold\" [id]=\"gridId + '-heading'\">{{\n navigatedDate() | date: \"MMMM yyyy\" : timezone\n }}</span>\n </button>\n }\n @case (\"year\") {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n (click)=\"onViewChangeClick('decade')\"\n [attr.aria-label]=\"viewSwitchButtonLabel()\">\n <span class=\"text-primary font-semibold\" [id]=\"gridId + '-heading'\">{{\n navigatedDate() | date: \"yyyy\" : timezone\n }}</span>\n </button>\n }\n @case (\"decade\") {\n <button monaButton look=\"ghost\" [rounded]=\"rounded()\" [attr.aria-label]=\"viewSwitchButtonLabel()\">\n <span class=\"text-primary font-semibold\" [id]=\"gridId + '-heading'\"\n >{{ decadeStart() }} - {{ decadeEnd() }}</span\n >\n </button>\n }\n }\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [iconOnly]=\"true\"\n [size]=\"'small'\"\n (click)=\"onNavigationClick('prev')\"\n [attr.aria-label]=\"prevButtonLabel()\">\n <svg lucideChevronLeft></svg>\n </button>\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [iconOnly]=\"true\"\n [size]=\"'small'\"\n (click)=\"onNavigationClick('next')\"\n [attr.aria-label]=\"nextButtonLabel()\">\n <svg lucideChevronRight></svg>\n </button>\n</div>\n\n<div aria-live=\"polite\" aria-atomic=\"true\" class=\"sr-only\">{{ ariaLabel() }}</div>\n\n@if (calendarView() === \"month\") {\n @let columnCount = weekNumber() ? 8 : 7;\n <div [class]=\"monthGridHeaderClass()\" [style.grid-template-columns]=\"`repeat(${columnCount}, 32px)`\">\n @if (weekNumber()) {\n <div></div>\n }\n @for (day of weekdays(); track day.short) {\n <div>{{ day.short }}</div>\n }\n </div>\n <div\n [class]=\"monthGridClass()\"\n [attr.aria-labelledby]=\"gridId + '-heading'\"\n (pointerleave)=\"onMonthGridPointerLeave()\"\n [style.grid-template-columns]=\"`repeat(${columnCount}, 32px)`\">\n @for (row of monthDictChunked(); track $index) {\n @if (weekNumber()) {\n @let firstEntry = row | monaTakeFirst;\n @if (firstEntry) {\n @let week = firstEntry.key | date: \"w\";\n <div>{{ week }}</div>\n }\n }\n @for (entry of row; track entry.key) {\n <div\n (dayPointerEnter)=\"onDayPointerEnter($event)\"\n (daySelect)=\"onDayClick($event.date, $event.event)\"\n monaMonthDay\n [disabled]=\"disabled()\"\n [disabledDates]=\"disabledDates()\"\n [min]=\"minDate()\"\n [max]=\"maxDate()\"\n [monthBounds]=\"[monthBounds().start, monthBounds().end]\"\n [navigatedDate]=\"navigatedDate()\"\n [rangePreview]=\"rangePreviewDates()\"\n [rounded]=\"rounded()\"\n [value]=\"selectedDates()\"\n [entry]=\"entry\">\n @if (monthCellTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"monthCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: entry.value, date: entry.key }\"></ng-container>\n } @else {\n <span>{{ entry.value }}</span>\n }\n </div>\n }\n }\n </div>\n} @else if (calendarView() === \"year\") {\n <div [class]=\"yearGridClass()\" [attr.aria-labelledby]=\"gridId + '-heading'\">\n @for (row of months(); track $index) {\n @for (monthItem of row; track monthItem) {\n <div\n (click)=\"onMonthClick(monthItem[0])\"\n monaYearMonth\n [month]=\"monthItem[0]\"\n [monthName]=\"monthItem[1]\"\n [navigatedDate]=\"navigatedDate()\"\n [rounded]=\"rounded()\"\n [selectedDate]=\"selectedDates()[0]\">\n @if (yearCellTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"yearCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: monthItem[0], text: monthItem[1] }\">\n </ng-container>\n } @else {\n <span>{{ monthItem[1] }}</span>\n }\n </div>\n }\n }\n </div>\n} @else if (calendarView() === \"decade\") {\n <div [class]=\"decadeGridClass()\" [attr.aria-labelledby]=\"gridId + '-heading'\">\n @for (row of decadeYears(); track $index) {\n @for (year of row; track year) {\n <div\n (click)=\"onYearClick(year)\"\n monaDecadeYear\n [navigatedDate]=\"navigatedDate()\"\n [rounded]=\"rounded()\"\n [year]=\"year\"\n [selectedDate]=\"selectedDates()[0]\">\n @if (decadeCellTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"decadeCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year }\">\n </ng-container>\n } @else {\n <span>{{ year }}</span>\n }\n </div>\n }\n }\n </div>\n}\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "class"], outputs: ["disabledChange", "loadingChange", "lookChange", "selectedChange"] }, { kind: "directive", type: MonthDayDirective, selector: "[monaMonthDay]", inputs: ["disabled", "disabledDates", "entry", "max", "min", "monthBounds", "navigatedDate", "rangePreview", "rounded", "value"], outputs: ["dayPointerEnter", "daySelect"] }, { kind: "directive", type: DecadeYearDirective, selector: "[monaDecadeYear]", inputs: ["navigatedDate", "rounded", "selectedDate", "year"] }, { kind: "directive", type: YearMonthDirective, selector: "[monaYearMonth]", inputs: ["month", "monthName", "navigatedDate", "rounded", "selectedDate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LucideChevronLeft, selector: "svg[lucideChevronLeft]" }, { kind: "component", type: LucideChevronRight, selector: "svg[lucideChevronRight]" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: TakeFirstPipe, name: "monaTakeFirst" }] }); }
1536
1440
  }
1537
1441
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: CalendarComponent, decorators: [{
1538
1442
  type: Component,
@@ -1554,7 +1458,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
1554
1458
  "[attr.data-required]": "required() || null",
1555
1459
  "[attr.tabindex]": "disabled() ? -1 : 0",
1556
1460
  "[class]": "baseClass()"
1557
- }, template: "<div [class]=\"headerClass()\">\r\n <button\r\n monaButton\r\n look=\"ghost\"\r\n [rounded]=\"rounded()\"\r\n [size]=\"'small'\"\r\n (click)=\"onTodayButtonClick()\"\r\n [attr.aria-label]=\"todayButtonLabel()\">\r\n <span>Today</span>\r\n </button>\r\n @switch (calendarView()) {\r\n @case (\"month\") {\r\n <button\r\n monaButton\r\n look=\"ghost\"\r\n [rounded]=\"rounded()\"\r\n (click)=\"onViewChangeClick('year')\"\r\n [attr.aria-label]=\"viewSwitchButtonLabel()\">\r\n <span class=\"text-primary font-semibold\" [id]=\"gridId + '-heading'\">{{\r\n navigatedDate() | date: \"MMMM yyyy\" : timezone\r\n }}</span>\r\n </button>\r\n }\r\n @case (\"year\") {\r\n <button\r\n monaButton\r\n look=\"ghost\"\r\n [rounded]=\"rounded()\"\r\n (click)=\"onViewChangeClick('decade')\"\r\n [attr.aria-label]=\"viewSwitchButtonLabel()\">\r\n <span class=\"text-primary font-semibold\" [id]=\"gridId + '-heading'\">{{\r\n navigatedDate() | date: \"yyyy\" : timezone\r\n }}</span>\r\n </button>\r\n }\r\n @case (\"decade\") {\r\n <button monaButton look=\"ghost\" [rounded]=\"rounded()\" [attr.aria-label]=\"viewSwitchButtonLabel()\">\r\n <span class=\"text-primary font-semibold\" [id]=\"gridId + '-heading'\"\r\n >{{ decadeStart() }} - {{ decadeEnd() }}</span\r\n >\r\n </button>\r\n }\r\n }\r\n <button\r\n monaButton\r\n look=\"ghost\"\r\n [rounded]=\"rounded()\"\r\n [iconOnly]=\"true\"\r\n [size]=\"'small'\"\r\n (click)=\"onNavigationClick('prev')\"\r\n [attr.aria-label]=\"prevButtonLabel()\">\r\n <svg lucideChevronLeft></svg>\r\n </button>\r\n <button\r\n monaButton\r\n look=\"ghost\"\r\n [rounded]=\"rounded()\"\r\n [iconOnly]=\"true\"\r\n [size]=\"'small'\"\r\n (click)=\"onNavigationClick('next')\"\r\n [attr.aria-label]=\"nextButtonLabel()\">\r\n <svg lucideChevronRight></svg>\r\n </button>\r\n</div>\r\n\r\n<div aria-live=\"polite\" aria-atomic=\"true\" class=\"sr-only\">{{ ariaLabel() }}</div>\r\n\r\n@if (calendarView() === \"month\") {\r\n @let columnCount = weekNumber() ? 8 : 7;\r\n <div [class]=\"monthGridHeaderClass()\" [style.grid-template-columns]=\"`repeat(${columnCount}, 32px)`\">\r\n @if (weekNumber()) {\r\n <div></div>\r\n }\r\n @for (day of weekdays(); track day.short) {\r\n <div>{{ day.short }}</div>\r\n }\r\n </div>\r\n <div\r\n [class]=\"monthGridClass()\"\r\n [attr.aria-labelledby]=\"gridId + '-heading'\"\r\n (pointerleave)=\"onMonthGridPointerLeave()\"\r\n [style.grid-template-columns]=\"`repeat(${columnCount}, 32px)`\">\r\n @for (row of monthDictChunked(); track $index) {\r\n @if (weekNumber()) {\r\n @let firstEntry = row | monaTakeFirst;\r\n @if (firstEntry) {\r\n @let week = firstEntry.key | date: \"w\";\r\n <div>{{ week }}</div>\r\n }\r\n }\r\n @for (entry of row; track entry.key) {\r\n <div\r\n (dayPointerEnter)=\"onDayPointerEnter($event)\"\r\n (daySelect)=\"onDayClick($event.date, $event.event)\"\r\n monaMonthDay\r\n [disabled]=\"disabled()\"\r\n [disabledDates]=\"disabledDates()\"\r\n [min]=\"minDate()\"\r\n [max]=\"maxDate()\"\r\n [monthBounds]=\"[monthBounds().start, monthBounds().end]\"\r\n [navigatedDate]=\"navigatedDate()\"\r\n [rangePreview]=\"rangePreviewDates()\"\r\n [rounded]=\"rounded()\"\r\n [value]=\"selectedDates()\"\r\n [entry]=\"entry\">\r\n @if (monthCellTemplate()) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"monthCellTemplate()?.templateRef\"\r\n [ngTemplateOutletContext]=\"{ $implicit: entry.value, date: entry.key }\"></ng-container>\r\n } @else {\r\n <span>{{ entry.value }}</span>\r\n }\r\n </div>\r\n }\r\n }\r\n </div>\r\n} @else if (calendarView() === \"year\") {\r\n <div [class]=\"yearGridClass()\" [attr.aria-labelledby]=\"gridId + '-heading'\">\r\n @for (row of months(); track $index) {\r\n @for (monthItem of row; track monthItem) {\r\n <div\r\n (click)=\"onMonthClick(monthItem[0])\"\r\n monaYearMonth\r\n [month]=\"monthItem[0]\"\r\n [monthName]=\"monthItem[1]\"\r\n [navigatedDate]=\"navigatedDate()\"\r\n [rounded]=\"rounded()\"\r\n [selectedDate]=\"selectedDates()[0]\">\r\n @if (yearCellTemplate()) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"yearCellTemplate()?.templateRef\"\r\n [ngTemplateOutletContext]=\"{ $implicit: monthItem[0], text: monthItem[1] }\">\r\n </ng-container>\r\n } @else {\r\n <span>{{ monthItem[1] }}</span>\r\n }\r\n </div>\r\n }\r\n }\r\n </div>\r\n} @else if (calendarView() === \"decade\") {\r\n <div [class]=\"decadeGridClass()\" [attr.aria-labelledby]=\"gridId + '-heading'\">\r\n @for (row of decadeYears(); track $index) {\r\n @for (year of row; track year) {\r\n <div\r\n (click)=\"onYearClick(year)\"\r\n monaDecadeYear\r\n [navigatedDate]=\"navigatedDate()\"\r\n [rounded]=\"rounded()\"\r\n [year]=\"year\"\r\n [selectedDate]=\"selectedDates()[0]\">\r\n @if (decadeCellTemplate()) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"decadeCellTemplate()?.templateRef\"\r\n [ngTemplateOutletContext]=\"{ $implicit: year }\">\r\n </ng-container>\r\n } @else {\r\n <span>{{ year }}</span>\r\n }\r\n </div>\r\n }\r\n }\r\n </div>\r\n}\r\n" }]
1461
+ }, template: "<div [class]=\"headerClass()\">\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [size]=\"'small'\"\n (click)=\"onTodayButtonClick()\"\n [attr.aria-label]=\"todayButtonLabel()\">\n <span>Today</span>\n </button>\n @switch (calendarView()) {\n @case (\"month\") {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n (click)=\"onViewChangeClick('year')\"\n [attr.aria-label]=\"viewSwitchButtonLabel()\">\n <span class=\"text-primary font-semibold\" [id]=\"gridId + '-heading'\">{{\n navigatedDate() | date: \"MMMM yyyy\" : timezone\n }}</span>\n </button>\n }\n @case (\"year\") {\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n (click)=\"onViewChangeClick('decade')\"\n [attr.aria-label]=\"viewSwitchButtonLabel()\">\n <span class=\"text-primary font-semibold\" [id]=\"gridId + '-heading'\">{{\n navigatedDate() | date: \"yyyy\" : timezone\n }}</span>\n </button>\n }\n @case (\"decade\") {\n <button monaButton look=\"ghost\" [rounded]=\"rounded()\" [attr.aria-label]=\"viewSwitchButtonLabel()\">\n <span class=\"text-primary font-semibold\" [id]=\"gridId + '-heading'\"\n >{{ decadeStart() }} - {{ decadeEnd() }}</span\n >\n </button>\n }\n }\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [iconOnly]=\"true\"\n [size]=\"'small'\"\n (click)=\"onNavigationClick('prev')\"\n [attr.aria-label]=\"prevButtonLabel()\">\n <svg lucideChevronLeft></svg>\n </button>\n <button\n monaButton\n look=\"ghost\"\n [rounded]=\"rounded()\"\n [iconOnly]=\"true\"\n [size]=\"'small'\"\n (click)=\"onNavigationClick('next')\"\n [attr.aria-label]=\"nextButtonLabel()\">\n <svg lucideChevronRight></svg>\n </button>\n</div>\n\n<div aria-live=\"polite\" aria-atomic=\"true\" class=\"sr-only\">{{ ariaLabel() }}</div>\n\n@if (calendarView() === \"month\") {\n @let columnCount = weekNumber() ? 8 : 7;\n <div [class]=\"monthGridHeaderClass()\" [style.grid-template-columns]=\"`repeat(${columnCount}, 32px)`\">\n @if (weekNumber()) {\n <div></div>\n }\n @for (day of weekdays(); track day.short) {\n <div>{{ day.short }}</div>\n }\n </div>\n <div\n [class]=\"monthGridClass()\"\n [attr.aria-labelledby]=\"gridId + '-heading'\"\n (pointerleave)=\"onMonthGridPointerLeave()\"\n [style.grid-template-columns]=\"`repeat(${columnCount}, 32px)`\">\n @for (row of monthDictChunked(); track $index) {\n @if (weekNumber()) {\n @let firstEntry = row | monaTakeFirst;\n @if (firstEntry) {\n @let week = firstEntry.key | date: \"w\";\n <div>{{ week }}</div>\n }\n }\n @for (entry of row; track entry.key) {\n <div\n (dayPointerEnter)=\"onDayPointerEnter($event)\"\n (daySelect)=\"onDayClick($event.date, $event.event)\"\n monaMonthDay\n [disabled]=\"disabled()\"\n [disabledDates]=\"disabledDates()\"\n [min]=\"minDate()\"\n [max]=\"maxDate()\"\n [monthBounds]=\"[monthBounds().start, monthBounds().end]\"\n [navigatedDate]=\"navigatedDate()\"\n [rangePreview]=\"rangePreviewDates()\"\n [rounded]=\"rounded()\"\n [value]=\"selectedDates()\"\n [entry]=\"entry\">\n @if (monthCellTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"monthCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: entry.value, date: entry.key }\"></ng-container>\n } @else {\n <span>{{ entry.value }}</span>\n }\n </div>\n }\n }\n </div>\n} @else if (calendarView() === \"year\") {\n <div [class]=\"yearGridClass()\" [attr.aria-labelledby]=\"gridId + '-heading'\">\n @for (row of months(); track $index) {\n @for (monthItem of row; track monthItem) {\n <div\n (click)=\"onMonthClick(monthItem[0])\"\n monaYearMonth\n [month]=\"monthItem[0]\"\n [monthName]=\"monthItem[1]\"\n [navigatedDate]=\"navigatedDate()\"\n [rounded]=\"rounded()\"\n [selectedDate]=\"selectedDates()[0]\">\n @if (yearCellTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"yearCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: monthItem[0], text: monthItem[1] }\">\n </ng-container>\n } @else {\n <span>{{ monthItem[1] }}</span>\n }\n </div>\n }\n }\n </div>\n} @else if (calendarView() === \"decade\") {\n <div [class]=\"decadeGridClass()\" [attr.aria-labelledby]=\"gridId + '-heading'\">\n @for (row of decadeYears(); track $index) {\n @for (year of row; track year) {\n <div\n (click)=\"onYearClick(year)\"\n monaDecadeYear\n [navigatedDate]=\"navigatedDate()\"\n [rounded]=\"rounded()\"\n [year]=\"year\"\n [selectedDate]=\"selectedDates()[0]\">\n @if (decadeCellTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"decadeCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year }\">\n </ng-container>\n } @else {\n <span>{{ year }}</span>\n }\n </div>\n }\n }\n </div>\n}\n" }]
1558
1462
  }], ctorParameters: () => [], propDecorators: { decadeCellTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CalendarDecadeCellTemplateDirective), { isSignal: true }] }], monthCellTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CalendarMonthCellTemplateDirective), { isSignal: true }] }], yearCellTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CalendarYearCellTemplateDirective), { isSignal: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], disabledDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDates", required: false }] }], firstDay: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDay", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], selection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selection", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], weekNumber: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekNumber", required: false }] }] } });
1559
1463
 
1560
1464
  /*