@spartan-ng/brain 0.0.1-alpha.493 → 0.0.1-alpha.495

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 (234) hide show
  1. package/accordion/index.d.ts +8 -8
  2. package/accordion/lib/{brn-accordion-content.component.d.ts → brn-accordion-content.d.ts} +3 -3
  3. package/accordion/lib/{brn-accordion.directive.d.ts → brn-accordion.d.ts} +11 -11
  4. package/alert-dialog/index.d.ts +20 -20
  5. package/alert-dialog/lib/brn-alert-dialog-content.d.ts +6 -0
  6. package/alert-dialog/lib/brn-alert-dialog-description.d.ts +6 -0
  7. package/alert-dialog/lib/brn-alert-dialog-overlay.d.ts +6 -0
  8. package/alert-dialog/lib/brn-alert-dialog-title.d.ts +6 -0
  9. package/alert-dialog/lib/brn-alert-dialog-trigger.d.ts +9 -0
  10. package/alert-dialog/lib/brn-alert-dialog.d.ts +7 -0
  11. package/avatar/index.d.ts +9 -9
  12. package/avatar/lib/brn-avatar.d.ts +7 -0
  13. package/avatar/lib/fallback/brn-avatar-fallback.d.ts +9 -0
  14. package/avatar/lib/fallback/index.d.ts +1 -1
  15. package/avatar/lib/image/brn-avatar-image.d.ts +9 -0
  16. package/avatar/lib/image/index.d.ts +1 -1
  17. package/calendar/index.d.ts +32 -32
  18. package/calendar/lib/{brn-calendar-cell-button.directive.d.ts → brn-calendar-cell-button.d.ts} +4 -4
  19. package/calendar/lib/brn-calendar-cell.d.ts +5 -0
  20. package/calendar/lib/brn-calendar-grid.d.ts +7 -0
  21. package/calendar/lib/brn-calendar-header.d.ts +7 -0
  22. package/calendar/lib/{brn-calendar-next-button.directive.d.ts → brn-calendar-next-button.d.ts} +3 -3
  23. package/calendar/lib/{brn-calendar-previous-button.directive.d.ts → brn-calendar-previous-button.d.ts} +3 -3
  24. package/calendar/lib/{brn-calendar-week.directive.d.ts → brn-calendar-week.d.ts} +4 -4
  25. package/calendar/lib/{brn-calendar-weekday.directive.d.ts → brn-calendar-weekday.d.ts} +4 -4
  26. package/calendar/lib/{brn-calendar.directive.d.ts → brn-calendar.d.ts} +8 -8
  27. package/calendar/lib/brn-calendar.token.d.ts +6 -6
  28. package/calendar/lib/mode/{brn-calendar-multiple.directive.d.ts → brn-calendar-multiple.d.ts} +9 -9
  29. package/checkbox/index.d.ts +5 -5
  30. package/checkbox/lib/{brn-checkbox.component.d.ts → brn-checkbox.d.ts} +3 -3
  31. package/collapsible/index.d.ts +11 -11
  32. package/collapsible/lib/{brn-collapsible-content.component.d.ts → brn-collapsible-content.d.ts} +5 -5
  33. package/collapsible/lib/brn-collapsible-trigger.d.ts +9 -0
  34. package/collapsible/lib/{brn-collapsible.component.d.ts → brn-collapsible.d.ts} +3 -3
  35. package/command/index.d.ts +20 -20
  36. package/command/lib/brn-command-empty.d.ts +11 -0
  37. package/command/lib/{brn-command-group.directive.d.ts → brn-command-group.d.ts} +3 -3
  38. package/command/lib/{brn-command-item.directive.d.ts → brn-command-item.d.ts} +3 -3
  39. package/command/lib/brn-command-item.token.d.ts +3 -3
  40. package/command/lib/brn-command-list.d.ts +8 -0
  41. package/command/lib/{brn-command-search-input.directive.d.ts → brn-command-search-input.d.ts} +3 -3
  42. package/command/lib/brn-command-search-input.token.d.ts +3 -3
  43. package/command/lib/{brn-command.directive.d.ts → brn-command.d.ts} +5 -5
  44. package/command/lib/brn-command.token.d.ts +4 -4
  45. package/dialog/index.d.ts +23 -23
  46. package/dialog/lib/brn-dialog-close.d.ts +8 -0
  47. package/dialog/lib/brn-dialog-content.d.ts +12 -0
  48. package/dialog/lib/{brn-dialog-description.directive.d.ts → brn-dialog-description.d.ts} +3 -3
  49. package/dialog/lib/brn-dialog-overlay.d.ts +9 -0
  50. package/dialog/lib/brn-dialog-title.d.ts +8 -0
  51. package/dialog/lib/brn-dialog-trigger.d.ts +18 -0
  52. package/dialog/lib/{brn-dialog.component.d.ts → brn-dialog.d.ts} +3 -3
  53. package/fesm2022/spartan-ng-brain-accordion.mjs +25 -36
  54. package/fesm2022/spartan-ng-brain-accordion.mjs.map +1 -1
  55. package/fesm2022/spartan-ng-brain-alert-dialog.mjs +79 -79
  56. package/fesm2022/spartan-ng-brain-alert-dialog.mjs.map +1 -1
  57. package/fesm2022/spartan-ng-brain-avatar.mjs +16 -16
  58. package/fesm2022/spartan-ng-brain-avatar.mjs.map +1 -1
  59. package/fesm2022/spartan-ng-brain-calendar.mjs +239 -239
  60. package/fesm2022/spartan-ng-brain-calendar.mjs.map +1 -1
  61. package/fesm2022/spartan-ng-brain-checkbox.mjs +8 -8
  62. package/fesm2022/spartan-ng-brain-checkbox.mjs.map +1 -1
  63. package/fesm2022/spartan-ng-brain-collapsible.mjs +17 -25
  64. package/fesm2022/spartan-ng-brain-collapsible.mjs.map +1 -1
  65. package/fesm2022/spartan-ng-brain-command.mjs +195 -195
  66. package/fesm2022/spartan-ng-brain-command.mjs.map +1 -1
  67. package/fesm2022/spartan-ng-brain-dialog.mjs +98 -98
  68. package/fesm2022/spartan-ng-brain-dialog.mjs.map +1 -1
  69. package/fesm2022/spartan-ng-brain-form-field.mjs.map +1 -1
  70. package/fesm2022/spartan-ng-brain-forms.mjs +3 -2
  71. package/fesm2022/spartan-ng-brain-forms.mjs.map +1 -1
  72. package/fesm2022/spartan-ng-brain-hover-card.mjs +21 -29
  73. package/fesm2022/spartan-ng-brain-hover-card.mjs.map +1 -1
  74. package/fesm2022/spartan-ng-brain-input-otp.mjs +44 -44
  75. package/fesm2022/spartan-ng-brain-input-otp.mjs.map +1 -1
  76. package/fesm2022/spartan-ng-brain-label.mjs +8 -8
  77. package/fesm2022/spartan-ng-brain-label.mjs.map +1 -1
  78. package/fesm2022/spartan-ng-brain-menu.mjs +102 -131
  79. package/fesm2022/spartan-ng-brain-menu.mjs.map +1 -1
  80. package/fesm2022/spartan-ng-brain-popover.mjs +75 -86
  81. package/fesm2022/spartan-ng-brain-popover.mjs.map +1 -1
  82. package/fesm2022/spartan-ng-brain-progress.mjs +28 -28
  83. package/fesm2022/spartan-ng-brain-progress.mjs.map +1 -1
  84. package/fesm2022/spartan-ng-brain-radio-group.mjs +17 -17
  85. package/fesm2022/spartan-ng-brain-radio-group.mjs.map +1 -1
  86. package/fesm2022/spartan-ng-brain-select.mjs +277 -277
  87. package/fesm2022/spartan-ng-brain-select.mjs.map +1 -1
  88. package/fesm2022/spartan-ng-brain-separator.mjs +8 -8
  89. package/fesm2022/spartan-ng-brain-separator.mjs.map +1 -1
  90. package/fesm2022/spartan-ng-brain-sheet.mjs +69 -69
  91. package/fesm2022/spartan-ng-brain-sheet.mjs.map +1 -1
  92. package/fesm2022/spartan-ng-brain-slider.mjs +136 -142
  93. package/fesm2022/spartan-ng-brain-slider.mjs.map +1 -1
  94. package/fesm2022/spartan-ng-brain-switch.mjs +26 -26
  95. package/fesm2022/spartan-ng-brain-switch.mjs.map +1 -1
  96. package/fesm2022/spartan-ng-brain-tabs.mjs +28 -39
  97. package/fesm2022/spartan-ng-brain-tabs.mjs.map +1 -1
  98. package/fesm2022/spartan-ng-brain-toggle-group.mjs +18 -18
  99. package/fesm2022/spartan-ng-brain-toggle-group.mjs.map +1 -1
  100. package/fesm2022/spartan-ng-brain-toggle.mjs +9 -9
  101. package/fesm2022/spartan-ng-brain-toggle.mjs.map +1 -1
  102. package/fesm2022/spartan-ng-brain-tooltip.mjs +31 -42
  103. package/fesm2022/spartan-ng-brain-tooltip.mjs.map +1 -1
  104. package/form-field/lib/brn-form-field-control.d.ts +2 -2
  105. package/forms/lib/error-options.d.ts +1 -1
  106. package/hover-card/index.d.ts +6 -6
  107. package/hover-card/lib/brn-hover-card-content.service.d.ts +9 -9
  108. package/hover-card/lib/brn-hover-card.d.ts +9 -0
  109. package/input-otp/index.d.ts +8 -8
  110. package/input-otp/lib/{brn-input-otp-slot.component.d.ts → brn-input-otp-slot.d.ts} +4 -4
  111. package/input-otp/lib/{brn-input-otp.component.d.ts → brn-input-otp.d.ts} +3 -3
  112. package/input-otp/lib/brn-input-otp.token.d.ts +4 -4
  113. package/label/index.d.ts +3 -3
  114. package/label/lib/{brn-label.directive.d.ts → brn-label.d.ts} +3 -3
  115. package/menu/index.d.ts +32 -32
  116. package/menu/lib/{brn-context-menu-trigger.directive.d.ts → brn-context-menu-trigger.d.ts} +3 -3
  117. package/menu/lib/brn-menu-bar.d.ts +6 -0
  118. package/menu/lib/brn-menu-group.d.ts +6 -0
  119. package/menu/lib/brn-menu-item-checkbox.d.ts +11 -0
  120. package/menu/lib/brn-menu-item-radio.d.ts +11 -0
  121. package/menu/lib/brn-menu-item.d.ts +10 -0
  122. package/menu/lib/brn-menu-trigger.d.ts +10 -0
  123. package/menu/lib/{brn-menu.directive.d.ts → brn-menu.d.ts} +3 -3
  124. package/package.json +1 -1
  125. package/popover/index.d.ts +14 -14
  126. package/popover/lib/brn-popover-close.d.ts +6 -0
  127. package/popover/lib/brn-popover-content.d.ts +6 -0
  128. package/popover/lib/brn-popover-trigger.d.ts +10 -0
  129. package/popover/lib/brn-popover.d.ts +12 -0
  130. package/progress/index.d.ts +8 -8
  131. package/progress/lib/{brn-progress-indicator.component.d.ts → brn-progress-indicator.d.ts} +4 -4
  132. package/progress/lib/{brn-progress.component.d.ts → brn-progress.d.ts} +3 -3
  133. package/progress/lib/brn-progress.token.d.ts +3 -3
  134. package/radio-group/index.d.ts +8 -8
  135. package/radio-group/lib/{brn-radio-group.directive.d.ts → brn-radio-group.d.ts} +6 -6
  136. package/radio-group/lib/brn-radio-group.token.d.ts +3 -3
  137. package/radio-group/lib/{brn-radio.component.d.ts → brn-radio.d.ts} +6 -6
  138. package/select/index.d.ts +29 -29
  139. package/select/lib/{brn-select-content.component.d.ts → brn-select-content.d.ts} +15 -15
  140. package/select/lib/brn-select-content.token.d.ts +3 -3
  141. package/select/lib/brn-select-group.d.ts +6 -0
  142. package/select/lib/brn-select-label.d.ts +9 -0
  143. package/select/lib/{brn-select-option.directive.d.ts → brn-select-option.d.ts} +5 -5
  144. package/select/lib/{brn-select-placeholder.directive.d.ts → brn-select-placeholder.d.ts} +3 -3
  145. package/select/lib/{brn-select-trigger.directive.d.ts → brn-select-trigger.d.ts} +4 -4
  146. package/select/lib/brn-select-value-template.d.ts +11 -0
  147. package/select/lib/{brn-select-value.component.d.ts → brn-select-value.d.ts} +8 -8
  148. package/select/lib/{brn-select.component.d.ts → brn-select.d.ts} +12 -12
  149. package/select/lib/brn-select.token.d.ts +3 -3
  150. package/separator/index.d.ts +3 -3
  151. package/separator/lib/{brn-separator.component.d.ts → brn-separator.d.ts} +3 -3
  152. package/sheet/index.d.ts +23 -23
  153. package/sheet/lib/brn-sheet-close.d.ts +6 -0
  154. package/sheet/lib/brn-sheet-content.d.ts +8 -0
  155. package/sheet/lib/brn-sheet-description.d.ts +6 -0
  156. package/sheet/lib/brn-sheet-overlay.d.ts +6 -0
  157. package/sheet/lib/brn-sheet-title.d.ts +6 -0
  158. package/sheet/lib/brn-sheet-trigger.d.ts +9 -0
  159. package/sheet/lib/brn-sheet.d.ts +10 -0
  160. package/slider/index.d.ts +11 -11
  161. package/slider/lib/brn-slider-range.d.ts +7 -0
  162. package/slider/lib/{brn-slider-thumb.directive.d.ts → brn-slider-thumb.d.ts} +4 -4
  163. package/slider/lib/brn-slider-tick.d.ts +12 -0
  164. package/slider/lib/{brn-slider-track.directive.d.ts → brn-slider-track.d.ts} +4 -4
  165. package/slider/lib/brn-slider-track.token.d.ts +4 -4
  166. package/slider/lib/{brn-slider.directive.d.ts → brn-slider.d.ts} +5 -5
  167. package/slider/lib/brn-slider.token.d.ts +3 -3
  168. package/switch/index.d.ts +8 -8
  169. package/switch/lib/brn-switch-thumb.d.ts +5 -0
  170. package/switch/lib/{brn-switch.component.d.ts → brn-switch.d.ts} +3 -3
  171. package/tabs/index.d.ts +15 -15
  172. package/tabs/lib/{brn-tabs-content.directive.d.ts → brn-tabs-content.d.ts} +3 -3
  173. package/tabs/lib/{brn-tabs-list.directive.d.ts → brn-tabs-list.d.ts} +6 -6
  174. package/tabs/lib/{brn-tabs-paginated-list.directive.d.ts → brn-tabs-paginated-list.d.ts} +3 -3
  175. package/tabs/lib/{brn-tabs-trigger.directive.d.ts → brn-tabs-trigger.d.ts} +4 -4
  176. package/tabs/lib/{brn-tabs.directive.d.ts → brn-tabs.d.ts} +9 -9
  177. package/toggle/index.d.ts +3 -3
  178. package/toggle/lib/{brn-toggle.directive.d.ts → brn-toggle.d.ts} +3 -3
  179. package/toggle-group/index.d.ts +6 -6
  180. package/toggle-group/lib/{brn-toggle-group.component.d.ts → brn-toggle-group.d.ts} +8 -8
  181. package/toggle-group/lib/brn-toggle-group.token.d.ts +3 -3
  182. package/toggle-group/lib/{brn-toggle-item.directive.d.ts → brn-toggle-item.d.ts} +4 -4
  183. package/tooltip/index.d.ts +14 -14
  184. package/tooltip/lib/brn-tooltip-content-template.d.ts +8 -0
  185. package/tooltip/lib/{brn-tooltip-content.component.d.ts → brn-tooltip-content.d.ts} +3 -3
  186. package/tooltip/lib/{brn-tooltip-trigger.directive.d.ts → brn-tooltip-trigger.d.ts} +3 -3
  187. package/tooltip/lib/brn-tooltip.d.ts +7 -0
  188. package/tooltip/lib/brn-tooltip.token.d.ts +1 -1
  189. package/alert-dialog/lib/brn-alert-dialog-content.directive.d.ts +0 -6
  190. package/alert-dialog/lib/brn-alert-dialog-description.directive.d.ts +0 -6
  191. package/alert-dialog/lib/brn-alert-dialog-overlay.component.d.ts +0 -6
  192. package/alert-dialog/lib/brn-alert-dialog-title.directive.d.ts +0 -6
  193. package/alert-dialog/lib/brn-alert-dialog-trigger.directive.d.ts +0 -9
  194. package/alert-dialog/lib/brn-alert-dialog.component.d.ts +0 -7
  195. package/avatar/lib/brn-avatar.component.d.ts +0 -7
  196. package/avatar/lib/fallback/brn-avatar-fallback.directive.d.ts +0 -9
  197. package/avatar/lib/image/brn-avatar-image.directive.d.ts +0 -9
  198. package/calendar/lib/brn-calendar-cell.directive.d.ts +0 -5
  199. package/calendar/lib/brn-calendar-grid.directive.d.ts +0 -7
  200. package/calendar/lib/brn-calendar-header.directive.d.ts +0 -7
  201. package/collapsible/lib/brn-collapsible-trigger.directive.d.ts +0 -9
  202. package/command/lib/brn-command-empty.directive.d.ts +0 -11
  203. package/command/lib/brn-command-list.directive.d.ts +0 -8
  204. package/dialog/lib/brn-dialog-close.directive.d.ts +0 -8
  205. package/dialog/lib/brn-dialog-content.directive.d.ts +0 -12
  206. package/dialog/lib/brn-dialog-overlay.component.d.ts +0 -9
  207. package/dialog/lib/brn-dialog-title.directive.d.ts +0 -8
  208. package/dialog/lib/brn-dialog-trigger.directive.d.ts +0 -18
  209. package/hover-card/lib/brn-hover-card.component.d.ts +0 -9
  210. package/menu/lib/brn-menu-bar.directive.d.ts +0 -6
  211. package/menu/lib/brn-menu-group.directive.d.ts +0 -6
  212. package/menu/lib/brn-menu-item-checkbox.directive.d.ts +0 -11
  213. package/menu/lib/brn-menu-item-radio.directive.d.ts +0 -11
  214. package/menu/lib/brn-menu-item.directive.d.ts +0 -10
  215. package/menu/lib/brn-menu-trigger.directive.d.ts +0 -10
  216. package/popover/lib/brn-popover-close.directive.d.ts +0 -6
  217. package/popover/lib/brn-popover-content.directive.d.ts +0 -6
  218. package/popover/lib/brn-popover-trigger.directive.d.ts +0 -10
  219. package/popover/lib/brn-popover.component.d.ts +0 -12
  220. package/select/lib/brn-select-group.directive.d.ts +0 -6
  221. package/select/lib/brn-select-label.directive.d.ts +0 -9
  222. package/select/lib/brn-select-value.directive.d.ts +0 -11
  223. package/sheet/lib/brn-sheet-close.directive.d.ts +0 -6
  224. package/sheet/lib/brn-sheet-content.directive.d.ts +0 -8
  225. package/sheet/lib/brn-sheet-description.directive.d.ts +0 -6
  226. package/sheet/lib/brn-sheet-overlay.component.d.ts +0 -6
  227. package/sheet/lib/brn-sheet-title.directive.d.ts +0 -6
  228. package/sheet/lib/brn-sheet-trigger.directive.d.ts +0 -9
  229. package/sheet/lib/brn-sheet.component.d.ts +0 -10
  230. package/slider/lib/brn-slider-range.directive.d.ts +0 -7
  231. package/slider/lib/brn-slider-tick.directive.d.ts +0 -12
  232. package/switch/lib/brn-switch-thumb.component.d.ts +0 -5
  233. package/tooltip/lib/brn-tooltip-content.directive.d.ts +0 -8
  234. package/tooltip/lib/brn-tooltip.directive.d.ts +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"spartan-ng-brain-calendar.mjs","sources":["../../../../libs/brain/calendar/src/lib/brn-calendar.token.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-cell-button.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-cell.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-grid.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-header.directive.ts","../../../../libs/brain/calendar/src/lib/i18n/calendar-i18n.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-next-button.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-previous-button.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-week.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-weekday.directive.ts","../../../../libs/brain/calendar/src/lib/brn-calendar.directive.ts","../../../../libs/brain/calendar/src/lib/mode/brn-calendar-multiple.directive.ts","../../../../libs/brain/calendar/src/index.ts","../../../../libs/brain/calendar/src/spartan-ng-brain-calendar.ts"],"sourcesContent":["import { ExistingProvider, InjectionToken, Signal, Type, WritableSignal, inject } from '@angular/core';\nimport { BrnCalendarHeaderDirective } from './brn-calendar-header.directive';\n\nexport interface BrnCalendar<T> {\n\tisSelected: (date: T) => boolean;\n\tselectDate: (date: T) => void;\n\n\tconstrainDate: (date: T) => T;\n\tisDateDisabled: (date: T) => boolean;\n\tsetFocusedDate: (date: T) => void;\n\n\tdisabled: Signal<boolean>;\n\tfocusedDate: Signal<T>;\n\theader: Signal<BrnCalendarHeaderDirective | undefined>;\n\tstate: Signal<{\n\t\tfocusedDate: WritableSignal<T>;\n\t}>;\n\tdays: Signal<T[]>;\n}\n\nexport const BrnCalendarToken = new InjectionToken<BrnCalendar<unknown>>('BrnCalendarToken');\n\nexport function provideBrnCalendar<T>(instance: Type<BrnCalendar<T>>): ExistingProvider {\n\treturn { provide: BrnCalendarToken, useExisting: instance };\n}\n\n/**\n * Inject the calendar component.\n */\nexport function injectBrnCalendar<T>(): BrnCalendar<T> {\n\treturn inject(BrnCalendarToken) as BrnCalendar<T>;\n}\n","import { Directive, ElementRef, computed, inject, input } from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { injectBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: 'button[brnCalendarCellButton]',\n\thost: {\n\t\trole: 'gridcell',\n\t\t'[tabindex]': 'focusable() ? 0 : -1',\n\t\ttype: 'button',\n\t\t'[attr.data-outside]': \"outside() ? '' : null\",\n\t\t'[attr.data-today]': \"today() && !selected() ? '' : null\",\n\t\t'[attr.data-selected]': \"selected() ? '' : null\",\n\t\t'[attr.data-disabled]': \"disabled() ? '' : null\",\n\t\t'[attr.aria-selected]': \"selected() ? 'true' : null\",\n\t\t'[attr.aria-disabled]': \"disabled() ? 'true' : null\",\n\t\t'[disabled]': 'disabled()',\n\t\t'(click)': '_calendar.selectDate(date())',\n\t\t'(keydown.arrowLeft)': 'focusPrevious($event)',\n\t\t'(keydown.arrowRight)': 'focusNext($event)',\n\t\t'(keydown.arrowUp)': 'focusAbove($event)',\n\t\t'(keydown.arrowDown)': 'focusBelow($event)',\n\t\t'(keydown.home)': 'focusFirst($event)',\n\t\t'(keydown.end)': 'focusLast($event)',\n\t\t'(keydown.pageUp)': 'focusPreviousMonth($event)',\n\t\t'(keydown.pageDown)': 'focusNextMonth($event)',\n\t},\n})\nexport class BrnCalendarCellButtonDirective<T> {\n\t/** Access the date adapter */\n\tprotected readonly _dateAdapter = injectDateAdapter<T>();\n\n\t/** Access the calendar component */\n\tprotected readonly _calendar = injectBrnCalendar<T>();\n\n\t/** Access the element ref */\n\tprivate readonly _elementRef = inject<ElementRef<HTMLButtonElement>>(ElementRef);\n\n\t/** The date this cell represents */\n\tpublic readonly date = input.required<T>();\n\n\t/** Whether this date is currently selected */\n\tpublic readonly selected = computed(() => this._calendar.isSelected(this.date()));\n\n\t/** Whether this date is focusable */\n\tpublic readonly focusable = computed(() => this._dateAdapter.isSameDay(this._calendar.focusedDate(), this.date()));\n\n\tpublic readonly outside = computed(() => {\n\t\tconst focusedDate = this._calendar.focusedDate();\n\t\treturn !this._dateAdapter.isSameMonth(this.date(), focusedDate);\n\t});\n\n\t/** Whether this date is today */\n\tpublic readonly today = computed(() => this._dateAdapter.isSameDay(this.date(), this._dateAdapter.now()));\n\n\t/** Whether this date is disabled */\n\tpublic readonly disabled = computed(() => this._calendar.isDateDisabled(this.date()) || this._calendar.disabled());\n\n\t/**\n\t * Focus the previous cell.\n\t */\n\tprotected focusPrevious(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\t// in rtl, the arrow keys are reversed.\n\t\tconst targetDate = this._dateAdapter.add(this._calendar.focusedDate(), {\n\t\t\tdays: this.getDirection() === 'rtl' ? 1 : -1,\n\t\t});\n\n\t\tthis._calendar.setFocusedDate(targetDate);\n\t}\n\n\t/**\n\t * Focus the next cell.\n\t */\n\tprotected focusNext(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\tconst targetDate = this._dateAdapter.add(this._calendar.focusedDate(), {\n\t\t\tdays: this.getDirection() === 'rtl' ? -1 : 1,\n\t\t});\n\n\t\tthis._calendar.setFocusedDate(targetDate);\n\t}\n\n\t/**\n\t * Focus the above cell.\n\t */\n\tprotected focusAbove(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._calendar.setFocusedDate(this._dateAdapter.subtract(this._calendar.focusedDate(), { days: 7 }));\n\t}\n\n\t/**\n\t * Focus the below cell.\n\t */\n\tprotected focusBelow(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._calendar.setFocusedDate(this._dateAdapter.add(this._calendar.focusedDate(), { days: 7 }));\n\t}\n\n\t/**\n\t * Focus the first date of the month.\n\t */\n\tprotected focusFirst(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._calendar.setFocusedDate(this._dateAdapter.startOfMonth(this._calendar.focusedDate()));\n\t}\n\n\t/**\n\t * Focus the last date of the month.\n\t */\n\tprotected focusLast(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._calendar.setFocusedDate(this._dateAdapter.endOfMonth(this._calendar.focusedDate()));\n\t}\n\n\t/**\n\t * Focus the same date in the previous month.\n\t */\n\tprotected focusPreviousMonth(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\tconst date = this._dateAdapter.getDate(this._calendar.focusedDate());\n\n\t\tlet previousMonthTarget = this._dateAdapter.startOfMonth(this._calendar.focusedDate());\n\t\tpreviousMonthTarget = this._dateAdapter.subtract(previousMonthTarget, { months: 1 });\n\n\t\tconst lastDay = this._dateAdapter.endOfMonth(previousMonthTarget);\n\n\t\t// if we are on a date that does not exist in the previous month, we should focus the last day of the month.\n\t\tif (date > this._dateAdapter.getDate(lastDay)) {\n\t\t\tthis._calendar.setFocusedDate(lastDay);\n\t\t} else {\n\t\t\tthis._calendar.setFocusedDate(this._dateAdapter.set(previousMonthTarget, { day: date }));\n\t\t}\n\t}\n\n\t/**\n\t * Focus the same date in the next month.\n\t */\n\tprotected focusNextMonth(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\tconst date = this._dateAdapter.getDate(this._calendar.focusedDate());\n\n\t\tlet nextMonthTarget = this._dateAdapter.startOfMonth(this._calendar.focusedDate());\n\t\tnextMonthTarget = this._dateAdapter.add(nextMonthTarget, { months: 1 });\n\n\t\tconst lastDay = this._dateAdapter.endOfMonth(nextMonthTarget);\n\n\t\t// if we are on a date that does not exist in the next month, we should focus the last day of the month.\n\t\tif (date > this._dateAdapter.getDate(lastDay)) {\n\t\t\tthis._calendar.setFocusedDate(lastDay);\n\t\t} else {\n\t\t\tthis._calendar.setFocusedDate(this._dateAdapter.set(nextMonthTarget, { day: date }));\n\t\t}\n\t}\n\n\t/**\n\t * Get the direction of the element.\n\t */\n\tprivate getDirection(): 'ltr' | 'rtl' {\n\t\treturn getComputedStyle(this._elementRef.nativeElement).direction === 'rtl' ? 'rtl' : 'ltr';\n\t}\n\n\tfocus(): void {\n\t\tthis._elementRef.nativeElement.focus();\n\t}\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n\tselector: '[brnCalendarCell]',\n\thost: {\n\t\trole: 'presentation',\n\t},\n})\nexport class BrnCalendarCellDirective {}\n","import { Directive } from '@angular/core';\nimport { injectBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendarGrid]',\n\thost: {\n\t\trole: 'grid',\n\t\t'[attr.aria-labelledby]': '_calendar.header()?.id()',\n\t},\n})\nexport class BrnCalendarGridDirective<T> {\n\t/** Access the calendar component */\n\tprotected readonly _calendar = injectBrnCalendar<T>();\n}\n","import { Directive, input } from '@angular/core';\n\nlet uniqueId = 0;\n\n@Directive({\n\tselector: '[brnCalendarHeader]',\n\thost: {\n\t\t'[id]': 'id()',\n\t\t'aria-live': 'polite',\n\t\trole: 'presentation',\n\t},\n})\nexport class BrnCalendarHeaderDirective {\n\t/** The unique id for the header */\n\tpublic readonly id = input(`brn-calendar-header-${uniqueId++}`);\n}\n","import { InjectionToken, ValueProvider, inject } from '@angular/core';\n\nexport interface BrnCalendarI18n {\n\tformatWeekdayName: (index: number) => string;\n\tformatHeader: (month: number, year: number) => string;\n\tlabelPrevious: () => string;\n\tlabelNext: () => string;\n\tlabelWeekday: (index: number) => string;\n}\n\nexport const BrnCalendarI18nToken = new InjectionToken<BrnCalendarI18n>('BrnCalendarI18nToken');\n\n/**\n * Provide the calendar i18n configuration.\n */\nexport function provideBrnCalendarI18n(configuration: BrnCalendarI18n): ValueProvider {\n\treturn { provide: BrnCalendarI18nToken, useValue: configuration };\n}\n\nconst defaultCalendarI18n: BrnCalendarI18n = {\n\tformatWeekdayName: (index: number) => {\n\t\tconst weekdays = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];\n\t\treturn weekdays[index];\n\t},\n\tformatHeader: (month: number, year: number) => {\n\t\treturn new Date(year, month).toLocaleDateString(undefined, {\n\t\t\tmonth: 'long',\n\t\t\tyear: 'numeric',\n\t\t});\n\t},\n\tlabelPrevious: () => 'Go to the previous month',\n\tlabelNext: () => 'Go to the next month',\n\tlabelWeekday: (index: number) => {\n\t\tconst weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n\t\treturn weekdays[index];\n\t},\n};\n\n/**\n * Inject the calendar i18n configuration.\n */\nexport function injectBrnCalendarI18n(): BrnCalendarI18n {\n\treturn inject(BrnCalendarI18nToken, { optional: true }) ?? defaultCalendarI18n;\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { injectBrnCalendar } from './brn-calendar.token';\nimport { injectBrnCalendarI18n } from './i18n/calendar-i18n';\n\n@Directive({\n\tselector: '[brnCalendarNextButton]',\n\thost: {\n\t\ttype: 'button',\n\t\t'[attr.aria-label]': '_i18n.labelNext()',\n\t},\n})\nexport class BrnCalendarNextButtonDirective {\n\t/** Access the calendar */\n\tprivate readonly _calendar = injectBrnCalendar();\n\n\t/** Access the date adapter */\n\tprivate readonly _dateAdapter = injectDateAdapter();\n\n\t/** Access the calendar i18n */\n\tprotected readonly _i18n = injectBrnCalendarI18n();\n\n\t/** Focus the previous month */\n\t@HostListener('click')\n\tprotected focusPreviousMonth(): void {\n\t\tconst targetDate = this._dateAdapter.add(this._calendar.state().focusedDate(), { months: 1 });\n\n\t\t// if the date is disabled, but there are available dates in the month, focus the last day of the month.\n\t\tconst possibleDate = this._calendar.constrainDate(targetDate);\n\n\t\tif (this._dateAdapter.isSameMonth(possibleDate, targetDate)) {\n\t\t\t// if this date is within the same month, then focus it\n\t\t\tthis._calendar.state().focusedDate.set(possibleDate);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._calendar.state().focusedDate.set(targetDate);\n\t}\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { injectBrnCalendar } from './brn-calendar.token';\nimport { injectBrnCalendarI18n } from './i18n/calendar-i18n';\n\n@Directive({\n\tselector: '[brnCalendarPreviousButton]',\n\thost: {\n\t\ttype: 'button',\n\t\t'[attr.aria-label]': '_i18n.labelPrevious()',\n\t},\n})\nexport class BrnCalendarPreviousButtonDirective {\n\t/** Access the calendar */\n\tprivate readonly _calendar = injectBrnCalendar();\n\n\t/** Access the date adapter */\n\tprivate readonly _dateAdapter = injectDateAdapter();\n\n\t/** Access the calendar i18n */\n\tprotected readonly _i18n = injectBrnCalendarI18n();\n\n\t/** Focus the previous month */\n\t@HostListener('click')\n\tprotected focusPreviousMonth(): void {\n\t\tconst targetDate = this._dateAdapter.subtract(this._calendar.state().focusedDate(), { months: 1 });\n\n\t\t// if the date is disabled, but there are available dates in the month, focus the last day of the month.\n\t\tconst possibleDate = this._calendar.constrainDate(targetDate);\n\n\t\tif (this._dateAdapter.isSameMonth(possibleDate, targetDate)) {\n\t\t\t// if this date is within the same month, then focus it\n\t\t\tthis._calendar.state().focusedDate.set(possibleDate);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._calendar.state().focusedDate.set(targetDate);\n\t}\n}\n","import {\n\tChangeDetectorRef,\n\tDirective,\n\tEmbeddedViewRef,\n\tOnDestroy,\n\tTemplateRef,\n\tViewContainerRef,\n\tcomputed,\n\teffect,\n\tinject,\n\tuntracked,\n} from '@angular/core';\nimport { injectBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendarWeek]',\n})\nexport class BrnCalendarWeekDirective<T> implements OnDestroy {\n\t/** Access the calendar */\n\tprivate readonly _calendar = injectBrnCalendar<T>();\n\n\t/** Access the view container ref */\n\tprivate readonly _viewContainerRef = inject(ViewContainerRef);\n\n\t/** Access the change detector */\n\tprivate readonly _changeDetector = inject(ChangeDetectorRef);\n\n\t/** Access the template ref */\n\tprivate readonly _templateRef = inject<TemplateRef<BrnWeekContext<T>>>(TemplateRef);\n\n\t// get the weeks to display.\n\tprotected readonly _weeks = computed(() => {\n\t\tconst days = this._calendar.days();\n\t\tconst weeks = [];\n\n\t\tfor (let i = 0; i < days.length; i += 7) {\n\t\t\tweeks.push(days.slice(i, i + 7));\n\t\t}\n\n\t\treturn weeks;\n\t});\n\n\t/** Store the view refs */\n\tprivate _viewRefs: EmbeddedViewRef<BrnWeekContext<T>>[] = [];\n\n\t// Make sure the template checker knows the type of the context with which the\n\t// template of this directive will be rendered\n\tstatic ngTemplateContextGuard<T>(_: BrnCalendarWeekDirective<T>, ctx: unknown): ctx is BrnWeekContext<T> {\n\t\treturn true;\n\t}\n\n\tconstructor() {\n\t\t// this should use `afterRenderEffect` but it's not available in the current version\n\t\teffect(() => {\n\t\t\tconst weeks = this._weeks();\n\t\t\tuntracked(() => this._renderWeeks(weeks));\n\t\t});\n\t}\n\n\tprivate _renderWeeks(weeks: T[][]): void {\n\t\t// Destroy all the views when the directive is destroyed\n\t\tfor (const viewRef of this._viewRefs) {\n\t\t\tviewRef.destroy();\n\t\t}\n\n\t\tthis._viewRefs = [];\n\n\t\t// Create a new view for each week\n\t\tfor (const week of weeks) {\n\t\t\tconst viewRef = this._viewContainerRef.createEmbeddedView(this._templateRef, {\n\t\t\t\t$implicit: week,\n\t\t\t});\n\t\t\tthis._viewRefs.push(viewRef);\n\t\t}\n\n\t\tthis._changeDetector.detectChanges();\n\t}\n\n\tngOnDestroy(): void {\n\t\t// Destroy all the views when the directive is destroyed\n\t\tfor (const viewRef of this._viewRefs) {\n\t\t\tviewRef.destroy();\n\t\t}\n\t}\n}\n\ninterface BrnWeekContext<T> {\n\t$implicit: T[];\n}\n","import {\n\tChangeDetectorRef,\n\tcomputed,\n\tDirective,\n\teffect,\n\tEmbeddedViewRef,\n\tinject,\n\tOnDestroy,\n\tTemplateRef,\n\tuntracked,\n\tViewContainerRef,\n} from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { injectBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendarWeekday]',\n})\nexport class BrnCalendarWeekdayDirective<T> implements OnDestroy {\n\t/** Access the calendar */\n\tprivate readonly _calendar = injectBrnCalendar<T>();\n\n\t/** Access the date time adapter */\n\tprivate readonly _dateAdapter = injectDateAdapter<T>();\n\n\t/** Access the view container ref */\n\tprivate readonly _viewContainerRef = inject(ViewContainerRef);\n\n\t/** Access the change detector */\n\tprivate readonly _changeDetector = inject(ChangeDetectorRef);\n\n\t/** Access the template ref */\n\tprivate readonly _templateRef = inject<TemplateRef<BrnWeekdayContext>>(TemplateRef);\n\n\t/** Get the days of the week to display in the header. */\n\tprotected readonly _weekdays = computed(() => this._calendar.days().slice(0, 7));\n\n\t/** Store the view refs */\n\tprivate _viewRefs: EmbeddedViewRef<BrnWeekdayContext>[] = [];\n\n\t// Make sure the template checker knows the type of the context with which the\n\t// template of this directive will be rendered\n\tstatic ngTemplateContextGuard<T>(_: BrnCalendarWeekdayDirective<T>, ctx: unknown): ctx is BrnWeekdayContext {\n\t\treturn true;\n\t}\n\n\tconstructor() {\n\t\t// Create a new view for each day\n\t\teffect(() => {\n\t\t\t// Get the weekdays to display\n\t\t\tconst weekdays = this._weekdays();\n\t\t\t// Render the weekdays\n\t\t\tuntracked(() => this._renderWeekdays(weekdays));\n\t\t});\n\t}\n\n\tprivate _renderWeekdays(weekdays: T[]): void {\n\t\t// Destroy all the views when the directive is destroyed\n\t\tfor (const viewRef of this._viewRefs) {\n\t\t\tviewRef.destroy();\n\t\t}\n\n\t\tthis._viewRefs = [];\n\n\t\t// Create a new view for each day\n\t\tfor (const day of weekdays) {\n\t\t\tconst viewRef = this._viewContainerRef.createEmbeddedView(this._templateRef, {\n\t\t\t\t$implicit: this._dateAdapter.getDay(day),\n\t\t\t});\n\t\t\tthis._viewRefs.push(viewRef);\n\t\t}\n\n\t\tthis._changeDetector.detectChanges();\n\t}\n\n\tngOnDestroy(): void {\n\t\t// Destroy all the views when the directive is destroyed\n\t\tfor (const viewRef of this._viewRefs) {\n\t\t\tviewRef.destroy();\n\t\t}\n\t}\n}\n\ninterface BrnWeekdayContext {\n\t$implicit: number;\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n\tChangeDetectorRef,\n\tDirective,\n\tInjector,\n\tafterNextRender,\n\tbooleanAttribute,\n\tcomputed,\n\tcontentChild,\n\tcontentChildren,\n\tinject,\n\tinput,\n\tmodel,\n\tnumberAttribute,\n\tsignal,\n} from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { BrnCalendarCellButtonDirective } from './brn-calendar-cell-button.directive';\nimport { BrnCalendarHeaderDirective } from './brn-calendar-header.directive';\nimport { BrnCalendar, provideBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendar]',\n\tproviders: [provideBrnCalendar(BrnCalendarDirective)],\n})\nexport class BrnCalendarDirective<T> implements BrnCalendar<T> {\n\t/** Access the date adapter */\n\tprotected readonly _dateAdapter = injectDateAdapter<T>();\n\n\t/** Access the change detector */\n\tprivate readonly _changeDetector = inject(ChangeDetectorRef);\n\n\t/** Access the injector */\n\tprivate readonly _injector = inject(Injector);\n\n\t/** The minimum date that can be selected.*/\n\tpublic readonly min = input<T>();\n\n\t/** The maximum date that can be selected. */\n\tpublic readonly max = input<T>();\n\n\t/** Determine if the date picker is disabled. */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** The selected value. */\n\tpublic readonly date = model<T>();\n\n\t/** Whether a specific date is disabled. */\n\tpublic readonly dateDisabled = input<(date: T) => boolean>(() => false);\n\n\t/** The day the week starts on */\n\tpublic readonly weekStartsOn = input<Weekday, NumberInput>(0, {\n\t\ttransform: (v: unknown) => numberAttribute(v) as Weekday,\n\t});\n\n\t/** The default focused date. */\n\tpublic readonly defaultFocusedDate = input<T>();\n\n\t/** @internal Access the header */\n\tpublic readonly header = contentChild(BrnCalendarHeaderDirective);\n\n\t/** Store the cells */\n\tprotected readonly _cells = contentChildren<BrnCalendarCellButtonDirective<T>>(BrnCalendarCellButtonDirective, {\n\t\tdescendants: true,\n\t});\n\n\t/**\n\t * @internal\n\t * The internal state of the component.\n\t */\n\tpublic readonly state = computed(() => ({\n\t\tfocusedDate: signal(this.constrainDate(this.defaultFocusedDate() ?? this.date() ?? this._dateAdapter.now())),\n\t}));\n\n\t/**\n\t * The focused date.\n\t */\n\tpublic readonly focusedDate = computed(() => this.state().focusedDate());\n\n\t/**\n\t * Get all the days to display, this is the days of the current month\n\t * and the days of the previous and next month to fill the grid.\n\t */\n\tpublic readonly days = computed(() => {\n\t\tconst weekStartsOn = this.weekStartsOn();\n\t\tconst month = this.state().focusedDate();\n\t\tconst days: T[] = [];\n\n\t\t// Get the first and last day of the month.\n\t\tlet firstDay = this._dateAdapter.startOfMonth(month);\n\t\tlet lastDay = this._dateAdapter.endOfMonth(month);\n\n\t\t// we need to subtract until we get the to starting day before or on the start of the month.\n\t\twhile (this._dateAdapter.getDay(firstDay) !== weekStartsOn) {\n\t\t\tfirstDay = this._dateAdapter.subtract(firstDay, { days: 1 });\n\t\t}\n\n\t\tconst weekEndsOn = (weekStartsOn + 6) % 7;\n\n\t\t// we need to add until we get to the ending day after or on the end of the month.\n\t\twhile (this._dateAdapter.getDay(lastDay) !== weekEndsOn) {\n\t\t\tlastDay = this._dateAdapter.add(lastDay, { days: 1 });\n\t\t}\n\n\t\t// collect all the days to display.\n\t\twhile (firstDay <= lastDay) {\n\t\t\tdays.push(firstDay);\n\t\t\tfirstDay = this._dateAdapter.add(firstDay, { days: 1 });\n\t\t}\n\n\t\treturn days;\n\t});\n\n\t/** @internal Constrain a date to the min and max boundaries */\n\tconstrainDate(date: T): T {\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\n\t\t// If there is no min or max, return the date.\n\t\tif (!min && !max) {\n\t\t\treturn date;\n\t\t}\n\n\t\t// If there is a min and the date is before the min, return the min.\n\t\tif (min && this._dateAdapter.isBefore(date, this._dateAdapter.startOfDay(min))) {\n\t\t\treturn min;\n\t\t}\n\n\t\t// If there is a max and the date is after the max, return the max.\n\t\tif (max && this._dateAdapter.isAfter(date, this._dateAdapter.endOfDay(max))) {\n\t\t\treturn max;\n\t\t}\n\n\t\t// Return the date.\n\t\treturn date;\n\t}\n\n\t/** @internal Determine if a date is disabled */\n\tisDateDisabled(date: T): boolean {\n\t\t// if the calendar is disabled we can't select this date\n\t\tif (this.disabled()) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// if the date is outside the min and max range\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\n\t\tif (min && this._dateAdapter.isBefore(date, this._dateAdapter.startOfDay(min))) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (max && this._dateAdapter.isAfter(date, this._dateAdapter.endOfDay(max))) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// if this specific date is disabled\n\t\tconst disabledFn = this.dateDisabled();\n\n\t\tif (disabledFn(date)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tisSelected(date: T): boolean {\n\t\tconst selected = this.date() as T | undefined;\n\t\treturn selected !== undefined && this._dateAdapter.isSameDay(date, selected);\n\t}\n\n\tselectDate(date: T): void {\n\t\tif (this.isSelected(date)) {\n\t\t\tthis.date.set(undefined);\n\t\t} else {\n\t\t\tthis.date.set(date);\n\t\t}\n\t\tthis.state().focusedDate.set(date);\n\t}\n\n\t/** @internal Set the focused date */\n\tsetFocusedDate(date: T): void {\n\t\t// check if the date is disabled.\n\t\tif (this.isDateDisabled(date)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.state().focusedDate.set(date);\n\n\t\t// wait until the cells have all updated\n\t\tafterNextRender(\n\t\t\t{\n\t\t\t\twrite: () => {\n\t\t\t\t\t// focus the cell with the target date.\n\t\t\t\t\tconst cell = this._cells().find((c) => this._dateAdapter.isSameDay(c.date(), date));\n\n\t\t\t\t\tif (cell) {\n\t\t\t\t\t\tcell.focus();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tinjector: this._injector,\n\t\t\t},\n\t\t);\n\n\t\t// we must update the view to ensure the focused cell is visible.\n\t\tthis._changeDetector.detectChanges();\n\t}\n}\n\nexport type Weekday = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n\tafterNextRender,\n\tbooleanAttribute,\n\tChangeDetectorRef,\n\tcomputed,\n\tcontentChild,\n\tcontentChildren,\n\tDirective,\n\tinject,\n\tInjector,\n\tinput,\n\tmodel,\n\tnumberAttribute,\n\tsignal,\n} from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { BrnCalendarCellButtonDirective } from '../brn-calendar-cell-button.directive';\nimport { BrnCalendarHeaderDirective } from '../brn-calendar-header.directive';\nimport { Weekday } from '../brn-calendar.directive';\nimport { BrnCalendar, provideBrnCalendar } from '../brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendarMulti]',\n\tproviders: [provideBrnCalendar(BrnCalendarMultiDirective)],\n})\nexport class BrnCalendarMultiDirective<T> implements BrnCalendar<T> {\n\t// /** Access the date adapter */\n\tprotected readonly _dateAdapter = injectDateAdapter<T>();\n\n\t/** Access the change detector */\n\tprivate readonly _changeDetector = inject(ChangeDetectorRef);\n\n\t/** Access the injector */\n\tprivate readonly _injector = inject(Injector);\n\n\t/** The minimum date that can be selected.*/\n\tpublic readonly min = input<T>();\n\n\t/** The maximum date that can be selected. */\n\tpublic readonly max = input<T>();\n\n\t/** The minimum selectable dates. */\n\tpublic readonly minSelection = input<number, NumberInput>(undefined, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** The maximum selectable dates. */\n\tpublic readonly maxSelection = input<number, NumberInput>(undefined, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** Determine if the date picker is disabled. */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** The selected value. */\n\tpublic readonly date = model<T[]>();\n\n\t/** Whether a specific date is disabled. */\n\tpublic readonly dateDisabled = input<(date: T) => boolean>(() => false);\n\n\t/** The day the week starts on */\n\tpublic readonly weekStartsOn = input<Weekday, NumberInput>(0, {\n\t\ttransform: (v: unknown) => numberAttribute(v) as Weekday,\n\t});\n\n\t/** The default focused date. */\n\tpublic readonly defaultFocusedDate = input<T>();\n\n\t/** @internal Access the header */\n\tpublic readonly header = contentChild(BrnCalendarHeaderDirective);\n\n\t/** Store the cells */\n\tprotected readonly _cells = contentChildren<BrnCalendarCellButtonDirective<T>>(BrnCalendarCellButtonDirective, {\n\t\tdescendants: true,\n\t});\n\n\t/**\n\t * @internal\n\t * The internal state of the component.\n\t */\n\tpublic readonly state = computed(() => ({\n\t\tfocusedDate: signal(this.constrainDate(this.defaultFocusedDate() ?? this._dateAdapter.now())),\n\t}));\n\n\t/**\n\t * The focused date.\n\t */\n\tpublic readonly focusedDate = computed(() => this.state().focusedDate());\n\n\t/**\n\t * Get all the days to display, this is the days of the current month\n\t * and the days of the previous and next month to fill the grid.\n\t */\n\tpublic readonly days = computed(() => {\n\t\tconst weekStartsOn = this.weekStartsOn();\n\t\tconst month = this.state().focusedDate();\n\t\tconst days: T[] = [];\n\n\t\t// Get the first and last day of the month.\n\t\tlet firstDay = this._dateAdapter.startOfMonth(month);\n\t\tlet lastDay = this._dateAdapter.endOfMonth(month);\n\n\t\t// we need to subtract until we get the to starting day before or on the start of the month.\n\t\twhile (this._dateAdapter.getDay(firstDay) !== weekStartsOn) {\n\t\t\tfirstDay = this._dateAdapter.subtract(firstDay, { days: 1 });\n\t\t}\n\n\t\tconst weekEndsOn = (weekStartsOn + 6) % 7;\n\n\t\t// we need to add until we get to the ending day after or on the end of the month.\n\t\twhile (this._dateAdapter.getDay(lastDay) !== weekEndsOn) {\n\t\t\tlastDay = this._dateAdapter.add(lastDay, { days: 1 });\n\t\t}\n\n\t\t// collect all the days to display.\n\t\twhile (firstDay <= lastDay) {\n\t\t\tdays.push(firstDay);\n\t\t\tfirstDay = this._dateAdapter.add(firstDay, { days: 1 });\n\t\t}\n\n\t\treturn days;\n\t});\n\n\tisSelected(date: T): boolean {\n\t\treturn this.date()?.some((d) => this._dateAdapter.isSameDay(d, date)) ?? false;\n\t}\n\n\tselectDate(date: T): void {\n\t\tconst selected = this.date() as T[] | undefined;\n\t\tif (this.isSelected(date)) {\n\t\t\tconst minSelection = this.minSelection();\n\t\t\tif (selected?.length === minSelection) {\n\t\t\t\t// min selection reached, do not allow to deselect\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.date.set(selected?.filter((d) => !this._dateAdapter.isSameDay(d, date)));\n\t\t} else {\n\t\t\tconst maxSelection = this.maxSelection();\n\t\t\tif (selected?.length === maxSelection) {\n\t\t\t\t// max selection reached, reset the selection to date\n\t\t\t\tthis.date.set([date]);\n\t\t\t} else {\n\t\t\t\t// add the date to the selection\n\t\t\t\tthis.date.set([...(selected ?? []), date]);\n\t\t\t}\n\t\t}\n\t}\n\n\t// same as in brn-calendar.directive.ts\n\t/** @internal Constrain a date to the min and max boundaries */\n\tconstrainDate(date: T): T {\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\n\t\t// If there is no min or max, return the date.\n\t\tif (!min && !max) {\n\t\t\treturn date;\n\t\t}\n\n\t\t// If there is a min and the date is before the min, return the min.\n\t\tif (min && this._dateAdapter.isBefore(date, this._dateAdapter.startOfDay(min))) {\n\t\t\treturn min;\n\t\t}\n\n\t\t// If there is a max and the date is after the max, return the max.\n\t\tif (max && this._dateAdapter.isAfter(date, this._dateAdapter.endOfDay(max))) {\n\t\t\treturn max;\n\t\t}\n\n\t\t// Return the date.\n\t\treturn date;\n\t}\n\n\t/** @internal Determine if a date is disabled */\n\tisDateDisabled(date: T): boolean {\n\t\t// if the calendar is disabled we can't select this date\n\t\tif (this.disabled()) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// if the date is outside the min and max range\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\n\t\tif (min && this._dateAdapter.isBefore(date, this._dateAdapter.startOfDay(min))) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (max && this._dateAdapter.isAfter(date, this._dateAdapter.endOfDay(max))) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// if this specific date is disabled\n\t\tconst disabledFn = this.dateDisabled();\n\n\t\tif (disabledFn(date)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/** @internal Set the focused date */\n\tsetFocusedDate(date: T): void {\n\t\t// check if the date is disabled.\n\t\tif (this.isDateDisabled(date)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.state().focusedDate.set(date);\n\n\t\t// wait until the cells have all updated\n\t\tafterNextRender(\n\t\t\t{\n\t\t\t\twrite: () => {\n\t\t\t\t\t// focus the cell with the target date.\n\t\t\t\t\tconst cell = this._cells().find((c) => this._dateAdapter.isSameDay(c.date(), date));\n\n\t\t\t\t\tif (cell) {\n\t\t\t\t\t\tcell.focus();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tinjector: this._injector,\n\t\t\t},\n\t\t);\n\n\t\t// we must update the view to ensure the focused cell is visible.\n\t\tthis._changeDetector.detectChanges();\n\t}\n}\n","export * from './lib/brn-calendar-cell-button.directive';\nexport * from './lib/brn-calendar-cell.directive';\nexport * from './lib/brn-calendar-grid.directive';\nexport * from './lib/brn-calendar-header.directive';\nexport * from './lib/brn-calendar-next-button.directive';\nexport * from './lib/brn-calendar-previous-button.directive';\nexport * from './lib/brn-calendar-week.directive';\nexport * from './lib/brn-calendar-weekday.directive';\nexport * from './lib/brn-calendar.directive';\nexport * from './lib/brn-calendar.token';\nexport * from './lib/i18n/calendar-i18n';\nexport * from './lib/mode/brn-calendar-multiple.directive';\n\nimport { NgModule } from '@angular/core';\nimport { BrnCalendarCellButtonDirective } from './lib/brn-calendar-cell-button.directive';\nimport { BrnCalendarCellDirective } from './lib/brn-calendar-cell.directive';\nimport { BrnCalendarGridDirective } from './lib/brn-calendar-grid.directive';\nimport { BrnCalendarHeaderDirective } from './lib/brn-calendar-header.directive';\nimport { BrnCalendarNextButtonDirective } from './lib/brn-calendar-next-button.directive';\nimport { BrnCalendarPreviousButtonDirective } from './lib/brn-calendar-previous-button.directive';\nimport { BrnCalendarWeekDirective } from './lib/brn-calendar-week.directive';\nimport { BrnCalendarWeekdayDirective } from './lib/brn-calendar-weekday.directive';\nimport { BrnCalendarDirective } from './lib/brn-calendar.directive';\nimport { BrnCalendarMultiDirective } from './lib/mode/brn-calendar-multiple.directive';\n\nexport const BrnCalendarImports = [\n\tBrnCalendarCellButtonDirective,\n\tBrnCalendarGridDirective,\n\tBrnCalendarHeaderDirective,\n\tBrnCalendarNextButtonDirective,\n\tBrnCalendarPreviousButtonDirective,\n\tBrnCalendarWeekDirective,\n\tBrnCalendarWeekdayDirective,\n\tBrnCalendarDirective,\n\tBrnCalendarCellDirective,\n\tBrnCalendarMultiDirective,\n] as const;\n\n@NgModule({\n\timports: [...BrnCalendarImports],\n\texports: [...BrnCalendarImports],\n})\nexport class BrnCalendarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAoBa,gBAAgB,GAAG,IAAI,cAAc,CAAuB,kBAAkB;AAErF,SAAU,kBAAkB,CAAI,QAA8B,EAAA;IACnE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EAAE;AAC5D;AAEA;;AAEG;SACa,iBAAiB,GAAA;AAChC,IAAA,OAAO,MAAM,CAAC,gBAAgB,CAAmB;AAClD;;MCHa,8BAA8B,CAAA;;IAEv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A,CAAA;AAAjB,uBAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAhB7B,8BAA8B;YAC9B,wBAAwB;YACxB,0BAA0B;YAC1B,8BAA8B;YAC9B,kCAAkC;YAClC,wBAAwB;YACxB,2BAA2B;YAC3B,oBAAoB;YACpB,wBAAwB;AACxB,YAAA,yBAAyB,aATzB,8BAA8B;YAC9B,wBAAwB;YACxB,0BAA0B;YAC1B,8BAA8B;YAC9B,kCAAkC;YAClC,wBAAwB;YACxB,2BAA2B;YAC3B,oBAAoB;YACpB,wBAAwB;YACxB,yBAAyB,CAAA,EAAA,CAAA;2HAOb,iBAAiB,EAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AAChC,iBAAA;;;ACzCD;;AAEG;;;;"}
1
+ {"version":3,"file":"spartan-ng-brain-calendar.mjs","sources":["../../../../libs/brain/calendar/src/lib/brn-calendar.token.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-cell-button.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-header.ts","../../../../libs/brain/calendar/src/lib/brn-calendar.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-cell.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-grid.ts","../../../../libs/brain/calendar/src/lib/i18n/calendar-i18n.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-next-button.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-previous-button.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-week.ts","../../../../libs/brain/calendar/src/lib/brn-calendar-weekday.ts","../../../../libs/brain/calendar/src/lib/mode/brn-calendar-multiple.ts","../../../../libs/brain/calendar/src/index.ts","../../../../libs/brain/calendar/src/spartan-ng-brain-calendar.ts"],"sourcesContent":["import { ExistingProvider, InjectionToken, Signal, Type, WritableSignal, inject } from '@angular/core';\nimport { BrnCalendarHeader } from './brn-calendar-header';\n\nexport interface BrnCalendarBase<T> {\n\tisSelected: (date: T) => boolean;\n\tselectDate: (date: T) => void;\n\n\tconstrainDate: (date: T) => T;\n\tisDateDisabled: (date: T) => boolean;\n\tsetFocusedDate: (date: T) => void;\n\n\tdisabled: Signal<boolean>;\n\tfocusedDate: Signal<T>;\n\theader: Signal<BrnCalendarHeader | undefined>;\n\tstate: Signal<{\n\t\tfocusedDate: WritableSignal<T>;\n\t}>;\n\tdays: Signal<T[]>;\n}\n\nexport const BrnCalendarToken = new InjectionToken<BrnCalendarBase<unknown>>('BrnCalendarToken');\n\nexport function provideBrnCalendar<T>(instance: Type<BrnCalendarBase<T>>): ExistingProvider {\n\treturn { provide: BrnCalendarToken, useExisting: instance };\n}\n\n/**\n * Inject the calendar component.\n */\nexport function injectBrnCalendar<T>(): BrnCalendarBase<T> {\n\treturn inject(BrnCalendarToken) as BrnCalendarBase<T>;\n}\n","import { Directive, ElementRef, computed, inject, input } from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { injectBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: 'button[brnCalendarCellButton]',\n\thost: {\n\t\trole: 'gridcell',\n\t\t'[tabindex]': 'focusable() ? 0 : -1',\n\t\ttype: 'button',\n\t\t'[attr.data-outside]': \"outside() ? '' : null\",\n\t\t'[attr.data-today]': \"today() && !selected() ? '' : null\",\n\t\t'[attr.data-selected]': \"selected() ? '' : null\",\n\t\t'[attr.data-disabled]': \"disabled() ? '' : null\",\n\t\t'[attr.aria-selected]': \"selected() ? 'true' : null\",\n\t\t'[attr.aria-disabled]': \"disabled() ? 'true' : null\",\n\t\t'[disabled]': 'disabled()',\n\t\t'(click)': '_calendar.selectDate(date())',\n\t\t'(keydown.arrowLeft)': 'focusPrevious($event)',\n\t\t'(keydown.arrowRight)': 'focusNext($event)',\n\t\t'(keydown.arrowUp)': 'focusAbove($event)',\n\t\t'(keydown.arrowDown)': 'focusBelow($event)',\n\t\t'(keydown.home)': 'focusFirst($event)',\n\t\t'(keydown.end)': 'focusLast($event)',\n\t\t'(keydown.pageUp)': 'focusPreviousMonth($event)',\n\t\t'(keydown.pageDown)': 'focusNextMonth($event)',\n\t},\n})\nexport class BrnCalendarCellButton<T> {\n\t/** Access the date adapter */\n\tprotected readonly _dateAdapter = injectDateAdapter<T>();\n\n\t/** Access the calendar component */\n\tprotected readonly _calendar = injectBrnCalendar<T>();\n\n\t/** Access the element ref */\n\tprivate readonly _elementRef = inject<ElementRef<HTMLButtonElement>>(ElementRef);\n\n\t/** The date this cell represents */\n\tpublic readonly date = input.required<T>();\n\n\t/** Whether this date is currently selected */\n\tpublic readonly selected = computed(() => this._calendar.isSelected(this.date()));\n\n\t/** Whether this date is focusable */\n\tpublic readonly focusable = computed(() => this._dateAdapter.isSameDay(this._calendar.focusedDate(), this.date()));\n\n\tpublic readonly outside = computed(() => {\n\t\tconst focusedDate = this._calendar.focusedDate();\n\t\treturn !this._dateAdapter.isSameMonth(this.date(), focusedDate);\n\t});\n\n\t/** Whether this date is today */\n\tpublic readonly today = computed(() => this._dateAdapter.isSameDay(this.date(), this._dateAdapter.now()));\n\n\t/** Whether this date is disabled */\n\tpublic readonly disabled = computed(() => this._calendar.isDateDisabled(this.date()) || this._calendar.disabled());\n\n\t/**\n\t * Focus the previous cell.\n\t */\n\tprotected focusPrevious(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\t// in rtl, the arrow keys are reversed.\n\t\tconst targetDate = this._dateAdapter.add(this._calendar.focusedDate(), {\n\t\t\tdays: this.getDirection() === 'rtl' ? 1 : -1,\n\t\t});\n\n\t\tthis._calendar.setFocusedDate(targetDate);\n\t}\n\n\t/**\n\t * Focus the next cell.\n\t */\n\tprotected focusNext(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\tconst targetDate = this._dateAdapter.add(this._calendar.focusedDate(), {\n\t\t\tdays: this.getDirection() === 'rtl' ? -1 : 1,\n\t\t});\n\n\t\tthis._calendar.setFocusedDate(targetDate);\n\t}\n\n\t/**\n\t * Focus the above cell.\n\t */\n\tprotected focusAbove(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._calendar.setFocusedDate(this._dateAdapter.subtract(this._calendar.focusedDate(), { days: 7 }));\n\t}\n\n\t/**\n\t * Focus the below cell.\n\t */\n\tprotected focusBelow(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._calendar.setFocusedDate(this._dateAdapter.add(this._calendar.focusedDate(), { days: 7 }));\n\t}\n\n\t/**\n\t * Focus the first date of the month.\n\t */\n\tprotected focusFirst(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._calendar.setFocusedDate(this._dateAdapter.startOfMonth(this._calendar.focusedDate()));\n\t}\n\n\t/**\n\t * Focus the last date of the month.\n\t */\n\tprotected focusLast(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._calendar.setFocusedDate(this._dateAdapter.endOfMonth(this._calendar.focusedDate()));\n\t}\n\n\t/**\n\t * Focus the same date in the previous month.\n\t */\n\tprotected focusPreviousMonth(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\tconst date = this._dateAdapter.getDate(this._calendar.focusedDate());\n\n\t\tlet previousMonthTarget = this._dateAdapter.startOfMonth(this._calendar.focusedDate());\n\t\tpreviousMonthTarget = this._dateAdapter.subtract(previousMonthTarget, { months: 1 });\n\n\t\tconst lastDay = this._dateAdapter.endOfMonth(previousMonthTarget);\n\n\t\t// if we are on a date that does not exist in the previous month, we should focus the last day of the month.\n\t\tif (date > this._dateAdapter.getDate(lastDay)) {\n\t\t\tthis._calendar.setFocusedDate(lastDay);\n\t\t} else {\n\t\t\tthis._calendar.setFocusedDate(this._dateAdapter.set(previousMonthTarget, { day: date }));\n\t\t}\n\t}\n\n\t/**\n\t * Focus the same date in the next month.\n\t */\n\tprotected focusNextMonth(event: Event): void {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\tconst date = this._dateAdapter.getDate(this._calendar.focusedDate());\n\n\t\tlet nextMonthTarget = this._dateAdapter.startOfMonth(this._calendar.focusedDate());\n\t\tnextMonthTarget = this._dateAdapter.add(nextMonthTarget, { months: 1 });\n\n\t\tconst lastDay = this._dateAdapter.endOfMonth(nextMonthTarget);\n\n\t\t// if we are on a date that does not exist in the next month, we should focus the last day of the month.\n\t\tif (date > this._dateAdapter.getDate(lastDay)) {\n\t\t\tthis._calendar.setFocusedDate(lastDay);\n\t\t} else {\n\t\t\tthis._calendar.setFocusedDate(this._dateAdapter.set(nextMonthTarget, { day: date }));\n\t\t}\n\t}\n\n\t/**\n\t * Get the direction of the element.\n\t */\n\tprivate getDirection(): 'ltr' | 'rtl' {\n\t\treturn getComputedStyle(this._elementRef.nativeElement).direction === 'rtl' ? 'rtl' : 'ltr';\n\t}\n\n\tfocus(): void {\n\t\tthis._elementRef.nativeElement.focus();\n\t}\n}\n","import { Directive, input } from '@angular/core';\n\nlet uniqueId = 0;\n\n@Directive({\n\tselector: '[brnCalendarHeader]',\n\thost: {\n\t\t'[id]': 'id()',\n\t\t'aria-live': 'polite',\n\t\trole: 'presentation',\n\t},\n})\nexport class BrnCalendarHeader {\n\t/** The unique id for the header */\n\tpublic readonly id = input(`brn-calendar-header-${uniqueId++}`);\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n\tChangeDetectorRef,\n\tDirective,\n\tInjector,\n\tafterNextRender,\n\tbooleanAttribute,\n\tcomputed,\n\tcontentChild,\n\tcontentChildren,\n\tinject,\n\tinput,\n\tmodel,\n\tnumberAttribute,\n\tsignal,\n} from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { BrnCalendarCellButton } from './brn-calendar-cell-button';\nimport { BrnCalendarHeader } from './brn-calendar-header';\nimport { BrnCalendarBase, provideBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendar]',\n\tproviders: [provideBrnCalendar(BrnCalendar)],\n})\nexport class BrnCalendar<T> implements BrnCalendarBase<T> {\n\t/** Access the date adapter */\n\tprotected readonly _dateAdapter = injectDateAdapter<T>();\n\n\t/** Access the change detector */\n\tprivate readonly _changeDetector = inject(ChangeDetectorRef);\n\n\t/** Access the injector */\n\tprivate readonly _injector = inject(Injector);\n\n\t/** The minimum date that can be selected.*/\n\tpublic readonly min = input<T>();\n\n\t/** The maximum date that can be selected. */\n\tpublic readonly max = input<T>();\n\n\t/** Determine if the date picker is disabled. */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** The selected value. */\n\tpublic readonly date = model<T>();\n\n\t/** Whether a specific date is disabled. */\n\tpublic readonly dateDisabled = input<(date: T) => boolean>(() => false);\n\n\t/** The day the week starts on */\n\tpublic readonly weekStartsOn = input<Weekday, NumberInput>(0, {\n\t\ttransform: (v: unknown) => numberAttribute(v) as Weekday,\n\t});\n\n\t/** The default focused date. */\n\tpublic readonly defaultFocusedDate = input<T>();\n\n\t/** @internal Access the header */\n\tpublic readonly header = contentChild(BrnCalendarHeader);\n\n\t/** Store the cells */\n\tprotected readonly _cells = contentChildren<BrnCalendarCellButton<T>>(BrnCalendarCellButton, {\n\t\tdescendants: true,\n\t});\n\n\t/**\n\t * @internal\n\t * The internal state of the component.\n\t */\n\tpublic readonly state = computed(() => ({\n\t\tfocusedDate: signal(this.constrainDate(this.defaultFocusedDate() ?? this.date() ?? this._dateAdapter.now())),\n\t}));\n\n\t/**\n\t * The focused date.\n\t */\n\tpublic readonly focusedDate = computed(() => this.state().focusedDate());\n\n\t/**\n\t * Get all the days to display, this is the days of the current month\n\t * and the days of the previous and next month to fill the grid.\n\t */\n\tpublic readonly days = computed(() => {\n\t\tconst weekStartsOn = this.weekStartsOn();\n\t\tconst month = this.state().focusedDate();\n\t\tconst days: T[] = [];\n\n\t\t// Get the first and last day of the month.\n\t\tlet firstDay = this._dateAdapter.startOfMonth(month);\n\t\tlet lastDay = this._dateAdapter.endOfMonth(month);\n\n\t\t// we need to subtract until we get the to starting day before or on the start of the month.\n\t\twhile (this._dateAdapter.getDay(firstDay) !== weekStartsOn) {\n\t\t\tfirstDay = this._dateAdapter.subtract(firstDay, { days: 1 });\n\t\t}\n\n\t\tconst weekEndsOn = (weekStartsOn + 6) % 7;\n\n\t\t// we need to add until we get to the ending day after or on the end of the month.\n\t\twhile (this._dateAdapter.getDay(lastDay) !== weekEndsOn) {\n\t\t\tlastDay = this._dateAdapter.add(lastDay, { days: 1 });\n\t\t}\n\n\t\t// collect all the days to display.\n\t\twhile (firstDay <= lastDay) {\n\t\t\tdays.push(firstDay);\n\t\t\tfirstDay = this._dateAdapter.add(firstDay, { days: 1 });\n\t\t}\n\n\t\treturn days;\n\t});\n\n\t/** @internal Constrain a date to the min and max boundaries */\n\tconstrainDate(date: T): T {\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\n\t\t// If there is no min or max, return the date.\n\t\tif (!min && !max) {\n\t\t\treturn date;\n\t\t}\n\n\t\t// If there is a min and the date is before the min, return the min.\n\t\tif (min && this._dateAdapter.isBefore(date, this._dateAdapter.startOfDay(min))) {\n\t\t\treturn min;\n\t\t}\n\n\t\t// If there is a max and the date is after the max, return the max.\n\t\tif (max && this._dateAdapter.isAfter(date, this._dateAdapter.endOfDay(max))) {\n\t\t\treturn max;\n\t\t}\n\n\t\t// Return the date.\n\t\treturn date;\n\t}\n\n\t/** @internal Determine if a date is disabled */\n\tisDateDisabled(date: T): boolean {\n\t\t// if the calendar is disabled we can't select this date\n\t\tif (this.disabled()) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// if the date is outside the min and max range\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\n\t\tif (min && this._dateAdapter.isBefore(date, this._dateAdapter.startOfDay(min))) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (max && this._dateAdapter.isAfter(date, this._dateAdapter.endOfDay(max))) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// if this specific date is disabled\n\t\tconst disabledFn = this.dateDisabled();\n\n\t\tif (disabledFn(date)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tisSelected(date: T): boolean {\n\t\tconst selected = this.date() as T | undefined;\n\t\treturn selected !== undefined && this._dateAdapter.isSameDay(date, selected);\n\t}\n\n\tselectDate(date: T): void {\n\t\tif (this.isSelected(date)) {\n\t\t\tthis.date.set(undefined);\n\t\t} else {\n\t\t\tthis.date.set(date);\n\t\t}\n\t\tthis.state().focusedDate.set(date);\n\t}\n\n\t/** @internal Set the focused date */\n\tsetFocusedDate(date: T): void {\n\t\t// check if the date is disabled.\n\t\tif (this.isDateDisabled(date)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.state().focusedDate.set(date);\n\n\t\t// wait until the cells have all updated\n\t\tafterNextRender(\n\t\t\t{\n\t\t\t\twrite: () => {\n\t\t\t\t\t// focus the cell with the target date.\n\t\t\t\t\tconst cell = this._cells().find((c) => this._dateAdapter.isSameDay(c.date(), date));\n\n\t\t\t\t\tif (cell) {\n\t\t\t\t\t\tcell.focus();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tinjector: this._injector,\n\t\t\t},\n\t\t);\n\n\t\t// we must update the view to ensure the focused cell is visible.\n\t\tthis._changeDetector.detectChanges();\n\t}\n}\n\nexport type Weekday = 0 | 1 | 2 | 3 | 4 | 5 | 6;\n","import { Directive } from '@angular/core';\n\n@Directive({\n\tselector: '[brnCalendarCell]',\n\thost: {\n\t\trole: 'presentation',\n\t},\n})\nexport class BrnCalendarCell {}\n","import { Directive } from '@angular/core';\nimport { injectBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendarGrid]',\n\thost: {\n\t\trole: 'grid',\n\t\t'[attr.aria-labelledby]': '_calendar.header()?.id()',\n\t},\n})\nexport class BrnCalendarGrid<T> {\n\t/** Access the calendar component */\n\tprotected readonly _calendar = injectBrnCalendar<T>();\n}\n","import { InjectionToken, ValueProvider, inject } from '@angular/core';\n\nexport interface BrnCalendarI18n {\n\tformatWeekdayName: (index: number) => string;\n\tformatHeader: (month: number, year: number) => string;\n\tlabelPrevious: () => string;\n\tlabelNext: () => string;\n\tlabelWeekday: (index: number) => string;\n}\n\nexport const BrnCalendarI18nToken = new InjectionToken<BrnCalendarI18n>('BrnCalendarI18nToken');\n\n/**\n * Provide the calendar i18n configuration.\n */\nexport function provideBrnCalendarI18n(configuration: BrnCalendarI18n): ValueProvider {\n\treturn { provide: BrnCalendarI18nToken, useValue: configuration };\n}\n\nconst defaultCalendarI18n: BrnCalendarI18n = {\n\tformatWeekdayName: (index: number) => {\n\t\tconst weekdays = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];\n\t\treturn weekdays[index];\n\t},\n\tformatHeader: (month: number, year: number) => {\n\t\treturn new Date(year, month).toLocaleDateString(undefined, {\n\t\t\tmonth: 'long',\n\t\t\tyear: 'numeric',\n\t\t});\n\t},\n\tlabelPrevious: () => 'Go to the previous month',\n\tlabelNext: () => 'Go to the next month',\n\tlabelWeekday: (index: number) => {\n\t\tconst weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];\n\t\treturn weekdays[index];\n\t},\n};\n\n/**\n * Inject the calendar i18n configuration.\n */\nexport function injectBrnCalendarI18n(): BrnCalendarI18n {\n\treturn inject(BrnCalendarI18nToken, { optional: true }) ?? defaultCalendarI18n;\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { injectBrnCalendar } from './brn-calendar.token';\nimport { injectBrnCalendarI18n } from './i18n/calendar-i18n';\n\n@Directive({\n\tselector: '[brnCalendarNextButton]',\n\thost: {\n\t\ttype: 'button',\n\t\t'[attr.aria-label]': '_i18n.labelNext()',\n\t},\n})\nexport class BrnCalendarNextButton {\n\t/** Access the calendar */\n\tprivate readonly _calendar = injectBrnCalendar();\n\n\t/** Access the date adapter */\n\tprivate readonly _dateAdapter = injectDateAdapter();\n\n\t/** Access the calendar i18n */\n\tprotected readonly _i18n = injectBrnCalendarI18n();\n\n\t/** Focus the previous month */\n\t@HostListener('click')\n\tprotected focusPreviousMonth(): void {\n\t\tconst targetDate = this._dateAdapter.add(this._calendar.state().focusedDate(), { months: 1 });\n\n\t\t// if the date is disabled, but there are available dates in the month, focus the last day of the month.\n\t\tconst possibleDate = this._calendar.constrainDate(targetDate);\n\n\t\tif (this._dateAdapter.isSameMonth(possibleDate, targetDate)) {\n\t\t\t// if this date is within the same month, then focus it\n\t\t\tthis._calendar.state().focusedDate.set(possibleDate);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._calendar.state().focusedDate.set(targetDate);\n\t}\n}\n","import { Directive, HostListener } from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { injectBrnCalendar } from './brn-calendar.token';\nimport { injectBrnCalendarI18n } from './i18n/calendar-i18n';\n\n@Directive({\n\tselector: '[brnCalendarPreviousButton]',\n\thost: {\n\t\ttype: 'button',\n\t\t'[attr.aria-label]': '_i18n.labelPrevious()',\n\t},\n})\nexport class BrnCalendarPreviousButton {\n\t/** Access the calendar */\n\tprivate readonly _calendar = injectBrnCalendar();\n\n\t/** Access the date adapter */\n\tprivate readonly _dateAdapter = injectDateAdapter();\n\n\t/** Access the calendar i18n */\n\tprotected readonly _i18n = injectBrnCalendarI18n();\n\n\t/** Focus the previous month */\n\t@HostListener('click')\n\tprotected focusPreviousMonth(): void {\n\t\tconst targetDate = this._dateAdapter.subtract(this._calendar.state().focusedDate(), { months: 1 });\n\n\t\t// if the date is disabled, but there are available dates in the month, focus the last day of the month.\n\t\tconst possibleDate = this._calendar.constrainDate(targetDate);\n\n\t\tif (this._dateAdapter.isSameMonth(possibleDate, targetDate)) {\n\t\t\t// if this date is within the same month, then focus it\n\t\t\tthis._calendar.state().focusedDate.set(possibleDate);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._calendar.state().focusedDate.set(targetDate);\n\t}\n}\n","import {\n\tChangeDetectorRef,\n\tDirective,\n\tEmbeddedViewRef,\n\tOnDestroy,\n\tTemplateRef,\n\tViewContainerRef,\n\tcomputed,\n\teffect,\n\tinject,\n\tuntracked,\n} from '@angular/core';\nimport { injectBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendarWeek]',\n})\nexport class BrnCalendarWeek<T> implements OnDestroy {\n\t/** Access the calendar */\n\tprivate readonly _calendar = injectBrnCalendar<T>();\n\n\t/** Access the view container ref */\n\tprivate readonly _viewContainerRef = inject(ViewContainerRef);\n\n\t/** Access the change detector */\n\tprivate readonly _changeDetector = inject(ChangeDetectorRef);\n\n\t/** Access the template ref */\n\tprivate readonly _templateRef = inject<TemplateRef<BrnWeekContext<T>>>(TemplateRef);\n\n\t// get the weeks to display.\n\tprotected readonly _weeks = computed(() => {\n\t\tconst days = this._calendar.days();\n\t\tconst weeks = [];\n\n\t\tfor (let i = 0; i < days.length; i += 7) {\n\t\t\tweeks.push(days.slice(i, i + 7));\n\t\t}\n\n\t\treturn weeks;\n\t});\n\n\t/** Store the view refs */\n\tprivate _viewRefs: EmbeddedViewRef<BrnWeekContext<T>>[] = [];\n\n\t// Make sure the template checker knows the type of the context with which the\n\t// template of this directive will be rendered\n\tstatic ngTemplateContextGuard<T>(_: BrnCalendarWeek<T>, ctx: unknown): ctx is BrnWeekContext<T> {\n\t\treturn true;\n\t}\n\n\tconstructor() {\n\t\t// this should use `afterRenderEffect` but it's not available in the current version\n\t\teffect(() => {\n\t\t\tconst weeks = this._weeks();\n\t\t\tuntracked(() => this._renderWeeks(weeks));\n\t\t});\n\t}\n\n\tprivate _renderWeeks(weeks: T[][]): void {\n\t\t// Destroy all the views when the directive is destroyed\n\t\tfor (const viewRef of this._viewRefs) {\n\t\t\tviewRef.destroy();\n\t\t}\n\n\t\tthis._viewRefs = [];\n\n\t\t// Create a new view for each week\n\t\tfor (const week of weeks) {\n\t\t\tconst viewRef = this._viewContainerRef.createEmbeddedView(this._templateRef, {\n\t\t\t\t$implicit: week,\n\t\t\t});\n\t\t\tthis._viewRefs.push(viewRef);\n\t\t}\n\n\t\tthis._changeDetector.detectChanges();\n\t}\n\n\tngOnDestroy(): void {\n\t\t// Destroy all the views when the directive is destroyed\n\t\tfor (const viewRef of this._viewRefs) {\n\t\t\tviewRef.destroy();\n\t\t}\n\t}\n}\n\ninterface BrnWeekContext<T> {\n\t$implicit: T[];\n}\n","import {\n\tChangeDetectorRef,\n\tcomputed,\n\tDirective,\n\teffect,\n\tEmbeddedViewRef,\n\tinject,\n\tOnDestroy,\n\tTemplateRef,\n\tuntracked,\n\tViewContainerRef,\n} from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { injectBrnCalendar } from './brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendarWeekday]',\n})\nexport class BrnCalendarWeekday<T> implements OnDestroy {\n\t/** Access the calendar */\n\tprivate readonly _calendar = injectBrnCalendar<T>();\n\n\t/** Access the date time adapter */\n\tprivate readonly _dateAdapter = injectDateAdapter<T>();\n\n\t/** Access the view container ref */\n\tprivate readonly _viewContainerRef = inject(ViewContainerRef);\n\n\t/** Access the change detector */\n\tprivate readonly _changeDetector = inject(ChangeDetectorRef);\n\n\t/** Access the template ref */\n\tprivate readonly _templateRef = inject<TemplateRef<BrnWeekdayContext>>(TemplateRef);\n\n\t/** Get the days of the week to display in the header. */\n\tprotected readonly _weekdays = computed(() => this._calendar.days().slice(0, 7));\n\n\t/** Store the view refs */\n\tprivate _viewRefs: EmbeddedViewRef<BrnWeekdayContext>[] = [];\n\n\t// Make sure the template checker knows the type of the context with which the\n\t// template of this directive will be rendered\n\tstatic ngTemplateContextGuard<T>(_: BrnCalendarWeekday<T>, ctx: unknown): ctx is BrnWeekdayContext {\n\t\treturn true;\n\t}\n\n\tconstructor() {\n\t\t// Create a new view for each day\n\t\teffect(() => {\n\t\t\t// Get the weekdays to display\n\t\t\tconst weekdays = this._weekdays();\n\t\t\t// Render the weekdays\n\t\t\tuntracked(() => this._renderWeekdays(weekdays));\n\t\t});\n\t}\n\n\tprivate _renderWeekdays(weekdays: T[]): void {\n\t\t// Destroy all the views when the directive is destroyed\n\t\tfor (const viewRef of this._viewRefs) {\n\t\t\tviewRef.destroy();\n\t\t}\n\n\t\tthis._viewRefs = [];\n\n\t\t// Create a new view for each day\n\t\tfor (const day of weekdays) {\n\t\t\tconst viewRef = this._viewContainerRef.createEmbeddedView(this._templateRef, {\n\t\t\t\t$implicit: this._dateAdapter.getDay(day),\n\t\t\t});\n\t\t\tthis._viewRefs.push(viewRef);\n\t\t}\n\n\t\tthis._changeDetector.detectChanges();\n\t}\n\n\tngOnDestroy(): void {\n\t\t// Destroy all the views when the directive is destroyed\n\t\tfor (const viewRef of this._viewRefs) {\n\t\t\tviewRef.destroy();\n\t\t}\n\t}\n}\n\ninterface BrnWeekdayContext {\n\t$implicit: number;\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n\tafterNextRender,\n\tbooleanAttribute,\n\tChangeDetectorRef,\n\tcomputed,\n\tcontentChild,\n\tcontentChildren,\n\tDirective,\n\tinject,\n\tInjector,\n\tinput,\n\tmodel,\n\tnumberAttribute,\n\tsignal,\n} from '@angular/core';\nimport { injectDateAdapter } from '@spartan-ng/brain/date-time';\nimport { Weekday } from '../brn-calendar';\nimport { BrnCalendarCellButton } from '../brn-calendar-cell-button';\nimport { BrnCalendarHeader } from '../brn-calendar-header';\nimport { BrnCalendarBase, provideBrnCalendar } from '../brn-calendar.token';\n\n@Directive({\n\tselector: '[brnCalendarMulti]',\n\tproviders: [provideBrnCalendar(BrnCalendarMulti)],\n})\nexport class BrnCalendarMulti<T> implements BrnCalendarBase<T> {\n\t// /** Access the date adapter */\n\tprotected readonly _dateAdapter = injectDateAdapter<T>();\n\n\t/** Access the change detector */\n\tprivate readonly _changeDetector = inject(ChangeDetectorRef);\n\n\t/** Access the injector */\n\tprivate readonly _injector = inject(Injector);\n\n\t/** The minimum date that can be selected.*/\n\tpublic readonly min = input<T>();\n\n\t/** The maximum date that can be selected. */\n\tpublic readonly max = input<T>();\n\n\t/** The minimum selectable dates. */\n\tpublic readonly minSelection = input<number, NumberInput>(undefined, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** The maximum selectable dates. */\n\tpublic readonly maxSelection = input<number, NumberInput>(undefined, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** Determine if the date picker is disabled. */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** The selected value. */\n\tpublic readonly date = model<T[]>();\n\n\t/** Whether a specific date is disabled. */\n\tpublic readonly dateDisabled = input<(date: T) => boolean>(() => false);\n\n\t/** The day the week starts on */\n\tpublic readonly weekStartsOn = input<Weekday, NumberInput>(0, {\n\t\ttransform: (v: unknown) => numberAttribute(v) as Weekday,\n\t});\n\n\t/** The default focused date. */\n\tpublic readonly defaultFocusedDate = input<T>();\n\n\t/** @internal Access the header */\n\tpublic readonly header = contentChild(BrnCalendarHeader);\n\n\t/** Store the cells */\n\tprotected readonly _cells = contentChildren<BrnCalendarCellButton<T>>(BrnCalendarCellButton, {\n\t\tdescendants: true,\n\t});\n\n\t/**\n\t * @internal\n\t * The internal state of the component.\n\t */\n\tpublic readonly state = computed(() => ({\n\t\tfocusedDate: signal(this.constrainDate(this.defaultFocusedDate() ?? this._dateAdapter.now())),\n\t}));\n\n\t/**\n\t * The focused date.\n\t */\n\tpublic readonly focusedDate = computed(() => this.state().focusedDate());\n\n\t/**\n\t * Get all the days to display, this is the days of the current month\n\t * and the days of the previous and next month to fill the grid.\n\t */\n\tpublic readonly days = computed(() => {\n\t\tconst weekStartsOn = this.weekStartsOn();\n\t\tconst month = this.state().focusedDate();\n\t\tconst days: T[] = [];\n\n\t\t// Get the first and last day of the month.\n\t\tlet firstDay = this._dateAdapter.startOfMonth(month);\n\t\tlet lastDay = this._dateAdapter.endOfMonth(month);\n\n\t\t// we need to subtract until we get the to starting day before or on the start of the month.\n\t\twhile (this._dateAdapter.getDay(firstDay) !== weekStartsOn) {\n\t\t\tfirstDay = this._dateAdapter.subtract(firstDay, { days: 1 });\n\t\t}\n\n\t\tconst weekEndsOn = (weekStartsOn + 6) % 7;\n\n\t\t// we need to add until we get to the ending day after or on the end of the month.\n\t\twhile (this._dateAdapter.getDay(lastDay) !== weekEndsOn) {\n\t\t\tlastDay = this._dateAdapter.add(lastDay, { days: 1 });\n\t\t}\n\n\t\t// collect all the days to display.\n\t\twhile (firstDay <= lastDay) {\n\t\t\tdays.push(firstDay);\n\t\t\tfirstDay = this._dateAdapter.add(firstDay, { days: 1 });\n\t\t}\n\n\t\treturn days;\n\t});\n\n\tisSelected(date: T): boolean {\n\t\treturn this.date()?.some((d) => this._dateAdapter.isSameDay(d, date)) ?? false;\n\t}\n\n\tselectDate(date: T): void {\n\t\tconst selected = this.date() as T[] | undefined;\n\t\tif (this.isSelected(date)) {\n\t\t\tconst minSelection = this.minSelection();\n\t\t\tif (selected?.length === minSelection) {\n\t\t\t\t// min selection reached, do not allow to deselect\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.date.set(selected?.filter((d) => !this._dateAdapter.isSameDay(d, date)));\n\t\t} else {\n\t\t\tconst maxSelection = this.maxSelection();\n\t\t\tif (selected?.length === maxSelection) {\n\t\t\t\t// max selection reached, reset the selection to date\n\t\t\t\tthis.date.set([date]);\n\t\t\t} else {\n\t\t\t\t// add the date to the selection\n\t\t\t\tthis.date.set([...(selected ?? []), date]);\n\t\t\t}\n\t\t}\n\t}\n\n\t// same as in brn-calendar.directive.ts\n\t/** @internal Constrain a date to the min and max boundaries */\n\tconstrainDate(date: T): T {\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\n\t\t// If there is no min or max, return the date.\n\t\tif (!min && !max) {\n\t\t\treturn date;\n\t\t}\n\n\t\t// If there is a min and the date is before the min, return the min.\n\t\tif (min && this._dateAdapter.isBefore(date, this._dateAdapter.startOfDay(min))) {\n\t\t\treturn min;\n\t\t}\n\n\t\t// If there is a max and the date is after the max, return the max.\n\t\tif (max && this._dateAdapter.isAfter(date, this._dateAdapter.endOfDay(max))) {\n\t\t\treturn max;\n\t\t}\n\n\t\t// Return the date.\n\t\treturn date;\n\t}\n\n\t/** @internal Determine if a date is disabled */\n\tisDateDisabled(date: T): boolean {\n\t\t// if the calendar is disabled we can't select this date\n\t\tif (this.disabled()) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// if the date is outside the min and max range\n\t\tconst min = this.min();\n\t\tconst max = this.max();\n\n\t\tif (min && this._dateAdapter.isBefore(date, this._dateAdapter.startOfDay(min))) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (max && this._dateAdapter.isAfter(date, this._dateAdapter.endOfDay(max))) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// if this specific date is disabled\n\t\tconst disabledFn = this.dateDisabled();\n\n\t\tif (disabledFn(date)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/** @internal Set the focused date */\n\tsetFocusedDate(date: T): void {\n\t\t// check if the date is disabled.\n\t\tif (this.isDateDisabled(date)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.state().focusedDate.set(date);\n\n\t\t// wait until the cells have all updated\n\t\tafterNextRender(\n\t\t\t{\n\t\t\t\twrite: () => {\n\t\t\t\t\t// focus the cell with the target date.\n\t\t\t\t\tconst cell = this._cells().find((c) => this._dateAdapter.isSameDay(c.date(), date));\n\n\t\t\t\t\tif (cell) {\n\t\t\t\t\t\tcell.focus();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tinjector: this._injector,\n\t\t\t},\n\t\t);\n\n\t\t// we must update the view to ensure the focused cell is visible.\n\t\tthis._changeDetector.detectChanges();\n\t}\n}\n","export * from './lib/brn-calendar';\nexport * from './lib/brn-calendar-cell';\nexport * from './lib/brn-calendar-cell-button';\nexport * from './lib/brn-calendar-grid';\nexport * from './lib/brn-calendar-header';\nexport * from './lib/brn-calendar-next-button';\nexport * from './lib/brn-calendar-previous-button';\nexport * from './lib/brn-calendar-week';\nexport * from './lib/brn-calendar-weekday';\nexport * from './lib/brn-calendar.token';\nexport * from './lib/i18n/calendar-i18n';\nexport * from './lib/mode/brn-calendar-multiple';\n\nimport { NgModule } from '@angular/core';\nimport { BrnCalendar } from './lib/brn-calendar';\nimport { BrnCalendarCell } from './lib/brn-calendar-cell';\nimport { BrnCalendarCellButton } from './lib/brn-calendar-cell-button';\nimport { BrnCalendarGrid } from './lib/brn-calendar-grid';\nimport { BrnCalendarHeader } from './lib/brn-calendar-header';\nimport { BrnCalendarNextButton } from './lib/brn-calendar-next-button';\nimport { BrnCalendarPreviousButton } from './lib/brn-calendar-previous-button';\nimport { BrnCalendarWeek } from './lib/brn-calendar-week';\nimport { BrnCalendarWeekday } from './lib/brn-calendar-weekday';\nimport { BrnCalendarMulti } from './lib/mode/brn-calendar-multiple';\n\nexport const BrnCalendarImports = [\n\tBrnCalendarCellButton,\n\tBrnCalendarGrid,\n\tBrnCalendarHeader,\n\tBrnCalendarNextButton,\n\tBrnCalendarPreviousButton,\n\tBrnCalendarWeek,\n\tBrnCalendarWeekday,\n\tBrnCalendar,\n\tBrnCalendarCell,\n\tBrnCalendarMulti,\n] as const;\n\n@NgModule({\n\timports: [...BrnCalendarImports],\n\texports: [...BrnCalendarImports],\n})\nexport class BrnCalendarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;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AAqB;IACrB,yBAAyB;IACzB,eAAe;IACf,kBAAkB;IAClB,WAAW;IACX,eAAe;IACf,gBAAgB;;MAOJ,iBAAiB,CAAA;0HAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAjB,uBAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAhB7B,qBAAqB;YACrB,eAAe;YACf,iBAAiB;YACjB,qBAAqB;YACrB,yBAAyB;YACzB,eAAe;YACf,kBAAkB;YAClB,WAAW;YACX,eAAe;AACf,YAAA,gBAAgB,aAThB,qBAAqB;YACrB,eAAe;YACf,iBAAiB;YACjB,qBAAqB;YACrB,yBAAyB;YACzB,eAAe;YACf,kBAAkB;YAClB,WAAW;YACX,eAAe;YACf,gBAAgB,CAAA,EAAA,CAAA;2HAOJ,iBAAiB,EAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AAChC,iBAAA;;;ACzCD;;AAEG;;;;"}
@@ -7,12 +7,12 @@ import { NG_VALUE_ACCESSOR } from '@angular/forms';
7
7
 
8
8
  const BRN_CHECKBOX_VALUE_ACCESSOR = {
9
9
  provide: NG_VALUE_ACCESSOR,
10
- useExisting: forwardRef(() => BrnCheckboxComponent),
10
+ useExisting: forwardRef(() => BrnCheckbox),
11
11
  multi: true,
12
12
  };
13
13
  let uniqueIdCounter = 0;
14
14
  const CONTAINER_POST_FIX = '-checkbox';
15
- class BrnCheckboxComponent {
15
+ class BrnCheckbox {
16
16
  _destroyRef = inject(DestroyRef);
17
17
  _renderer = inject(Renderer2);
18
18
  _elementRef = inject(ElementRef);
@@ -241,8 +241,8 @@ class BrnCheckboxComponent {
241
241
  this._state().disabled.set(isDisabled);
242
242
  this._cdr.markForCheck();
243
243
  }
244
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
245
- /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.8", type: BrnCheckboxComponent, isStandalone: true, selector: "brn-checkbox", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", changed: "changed", touched: "touched" }, host: { properties: { "style": "{display: \"contents\"}", "attr.id": "_state().id", "attr.name": "_state().name", "attr.aria-labelledby": "null", "attr.aria-label": "null", "attr.aria-describedby": "null", "attr.data-state": "_dataState()", "attr.data-focus-visible": "_focusVisible()", "attr.data-focus": "_focused()", "attr.data-disabled": "_state().disabled()" } }, providers: [BRN_CHECKBOX_VALUE_ACCESSOR], viewQueries: [{ propertyName: "checkbox", first: true, predicate: ["checkBox"], descendants: true, isSignal: true }], ngImport: i0, template: `
244
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Component });
245
+ /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.8", type: BrnCheckbox, isStandalone: true, selector: "brn-checkbox", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", changed: "changed", touched: "touched" }, host: { properties: { "style": "{display: \"contents\"}", "attr.id": "_state().id", "attr.name": "_state().name", "attr.aria-labelledby": "null", "attr.aria-label": "null", "attr.aria-describedby": "null", "attr.data-state": "_dataState()", "attr.data-focus-visible": "_focusVisible()", "attr.data-focus": "_focused()", "attr.data-disabled": "_state().disabled()" } }, providers: [BRN_CHECKBOX_VALUE_ACCESSOR], viewQueries: [{ propertyName: "checkbox", first: true, predicate: ["checkBox"], descendants: true, isSignal: true }], ngImport: i0, template: `
246
246
  <button
247
247
  #checkBox
248
248
  role="checkbox"
@@ -266,7 +266,7 @@ class BrnCheckboxComponent {
266
266
  </button>
267
267
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
268
268
  }
269
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCheckboxComponent, decorators: [{
269
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCheckbox, decorators: [{
270
270
  type: Component,
271
271
  args: [{
272
272
  selector: 'brn-checkbox',
@@ -310,10 +310,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
310
310
  }]
311
311
  }], ctorParameters: () => [] });
312
312
 
313
- const BrnCheckboxImports = [BrnCheckboxComponent];
313
+ const BrnCheckboxImports = [BrnCheckbox];
314
314
  class BrnCheckboxModule {
315
315
  /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCheckboxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
316
- /** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.8", ngImport: i0, type: BrnCheckboxModule, imports: [BrnCheckboxComponent], exports: [BrnCheckboxComponent] });
316
+ /** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.8", ngImport: i0, type: BrnCheckboxModule, imports: [BrnCheckbox], exports: [BrnCheckbox] });
317
317
  /** @nocollapse */ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCheckboxModule });
318
318
  }
319
319
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCheckboxModule, decorators: [{
@@ -328,5 +328,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
328
328
  * Generated bundle index. Do not edit.
329
329
  */
330
330
 
331
- export { BRN_CHECKBOX_VALUE_ACCESSOR, BrnCheckboxComponent, BrnCheckboxImports, BrnCheckboxModule };
331
+ export { BRN_CHECKBOX_VALUE_ACCESSOR, BrnCheckbox, BrnCheckboxImports, BrnCheckboxModule };
332
332
  //# sourceMappingURL=spartan-ng-brain-checkbox.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"spartan-ng-brain-checkbox.mjs","sources":["../../../../libs/brain/checkbox/src/lib/brn-checkbox.component.ts","../../../../libs/brain/checkbox/src/index.ts","../../../../libs/brain/checkbox/src/spartan-ng-brain-checkbox.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n\ttype AfterContentInit,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tDestroyRef,\n\tElementRef,\n\ttype OnDestroy,\n\tPLATFORM_ID,\n\tRenderer2,\n\tbooleanAttribute,\n\tcomputed,\n\teffect,\n\tforwardRef,\n\tinject,\n\tinput,\n\tlinkedSignal,\n\tmodel,\n\toutput,\n\tsignal,\n\tviewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';\n\nexport const BRN_CHECKBOX_VALUE_ACCESSOR = {\n\tprovide: NG_VALUE_ACCESSOR,\n\tuseExisting: forwardRef(() => BrnCheckboxComponent),\n\tmulti: true,\n};\n\nlet uniqueIdCounter = 0;\n\nconst CONTAINER_POST_FIX = '-checkbox';\n\n@Component({\n\tselector: 'brn-checkbox',\n\ttemplate: `\n\t\t<button\n\t\t\t#checkBox\n\t\t\trole=\"checkbox\"\n\t\t\ttype=\"button\"\n\t\t\t[id]=\"getCheckboxButtonId(_state().id) ?? ''\"\n\t\t\t[name]=\"getCheckboxButtonId(_state().name) ?? ''\"\n\t\t\t[class]=\"class()\"\n\t\t\t[attr.aria-checked]=\"_ariaChecked()\"\n\t\t\t[attr.aria-label]=\"ariaLabel() || null\"\n\t\t\t[attr.aria-labelledby]=\"mutableAriaLabelledby() || null\"\n\t\t\t[attr.aria-describedby]=\"ariaDescribedby() || null\"\n\t\t\t[attr.data-state]=\"_dataState()\"\n\t\t\t[attr.data-focus-visible]=\"_focusVisible()\"\n\t\t\t[attr.data-focus]=\"_focused()\"\n\t\t\t[attr.data-disabled]=\"_state().disabled()\"\n\t\t\t[disabled]=\"_state().disabled()\"\n\t\t\t[tabIndex]=\"_state().disabled() ? -1 : 0\"\n\t\t\t(click)=\"$event.preventDefault(); toggle()\"\n\t\t>\n\t\t\t<ng-content />\n\t\t</button>\n\t`,\n\thost: {\n\t\t'[style]': '{display: \"contents\"}',\n\t\t'[attr.id]': '_state().id',\n\t\t'[attr.name]': '_state().name',\n\t\t'[attr.aria-labelledby]': 'null',\n\t\t'[attr.aria-label]': 'null',\n\t\t'[attr.aria-describedby]': 'null',\n\t\t'[attr.data-state]': '_dataState()',\n\t\t'[attr.data-focus-visible]': '_focusVisible()',\n\t\t'[attr.data-focus]': '_focused()',\n\t\t'[attr.data-disabled]': '_state().disabled()',\n\t},\n\tproviders: [BRN_CHECKBOX_VALUE_ACCESSOR],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BrnCheckboxComponent implements ControlValueAccessor, AfterContentInit, OnDestroy {\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate readonly _renderer = inject(Renderer2);\n\tprivate readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\tprivate readonly _focusMonitor = inject(FocusMonitor);\n\tprivate readonly _cdr = inject(ChangeDetectorRef);\n\tprivate readonly _document = inject(DOCUMENT);\n\tprivate readonly _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n\tprotected readonly _focusVisible = signal(false);\n\tprotected readonly _focused = signal(false);\n\n\t/**\n\t * Current checked state of checkbox.\n\t * Can be boolean (true/false) or 'indeterminate'.\n\t * Can be bound with [(checked)] for two-way binding.\n\t */\n\tpublic readonly checked = model<BrnCheckboxValue>(false);\n\n\t/**\n\t * Read-only signal of current checkbox state.\n\t * Use this when you only need to read state without changing it.\n\t */\n\tpublic readonly isChecked = this.checked.asReadonly();\n\n\t/**\n\t * Computed data-state attribute value based on checked state.\n\t * Returns 'checked', 'unchecked', or 'indeterminate'.\n\t */\n\tprotected readonly _dataState = computed(() => {\n\t\tconst checked = this.checked();\n\t\tif (checked === 'indeterminate') return 'indeterminate';\n\t\treturn checked ? 'checked' : 'unchecked';\n\t});\n\n\t/**\n\t * Computed aria-checked attribute value for accessibility.\n\t * Returns 'true', 'false', or 'mixed' (for indeterminate).\n\t */\n\tprotected readonly _ariaChecked = computed(() => {\n\t\tconst checked = this.checked();\n\t\tif (checked === 'indeterminate') return 'mixed';\n\t\treturn checked ? 'true' : 'false';\n\t});\n\n\t/**\n\t * Unique identifier for checkbox component.\n\t * When provided, inner button gets ID without '-checkbox' suffix.\n\t * Auto-generates ID if not provided.\n\t */\n\tpublic readonly id = input<string | null>(uniqueIdCounter++ + '');\n\n\t/**\n\t * Form control name for checkbox.\n\t * When provided, inner button gets name without '-checkbox' suffix.\n\t */\n\tpublic readonly name = input<string | null>(null);\n\n\t/**\n\t * CSS classes applied to inner button element.\n\t */\n\tpublic readonly class = input<string | null>(null);\n\n\t/**\n\t * Accessibility label for screen readers.\n\t * Use when no visible label exists.\n\t */\n\tpublic readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n\t/**\n\t * ID of element that labels this checkbox for accessibility.\n\t * Auto-set when checkbox is inside label element.\n\t */\n\tpublic readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\tpublic readonly mutableAriaLabelledby = linkedSignal(() => this.ariaLabelledby());\n\n\t/**\n\t * ID of element that describes this checkbox for accessibility.\n\t */\n\tpublic readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n\t/**\n\t * Whether checkbox is required in a form.\n\t */\n\tpublic readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Whether checkbox is disabled.\n\t * Disabled checkboxes cannot be toggled and indicate disabled state through data-disabled attribute.\n\t */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Computed state for checkbox container and accessibility.\n\t * Manages ID, name, and disabled state.\n\t */\n\tprotected readonly _state = computed(() => {\n\t\tconst name = this.name();\n\t\tconst id = this.id();\n\t\treturn {\n\t\t\tdisabled: signal(this.disabled()),\n\t\t\tname: name ? name + CONTAINER_POST_FIX : null,\n\t\t\tid: id ? id + CONTAINER_POST_FIX : null,\n\t\t};\n\t});\n\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprotected _onChange: ChangeFn<BrnCheckboxValue> = () => {};\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprivate _onTouched: TouchFn = () => {};\n\n\t/**\n\t * Reference to the checkbox button element in the template.\n\t */\n\tpublic readonly checkbox = viewChild.required<ElementRef<HTMLButtonElement>>('checkBox');\n\n\t/**\n\t * Event emitted when checkbox value changes.\n\t * Emits new checked state (true/false/'indeterminate').\n\t */\n\tpublic readonly changed = output<BrnCheckboxValue>();\n\n\t/**\n\t * Event emitted when checkbox is blurred (loses focus).\n\t * Used for form validation.\n\t */\n\tpublic readonly touched = output<void>();\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst state = this._state();\n\t\t\tconst isDisabled = state.disabled();\n\n\t\t\tif (!this._elementRef.nativeElement || !this._isBrowser) return;\n\n\t\t\tconst newLabelId = state.id + '-label';\n\t\t\tconst checkboxButtonId = this.getCheckboxButtonId(state.id);\n\t\t\tconst labelElement =\n\t\t\t\tthis._elementRef.nativeElement.closest('label') ??\n\t\t\t\tthis._document.querySelector(`label[for=\"${checkboxButtonId}\"]`);\n\n\t\t\tif (!labelElement) return;\n\t\t\tconst existingLabelId = labelElement.id;\n\n\t\t\tthis._renderer.setAttribute(labelElement, 'data-disabled', isDisabled ? 'true' : 'false');\n\t\t\tthis.mutableAriaLabelledby.set(existingLabelId || newLabelId);\n\n\t\t\tif (!existingLabelId || existingLabelId.length === 0) {\n\t\t\t\tthis._renderer.setAttribute(labelElement, 'id', newLabelId);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Toggles checkbox between checked/unchecked states.\n\t * If checkbox is indeterminate, sets to checked.\n\t * Does nothing if checkbox is disabled.\n\t */\n\ttoggle() {\n\t\tif (this._state().disabled()) return;\n\n\t\tthis._onTouched();\n\t\tthis.touched.emit();\n\n\t\tconst previousChecked = this.checked();\n\t\tthis.checked.set(previousChecked === 'indeterminate' ? true : !previousChecked);\n\t\tthis._onChange(this.checked());\n\t\tthis.changed.emit(this.checked());\n\t}\n\n\tngAfterContentInit() {\n\t\tthis._focusMonitor\n\t\t\t.monitor(this._elementRef, true)\n\t\t\t.pipe(takeUntilDestroyed(this._destroyRef))\n\t\t\t.subscribe((focusOrigin) => {\n\t\t\t\tif (focusOrigin) this._focused.set(true);\n\t\t\t\tif (focusOrigin === 'keyboard' || focusOrigin === 'program') {\n\t\t\t\t\tthis._focusVisible.set(true);\n\t\t\t\t\tthis._cdr.markForCheck();\n\t\t\t\t}\n\t\t\t\tif (!focusOrigin) {\n\t\t\t\t\t// When a focused element becomes disabled, the browser *immediately* fires a blur event.\n\t\t\t\t\t// Angular does not expect events to be raised during change detection, so any state\n\t\t\t\t\t// change (such as a form control's ng-touched) will cause a changed-after-checked error.\n\t\t\t\t\t// See https://github.com/angular/angular/issues/17793. To work around this, we defer\n\t\t\t\t\t// telling the form control it has been touched until the next tick.\n\t\t\t\t\tPromise.resolve().then(() => {\n\t\t\t\t\t\tthis._focusVisible.set(false);\n\t\t\t\t\t\tthis._focused.set(false);\n\t\t\t\t\t\tthis._onTouched();\n\t\t\t\t\t\tthis.touched.emit();\n\t\t\t\t\t\tthis._cdr.markForCheck();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis._focusMonitor.stopMonitoring(this._elementRef);\n\t}\n\n\t/**\n\t * Gets proper ID for inner button element.\n\t * Removes '-checkbox' suffix if present in container ID.\n\t *\n\t * @param idPassedToContainer - ID applied to container element\n\t * @returns ID to use for inner button or null\n\t */\n\tprotected getCheckboxButtonId(idPassedToContainer: string | null | undefined): string | null {\n\t\treturn idPassedToContainer ? idPassedToContainer.replace(CONTAINER_POST_FIX, '') : null;\n\t}\n\n\t/**\n\t * Updates internal state when control value changes from outside.\n\t * Handles boolean and 'indeterminate' values.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param value - New checkbox state (true/false/'indeterminate')\n\t */\n\twriteValue(value: BrnCheckboxValue): void {\n\t\tif (value === 'indeterminate') {\n\t\t\tthis.checked.set('indeterminate');\n\t\t} else {\n\t\t\tthis.checked.set(value);\n\t\t}\n\t}\n\n\t/**\n\t * Registers callback for value changes.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param fn - Function to call when value changes\n\t */\n\tregisterOnChange(fn: ChangeFn<BrnCheckboxValue>): void {\n\t\tthis._onChange = fn;\n\t}\n\n\t/**\n\t * Registers callback for touched events.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param fn - Function to call when control is touched\n\t */\n\tregisterOnTouched(fn: TouchFn): void {\n\t\tthis._onTouched = fn;\n\t}\n\n\t/**\n\t * Updates disabled state from form control.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param isDisabled - Whether checkbox should be disabled\n\t */\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis._state().disabled.set(isDisabled);\n\t\tthis._cdr.markForCheck();\n\t}\n}\n\ntype BrnCheckboxValue = boolean | 'indeterminate';\n","import { NgModule } from '@angular/core';\n\nimport { BrnCheckboxComponent } from './lib/brn-checkbox.component';\n\nexport * from './lib/brn-checkbox.component';\n\nexport const BrnCheckboxImports = [BrnCheckboxComponent] as const;\n\n@NgModule({\n\timports: [...BrnCheckboxImports],\n\texports: [...BrnCheckboxImports],\n})\nexport class BrnCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AA6BO,MAAM,2BAA2B,GAAG;AAC1C,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,oBAAoB,CAAC;AACnD,IAAA,KAAK,EAAE,IAAI;;AAGZ,IAAI,eAAe,GAAG,CAAC;AAEvB,MAAM,kBAAkB,GAAG,WAAW;MA0CzB,oBAAoB,CAAA;AACf,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAChC,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,IAAA,WAAW,GAAG,MAAM,CAA0B,UAAU,CAAC;AACzD,IAAA,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC;AACpC,IAAA,IAAI,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAChC,IAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;IAC5B,UAAU,GAAG,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAEjD,IAAA,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC;AAC7B,IAAA,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC;AAE3C;;;;AAIG;AACa,IAAA,OAAO,GAAG,KAAK,CAAmB,KAAK,CAAC;AAExD;;;AAGG;AACa,IAAA,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;AAErD;;;AAGG;AACgB,IAAA,UAAU,GAAG,QAAQ,CAAC,MAAK;AAC7C,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE;QAC9B,IAAI,OAAO,KAAK,eAAe;AAAE,YAAA,OAAO,eAAe;QACvD,OAAO,OAAO,GAAG,SAAS,GAAG,WAAW;AACzC,KAAC,CAAC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CAAA,CAAA;AACD,oBAAA,IAAI,EAAE;AACL,wBAAA,SAAS,EAAE,uBAAuB;AAClC,wBAAA,WAAW,EAAE,aAAa;AAC1B,wBAAA,aAAa,EAAE,eAAe;AAC9B,wBAAA,wBAAwB,EAAE,MAAM;AAChC,wBAAA,mBAAmB,EAAE,MAAM;AAC3B,wBAAA,yBAAyB,EAAE,MAAM;AACjC,wBAAA,mBAAmB,EAAE,cAAc;AACnC,wBAAA,2BAA2B,EAAE,iBAAiB;AAC9C,wBAAA,mBAAmB,EAAE,YAAY;AACjC,wBAAA,sBAAsB,EAAE,qBAAqB;AAC7C,qBAAA;oBACD,SAAS,EAAE,CAAC,2BAA2B,CAAC;oBACxC,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,iBAAA;;;ACxEM,MAAM,kBAAkB,GAAG,CAAC,oBAAoB;MAM1C,iBAAiB,CAAA;0HAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;2HAAjB,iBAAiB,EAAA,OAAA,EAAA,CANK,oBAAoB,CAAA,EAAA,OAAA,EAAA,CAApB,oBAAoB,CAAA,EAAA,CAAA;2HAM1C,iBAAiB,EAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AAChC,iBAAA;;;ACXD;;AAEG;;;;"}
1
+ {"version":3,"file":"spartan-ng-brain-checkbox.mjs","sources":["../../../../libs/brain/checkbox/src/lib/brn-checkbox.ts","../../../../libs/brain/checkbox/src/index.ts","../../../../libs/brain/checkbox/src/spartan-ng-brain-checkbox.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n\ttype AfterContentInit,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tDestroyRef,\n\tElementRef,\n\ttype OnDestroy,\n\tPLATFORM_ID,\n\tRenderer2,\n\tbooleanAttribute,\n\tcomputed,\n\teffect,\n\tforwardRef,\n\tinject,\n\tinput,\n\tlinkedSignal,\n\tmodel,\n\toutput,\n\tsignal,\n\tviewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';\n\nexport const BRN_CHECKBOX_VALUE_ACCESSOR = {\n\tprovide: NG_VALUE_ACCESSOR,\n\tuseExisting: forwardRef(() => BrnCheckbox),\n\tmulti: true,\n};\n\nlet uniqueIdCounter = 0;\n\nconst CONTAINER_POST_FIX = '-checkbox';\n\n@Component({\n\tselector: 'brn-checkbox',\n\ttemplate: `\n\t\t<button\n\t\t\t#checkBox\n\t\t\trole=\"checkbox\"\n\t\t\ttype=\"button\"\n\t\t\t[id]=\"getCheckboxButtonId(_state().id) ?? ''\"\n\t\t\t[name]=\"getCheckboxButtonId(_state().name) ?? ''\"\n\t\t\t[class]=\"class()\"\n\t\t\t[attr.aria-checked]=\"_ariaChecked()\"\n\t\t\t[attr.aria-label]=\"ariaLabel() || null\"\n\t\t\t[attr.aria-labelledby]=\"mutableAriaLabelledby() || null\"\n\t\t\t[attr.aria-describedby]=\"ariaDescribedby() || null\"\n\t\t\t[attr.data-state]=\"_dataState()\"\n\t\t\t[attr.data-focus-visible]=\"_focusVisible()\"\n\t\t\t[attr.data-focus]=\"_focused()\"\n\t\t\t[attr.data-disabled]=\"_state().disabled()\"\n\t\t\t[disabled]=\"_state().disabled()\"\n\t\t\t[tabIndex]=\"_state().disabled() ? -1 : 0\"\n\t\t\t(click)=\"$event.preventDefault(); toggle()\"\n\t\t>\n\t\t\t<ng-content />\n\t\t</button>\n\t`,\n\thost: {\n\t\t'[style]': '{display: \"contents\"}',\n\t\t'[attr.id]': '_state().id',\n\t\t'[attr.name]': '_state().name',\n\t\t'[attr.aria-labelledby]': 'null',\n\t\t'[attr.aria-label]': 'null',\n\t\t'[attr.aria-describedby]': 'null',\n\t\t'[attr.data-state]': '_dataState()',\n\t\t'[attr.data-focus-visible]': '_focusVisible()',\n\t\t'[attr.data-focus]': '_focused()',\n\t\t'[attr.data-disabled]': '_state().disabled()',\n\t},\n\tproviders: [BRN_CHECKBOX_VALUE_ACCESSOR],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BrnCheckbox implements ControlValueAccessor, AfterContentInit, OnDestroy {\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate readonly _renderer = inject(Renderer2);\n\tprivate readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\tprivate readonly _focusMonitor = inject(FocusMonitor);\n\tprivate readonly _cdr = inject(ChangeDetectorRef);\n\tprivate readonly _document = inject(DOCUMENT);\n\tprivate readonly _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n\tprotected readonly _focusVisible = signal(false);\n\tprotected readonly _focused = signal(false);\n\n\t/**\n\t * Current checked state of checkbox.\n\t * Can be boolean (true/false) or 'indeterminate'.\n\t * Can be bound with [(checked)] for two-way binding.\n\t */\n\tpublic readonly checked = model<BrnCheckboxValue>(false);\n\n\t/**\n\t * Read-only signal of current checkbox state.\n\t * Use this when you only need to read state without changing it.\n\t */\n\tpublic readonly isChecked = this.checked.asReadonly();\n\n\t/**\n\t * Computed data-state attribute value based on checked state.\n\t * Returns 'checked', 'unchecked', or 'indeterminate'.\n\t */\n\tprotected readonly _dataState = computed(() => {\n\t\tconst checked = this.checked();\n\t\tif (checked === 'indeterminate') return 'indeterminate';\n\t\treturn checked ? 'checked' : 'unchecked';\n\t});\n\n\t/**\n\t * Computed aria-checked attribute value for accessibility.\n\t * Returns 'true', 'false', or 'mixed' (for indeterminate).\n\t */\n\tprotected readonly _ariaChecked = computed(() => {\n\t\tconst checked = this.checked();\n\t\tif (checked === 'indeterminate') return 'mixed';\n\t\treturn checked ? 'true' : 'false';\n\t});\n\n\t/**\n\t * Unique identifier for checkbox component.\n\t * When provided, inner button gets ID without '-checkbox' suffix.\n\t * Auto-generates ID if not provided.\n\t */\n\tpublic readonly id = input<string | null>(uniqueIdCounter++ + '');\n\n\t/**\n\t * Form control name for checkbox.\n\t * When provided, inner button gets name without '-checkbox' suffix.\n\t */\n\tpublic readonly name = input<string | null>(null);\n\n\t/**\n\t * CSS classes applied to inner button element.\n\t */\n\tpublic readonly class = input<string | null>(null);\n\n\t/**\n\t * Accessibility label for screen readers.\n\t * Use when no visible label exists.\n\t */\n\tpublic readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n\t/**\n\t * ID of element that labels this checkbox for accessibility.\n\t * Auto-set when checkbox is inside label element.\n\t */\n\tpublic readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\tpublic readonly mutableAriaLabelledby = linkedSignal(() => this.ariaLabelledby());\n\n\t/**\n\t * ID of element that describes this checkbox for accessibility.\n\t */\n\tpublic readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n\t/**\n\t * Whether checkbox is required in a form.\n\t */\n\tpublic readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Whether checkbox is disabled.\n\t * Disabled checkboxes cannot be toggled and indicate disabled state through data-disabled attribute.\n\t */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Computed state for checkbox container and accessibility.\n\t * Manages ID, name, and disabled state.\n\t */\n\tprotected readonly _state = computed(() => {\n\t\tconst name = this.name();\n\t\tconst id = this.id();\n\t\treturn {\n\t\t\tdisabled: signal(this.disabled()),\n\t\t\tname: name ? name + CONTAINER_POST_FIX : null,\n\t\t\tid: id ? id + CONTAINER_POST_FIX : null,\n\t\t};\n\t});\n\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprotected _onChange: ChangeFn<BrnCheckboxValue> = () => {};\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprivate _onTouched: TouchFn = () => {};\n\n\t/**\n\t * Reference to the checkbox button element in the template.\n\t */\n\tpublic readonly checkbox = viewChild.required<ElementRef<HTMLButtonElement>>('checkBox');\n\n\t/**\n\t * Event emitted when checkbox value changes.\n\t * Emits new checked state (true/false/'indeterminate').\n\t */\n\tpublic readonly changed = output<BrnCheckboxValue>();\n\n\t/**\n\t * Event emitted when checkbox is blurred (loses focus).\n\t * Used for form validation.\n\t */\n\tpublic readonly touched = output<void>();\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst state = this._state();\n\t\t\tconst isDisabled = state.disabled();\n\n\t\t\tif (!this._elementRef.nativeElement || !this._isBrowser) return;\n\n\t\t\tconst newLabelId = state.id + '-label';\n\t\t\tconst checkboxButtonId = this.getCheckboxButtonId(state.id);\n\t\t\tconst labelElement =\n\t\t\t\tthis._elementRef.nativeElement.closest('label') ??\n\t\t\t\tthis._document.querySelector(`label[for=\"${checkboxButtonId}\"]`);\n\n\t\t\tif (!labelElement) return;\n\t\t\tconst existingLabelId = labelElement.id;\n\n\t\t\tthis._renderer.setAttribute(labelElement, 'data-disabled', isDisabled ? 'true' : 'false');\n\t\t\tthis.mutableAriaLabelledby.set(existingLabelId || newLabelId);\n\n\t\t\tif (!existingLabelId || existingLabelId.length === 0) {\n\t\t\t\tthis._renderer.setAttribute(labelElement, 'id', newLabelId);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Toggles checkbox between checked/unchecked states.\n\t * If checkbox is indeterminate, sets to checked.\n\t * Does nothing if checkbox is disabled.\n\t */\n\ttoggle() {\n\t\tif (this._state().disabled()) return;\n\n\t\tthis._onTouched();\n\t\tthis.touched.emit();\n\n\t\tconst previousChecked = this.checked();\n\t\tthis.checked.set(previousChecked === 'indeterminate' ? true : !previousChecked);\n\t\tthis._onChange(this.checked());\n\t\tthis.changed.emit(this.checked());\n\t}\n\n\tngAfterContentInit() {\n\t\tthis._focusMonitor\n\t\t\t.monitor(this._elementRef, true)\n\t\t\t.pipe(takeUntilDestroyed(this._destroyRef))\n\t\t\t.subscribe((focusOrigin) => {\n\t\t\t\tif (focusOrigin) this._focused.set(true);\n\t\t\t\tif (focusOrigin === 'keyboard' || focusOrigin === 'program') {\n\t\t\t\t\tthis._focusVisible.set(true);\n\t\t\t\t\tthis._cdr.markForCheck();\n\t\t\t\t}\n\t\t\t\tif (!focusOrigin) {\n\t\t\t\t\t// When a focused element becomes disabled, the browser *immediately* fires a blur event.\n\t\t\t\t\t// Angular does not expect events to be raised during change detection, so any state\n\t\t\t\t\t// change (such as a form control's ng-touched) will cause a changed-after-checked error.\n\t\t\t\t\t// See https://github.com/angular/angular/issues/17793. To work around this, we defer\n\t\t\t\t\t// telling the form control it has been touched until the next tick.\n\t\t\t\t\tPromise.resolve().then(() => {\n\t\t\t\t\t\tthis._focusVisible.set(false);\n\t\t\t\t\t\tthis._focused.set(false);\n\t\t\t\t\t\tthis._onTouched();\n\t\t\t\t\t\tthis.touched.emit();\n\t\t\t\t\t\tthis._cdr.markForCheck();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis._focusMonitor.stopMonitoring(this._elementRef);\n\t}\n\n\t/**\n\t * Gets proper ID for inner button element.\n\t * Removes '-checkbox' suffix if present in container ID.\n\t *\n\t * @param idPassedToContainer - ID applied to container element\n\t * @returns ID to use for inner button or null\n\t */\n\tprotected getCheckboxButtonId(idPassedToContainer: string | null | undefined): string | null {\n\t\treturn idPassedToContainer ? idPassedToContainer.replace(CONTAINER_POST_FIX, '') : null;\n\t}\n\n\t/**\n\t * Updates internal state when control value changes from outside.\n\t * Handles boolean and 'indeterminate' values.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param value - New checkbox state (true/false/'indeterminate')\n\t */\n\twriteValue(value: BrnCheckboxValue): void {\n\t\tif (value === 'indeterminate') {\n\t\t\tthis.checked.set('indeterminate');\n\t\t} else {\n\t\t\tthis.checked.set(value);\n\t\t}\n\t}\n\n\t/**\n\t * Registers callback for value changes.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param fn - Function to call when value changes\n\t */\n\tregisterOnChange(fn: ChangeFn<BrnCheckboxValue>): void {\n\t\tthis._onChange = fn;\n\t}\n\n\t/**\n\t * Registers callback for touched events.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param fn - Function to call when control is touched\n\t */\n\tregisterOnTouched(fn: TouchFn): void {\n\t\tthis._onTouched = fn;\n\t}\n\n\t/**\n\t * Updates disabled state from form control.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param isDisabled - Whether checkbox should be disabled\n\t */\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis._state().disabled.set(isDisabled);\n\t\tthis._cdr.markForCheck();\n\t}\n}\n\ntype BrnCheckboxValue = boolean | 'indeterminate';\n","import { NgModule } from '@angular/core';\n\nimport { BrnCheckbox } from './lib/brn-checkbox';\n\nexport * from './lib/brn-checkbox';\n\nexport const BrnCheckboxImports = [BrnCheckbox] as const;\n\n@NgModule({\n\timports: [...BrnCheckboxImports],\n\texports: [...BrnCheckboxImports],\n})\nexport class BrnCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AA6BO,MAAM,2BAA2B,GAAG;AAC1C,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,WAAW,CAAC;AAC1C,IAAA,KAAK,EAAE,IAAI;;AAGZ,IAAI,eAAe,GAAG,CAAC;AAEvB,MAAM,kBAAkB,GAAG,WAAW;MA0CzB,WAAW,CAAA;AACN,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAChC,IAAA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/C,iBAAA;;;ACxEM,MAAM,kBAAkB,GAAG,CAAC,WAAW;MAMjC,iBAAiB,CAAA;0HAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;2HAAjB,iBAAiB,EAAA,OAAA,EAAA,CANK,WAAW,CAAA,EAAA,OAAA,EAAA,CAAX,WAAW,CAAA,EAAA,CAAA;2HAMjC,iBAAiB,EAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AAChC,oBAAA,OAAO,EAAE,CAAC,GAAG,kBAAkB,CAAC;AAChC,iBAAA;;;ACXD;;AAEG;;;;"}
@@ -3,7 +3,7 @@ import { signal, model, input, booleanAttribute, ChangeDetectionStrategy, Compon
3
3
  import { isPlatformServer } from '@angular/common';
4
4
 
5
5
  let collapsibleContentIdSequence = 0;
6
- class BrnCollapsibleComponent {
6
+ class BrnCollapsible {
7
7
  contentId = signal(`brn-collapsible-content-${collapsibleContentIdSequence++}`);
8
8
  /**
9
9
  * The expanded or collapsed state of the collapsible component.
@@ -19,12 +19,12 @@ class BrnCollapsibleComponent {
19
19
  toggle() {
20
20
  this.expanded.update((expanded) => !expanded);
21
21
  }
22
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCollapsibleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
23
- /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: BrnCollapsibleComponent, isStandalone: true, selector: "brn-collapsible", inputs: { expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, host: { properties: { "attr.data-state": "expanded() ? \"open\" : \"closed\"", "attr.disabled": "disabled() ? true : undefined" } }, ngImport: i0, template: `
22
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCollapsible, deps: [], target: i0.ɵɵFactoryTarget.Component });
23
+ /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: BrnCollapsible, isStandalone: true, selector: "brn-collapsible", inputs: { expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expanded: "expandedChange" }, host: { properties: { "attr.data-state": "expanded() ? \"open\" : \"closed\"", "attr.disabled": "disabled() ? true : undefined" } }, ngImport: i0, template: `
24
24
  <ng-content />
25
25
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
26
26
  }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCollapsibleComponent, decorators: [{
27
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCollapsible, decorators: [{
28
28
  type: Component,
29
29
  args: [{
30
30
  selector: 'brn-collapsible',
@@ -39,8 +39,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
39
39
  }]
40
40
  }] });
41
41
 
42
- class BrnCollapsibleContentComponent {
43
- _collapsible = inject(BrnCollapsibleComponent, { optional: true });
42
+ class BrnCollapsibleContent {
43
+ _collapsible = inject(BrnCollapsible, { optional: true });
44
44
  _elementRef = inject(ElementRef);
45
45
  _platformId = inject(PLATFORM_ID);
46
46
  /**
@@ -74,12 +74,12 @@ class BrnCollapsibleContentComponent {
74
74
  // this is handled by the host binding, but it can cause a flicker if we don't do this here manually
75
75
  this._elementRef.nativeElement.hidden = this._collapsible?.expanded() ?? false;
76
76
  }
77
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCollapsibleContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
78
- /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: BrnCollapsibleContentComponent, isStandalone: true, selector: "brn-collapsible-content", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "hidden": "!_collapsible?.expanded()", "attr.data-state": "_collapsible?.expanded() ? \"open\" : \"closed\"", "id": "_collapsible?.contentId()", "style.--brn-collapsible-content-width.px": "_width()", "style.--brn-collapsible-content-height.px": "_height()" } }, ngImport: i0, template: `
77
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCollapsibleContent, deps: [], target: i0.ɵɵFactoryTarget.Component });
78
+ /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: BrnCollapsibleContent, isStandalone: true, selector: "brn-collapsible-content", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "hidden": "!_collapsible?.expanded()", "attr.data-state": "_collapsible?.expanded() ? \"open\" : \"closed\"", "id": "_collapsible?.contentId()", "style.--brn-collapsible-content-width.px": "_width()", "style.--brn-collapsible-content-height.px": "_height()" } }, ngImport: i0, template: `
79
79
  <ng-content />
80
80
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
81
81
  }
82
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCollapsibleContentComponent, decorators: [{
82
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCollapsibleContent, decorators: [{
83
83
  type: Component,
84
84
  args: [{
85
85
  selector: 'brn-collapsible-content',
@@ -97,8 +97,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
97
97
  }]
98
98
  }], ctorParameters: () => [] });
99
99
 
100
- class BrnCollapsibleTriggerDirective {
101
- _collapsible = inject(BrnCollapsibleComponent, { optional: true });
100
+ class BrnCollapsibleTrigger {
101
+ _collapsible = inject(BrnCollapsible, { optional: true });
102
102
  constructor() {
103
103
  if (!this._collapsible) {
104
104
  throw Error('Collapsible trigger directive can only be used inside a brn-collapsible element.');
@@ -107,10 +107,10 @@ class BrnCollapsibleTriggerDirective {
107
107
  toggle() {
108
108
  this._collapsible?.toggle();
109
109
  }
110
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCollapsibleTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
111
- /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: BrnCollapsibleTriggerDirective, isStandalone: true, selector: "button[brnCollapsibleTrigger]", host: { listeners: { "click": "toggle()" }, properties: { "attr.data-state": "_collapsible?.expanded() ? \"open\" : \"closed\"", "attr.disabled": "_collapsible?.disabled() ? true : undefined", "attr.aria-expanded": "_collapsible?.expanded()", "attr.aria-controls": "_collapsible?.contentId()" } }, ngImport: i0 });
110
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCollapsibleTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
111
+ /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: BrnCollapsibleTrigger, isStandalone: true, selector: "button[brnCollapsibleTrigger]", host: { listeners: { "click": "toggle()" }, properties: { "attr.data-state": "_collapsible?.expanded() ? \"open\" : \"closed\"", "attr.disabled": "_collapsible?.disabled() ? true : undefined", "attr.aria-expanded": "_collapsible?.expanded()", "attr.aria-controls": "_collapsible?.contentId()" } }, ngImport: i0 });
112
112
  }
113
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCollapsibleTriggerDirective, decorators: [{
113
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCollapsibleTrigger, decorators: [{
114
114
  type: Directive,
115
115
  args: [{
116
116
  selector: 'button[brnCollapsibleTrigger]',
@@ -124,18 +124,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
124
124
  }]
125
125
  }], ctorParameters: () => [] });
126
126
 
127
- const BrnCollapsibleImports = [
128
- BrnCollapsibleComponent,
129
- BrnCollapsibleTriggerDirective,
130
- BrnCollapsibleContentComponent,
131
- ];
127
+ const BrnCollapsibleImports = [BrnCollapsible, BrnCollapsibleTrigger, BrnCollapsibleContent];
132
128
  class BrnCollapsibleModule {
133
129
  /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCollapsibleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
134
- /** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.8", ngImport: i0, type: BrnCollapsibleModule, imports: [BrnCollapsibleComponent,
135
- BrnCollapsibleTriggerDirective,
136
- BrnCollapsibleContentComponent], exports: [BrnCollapsibleComponent,
137
- BrnCollapsibleTriggerDirective,
138
- BrnCollapsibleContentComponent] });
130
+ /** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.8", ngImport: i0, type: BrnCollapsibleModule, imports: [BrnCollapsible, BrnCollapsibleTrigger, BrnCollapsibleContent], exports: [BrnCollapsible, BrnCollapsibleTrigger, BrnCollapsibleContent] });
139
131
  /** @nocollapse */ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCollapsibleModule });
140
132
  }
141
133
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCollapsibleModule, decorators: [{
@@ -150,5 +142,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
150
142
  * Generated bundle index. Do not edit.
151
143
  */
152
144
 
153
- export { BrnCollapsibleComponent, BrnCollapsibleContentComponent, BrnCollapsibleImports, BrnCollapsibleModule, BrnCollapsibleTriggerDirective };
145
+ export { BrnCollapsible, BrnCollapsibleContent, BrnCollapsibleImports, BrnCollapsibleModule, BrnCollapsibleTrigger };
154
146
  //# sourceMappingURL=spartan-ng-brain-collapsible.mjs.map