@raqm/ui 0.0.0-stage → 0.1.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 (178) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/LICENSE +21 -0
  3. package/NOTICE.md +28 -0
  4. package/README.md +125 -3
  5. package/combobox/README.md +17 -0
  6. package/fesm2022/raqm-ui-accordion.mjs +414 -0
  7. package/fesm2022/raqm-ui-accordion.mjs.map +1 -0
  8. package/fesm2022/raqm-ui-alert-dialog.mjs +457 -0
  9. package/fesm2022/raqm-ui-alert-dialog.mjs.map +1 -0
  10. package/fesm2022/raqm-ui-alert.mjs +195 -0
  11. package/fesm2022/raqm-ui-alert.mjs.map +1 -0
  12. package/fesm2022/raqm-ui-aspect-ratio.mjs +66 -0
  13. package/fesm2022/raqm-ui-aspect-ratio.mjs.map +1 -0
  14. package/fesm2022/raqm-ui-attachment.mjs +435 -0
  15. package/fesm2022/raqm-ui-attachment.mjs.map +1 -0
  16. package/fesm2022/raqm-ui-avatar.mjs +337 -0
  17. package/fesm2022/raqm-ui-avatar.mjs.map +1 -0
  18. package/fesm2022/raqm-ui-badge.mjs +68 -0
  19. package/fesm2022/raqm-ui-badge.mjs.map +1 -0
  20. package/fesm2022/raqm-ui-breadcrumb.mjs +309 -0
  21. package/fesm2022/raqm-ui-breadcrumb.mjs.map +1 -0
  22. package/fesm2022/raqm-ui-button-group.mjs +138 -0
  23. package/fesm2022/raqm-ui-button-group.mjs.map +1 -0
  24. package/fesm2022/raqm-ui-button.mjs +295 -0
  25. package/fesm2022/raqm-ui-button.mjs.map +1 -0
  26. package/fesm2022/raqm-ui-calendar.mjs +1394 -0
  27. package/fesm2022/raqm-ui-calendar.mjs.map +1 -0
  28. package/fesm2022/raqm-ui-card.mjs +331 -0
  29. package/fesm2022/raqm-ui-card.mjs.map +1 -0
  30. package/fesm2022/raqm-ui-carousel.mjs +410 -0
  31. package/fesm2022/raqm-ui-carousel.mjs.map +1 -0
  32. package/fesm2022/raqm-ui-checkbox.mjs +86 -0
  33. package/fesm2022/raqm-ui-checkbox.mjs.map +1 -0
  34. package/fesm2022/raqm-ui-collapsible.mjs +266 -0
  35. package/fesm2022/raqm-ui-collapsible.mjs.map +1 -0
  36. package/fesm2022/raqm-ui-combobox.mjs +1584 -0
  37. package/fesm2022/raqm-ui-combobox.mjs.map +1 -0
  38. package/fesm2022/raqm-ui-command.mjs +1210 -0
  39. package/fesm2022/raqm-ui-command.mjs.map +1 -0
  40. package/fesm2022/raqm-ui-context-menu.mjs +723 -0
  41. package/fesm2022/raqm-ui-context-menu.mjs.map +1 -0
  42. package/fesm2022/raqm-ui-dialog.mjs +1214 -0
  43. package/fesm2022/raqm-ui-dialog.mjs.map +1 -0
  44. package/fesm2022/raqm-ui-drawer.mjs +687 -0
  45. package/fesm2022/raqm-ui-drawer.mjs.map +1 -0
  46. package/fesm2022/raqm-ui-dropdown-menu.mjs +1168 -0
  47. package/fesm2022/raqm-ui-dropdown-menu.mjs.map +1 -0
  48. package/fesm2022/raqm-ui-empty.mjs +272 -0
  49. package/fesm2022/raqm-ui-empty.mjs.map +1 -0
  50. package/fesm2022/raqm-ui-field.mjs +517 -0
  51. package/fesm2022/raqm-ui-field.mjs.map +1 -0
  52. package/fesm2022/raqm-ui-hover-card.mjs +828 -0
  53. package/fesm2022/raqm-ui-hover-card.mjs.map +1 -0
  54. package/fesm2022/raqm-ui-input-group.mjs +270 -0
  55. package/fesm2022/raqm-ui-input-group.mjs.map +1 -0
  56. package/fesm2022/raqm-ui-input-otp.mjs +788 -0
  57. package/fesm2022/raqm-ui-input-otp.mjs.map +1 -0
  58. package/fesm2022/raqm-ui-input.mjs +73 -0
  59. package/fesm2022/raqm-ui-input.mjs.map +1 -0
  60. package/fesm2022/raqm-ui-item.mjs +495 -0
  61. package/fesm2022/raqm-ui-item.mjs.map +1 -0
  62. package/fesm2022/raqm-ui-kbd.mjs +80 -0
  63. package/fesm2022/raqm-ui-kbd.mjs.map +1 -0
  64. package/fesm2022/raqm-ui-label.mjs +44 -0
  65. package/fesm2022/raqm-ui-label.mjs.map +1 -0
  66. package/fesm2022/raqm-ui-menubar.mjs +536 -0
  67. package/fesm2022/raqm-ui-menubar.mjs.map +1 -0
  68. package/fesm2022/raqm-ui-native-select.mjs +131 -0
  69. package/fesm2022/raqm-ui-native-select.mjs.map +1 -0
  70. package/fesm2022/raqm-ui-navigation-menu.mjs +1399 -0
  71. package/fesm2022/raqm-ui-navigation-menu.mjs.map +1 -0
  72. package/fesm2022/raqm-ui-overlay-internal.mjs +185 -0
  73. package/fesm2022/raqm-ui-overlay-internal.mjs.map +1 -0
  74. package/fesm2022/raqm-ui-pagination.mjs +440 -0
  75. package/fesm2022/raqm-ui-pagination.mjs.map +1 -0
  76. package/fesm2022/raqm-ui-popover.mjs +1495 -0
  77. package/fesm2022/raqm-ui-popover.mjs.map +1 -0
  78. package/fesm2022/raqm-ui-progress.mjs +369 -0
  79. package/fesm2022/raqm-ui-progress.mjs.map +1 -0
  80. package/fesm2022/raqm-ui-questionnaire.mjs +1005 -0
  81. package/fesm2022/raqm-ui-questionnaire.mjs.map +1 -0
  82. package/fesm2022/raqm-ui-radio-group.mjs +151 -0
  83. package/fesm2022/raqm-ui-radio-group.mjs.map +1 -0
  84. package/fesm2022/raqm-ui-resizable.mjs +439 -0
  85. package/fesm2022/raqm-ui-resizable.mjs.map +1 -0
  86. package/fesm2022/raqm-ui-scroll-area.mjs +510 -0
  87. package/fesm2022/raqm-ui-scroll-area.mjs.map +1 -0
  88. package/fesm2022/raqm-ui-select.mjs +1073 -0
  89. package/fesm2022/raqm-ui-select.mjs.map +1 -0
  90. package/fesm2022/raqm-ui-separator.mjs +103 -0
  91. package/fesm2022/raqm-ui-separator.mjs.map +1 -0
  92. package/fesm2022/raqm-ui-sheet.mjs +411 -0
  93. package/fesm2022/raqm-ui-sheet.mjs.map +1 -0
  94. package/fesm2022/raqm-ui-sidebar.mjs +1784 -0
  95. package/fesm2022/raqm-ui-sidebar.mjs.map +1 -0
  96. package/fesm2022/raqm-ui-skeleton.mjs +50 -0
  97. package/fesm2022/raqm-ui-skeleton.mjs.map +1 -0
  98. package/fesm2022/raqm-ui-slider.mjs +609 -0
  99. package/fesm2022/raqm-ui-slider.mjs.map +1 -0
  100. package/fesm2022/raqm-ui-spinner.mjs +137 -0
  101. package/fesm2022/raqm-ui-spinner.mjs.map +1 -0
  102. package/fesm2022/raqm-ui-switch.mjs +109 -0
  103. package/fesm2022/raqm-ui-switch.mjs.map +1 -0
  104. package/fesm2022/raqm-ui-table.mjs +271 -0
  105. package/fesm2022/raqm-ui-table.mjs.map +1 -0
  106. package/fesm2022/raqm-ui-tabs.mjs +536 -0
  107. package/fesm2022/raqm-ui-tabs.mjs.map +1 -0
  108. package/fesm2022/raqm-ui-textarea.mjs +37 -0
  109. package/fesm2022/raqm-ui-textarea.mjs.map +1 -0
  110. package/fesm2022/raqm-ui-toast.mjs +918 -0
  111. package/fesm2022/raqm-ui-toast.mjs.map +1 -0
  112. package/fesm2022/raqm-ui-toggle-group.mjs +462 -0
  113. package/fesm2022/raqm-ui-toggle-group.mjs.map +1 -0
  114. package/fesm2022/raqm-ui-toggle.mjs +158 -0
  115. package/fesm2022/raqm-ui-toggle.mjs.map +1 -0
  116. package/fesm2022/raqm-ui-tooltip.mjs +1226 -0
  117. package/fesm2022/raqm-ui-tooltip.mjs.map +1 -0
  118. package/fesm2022/raqm-ui.mjs +50 -0
  119. package/input-otp/README.md +12 -0
  120. package/package.json +275 -3
  121. package/styles/theme.css +4322 -0
  122. package/types/raqm-ui-accordion.d.ts +124 -0
  123. package/types/raqm-ui-alert-dialog.d.ts +81 -0
  124. package/types/raqm-ui-alert.d.ts +29 -0
  125. package/types/raqm-ui-aspect-ratio.d.ts +13 -0
  126. package/types/raqm-ui-attachment.d.ts +72 -0
  127. package/types/raqm-ui-avatar.d.ts +67 -0
  128. package/types/raqm-ui-badge.d.ts +20 -0
  129. package/types/raqm-ui-breadcrumb.d.ts +35 -0
  130. package/types/raqm-ui-button-group.d.ts +27 -0
  131. package/types/raqm-ui-button.d.ts +80 -0
  132. package/types/raqm-ui-calendar.d.ts +359 -0
  133. package/types/raqm-ui-card.d.ts +34 -0
  134. package/types/raqm-ui-carousel.d.ts +81 -0
  135. package/types/raqm-ui-checkbox.d.ts +24 -0
  136. package/types/raqm-ui-collapsible.d.ts +72 -0
  137. package/types/raqm-ui-combobox.d.ts +405 -0
  138. package/types/raqm-ui-command.d.ts +256 -0
  139. package/types/raqm-ui-context-menu.d.ts +196 -0
  140. package/types/raqm-ui-dialog.d.ts +232 -0
  141. package/types/raqm-ui-drawer.d.ts +121 -0
  142. package/types/raqm-ui-dropdown-menu.d.ts +319 -0
  143. package/types/raqm-ui-empty.d.ts +35 -0
  144. package/types/raqm-ui-field.d.ts +88 -0
  145. package/types/raqm-ui-hover-card.d.ts +139 -0
  146. package/types/raqm-ui-input-group.d.ts +45 -0
  147. package/types/raqm-ui-input-otp.d.ts +197 -0
  148. package/types/raqm-ui-input.d.ts +16 -0
  149. package/types/raqm-ui-item.d.ts +71 -0
  150. package/types/raqm-ui-kbd.d.ts +12 -0
  151. package/types/raqm-ui-label.d.ts +6 -0
  152. package/types/raqm-ui-menubar.d.ts +159 -0
  153. package/types/raqm-ui-native-select.d.ts +23 -0
  154. package/types/raqm-ui-navigation-menu.d.ts +230 -0
  155. package/types/raqm-ui-overlay-internal.d.ts +5 -0
  156. package/types/raqm-ui-pagination.d.ts +84 -0
  157. package/types/raqm-ui-popover.d.ts +235 -0
  158. package/types/raqm-ui-progress.d.ts +79 -0
  159. package/types/raqm-ui-questionnaire.d.ts +217 -0
  160. package/types/raqm-ui-radio-group.d.ts +48 -0
  161. package/types/raqm-ui-resizable.d.ts +98 -0
  162. package/types/raqm-ui-scroll-area.d.ts +132 -0
  163. package/types/raqm-ui-select.d.ts +205 -0
  164. package/types/raqm-ui-separator.d.ts +21 -0
  165. package/types/raqm-ui-sheet.d.ts +79 -0
  166. package/types/raqm-ui-sidebar.d.ts +285 -0
  167. package/types/raqm-ui-skeleton.d.ts +6 -0
  168. package/types/raqm-ui-slider.d.ts +129 -0
  169. package/types/raqm-ui-spinner.d.ts +32 -0
  170. package/types/raqm-ui-switch.d.ts +32 -0
  171. package/types/raqm-ui-table.d.ts +36 -0
  172. package/types/raqm-ui-tabs.d.ts +154 -0
  173. package/types/raqm-ui-textarea.d.ts +6 -0
  174. package/types/raqm-ui-toast.d.ts +190 -0
  175. package/types/raqm-ui-toggle-group.d.ts +167 -0
  176. package/types/raqm-ui-toggle.d.ts +42 -0
  177. package/types/raqm-ui-tooltip.d.ts +207 -0
  178. package/types/raqm-ui.d.ts +50 -0
@@ -0,0 +1,1394 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, Directive, ElementRef, TemplateRef, afterRenderEffect, booleanAttribute, computed, contentChild, inject, input, output, signal } from "@angular/core";
3
+ import { NgTemplateOutlet } from "@angular/common";
4
+ import { RaqmButton } from "@raqm/ui/button";
5
+ function civil(year, month = 0, day = 1) {
6
+ const date = /* @__PURE__ */ new Date(0);
7
+ date.setHours(12, 0, 0, 0);
8
+ date.setFullYear(year, month, day);
9
+ return date;
10
+ }
11
+ function valid(date) {
12
+ return date instanceof Date && Number.isFinite(date.getTime());
13
+ }
14
+ function clean(date) {
15
+ return civil(date.getFullYear(), date.getMonth(), date.getDate());
16
+ }
17
+ function key(date) {
18
+ return `${date.getFullYear()}-${date.getMonth()}-${date.getDate()}`;
19
+ }
20
+ function ordinal(date) {
21
+ let y = date.getFullYear();
22
+ const m = date.getMonth() + 1;
23
+ y -= m <= 2 ? 1 : 0;
24
+ const era = Math.floor(y / 400);
25
+ const yo = y - era * 400;
26
+ const doy = Math.floor((153 * (m + (m > 2 ? -3 : 9)) + 2) / 5) + date.getDate() - 1;
27
+ return era * 146097 + yo * 365 + Math.floor(yo / 4) - Math.floor(yo / 100) + doy;
28
+ }
29
+ function same(a, b) {
30
+ return valid(a) && valid(b) && ordinal(a) === ordinal(b);
31
+ }
32
+ function addDays(date, days) {
33
+ return civil(date.getFullYear(), date.getMonth(), date.getDate() + days);
34
+ }
35
+ function addMonths(date, months) {
36
+ const start = civil(date.getFullYear(), date.getMonth() + months);
37
+ const last = civil(start.getFullYear(), start.getMonth() + 1, 0).getDate();
38
+ return civil(start.getFullYear(), start.getMonth(), Math.min(date.getDate(), last));
39
+ }
40
+ function monthIndex(date) {
41
+ return date.getFullYear() * 12 + date.getMonth();
42
+ }
43
+ function match(date, matcher) {
44
+ if (typeof matcher === "boolean") return matcher;
45
+ if (typeof matcher === "function") return matcher(clean(date));
46
+ if (matcher instanceof Date) return same(date, matcher);
47
+ if (Array.isArray(matcher)) return matcher.some((day) => same(date, day));
48
+ const n = ordinal(date);
49
+ if ("dayOfWeek" in matcher) return matcher.dayOfWeek.includes(date.getDay());
50
+ if ("from" in matcher) return n >= ordinal(matcher.from) && n <= ordinal(matcher.to);
51
+ if ("before" in matcher && "after" in matcher) {
52
+ const before = ordinal(matcher.before), after = ordinal(matcher.after);
53
+ return before > after ? n < before && n > after : n < before || n > after;
54
+ }
55
+ if ("before" in matcher) return n < ordinal(matcher.before);
56
+ return n > ordinal(matcher.after);
57
+ }
58
+ function matches(date, matchers) {
59
+ return matchers === void 0 ? false : Array.isArray(matchers) ? matchers.some((matcher) => match(date, matcher)) : match(date, matchers);
60
+ }
61
+ function weekNumber(date, weekStartsOn, firstWeekContainsDate) {
62
+ const start = (year) => {
63
+ const anchor = civil(year, 0, firstWeekContainsDate);
64
+ return addDays(anchor, -((anchor.getDay() - weekStartsOn + 7) % 7));
65
+ };
66
+ const year = date.getFullYear(), first = start(year), next = start(year + 1);
67
+ const base = ordinal(date) < ordinal(first) ? start(year - 1) : ordinal(date) >= ordinal(next) ? next : first;
68
+ return Math.floor((ordinal(date) - ordinal(base)) / 7) + 1;
69
+ }
70
+ var RaqmCalendarDayButtonDirective = class RaqmCalendarDayButtonDirective {
71
+ date = input.required(...ngDevMode ? [{ debugName: "date" }] : /* istanbul ignore next */ []);
72
+ locale = input("en-US", ...ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []);
73
+ modifiers = input({}, ...ngDevMode ? [{ debugName: "modifiers" }] : /* istanbul ignore next */ []);
74
+ static ɵfac = i0.ɵɵngDeclareFactory({
75
+ minVersion: "12.0.0",
76
+ version: "22.2.2",
77
+ ngImport: i0,
78
+ type: RaqmCalendarDayButtonDirective,
79
+ deps: [],
80
+ target: i0.ɵɵFactoryTarget.Directive
81
+ });
82
+ static ɵdir = i0.ɵɵngDeclareDirective({
83
+ minVersion: "17.1.0",
84
+ version: "22.2.2",
85
+ type: RaqmCalendarDayButtonDirective,
86
+ isStandalone: true,
87
+ selector: "button[raqm-calendar-day-button]",
88
+ inputs: {
89
+ date: {
90
+ classPropertyName: "date",
91
+ publicName: "date",
92
+ isSignal: true,
93
+ isRequired: true,
94
+ transformFunction: null
95
+ },
96
+ locale: {
97
+ classPropertyName: "locale",
98
+ publicName: "locale",
99
+ isSignal: true,
100
+ isRequired: false,
101
+ transformFunction: null
102
+ },
103
+ modifiers: {
104
+ classPropertyName: "modifiers",
105
+ publicName: "modifiers",
106
+ isSignal: true,
107
+ isRequired: false,
108
+ transformFunction: null
109
+ }
110
+ },
111
+ host: {
112
+ properties: {
113
+ "attr.data-raqm-day": "date().toLocaleDateString(locale())",
114
+ "attr.data-raqm-selected-single": "modifiers()[\"selected\"] && !modifiers()[\"range_start\"] && !modifiers()[\"range_end\"] && !modifiers()[\"range_middle\"] ? \"\" : null",
115
+ "attr.data-raqm-range-start": "modifiers()[\"range_start\"] ? \"\" : null",
116
+ "attr.data-raqm-range-end": "modifiers()[\"range_end\"] ? \"\" : null",
117
+ "attr.data-raqm-range-middle": "modifiers()[\"range_middle\"] ? \"\" : null"
118
+ },
119
+ classAttribute: "raqm-calendar-day-button"
120
+ },
121
+ ngImport: i0
122
+ });
123
+ };
124
+ i0.ɵɵngDeclareClassMetadata({
125
+ minVersion: "12.0.0",
126
+ version: "22.2.2",
127
+ ngImport: i0,
128
+ type: RaqmCalendarDayButtonDirective,
129
+ decorators: [{
130
+ type: Directive,
131
+ args: [{
132
+ selector: "button[raqm-calendar-day-button]",
133
+ host: {
134
+ class: "raqm-calendar-day-button",
135
+ "[attr.data-raqm-day]": "date().toLocaleDateString(locale())",
136
+ "[attr.data-raqm-selected-single]": "modifiers()[\"selected\"] && !modifiers()[\"range_start\"] && !modifiers()[\"range_end\"] && !modifiers()[\"range_middle\"] ? \"\" : null",
137
+ "[attr.data-raqm-range-start]": "modifiers()[\"range_start\"] ? \"\" : null",
138
+ "[attr.data-raqm-range-end]": "modifiers()[\"range_end\"] ? \"\" : null",
139
+ "[attr.data-raqm-range-middle]": "modifiers()[\"range_middle\"] ? \"\" : null"
140
+ }
141
+ }]
142
+ }],
143
+ propDecorators: {
144
+ date: [{
145
+ type: i0.Input,
146
+ args: [{
147
+ isSignal: true,
148
+ alias: "date",
149
+ required: true
150
+ }]
151
+ }],
152
+ locale: [{
153
+ type: i0.Input,
154
+ args: [{
155
+ isSignal: true,
156
+ alias: "locale",
157
+ required: false
158
+ }]
159
+ }],
160
+ modifiers: [{
161
+ type: i0.Input,
162
+ args: [{
163
+ isSignal: true,
164
+ alias: "modifiers",
165
+ required: false
166
+ }]
167
+ }]
168
+ }
169
+ });
170
+ function connectCalendarEffects(host) {
171
+ afterRenderEffect(() => {
172
+ const target = host.tabDay();
173
+ host.months();
174
+ const pending = host.pendingFocus();
175
+ if (!pending && !host.focusOwned()) return;
176
+ const element = host.element(), active = element.ownerDocument.activeElement;
177
+ const button = Array.from(element.querySelectorAll("button[data-raqm-key]")).find((button) => button.dataset["raqmKey"] === target?.key && button.tabIndex === 0);
178
+ if (pending || host.focusOwned() && (!active || active === element.ownerDocument.body || element.contains(active) && active.hasAttribute("data-raqm-key"))) (button ?? element.querySelector(".raqm-calendar-nav button:not(:disabled)") ?? element).focus();
179
+ if (pending) host.setPendingFocus(false);
180
+ });
181
+ }
182
+ var RaqmCalendarFormat = class {
183
+ host;
184
+ constructor(host) {
185
+ this.host = host;
186
+ }
187
+ format(date, options) {
188
+ return new Intl.DateTimeFormat(this.host.locale(), {
189
+ ...options,
190
+ calendar: "gregory",
191
+ numberingSystem: "latn"
192
+ }).format(date);
193
+ }
194
+ caption(date) {
195
+ return this.host.formatters().formatCaption?.(date) ?? this.format(date, {
196
+ month: "long",
197
+ year: "numeric"
198
+ });
199
+ }
200
+ monthLabel(date, month) {
201
+ const value = civil(date.getFullYear(), month);
202
+ return this.host.formatters().formatMonthDropdown?.(value) ?? this.format(value, { month: "short" });
203
+ }
204
+ yearLabel(year) {
205
+ const value = civil(year);
206
+ return this.host.formatters().formatYearDropdown?.(value) ?? this.format(value, { year: "numeric" });
207
+ }
208
+ weekday(date) {
209
+ const custom = this.host.formatters().formatWeekdayName?.(date);
210
+ if (custom) return custom;
211
+ const short = this.format(date, { weekday: "short" });
212
+ const language = this.host.locale().split("-")[0].toLowerCase();
213
+ if (language === "ar") return short.replace(/^ال/, "");
214
+ if (language === "he") return short.replace(/^יום\s+/, "");
215
+ return Array.from(short).slice(0, 2).join("");
216
+ }
217
+ dayLabel(day) {
218
+ return this.host.labels().day?.(day.date, day.modifiers) ?? this.format(day.date, {
219
+ weekday: "long",
220
+ month: "long",
221
+ day: "numeric",
222
+ year: "numeric"
223
+ });
224
+ }
225
+ dayText(date) {
226
+ return this.host.formatters().formatDay?.(date) ?? this.format(date, { day: "numeric" });
227
+ }
228
+ weekText(week) {
229
+ return this.host.formatters().formatWeekNumber?.(week) ?? new Intl.NumberFormat(this.host.locale(), { numberingSystem: "latn" }).format(week);
230
+ }
231
+ };
232
+ var RaqmCalendarKeyboard = class {
233
+ host;
234
+ constructor(host) {
235
+ this.host = host;
236
+ }
237
+ focusIn(event) {
238
+ const id = event.target.dataset["raqmKey"];
239
+ this.host.setFocusOwned(!!id);
240
+ if (id) this.host.setFocused(id);
241
+ }
242
+ focusOut(event) {
243
+ if (event.relatedTarget && !this.host.element().contains(event.relatedTarget)) this.host.setFocusOwned(false);
244
+ }
245
+ keydown(event, day) {
246
+ const element = this.host.element();
247
+ const rtl = (element.ownerDocument.defaultView?.getComputedStyle(element).direction ?? this.host.dir()) === "rtl";
248
+ let candidate, step = 1;
249
+ const offset = (day.date.getDay() - this.host.weekStart() + 7) % 7;
250
+ switch (event.key) {
251
+ case "ArrowLeft":
252
+ step = rtl ? 1 : -1;
253
+ candidate = addDays(day.date, step);
254
+ break;
255
+ case "ArrowRight":
256
+ step = rtl ? -1 : 1;
257
+ candidate = addDays(day.date, step);
258
+ break;
259
+ case "ArrowUp":
260
+ step = -7;
261
+ candidate = addDays(day.date, -7);
262
+ break;
263
+ case "ArrowDown":
264
+ step = 7;
265
+ candidate = addDays(day.date, 7);
266
+ break;
267
+ case "Home":
268
+ candidate = addDays(day.date, -offset);
269
+ break;
270
+ case "End":
271
+ step = -1;
272
+ candidate = addDays(day.date, 6 - offset);
273
+ break;
274
+ case "PageUp":
275
+ step = -1;
276
+ candidate = addMonths(day.date, event.shiftKey ? -12 : -1);
277
+ break;
278
+ case "PageDown":
279
+ candidate = addMonths(day.date, event.shiftKey ? 12 : 1);
280
+ break;
281
+ default: return;
282
+ }
283
+ event.preventDefault();
284
+ const homeEnd = event.key === "Home" || event.key === "End";
285
+ for (let i = 0; i < (homeEnd ? 7 : 36600); i++, candidate = addDays(candidate, step)) {
286
+ if (monthIndex(candidate) < monthIndex(this.host.lower()) || monthIndex(candidate) > monthIndex(this.host.upper())) return;
287
+ if (homeEnd && (ordinal(candidate) < ordinal(day.date) - offset || ordinal(candidate) > ordinal(day.date) + 6 - offset)) return;
288
+ if (this.host.isDisabled(candidate) || matches(candidate, this.host.hidden())) continue;
289
+ if (!this.host.availableDays().some((day) => same(day.date, candidate))) {
290
+ if (this.host.disableNavigation()) return;
291
+ this.host.changeMonth(candidate);
292
+ }
293
+ this.host.setFocused(key(candidate));
294
+ this.host.setPendingFocus(true);
295
+ return;
296
+ }
297
+ }
298
+ };
299
+ var RaqmCalendarNavigation = class {
300
+ host;
301
+ constructor(host) {
302
+ this.host = host;
303
+ }
304
+ canNavigate(direction) {
305
+ return !this.host.disableNavigation() && monthIndex(this.host.clampMonth(addMonths(this.host.displayedMonth(), direction * (this.host.pagedNavigation() ? this.host.count() : 1)))) !== monthIndex(this.host.displayedMonth());
306
+ }
307
+ navigate(direction) {
308
+ if (this.canNavigate(direction)) this.changeMonth(addMonths(this.host.displayedMonth(), direction * (this.host.pagedNavigation() ? this.host.count() : 1)));
309
+ }
310
+ changeMonth(date) {
311
+ const next = this.host.clampMonth(date);
312
+ if (monthIndex(next) === monthIndex(this.host.displayedMonth())) return;
313
+ if (!this.host.monthControlled()) this.host.setInternalMonth(next);
314
+ this.host.emitMonth(clean(next));
315
+ }
316
+ dropdown(date, index, event, year) {
317
+ const value = Number(event.target.value);
318
+ this.changeMonth(addMonths(civil(year ? value : date.getFullYear(), year ? date.getMonth() : value), -index));
319
+ }
320
+ monthDisabled(date, month) {
321
+ const index = monthIndex(civil(date.getFullYear(), month));
322
+ return index < monthIndex(this.host.lower()) || index > monthIndex(this.host.upper());
323
+ }
324
+ };
325
+ var RaqmCalendarSelection = class {
326
+ host;
327
+ constructor(host) {
328
+ this.host = host;
329
+ }
330
+ isDisabled(date) {
331
+ return monthIndex(date) < monthIndex(this.host.lower()) || monthIndex(date) > monthIndex(this.host.upper()) || matches(date, this.host.disabled());
332
+ }
333
+ selectDay(day) {
334
+ if (day.modifiers["hidden"] || day.modifiers["disabled"]) return;
335
+ const date = clean(day.date), min = Math.max(0, this.host.min() ?? 0), max = this.host.max();
336
+ let next;
337
+ if (this.host.mode() === "single") next = same(this.host.selectedDates()[0], date) && !this.host.required() ? void 0 : date;
338
+ else if (this.host.mode() === "multiple") {
339
+ const current = this.host.selectedDates(), exists = current.some((value) => same(value, date));
340
+ if (exists && current.length <= Math.max(min, this.host.required() ? 1 : 0)) return;
341
+ if (!exists && max !== void 0 && current.length >= max) return;
342
+ next = exists ? current.filter((value) => !same(value, date)).map(clean) : [...current.map(clean), date];
343
+ } else {
344
+ const range = this.host.range();
345
+ if (!valid(range?.from)) next = {
346
+ from: date,
347
+ to: min > 0 ? void 0 : date
348
+ };
349
+ else if (range.to && (same(range.from, date) || same(range.to, date))) next = same(range.from, date) && same(range.to, date) && !this.host.required() ? void 0 : {
350
+ from: date,
351
+ to: min > 0 ? void 0 : date
352
+ };
353
+ else if (!range.to && same(range.from, date) && min === 0 && !this.host.required()) next = void 0;
354
+ else {
355
+ const from = ordinal(date) < ordinal(range.from) ? date : clean(range.from), to = ordinal(date) < ordinal(range.from) ? clean(range.to ?? range.from) : date;
356
+ const nights = ordinal(to) - ordinal(from);
357
+ if (max !== void 0 && nights > max || nights < min) next = {
358
+ from: date,
359
+ to: min > 0 ? void 0 : date
360
+ };
361
+ else if (this.host.excludeDisabled() && this.rangeHasDisabled(from, to)) next = {
362
+ from: date,
363
+ to: min > 0 ? void 0 : date
364
+ };
365
+ else next = {
366
+ from,
367
+ to
368
+ };
369
+ }
370
+ }
371
+ if (!this.host.controlledSelection()) this.host.setInternalSelection({ value: next });
372
+ this.host.emit(next);
373
+ this.host.setFocused(day.key);
374
+ if (day.modifiers["outside"] && !this.host.disableNavigation()) this.host.changeMonth(date);
375
+ }
376
+ rangeHasDisabled(from, to) {
377
+ const span = ordinal(to) - ordinal(from);
378
+ for (let i = 0; i <= span; i++) if (this.isDisabled(addDays(from, i))) return true;
379
+ return false;
380
+ }
381
+ };
382
+ var RaqmCalendarViewState = class {
383
+ host;
384
+ controlledSelection = signal(false, ...ngDevMode ? [{ debugName: "controlledSelection" }] : /* istanbul ignore next */ []);
385
+ internalSelection = signal(void 0, ...ngDevMode ? [{ debugName: "internalSelection" }] : /* istanbul ignore next */ []);
386
+ monthControlled = signal(false, ...ngDevMode ? [{ debugName: "monthControlled" }] : /* istanbul ignore next */ []);
387
+ internalMonth = signal(void 0, ...ngDevMode ? [{ debugName: "internalMonth" }] : /* istanbul ignore next */ []);
388
+ initialMonth = civil((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth());
389
+ focused = signal(void 0, ...ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []);
390
+ pendingFocus = signal(false, ...ngDevMode ? [{ debugName: "pendingFocus" }] : /* istanbul ignore next */ []);
391
+ focusOwned = signal(false, ...ngDevMode ? [{ debugName: "focusOwned" }] : /* istanbul ignore next */ []);
392
+ selection = computed(() => this.controlledSelection() ? this.host.selected() : (this.internalSelection() ?? { value: this.host.defaultSelected() }).value, ...ngDevMode ? [{ debugName: "selection" }] : /* istanbul ignore next */ []);
393
+ count = computed(() => Math.max(1, Math.min(12, Math.trunc(this.host.numberOfMonths()) || 1, monthIndex(this.upper()) - monthIndex(this.lower()) + 1)), ...ngDevMode ? [{ debugName: "count" }] : /* istanbul ignore next */ []);
394
+ lower = computed(() => valid(this.host.startMonth()) ? civil(Math.min(9999, Math.max(1, this.host.startMonth().getFullYear())), this.host.startMonth().getMonth()) : this.host.captionLayout() !== "label" ? civil(Math.max(1, this.host.today().getFullYear() - 100)) : civil(1), ...ngDevMode ? [{ debugName: "lower" }] : /* istanbul ignore next */ []);
395
+ upper = computed(() => {
396
+ const candidate = valid(this.host.endMonth()) ? civil(Math.max(1, Math.min(9999, this.host.endMonth().getFullYear())), this.host.endMonth().getMonth()) : this.host.captionLayout() !== "label" ? civil(this.host.today().getFullYear(), 11) : civil(9999, 11);
397
+ return monthIndex(candidate) < monthIndex(this.lower()) ? this.lower() : candidate;
398
+ }, ...ngDevMode ? [{ debugName: "upper" }] : /* istanbul ignore next */ []);
399
+ displayedMonth = computed(() => {
400
+ const candidate = this.monthControlled() ? this.host.month() : this.internalMonth() ?? this.host.defaultMonth();
401
+ return this.clampMonth(valid(candidate) ? candidate : this.initialMonth);
402
+ }, ...ngDevMode ? [{ debugName: "displayedMonth" }] : /* istanbul ignore next */ []);
403
+ weekInfo = computed(() => {
404
+ try {
405
+ const locale = new Intl.Locale(this.host.locale());
406
+ const info = locale.getWeekInfo?.() ?? locale.weekInfo;
407
+ return {
408
+ start: (info?.firstDay ?? 7) % 7,
409
+ first: info?.minimalDays === 4 ? 4 : 1
410
+ };
411
+ } catch {
412
+ return {
413
+ start: 0,
414
+ first: 1
415
+ };
416
+ }
417
+ }, ...ngDevMode ? [{ debugName: "weekInfo" }] : /* istanbul ignore next */ []);
418
+ weekStart = computed(() => this.host.ISOWeek() ? 1 : this.host.weekStartsOn() === void 0 ? this.weekInfo().start : (Math.trunc(this.host.weekStartsOn()) % 7 + 7) % 7, ...ngDevMode ? [{ debugName: "weekStart" }] : /* istanbul ignore next */ []);
419
+ weekdays = computed(() => Array.from({ length: 7 }, (_, i) => addDays(civil(2024, 0, 7), (this.weekStart() + i) % 7)), ...ngDevMode ? [{ debugName: "weekdays" }] : /* istanbul ignore next */ []);
420
+ years = computed(() => Array.from({ length: Math.max(0, this.upper().getFullYear() - this.lower().getFullYear() + 1) }, (_, i) => this.lower().getFullYear() + i), ...ngDevMode ? [{ debugName: "years" }] : /* istanbul ignore next */ []);
421
+ months = computed(() => Array.from({ length: this.count() }, (_, index) => {
422
+ const month = addMonths(this.displayedMonth(), index);
423
+ const first = addDays(month, -((month.getDay() - this.weekStart() + 7) % 7));
424
+ const days = civil(month.getFullYear(), month.getMonth() + 1, 0).getDate();
425
+ const weeks = this.host.fixedWeeks() ? 6 : Math.ceil(((month.getDay() - this.weekStart() + 7) % 7 + days) / 7);
426
+ return {
427
+ date: month,
428
+ key: key(month),
429
+ weeks: Array.from({ length: weeks }, (_, w) => {
430
+ const start = addDays(first, w * 7);
431
+ return {
432
+ key: key(start),
433
+ number: weekNumber(start, this.weekStart(), this.host.ISOWeek() ? 4 : this.host.firstWeekContainsDate() ?? this.weekInfo().first),
434
+ days: Array.from({ length: 7 }, (_, d) => this.day(addDays(start, d), month))
435
+ };
436
+ })
437
+ };
438
+ }), ...ngDevMode ? [{ debugName: "months" }] : /* istanbul ignore next */ []);
439
+ availableDays = computed(() => this.months().flatMap((month) => month.weeks.flatMap((week) => week.days)).filter((day) => !day.modifiers["hidden"] && !day.modifiers["disabled"]), ...ngDevMode ? [{ debugName: "availableDays" }] : /* istanbul ignore next */ []);
440
+ tabDay = computed(() => {
441
+ const days = this.availableDays();
442
+ return days.find((day) => day.key === this.focused() && !day.modifiers["outside"]) ?? days.find((day) => day.key === this.focused()) ?? days.find((day) => day.modifiers["selected"] && !day.modifiers["outside"]) ?? days.find((day) => day.modifiers["today"] && !day.modifiers["outside"]) ?? days.find((day) => !day.modifiers["outside"]) ?? days[0];
443
+ }, ...ngDevMode ? [{ debugName: "tabDay" }] : /* istanbul ignore next */ []);
444
+ selectionAnnouncement = computed(() => {
445
+ const value = this.selection();
446
+ return (value instanceof Date ? [value] : Array.isArray(value) ? value : value ? [value.from, value.to] : []).filter(valid).map((date) => this.host.format(date, { dateStyle: "long" })).join(", ");
447
+ }, ...ngDevMode ? [{ debugName: "selectionAnnouncement" }] : /* istanbul ignore next */ []);
448
+ constructor(host) {
449
+ this.host = host;
450
+ }
451
+ init() {
452
+ this.internalSelection.set({ value: this.host.defaultSelected() });
453
+ this.internalMonth.set(valid(this.host.defaultMonth()) ? this.host.defaultMonth() : this.initialMonth);
454
+ }
455
+ markSelectionControlled() {
456
+ this.controlledSelection.set(true);
457
+ }
458
+ markMonthControlled() {
459
+ this.monthControlled.set(true);
460
+ }
461
+ setInternalSelection(value) {
462
+ this.internalSelection.set(value);
463
+ }
464
+ setInternalMonth(date) {
465
+ this.internalMonth.set(date);
466
+ }
467
+ clampMonth(date) {
468
+ const lower = monthIndex(this.lower()), upper = Math.max(lower, monthIndex(this.upper()) - this.count() + 1);
469
+ const index = Math.max(lower, Math.min(upper, monthIndex(date)));
470
+ return civil(Math.floor(index / 12), index % 12);
471
+ }
472
+ selectedDates() {
473
+ const value = this.selection();
474
+ return value instanceof Date ? [value] : Array.isArray(value) ? value : [];
475
+ }
476
+ range() {
477
+ const value = this.selection();
478
+ return value && !(value instanceof Date) && !Array.isArray(value) ? value : void 0;
479
+ }
480
+ day(date, month) {
481
+ const outside = date.getMonth() !== month.getMonth();
482
+ const range = this.host.mode() === "range" ? this.range() : void 0, from = range?.from, to = range?.to;
483
+ const selected = range ? valid(from) && (same(date, from) || valid(to) && ordinal(date) >= ordinal(from) && ordinal(date) <= ordinal(to)) : this.selectedDates().some((selected) => same(date, selected));
484
+ const modifiers = {
485
+ ...Object.fromEntries(Object.entries(this.host.modifiers()).map(([name, matcher]) => [name, matches(date, matcher)])),
486
+ outside,
487
+ selected,
488
+ today: same(date, this.host.today()),
489
+ disabled: this.host.isDisabled(date),
490
+ hidden: matches(date, this.host.hidden()) || outside && !this.host.showOutsideDays(),
491
+ range_start: !!range && same(date, from),
492
+ range_end: !!range && same(date, to),
493
+ range_middle: !!range && valid(from) && valid(to) && ordinal(date) > ordinal(from) && ordinal(date) < ordinal(to)
494
+ };
495
+ const classes = Object.entries(this.host.modifiersClassNames()).filter(([name]) => modifiers[name]).map(([, value]) => value).join(" ");
496
+ return {
497
+ date,
498
+ key: key(date),
499
+ modifiers,
500
+ classes
501
+ };
502
+ }
503
+ };
504
+ var RaqmCalendarComponent = class RaqmCalendarComponent {
505
+ host = inject(ElementRef);
506
+ mode = input("single", ...ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []);
507
+ defaultSelected = input(...ngDevMode ? [void 0, { debugName: "defaultSelected" }] : /* istanbul ignore next */ []);
508
+ defaultMonth = input(...ngDevMode ? [void 0, { debugName: "defaultMonth" }] : /* istanbul ignore next */ []);
509
+ selected = input(...ngDevMode ? [void 0, { debugName: "selected" }] : /* istanbul ignore next */ []);
510
+ selectedChange = output();
511
+ month = input(...ngDevMode ? [void 0, { debugName: "month" }] : /* istanbul ignore next */ []);
512
+ monthChange = output();
513
+ numberOfMonths = input(1, ...ngDevMode ? [{ debugName: "numberOfMonths" }] : /* istanbul ignore next */ []);
514
+ startMonth = input(...ngDevMode ? [void 0, { debugName: "startMonth" }] : /* istanbul ignore next */ []);
515
+ endMonth = input(...ngDevMode ? [void 0, { debugName: "endMonth" }] : /* istanbul ignore next */ []);
516
+ disableNavigation = input(false, {
517
+ ...ngDevMode ? { debugName: "disableNavigation" } : /* istanbul ignore next */ {},
518
+ transform: booleanAttribute
519
+ });
520
+ hideNavigation = input(false, {
521
+ ...ngDevMode ? { debugName: "hideNavigation" } : /* istanbul ignore next */ {},
522
+ transform: booleanAttribute
523
+ });
524
+ pagedNavigation = input(false, {
525
+ ...ngDevMode ? { debugName: "pagedNavigation" } : /* istanbul ignore next */ {},
526
+ transform: booleanAttribute
527
+ });
528
+ captionLayout = input("label", ...ngDevMode ? [{ debugName: "captionLayout" }] : /* istanbul ignore next */ []);
529
+ appearance = input("", ...ngDevMode ? [{ debugName: "appearance" }] : /* istanbul ignore next */ []);
530
+ navAppearance = computed(() => this.appearance() || "ghost", ...ngDevMode ? [{ debugName: "navAppearance" }] : /* istanbul ignore next */ []);
531
+ locale = input("en-US", ...ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []);
532
+ dir = input(...ngDevMode ? [void 0, { debugName: "dir" }] : /* istanbul ignore next */ []);
533
+ weekStartsOn = input(...ngDevMode ? [void 0, { debugName: "weekStartsOn" }] : /* istanbul ignore next */ []);
534
+ firstWeekContainsDate = input(...ngDevMode ? [void 0, { debugName: "firstWeekContainsDate" }] : /* istanbul ignore next */ []);
535
+ ISOWeek = input(false, {
536
+ ...ngDevMode ? { debugName: "ISOWeek" } : /* istanbul ignore next */ {},
537
+ transform: booleanAttribute
538
+ });
539
+ fixedWeeks = input(false, {
540
+ ...ngDevMode ? { debugName: "fixedWeeks" } : /* istanbul ignore next */ {},
541
+ transform: booleanAttribute
542
+ });
543
+ showOutsideDays = input(true, {
544
+ ...ngDevMode ? { debugName: "showOutsideDays" } : /* istanbul ignore next */ {},
545
+ transform: booleanAttribute
546
+ });
547
+ showWeekNumber = input(false, {
548
+ ...ngDevMode ? { debugName: "showWeekNumber" } : /* istanbul ignore next */ {},
549
+ transform: booleanAttribute
550
+ });
551
+ disabled = input(...ngDevMode ? [void 0, { debugName: "disabled" }] : /* istanbul ignore next */ []);
552
+ hidden = input(...ngDevMode ? [void 0, { debugName: "hidden" }] : /* istanbul ignore next */ []);
553
+ required = input(false, {
554
+ ...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
555
+ transform: booleanAttribute
556
+ });
557
+ min = input(...ngDevMode ? [void 0, { debugName: "min" }] : /* istanbul ignore next */ []);
558
+ max = input(...ngDevMode ? [void 0, { debugName: "max" }] : /* istanbul ignore next */ []);
559
+ excludeDisabled = input(false, {
560
+ ...ngDevMode ? { debugName: "excludeDisabled" } : /* istanbul ignore next */ {},
561
+ transform: booleanAttribute
562
+ });
563
+ today = input(clean(/* @__PURE__ */ new Date()), ...ngDevMode ? [{ debugName: "today" }] : /* istanbul ignore next */ []);
564
+ modifiers = input({}, ...ngDevMode ? [{ debugName: "modifiers" }] : /* istanbul ignore next */ []);
565
+ modifiersClassNames = input({}, ...ngDevMode ? [{ debugName: "modifiersClassNames" }] : /* istanbul ignore next */ []);
566
+ dayTemplateDirective = contentChild(RaqmCalendarDayDirective, ...ngDevMode ? [{ debugName: "dayTemplateDirective" }] : /* istanbul ignore next */ []);
567
+ dayContent = computed(() => this.dayTemplateDirective()?.template, ...ngDevMode ? [{ debugName: "dayContent" }] : /* istanbul ignore next */ []);
568
+ formatters = input({}, ...ngDevMode ? [{ debugName: "formatters" }] : /* istanbul ignore next */ []);
569
+ labels = input({}, ...ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []);
570
+ footer = input("", ...ngDevMode ? [{ debugName: "footer" }] : /* istanbul ignore next */ []);
571
+ view = new RaqmCalendarViewState({
572
+ defaultSelected: () => this.defaultSelected(),
573
+ selected: () => this.selected(),
574
+ defaultMonth: () => this.defaultMonth(),
575
+ month: () => this.month(),
576
+ numberOfMonths: () => this.numberOfMonths(),
577
+ startMonth: () => this.startMonth(),
578
+ endMonth: () => this.endMonth(),
579
+ captionLayout: () => this.captionLayout(),
580
+ locale: () => this.locale(),
581
+ today: () => this.today(),
582
+ mode: () => this.mode(),
583
+ weekStartsOn: () => this.weekStartsOn(),
584
+ firstWeekContainsDate: () => this.firstWeekContainsDate(),
585
+ ISOWeek: () => this.ISOWeek(),
586
+ fixedWeeks: () => this.fixedWeeks(),
587
+ showOutsideDays: () => this.showOutsideDays(),
588
+ hidden: () => this.hidden(),
589
+ modifiers: () => this.modifiers(),
590
+ modifiersClassNames: () => this.modifiersClassNames(),
591
+ isDisabled: (date) => this.selectionControl.isDisabled(date),
592
+ format: (date, options) => this.formats.format(date, options)
593
+ });
594
+ selection = this.view.selection;
595
+ count = this.view.count;
596
+ lower = this.view.lower;
597
+ upper = this.view.upper;
598
+ displayedMonth = this.view.displayedMonth;
599
+ weekStart = this.view.weekStart;
600
+ weekdays = this.view.weekdays;
601
+ years = this.view.years;
602
+ months = this.view.months;
603
+ availableDays = this.view.availableDays;
604
+ tabDay = this.view.tabDay;
605
+ monthOptions = Array.from({ length: 12 }, (_, i) => i);
606
+ selectionAnnouncement = this.view.selectionAnnouncement;
607
+ formats = new RaqmCalendarFormat({
608
+ locale: () => this.locale(),
609
+ formatters: () => this.formatters(),
610
+ labels: () => this.labels()
611
+ });
612
+ selectionControl = new RaqmCalendarSelection({
613
+ mode: () => this.mode(),
614
+ min: () => this.min(),
615
+ max: () => this.max(),
616
+ required: () => this.required(),
617
+ excludeDisabled: () => this.excludeDisabled(),
618
+ controlledSelection: () => this.view.controlledSelection(),
619
+ selectedDates: () => this.view.selectedDates(),
620
+ range: () => this.view.range(),
621
+ lower: () => this.lower(),
622
+ upper: () => this.upper(),
623
+ disabled: () => this.disabled(),
624
+ setInternalSelection: (value) => this.view.setInternalSelection(value),
625
+ emit: (value) => this.selectedChange.emit(value),
626
+ setFocused: (key) => this.view.focused.set(key),
627
+ disableNavigation: () => this.disableNavigation(),
628
+ changeMonth: (date) => this.navigation.changeMonth(date)
629
+ });
630
+ navigation = new RaqmCalendarNavigation({
631
+ displayedMonth: () => this.displayedMonth(),
632
+ count: () => this.count(),
633
+ disableNavigation: () => this.disableNavigation(),
634
+ pagedNavigation: () => this.pagedNavigation(),
635
+ monthControlled: () => this.view.monthControlled(),
636
+ lower: () => this.lower(),
637
+ upper: () => this.upper(),
638
+ clampMonth: (date) => this.view.clampMonth(date),
639
+ setInternalMonth: (date) => this.view.setInternalMonth(date),
640
+ emitMonth: (date) => this.monthChange.emit(date)
641
+ });
642
+ keyboard = new RaqmCalendarKeyboard({
643
+ element: () => this.host.nativeElement,
644
+ dir: () => this.dir(),
645
+ weekStart: () => this.weekStart(),
646
+ lower: () => this.lower(),
647
+ upper: () => this.upper(),
648
+ availableDays: () => this.availableDays(),
649
+ disableNavigation: () => this.disableNavigation(),
650
+ isDisabled: (date) => this.selectionControl.isDisabled(date),
651
+ hidden: () => this.hidden(),
652
+ changeMonth: (date) => this.navigation.changeMonth(date),
653
+ setFocused: (key) => this.view.focused.set(key),
654
+ setPendingFocus: (value) => this.view.pendingFocus.set(value),
655
+ setFocusOwned: (value) => this.view.focusOwned.set(value)
656
+ });
657
+ constructor() {
658
+ connectCalendarEffects({
659
+ tabDay: () => this.tabDay(),
660
+ months: () => this.months(),
661
+ pendingFocus: () => this.view.pendingFocus(),
662
+ focusOwned: () => this.view.focusOwned(),
663
+ element: () => this.host.nativeElement,
664
+ setPendingFocus: (value) => this.view.pendingFocus.set(value)
665
+ });
666
+ }
667
+ ngOnChanges(changes) {
668
+ if ("selected" in changes) this.view.markSelectionControlled();
669
+ if ("month" in changes) this.view.markMonthControlled();
670
+ }
671
+ ngOnInit() {
672
+ this.view.init();
673
+ }
674
+ isDisabled(date) {
675
+ return this.selectionControl.isDisabled(date);
676
+ }
677
+ format(date, options) {
678
+ return this.formats.format(date, options);
679
+ }
680
+ caption(date) {
681
+ return this.formats.caption(date);
682
+ }
683
+ monthLabel(date, month) {
684
+ return this.formats.monthLabel(date, month);
685
+ }
686
+ yearLabel(year) {
687
+ return this.formats.yearLabel(year);
688
+ }
689
+ weekday(date) {
690
+ return this.formats.weekday(date);
691
+ }
692
+ dayLabel(day) {
693
+ return this.formats.dayLabel(day);
694
+ }
695
+ dayText(date) {
696
+ return this.formats.dayText(date);
697
+ }
698
+ weekText(week) {
699
+ return this.formats.weekText(week);
700
+ }
701
+ context(day) {
702
+ return {
703
+ $implicit: day.date,
704
+ date: day.date,
705
+ modifiers: day.modifiers
706
+ };
707
+ }
708
+ isTabDay(day) {
709
+ return this.tabDay() === day;
710
+ }
711
+ canNavigate(direction) {
712
+ return this.navigation.canNavigate(direction);
713
+ }
714
+ navigate(direction) {
715
+ this.navigation.navigate(direction);
716
+ }
717
+ dropdown(date, index, event, year) {
718
+ this.navigation.dropdown(date, index, event, year);
719
+ }
720
+ monthDisabled(date, month) {
721
+ return this.navigation.monthDisabled(date, month);
722
+ }
723
+ selectDay(day) {
724
+ this.selectionControl.selectDay(day);
725
+ }
726
+ focusIn(event) {
727
+ this.keyboard.focusIn(event);
728
+ }
729
+ focusOut(event) {
730
+ this.keyboard.focusOut(event);
731
+ }
732
+ keydown(event, day) {
733
+ this.keyboard.keydown(event, day);
734
+ }
735
+ static ɵfac = i0.ɵɵngDeclareFactory({
736
+ minVersion: "12.0.0",
737
+ version: "22.2.2",
738
+ ngImport: i0,
739
+ type: RaqmCalendarComponent,
740
+ deps: [],
741
+ target: i0.ɵɵFactoryTarget.Component
742
+ });
743
+ static ɵcmp = i0.ɵɵngDeclareComponent({
744
+ minVersion: "17.0.0",
745
+ version: "22.2.2",
746
+ type: RaqmCalendarComponent,
747
+ isStandalone: true,
748
+ selector: "raqm-calendar",
749
+ inputs: {
750
+ mode: {
751
+ classPropertyName: "mode",
752
+ publicName: "mode",
753
+ isSignal: true,
754
+ isRequired: false,
755
+ transformFunction: null
756
+ },
757
+ defaultSelected: {
758
+ classPropertyName: "defaultSelected",
759
+ publicName: "defaultSelected",
760
+ isSignal: true,
761
+ isRequired: false,
762
+ transformFunction: null
763
+ },
764
+ defaultMonth: {
765
+ classPropertyName: "defaultMonth",
766
+ publicName: "defaultMonth",
767
+ isSignal: true,
768
+ isRequired: false,
769
+ transformFunction: null
770
+ },
771
+ selected: {
772
+ classPropertyName: "selected",
773
+ publicName: "selected",
774
+ isSignal: true,
775
+ isRequired: false,
776
+ transformFunction: null
777
+ },
778
+ month: {
779
+ classPropertyName: "month",
780
+ publicName: "month",
781
+ isSignal: true,
782
+ isRequired: false,
783
+ transformFunction: null
784
+ },
785
+ numberOfMonths: {
786
+ classPropertyName: "numberOfMonths",
787
+ publicName: "numberOfMonths",
788
+ isSignal: true,
789
+ isRequired: false,
790
+ transformFunction: null
791
+ },
792
+ startMonth: {
793
+ classPropertyName: "startMonth",
794
+ publicName: "startMonth",
795
+ isSignal: true,
796
+ isRequired: false,
797
+ transformFunction: null
798
+ },
799
+ endMonth: {
800
+ classPropertyName: "endMonth",
801
+ publicName: "endMonth",
802
+ isSignal: true,
803
+ isRequired: false,
804
+ transformFunction: null
805
+ },
806
+ disableNavigation: {
807
+ classPropertyName: "disableNavigation",
808
+ publicName: "disableNavigation",
809
+ isSignal: true,
810
+ isRequired: false,
811
+ transformFunction: null
812
+ },
813
+ hideNavigation: {
814
+ classPropertyName: "hideNavigation",
815
+ publicName: "hideNavigation",
816
+ isSignal: true,
817
+ isRequired: false,
818
+ transformFunction: null
819
+ },
820
+ pagedNavigation: {
821
+ classPropertyName: "pagedNavigation",
822
+ publicName: "pagedNavigation",
823
+ isSignal: true,
824
+ isRequired: false,
825
+ transformFunction: null
826
+ },
827
+ captionLayout: {
828
+ classPropertyName: "captionLayout",
829
+ publicName: "captionLayout",
830
+ isSignal: true,
831
+ isRequired: false,
832
+ transformFunction: null
833
+ },
834
+ appearance: {
835
+ classPropertyName: "appearance",
836
+ publicName: "appearance",
837
+ isSignal: true,
838
+ isRequired: false,
839
+ transformFunction: null
840
+ },
841
+ locale: {
842
+ classPropertyName: "locale",
843
+ publicName: "locale",
844
+ isSignal: true,
845
+ isRequired: false,
846
+ transformFunction: null
847
+ },
848
+ dir: {
849
+ classPropertyName: "dir",
850
+ publicName: "dir",
851
+ isSignal: true,
852
+ isRequired: false,
853
+ transformFunction: null
854
+ },
855
+ weekStartsOn: {
856
+ classPropertyName: "weekStartsOn",
857
+ publicName: "weekStartsOn",
858
+ isSignal: true,
859
+ isRequired: false,
860
+ transformFunction: null
861
+ },
862
+ firstWeekContainsDate: {
863
+ classPropertyName: "firstWeekContainsDate",
864
+ publicName: "firstWeekContainsDate",
865
+ isSignal: true,
866
+ isRequired: false,
867
+ transformFunction: null
868
+ },
869
+ ISOWeek: {
870
+ classPropertyName: "ISOWeek",
871
+ publicName: "ISOWeek",
872
+ isSignal: true,
873
+ isRequired: false,
874
+ transformFunction: null
875
+ },
876
+ fixedWeeks: {
877
+ classPropertyName: "fixedWeeks",
878
+ publicName: "fixedWeeks",
879
+ isSignal: true,
880
+ isRequired: false,
881
+ transformFunction: null
882
+ },
883
+ showOutsideDays: {
884
+ classPropertyName: "showOutsideDays",
885
+ publicName: "showOutsideDays",
886
+ isSignal: true,
887
+ isRequired: false,
888
+ transformFunction: null
889
+ },
890
+ showWeekNumber: {
891
+ classPropertyName: "showWeekNumber",
892
+ publicName: "showWeekNumber",
893
+ isSignal: true,
894
+ isRequired: false,
895
+ transformFunction: null
896
+ },
897
+ disabled: {
898
+ classPropertyName: "disabled",
899
+ publicName: "disabled",
900
+ isSignal: true,
901
+ isRequired: false,
902
+ transformFunction: null
903
+ },
904
+ hidden: {
905
+ classPropertyName: "hidden",
906
+ publicName: "hidden",
907
+ isSignal: true,
908
+ isRequired: false,
909
+ transformFunction: null
910
+ },
911
+ required: {
912
+ classPropertyName: "required",
913
+ publicName: "required",
914
+ isSignal: true,
915
+ isRequired: false,
916
+ transformFunction: null
917
+ },
918
+ min: {
919
+ classPropertyName: "min",
920
+ publicName: "min",
921
+ isSignal: true,
922
+ isRequired: false,
923
+ transformFunction: null
924
+ },
925
+ max: {
926
+ classPropertyName: "max",
927
+ publicName: "max",
928
+ isSignal: true,
929
+ isRequired: false,
930
+ transformFunction: null
931
+ },
932
+ excludeDisabled: {
933
+ classPropertyName: "excludeDisabled",
934
+ publicName: "excludeDisabled",
935
+ isSignal: true,
936
+ isRequired: false,
937
+ transformFunction: null
938
+ },
939
+ today: {
940
+ classPropertyName: "today",
941
+ publicName: "today",
942
+ isSignal: true,
943
+ isRequired: false,
944
+ transformFunction: null
945
+ },
946
+ modifiers: {
947
+ classPropertyName: "modifiers",
948
+ publicName: "modifiers",
949
+ isSignal: true,
950
+ isRequired: false,
951
+ transformFunction: null
952
+ },
953
+ modifiersClassNames: {
954
+ classPropertyName: "modifiersClassNames",
955
+ publicName: "modifiersClassNames",
956
+ isSignal: true,
957
+ isRequired: false,
958
+ transformFunction: null
959
+ },
960
+ formatters: {
961
+ classPropertyName: "formatters",
962
+ publicName: "formatters",
963
+ isSignal: true,
964
+ isRequired: false,
965
+ transformFunction: null
966
+ },
967
+ labels: {
968
+ classPropertyName: "labels",
969
+ publicName: "labels",
970
+ isSignal: true,
971
+ isRequired: false,
972
+ transformFunction: null
973
+ },
974
+ footer: {
975
+ classPropertyName: "footer",
976
+ publicName: "footer",
977
+ isSignal: true,
978
+ isRequired: false,
979
+ transformFunction: null
980
+ }
981
+ },
982
+ outputs: {
983
+ selectedChange: "selectedChange",
984
+ monthChange: "monthChange"
985
+ },
986
+ host: {
987
+ attributes: {
988
+ "tabindex": "-1",
989
+ "data-raqm-slot": "calendar"
990
+ },
991
+ listeners: {
992
+ "focusin": "focusIn($event)",
993
+ "focusout": "focusOut($event)"
994
+ },
995
+ properties: { "attr.dir": "dir()" },
996
+ classAttribute: "raqm-calendar"
997
+ },
998
+ queries: [{
999
+ propertyName: "dayTemplateDirective",
1000
+ first: true,
1001
+ predicate: RaqmCalendarDayDirective,
1002
+ descendants: true,
1003
+ isSignal: true
1004
+ }],
1005
+ usesOnChanges: true,
1006
+ ngImport: i0,
1007
+ template: "<div class=\"raqm-calendar-months\">\r\n @if (!hideNavigation()) {\r\n <nav class=\"raqm-calendar-nav\" [attr.aria-label]=\"labels().navigation\">\r\n <button\r\n [raqm-button]=\"navAppearance()\"\r\n icon\r\n class=\"raqm-calendar-nav-button\"\r\n [disabled]=\"!canNavigate(-1)\"\r\n [attr.aria-label]=\"labels().previous\"\r\n (click)=\"navigate(-1)\"\r\n >\r\n <svg\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n aria-hidden=\"true\"\r\n >\r\n <path d=\"m15 18-6-6 6-6\" />\r\n </svg>\r\n </button>\r\n <button\r\n [raqm-button]=\"navAppearance()\"\r\n icon\r\n class=\"raqm-calendar-nav-button\"\r\n [disabled]=\"!canNavigate(1)\"\r\n [attr.aria-label]=\"labels().next\"\r\n (click)=\"navigate(1)\"\r\n >\r\n <svg\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n aria-hidden=\"true\"\r\n >\r\n <path d=\"m9 18 6-6-6-6\" />\r\n </svg>\r\n </button>\r\n </nav>\r\n }\r\n @for (month of months(); track month.key; let index = $index) {\r\n <div class=\"raqm-calendar-month\">\r\n <div class=\"raqm-calendar-caption\">\r\n @if (captionLayout() === 'label') {\r\n <span>{{ caption(month.date) }}</span>\r\n } @else {\r\n <div class=\"raqm-calendar-dropdowns\">\r\n @if (captionLayout() !== 'dropdown-years') {\r\n <span class=\"raqm-calendar-dropdown-root\">\r\n <span class=\"raqm-calendar-caption-label\" aria-hidden=\"true\"\r\n >{{ monthLabel(month.date, month.date.getMonth())\r\n }}<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\r\n <path d=\"m6 9 6 6 6-6\" /></svg\r\n ></span>\r\n <select\r\n [attr.aria-label]=\"labels().monthDropdown\"\r\n [disabled]=\"disableNavigation()\"\r\n (change)=\"dropdown(month.date, index, $event, false)\"\r\n >\r\n @for (option of monthOptions; track option) {\r\n <option\r\n [value]=\"option\"\r\n [selected]=\"option === month.date.getMonth()\"\r\n [disabled]=\"monthDisabled(month.date, option)\"\r\n >\r\n {{ monthLabel(month.date, option) }}\r\n </option>\r\n }\r\n </select>\r\n </span>\r\n } @else {\r\n <span>{{ monthLabel(month.date, month.date.getMonth()) }}</span>\r\n }\r\n @if (captionLayout() !== 'dropdown-months') {\r\n <span class=\"raqm-calendar-dropdown-root\">\r\n <span class=\"raqm-calendar-caption-label\" aria-hidden=\"true\"\r\n >{{ yearLabel(month.date.getFullYear())\r\n }}<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\r\n <path d=\"m6 9 6 6 6-6\" /></svg\r\n ></span>\r\n <select\r\n [attr.aria-label]=\"labels().yearDropdown\"\r\n [disabled]=\"disableNavigation()\"\r\n (change)=\"dropdown(month.date, index, $event, true)\"\r\n >\r\n @for (year of years(); track year) {\r\n <option [value]=\"year\" [selected]=\"year === month.date.getFullYear()\">\r\n {{ yearLabel(year) }}\r\n </option>\r\n }\r\n </select>\r\n </span>\r\n } @else {\r\n <span>{{ yearLabel(month.date.getFullYear()) }}</span>\r\n }\r\n </div>\r\n }\r\n </div>\r\n <table\r\n role=\"grid\"\r\n [attr.aria-label]=\"caption(month.date)\"\r\n [attr.aria-multiselectable]=\"mode() !== 'single' ? true : null\"\r\n class=\"raqm-calendar-grid\"\r\n >\r\n <thead>\r\n <tr class=\"raqm-calendar-weekdays\">\r\n @if (showWeekNumber()) {\r\n <th class=\"raqm-calendar-week-number\" scope=\"col\">\r\n <span class=\"raqm-calendar-sr\">{{ labels().weekNumber }}</span>\r\n </th>\r\n }\r\n @for (weekdayDate of weekdays(); track $index) {\r\n <th\r\n scope=\"col\"\r\n [attr.aria-label]=\"format(weekdayDate, { weekday: 'long' })\"\r\n class=\"raqm-calendar-weekday\"\r\n >\r\n {{ weekday(weekdayDate) }}\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (week of month.weeks; track week.key) {\r\n <tr class=\"raqm-calendar-week\">\r\n @if (showWeekNumber()) {\r\n <th scope=\"row\" class=\"raqm-calendar-week-number\">{{ weekText(week.number) }}</th>\r\n }\r\n @for (day of week.days; track day.key) {\r\n <td\r\n [class]=\"'raqm-calendar-day ' + day.classes\"\r\n [attr.data-raqm-selected]=\"day.modifiers['selected'] ? '' : null\"\r\n [attr.data-raqm-today]=\"day.modifiers['today'] ? '' : null\"\r\n [attr.data-raqm-outside]=\"day.modifiers['outside'] ? '' : null\"\r\n [attr.data-raqm-disabled]=\"day.modifiers['disabled'] ? '' : null\"\r\n [attr.data-raqm-range-start]=\"day.modifiers['range_start'] ? '' : null\"\r\n [attr.data-raqm-range-end]=\"day.modifiers['range_end'] ? '' : null\"\r\n [attr.data-raqm-range-middle]=\"day.modifiers['range_middle'] ? '' : null\"\r\n [attr.aria-selected]=\"day.modifiers['selected']\"\r\n [attr.aria-disabled]=\"day.modifiers['disabled'] || null\"\r\n >\r\n @if (!day.modifiers['hidden']) {\r\n <button\r\n raqm-button=\"ghost\"\r\n raqm-calendar-day-button\r\n icon\r\n [date]=\"day.date\"\r\n [locale]=\"locale()\"\r\n [modifiers]=\"day.modifiers\"\r\n [disabled]=\"day.modifiers['disabled']\"\r\n [attr.tabindex]=\"isTabDay(day) ? 0 : -1\"\r\n [attr.data-raqm-key]=\"day.key\"\r\n [attr.aria-label]=\"dayLabel(day)\"\r\n [attr.aria-current]=\"day.modifiers['today'] ? 'date' : null\"\r\n (click)=\"selectDay(day)\"\r\n (keydown)=\"keydown($event, day)\"\r\n >\r\n @if (dayContent(); as content) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"content\"\r\n [ngTemplateOutletContext]=\"context(day)\"\r\n />\r\n } @else {\r\n {{ dayText(day.date) }}\r\n }\r\n </button>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </tbody>\r\n </table>\r\n </div>\r\n }\r\n</div>\r\n<div class=\"raqm-calendar-sr\" aria-live=\"polite\" aria-atomic=\"true\">\r\n @for (month of months(); track month.key) {\r\n {{ caption(month.date) }}\r\n }\r\n</div>\r\n@if (footer()) {\r\n <div role=\"status\">{{ footer() }}</div>\r\n}\r\n<div class=\"raqm-calendar-sr\" aria-live=\"polite\" aria-atomic=\"true\">\r\n {{ selectionAnnouncement() }}\r\n</div>\r\n",
1008
+ styles: [":host{--cell-size: calc(var(--raqm-spacing) * 7);--cell-radius: var(--raqm-radius-md);display:block;width:fit-content;padding:calc(var(--raqm-spacing) * 2);color:var(--raqm-foreground);background:var(--raqm-background);font-family:inherit;font-size:var(--raqm-font-size-sm)}:host-context(.raqm-card-content),:host-context(.raqm-popover-content){background:transparent}.raqm-calendar-months{position:relative;display:flex;flex-direction:column;gap:1rem}@media(min-width:768px){.raqm-calendar-months{flex-direction:row}}.raqm-calendar-month{display:flex;flex-direction:column;gap:1rem;width:calc(var(--cell-size) * 7)}.raqm-calendar-month:has(.raqm-calendar-week-number){width:calc(var(--cell-size) * 8)}.raqm-calendar-nav{position:absolute;inset-inline:0;top:0;display:flex;justify-content:space-between;gap:.25rem;pointer-events:none}.raqm-calendar-nav .raqm-calendar-nav-button{width:var(--cell-size);height:var(--cell-size);padding:0;pointer-events:auto}.raqm-calendar-nav-button svg{width:1rem;height:1rem}:host:dir(rtl) .raqm-calendar-nav-button svg{transform:rotate(180deg)}.raqm-calendar-caption{display:flex;align-items:center;justify-content:center;height:var(--cell-size);padding-inline:var(--cell-size);font-weight:500;-webkit-user-select:none;user-select:none}.raqm-calendar-dropdowns{display:flex;align-items:center;justify-content:center;gap:.375rem;block-size:var(--cell-size);font-weight:500}.raqm-calendar-dropdown-root{position:relative;border-radius:var(--cell-radius)}.raqm-calendar-dropdown-root:focus-within{box-shadow:0 0 0 3px color-mix(in oklch,var(--raqm-ring) 50%,transparent)}.raqm-calendar-caption-label{display:flex;align-items:center;gap:.25rem;height:1.5rem;padding-left:.375rem;padding-right:.25rem}.raqm-calendar-caption-label svg{width:.875rem;height:.875rem;color:var(--raqm-muted-foreground)}.raqm-calendar-dropdown-root select{position:absolute;inset:0;width:100%;height:100%;opacity:0;background:var(--raqm-popover);color:var(--raqm-popover-foreground);cursor:pointer}.raqm-calendar-grid{width:100%;border-collapse:collapse;table-layout:fixed}.raqm-calendar-weekdays,.raqm-calendar-week{display:flex;width:100%}.raqm-calendar-week{margin-top:.5rem}.raqm-calendar-weekday{flex:1;padding:0;border-radius:var(--cell-radius);font-size:.8rem;font-weight:400;color:var(--raqm-muted-foreground);-webkit-user-select:none;user-select:none}.raqm-calendar-week-number{display:flex;align-items:center;justify-content:center;flex:0 0 var(--cell-size);height:var(--cell-size);padding:0;font-size:.8rem;font-weight:400;color:var(--raqm-muted-foreground)}.raqm-calendar-day{position:relative;isolation:isolate;flex:1;min-width:0;aspect-ratio:1;padding:0;border-radius:var(--cell-radius);text-align:center;-webkit-user-select:none;user-select:none}.raqm-calendar-day[data-raqm-today]{background:var(--raqm-muted);color:var(--raqm-foreground)}.raqm-calendar-day[data-raqm-today][data-raqm-selected]{border-radius:0}.raqm-calendar-day[data-raqm-outside],.raqm-calendar-day[data-raqm-disabled]{color:var(--raqm-muted-foreground)}.raqm-calendar-day[data-raqm-disabled]{opacity:.5}.raqm-calendar-day[data-raqm-range-start],.raqm-calendar-day[data-raqm-range-end],.raqm-calendar-day[data-raqm-range-middle]{background:var(--raqm-muted)}.raqm-calendar-day[data-raqm-range-start]{border-start-end-radius:0;border-end-end-radius:0}.raqm-calendar-day[data-raqm-range-end]{border-start-start-radius:0;border-end-start-radius:0}.raqm-calendar-day[data-raqm-range-middle]{border-radius:0}.raqm-calendar-day-button.raqm-button{position:relative;isolation:isolate;z-index:1;display:flex;flex-direction:column;gap:.25rem;width:100%;min-width:var(--cell-size);height:auto;aspect-ratio:1;padding:0;border:0;border-radius:var(--cell-radius);font-weight:400;line-height:1;color:inherit}.raqm-calendar-day-button.raqm-button:disabled{opacity:1}.raqm-calendar-day-button.raqm-button[data-raqm-range-middle]{border-radius:0;background:var(--raqm-muted);color:var(--raqm-foreground)}.raqm-calendar-day-button.raqm-button:is([data-raqm-selected-single],[data-raqm-range-start],[data-raqm-range-end]){background:var(--raqm-primary);color:var(--raqm-primary-foreground)}.raqm-calendar-day-button.raqm-button:focus-visible{z-index:10;outline:none;box-shadow:0 0 0 3px color-mix(in oklch,var(--raqm-ring) 50%,transparent)}@media(forced-colors:active){.raqm-calendar-dropdown-root:focus-within,.raqm-calendar-day-button.raqm-button:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.raqm-calendar-day:first-of-type [data-raqm-range-middle]{border-start-start-radius:var(--cell-radius);border-end-start-radius:var(--cell-radius)}.raqm-calendar-day:last-child [data-raqm-range-middle]{border-start-end-radius:var(--cell-radius);border-end-end-radius:var(--cell-radius)}.raqm-calendar-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}\n"],
1009
+ dependencies: [
1010
+ {
1011
+ kind: "directive",
1012
+ type: NgTemplateOutlet,
1013
+ selector: "[ngTemplateOutlet]",
1014
+ inputs: [
1015
+ "ngTemplateOutletContext",
1016
+ "ngTemplateOutlet",
1017
+ "ngTemplateOutletInjector"
1018
+ ]
1019
+ },
1020
+ {
1021
+ kind: "component",
1022
+ type: RaqmButton,
1023
+ selector: "button[raqm-button], a[raqm-button]",
1024
+ inputs: [
1025
+ "raqm-button",
1026
+ "extra-small",
1027
+ "small",
1028
+ "large",
1029
+ "icon",
1030
+ "icon-extra-small",
1031
+ "icon-small",
1032
+ "icon-large",
1033
+ "disabled",
1034
+ "tabindex"
1035
+ ]
1036
+ },
1037
+ {
1038
+ kind: "directive",
1039
+ type: RaqmCalendarDayButtonDirective,
1040
+ selector: "button[raqm-calendar-day-button]",
1041
+ inputs: [
1042
+ "date",
1043
+ "locale",
1044
+ "modifiers"
1045
+ ]
1046
+ }
1047
+ ],
1048
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
1049
+ });
1050
+ };
1051
+ i0.ɵɵngDeclareClassMetadata({
1052
+ minVersion: "12.0.0",
1053
+ version: "22.2.2",
1054
+ ngImport: i0,
1055
+ type: RaqmCalendarComponent,
1056
+ decorators: [{
1057
+ type: Component,
1058
+ args: [{
1059
+ selector: "raqm-calendar",
1060
+ imports: [
1061
+ NgTemplateOutlet,
1062
+ RaqmButton,
1063
+ RaqmCalendarDayButtonDirective
1064
+ ],
1065
+ changeDetection: ChangeDetectionStrategy.OnPush,
1066
+ host: {
1067
+ class: "raqm-calendar",
1068
+ tabindex: "-1",
1069
+ "data-raqm-slot": "calendar",
1070
+ "[attr.dir]": "dir()",
1071
+ "(focusin)": "focusIn($event)",
1072
+ "(focusout)": "focusOut($event)"
1073
+ },
1074
+ template: "<div class=\"raqm-calendar-months\">\r\n @if (!hideNavigation()) {\r\n <nav class=\"raqm-calendar-nav\" [attr.aria-label]=\"labels().navigation\">\r\n <button\r\n [raqm-button]=\"navAppearance()\"\r\n icon\r\n class=\"raqm-calendar-nav-button\"\r\n [disabled]=\"!canNavigate(-1)\"\r\n [attr.aria-label]=\"labels().previous\"\r\n (click)=\"navigate(-1)\"\r\n >\r\n <svg\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n aria-hidden=\"true\"\r\n >\r\n <path d=\"m15 18-6-6 6-6\" />\r\n </svg>\r\n </button>\r\n <button\r\n [raqm-button]=\"navAppearance()\"\r\n icon\r\n class=\"raqm-calendar-nav-button\"\r\n [disabled]=\"!canNavigate(1)\"\r\n [attr.aria-label]=\"labels().next\"\r\n (click)=\"navigate(1)\"\r\n >\r\n <svg\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n stroke-width=\"2\"\r\n aria-hidden=\"true\"\r\n >\r\n <path d=\"m9 18 6-6-6-6\" />\r\n </svg>\r\n </button>\r\n </nav>\r\n }\r\n @for (month of months(); track month.key; let index = $index) {\r\n <div class=\"raqm-calendar-month\">\r\n <div class=\"raqm-calendar-caption\">\r\n @if (captionLayout() === 'label') {\r\n <span>{{ caption(month.date) }}</span>\r\n } @else {\r\n <div class=\"raqm-calendar-dropdowns\">\r\n @if (captionLayout() !== 'dropdown-years') {\r\n <span class=\"raqm-calendar-dropdown-root\">\r\n <span class=\"raqm-calendar-caption-label\" aria-hidden=\"true\"\r\n >{{ monthLabel(month.date, month.date.getMonth())\r\n }}<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\r\n <path d=\"m6 9 6 6 6-6\" /></svg\r\n ></span>\r\n <select\r\n [attr.aria-label]=\"labels().monthDropdown\"\r\n [disabled]=\"disableNavigation()\"\r\n (change)=\"dropdown(month.date, index, $event, false)\"\r\n >\r\n @for (option of monthOptions; track option) {\r\n <option\r\n [value]=\"option\"\r\n [selected]=\"option === month.date.getMonth()\"\r\n [disabled]=\"monthDisabled(month.date, option)\"\r\n >\r\n {{ monthLabel(month.date, option) }}\r\n </option>\r\n }\r\n </select>\r\n </span>\r\n } @else {\r\n <span>{{ monthLabel(month.date, month.date.getMonth()) }}</span>\r\n }\r\n @if (captionLayout() !== 'dropdown-months') {\r\n <span class=\"raqm-calendar-dropdown-root\">\r\n <span class=\"raqm-calendar-caption-label\" aria-hidden=\"true\"\r\n >{{ yearLabel(month.date.getFullYear())\r\n }}<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\r\n <path d=\"m6 9 6 6 6-6\" /></svg\r\n ></span>\r\n <select\r\n [attr.aria-label]=\"labels().yearDropdown\"\r\n [disabled]=\"disableNavigation()\"\r\n (change)=\"dropdown(month.date, index, $event, true)\"\r\n >\r\n @for (year of years(); track year) {\r\n <option [value]=\"year\" [selected]=\"year === month.date.getFullYear()\">\r\n {{ yearLabel(year) }}\r\n </option>\r\n }\r\n </select>\r\n </span>\r\n } @else {\r\n <span>{{ yearLabel(month.date.getFullYear()) }}</span>\r\n }\r\n </div>\r\n }\r\n </div>\r\n <table\r\n role=\"grid\"\r\n [attr.aria-label]=\"caption(month.date)\"\r\n [attr.aria-multiselectable]=\"mode() !== 'single' ? true : null\"\r\n class=\"raqm-calendar-grid\"\r\n >\r\n <thead>\r\n <tr class=\"raqm-calendar-weekdays\">\r\n @if (showWeekNumber()) {\r\n <th class=\"raqm-calendar-week-number\" scope=\"col\">\r\n <span class=\"raqm-calendar-sr\">{{ labels().weekNumber }}</span>\r\n </th>\r\n }\r\n @for (weekdayDate of weekdays(); track $index) {\r\n <th\r\n scope=\"col\"\r\n [attr.aria-label]=\"format(weekdayDate, { weekday: 'long' })\"\r\n class=\"raqm-calendar-weekday\"\r\n >\r\n {{ weekday(weekdayDate) }}\r\n </th>\r\n }\r\n </tr>\r\n </thead>\r\n <tbody>\r\n @for (week of month.weeks; track week.key) {\r\n <tr class=\"raqm-calendar-week\">\r\n @if (showWeekNumber()) {\r\n <th scope=\"row\" class=\"raqm-calendar-week-number\">{{ weekText(week.number) }}</th>\r\n }\r\n @for (day of week.days; track day.key) {\r\n <td\r\n [class]=\"'raqm-calendar-day ' + day.classes\"\r\n [attr.data-raqm-selected]=\"day.modifiers['selected'] ? '' : null\"\r\n [attr.data-raqm-today]=\"day.modifiers['today'] ? '' : null\"\r\n [attr.data-raqm-outside]=\"day.modifiers['outside'] ? '' : null\"\r\n [attr.data-raqm-disabled]=\"day.modifiers['disabled'] ? '' : null\"\r\n [attr.data-raqm-range-start]=\"day.modifiers['range_start'] ? '' : null\"\r\n [attr.data-raqm-range-end]=\"day.modifiers['range_end'] ? '' : null\"\r\n [attr.data-raqm-range-middle]=\"day.modifiers['range_middle'] ? '' : null\"\r\n [attr.aria-selected]=\"day.modifiers['selected']\"\r\n [attr.aria-disabled]=\"day.modifiers['disabled'] || null\"\r\n >\r\n @if (!day.modifiers['hidden']) {\r\n <button\r\n raqm-button=\"ghost\"\r\n raqm-calendar-day-button\r\n icon\r\n [date]=\"day.date\"\r\n [locale]=\"locale()\"\r\n [modifiers]=\"day.modifiers\"\r\n [disabled]=\"day.modifiers['disabled']\"\r\n [attr.tabindex]=\"isTabDay(day) ? 0 : -1\"\r\n [attr.data-raqm-key]=\"day.key\"\r\n [attr.aria-label]=\"dayLabel(day)\"\r\n [attr.aria-current]=\"day.modifiers['today'] ? 'date' : null\"\r\n (click)=\"selectDay(day)\"\r\n (keydown)=\"keydown($event, day)\"\r\n >\r\n @if (dayContent(); as content) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"content\"\r\n [ngTemplateOutletContext]=\"context(day)\"\r\n />\r\n } @else {\r\n {{ dayText(day.date) }}\r\n }\r\n </button>\r\n }\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </tbody>\r\n </table>\r\n </div>\r\n }\r\n</div>\r\n<div class=\"raqm-calendar-sr\" aria-live=\"polite\" aria-atomic=\"true\">\r\n @for (month of months(); track month.key) {\r\n {{ caption(month.date) }}\r\n }\r\n</div>\r\n@if (footer()) {\r\n <div role=\"status\">{{ footer() }}</div>\r\n}\r\n<div class=\"raqm-calendar-sr\" aria-live=\"polite\" aria-atomic=\"true\">\r\n {{ selectionAnnouncement() }}\r\n</div>\r\n",
1075
+ styles: [":host{--cell-size: calc(var(--raqm-spacing) * 7);--cell-radius: var(--raqm-radius-md);display:block;width:fit-content;padding:calc(var(--raqm-spacing) * 2);color:var(--raqm-foreground);background:var(--raqm-background);font-family:inherit;font-size:var(--raqm-font-size-sm)}:host-context(.raqm-card-content),:host-context(.raqm-popover-content){background:transparent}.raqm-calendar-months{position:relative;display:flex;flex-direction:column;gap:1rem}@media(min-width:768px){.raqm-calendar-months{flex-direction:row}}.raqm-calendar-month{display:flex;flex-direction:column;gap:1rem;width:calc(var(--cell-size) * 7)}.raqm-calendar-month:has(.raqm-calendar-week-number){width:calc(var(--cell-size) * 8)}.raqm-calendar-nav{position:absolute;inset-inline:0;top:0;display:flex;justify-content:space-between;gap:.25rem;pointer-events:none}.raqm-calendar-nav .raqm-calendar-nav-button{width:var(--cell-size);height:var(--cell-size);padding:0;pointer-events:auto}.raqm-calendar-nav-button svg{width:1rem;height:1rem}:host:dir(rtl) .raqm-calendar-nav-button svg{transform:rotate(180deg)}.raqm-calendar-caption{display:flex;align-items:center;justify-content:center;height:var(--cell-size);padding-inline:var(--cell-size);font-weight:500;-webkit-user-select:none;user-select:none}.raqm-calendar-dropdowns{display:flex;align-items:center;justify-content:center;gap:.375rem;block-size:var(--cell-size);font-weight:500}.raqm-calendar-dropdown-root{position:relative;border-radius:var(--cell-radius)}.raqm-calendar-dropdown-root:focus-within{box-shadow:0 0 0 3px color-mix(in oklch,var(--raqm-ring) 50%,transparent)}.raqm-calendar-caption-label{display:flex;align-items:center;gap:.25rem;height:1.5rem;padding-left:.375rem;padding-right:.25rem}.raqm-calendar-caption-label svg{width:.875rem;height:.875rem;color:var(--raqm-muted-foreground)}.raqm-calendar-dropdown-root select{position:absolute;inset:0;width:100%;height:100%;opacity:0;background:var(--raqm-popover);color:var(--raqm-popover-foreground);cursor:pointer}.raqm-calendar-grid{width:100%;border-collapse:collapse;table-layout:fixed}.raqm-calendar-weekdays,.raqm-calendar-week{display:flex;width:100%}.raqm-calendar-week{margin-top:.5rem}.raqm-calendar-weekday{flex:1;padding:0;border-radius:var(--cell-radius);font-size:.8rem;font-weight:400;color:var(--raqm-muted-foreground);-webkit-user-select:none;user-select:none}.raqm-calendar-week-number{display:flex;align-items:center;justify-content:center;flex:0 0 var(--cell-size);height:var(--cell-size);padding:0;font-size:.8rem;font-weight:400;color:var(--raqm-muted-foreground)}.raqm-calendar-day{position:relative;isolation:isolate;flex:1;min-width:0;aspect-ratio:1;padding:0;border-radius:var(--cell-radius);text-align:center;-webkit-user-select:none;user-select:none}.raqm-calendar-day[data-raqm-today]{background:var(--raqm-muted);color:var(--raqm-foreground)}.raqm-calendar-day[data-raqm-today][data-raqm-selected]{border-radius:0}.raqm-calendar-day[data-raqm-outside],.raqm-calendar-day[data-raqm-disabled]{color:var(--raqm-muted-foreground)}.raqm-calendar-day[data-raqm-disabled]{opacity:.5}.raqm-calendar-day[data-raqm-range-start],.raqm-calendar-day[data-raqm-range-end],.raqm-calendar-day[data-raqm-range-middle]{background:var(--raqm-muted)}.raqm-calendar-day[data-raqm-range-start]{border-start-end-radius:0;border-end-end-radius:0}.raqm-calendar-day[data-raqm-range-end]{border-start-start-radius:0;border-end-start-radius:0}.raqm-calendar-day[data-raqm-range-middle]{border-radius:0}.raqm-calendar-day-button.raqm-button{position:relative;isolation:isolate;z-index:1;display:flex;flex-direction:column;gap:.25rem;width:100%;min-width:var(--cell-size);height:auto;aspect-ratio:1;padding:0;border:0;border-radius:var(--cell-radius);font-weight:400;line-height:1;color:inherit}.raqm-calendar-day-button.raqm-button:disabled{opacity:1}.raqm-calendar-day-button.raqm-button[data-raqm-range-middle]{border-radius:0;background:var(--raqm-muted);color:var(--raqm-foreground)}.raqm-calendar-day-button.raqm-button:is([data-raqm-selected-single],[data-raqm-range-start],[data-raqm-range-end]){background:var(--raqm-primary);color:var(--raqm-primary-foreground)}.raqm-calendar-day-button.raqm-button:focus-visible{z-index:10;outline:none;box-shadow:0 0 0 3px color-mix(in oklch,var(--raqm-ring) 50%,transparent)}@media(forced-colors:active){.raqm-calendar-dropdown-root:focus-within,.raqm-calendar-day-button.raqm-button:focus-visible{outline:2px solid Highlight;outline-offset:2px}}.raqm-calendar-day:first-of-type [data-raqm-range-middle]{border-start-start-radius:var(--cell-radius);border-end-start-radius:var(--cell-radius)}.raqm-calendar-day:last-child [data-raqm-range-middle]{border-start-end-radius:var(--cell-radius);border-end-end-radius:var(--cell-radius)}.raqm-calendar-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}\n"]
1076
+ }]
1077
+ }],
1078
+ ctorParameters: () => [],
1079
+ propDecorators: {
1080
+ mode: [{
1081
+ type: i0.Input,
1082
+ args: [{
1083
+ isSignal: true,
1084
+ alias: "mode",
1085
+ required: false
1086
+ }]
1087
+ }],
1088
+ defaultSelected: [{
1089
+ type: i0.Input,
1090
+ args: [{
1091
+ isSignal: true,
1092
+ alias: "defaultSelected",
1093
+ required: false
1094
+ }]
1095
+ }],
1096
+ defaultMonth: [{
1097
+ type: i0.Input,
1098
+ args: [{
1099
+ isSignal: true,
1100
+ alias: "defaultMonth",
1101
+ required: false
1102
+ }]
1103
+ }],
1104
+ selected: [{
1105
+ type: i0.Input,
1106
+ args: [{
1107
+ isSignal: true,
1108
+ alias: "selected",
1109
+ required: false
1110
+ }]
1111
+ }],
1112
+ selectedChange: [{
1113
+ type: i0.Output,
1114
+ args: ["selectedChange"]
1115
+ }],
1116
+ month: [{
1117
+ type: i0.Input,
1118
+ args: [{
1119
+ isSignal: true,
1120
+ alias: "month",
1121
+ required: false
1122
+ }]
1123
+ }],
1124
+ monthChange: [{
1125
+ type: i0.Output,
1126
+ args: ["monthChange"]
1127
+ }],
1128
+ numberOfMonths: [{
1129
+ type: i0.Input,
1130
+ args: [{
1131
+ isSignal: true,
1132
+ alias: "numberOfMonths",
1133
+ required: false
1134
+ }]
1135
+ }],
1136
+ startMonth: [{
1137
+ type: i0.Input,
1138
+ args: [{
1139
+ isSignal: true,
1140
+ alias: "startMonth",
1141
+ required: false
1142
+ }]
1143
+ }],
1144
+ endMonth: [{
1145
+ type: i0.Input,
1146
+ args: [{
1147
+ isSignal: true,
1148
+ alias: "endMonth",
1149
+ required: false
1150
+ }]
1151
+ }],
1152
+ disableNavigation: [{
1153
+ type: i0.Input,
1154
+ args: [{
1155
+ isSignal: true,
1156
+ alias: "disableNavigation",
1157
+ required: false
1158
+ }]
1159
+ }],
1160
+ hideNavigation: [{
1161
+ type: i0.Input,
1162
+ args: [{
1163
+ isSignal: true,
1164
+ alias: "hideNavigation",
1165
+ required: false
1166
+ }]
1167
+ }],
1168
+ pagedNavigation: [{
1169
+ type: i0.Input,
1170
+ args: [{
1171
+ isSignal: true,
1172
+ alias: "pagedNavigation",
1173
+ required: false
1174
+ }]
1175
+ }],
1176
+ captionLayout: [{
1177
+ type: i0.Input,
1178
+ args: [{
1179
+ isSignal: true,
1180
+ alias: "captionLayout",
1181
+ required: false
1182
+ }]
1183
+ }],
1184
+ appearance: [{
1185
+ type: i0.Input,
1186
+ args: [{
1187
+ isSignal: true,
1188
+ alias: "appearance",
1189
+ required: false
1190
+ }]
1191
+ }],
1192
+ locale: [{
1193
+ type: i0.Input,
1194
+ args: [{
1195
+ isSignal: true,
1196
+ alias: "locale",
1197
+ required: false
1198
+ }]
1199
+ }],
1200
+ dir: [{
1201
+ type: i0.Input,
1202
+ args: [{
1203
+ isSignal: true,
1204
+ alias: "dir",
1205
+ required: false
1206
+ }]
1207
+ }],
1208
+ weekStartsOn: [{
1209
+ type: i0.Input,
1210
+ args: [{
1211
+ isSignal: true,
1212
+ alias: "weekStartsOn",
1213
+ required: false
1214
+ }]
1215
+ }],
1216
+ firstWeekContainsDate: [{
1217
+ type: i0.Input,
1218
+ args: [{
1219
+ isSignal: true,
1220
+ alias: "firstWeekContainsDate",
1221
+ required: false
1222
+ }]
1223
+ }],
1224
+ ISOWeek: [{
1225
+ type: i0.Input,
1226
+ args: [{
1227
+ isSignal: true,
1228
+ alias: "ISOWeek",
1229
+ required: false
1230
+ }]
1231
+ }],
1232
+ fixedWeeks: [{
1233
+ type: i0.Input,
1234
+ args: [{
1235
+ isSignal: true,
1236
+ alias: "fixedWeeks",
1237
+ required: false
1238
+ }]
1239
+ }],
1240
+ showOutsideDays: [{
1241
+ type: i0.Input,
1242
+ args: [{
1243
+ isSignal: true,
1244
+ alias: "showOutsideDays",
1245
+ required: false
1246
+ }]
1247
+ }],
1248
+ showWeekNumber: [{
1249
+ type: i0.Input,
1250
+ args: [{
1251
+ isSignal: true,
1252
+ alias: "showWeekNumber",
1253
+ required: false
1254
+ }]
1255
+ }],
1256
+ disabled: [{
1257
+ type: i0.Input,
1258
+ args: [{
1259
+ isSignal: true,
1260
+ alias: "disabled",
1261
+ required: false
1262
+ }]
1263
+ }],
1264
+ hidden: [{
1265
+ type: i0.Input,
1266
+ args: [{
1267
+ isSignal: true,
1268
+ alias: "hidden",
1269
+ required: false
1270
+ }]
1271
+ }],
1272
+ required: [{
1273
+ type: i0.Input,
1274
+ args: [{
1275
+ isSignal: true,
1276
+ alias: "required",
1277
+ required: false
1278
+ }]
1279
+ }],
1280
+ min: [{
1281
+ type: i0.Input,
1282
+ args: [{
1283
+ isSignal: true,
1284
+ alias: "min",
1285
+ required: false
1286
+ }]
1287
+ }],
1288
+ max: [{
1289
+ type: i0.Input,
1290
+ args: [{
1291
+ isSignal: true,
1292
+ alias: "max",
1293
+ required: false
1294
+ }]
1295
+ }],
1296
+ excludeDisabled: [{
1297
+ type: i0.Input,
1298
+ args: [{
1299
+ isSignal: true,
1300
+ alias: "excludeDisabled",
1301
+ required: false
1302
+ }]
1303
+ }],
1304
+ today: [{
1305
+ type: i0.Input,
1306
+ args: [{
1307
+ isSignal: true,
1308
+ alias: "today",
1309
+ required: false
1310
+ }]
1311
+ }],
1312
+ modifiers: [{
1313
+ type: i0.Input,
1314
+ args: [{
1315
+ isSignal: true,
1316
+ alias: "modifiers",
1317
+ required: false
1318
+ }]
1319
+ }],
1320
+ modifiersClassNames: [{
1321
+ type: i0.Input,
1322
+ args: [{
1323
+ isSignal: true,
1324
+ alias: "modifiersClassNames",
1325
+ required: false
1326
+ }]
1327
+ }],
1328
+ dayTemplateDirective: [{
1329
+ type: i0.ContentChild,
1330
+ args: [i0.forwardRef(() => RaqmCalendarDayDirective), { isSignal: true }]
1331
+ }],
1332
+ formatters: [{
1333
+ type: i0.Input,
1334
+ args: [{
1335
+ isSignal: true,
1336
+ alias: "formatters",
1337
+ required: false
1338
+ }]
1339
+ }],
1340
+ labels: [{
1341
+ type: i0.Input,
1342
+ args: [{
1343
+ isSignal: true,
1344
+ alias: "labels",
1345
+ required: false
1346
+ }]
1347
+ }],
1348
+ footer: [{
1349
+ type: i0.Input,
1350
+ args: [{
1351
+ isSignal: true,
1352
+ alias: "footer",
1353
+ required: false
1354
+ }]
1355
+ }]
1356
+ }
1357
+ });
1358
+ var RaqmCalendarDayDirective = class RaqmCalendarDayDirective {
1359
+ template = inject(TemplateRef);
1360
+ static ɵfac = i0.ɵɵngDeclareFactory({
1361
+ minVersion: "12.0.0",
1362
+ version: "22.2.2",
1363
+ ngImport: i0,
1364
+ type: RaqmCalendarDayDirective,
1365
+ deps: [],
1366
+ target: i0.ɵɵFactoryTarget.Directive
1367
+ });
1368
+ static ɵdir = i0.ɵɵngDeclareDirective({
1369
+ minVersion: "14.0.0",
1370
+ version: "22.2.2",
1371
+ type: RaqmCalendarDayDirective,
1372
+ isStandalone: true,
1373
+ selector: "ng-template[raqm-calendar-day]",
1374
+ ngImport: i0
1375
+ });
1376
+ };
1377
+ i0.ɵɵngDeclareClassMetadata({
1378
+ minVersion: "12.0.0",
1379
+ version: "22.2.2",
1380
+ ngImport: i0,
1381
+ type: RaqmCalendarDayDirective,
1382
+ decorators: [{
1383
+ type: Directive,
1384
+ args: [{ selector: "ng-template[raqm-calendar-day]" }]
1385
+ }]
1386
+ });
1387
+ const RaqmCalendar = [
1388
+ RaqmCalendarComponent,
1389
+ RaqmCalendarDayButtonDirective,
1390
+ RaqmCalendarDayDirective
1391
+ ];
1392
+ export { RaqmCalendar, RaqmCalendarComponent, RaqmCalendarDayButtonDirective, RaqmCalendarDayDirective };
1393
+
1394
+ //# sourceMappingURL=raqm-ui-calendar.mjs.map