@ngstarter-ui/components 22.3.5 → 22.4.1

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 (476) hide show
  1. package/README.md +27 -0
  2. package/ai/component-registry.json +186 -101
  3. package/fesm2022/attachment-block-BK9QxVjq.mjs +163 -0
  4. package/fesm2022/attachment-block-BK9QxVjq.mjs.map +1 -0
  5. package/fesm2022/callout-block-Bl4GZYz8.mjs +196 -0
  6. package/fesm2022/callout-block-Bl4GZYz8.mjs.map +1 -0
  7. package/fesm2022/code-block.component-DCRD-9iP.mjs +393 -0
  8. package/fesm2022/code-block.component-DCRD-9iP.mjs.map +1 -0
  9. package/fesm2022/content-builder.store-D622mHxt.mjs +328 -0
  10. package/fesm2022/content-builder.store-D622mHxt.mjs.map +1 -0
  11. package/fesm2022/content-editor-content-editable.directive-WzD9_71s.mjs +1110 -0
  12. package/fesm2022/content-editor-content-editable.directive-WzD9_71s.mjs.map +1 -0
  13. package/fesm2022/cursor-controller-DKfBII1n.mjs +55 -0
  14. package/fesm2022/cursor-controller-DKfBII1n.mjs.map +1 -0
  15. package/fesm2022/default-converters-9oSKDsXP.mjs +140 -0
  16. package/fesm2022/default-converters-9oSKDsXP.mjs.map +1 -0
  17. package/fesm2022/divider-block.component-Dvgeq_D0.mjs +148 -0
  18. package/fesm2022/divider-block.component-Dvgeq_D0.mjs.map +1 -0
  19. package/fesm2022/embed-block-CYkOv4Wt.mjs +565 -0
  20. package/fesm2022/embed-block-CYkOv4Wt.mjs.map +1 -0
  21. package/fesm2022/extra-block-defs-Cn_hfM3c.mjs +122 -0
  22. package/fesm2022/extra-block-defs-Cn_hfM3c.mjs.map +1 -0
  23. package/fesm2022/gallery-block-DT3uIURY.mjs +365 -0
  24. package/fesm2022/gallery-block-DT3uIURY.mjs.map +1 -0
  25. package/fesm2022/grid-block-ZVDT3m8-.mjs +504 -0
  26. package/fesm2022/grid-block-ZVDT3m8-.mjs.map +1 -0
  27. package/fesm2022/heading-block.component-iCpJGTMh.mjs +274 -0
  28. package/fesm2022/heading-block.component-iCpJGTMh.mjs.map +1 -0
  29. package/fesm2022/html-utils-DywL8gGa.mjs +24 -0
  30. package/fesm2022/html-utils-DywL8gGa.mjs.map +1 -0
  31. package/fesm2022/image-block.component-DJ7-HCR8.mjs +285 -0
  32. package/fesm2022/image-block.component-DJ7-HCR8.mjs.map +1 -0
  33. package/fesm2022/list-block.component-qFIebEBO.mjs +312 -0
  34. package/fesm2022/list-block.component-qFIebEBO.mjs.map +1 -0
  35. package/fesm2022/nested-blocks-CXhgXJ1H.mjs +345 -0
  36. package/fesm2022/nested-blocks-CXhgXJ1H.mjs.map +1 -0
  37. package/fesm2022/ngstarter-ui-components-action-required.mjs +150 -45
  38. package/fesm2022/ngstarter-ui-components-action-required.mjs.map +1 -1
  39. package/fesm2022/ngstarter-ui-components-alert.mjs +318 -133
  40. package/fesm2022/ngstarter-ui-components-alert.mjs.map +1 -1
  41. package/fesm2022/ngstarter-ui-components-announcement.mjs +280 -88
  42. package/fesm2022/ngstarter-ui-components-announcement.mjs.map +1 -1
  43. package/fesm2022/ngstarter-ui-components-autocomplete.mjs +647 -386
  44. package/fesm2022/ngstarter-ui-components-autocomplete.mjs.map +1 -1
  45. package/fesm2022/ngstarter-ui-components-avatar.mjs +715 -482
  46. package/fesm2022/ngstarter-ui-components-avatar.mjs.map +1 -1
  47. package/fesm2022/ngstarter-ui-components-badge.mjs +308 -97
  48. package/fesm2022/ngstarter-ui-components-badge.mjs.map +1 -1
  49. package/fesm2022/ngstarter-ui-components-block-loader.mjs +164 -47
  50. package/fesm2022/ngstarter-ui-components-block-loader.mjs.map +1 -1
  51. package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs +278 -315
  52. package/fesm2022/ngstarter-ui-components-bottom-sheet.mjs.map +1 -1
  53. package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs +707 -205
  54. package/fesm2022/ngstarter-ui-components-breadcrumbs.mjs.map +1 -1
  55. package/fesm2022/ngstarter-ui-components-button-toggle.mjs +518 -175
  56. package/fesm2022/ngstarter-ui-components-button-toggle.mjs.map +1 -1
  57. package/fesm2022/ngstarter-ui-components-button.mjs +294 -68
  58. package/fesm2022/ngstarter-ui-components-button.mjs.map +1 -1
  59. package/fesm2022/ngstarter-ui-components-calendar.mjs +442 -250
  60. package/fesm2022/ngstarter-ui-components-calendar.mjs.map +1 -1
  61. package/fesm2022/ngstarter-ui-components-card-overlay.mjs +159 -47
  62. package/fesm2022/ngstarter-ui-components-card-overlay.mjs.map +1 -1
  63. package/fesm2022/ngstarter-ui-components-card.mjs +619 -194
  64. package/fesm2022/ngstarter-ui-components-card.mjs.map +1 -1
  65. package/fesm2022/ngstarter-ui-components-carousel.mjs +1012 -634
  66. package/fesm2022/ngstarter-ui-components-carousel.mjs.map +1 -1
  67. package/fesm2022/ngstarter-ui-components-checkbox.mjs +715 -308
  68. package/fesm2022/ngstarter-ui-components-checkbox.mjs.map +1 -1
  69. package/fesm2022/ngstarter-ui-components-chips.mjs +1397 -667
  70. package/fesm2022/ngstarter-ui-components-chips.mjs.map +1 -1
  71. package/fesm2022/ngstarter-ui-components-code-highlighter.mjs +519 -357
  72. package/fesm2022/ngstarter-ui-components-code-highlighter.mjs.map +1 -1
  73. package/fesm2022/ngstarter-ui-components-color-picker.mjs +1218 -604
  74. package/fesm2022/ngstarter-ui-components-color-picker.mjs.map +1 -1
  75. package/fesm2022/ngstarter-ui-components-color-scheme.mjs +265 -134
  76. package/fesm2022/ngstarter-ui-components-color-scheme.mjs.map +1 -1
  77. package/fesm2022/ngstarter-ui-components-color-switcher.mjs +190 -71
  78. package/fesm2022/ngstarter-ui-components-color-switcher.mjs.map +1 -1
  79. package/fesm2022/ngstarter-ui-components-command-bar.mjs +197 -58
  80. package/fesm2022/ngstarter-ui-components-command-bar.mjs.map +1 -1
  81. package/fesm2022/ngstarter-ui-components-comment-editor.mjs +2212 -1128
  82. package/fesm2022/ngstarter-ui-components-comment-editor.mjs.map +1 -1
  83. package/fesm2022/ngstarter-ui-components-comparison-slider.mjs +269 -183
  84. package/fesm2022/ngstarter-ui-components-comparison-slider.mjs.map +1 -1
  85. package/fesm2022/ngstarter-ui-components-confirm.mjs +164 -86
  86. package/fesm2022/ngstarter-ui-components-confirm.mjs.map +1 -1
  87. package/fesm2022/ngstarter-ui-components-content-editor.mjs +6240 -2
  88. package/fesm2022/ngstarter-ui-components-content-editor.mjs.map +1 -1
  89. package/fesm2022/ngstarter-ui-components-cookie-popup.mjs +244 -108
  90. package/fesm2022/ngstarter-ui-components-cookie-popup.mjs.map +1 -1
  91. package/fesm2022/ngstarter-ui-components-core.mjs +2110 -1592
  92. package/fesm2022/ngstarter-ui-components-core.mjs.map +1 -1
  93. package/fesm2022/ngstarter-ui-components-country-select.mjs +1970 -588
  94. package/fesm2022/ngstarter-ui-components-country-select.mjs.map +1 -1
  95. package/fesm2022/ngstarter-ui-components-crop.mjs +249 -191
  96. package/fesm2022/ngstarter-ui-components-crop.mjs.map +1 -1
  97. package/fesm2022/ngstarter-ui-components-currency-select.mjs +1658 -452
  98. package/fesm2022/ngstarter-ui-components-currency-select.mjs.map +1 -1
  99. package/fesm2022/ngstarter-ui-components-data-view.mjs +4538 -2497
  100. package/fesm2022/ngstarter-ui-components-data-view.mjs.map +1 -1
  101. package/fesm2022/ngstarter-ui-components-date-format-select.mjs +357 -157
  102. package/fesm2022/ngstarter-ui-components-date-format-select.mjs.map +1 -1
  103. package/fesm2022/ngstarter-ui-components-datepicker.mjs +2587 -1264
  104. package/fesm2022/ngstarter-ui-components-datepicker.mjs.map +1 -1
  105. package/fesm2022/ngstarter-ui-components-dialog.mjs +681 -385
  106. package/fesm2022/ngstarter-ui-components-dialog.mjs.map +1 -1
  107. package/fesm2022/ngstarter-ui-components-digit-roller.mjs +1000 -750
  108. package/fesm2022/ngstarter-ui-components-digit-roller.mjs.map +1 -1
  109. package/fesm2022/ngstarter-ui-components-divider.mjs +164 -41
  110. package/fesm2022/ngstarter-ui-components-divider.mjs.map +1 -1
  111. package/fesm2022/ngstarter-ui-components-drawer.mjs +218 -143
  112. package/fesm2022/ngstarter-ui-components-drawer.mjs.map +1 -1
  113. package/fesm2022/ngstarter-ui-components-emoji-picker.mjs +345 -247
  114. package/fesm2022/ngstarter-ui-components-emoji-picker.mjs.map +1 -1
  115. package/fesm2022/ngstarter-ui-components-empty-state.mjs +244 -74
  116. package/fesm2022/ngstarter-ui-components-empty-state.mjs.map +1 -1
  117. package/fesm2022/ngstarter-ui-components-events.mjs +467 -126
  118. package/fesm2022/ngstarter-ui-components-events.mjs.map +1 -1
  119. package/fesm2022/ngstarter-ui-components-expand.mjs +191 -59
  120. package/fesm2022/ngstarter-ui-components-expand.mjs.map +1 -1
  121. package/fesm2022/ngstarter-ui-components-expansion.mjs +529 -193
  122. package/fesm2022/ngstarter-ui-components-expansion.mjs.map +1 -1
  123. package/fesm2022/ngstarter-ui-components-file-type.mjs +270 -171
  124. package/fesm2022/ngstarter-ui-components-file-type.mjs.map +1 -1
  125. package/fesm2022/ngstarter-ui-components-filter-builder.mjs +741 -352
  126. package/fesm2022/ngstarter-ui-components-filter-builder.mjs.map +1 -1
  127. package/fesm2022/ngstarter-ui-components-form-builder.mjs +9032 -6964
  128. package/fesm2022/ngstarter-ui-components-form-builder.mjs.map +1 -1
  129. package/fesm2022/ngstarter-ui-components-form-field.mjs +741 -276
  130. package/fesm2022/ngstarter-ui-components-form-field.mjs.map +1 -1
  131. package/fesm2022/ngstarter-ui-components-gauge.mjs +155 -43
  132. package/fesm2022/ngstarter-ui-components-gauge.mjs.map +1 -1
  133. package/fesm2022/ngstarter-ui-components-grid.mjs +197 -81
  134. package/fesm2022/ngstarter-ui-components-grid.mjs.map +1 -1
  135. package/fesm2022/ngstarter-ui-components-guided-tour.mjs +881 -740
  136. package/fesm2022/ngstarter-ui-components-guided-tour.mjs.map +1 -1
  137. package/fesm2022/ngstarter-ui-components-headless-editor.mjs +3573 -3656
  138. package/fesm2022/ngstarter-ui-components-headless-editor.mjs.map +1 -1
  139. package/fesm2022/ngstarter-ui-components-headless-stepper.mjs +277 -204
  140. package/fesm2022/ngstarter-ui-components-headless-stepper.mjs.map +1 -1
  141. package/fesm2022/ngstarter-ui-components-icon.mjs +209 -182
  142. package/fesm2022/ngstarter-ui-components-icon.mjs.map +1 -1
  143. package/fesm2022/ngstarter-ui-components-image-designer.mjs +5096 -4066
  144. package/fesm2022/ngstarter-ui-components-image-designer.mjs.map +1 -1
  145. package/fesm2022/ngstarter-ui-components-image-placeholder.mjs +45 -19
  146. package/fesm2022/ngstarter-ui-components-image-placeholder.mjs.map +1 -1
  147. package/fesm2022/ngstarter-ui-components-image-resizer.mjs +333 -154
  148. package/fesm2022/ngstarter-ui-components-image-resizer.mjs.map +1 -1
  149. package/fesm2022/ngstarter-ui-components-image-viewer.mjs +564 -358
  150. package/fesm2022/ngstarter-ui-components-image-viewer.mjs.map +1 -1
  151. package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs +246 -167
  152. package/fesm2022/ngstarter-ui-components-image-zoom-viewer.mjs.map +1 -1
  153. package/fesm2022/ngstarter-ui-components-incidents.mjs +732 -258
  154. package/fesm2022/ngstarter-ui-components-incidents.mjs.map +1 -1
  155. package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs +244 -182
  156. package/fesm2022/ngstarter-ui-components-inline-text-edit.mjs.map +1 -1
  157. package/fesm2022/ngstarter-ui-components-input-mask.mjs +314 -174
  158. package/fesm2022/ngstarter-ui-components-input-mask.mjs.map +1 -1
  159. package/fesm2022/ngstarter-ui-components-input-validator.mjs +45 -69
  160. package/fesm2022/ngstarter-ui-components-input-validator.mjs.map +1 -1
  161. package/fesm2022/ngstarter-ui-components-input.mjs +303 -161
  162. package/fesm2022/ngstarter-ui-components-input.mjs.map +1 -1
  163. package/fesm2022/ngstarter-ui-components-kanban-board.mjs +504 -159
  164. package/fesm2022/ngstarter-ui-components-kanban-board.mjs.map +1 -1
  165. package/fesm2022/ngstarter-ui-components-kbd.mjs +86 -30
  166. package/fesm2022/ngstarter-ui-components-kbd.mjs.map +1 -1
  167. package/fesm2022/ngstarter-ui-components-layout.mjs +681 -220
  168. package/fesm2022/ngstarter-ui-components-layout.mjs.map +1 -1
  169. package/fesm2022/ngstarter-ui-components-list.mjs +968 -281
  170. package/fesm2022/ngstarter-ui-components-list.mjs.map +1 -1
  171. package/fesm2022/ngstarter-ui-components-logo.mjs +181 -51
  172. package/fesm2022/ngstarter-ui-components-logo.mjs.map +1 -1
  173. package/fesm2022/ngstarter-ui-components-marquee.mjs +226 -147
  174. package/fesm2022/ngstarter-ui-components-marquee.mjs.map +1 -1
  175. package/fesm2022/ngstarter-ui-components-menu.mjs +1686 -1091
  176. package/fesm2022/ngstarter-ui-components-menu.mjs.map +1 -1
  177. package/fesm2022/ngstarter-ui-components-micro-chart.mjs +1541 -943
  178. package/fesm2022/ngstarter-ui-components-micro-chart.mjs.map +1 -1
  179. package/fesm2022/ngstarter-ui-components-navigation.mjs +1035 -455
  180. package/fesm2022/ngstarter-ui-components-navigation.mjs.map +1 -1
  181. package/fesm2022/ngstarter-ui-components-notifications.mjs +678 -230
  182. package/fesm2022/ngstarter-ui-components-notifications.mjs.map +1 -1
  183. package/fesm2022/ngstarter-ui-components-number-input.mjs +616 -316
  184. package/fesm2022/ngstarter-ui-components-number-input.mjs.map +1 -1
  185. package/fesm2022/ngstarter-ui-components-option.mjs +405 -163
  186. package/fesm2022/ngstarter-ui-components-option.mjs.map +1 -1
  187. package/fesm2022/ngstarter-ui-components-overlay.mjs +107 -111
  188. package/fesm2022/ngstarter-ui-components-overlay.mjs.map +1 -1
  189. package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs +131 -76
  190. package/fesm2022/ngstarter-ui-components-page-loading-bar.mjs.map +1 -1
  191. package/fesm2022/ngstarter-ui-components-paginator.mjs +543 -295
  192. package/fesm2022/ngstarter-ui-components-paginator.mjs.map +1 -1
  193. package/fesm2022/ngstarter-ui-components-password-strength.mjs +785 -340
  194. package/fesm2022/ngstarter-ui-components-password-strength.mjs.map +1 -1
  195. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs +3705 -2695
  196. package/fesm2022/ngstarter-ui-components-pdf-builder.mjs.map +1 -1
  197. package/fesm2022/ngstarter-ui-components-pdf-signer.mjs +1179 -851
  198. package/fesm2022/ngstarter-ui-components-pdf-signer.mjs.map +1 -1
  199. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs +2973 -2070
  200. package/fesm2022/ngstarter-ui-components-pdf-viewer.mjs.map +1 -1
  201. package/fesm2022/ngstarter-ui-components-phone-input.mjs +2081 -770
  202. package/fesm2022/ngstarter-ui-components-phone-input.mjs.map +1 -1
  203. package/fesm2022/ngstarter-ui-components-pin-input.mjs +366 -198
  204. package/fesm2022/ngstarter-ui-components-pin-input.mjs.map +1 -1
  205. package/fesm2022/ngstarter-ui-components-popover.mjs +558 -308
  206. package/fesm2022/ngstarter-ui-components-popover.mjs.map +1 -1
  207. package/fesm2022/ngstarter-ui-components-progress-bar.mjs +178 -73
  208. package/fesm2022/ngstarter-ui-components-progress-bar.mjs.map +1 -1
  209. package/fesm2022/ngstarter-ui-components-radio-card.mjs +301 -105
  210. package/fesm2022/ngstarter-ui-components-radio-card.mjs.map +1 -1
  211. package/fesm2022/ngstarter-ui-components-radio.mjs +417 -157
  212. package/fesm2022/ngstarter-ui-components-radio.mjs.map +1 -1
  213. package/fesm2022/ngstarter-ui-components-rail-nav.mjs +208 -88
  214. package/fesm2022/ngstarter-ui-components-rail-nav.mjs.map +1 -1
  215. package/fesm2022/ngstarter-ui-components-resizable-container.mjs +123 -74
  216. package/fesm2022/ngstarter-ui-components-resizable-container.mjs.map +1 -1
  217. package/fesm2022/ngstarter-ui-components-screen-loader.mjs +197 -95
  218. package/fesm2022/ngstarter-ui-components-screen-loader.mjs.map +1 -1
  219. package/fesm2022/ngstarter-ui-components-scroll-spy.mjs +383 -245
  220. package/fesm2022/ngstarter-ui-components-scroll-spy.mjs.map +1 -1
  221. package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs +705 -581
  222. package/fesm2022/ngstarter-ui-components-scrollbar-area.mjs.map +1 -1
  223. package/fesm2022/ngstarter-ui-components-segmented.mjs +422 -220
  224. package/fesm2022/ngstarter-ui-components-segmented.mjs.map +1 -1
  225. package/fesm2022/ngstarter-ui-components-select.mjs +1862 -1159
  226. package/fesm2022/ngstarter-ui-components-select.mjs.map +1 -1
  227. package/fesm2022/ngstarter-ui-components-side-panel.mjs +313 -118
  228. package/fesm2022/ngstarter-ui-components-side-panel.mjs.map +1 -1
  229. package/fesm2022/ngstarter-ui-components-sidebar.mjs +1239 -470
  230. package/fesm2022/ngstarter-ui-components-sidebar.mjs.map +1 -1
  231. package/fesm2022/ngstarter-ui-components-sidenav.mjs +664 -354
  232. package/fesm2022/ngstarter-ui-components-sidenav.mjs.map +1 -1
  233. package/fesm2022/ngstarter-ui-components-signature-pad.mjs +1092 -643
  234. package/fesm2022/ngstarter-ui-components-signature-pad.mjs.map +1 -1
  235. package/fesm2022/ngstarter-ui-components-skeleton.mjs +153 -43
  236. package/fesm2022/ngstarter-ui-components-skeleton.mjs.map +1 -1
  237. package/fesm2022/ngstarter-ui-components-slide-toggle.mjs +425 -108
  238. package/fesm2022/ngstarter-ui-components-slide-toggle.mjs.map +1 -1
  239. package/fesm2022/ngstarter-ui-components-slider.mjs +645 -487
  240. package/fesm2022/ngstarter-ui-components-slider.mjs.map +1 -1
  241. package/fesm2022/ngstarter-ui-components-snack-bar.mjs +372 -354
  242. package/fesm2022/ngstarter-ui-components-snack-bar.mjs.map +1 -1
  243. package/fesm2022/ngstarter-ui-components-sort.mjs +378 -147
  244. package/fesm2022/ngstarter-ui-components-sort.mjs.map +1 -1
  245. package/fesm2022/ngstarter-ui-components-spinner.mjs +242 -76
  246. package/fesm2022/ngstarter-ui-components-spinner.mjs.map +1 -1
  247. package/fesm2022/ngstarter-ui-components-splash-screen.mjs +142 -91
  248. package/fesm2022/ngstarter-ui-components-splash-screen.mjs.map +1 -1
  249. package/fesm2022/ngstarter-ui-components-split.mjs +1067 -929
  250. package/fesm2022/ngstarter-ui-components-split.mjs.map +1 -1
  251. package/fesm2022/ngstarter-ui-components-step-tracker.mjs +617 -331
  252. package/fesm2022/ngstarter-ui-components-step-tracker.mjs.map +1 -1
  253. package/fesm2022/ngstarter-ui-components-stepper.mjs +357 -126
  254. package/fesm2022/ngstarter-ui-components-stepper.mjs.map +1 -1
  255. package/fesm2022/ngstarter-ui-components-suggestions.mjs +259 -72
  256. package/fesm2022/ngstarter-ui-components-suggestions.mjs.map +1 -1
  257. package/fesm2022/ngstarter-ui-components-tab-panel.mjs +674 -267
  258. package/fesm2022/ngstarter-ui-components-tab-panel.mjs.map +1 -1
  259. package/fesm2022/ngstarter-ui-components-table.mjs +1144 -662
  260. package/fesm2022/ngstarter-ui-components-table.mjs.map +1 -1
  261. package/fesm2022/ngstarter-ui-components-tabs.mjs +1236 -615
  262. package/fesm2022/ngstarter-ui-components-tabs.mjs.map +1 -1
  263. package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs +414 -216
  264. package/fesm2022/ngstarter-ui-components-thumbnail-maker.mjs.map +1 -1
  265. package/fesm2022/ngstarter-ui-components-tiles.mjs +939 -647
  266. package/fesm2022/ngstarter-ui-components-tiles.mjs.map +1 -1
  267. package/fesm2022/ngstarter-ui-components-timeline.mjs +418 -122
  268. package/fesm2022/ngstarter-ui-components-timeline.mjs.map +1 -1
  269. package/fesm2022/ngstarter-ui-components-timepicker.mjs +870 -508
  270. package/fesm2022/ngstarter-ui-components-timepicker.mjs.map +1 -1
  271. package/fesm2022/ngstarter-ui-components-timezone-select.mjs +651 -371
  272. package/fesm2022/ngstarter-ui-components-timezone-select.mjs.map +1 -1
  273. package/fesm2022/ngstarter-ui-components-toolbar.mjs +727 -320
  274. package/fesm2022/ngstarter-ui-components-toolbar.mjs.map +1 -1
  275. package/fesm2022/ngstarter-ui-components-tooltip.mjs +601 -521
  276. package/fesm2022/ngstarter-ui-components-tooltip.mjs.map +1 -1
  277. package/fesm2022/ngstarter-ui-components-tree-select.mjs +1197 -434
  278. package/fesm2022/ngstarter-ui-components-tree-select.mjs.map +1 -1
  279. package/fesm2022/ngstarter-ui-components-tree.mjs +1821 -1262
  280. package/fesm2022/ngstarter-ui-components-tree.mjs.map +1 -1
  281. package/fesm2022/ngstarter-ui-components-upload.mjs +1059 -345
  282. package/fesm2022/ngstarter-ui-components-upload.mjs.map +1 -1
  283. package/fesm2022/ngstarter-ui-components-video-player.mjs +763 -533
  284. package/fesm2022/ngstarter-ui-components-video-player.mjs.map +1 -1
  285. package/fesm2022/ngstarter-ui-components-video-viewer.mjs +630 -229
  286. package/fesm2022/ngstarter-ui-components-video-viewer.mjs.map +1 -1
  287. package/fesm2022/ngstarter-ui-components-visual-builder.mjs +40 -17
  288. package/fesm2022/ngstarter-ui-components-visual-builder.mjs.map +1 -1
  289. package/fesm2022/ngstarter-ui-components-whiteboard.mjs +3039 -1803
  290. package/fesm2022/ngstarter-ui-components-whiteboard.mjs.map +1 -1
  291. package/fesm2022/ngstarter-ui-components.mjs +3 -5
  292. package/fesm2022/ngstarter-ui-components.mjs.map +1 -1
  293. package/fesm2022/paragraph-block.component-Csk8Gu3x.mjs +264 -0
  294. package/fesm2022/paragraph-block.component-Csk8Gu3x.mjs.map +1 -0
  295. package/fesm2022/plain-text-settings-BnxCxLhA.mjs +354 -0
  296. package/fesm2022/plain-text-settings-BnxCxLhA.mjs.map +1 -0
  297. package/fesm2022/quote-block.component-tRmrU97F.mjs +309 -0
  298. package/fesm2022/quote-block.component-tRmrU97F.mjs.map +1 -0
  299. package/fesm2022/table-block.component-BuzRRggv.mjs +1859 -0
  300. package/fesm2022/table-block.component-BuzRRggv.mjs.map +1 -0
  301. package/fesm2022/toggle-block-C5Jo2YDf.mjs +150 -0
  302. package/fesm2022/toggle-block-C5Jo2YDf.mjs.map +1 -0
  303. package/fesm2022/upload-status-tZ0x0BUB.mjs +107 -0
  304. package/fesm2022/upload-status-tZ0x0BUB.mjs.map +1 -0
  305. package/fesm2022/video-block.component-CpAXibm6.mjs +312 -0
  306. package/fesm2022/video-block.component-CpAXibm6.mjs.map +1 -0
  307. package/package.json +11 -10
  308. package/styles/_tokens.scss +1 -0
  309. package/types/ngstarter-ui-components-action-required.d.ts +34 -14
  310. package/types/ngstarter-ui-components-alert.d.ts +53 -44
  311. package/types/ngstarter-ui-components-announcement.d.ts +74 -53
  312. package/types/ngstarter-ui-components-autocomplete.d.ts +141 -84
  313. package/types/ngstarter-ui-components-avatar.d.ts +113 -66
  314. package/types/ngstarter-ui-components-badge.d.ts +73 -37
  315. package/types/ngstarter-ui-components-block-loader.d.ts +32 -20
  316. package/types/ngstarter-ui-components-bottom-sheet.d.ts +125 -132
  317. package/types/ngstarter-ui-components-breadcrumbs.d.ts +93 -88
  318. package/types/ngstarter-ui-components-button-toggle.d.ts +124 -54
  319. package/types/ngstarter-ui-components-button.d.ts +69 -27
  320. package/types/ngstarter-ui-components-calendar.d.ts +123 -71
  321. package/types/ngstarter-ui-components-card-overlay.d.ts +31 -19
  322. package/types/ngstarter-ui-components-card.d.ts +75 -71
  323. package/types/ngstarter-ui-components-carousel.d.ts +115 -69
  324. package/types/ngstarter-ui-components-checkbox.d.ts +183 -86
  325. package/types/ngstarter-ui-components-chips.d.ts +288 -195
  326. package/types/ngstarter-ui-components-code-highlighter.d.ts +71 -28
  327. package/types/ngstarter-ui-components-color-picker.d.ts +140 -89
  328. package/types/ngstarter-ui-components-color-scheme.d.ts +43 -52
  329. package/types/ngstarter-ui-components-color-switcher.d.ts +46 -26
  330. package/types/ngstarter-ui-components-command-bar.d.ts +40 -26
  331. package/types/ngstarter-ui-components-comment-editor.d.ts +311 -235
  332. package/types/ngstarter-ui-components-comparison-slider.d.ts +41 -40
  333. package/types/ngstarter-ui-components-confirm.d.ts +24 -29
  334. package/types/ngstarter-ui-components-content-editor.d.ts +1482 -998
  335. package/types/ngstarter-ui-components-cookie-popup.d.ts +43 -38
  336. package/types/ngstarter-ui-components-core.d.ts +513 -467
  337. package/types/ngstarter-ui-components-country-select.d.ts +170 -97
  338. package/types/ngstarter-ui-components-crop.d.ts +67 -52
  339. package/types/ngstarter-ui-components-currency-select.d.ts +127 -90
  340. package/types/ngstarter-ui-components-data-view.d.ts +811 -567
  341. package/types/ngstarter-ui-components-date-format-select.d.ts +90 -58
  342. package/types/ngstarter-ui-components-datepicker.d.ts +589 -373
  343. package/types/ngstarter-ui-components-dialog.d.ts +138 -116
  344. package/types/ngstarter-ui-components-digit-roller.d.ts +228 -131
  345. package/types/ngstarter-ui-components-divider.d.ts +29 -17
  346. package/types/ngstarter-ui-components-drawer.d.ts +39 -30
  347. package/types/ngstarter-ui-components-emoji-picker.d.ts +69 -47
  348. package/types/ngstarter-ui-components-empty-state.d.ts +20 -28
  349. package/types/ngstarter-ui-components-events.d.ts +73 -57
  350. package/types/ngstarter-ui-components-expand.d.ts +55 -25
  351. package/types/ngstarter-ui-components-expansion.d.ts +93 -64
  352. package/types/ngstarter-ui-components-file-type.d.ts +53 -27
  353. package/types/ngstarter-ui-components-filter-builder.d.ts +131 -100
  354. package/types/ngstarter-ui-components-form-builder.d.ts +1094 -881
  355. package/types/ngstarter-ui-components-form-field.d.ts +116 -105
  356. package/types/ngstarter-ui-components-gauge.d.ts +32 -20
  357. package/types/ngstarter-ui-components-grid.d.ts +66 -50
  358. package/types/ngstarter-ui-components-guided-tour.d.ts +250 -222
  359. package/types/ngstarter-ui-components-headless-editor.d.ts +708 -658
  360. package/types/ngstarter-ui-components-headless-stepper.d.ts +84 -64
  361. package/types/ngstarter-ui-components-icon.d.ts +39 -38
  362. package/types/ngstarter-ui-components-image-designer.d.ts +422 -341
  363. package/types/ngstarter-ui-components-image-placeholder.d.ts +5 -8
  364. package/types/ngstarter-ui-components-image-resizer.d.ts +40 -33
  365. package/types/ngstarter-ui-components-image-viewer.d.ts +67 -54
  366. package/types/ngstarter-ui-components-image-zoom-viewer.d.ts +29 -33
  367. package/types/ngstarter-ui-components-incidents.d.ts +97 -104
  368. package/types/ngstarter-ui-components-inline-text-edit.d.ts +54 -39
  369. package/types/ngstarter-ui-components-input-mask.d.ts +54 -34
  370. package/types/ngstarter-ui-components-input-validator.d.ts +7 -11
  371. package/types/ngstarter-ui-components-input.d.ts +82 -54
  372. package/types/ngstarter-ui-components-kanban-board.d.ts +76 -63
  373. package/types/ngstarter-ui-components-kbd.d.ts +8 -12
  374. package/types/ngstarter-ui-components-layout.d.ts +131 -87
  375. package/types/ngstarter-ui-components-list.d.ts +123 -88
  376. package/types/ngstarter-ui-components-logo.d.ts +21 -21
  377. package/types/ngstarter-ui-components-marquee.d.ts +41 -34
  378. package/types/ngstarter-ui-components-menu.d.ts +329 -221
  379. package/types/ngstarter-ui-components-micro-chart.d.ts +385 -186
  380. package/types/ngstarter-ui-components-navigation.d.ts +186 -125
  381. package/types/ngstarter-ui-components-notifications.d.ts +104 -89
  382. package/types/ngstarter-ui-components-number-input.d.ts +138 -96
  383. package/types/ngstarter-ui-components-option.d.ts +102 -68
  384. package/types/ngstarter-ui-components-overlay.d.ts +7 -12
  385. package/types/ngstarter-ui-components-page-loading-bar.d.ts +23 -20
  386. package/types/ngstarter-ui-components-paginator.d.ts +171 -129
  387. package/types/ngstarter-ui-components-password-strength.d.ts +217 -102
  388. package/types/ngstarter-ui-components-pdf-builder.d.ts +717 -649
  389. package/types/ngstarter-ui-components-pdf-signer.d.ts +202 -142
  390. package/types/ngstarter-ui-components-pdf-viewer.d.ts +544 -385
  391. package/types/ngstarter-ui-components-phone-input.d.ts +175 -115
  392. package/types/ngstarter-ui-components-pin-input.d.ts +83 -45
  393. package/types/ngstarter-ui-components-popover.d.ts +128 -89
  394. package/types/ngstarter-ui-components-progress-bar.d.ts +49 -30
  395. package/types/ngstarter-ui-components-radio-card.d.ts +50 -34
  396. package/types/ngstarter-ui-components-radio.d.ts +100 -47
  397. package/types/ngstarter-ui-components-rail-nav.d.ts +36 -29
  398. package/types/ngstarter-ui-components-resizable-container.d.ts +30 -25
  399. package/types/ngstarter-ui-components-screen-loader.d.ts +38 -32
  400. package/types/ngstarter-ui-components-scroll-spy.d.ts +56 -60
  401. package/types/ngstarter-ui-components-scrollbar-area.d.ts +116 -86
  402. package/types/ngstarter-ui-components-segmented.d.ts +93 -61
  403. package/types/ngstarter-ui-components-select.d.ts +366 -266
  404. package/types/ngstarter-ui-components-side-panel.d.ts +59 -40
  405. package/types/ngstarter-ui-components-sidebar.d.ts +208 -154
  406. package/types/ngstarter-ui-components-sidenav.d.ts +136 -78
  407. package/types/ngstarter-ui-components-signature-pad.d.ts +165 -92
  408. package/types/ngstarter-ui-components-skeleton.d.ts +18 -17
  409. package/types/ngstarter-ui-components-slide-toggle.d.ts +113 -44
  410. package/types/ngstarter-ui-components-slider.d.ts +123 -82
  411. package/types/ngstarter-ui-components-snack-bar.d.ts +126 -134
  412. package/types/ngstarter-ui-components-sort.d.ts +99 -63
  413. package/types/ngstarter-ui-components-spinner.d.ts +49 -27
  414. package/types/ngstarter-ui-components-splash-screen.d.ts +34 -29
  415. package/types/ngstarter-ui-components-split.d.ts +276 -195
  416. package/types/ngstarter-ui-components-step-tracker.d.ts +102 -83
  417. package/types/ngstarter-ui-components-stepper.d.ts +57 -43
  418. package/types/ngstarter-ui-components-suggestions.d.ts +41 -28
  419. package/types/ngstarter-ui-components-tab-panel.d.ts +110 -83
  420. package/types/ngstarter-ui-components-table.d.ts +256 -228
  421. package/types/ngstarter-ui-components-tabs.d.ts +231 -138
  422. package/types/ngstarter-ui-components-thumbnail-maker.d.ts +40 -34
  423. package/types/ngstarter-ui-components-tiles.d.ts +166 -104
  424. package/types/ngstarter-ui-components-timeline.d.ts +45 -57
  425. package/types/ngstarter-ui-components-timepicker.d.ts +166 -111
  426. package/types/ngstarter-ui-components-timezone-select.d.ts +110 -70
  427. package/types/ngstarter-ui-components-toolbar.d.ts +89 -72
  428. package/types/ngstarter-ui-components-tooltip.d.ts +89 -52
  429. package/types/ngstarter-ui-components-tree-select.d.ts +182 -105
  430. package/types/ngstarter-ui-components-tree.d.ts +355 -229
  431. package/types/ngstarter-ui-components-upload.d.ts +216 -131
  432. package/types/ngstarter-ui-components-video-player.d.ts +130 -67
  433. package/types/ngstarter-ui-components-video-viewer.d.ts +140 -91
  434. package/types/ngstarter-ui-components-visual-builder.d.ts +5 -8
  435. package/types/ngstarter-ui-components-whiteboard.d.ts +412 -339
  436. package/types/ngstarter-ui-components.d.ts +2 -2
  437. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-8OmuepvH.mjs +0 -35
  438. package/fesm2022/ngstarter-ui-components-content-editor-attachment-block-8OmuepvH.mjs.map +0 -1
  439. package/fesm2022/ngstarter-ui-components-content-editor-callout-block-Dp5tISk3.mjs +0 -26
  440. package/fesm2022/ngstarter-ui-components-content-editor-callout-block-Dp5tISk3.mjs.map +0 -1
  441. package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-BbBs-R_y.mjs +0 -220
  442. package/fesm2022/ngstarter-ui-components-content-editor-code-block.component-BbBs-R_y.mjs.map +0 -1
  443. package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs +0 -99
  444. package/fesm2022/ngstarter-ui-components-content-editor-cursor-controller-4Ak8VqGX.mjs.map +0 -1
  445. package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-D1nXMRXD.mjs +0 -40
  446. package/fesm2022/ngstarter-ui-components-content-editor-divider-block.component-D1nXMRXD.mjs.map +0 -1
  447. package/fesm2022/ngstarter-ui-components-content-editor-embed-block-DGCCeU-Y.mjs +0 -375
  448. package/fesm2022/ngstarter-ui-components-content-editor-embed-block-DGCCeU-Y.mjs.map +0 -1
  449. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-BJfRgtaA.mjs +0 -80
  450. package/fesm2022/ngstarter-ui-components-content-editor-gallery-block-BJfRgtaA.mjs.map +0 -1
  451. package/fesm2022/ngstarter-ui-components-content-editor-grid-block-C_L7hF2G.mjs +0 -65
  452. package/fesm2022/ngstarter-ui-components-content-editor-grid-block-C_L7hF2G.mjs.map +0 -1
  453. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-durrPUhm.mjs +0 -137
  454. package/fesm2022/ngstarter-ui-components-content-editor-heading-block.component-durrPUhm.mjs.map +0 -1
  455. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-BoL1jZpT.mjs +0 -113
  456. package/fesm2022/ngstarter-ui-components-content-editor-image-block.component-BoL1jZpT.mjs.map +0 -1
  457. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-ChZpgXO5.mjs +0 -235
  458. package/fesm2022/ngstarter-ui-components-content-editor-list-block.component-ChZpgXO5.mjs.map +0 -1
  459. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-DwyNFnII.mjs +0 -117
  460. package/fesm2022/ngstarter-ui-components-content-editor-nested-blocks-DwyNFnII.mjs.map +0 -1
  461. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-BWpJv6CO.mjs +0 -4464
  462. package/fesm2022/ngstarter-ui-components-content-editor-ngstarter-ui-components-content-editor-BWpJv6CO.mjs.map +0 -1
  463. package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-BvNvkqTO.mjs +0 -132
  464. package/fesm2022/ngstarter-ui-components-content-editor-paragraph-block.component-BvNvkqTO.mjs.map +0 -1
  465. package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-tgNKltfK.mjs +0 -171
  466. package/fesm2022/ngstarter-ui-components-content-editor-quote-block.component-tgNKltfK.mjs.map +0 -1
  467. package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-BcAlqmh8.mjs +0 -1653
  468. package/fesm2022/ngstarter-ui-components-content-editor-table-block.component-BcAlqmh8.mjs.map +0 -1
  469. package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-S474I51r.mjs +0 -20
  470. package/fesm2022/ngstarter-ui-components-content-editor-toggle-block-S474I51r.mjs.map +0 -1
  471. package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs +0 -19
  472. package/fesm2022/ngstarter-ui-components-content-editor-upload-status-QnKI_Rfz.mjs.map +0 -1
  473. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-Dj82fxTI.mjs +0 -134
  474. package/fesm2022/ngstarter-ui-components-content-editor-video-block.component-Dj82fxTI.mjs.map +0 -1
  475. package/fesm2022/ngstarter-ui-components-form-builder-plain-text-settings-GNXKGonc.mjs +0 -159
  476. package/fesm2022/ngstarter-ui-components-form-builder-plain-text-settings-GNXKGonc.mjs.map +0 -1
@@ -1,251 +1,443 @@
1
- import * as i0 from '@angular/core';
2
- import { input, numberAttribute, booleanAttribute, output, signal, computed, effect, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { Button } from '@ngstarter-ui/components/button';
4
- import { Icon } from '@ngstarter-ui/components/icon';
5
-
6
- class Calendar {
7
- startAt = input(null, /* @ts-ignore */
8
- ...(ngDevMode ? [{ debugName: "startAt" }] : /* istanbul ignore next */ []));
9
- selected = input(null, /* @ts-ignore */
10
- ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
11
- minDate = input(null, /* @ts-ignore */
12
- ...(ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []));
13
- maxDate = input(null, /* @ts-ignore */
14
- ...(ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []));
15
- events = input([], /* @ts-ignore */
16
- ...(ngDevMode ? [{ debugName: "events" }] : /* istanbul ignore next */ []));
17
- locale = input(undefined, /* @ts-ignore */
18
- ...(ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []));
19
- firstDayOfWeek = input(0, { ...(ngDevMode ? { debugName: "firstDayOfWeek" } : /* istanbul ignore next */ {}), transform: numberAttribute });
20
- showAdjacentDays = input(true, { ...(ngDevMode ? { debugName: "showAdjacentDays" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
21
- showTodayButton = input(true, { ...(ngDevMode ? { debugName: "showTodayButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
22
- showEventTitles = input(false, { ...(ngDevMode ? { debugName: "showEventTitles" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
23
- selectedChange = output();
24
- monthChange = output();
25
- eventSelected = output();
26
- activeMonth = signal(this.getInitialActiveMonth(), /* @ts-ignore */
27
- ...(ngDevMode ? [{ debugName: "activeMonth" }] : /* istanbul ignore next */ []));
28
- selectedDate = signal(this.normalizeDateInput(this.selected()), /* @ts-ignore */
29
- ...(ngDevMode ? [{ debugName: "selectedDate" }] : /* istanbul ignore next */ []));
30
- normalizedMinDate = computed(() => this.normalizeDateInput(this.minDate()), /* @ts-ignore */
31
- ...(ngDevMode ? [{ debugName: "normalizedMinDate" }] : /* istanbul ignore next */ []));
32
- normalizedMaxDate = computed(() => this.normalizeDateInput(this.maxDate()), /* @ts-ignore */
33
- ...(ngDevMode ? [{ debugName: "normalizedMaxDate" }] : /* istanbul ignore next */ []));
34
- periodLabel = computed(() => new Intl.DateTimeFormat(this.locale(), {
35
- month: 'long',
36
- year: 'numeric',
37
- }).format(this.activeMonth()), /* @ts-ignore */
38
- ...(ngDevMode ? [{ debugName: "periodLabel" }] : /* istanbul ignore next */ []));
39
- weekdayLabels = computed(() => {
40
- const formatter = new Intl.DateTimeFormat(this.locale(), { weekday: 'short' });
41
- const labels = [];
42
- const weekStart = this.normalizedFirstDayOfWeek();
43
- for (let index = 0; index < 7; index++) {
44
- const date = new Date(2024, 0, 7 + weekStart + index);
45
- labels.push(formatter.format(date));
46
- }
47
- return labels;
48
- }, /* @ts-ignore */
49
- ...(ngDevMode ? [{ debugName: "weekdayLabels" }] : /* istanbul ignore next */ []));
50
- calendarCells = computed(() => {
51
- const activeMonth = this.activeMonth();
52
- const selectedDate = this.selectedDate();
53
- const minDate = this.normalizedMinDate();
54
- const maxDate = this.normalizedMaxDate();
55
- const showAdjacentDays = this.showAdjacentDays();
56
- const monthStart = this.startOfMonth(activeMonth);
57
- const weekStart = this.normalizedFirstDayOfWeek();
58
- const firstDayOffset = (monthStart.getDay() - weekStart + 7) % 7;
59
- const gridStart = this.addDays(monthStart, -firstDayOffset);
60
- const today = this.startOfDay(new Date());
61
- const eventMap = this.eventsByDate();
62
- const cells = [];
63
- for (let index = 0; index < 42; index++) {
64
- const date = this.addDays(gridStart, index);
65
- const inCurrentMonth = this.sameMonth(date, activeMonth);
66
- const events = eventMap.get(this.dateKey(date)) ?? [];
67
- const visible = inCurrentMonth || showAdjacentDays;
68
- cells.push({
69
- date,
70
- key: this.dateKey(date),
71
- label: visible ? String(date.getDate()) : '',
72
- ariaLabel: this.formatFullDate(date),
73
- inCurrentMonth,
74
- visible,
75
- today: this.sameDate(date, today),
76
- selected: !!selectedDate && this.sameDate(date, selectedDate),
77
- disabled: this.isDisabled(date, minDate, maxDate) || !visible,
78
- events,
79
- markers: this.uniqueEventColors(events),
80
- });
81
- }
82
- return cells;
83
- }, /* @ts-ignore */
84
- ...(ngDevMode ? [{ debugName: "calendarCells" }] : /* istanbul ignore next */ []));
85
- constructor() {
86
- effect(() => {
87
- const selected = this.normalizeDateInput(this.selected());
88
- this.selectedDate.set(selected);
89
- if (selected) {
90
- this.activeMonth.set(this.startOfMonth(selected));
91
- }
92
- });
93
- effect(() => {
94
- const startAt = this.normalizeDateInput(this.startAt());
95
- if (startAt) {
96
- this.activeMonth.set(this.startOfMonth(startAt));
97
- }
98
- });
99
- }
100
- previousMonth() {
101
- this.setActiveMonth(this.addMonths(this.activeMonth(), -1));
102
- }
103
- nextMonth() {
104
- this.setActiveMonth(this.addMonths(this.activeMonth(), 1));
105
- }
106
- selectToday() {
107
- const today = this.startOfDay(new Date());
108
- this.setActiveMonth(today);
109
- if (!this.isDisabled(today, this.normalizedMinDate(), this.normalizedMaxDate())) {
110
- this.selectDate(today);
111
- }
112
- }
113
- selectCell(cell) {
114
- if (cell.disabled) {
115
- return;
116
- }
117
- if (!cell.inCurrentMonth) {
118
- this.setActiveMonth(cell.date);
119
- }
120
- this.selectDate(cell.date);
121
- }
122
- selectEvent(event, domEvent) {
123
- domEvent.stopPropagation();
124
- this.eventSelected.emit(event);
125
- }
126
- markerClass(color) {
127
- return `ngs-calendar-event-${color}`;
128
- }
129
- selectDate(date) {
130
- const value = this.startOfDay(date);
131
- this.selectedDate.set(value);
132
- this.selectedChange.emit(this.cloneDate(value));
133
- }
134
- setActiveMonth(date) {
135
- const month = this.startOfMonth(date);
136
- this.activeMonth.set(month);
137
- this.monthChange.emit(this.cloneDate(month));
138
- }
139
- getInitialActiveMonth() {
140
- return this.startOfMonth(this.normalizeDateInput(this.selected()) ??
141
- this.normalizeDateInput(this.startAt()) ??
142
- new Date());
143
- }
144
- eventsByDate() {
145
- const map = new Map();
146
- for (const event of this.events()) {
147
- const date = this.normalizeDateInput(event.date);
148
- if (!date) {
149
- continue;
150
- }
151
- const key = this.dateKey(date);
152
- const events = map.get(key) ?? [];
153
- events.push(event);
154
- map.set(key, events);
155
- }
156
- return map;
157
- }
158
- uniqueEventColors(events) {
159
- const colors = new Set();
160
- for (const event of events) {
161
- colors.add(event.color ?? 'primary');
162
- }
163
- return [...colors].slice(0, 3);
164
- }
165
- normalizedFirstDayOfWeek() {
166
- const value = this.firstDayOfWeek();
167
- if (!Number.isFinite(value)) {
168
- return 0;
169
- }
170
- return ((Math.trunc(value) % 7) + 7) % 7;
171
- }
172
- normalizeDateInput(value) {
173
- if (value === null || value === undefined || value === '') {
174
- return null;
175
- }
176
- if (value instanceof Date) {
177
- return Number.isNaN(value.getTime()) ? null : this.startOfDay(value);
178
- }
179
- if (typeof value === 'string') {
180
- const dateOnly = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value);
181
- if (dateOnly) {
182
- const year = Number(dateOnly[1]);
183
- const month = Number(dateOnly[2]) - 1;
184
- const day = Number(dateOnly[3]);
185
- const date = new Date(year, month, day);
186
- return Number.isNaN(date.getTime()) ? null : this.startOfDay(date);
187
- }
188
- }
189
- const date = new Date(value);
190
- return Number.isNaN(date.getTime()) ? null : this.startOfDay(date);
191
- }
192
- isDisabled(date, minDate, maxDate) {
193
- return ((!!minDate && this.compareDate(date, minDate) < 0) ||
194
- (!!maxDate && this.compareDate(date, maxDate) > 0));
195
- }
196
- formatFullDate(date) {
197
- return new Intl.DateTimeFormat(this.locale(), {
198
- weekday: 'long',
199
- month: 'long',
200
- day: 'numeric',
201
- year: 'numeric',
202
- }).format(date);
203
- }
204
- addMonths(date, months) {
205
- return new Date(date.getFullYear(), date.getMonth() + months, 1);
206
- }
207
- addDays(date, days) {
208
- return new Date(date.getFullYear(), date.getMonth(), date.getDate() + days);
209
- }
210
- startOfMonth(date) {
211
- return new Date(date.getFullYear(), date.getMonth(), 1);
212
- }
213
- startOfDay(date) {
214
- return new Date(date.getFullYear(), date.getMonth(), date.getDate());
215
- }
216
- cloneDate(date) {
217
- return new Date(date.getTime());
218
- }
219
- sameMonth(first, second) {
220
- return first.getFullYear() === second.getFullYear() && first.getMonth() === second.getMonth();
221
- }
222
- sameDate(first, second) {
223
- return this.compareDate(first, second) === 0;
224
- }
225
- compareDate(first, second) {
226
- return (first.getFullYear() - second.getFullYear() ||
227
- first.getMonth() - second.getMonth() ||
228
- first.getDate() - second.getDate());
229
- }
230
- dateKey(date) {
231
- const year = date.getFullYear();
232
- const month = String(date.getMonth() + 1).padStart(2, '0');
233
- const day = String(date.getDate()).padStart(2, '0');
234
- return `${year}-${month}-${day}`;
235
- }
236
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: Calendar, deps: [], target: i0.ɵɵFactoryTarget.Component });
237
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: Calendar, isStandalone: true, selector: "ngs-calendar", inputs: { startAt: { classPropertyName: "startAt", publicName: "startAt", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, events: { classPropertyName: "events", publicName: "events", isSignal: true, isRequired: false, transformFunction: null }, locale: { classPropertyName: "locale", publicName: "locale", isSignal: true, isRequired: false, transformFunction: null }, firstDayOfWeek: { classPropertyName: "firstDayOfWeek", publicName: "firstDayOfWeek", isSignal: true, isRequired: false, transformFunction: null }, showAdjacentDays: { classPropertyName: "showAdjacentDays", publicName: "showAdjacentDays", isSignal: true, isRequired: false, transformFunction: null }, showTodayButton: { classPropertyName: "showTodayButton", publicName: "showTodayButton", isSignal: true, isRequired: false, transformFunction: null }, showEventTitles: { classPropertyName: "showEventTitles", publicName: "showEventTitles", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedChange: "selectedChange", monthChange: "monthChange", eventSelected: "eventSelected" }, host: { classAttribute: "ngs-calendar" }, exportAs: ["ngsCalendar"], ngImport: i0, template: "<div class=\"ngs-calendar-header\">\n <button\n ngsIconButton\n type=\"button\"\n class=\"ngs-calendar-previous-button\"\n aria-label=\"Previous month\"\n (click)=\"previousMonth()\"\n >\n <ngs-icon name=\"fluent:chevron-left-24-regular\" />\n </button>\n\n <div class=\"ngs-calendar-period\" aria-live=\"polite\">{{ periodLabel() }}</div>\n\n <div class=\"ngs-calendar-actions\">\n @if (showTodayButton()) {\n <button ngsButton type=\"button\" class=\"ngs-calendar-today-button\" (click)=\"selectToday()\">\n Today\n </button>\n }\n\n <button\n ngsIconButton\n type=\"button\"\n class=\"ngs-calendar-next-button\"\n aria-label=\"Next month\"\n (click)=\"nextMonth()\"\n >\n <ngs-icon name=\"fluent:chevron-right-24-regular\" />\n </button>\n </div>\n</div>\n\n<div class=\"ngs-calendar-weekdays\" role=\"row\">\n @for (weekday of weekdayLabels(); track weekday) {\n <div class=\"ngs-calendar-weekday\" role=\"columnheader\">{{ weekday }}</div>\n }\n</div>\n\n<div class=\"ngs-calendar-grid\" role=\"grid\" [attr.aria-label]=\"periodLabel()\">\n @for (cell of calendarCells(); track cell.key) {\n <button\n ngsButton\n type=\"button\"\n class=\"ngs-calendar-day\"\n [class.ngs-calendar-day-hidden]=\"!cell.visible\"\n [class.ngs-calendar-day-muted]=\"!cell.inCurrentMonth\"\n [class.ngs-calendar-day-today]=\"cell.today\"\n [class.ngs-calendar-day-selected]=\"cell.selected\"\n [class.ngs-calendar-day-has-events]=\"cell.events.length > 0\"\n [disabled]=\"cell.disabled\"\n [attr.aria-label]=\"cell.ariaLabel\"\n [attr.aria-selected]=\"cell.selected\"\n [attr.data-date]=\"cell.key\"\n role=\"gridcell\"\n (click)=\"selectCell(cell)\"\n >\n <span class=\"ngs-calendar-day-number\">{{ cell.label }}</span>\n\n @if (cell.markers.length > 0) {\n <span class=\"ngs-calendar-event-markers\" aria-hidden=\"true\">\n @for (marker of cell.markers; track marker) {\n <span class=\"ngs-calendar-event-marker {{ markerClass(marker) }}\"></span>\n }\n </span>\n }\n\n @if (showEventTitles() && cell.events.length > 0) {\n <span class=\"ngs-calendar-event-list\">\n @for (event of cell.events.slice(0, 2); track event.id ?? event.title ?? $index) {\n <span class=\"ngs-calendar-event-title\" (click)=\"selectEvent(event, $event)\">\n {{ event.title }}\n </span>\n }\n </span>\n }\n </button>\n }\n</div>\n", styles: [":host{--ngs-calendar-gap: var(--spacing, .25rem);--ngs-calendar-header-gap: calc(var(--spacing, .25rem) * 2);--ngs-calendar-day-min-height: calc(var(--spacing, .25rem) * 12);--ngs-calendar-day-radius: var(--ngs-radius-md);--ngs-calendar-day-bg: transparent;--ngs-calendar-day-hover-bg: var(--ngs-color-surface-container);--ngs-calendar-day-selected-bg: var(--ngs-color-primary);--ngs-calendar-day-selected-color: var(--ngs-color-on-primary);--ngs-calendar-day-today-outline: 1px solid var(--ngs-color-primary);--ngs-calendar-day-muted-color: var(--ngs-color-on-surface-variant);--ngs-calendar-weekday-color: var(--ngs-color-on-surface-variant);--ngs-calendar-event-primary: var(--ngs-color-primary);--ngs-calendar-event-success: var(--ngs-color-success);--ngs-calendar-event-warning: var(--ngs-color-warning);--ngs-calendar-event-danger: var(--ngs-color-danger);--ngs-calendar-event-info: var(--ngs-color-info);--ngs-calendar-event-neutral: var(--ngs-color-outline);--ngs-calendar-event-green: var(--ngs-color-success);--ngs-calendar-event-rose: var(--ngs-color-danger);--ngs-calendar-event-blue: var(--ngs-color-info);--ngs-calendar-header-margin-bottom: 0;display:flex;flex-direction:column;width:100%;min-width:0;gap:var(--ngs-calendar-gap);color:var(--ngs-color-on-surface)}:host .ngs-calendar-header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:var(--ngs-calendar-header-gap);min-width:0;margin-bottom:var(--ngs-calendar-header-margin-bottom)}:host .ngs-calendar-period{min-width:0;overflow:hidden;color:var(--ngs-color-on-surface);font-size:var(--ngs-font-size-lg);font-weight:600;text-align:center;text-overflow:ellipsis;white-space:nowrap}:host .ngs-calendar-actions{display:inline-flex;align-items:center;gap:var(--ngs-calendar-header-gap)}:host .ngs-calendar-today-button{--ngs-button-height: calc(var(--spacing, .25rem) * 9);--ngs-button-padding-x: calc(var(--spacing, .25rem) * 3)}:host .ngs-calendar-weekdays,:host .ngs-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:var(--ngs-calendar-gap)}:host .ngs-calendar-weekday{display:flex;align-items:center;justify-content:center;min-width:0;min-height:calc(var(--spacing, .25rem) * 7);color:var(--ngs-calendar-weekday-color);font-size:var(--ngs-font-size-xs);font-weight:500;text-transform:uppercase}:host .ngs-calendar-grid{flex:1;min-height:0}:host button.ngs-calendar-day{--ngs-button-bg: var(--ngs-calendar-day-bg);--ngs-button-border-radius: var(--ngs-calendar-day-radius);--ngs-button-height: auto;--ngs-button-padding: var(--spacing, .25rem);position:relative;display:flex;flex:1 1 auto;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;min-width:0;min-height:var(--ngs-calendar-day-min-height);color:var(--ngs-color-on-surface);font-weight:400;gap:var(--spacing, .25rem)}:host button.ngs-calendar-day:not(.ngs-calendar-day-has-events){justify-content:center}:host button.ngs-calendar-day:not(.ngs-calendar-day-selected):not(.ngs-button-disabled):hover{--ngs-button-bg: var(--ngs-calendar-day-hover-bg)}:host button.ngs-calendar-day.ngs-calendar-day-muted{color:var(--ngs-calendar-day-muted-color)}:host button.ngs-calendar-day.ngs-calendar-day-hidden{visibility:hidden;pointer-events:none}:host button.ngs-calendar-day.ngs-calendar-day-selected{--ngs-button-bg: var(--ngs-calendar-day-selected-bg);color:var(--ngs-calendar-day-selected-color)}:host button.ngs-calendar-day.ngs-calendar-day-today:not(.ngs-calendar-day-selected){outline:var(--ngs-calendar-day-today-outline);outline-offset:-1px}:host button.ngs-calendar-day ::ng-deep>.content{display:flex;width:100%;max-width:100%;min-width:0;flex:1 1 auto;flex-direction:column;align-items:center;justify-content:inherit;gap:inherit;line-height:normal}:host .ngs-calendar-day-number{display:inline-flex;align-items:center;justify-content:center;width:calc(var(--spacing, .25rem) * 6);height:calc(var(--spacing, .25rem) * 6);line-height:1}:host .ngs-calendar-event-markers{display:inline-flex;max-width:100%;min-height:calc(var(--spacing, .25rem) * 1.5);align-items:center;justify-content:center;gap:2px}:host .ngs-calendar-event-marker{width:calc(var(--spacing, .25rem) * 1.5);height:calc(var(--spacing, .25rem) * 1.5);flex:none;border-radius:999px;background:var(--ngs-calendar-event-primary)}:host .ngs-calendar-event-marker.ngs-calendar-event-success{background:var(--ngs-calendar-event-success)}:host .ngs-calendar-event-marker.ngs-calendar-event-warning{background:var(--ngs-calendar-event-warning)}:host .ngs-calendar-event-marker.ngs-calendar-event-danger{background:var(--ngs-calendar-event-danger)}:host .ngs-calendar-event-marker.ngs-calendar-event-info{background:var(--ngs-calendar-event-info)}:host .ngs-calendar-event-marker.ngs-calendar-event-neutral{background:var(--ngs-calendar-event-neutral)}:host .ngs-calendar-event-marker.ngs-calendar-event-green{background:var(--ngs-calendar-event-green)}:host .ngs-calendar-event-marker.ngs-calendar-event-rose{background:var(--ngs-calendar-event-rose)}:host .ngs-calendar-event-marker.ngs-calendar-event-blue{background:var(--ngs-calendar-event-blue)}:host .ngs-calendar-event-list{display:flex;width:100%;min-width:0;flex-direction:column;gap:2px}:host .ngs-calendar-event-title{display:block;box-sizing:border-box;overflow:hidden;width:100%;max-width:100%;min-width:0;padding-inline:var(--spacing, .25rem);border-radius:var(--ngs-radius-sm);background:var(--ngs-calendar-event-primary);color:currentColor;font-size:var(--ngs-font-size-xs);font-weight:400;line-height:1.35;text-align:left;text-overflow:ellipsis;white-space:nowrap}@supports (color: color-mix(in lab,red,red)){:host .ngs-calendar-event-title{background:color-mix(in srgb,var(--ngs-calendar-event-primary),transparent 88%)}}:host .ngs-calendar-day-selected .ngs-calendar-event-marker{background:currentColor}:host .ngs-calendar-day-selected .ngs-calendar-event-title{background:currentColor}@supports (color: color-mix(in lab,red,red)){:host .ngs-calendar-day-selected .ngs-calendar-event-title{background:color-mix(in srgb,currentColor,transparent 84%)}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "component", type: Button, selector: " button[ngsButton], button[ngsIconButton], a[ngsButton], a[ngsIconButton] ", inputs: ["ngsButton", "ngsIconButton", "loading", "disabled", "disabledInteractive", "disableRipple", "reverse", "fullWidth", "hideTextOnMobile"], exportAs: ["ngsButton"] }, { kind: "component", type: Icon, selector: "ngs-icon", inputs: ["name"], exportAs: ["ngsIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
238
- }
239
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: Calendar, decorators: [{
240
- type: Component,
241
- args: [{ selector: 'ngs-calendar', exportAs: 'ngsCalendar', imports: [Button, Icon], changeDetection: ChangeDetectionStrategy.OnPush, host: {
242
- class: 'ngs-calendar',
243
- }, template: "<div class=\"ngs-calendar-header\">\n <button\n ngsIconButton\n type=\"button\"\n class=\"ngs-calendar-previous-button\"\n aria-label=\"Previous month\"\n (click)=\"previousMonth()\"\n >\n <ngs-icon name=\"fluent:chevron-left-24-regular\" />\n </button>\n\n <div class=\"ngs-calendar-period\" aria-live=\"polite\">{{ periodLabel() }}</div>\n\n <div class=\"ngs-calendar-actions\">\n @if (showTodayButton()) {\n <button ngsButton type=\"button\" class=\"ngs-calendar-today-button\" (click)=\"selectToday()\">\n Today\n </button>\n }\n\n <button\n ngsIconButton\n type=\"button\"\n class=\"ngs-calendar-next-button\"\n aria-label=\"Next month\"\n (click)=\"nextMonth()\"\n >\n <ngs-icon name=\"fluent:chevron-right-24-regular\" />\n </button>\n </div>\n</div>\n\n<div class=\"ngs-calendar-weekdays\" role=\"row\">\n @for (weekday of weekdayLabels(); track weekday) {\n <div class=\"ngs-calendar-weekday\" role=\"columnheader\">{{ weekday }}</div>\n }\n</div>\n\n<div class=\"ngs-calendar-grid\" role=\"grid\" [attr.aria-label]=\"periodLabel()\">\n @for (cell of calendarCells(); track cell.key) {\n <button\n ngsButton\n type=\"button\"\n class=\"ngs-calendar-day\"\n [class.ngs-calendar-day-hidden]=\"!cell.visible\"\n [class.ngs-calendar-day-muted]=\"!cell.inCurrentMonth\"\n [class.ngs-calendar-day-today]=\"cell.today\"\n [class.ngs-calendar-day-selected]=\"cell.selected\"\n [class.ngs-calendar-day-has-events]=\"cell.events.length > 0\"\n [disabled]=\"cell.disabled\"\n [attr.aria-label]=\"cell.ariaLabel\"\n [attr.aria-selected]=\"cell.selected\"\n [attr.data-date]=\"cell.key\"\n role=\"gridcell\"\n (click)=\"selectCell(cell)\"\n >\n <span class=\"ngs-calendar-day-number\">{{ cell.label }}</span>\n\n @if (cell.markers.length > 0) {\n <span class=\"ngs-calendar-event-markers\" aria-hidden=\"true\">\n @for (marker of cell.markers; track marker) {\n <span class=\"ngs-calendar-event-marker {{ markerClass(marker) }}\"></span>\n }\n </span>\n }\n\n @if (showEventTitles() && cell.events.length > 0) {\n <span class=\"ngs-calendar-event-list\">\n @for (event of cell.events.slice(0, 2); track event.id ?? event.title ?? $index) {\n <span class=\"ngs-calendar-event-title\" (click)=\"selectEvent(event, $event)\">\n {{ event.title }}\n </span>\n }\n </span>\n }\n </button>\n }\n</div>\n", styles: [":host{--ngs-calendar-gap: var(--spacing, .25rem);--ngs-calendar-header-gap: calc(var(--spacing, .25rem) * 2);--ngs-calendar-day-min-height: calc(var(--spacing, .25rem) * 12);--ngs-calendar-day-radius: var(--ngs-radius-md);--ngs-calendar-day-bg: transparent;--ngs-calendar-day-hover-bg: var(--ngs-color-surface-container);--ngs-calendar-day-selected-bg: var(--ngs-color-primary);--ngs-calendar-day-selected-color: var(--ngs-color-on-primary);--ngs-calendar-day-today-outline: 1px solid var(--ngs-color-primary);--ngs-calendar-day-muted-color: var(--ngs-color-on-surface-variant);--ngs-calendar-weekday-color: var(--ngs-color-on-surface-variant);--ngs-calendar-event-primary: var(--ngs-color-primary);--ngs-calendar-event-success: var(--ngs-color-success);--ngs-calendar-event-warning: var(--ngs-color-warning);--ngs-calendar-event-danger: var(--ngs-color-danger);--ngs-calendar-event-info: var(--ngs-color-info);--ngs-calendar-event-neutral: var(--ngs-color-outline);--ngs-calendar-event-green: var(--ngs-color-success);--ngs-calendar-event-rose: var(--ngs-color-danger);--ngs-calendar-event-blue: var(--ngs-color-info);--ngs-calendar-header-margin-bottom: 0;display:flex;flex-direction:column;width:100%;min-width:0;gap:var(--ngs-calendar-gap);color:var(--ngs-color-on-surface)}:host .ngs-calendar-header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:var(--ngs-calendar-header-gap);min-width:0;margin-bottom:var(--ngs-calendar-header-margin-bottom)}:host .ngs-calendar-period{min-width:0;overflow:hidden;color:var(--ngs-color-on-surface);font-size:var(--ngs-font-size-lg);font-weight:600;text-align:center;text-overflow:ellipsis;white-space:nowrap}:host .ngs-calendar-actions{display:inline-flex;align-items:center;gap:var(--ngs-calendar-header-gap)}:host .ngs-calendar-today-button{--ngs-button-height: calc(var(--spacing, .25rem) * 9);--ngs-button-padding-x: calc(var(--spacing, .25rem) * 3)}:host .ngs-calendar-weekdays,:host .ngs-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:var(--ngs-calendar-gap)}:host .ngs-calendar-weekday{display:flex;align-items:center;justify-content:center;min-width:0;min-height:calc(var(--spacing, .25rem) * 7);color:var(--ngs-calendar-weekday-color);font-size:var(--ngs-font-size-xs);font-weight:500;text-transform:uppercase}:host .ngs-calendar-grid{flex:1;min-height:0}:host button.ngs-calendar-day{--ngs-button-bg: var(--ngs-calendar-day-bg);--ngs-button-border-radius: var(--ngs-calendar-day-radius);--ngs-button-height: auto;--ngs-button-padding: var(--spacing, .25rem);position:relative;display:flex;flex:1 1 auto;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;min-width:0;min-height:var(--ngs-calendar-day-min-height);color:var(--ngs-color-on-surface);font-weight:400;gap:var(--spacing, .25rem)}:host button.ngs-calendar-day:not(.ngs-calendar-day-has-events){justify-content:center}:host button.ngs-calendar-day:not(.ngs-calendar-day-selected):not(.ngs-button-disabled):hover{--ngs-button-bg: var(--ngs-calendar-day-hover-bg)}:host button.ngs-calendar-day.ngs-calendar-day-muted{color:var(--ngs-calendar-day-muted-color)}:host button.ngs-calendar-day.ngs-calendar-day-hidden{visibility:hidden;pointer-events:none}:host button.ngs-calendar-day.ngs-calendar-day-selected{--ngs-button-bg: var(--ngs-calendar-day-selected-bg);color:var(--ngs-calendar-day-selected-color)}:host button.ngs-calendar-day.ngs-calendar-day-today:not(.ngs-calendar-day-selected){outline:var(--ngs-calendar-day-today-outline);outline-offset:-1px}:host button.ngs-calendar-day ::ng-deep>.content{display:flex;width:100%;max-width:100%;min-width:0;flex:1 1 auto;flex-direction:column;align-items:center;justify-content:inherit;gap:inherit;line-height:normal}:host .ngs-calendar-day-number{display:inline-flex;align-items:center;justify-content:center;width:calc(var(--spacing, .25rem) * 6);height:calc(var(--spacing, .25rem) * 6);line-height:1}:host .ngs-calendar-event-markers{display:inline-flex;max-width:100%;min-height:calc(var(--spacing, .25rem) * 1.5);align-items:center;justify-content:center;gap:2px}:host .ngs-calendar-event-marker{width:calc(var(--spacing, .25rem) * 1.5);height:calc(var(--spacing, .25rem) * 1.5);flex:none;border-radius:999px;background:var(--ngs-calendar-event-primary)}:host .ngs-calendar-event-marker.ngs-calendar-event-success{background:var(--ngs-calendar-event-success)}:host .ngs-calendar-event-marker.ngs-calendar-event-warning{background:var(--ngs-calendar-event-warning)}:host .ngs-calendar-event-marker.ngs-calendar-event-danger{background:var(--ngs-calendar-event-danger)}:host .ngs-calendar-event-marker.ngs-calendar-event-info{background:var(--ngs-calendar-event-info)}:host .ngs-calendar-event-marker.ngs-calendar-event-neutral{background:var(--ngs-calendar-event-neutral)}:host .ngs-calendar-event-marker.ngs-calendar-event-green{background:var(--ngs-calendar-event-green)}:host .ngs-calendar-event-marker.ngs-calendar-event-rose{background:var(--ngs-calendar-event-rose)}:host .ngs-calendar-event-marker.ngs-calendar-event-blue{background:var(--ngs-calendar-event-blue)}:host .ngs-calendar-event-list{display:flex;width:100%;min-width:0;flex-direction:column;gap:2px}:host .ngs-calendar-event-title{display:block;box-sizing:border-box;overflow:hidden;width:100%;max-width:100%;min-width:0;padding-inline:var(--spacing, .25rem);border-radius:var(--ngs-radius-sm);background:var(--ngs-calendar-event-primary);color:currentColor;font-size:var(--ngs-font-size-xs);font-weight:400;line-height:1.35;text-align:left;text-overflow:ellipsis;white-space:nowrap}@supports (color: color-mix(in lab,red,red)){:host .ngs-calendar-event-title{background:color-mix(in srgb,var(--ngs-calendar-event-primary),transparent 88%)}}:host .ngs-calendar-day-selected .ngs-calendar-event-marker{background:currentColor}:host .ngs-calendar-day-selected .ngs-calendar-event-title{background:currentColor}@supports (color: color-mix(in lab,red,red)){:host .ngs-calendar-day-selected .ngs-calendar-event-title{background:color-mix(in srgb,currentColor,transparent 84%)}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
244
- }], ctorParameters: () => [], propDecorators: { startAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "startAt", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], minDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "minDate", required: false }] }], maxDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDate", required: false }] }], events: [{ type: i0.Input, args: [{ isSignal: true, alias: "events", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], showAdjacentDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAdjacentDays", required: false }] }], showTodayButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTodayButton", required: false }] }], showEventTitles: [{ type: i0.Input, args: [{ isSignal: true, alias: "showEventTitles", required: false }] }], selectedChange: [{ type: i0.Output, args: ["selectedChange"] }], monthChange: [{ type: i0.Output, args: ["monthChange"] }], eventSelected: [{ type: i0.Output, args: ["eventSelected"] }] } });
245
-
246
- /**
247
- * Generated bundle index. Do not edit.
248
- */
249
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, booleanAttribute, computed, effect, input, numberAttribute, output, signal } from "@angular/core";
3
+ import { Icon } from "@ngstarter-ui/components/icon";
4
+ import { Button } from "@ngstarter-ui/components/button";
5
+ var Calendar = class Calendar {
6
+ startAt = input(null, ...ngDevMode ? [{ debugName: "startAt" }] : /* istanbul ignore next */ []);
7
+ selected = input(null, ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
8
+ minDate = input(null, ...ngDevMode ? [{ debugName: "minDate" }] : /* istanbul ignore next */ []);
9
+ maxDate = input(null, ...ngDevMode ? [{ debugName: "maxDate" }] : /* istanbul ignore next */ []);
10
+ events = input([], ...ngDevMode ? [{ debugName: "events" }] : /* istanbul ignore next */ []);
11
+ locale = input(void 0, ...ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []);
12
+ firstDayOfWeek = input(0, {
13
+ ...ngDevMode ? { debugName: "firstDayOfWeek" } : /* istanbul ignore next */ {},
14
+ transform: numberAttribute
15
+ });
16
+ showAdjacentDays = input(true, {
17
+ ...ngDevMode ? { debugName: "showAdjacentDays" } : /* istanbul ignore next */ {},
18
+ transform: booleanAttribute
19
+ });
20
+ showTodayButton = input(true, {
21
+ ...ngDevMode ? { debugName: "showTodayButton" } : /* istanbul ignore next */ {},
22
+ transform: booleanAttribute
23
+ });
24
+ showEventTitles = input(false, {
25
+ ...ngDevMode ? { debugName: "showEventTitles" } : /* istanbul ignore next */ {},
26
+ transform: booleanAttribute
27
+ });
28
+ selectedChange = output();
29
+ monthChange = output();
30
+ eventSelected = output();
31
+ activeMonth = signal(this.getInitialActiveMonth(), ...ngDevMode ? [{ debugName: "activeMonth" }] : /* istanbul ignore next */ []);
32
+ selectedDate = signal(this.normalizeDateInput(this.selected()), ...ngDevMode ? [{ debugName: "selectedDate" }] : /* istanbul ignore next */ []);
33
+ normalizedMinDate = computed(() => this.normalizeDateInput(this.minDate()), ...ngDevMode ? [{ debugName: "normalizedMinDate" }] : /* istanbul ignore next */ []);
34
+ normalizedMaxDate = computed(() => this.normalizeDateInput(this.maxDate()), ...ngDevMode ? [{ debugName: "normalizedMaxDate" }] : /* istanbul ignore next */ []);
35
+ periodLabel = computed(() => new Intl.DateTimeFormat(this.locale(), {
36
+ month: "long",
37
+ year: "numeric"
38
+ }).format(this.activeMonth()), ...ngDevMode ? [{ debugName: "periodLabel" }] : /* istanbul ignore next */ []);
39
+ weekdayLabels = computed(() => {
40
+ const formatter = new Intl.DateTimeFormat(this.locale(), { weekday: "short" });
41
+ const labels = [];
42
+ const weekStart = this.normalizedFirstDayOfWeek();
43
+ for (let index = 0; index < 7; index++) {
44
+ const date = new Date(2024, 0, 7 + weekStart + index);
45
+ labels.push(formatter.format(date));
46
+ }
47
+ return labels;
48
+ }, ...ngDevMode ? [{ debugName: "weekdayLabels" }] : /* istanbul ignore next */ []);
49
+ calendarCells = computed(() => {
50
+ const activeMonth = this.activeMonth();
51
+ const selectedDate = this.selectedDate();
52
+ const minDate = this.normalizedMinDate();
53
+ const maxDate = this.normalizedMaxDate();
54
+ const showAdjacentDays = this.showAdjacentDays();
55
+ const monthStart = this.startOfMonth(activeMonth);
56
+ const weekStart = this.normalizedFirstDayOfWeek();
57
+ const firstDayOffset = (monthStart.getDay() - weekStart + 7) % 7;
58
+ const gridStart = this.addDays(monthStart, -firstDayOffset);
59
+ const today = this.startOfDay(/* @__PURE__ */ new Date());
60
+ const eventMap = this.eventsByDate();
61
+ const cells = [];
62
+ for (let index = 0; index < 42; index++) {
63
+ const date = this.addDays(gridStart, index);
64
+ const inCurrentMonth = this.sameMonth(date, activeMonth);
65
+ const events = eventMap.get(this.dateKey(date)) ?? [];
66
+ const visible = inCurrentMonth || showAdjacentDays;
67
+ cells.push({
68
+ date,
69
+ key: this.dateKey(date),
70
+ label: visible ? String(date.getDate()) : "",
71
+ ariaLabel: this.formatFullDate(date),
72
+ inCurrentMonth,
73
+ visible,
74
+ today: this.sameDate(date, today),
75
+ selected: !!selectedDate && this.sameDate(date, selectedDate),
76
+ disabled: this.isDisabled(date, minDate, maxDate) || !visible,
77
+ events,
78
+ markers: this.uniqueEventColors(events)
79
+ });
80
+ }
81
+ return cells;
82
+ }, ...ngDevMode ? [{ debugName: "calendarCells" }] : /* istanbul ignore next */ []);
83
+ constructor() {
84
+ effect(() => {
85
+ const selected = this.normalizeDateInput(this.selected());
86
+ this.selectedDate.set(selected);
87
+ if (selected) this.activeMonth.set(this.startOfMonth(selected));
88
+ });
89
+ effect(() => {
90
+ const startAt = this.normalizeDateInput(this.startAt());
91
+ if (startAt) this.activeMonth.set(this.startOfMonth(startAt));
92
+ });
93
+ }
94
+ previousMonth() {
95
+ this.setActiveMonth(this.addMonths(this.activeMonth(), -1));
96
+ }
97
+ nextMonth() {
98
+ this.setActiveMonth(this.addMonths(this.activeMonth(), 1));
99
+ }
100
+ selectToday() {
101
+ const today = this.startOfDay(/* @__PURE__ */ new Date());
102
+ this.setActiveMonth(today);
103
+ if (!this.isDisabled(today, this.normalizedMinDate(), this.normalizedMaxDate())) this.selectDate(today);
104
+ }
105
+ selectCell(cell) {
106
+ if (cell.disabled) return;
107
+ if (!cell.inCurrentMonth) this.setActiveMonth(cell.date);
108
+ this.selectDate(cell.date);
109
+ }
110
+ selectEvent(event, domEvent) {
111
+ domEvent.stopPropagation();
112
+ this.eventSelected.emit(event);
113
+ }
114
+ markerClass(color) {
115
+ return `ngs-calendar-event-${color}`;
116
+ }
117
+ selectDate(date) {
118
+ const value = this.startOfDay(date);
119
+ this.selectedDate.set(value);
120
+ this.selectedChange.emit(this.cloneDate(value));
121
+ }
122
+ setActiveMonth(date) {
123
+ const month = this.startOfMonth(date);
124
+ this.activeMonth.set(month);
125
+ this.monthChange.emit(this.cloneDate(month));
126
+ }
127
+ getInitialActiveMonth() {
128
+ return this.startOfMonth(this.normalizeDateInput(this.selected()) ?? this.normalizeDateInput(this.startAt()) ?? /* @__PURE__ */ new Date());
129
+ }
130
+ eventsByDate() {
131
+ const map = /* @__PURE__ */ new Map();
132
+ for (const event of this.events()) {
133
+ const date = this.normalizeDateInput(event.date);
134
+ if (!date) continue;
135
+ const key = this.dateKey(date);
136
+ const events = map.get(key) ?? [];
137
+ events.push(event);
138
+ map.set(key, events);
139
+ }
140
+ return map;
141
+ }
142
+ uniqueEventColors(events) {
143
+ const colors = /* @__PURE__ */ new Set();
144
+ for (const event of events) colors.add(event.color ?? "primary");
145
+ return [...colors].slice(0, 3);
146
+ }
147
+ normalizedFirstDayOfWeek() {
148
+ const value = this.firstDayOfWeek();
149
+ if (!Number.isFinite(value)) return 0;
150
+ return (Math.trunc(value) % 7 + 7) % 7;
151
+ }
152
+ normalizeDateInput(value) {
153
+ if (value === null || value === void 0 || value === "") return null;
154
+ if (value instanceof Date) return Number.isNaN(value.getTime()) ? null : this.startOfDay(value);
155
+ if (typeof value === "string") {
156
+ const dateOnly = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value);
157
+ if (dateOnly) {
158
+ const year = Number(dateOnly[1]);
159
+ const month = Number(dateOnly[2]) - 1;
160
+ const day = Number(dateOnly[3]);
161
+ const date = new Date(year, month, day);
162
+ return Number.isNaN(date.getTime()) ? null : this.startOfDay(date);
163
+ }
164
+ }
165
+ const date = new Date(value);
166
+ return Number.isNaN(date.getTime()) ? null : this.startOfDay(date);
167
+ }
168
+ isDisabled(date, minDate, maxDate) {
169
+ return !!minDate && this.compareDate(date, minDate) < 0 || !!maxDate && this.compareDate(date, maxDate) > 0;
170
+ }
171
+ formatFullDate(date) {
172
+ return new Intl.DateTimeFormat(this.locale(), {
173
+ weekday: "long",
174
+ month: "long",
175
+ day: "numeric",
176
+ year: "numeric"
177
+ }).format(date);
178
+ }
179
+ addMonths(date, months) {
180
+ return new Date(date.getFullYear(), date.getMonth() + months, 1);
181
+ }
182
+ addDays(date, days) {
183
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate() + days);
184
+ }
185
+ startOfMonth(date) {
186
+ return new Date(date.getFullYear(), date.getMonth(), 1);
187
+ }
188
+ startOfDay(date) {
189
+ return new Date(date.getFullYear(), date.getMonth(), date.getDate());
190
+ }
191
+ cloneDate(date) {
192
+ return new Date(date.getTime());
193
+ }
194
+ sameMonth(first, second) {
195
+ return first.getFullYear() === second.getFullYear() && first.getMonth() === second.getMonth();
196
+ }
197
+ sameDate(first, second) {
198
+ return this.compareDate(first, second) === 0;
199
+ }
200
+ compareDate(first, second) {
201
+ return first.getFullYear() - second.getFullYear() || first.getMonth() - second.getMonth() || first.getDate() - second.getDate();
202
+ }
203
+ dateKey(date) {
204
+ return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(date.getDate()).padStart(2, "0")}`;
205
+ }
206
+ static ɵfac = i0.ɵɵngDeclareFactory({
207
+ minVersion: "12.0.0",
208
+ version: "22.3.0",
209
+ ngImport: i0,
210
+ type: Calendar,
211
+ deps: [],
212
+ target: i0.ɵɵFactoryTarget.Component
213
+ });
214
+ static ɵcmp = i0.ɵɵngDeclareComponent({
215
+ minVersion: "17.0.0",
216
+ version: "22.3.0",
217
+ type: Calendar,
218
+ isStandalone: true,
219
+ selector: "ngs-calendar",
220
+ inputs: {
221
+ startAt: {
222
+ classPropertyName: "startAt",
223
+ publicName: "startAt",
224
+ isSignal: true,
225
+ isRequired: false,
226
+ transformFunction: null
227
+ },
228
+ selected: {
229
+ classPropertyName: "selected",
230
+ publicName: "selected",
231
+ isSignal: true,
232
+ isRequired: false,
233
+ transformFunction: null
234
+ },
235
+ minDate: {
236
+ classPropertyName: "minDate",
237
+ publicName: "minDate",
238
+ isSignal: true,
239
+ isRequired: false,
240
+ transformFunction: null
241
+ },
242
+ maxDate: {
243
+ classPropertyName: "maxDate",
244
+ publicName: "maxDate",
245
+ isSignal: true,
246
+ isRequired: false,
247
+ transformFunction: null
248
+ },
249
+ events: {
250
+ classPropertyName: "events",
251
+ publicName: "events",
252
+ isSignal: true,
253
+ isRequired: false,
254
+ transformFunction: null
255
+ },
256
+ locale: {
257
+ classPropertyName: "locale",
258
+ publicName: "locale",
259
+ isSignal: true,
260
+ isRequired: false,
261
+ transformFunction: null
262
+ },
263
+ firstDayOfWeek: {
264
+ classPropertyName: "firstDayOfWeek",
265
+ publicName: "firstDayOfWeek",
266
+ isSignal: true,
267
+ isRequired: false,
268
+ transformFunction: null
269
+ },
270
+ showAdjacentDays: {
271
+ classPropertyName: "showAdjacentDays",
272
+ publicName: "showAdjacentDays",
273
+ isSignal: true,
274
+ isRequired: false,
275
+ transformFunction: null
276
+ },
277
+ showTodayButton: {
278
+ classPropertyName: "showTodayButton",
279
+ publicName: "showTodayButton",
280
+ isSignal: true,
281
+ isRequired: false,
282
+ transformFunction: null
283
+ },
284
+ showEventTitles: {
285
+ classPropertyName: "showEventTitles",
286
+ publicName: "showEventTitles",
287
+ isSignal: true,
288
+ isRequired: false,
289
+ transformFunction: null
290
+ }
291
+ },
292
+ outputs: {
293
+ selectedChange: "selectedChange",
294
+ monthChange: "monthChange",
295
+ eventSelected: "eventSelected"
296
+ },
297
+ host: { classAttribute: "ngs-calendar" },
298
+ exportAs: ["ngsCalendar"],
299
+ ngImport: i0,
300
+ template: "<div class=\"ngs-calendar-header\">\n <button\n ngsIconButton\n type=\"button\"\n class=\"ngs-calendar-previous-button\"\n aria-label=\"Previous month\"\n (click)=\"previousMonth()\"\n >\n <ngs-icon name=\"fluent:chevron-left-24-regular\" />\n </button>\n\n <div class=\"ngs-calendar-period\" aria-live=\"polite\">{{ periodLabel() }}</div>\n\n <div class=\"ngs-calendar-actions\">\n @if (showTodayButton()) {\n <button ngsButton type=\"button\" class=\"ngs-calendar-today-button\" (click)=\"selectToday()\">\n Today\n </button>\n }\n\n <button\n ngsIconButton\n type=\"button\"\n class=\"ngs-calendar-next-button\"\n aria-label=\"Next month\"\n (click)=\"nextMonth()\"\n >\n <ngs-icon name=\"fluent:chevron-right-24-regular\" />\n </button>\n </div>\n</div>\n\n<div class=\"ngs-calendar-weekdays\" role=\"row\">\n @for (weekday of weekdayLabels(); track weekday) {\n <div class=\"ngs-calendar-weekday\" role=\"columnheader\">{{ weekday }}</div>\n }\n</div>\n\n<div class=\"ngs-calendar-grid\" role=\"grid\" [attr.aria-label]=\"periodLabel()\">\n @for (cell of calendarCells(); track cell.key) {\n <button\n ngsButton\n type=\"button\"\n class=\"ngs-calendar-day\"\n [class.ngs-calendar-day-hidden]=\"!cell.visible\"\n [class.ngs-calendar-day-muted]=\"!cell.inCurrentMonth\"\n [class.ngs-calendar-day-today]=\"cell.today\"\n [class.ngs-calendar-day-selected]=\"cell.selected\"\n [class.ngs-calendar-day-has-events]=\"cell.events.length > 0\"\n [disabled]=\"cell.disabled\"\n [attr.aria-label]=\"cell.ariaLabel\"\n [attr.aria-selected]=\"cell.selected\"\n [attr.data-date]=\"cell.key\"\n role=\"gridcell\"\n (click)=\"selectCell(cell)\"\n >\n <span class=\"ngs-calendar-day-number\">{{ cell.label }}</span>\n\n @if (cell.markers.length > 0) {\n <span class=\"ngs-calendar-event-markers\" aria-hidden=\"true\">\n @for (marker of cell.markers; track marker) {\n <span class=\"ngs-calendar-event-marker {{ markerClass(marker) }}\"></span>\n }\n </span>\n }\n\n @if (showEventTitles() && cell.events.length > 0) {\n <span class=\"ngs-calendar-event-list\">\n @for (event of cell.events.slice(0, 2); track event.id ?? event.title ?? $index) {\n <span class=\"ngs-calendar-event-title\" (click)=\"selectEvent(event, $event)\">\n {{ event.title }}\n </span>\n }\n </span>\n }\n </button>\n }\n</div>\n",
301
+ styles: [":host{--ngs-calendar-gap: var(--spacing, .25rem);--ngs-calendar-header-gap: calc(var(--spacing, .25rem) * 2);--ngs-calendar-day-min-height: calc(var(--spacing, .25rem) * 12);--ngs-calendar-day-radius: var(--ngs-radius-md);--ngs-calendar-day-bg: transparent;--ngs-calendar-day-hover-bg: var(--ngs-color-surface-container);--ngs-calendar-day-selected-bg: var(--ngs-color-primary);--ngs-calendar-day-selected-color: var(--ngs-color-on-primary);--ngs-calendar-day-today-outline: 1px solid var(--ngs-color-primary);--ngs-calendar-day-muted-color: var(--ngs-color-on-surface-variant);--ngs-calendar-weekday-color: var(--ngs-color-on-surface-variant);--ngs-calendar-event-primary: var(--ngs-color-primary);--ngs-calendar-event-success: var(--ngs-color-success);--ngs-calendar-event-warning: var(--ngs-color-warning);--ngs-calendar-event-danger: var(--ngs-color-danger);--ngs-calendar-event-info: var(--ngs-color-info);--ngs-calendar-event-neutral: var(--ngs-color-outline);--ngs-calendar-event-green: var(--ngs-color-success);--ngs-calendar-event-rose: var(--ngs-color-danger);--ngs-calendar-event-blue: var(--ngs-color-info);--ngs-calendar-header-margin-bottom: 0;display:flex;flex-direction:column;width:100%;min-width:0;gap:var(--ngs-calendar-gap);color:var(--ngs-color-on-surface)}:host .ngs-calendar-header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:var(--ngs-calendar-header-gap);min-width:0;margin-bottom:var(--ngs-calendar-header-margin-bottom)}:host .ngs-calendar-period{min-width:0;overflow:hidden;color:var(--ngs-color-on-surface);font-size:var(--ngs-font-size-lg);font-weight:600;text-align:center;text-overflow:ellipsis;white-space:nowrap}:host .ngs-calendar-actions{display:inline-flex;align-items:center;gap:var(--ngs-calendar-header-gap)}:host .ngs-calendar-today-button{--ngs-button-height: calc(var(--spacing, .25rem) * 9);--ngs-button-padding-x: calc(var(--spacing, .25rem) * 3)}:host .ngs-calendar-weekdays,:host .ngs-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:var(--ngs-calendar-gap)}:host .ngs-calendar-weekday{display:flex;align-items:center;justify-content:center;min-width:0;min-height:calc(var(--spacing, .25rem) * 7);color:var(--ngs-calendar-weekday-color);font-size:var(--ngs-font-size-xs);font-weight:500;text-transform:uppercase}:host .ngs-calendar-grid{flex:1;min-height:0}:host button.ngs-calendar-day{--ngs-button-bg: var(--ngs-calendar-day-bg);--ngs-button-border-radius: var(--ngs-calendar-day-radius);--ngs-button-height: auto;--ngs-button-padding: var(--spacing, .25rem);position:relative;display:flex;flex:1 1 auto;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;min-width:0;min-height:var(--ngs-calendar-day-min-height);color:var(--ngs-color-on-surface);font-weight:400;gap:var(--spacing, .25rem)}:host button.ngs-calendar-day:not(.ngs-calendar-day-has-events){justify-content:center}:host button.ngs-calendar-day:not(.ngs-calendar-day-selected):not(.ngs-button-disabled):hover{--ngs-button-bg: var(--ngs-calendar-day-hover-bg)}:host button.ngs-calendar-day.ngs-calendar-day-muted{color:var(--ngs-calendar-day-muted-color)}:host button.ngs-calendar-day.ngs-calendar-day-hidden{visibility:hidden;pointer-events:none}:host button.ngs-calendar-day.ngs-calendar-day-selected{--ngs-button-bg: var(--ngs-calendar-day-selected-bg);color:var(--ngs-calendar-day-selected-color)}:host button.ngs-calendar-day.ngs-calendar-day-today:not(.ngs-calendar-day-selected){outline:var(--ngs-calendar-day-today-outline);outline-offset:-1px}:host button.ngs-calendar-day ::ng-deep>.content{display:flex;width:100%;max-width:100%;min-width:0;flex:1 1 auto;flex-direction:column;align-items:center;justify-content:inherit;gap:inherit;line-height:normal}:host .ngs-calendar-day-number{display:inline-flex;align-items:center;justify-content:center;width:calc(var(--spacing, .25rem) * 6);height:calc(var(--spacing, .25rem) * 6);line-height:1}:host .ngs-calendar-event-markers{display:inline-flex;max-width:100%;min-height:calc(var(--spacing, .25rem) * 1.5);align-items:center;justify-content:center;gap:2px}:host .ngs-calendar-event-marker{width:calc(var(--spacing, .25rem) * 1.5);height:calc(var(--spacing, .25rem) * 1.5);flex:none;border-radius:999px;background:var(--ngs-calendar-event-primary)}:host .ngs-calendar-event-marker.ngs-calendar-event-success{background:var(--ngs-calendar-event-success)}:host .ngs-calendar-event-marker.ngs-calendar-event-warning{background:var(--ngs-calendar-event-warning)}:host .ngs-calendar-event-marker.ngs-calendar-event-danger{background:var(--ngs-calendar-event-danger)}:host .ngs-calendar-event-marker.ngs-calendar-event-info{background:var(--ngs-calendar-event-info)}:host .ngs-calendar-event-marker.ngs-calendar-event-neutral{background:var(--ngs-calendar-event-neutral)}:host .ngs-calendar-event-marker.ngs-calendar-event-green{background:var(--ngs-calendar-event-green)}:host .ngs-calendar-event-marker.ngs-calendar-event-rose{background:var(--ngs-calendar-event-rose)}:host .ngs-calendar-event-marker.ngs-calendar-event-blue{background:var(--ngs-calendar-event-blue)}:host .ngs-calendar-event-list{display:flex;width:100%;min-width:0;flex-direction:column;gap:2px}:host .ngs-calendar-event-title{display:block;box-sizing:border-box;overflow:hidden;width:100%;max-width:100%;min-width:0;padding-inline:var(--spacing, .25rem);border-radius:var(--ngs-radius-sm);background:var(--ngs-calendar-event-primary);color:currentColor;font-size:var(--ngs-font-size-xs);font-weight:400;line-height:1.35;text-align:left;text-overflow:ellipsis;white-space:nowrap}@supports (color: color-mix(in lab,red,red)){:host .ngs-calendar-event-title{background:color-mix(in srgb,var(--ngs-calendar-event-primary),transparent 88%)}}:host .ngs-calendar-day-selected .ngs-calendar-event-marker{background:currentColor}:host .ngs-calendar-day-selected .ngs-calendar-event-title{background:currentColor}@supports (color: color-mix(in lab,red,red)){:host .ngs-calendar-day-selected .ngs-calendar-event-title{background:color-mix(in srgb,currentColor,transparent 84%)}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
302
+ dependencies: [{
303
+ kind: "component",
304
+ type: Button,
305
+ selector: "\n button[ngsButton], button[ngsIconButton],\n a[ngsButton], a[ngsIconButton]\n ",
306
+ inputs: [
307
+ "ngsButton",
308
+ "ngsIconButton",
309
+ "loading",
310
+ "disabled",
311
+ "disabledInteractive",
312
+ "disableRipple",
313
+ "reverse",
314
+ "fullWidth",
315
+ "hideTextOnMobile"
316
+ ],
317
+ exportAs: ["ngsButton"]
318
+ }, {
319
+ kind: "component",
320
+ type: Icon,
321
+ selector: "ngs-icon",
322
+ inputs: ["name"],
323
+ exportAs: ["ngsIcon"]
324
+ }],
325
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
326
+ });
327
+ };
328
+ i0.ɵɵngDeclareClassMetadata({
329
+ minVersion: "12.0.0",
330
+ version: "22.3.0",
331
+ ngImport: i0,
332
+ type: Calendar,
333
+ decorators: [{
334
+ type: Component,
335
+ args: [{
336
+ selector: "ngs-calendar",
337
+ exportAs: "ngsCalendar",
338
+ imports: [Button, Icon],
339
+ changeDetection: ChangeDetectionStrategy.OnPush,
340
+ host: { class: "ngs-calendar" },
341
+ template: "<div class=\"ngs-calendar-header\">\n <button\n ngsIconButton\n type=\"button\"\n class=\"ngs-calendar-previous-button\"\n aria-label=\"Previous month\"\n (click)=\"previousMonth()\"\n >\n <ngs-icon name=\"fluent:chevron-left-24-regular\" />\n </button>\n\n <div class=\"ngs-calendar-period\" aria-live=\"polite\">{{ periodLabel() }}</div>\n\n <div class=\"ngs-calendar-actions\">\n @if (showTodayButton()) {\n <button ngsButton type=\"button\" class=\"ngs-calendar-today-button\" (click)=\"selectToday()\">\n Today\n </button>\n }\n\n <button\n ngsIconButton\n type=\"button\"\n class=\"ngs-calendar-next-button\"\n aria-label=\"Next month\"\n (click)=\"nextMonth()\"\n >\n <ngs-icon name=\"fluent:chevron-right-24-regular\" />\n </button>\n </div>\n</div>\n\n<div class=\"ngs-calendar-weekdays\" role=\"row\">\n @for (weekday of weekdayLabels(); track weekday) {\n <div class=\"ngs-calendar-weekday\" role=\"columnheader\">{{ weekday }}</div>\n }\n</div>\n\n<div class=\"ngs-calendar-grid\" role=\"grid\" [attr.aria-label]=\"periodLabel()\">\n @for (cell of calendarCells(); track cell.key) {\n <button\n ngsButton\n type=\"button\"\n class=\"ngs-calendar-day\"\n [class.ngs-calendar-day-hidden]=\"!cell.visible\"\n [class.ngs-calendar-day-muted]=\"!cell.inCurrentMonth\"\n [class.ngs-calendar-day-today]=\"cell.today\"\n [class.ngs-calendar-day-selected]=\"cell.selected\"\n [class.ngs-calendar-day-has-events]=\"cell.events.length > 0\"\n [disabled]=\"cell.disabled\"\n [attr.aria-label]=\"cell.ariaLabel\"\n [attr.aria-selected]=\"cell.selected\"\n [attr.data-date]=\"cell.key\"\n role=\"gridcell\"\n (click)=\"selectCell(cell)\"\n >\n <span class=\"ngs-calendar-day-number\">{{ cell.label }}</span>\n\n @if (cell.markers.length > 0) {\n <span class=\"ngs-calendar-event-markers\" aria-hidden=\"true\">\n @for (marker of cell.markers; track marker) {\n <span class=\"ngs-calendar-event-marker {{ markerClass(marker) }}\"></span>\n }\n </span>\n }\n\n @if (showEventTitles() && cell.events.length > 0) {\n <span class=\"ngs-calendar-event-list\">\n @for (event of cell.events.slice(0, 2); track event.id ?? event.title ?? $index) {\n <span class=\"ngs-calendar-event-title\" (click)=\"selectEvent(event, $event)\">\n {{ event.title }}\n </span>\n }\n </span>\n }\n </button>\n }\n</div>\n",
342
+ styles: [":host{--ngs-calendar-gap: var(--spacing, .25rem);--ngs-calendar-header-gap: calc(var(--spacing, .25rem) * 2);--ngs-calendar-day-min-height: calc(var(--spacing, .25rem) * 12);--ngs-calendar-day-radius: var(--ngs-radius-md);--ngs-calendar-day-bg: transparent;--ngs-calendar-day-hover-bg: var(--ngs-color-surface-container);--ngs-calendar-day-selected-bg: var(--ngs-color-primary);--ngs-calendar-day-selected-color: var(--ngs-color-on-primary);--ngs-calendar-day-today-outline: 1px solid var(--ngs-color-primary);--ngs-calendar-day-muted-color: var(--ngs-color-on-surface-variant);--ngs-calendar-weekday-color: var(--ngs-color-on-surface-variant);--ngs-calendar-event-primary: var(--ngs-color-primary);--ngs-calendar-event-success: var(--ngs-color-success);--ngs-calendar-event-warning: var(--ngs-color-warning);--ngs-calendar-event-danger: var(--ngs-color-danger);--ngs-calendar-event-info: var(--ngs-color-info);--ngs-calendar-event-neutral: var(--ngs-color-outline);--ngs-calendar-event-green: var(--ngs-color-success);--ngs-calendar-event-rose: var(--ngs-color-danger);--ngs-calendar-event-blue: var(--ngs-color-info);--ngs-calendar-header-margin-bottom: 0;display:flex;flex-direction:column;width:100%;min-width:0;gap:var(--ngs-calendar-gap);color:var(--ngs-color-on-surface)}:host .ngs-calendar-header{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:var(--ngs-calendar-header-gap);min-width:0;margin-bottom:var(--ngs-calendar-header-margin-bottom)}:host .ngs-calendar-period{min-width:0;overflow:hidden;color:var(--ngs-color-on-surface);font-size:var(--ngs-font-size-lg);font-weight:600;text-align:center;text-overflow:ellipsis;white-space:nowrap}:host .ngs-calendar-actions{display:inline-flex;align-items:center;gap:var(--ngs-calendar-header-gap)}:host .ngs-calendar-today-button{--ngs-button-height: calc(var(--spacing, .25rem) * 9);--ngs-button-padding-x: calc(var(--spacing, .25rem) * 3)}:host .ngs-calendar-weekdays,:host .ngs-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:var(--ngs-calendar-gap)}:host .ngs-calendar-weekday{display:flex;align-items:center;justify-content:center;min-width:0;min-height:calc(var(--spacing, .25rem) * 7);color:var(--ngs-calendar-weekday-color);font-size:var(--ngs-font-size-xs);font-weight:500;text-transform:uppercase}:host .ngs-calendar-grid{flex:1;min-height:0}:host button.ngs-calendar-day{--ngs-button-bg: var(--ngs-calendar-day-bg);--ngs-button-border-radius: var(--ngs-calendar-day-radius);--ngs-button-height: auto;--ngs-button-padding: var(--spacing, .25rem);position:relative;display:flex;flex:1 1 auto;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;min-width:0;min-height:var(--ngs-calendar-day-min-height);color:var(--ngs-color-on-surface);font-weight:400;gap:var(--spacing, .25rem)}:host button.ngs-calendar-day:not(.ngs-calendar-day-has-events){justify-content:center}:host button.ngs-calendar-day:not(.ngs-calendar-day-selected):not(.ngs-button-disabled):hover{--ngs-button-bg: var(--ngs-calendar-day-hover-bg)}:host button.ngs-calendar-day.ngs-calendar-day-muted{color:var(--ngs-calendar-day-muted-color)}:host button.ngs-calendar-day.ngs-calendar-day-hidden{visibility:hidden;pointer-events:none}:host button.ngs-calendar-day.ngs-calendar-day-selected{--ngs-button-bg: var(--ngs-calendar-day-selected-bg);color:var(--ngs-calendar-day-selected-color)}:host button.ngs-calendar-day.ngs-calendar-day-today:not(.ngs-calendar-day-selected){outline:var(--ngs-calendar-day-today-outline);outline-offset:-1px}:host button.ngs-calendar-day ::ng-deep>.content{display:flex;width:100%;max-width:100%;min-width:0;flex:1 1 auto;flex-direction:column;align-items:center;justify-content:inherit;gap:inherit;line-height:normal}:host .ngs-calendar-day-number{display:inline-flex;align-items:center;justify-content:center;width:calc(var(--spacing, .25rem) * 6);height:calc(var(--spacing, .25rem) * 6);line-height:1}:host .ngs-calendar-event-markers{display:inline-flex;max-width:100%;min-height:calc(var(--spacing, .25rem) * 1.5);align-items:center;justify-content:center;gap:2px}:host .ngs-calendar-event-marker{width:calc(var(--spacing, .25rem) * 1.5);height:calc(var(--spacing, .25rem) * 1.5);flex:none;border-radius:999px;background:var(--ngs-calendar-event-primary)}:host .ngs-calendar-event-marker.ngs-calendar-event-success{background:var(--ngs-calendar-event-success)}:host .ngs-calendar-event-marker.ngs-calendar-event-warning{background:var(--ngs-calendar-event-warning)}:host .ngs-calendar-event-marker.ngs-calendar-event-danger{background:var(--ngs-calendar-event-danger)}:host .ngs-calendar-event-marker.ngs-calendar-event-info{background:var(--ngs-calendar-event-info)}:host .ngs-calendar-event-marker.ngs-calendar-event-neutral{background:var(--ngs-calendar-event-neutral)}:host .ngs-calendar-event-marker.ngs-calendar-event-green{background:var(--ngs-calendar-event-green)}:host .ngs-calendar-event-marker.ngs-calendar-event-rose{background:var(--ngs-calendar-event-rose)}:host .ngs-calendar-event-marker.ngs-calendar-event-blue{background:var(--ngs-calendar-event-blue)}:host .ngs-calendar-event-list{display:flex;width:100%;min-width:0;flex-direction:column;gap:2px}:host .ngs-calendar-event-title{display:block;box-sizing:border-box;overflow:hidden;width:100%;max-width:100%;min-width:0;padding-inline:var(--spacing, .25rem);border-radius:var(--ngs-radius-sm);background:var(--ngs-calendar-event-primary);color:currentColor;font-size:var(--ngs-font-size-xs);font-weight:400;line-height:1.35;text-align:left;text-overflow:ellipsis;white-space:nowrap}@supports (color: color-mix(in lab,red,red)){:host .ngs-calendar-event-title{background:color-mix(in srgb,var(--ngs-calendar-event-primary),transparent 88%)}}:host .ngs-calendar-day-selected .ngs-calendar-event-marker{background:currentColor}:host .ngs-calendar-day-selected .ngs-calendar-event-title{background:currentColor}@supports (color: color-mix(in lab,red,red)){:host .ngs-calendar-day-selected .ngs-calendar-event-title{background:color-mix(in srgb,currentColor,transparent 84%)}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
343
+ }]
344
+ }],
345
+ ctorParameters: () => [],
346
+ propDecorators: {
347
+ startAt: [{
348
+ type: i0.Input,
349
+ args: [{
350
+ isSignal: true,
351
+ alias: "startAt",
352
+ required: false
353
+ }]
354
+ }],
355
+ selected: [{
356
+ type: i0.Input,
357
+ args: [{
358
+ isSignal: true,
359
+ alias: "selected",
360
+ required: false
361
+ }]
362
+ }],
363
+ minDate: [{
364
+ type: i0.Input,
365
+ args: [{
366
+ isSignal: true,
367
+ alias: "minDate",
368
+ required: false
369
+ }]
370
+ }],
371
+ maxDate: [{
372
+ type: i0.Input,
373
+ args: [{
374
+ isSignal: true,
375
+ alias: "maxDate",
376
+ required: false
377
+ }]
378
+ }],
379
+ events: [{
380
+ type: i0.Input,
381
+ args: [{
382
+ isSignal: true,
383
+ alias: "events",
384
+ required: false
385
+ }]
386
+ }],
387
+ locale: [{
388
+ type: i0.Input,
389
+ args: [{
390
+ isSignal: true,
391
+ alias: "locale",
392
+ required: false
393
+ }]
394
+ }],
395
+ firstDayOfWeek: [{
396
+ type: i0.Input,
397
+ args: [{
398
+ isSignal: true,
399
+ alias: "firstDayOfWeek",
400
+ required: false
401
+ }]
402
+ }],
403
+ showAdjacentDays: [{
404
+ type: i0.Input,
405
+ args: [{
406
+ isSignal: true,
407
+ alias: "showAdjacentDays",
408
+ required: false
409
+ }]
410
+ }],
411
+ showTodayButton: [{
412
+ type: i0.Input,
413
+ args: [{
414
+ isSignal: true,
415
+ alias: "showTodayButton",
416
+ required: false
417
+ }]
418
+ }],
419
+ showEventTitles: [{
420
+ type: i0.Input,
421
+ args: [{
422
+ isSignal: true,
423
+ alias: "showEventTitles",
424
+ required: false
425
+ }]
426
+ }],
427
+ selectedChange: [{
428
+ type: i0.Output,
429
+ args: ["selectedChange"]
430
+ }],
431
+ monthChange: [{
432
+ type: i0.Output,
433
+ args: ["monthChange"]
434
+ }],
435
+ eventSelected: [{
436
+ type: i0.Output,
437
+ args: ["eventSelected"]
438
+ }]
439
+ }
440
+ });
250
441
  export { Calendar };
251
- //# sourceMappingURL=ngstarter-ui-components-calendar.mjs.map
442
+
443
+ //# sourceMappingURL=ngstarter-ui-components-calendar.mjs.map