@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,25 +1,19 @@
1
- import { NgTemplateOutlet } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { inject, DestroyRef, ElementRef, signal, computed, contentChild, TemplateRef, viewChild, input, booleanAttribute, output, model, effect, untracked, afterNextRender, forwardRef, Component } from '@angular/core';
4
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
- import { FilterChangeEvent } from '@nanahoshi/mona-ui/common';
6
- import * as i1 from '@nanahoshi/mona-ui/dropdowns';
7
- import { DropdownListService, DropdownService, DropdownFooterTemplateDirective, DropdownGroupHeaderTemplateDirective, DropdownHeaderTemplateDirective, DropdownItemTemplateDirective, dropdownPopupThemeVariants, DropdownNoDataTemplateDirective, DropdownPrefixTemplateDirective, DROPDOWN_DATA_INPUT_TOKEN, DROPDOWN_POPUP_INPUT_TOKEN, DropdownDataHandlerDirective, DropdownListPopupHandlerDirective, DropdownLiveRegionDirective } from '@nanahoshi/mona-ui/dropdowns';
8
- import { themeControlSurfaceClasses, injectEffectiveDisabled, createElementControlId } from '@nanahoshi/mona-ui/internal';
9
- import { IndicatorIconComponent } from '@nanahoshi/mona-ui/internal/indicator-icon';
10
- import { ListService, ListComponent, ListGroupHeaderTemplateDirective, ListFooterTemplateDirective, ListHeaderTemplateDirective, ListNoDataTemplateDirective, ListItemTemplateDirective } from '@nanahoshi/mona-ui/internal/list';
11
- import { TextBoxDirective } from '@nanahoshi/mona-ui/text-box';
12
- import { MonaI18nService } from '@nanahoshi/mona-ui/i18n';
13
- import { Subject, debounceTime, filter, take, tap } from 'rxjs';
14
- import { twMerge } from 'tailwind-merge';
15
- import { cva } from 'class-variance-authority';
16
-
17
- // Generated from i18n/catalogs/en-US.messages.json by scripts/generate-locale-catalogs.ts. Do not edit.
18
- // Edit the JSON file and run `npm run generate:locale-catalogs`.
19
- const COMBO_BOX_DEFAULT_MESSAGES = {
20
- clear: "Clear"
21
- };
22
-
1
+ import { NgTemplateOutlet } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { Component, DestroyRef, ElementRef, TemplateRef, afterNextRender, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, model, output, signal, untracked, viewChild } from "@angular/core";
4
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
5
+ import { FilterChangeEvent } from "@nanahoshi/mona-ui/common";
6
+ import * as i1 from "@nanahoshi/mona-ui/dropdowns";
7
+ import { DROPDOWN_DATA_INPUT_TOKEN, DROPDOWN_POPUP_INPUT_TOKEN, DropdownDataHandlerDirective, DropdownFooterTemplateDirective, DropdownGroupHeaderTemplateDirective, DropdownHeaderTemplateDirective, DropdownItemTemplateDirective, DropdownListPopupHandlerDirective, DropdownListService, DropdownLiveRegionDirective, DropdownNoDataTemplateDirective, DropdownPrefixTemplateDirective, DropdownService, dropdownPopupThemeVariants } from "@nanahoshi/mona-ui/dropdowns";
8
+ import { createElementControlId, injectEffectiveDisabled, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
9
+ import { IndicatorIconComponent } from "@nanahoshi/mona-ui/internal/indicator-icon";
10
+ import { ListComponent, ListFooterTemplateDirective, ListGroupHeaderTemplateDirective, ListHeaderTemplateDirective, ListItemTemplateDirective, ListNoDataTemplateDirective, ListService } from "@nanahoshi/mona-ui/internal/list";
11
+ import { TextBoxDirective } from "@nanahoshi/mona-ui/text-box";
12
+ import { MonaI18nService } from "@nanahoshi/mona-ui/i18n";
13
+ import { Subject, debounceTime, filter, take, tap } from "rxjs";
14
+ import { twMerge } from "tailwind-merge";
15
+ import { cva } from "class-variance-authority";
16
+ const COMBO_BOX_DEFAULT_MESSAGES = { clear: "Clear" };
23
17
  const comboBoxBaseThemeVariants = cva(`
24
18
  flex items-center
25
19
  cursor-pointer
@@ -29,734 +23,1179 @@ const comboBoxBaseThemeVariants = cva(`
29
23
  data-[readonly='true']:cursor-default
30
24
  focus-within:border-focus-indicator focus-within:ring-2 focus-within:ring-focus-indicator/35
31
25
  `, {
32
- variants: {
33
- disabled: {
34
- true: `
26
+ variants: {
27
+ disabled: { true: `
35
28
  pointer-events-none cursor-not-allowed
36
29
  bg-disabled-background text-disabled-foreground
37
30
  border-disabled-border shadow-none
38
- `
39
- },
40
- focused: {
41
- true: "border-focus-indicator ring-2 ring-focus-indicator/35"
42
- },
43
- invalid: {
44
- true: "border-error ring-2 ring-error/35 focus-within:border-error focus-within:ring-error/35",
45
- false: ""
46
- },
47
- rounded: {
48
- none: "rounded-none",
49
- small: "rounded-sm",
50
- medium: "rounded-md",
51
- large: "rounded-lg",
52
- full: "rounded-full"
53
- },
54
- size: {
55
- small: "h-8 text-xs",
56
- medium: "h-9 text-sm",
57
- large: "h-10 text-base"
58
- }
59
- },
60
- compoundVariants: [
61
- {
62
- focused: true,
63
- invalid: true,
64
- class: "border-error ring-error/35"
65
- }
66
- ],
67
- defaultVariants: {
68
- disabled: false,
69
- focused: false,
70
- invalid: false,
71
- rounded: "medium",
72
- size: "medium"
73
- }
31
+ ` },
32
+ focused: { true: "border-focus-indicator ring-2 ring-focus-indicator/35" },
33
+ invalid: {
34
+ true: "border-error ring-2 ring-error/35 focus-within:border-error focus-within:ring-error/35",
35
+ false: ""
36
+ },
37
+ rounded: {
38
+ none: "rounded-none",
39
+ small: "rounded-sm",
40
+ medium: "rounded-md",
41
+ large: "rounded-lg",
42
+ full: "rounded-full"
43
+ },
44
+ size: {
45
+ small: "h-8 text-xs",
46
+ medium: "h-9 text-sm",
47
+ large: "h-10 text-base"
48
+ }
49
+ },
50
+ compoundVariants: [{
51
+ focused: true,
52
+ invalid: true,
53
+ class: "border-error ring-error/35"
54
+ }],
55
+ defaultVariants: {
56
+ disabled: false,
57
+ focused: false,
58
+ invalid: false,
59
+ rounded: "medium",
60
+ size: "medium"
61
+ }
74
62
  });
75
63
  const comboBoxTextInputThemeVariants = cva(`
76
64
  h-full w-full px-2 text-ellipsis
77
65
  bg-transparent border-none shadow-none outline-none focus-visible:outline-hidden
78
66
  focus-within:ring-0 focus-within:shadow-none
79
67
  focus-visible:ring-0 focus-visible:shadow-none
80
- `, {
81
- variants: {
82
- rounded: {
83
- none: "rounded-none",
84
- small: "rounded-sm",
85
- medium: "rounded-md",
86
- large: "rounded-lg",
87
- full: "rounded-full px-3"
88
- }
89
- }
90
- });
68
+ `, { variants: { rounded: {
69
+ none: "rounded-none",
70
+ small: "rounded-sm",
71
+ medium: "rounded-md",
72
+ large: "rounded-lg",
73
+ full: "rounded-full px-3"
74
+ } } });
91
75
  const comboBoxAffixContainerThemeVariants = cva(`flex h-full flex-none items-center justify-center`);
92
-
93
- class ComboBoxComponent {
94
- #destroyRef;
95
- #dropdownListService;
96
- #dropdownService;
97
- #hostElementRef;
98
- #i18n;
99
- #listService;
100
- #popupRef;
101
- #userNavigatedViaArrows;
102
- constructor() {
103
- this.#destroyRef = inject(DestroyRef);
104
- this.#dropdownListService = inject(DropdownListService);
105
- this.#dropdownService = inject(DropdownService);
106
- this.#hostElementRef = inject(ElementRef);
107
- this.#i18n = inject(MonaI18nService);
108
- this.#listService = inject(ListService);
109
- this.#popupRef = this.#dropdownService.popupRef;
110
- this.#userNavigatedViaArrows = signal(false, /* @ts-ignore */
111
- ...(ngDevMode ? [{ debugName: "#userNavigatedViaArrows" }] : /* istanbul ignore next */ []));
112
- this.activeDescendant = computed(() => {
113
- const highlightedItem = this.#listService.highlightedItem();
114
- return highlightedItem ? highlightedItem.uid : null;
115
- }, /* @ts-ignore */
116
- ...(ngDevMode ? [{ debugName: "activeDescendant" }] : /* istanbul ignore next */ []));
117
- this.affixClass = computed(() => {
118
- return comboBoxAffixContainerThemeVariants();
119
- }, /* @ts-ignore */
120
- ...(ngDevMode ? [{ debugName: "affixClass" }] : /* istanbul ignore next */ []));
121
- this.baseClass = computed(() => {
122
- const disabled = this.effectiveDisabled();
123
- const focused = this.#popupRef() != null;
124
- const invalid = this.invalidState();
125
- const rounded = this.rounded();
126
- const size = this.size();
127
- const variantClass = comboBoxBaseThemeVariants({ disabled, focused, invalid, rounded, size });
128
- const userClass = this.userClass();
129
- return twMerge(variantClass, userClass);
130
- }, /* @ts-ignore */
131
- ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
132
- this.clearButtonVisible = computed(() => this.showClearButton() &&
133
- this.selectedListItem() != null &&
134
- !this.loading() &&
135
- !this.effectiveDisabled() &&
136
- !this.readonly(), /* @ts-ignore */
137
- ...(ngDevMode ? [{ debugName: "clearButtonVisible" }] : /* istanbul ignore next */ []));
138
- this.comboBoxValue = signal("", /* @ts-ignore */
139
- ...(ngDevMode ? [{ debugName: "comboBoxValue" }] : /* istanbul ignore next */ []));
140
- this.comboBoxValue$ = new Subject();
141
- this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled());
142
- this.expanded = computed(() => this.#popupRef() !== null, /* @ts-ignore */
143
- ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
144
- this.footerTemplate = contentChild(DropdownFooterTemplateDirective, { ...(ngDevMode ? { debugName: "footerTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
145
- this.groupHeaderTemplate = contentChild(DropdownGroupHeaderTemplateDirective, { ...(ngDevMode ? { debugName: "groupHeaderTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
146
- this.headerTemplate = contentChild(DropdownHeaderTemplateDirective, { ...(ngDevMode ? { debugName: "headerTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
147
- this.inputClass = computed(() => {
148
- const rounded = this.rounded();
149
- return comboBoxTextInputThemeVariants({ rounded });
150
- }, /* @ts-ignore */
151
- ...(ngDevMode ? [{ debugName: "inputClass" }] : /* istanbul ignore next */ []));
152
- this.invalidState = computed(() => this.touched() && (this.invalid() || (this.required() && this.value() == null)), /* @ts-ignore */
153
- ...(ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []));
154
- this.itemTemplate = contentChild(DropdownItemTemplateDirective, { ...(ngDevMode ? { debugName: "itemTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
155
- this.listId = createElementControlId();
156
- this.listPopupClass = computed(() => {
157
- const rounded = this.rounded();
158
- const size = this.size();
159
- const userClass = this.popupClass();
160
- const variantClass = dropdownPopupThemeVariants({ rounded, size });
161
- // With a popupHeight, the overlay sets the limit; the default max-h-64 would cut a taller popup short.
162
- const heightClass = this.popupHeight() ? "max-h-none" : "";
163
- return twMerge(variantClass, heightClass, userClass);
164
- }, /* @ts-ignore */
165
- ...(ngDevMode ? [{ debugName: "listPopupClass" }] : /* istanbul ignore next */ []));
166
- this.messages = this.#i18n.componentMessages("comboBox", COMBO_BOX_DEFAULT_MESSAGES);
167
- this.noDataTemplate = contentChild(DropdownNoDataTemplateDirective, { ...(ngDevMode ? { debugName: "noDataTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
168
- this.popupTemplate = viewChild.required("popupTemplate", /* @ts-ignore */
169
- ...(ngDevMode ? [{ debugName: "popupTemplate" }] : /* istanbul ignore next */ []));
170
- this.prefixTemplate = contentChild(DropdownPrefixTemplateDirective, { ...(ngDevMode ? { debugName: "prefixTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
171
- this.selectableOptions = {
172
- enabled: true,
173
- mode: "single",
174
- toggleable: false
175
- };
176
- this.selectedListItem = computed(() => {
177
- return this.#listService.selectedListItems().firstOrDefault();
178
- }, /* @ts-ignore */
179
- ...(ngDevMode ? [{ debugName: "selectedListItem" }] : /* istanbul ignore next */ []));
180
- this.valueText = computed(() => {
181
- const listItem = this.selectedListItem();
182
- if (!listItem) {
183
- return "";
184
- }
185
- return this.#listService.getItemText(listItem);
186
- }, /* @ts-ignore */
187
- ...(ngDevMode ? [{ debugName: "valueText" }] : /* istanbul ignore next */ []));
188
- /**
189
- * @description Allows a custom value to be committed when it doesn't match any item in {@link data}.
190
- * @default false
191
- */
192
- this.allowCustomValue = input(false, { ...(ngDevMode ? { debugName: "allowCustomValue" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
193
- /**
194
- * @description ID of an element that provides an extended description for the input.
195
- * @default ""
196
- */
197
- this.ariaDescribedBy = input("", { ...(ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {}), alias: "aria-describedby" });
198
- /**
199
- * @description Accessible name for the input. Describe what the combo box represents. Prefer a visible label,
200
- * linked through {@link inputId} or `aria-labelledby`; without any of them, browsers fall back to the
201
- * {@link placeholder}.
202
- * @default ""
203
- */
204
- this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
205
- /**
206
- * @description ID of an external element that provides the accessible name for the input.
207
- * @default ""
208
- */
209
- this.ariaLabelledBy = input("", { ...(ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {}), alias: "aria-labelledby" });
210
- /**
211
- * @description Emitted when the popup is about to close. This event is preventable.
212
- */
213
- // eslint-disable-next-line @angular-eslint/no-output-native -- renaming the output would break existing (close) bindings
214
- this.close = output();
215
- /**
216
- * @description Emitted after the popup is closed.
217
- */
218
- this.closed = output();
219
- /**
220
- * @description Collection of items to render.
221
- * @default []
222
- */
223
- this.data = input([], /* @ts-ignore */
224
- ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
225
- /**
226
- * @description Renders the component with reduced visual emphasis and removes pointer interaction.
227
- * @default false
228
- */
229
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
230
- /**
231
- * @description Id of the inner `<input>` element. Point a `<label for>` or `<mona-label for>` at it to label the
232
- * combo box. A unique id is generated when it isn't set.
233
- * @default generated
234
- */
235
- this.inputId = input(createElementControlId(), /* @ts-ignore */
236
- ...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
237
- /**
238
- * @description Marks the combo box as invalid. When bound to a signal form field via `[formField]`,
239
- * this is written by the `FormField` directive.
240
- * @default false
241
- */
242
- this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
243
- /**
244
- * @description A predicate function or the name of the field that determines whether an item is disabled.
245
- * @default undefined
246
- */
247
- this.itemDisabled = input(/* @ts-ignore */
248
- ...(ngDevMode ? [undefined, { debugName: "itemDisabled" }] : /* istanbul ignore next */ []));
249
- /**
250
- * @description Shows a loading indicator, in place of the clear button, and marks the field busy. It doesn't
251
- * block interaction: the field stays usable while data loads.
252
- * @default false
253
- */
254
- this.loading = input(false, { ...(ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
255
- /**
256
- * @description Emitted when the popup is about to open. This event is preventable.
257
- */
258
- this.open = output();
259
- /**
260
- * @description Emitted after the popup is opened.
261
- */
262
- this.opened = output();
263
- /**
264
- * @description Placeholder text shown when no value is selected or entered.
265
- * @default ""
266
- */
267
- this.placeholder = input("", /* @ts-ignore */
268
- ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
269
- /**
270
- * @description Sets the class of the popup element.
271
- * @default ""
272
- */
273
- this.popupClass = input("", /* @ts-ignore */
274
- ...(ngDevMode ? [{ debugName: "popupClass" }] : /* istanbul ignore next */ []));
275
- /**
276
- * @description Maximum height of the popup, in pixels or as a CSS length. Shorter lists shrink to fit. When
277
- * unset, the popup is at most 200 pixels tall.
278
- * @default null
279
- */
280
- this.popupHeight = input(null, /* @ts-ignore */
281
- ...(ngDevMode ? [{ debugName: "popupHeight" }] : /* istanbul ignore next */ []));
282
- /**
283
- * @description Sets the width of the popup element.
284
- * @default null
285
- */
286
- this.popupWidth = input(null, /* @ts-ignore */
287
- ...(ngDevMode ? [{ debugName: "popupWidth" }] : /* istanbul ignore next */ []));
288
- /**
289
- * @description Prevents value changes while preserving the component's visual state.
290
- * @default false
291
- */
292
- this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
293
- /**
294
- * @description Sets the required state of the combo box component.
295
- * @default false
296
- */
297
- this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
298
- /**
299
- * @description Border-radius preset applied to the component.
300
- * @default "medium"
301
- */
302
- this.rounded = input("medium", /* @ts-ignore */
303
- ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
304
- /**
305
- * @description Displays a button that resets the value to empty when an item is selected.
306
- * @default false
307
- */
308
- this.showClearButton = input(false, { ...(ngDevMode ? { debugName: "showClearButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
309
- /**
310
- * @description Size preset controlling the component's dimensions.
311
- * @default "medium"
312
- */
313
- this.size = input("medium", /* @ts-ignore */
314
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
315
- /**
316
- * @description Property name or accessor used to derive the display text from a data item.
317
- * If not set, the item itself is used as the text representation.
318
- * @default undefined
319
- */
320
- this.textField = input(/* @ts-ignore */
321
- ...(ngDevMode ? [undefined, { debugName: "textField" }] : /* istanbul ignore next */ []));
322
- /**
323
- * @description Emitted when focus leaves the combo box. Moving between its input, clear button and popup doesn't
324
- * count. The `FormField` directive listens to this to mark the field as touched.
325
- */
326
- this.touch = output();
327
- /**
328
- * @description Sets the touched state of the combo box. When bound to a signal form field via `[formField]`,
329
- * this is written by the `FormField` directive.
330
- * @default false
331
- */
332
- this.touched = input(false, { ...(ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
333
- /**
334
- * @description Additional CSS classes merged onto the host element via `tailwind-merge`.
335
- * @default ""
336
- */
337
- this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
338
- /**
339
- * @description Two-way bindable current selected value. Implements `FormValueControl<TValue | null>`,
340
- * enabling signal forms `[formField]` binding.
341
- * Object mode returns the selected data item; primitive mode (see {@link valuePrimitive}) returns the value
342
- * resolved through {@link valueField}. `null` represents no selection.
343
- * @default null
344
- */
345
- this.value = model(null, /* @ts-ignore */
346
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
347
- /**
348
- * @description Emitted with the entered text when the user presses Enter on text that matches no item, or leaves
349
- * the field with it. Only emitted when {@link allowCustomValue} is true.
350
- */
351
- this.valueAdd = output();
352
- /**
353
- * @description Property name or accessor used to derive the value from a data item.
354
- * It is used for stable item identity, matching externally supplied values, and primitive
355
- * value projection when {@link valuePrimitive} is enabled.
356
- * When omitted, the item itself is used as the value representation.
357
- * Should resolve to a stable, unique scalar.
358
- * @default undefined
359
- */
360
- this.valueField = input(/* @ts-ignore */
361
- ...(ngDevMode ? [undefined, { debugName: "valueField" }] : /* istanbul ignore next */ []));
362
- /**
363
- * @description Determines whether the bound value contains complete data items
364
- * or values extracted through {@link valueField}.
365
- *
366
- * When `false`, selecting an item writes the complete data item.
367
- * When `true`, selecting an item writes the value resolved through `valueField`.
368
- *
369
- * @default false
370
- */
371
- this.valuePrimitive = input(false, { ...(ngDevMode ? { debugName: "valuePrimitive" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
372
- effect(() => {
373
- const popupTemplate = this.popupTemplate();
374
- untracked(() => this.#dropdownService.popupTemplate.set(popupTemplate));
375
- });
376
- effect(() => {
377
- const value = this.value();
378
- const valueField = this.valueField();
379
- this.valuePrimitive();
380
- this.selectedListItem();
381
- untracked(() => {
382
- this.#listService.setValueField(valueField ?? "");
383
- this.synchronizeSelection(value);
384
- this.comboBoxValue.set(this.valueText());
385
- });
386
- });
387
- afterNextRender({
388
- read: () => {
389
- this.initialize();
390
- this.setSubscriptions();
391
- }
392
- });
393
- }
394
- /**
395
- * @description Moves focus to the inner input. The caret goes to the end of the text.
396
- * @param options Passed to `HTMLElement.focus()`, for example `{ preventScroll: true }`.
397
- */
398
- focus(options) {
399
- const input = this.#hostElementRef.nativeElement.querySelector("input");
400
- if (input) {
401
- input.focus(options);
402
- input.setSelectionRange(input.value.length, input.value.length);
403
- }
404
- }
405
- onFocusOut(event) {
406
- // Removing a focused dropdown from the page fires focusout after it is destroyed.
407
- if (this.#destroyRef.destroyed) {
408
- return;
409
- }
410
- const nextTarget = event.relatedTarget;
411
- if (nextTarget instanceof Node) {
412
- const popupElement = this.#dropdownService.popupRef()?.overlayRef.overlayElement;
413
- if (this.#hostElementRef.nativeElement.contains(nextTarget) || popupElement?.contains(nextTarget)) {
414
- return;
415
- }
416
- }
417
- this.resolveText();
418
- this.touch.emit();
419
- }
420
- onHostPointerDown(event) {
421
- // A press on the padding, the affixes or the arrow focuses the input instead of the host. Controls of
422
- // their own (the input, the clear button, links or buttons in a prefix) keep the press.
423
- const host = this.#hostElementRef.nativeElement;
424
- const target = event.target;
425
- const control = target?.closest("a, button, input, select, textarea, [tabindex]");
426
- if (this.effectiveDisabled() || (control != null && control !== host)) {
427
- return;
428
- }
429
- event.preventDefault();
430
- host.querySelector("input")?.focus();
431
- }
432
- onInput(text) {
433
- // Keep the signal in step with the input on every keystroke, so that writing the same text back (a revert to
434
- // the selected item's text, say) still reaches the DOM through the [value] binding.
435
- this.comboBoxValue.set(text);
436
- this.comboBoxValue$.next(text);
437
- }
438
- onItemSelect(event) {
439
- if (this.#listService.filterableOptions().enabled &&
440
- event.source.via === "keyboard" &&
441
- event.source.key !== "Enter") {
442
- return;
443
- }
444
- this.updateValue(this.getControlValue(event.item.data));
445
- this.closePopup();
446
- }
447
- onPopupPointerDown(event) {
448
- const target = event.target;
449
- if (target?.tagName !== "INPUT") {
450
- event.preventDefault();
451
- }
452
- }
453
- onValueClear(event) {
454
- if (this.effectiveDisabled() ||
455
- this.readonly() ||
456
- (event instanceof KeyboardEvent && event.key !== "Enter" && event.key !== " ")) {
457
- return;
458
- }
459
- event.preventDefault();
460
- event.stopImmediatePropagation();
461
- this.updateValue(null);
462
- this.#listService.clearSelections();
463
- this.comboBoxValue.set("");
464
- this.focus();
465
- }
466
- clear() {
467
- this.updateValue(null);
468
- this.comboBoxValue.set("");
469
- this.#listService.clearSelections();
470
- this.#listService.clearFilter();
471
- }
472
- closePopup() {
473
- this.#popupRef()?.close();
474
- }
475
- getControlValue(dataItem) {
476
- const value = this.valuePrimitive() ? this.#listService.getDataItemValue(dataItem) : dataItem;
477
- return value;
478
- }
479
- handleEnterKey() {
480
- const comboBoxText = this.comboBoxValue();
481
- const highlightedItem = this.#listService.highlightedItem();
482
- if (this.#userNavigatedViaArrows() && highlightedItem) {
483
- this.selectItem(highlightedItem);
484
- return;
485
- }
486
- if (!this.allowCustomValue()) {
487
- if (highlightedItem) {
488
- const highlightedText = this.#listService.getItemText(highlightedItem);
489
- if (highlightedText.toLowerCase() === comboBoxText.toLowerCase()) {
490
- this.selectItem(highlightedItem);
491
- }
492
- else {
493
- const matchingItem = this.#listService.getMatchingFilteredItem(comboBoxText);
494
- if (matchingItem) {
495
- this.selectItem(matchingItem);
496
- }
497
- else {
498
- this.clear();
499
- }
500
- }
501
- }
502
- else {
503
- const matchingItem = this.#listService.getMatchingFilteredItem(comboBoxText);
504
- if (matchingItem) {
505
- this.selectItem(matchingItem);
506
- }
507
- else {
508
- this.clear();
509
- }
510
- }
511
- }
512
- else {
513
- if (highlightedItem) {
514
- const highlightedText = this.#listService.getItemText(highlightedItem);
515
- if (highlightedText.toLowerCase() === comboBoxText.toLowerCase()) {
516
- this.selectItem(highlightedItem);
517
- }
518
- else if (comboBoxText) {
519
- this.valueAdd.emit(comboBoxText);
520
- }
521
- }
522
- else if (comboBoxText) {
523
- this.valueAdd.emit(comboBoxText);
524
- }
525
- }
526
- }
527
- initialize() {
528
- this.#listService.setNavigableOptions({ enabled: true, mode: "highlight" });
529
- this.#listService.setSelectableOptions(this.selectableOptions);
530
- this.#listService.filterInputVisible.set(false);
531
- this.comboBoxValue.set(this.valueText());
532
- }
533
- notifyFilterChange(filter) {
534
- const event = new FilterChangeEvent(filter);
535
- this.#listService.filterChange$.next(event);
536
- return event;
537
- }
538
- /**
539
- * Settles typed text when focus leaves the combo box, so the field never shows text that isn't its value:
540
- * an item whose text matches is selected, empty text clears the value, other text is offered through
541
- * `valueAdd` when custom values are allowed, and otherwise the selected item's text comes back.
542
- */
543
- resolveText() {
544
- // Read the input itself: with a filter debounce, the last keystrokes may not have reached comboBoxValue yet.
545
- const input = this.#hostElementRef.nativeElement.querySelector("input");
546
- const text = input?.value ?? this.comboBoxValue();
547
- this.comboBoxValue.set(text);
548
- const selectedItem = this.selectedListItem();
549
- const selectedText = selectedItem ? this.#listService.getItemText(selectedItem) : "";
550
- if (text === selectedText) {
551
- return;
552
- }
553
- if (!text) {
554
- this.clear();
555
- return;
556
- }
557
- const matchingItem = this.#listService.getMatchingFilteredItem(text);
558
- if (matchingItem && this.#listService.getItemText(matchingItem).toLowerCase() === text.toLowerCase()) {
559
- this.selectItem(matchingItem);
560
- return;
561
- }
562
- if (this.allowCustomValue()) {
563
- this.valueAdd.emit(text);
564
- return;
565
- }
566
- this.comboBoxValue.set(selectedText);
567
- }
568
- selectItem(item) {
569
- this.#listService.selectItem(item);
570
- this.updateValue(this.getControlValue(item.data));
571
- }
572
- setArrowNavigationSubscription() {
573
- this.#dropdownListService.navigate$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(({ item }) => {
574
- if (!this.expanded()) {
575
- this.#listService.selectItem(item);
576
- this.updateValue(this.getControlValue(item.data));
577
- }
578
- else {
579
- this.#userNavigatedViaArrows.set(true);
580
- }
581
- });
582
- }
583
- setComboboxValueSubscription() {
584
- this.comboBoxValue$
585
- .pipe(takeUntilDestroyed(this.#destroyRef), debounceTime(this.#listService.getFilterDebounceDuration()), filter(value => value !== null))
586
- .subscribe(value => {
587
- this.#userNavigatedViaArrows.set(false);
588
- if (this.#listService.isFilteringEnabled()) {
589
- const event = this.notifyFilterChange(value);
590
- if (event.isDefaultPrevented()) {
591
- return;
592
- }
593
- if (value) {
594
- this.#listService.setFilter(value);
595
- }
596
- else {
597
- this.#listService.clearFilter();
598
- }
599
- }
600
- if (!this.#popupRef()) {
601
- this.#dropdownService.triggerPopupOpen$.next({});
602
- }
603
- this.comboBoxValue.set(value ?? "");
604
- const item = this.#listService.getMatchingFilteredItem(value);
605
- if (item) {
606
- this.#listService.highlightedItem.set(item);
607
- if (this.#popupRef()) {
608
- this.#listService.scrollToItem$.next({ item, focus: false });
609
- }
610
- else {
611
- this.#dropdownService.popupOpenComplete$.pipe(take(1)).subscribe(() => {
612
- this.#listService.scrollToItem$.next({ item, focus: false });
613
- });
614
- }
615
- }
616
- });
617
- }
618
- setEscapeKeySubscription() {
619
- this.#dropdownService.beforeKeydown$
620
- .pipe(takeUntilDestroyed(this.#destroyRef), filter(e => e.originalEvent?.key === "Escape"), tap(e => e.preventDefault()))
621
- .subscribe(event => {
622
- if (this.#popupRef()) {
623
- const selectedItem = this.selectedListItem();
624
- if (selectedItem) {
625
- this.comboBoxValue.set(this.#listService.getItemText(selectedItem));
626
- }
627
- else {
628
- this.clear();
629
- }
630
- this.closePopup();
631
- }
632
- else if (this.comboBoxValue() || this.value() != null) {
633
- // This Escape was used to clear the field; a dialog or window around it waits for the next.
634
- event.originalEvent?.stopPropagation();
635
- this.clear();
636
- this.focus();
637
- }
638
- });
639
- }
640
- setKeydownSubscription() {
641
- this.#dropdownService.keydown$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(event => {
642
- if (event.key === "Enter") {
643
- event.preventDefault();
644
- this.handleEnterKey();
645
- this.closePopup();
646
- }
647
- else if (event.key === "Tab") {
648
- this.closePopup();
649
- }
650
- });
651
- }
652
- setPopupCloseSubscriptions() {
653
- this.#dropdownService.popupCloseComplete$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => {
654
- this.#userNavigatedViaArrows.set(false);
655
- if (this.#dropdownService.focusCanReturn()) {
656
- this.focus();
657
- }
658
- window.setTimeout(() => {
659
- this.comboBoxValue$.next(null);
660
- });
661
- });
662
- }
663
- setSpaceKeySubscription() {
664
- this.#dropdownService.beforeKeydown$
665
- .pipe(takeUntilDestroyed(this.#destroyRef), filter(e => e.originalEvent?.key === " "), tap(e => e.preventDefault()))
666
- .subscribe();
667
- }
668
- setSubscriptions() {
669
- this.setArrowNavigationSubscription();
670
- this.setComboboxValueSubscription();
671
- this.setEscapeKeySubscription();
672
- this.setKeydownSubscription();
673
- this.setPopupCloseSubscriptions();
674
- this.setSpaceKeySubscription();
675
- }
676
- synchronizeSelection(value) {
677
- if (value == null) {
678
- this.#listService.clearSelections();
679
- return;
680
- }
681
- if (this.valuePrimitive()) {
682
- this.#listService.setSelectedKeys([value]);
683
- }
684
- else {
685
- this.#listService.setSelectedDataItems([value]);
686
- }
687
- }
688
- updateValue(value) {
689
- if (this.value() !== value) {
690
- this.value.set(value);
691
- }
692
- this.comboBoxValue.set(this.valueText());
693
- }
694
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ComboBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
695
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ComboBoxComponent, isStandalone: true, selector: "mona-combo-box", inputs: { allowCustomValue: { classPropertyName: "allowCustomValue", publicName: "allowCustomValue", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, itemDisabled: { classPropertyName: "itemDisabled", publicName: "itemDisabled", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, popupClass: { classPropertyName: "popupClass", publicName: "popupClass", isSignal: true, isRequired: false, transformFunction: null }, popupHeight: { classPropertyName: "popupHeight", publicName: "popupHeight", isSignal: true, isRequired: false, transformFunction: null }, popupWidth: { classPropertyName: "popupWidth", publicName: "popupWidth", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, showClearButton: { classPropertyName: "showClearButton", publicName: "showClearButton", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, textField: { classPropertyName: "textField", publicName: "textField", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, valueField: { classPropertyName: "valueField", publicName: "valueField", isSignal: true, isRequired: false, transformFunction: null }, valuePrimitive: { classPropertyName: "valuePrimitive", publicName: "valuePrimitive", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { close: "close", closed: "closed", open: "open", opened: "opened", touch: "touch", value: "valueChange", valueAdd: "valueAdd" }, host: { listeners: { "focusout": "onFocusOut($event)", "pointerdown": "onHostPointerDown($event)" }, properties: { "attr.aria-describedby": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.data-disabled": "effectiveDisabled() || null", "attr.data-invalid": "invalidState() || null", "attr.data-readonly": "readonly() || null", "attr.tabindex": "-1", "class": "baseClass()" } }, providers: [
696
- ListService,
697
- DropdownService,
698
- DropdownListService,
699
- {
700
- provide: DROPDOWN_DATA_INPUT_TOKEN,
701
- useExisting: forwardRef(() => ComboBoxComponent),
702
- multi: false
703
- },
704
- {
705
- provide: DROPDOWN_POPUP_INPUT_TOKEN,
706
- useExisting: forwardRef(() => ComboBoxComponent),
707
- multi: false
708
- }
709
- ], queries: [{ propertyName: "footerTemplate", first: true, predicate: DropdownFooterTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "groupHeaderTemplate", first: true, predicate: DropdownGroupHeaderTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "headerTemplate", first: true, predicate: DropdownHeaderTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "itemTemplate", first: true, predicate: DropdownItemTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "noDataTemplate", first: true, predicate: DropdownNoDataTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "prefixTemplate", first: true, predicate: DropdownPrefixTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "popupTemplate", first: true, predicate: ["popupTemplate"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.DropdownDataHandlerDirective }, { directive: i1.DropdownListPopupHandlerDirective }, { directive: i1.DropdownLiveRegionDirective }], ngImport: i0, template: "@if (prefixTemplate()) {\n <span [class]=\"affixClass()\">\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </span>\n}\n\n<input\n monaTextBox\n [class]=\"inputClass()\"\n [disabled]=\"effectiveDisabled()\"\n [id]=\"inputId()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [value]=\"comboBoxValue()\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-autocomplete]=\"'list'\"\n [attr.aria-busy]=\"loading()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-describedby]=\"ariaDescribedBy() || undefined\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-invalid]=\"invalidState() || undefined\"\n [attr.aria-label]=\"ariaLabel() || undefined\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || undefined\"\n role=\"combobox\"\n (input)=\"onInput(textInput.value)\"\n #textInput />\n\n@if (clearButtonVisible()) {\n <mona-indicator-icon\n preset=\"clear\"\n [interactive]=\"true\"\n [label]=\"messages().clear\"\n (activate)=\"onValueClear($event)\"></mona-indicator-icon>\n}\n\n@if (loading()) {\n <mona-indicator-icon preset=\"loading\" [size]=\"12\"></mona-indicator-icon>\n}\n\n<mona-indicator-icon preset=\"dropdown\" [size]=\"18\"></mona-indicator-icon>\n\n<ng-template #popupTemplate>\n <div [class]=\"listPopupClass()\" (pointerdown)=\"onPopupPointerDown($event)\">\n <mona-list (itemSelect)=\"onItemSelect($event)\" [focusOnMount]=\"false\" [size]=\"size()\" [listId]=\"listId\">\n @if (footerTemplate()) {\n <ng-template monaListFooterTemplate>\n <ng-container [ngTemplateOutlet]=\"footerTemplate()\"></ng-container>\n </ng-template>\n }\n @if (groupHeaderTemplate()) {\n <ng-template monaListGroupHeaderTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupHeaderTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (headerTemplate()) {\n <ng-template monaListHeaderTemplate>\n <ng-container [ngTemplateOutlet]=\"headerTemplate()\"></ng-container>\n </ng-template>\n }\n @if (itemTemplate()) {\n <ng-template monaListItemTemplate let-dataItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"></ng-container>\n </ng-template>\n }\n @if (noDataTemplate()) {\n <ng-template monaListNoDataTemplate>\n <ng-container [ngTemplateOutlet]=\"noDataTemplate()\"></ng-container>\n </ng-template>\n }\n </mona-list>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: TextBoxDirective, selector: "input[monaTextBox]", inputs: ["invalid", "rounded", "size", "touched", "class"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ListComponent, selector: "mona-list", inputs: ["ariaLabel", "ariaLabelledBy", "busy", "data", "focusOnMount", "height", "listClass", "listId", "listItemClass", "listItemStyle", "listRole", "listStyle", "maxHeight", "maxWidth", "size", "textField", "width"], outputs: ["itemActivate", "itemSelect"] }, { kind: "directive", type: ListGroupHeaderTemplateDirective, selector: "ng-template[monaListGroupHeaderTemplate]" }, { kind: "directive", type: ListFooterTemplateDirective, selector: "ng-template[monaListFooterTemplate]" }, { kind: "directive", type: ListHeaderTemplateDirective, selector: "ng-template[monaListHeaderTemplate]" }, { kind: "directive", type: ListNoDataTemplateDirective, selector: "ng-template[monaListNoDataTemplate]" }, { kind: "directive", type: ListItemTemplateDirective, selector: "ng-template[monaListItemTemplate]" }, { kind: "component", type: IndicatorIconComponent, selector: "mona-indicator-icon", inputs: ["icon", "interactive", "label", "preset", "size", "class"], outputs: ["activate"] }] }); }
710
- }
711
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ComboBoxComponent, decorators: [{
712
- type: Component,
713
- args: [{ selector: "mona-combo-box", providers: [
714
- ListService,
715
- DropdownService,
716
- DropdownListService,
717
- {
718
- provide: DROPDOWN_DATA_INPUT_TOKEN,
719
- useExisting: forwardRef(() => ComboBoxComponent),
720
- multi: false
721
- },
722
- {
723
- provide: DROPDOWN_POPUP_INPUT_TOKEN,
724
- useExisting: forwardRef(() => ComboBoxComponent),
725
- multi: false
726
- }
727
- ], imports: [
728
- TextBoxDirective,
729
- NgTemplateOutlet,
730
- ListComponent,
731
- ListGroupHeaderTemplateDirective,
732
- ListFooterTemplateDirective,
733
- ListHeaderTemplateDirective,
734
- ListNoDataTemplateDirective,
735
- ListItemTemplateDirective,
736
- IndicatorIconComponent
737
- ], hostDirectives: [DropdownDataHandlerDirective, DropdownListPopupHandlerDirective, DropdownLiveRegionDirective], host: {
738
- // The host has no role: the inner input is the combobox and carries the name, description and state. A static
739
- // aria-* attribute written on <mona-combo-box> would otherwise stay on the host as well.
740
- "[attr.aria-describedby]": "null",
741
- "[attr.aria-label]": "null",
742
- "[attr.aria-labelledby]": "null",
743
- "[attr.data-disabled]": "effectiveDisabled() || null",
744
- "[attr.data-invalid]": "invalidState() || null",
745
- "[attr.data-readonly]": "readonly() || null",
746
- "[attr.tabindex]": "-1",
747
- "[class]": "baseClass()",
748
- "(focusout)": "onFocusOut($event)",
749
- "(pointerdown)": "onHostPointerDown($event)"
750
- }, template: "@if (prefixTemplate()) {\n <span [class]=\"affixClass()\">\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </span>\n}\n\n<input\n monaTextBox\n [class]=\"inputClass()\"\n [disabled]=\"effectiveDisabled()\"\n [id]=\"inputId()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [value]=\"comboBoxValue()\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-autocomplete]=\"'list'\"\n [attr.aria-busy]=\"loading()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-describedby]=\"ariaDescribedBy() || undefined\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-invalid]=\"invalidState() || undefined\"\n [attr.aria-label]=\"ariaLabel() || undefined\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || undefined\"\n role=\"combobox\"\n (input)=\"onInput(textInput.value)\"\n #textInput />\n\n@if (clearButtonVisible()) {\n <mona-indicator-icon\n preset=\"clear\"\n [interactive]=\"true\"\n [label]=\"messages().clear\"\n (activate)=\"onValueClear($event)\"></mona-indicator-icon>\n}\n\n@if (loading()) {\n <mona-indicator-icon preset=\"loading\" [size]=\"12\"></mona-indicator-icon>\n}\n\n<mona-indicator-icon preset=\"dropdown\" [size]=\"18\"></mona-indicator-icon>\n\n<ng-template #popupTemplate>\n <div [class]=\"listPopupClass()\" (pointerdown)=\"onPopupPointerDown($event)\">\n <mona-list (itemSelect)=\"onItemSelect($event)\" [focusOnMount]=\"false\" [size]=\"size()\" [listId]=\"listId\">\n @if (footerTemplate()) {\n <ng-template monaListFooterTemplate>\n <ng-container [ngTemplateOutlet]=\"footerTemplate()\"></ng-container>\n </ng-template>\n }\n @if (groupHeaderTemplate()) {\n <ng-template monaListGroupHeaderTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupHeaderTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (headerTemplate()) {\n <ng-template monaListHeaderTemplate>\n <ng-container [ngTemplateOutlet]=\"headerTemplate()\"></ng-container>\n </ng-template>\n }\n @if (itemTemplate()) {\n <ng-template monaListItemTemplate let-dataItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"></ng-container>\n </ng-template>\n }\n @if (noDataTemplate()) {\n <ng-template monaListNoDataTemplate>\n <ng-container [ngTemplateOutlet]=\"noDataTemplate()\"></ng-container>\n </ng-template>\n }\n </mona-list>\n </div>\n</ng-template>\n" }]
751
- }], ctorParameters: () => [], propDecorators: { footerTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownFooterTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], groupHeaderTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownGroupHeaderTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], headerTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownHeaderTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], itemTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownItemTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], noDataTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownNoDataTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], popupTemplate: [{ type: i0.ViewChild, args: ["popupTemplate", { isSignal: true }] }], prefixTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => DropdownPrefixTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], allowCustomValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowCustomValue", required: false }] }], ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], closed: [{ type: i0.Output, args: ["closed"] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], itemDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemDisabled", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], open: [{ type: i0.Output, args: ["open"] }], opened: [{ type: i0.Output, args: ["opened"] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], popupClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupClass", required: false }] }], popupHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupHeight", required: false }] }], popupWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupWidth", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], showClearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "showClearButton", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], textField: [{ type: i0.Input, args: [{ isSignal: true, alias: "textField", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], valueAdd: [{ type: i0.Output, args: ["valueAdd"] }], valueField: [{ type: i0.Input, args: [{ isSignal: true, alias: "valueField", required: false }] }], valuePrimitive: [{ type: i0.Input, args: [{ isSignal: true, alias: "valuePrimitive", required: false }] }] } });
752
-
753
- /*
754
- * Public API Surface of @nanahoshi/mona-ui/combo-box
755
- */
756
-
757
- /**
758
- * Generated bundle index. Do not edit.
759
- */
760
-
76
+ var ComboBoxComponent = class ComboBoxComponent {
77
+ #destroyRef;
78
+ #dropdownListService;
79
+ #dropdownService;
80
+ #hostElementRef;
81
+ #i18n;
82
+ #listService;
83
+ #popupRef;
84
+ #userNavigatedViaArrows;
85
+ constructor() {
86
+ this.#destroyRef = inject(DestroyRef);
87
+ this.#dropdownListService = inject(DropdownListService);
88
+ this.#dropdownService = inject(DropdownService);
89
+ this.#hostElementRef = inject(ElementRef);
90
+ this.#i18n = inject(MonaI18nService);
91
+ this.#listService = inject(ListService);
92
+ this.#popupRef = this.#dropdownService.popupRef;
93
+ this.#userNavigatedViaArrows = signal(false, ...ngDevMode ? [{ debugName: "#userNavigatedViaArrows" }] : /* istanbul ignore next */ []);
94
+ this.activeDescendant = computed(() => {
95
+ const highlightedItem = this.#listService.highlightedItem();
96
+ return highlightedItem ? highlightedItem.uid : null;
97
+ }, ...ngDevMode ? [{ debugName: "activeDescendant" }] : /* istanbul ignore next */ []);
98
+ this.affixClass = computed(() => {
99
+ return comboBoxAffixContainerThemeVariants();
100
+ }, ...ngDevMode ? [{ debugName: "affixClass" }] : /* istanbul ignore next */ []);
101
+ this.baseClass = computed(() => {
102
+ const disabled = this.effectiveDisabled();
103
+ const focused = this.#popupRef() != null;
104
+ const invalid = this.invalidState();
105
+ const rounded = this.rounded();
106
+ const size = this.size();
107
+ const variantClass = comboBoxBaseThemeVariants({
108
+ disabled,
109
+ focused,
110
+ invalid,
111
+ rounded,
112
+ size
113
+ });
114
+ const userClass = this.userClass();
115
+ return twMerge(variantClass, userClass);
116
+ }, ...ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []);
117
+ this.clearButtonVisible = computed(() => this.showClearButton() && this.selectedListItem() != null && !this.loading() && !this.effectiveDisabled() && !this.readonly(), ...ngDevMode ? [{ debugName: "clearButtonVisible" }] : /* istanbul ignore next */ []);
118
+ this.comboBoxValue = signal("", ...ngDevMode ? [{ debugName: "comboBoxValue" }] : /* istanbul ignore next */ []);
119
+ this.comboBoxValue$ = new Subject();
120
+ this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled());
121
+ this.expanded = computed(() => this.#popupRef() !== null, ...ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []);
122
+ this.footerTemplate = contentChild(DropdownFooterTemplateDirective, {
123
+ ...ngDevMode ? { debugName: "footerTemplate" } : /* istanbul ignore next */ {},
124
+ read: TemplateRef
125
+ });
126
+ this.groupHeaderTemplate = contentChild(DropdownGroupHeaderTemplateDirective, {
127
+ ...ngDevMode ? { debugName: "groupHeaderTemplate" } : /* istanbul ignore next */ {},
128
+ read: TemplateRef
129
+ });
130
+ this.headerTemplate = contentChild(DropdownHeaderTemplateDirective, {
131
+ ...ngDevMode ? { debugName: "headerTemplate" } : /* istanbul ignore next */ {},
132
+ read: TemplateRef
133
+ });
134
+ this.inputClass = computed(() => {
135
+ const rounded = this.rounded();
136
+ return comboBoxTextInputThemeVariants({ rounded });
137
+ }, ...ngDevMode ? [{ debugName: "inputClass" }] : /* istanbul ignore next */ []);
138
+ this.invalidState = computed(() => this.touched() && (this.invalid() || this.required() && this.value() == null), ...ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []);
139
+ this.itemTemplate = contentChild(DropdownItemTemplateDirective, {
140
+ ...ngDevMode ? { debugName: "itemTemplate" } : /* istanbul ignore next */ {},
141
+ read: TemplateRef
142
+ });
143
+ this.listId = createElementControlId();
144
+ this.listPopupClass = computed(() => {
145
+ const rounded = this.rounded();
146
+ const size = this.size();
147
+ const userClass = this.popupClass();
148
+ const variantClass = dropdownPopupThemeVariants({
149
+ rounded,
150
+ size
151
+ });
152
+ const heightClass = this.popupHeight() ? "max-h-none" : "";
153
+ return twMerge(variantClass, heightClass, userClass);
154
+ }, ...ngDevMode ? [{ debugName: "listPopupClass" }] : /* istanbul ignore next */ []);
155
+ this.messages = this.#i18n.componentMessages("comboBox", COMBO_BOX_DEFAULT_MESSAGES);
156
+ this.noDataTemplate = contentChild(DropdownNoDataTemplateDirective, {
157
+ ...ngDevMode ? { debugName: "noDataTemplate" } : /* istanbul ignore next */ {},
158
+ read: TemplateRef
159
+ });
160
+ this.popupTemplate = viewChild.required("popupTemplate", ...ngDevMode ? [{ debugName: "popupTemplate" }] : /* istanbul ignore next */ []);
161
+ this.prefixTemplate = contentChild(DropdownPrefixTemplateDirective, {
162
+ ...ngDevMode ? { debugName: "prefixTemplate" } : /* istanbul ignore next */ {},
163
+ read: TemplateRef
164
+ });
165
+ this.selectableOptions = {
166
+ enabled: true,
167
+ mode: "single",
168
+ toggleable: false
169
+ };
170
+ this.selectedListItem = computed(() => {
171
+ return this.#listService.selectedListItems().firstOrDefault();
172
+ }, ...ngDevMode ? [{ debugName: "selectedListItem" }] : /* istanbul ignore next */ []);
173
+ this.valueText = computed(() => {
174
+ const listItem = this.selectedListItem();
175
+ if (!listItem) return "";
176
+ return this.#listService.getItemText(listItem);
177
+ }, ...ngDevMode ? [{ debugName: "valueText" }] : /* istanbul ignore next */ []);
178
+ this.allowCustomValue = input(false, {
179
+ ...ngDevMode ? { debugName: "allowCustomValue" } : /* istanbul ignore next */ {},
180
+ transform: booleanAttribute
181
+ });
182
+ this.ariaDescribedBy = input("", {
183
+ ...ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {},
184
+ alias: "aria-describedby"
185
+ });
186
+ this.ariaLabel = input("", {
187
+ ...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
188
+ alias: "aria-label"
189
+ });
190
+ this.ariaLabelledBy = input("", {
191
+ ...ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {},
192
+ alias: "aria-labelledby"
193
+ });
194
+ this.close = output();
195
+ this.closed = output();
196
+ this.data = input([], ...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
197
+ this.disabled = input(false, {
198
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
199
+ transform: booleanAttribute
200
+ });
201
+ this.inputId = input(createElementControlId(), ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
202
+ this.invalid = input(false, {
203
+ ...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
204
+ transform: booleanAttribute
205
+ });
206
+ this.itemDisabled = input(...ngDevMode ? [void 0, { debugName: "itemDisabled" }] : /* istanbul ignore next */ []);
207
+ this.loading = input(false, {
208
+ ...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
209
+ transform: booleanAttribute
210
+ });
211
+ this.open = output();
212
+ this.opened = output();
213
+ this.placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
214
+ this.popupClass = input("", ...ngDevMode ? [{ debugName: "popupClass" }] : /* istanbul ignore next */ []);
215
+ this.popupHeight = input(null, ...ngDevMode ? [{ debugName: "popupHeight" }] : /* istanbul ignore next */ []);
216
+ this.popupWidth = input(null, ...ngDevMode ? [{ debugName: "popupWidth" }] : /* istanbul ignore next */ []);
217
+ this.readonly = input(false, {
218
+ ...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
219
+ transform: booleanAttribute
220
+ });
221
+ this.required = input(false, {
222
+ ...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
223
+ transform: booleanAttribute
224
+ });
225
+ this.rounded = input("medium", ...ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []);
226
+ this.showClearButton = input(false, {
227
+ ...ngDevMode ? { debugName: "showClearButton" } : /* istanbul ignore next */ {},
228
+ transform: booleanAttribute
229
+ });
230
+ this.size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
231
+ this.textField = input(...ngDevMode ? [void 0, { debugName: "textField" }] : /* istanbul ignore next */ []);
232
+ this.touch = output();
233
+ this.touched = input(false, {
234
+ ...ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {},
235
+ transform: booleanAttribute
236
+ });
237
+ this.userClass = input("", {
238
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
239
+ alias: "class"
240
+ });
241
+ this.value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
242
+ this.valueAdd = output();
243
+ this.valueField = input(...ngDevMode ? [void 0, { debugName: "valueField" }] : /* istanbul ignore next */ []);
244
+ this.valuePrimitive = input(false, {
245
+ ...ngDevMode ? { debugName: "valuePrimitive" } : /* istanbul ignore next */ {},
246
+ transform: booleanAttribute
247
+ });
248
+ effect(() => {
249
+ const popupTemplate = this.popupTemplate();
250
+ untracked(() => this.#dropdownService.popupTemplate.set(popupTemplate));
251
+ });
252
+ effect(() => {
253
+ const value = this.value();
254
+ const valueField = this.valueField();
255
+ this.valuePrimitive();
256
+ this.selectedListItem();
257
+ untracked(() => {
258
+ this.#listService.setValueField(valueField ?? "");
259
+ this.synchronizeSelection(value);
260
+ this.comboBoxValue.set(this.valueText());
261
+ });
262
+ });
263
+ afterNextRender({ read: () => {
264
+ this.initialize();
265
+ this.setSubscriptions();
266
+ } });
267
+ }
268
+ focus(options) {
269
+ const input = this.#hostElementRef.nativeElement.querySelector("input");
270
+ if (input) {
271
+ input.focus(options);
272
+ input.setSelectionRange(input.value.length, input.value.length);
273
+ }
274
+ }
275
+ onFocusOut(event) {
276
+ if (this.#destroyRef.destroyed) return;
277
+ const nextTarget = event.relatedTarget;
278
+ if (nextTarget instanceof Node) {
279
+ const popupElement = this.#dropdownService.popupRef()?.overlayRef.overlayElement;
280
+ if (this.#hostElementRef.nativeElement.contains(nextTarget) || popupElement?.contains(nextTarget)) return;
281
+ }
282
+ this.resolveText();
283
+ this.touch.emit();
284
+ }
285
+ onHostPointerDown(event) {
286
+ const host = this.#hostElementRef.nativeElement;
287
+ const control = event.target?.closest("a, button, input, select, textarea, [tabindex]");
288
+ if (this.effectiveDisabled() || control != null && control !== host) return;
289
+ event.preventDefault();
290
+ host.querySelector("input")?.focus();
291
+ }
292
+ onInput(text) {
293
+ this.comboBoxValue.set(text);
294
+ this.comboBoxValue$.next(text);
295
+ }
296
+ onItemSelect(event) {
297
+ if (this.#listService.filterableOptions().enabled && event.source.via === "keyboard" && event.source.key !== "Enter") return;
298
+ this.updateValue(this.getControlValue(event.item.data));
299
+ this.closePopup();
300
+ }
301
+ onPopupPointerDown(event) {
302
+ if (event.target?.tagName !== "INPUT") event.preventDefault();
303
+ }
304
+ onValueClear(event) {
305
+ if (this.effectiveDisabled() || this.readonly() || event instanceof KeyboardEvent && event.key !== "Enter" && event.key !== " ") return;
306
+ event.preventDefault();
307
+ event.stopImmediatePropagation();
308
+ this.updateValue(null);
309
+ this.#listService.clearSelections();
310
+ this.comboBoxValue.set("");
311
+ this.focus();
312
+ }
313
+ clear() {
314
+ this.updateValue(null);
315
+ this.comboBoxValue.set("");
316
+ this.#listService.clearSelections();
317
+ this.#listService.clearFilter();
318
+ }
319
+ closePopup() {
320
+ this.#popupRef()?.close();
321
+ }
322
+ getControlValue(dataItem) {
323
+ return this.valuePrimitive() ? this.#listService.getDataItemValue(dataItem) : dataItem;
324
+ }
325
+ handleEnterKey() {
326
+ const comboBoxText = this.comboBoxValue();
327
+ const highlightedItem = this.#listService.highlightedItem();
328
+ if (this.#userNavigatedViaArrows() && highlightedItem) {
329
+ this.selectItem(highlightedItem);
330
+ return;
331
+ }
332
+ if (!this.allowCustomValue()) {
333
+ if (highlightedItem) {
334
+ if (this.#listService.getItemText(highlightedItem).toLowerCase() === comboBoxText.toLowerCase()) this.selectItem(highlightedItem);
335
+ else {
336
+ const matchingItem = this.#listService.getMatchingFilteredItem(comboBoxText);
337
+ if (matchingItem) this.selectItem(matchingItem);
338
+ else this.clear();
339
+ }
340
+ } else {
341
+ const matchingItem = this.#listService.getMatchingFilteredItem(comboBoxText);
342
+ if (matchingItem) this.selectItem(matchingItem);
343
+ else this.clear();
344
+ }
345
+ } else if (highlightedItem) {
346
+ if (this.#listService.getItemText(highlightedItem).toLowerCase() === comboBoxText.toLowerCase()) this.selectItem(highlightedItem);
347
+ else if (comboBoxText) this.valueAdd.emit(comboBoxText);
348
+ } else if (comboBoxText) this.valueAdd.emit(comboBoxText);
349
+ }
350
+ initialize() {
351
+ this.#listService.setNavigableOptions({
352
+ enabled: true,
353
+ mode: "highlight"
354
+ });
355
+ this.#listService.setSelectableOptions(this.selectableOptions);
356
+ this.#listService.filterInputVisible.set(false);
357
+ this.comboBoxValue.set(this.valueText());
358
+ }
359
+ notifyFilterChange(filter) {
360
+ const event = new FilterChangeEvent(filter);
361
+ this.#listService.filterChange$.next(event);
362
+ return event;
363
+ }
364
+ resolveText() {
365
+ const text = this.#hostElementRef.nativeElement.querySelector("input")?.value ?? this.comboBoxValue();
366
+ this.comboBoxValue.set(text);
367
+ const selectedItem = this.selectedListItem();
368
+ const selectedText = selectedItem ? this.#listService.getItemText(selectedItem) : "";
369
+ if (text === selectedText) return;
370
+ if (!text) {
371
+ this.clear();
372
+ return;
373
+ }
374
+ const matchingItem = this.#listService.getMatchingFilteredItem(text);
375
+ if (matchingItem && this.#listService.getItemText(matchingItem).toLowerCase() === text.toLowerCase()) {
376
+ this.selectItem(matchingItem);
377
+ return;
378
+ }
379
+ if (this.allowCustomValue()) {
380
+ this.valueAdd.emit(text);
381
+ return;
382
+ }
383
+ this.comboBoxValue.set(selectedText);
384
+ }
385
+ selectItem(item) {
386
+ this.#listService.selectItem(item);
387
+ this.updateValue(this.getControlValue(item.data));
388
+ }
389
+ setArrowNavigationSubscription() {
390
+ this.#dropdownListService.navigate$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(({ item }) => {
391
+ if (!this.expanded()) {
392
+ this.#listService.selectItem(item);
393
+ this.updateValue(this.getControlValue(item.data));
394
+ } else this.#userNavigatedViaArrows.set(true);
395
+ });
396
+ }
397
+ setComboboxValueSubscription() {
398
+ this.comboBoxValue$.pipe(takeUntilDestroyed(this.#destroyRef), debounceTime(this.#listService.getFilterDebounceDuration()), filter((value) => value !== null)).subscribe((value) => {
399
+ this.#userNavigatedViaArrows.set(false);
400
+ if (this.#listService.isFilteringEnabled()) {
401
+ if (this.notifyFilterChange(value).isDefaultPrevented()) return;
402
+ if (value) this.#listService.setFilter(value);
403
+ else this.#listService.clearFilter();
404
+ }
405
+ if (!this.#popupRef()) this.#dropdownService.triggerPopupOpen$.next({});
406
+ this.comboBoxValue.set(value ?? "");
407
+ const item = this.#listService.getMatchingFilteredItem(value);
408
+ if (item) {
409
+ this.#listService.highlightedItem.set(item);
410
+ if (this.#popupRef()) this.#listService.scrollToItem$.next({
411
+ item,
412
+ focus: false
413
+ });
414
+ else this.#dropdownService.popupOpenComplete$.pipe(take(1)).subscribe(() => {
415
+ this.#listService.scrollToItem$.next({
416
+ item,
417
+ focus: false
418
+ });
419
+ });
420
+ }
421
+ });
422
+ }
423
+ setEscapeKeySubscription() {
424
+ this.#dropdownService.beforeKeydown$.pipe(takeUntilDestroyed(this.#destroyRef), filter((e) => e.originalEvent?.key === "Escape"), tap((e) => e.preventDefault())).subscribe((event) => {
425
+ if (this.#popupRef()) {
426
+ const selectedItem = this.selectedListItem();
427
+ if (selectedItem) this.comboBoxValue.set(this.#listService.getItemText(selectedItem));
428
+ else this.clear();
429
+ this.closePopup();
430
+ } else if (this.comboBoxValue() || this.value() != null) {
431
+ event.originalEvent?.stopPropagation();
432
+ this.clear();
433
+ this.focus();
434
+ }
435
+ });
436
+ }
437
+ setKeydownSubscription() {
438
+ this.#dropdownService.keydown$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe((event) => {
439
+ if (event.key === "Enter") {
440
+ event.preventDefault();
441
+ this.handleEnterKey();
442
+ this.closePopup();
443
+ } else if (event.key === "Tab") this.closePopup();
444
+ });
445
+ }
446
+ setPopupCloseSubscriptions() {
447
+ this.#dropdownService.popupCloseComplete$.pipe(takeUntilDestroyed(this.#destroyRef)).subscribe(() => {
448
+ this.#userNavigatedViaArrows.set(false);
449
+ if (this.#dropdownService.focusCanReturn()) this.focus();
450
+ window.setTimeout(() => {
451
+ this.comboBoxValue$.next(null);
452
+ });
453
+ });
454
+ }
455
+ setSpaceKeySubscription() {
456
+ this.#dropdownService.beforeKeydown$.pipe(takeUntilDestroyed(this.#destroyRef), filter((e) => e.originalEvent?.key === " "), tap((e) => e.preventDefault())).subscribe();
457
+ }
458
+ setSubscriptions() {
459
+ this.setArrowNavigationSubscription();
460
+ this.setComboboxValueSubscription();
461
+ this.setEscapeKeySubscription();
462
+ this.setKeydownSubscription();
463
+ this.setPopupCloseSubscriptions();
464
+ this.setSpaceKeySubscription();
465
+ }
466
+ synchronizeSelection(value) {
467
+ if (value == null) {
468
+ this.#listService.clearSelections();
469
+ return;
470
+ }
471
+ if (this.valuePrimitive()) this.#listService.setSelectedKeys([value]);
472
+ else this.#listService.setSelectedDataItems([value]);
473
+ }
474
+ updateValue(value) {
475
+ if (this.value() !== value) this.value.set(value);
476
+ this.comboBoxValue.set(this.valueText());
477
+ }
478
+ static {
479
+ this.ɵfac = i0.ɵɵngDeclareFactory({
480
+ minVersion: "12.0.0",
481
+ version: "22.2.6",
482
+ ngImport: i0,
483
+ type: ComboBoxComponent,
484
+ deps: [],
485
+ target: i0.ɵɵFactoryTarget.Component
486
+ });
487
+ }
488
+ static {
489
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
490
+ minVersion: "17.0.0",
491
+ version: "22.2.6",
492
+ type: ComboBoxComponent,
493
+ isStandalone: true,
494
+ selector: "mona-combo-box",
495
+ inputs: {
496
+ allowCustomValue: {
497
+ classPropertyName: "allowCustomValue",
498
+ publicName: "allowCustomValue",
499
+ isSignal: true,
500
+ isRequired: false,
501
+ transformFunction: null
502
+ },
503
+ ariaDescribedBy: {
504
+ classPropertyName: "ariaDescribedBy",
505
+ publicName: "aria-describedby",
506
+ isSignal: true,
507
+ isRequired: false,
508
+ transformFunction: null
509
+ },
510
+ ariaLabel: {
511
+ classPropertyName: "ariaLabel",
512
+ publicName: "aria-label",
513
+ isSignal: true,
514
+ isRequired: false,
515
+ transformFunction: null
516
+ },
517
+ ariaLabelledBy: {
518
+ classPropertyName: "ariaLabelledBy",
519
+ publicName: "aria-labelledby",
520
+ isSignal: true,
521
+ isRequired: false,
522
+ transformFunction: null
523
+ },
524
+ data: {
525
+ classPropertyName: "data",
526
+ publicName: "data",
527
+ isSignal: true,
528
+ isRequired: false,
529
+ transformFunction: null
530
+ },
531
+ disabled: {
532
+ classPropertyName: "disabled",
533
+ publicName: "disabled",
534
+ isSignal: true,
535
+ isRequired: false,
536
+ transformFunction: null
537
+ },
538
+ inputId: {
539
+ classPropertyName: "inputId",
540
+ publicName: "inputId",
541
+ isSignal: true,
542
+ isRequired: false,
543
+ transformFunction: null
544
+ },
545
+ invalid: {
546
+ classPropertyName: "invalid",
547
+ publicName: "invalid",
548
+ isSignal: true,
549
+ isRequired: false,
550
+ transformFunction: null
551
+ },
552
+ itemDisabled: {
553
+ classPropertyName: "itemDisabled",
554
+ publicName: "itemDisabled",
555
+ isSignal: true,
556
+ isRequired: false,
557
+ transformFunction: null
558
+ },
559
+ loading: {
560
+ classPropertyName: "loading",
561
+ publicName: "loading",
562
+ isSignal: true,
563
+ isRequired: false,
564
+ transformFunction: null
565
+ },
566
+ placeholder: {
567
+ classPropertyName: "placeholder",
568
+ publicName: "placeholder",
569
+ isSignal: true,
570
+ isRequired: false,
571
+ transformFunction: null
572
+ },
573
+ popupClass: {
574
+ classPropertyName: "popupClass",
575
+ publicName: "popupClass",
576
+ isSignal: true,
577
+ isRequired: false,
578
+ transformFunction: null
579
+ },
580
+ popupHeight: {
581
+ classPropertyName: "popupHeight",
582
+ publicName: "popupHeight",
583
+ isSignal: true,
584
+ isRequired: false,
585
+ transformFunction: null
586
+ },
587
+ popupWidth: {
588
+ classPropertyName: "popupWidth",
589
+ publicName: "popupWidth",
590
+ isSignal: true,
591
+ isRequired: false,
592
+ transformFunction: null
593
+ },
594
+ readonly: {
595
+ classPropertyName: "readonly",
596
+ publicName: "readonly",
597
+ isSignal: true,
598
+ isRequired: false,
599
+ transformFunction: null
600
+ },
601
+ required: {
602
+ classPropertyName: "required",
603
+ publicName: "required",
604
+ isSignal: true,
605
+ isRequired: false,
606
+ transformFunction: null
607
+ },
608
+ rounded: {
609
+ classPropertyName: "rounded",
610
+ publicName: "rounded",
611
+ isSignal: true,
612
+ isRequired: false,
613
+ transformFunction: null
614
+ },
615
+ showClearButton: {
616
+ classPropertyName: "showClearButton",
617
+ publicName: "showClearButton",
618
+ isSignal: true,
619
+ isRequired: false,
620
+ transformFunction: null
621
+ },
622
+ size: {
623
+ classPropertyName: "size",
624
+ publicName: "size",
625
+ isSignal: true,
626
+ isRequired: false,
627
+ transformFunction: null
628
+ },
629
+ textField: {
630
+ classPropertyName: "textField",
631
+ publicName: "textField",
632
+ isSignal: true,
633
+ isRequired: false,
634
+ transformFunction: null
635
+ },
636
+ touched: {
637
+ classPropertyName: "touched",
638
+ publicName: "touched",
639
+ isSignal: true,
640
+ isRequired: false,
641
+ transformFunction: null
642
+ },
643
+ userClass: {
644
+ classPropertyName: "userClass",
645
+ publicName: "class",
646
+ isSignal: true,
647
+ isRequired: false,
648
+ transformFunction: null
649
+ },
650
+ value: {
651
+ classPropertyName: "value",
652
+ publicName: "value",
653
+ isSignal: true,
654
+ isRequired: false,
655
+ transformFunction: null
656
+ },
657
+ valueField: {
658
+ classPropertyName: "valueField",
659
+ publicName: "valueField",
660
+ isSignal: true,
661
+ isRequired: false,
662
+ transformFunction: null
663
+ },
664
+ valuePrimitive: {
665
+ classPropertyName: "valuePrimitive",
666
+ publicName: "valuePrimitive",
667
+ isSignal: true,
668
+ isRequired: false,
669
+ transformFunction: null
670
+ }
671
+ },
672
+ outputs: {
673
+ close: "close",
674
+ closed: "closed",
675
+ open: "open",
676
+ opened: "opened",
677
+ touch: "touch",
678
+ value: "valueChange",
679
+ valueAdd: "valueAdd"
680
+ },
681
+ host: {
682
+ listeners: {
683
+ "focusout": "onFocusOut($event)",
684
+ "pointerdown": "onHostPointerDown($event)"
685
+ },
686
+ properties: {
687
+ "attr.aria-describedby": "null",
688
+ "attr.aria-label": "null",
689
+ "attr.aria-labelledby": "null",
690
+ "attr.data-disabled": "effectiveDisabled() || null",
691
+ "attr.data-invalid": "invalidState() || null",
692
+ "attr.data-readonly": "readonly() || null",
693
+ "attr.tabindex": "-1",
694
+ "class": "baseClass()"
695
+ }
696
+ },
697
+ providers: [
698
+ ListService,
699
+ DropdownService,
700
+ DropdownListService,
701
+ {
702
+ provide: DROPDOWN_DATA_INPUT_TOKEN,
703
+ useExisting: forwardRef(() => ComboBoxComponent),
704
+ multi: false
705
+ },
706
+ {
707
+ provide: DROPDOWN_POPUP_INPUT_TOKEN,
708
+ useExisting: forwardRef(() => ComboBoxComponent),
709
+ multi: false
710
+ }
711
+ ],
712
+ queries: [
713
+ {
714
+ propertyName: "footerTemplate",
715
+ first: true,
716
+ predicate: DropdownFooterTemplateDirective,
717
+ descendants: true,
718
+ read: TemplateRef,
719
+ isSignal: true
720
+ },
721
+ {
722
+ propertyName: "groupHeaderTemplate",
723
+ first: true,
724
+ predicate: DropdownGroupHeaderTemplateDirective,
725
+ descendants: true,
726
+ read: TemplateRef,
727
+ isSignal: true
728
+ },
729
+ {
730
+ propertyName: "headerTemplate",
731
+ first: true,
732
+ predicate: DropdownHeaderTemplateDirective,
733
+ descendants: true,
734
+ read: TemplateRef,
735
+ isSignal: true
736
+ },
737
+ {
738
+ propertyName: "itemTemplate",
739
+ first: true,
740
+ predicate: DropdownItemTemplateDirective,
741
+ descendants: true,
742
+ read: TemplateRef,
743
+ isSignal: true
744
+ },
745
+ {
746
+ propertyName: "noDataTemplate",
747
+ first: true,
748
+ predicate: DropdownNoDataTemplateDirective,
749
+ descendants: true,
750
+ read: TemplateRef,
751
+ isSignal: true
752
+ },
753
+ {
754
+ propertyName: "prefixTemplate",
755
+ first: true,
756
+ predicate: DropdownPrefixTemplateDirective,
757
+ descendants: true,
758
+ read: TemplateRef,
759
+ isSignal: true
760
+ }
761
+ ],
762
+ viewQueries: [{
763
+ propertyName: "popupTemplate",
764
+ first: true,
765
+ predicate: ["popupTemplate"],
766
+ descendants: true,
767
+ isSignal: true
768
+ }],
769
+ hostDirectives: [
770
+ { directive: i1.DropdownDataHandlerDirective },
771
+ { directive: i1.DropdownListPopupHandlerDirective },
772
+ { directive: i1.DropdownLiveRegionDirective }
773
+ ],
774
+ ngImport: i0,
775
+ template: "@if (prefixTemplate()) {\n <span [class]=\"affixClass()\">\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </span>\n}\n\n<input\n monaTextBox\n [class]=\"inputClass()\"\n [disabled]=\"effectiveDisabled()\"\n [id]=\"inputId()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [value]=\"comboBoxValue()\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-autocomplete]=\"'list'\"\n [attr.aria-busy]=\"loading()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-describedby]=\"ariaDescribedBy() || undefined\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-invalid]=\"invalidState() || undefined\"\n [attr.aria-label]=\"ariaLabel() || undefined\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || undefined\"\n role=\"combobox\"\n (input)=\"onInput(textInput.value)\"\n #textInput />\n\n@if (clearButtonVisible()) {\n <mona-indicator-icon\n preset=\"clear\"\n [interactive]=\"true\"\n [label]=\"messages().clear\"\n (activate)=\"onValueClear($event)\"></mona-indicator-icon>\n}\n\n@if (loading()) {\n <mona-indicator-icon preset=\"loading\" [size]=\"12\"></mona-indicator-icon>\n}\n\n<mona-indicator-icon preset=\"dropdown\" [size]=\"18\"></mona-indicator-icon>\n\n<ng-template #popupTemplate>\n <div [class]=\"listPopupClass()\" (pointerdown)=\"onPopupPointerDown($event)\">\n <mona-list (itemSelect)=\"onItemSelect($event)\" [focusOnMount]=\"false\" [size]=\"size()\" [listId]=\"listId\">\n @if (footerTemplate()) {\n <ng-template monaListFooterTemplate>\n <ng-container [ngTemplateOutlet]=\"footerTemplate()\"></ng-container>\n </ng-template>\n }\n @if (groupHeaderTemplate()) {\n <ng-template monaListGroupHeaderTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupHeaderTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (headerTemplate()) {\n <ng-template monaListHeaderTemplate>\n <ng-container [ngTemplateOutlet]=\"headerTemplate()\"></ng-container>\n </ng-template>\n }\n @if (itemTemplate()) {\n <ng-template monaListItemTemplate let-dataItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"></ng-container>\n </ng-template>\n }\n @if (noDataTemplate()) {\n <ng-template monaListNoDataTemplate>\n <ng-container [ngTemplateOutlet]=\"noDataTemplate()\"></ng-container>\n </ng-template>\n }\n </mona-list>\n </div>\n</ng-template>\n",
776
+ dependencies: [
777
+ {
778
+ kind: "directive",
779
+ type: TextBoxDirective,
780
+ selector: "input[monaTextBox]",
781
+ inputs: [
782
+ "invalid",
783
+ "rounded",
784
+ "size",
785
+ "touched",
786
+ "class"
787
+ ]
788
+ },
789
+ {
790
+ kind: "directive",
791
+ type: NgTemplateOutlet,
792
+ selector: "[ngTemplateOutlet]",
793
+ inputs: [
794
+ "ngTemplateOutletContext",
795
+ "ngTemplateOutlet",
796
+ "ngTemplateOutletInjector"
797
+ ]
798
+ },
799
+ {
800
+ kind: "component",
801
+ type: ListComponent,
802
+ selector: "mona-list",
803
+ inputs: [
804
+ "ariaLabel",
805
+ "ariaLabelledBy",
806
+ "busy",
807
+ "data",
808
+ "focusOnMount",
809
+ "height",
810
+ "listClass",
811
+ "listId",
812
+ "listItemClass",
813
+ "listItemStyle",
814
+ "listRole",
815
+ "listStyle",
816
+ "maxHeight",
817
+ "maxWidth",
818
+ "size",
819
+ "textField",
820
+ "width"
821
+ ],
822
+ outputs: ["itemActivate", "itemSelect"]
823
+ },
824
+ {
825
+ kind: "directive",
826
+ type: ListGroupHeaderTemplateDirective,
827
+ selector: "ng-template[monaListGroupHeaderTemplate]"
828
+ },
829
+ {
830
+ kind: "directive",
831
+ type: ListFooterTemplateDirective,
832
+ selector: "ng-template[monaListFooterTemplate]"
833
+ },
834
+ {
835
+ kind: "directive",
836
+ type: ListHeaderTemplateDirective,
837
+ selector: "ng-template[monaListHeaderTemplate]"
838
+ },
839
+ {
840
+ kind: "directive",
841
+ type: ListNoDataTemplateDirective,
842
+ selector: "ng-template[monaListNoDataTemplate]"
843
+ },
844
+ {
845
+ kind: "directive",
846
+ type: ListItemTemplateDirective,
847
+ selector: "ng-template[monaListItemTemplate]"
848
+ },
849
+ {
850
+ kind: "component",
851
+ type: IndicatorIconComponent,
852
+ selector: "mona-indicator-icon",
853
+ inputs: [
854
+ "icon",
855
+ "interactive",
856
+ "label",
857
+ "preset",
858
+ "size",
859
+ "class"
860
+ ],
861
+ outputs: ["activate"]
862
+ }
863
+ ]
864
+ });
865
+ }
866
+ };
867
+ i0.ɵɵngDeclareClassMetadata({
868
+ minVersion: "12.0.0",
869
+ version: "22.2.6",
870
+ ngImport: i0,
871
+ type: ComboBoxComponent,
872
+ decorators: [{
873
+ type: Component,
874
+ args: [{
875
+ selector: "mona-combo-box",
876
+ providers: [
877
+ ListService,
878
+ DropdownService,
879
+ DropdownListService,
880
+ {
881
+ provide: DROPDOWN_DATA_INPUT_TOKEN,
882
+ useExisting: forwardRef(() => ComboBoxComponent),
883
+ multi: false
884
+ },
885
+ {
886
+ provide: DROPDOWN_POPUP_INPUT_TOKEN,
887
+ useExisting: forwardRef(() => ComboBoxComponent),
888
+ multi: false
889
+ }
890
+ ],
891
+ imports: [
892
+ TextBoxDirective,
893
+ NgTemplateOutlet,
894
+ ListComponent,
895
+ ListGroupHeaderTemplateDirective,
896
+ ListFooterTemplateDirective,
897
+ ListHeaderTemplateDirective,
898
+ ListNoDataTemplateDirective,
899
+ ListItemTemplateDirective,
900
+ IndicatorIconComponent
901
+ ],
902
+ hostDirectives: [
903
+ DropdownDataHandlerDirective,
904
+ DropdownListPopupHandlerDirective,
905
+ DropdownLiveRegionDirective
906
+ ],
907
+ host: {
908
+ "[attr.aria-describedby]": "null",
909
+ "[attr.aria-label]": "null",
910
+ "[attr.aria-labelledby]": "null",
911
+ "[attr.data-disabled]": "effectiveDisabled() || null",
912
+ "[attr.data-invalid]": "invalidState() || null",
913
+ "[attr.data-readonly]": "readonly() || null",
914
+ "[attr.tabindex]": "-1",
915
+ "[class]": "baseClass()",
916
+ "(focusout)": "onFocusOut($event)",
917
+ "(pointerdown)": "onHostPointerDown($event)"
918
+ },
919
+ template: "@if (prefixTemplate()) {\n <span [class]=\"affixClass()\">\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n </span>\n}\n\n<input\n monaTextBox\n [class]=\"inputClass()\"\n [disabled]=\"effectiveDisabled()\"\n [id]=\"inputId()\"\n [placeholder]=\"placeholder()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [value]=\"comboBoxValue()\"\n [attr.aria-activedescendant]=\"activeDescendant()\"\n [attr.aria-autocomplete]=\"'list'\"\n [attr.aria-busy]=\"loading()\"\n [attr.aria-controls]=\"listId\"\n [attr.aria-describedby]=\"ariaDescribedBy() || undefined\"\n [attr.aria-expanded]=\"expanded()\"\n [attr.aria-haspopup]=\"'listbox'\"\n [attr.aria-invalid]=\"invalidState() || undefined\"\n [attr.aria-label]=\"ariaLabel() || undefined\"\n [attr.aria-labelledby]=\"ariaLabelledBy() || undefined\"\n role=\"combobox\"\n (input)=\"onInput(textInput.value)\"\n #textInput />\n\n@if (clearButtonVisible()) {\n <mona-indicator-icon\n preset=\"clear\"\n [interactive]=\"true\"\n [label]=\"messages().clear\"\n (activate)=\"onValueClear($event)\"></mona-indicator-icon>\n}\n\n@if (loading()) {\n <mona-indicator-icon preset=\"loading\" [size]=\"12\"></mona-indicator-icon>\n}\n\n<mona-indicator-icon preset=\"dropdown\" [size]=\"18\"></mona-indicator-icon>\n\n<ng-template #popupTemplate>\n <div [class]=\"listPopupClass()\" (pointerdown)=\"onPopupPointerDown($event)\">\n <mona-list (itemSelect)=\"onItemSelect($event)\" [focusOnMount]=\"false\" [size]=\"size()\" [listId]=\"listId\">\n @if (footerTemplate()) {\n <ng-template monaListFooterTemplate>\n <ng-container [ngTemplateOutlet]=\"footerTemplate()\"></ng-container>\n </ng-template>\n }\n @if (groupHeaderTemplate()) {\n <ng-template monaListGroupHeaderTemplate let-group>\n <ng-container\n [ngTemplateOutlet]=\"groupHeaderTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: group }\"></ng-container>\n </ng-template>\n }\n @if (headerTemplate()) {\n <ng-template monaListHeaderTemplate>\n <ng-container [ngTemplateOutlet]=\"headerTemplate()\"></ng-container>\n </ng-template>\n }\n @if (itemTemplate()) {\n <ng-template monaListItemTemplate let-dataItem>\n <ng-container\n [ngTemplateOutlet]=\"itemTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: dataItem }\"></ng-container>\n </ng-template>\n }\n @if (noDataTemplate()) {\n <ng-template monaListNoDataTemplate>\n <ng-container [ngTemplateOutlet]=\"noDataTemplate()\"></ng-container>\n </ng-template>\n }\n </mona-list>\n </div>\n</ng-template>\n"
920
+ }]
921
+ }],
922
+ ctorParameters: () => [],
923
+ propDecorators: {
924
+ footerTemplate: [{
925
+ type: i0.ContentChild,
926
+ args: [i0.forwardRef(() => DropdownFooterTemplateDirective), {
927
+ read: TemplateRef,
928
+ isSignal: true
929
+ }]
930
+ }],
931
+ groupHeaderTemplate: [{
932
+ type: i0.ContentChild,
933
+ args: [i0.forwardRef(() => DropdownGroupHeaderTemplateDirective), {
934
+ read: TemplateRef,
935
+ isSignal: true
936
+ }]
937
+ }],
938
+ headerTemplate: [{
939
+ type: i0.ContentChild,
940
+ args: [i0.forwardRef(() => DropdownHeaderTemplateDirective), {
941
+ read: TemplateRef,
942
+ isSignal: true
943
+ }]
944
+ }],
945
+ itemTemplate: [{
946
+ type: i0.ContentChild,
947
+ args: [i0.forwardRef(() => DropdownItemTemplateDirective), {
948
+ read: TemplateRef,
949
+ isSignal: true
950
+ }]
951
+ }],
952
+ noDataTemplate: [{
953
+ type: i0.ContentChild,
954
+ args: [i0.forwardRef(() => DropdownNoDataTemplateDirective), {
955
+ read: TemplateRef,
956
+ isSignal: true
957
+ }]
958
+ }],
959
+ popupTemplate: [{
960
+ type: i0.ViewChild,
961
+ args: ["popupTemplate", { isSignal: true }]
962
+ }],
963
+ prefixTemplate: [{
964
+ type: i0.ContentChild,
965
+ args: [i0.forwardRef(() => DropdownPrefixTemplateDirective), {
966
+ read: TemplateRef,
967
+ isSignal: true
968
+ }]
969
+ }],
970
+ allowCustomValue: [{
971
+ type: i0.Input,
972
+ args: [{
973
+ isSignal: true,
974
+ alias: "allowCustomValue",
975
+ required: false
976
+ }]
977
+ }],
978
+ ariaDescribedBy: [{
979
+ type: i0.Input,
980
+ args: [{
981
+ isSignal: true,
982
+ alias: "aria-describedby",
983
+ required: false
984
+ }]
985
+ }],
986
+ ariaLabel: [{
987
+ type: i0.Input,
988
+ args: [{
989
+ isSignal: true,
990
+ alias: "aria-label",
991
+ required: false
992
+ }]
993
+ }],
994
+ ariaLabelledBy: [{
995
+ type: i0.Input,
996
+ args: [{
997
+ isSignal: true,
998
+ alias: "aria-labelledby",
999
+ required: false
1000
+ }]
1001
+ }],
1002
+ close: [{
1003
+ type: i0.Output,
1004
+ args: ["close"]
1005
+ }],
1006
+ closed: [{
1007
+ type: i0.Output,
1008
+ args: ["closed"]
1009
+ }],
1010
+ data: [{
1011
+ type: i0.Input,
1012
+ args: [{
1013
+ isSignal: true,
1014
+ alias: "data",
1015
+ required: false
1016
+ }]
1017
+ }],
1018
+ disabled: [{
1019
+ type: i0.Input,
1020
+ args: [{
1021
+ isSignal: true,
1022
+ alias: "disabled",
1023
+ required: false
1024
+ }]
1025
+ }],
1026
+ inputId: [{
1027
+ type: i0.Input,
1028
+ args: [{
1029
+ isSignal: true,
1030
+ alias: "inputId",
1031
+ required: false
1032
+ }]
1033
+ }],
1034
+ invalid: [{
1035
+ type: i0.Input,
1036
+ args: [{
1037
+ isSignal: true,
1038
+ alias: "invalid",
1039
+ required: false
1040
+ }]
1041
+ }],
1042
+ itemDisabled: [{
1043
+ type: i0.Input,
1044
+ args: [{
1045
+ isSignal: true,
1046
+ alias: "itemDisabled",
1047
+ required: false
1048
+ }]
1049
+ }],
1050
+ loading: [{
1051
+ type: i0.Input,
1052
+ args: [{
1053
+ isSignal: true,
1054
+ alias: "loading",
1055
+ required: false
1056
+ }]
1057
+ }],
1058
+ open: [{
1059
+ type: i0.Output,
1060
+ args: ["open"]
1061
+ }],
1062
+ opened: [{
1063
+ type: i0.Output,
1064
+ args: ["opened"]
1065
+ }],
1066
+ placeholder: [{
1067
+ type: i0.Input,
1068
+ args: [{
1069
+ isSignal: true,
1070
+ alias: "placeholder",
1071
+ required: false
1072
+ }]
1073
+ }],
1074
+ popupClass: [{
1075
+ type: i0.Input,
1076
+ args: [{
1077
+ isSignal: true,
1078
+ alias: "popupClass",
1079
+ required: false
1080
+ }]
1081
+ }],
1082
+ popupHeight: [{
1083
+ type: i0.Input,
1084
+ args: [{
1085
+ isSignal: true,
1086
+ alias: "popupHeight",
1087
+ required: false
1088
+ }]
1089
+ }],
1090
+ popupWidth: [{
1091
+ type: i0.Input,
1092
+ args: [{
1093
+ isSignal: true,
1094
+ alias: "popupWidth",
1095
+ required: false
1096
+ }]
1097
+ }],
1098
+ readonly: [{
1099
+ type: i0.Input,
1100
+ args: [{
1101
+ isSignal: true,
1102
+ alias: "readonly",
1103
+ required: false
1104
+ }]
1105
+ }],
1106
+ required: [{
1107
+ type: i0.Input,
1108
+ args: [{
1109
+ isSignal: true,
1110
+ alias: "required",
1111
+ required: false
1112
+ }]
1113
+ }],
1114
+ rounded: [{
1115
+ type: i0.Input,
1116
+ args: [{
1117
+ isSignal: true,
1118
+ alias: "rounded",
1119
+ required: false
1120
+ }]
1121
+ }],
1122
+ showClearButton: [{
1123
+ type: i0.Input,
1124
+ args: [{
1125
+ isSignal: true,
1126
+ alias: "showClearButton",
1127
+ required: false
1128
+ }]
1129
+ }],
1130
+ size: [{
1131
+ type: i0.Input,
1132
+ args: [{
1133
+ isSignal: true,
1134
+ alias: "size",
1135
+ required: false
1136
+ }]
1137
+ }],
1138
+ textField: [{
1139
+ type: i0.Input,
1140
+ args: [{
1141
+ isSignal: true,
1142
+ alias: "textField",
1143
+ required: false
1144
+ }]
1145
+ }],
1146
+ touch: [{
1147
+ type: i0.Output,
1148
+ args: ["touch"]
1149
+ }],
1150
+ touched: [{
1151
+ type: i0.Input,
1152
+ args: [{
1153
+ isSignal: true,
1154
+ alias: "touched",
1155
+ required: false
1156
+ }]
1157
+ }],
1158
+ userClass: [{
1159
+ type: i0.Input,
1160
+ args: [{
1161
+ isSignal: true,
1162
+ alias: "class",
1163
+ required: false
1164
+ }]
1165
+ }],
1166
+ value: [{
1167
+ type: i0.Input,
1168
+ args: [{
1169
+ isSignal: true,
1170
+ alias: "value",
1171
+ required: false
1172
+ }]
1173
+ }, {
1174
+ type: i0.Output,
1175
+ args: ["valueChange"]
1176
+ }],
1177
+ valueAdd: [{
1178
+ type: i0.Output,
1179
+ args: ["valueAdd"]
1180
+ }],
1181
+ valueField: [{
1182
+ type: i0.Input,
1183
+ args: [{
1184
+ isSignal: true,
1185
+ alias: "valueField",
1186
+ required: false
1187
+ }]
1188
+ }],
1189
+ valuePrimitive: [{
1190
+ type: i0.Input,
1191
+ args: [{
1192
+ isSignal: true,
1193
+ alias: "valuePrimitive",
1194
+ required: false
1195
+ }]
1196
+ }]
1197
+ }
1198
+ });
761
1199
  export { COMBO_BOX_DEFAULT_MESSAGES, ComboBoxComponent };
762
- //# sourceMappingURL=nanahoshi-mona-ui-combo-box.mjs.map
1200
+
1201
+ //# sourceMappingURL=nanahoshi-mona-ui-combo-box.mjs.map