@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,755 +1,1048 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, DestroyRef, input, output, effect, untracked, afterNextRender, Directive, Injectable, signal, DOCUMENT, ElementRef } from '@angular/core';
3
- import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
4
- import { ListService } from '@nanahoshi/mona-ui/internal/list';
5
- import { PreventableEvent } from '@nanahoshi/mona-ui/common';
6
- import { PopupService, dropdownPopupAnimation, PopupCloseEvent, PopupCloseSource } from '@nanahoshi/mona-ui/popup';
7
- import { Subject, takeUntil, take, filter, switchMap, fromEvent } from 'rxjs';
8
- import { ConnectionPositionPair } from '@angular/cdk/overlay';
9
- import { focusCanReturn, themeOverlaySurfaceClasses } from '@nanahoshi/mona-ui/internal';
10
- import { LiveAnnouncer } from '@angular/cdk/a11y';
11
- import { formatNumber, MonaI18nService } from '@nanahoshi/mona-ui/i18n';
12
- import { cva } from 'class-variance-authority';
13
-
1
+ import * as i0 from "@angular/core";
2
+ import { DOCUMENT, DestroyRef, Directive, ElementRef, Injectable, InjectionToken, afterNextRender, effect, inject, input, output, signal, untracked } from "@angular/core";
3
+ import { takeUntilDestroyed, toObservable } from "@angular/core/rxjs-interop";
4
+ import { ListService } from "@nanahoshi/mona-ui/internal/list";
5
+ import { PreventableEvent } from "@nanahoshi/mona-ui/common";
6
+ import { PopupCloseEvent, PopupCloseSource, PopupService, dropdownPopupAnimation } from "@nanahoshi/mona-ui/popup";
7
+ import { Subject, filter, fromEvent, switchMap, take, takeUntil } from "rxjs";
8
+ import { ConnectionPositionPair } from "@angular/cdk/overlay";
9
+ import { focusCanReturn, themeOverlaySurfaceClasses } from "@nanahoshi/mona-ui/internal";
10
+ import { LiveAnnouncer } from "@angular/cdk/a11y";
11
+ import { MonaI18nService, formatNumber } from "@nanahoshi/mona-ui/i18n";
12
+ import { cva } from "class-variance-authority";
14
13
  const DROPDOWN_DATA_INPUT_TOKEN = new InjectionToken("DROPDOWN_DATA_INPUT");
15
- /**
16
- * @deprecated Use {@link DROPDOWN_DATA_INPUT_TOKEN}.
17
- */
18
- // eslint-disable-next-line @typescript-eslint/naming-convention -- kept so existing imports keep working
19
14
  const DropdownDataInputToken = DROPDOWN_DATA_INPUT_TOKEN;
20
-
21
15
  const DROPDOWN_POPUP_INPUT_TOKEN = new InjectionToken("DROPDOWN_POPUP_INPUT");
22
-
23
- class DropdownFilterableDirective {
24
- #defaultOptions;
25
- #destroyRef;
26
- #listService;
27
- constructor() {
28
- this.#defaultOptions = {
29
- enabled: true,
30
- operator: "contains",
31
- debounce: 0,
32
- caseSensitive: false
33
- };
34
- this.#destroyRef = inject(DestroyRef);
35
- this.#listService = inject(ListService);
36
- /** @description Current filter text used to narrow the visible options. */
37
- this.filter = input("", /* @ts-ignore */
38
- ...(ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []));
39
- /** @description Emitted when the filter value changes. Cancelable. */
40
- this.filterChange = output();
41
- /**
42
- * @description Placeholder text in the popup's filter row. Auto Complete has no filter row, since its own input is
43
- * the filter, so it ignores this.
44
- * @default ""
45
- */
46
- this.filterPlaceholder = input("", /* @ts-ignore */
47
- ...(ngDevMode ? [{ debugName: "filterPlaceholder" }] : /* istanbul ignore next */ []));
48
- /**
49
- * @description Filter operator, case sensitivity, and debounce delay. An empty string enables filtering with
50
- * default settings (`operator: "contains"`, `caseSensitive: false`, `debounce: 0`); pass an object to override any
51
- * field.
52
- */
53
- this.options = input("", { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), alias: "monaDropDownFilterable" });
54
- effect(() => {
55
- const filter = this.filter();
56
- untracked(() => this.#listService.setFilter(filter));
57
- });
58
- effect(() => {
59
- const filterPlaceholder = this.filterPlaceholder();
60
- untracked(() => this.#listService.setFilterPlaceholder(filterPlaceholder));
61
- });
62
- effect(() => {
63
- const options = this.options();
64
- untracked(() => {
65
- if (options === "") {
66
- this.#listService.setFilterableOptions(this.#defaultOptions);
67
- }
68
- else {
69
- this.#listService.setFilterableOptions({
70
- ...this.#defaultOptions,
71
- ...options,
72
- enabled: options.enabled ?? this.#defaultOptions.enabled
73
- });
74
- }
75
- });
76
- });
77
- afterNextRender({
78
- read: () => {
79
- this.#listService.filterChange$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(filter => {
80
- this.filterChange.emit(filter);
81
- });
82
- }
83
- });
84
- }
85
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownFilterableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
86
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: DropdownFilterableDirective, isStandalone: true, selector: "\n mona-auto-complete[monaDropDownFilterable],\n mona-dropdown-list[monaDropDownFilterable],\n mona-combo-box[monaDropDownFilterable],\n mona-multi-select[monaDropDownFilterable]\n ", inputs: { filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceholder: { classPropertyName: "filterPlaceholder", publicName: "filterPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "monaDropDownFilterable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChange: "filterChange" }, ngImport: i0 }); }
87
- }
88
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownFilterableDirective, decorators: [{
89
- type: Directive,
90
- args: [{
91
- selector: `
16
+ var DropdownFilterableDirective = class DropdownFilterableDirective {
17
+ #defaultOptions;
18
+ #destroyRef;
19
+ #listService;
20
+ constructor() {
21
+ this.#defaultOptions = {
22
+ enabled: true,
23
+ operator: "contains",
24
+ debounce: 0,
25
+ caseSensitive: false
26
+ };
27
+ this.#destroyRef = inject(DestroyRef);
28
+ this.#listService = inject(ListService);
29
+ this.filter = input("", ...ngDevMode ? [{ debugName: "filter" }] : /* istanbul ignore next */ []);
30
+ this.filterChange = output();
31
+ this.filterPlaceholder = input("", ...ngDevMode ? [{ debugName: "filterPlaceholder" }] : /* istanbul ignore next */ []);
32
+ this.options = input("", {
33
+ ...ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {},
34
+ alias: "monaDropDownFilterable"
35
+ });
36
+ effect(() => {
37
+ const filter = this.filter();
38
+ untracked(() => this.#listService.setFilter(filter));
39
+ });
40
+ effect(() => {
41
+ const filterPlaceholder = this.filterPlaceholder();
42
+ untracked(() => this.#listService.setFilterPlaceholder(filterPlaceholder));
43
+ });
44
+ effect(() => {
45
+ const options = this.options();
46
+ untracked(() => {
47
+ if (options === "") this.#listService.setFilterableOptions(this.#defaultOptions);
48
+ else this.#listService.setFilterableOptions({
49
+ ...this.#defaultOptions,
50
+ ...options,
51
+ enabled: options.enabled ?? this.#defaultOptions.enabled
52
+ });
53
+ });
54
+ });
55
+ afterNextRender({ read: () => {
56
+ this.#listService.filterChange$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe((filter) => {
57
+ this.filterChange.emit(filter);
58
+ });
59
+ } });
60
+ }
61
+ static {
62
+ this.ɵfac = i0.ɵɵngDeclareFactory({
63
+ minVersion: "12.0.0",
64
+ version: "22.2.6",
65
+ ngImport: i0,
66
+ type: DropdownFilterableDirective,
67
+ deps: [],
68
+ target: i0.ɵɵFactoryTarget.Directive
69
+ });
70
+ }
71
+ static {
72
+ this.ɵdir = i0.ɵɵngDeclareDirective({
73
+ minVersion: "17.1.0",
74
+ version: "22.2.6",
75
+ type: DropdownFilterableDirective,
76
+ isStandalone: true,
77
+ selector: "\n mona-auto-complete[monaDropDownFilterable],\n mona-dropdown-list[monaDropDownFilterable],\n mona-combo-box[monaDropDownFilterable],\n mona-multi-select[monaDropDownFilterable]\n ",
78
+ inputs: {
79
+ filter: {
80
+ classPropertyName: "filter",
81
+ publicName: "filter",
82
+ isSignal: true,
83
+ isRequired: false,
84
+ transformFunction: null
85
+ },
86
+ filterPlaceholder: {
87
+ classPropertyName: "filterPlaceholder",
88
+ publicName: "filterPlaceholder",
89
+ isSignal: true,
90
+ isRequired: false,
91
+ transformFunction: null
92
+ },
93
+ options: {
94
+ classPropertyName: "options",
95
+ publicName: "monaDropDownFilterable",
96
+ isSignal: true,
97
+ isRequired: false,
98
+ transformFunction: null
99
+ }
100
+ },
101
+ outputs: { filterChange: "filterChange" },
102
+ ngImport: i0
103
+ });
104
+ }
105
+ };
106
+ i0.ɵɵngDeclareClassMetadata({
107
+ minVersion: "12.0.0",
108
+ version: "22.2.6",
109
+ ngImport: i0,
110
+ type: DropdownFilterableDirective,
111
+ decorators: [{
112
+ type: Directive,
113
+ args: [{ selector: `
92
114
  mona-auto-complete[monaDropDownFilterable],
93
115
  mona-dropdown-list[monaDropDownFilterable],
94
116
  mona-combo-box[monaDropDownFilterable],
95
117
  mona-multi-select[monaDropDownFilterable]
96
- `
97
- }]
98
- }], ctorParameters: () => [], propDecorators: { filter: [{ type: i0.Input, args: [{ isSignal: true, alias: "filter", required: false }] }], filterChange: [{ type: i0.Output, args: ["filterChange"] }], filterPlaceholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "filterPlaceholder", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "monaDropDownFilterable", required: false }] }] } });
99
-
100
- class DropdownFooterTemplateDirective {
101
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownFooterTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
102
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: DropdownFooterTemplateDirective, isStandalone: true, selector: "\n ng-template[monaDropDownFooterTemplate],\n ng-template[monaAutoCompleteFooterTemplate],\n ng-template[monaDropDownListFooterTemplate],\n ng-template[monaDropDownTreeFooterTemplate],\n ng-template[monaComboBoxFooterTemplate],\n ng-template[monaMultiSelectFooterTemplate]\n ", ngImport: i0 }); }
103
- }
104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownFooterTemplateDirective, decorators: [{
105
- type: Directive,
106
- args: [{
107
- selector: `
118
+ ` }]
119
+ }],
120
+ ctorParameters: () => [],
121
+ propDecorators: {
122
+ filter: [{
123
+ type: i0.Input,
124
+ args: [{
125
+ isSignal: true,
126
+ alias: "filter",
127
+ required: false
128
+ }]
129
+ }],
130
+ filterChange: [{
131
+ type: i0.Output,
132
+ args: ["filterChange"]
133
+ }],
134
+ filterPlaceholder: [{
135
+ type: i0.Input,
136
+ args: [{
137
+ isSignal: true,
138
+ alias: "filterPlaceholder",
139
+ required: false
140
+ }]
141
+ }],
142
+ options: [{
143
+ type: i0.Input,
144
+ args: [{
145
+ isSignal: true,
146
+ alias: "monaDropDownFilterable",
147
+ required: false
148
+ }]
149
+ }]
150
+ }
151
+ });
152
+ var DropdownFooterTemplateDirective = class DropdownFooterTemplateDirective {
153
+ static {
154
+ this.ɵfac = i0.ɵɵngDeclareFactory({
155
+ minVersion: "12.0.0",
156
+ version: "22.2.6",
157
+ ngImport: i0,
158
+ type: DropdownFooterTemplateDirective,
159
+ deps: [],
160
+ target: i0.ɵɵFactoryTarget.Directive
161
+ });
162
+ }
163
+ static {
164
+ this.ɵdir = i0.ɵɵngDeclareDirective({
165
+ minVersion: "14.0.0",
166
+ version: "22.2.6",
167
+ type: DropdownFooterTemplateDirective,
168
+ isStandalone: true,
169
+ selector: "\n ng-template[monaDropDownFooterTemplate],\n ng-template[monaAutoCompleteFooterTemplate],\n ng-template[monaDropDownListFooterTemplate],\n ng-template[monaDropDownTreeFooterTemplate],\n ng-template[monaComboBoxFooterTemplate],\n ng-template[monaMultiSelectFooterTemplate]\n ",
170
+ ngImport: i0
171
+ });
172
+ }
173
+ };
174
+ i0.ɵɵngDeclareClassMetadata({
175
+ minVersion: "12.0.0",
176
+ version: "22.2.6",
177
+ ngImport: i0,
178
+ type: DropdownFooterTemplateDirective,
179
+ decorators: [{
180
+ type: Directive,
181
+ args: [{ selector: `
108
182
  ng-template[monaDropDownFooterTemplate],
109
183
  ng-template[monaAutoCompleteFooterTemplate],
110
184
  ng-template[monaDropDownListFooterTemplate],
111
185
  ng-template[monaDropDownTreeFooterTemplate],
112
186
  ng-template[monaComboBoxFooterTemplate],
113
187
  ng-template[monaMultiSelectFooterTemplate]
114
- `
115
- }]
116
- }] });
117
-
118
- class DropdownGroupHeaderTemplateDirective {
119
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownGroupHeaderTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
120
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: DropdownGroupHeaderTemplateDirective, isStandalone: true, selector: "\n ng-template[monaDropDownGroupHeaderTemplate],\n ng-template[monaAutoCompleteGroupHeaderTemplate],\n ng-template[monaDropDownListGroupHeaderTemplate],\n ng-template[monaComboBoxGroupHeaderTemplate],\n ng-template[monaMultiSelectGroupHeaderTemplate]\n ", ngImport: i0 }); }
121
- }
122
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownGroupHeaderTemplateDirective, decorators: [{
123
- type: Directive,
124
- args: [{
125
- selector: `
188
+ ` }]
189
+ }]
190
+ });
191
+ var DropdownGroupHeaderTemplateDirective = class DropdownGroupHeaderTemplateDirective {
192
+ static {
193
+ this.ɵfac = i0.ɵɵngDeclareFactory({
194
+ minVersion: "12.0.0",
195
+ version: "22.2.6",
196
+ ngImport: i0,
197
+ type: DropdownGroupHeaderTemplateDirective,
198
+ deps: [],
199
+ target: i0.ɵɵFactoryTarget.Directive
200
+ });
201
+ }
202
+ static {
203
+ this.ɵdir = i0.ɵɵngDeclareDirective({
204
+ minVersion: "14.0.0",
205
+ version: "22.2.6",
206
+ type: DropdownGroupHeaderTemplateDirective,
207
+ isStandalone: true,
208
+ selector: "\n ng-template[monaDropDownGroupHeaderTemplate],\n ng-template[monaAutoCompleteGroupHeaderTemplate],\n ng-template[monaDropDownListGroupHeaderTemplate],\n ng-template[monaComboBoxGroupHeaderTemplate],\n ng-template[monaMultiSelectGroupHeaderTemplate]\n ",
209
+ ngImport: i0
210
+ });
211
+ }
212
+ };
213
+ i0.ɵɵngDeclareClassMetadata({
214
+ minVersion: "12.0.0",
215
+ version: "22.2.6",
216
+ ngImport: i0,
217
+ type: DropdownGroupHeaderTemplateDirective,
218
+ decorators: [{
219
+ type: Directive,
220
+ args: [{ selector: `
126
221
  ng-template[monaDropDownGroupHeaderTemplate],
127
222
  ng-template[monaAutoCompleteGroupHeaderTemplate],
128
223
  ng-template[monaDropDownListGroupHeaderTemplate],
129
224
  ng-template[monaComboBoxGroupHeaderTemplate],
130
225
  ng-template[monaMultiSelectGroupHeaderTemplate]
131
- `
132
- }]
133
- }] });
134
-
135
- class DropdownGroupableDirective {
136
- #defaultOptions;
137
- #listService;
138
- constructor() {
139
- this.#defaultOptions = {
140
- enabled: true,
141
- headerOrder: "asc"
142
- };
143
- this.#listService = inject(ListService);
144
- /** @description Property name, or accessor, used to derive an option's group. */
145
- this.groupBy = input("", /* @ts-ignore */
146
- ...(ngDevMode ? [{ debugName: "groupBy" }] : /* istanbul ignore next */ []));
147
- /**
148
- * @description Group header order, and optional per-group item ordering. An empty string enables grouping with
149
- * default settings (`headerOrder: "asc"`); pass an object to override any field.
150
- */
151
- this.options = input("", { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), alias: "monaDropDownGroupable" });
152
- effect(() => {
153
- const groupBy = this.groupBy() ?? "";
154
- untracked(() => this.#listService.setGroupBy(groupBy));
155
- });
156
- effect(() => {
157
- const options = this.options();
158
- untracked(() => {
159
- if (options === "") {
160
- this.#listService.setGroupableOptions(this.#defaultOptions);
161
- }
162
- else {
163
- this.#listService.setGroupableOptions({
164
- ...this.#defaultOptions,
165
- ...options,
166
- enabled: options.enabled ?? this.#defaultOptions.enabled
167
- });
168
- }
169
- });
170
- });
171
- }
172
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownGroupableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
173
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: DropdownGroupableDirective, isStandalone: true, selector: "\n mona-auto-complete[monaDropDownGroupable],\n mona-combo-box[monaDropDownGroupable],\n mona-dropdown-list[monaDropDownGroupable],\n mona-multi-select[monaDropDownGroupable]\n ", inputs: { groupBy: { classPropertyName: "groupBy", publicName: "groupBy", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "monaDropDownGroupable", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
174
- }
175
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownGroupableDirective, decorators: [{
176
- type: Directive,
177
- args: [{
178
- selector: `
226
+ ` }]
227
+ }]
228
+ });
229
+ var DropdownGroupableDirective = class DropdownGroupableDirective {
230
+ #defaultOptions;
231
+ #listService;
232
+ constructor() {
233
+ this.#defaultOptions = {
234
+ enabled: true,
235
+ headerOrder: "asc"
236
+ };
237
+ this.#listService = inject(ListService);
238
+ this.groupBy = input("", ...ngDevMode ? [{ debugName: "groupBy" }] : /* istanbul ignore next */ []);
239
+ this.options = input("", {
240
+ ...ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {},
241
+ alias: "monaDropDownGroupable"
242
+ });
243
+ effect(() => {
244
+ const groupBy = this.groupBy() ?? "";
245
+ untracked(() => this.#listService.setGroupBy(groupBy));
246
+ });
247
+ effect(() => {
248
+ const options = this.options();
249
+ untracked(() => {
250
+ if (options === "") this.#listService.setGroupableOptions(this.#defaultOptions);
251
+ else this.#listService.setGroupableOptions({
252
+ ...this.#defaultOptions,
253
+ ...options,
254
+ enabled: options.enabled ?? this.#defaultOptions.enabled
255
+ });
256
+ });
257
+ });
258
+ }
259
+ static {
260
+ this.ɵfac = i0.ɵɵngDeclareFactory({
261
+ minVersion: "12.0.0",
262
+ version: "22.2.6",
263
+ ngImport: i0,
264
+ type: DropdownGroupableDirective,
265
+ deps: [],
266
+ target: i0.ɵɵFactoryTarget.Directive
267
+ });
268
+ }
269
+ static {
270
+ this.ɵdir = i0.ɵɵngDeclareDirective({
271
+ minVersion: "17.1.0",
272
+ version: "22.2.6",
273
+ type: DropdownGroupableDirective,
274
+ isStandalone: true,
275
+ selector: "\n mona-auto-complete[monaDropDownGroupable],\n mona-combo-box[monaDropDownGroupable],\n mona-dropdown-list[monaDropDownGroupable],\n mona-multi-select[monaDropDownGroupable]\n ",
276
+ inputs: {
277
+ groupBy: {
278
+ classPropertyName: "groupBy",
279
+ publicName: "groupBy",
280
+ isSignal: true,
281
+ isRequired: false,
282
+ transformFunction: null
283
+ },
284
+ options: {
285
+ classPropertyName: "options",
286
+ publicName: "monaDropDownGroupable",
287
+ isSignal: true,
288
+ isRequired: false,
289
+ transformFunction: null
290
+ }
291
+ },
292
+ ngImport: i0
293
+ });
294
+ }
295
+ };
296
+ i0.ɵɵngDeclareClassMetadata({
297
+ minVersion: "12.0.0",
298
+ version: "22.2.6",
299
+ ngImport: i0,
300
+ type: DropdownGroupableDirective,
301
+ decorators: [{
302
+ type: Directive,
303
+ args: [{ selector: `
179
304
  mona-auto-complete[monaDropDownGroupable],
180
305
  mona-combo-box[monaDropDownGroupable],
181
306
  mona-dropdown-list[monaDropDownGroupable],
182
307
  mona-multi-select[monaDropDownGroupable]
183
- `
184
- }]
185
- }], ctorParameters: () => [], propDecorators: { groupBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupBy", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "monaDropDownGroupable", required: false }] }] } });
186
-
187
- class DropdownHeaderTemplateDirective {
188
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownHeaderTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
189
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: DropdownHeaderTemplateDirective, isStandalone: true, selector: "\n ng-template[monaDropDownHeaderTemplate],\n ng-template[monaAutoCompleteHeaderTemplate],\n ng-template[monaDropDownListHeaderTemplate],\n ng-template[monaDropDownTreeHeaderTemplate],\n ng-template[monaComboBoxHeaderTemplate],\n ng-template[monaMultiSelectHeaderTemplate]\n ", ngImport: i0 }); }
190
- }
191
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownHeaderTemplateDirective, decorators: [{
192
- type: Directive,
193
- args: [{
194
- selector: `
308
+ ` }]
309
+ }],
310
+ ctorParameters: () => [],
311
+ propDecorators: {
312
+ groupBy: [{
313
+ type: i0.Input,
314
+ args: [{
315
+ isSignal: true,
316
+ alias: "groupBy",
317
+ required: false
318
+ }]
319
+ }],
320
+ options: [{
321
+ type: i0.Input,
322
+ args: [{
323
+ isSignal: true,
324
+ alias: "monaDropDownGroupable",
325
+ required: false
326
+ }]
327
+ }]
328
+ }
329
+ });
330
+ var DropdownHeaderTemplateDirective = class DropdownHeaderTemplateDirective {
331
+ static {
332
+ this.ɵfac = i0.ɵɵngDeclareFactory({
333
+ minVersion: "12.0.0",
334
+ version: "22.2.6",
335
+ ngImport: i0,
336
+ type: DropdownHeaderTemplateDirective,
337
+ deps: [],
338
+ target: i0.ɵɵFactoryTarget.Directive
339
+ });
340
+ }
341
+ static {
342
+ this.ɵdir = i0.ɵɵngDeclareDirective({
343
+ minVersion: "14.0.0",
344
+ version: "22.2.6",
345
+ type: DropdownHeaderTemplateDirective,
346
+ isStandalone: true,
347
+ selector: "\n ng-template[monaDropDownHeaderTemplate],\n ng-template[monaAutoCompleteHeaderTemplate],\n ng-template[monaDropDownListHeaderTemplate],\n ng-template[monaDropDownTreeHeaderTemplate],\n ng-template[monaComboBoxHeaderTemplate],\n ng-template[monaMultiSelectHeaderTemplate]\n ",
348
+ ngImport: i0
349
+ });
350
+ }
351
+ };
352
+ i0.ɵɵngDeclareClassMetadata({
353
+ minVersion: "12.0.0",
354
+ version: "22.2.6",
355
+ ngImport: i0,
356
+ type: DropdownHeaderTemplateDirective,
357
+ decorators: [{
358
+ type: Directive,
359
+ args: [{ selector: `
195
360
  ng-template[monaDropDownHeaderTemplate],
196
361
  ng-template[monaAutoCompleteHeaderTemplate],
197
362
  ng-template[monaDropDownListHeaderTemplate],
198
363
  ng-template[monaDropDownTreeHeaderTemplate],
199
364
  ng-template[monaComboBoxHeaderTemplate],
200
365
  ng-template[monaMultiSelectHeaderTemplate]
201
- `
202
- }]
203
- }] });
204
-
205
- class DropdownItemTemplateDirective {
206
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownItemTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
207
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: DropdownItemTemplateDirective, isStandalone: true, selector: "\n ng-template[monaDropDownItemTemplate],\n ng-template[monaAutoCompleteItemTemplate],\n ng-template[monaDropDownListItemTemplate],\n ng-template[monaComboBoxItemTemplate],\n ng-template[monaMultiSelectItemTemplate]\n ", ngImport: i0 }); }
208
- }
209
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownItemTemplateDirective, decorators: [{
210
- type: Directive,
211
- args: [{
212
- selector: `
366
+ ` }]
367
+ }]
368
+ });
369
+ var DropdownItemTemplateDirective = class DropdownItemTemplateDirective {
370
+ static {
371
+ this.ɵfac = i0.ɵɵngDeclareFactory({
372
+ minVersion: "12.0.0",
373
+ version: "22.2.6",
374
+ ngImport: i0,
375
+ type: DropdownItemTemplateDirective,
376
+ deps: [],
377
+ target: i0.ɵɵFactoryTarget.Directive
378
+ });
379
+ }
380
+ static {
381
+ this.ɵdir = i0.ɵɵngDeclareDirective({
382
+ minVersion: "14.0.0",
383
+ version: "22.2.6",
384
+ type: DropdownItemTemplateDirective,
385
+ isStandalone: true,
386
+ selector: "\n ng-template[monaDropDownItemTemplate],\n ng-template[monaAutoCompleteItemTemplate],\n ng-template[monaDropDownListItemTemplate],\n ng-template[monaComboBoxItemTemplate],\n ng-template[monaMultiSelectItemTemplate]\n ",
387
+ ngImport: i0
388
+ });
389
+ }
390
+ };
391
+ i0.ɵɵngDeclareClassMetadata({
392
+ minVersion: "12.0.0",
393
+ version: "22.2.6",
394
+ ngImport: i0,
395
+ type: DropdownItemTemplateDirective,
396
+ decorators: [{
397
+ type: Directive,
398
+ args: [{ selector: `
213
399
  ng-template[monaDropDownItemTemplate],
214
400
  ng-template[monaAutoCompleteItemTemplate],
215
401
  ng-template[monaDropDownListItemTemplate],
216
402
  ng-template[monaComboBoxItemTemplate],
217
403
  ng-template[monaMultiSelectItemTemplate]
218
- `
219
- }]
220
- }] });
221
-
222
- class DropdownNoDataTemplateDirective {
223
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownNoDataTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
224
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: DropdownNoDataTemplateDirective, isStandalone: true, selector: "\n ng-template[monaDropDownNoDataTemplate],\n ng-template[monaAutoCompleteNoDataTemplate],\n ng-template[monaDropDownListNoDataTemplate],\n ng-template[monaDropDownTreeNoDataTemplate],\n ng-template[monaComboBoxNoDataTemplate],\n ng-template[monaMultiSelectNoDataTemplate]\n ", ngImport: i0 }); }
225
- }
226
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownNoDataTemplateDirective, decorators: [{
227
- type: Directive,
228
- args: [{
229
- selector: `
404
+ ` }]
405
+ }]
406
+ });
407
+ var DropdownNoDataTemplateDirective = class DropdownNoDataTemplateDirective {
408
+ static {
409
+ this.ɵfac = i0.ɵɵngDeclareFactory({
410
+ minVersion: "12.0.0",
411
+ version: "22.2.6",
412
+ ngImport: i0,
413
+ type: DropdownNoDataTemplateDirective,
414
+ deps: [],
415
+ target: i0.ɵɵFactoryTarget.Directive
416
+ });
417
+ }
418
+ static {
419
+ this.ɵdir = i0.ɵɵngDeclareDirective({
420
+ minVersion: "14.0.0",
421
+ version: "22.2.6",
422
+ type: DropdownNoDataTemplateDirective,
423
+ isStandalone: true,
424
+ selector: "\n ng-template[monaDropDownNoDataTemplate],\n ng-template[monaAutoCompleteNoDataTemplate],\n ng-template[monaDropDownListNoDataTemplate],\n ng-template[monaDropDownTreeNoDataTemplate],\n ng-template[monaComboBoxNoDataTemplate],\n ng-template[monaMultiSelectNoDataTemplate]\n ",
425
+ ngImport: i0
426
+ });
427
+ }
428
+ };
429
+ i0.ɵɵngDeclareClassMetadata({
430
+ minVersion: "12.0.0",
431
+ version: "22.2.6",
432
+ ngImport: i0,
433
+ type: DropdownNoDataTemplateDirective,
434
+ decorators: [{
435
+ type: Directive,
436
+ args: [{ selector: `
230
437
  ng-template[monaDropDownNoDataTemplate],
231
438
  ng-template[monaAutoCompleteNoDataTemplate],
232
439
  ng-template[monaDropDownListNoDataTemplate],
233
440
  ng-template[monaDropDownTreeNoDataTemplate],
234
441
  ng-template[monaComboBoxNoDataTemplate],
235
442
  ng-template[monaMultiSelectNoDataTemplate]
236
- `
237
- }]
238
- }] });
239
-
240
- class DropdownVirtualScrollDirective {
241
- #defaultOptions;
242
- #listService;
243
- constructor() {
244
- this.#defaultOptions = {
245
- enabled: true,
246
- height: 28
247
- };
248
- this.#listService = inject(ListService);
249
- /**
250
- * @description Whether virtual scrolling is enabled and the pixel height of a single option row. An empty string
251
- * enables virtual scrolling with default settings (`height: 28`); pass an object to override either field.
252
- */
253
- this.options = input("", { ...(ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {}), alias: "monaDropDownVirtualScroll" });
254
- effect(() => {
255
- const options = this.options();
256
- untracked(() => {
257
- if (options === "") {
258
- this.#listService.setVirtualScrollOptions(this.#defaultOptions);
259
- }
260
- else {
261
- this.#listService.setVirtualScrollOptions({
262
- ...this.#defaultOptions,
263
- ...options,
264
- enabled: options.enabled ?? this.#defaultOptions.enabled
265
- });
266
- }
267
- });
268
- });
269
- }
270
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownVirtualScrollDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
271
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: DropdownVirtualScrollDirective, isStandalone: true, selector: "\n mona-auto-complete[monaDropDownVirtualScroll],\n mona-dropdown-list[monaDropDownVirtualScroll],\n mona-combo-box[monaDropDownVirtualScroll],\n mona-multi-select[monaDropDownVirtualScroll]\n ", inputs: { options: { classPropertyName: "options", publicName: "monaDropDownVirtualScroll", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
272
- }
273
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownVirtualScrollDirective, decorators: [{
274
- type: Directive,
275
- args: [{
276
- selector: `
443
+ ` }]
444
+ }]
445
+ });
446
+ var DropdownVirtualScrollDirective = class DropdownVirtualScrollDirective {
447
+ #defaultOptions;
448
+ #listService;
449
+ constructor() {
450
+ this.#defaultOptions = {
451
+ enabled: true,
452
+ height: 28
453
+ };
454
+ this.#listService = inject(ListService);
455
+ this.options = input("", {
456
+ ...ngDevMode ? { debugName: "options" } : /* istanbul ignore next */ {},
457
+ alias: "monaDropDownVirtualScroll"
458
+ });
459
+ effect(() => {
460
+ const options = this.options();
461
+ untracked(() => {
462
+ if (options === "") this.#listService.setVirtualScrollOptions(this.#defaultOptions);
463
+ else this.#listService.setVirtualScrollOptions({
464
+ ...this.#defaultOptions,
465
+ ...options,
466
+ enabled: options.enabled ?? this.#defaultOptions.enabled
467
+ });
468
+ });
469
+ });
470
+ }
471
+ static {
472
+ this.ɵfac = i0.ɵɵngDeclareFactory({
473
+ minVersion: "12.0.0",
474
+ version: "22.2.6",
475
+ ngImport: i0,
476
+ type: DropdownVirtualScrollDirective,
477
+ deps: [],
478
+ target: i0.ɵɵFactoryTarget.Directive
479
+ });
480
+ }
481
+ static {
482
+ this.ɵdir = i0.ɵɵngDeclareDirective({
483
+ minVersion: "17.1.0",
484
+ version: "22.2.6",
485
+ type: DropdownVirtualScrollDirective,
486
+ isStandalone: true,
487
+ selector: "\n mona-auto-complete[monaDropDownVirtualScroll],\n mona-dropdown-list[monaDropDownVirtualScroll],\n mona-combo-box[monaDropDownVirtualScroll],\n mona-multi-select[monaDropDownVirtualScroll]\n ",
488
+ inputs: { options: {
489
+ classPropertyName: "options",
490
+ publicName: "monaDropDownVirtualScroll",
491
+ isSignal: true,
492
+ isRequired: false,
493
+ transformFunction: null
494
+ } },
495
+ ngImport: i0
496
+ });
497
+ }
498
+ };
499
+ i0.ɵɵngDeclareClassMetadata({
500
+ minVersion: "12.0.0",
501
+ version: "22.2.6",
502
+ ngImport: i0,
503
+ type: DropdownVirtualScrollDirective,
504
+ decorators: [{
505
+ type: Directive,
506
+ args: [{ selector: `
277
507
  mona-auto-complete[monaDropDownVirtualScroll],
278
508
  mona-dropdown-list[monaDropDownVirtualScroll],
279
509
  mona-combo-box[monaDropDownVirtualScroll],
280
510
  mona-multi-select[monaDropDownVirtualScroll]
281
- `
282
- }]
283
- }], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "monaDropDownVirtualScroll", required: false }] }] } });
284
-
285
- class DropdownDataHandlerDirective {
286
- #host = inject(DROPDOWN_DATA_INPUT_TOKEN);
287
- #listService = inject(ListService);
288
- constructor() {
289
- effect(() => {
290
- const data = this.#host.data();
291
- untracked(() => this.#listService.setData(data));
292
- });
293
- effect(() => {
294
- const itemDisabled = this.#host.itemDisabled() ?? "";
295
- untracked(() => this.#listService.setDisabledBy(itemDisabled));
296
- });
297
- effect(() => {
298
- const textField = this.#host.textField() ?? "";
299
- untracked(() => this.#listService.setTextField(textField));
300
- });
301
- effect(() => {
302
- const valueField = this.#host.valueField() ?? "";
303
- untracked(() => this.#listService.setValueField(valueField));
304
- });
305
- }
306
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownDataHandlerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
307
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: DropdownDataHandlerDirective, isStandalone: true, selector: "[monaDropdownDataHandler]", ngImport: i0 }); }
308
- }
309
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownDataHandlerDirective, decorators: [{
310
- type: Directive,
311
- args: [{
312
- selector: "[monaDropdownDataHandler]"
313
- }]
314
- }], ctorParameters: () => [] });
315
-
316
- class DropdownListService {
317
- constructor() {
318
- this.navigate$ = new Subject();
319
- }
320
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownListService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
321
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownListService }); }
322
- }
323
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownListService, decorators: [{
324
- type: Injectable
325
- }] });
326
-
327
- /**
328
- * @hidden
329
- * The state one dropdown shares with its popup handlers and live region. Each dropdown provides its own; the date and
330
- * time pickers use it too, which is why it is exported. Applications don't need it.
331
- */
332
- class DropdownService {
333
- constructor() {
334
- /**
335
- * Every key the dropdown's host receives (outside IME composition), before the dropdown handles it. Call
336
- * `preventDefault()` on the event to skip the built-in handling.
337
- */
338
- this.beforeKeydown$ = new Subject();
339
- /**
340
- * ArrowDown or ArrowUp on the host, before the dropdown opens, closes or moves through the list. Call
341
- * `preventDefault()` on the event to skip the built-in handling.
342
- */
343
- this.beforeNavigate$ = new Subject();
344
- /**
345
- * Set when the popup finishes closing: whether focus may return to the dropdown. It is `false` when the user
346
- * moved focus outside the dropdown and its popup first, for example by clicking another field or pressing
347
- * Tab. Read it from `popupCloseComplete$` before calling `focus()`.
348
- */
349
- this.focusCanReturn = signal(true, /* @ts-ignore */
350
- ...(ngDevMode ? [{ debugName: "focusCanReturn" }] : /* istanbul ignore next */ []));
351
- /**
352
- * Keys the dropdown has no built-in handling for, and Enter before it toggles the popup. Calling `preventDefault()`
353
- * on an Enter key stops the toggle.
354
- */
355
- this.keydown$ = new Subject();
356
- /**
357
- * Emits when the popup has closed and its leave animation has finished, with the close event. By then
358
- * `popupRef` is `null` and {@link focusCanReturn} is set.
359
- */
360
- this.popupCloseComplete$ = new Subject();
361
- /** Emits when the popup's close sequence starts, before its leave animation, with the close event. */
362
- this.popupCloseStart$ = new Subject();
363
- /** Emits on the next task after the popup is created, together with the host's `opened` event. */
364
- this.popupOpenComplete$ = new Subject();
365
- /** The open popup, or `null` while it is closed. */
366
- this.popupRef = signal(null, /* @ts-ignore */
367
- ...(ngDevMode ? [{ debugName: "popupRef" }] : /* istanbul ignore next */ []));
368
- /** The template rendered as the popup's content. Each dropdown component sets it to its own popup template. */
369
- this.popupTemplate = signal(null, /* @ts-ignore */
370
- ...(ngDevMode ? [{ debugName: "popupTemplate" }] : /* istanbul ignore next */ []));
371
- /**
372
- * Whether focus returns to the dropdown when the popup closes, passed to the popup as its `restoreFocus` setting.
373
- * The auto-complete sets it to `false`.
374
- */
375
- this.restoreFocus = signal("auto", /* @ts-ignore */
376
- ...(ngDevMode ? [{ debugName: "restoreFocus" }] : /* istanbul ignore next */ []));
377
- /**
378
- * Opens the popup with the given settings when it is closed. Does nothing while the host is disabled or read-only,
379
- * or when the `open` event is prevented.
380
- */
381
- this.triggerPopupOpen$ = new Subject();
382
- /** Closes the popup when it is open, and otherwise opens it as {@link triggerPopupOpen$} does. */
383
- this.triggerPopupToggle$ = new Subject();
384
- }
385
- static getDefaultPositions() {
386
- return [
387
- new ConnectionPositionPair({ originX: "start", originY: "bottom" }, { overlayX: "start", overlayY: "top" }, -1, 0, "mona-dropdown-popup-content-bottom"),
388
- new ConnectionPositionPair({ originX: "start", originY: "top" }, { overlayX: "start", overlayY: "bottom" }, -1, -1, "mona-dropdown-popup-content-top")
389
- ];
390
- }
391
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
392
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownService }); }
393
- }
394
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownService, decorators: [{
395
- type: Injectable
396
- }] });
397
-
398
- class DropdownPopupHandlerDirective {
399
- #destroyRef = inject(DestroyRef);
400
- #document = inject(DOCUMENT);
401
- #dropdownService = inject(DropdownService);
402
- #host = inject(DROPDOWN_POPUP_INPUT_TOKEN);
403
- #hostElementRef = inject((ElementRef));
404
- #popupService = inject(PopupService);
405
- constructor() {
406
- afterNextRender({
407
- read: () => {
408
- this.#dropdownService.triggerPopupOpen$
409
- .pipe(takeUntilDestroyed(this.#destroyRef))
410
- .subscribe(s => this.openPopup(s));
411
- this.#dropdownService.triggerPopupToggle$
412
- .pipe(takeUntilDestroyed(this.#destroyRef))
413
- .subscribe(s => this.togglePopup(s));
414
- }
415
- });
416
- this.#destroyRef.onDestroy(() => this.closePopup());
417
- }
418
- closePopup() {
419
- this.#dropdownService.popupRef()?.close();
420
- }
421
- getMaxHeight(maxHeight, height) {
422
- if (typeof maxHeight === "number") {
423
- return maxHeight;
424
- }
425
- if (maxHeight === "auto" && height === "auto") {
426
- return "auto";
427
- }
428
- if (!maxHeight || maxHeight === "auto") {
429
- if (!height || height === "auto") {
430
- return 200;
431
- }
432
- return height;
433
- }
434
- return maxHeight ?? 200;
435
- }
436
- getMinWidth(minWidth, width) {
437
- if (typeof minWidth === "number") {
438
- return minWidth;
439
- }
440
- if (!minWidth || minWidth === "auto") {
441
- if (!width || width === "auto") {
442
- return this.#hostElementRef.nativeElement.getBoundingClientRect().width;
443
- }
444
- return width;
445
- }
446
- return minWidth ?? this.#hostElementRef.nativeElement.getBoundingClientRect().width;
447
- }
448
- openPopup(settings) {
449
- let popupRef = this.#dropdownService.popupRef();
450
- if (popupRef || this.#host.disabled() || this.#host.readonly()) {
451
- return;
452
- }
453
- const event = new PreventableEvent("popupOpen");
454
- this.#host.open.emit(event);
455
- if (event.isDefaultPrevented()) {
456
- return;
457
- }
458
- const anchor = this.#hostElementRef.nativeElement;
459
- const anchorConnectionPoint = settings.anchorConnectionPoint ?? "bottomleft";
460
- const content = this.#dropdownService.popupTemplate();
461
- const closeOnOutsideClick = settings.closeOnOutsideClick ?? true;
462
- const closeOnScroll = settings.closeOnScroll ?? true;
463
- const hasBackdrop = settings.hasBackdrop ?? false;
464
- const height = settings.height;
465
- // The host's popupHeight caps the popup; shorter lists still shrink to fit.
466
- const maxHeight = this.getMaxHeight(settings.maxHeight ?? (this.#host.popupHeight() || undefined), height);
467
- const minWidth = this.getMinWidth(settings.minWidth, settings.width);
468
- const offset = settings.offset ?? { horizontal: 0, vertical: 4 };
469
- const popupConnectionPoint = settings.popupConnectionPoint ?? "topleft";
470
- const restoreFocus = this.#dropdownService.restoreFocus();
471
- const width = settings.width ?? (this.#host.popupWidth() || anchor.getBoundingClientRect().width);
472
- const withPush = settings.withPush ?? false;
473
- const withScrollTracking = settings.withScrollTracking ?? false;
474
- popupRef = this.#popupService.create({
475
- anchor,
476
- anchorConnectionPoint,
477
- animation: dropdownPopupAnimation,
478
- content,
479
- closeOnOutsideClick,
480
- closeOnScroll,
481
- hasBackdrop,
482
- height,
483
- maxHeight,
484
- minWidth,
485
- offset,
486
- popupConnectionPoint,
487
- restoreFocus,
488
- width,
489
- withPush,
490
- withScrollTracking
491
- });
492
- this.#dropdownService.popupRef.set(popupRef);
493
- this.setPopupCloseSubscriptions(popupRef);
494
- window.setTimeout(() => {
495
- this.#dropdownService.popupOpenComplete$.next();
496
- this.#host.opened.emit();
497
- });
498
- }
499
- setPopupCloseSubscriptions(popupRef) {
500
- popupRef.beforeClose.pipe(takeUntil(popupRef.closed)).subscribe(event => {
501
- this.#host.close.emit(event);
502
- });
503
- popupRef.closeStart.pipe(takeUntil(popupRef.closed)).subscribe(event => {
504
- this.#dropdownService.popupCloseStart$.next(event);
505
- });
506
- popupRef.closed.pipe(take(1)).subscribe(event => {
507
- // Checked before the overlay is disposed, while focus inside the popup is still there to see.
508
- this.#dropdownService.focusCanReturn.set(focusCanReturn(this.#document, this.#hostElementRef.nativeElement, popupRef.overlayRef.overlayElement));
509
- this.#dropdownService.popupRef.set(null);
510
- this.#dropdownService.popupCloseComplete$.next(event);
511
- this.#host.closed.emit();
512
- });
513
- }
514
- togglePopup(settings) {
515
- if (this.#dropdownService.popupRef()) {
516
- this.closePopup();
517
- return;
518
- }
519
- this.openPopup(settings);
520
- }
521
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownPopupHandlerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
522
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: DropdownPopupHandlerDirective, isStandalone: true, selector: "[monaDropdownPopupHandler]", ngImport: i0 }); }
523
- }
524
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownPopupHandlerDirective, decorators: [{
525
- type: Directive,
526
- args: [{
527
- selector: "[monaDropdownPopupHandler]"
528
- }]
529
- }], ctorParameters: () => [] });
530
-
531
- class DropdownListPopupHandlerDirective {
532
- #destroyRef = inject(DestroyRef);
533
- #dropdownListService = inject(DropdownListService, { optional: true });
534
- #dropdownService = inject(DropdownService);
535
- #host = inject(DROPDOWN_POPUP_INPUT_TOKEN);
536
- #hostElementRef = inject(ElementRef);
537
- #listService = inject(ListService);
538
- #popupClosed$ = toObservable(this.#dropdownService.popupRef).pipe(filter(popupRef => !!popupRef), switchMap(popupRef => popupRef.closed.pipe(take(1))));
539
- #popupOpened$ = toObservable(this.#dropdownService.popupRef).pipe(filter(popupRef => !!popupRef), switchMap(popupRef => popupRef.opened.pipe(take(1))));
540
- constructor() {
541
- afterNextRender({
542
- read: () => {
543
- this.setKeyboardEvents();
544
- this.#popupClosed$
545
- .pipe(takeUntilDestroyed(this.#destroyRef))
546
- .subscribe(() => this.setPopupCloseSubscriptions());
547
- this.#popupOpened$
548
- .pipe(takeUntilDestroyed(this.#destroyRef))
549
- .subscribe(() => this.handleScrollOnPopupOpen());
550
- }
551
- });
552
- }
553
- closePopup() {
554
- this.#dropdownService.popupRef()?.close();
555
- }
556
- handleArrowKeys(event) {
557
- const navigateEvent = new PreventableEvent("beforeNavigate", event);
558
- this.#dropdownService.beforeNavigate$.next(navigateEvent);
559
- if (navigateEvent.isDefaultPrevented()) {
560
- return;
561
- }
562
- event.preventDefault();
563
- if (event.altKey) {
564
- if (event.key === "ArrowDown") {
565
- this.#dropdownService.triggerPopupOpen$.next({});
566
- }
567
- else {
568
- this.closePopup();
569
- }
570
- return;
571
- }
572
- const previousItem = this.#listService.selectedListItems().lastOrDefault();
573
- const direction = event.key === "ArrowDown" ? "next" : "previous";
574
- const mode = this.#listService.navigableOptions().mode;
575
- const item = this.#listService.navigate(direction, mode, false);
576
- if (!item || previousItem === item) {
577
- return;
578
- }
579
- this.#dropdownListService?.navigate$.next({ item });
580
- }
581
- handleKeyDown(e) {
582
- // Keys pressed while an IME is composing text (Enter to confirm a conversion, arrows to pick a candidate)
583
- // belong to the IME. Safari reports the confirming Enter with isComposing false but keyCode 229.
584
- if (e.isComposing || e.keyCode === 229) {
585
- return;
586
- }
587
- const event = new PreventableEvent("beforeKeydown", e);
588
- this.#dropdownService.beforeKeydown$.next(event);
589
- if (event.isDefaultPrevented()) {
590
- return;
591
- }
592
- if (e.key === "ArrowDown" || e.key === "ArrowUp") {
593
- this.handleArrowKeys(e);
594
- }
595
- else if (e.key === "Escape") {
596
- this.#dropdownService
597
- .popupRef()
598
- ?.close(new PopupCloseEvent({ event: e, originalEvent: e, via: PopupCloseSource.Escape }));
599
- }
600
- else if (e.key === "Tab") {
601
- this.closePopup();
602
- }
603
- else if (e.key === " ") {
604
- e.preventDefault();
605
- this.#dropdownService.triggerPopupToggle$.next({});
606
- }
607
- else if (e.key === "Enter") {
608
- this.#dropdownService.keydown$.next(e);
609
- if (e.defaultPrevented) {
610
- return;
611
- }
612
- this.#dropdownService.triggerPopupToggle$.next({});
613
- }
614
- else {
615
- this.#dropdownService.keydown$.next(e);
616
- }
617
- }
618
- handleScrollOnPopupOpen() {
619
- const selectedDataItem = this.#listService.selectedListItems().lastOrDefault();
620
- const highlightedItem = this.#listService.highlightedItem();
621
- if (selectedDataItem) {
622
- this.scrollToSelectedItem();
623
- }
624
- else if (highlightedItem) {
625
- this.scrollToHighlightedItem();
626
- }
627
- }
628
- scrollToHighlightedItem() {
629
- const highlightedItem = this.#listService.highlightedItem();
630
- if (!highlightedItem) {
631
- return;
632
- }
633
- window.setTimeout(() => this.#listService.scrollToItem(highlightedItem, false));
634
- }
635
- scrollToSelectedItem() {
636
- const item = this.#listService.selectedListItems().lastOrDefault();
637
- if (!item) {
638
- return;
639
- }
640
- window.setTimeout(() => this.#listService.scrollToItem(item, false));
641
- }
642
- setKeyboardEvents() {
643
- fromEvent(this.#hostElementRef.nativeElement, "click")
644
- .pipe(takeUntilDestroyed(this.#destroyRef), filter(e => !this.#host.disabled() &&
645
- !this.#host.readonly() &&
646
- !!e.target &&
647
- e.target.tagName !== "INPUT"))
648
- .subscribe(() => this.#dropdownService.triggerPopupToggle$.next({}));
649
- fromEvent(this.#hostElementRef.nativeElement, "keydown")
650
- .pipe(takeUntilDestroyed(this.#destroyRef), filter(() => !this.#host.disabled() && !this.#host.readonly()))
651
- .subscribe(e => this.handleKeyDown(e));
652
- }
653
- setPopupCloseSubscriptions() {
654
- this.#listService.clearHighlightedItem();
655
- this.#listService.clearFilter();
656
- }
657
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownListPopupHandlerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
658
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: DropdownListPopupHandlerDirective, isStandalone: true, selector: "[monaDropdownListPopupHandler]", hostDirectives: [{ directive: DropdownPopupHandlerDirective }], ngImport: i0 }); }
659
- }
660
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownListPopupHandlerDirective, decorators: [{
661
- type: Directive,
662
- args: [{
663
- selector: "[monaDropdownListPopupHandler]",
664
- hostDirectives: [DropdownPopupHandlerDirective]
665
- }]
666
- }], ctorParameters: () => [] });
667
-
668
- // Generated from i18n/catalogs/en-US.messages.json by scripts/generate-locale-catalogs.ts. Do not edit.
669
- // Edit the JSON file and run `npm run generate:locale-catalogs`.
511
+ ` }]
512
+ }],
513
+ ctorParameters: () => [],
514
+ propDecorators: { options: [{
515
+ type: i0.Input,
516
+ args: [{
517
+ isSignal: true,
518
+ alias: "monaDropDownVirtualScroll",
519
+ required: false
520
+ }]
521
+ }] }
522
+ });
523
+ var DropdownDataHandlerDirective = class DropdownDataHandlerDirective {
524
+ #host = inject(DROPDOWN_DATA_INPUT_TOKEN);
525
+ #listService = inject(ListService);
526
+ constructor() {
527
+ effect(() => {
528
+ const data = this.#host.data();
529
+ untracked(() => this.#listService.setData(data));
530
+ });
531
+ effect(() => {
532
+ const itemDisabled = this.#host.itemDisabled() ?? "";
533
+ untracked(() => this.#listService.setDisabledBy(itemDisabled));
534
+ });
535
+ effect(() => {
536
+ const textField = this.#host.textField() ?? "";
537
+ untracked(() => this.#listService.setTextField(textField));
538
+ });
539
+ effect(() => {
540
+ const valueField = this.#host.valueField() ?? "";
541
+ untracked(() => this.#listService.setValueField(valueField));
542
+ });
543
+ }
544
+ static {
545
+ this.ɵfac = i0.ɵɵngDeclareFactory({
546
+ minVersion: "12.0.0",
547
+ version: "22.2.6",
548
+ ngImport: i0,
549
+ type: DropdownDataHandlerDirective,
550
+ deps: [],
551
+ target: i0.ɵɵFactoryTarget.Directive
552
+ });
553
+ }
554
+ static {
555
+ this.ɵdir = i0.ɵɵngDeclareDirective({
556
+ minVersion: "14.0.0",
557
+ version: "22.2.6",
558
+ type: DropdownDataHandlerDirective,
559
+ isStandalone: true,
560
+ selector: "[monaDropdownDataHandler]",
561
+ ngImport: i0
562
+ });
563
+ }
564
+ };
565
+ i0.ɵɵngDeclareClassMetadata({
566
+ minVersion: "12.0.0",
567
+ version: "22.2.6",
568
+ ngImport: i0,
569
+ type: DropdownDataHandlerDirective,
570
+ decorators: [{
571
+ type: Directive,
572
+ args: [{ selector: "[monaDropdownDataHandler]" }]
573
+ }],
574
+ ctorParameters: () => []
575
+ });
576
+ var DropdownListService = class DropdownListService {
577
+ constructor() {
578
+ this.navigate$ = new Subject();
579
+ }
580
+ static {
581
+ this.ɵfac = i0.ɵɵngDeclareFactory({
582
+ minVersion: "12.0.0",
583
+ version: "22.2.6",
584
+ ngImport: i0,
585
+ type: DropdownListService,
586
+ deps: [],
587
+ target: i0.ɵɵFactoryTarget.Injectable
588
+ });
589
+ }
590
+ static {
591
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
592
+ minVersion: "12.0.0",
593
+ version: "22.2.6",
594
+ ngImport: i0,
595
+ type: DropdownListService
596
+ });
597
+ }
598
+ };
599
+ i0.ɵɵngDeclareClassMetadata({
600
+ minVersion: "12.0.0",
601
+ version: "22.2.6",
602
+ ngImport: i0,
603
+ type: DropdownListService,
604
+ decorators: [{ type: Injectable }]
605
+ });
606
+ var DropdownService = class DropdownService {
607
+ constructor() {
608
+ this.beforeKeydown$ = new Subject();
609
+ this.beforeNavigate$ = new Subject();
610
+ this.focusCanReturn = signal(true, ...ngDevMode ? [{ debugName: "focusCanReturn" }] : /* istanbul ignore next */ []);
611
+ this.keydown$ = new Subject();
612
+ this.popupCloseComplete$ = new Subject();
613
+ this.popupCloseStart$ = new Subject();
614
+ this.popupOpenComplete$ = new Subject();
615
+ this.popupRef = signal(null, ...ngDevMode ? [{ debugName: "popupRef" }] : /* istanbul ignore next */ []);
616
+ this.popupTemplate = signal(null, ...ngDevMode ? [{ debugName: "popupTemplate" }] : /* istanbul ignore next */ []);
617
+ this.restoreFocus = signal("auto", ...ngDevMode ? [{ debugName: "restoreFocus" }] : /* istanbul ignore next */ []);
618
+ this.triggerPopupOpen$ = new Subject();
619
+ this.triggerPopupToggle$ = new Subject();
620
+ }
621
+ static getDefaultPositions() {
622
+ return [new ConnectionPositionPair({
623
+ originX: "start",
624
+ originY: "bottom"
625
+ }, {
626
+ overlayX: "start",
627
+ overlayY: "top"
628
+ }, -1, 0, "mona-dropdown-popup-content-bottom"), new ConnectionPositionPair({
629
+ originX: "start",
630
+ originY: "top"
631
+ }, {
632
+ overlayX: "start",
633
+ overlayY: "bottom"
634
+ }, -1, -1, "mona-dropdown-popup-content-top")];
635
+ }
636
+ static {
637
+ this.ɵfac = i0.ɵɵngDeclareFactory({
638
+ minVersion: "12.0.0",
639
+ version: "22.2.6",
640
+ ngImport: i0,
641
+ type: DropdownService,
642
+ deps: [],
643
+ target: i0.ɵɵFactoryTarget.Injectable
644
+ });
645
+ }
646
+ static {
647
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
648
+ minVersion: "12.0.0",
649
+ version: "22.2.6",
650
+ ngImport: i0,
651
+ type: DropdownService
652
+ });
653
+ }
654
+ };
655
+ i0.ɵɵngDeclareClassMetadata({
656
+ minVersion: "12.0.0",
657
+ version: "22.2.6",
658
+ ngImport: i0,
659
+ type: DropdownService,
660
+ decorators: [{ type: Injectable }]
661
+ });
662
+ var DropdownPopupHandlerDirective = class DropdownPopupHandlerDirective {
663
+ #destroyRef = inject(DestroyRef);
664
+ #document = inject(DOCUMENT);
665
+ #dropdownService = inject(DropdownService);
666
+ #host = inject(DROPDOWN_POPUP_INPUT_TOKEN);
667
+ #hostElementRef = inject(ElementRef);
668
+ #popupService = inject(PopupService);
669
+ constructor() {
670
+ afterNextRender({ read: () => {
671
+ this.#dropdownService.triggerPopupOpen$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe((s) => this.openPopup(s));
672
+ this.#dropdownService.triggerPopupToggle$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe((s) => this.togglePopup(s));
673
+ } });
674
+ this.#destroyRef.onDestroy(() => this.closePopup());
675
+ }
676
+ closePopup() {
677
+ this.#dropdownService.popupRef()?.close();
678
+ }
679
+ getMaxHeight(maxHeight, height) {
680
+ if (typeof maxHeight === "number") return maxHeight;
681
+ if (maxHeight === "auto" && height === "auto") return "auto";
682
+ if (!maxHeight || maxHeight === "auto") {
683
+ if (!height || height === "auto") return 200;
684
+ return height;
685
+ }
686
+ return maxHeight ?? 200;
687
+ }
688
+ getMinWidth(minWidth, width) {
689
+ if (typeof minWidth === "number") return minWidth;
690
+ if (!minWidth || minWidth === "auto") {
691
+ if (!width || width === "auto") return this.#hostElementRef.nativeElement.getBoundingClientRect().width;
692
+ return width;
693
+ }
694
+ return minWidth ?? this.#hostElementRef.nativeElement.getBoundingClientRect().width;
695
+ }
696
+ openPopup(settings) {
697
+ let popupRef = this.#dropdownService.popupRef();
698
+ if (popupRef || this.#host.disabled() || this.#host.readonly()) return;
699
+ const event = new PreventableEvent("popupOpen");
700
+ this.#host.open.emit(event);
701
+ if (event.isDefaultPrevented()) return;
702
+ const anchor = this.#hostElementRef.nativeElement;
703
+ const anchorConnectionPoint = settings.anchorConnectionPoint ?? "bottomleft";
704
+ const content = this.#dropdownService.popupTemplate();
705
+ const closeOnOutsideClick = settings.closeOnOutsideClick ?? true;
706
+ const closeOnScroll = settings.closeOnScroll ?? true;
707
+ const hasBackdrop = settings.hasBackdrop ?? false;
708
+ const height = settings.height;
709
+ const maxHeight = this.getMaxHeight(settings.maxHeight ?? (this.#host.popupHeight() || void 0), height);
710
+ const minWidth = this.getMinWidth(settings.minWidth, settings.width);
711
+ const offset = settings.offset ?? {
712
+ horizontal: 0,
713
+ vertical: 4
714
+ };
715
+ const popupConnectionPoint = settings.popupConnectionPoint ?? "topleft";
716
+ const restoreFocus = this.#dropdownService.restoreFocus();
717
+ const width = settings.width ?? (this.#host.popupWidth() || anchor.getBoundingClientRect().width);
718
+ const withPush = settings.withPush ?? false;
719
+ const withScrollTracking = settings.withScrollTracking ?? false;
720
+ popupRef = this.#popupService.create({
721
+ anchor,
722
+ anchorConnectionPoint,
723
+ animation: dropdownPopupAnimation,
724
+ content,
725
+ closeOnOutsideClick,
726
+ closeOnScroll,
727
+ hasBackdrop,
728
+ height,
729
+ maxHeight,
730
+ minWidth,
731
+ offset,
732
+ popupConnectionPoint,
733
+ restoreFocus,
734
+ width,
735
+ withPush,
736
+ withScrollTracking
737
+ });
738
+ this.#dropdownService.popupRef.set(popupRef);
739
+ this.setPopupCloseSubscriptions(popupRef);
740
+ window.setTimeout(() => {
741
+ this.#dropdownService.popupOpenComplete$.next();
742
+ this.#host.opened.emit();
743
+ });
744
+ }
745
+ setPopupCloseSubscriptions(popupRef) {
746
+ popupRef.beforeClose.pipe(takeUntil(popupRef.closed)).subscribe((event) => {
747
+ this.#host.close.emit(event);
748
+ });
749
+ popupRef.closeStart.pipe(takeUntil(popupRef.closed)).subscribe((event) => {
750
+ this.#dropdownService.popupCloseStart$.next(event);
751
+ });
752
+ popupRef.closed.pipe(take(1)).subscribe((event) => {
753
+ this.#dropdownService.focusCanReturn.set(focusCanReturn(this.#document, this.#hostElementRef.nativeElement, popupRef.overlayRef.overlayElement));
754
+ this.#dropdownService.popupRef.set(null);
755
+ this.#dropdownService.popupCloseComplete$.next(event);
756
+ this.#host.closed.emit();
757
+ });
758
+ }
759
+ togglePopup(settings) {
760
+ if (this.#dropdownService.popupRef()) {
761
+ this.closePopup();
762
+ return;
763
+ }
764
+ this.openPopup(settings);
765
+ }
766
+ static {
767
+ this.ɵfac = i0.ɵɵngDeclareFactory({
768
+ minVersion: "12.0.0",
769
+ version: "22.2.6",
770
+ ngImport: i0,
771
+ type: DropdownPopupHandlerDirective,
772
+ deps: [],
773
+ target: i0.ɵɵFactoryTarget.Directive
774
+ });
775
+ }
776
+ static {
777
+ this.ɵdir = i0.ɵɵngDeclareDirective({
778
+ minVersion: "14.0.0",
779
+ version: "22.2.6",
780
+ type: DropdownPopupHandlerDirective,
781
+ isStandalone: true,
782
+ selector: "[monaDropdownPopupHandler]",
783
+ ngImport: i0
784
+ });
785
+ }
786
+ };
787
+ i0.ɵɵngDeclareClassMetadata({
788
+ minVersion: "12.0.0",
789
+ version: "22.2.6",
790
+ ngImport: i0,
791
+ type: DropdownPopupHandlerDirective,
792
+ decorators: [{
793
+ type: Directive,
794
+ args: [{ selector: "[monaDropdownPopupHandler]" }]
795
+ }],
796
+ ctorParameters: () => []
797
+ });
798
+ var DropdownListPopupHandlerDirective = class DropdownListPopupHandlerDirective {
799
+ #destroyRef = inject(DestroyRef);
800
+ #dropdownListService = inject(DropdownListService, { optional: true });
801
+ #dropdownService = inject(DropdownService);
802
+ #host = inject(DROPDOWN_POPUP_INPUT_TOKEN);
803
+ #hostElementRef = inject(ElementRef);
804
+ #listService = inject(ListService);
805
+ #popupClosed$ = toObservable(this.#dropdownService.popupRef).pipe(filter((popupRef) => !!popupRef), switchMap((popupRef) => popupRef.closed.pipe(take(1))));
806
+ #popupOpened$ = toObservable(this.#dropdownService.popupRef).pipe(filter((popupRef) => !!popupRef), switchMap((popupRef) => popupRef.opened.pipe(take(1))));
807
+ constructor() {
808
+ afterNextRender({ read: () => {
809
+ this.setKeyboardEvents();
810
+ this.#popupClosed$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => this.setPopupCloseSubscriptions());
811
+ this.#popupOpened$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => this.handleScrollOnPopupOpen());
812
+ } });
813
+ }
814
+ closePopup() {
815
+ this.#dropdownService.popupRef()?.close();
816
+ }
817
+ handleArrowKeys(event) {
818
+ const navigateEvent = new PreventableEvent("beforeNavigate", event);
819
+ this.#dropdownService.beforeNavigate$.next(navigateEvent);
820
+ if (navigateEvent.isDefaultPrevented()) return;
821
+ event.preventDefault();
822
+ if (event.altKey) {
823
+ if (event.key === "ArrowDown") this.#dropdownService.triggerPopupOpen$.next({});
824
+ else this.closePopup();
825
+ return;
826
+ }
827
+ const previousItem = this.#listService.selectedListItems().lastOrDefault();
828
+ const direction = event.key === "ArrowDown" ? "next" : "previous";
829
+ const mode = this.#listService.navigableOptions().mode;
830
+ const item = this.#listService.navigate(direction, mode, false);
831
+ if (!item || previousItem === item) return;
832
+ this.#dropdownListService?.navigate$.next({ item });
833
+ }
834
+ handleKeyDown(e) {
835
+ if (e.isComposing || e.keyCode === 229) return;
836
+ const event = new PreventableEvent("beforeKeydown", e);
837
+ this.#dropdownService.beforeKeydown$.next(event);
838
+ if (event.isDefaultPrevented()) return;
839
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") this.handleArrowKeys(e);
840
+ else if (e.key === "Escape") this.#dropdownService.popupRef()?.close(new PopupCloseEvent({
841
+ event: e,
842
+ originalEvent: e,
843
+ via: PopupCloseSource.Escape
844
+ }));
845
+ else if (e.key === "Tab") this.closePopup();
846
+ else if (e.key === " ") {
847
+ e.preventDefault();
848
+ this.#dropdownService.triggerPopupToggle$.next({});
849
+ } else if (e.key === "Enter") {
850
+ this.#dropdownService.keydown$.next(e);
851
+ if (e.defaultPrevented) return;
852
+ this.#dropdownService.triggerPopupToggle$.next({});
853
+ } else this.#dropdownService.keydown$.next(e);
854
+ }
855
+ handleScrollOnPopupOpen() {
856
+ const selectedDataItem = this.#listService.selectedListItems().lastOrDefault();
857
+ const highlightedItem = this.#listService.highlightedItem();
858
+ if (selectedDataItem) this.scrollToSelectedItem();
859
+ else if (highlightedItem) this.scrollToHighlightedItem();
860
+ }
861
+ scrollToHighlightedItem() {
862
+ const highlightedItem = this.#listService.highlightedItem();
863
+ if (!highlightedItem) return;
864
+ window.setTimeout(() => this.#listService.scrollToItem(highlightedItem, false));
865
+ }
866
+ scrollToSelectedItem() {
867
+ const item = this.#listService.selectedListItems().lastOrDefault();
868
+ if (!item) return;
869
+ window.setTimeout(() => this.#listService.scrollToItem(item, false));
870
+ }
871
+ setKeyboardEvents() {
872
+ fromEvent(this.#hostElementRef.nativeElement, "click").pipe(takeUntilDestroyed(this.#destroyRef), filter((e) => !this.#host.disabled() && !this.#host.readonly() && !!e.target && e.target.tagName !== "INPUT")).subscribe(() => this.#dropdownService.triggerPopupToggle$.next({}));
873
+ fromEvent(this.#hostElementRef.nativeElement, "keydown").pipe(takeUntilDestroyed(this.#destroyRef), filter(() => !this.#host.disabled() && !this.#host.readonly())).subscribe((e) => this.handleKeyDown(e));
874
+ }
875
+ setPopupCloseSubscriptions() {
876
+ this.#listService.clearHighlightedItem();
877
+ this.#listService.clearFilter();
878
+ }
879
+ static {
880
+ this.ɵfac = i0.ɵɵngDeclareFactory({
881
+ minVersion: "12.0.0",
882
+ version: "22.2.6",
883
+ ngImport: i0,
884
+ type: DropdownListPopupHandlerDirective,
885
+ deps: [],
886
+ target: i0.ɵɵFactoryTarget.Directive
887
+ });
888
+ }
889
+ static {
890
+ this.ɵdir = i0.ɵɵngDeclareDirective({
891
+ minVersion: "14.0.0",
892
+ version: "22.2.6",
893
+ type: DropdownListPopupHandlerDirective,
894
+ isStandalone: true,
895
+ selector: "[monaDropdownListPopupHandler]",
896
+ hostDirectives: [{ directive: DropdownPopupHandlerDirective }],
897
+ ngImport: i0
898
+ });
899
+ }
900
+ };
901
+ i0.ɵɵngDeclareClassMetadata({
902
+ minVersion: "12.0.0",
903
+ version: "22.2.6",
904
+ ngImport: i0,
905
+ type: DropdownListPopupHandlerDirective,
906
+ decorators: [{
907
+ type: Directive,
908
+ args: [{
909
+ selector: "[monaDropdownListPopupHandler]",
910
+ hostDirectives: [DropdownPopupHandlerDirective]
911
+ }]
912
+ }],
913
+ ctorParameters: () => []
914
+ });
670
915
  function localizeNumber(value, options) {
671
- return formatNumber(value, "en-US", options);
916
+ return formatNumber(value, "en-US", options);
672
917
  }
673
918
  const DROPDOWNS_DEFAULT_MESSAGES = {
674
- itemPosition: (text, position, total) => `${text}, ${localizeNumber(position)} of ${localizeNumber(total)}`,
675
- noResultsFound: "No results found",
676
- resultsAvailable: (count) => count === 1 ? `${localizeNumber(count)} result available` : `${localizeNumber(count)} results available`
919
+ itemPosition: (text, position, total) => `${text}, ${localizeNumber(position)} of ${localizeNumber(total)}`,
920
+ noResultsFound: "No results found",
921
+ resultsAvailable: (count) => count === 1 ? `${localizeNumber(count)} result available` : `${localizeNumber(count)} results available`
677
922
  };
678
-
679
- /**
680
- * Announces how many results a dropdown shows after its list is filtered, or after its items change, while the
681
- * popup is open ("3 results available", "No results found").
682
- *
683
- * The announcement goes through the CDK `LiveAnnouncer`, whose live region lives at the end of the document, so it
684
- * never becomes part of the combobox's content. The highlighted option isn't announced here:
685
- * `aria-activedescendant` already does that.
686
- */
687
- class DropdownLiveRegionDirective {
688
- #dropdownService = inject(DropdownService);
689
- #i18n = inject(MonaI18nService);
690
- #listService = inject(ListService);
691
- #liveAnnouncer = inject(LiveAnnouncer);
692
- #messages = this.#i18n.componentMessages("dropdowns", DROPDOWNS_DEFAULT_MESSAGES);
693
- constructor() {
694
- // What the list showed when it was last announced, or when the popup opened. Null while the popup is closed.
695
- let lastState = null;
696
- effect(() => {
697
- const expanded = this.#dropdownService.popupRef() !== null;
698
- const filterText = this.#listService.filterText();
699
- const count = this.#listService.viewItems().size();
700
- untracked(() => {
701
- if (!expanded) {
702
- lastState = null;
703
- return;
704
- }
705
- const state = `${filterText}\u0000${count}`;
706
- if (state === lastState) {
707
- return;
708
- }
709
- const opening = lastState === null;
710
- lastState = state;
711
- // Opening the popup isn't news, unless the text that opened it already filtered the list (a combo
712
- // box or auto-complete opens on the first keystroke).
713
- if (opening && !filterText) {
714
- return;
715
- }
716
- const messages = this.#messages();
717
- void this.#liveAnnouncer.announce(count === 0 ? messages.noResultsFound : messages.resultsAvailable(count), "polite");
718
- });
719
- });
720
- }
721
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownLiveRegionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
722
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: DropdownLiveRegionDirective, isStandalone: true, selector: "[monaDropdownLiveRegion]", ngImport: i0 }); }
723
- }
724
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownLiveRegionDirective, decorators: [{
725
- type: Directive,
726
- args: [{
727
- selector: "[monaDropdownLiveRegion]"
728
- }]
729
- }], ctorParameters: () => [] });
730
-
731
- class DropdownPrefixTemplateDirective {
732
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownPrefixTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
733
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: DropdownPrefixTemplateDirective, isStandalone: true, selector: "ng-template[monaDropdownPrefixTemplate]", ngImport: i0 }); }
734
- }
735
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownPrefixTemplateDirective, decorators: [{
736
- type: Directive,
737
- args: [{
738
- selector: "ng-template[monaDropdownPrefixTemplate]"
739
- }]
740
- }] });
741
-
742
- class DropdownSuffixTemplateDirective {
743
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownSuffixTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
744
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: DropdownSuffixTemplateDirective, isStandalone: true, selector: "ng-template[monaDropdownSuffixTemplate]", ngImport: i0 }); }
745
- }
746
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropdownSuffixTemplateDirective, decorators: [{
747
- type: Directive,
748
- args: [{
749
- selector: "ng-template[monaDropdownSuffixTemplate]"
750
- }]
751
- }] });
752
-
923
+ var DropdownLiveRegionDirective = class DropdownLiveRegionDirective {
924
+ #dropdownService = inject(DropdownService);
925
+ #i18n = inject(MonaI18nService);
926
+ #listService = inject(ListService);
927
+ #liveAnnouncer = inject(LiveAnnouncer);
928
+ #messages = this.#i18n.componentMessages("dropdowns", DROPDOWNS_DEFAULT_MESSAGES);
929
+ constructor() {
930
+ let lastState = null;
931
+ effect(() => {
932
+ const expanded = this.#dropdownService.popupRef() !== null;
933
+ const filterText = this.#listService.filterText();
934
+ const count = this.#listService.viewItems().size();
935
+ untracked(() => {
936
+ if (!expanded) {
937
+ lastState = null;
938
+ return;
939
+ }
940
+ const state = `${filterText}\u0000${count}`;
941
+ if (state === lastState) return;
942
+ const opening = lastState === null;
943
+ lastState = state;
944
+ if (opening && !filterText) return;
945
+ const messages = this.#messages();
946
+ this.#liveAnnouncer.announce(count === 0 ? messages.noResultsFound : messages.resultsAvailable(count), "polite");
947
+ });
948
+ });
949
+ }
950
+ static {
951
+ this.ɵfac = i0.ɵɵngDeclareFactory({
952
+ minVersion: "12.0.0",
953
+ version: "22.2.6",
954
+ ngImport: i0,
955
+ type: DropdownLiveRegionDirective,
956
+ deps: [],
957
+ target: i0.ɵɵFactoryTarget.Directive
958
+ });
959
+ }
960
+ static {
961
+ this.ɵdir = i0.ɵɵngDeclareDirective({
962
+ minVersion: "14.0.0",
963
+ version: "22.2.6",
964
+ type: DropdownLiveRegionDirective,
965
+ isStandalone: true,
966
+ selector: "[monaDropdownLiveRegion]",
967
+ ngImport: i0
968
+ });
969
+ }
970
+ };
971
+ i0.ɵɵngDeclareClassMetadata({
972
+ minVersion: "12.0.0",
973
+ version: "22.2.6",
974
+ ngImport: i0,
975
+ type: DropdownLiveRegionDirective,
976
+ decorators: [{
977
+ type: Directive,
978
+ args: [{ selector: "[monaDropdownLiveRegion]" }]
979
+ }],
980
+ ctorParameters: () => []
981
+ });
982
+ var DropdownPrefixTemplateDirective = class DropdownPrefixTemplateDirective {
983
+ static {
984
+ this.ɵfac = i0.ɵɵngDeclareFactory({
985
+ minVersion: "12.0.0",
986
+ version: "22.2.6",
987
+ ngImport: i0,
988
+ type: DropdownPrefixTemplateDirective,
989
+ deps: [],
990
+ target: i0.ɵɵFactoryTarget.Directive
991
+ });
992
+ }
993
+ static {
994
+ this.ɵdir = i0.ɵɵngDeclareDirective({
995
+ minVersion: "14.0.0",
996
+ version: "22.2.6",
997
+ type: DropdownPrefixTemplateDirective,
998
+ isStandalone: true,
999
+ selector: "ng-template[monaDropdownPrefixTemplate]",
1000
+ ngImport: i0
1001
+ });
1002
+ }
1003
+ };
1004
+ i0.ɵɵngDeclareClassMetadata({
1005
+ minVersion: "12.0.0",
1006
+ version: "22.2.6",
1007
+ ngImport: i0,
1008
+ type: DropdownPrefixTemplateDirective,
1009
+ decorators: [{
1010
+ type: Directive,
1011
+ args: [{ selector: "ng-template[monaDropdownPrefixTemplate]" }]
1012
+ }]
1013
+ });
1014
+ var DropdownSuffixTemplateDirective = class DropdownSuffixTemplateDirective {
1015
+ static {
1016
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1017
+ minVersion: "12.0.0",
1018
+ version: "22.2.6",
1019
+ ngImport: i0,
1020
+ type: DropdownSuffixTemplateDirective,
1021
+ deps: [],
1022
+ target: i0.ɵɵFactoryTarget.Directive
1023
+ });
1024
+ }
1025
+ static {
1026
+ this.ɵdir = i0.ɵɵngDeclareDirective({
1027
+ minVersion: "14.0.0",
1028
+ version: "22.2.6",
1029
+ type: DropdownSuffixTemplateDirective,
1030
+ isStandalone: true,
1031
+ selector: "ng-template[monaDropdownSuffixTemplate]",
1032
+ ngImport: i0
1033
+ });
1034
+ }
1035
+ };
1036
+ i0.ɵɵngDeclareClassMetadata({
1037
+ minVersion: "12.0.0",
1038
+ version: "22.2.6",
1039
+ ngImport: i0,
1040
+ type: DropdownSuffixTemplateDirective,
1041
+ decorators: [{
1042
+ type: Directive,
1043
+ args: [{ selector: "ng-template[monaDropdownSuffixTemplate]" }]
1044
+ }]
1045
+ });
753
1046
  const dropdownPopupThemeVariants = cva(`
754
1047
  h-full max-h-64 overflow-auto
755
1048
  [scrollbar-color:var(--color-scrollbar-thumb)_var(--color-scrollbar-track)] [scrollbar-width:thin]
@@ -758,29 +1051,25 @@ const dropdownPopupThemeVariants = cva(`
758
1051
  [&_mona-list]:[background-color:var(--mona-dropdown-popup-list-background,var(--mona-list-background))]!
759
1052
  border border-border shadow-(--shadow-overlay)
760
1053
  `, {
761
- variants: {
762
- rounded: {
763
- none: "rounded-none",
764
- small: "rounded-sm",
765
- medium: "rounded-md",
766
- large: "rounded-lg",
767
- full: "rounded-lg"
768
- },
769
- size: {
770
- large: "text-base",
771
- medium: "text-sm",
772
- small: "text-xs"
773
- }
774
- },
775
- defaultVariants: {
776
- rounded: "medium",
777
- size: "medium"
778
- }
1054
+ variants: {
1055
+ rounded: {
1056
+ none: "rounded-none",
1057
+ small: "rounded-sm",
1058
+ medium: "rounded-md",
1059
+ large: "rounded-lg",
1060
+ full: "rounded-lg"
1061
+ },
1062
+ size: {
1063
+ large: "text-base",
1064
+ medium: "text-sm",
1065
+ small: "text-xs"
1066
+ }
1067
+ },
1068
+ defaultVariants: {
1069
+ rounded: "medium",
1070
+ size: "medium"
1071
+ }
779
1072
  });
780
-
781
- /**
782
- * Generated bundle index. Do not edit.
783
- */
784
-
785
1073
  export { DROPDOWNS_DEFAULT_MESSAGES, DROPDOWN_DATA_INPUT_TOKEN, DROPDOWN_POPUP_INPUT_TOKEN, DropdownDataHandlerDirective, DropdownDataInputToken, DropdownFilterableDirective, DropdownFooterTemplateDirective, DropdownGroupHeaderTemplateDirective, DropdownGroupableDirective, DropdownHeaderTemplateDirective, DropdownItemTemplateDirective, DropdownListPopupHandlerDirective, DropdownListService, DropdownLiveRegionDirective, DropdownNoDataTemplateDirective, DropdownPopupHandlerDirective, DropdownPrefixTemplateDirective, DropdownService, DropdownSuffixTemplateDirective, DropdownVirtualScrollDirective, dropdownPopupThemeVariants };
786
- //# sourceMappingURL=nanahoshi-mona-ui-dropdowns.mjs.map
1074
+
1075
+ //# sourceMappingURL=nanahoshi-mona-ui-dropdowns.mjs.map