@nanahoshi/mona-ui 0.27.1 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (359) hide show
  1. package/docs/api/auto-complete.md +67 -0
  2. package/docs/api/avatar.md +31 -0
  3. package/docs/api/breadcrumb.md +74 -0
  4. package/docs/api/button-group.md +71 -0
  5. package/docs/api/button.md +84 -0
  6. package/docs/api/calendar.md +123 -0
  7. package/docs/api/card.md +97 -0
  8. package/docs/api/chart.md +4380 -0
  9. package/docs/api/check-box.md +70 -0
  10. package/docs/api/chip.md +55 -0
  11. package/docs/api/circular-progress-bar.md +71 -0
  12. package/docs/api/collapsible.md +71 -0
  13. package/docs/api/color-gradient.md +54 -0
  14. package/docs/api/color-palette.md +52 -0
  15. package/docs/api/color-picker.md +89 -0
  16. package/docs/api/combo-box.md +69 -0
  17. package/docs/api/command.md +282 -0
  18. package/docs/api/common.md +599 -0
  19. package/docs/api/contextmenu.md +239 -0
  20. package/docs/api/date-input.md +119 -0
  21. package/docs/api/date-picker.md +67 -0
  22. package/docs/api/datetime-picker.md +72 -0
  23. package/docs/api/dialog.md +291 -0
  24. package/docs/api/dropdown-button.md +248 -0
  25. package/docs/api/dropdown-list.md +72 -0
  26. package/docs/api/dropdowns.md +172 -0
  27. package/docs/api/editor.md +117 -0
  28. package/docs/api/expansion-panel.md +85 -0
  29. package/docs/api/fieldset.md +33 -0
  30. package/docs/api/filter.md +116 -0
  31. package/docs/api/grid.md +1445 -0
  32. package/docs/api/i18n.md +1699 -0
  33. package/docs/api/label.md +58 -0
  34. package/docs/api/list-box.md +301 -0
  35. package/docs/api/list-view.md +294 -0
  36. package/docs/api/list.md +119 -0
  37. package/docs/api/locales.md +134 -0
  38. package/docs/api/menubar.md +275 -0
  39. package/docs/api/multi-select.md +92 -0
  40. package/docs/api/notification.md +164 -0
  41. package/docs/api/numeric-text-box.md +130 -0
  42. package/docs/api/otp-input.md +100 -0
  43. package/docs/api/pager.md +371 -0
  44. package/docs/api/placeholder.md +18 -0
  45. package/docs/api/popover.md +170 -0
  46. package/docs/api/popup-menu.md +328 -0
  47. package/docs/api/popup.md +299 -0
  48. package/docs/api/progress-bar.md +79 -0
  49. package/docs/api/query.md +367 -0
  50. package/docs/api/radio-button.md +113 -0
  51. package/docs/api/rating.md +187 -0
  52. package/docs/api/scroll-view.md +93 -0
  53. package/docs/api/segmented.md +114 -0
  54. package/docs/api/sheet.md +65 -0
  55. package/docs/api/sidebar.md +583 -0
  56. package/docs/api/skeleton.md +26 -0
  57. package/docs/api/slider.md +173 -0
  58. package/docs/api/spinner.md +132 -0
  59. package/docs/api/split-button.md +261 -0
  60. package/docs/api/splitter.md +57 -0
  61. package/docs/api/stepper.md +148 -0
  62. package/docs/api/switch.md +78 -0
  63. package/docs/api/tabs.md +139 -0
  64. package/docs/api/text-area.md +20 -0
  65. package/docs/api/text-box.md +106 -0
  66. package/docs/api/theme.md +627 -0
  67. package/docs/api/time-picker.md +69 -0
  68. package/docs/api/time-selector.md +54 -0
  69. package/docs/api/tooltip.md +112 -0
  70. package/docs/api/tree-view.md +631 -0
  71. package/docs/api/window.md +245 -0
  72. package/docs/auto-complete.md +28 -329
  73. package/docs/avatar.md +4 -24
  74. package/docs/breadcrumb.md +10 -65
  75. package/docs/button-group.md +7 -60
  76. package/docs/button.md +8 -67
  77. package/docs/calendar.md +16 -121
  78. package/docs/card.md +16 -79
  79. package/docs/chart-bar.md +16 -234
  80. package/docs/chart-financial.md +10 -121
  81. package/docs/chart-funnel.md +13 -176
  82. package/docs/chart-heatmap.md +15 -131
  83. package/docs/chart-line-area.md +12 -137
  84. package/docs/chart-pie.md +17 -221
  85. package/docs/chart-radar.md +13 -129
  86. package/docs/chart-radial.md +13 -211
  87. package/docs/chart-scatter.md +6 -74
  88. package/docs/chart-treemap.md +14 -196
  89. package/docs/chart.md +168 -1892
  90. package/docs/checkbox.md +5 -61
  91. package/docs/chip.md +7 -42
  92. package/docs/circular-progress-bar.md +9 -61
  93. package/docs/collapsible.md +5 -87
  94. package/docs/color-gradient.md +8 -81
  95. package/docs/color-palette.md +7 -69
  96. package/docs/color-picker.md +9 -105
  97. package/docs/combo-box.md +28 -331
  98. package/docs/command.md +25 -236
  99. package/docs/contextmenu.md +15 -140
  100. package/docs/date-picker.md +7 -110
  101. package/docs/datetime-picker.md +7 -129
  102. package/docs/decimal-textbox.md +6 -69
  103. package/docs/dialog.md +23 -263
  104. package/docs/dropdown-button.md +15 -146
  105. package/docs/dropdown-list.md +29 -332
  106. package/docs/editor.md +10 -164
  107. package/docs/expansion-panel.md +7 -69
  108. package/docs/fieldset.md +5 -24
  109. package/docs/grid-columns.md +12 -92
  110. package/docs/grid-editing.md +29 -291
  111. package/docs/grid-grouping.md +11 -50
  112. package/docs/grid-rows.md +10 -74
  113. package/docs/grid-selection.md +7 -36
  114. package/docs/grid-server.md +8 -293
  115. package/docs/grid-sorting-filtering.md +10 -333
  116. package/docs/grid-state-export.md +17 -228
  117. package/docs/grid.md +23 -216
  118. package/docs/input.md +7 -19
  119. package/docs/installation.md +147 -15
  120. package/docs/introduction.md +37 -15
  121. package/docs/label.md +8 -39
  122. package/docs/list-box.md +21 -253
  123. package/docs/list-view.md +25 -232
  124. package/docs/menubar.md +21 -167
  125. package/docs/multi-select.md +31 -350
  126. package/docs/notification.md +17 -116
  127. package/docs/numeric-textbox.md +9 -78
  128. package/docs/otp-input.md +9 -95
  129. package/docs/pager.md +19 -239
  130. package/docs/placeholder.md +5 -18
  131. package/docs/popover.md +13 -123
  132. package/docs/popup-menu.md +22 -243
  133. package/docs/popup.md +24 -248
  134. package/docs/progress-bar.md +10 -75
  135. package/docs/radio-button.md +8 -96
  136. package/docs/range-slider.md +9 -82
  137. package/docs/rating.md +15 -163
  138. package/docs/scroll-view.md +9 -86
  139. package/docs/segmented.md +8 -90
  140. package/docs/sheet.md +10 -74
  141. package/docs/sidebar-menus.md +20 -155
  142. package/docs/sidebar-state.md +16 -134
  143. package/docs/sidebar.md +18 -218
  144. package/docs/skeleton.md +5 -26
  145. package/docs/slider.md +9 -97
  146. package/docs/spinner.md +15 -95
  147. package/docs/split-button.md +21 -166
  148. package/docs/splitter.md +9 -56
  149. package/docs/stepper.md +13 -127
  150. package/docs/switch.md +8 -58
  151. package/docs/tabs.md +13 -111
  152. package/docs/textarea.md +4 -13
  153. package/docs/textbox.md +10 -77
  154. package/docs/theming-built-in-themes.md +67 -0
  155. package/docs/theming-custom-colors.md +274 -0
  156. package/docs/theming-custom-themes.md +168 -0
  157. package/docs/theming.md +164 -248
  158. package/docs/time-picker.md +7 -112
  159. package/docs/tooltip-directive.md +12 -96
  160. package/docs/tooltip.md +12 -96
  161. package/docs/tree-view.md +42 -495
  162. package/docs/window.md +19 -230
  163. package/fesm2022/nanahoshi-mona-ui-auto-complete.mjs +1089 -603
  164. package/fesm2022/nanahoshi-mona-ui-avatar.mjs +369 -184
  165. package/fesm2022/nanahoshi-mona-ui-breadcrumb.mjs +658 -371
  166. package/fesm2022/nanahoshi-mona-ui-button-group.mjs +513 -359
  167. package/fesm2022/nanahoshi-mona-ui-button.mjs +622 -517
  168. package/fesm2022/nanahoshi-mona-ui-calendar.mjs +2070 -1573
  169. package/fesm2022/nanahoshi-mona-ui-card.mjs +620 -316
  170. package/fesm2022/nanahoshi-mona-ui-chart.mjs +61151 -64921
  171. package/fesm2022/nanahoshi-mona-ui-check-box.mjs +646 -317
  172. package/fesm2022/nanahoshi-mona-ui-chip.mjs +737 -516
  173. package/fesm2022/nanahoshi-mona-ui-circular-progress-bar.mjs +441 -242
  174. package/fesm2022/nanahoshi-mona-ui-collapsible.mjs +443 -389
  175. package/fesm2022/nanahoshi-mona-ui-color-gradient.mjs +1138 -814
  176. package/fesm2022/nanahoshi-mona-ui-color-palette.mjs +1114 -959
  177. package/fesm2022/nanahoshi-mona-ui-color-picker.mjs +858 -504
  178. package/fesm2022/nanahoshi-mona-ui-combo-box.mjs +1181 -742
  179. package/fesm2022/nanahoshi-mona-ui-command.mjs +1454 -853
  180. package/fesm2022/nanahoshi-mona-ui-common.mjs +569 -740
  181. package/fesm2022/nanahoshi-mona-ui-contextmenu.mjs +978 -532
  182. package/fesm2022/nanahoshi-mona-ui-date-input.mjs +283 -254
  183. package/fesm2022/nanahoshi-mona-ui-date-picker.mjs +973 -451
  184. package/fesm2022/nanahoshi-mona-ui-datetime-picker.mjs +1203 -658
  185. package/fesm2022/nanahoshi-mona-ui-dialog.mjs +1415 -936
  186. package/fesm2022/nanahoshi-mona-ui-dropdown-button.mjs +1165 -568
  187. package/fesm2022/nanahoshi-mona-ui-dropdown-list.mjs +1142 -677
  188. package/fesm2022/nanahoshi-mona-ui-dropdowns.mjs +1018 -729
  189. package/fesm2022/nanahoshi-mona-ui-editor.mjs +3589 -2122
  190. package/fesm2022/nanahoshi-mona-ui-expansion-panel.mjs +577 -359
  191. package/fesm2022/nanahoshi-mona-ui-fieldset.mjs +311 -151
  192. package/fesm2022/nanahoshi-mona-ui-filter.mjs +1086 -718
  193. package/fesm2022/nanahoshi-mona-ui-grid-grid-colgroup.component-NhONCVIX.mjs +77 -0
  194. package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-Djv8ZnT5.mjs +480 -0
  195. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-WbXAzGCa.mjs +470 -0
  196. package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-DkWTD3pN.mjs +2115 -0
  197. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-DAHqTwBJ.mjs +330 -0
  198. package/fesm2022/nanahoshi-mona-ui-grid-grid.styles-BmLU-3zP.mjs +3766 -0
  199. package/fesm2022/nanahoshi-mona-ui-grid.mjs +5418 -2
  200. package/fesm2022/nanahoshi-mona-ui-i18n-icu.mjs +1379 -1079
  201. package/fesm2022/nanahoshi-mona-ui-i18n.mjs +4451 -5068
  202. package/fesm2022/nanahoshi-mona-ui-internal-filter-input.mjs +344 -143
  203. package/fesm2022/nanahoshi-mona-ui-internal-indicator-icon.mjs +257 -127
  204. package/fesm2022/nanahoshi-mona-ui-internal-list.mjs +2080 -1829
  205. package/fesm2022/nanahoshi-mona-ui-internal-popup-menu.mjs +103 -141
  206. package/fesm2022/nanahoshi-mona-ui-internal-tree.mjs +2498 -2706
  207. package/fesm2022/nanahoshi-mona-ui-internal.mjs +722 -1007
  208. package/fesm2022/nanahoshi-mona-ui-label.mjs +313 -202
  209. package/fesm2022/nanahoshi-mona-ui-list-box.mjs +1308 -1009
  210. package/fesm2022/nanahoshi-mona-ui-list-view.mjs +1411 -677
  211. package/fesm2022/nanahoshi-mona-ui-list.mjs +1 -6
  212. package/fesm2022/nanahoshi-mona-ui-locales-ar-sa.mjs +556 -577
  213. package/fesm2022/nanahoshi-mona-ui-locales-de-de.mjs +530 -573
  214. package/fesm2022/nanahoshi-mona-ui-locales-es-es.mjs +530 -573
  215. package/fesm2022/nanahoshi-mona-ui-locales-fr-fr.mjs +533 -576
  216. package/fesm2022/nanahoshi-mona-ui-locales-id-id.mjs +520 -555
  217. package/fesm2022/nanahoshi-mona-ui-locales-it-it.mjs +530 -571
  218. package/fesm2022/nanahoshi-mona-ui-locales-ja-jp.mjs +520 -555
  219. package/fesm2022/nanahoshi-mona-ui-locales-ko-kr.mjs +520 -555
  220. package/fesm2022/nanahoshi-mona-ui-locales-pt-br.mjs +530 -571
  221. package/fesm2022/nanahoshi-mona-ui-locales-ru-ru.mjs +576 -591
  222. package/fesm2022/nanahoshi-mona-ui-locales-tr-tr.mjs +530 -565
  223. package/fesm2022/nanahoshi-mona-ui-locales-zh-cn.mjs +520 -555
  224. package/fesm2022/nanahoshi-mona-ui-locales-zh-tw.mjs +520 -555
  225. package/fesm2022/nanahoshi-mona-ui-locales.mjs +59 -77
  226. package/fesm2022/nanahoshi-mona-ui-menubar.mjs +1411 -829
  227. package/fesm2022/nanahoshi-mona-ui-multi-select.mjs +1326 -702
  228. package/fesm2022/nanahoshi-mona-ui-notification.mjs +763 -675
  229. package/fesm2022/nanahoshi-mona-ui-numeric-text-box.mjs +1306 -826
  230. package/fesm2022/nanahoshi-mona-ui-otp-input.mjs +1122 -897
  231. package/fesm2022/nanahoshi-mona-ui-pager.mjs +1110 -651
  232. package/fesm2022/nanahoshi-mona-ui-placeholder.mjs +95 -53
  233. package/fesm2022/nanahoshi-mona-ui-popover.mjs +559 -397
  234. package/fesm2022/nanahoshi-mona-ui-popup-menu.mjs +2323 -1694
  235. package/fesm2022/nanahoshi-mona-ui-popup.mjs +1657 -1455
  236. package/fesm2022/nanahoshi-mona-ui-progress-bar.mjs +441 -267
  237. package/fesm2022/nanahoshi-mona-ui-query.mjs +211 -340
  238. package/fesm2022/nanahoshi-mona-ui-radio-button.mjs +1017 -548
  239. package/fesm2022/nanahoshi-mona-ui-rating.mjs +874 -624
  240. package/fesm2022/nanahoshi-mona-ui-scroll-view.mjs +1130 -917
  241. package/fesm2022/nanahoshi-mona-ui-segmented.mjs +705 -455
  242. package/fesm2022/nanahoshi-mona-ui-sheet.mjs +461 -283
  243. package/fesm2022/nanahoshi-mona-ui-sidebar.mjs +2791 -2449
  244. package/fesm2022/nanahoshi-mona-ui-skeleton.mjs +145 -90
  245. package/fesm2022/nanahoshi-mona-ui-slider.mjs +1563 -1103
  246. package/fesm2022/nanahoshi-mona-ui-spinner.mjs +738 -673
  247. package/fesm2022/nanahoshi-mona-ui-split-button.mjs +1287 -647
  248. package/fesm2022/nanahoshi-mona-ui-splitter.mjs +1313 -909
  249. package/fesm2022/nanahoshi-mona-ui-stepper.mjs +761 -540
  250. package/fesm2022/nanahoshi-mona-ui-switch.mjs +611 -280
  251. package/fesm2022/nanahoshi-mona-ui-tabs.mjs +1393 -841
  252. package/fesm2022/nanahoshi-mona-ui-text-area.mjs +142 -73
  253. package/fesm2022/nanahoshi-mona-ui-text-box.mjs +876 -374
  254. package/fesm2022/nanahoshi-mona-ui-theme.mjs +1465 -1449
  255. package/fesm2022/nanahoshi-mona-ui-time-picker.mjs +897 -443
  256. package/fesm2022/nanahoshi-mona-ui-time-selector.mjs +1100 -703
  257. package/fesm2022/nanahoshi-mona-ui-tooltip.mjs +789 -538
  258. package/fesm2022/nanahoshi-mona-ui-tree-view.mjs +1361 -805
  259. package/fesm2022/nanahoshi-mona-ui-window.mjs +2145 -1531
  260. package/fesm2022/nanahoshi-mona-ui.mjs +1 -8
  261. package/llms.txt +80 -2
  262. package/package.json +62 -23
  263. package/types/nanahoshi-mona-ui-auto-complete.d.ts +367 -233
  264. package/types/nanahoshi-mona-ui-avatar.d.ts +722 -649
  265. package/types/nanahoshi-mona-ui-breadcrumb.d.ts +134 -103
  266. package/types/nanahoshi-mona-ui-button-group.d.ts +213 -152
  267. package/types/nanahoshi-mona-ui-button.d.ts +227 -166
  268. package/types/nanahoshi-mona-ui-calendar.d.ts +324 -259
  269. package/types/nanahoshi-mona-ui-card.d.ts +125 -111
  270. package/types/nanahoshi-mona-ui-chart.d.ts +10483 -7326
  271. package/types/nanahoshi-mona-ui-check-box.d.ts +293 -180
  272. package/types/nanahoshi-mona-ui-chip.d.ts +208 -141
  273. package/types/nanahoshi-mona-ui-circular-progress-bar.d.ts +194 -133
  274. package/types/nanahoshi-mona-ui-collapsible.d.ts +105 -87
  275. package/types/nanahoshi-mona-ui-color-gradient.d.ts +281 -213
  276. package/types/nanahoshi-mona-ui-color-palette.d.ts +201 -138
  277. package/types/nanahoshi-mona-ui-color-picker.d.ts +283 -194
  278. package/types/nanahoshi-mona-ui-combo-box.d.ts +401 -262
  279. package/types/nanahoshi-mona-ui-command.d.ts +279 -191
  280. package/types/nanahoshi-mona-ui-common.d.ts +360 -385
  281. package/types/nanahoshi-mona-ui-contextmenu.d.ts +142 -117
  282. package/types/nanahoshi-mona-ui-date-input.d.ts +97 -97
  283. package/types/nanahoshi-mona-ui-date-picker.d.ts +338 -208
  284. package/types/nanahoshi-mona-ui-datetime-picker.d.ts +413 -259
  285. package/types/nanahoshi-mona-ui-dialog.d.ts +470 -381
  286. package/types/nanahoshi-mona-ui-dropdown-button.d.ts +216 -168
  287. package/types/nanahoshi-mona-ui-dropdown-list.d.ts +369 -243
  288. package/types/nanahoshi-mona-ui-dropdowns.d.ts +255 -235
  289. package/types/nanahoshi-mona-ui-editor.d.ts +302 -235
  290. package/types/nanahoshi-mona-ui-expansion-panel.d.ts +140 -109
  291. package/types/nanahoshi-mona-ui-fieldset.d.ts +98 -68
  292. package/types/nanahoshi-mona-ui-filter.d.ts +150 -124
  293. package/types/nanahoshi-mona-ui-grid.d.ts +1956 -1678
  294. package/types/nanahoshi-mona-ui-i18n-icu.d.ts +25 -34
  295. package/types/nanahoshi-mona-ui-i18n.d.ts +999 -1052
  296. package/types/nanahoshi-mona-ui-internal-filter-input.d.ts +118 -71
  297. package/types/nanahoshi-mona-ui-internal-indicator-icon.d.ts +56 -27
  298. package/types/nanahoshi-mona-ui-internal-list.d.ts +474 -408
  299. package/types/nanahoshi-mona-ui-internal-popup-menu.d.ts +143 -150
  300. package/types/nanahoshi-mona-ui-internal-tree.d.ts +493 -506
  301. package/types/nanahoshi-mona-ui-internal.d.ts +195 -213
  302. package/types/nanahoshi-mona-ui-label.d.ts +108 -78
  303. package/types/nanahoshi-mona-ui-list-box.d.ts +392 -322
  304. package/types/nanahoshi-mona-ui-list-view.d.ts +423 -282
  305. package/types/nanahoshi-mona-ui-list.d.ts +2 -1
  306. package/types/nanahoshi-mona-ui-locales-ar-sa.d.ts +540 -542
  307. package/types/nanahoshi-mona-ui-locales-de-de.d.ts +540 -542
  308. package/types/nanahoshi-mona-ui-locales-es-es.d.ts +540 -542
  309. package/types/nanahoshi-mona-ui-locales-fr-fr.d.ts +540 -542
  310. package/types/nanahoshi-mona-ui-locales-id-id.d.ts +540 -542
  311. package/types/nanahoshi-mona-ui-locales-it-it.d.ts +540 -542
  312. package/types/nanahoshi-mona-ui-locales-ja-jp.d.ts +540 -542
  313. package/types/nanahoshi-mona-ui-locales-ko-kr.d.ts +540 -542
  314. package/types/nanahoshi-mona-ui-locales-pt-br.d.ts +540 -542
  315. package/types/nanahoshi-mona-ui-locales-ru-ru.d.ts +540 -542
  316. package/types/nanahoshi-mona-ui-locales-tr-tr.d.ts +540 -542
  317. package/types/nanahoshi-mona-ui-locales-zh-cn.d.ts +540 -542
  318. package/types/nanahoshi-mona-ui-locales-zh-tw.d.ts +540 -542
  319. package/types/nanahoshi-mona-ui-locales.d.ts +17 -19
  320. package/types/nanahoshi-mona-ui-menubar.d.ts +210 -181
  321. package/types/nanahoshi-mona-ui-multi-select.d.ts +416 -276
  322. package/types/nanahoshi-mona-ui-notification.d.ts +140 -151
  323. package/types/nanahoshi-mona-ui-numeric-text-box.d.ts +407 -270
  324. package/types/nanahoshi-mona-ui-otp-input.d.ts +364 -241
  325. package/types/nanahoshi-mona-ui-pager.d.ts +379 -301
  326. package/types/nanahoshi-mona-ui-placeholder.d.ts +35 -28
  327. package/types/nanahoshi-mona-ui-popover.d.ts +176 -134
  328. package/types/nanahoshi-mona-ui-popup-menu.d.ts +488 -344
  329. package/types/nanahoshi-mona-ui-popup.d.ts +698 -560
  330. package/types/nanahoshi-mona-ui-progress-bar.d.ts +197 -137
  331. package/types/nanahoshi-mona-ui-query.d.ts +82 -88
  332. package/types/nanahoshi-mona-ui-radio-button.d.ts +434 -269
  333. package/types/nanahoshi-mona-ui-rating.d.ts +348 -254
  334. package/types/nanahoshi-mona-ui-scroll-view.d.ts +244 -172
  335. package/types/nanahoshi-mona-ui-segmented.d.ts +250 -175
  336. package/types/nanahoshi-mona-ui-sheet.d.ts +115 -63
  337. package/types/nanahoshi-mona-ui-sidebar.d.ts +653 -493
  338. package/types/nanahoshi-mona-ui-skeleton.d.ts +55 -39
  339. package/types/nanahoshi-mona-ui-slider.d.ts +503 -354
  340. package/types/nanahoshi-mona-ui-spinner.d.ts +125 -112
  341. package/types/nanahoshi-mona-ui-split-button.d.ts +241 -196
  342. package/types/nanahoshi-mona-ui-splitter.d.ts +124 -78
  343. package/types/nanahoshi-mona-ui-stepper.d.ts +206 -181
  344. package/types/nanahoshi-mona-ui-switch.d.ts +197 -131
  345. package/types/nanahoshi-mona-ui-tabs.d.ts +349 -248
  346. package/types/nanahoshi-mona-ui-text-area.d.ts +52 -36
  347. package/types/nanahoshi-mona-ui-text-box.d.ts +349 -218
  348. package/types/nanahoshi-mona-ui-theme.d.ts +415 -408
  349. package/types/nanahoshi-mona-ui-time-picker.d.ts +357 -217
  350. package/types/nanahoshi-mona-ui-time-selector.d.ts +255 -170
  351. package/types/nanahoshi-mona-ui-tooltip.d.ts +222 -144
  352. package/types/nanahoshi-mona-ui-tree-view.d.ts +466 -308
  353. package/types/nanahoshi-mona-ui-window.d.ts +494 -399
  354. package/types/nanahoshi-mona-ui.d.ts +1 -2
  355. package/fesm2022/nanahoshi-mona-ui-grid-grid-footer-row.component-DjNnVxHE.mjs +0 -181
  356. package/fesm2022/nanahoshi-mona-ui-grid-grid-list.component-ihQIKeP-.mjs +0 -208
  357. package/fesm2022/nanahoshi-mona-ui-grid-grid-row.component-BpnybNcs.mjs +0 -1082
  358. package/fesm2022/nanahoshi-mona-ui-grid-grid-virtual-list.component-CYlgfc7c.mjs +0 -186
  359. package/fesm2022/nanahoshi-mona-ui-grid-nanahoshi-mona-ui-grid-LCzfCYd3.mjs +0 -7568
@@ -1,27 +1,23 @@
1
- import { CdkTrapFocus } from '@angular/cdk/a11y';
2
- import { NgTemplateOutlet } from '@angular/common';
3
- import * as i0 from '@angular/core';
4
- import { inject, DestroyRef, ElementRef, computed, contentChild, viewChild, TemplateRef, input, output, booleanAttribute, model, effect, untracked, afterNextRender, forwardRef, Component } from '@angular/core';
5
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
- import { LucideCalendar } from '@lucide/angular';
7
- import { ButtonDirective } from '@nanahoshi/mona-ui/button';
8
- import { CalendarDecadeCellTemplateDirective, CalendarMonthCellTemplateDirective, CalendarYearCellTemplateDirective, CalendarComponent } from '@nanahoshi/mona-ui/calendar';
9
- import { CalendarService, datePopupThemeVariants, DateInputPrefixTemplateDirective, createTypedDateInput } from '@nanahoshi/mona-ui/date-input';
10
- import * as i1 from '@nanahoshi/mona-ui/dropdowns';
11
- import { DropdownService, DROPDOWN_POPUP_INPUT_TOKEN, DropdownPopupHandlerDirective } from '@nanahoshi/mona-ui/dropdowns';
12
- import { MonaI18nService, getLocaleDateInputFormat } from '@nanahoshi/mona-ui/i18n';
13
- import { themeControlSurfaceClasses, injectEffectiveDisabled, createElementControlId } from '@nanahoshi/mona-ui/internal';
14
- import { TextBoxComponent, TextBoxSuffixTemplateDirective, TextBoxPrefixTemplateDirective } from '@nanahoshi/mona-ui/text-box';
15
- import { twMerge } from 'tailwind-merge';
16
- import { cva } from 'class-variance-authority';
17
-
18
- // Generated from i18n/catalogs/en-US.messages.json by scripts/generate-locale-catalogs.ts. Do not edit.
19
- // Edit the JSON file and run `npm run generate:locale-catalogs`.
1
+ import { CdkTrapFocus } from "@angular/cdk/a11y";
2
+ import { NgTemplateOutlet } from "@angular/common";
3
+ import * as i0 from "@angular/core";
4
+ import { Component, DestroyRef, ElementRef, TemplateRef, afterNextRender, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, model, output, untracked, viewChild } from "@angular/core";
5
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
6
+ import { LucideCalendar } from "@lucide/angular";
7
+ import { ButtonDirective } from "@nanahoshi/mona-ui/button";
8
+ import { CalendarComponent, CalendarDecadeCellTemplateDirective, CalendarMonthCellTemplateDirective, CalendarYearCellTemplateDirective } from "@nanahoshi/mona-ui/calendar";
9
+ import { CalendarService, DateInputPrefixTemplateDirective, createTypedDateInput, datePopupThemeVariants } from "@nanahoshi/mona-ui/date-input";
10
+ import * as i1 from "@nanahoshi/mona-ui/dropdowns";
11
+ import { DROPDOWN_POPUP_INPUT_TOKEN, DropdownPopupHandlerDirective, DropdownService } from "@nanahoshi/mona-ui/dropdowns";
12
+ import { MonaI18nService, getLocaleDateInputFormat } from "@nanahoshi/mona-ui/i18n";
13
+ import { createElementControlId, injectEffectiveDisabled, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
14
+ import { TextBoxComponent, TextBoxPrefixTemplateDirective, TextBoxSuffixTemplateDirective } from "@nanahoshi/mona-ui/text-box";
15
+ import { twMerge } from "tailwind-merge";
16
+ import { cva } from "class-variance-authority";
20
17
  const DATE_PICKER_DEFAULT_MESSAGES = {
21
- datePicker: "Date picker",
22
- openCalendar: "Open calendar"
18
+ datePicker: "Date picker",
19
+ openCalendar: "Open calendar"
23
20
  };
24
-
25
21
  const datePickerBaseThemeVariants = cva(`
26
22
  flex w-auto items-center
27
23
  ${themeControlSurfaceClasses} text-foreground
@@ -50,434 +46,960 @@ const datePickerBaseThemeVariants = cva(`
50
46
  [&_mona-text-box]:focus-within:ring-0
51
47
  [&_mona-text-box[data-invalid='true']]:ring-0
52
48
  `, {
53
- variants: {
54
- focused: {
55
- true: "border-focus-indicator ring-2 ring-focus-indicator/35",
56
- false: ""
57
- },
58
- rounded: {
59
- full: "rounded-full",
60
- large: "rounded-lg",
61
- medium: "rounded-md",
62
- none: "rounded-none",
63
- small: "rounded-sm"
64
- },
65
- size: {
66
- large: "h-10 text-base",
67
- medium: "h-9 text-sm",
68
- small: "h-8 text-xs"
69
- }
70
- },
71
- compoundVariants: [
72
- {
73
- focused: true,
74
- class: "data-[invalid='true']:border-error data-[invalid='true']:ring-error/35"
75
- }
76
- ]
49
+ variants: {
50
+ focused: {
51
+ true: "border-focus-indicator ring-2 ring-focus-indicator/35",
52
+ false: ""
53
+ },
54
+ rounded: {
55
+ full: "rounded-full",
56
+ large: "rounded-lg",
57
+ medium: "rounded-md",
58
+ none: "rounded-none",
59
+ small: "rounded-sm"
60
+ },
61
+ size: {
62
+ large: "h-10 text-base",
63
+ medium: "h-9 text-sm",
64
+ small: "h-8 text-xs"
65
+ }
66
+ },
67
+ compoundVariants: [{
68
+ focused: true,
69
+ class: "data-[invalid='true']:border-error data-[invalid='true']:ring-error/35"
70
+ }]
71
+ });
72
+ var DatePickerComponent = class DatePickerComponent {
73
+ #calendarService;
74
+ #destroyRef;
75
+ #dropdownService;
76
+ #hostElementRef;
77
+ #i18n;
78
+ constructor() {
79
+ this.#calendarService = inject(CalendarService);
80
+ this.#destroyRef = inject(DestroyRef);
81
+ this.#dropdownService = inject(DropdownService);
82
+ this.#hostElementRef = inject(ElementRef);
83
+ this.#i18n = inject(MonaI18nService);
84
+ this.baseClass = computed(() => {
85
+ const focused = this.#dropdownService.popupRef() != null;
86
+ const rounded = this.rounded();
87
+ const size = this.size();
88
+ const variantClass = datePickerBaseThemeVariants({
89
+ focused,
90
+ rounded,
91
+ size
92
+ });
93
+ const userClass = this.userClass();
94
+ return twMerge(variantClass, userClass);
95
+ }, ...ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []);
96
+ this.decadeCellTemplate = contentChild(CalendarDecadeCellTemplateDirective, ...ngDevMode ? [{ debugName: "decadeCellTemplate" }] : /* istanbul ignore next */ []);
97
+ this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled());
98
+ this.effectiveFormat = computed(() => {
99
+ return this.format() ?? getLocaleDateInputFormat(this.#i18n.localeId());
100
+ }, ...ngDevMode ? [{ debugName: "effectiveFormat" }] : /* istanbul ignore next */ []);
101
+ this.expanded = computed(() => this.#dropdownService.popupRef() !== null, ...ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []);
102
+ this.inputAttributes = computed(() => {
103
+ return {
104
+ "aria-autocomplete": "none",
105
+ "aria-controls": this.popupId,
106
+ "aria-expanded": this.expanded() ? "true" : "false",
107
+ "aria-haspopup": "dialog",
108
+ readonly: this.readonly() || this.readonlyInput(),
109
+ role: "combobox"
110
+ };
111
+ }, ...ngDevMode ? [{ debugName: "inputAttributes" }] : /* istanbul ignore next */ []);
112
+ this.invalidState = computed(() => this.typedInput.errors().length > 0 || this.touched() && (this.invalid() || this.required() && !this.value()), ...ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []);
113
+ this.messages = this.#i18n.componentMessages("datePicker", DATE_PICKER_DEFAULT_MESSAGES);
114
+ this.monthCellTemplate = contentChild(CalendarMonthCellTemplateDirective, ...ngDevMode ? [{ debugName: "monthCellTemplate" }] : /* istanbul ignore next */ []);
115
+ this.pickerPopupClass = computed(() => {
116
+ const rounded = this.rounded();
117
+ const size = this.size();
118
+ const userClass = this.popupClass();
119
+ const variantClass = datePopupThemeVariants({
120
+ rounded,
121
+ size
122
+ });
123
+ return twMerge(variantClass, userClass);
124
+ }, ...ngDevMode ? [{ debugName: "pickerPopupClass" }] : /* istanbul ignore next */ []);
125
+ this.popupId = createElementControlId();
126
+ this.popupTemplate = viewChild.required("popupTemplate", ...ngDevMode ? [{ debugName: "popupTemplate" }] : /* istanbul ignore next */ []);
127
+ this.prefixTemplate = contentChild(DateInputPrefixTemplateDirective, {
128
+ ...ngDevMode ? { debugName: "prefixTemplate" } : /* istanbul ignore next */ {},
129
+ read: TemplateRef
130
+ });
131
+ this.yearCellTemplate = contentChild(CalendarYearCellTemplateDirective, ...ngDevMode ? [{ debugName: "yearCellTemplate" }] : /* istanbul ignore next */ []);
132
+ this.ariaDescribedBy = input("", {
133
+ ...ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {},
134
+ alias: "aria-describedby"
135
+ });
136
+ this.ariaLabel = input("", {
137
+ ...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
138
+ alias: "aria-label"
139
+ });
140
+ this.ariaLabelledBy = input("", {
141
+ ...ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {},
142
+ alias: "aria-labelledby"
143
+ });
144
+ this.close = output();
145
+ this.closed = output();
146
+ this.disabled = input(false, {
147
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
148
+ transform: booleanAttribute
149
+ });
150
+ this.disabledDates = input(...ngDevMode ? [void 0, { debugName: "disabledDates" }] : /* istanbul ignore next */ []);
151
+ this.firstDay = input(null, ...ngDevMode ? [{ debugName: "firstDay" }] : /* istanbul ignore next */ []);
152
+ this.format = input(null, ...ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []);
153
+ this.inputId = input(createElementControlId(), ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
154
+ this.invalid = input(false, {
155
+ ...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
156
+ transform: booleanAttribute
157
+ });
158
+ this.max = input(void 0, {
159
+ ...ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {},
160
+ transform: (value) => value instanceof Date ? value : void 0
161
+ });
162
+ this.min = input(void 0, {
163
+ ...ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {},
164
+ transform: (value) => value instanceof Date ? value : void 0
165
+ });
166
+ this.open = output();
167
+ this.opened = output();
168
+ this.placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
169
+ this.popupClass = input("", ...ngDevMode ? [{ debugName: "popupClass" }] : /* istanbul ignore next */ []);
170
+ this.popupHeight = input("", ...ngDevMode ? [{ debugName: "popupHeight" }] : /* istanbul ignore next */ []);
171
+ this.popupWidth = input("", ...ngDevMode ? [{ debugName: "popupWidth" }] : /* istanbul ignore next */ []);
172
+ this.readonly = input(false, {
173
+ ...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
174
+ transform: booleanAttribute
175
+ });
176
+ this.readonlyInput = input(false, {
177
+ ...ngDevMode ? { debugName: "readonlyInput" } : /* istanbul ignore next */ {},
178
+ transform: booleanAttribute
179
+ });
180
+ this.required = input(false, {
181
+ ...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
182
+ transform: booleanAttribute
183
+ });
184
+ this.rounded = input("medium", ...ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []);
185
+ this.showClearButton = input(false, {
186
+ ...ngDevMode ? { debugName: "showClearButton" } : /* istanbul ignore next */ {},
187
+ transform: booleanAttribute
188
+ });
189
+ this.size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
190
+ this.touch = output();
191
+ this.touched = input(false, {
192
+ ...ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {},
193
+ transform: booleanAttribute
194
+ });
195
+ this.userClass = input("", {
196
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
197
+ alias: "class"
198
+ });
199
+ this.value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
200
+ this.weekNumber = input(false, {
201
+ ...ngDevMode ? { debugName: "weekNumber" } : /* istanbul ignore next */ {},
202
+ transform: booleanAttribute
203
+ });
204
+ this.typedInput = createTypedDateInput({
205
+ constraints: () => ({
206
+ disabledDates: this.disabledDates(),
207
+ max: this.max(),
208
+ min: this.min(),
209
+ unit: "date"
210
+ }),
211
+ format: () => this.effectiveFormat(),
212
+ localeId: () => this.#i18n.localeId(),
213
+ value: this.value
214
+ });
215
+ effect(() => {
216
+ const popupTemplate = this.popupTemplate();
217
+ untracked(() => this.#dropdownService.popupTemplate.set(popupTemplate));
218
+ });
219
+ afterNextRender({ read: () => {
220
+ this.setCalendarKeyboardSubscription();
221
+ this.setPopupCloseSubscription();
222
+ } });
223
+ }
224
+ focus(options) {
225
+ const input = this.#hostElementRef.nativeElement.querySelector("input");
226
+ if (input) {
227
+ input.focus(options);
228
+ input.setSelectionRange(input.value.length, input.value.length);
229
+ }
230
+ }
231
+ onCalendarValueChange(date) {
232
+ const singleDate = Array.isArray(date) ? null : date;
233
+ this.value.set(singleDate ? new Date(singleDate) : null);
234
+ this.closePopup();
235
+ }
236
+ onDateInputButtonClick() {
237
+ const popupRef = this.#dropdownService.popupRef();
238
+ if (!this.popupTemplate() || this.effectiveDisabled() || this.readonly()) return;
239
+ if (popupRef) {
240
+ popupRef.close();
241
+ return;
242
+ }
243
+ this.openPopup();
244
+ }
245
+ onFocusIn(event) {
246
+ if (event.target === this.#hostElementRef.nativeElement) this.focus();
247
+ }
248
+ onFocusOut(event) {
249
+ if (this.#destroyRef.destroyed) return;
250
+ const nextTarget = event.relatedTarget;
251
+ if (nextTarget instanceof Node) {
252
+ const popupElement = this.#dropdownService.popupRef()?.overlayRef.overlayElement;
253
+ if (this.#hostElementRef.nativeElement.contains(nextTarget) || popupElement?.contains(nextTarget)) return;
254
+ }
255
+ this.touch.emit();
256
+ }
257
+ onInputBlur() {
258
+ this.typedInput.commit();
259
+ }
260
+ onKeydown(event) {
261
+ if (this.effectiveDisabled() || this.readonly()) return;
262
+ if (event.altKey && event.key === "ArrowDown") {
263
+ event.preventDefault();
264
+ this.openPopup();
265
+ } else if (event.altKey && event.key === "ArrowUp" || event.key === "Escape") {
266
+ if (this.expanded()) {
267
+ event.preventDefault();
268
+ this.closePopup();
269
+ }
270
+ } else if (event.key === "Enter" && event.target instanceof HTMLInputElement) {
271
+ if (!event.isComposing && event.keyCode !== 229) this.typedInput.commit();
272
+ }
273
+ }
274
+ closePopup() {
275
+ this.#dropdownService.popupRef()?.close();
276
+ }
277
+ openPopup() {
278
+ if (!this.#dropdownService.popupRef()) this.#dropdownService.triggerPopupOpen$.next({
279
+ height: this.popupHeight() || "auto",
280
+ maxHeight: "auto",
281
+ width: this.popupWidth() || "auto",
282
+ closeOnScroll: false,
283
+ withScrollTracking: true
284
+ });
285
+ }
286
+ setCalendarKeyboardSubscription() {
287
+ this.#calendarService.keydown$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe((event) => {
288
+ const keyboardEvent = event.originalEvent;
289
+ if (keyboardEvent && (keyboardEvent.key === "Escape" || keyboardEvent.altKey && keyboardEvent.key === "ArrowUp")) {
290
+ keyboardEvent.preventDefault();
291
+ this.closePopup();
292
+ }
293
+ });
294
+ }
295
+ setPopupCloseSubscription() {
296
+ this.#dropdownService.popupCloseComplete$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => {
297
+ if (this.#dropdownService.focusCanReturn()) this.focus();
298
+ else if (!this.#destroyRef.destroyed) this.touch.emit();
299
+ });
300
+ }
301
+ static {
302
+ this.ɵfac = i0.ɵɵngDeclareFactory({
303
+ minVersion: "12.0.0",
304
+ version: "22.2.6",
305
+ ngImport: i0,
306
+ type: DatePickerComponent,
307
+ deps: [],
308
+ target: i0.ɵɵFactoryTarget.Component
309
+ });
310
+ }
311
+ static {
312
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
313
+ minVersion: "17.0.0",
314
+ version: "22.2.6",
315
+ type: DatePickerComponent,
316
+ isStandalone: true,
317
+ selector: "mona-date-picker",
318
+ inputs: {
319
+ ariaDescribedBy: {
320
+ classPropertyName: "ariaDescribedBy",
321
+ publicName: "aria-describedby",
322
+ isSignal: true,
323
+ isRequired: false,
324
+ transformFunction: null
325
+ },
326
+ ariaLabel: {
327
+ classPropertyName: "ariaLabel",
328
+ publicName: "aria-label",
329
+ isSignal: true,
330
+ isRequired: false,
331
+ transformFunction: null
332
+ },
333
+ ariaLabelledBy: {
334
+ classPropertyName: "ariaLabelledBy",
335
+ publicName: "aria-labelledby",
336
+ isSignal: true,
337
+ isRequired: false,
338
+ transformFunction: null
339
+ },
340
+ disabled: {
341
+ classPropertyName: "disabled",
342
+ publicName: "disabled",
343
+ isSignal: true,
344
+ isRequired: false,
345
+ transformFunction: null
346
+ },
347
+ disabledDates: {
348
+ classPropertyName: "disabledDates",
349
+ publicName: "disabledDates",
350
+ isSignal: true,
351
+ isRequired: false,
352
+ transformFunction: null
353
+ },
354
+ firstDay: {
355
+ classPropertyName: "firstDay",
356
+ publicName: "firstDay",
357
+ isSignal: true,
358
+ isRequired: false,
359
+ transformFunction: null
360
+ },
361
+ format: {
362
+ classPropertyName: "format",
363
+ publicName: "format",
364
+ isSignal: true,
365
+ isRequired: false,
366
+ transformFunction: null
367
+ },
368
+ inputId: {
369
+ classPropertyName: "inputId",
370
+ publicName: "inputId",
371
+ isSignal: true,
372
+ isRequired: false,
373
+ transformFunction: null
374
+ },
375
+ invalid: {
376
+ classPropertyName: "invalid",
377
+ publicName: "invalid",
378
+ isSignal: true,
379
+ isRequired: false,
380
+ transformFunction: null
381
+ },
382
+ max: {
383
+ classPropertyName: "max",
384
+ publicName: "max",
385
+ isSignal: true,
386
+ isRequired: false,
387
+ transformFunction: null
388
+ },
389
+ min: {
390
+ classPropertyName: "min",
391
+ publicName: "min",
392
+ isSignal: true,
393
+ isRequired: false,
394
+ transformFunction: null
395
+ },
396
+ placeholder: {
397
+ classPropertyName: "placeholder",
398
+ publicName: "placeholder",
399
+ isSignal: true,
400
+ isRequired: false,
401
+ transformFunction: null
402
+ },
403
+ popupClass: {
404
+ classPropertyName: "popupClass",
405
+ publicName: "popupClass",
406
+ isSignal: true,
407
+ isRequired: false,
408
+ transformFunction: null
409
+ },
410
+ popupHeight: {
411
+ classPropertyName: "popupHeight",
412
+ publicName: "popupHeight",
413
+ isSignal: true,
414
+ isRequired: false,
415
+ transformFunction: null
416
+ },
417
+ popupWidth: {
418
+ classPropertyName: "popupWidth",
419
+ publicName: "popupWidth",
420
+ isSignal: true,
421
+ isRequired: false,
422
+ transformFunction: null
423
+ },
424
+ readonly: {
425
+ classPropertyName: "readonly",
426
+ publicName: "readonly",
427
+ isSignal: true,
428
+ isRequired: false,
429
+ transformFunction: null
430
+ },
431
+ readonlyInput: {
432
+ classPropertyName: "readonlyInput",
433
+ publicName: "readonlyInput",
434
+ isSignal: true,
435
+ isRequired: false,
436
+ transformFunction: null
437
+ },
438
+ required: {
439
+ classPropertyName: "required",
440
+ publicName: "required",
441
+ isSignal: true,
442
+ isRequired: false,
443
+ transformFunction: null
444
+ },
445
+ rounded: {
446
+ classPropertyName: "rounded",
447
+ publicName: "rounded",
448
+ isSignal: true,
449
+ isRequired: false,
450
+ transformFunction: null
451
+ },
452
+ showClearButton: {
453
+ classPropertyName: "showClearButton",
454
+ publicName: "showClearButton",
455
+ isSignal: true,
456
+ isRequired: false,
457
+ transformFunction: null
458
+ },
459
+ size: {
460
+ classPropertyName: "size",
461
+ publicName: "size",
462
+ isSignal: true,
463
+ isRequired: false,
464
+ transformFunction: null
465
+ },
466
+ touched: {
467
+ classPropertyName: "touched",
468
+ publicName: "touched",
469
+ isSignal: true,
470
+ isRequired: false,
471
+ transformFunction: null
472
+ },
473
+ userClass: {
474
+ classPropertyName: "userClass",
475
+ publicName: "class",
476
+ isSignal: true,
477
+ isRequired: false,
478
+ transformFunction: null
479
+ },
480
+ value: {
481
+ classPropertyName: "value",
482
+ publicName: "value",
483
+ isSignal: true,
484
+ isRequired: false,
485
+ transformFunction: null
486
+ },
487
+ weekNumber: {
488
+ classPropertyName: "weekNumber",
489
+ publicName: "weekNumber",
490
+ isSignal: true,
491
+ isRequired: false,
492
+ transformFunction: null
493
+ }
494
+ },
495
+ outputs: {
496
+ close: "close",
497
+ closed: "closed",
498
+ open: "open",
499
+ opened: "opened",
500
+ touch: "touch",
501
+ value: "valueChange"
502
+ },
503
+ host: {
504
+ listeners: {
505
+ "focusin": "onFocusIn($event)",
506
+ "focusout": "onFocusOut($event)",
507
+ "keydown": "onKeydown($event)"
508
+ },
509
+ properties: {
510
+ "attr.aria-describedby": "null",
511
+ "attr.aria-label": "null",
512
+ "attr.aria-labelledby": "null",
513
+ "attr.tabindex": "effectiveDisabled() ? null : -1",
514
+ "attr.aria-invalid": "invalidState() ? 'true' : null",
515
+ "attr.data-disabled": "effectiveDisabled() || null",
516
+ "attr.data-expanded": "expanded()",
517
+ "attr.data-invalid": "invalidState() || null",
518
+ "attr.data-readonly": "readonly() || null",
519
+ "class": "baseClass()"
520
+ }
521
+ },
522
+ providers: [
523
+ DropdownService,
524
+ CalendarService,
525
+ {
526
+ provide: DROPDOWN_POPUP_INPUT_TOKEN,
527
+ useExisting: forwardRef(() => DatePickerComponent),
528
+ multi: false
529
+ }
530
+ ],
531
+ queries: [
532
+ {
533
+ propertyName: "decadeCellTemplate",
534
+ first: true,
535
+ predicate: CalendarDecadeCellTemplateDirective,
536
+ descendants: true,
537
+ isSignal: true
538
+ },
539
+ {
540
+ propertyName: "monthCellTemplate",
541
+ first: true,
542
+ predicate: CalendarMonthCellTemplateDirective,
543
+ descendants: true,
544
+ isSignal: true
545
+ },
546
+ {
547
+ propertyName: "prefixTemplate",
548
+ first: true,
549
+ predicate: DateInputPrefixTemplateDirective,
550
+ descendants: true,
551
+ read: TemplateRef,
552
+ isSignal: true
553
+ },
554
+ {
555
+ propertyName: "yearCellTemplate",
556
+ first: true,
557
+ predicate: CalendarYearCellTemplateDirective,
558
+ descendants: true,
559
+ isSignal: true
560
+ }
561
+ ],
562
+ viewQueries: [{
563
+ propertyName: "popupTemplate",
564
+ first: true,
565
+ predicate: ["popupTemplate"],
566
+ descendants: true,
567
+ isSignal: true
568
+ }],
569
+ hostDirectives: [{ directive: i1.DropdownPopupHandlerDirective }],
570
+ ngImport: i0,
571
+ template: "<mona-text-box\n (inputBlur)=\"onInputBlur()\"\n (valueChange)=\"typedInput.edit($event)\"\n [aria-describedby]=\"ariaDescribedBy()\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledBy()\"\n [disabled]=\"effectiveDisabled()\"\n [inputId]=\"inputId()\"\n [value]=\"typedInput.text()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [inputAttributes]=\"inputAttributes()\"\n [invalid]=\"invalidState()\"\n [required]=\"required()\"\n [clearButton]=\"showClearButton()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"invalidState() || touched()\">\n @if (prefixTemplate()) {\n <ng-template monaTextBoxPrefixTemplate>\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </ng-template>\n }\n <ng-template monaTextBoxSuffixTemplate>\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [rounded]=\"'none'\"\n [size]=\"size()\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"messages().openCalendar\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n [disabled]=\"effectiveDisabled() || readonly()\"\n [tabindex]=\"-1\"\n (click)=\"onDateInputButtonClick()\">\n <svg lucideCalendar [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #popupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n aria-modal=\"true\"\n role=\"dialog\"\n [attr.aria-label]=\"messages().datePicker\"\n cdkTrapFocus>\n <mona-calendar\n focusOnMount\n [disabledDates]=\"disabledDates()\"\n [minDate]=\"min()\"\n [maxDate]=\"max()\"\n [readonly]=\"readonly()\"\n [rounded]=\"rounded()\"\n [weekNumber]=\"weekNumber()\"\n [firstDay]=\"firstDay()\"\n [value]=\"value()\"\n (valueChange)=\"onCalendarValueChange($event)\">\n @if (decadeCellTemplate()) {\n <ng-template monaCalendarDecadeCellTemplate let-year>\n <ng-container\n [ngTemplateOutlet]=\"decadeCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year }\"></ng-container>\n </ng-template>\n }\n @if (monthCellTemplate()) {\n <ng-template monaCalendarMonthCellTemplate let-day let-date=\"date\">\n <ng-container\n [ngTemplateOutlet]=\"monthCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: day, date }\"></ng-container>\n </ng-template>\n }\n @if (yearCellTemplate()) {\n <ng-template monaCalendarYearCellTemplate let-year let-text=\"text\">\n <ng-container\n [ngTemplateOutlet]=\"yearCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year, text }\"></ng-container>\n </ng-template>\n }\n </mona-calendar>\n </div>\n</ng-template>\n",
572
+ dependencies: [
573
+ {
574
+ kind: "component",
575
+ type: LucideCalendar,
576
+ selector: "svg[lucideCalendar]"
577
+ },
578
+ {
579
+ kind: "component",
580
+ type: CalendarComponent,
581
+ selector: "mona-calendar",
582
+ inputs: [
583
+ "disabled",
584
+ "disabledDates",
585
+ "firstDay",
586
+ "focusOnMount",
587
+ "invalid",
588
+ "maxDate",
589
+ "minDate",
590
+ "readonly",
591
+ "required",
592
+ "rounded",
593
+ "selection",
594
+ "touched",
595
+ "class",
596
+ "value",
597
+ "weekNumber"
598
+ ],
599
+ outputs: ["touch", "valueChange"]
600
+ },
601
+ {
602
+ kind: "component",
603
+ type: TextBoxComponent,
604
+ selector: "mona-text-box",
605
+ inputs: [
606
+ "aria-describedby",
607
+ "aria-label",
608
+ "aria-labelledby",
609
+ "clearButton",
610
+ "disabled",
611
+ "inputAttributes",
612
+ "inputClass",
613
+ "inputId",
614
+ "inputStyle",
615
+ "invalid",
616
+ "maxLength",
617
+ "minLength",
618
+ "name",
619
+ "placeholder",
620
+ "readonly",
621
+ "required",
622
+ "rounded",
623
+ "size",
624
+ "touched",
625
+ "type",
626
+ "class",
627
+ "value"
628
+ ],
629
+ outputs: [
630
+ "inputBlur",
631
+ "inputFocus",
632
+ "touch",
633
+ "valueChange"
634
+ ]
635
+ },
636
+ {
637
+ kind: "directive",
638
+ type: TextBoxSuffixTemplateDirective,
639
+ selector: "ng-template[monaTextBoxSuffixTemplate]"
640
+ },
641
+ {
642
+ kind: "directive",
643
+ type: CalendarDecadeCellTemplateDirective,
644
+ selector: "ng-template[monaCalendarDecadeCellTemplate]"
645
+ },
646
+ {
647
+ kind: "directive",
648
+ type: NgTemplateOutlet,
649
+ selector: "[ngTemplateOutlet]",
650
+ inputs: [
651
+ "ngTemplateOutletContext",
652
+ "ngTemplateOutlet",
653
+ "ngTemplateOutletInjector"
654
+ ]
655
+ },
656
+ {
657
+ kind: "directive",
658
+ type: CalendarMonthCellTemplateDirective,
659
+ selector: "ng-template[monaCalendarMonthCellTemplate]"
660
+ },
661
+ {
662
+ kind: "directive",
663
+ type: CalendarYearCellTemplateDirective,
664
+ selector: "ng-template[monaCalendarYearCellTemplate]"
665
+ },
666
+ {
667
+ kind: "directive",
668
+ type: TextBoxPrefixTemplateDirective,
669
+ selector: "ng-template[monaTextBoxPrefixTemplate]"
670
+ },
671
+ {
672
+ kind: "directive",
673
+ type: ButtonDirective,
674
+ selector: "button[monaButton]",
675
+ inputs: [
676
+ "aria-haspopup",
677
+ "disabled",
678
+ "iconOnly",
679
+ "loading",
680
+ "look",
681
+ "rounded",
682
+ "selected",
683
+ "size",
684
+ "tabindex",
685
+ "toggleable",
686
+ "type",
687
+ "class",
688
+ "value"
689
+ ],
690
+ outputs: ["lookChange", "selectedChange"]
691
+ },
692
+ {
693
+ kind: "directive",
694
+ type: CdkTrapFocus,
695
+ selector: "[cdkTrapFocus]",
696
+ inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"],
697
+ exportAs: ["cdkTrapFocus"]
698
+ }
699
+ ]
700
+ });
701
+ }
702
+ };
703
+ i0.ɵɵngDeclareClassMetadata({
704
+ minVersion: "12.0.0",
705
+ version: "22.2.6",
706
+ ngImport: i0,
707
+ type: DatePickerComponent,
708
+ decorators: [{
709
+ type: Component,
710
+ args: [{
711
+ selector: "mona-date-picker",
712
+ providers: [
713
+ DropdownService,
714
+ CalendarService,
715
+ {
716
+ provide: DROPDOWN_POPUP_INPUT_TOKEN,
717
+ useExisting: forwardRef(() => DatePickerComponent),
718
+ multi: false
719
+ }
720
+ ],
721
+ imports: [
722
+ LucideCalendar,
723
+ CalendarComponent,
724
+ TextBoxComponent,
725
+ TextBoxSuffixTemplateDirective,
726
+ CalendarDecadeCellTemplateDirective,
727
+ NgTemplateOutlet,
728
+ CalendarMonthCellTemplateDirective,
729
+ CalendarYearCellTemplateDirective,
730
+ TextBoxPrefixTemplateDirective,
731
+ ButtonDirective,
732
+ CdkTrapFocus
733
+ ],
734
+ hostDirectives: [DropdownPopupHandlerDirective],
735
+ host: {
736
+ "[attr.aria-describedby]": "null",
737
+ "[attr.aria-label]": "null",
738
+ "[attr.aria-labelledby]": "null",
739
+ "[attr.tabindex]": "effectiveDisabled() ? null : -1",
740
+ "[attr.aria-invalid]": "invalidState() ? 'true' : null",
741
+ "[attr.data-disabled]": "effectiveDisabled() || null",
742
+ "[attr.data-expanded]": "expanded()",
743
+ "[attr.data-invalid]": "invalidState() || null",
744
+ "[attr.data-readonly]": "readonly() || null",
745
+ "[class]": "baseClass()",
746
+ "(focusin)": "onFocusIn($event)",
747
+ "(focusout)": "onFocusOut($event)",
748
+ "(keydown)": "onKeydown($event)"
749
+ },
750
+ template: "<mona-text-box\n (inputBlur)=\"onInputBlur()\"\n (valueChange)=\"typedInput.edit($event)\"\n [aria-describedby]=\"ariaDescribedBy()\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledBy()\"\n [disabled]=\"effectiveDisabled()\"\n [inputId]=\"inputId()\"\n [value]=\"typedInput.text()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [inputAttributes]=\"inputAttributes()\"\n [invalid]=\"invalidState()\"\n [required]=\"required()\"\n [clearButton]=\"showClearButton()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"invalidState() || touched()\">\n @if (prefixTemplate()) {\n <ng-template monaTextBoxPrefixTemplate>\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </ng-template>\n }\n <ng-template monaTextBoxSuffixTemplate>\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [rounded]=\"'none'\"\n [size]=\"size()\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"messages().openCalendar\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n [disabled]=\"effectiveDisabled() || readonly()\"\n [tabindex]=\"-1\"\n (click)=\"onDateInputButtonClick()\">\n <svg lucideCalendar [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #popupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n aria-modal=\"true\"\n role=\"dialog\"\n [attr.aria-label]=\"messages().datePicker\"\n cdkTrapFocus>\n <mona-calendar\n focusOnMount\n [disabledDates]=\"disabledDates()\"\n [minDate]=\"min()\"\n [maxDate]=\"max()\"\n [readonly]=\"readonly()\"\n [rounded]=\"rounded()\"\n [weekNumber]=\"weekNumber()\"\n [firstDay]=\"firstDay()\"\n [value]=\"value()\"\n (valueChange)=\"onCalendarValueChange($event)\">\n @if (decadeCellTemplate()) {\n <ng-template monaCalendarDecadeCellTemplate let-year>\n <ng-container\n [ngTemplateOutlet]=\"decadeCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year }\"></ng-container>\n </ng-template>\n }\n @if (monthCellTemplate()) {\n <ng-template monaCalendarMonthCellTemplate let-day let-date=\"date\">\n <ng-container\n [ngTemplateOutlet]=\"monthCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: day, date }\"></ng-container>\n </ng-template>\n }\n @if (yearCellTemplate()) {\n <ng-template monaCalendarYearCellTemplate let-year let-text=\"text\">\n <ng-container\n [ngTemplateOutlet]=\"yearCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year, text }\"></ng-container>\n </ng-template>\n }\n </mona-calendar>\n </div>\n</ng-template>\n"
751
+ }]
752
+ }],
753
+ ctorParameters: () => [],
754
+ propDecorators: {
755
+ decadeCellTemplate: [{
756
+ type: i0.ContentChild,
757
+ args: [i0.forwardRef(() => CalendarDecadeCellTemplateDirective), { isSignal: true }]
758
+ }],
759
+ monthCellTemplate: [{
760
+ type: i0.ContentChild,
761
+ args: [i0.forwardRef(() => CalendarMonthCellTemplateDirective), { isSignal: true }]
762
+ }],
763
+ popupTemplate: [{
764
+ type: i0.ViewChild,
765
+ args: ["popupTemplate", { isSignal: true }]
766
+ }],
767
+ prefixTemplate: [{
768
+ type: i0.ContentChild,
769
+ args: [i0.forwardRef(() => DateInputPrefixTemplateDirective), {
770
+ read: TemplateRef,
771
+ isSignal: true
772
+ }]
773
+ }],
774
+ yearCellTemplate: [{
775
+ type: i0.ContentChild,
776
+ args: [i0.forwardRef(() => CalendarYearCellTemplateDirective), { isSignal: true }]
777
+ }],
778
+ ariaDescribedBy: [{
779
+ type: i0.Input,
780
+ args: [{
781
+ isSignal: true,
782
+ alias: "aria-describedby",
783
+ required: false
784
+ }]
785
+ }],
786
+ ariaLabel: [{
787
+ type: i0.Input,
788
+ args: [{
789
+ isSignal: true,
790
+ alias: "aria-label",
791
+ required: false
792
+ }]
793
+ }],
794
+ ariaLabelledBy: [{
795
+ type: i0.Input,
796
+ args: [{
797
+ isSignal: true,
798
+ alias: "aria-labelledby",
799
+ required: false
800
+ }]
801
+ }],
802
+ close: [{
803
+ type: i0.Output,
804
+ args: ["close"]
805
+ }],
806
+ closed: [{
807
+ type: i0.Output,
808
+ args: ["closed"]
809
+ }],
810
+ disabled: [{
811
+ type: i0.Input,
812
+ args: [{
813
+ isSignal: true,
814
+ alias: "disabled",
815
+ required: false
816
+ }]
817
+ }],
818
+ disabledDates: [{
819
+ type: i0.Input,
820
+ args: [{
821
+ isSignal: true,
822
+ alias: "disabledDates",
823
+ required: false
824
+ }]
825
+ }],
826
+ firstDay: [{
827
+ type: i0.Input,
828
+ args: [{
829
+ isSignal: true,
830
+ alias: "firstDay",
831
+ required: false
832
+ }]
833
+ }],
834
+ format: [{
835
+ type: i0.Input,
836
+ args: [{
837
+ isSignal: true,
838
+ alias: "format",
839
+ required: false
840
+ }]
841
+ }],
842
+ inputId: [{
843
+ type: i0.Input,
844
+ args: [{
845
+ isSignal: true,
846
+ alias: "inputId",
847
+ required: false
848
+ }]
849
+ }],
850
+ invalid: [{
851
+ type: i0.Input,
852
+ args: [{
853
+ isSignal: true,
854
+ alias: "invalid",
855
+ required: false
856
+ }]
857
+ }],
858
+ max: [{
859
+ type: i0.Input,
860
+ args: [{
861
+ isSignal: true,
862
+ alias: "max",
863
+ required: false
864
+ }]
865
+ }],
866
+ min: [{
867
+ type: i0.Input,
868
+ args: [{
869
+ isSignal: true,
870
+ alias: "min",
871
+ required: false
872
+ }]
873
+ }],
874
+ open: [{
875
+ type: i0.Output,
876
+ args: ["open"]
877
+ }],
878
+ opened: [{
879
+ type: i0.Output,
880
+ args: ["opened"]
881
+ }],
882
+ placeholder: [{
883
+ type: i0.Input,
884
+ args: [{
885
+ isSignal: true,
886
+ alias: "placeholder",
887
+ required: false
888
+ }]
889
+ }],
890
+ popupClass: [{
891
+ type: i0.Input,
892
+ args: [{
893
+ isSignal: true,
894
+ alias: "popupClass",
895
+ required: false
896
+ }]
897
+ }],
898
+ popupHeight: [{
899
+ type: i0.Input,
900
+ args: [{
901
+ isSignal: true,
902
+ alias: "popupHeight",
903
+ required: false
904
+ }]
905
+ }],
906
+ popupWidth: [{
907
+ type: i0.Input,
908
+ args: [{
909
+ isSignal: true,
910
+ alias: "popupWidth",
911
+ required: false
912
+ }]
913
+ }],
914
+ readonly: [{
915
+ type: i0.Input,
916
+ args: [{
917
+ isSignal: true,
918
+ alias: "readonly",
919
+ required: false
920
+ }]
921
+ }],
922
+ readonlyInput: [{
923
+ type: i0.Input,
924
+ args: [{
925
+ isSignal: true,
926
+ alias: "readonlyInput",
927
+ required: false
928
+ }]
929
+ }],
930
+ required: [{
931
+ type: i0.Input,
932
+ args: [{
933
+ isSignal: true,
934
+ alias: "required",
935
+ required: false
936
+ }]
937
+ }],
938
+ rounded: [{
939
+ type: i0.Input,
940
+ args: [{
941
+ isSignal: true,
942
+ alias: "rounded",
943
+ required: false
944
+ }]
945
+ }],
946
+ showClearButton: [{
947
+ type: i0.Input,
948
+ args: [{
949
+ isSignal: true,
950
+ alias: "showClearButton",
951
+ required: false
952
+ }]
953
+ }],
954
+ size: [{
955
+ type: i0.Input,
956
+ args: [{
957
+ isSignal: true,
958
+ alias: "size",
959
+ required: false
960
+ }]
961
+ }],
962
+ touch: [{
963
+ type: i0.Output,
964
+ args: ["touch"]
965
+ }],
966
+ touched: [{
967
+ type: i0.Input,
968
+ args: [{
969
+ isSignal: true,
970
+ alias: "touched",
971
+ required: false
972
+ }]
973
+ }],
974
+ userClass: [{
975
+ type: i0.Input,
976
+ args: [{
977
+ isSignal: true,
978
+ alias: "class",
979
+ required: false
980
+ }]
981
+ }],
982
+ value: [{
983
+ type: i0.Input,
984
+ args: [{
985
+ isSignal: true,
986
+ alias: "value",
987
+ required: false
988
+ }]
989
+ }, {
990
+ type: i0.Output,
991
+ args: ["valueChange"]
992
+ }],
993
+ weekNumber: [{
994
+ type: i0.Input,
995
+ args: [{
996
+ isSignal: true,
997
+ alias: "weekNumber",
998
+ required: false
999
+ }]
1000
+ }]
1001
+ }
77
1002
  });
78
-
79
- class DatePickerComponent {
80
- #calendarService;
81
- #destroyRef;
82
- #dropdownService;
83
- #hostElementRef;
84
- #i18n;
85
- constructor() {
86
- this.#calendarService = inject(CalendarService);
87
- this.#destroyRef = inject(DestroyRef);
88
- this.#dropdownService = inject(DropdownService);
89
- this.#hostElementRef = inject(ElementRef);
90
- this.#i18n = inject(MonaI18nService);
91
- this.baseClass = computed(() => {
92
- const focused = this.#dropdownService.popupRef() != null;
93
- const rounded = this.rounded();
94
- const size = this.size();
95
- const variantClass = datePickerBaseThemeVariants({ focused, rounded, size });
96
- const userClass = this.userClass();
97
- return twMerge(variantClass, userClass);
98
- }, /* @ts-ignore */
99
- ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
100
- this.decadeCellTemplate = contentChild(CalendarDecadeCellTemplateDirective, /* @ts-ignore */
101
- ...(ngDevMode ? [{ debugName: "decadeCellTemplate" }] : /* istanbul ignore next */ []));
102
- this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled());
103
- this.effectiveFormat = computed(() => {
104
- return this.format() ?? getLocaleDateInputFormat(this.#i18n.localeId());
105
- }, /* @ts-ignore */
106
- ...(ngDevMode ? [{ debugName: "effectiveFormat" }] : /* istanbul ignore next */ []));
107
- this.expanded = computed(() => this.#dropdownService.popupRef() !== null, /* @ts-ignore */
108
- ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
109
- this.inputAttributes = computed(() => {
110
- return {
111
- "aria-autocomplete": "none",
112
- "aria-controls": this.popupId,
113
- // The binder drops `false`, and a combobox must always say whether it's expanded.
114
- "aria-expanded": this.expanded() ? "true" : "false",
115
- "aria-haspopup": "dialog",
116
- // The text box hides its clear button when read-only, so typing is blocked here instead.
117
- readonly: this.readonly() || this.readonlyInput(),
118
- role: "combobox"
119
- };
120
- }, /* @ts-ignore */
121
- ...(ngDevMode ? [{ debugName: "inputAttributes" }] : /* istanbul ignore next */ []));
122
- this.invalidState = computed(() => this.typedInput.errors().length > 0 ||
123
- (this.touched() && (this.invalid() || (this.required() && !this.value()))), /* @ts-ignore */
124
- ...(ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []));
125
- this.messages = this.#i18n.componentMessages("datePicker", DATE_PICKER_DEFAULT_MESSAGES);
126
- this.monthCellTemplate = contentChild(CalendarMonthCellTemplateDirective, /* @ts-ignore */
127
- ...(ngDevMode ? [{ debugName: "monthCellTemplate" }] : /* istanbul ignore next */ []));
128
- this.pickerPopupClass = computed(() => {
129
- const rounded = this.rounded();
130
- const size = this.size();
131
- const userClass = this.popupClass();
132
- const variantClass = datePopupThemeVariants({ rounded, size });
133
- return twMerge(variantClass, userClass);
134
- }, /* @ts-ignore */
135
- ...(ngDevMode ? [{ debugName: "pickerPopupClass" }] : /* istanbul ignore next */ []));
136
- this.popupId = createElementControlId();
137
- this.popupTemplate = viewChild.required("popupTemplate", /* @ts-ignore */
138
- ...(ngDevMode ? [{ debugName: "popupTemplate" }] : /* istanbul ignore next */ []));
139
- this.prefixTemplate = contentChild(DateInputPrefixTemplateDirective, { ...(ngDevMode ? { debugName: "prefixTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
140
- this.yearCellTemplate = contentChild(CalendarYearCellTemplateDirective, /* @ts-ignore */
141
- ...(ngDevMode ? [{ debugName: "yearCellTemplate" }] : /* istanbul ignore next */ []));
142
- /**
143
- * @description Id of an element that describes the input, such as a hint or an error message.
144
- * @default ""
145
- */
146
- this.ariaDescribedBy = input("", { ...(ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {}), alias: "aria-describedby" });
147
- /**
148
- * @description Accessible name of the input. Prefer a visible label, linked through {@link inputId} or
149
- * `aria-labelledby`; the placeholder is not a label.
150
- * @default ""
151
- */
152
- this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
153
- /**
154
- * @description Id of the element that labels the input.
155
- * @default ""
156
- */
157
- this.ariaLabelledBy = input("", { ...(ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {}), alias: "aria-labelledby" });
158
- /**
159
- * @description Emits when the popup is about to close. This event is preventable.
160
- */
161
- // eslint-disable-next-line @angular-eslint/no-output-native
162
- this.close = output();
163
- /**
164
- * @description Emits after the popup is closed.
165
- */
166
- this.closed = output();
167
- /**
168
- * @description Sets the disabled state of the date picker.
169
- * @default false
170
- */
171
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
172
- /**
173
- * @description Sets the disabled dates of the date picker.
174
- * Accepts either an iterable of Date objects or a predicate function. Typing a disabled date is reported as a
175
- * `disabledDate` error instead of setting the value.
176
- */
177
- this.disabledDates = input(/* @ts-ignore */
178
- ...(ngDevMode ? [undefined, { debugName: "disabledDates" }] : /* istanbul ignore next */ []));
179
- /**
180
- * @description Sets the first day of the week. If not specified, derives from the active locale.
181
- * @default null
182
- */
183
- this.firstDay = input(null, /* @ts-ignore */
184
- ...(ngDevMode ? [{ debugName: "firstDay" }] : /* istanbul ignore next */ []));
185
- /**
186
- * @description Sets the date format of the date picker. If not specified, derives from the active locale.
187
- * Typed text is also accepted with one-digit days and months and a two-digit year.
188
- * @default null
189
- */
190
- this.format = input(null, /* @ts-ignore */
191
- ...(ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []));
192
- /**
193
- * @description Id of the inner `<input>` element. Point a `<label for>` or `<mona-label for>` at it to label the
194
- * date picker. A unique id is generated when it isn't set.
195
- * @default generated
196
- */
197
- this.inputId = input(createElementControlId(), /* @ts-ignore */
198
- ...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
199
- /**
200
- * @description Marks the date picker as invalid. When bound to a signal form field via `[formField]`,
201
- * this is written by the `FormField` directive.
202
- * @default false
203
- */
204
- this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
205
- /**
206
- * @description Sets the maximum date of the date picker. A later typed date is reported as a `maxDate` error.
207
- */
208
- this.max = input(undefined, { ...(ngDevMode ? { debugName: "max" } : /* istanbul ignore next */ {}), transform: value => (value instanceof Date ? value : undefined) });
209
- /**
210
- * @description Sets the minimum date of the date picker. An earlier typed date is reported as a `minDate` error.
211
- */
212
- this.min = input(undefined, { ...(ngDevMode ? { debugName: "min" } : /* istanbul ignore next */ {}), transform: value => (value instanceof Date ? value : undefined) });
213
- /**
214
- * @description Emits when the popup is about to open. This event is preventable.
215
- */
216
- this.open = output();
217
- /**
218
- * @description Emits after the popup is opened.
219
- */
220
- this.opened = output();
221
- /**
222
- * @description Sets the placeholder of the date picker.
223
- */
224
- this.placeholder = input("", /* @ts-ignore */
225
- ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
226
- /**
227
- * @description Sets the class of the popup element.
228
- * @default ""
229
- */
230
- this.popupClass = input("", /* @ts-ignore */
231
- ...(ngDevMode ? [{ debugName: "popupClass" }] : /* istanbul ignore next */ []));
232
- /**
233
- * @description Sets the height of the popup element. When empty, the popup fits the calendar.
234
- * @default ""
235
- */
236
- this.popupHeight = input("", /* @ts-ignore */
237
- ...(ngDevMode ? [{ debugName: "popupHeight" }] : /* istanbul ignore next */ []));
238
- /**
239
- * @description Sets the width of the popup element. When empty, the popup fits the calendar.
240
- * @default ""
241
- */
242
- this.popupWidth = input("", /* @ts-ignore */
243
- ...(ngDevMode ? [{ debugName: "popupWidth" }] : /* istanbul ignore next */ []));
244
- /**
245
- * @description Sets the readonly state of the date picker.
246
- * @default false
247
- */
248
- this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
249
- /**
250
- * @description When true, the input is readonly but the calendar button remains enabled.
251
- * @default false
252
- */
253
- this.readonlyInput = input(false, { ...(ngDevMode ? { debugName: "readonlyInput" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
254
- /**
255
- * @description Sets the required state of the date picker.
256
- * When bound to a signal form field via `[formField]`, this is written by the `FormField` directive.
257
- * @default false
258
- */
259
- this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
260
- /**
261
- * @description Sets the border radius of the date picker.
262
- */
263
- this.rounded = input("medium", /* @ts-ignore */
264
- ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
265
- /**
266
- * @description Sets the visibility of the clear button. Clearing empties the value at once.
267
- * @default false
268
- */
269
- this.showClearButton = input(false, { ...(ngDevMode ? { debugName: "showClearButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
270
- /**
271
- * @description Sets the size of the date picker.
272
- */
273
- this.size = input("medium", /* @ts-ignore */
274
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
275
- /**
276
- * @description Emitted when focus leaves the date picker and its popup.
277
- * The `FormField` directive listens to this to mark the field as touched.
278
- */
279
- this.touch = output();
280
- /**
281
- * @description Sets the touched state of the date picker. When bound to a signal form field via `[formField]`,
282
- * this is written by the `FormField` directive.
283
- * @default false
284
- */
285
- this.touched = input(false, { ...(ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
286
- /** @description Extra classes for the input's container. */
287
- this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
288
- /**
289
- * @description Two-way bindable current date value. Typed text is written on Enter and when the input loses
290
- * focus; text that isn't a valid date keeps the previous value and marks the field invalid.
291
- * @default null
292
- */
293
- this.value = model(null, /* @ts-ignore */
294
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
295
- /**
296
- * @description Enables the display of week numbers in the calendar.
297
- * @default false
298
- */
299
- this.weekNumber = input(false, { ...(ngDevMode ? { debugName: "weekNumber" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
300
- this.typedInput = createTypedDateInput({
301
- constraints: () => ({ disabledDates: this.disabledDates(), max: this.max(), min: this.min(), unit: "date" }),
302
- format: () => this.effectiveFormat(),
303
- localeId: () => this.#i18n.localeId(),
304
- value: this.value
305
- });
306
- effect(() => {
307
- const popupTemplate = this.popupTemplate();
308
- untracked(() => this.#dropdownService.popupTemplate.set(popupTemplate));
309
- });
310
- afterNextRender({
311
- read: () => {
312
- this.setCalendarKeyboardSubscription();
313
- this.setPopupCloseSubscription();
314
- }
315
- });
316
- }
317
- /**
318
- * Focuses the input and places the caret after the text. Read-only pickers take focus too.
319
- * @param options Options passed to the native `focus()` call, such as `preventScroll`.
320
- */
321
- focus(options) {
322
- const input = this.#hostElementRef.nativeElement.querySelector("input");
323
- if (input) {
324
- input.focus(options);
325
- input.setSelectionRange(input.value.length, input.value.length);
326
- }
327
- }
328
- onCalendarValueChange(date) {
329
- const singleDate = Array.isArray(date) ? null : date;
330
- this.value.set(singleDate ? new Date(singleDate) : null);
331
- this.closePopup();
332
- }
333
- onDateInputButtonClick() {
334
- const popupRef = this.#dropdownService.popupRef();
335
- if (!this.popupTemplate() || this.effectiveDisabled() || this.readonly()) {
336
- return;
337
- }
338
- if (popupRef) {
339
- popupRef.close();
340
- return;
341
- }
342
- this.openPopup();
343
- }
344
- onFocusIn(event) {
345
- // The host is focusable only to pass focus on; focus inside it, such as a click in the text, stays put.
346
- if (event.target === this.#hostElementRef.nativeElement) {
347
- this.focus();
348
- }
349
- }
350
- onFocusOut(event) {
351
- // Removing a focused picker from the page fires focusout after it is destroyed.
352
- if (this.#destroyRef.destroyed) {
353
- return;
354
- }
355
- const nextTarget = event.relatedTarget;
356
- if (nextTarget instanceof Node) {
357
- const popupElement = this.#dropdownService.popupRef()?.overlayRef.overlayElement;
358
- if (this.#hostElementRef.nativeElement.contains(nextTarget) || popupElement?.contains(nextTarget)) {
359
- return;
360
- }
361
- }
362
- this.touch.emit();
363
- }
364
- onInputBlur() {
365
- this.typedInput.commit();
366
- }
367
- onKeydown(event) {
368
- if (this.effectiveDisabled() || this.readonly()) {
369
- return;
370
- }
371
- if (event.altKey && event.key === "ArrowDown") {
372
- event.preventDefault();
373
- this.openPopup();
374
- }
375
- else if ((event.altKey && event.key === "ArrowUp") || event.key === "Escape") {
376
- if (this.expanded()) {
377
- event.preventDefault();
378
- this.closePopup();
379
- }
380
- }
381
- else if (event.key === "Enter" && event.target instanceof HTMLInputElement) {
382
- // Committed before a surrounding form submits; an IME uses Enter to confirm its text.
383
- if (!event.isComposing && event.keyCode !== 229) {
384
- this.typedInput.commit();
385
- }
386
- }
387
- }
388
- closePopup() {
389
- this.#dropdownService.popupRef()?.close();
390
- }
391
- openPopup() {
392
- if (!this.#dropdownService.popupRef()) {
393
- this.#dropdownService.triggerPopupOpen$.next({
394
- height: this.popupHeight() || "auto",
395
- maxHeight: "auto",
396
- width: this.popupWidth() || "auto",
397
- closeOnScroll: false,
398
- withScrollTracking: true
399
- });
400
- }
401
- }
402
- setCalendarKeyboardSubscription() {
403
- this.#calendarService.keydown$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(event => {
404
- const keyboardEvent = event.originalEvent;
405
- if (keyboardEvent &&
406
- (keyboardEvent.key === "Escape" || (keyboardEvent.altKey && keyboardEvent.key === "ArrowUp"))) {
407
- keyboardEvent.preventDefault();
408
- this.closePopup();
409
- }
410
- });
411
- }
412
- setPopupCloseSubscription() {
413
- this.#dropdownService.popupCloseComplete$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => {
414
- if (this.#dropdownService.focusCanReturn()) {
415
- this.focus();
416
- }
417
- else if (!this.#destroyRef.destroyed) {
418
- // Focus left from inside the popup, which the host's focusout doesn't see.
419
- this.touch.emit();
420
- }
421
- });
422
- }
423
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DatePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
424
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: DatePickerComponent, isStandalone: true, selector: "mona-date-picker", inputs: { ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, disabledDates: { classPropertyName: "disabledDates", publicName: "disabledDates", isSignal: true, isRequired: false, transformFunction: null }, firstDay: { classPropertyName: "firstDay", publicName: "firstDay", isSignal: true, isRequired: false, transformFunction: null }, format: { classPropertyName: "format", publicName: "format", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, popupClass: { classPropertyName: "popupClass", publicName: "popupClass", isSignal: true, isRequired: false, transformFunction: null }, popupHeight: { classPropertyName: "popupHeight", publicName: "popupHeight", isSignal: true, isRequired: false, transformFunction: null }, popupWidth: { classPropertyName: "popupWidth", publicName: "popupWidth", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, readonlyInput: { classPropertyName: "readonlyInput", publicName: "readonlyInput", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, weekNumber: { classPropertyName: "weekNumber", publicName: "weekNumber", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close", closed: "closed", open: "open", opened: "opened", touch: "touch", value: "valueChange" }, host: { listeners: { "focusin": "onFocusIn($event)", "focusout": "onFocusOut($event)", "keydown": "onKeydown($event)" }, properties: { "attr.aria-describedby": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.tabindex": "effectiveDisabled() ? null : -1", "attr.aria-invalid": "invalidState() ? 'true' : null", "attr.data-disabled": "effectiveDisabled() || null", "attr.data-expanded": "expanded()", "attr.data-invalid": "invalidState() || null", "attr.data-readonly": "readonly() || null", "class": "baseClass()" } }, providers: [
425
- DropdownService,
426
- CalendarService,
427
- {
428
- provide: DROPDOWN_POPUP_INPUT_TOKEN,
429
- useExisting: forwardRef(() => DatePickerComponent),
430
- multi: false
431
- }
432
- ], queries: [{ propertyName: "decadeCellTemplate", first: true, predicate: CalendarDecadeCellTemplateDirective, descendants: true, isSignal: true }, { propertyName: "monthCellTemplate", first: true, predicate: CalendarMonthCellTemplateDirective, descendants: true, isSignal: true }, { propertyName: "prefixTemplate", first: true, predicate: DateInputPrefixTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "yearCellTemplate", first: true, predicate: CalendarYearCellTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DropdownPopupHandlerDirective }], ngImport: i0, template: "<mona-text-box\n (inputBlur)=\"onInputBlur()\"\n (valueChange)=\"typedInput.edit($event)\"\n [aria-describedby]=\"ariaDescribedBy()\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledBy()\"\n [disabled]=\"effectiveDisabled()\"\n [inputId]=\"inputId()\"\n [value]=\"typedInput.text()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [inputAttributes]=\"inputAttributes()\"\n [invalid]=\"invalidState()\"\n [required]=\"required()\"\n [clearButton]=\"showClearButton()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"invalidState() || touched()\">\n @if (prefixTemplate()) {\n <ng-template monaTextBoxPrefixTemplate>\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </ng-template>\n }\n <ng-template monaTextBoxSuffixTemplate>\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [rounded]=\"'none'\"\n [size]=\"size()\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"messages().openCalendar\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n [disabled]=\"effectiveDisabled() || readonly()\"\n [tabindex]=\"-1\"\n (click)=\"onDateInputButtonClick()\">\n <svg lucideCalendar [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #popupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n aria-modal=\"true\"\n role=\"dialog\"\n [attr.aria-label]=\"messages().datePicker\"\n cdkTrapFocus>\n <mona-calendar\n focusOnMount\n [disabledDates]=\"disabledDates()\"\n [minDate]=\"min()\"\n [maxDate]=\"max()\"\n [readonly]=\"readonly()\"\n [rounded]=\"rounded()\"\n [weekNumber]=\"weekNumber()\"\n [firstDay]=\"firstDay()\"\n [value]=\"value()\"\n (valueChange)=\"onCalendarValueChange($event)\">\n @if (decadeCellTemplate()) {\n <ng-template monaCalendarDecadeCellTemplate let-year>\n <ng-container\n [ngTemplateOutlet]=\"decadeCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year }\"></ng-container>\n </ng-template>\n }\n @if (monthCellTemplate()) {\n <ng-template monaCalendarMonthCellTemplate let-day let-date=\"date\">\n <ng-container\n [ngTemplateOutlet]=\"monthCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: day, date }\"></ng-container>\n </ng-template>\n }\n @if (yearCellTemplate()) {\n <ng-template monaCalendarYearCellTemplate let-year let-text=\"text\">\n <ng-container\n [ngTemplateOutlet]=\"yearCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year, text }\"></ng-container>\n </ng-template>\n }\n </mona-calendar>\n </div>\n</ng-template>\n", dependencies: [{ kind: "component", type: LucideCalendar, selector: "svg[lucideCalendar]" }, { kind: "component", type: CalendarComponent, selector: "mona-calendar", inputs: ["disabled", "disabledDates", "firstDay", "focusOnMount", "invalid", "maxDate", "minDate", "readonly", "required", "rounded", "selection", "touched", "class", "value", "weekNumber"], outputs: ["touch", "valueChange"] }, { kind: "component", type: TextBoxComponent, selector: "mona-text-box", inputs: ["aria-describedby", "aria-label", "aria-labelledby", "clearButton", "disabled", "inputAttributes", "inputClass", "inputId", "inputStyle", "invalid", "maxLength", "minLength", "name", "placeholder", "readonly", "required", "rounded", "size", "touched", "type", "class", "value"], outputs: ["inputBlur", "inputFocus", "touch", "valueChange"] }, { kind: "directive", type: TextBoxSuffixTemplateDirective, selector: "ng-template[monaTextBoxSuffixTemplate]" }, { kind: "directive", type: CalendarDecadeCellTemplateDirective, selector: "ng-template[monaCalendarDecadeCellTemplate]" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CalendarMonthCellTemplateDirective, selector: "ng-template[monaCalendarMonthCellTemplate]" }, { kind: "directive", type: CalendarYearCellTemplateDirective, selector: "ng-template[monaCalendarYearCellTemplate]" }, { kind: "directive", type: TextBoxPrefixTemplateDirective, selector: "ng-template[monaTextBoxPrefixTemplate]" }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "type", "class", "value"], outputs: ["lookChange", "selectedChange"] }, { kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }] }); }
433
- }
434
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DatePickerComponent, decorators: [{
435
- type: Component,
436
- args: [{ selector: "mona-date-picker", providers: [
437
- DropdownService,
438
- CalendarService,
439
- {
440
- provide: DROPDOWN_POPUP_INPUT_TOKEN,
441
- useExisting: forwardRef(() => DatePickerComponent),
442
- multi: false
443
- }
444
- ], imports: [
445
- LucideCalendar,
446
- CalendarComponent,
447
- TextBoxComponent,
448
- TextBoxSuffixTemplateDirective,
449
- CalendarDecadeCellTemplateDirective,
450
- NgTemplateOutlet,
451
- CalendarMonthCellTemplateDirective,
452
- CalendarYearCellTemplateDirective,
453
- TextBoxPrefixTemplateDirective,
454
- ButtonDirective,
455
- CdkTrapFocus
456
- ], hostDirectives: [DropdownPopupHandlerDirective], host: {
457
- // The ARIA inputs below are applied to the inner input, so the host must not keep the static attributes.
458
- "[attr.aria-describedby]": "null",
459
- "[attr.aria-label]": "null",
460
- "[attr.aria-labelledby]": "null",
461
- "[attr.tabindex]": "effectiveDisabled() ? null : -1",
462
- "[attr.aria-invalid]": "invalidState() ? 'true' : null",
463
- "[attr.data-disabled]": "effectiveDisabled() || null",
464
- "[attr.data-expanded]": "expanded()",
465
- "[attr.data-invalid]": "invalidState() || null",
466
- "[attr.data-readonly]": "readonly() || null",
467
- "[class]": "baseClass()",
468
- "(focusin)": "onFocusIn($event)",
469
- "(focusout)": "onFocusOut($event)",
470
- "(keydown)": "onKeydown($event)"
471
- }, template: "<mona-text-box\n (inputBlur)=\"onInputBlur()\"\n (valueChange)=\"typedInput.edit($event)\"\n [aria-describedby]=\"ariaDescribedBy()\"\n [aria-label]=\"ariaLabel()\"\n [aria-labelledby]=\"ariaLabelledBy()\"\n [disabled]=\"effectiveDisabled()\"\n [inputId]=\"inputId()\"\n [value]=\"typedInput.text()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [inputAttributes]=\"inputAttributes()\"\n [invalid]=\"invalidState()\"\n [required]=\"required()\"\n [clearButton]=\"showClearButton()\"\n [rounded]=\"rounded()\"\n [size]=\"size()\"\n [touched]=\"invalidState() || touched()\">\n @if (prefixTemplate()) {\n <ng-template monaTextBoxPrefixTemplate>\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </ng-template>\n }\n <ng-template monaTextBoxSuffixTemplate>\n <button\n monaButton\n look=\"ghost\"\n [iconOnly]=\"true\"\n [rounded]=\"'none'\"\n [size]=\"size()\"\n class=\"aspect-square h-full w-auto\"\n [attr.aria-label]=\"messages().openCalendar\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-controls]=\"popupId\"\n [disabled]=\"effectiveDisabled() || readonly()\"\n [tabindex]=\"-1\"\n (click)=\"onDateInputButtonClick()\">\n <svg lucideCalendar [size]=\"16\" aria-hidden=\"true\"></svg>\n </button>\n </ng-template>\n</mona-text-box>\n\n<ng-template #popupTemplate>\n <div\n [class]=\"pickerPopupClass()\"\n [id]=\"popupId\"\n aria-modal=\"true\"\n role=\"dialog\"\n [attr.aria-label]=\"messages().datePicker\"\n cdkTrapFocus>\n <mona-calendar\n focusOnMount\n [disabledDates]=\"disabledDates()\"\n [minDate]=\"min()\"\n [maxDate]=\"max()\"\n [readonly]=\"readonly()\"\n [rounded]=\"rounded()\"\n [weekNumber]=\"weekNumber()\"\n [firstDay]=\"firstDay()\"\n [value]=\"value()\"\n (valueChange)=\"onCalendarValueChange($event)\">\n @if (decadeCellTemplate()) {\n <ng-template monaCalendarDecadeCellTemplate let-year>\n <ng-container\n [ngTemplateOutlet]=\"decadeCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year }\"></ng-container>\n </ng-template>\n }\n @if (monthCellTemplate()) {\n <ng-template monaCalendarMonthCellTemplate let-day let-date=\"date\">\n <ng-container\n [ngTemplateOutlet]=\"monthCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: day, date }\"></ng-container>\n </ng-template>\n }\n @if (yearCellTemplate()) {\n <ng-template monaCalendarYearCellTemplate let-year let-text=\"text\">\n <ng-container\n [ngTemplateOutlet]=\"yearCellTemplate()?.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: year, text }\"></ng-container>\n </ng-template>\n }\n </mona-calendar>\n </div>\n</ng-template>\n" }]
472
- }], ctorParameters: () => [], propDecorators: { decadeCellTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CalendarDecadeCellTemplateDirective), { isSignal: true }] }], monthCellTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CalendarMonthCellTemplateDirective), { isSignal: true }] }], popupTemplate: [{ type: i0.ViewChild, args: ["popupTemplate", { isSignal: true }] }], prefixTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DateInputPrefixTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], yearCellTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => CalendarYearCellTemplateDirective), { isSignal: true }] }], ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], closed: [{ type: i0.Output, args: ["closed"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], disabledDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDates", required: false }] }], firstDay: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDay", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], open: [{ type: i0.Output, args: ["open"] }], opened: [{ type: i0.Output, args: ["opened"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], popupClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupClass", required: false }] }], popupHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupHeight", required: false }] }], popupWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupWidth", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], readonlyInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonlyInput", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], showClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearButton", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], weekNumber: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekNumber", required: false }] }] } });
473
-
474
- /*
475
- * Public API Surface of @nanahoshi/mona-ui/date-picker
476
- */
477
-
478
- /**
479
- * Generated bundle index. Do not edit.
480
- */
481
-
482
1003
  export { DATE_PICKER_DEFAULT_MESSAGES, DatePickerComponent };
483
- //# sourceMappingURL=nanahoshi-mona-ui-date-picker.mjs.map
1004
+
1005
+ //# sourceMappingURL=nanahoshi-mona-ui-date-picker.mjs.map