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