@egose/shadcn-theme-ng 0.0.10 → 0.0.12

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 (83) hide show
  1. package/accordion/fesm2022/accordion.mjs +25 -25
  2. package/accordion/fesm2022/accordion.mjs.map +1 -1
  3. package/alert/fesm2022/alert.mjs +109 -33
  4. package/alert/fesm2022/alert.mjs.map +1 -1
  5. package/alert/index.d.ts +6 -3
  6. package/autocomplete/README.md +64 -0
  7. package/autocomplete/fesm2022/autocomplete.mjs +524 -0
  8. package/autocomplete/fesm2022/autocomplete.mjs.map +1 -0
  9. package/autocomplete/index.d.ts +158 -0
  10. package/badge/fesm2022/badge.mjs +5 -5
  11. package/badge/fesm2022/badge.mjs.map +1 -1
  12. package/basic-alert/README.md +64 -0
  13. package/basic-alert/fesm2022/basic-alert.mjs +111 -0
  14. package/basic-alert/fesm2022/basic-alert.mjs.map +1 -0
  15. package/basic-alert/index.d.ts +14 -0
  16. package/button/fesm2022/button.mjs +16 -14
  17. package/button/fesm2022/button.mjs.map +1 -1
  18. package/button/index.d.ts +1 -1
  19. package/calendar/README.md +64 -0
  20. package/calendar/fesm2022/calendar.mjs +637 -0
  21. package/calendar/fesm2022/calendar.mjs.map +1 -0
  22. package/calendar/index.d.ts +111 -0
  23. package/confirmation-dialog/README.md +64 -0
  24. package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +93 -0
  25. package/confirmation-dialog/fesm2022/confirmation-dialog.mjs.map +1 -0
  26. package/confirmation-dialog/index.d.ts +24 -0
  27. package/date-picker/README.md +64 -0
  28. package/date-picker/fesm2022/date-picker.mjs +599 -0
  29. package/date-picker/fesm2022/date-picker.mjs.map +1 -0
  30. package/date-picker/index.d.ts +227 -0
  31. package/dialog/README.md +64 -0
  32. package/dialog/fesm2022/dialog.mjs +278 -0
  33. package/dialog/fesm2022/dialog.mjs.map +1 -0
  34. package/dialog/index.d.ts +89 -0
  35. package/exports.json +1 -1
  36. package/form-date-picker/README.md +64 -0
  37. package/form-date-picker/fesm2022/form-date-picker.mjs +146 -0
  38. package/form-date-picker/fesm2022/form-date-picker.mjs.map +1 -0
  39. package/form-date-picker/index.d.ts +32 -0
  40. package/form-field/fesm2022/form-field.mjs +19 -17
  41. package/form-field/fesm2022/form-field.mjs.map +1 -1
  42. package/form-select/README.md +64 -0
  43. package/form-select/fesm2022/form-select.mjs +165 -0
  44. package/form-select/fesm2022/form-select.mjs.map +1 -0
  45. package/form-select/index.d.ts +33 -0
  46. package/form-text-input/README.md +64 -0
  47. package/form-text-input/fesm2022/form-text-input.mjs +197 -0
  48. package/form-text-input/fesm2022/form-text-input.mjs.map +1 -0
  49. package/form-text-input/index.d.ts +47 -0
  50. package/form-textarea/README.md +64 -0
  51. package/form-textarea/fesm2022/form-textarea.mjs +156 -0
  52. package/form-textarea/fesm2022/form-textarea.mjs.map +1 -0
  53. package/form-textarea/index.d.ts +33 -0
  54. package/icon/fesm2022/icon.mjs +7 -7
  55. package/input/fesm2022/input.mjs +11 -11
  56. package/input/fesm2022/input.mjs.map +1 -1
  57. package/label/fesm2022/label.mjs +9 -9
  58. package/label/fesm2022/label.mjs.map +1 -1
  59. package/package.json +56 -5
  60. package/popover/README.md +64 -0
  61. package/popover/fesm2022/popover.mjs +69 -0
  62. package/popover/fesm2022/popover.mjs.map +1 -0
  63. package/popover/index.d.ts +30 -0
  64. package/radio-group/fesm2022/radio-group.mjs +17 -17
  65. package/radio-group/fesm2022/radio-group.mjs.map +1 -1
  66. package/select/fesm2022/select.mjs +42 -42
  67. package/select/fesm2022/select.mjs.map +1 -1
  68. package/separator/README.md +64 -0
  69. package/separator/fesm2022/separator.mjs +46 -0
  70. package/separator/fesm2022/separator.mjs.map +1 -0
  71. package/separator/index.d.ts +19 -0
  72. package/sonner/fesm2022/sonner.mjs +9 -9
  73. package/sonner/fesm2022/sonner.mjs.map +1 -1
  74. package/spinner/fesm2022/spinner.mjs +10 -10
  75. package/spinner/fesm2022/spinner.mjs.map +1 -1
  76. package/switch/fesm2022/switch.mjs +13 -13
  77. package/switch/fesm2022/switch.mjs.map +1 -1
  78. package/tabs/fesm2022/tabs.mjs +27 -27
  79. package/tabs/fesm2022/tabs.mjs.map +1 -1
  80. package/tooltip/fesm2022/tooltip.mjs +10 -10
  81. package/utils/fesm2022/utils.mjs +2 -2
  82. package/utils/fesm2022/utils.mjs.map +1 -1
  83. package/utils/index.d.ts +2 -2
@@ -0,0 +1,637 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, computed, booleanAttribute, model, numberAttribute, viewChild, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
3
+ import { provideIcons, NgIcon } from '@ng-icons/core';
4
+ import { lucideChevronRight, lucideChevronLeft } from '@ng-icons/lucide';
5
+ import { injectBrnCalendarI18n, BrnCalendar, BrnCalendarHeader, BrnCalendarNextButton, BrnCalendarPreviousButton, BrnCalendarWeekday, BrnCalendarWeek, BrnCalendarCellButton, BrnCalendarCell, BrnCalendarGrid, BrnCalendarMulti, BrnCalendarRange } from '@spartan-ng/brain/calendar';
6
+ import { injectDateAdapter } from '@spartan-ng/brain/date-time';
7
+ import { buttonVariants } from '@egose/shadcn-theme-ng/button';
8
+ import { HlmIcon } from '@egose/shadcn-theme-ng/icon';
9
+ import { hlm } from '@egose/shadcn-theme-ng/utils';
10
+
11
+ class HlmCalendar {
12
+ calendarClass = input('', ...(ngDevMode ? [{ debugName: "calendarClass" }] : []));
13
+ _computedCalenderClass = computed(() => hlm('tw:rounded-md tw:border tw:p-3', this.calendarClass()), ...(ngDevMode ? [{ debugName: "_computedCalenderClass" }] : []));
14
+ /** Access the calendar i18n */
15
+ _i18n = injectBrnCalendarI18n();
16
+ /** Access the date time adapter */
17
+ _dateAdapter = injectDateAdapter();
18
+ /** The minimum date that can be selected.*/
19
+ min = input(...(ngDevMode ? [undefined, { debugName: "min" }] : []));
20
+ /** The maximum date that can be selected. */
21
+ max = input(...(ngDevMode ? [undefined, { debugName: "max" }] : []));
22
+ /** Determine if the date picker is disabled. */
23
+ disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{
24
+ transform: booleanAttribute,
25
+ }]));
26
+ /** The selected value. */
27
+ date = model(...(ngDevMode ? [undefined, { debugName: "date" }] : []));
28
+ /** Whether a specific date is disabled. */
29
+ dateDisabled = input(() => false, ...(ngDevMode ? [{ debugName: "dateDisabled" }] : []));
30
+ /** The day the week starts on */
31
+ weekStartsOn = input(undefined, ...(ngDevMode ? [{ debugName: "weekStartsOn", transform: (v) => numberAttribute(v) }] : [{
32
+ transform: (v) => numberAttribute(v),
33
+ }]));
34
+ /** The default focused date. */
35
+ defaultFocusedDate = input(...(ngDevMode ? [undefined, { debugName: "defaultFocusedDate" }] : []));
36
+ /** Access the calendar directive */
37
+ _calendar = viewChild.required(BrnCalendar);
38
+ /** Get the heading for the current month and year */
39
+ _heading = computed(() => this._i18n
40
+ .config()
41
+ .formatHeader(this._dateAdapter.getMonth(this._calendar().focusedDate()), this._dateAdapter.getYear(this._calendar().focusedDate())), ...(ngDevMode ? [{ debugName: "_heading" }] : []));
42
+ _btnClass = hlm(buttonVariants({ variant: 'ghost' }), 'tw:size-8 tw:p-0 tw:font-normal tw:aria-selected:opacity-100', 'tw:data-[outside]:text-muted-foreground tw:data-[outside]:aria-selected:bg-secondary/50 tw:data-[outside]:aria-selected:text-muted-foreground tw:data-[outside]:opacity-50 tw:data-[outside]:aria-selected:opacity-30', 'tw:data-[today]:bg-secondary tw:data-[today]:text-secondary-foreground', 'tw:data-[selected]:bg-primary tw:data-[selected]:text-primary-foreground tw:data-[selected]:hover:bg-primary tw:data-[selected]:focus:bg-primary tw:data-[selected]:focus:text-primary-foreground', 'tw:data-[disabled]:text-muted-foreground tw:data-[disabled]:opacity-50');
43
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmCalendar, deps: [], target: i0.ɵɵFactoryTarget.Component });
44
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: HlmCalendar, isStandalone: true, selector: "hlm-calendar", inputs: { calendarClass: { classPropertyName: "calendarClass", publicName: "calendarClass", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: false, transformFunction: null }, dateDisabled: { classPropertyName: "dateDisabled", publicName: "dateDisabled", isSignal: true, isRequired: false, transformFunction: null }, weekStartsOn: { classPropertyName: "weekStartsOn", publicName: "weekStartsOn", isSignal: true, isRequired: false, transformFunction: null }, defaultFocusedDate: { classPropertyName: "defaultFocusedDate", publicName: "defaultFocusedDate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { date: "dateChange" }, viewQueries: [{ propertyName: "_calendar", first: true, predicate: BrnCalendar, descendants: true, isSignal: true }], ngImport: i0, template: `
45
+ <div
46
+ brnCalendar
47
+ [min]="min()"
48
+ [max]="max()"
49
+ [disabled]="disabled()"
50
+ [(date)]="date"
51
+ [dateDisabled]="dateDisabled()"
52
+ [weekStartsOn]="weekStartsOn()"
53
+ [defaultFocusedDate]="defaultFocusedDate()"
54
+ [class]="_computedCalenderClass()"
55
+ >
56
+ <div class="tw:inline-flex tw:flex-col tw:space-y-4">
57
+ <!-- Header -->
58
+ <div class="tw:space-y-4">
59
+ <div class="tw:relative tw:flex tw:items-center tw:justify-center tw:pt-1">
60
+ <div brnCalendarHeader class="tw:text-sm tw:font-medium">
61
+ {{ _heading() }}
62
+ </div>
63
+
64
+ <div class="tw:flex tw:items-center tw:space-x-1">
65
+ <button
66
+ brnCalendarPreviousButton
67
+ class="tw:focus-visible:ring-ring tw:hover:bg-secondary tw:hover:text-secondary-foreground tw:text-popover-foreground tw:absolute tw:left-1 tw:inline-flex tw:size-8 tw:items-center tw:justify-center tw:whitespace-nowrap tw:rounded-md tw:bg-transparent tw:p-0 tw:text-sm tw:font-medium tw:transition-colors tw:hover:opacity-100 tw:focus-visible:outline-none tw:focus-visible:ring-2 tw:focus-visible:ring-offset-2 tw:disabled:pointer-events-none tw:disabled:opacity-50"
68
+ >
69
+ <ng-icon hlm name="lucideChevronLeft" size="sm" />
70
+ </button>
71
+
72
+ <button
73
+ brnCalendarNextButton
74
+ class="tw:focus-visible:ring-ring tw:hover:bg-secondary tw:hover:text-secondary-foreground tw:text-popover-foreground tw:absolute tw:right-1 tw:inline-flex tw:size-8 tw:items-center tw:justify-center tw:whitespace-nowrap tw:rounded-md tw:bg-transparent tw:p-0 tw:text-sm tw:font-medium tw:transition-colors tw:hover:opacity-100 tw:focus-visible:outline-none tw:focus-visible:ring-2 tw:focus-visible:ring-offset-2 tw:disabled:pointer-events-none tw:disabled:opacity-50"
75
+ >
76
+ <ng-icon hlm name="lucideChevronRight" size="sm" />
77
+ </button>
78
+ </div>
79
+ </div>
80
+ </div>
81
+
82
+ <table class="tw:w-full tw:border-collapse tw:space-y-1" brnCalendarGrid>
83
+ <thead>
84
+ <tr class="tw:flex">
85
+ <th
86
+ *brnCalendarWeekday="let weekday"
87
+ scope="col"
88
+ class="tw:text-muted-foreground tw:w-8 tw:rounded-md tw:text-[0.8rem] tw:font-normal"
89
+ [attr.aria-label]="_i18n.config().labelWeekday(weekday)"
90
+ >
91
+ {{ _i18n.config().formatWeekdayName(weekday) }}
92
+ </th>
93
+ </tr>
94
+ </thead>
95
+
96
+ <tbody role="rowgroup">
97
+ <tr *brnCalendarWeek="let week" class="tw:mt-2 tw:flex tw:w-full">
98
+ @for (date of week; track _dateAdapter.getTime(date)) {
99
+ <td
100
+ brnCalendarCell
101
+ class="tw:data-[selected]:data-[outside]:bg-secondary/50 tw:data-[selected]:bg-secondary tw:relative tw:size-8 tw:p-0 tw:text-center tw:text-sm tw:focus-within:relative tw:focus-within:z-20 tw:first:data-[selected]:rounded-l-md tw:last:data-[selected]:rounded-r-md tw:[&:has([aria-selected].day-range-end)]:rounded-r-md"
102
+ >
103
+ <button brnCalendarCellButton [date]="date" [class]="_btnClass">
104
+ {{ _dateAdapter.getDate(date) }}
105
+ </button>
106
+ </td>
107
+ }
108
+ </tr>
109
+ </tbody>
110
+ </table>
111
+ </div>
112
+ </div>
113
+ `, isInline: true, dependencies: [{ kind: "directive", type: BrnCalendar, selector: "[brnCalendar]", inputs: ["min", "max", "disabled", "date", "dateDisabled", "weekStartsOn", "defaultFocusedDate"], outputs: ["dateChange"] }, { kind: "directive", type: BrnCalendarHeader, selector: "[brnCalendarHeader]", inputs: ["id"] }, { kind: "directive", type: BrnCalendarNextButton, selector: "[brnCalendarNextButton]" }, { kind: "directive", type: BrnCalendarPreviousButton, selector: "[brnCalendarPreviousButton]" }, { kind: "directive", type: BrnCalendarWeekday, selector: "[brnCalendarWeekday]" }, { kind: "directive", type: BrnCalendarWeek, selector: "[brnCalendarWeek]" }, { kind: "directive", type: BrnCalendarCellButton, selector: "button[brnCalendarCellButton]", inputs: ["date"] }, { kind: "directive", type: BrnCalendarCell, selector: "[brnCalendarCell]" }, { kind: "directive", type: BrnCalendarGrid, selector: "[brnCalendarGrid]" }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: HlmIcon, selector: "ng-icon[hlm]", inputs: ["size"] }], viewProviders: [provideIcons({ lucideChevronLeft, lucideChevronRight })], changeDetection: i0.ChangeDetectionStrategy.OnPush });
114
+ }
115
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmCalendar, decorators: [{
116
+ type: Component,
117
+ args: [{
118
+ selector: 'hlm-calendar',
119
+ imports: [
120
+ BrnCalendar,
121
+ BrnCalendarHeader,
122
+ BrnCalendarNextButton,
123
+ BrnCalendarPreviousButton,
124
+ BrnCalendarWeekday,
125
+ BrnCalendarWeek,
126
+ BrnCalendarCellButton,
127
+ BrnCalendarCell,
128
+ BrnCalendarGrid,
129
+ NgIcon,
130
+ HlmIcon,
131
+ ],
132
+ viewProviders: [provideIcons({ lucideChevronLeft, lucideChevronRight })],
133
+ template: `
134
+ <div
135
+ brnCalendar
136
+ [min]="min()"
137
+ [max]="max()"
138
+ [disabled]="disabled()"
139
+ [(date)]="date"
140
+ [dateDisabled]="dateDisabled()"
141
+ [weekStartsOn]="weekStartsOn()"
142
+ [defaultFocusedDate]="defaultFocusedDate()"
143
+ [class]="_computedCalenderClass()"
144
+ >
145
+ <div class="tw:inline-flex tw:flex-col tw:space-y-4">
146
+ <!-- Header -->
147
+ <div class="tw:space-y-4">
148
+ <div class="tw:relative tw:flex tw:items-center tw:justify-center tw:pt-1">
149
+ <div brnCalendarHeader class="tw:text-sm tw:font-medium">
150
+ {{ _heading() }}
151
+ </div>
152
+
153
+ <div class="tw:flex tw:items-center tw:space-x-1">
154
+ <button
155
+ brnCalendarPreviousButton
156
+ class="tw:focus-visible:ring-ring tw:hover:bg-secondary tw:hover:text-secondary-foreground tw:text-popover-foreground tw:absolute tw:left-1 tw:inline-flex tw:size-8 tw:items-center tw:justify-center tw:whitespace-nowrap tw:rounded-md tw:bg-transparent tw:p-0 tw:text-sm tw:font-medium tw:transition-colors tw:hover:opacity-100 tw:focus-visible:outline-none tw:focus-visible:ring-2 tw:focus-visible:ring-offset-2 tw:disabled:pointer-events-none tw:disabled:opacity-50"
157
+ >
158
+ <ng-icon hlm name="lucideChevronLeft" size="sm" />
159
+ </button>
160
+
161
+ <button
162
+ brnCalendarNextButton
163
+ class="tw:focus-visible:ring-ring tw:hover:bg-secondary tw:hover:text-secondary-foreground tw:text-popover-foreground tw:absolute tw:right-1 tw:inline-flex tw:size-8 tw:items-center tw:justify-center tw:whitespace-nowrap tw:rounded-md tw:bg-transparent tw:p-0 tw:text-sm tw:font-medium tw:transition-colors tw:hover:opacity-100 tw:focus-visible:outline-none tw:focus-visible:ring-2 tw:focus-visible:ring-offset-2 tw:disabled:pointer-events-none tw:disabled:opacity-50"
164
+ >
165
+ <ng-icon hlm name="lucideChevronRight" size="sm" />
166
+ </button>
167
+ </div>
168
+ </div>
169
+ </div>
170
+
171
+ <table class="tw:w-full tw:border-collapse tw:space-y-1" brnCalendarGrid>
172
+ <thead>
173
+ <tr class="tw:flex">
174
+ <th
175
+ *brnCalendarWeekday="let weekday"
176
+ scope="col"
177
+ class="tw:text-muted-foreground tw:w-8 tw:rounded-md tw:text-[0.8rem] tw:font-normal"
178
+ [attr.aria-label]="_i18n.config().labelWeekday(weekday)"
179
+ >
180
+ {{ _i18n.config().formatWeekdayName(weekday) }}
181
+ </th>
182
+ </tr>
183
+ </thead>
184
+
185
+ <tbody role="rowgroup">
186
+ <tr *brnCalendarWeek="let week" class="tw:mt-2 tw:flex tw:w-full">
187
+ @for (date of week; track _dateAdapter.getTime(date)) {
188
+ <td
189
+ brnCalendarCell
190
+ class="tw:data-[selected]:data-[outside]:bg-secondary/50 tw:data-[selected]:bg-secondary tw:relative tw:size-8 tw:p-0 tw:text-center tw:text-sm tw:focus-within:relative tw:focus-within:z-20 tw:first:data-[selected]:rounded-l-md tw:last:data-[selected]:rounded-r-md tw:[&:has([aria-selected].day-range-end)]:rounded-r-md"
191
+ >
192
+ <button brnCalendarCellButton [date]="date" [class]="_btnClass">
193
+ {{ _dateAdapter.getDate(date) }}
194
+ </button>
195
+ </td>
196
+ }
197
+ </tr>
198
+ </tbody>
199
+ </table>
200
+ </div>
201
+ </div>
202
+ `,
203
+ changeDetection: ChangeDetectionStrategy.OnPush,
204
+ }]
205
+ }] });
206
+
207
+ class HlmCalendarMulti {
208
+ calendarClass = input('', ...(ngDevMode ? [{ debugName: "calendarClass" }] : []));
209
+ _computedCalenderClass = computed(() => hlm('tw:rounded-md tw:border p-3', this.calendarClass()), ...(ngDevMode ? [{ debugName: "_computedCalenderClass" }] : []));
210
+ /** Access the calendar i18n */
211
+ _i18n = injectBrnCalendarI18n();
212
+ /** Access the date time adapter */
213
+ _dateAdapter = injectDateAdapter();
214
+ /** The minimum date that can be selected.*/
215
+ min = input(...(ngDevMode ? [undefined, { debugName: "min" }] : []));
216
+ /** The maximum date that can be selected. */
217
+ max = input(...(ngDevMode ? [undefined, { debugName: "max" }] : []));
218
+ /** The minimum selectable dates. */
219
+ minSelection = input(undefined, ...(ngDevMode ? [{ debugName: "minSelection", transform: numberAttribute }] : [{
220
+ transform: numberAttribute,
221
+ }]));
222
+ /** The maximum selectable dates. */
223
+ maxSelection = input(undefined, ...(ngDevMode ? [{ debugName: "maxSelection", transform: numberAttribute }] : [{
224
+ transform: numberAttribute,
225
+ }]));
226
+ /** Determine if the date picker is disabled. */
227
+ disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{
228
+ transform: booleanAttribute,
229
+ }]));
230
+ /** The selected value. */
231
+ date = model(...(ngDevMode ? [undefined, { debugName: "date" }] : []));
232
+ /** Whether a specific date is disabled. */
233
+ dateDisabled = input(() => false, ...(ngDevMode ? [{ debugName: "dateDisabled" }] : []));
234
+ /** The day the week starts on */
235
+ weekStartsOn = input(undefined, ...(ngDevMode ? [{ debugName: "weekStartsOn", transform: (v) => numberAttribute(v) }] : [{
236
+ transform: (v) => numberAttribute(v),
237
+ }]));
238
+ /** The default focused date. */
239
+ defaultFocusedDate = input(...(ngDevMode ? [undefined, { debugName: "defaultFocusedDate" }] : []));
240
+ /** Access the calendar directive */
241
+ _calendar = viewChild.required(BrnCalendarMulti);
242
+ /** Get the heading for the current month and year */
243
+ _heading = computed(() => this._i18n
244
+ .config()
245
+ .formatHeader(this._dateAdapter.getMonth(this._calendar().focusedDate()), this._dateAdapter.getYear(this._calendar().focusedDate())), ...(ngDevMode ? [{ debugName: "_heading" }] : []));
246
+ _btnClass = hlm(buttonVariants({ variant: 'ghost' }), 'tw:size-8 tw:p-0 tw:font-normal tw:aria-selected:opacity-100', 'tw:data-[outside]:text-muted-foreground tw:data-[outside]:aria-selected:bg-accent/50 tw:data-[outside]:aria-selected:text-muted-foreground tw:data-[outside]:opacity-50 tw:data-[outside]:aria-selected:opacity-30', 'tw:data-[today]:bg-accent tw:data-[today]:text-accent-foreground', 'tw:data-[selected]:bg-primary tw:data-[selected]:text-primary-foreground tw:data-[selected]:hover:bg-primary tw:data-[selected]:hover:text-primary-foreground tw:data-[selected]:focus:bg-primary tw:data-[selected]:focus:text-primary-foreground', 'tw:data-[disabled]:text-muted-foreground tw:data-[disabled]:opacity-50');
247
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmCalendarMulti, deps: [], target: i0.ɵɵFactoryTarget.Component });
248
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: HlmCalendarMulti, isStandalone: true, selector: "hlm-calendar-multi", inputs: { calendarClass: { classPropertyName: "calendarClass", publicName: "calendarClass", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, minSelection: { classPropertyName: "minSelection", publicName: "minSelection", isSignal: true, isRequired: false, transformFunction: null }, maxSelection: { classPropertyName: "maxSelection", publicName: "maxSelection", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: false, transformFunction: null }, dateDisabled: { classPropertyName: "dateDisabled", publicName: "dateDisabled", isSignal: true, isRequired: false, transformFunction: null }, weekStartsOn: { classPropertyName: "weekStartsOn", publicName: "weekStartsOn", isSignal: true, isRequired: false, transformFunction: null }, defaultFocusedDate: { classPropertyName: "defaultFocusedDate", publicName: "defaultFocusedDate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { date: "dateChange" }, viewQueries: [{ propertyName: "_calendar", first: true, predicate: BrnCalendarMulti, descendants: true, isSignal: true }], ngImport: i0, template: `
249
+ <div
250
+ brnCalendarMulti
251
+ [min]="min()"
252
+ [max]="max()"
253
+ [minSelection]="minSelection()"
254
+ [maxSelection]="maxSelection()"
255
+ [disabled]="disabled()"
256
+ [(date)]="date"
257
+ [dateDisabled]="dateDisabled()"
258
+ [weekStartsOn]="weekStartsOn()"
259
+ [defaultFocusedDate]="defaultFocusedDate()"
260
+ [class]="_computedCalenderClass()"
261
+ >
262
+ <div class="tw:inline-flex tw:flex-col space-y-4">
263
+ <!-- Header -->
264
+ <div class="tw:space-y-4">
265
+ <div class="tw:relative tw:flex tw:items-center tw:justify-center pt-1">
266
+ <div brnCalendarHeader class="tw:text-sm tw:font-medium">
267
+ {{ _heading() }}
268
+ </div>
269
+
270
+ <div class="tw:flex items-center tw:space-x-1">
271
+ <button
272
+ brnCalendarPreviousButton
273
+ class="tw:ring-offset-background tw:focus-visible:ring-ring tw:border-input tw:hover:bg-accent tw:hover:text-accent-foreground tw:absolute tw:left-1 tw:inline-flex tw:h-7 tw:w-7 tw:items-center tw:justify-center tw:whitespace-nowrap tw:rounded-md tw:border tw:bg-transparent tw:p-0 tw:text-sm tw:font-medium tw:opacity-50 tw:transition-colors tw:hover:opacity-100 tw:focus-visible:outline-none tw:focus-visible:ring-2 tw:focus-visible:ring-offset-2 tw:disabled:pointer-events-none tw:disabled:opacity-50"
274
+ >
275
+ <ng-icon hlm name="lucideChevronLeft" size="sm" />
276
+ </button>
277
+
278
+ <button
279
+ brnCalendarNextButton
280
+ class="tw:ring-offset-background tw:focus-visible:ring-ring tw:border-input tw:hover:bg-accent tw:hover:text-accent-foreground tw:absolute tw:right-1 tw:inline-flex tw:h-7 tw:w-7 tw:items-center tw:justify-center tw:whitespace-nowrap tw:rounded-md tw:border tw:bg-transparent tw:p-0 tw:text-sm tw:font-medium tw:opacity-50 tw:transition-colors tw:hover:opacity-100 tw:focus-visible:outline-none tw:focus-visible:ring-2 tw:focus-visible:ring-offset-2 tw:disabled:pointer-events-none tw:disabled:opacity-50"
281
+ >
282
+ <ng-icon hlm name="lucideChevronRight" size="sm" />
283
+ </button>
284
+ </div>
285
+ </div>
286
+ </div>
287
+
288
+ <table class="tw:w-full tw:border-collapse tw:space-y-1" brnCalendarGrid>
289
+ <thead>
290
+ <tr class="tw:flex">
291
+ <th
292
+ *brnCalendarWeekday="let weekday"
293
+ scope="col"
294
+ class="tw:text-muted-foreground tw:w-8 tw:rounded-md tw:text-[0.8rem] tw:font-normal"
295
+ [attr.aria-label]="_i18n.config().labelWeekday(weekday)"
296
+ >
297
+ {{ _i18n.config().formatWeekdayName(weekday) }}
298
+ </th>
299
+ </tr>
300
+ </thead>
301
+
302
+ <tbody role="rowgroup">
303
+ <tr *brnCalendarWeek="let week" class="tw:mt-2 tw:flex w-full">
304
+ @for (date of week; track _dateAdapter.getTime(date)) {
305
+ <td
306
+ brnCalendarCell
307
+ class="tw:data-[selected]:data-[outside]:bg-accent/50 tw:data-[selected]:bg-accent tw:relative tw:h-8 tw:w-8 tw:p-0 tw:text-center tw:text-sm tw:focus-within:relative tw:focus-within:z-20 tw:first:data-[selected]:rounded-l-md tw:last:data-[selected]:rounded-r-md tw:[&:has([aria-selected].day-range-end)]:rounded-r-md"
308
+ >
309
+ <button brnCalendarCellButton [date]="date" [class]="_btnClass">
310
+ {{ _dateAdapter.getDate(date) }}
311
+ </button>
312
+ </td>
313
+ }
314
+ </tr>
315
+ </tbody>
316
+ </table>
317
+ </div>
318
+ </div>
319
+ `, isInline: true, dependencies: [{ kind: "directive", type: BrnCalendarMulti, selector: "[brnCalendarMulti]", inputs: ["min", "max", "minSelection", "maxSelection", "disabled", "date", "dateDisabled", "weekStartsOn", "defaultFocusedDate"], outputs: ["dateChange"] }, { kind: "directive", type: BrnCalendarHeader, selector: "[brnCalendarHeader]", inputs: ["id"] }, { kind: "directive", type: BrnCalendarNextButton, selector: "[brnCalendarNextButton]" }, { kind: "directive", type: BrnCalendarPreviousButton, selector: "[brnCalendarPreviousButton]" }, { kind: "directive", type: BrnCalendarWeekday, selector: "[brnCalendarWeekday]" }, { kind: "directive", type: BrnCalendarWeek, selector: "[brnCalendarWeek]" }, { kind: "directive", type: BrnCalendarCellButton, selector: "button[brnCalendarCellButton]", inputs: ["date"] }, { kind: "directive", type: BrnCalendarCell, selector: "[brnCalendarCell]" }, { kind: "directive", type: BrnCalendarGrid, selector: "[brnCalendarGrid]" }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: HlmIcon, selector: "ng-icon[hlm]", inputs: ["size"] }], viewProviders: [provideIcons({ lucideChevronLeft, lucideChevronRight })], changeDetection: i0.ChangeDetectionStrategy.OnPush });
320
+ }
321
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmCalendarMulti, decorators: [{
322
+ type: Component,
323
+ args: [{
324
+ selector: 'hlm-calendar-multi',
325
+ imports: [
326
+ BrnCalendarMulti,
327
+ BrnCalendarHeader,
328
+ BrnCalendarNextButton,
329
+ BrnCalendarPreviousButton,
330
+ BrnCalendarWeekday,
331
+ BrnCalendarWeek,
332
+ BrnCalendarCellButton,
333
+ BrnCalendarCell,
334
+ BrnCalendarGrid,
335
+ NgIcon,
336
+ HlmIcon,
337
+ ],
338
+ viewProviders: [provideIcons({ lucideChevronLeft, lucideChevronRight })],
339
+ template: `
340
+ <div
341
+ brnCalendarMulti
342
+ [min]="min()"
343
+ [max]="max()"
344
+ [minSelection]="minSelection()"
345
+ [maxSelection]="maxSelection()"
346
+ [disabled]="disabled()"
347
+ [(date)]="date"
348
+ [dateDisabled]="dateDisabled()"
349
+ [weekStartsOn]="weekStartsOn()"
350
+ [defaultFocusedDate]="defaultFocusedDate()"
351
+ [class]="_computedCalenderClass()"
352
+ >
353
+ <div class="tw:inline-flex tw:flex-col space-y-4">
354
+ <!-- Header -->
355
+ <div class="tw:space-y-4">
356
+ <div class="tw:relative tw:flex tw:items-center tw:justify-center pt-1">
357
+ <div brnCalendarHeader class="tw:text-sm tw:font-medium">
358
+ {{ _heading() }}
359
+ </div>
360
+
361
+ <div class="tw:flex items-center tw:space-x-1">
362
+ <button
363
+ brnCalendarPreviousButton
364
+ class="tw:ring-offset-background tw:focus-visible:ring-ring tw:border-input tw:hover:bg-accent tw:hover:text-accent-foreground tw:absolute tw:left-1 tw:inline-flex tw:h-7 tw:w-7 tw:items-center tw:justify-center tw:whitespace-nowrap tw:rounded-md tw:border tw:bg-transparent tw:p-0 tw:text-sm tw:font-medium tw:opacity-50 tw:transition-colors tw:hover:opacity-100 tw:focus-visible:outline-none tw:focus-visible:ring-2 tw:focus-visible:ring-offset-2 tw:disabled:pointer-events-none tw:disabled:opacity-50"
365
+ >
366
+ <ng-icon hlm name="lucideChevronLeft" size="sm" />
367
+ </button>
368
+
369
+ <button
370
+ brnCalendarNextButton
371
+ class="tw:ring-offset-background tw:focus-visible:ring-ring tw:border-input tw:hover:bg-accent tw:hover:text-accent-foreground tw:absolute tw:right-1 tw:inline-flex tw:h-7 tw:w-7 tw:items-center tw:justify-center tw:whitespace-nowrap tw:rounded-md tw:border tw:bg-transparent tw:p-0 tw:text-sm tw:font-medium tw:opacity-50 tw:transition-colors tw:hover:opacity-100 tw:focus-visible:outline-none tw:focus-visible:ring-2 tw:focus-visible:ring-offset-2 tw:disabled:pointer-events-none tw:disabled:opacity-50"
372
+ >
373
+ <ng-icon hlm name="lucideChevronRight" size="sm" />
374
+ </button>
375
+ </div>
376
+ </div>
377
+ </div>
378
+
379
+ <table class="tw:w-full tw:border-collapse tw:space-y-1" brnCalendarGrid>
380
+ <thead>
381
+ <tr class="tw:flex">
382
+ <th
383
+ *brnCalendarWeekday="let weekday"
384
+ scope="col"
385
+ class="tw:text-muted-foreground tw:w-8 tw:rounded-md tw:text-[0.8rem] tw:font-normal"
386
+ [attr.aria-label]="_i18n.config().labelWeekday(weekday)"
387
+ >
388
+ {{ _i18n.config().formatWeekdayName(weekday) }}
389
+ </th>
390
+ </tr>
391
+ </thead>
392
+
393
+ <tbody role="rowgroup">
394
+ <tr *brnCalendarWeek="let week" class="tw:mt-2 tw:flex w-full">
395
+ @for (date of week; track _dateAdapter.getTime(date)) {
396
+ <td
397
+ brnCalendarCell
398
+ class="tw:data-[selected]:data-[outside]:bg-accent/50 tw:data-[selected]:bg-accent tw:relative tw:h-8 tw:w-8 tw:p-0 tw:text-center tw:text-sm tw:focus-within:relative tw:focus-within:z-20 tw:first:data-[selected]:rounded-l-md tw:last:data-[selected]:rounded-r-md tw:[&:has([aria-selected].day-range-end)]:rounded-r-md"
399
+ >
400
+ <button brnCalendarCellButton [date]="date" [class]="_btnClass">
401
+ {{ _dateAdapter.getDate(date) }}
402
+ </button>
403
+ </td>
404
+ }
405
+ </tr>
406
+ </tbody>
407
+ </table>
408
+ </div>
409
+ </div>
410
+ `,
411
+ changeDetection: ChangeDetectionStrategy.OnPush,
412
+ }]
413
+ }] });
414
+
415
+ class HlmCalendarRange {
416
+ calendarClass = input('', ...(ngDevMode ? [{ debugName: "calendarClass" }] : []));
417
+ _computedCalenderClass = computed(() => hlm('tw:rounded-md tw:border p-3', this.calendarClass()), ...(ngDevMode ? [{ debugName: "_computedCalenderClass" }] : []));
418
+ /** Access the calendar i18n */
419
+ _i18n = injectBrnCalendarI18n();
420
+ /** Access the date time adapter */
421
+ _dateAdapter = injectDateAdapter();
422
+ /** The minimum date that can be selected.*/
423
+ min = input(...(ngDevMode ? [undefined, { debugName: "min" }] : []));
424
+ /** The maximum date that can be selected. */
425
+ max = input(...(ngDevMode ? [undefined, { debugName: "max" }] : []));
426
+ /** Determine if the date picker is disabled. */
427
+ disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{
428
+ transform: booleanAttribute,
429
+ }]));
430
+ /** The start date of the range. */
431
+ startDate = model(...(ngDevMode ? [undefined, { debugName: "startDate" }] : []));
432
+ /** The end date of the range. */
433
+ endDate = model(...(ngDevMode ? [undefined, { debugName: "endDate" }] : []));
434
+ /** Whether a specific date is disabled. */
435
+ dateDisabled = input(() => false, ...(ngDevMode ? [{ debugName: "dateDisabled" }] : []));
436
+ /** The day the week starts on */
437
+ weekStartsOn = input(undefined, ...(ngDevMode ? [{ debugName: "weekStartsOn", transform: (v) => numberAttribute(v) }] : [{
438
+ transform: (v) => numberAttribute(v),
439
+ }]));
440
+ /** The default focused date. */
441
+ defaultFocusedDate = input(...(ngDevMode ? [undefined, { debugName: "defaultFocusedDate" }] : []));
442
+ /** Access the calendar directive */
443
+ _calendar = viewChild.required(BrnCalendarRange);
444
+ /** Get the heading for the current month and year */
445
+ _heading = computed(() => this._i18n
446
+ .config()
447
+ .formatHeader(this._dateAdapter.getMonth(this._calendar().focusedDate()), this._dateAdapter.getYear(this._calendar().focusedDate())), ...(ngDevMode ? [{ debugName: "_heading" }] : []));
448
+ _btnClass = hlm(buttonVariants({ variant: 'ghost' }), 'tw:size-8 tw:p-0 tw:font-normal tw:aria-selected:opacity-100', 'tw:data-[outside]:text-muted-foreground tw:data-[outside]:aria-selected:text-muted-foreground', 'tw:data-[today]:bg-accent tw:data-[today]:text-accent-foreground', 'tw:data-[selected]:bg-primary tw:data-[selected]:text-primary-foreground tw:data-[selected]:focus:bg-primary tw:data-[selected]:focus:text-primary-foreground', 'tw:data-[disabled]:text-muted-foreground tw:data-[disabled]:opacity-50', 'tw:data-[range-start]:rounded-l-md', 'tw:data-[range-end]:rounded-r-md', 'tw:data-[range-between]:bg-accent tw:data-[range-between]:text-accent-foreground tw:data-[range-between]:rounded-none');
449
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmCalendarRange, deps: [], target: i0.ɵɵFactoryTarget.Component });
450
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: HlmCalendarRange, isStandalone: true, selector: "hlm-calendar-range", inputs: { calendarClass: { classPropertyName: "calendarClass", publicName: "calendarClass", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, startDate: { classPropertyName: "startDate", publicName: "startDate", isSignal: true, isRequired: false, transformFunction: null }, endDate: { classPropertyName: "endDate", publicName: "endDate", isSignal: true, isRequired: false, transformFunction: null }, dateDisabled: { classPropertyName: "dateDisabled", publicName: "dateDisabled", isSignal: true, isRequired: false, transformFunction: null }, weekStartsOn: { classPropertyName: "weekStartsOn", publicName: "weekStartsOn", isSignal: true, isRequired: false, transformFunction: null }, defaultFocusedDate: { classPropertyName: "defaultFocusedDate", publicName: "defaultFocusedDate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { startDate: "startDateChange", endDate: "endDateChange" }, viewQueries: [{ propertyName: "_calendar", first: true, predicate: BrnCalendarRange, descendants: true, isSignal: true }], ngImport: i0, template: `
451
+ <div
452
+ brnCalendarRange
453
+ [min]="min()"
454
+ [max]="max()"
455
+ [disabled]="disabled()"
456
+ [(startDate)]="startDate"
457
+ [(endDate)]="endDate"
458
+ [dateDisabled]="dateDisabled()"
459
+ [weekStartsOn]="weekStartsOn()"
460
+ [defaultFocusedDate]="defaultFocusedDate()"
461
+ [class]="_computedCalenderClass()"
462
+ >
463
+ <div class="tw:inline-flex tw:flex-col tw:space-y-4">
464
+ <!-- Header -->
465
+ <div class="tw:space-y-4">
466
+ <div class="tw:relative tw:flex tw:items-center tw:justify-center tw:pt-1">
467
+ <div brnCalendarHeader class="tw:text-sm tw:font-medium">
468
+ {{ _heading() }}
469
+ </div>
470
+
471
+ <div class="tw:flex tw:items-center tw:space-x-1">
472
+ <button
473
+ brnCalendarPreviousButton
474
+ class="tw:ring-offset-background tw:focus-visible:ring-ring tw:border-input tw:hover:bg-accent tw:hover:text-accent-foreground tw:absolute tw:left-1 tw:inline-flex tw:h-7 tw:w-7 tw:items-center tw:justify-center tw:whitespace-nowrap tw:rounded-md tw:border tw:bg-transparent tw:p-0 tw:text-sm tw:font-medium tw:opacity-50 tw:transition-colors tw:hover:opacity-100 tw:focus-visible:outline-none tw:focus-visible:ring-2 tw:focus-visible:ring-offset-2 tw:disabled:pointer-events-none tw:disabled:opacity-50"
475
+ >
476
+ <ng-icon hlm name="lucideChevronLeft" size="sm" />
477
+ </button>
478
+
479
+ <button
480
+ brnCalendarNextButton
481
+ class="tw:ring-offset-background tw:focus-visible:ring-ring tw:border-input tw:hover:bg-accent tw:hover:text-accent-foreground tw:absolute tw:right-1 tw:inline-flex tw:h-7 tw:w-7 tw:items-center tw:justify-center tw:whitespace-nowrap tw:rounded-md tw:border tw:bg-transparent tw:p-0 tw:text-sm tw:font-medium tw:opacity-50 tw:transition-colors tw:hover:opacity-100 tw:focus-visible:outline-none tw:focus-visible:ring-2 tw:focus-visible:ring-offset-2 tw:disabled:pointer-events-none tw:disabled:opacity-50"
482
+ >
483
+ <ng-icon hlm name="lucideChevronRight" size="sm" />
484
+ </button>
485
+ </div>
486
+ </div>
487
+ </div>
488
+
489
+ <table class="tw:w-full tw:border-collapse tw:space-y-1" brnCalendarGrid>
490
+ <thead>
491
+ <tr class="tw:flex">
492
+ <th
493
+ *brnCalendarWeekday="let weekday"
494
+ scope="col"
495
+ class="tw:text-muted-foreground tw:w-8 tw:rounded-md tw:text-[0.8rem] tw:font-normal"
496
+ [attr.aria-label]="_i18n.config().labelWeekday(weekday)"
497
+ >
498
+ {{ _i18n.config().formatWeekdayName(weekday) }}
499
+ </th>
500
+ </tr>
501
+ </thead>
502
+
503
+ <tbody role="rowgroup">
504
+ <tr *brnCalendarWeek="let week" class="tw:mt-2 tw:flex w-full">
505
+ @for (date of week; track _dateAdapter.getTime(date)) {
506
+ <td
507
+ brnCalendarCell
508
+ class="tw:data-[selected]:data-[outside]:bg-accent/50 tw:data-[selected]:bg-accent tw:relative tw:h-8 tw:w-8 tw:p-0 tw:text-center tw:text-sm tw:focus-within:relative tw:focus-within:z-20 tw:first:data-[selected]:rounded-l-md tw:last:data-[selected]:rounded-r-md tw:[&:has([aria-selected].day-range-end)]:rounded-r-md"
509
+ >
510
+ <button brnCalendarCellButton [date]="date" [class]="_btnClass">
511
+ {{ _dateAdapter.getDate(date) }}
512
+ </button>
513
+ </td>
514
+ }
515
+ </tr>
516
+ </tbody>
517
+ </table>
518
+ </div>
519
+ </div>
520
+ `, isInline: true, dependencies: [{ kind: "directive", type: BrnCalendarHeader, selector: "[brnCalendarHeader]", inputs: ["id"] }, { kind: "directive", type: BrnCalendarNextButton, selector: "[brnCalendarNextButton]" }, { kind: "directive", type: BrnCalendarPreviousButton, selector: "[brnCalendarPreviousButton]" }, { kind: "directive", type: BrnCalendarWeekday, selector: "[brnCalendarWeekday]" }, { kind: "directive", type: BrnCalendarWeek, selector: "[brnCalendarWeek]" }, { kind: "directive", type: BrnCalendarCellButton, selector: "button[brnCalendarCellButton]", inputs: ["date"] }, { kind: "directive", type: BrnCalendarCell, selector: "[brnCalendarCell]" }, { kind: "directive", type: BrnCalendarGrid, selector: "[brnCalendarGrid]" }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }, { kind: "directive", type: HlmIcon, selector: "ng-icon[hlm]", inputs: ["size"] }, { kind: "directive", type: BrnCalendarRange, selector: "[brnCalendarRange]", inputs: ["min", "max", "disabled", "dateDisabled", "weekStartsOn", "defaultFocusedDate", "startDate", "endDate"], outputs: ["startDateChange", "endDateChange"] }], viewProviders: [provideIcons({ lucideChevronLeft, lucideChevronRight })], changeDetection: i0.ChangeDetectionStrategy.OnPush });
521
+ }
522
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmCalendarRange, decorators: [{
523
+ type: Component,
524
+ args: [{
525
+ selector: 'hlm-calendar-range',
526
+ imports: [
527
+ BrnCalendarHeader,
528
+ BrnCalendarNextButton,
529
+ BrnCalendarPreviousButton,
530
+ BrnCalendarWeekday,
531
+ BrnCalendarWeek,
532
+ BrnCalendarCellButton,
533
+ BrnCalendarCell,
534
+ BrnCalendarGrid,
535
+ NgIcon,
536
+ HlmIcon,
537
+ BrnCalendarRange,
538
+ ],
539
+ viewProviders: [provideIcons({ lucideChevronLeft, lucideChevronRight })],
540
+ template: `
541
+ <div
542
+ brnCalendarRange
543
+ [min]="min()"
544
+ [max]="max()"
545
+ [disabled]="disabled()"
546
+ [(startDate)]="startDate"
547
+ [(endDate)]="endDate"
548
+ [dateDisabled]="dateDisabled()"
549
+ [weekStartsOn]="weekStartsOn()"
550
+ [defaultFocusedDate]="defaultFocusedDate()"
551
+ [class]="_computedCalenderClass()"
552
+ >
553
+ <div class="tw:inline-flex tw:flex-col tw:space-y-4">
554
+ <!-- Header -->
555
+ <div class="tw:space-y-4">
556
+ <div class="tw:relative tw:flex tw:items-center tw:justify-center tw:pt-1">
557
+ <div brnCalendarHeader class="tw:text-sm tw:font-medium">
558
+ {{ _heading() }}
559
+ </div>
560
+
561
+ <div class="tw:flex tw:items-center tw:space-x-1">
562
+ <button
563
+ brnCalendarPreviousButton
564
+ class="tw:ring-offset-background tw:focus-visible:ring-ring tw:border-input tw:hover:bg-accent tw:hover:text-accent-foreground tw:absolute tw:left-1 tw:inline-flex tw:h-7 tw:w-7 tw:items-center tw:justify-center tw:whitespace-nowrap tw:rounded-md tw:border tw:bg-transparent tw:p-0 tw:text-sm tw:font-medium tw:opacity-50 tw:transition-colors tw:hover:opacity-100 tw:focus-visible:outline-none tw:focus-visible:ring-2 tw:focus-visible:ring-offset-2 tw:disabled:pointer-events-none tw:disabled:opacity-50"
565
+ >
566
+ <ng-icon hlm name="lucideChevronLeft" size="sm" />
567
+ </button>
568
+
569
+ <button
570
+ brnCalendarNextButton
571
+ class="tw:ring-offset-background tw:focus-visible:ring-ring tw:border-input tw:hover:bg-accent tw:hover:text-accent-foreground tw:absolute tw:right-1 tw:inline-flex tw:h-7 tw:w-7 tw:items-center tw:justify-center tw:whitespace-nowrap tw:rounded-md tw:border tw:bg-transparent tw:p-0 tw:text-sm tw:font-medium tw:opacity-50 tw:transition-colors tw:hover:opacity-100 tw:focus-visible:outline-none tw:focus-visible:ring-2 tw:focus-visible:ring-offset-2 tw:disabled:pointer-events-none tw:disabled:opacity-50"
572
+ >
573
+ <ng-icon hlm name="lucideChevronRight" size="sm" />
574
+ </button>
575
+ </div>
576
+ </div>
577
+ </div>
578
+
579
+ <table class="tw:w-full tw:border-collapse tw:space-y-1" brnCalendarGrid>
580
+ <thead>
581
+ <tr class="tw:flex">
582
+ <th
583
+ *brnCalendarWeekday="let weekday"
584
+ scope="col"
585
+ class="tw:text-muted-foreground tw:w-8 tw:rounded-md tw:text-[0.8rem] tw:font-normal"
586
+ [attr.aria-label]="_i18n.config().labelWeekday(weekday)"
587
+ >
588
+ {{ _i18n.config().formatWeekdayName(weekday) }}
589
+ </th>
590
+ </tr>
591
+ </thead>
592
+
593
+ <tbody role="rowgroup">
594
+ <tr *brnCalendarWeek="let week" class="tw:mt-2 tw:flex w-full">
595
+ @for (date of week; track _dateAdapter.getTime(date)) {
596
+ <td
597
+ brnCalendarCell
598
+ class="tw:data-[selected]:data-[outside]:bg-accent/50 tw:data-[selected]:bg-accent tw:relative tw:h-8 tw:w-8 tw:p-0 tw:text-center tw:text-sm tw:focus-within:relative tw:focus-within:z-20 tw:first:data-[selected]:rounded-l-md tw:last:data-[selected]:rounded-r-md tw:[&:has([aria-selected].day-range-end)]:rounded-r-md"
599
+ >
600
+ <button brnCalendarCellButton [date]="date" [class]="_btnClass">
601
+ {{ _dateAdapter.getDate(date) }}
602
+ </button>
603
+ </td>
604
+ }
605
+ </tr>
606
+ </tbody>
607
+ </table>
608
+ </div>
609
+ </div>
610
+ `,
611
+ changeDetection: ChangeDetectionStrategy.OnPush,
612
+ }]
613
+ }] });
614
+
615
+ /*
616
+ * Public API Surface of calendar
617
+ */
618
+ const HlmCalendarImports = [HlmCalendar, HlmCalendarMulti, HlmCalendarRange];
619
+ class HlmCalendarModule {
620
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmCalendarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
621
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.1", ngImport: i0, type: HlmCalendarModule, imports: [HlmCalendar, HlmCalendarMulti, HlmCalendarRange], exports: [HlmCalendar, HlmCalendarMulti, HlmCalendarRange] });
622
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmCalendarModule, imports: [HlmCalendarImports] });
623
+ }
624
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmCalendarModule, decorators: [{
625
+ type: NgModule,
626
+ args: [{
627
+ imports: [...HlmCalendarImports],
628
+ exports: [...HlmCalendarImports],
629
+ }]
630
+ }] });
631
+
632
+ /**
633
+ * Generated bundle index. Do not edit.
634
+ */
635
+
636
+ export { HlmCalendar, HlmCalendarImports, HlmCalendarModule, HlmCalendarMulti, HlmCalendarRange };
637
+ //# sourceMappingURL=calendar.mjs.map