@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,40 +1,48 @@
1
- import { NgTemplateOutlet } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { Directive, inject, DestroyRef, ElementRef, computed, viewChild, contentChild, TemplateRef, input, output, booleanAttribute, model, afterNextRender, isDevMode, Component } from '@angular/core';
4
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
- import { RouterLink } from '@angular/router';
6
- import { LucideCircleX } from '@lucide/angular';
7
- import { ButtonDirective } from '@nanahoshi/mona-ui/button';
8
- import { MonaI18nService } from '@nanahoshi/mona-ui/i18n';
9
- import { fromEvent } from 'rxjs';
10
- import { twMerge } from 'tailwind-merge';
11
- import { cva } from 'class-variance-authority';
12
- import { themeSelectionBorderClasses, themeRaisedSurfaceClasses } from '@nanahoshi/mona-ui/internal';
13
-
14
- // Generated from i18n/catalogs/en-US.messages.json by scripts/generate-locale-catalogs.ts. Do not edit.
15
- // Edit the JSON file and run `npm run generate:locale-catalogs`.
16
- const CHIP_DEFAULT_MESSAGES = {
17
- removeLabel: (label) => (label ? `Remove, ${label}` : "Remove, item")
1
+ import { NgTemplateOutlet } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { Component, DestroyRef, Directive, ElementRef, TemplateRef, afterNextRender, booleanAttribute, computed, contentChild, inject, input, isDevMode, model, output, viewChild } from "@angular/core";
4
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
5
+ import { RouterLink } from "@angular/router";
6
+ import { LucideCircleX } from "@lucide/angular";
7
+ import { ButtonDirective } from "@nanahoshi/mona-ui/button";
8
+ import { MonaI18nService } from "@nanahoshi/mona-ui/i18n";
9
+ import { fromEvent } from "rxjs";
10
+ import { twMerge } from "tailwind-merge";
11
+ import { cva } from "class-variance-authority";
12
+ import { themeRaisedSurfaceClasses, themeSelectionBorderClasses } from "@nanahoshi/mona-ui/internal";
13
+ const CHIP_DEFAULT_MESSAGES = { removeLabel: (label) => label ? `Remove, ${label}` : "Remove, item" };
14
+ var ChipPrefixTemplateDirective = class ChipPrefixTemplateDirective {
15
+ static {
16
+ this.ɵfac = i0.ɵɵngDeclareFactory({
17
+ minVersion: "12.0.0",
18
+ version: "22.2.6",
19
+ ngImport: i0,
20
+ type: ChipPrefixTemplateDirective,
21
+ deps: [],
22
+ target: i0.ɵɵFactoryTarget.Directive
23
+ });
24
+ }
25
+ static {
26
+ this.ɵdir = i0.ɵɵngDeclareDirective({
27
+ minVersion: "14.0.0",
28
+ version: "22.2.6",
29
+ type: ChipPrefixTemplateDirective,
30
+ isStandalone: true,
31
+ selector: "ng-template[monaChipPrefixTemplate]",
32
+ ngImport: i0
33
+ });
34
+ }
18
35
  };
19
-
20
- /**
21
- * @description Apply to an `<ng-template>` directly inside `<mona-chip>` to render prefix content
22
- * (e.g., an avatar or icon) before the chip label or projected content. The template receives no context.
23
- */
24
- class ChipPrefixTemplateDirective {
25
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ChipPrefixTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
26
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: ChipPrefixTemplateDirective, isStandalone: true, selector: "ng-template[monaChipPrefixTemplate]", ngImport: i0 }); }
27
- }
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ChipPrefixTemplateDirective, decorators: [{
29
- type: Directive,
30
- args: [{
31
- selector: "ng-template[monaChipPrefixTemplate]"
32
- }]
33
- }] });
34
-
35
- /**
36
- * The removable, interactive chip's own control, beside the remove button. Its focus ring stays off that button.
37
- */
36
+ i0.ɵɵngDeclareClassMetadata({
37
+ minVersion: "12.0.0",
38
+ version: "22.2.6",
39
+ ngImport: i0,
40
+ type: ChipPrefixTemplateDirective,
41
+ decorators: [{
42
+ type: Directive,
43
+ args: [{ selector: "ng-template[monaChipPrefixTemplate]" }]
44
+ }]
45
+ });
38
46
  const CHIP_BODY_CONTROL_CLASSES = `
39
47
  inline-flex items-center gap-1.5 [border-radius:inherit]
40
48
  focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-indicator
@@ -47,561 +55,774 @@ const chipThemeVariants = cva(`
47
55
  [&_button[data-chip-remove='true']]:relative
48
56
  [&_button[data-chip-remove='true']]:before:absolute
49
57
  `, {
50
- variants: {
51
- disabled: {
52
- true: "pointer-events-none opacity-50 cursor-not-allowed select-none",
53
- false: ""
54
- },
55
- interactive: {
56
- true: `
58
+ variants: {
59
+ disabled: {
60
+ true: "pointer-events-none opacity-50 cursor-not-allowed select-none",
61
+ false: ""
62
+ },
63
+ interactive: {
64
+ true: `
57
65
  cursor-pointer
58
66
  focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-indicator
59
67
  `,
60
- false: ""
61
- },
62
- look: {
63
- default: `
68
+ false: ""
69
+ },
70
+ look: {
71
+ default: `
64
72
  ${themeRaisedSurfaceClasses} text-foreground
65
73
  border border-border
66
74
  `,
67
- primary: "bg-primary text-primary-foreground",
68
- success: "bg-success text-success-foreground",
69
- error: "bg-error text-error-foreground",
70
- warning: "bg-warning text-warning-foreground",
71
- info: "bg-info text-info-foreground",
72
- outline: "bg-transparent text-foreground border border-input-border",
73
- secondary: "bg-secondary text-secondary-foreground",
74
- ghost: "bg-transparent text-foreground shadow-none"
75
- },
76
- rounded: {
77
- full: "rounded-full",
78
- large: "rounded-lg",
79
- medium: "rounded-md",
80
- none: "rounded-none",
81
- small: "rounded-sm"
82
- },
83
- size: {
84
- small: `
75
+ primary: "bg-primary text-primary-foreground",
76
+ success: "bg-success text-success-foreground",
77
+ error: "bg-error text-error-foreground",
78
+ warning: "bg-warning text-warning-foreground",
79
+ info: "bg-info text-info-foreground",
80
+ outline: "bg-transparent text-foreground border border-input-border",
81
+ secondary: "bg-secondary text-secondary-foreground",
82
+ ghost: "bg-transparent text-foreground shadow-none"
83
+ },
84
+ rounded: {
85
+ full: "rounded-full",
86
+ large: "rounded-lg",
87
+ medium: "rounded-md",
88
+ none: "rounded-none",
89
+ small: "rounded-sm"
90
+ },
91
+ size: {
92
+ small: `
85
93
  px-1 py-0.5
86
94
  [&_button[data-chip-remove='true']]:w-3
87
95
  [&_button[data-chip-remove='true']]:h-3
88
96
  [&_button[data-chip-remove='true']]:before:-inset-1.5
89
97
  `,
90
- medium: `
98
+ medium: `
91
99
  px-1.5 py-1
92
100
  [&_button[data-chip-remove='true']]:w-4
93
101
  [&_button[data-chip-remove='true']]:h-4
94
102
  [&_button[data-chip-remove='true']]:before:-inset-1
95
103
  `,
96
- large: `
104
+ large: `
97
105
  px-2 py-1.5
98
106
  [&_button[data-chip-remove='true']]:w-5
99
107
  [&_button[data-chip-remove='true']]:h-5
100
108
  [&_button[data-chip-remove='true']]:before:-inset-0.5
101
109
  `
102
- },
103
- selected: {
104
- // A border in the text's color under prefers-contrast: more and forced colors, where the fill alone isn't enough.
105
- true: themeSelectionBorderClasses,
106
- false: ""
107
- }
108
- },
109
- compoundVariants: [
110
- {
111
- look: "default",
112
- selected: true,
113
- class: "after:-inset-px bg-(--color-selected) text-(--color-selected-foreground)"
114
- },
115
- {
116
- look: "primary",
117
- selected: true,
118
- class: "bg-primary-selected text-primary-foreground"
119
- },
120
- {
121
- look: "secondary",
122
- selected: true,
123
- class: "bg-secondary-selected text-secondary-foreground"
124
- },
125
- {
126
- look: "success",
127
- selected: true,
128
- class: "bg-success-selected text-success-foreground"
129
- },
130
- {
131
- look: "error",
132
- selected: true,
133
- class: "bg-error-selected text-error-foreground"
134
- },
135
- {
136
- look: "warning",
137
- selected: true,
138
- class: "bg-warning-selected text-warning-foreground"
139
- },
140
- {
141
- look: "info",
142
- selected: true,
143
- class: "bg-info-selected text-info-foreground"
144
- },
145
- {
146
- look: "outline",
147
- selected: true,
148
- class: "after:-inset-px bg-(--color-selected) text-(--color-selected-foreground)"
149
- },
150
- {
151
- look: "ghost",
152
- selected: true,
153
- class: "bg-(--color-selected) text-(--color-selected-foreground)"
154
- },
155
- {
156
- look: "default",
157
- interactive: true,
158
- selected: false,
159
- class: `
110
+ },
111
+ selected: {
112
+ true: themeSelectionBorderClasses,
113
+ false: ""
114
+ }
115
+ },
116
+ compoundVariants: [
117
+ {
118
+ look: "default",
119
+ selected: true,
120
+ class: "after:-inset-px bg-(--color-selected) text-(--color-selected-foreground)"
121
+ },
122
+ {
123
+ look: "primary",
124
+ selected: true,
125
+ class: "bg-primary-selected text-primary-foreground"
126
+ },
127
+ {
128
+ look: "secondary",
129
+ selected: true,
130
+ class: "bg-secondary-selected text-secondary-foreground"
131
+ },
132
+ {
133
+ look: "success",
134
+ selected: true,
135
+ class: "bg-success-selected text-success-foreground"
136
+ },
137
+ {
138
+ look: "error",
139
+ selected: true,
140
+ class: "bg-error-selected text-error-foreground"
141
+ },
142
+ {
143
+ look: "warning",
144
+ selected: true,
145
+ class: "bg-warning-selected text-warning-foreground"
146
+ },
147
+ {
148
+ look: "info",
149
+ selected: true,
150
+ class: "bg-info-selected text-info-foreground"
151
+ },
152
+ {
153
+ look: "outline",
154
+ selected: true,
155
+ class: "after:-inset-px bg-(--color-selected) text-(--color-selected-foreground)"
156
+ },
157
+ {
158
+ look: "ghost",
159
+ selected: true,
160
+ class: "bg-(--color-selected) text-(--color-selected-foreground)"
161
+ },
162
+ {
163
+ look: "default",
164
+ interactive: true,
165
+ selected: false,
166
+ class: `
160
167
  hover:bg-hover hover:text-foreground
161
168
  active:bg-(--color-selected-active) active:text-(--color-selected-active-foreground)
162
169
  `
163
- },
164
- {
165
- look: "primary",
166
- interactive: true,
167
- selected: false,
168
- class: `
170
+ },
171
+ {
172
+ look: "primary",
173
+ interactive: true,
174
+ selected: false,
175
+ class: `
169
176
  hover:bg-primary-hover hover:text-primary-foreground
170
177
  active:bg-primary-active active:text-primary-foreground
171
178
  `
172
- },
173
- {
174
- look: "secondary",
175
- interactive: true,
176
- selected: false,
177
- class: `
179
+ },
180
+ {
181
+ look: "secondary",
182
+ interactive: true,
183
+ selected: false,
184
+ class: `
178
185
  hover:bg-secondary-hover hover:text-secondary-foreground
179
186
  active:bg-secondary-active active:text-secondary-foreground
180
187
  `
181
- },
182
- {
183
- look: "success",
184
- interactive: true,
185
- selected: false,
186
- class: `
188
+ },
189
+ {
190
+ look: "success",
191
+ interactive: true,
192
+ selected: false,
193
+ class: `
187
194
  hover:bg-success-hover hover:text-success-foreground
188
195
  active:bg-success-active active:text-success-foreground
189
196
  `
190
- },
191
- {
192
- look: "error",
193
- interactive: true,
194
- selected: false,
195
- class: `
197
+ },
198
+ {
199
+ look: "error",
200
+ interactive: true,
201
+ selected: false,
202
+ class: `
196
203
  hover:bg-error-hover hover:text-error-foreground
197
204
  active:bg-error-active active:text-error-foreground
198
205
  `
199
- },
200
- {
201
- look: "warning",
202
- interactive: true,
203
- selected: false,
204
- class: `
206
+ },
207
+ {
208
+ look: "warning",
209
+ interactive: true,
210
+ selected: false,
211
+ class: `
205
212
  hover:bg-warning-hover hover:text-warning-foreground
206
213
  active:bg-warning-active active:text-warning-foreground
207
214
  `
208
- },
209
- {
210
- look: "info",
211
- interactive: true,
212
- selected: false,
213
- class: `
215
+ },
216
+ {
217
+ look: "info",
218
+ interactive: true,
219
+ selected: false,
220
+ class: `
214
221
  hover:bg-info-hover hover:text-info-foreground
215
222
  active:bg-info-active active:text-info-foreground
216
223
  `
217
- },
218
- {
219
- look: "outline",
220
- interactive: true,
221
- selected: false,
222
- class: `
224
+ },
225
+ {
226
+ look: "outline",
227
+ interactive: true,
228
+ selected: false,
229
+ class: `
223
230
  hover:bg-hover hover:text-foreground
224
231
  active:bg-(--color-selected-active) active:text-(--color-selected-active-foreground)
225
232
  `
226
- },
227
- {
228
- look: "ghost",
229
- interactive: true,
230
- selected: false,
231
- class: `
233
+ },
234
+ {
235
+ look: "ghost",
236
+ interactive: true,
237
+ selected: false,
238
+ class: `
232
239
  hover:bg-hover hover:text-foreground
233
240
  active:bg-(--color-selected-active) active:text-(--color-selected-active-foreground)
234
241
  `
235
- },
236
- {
237
- look: "default",
238
- interactive: true,
239
- selected: true,
240
- class: `
242
+ },
243
+ {
244
+ look: "default",
245
+ interactive: true,
246
+ selected: true,
247
+ class: `
241
248
  hover:bg-(--color-selected-hover) hover:text-(--color-selected-hover-foreground)
242
249
  active:bg-(--color-selected-active) active:text-(--color-selected-active-foreground)
243
250
  `
244
- },
245
- {
246
- look: "primary",
247
- interactive: true,
248
- selected: true,
249
- class: `
251
+ },
252
+ {
253
+ look: "primary",
254
+ interactive: true,
255
+ selected: true,
256
+ class: `
250
257
  hover:bg-primary-selected/95 hover:text-primary-foreground
251
258
  active:bg-primary-selected/100 active:text-primary-foreground
252
259
  `
253
- },
254
- {
255
- look: "secondary",
256
- interactive: true,
257
- selected: true,
258
- class: `
260
+ },
261
+ {
262
+ look: "secondary",
263
+ interactive: true,
264
+ selected: true,
265
+ class: `
259
266
  hover:bg-secondary-selected/95 hover:text-secondary-foreground
260
267
  active:bg-secondary-selected/100 active:text-secondary-foreground
261
268
  `
262
- },
263
- {
264
- look: "success",
265
- interactive: true,
266
- selected: true,
267
- class: `
269
+ },
270
+ {
271
+ look: "success",
272
+ interactive: true,
273
+ selected: true,
274
+ class: `
268
275
  hover:bg-success-selected/95 hover:text-success-foreground
269
276
  active:bg-success-selected/100 active:text-success-foreground
270
277
  `
271
- },
272
- {
273
- look: "error",
274
- interactive: true,
275
- selected: true,
276
- class: `
278
+ },
279
+ {
280
+ look: "error",
281
+ interactive: true,
282
+ selected: true,
283
+ class: `
277
284
  hover:bg-error-selected/95 hover:text-error-foreground
278
285
  active:bg-error-selected/100 active:text-error-foreground
279
286
  `
280
- },
281
- {
282
- look: "warning",
283
- interactive: true,
284
- selected: true,
285
- class: `
287
+ },
288
+ {
289
+ look: "warning",
290
+ interactive: true,
291
+ selected: true,
292
+ class: `
286
293
  hover:bg-warning-selected/95 hover:text-warning-foreground
287
294
  active:bg-warning-selected/100 active:text-warning-foreground
288
295
  `
289
- },
290
- {
291
- look: "info",
292
- interactive: true,
293
- selected: true,
294
- class: `
296
+ },
297
+ {
298
+ look: "info",
299
+ interactive: true,
300
+ selected: true,
301
+ class: `
295
302
  hover:bg-info-selected/95 hover:text-info-foreground
296
303
  active:bg-info-selected/100 active:text-info-foreground
297
304
  `
298
- },
299
- {
300
- look: "outline",
301
- interactive: true,
302
- selected: true,
303
- class: `
305
+ },
306
+ {
307
+ look: "outline",
308
+ interactive: true,
309
+ selected: true,
310
+ class: `
304
311
  hover:bg-(--color-selected-hover) hover:text-(--color-selected-hover-foreground)
305
312
  active:bg-(--color-selected-active) active:text-(--color-selected-active-foreground)
306
313
  `
307
- },
308
- {
309
- look: "ghost",
310
- interactive: true,
311
- selected: true,
312
- class: `
314
+ },
315
+ {
316
+ look: "ghost",
317
+ interactive: true,
318
+ selected: true,
319
+ class: `
313
320
  hover:bg-(--color-selected-hover) hover:text-(--color-selected-hover-foreground)
314
321
  active:bg-(--color-selected-active) active:text-(--color-selected-active-foreground)
315
322
  `
316
- }
317
- ],
318
- defaultVariants: {
319
- interactive: false,
320
- rounded: "medium",
321
- selected: false
322
- }
323
+ }
324
+ ],
325
+ defaultVariants: {
326
+ interactive: false,
327
+ rounded: "medium",
328
+ selected: false
329
+ }
323
330
  });
324
-
325
- /** Projected controls keep their own clicks and keys. */
326
331
  const PROJECTED_CONTROL_SELECTOR = "a[href], button, input, select, textarea, [role='button'], [role='link'], [tabindex]";
327
- class ChipComponent {
328
- #destroyRef;
329
- #elementRef;
330
- #i18n;
331
- #routerLink;
332
- constructor() {
333
- this.#destroyRef = inject(DestroyRef);
334
- this.#elementRef = inject(ElementRef);
335
- this.#i18n = inject(MonaI18nService);
336
- this.#routerLink = inject(RouterLink, { optional: true });
337
- this.ariaChecked = computed(() => {
338
- if (!this.toggleable()) {
339
- return undefined;
340
- }
341
- return this.selected() ? "true" : "false";
342
- }, /* @ts-ignore */
343
- ...(ngDevMode ? [{ debugName: "ariaChecked" }] : /* istanbul ignore next */ []));
344
- this.baseClass = computed(() => {
345
- const disabled = this.disabled();
346
- const interactive = this.bodyInteractive();
347
- const look = this.look();
348
- const rounded = this.rounded();
349
- const size = this.size();
350
- const selected = this.selected();
351
- const userClass = this.userClass();
352
- const variantClasses = chipThemeVariants({ disabled, interactive, look, rounded, size, selected });
353
- return twMerge(variantClasses, userClass);
354
- }, /* @ts-ignore */
355
- ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
356
- this.bodyClasses = computed(() => (this.split() ? CHIP_BODY_CONTROL_CLASSES : "contents"), /* @ts-ignore */
357
- ...(ngDevMode ? [{ debugName: "bodyClasses" }] : /* istanbul ignore next */ []));
358
- this.bodyElement = viewChild.required("body", /* @ts-ignore */
359
- ...(ngDevMode ? [{ debugName: "bodyElement" }] : /* istanbul ignore next */ []));
360
- this.bodyInteractive = computed(() => !this.disabled() && (this.toggleable() || this.isLink()), /* @ts-ignore */
361
- ...(ngDevMode ? [{ debugName: "bodyInteractive" }] : /* istanbul ignore next */ []));
362
- /** The role of the chip's own control, wherever it ends up. */
363
- this.controlRole = computed(() => {
364
- if (this.toggleable()) {
365
- return "checkbox";
366
- }
367
- return this.isLink() ? "link" : null;
368
- }, /* @ts-ignore */
369
- ...(ngDevMode ? [{ debugName: "controlRole" }] : /* istanbul ignore next */ []));
370
- this.effectiveTabIndex = computed(() => {
371
- const explicitTabindex = this.tabindex();
372
- if (!this.controlRole() && explicitTabindex == null) {
373
- return null;
374
- }
375
- return this.disabled() ? -1 : (explicitTabindex ?? 0);
376
- }, /* @ts-ignore */
377
- ...(ngDevMode ? [{ debugName: "effectiveTabIndex" }] : /* istanbul ignore next */ []));
378
- /** A name needs a role to land on, and an interactive host can't hold a remove button. */
379
- this.hostRole = computed(() => {
380
- if (this.split()) {
381
- return "group";
382
- }
383
- return this.controlRole() ?? (this.ariaLabel() ? "group" : null);
384
- }, /* @ts-ignore */
385
- ...(ngDevMode ? [{ debugName: "hostRole" }] : /* istanbul ignore next */ []));
386
- this.iconSize = computed(() => {
387
- const size = this.size();
388
- switch (size) {
389
- case "small":
390
- return 13;
391
- case "medium":
392
- return 14;
393
- case "large":
394
- return 16;
395
- default:
396
- return 14;
397
- }
398
- }, /* @ts-ignore */
399
- ...(ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []));
400
- this.isLink = computed(() => !!this.#routerLink, /* @ts-ignore */
401
- ...(ngDevMode ? [{ debugName: "isLink" }] : /* istanbul ignore next */ []));
402
- this.messages = this.#i18n.componentMessages("chip", CHIP_DEFAULT_MESSAGES);
403
- this.prefixTemplate = contentChild(ChipPrefixTemplateDirective, { ...(ngDevMode ? { debugName: "prefixTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
404
- /**
405
- * An interactive role makes its children presentational, which would hide the remove button, so a chip with both
406
- * keeps its control on an inner element.
407
- */
408
- this.split = computed(() => this.removable() && !!this.controlRole(), /* @ts-ignore */
409
- ...(ngDevMode ? [{ debugName: "split" }] : /* istanbul ignore next */ []));
410
- /**
411
- * @description Accessible name of the chip, for one whose text doesn't describe it, such as an icon. On a chip with no
412
- * other role, it makes the chip a named group.
413
- * @default ""
414
- */
415
- this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
416
- /**
417
- * @description Emitted when a toggleable chip body is activated via click, Enter, or Space.
418
- * Not emitted when the remove button is activated or for non-toggleable chips.
419
- */
420
- this.contentClick = output();
421
- /**
422
- * @description Renders the chip with reduced visual emphasis and removes pointer interaction.
423
- * @default false
424
- */
425
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
426
- /**
427
- * @description Text label displayed inside the chip. When non-empty, takes precedence over projected content.
428
- * @default ""
429
- */
430
- this.label = input("", /* @ts-ignore */
431
- ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
432
- /**
433
- * @description Visual style variant controlling the chip's background color, border, and interaction states.
434
- * @default "default"
435
- */
436
- this.look = input("default", /* @ts-ignore */
437
- ...(ngDevMode ? [{ debugName: "look" }] : /* istanbul ignore next */ []));
438
- /**
439
- * @description Renders a remove button inside the chip. When activated, emits the `remove` output.
440
- * @default false
441
- */
442
- this.removable = input(false, { ...(ngDevMode ? { debugName: "removable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
443
- /**
444
- * @description Emitted when the remove button is clicked, or Delete or Backspace is pressed on the chip. Only fires
445
- * when `removable` is `true`. Emits the originating `Event`. The chip can't keep focus once its parent destroys it, so
446
- * move focus to the next chip or the list here.
447
- */
448
- this.remove = output();
449
- /**
450
- * @description Accessible label for the remove button, overriding the auto-computed `"Remove, <label>"` fallback.
451
- * A chip with only projected content needs this or `aria-label`, or it warns in development.
452
- * @default undefined
453
- */
454
- this.removeLabel = input(/* @ts-ignore */
455
- ...(ngDevMode ? [undefined, { debugName: "removeLabel" }] : /* istanbul ignore next */ []));
456
- /**
457
- * @description Tab index for the remove button, independent of the chip host's own tabindex.
458
- * Set to `-1` to exclude the remove button from tab order, since Delete and Backspace on the chip also remove it.
459
- * @default 0
460
- */
461
- this.removeTabIndex = input(0, /* @ts-ignore */
462
- ...(ngDevMode ? [{ debugName: "removeTabIndex" }] : /* istanbul ignore next */ []));
463
- /**
464
- * @description Border-radius preset applied to the chip.
465
- * @default "medium"
466
- */
467
- this.rounded = input("medium", /* @ts-ignore */
468
- ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
469
- /**
470
- * @description Whether the chip is selected. When `toggleable` is `true`, each activation flips this value.
471
- * Supports two-way binding via `[(selected)]`. Without `toggleable`, it's only a look, with no state for assistive
472
- * technology.
473
- * @default false
474
- */
475
- this.selected = model(false, /* @ts-ignore */
476
- ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
477
- /**
478
- * @description Size preset controlling the chip's padding and remove button dimensions.
479
- * @default "medium"
480
- */
481
- this.size = input("medium", /* @ts-ignore */
482
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
483
- /**
484
- * @description Tab index override for the chip host element. When not set, computed automatically:
485
- * `0` when `toggleable` is `true` or functioning as a link, not focusable otherwise. Overridden to `-1` when `disabled`
486
- * is `true`.
487
- * @default undefined
488
- */
489
- this.tabindex = input(/* @ts-ignore */
490
- ...(ngDevMode ? [undefined, { debugName: "tabindex" }] : /* istanbul ignore next */ []));
491
- /**
492
- * @description Enables toggle behavior. When `true`, each activation flips `selected`
493
- * and the host receives `role="checkbox"` with `aria-checked`. With `removable`, the host is a `group` instead, and an
494
- * inner element is the checkbox, beside the remove button.
495
- * @default false
496
- */
497
- this.toggleable = input(false, { ...(ngDevMode ? { debugName: "toggleable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
498
- /**
499
- * @description Additional CSS classes merged onto the host element via `tailwind-merge`.
500
- * @default ""
501
- */
502
- this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
503
- /**
504
- * @description Arbitrary value associated with this chip. The chip doesn't use it or emit it, so to tell which chip was
505
- * removed, pass the item in your `(remove)` handler.
506
- * @default undefined
507
- */
508
- this.value = input(/* @ts-ignore */
509
- ...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
510
- afterNextRender({
511
- read: () => {
512
- this.#setSubscriptions();
513
- this.#warnIfRemoveHasNoName();
514
- }
515
- });
516
- }
517
- onRemoveClick(event) {
518
- if (this.disabled()) {
519
- return;
520
- }
521
- event.stopPropagation();
522
- this.remove.emit(event);
523
- }
524
- #handleActivation() {
525
- if (!this.toggleable() || this.disabled()) {
526
- return;
527
- }
528
- this.selected.set(!this.selected());
529
- this.contentClick.emit();
530
- }
531
- #handleKeydown(event) {
532
- const target = event.target;
533
- const onControl = target === this.#elementRef.nativeElement || target === this.bodyElement().nativeElement;
534
- if (this.disabled()) {
535
- return;
536
- }
537
- if (event.key === "Delete" || event.key === "Backspace") {
538
- if (this.removable() && (onControl || target.closest("button[data-chip-remove]"))) {
539
- event.preventDefault();
540
- this.remove.emit(event);
541
- }
542
- return;
543
- }
544
- if (!onControl) {
545
- return;
546
- }
547
- if (event.key === "Enter" && this.isLink()) {
548
- event.preventDefault();
549
- if (!event.repeat) {
550
- this.#elementRef.nativeElement.click();
551
- }
552
- }
553
- else if ((event.key === "Enter" || event.key === " ") && this.toggleable()) {
554
- event.preventDefault();
555
- if (!event.repeat) {
556
- this.#handleActivation();
557
- }
558
- }
559
- }
560
- #isOnProjectedControl(event) {
561
- const control = event.target.closest?.(PROJECTED_CONTROL_SELECTOR);
562
- return !!control && control !== this.#elementRef.nativeElement && control !== this.bodyElement().nativeElement;
563
- }
564
- #setSubscriptions() {
565
- const element = this.#elementRef.nativeElement;
566
- fromEvent(element, "keydown")
567
- .pipe(takeUntilDestroyed(this.#destroyRef))
568
- .subscribe(event => this.#handleKeydown(event));
569
- fromEvent(element, "click")
570
- .pipe(takeUntilDestroyed(this.#destroyRef))
571
- .subscribe(event => {
572
- if (!this.#isOnProjectedControl(event)) {
573
- this.#handleActivation();
574
- }
575
- });
576
- }
577
- #warnIfRemoveHasNoName() {
578
- if (isDevMode() && this.removable() && !this.label() && !this.ariaLabel() && !this.removeLabel()) {
579
- console.warn("[Mona Chip] A removable chip with projected content needs removeLabel or aria-label, or its remove button " +
580
- "reads as a generic item.", this.#elementRef.nativeElement);
581
- }
582
- }
583
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
584
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ChipComponent, isStandalone: true, selector: "mona-chip", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null }, removable: { classPropertyName: "removable", publicName: "removable", isSignal: true, isRequired: false, transformFunction: null }, removeLabel: { classPropertyName: "removeLabel", publicName: "removeLabel", isSignal: true, isRequired: false, transformFunction: null }, removeTabIndex: { classPropertyName: "removeTabIndex", publicName: "removeTabIndex", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, tabindex: { classPropertyName: "tabindex", publicName: "tabindex", isSignal: true, isRequired: false, transformFunction: null }, toggleable: { classPropertyName: "toggleable", publicName: "toggleable", 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 } }, outputs: { contentClick: "contentClick", remove: "remove", selected: "selectedChange" }, host: { properties: { "class": "baseClass()", "attr.tabindex": "split() ? null : effectiveTabIndex()", "attr.aria-disabled": "hostRole() && disabled() ? 'true' : null", "attr.role": "hostRole()", "attr.aria-checked": "split() ? null : ariaChecked()", "attr.aria-label": "split() ? null : ariaLabel() || null" } }, queries: [{ propertyName: "prefixTemplate", first: true, predicate: ChipPrefixTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "bodyElement", first: true, predicate: ["body"], descendants: true, isSignal: true }], ngImport: i0, template: "<span\n #body\n [class]=\"bodyClasses()\"\n [attr.aria-checked]=\"split() ? ariaChecked() : null\"\n [attr.aria-disabled]=\"split() && disabled() ? 'true' : null\"\n [attr.aria-label]=\"split() ? ariaLabel() || null : null\"\n [attr.role]=\"split() ? controlRole() : null\"\n [attr.tabindex]=\"split() ? effectiveTabIndex() : null\">\n @if (prefixTemplate()) {\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n }\n\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</span>\n\n@if (removable()) {\n @let removeAriaLabel = removeLabel() || messages().removeLabel(label() || ariaLabel());\n <button\n monaButton\n look=\"link\"\n [iconOnly]=\"true\"\n [size]=\"'small'\"\n [attr.aria-label]=\"removeAriaLabel\"\n [tabindex]=\"removeTabIndex()\"\n [disabled]=\"disabled()\"\n (click)=\"onRemoveClick($event)\"\n [attr.data-chip-remove]=\"true\">\n <svg lucideCircleX [size]=\"iconSize()\"></svg>\n </button>\n}\n", dependencies: [{ kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "type", "class", "value"], outputs: ["lookChange", "selectedChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LucideCircleX, selector: "svg[lucideCircleX], svg[lucideXCircle]" }] }); }
585
- }
586
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ChipComponent, decorators: [{
587
- type: Component,
588
- args: [{ selector: "mona-chip", imports: [ButtonDirective, NgTemplateOutlet, LucideCircleX], host: {
589
- "[class]": "baseClass()",
590
- "[attr.tabindex]": "split() ? null : effectiveTabIndex()",
591
- "[attr.aria-disabled]": "hostRole() && disabled() ? 'true' : null",
592
- "[attr.role]": "hostRole()",
593
- "[attr.aria-checked]": "split() ? null : ariaChecked()",
594
- "[attr.aria-label]": "split() ? null : ariaLabel() || null"
595
- }, template: "<span\n #body\n [class]=\"bodyClasses()\"\n [attr.aria-checked]=\"split() ? ariaChecked() : null\"\n [attr.aria-disabled]=\"split() && disabled() ? 'true' : null\"\n [attr.aria-label]=\"split() ? ariaLabel() || null : null\"\n [attr.role]=\"split() ? controlRole() : null\"\n [attr.tabindex]=\"split() ? effectiveTabIndex() : null\">\n @if (prefixTemplate()) {\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n }\n\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</span>\n\n@if (removable()) {\n @let removeAriaLabel = removeLabel() || messages().removeLabel(label() || ariaLabel());\n <button\n monaButton\n look=\"link\"\n [iconOnly]=\"true\"\n [size]=\"'small'\"\n [attr.aria-label]=\"removeAriaLabel\"\n [tabindex]=\"removeTabIndex()\"\n [disabled]=\"disabled()\"\n (click)=\"onRemoveClick($event)\"\n [attr.data-chip-remove]=\"true\">\n <svg lucideCircleX [size]=\"iconSize()\"></svg>\n </button>\n}\n" }]
596
- }], ctorParameters: () => [], propDecorators: { bodyElement: [{ type: i0.ViewChild, args: ["body", { isSignal: true }] }], prefixTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ChipPrefixTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], contentClick: [{ type: i0.Output, args: ["contentClick"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], look: [{ type: i0.Input, args: [{ isSignal: true, alias: "look", required: false }] }], removable: [{ type: i0.Input, args: [{ isSignal: true, alias: "removable", required: false }] }], remove: [{ type: i0.Output, args: ["remove"] }], removeLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeLabel", required: false }] }], removeTabIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "removeTabIndex", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }, { type: i0.Output, args: ["selectedChange"] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], tabindex: [{ type: i0.Input, args: [{ isSignal: true, alias: "tabindex", required: false }] }], toggleable: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleable", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }] } });
597
-
598
- /*
599
- * Public API Surface of @nanahoshi/mona-ui/chip
600
- */
601
-
602
- /**
603
- * Generated bundle index. Do not edit.
604
- */
605
-
332
+ var ChipComponent = class ChipComponent {
333
+ #destroyRef;
334
+ #elementRef;
335
+ #i18n;
336
+ #routerLink;
337
+ constructor() {
338
+ this.#destroyRef = inject(DestroyRef);
339
+ this.#elementRef = inject(ElementRef);
340
+ this.#i18n = inject(MonaI18nService);
341
+ this.#routerLink = inject(RouterLink, { optional: true });
342
+ this.ariaChecked = computed(() => {
343
+ if (!this.toggleable()) return;
344
+ return this.selected() ? "true" : "false";
345
+ }, ...ngDevMode ? [{ debugName: "ariaChecked" }] : /* istanbul ignore next */ []);
346
+ this.baseClass = computed(() => {
347
+ const disabled = this.disabled();
348
+ const interactive = this.bodyInteractive();
349
+ const look = this.look();
350
+ const rounded = this.rounded();
351
+ const size = this.size();
352
+ const selected = this.selected();
353
+ const userClass = this.userClass();
354
+ const variantClasses = chipThemeVariants({
355
+ disabled,
356
+ interactive,
357
+ look,
358
+ rounded,
359
+ size,
360
+ selected
361
+ });
362
+ return twMerge(variantClasses, userClass);
363
+ }, ...ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []);
364
+ this.bodyClasses = computed(() => this.split() ? CHIP_BODY_CONTROL_CLASSES : "contents", ...ngDevMode ? [{ debugName: "bodyClasses" }] : /* istanbul ignore next */ []);
365
+ this.bodyElement = viewChild.required("body", ...ngDevMode ? [{ debugName: "bodyElement" }] : /* istanbul ignore next */ []);
366
+ this.bodyInteractive = computed(() => !this.disabled() && (this.toggleable() || this.isLink()), ...ngDevMode ? [{ debugName: "bodyInteractive" }] : /* istanbul ignore next */ []);
367
+ this.controlRole = computed(() => {
368
+ if (this.toggleable()) return "checkbox";
369
+ return this.isLink() ? "link" : null;
370
+ }, ...ngDevMode ? [{ debugName: "controlRole" }] : /* istanbul ignore next */ []);
371
+ this.effectiveTabIndex = computed(() => {
372
+ const explicitTabindex = this.tabindex();
373
+ if (!this.controlRole() && explicitTabindex == null) return null;
374
+ return this.disabled() ? -1 : explicitTabindex ?? 0;
375
+ }, ...ngDevMode ? [{ debugName: "effectiveTabIndex" }] : /* istanbul ignore next */ []);
376
+ this.hostRole = computed(() => {
377
+ if (this.split()) return "group";
378
+ return this.controlRole() ?? (this.ariaLabel() ? "group" : null);
379
+ }, ...ngDevMode ? [{ debugName: "hostRole" }] : /* istanbul ignore next */ []);
380
+ this.iconSize = computed(() => {
381
+ switch (this.size()) {
382
+ case "small": return 13;
383
+ case "medium": return 14;
384
+ case "large": return 16;
385
+ default: return 14;
386
+ }
387
+ }, ...ngDevMode ? [{ debugName: "iconSize" }] : /* istanbul ignore next */ []);
388
+ this.isLink = computed(() => !!this.#routerLink, ...ngDevMode ? [{ debugName: "isLink" }] : /* istanbul ignore next */ []);
389
+ this.messages = this.#i18n.componentMessages("chip", CHIP_DEFAULT_MESSAGES);
390
+ this.prefixTemplate = contentChild(ChipPrefixTemplateDirective, {
391
+ ...ngDevMode ? { debugName: "prefixTemplate" } : /* istanbul ignore next */ {},
392
+ read: TemplateRef
393
+ });
394
+ this.split = computed(() => this.removable() && !!this.controlRole(), ...ngDevMode ? [{ debugName: "split" }] : /* istanbul ignore next */ []);
395
+ this.ariaLabel = input("", {
396
+ ...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
397
+ alias: "aria-label"
398
+ });
399
+ this.contentClick = output();
400
+ this.disabled = input(false, {
401
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
402
+ transform: booleanAttribute
403
+ });
404
+ this.label = input("", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
405
+ this.look = input("default", ...ngDevMode ? [{ debugName: "look" }] : /* istanbul ignore next */ []);
406
+ this.removable = input(false, {
407
+ ...ngDevMode ? { debugName: "removable" } : /* istanbul ignore next */ {},
408
+ transform: booleanAttribute
409
+ });
410
+ this.remove = output();
411
+ this.removeLabel = input(...ngDevMode ? [void 0, { debugName: "removeLabel" }] : /* istanbul ignore next */ []);
412
+ this.removeTabIndex = input(0, ...ngDevMode ? [{ debugName: "removeTabIndex" }] : /* istanbul ignore next */ []);
413
+ this.rounded = input("medium", ...ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []);
414
+ this.selected = model(false, ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
415
+ this.size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
416
+ this.tabindex = input(...ngDevMode ? [void 0, { debugName: "tabindex" }] : /* istanbul ignore next */ []);
417
+ this.toggleable = input(false, {
418
+ ...ngDevMode ? { debugName: "toggleable" } : /* istanbul ignore next */ {},
419
+ transform: booleanAttribute
420
+ });
421
+ this.userClass = input("", {
422
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
423
+ alias: "class"
424
+ });
425
+ this.value = input(...ngDevMode ? [void 0, { debugName: "value" }] : /* istanbul ignore next */ []);
426
+ afterNextRender({ read: () => {
427
+ this.#setSubscriptions();
428
+ this.#warnIfRemoveHasNoName();
429
+ } });
430
+ }
431
+ onRemoveClick(event) {
432
+ if (this.disabled()) return;
433
+ event.stopPropagation();
434
+ this.remove.emit(event);
435
+ }
436
+ #handleActivation() {
437
+ if (!this.toggleable() || this.disabled()) return;
438
+ this.selected.set(!this.selected());
439
+ this.contentClick.emit();
440
+ }
441
+ #handleKeydown(event) {
442
+ const target = event.target;
443
+ const onControl = target === this.#elementRef.nativeElement || target === this.bodyElement().nativeElement;
444
+ if (this.disabled()) return;
445
+ if (event.key === "Delete" || event.key === "Backspace") {
446
+ if (this.removable() && (onControl || target.closest("button[data-chip-remove]"))) {
447
+ event.preventDefault();
448
+ this.remove.emit(event);
449
+ }
450
+ return;
451
+ }
452
+ if (!onControl) return;
453
+ if (event.key === "Enter" && this.isLink()) {
454
+ event.preventDefault();
455
+ if (!event.repeat) this.#elementRef.nativeElement.click();
456
+ } else if ((event.key === "Enter" || event.key === " ") && this.toggleable()) {
457
+ event.preventDefault();
458
+ if (!event.repeat) this.#handleActivation();
459
+ }
460
+ }
461
+ #isOnProjectedControl(event) {
462
+ const control = event.target.closest?.(PROJECTED_CONTROL_SELECTOR);
463
+ return !!control && control !== this.#elementRef.nativeElement && control !== this.bodyElement().nativeElement;
464
+ }
465
+ #setSubscriptions() {
466
+ const element = this.#elementRef.nativeElement;
467
+ fromEvent(element, "keydown").pipe(takeUntilDestroyed(this.#destroyRef)).subscribe((event) => this.#handleKeydown(event));
468
+ fromEvent(element, "click").pipe(takeUntilDestroyed(this.#destroyRef)).subscribe((event) => {
469
+ if (!this.#isOnProjectedControl(event)) this.#handleActivation();
470
+ });
471
+ }
472
+ #warnIfRemoveHasNoName() {
473
+ if (isDevMode() && this.removable() && !this.label() && !this.ariaLabel() && !this.removeLabel()) console.warn("[Mona Chip] A removable chip with projected content needs removeLabel or aria-label, or its remove button reads as a generic item.", this.#elementRef.nativeElement);
474
+ }
475
+ static {
476
+ this.ɵfac = i0.ɵɵngDeclareFactory({
477
+ minVersion: "12.0.0",
478
+ version: "22.2.6",
479
+ ngImport: i0,
480
+ type: ChipComponent,
481
+ deps: [],
482
+ target: i0.ɵɵFactoryTarget.Component
483
+ });
484
+ }
485
+ static {
486
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
487
+ minVersion: "17.0.0",
488
+ version: "22.2.6",
489
+ type: ChipComponent,
490
+ isStandalone: true,
491
+ selector: "mona-chip",
492
+ inputs: {
493
+ ariaLabel: {
494
+ classPropertyName: "ariaLabel",
495
+ publicName: "aria-label",
496
+ isSignal: true,
497
+ isRequired: false,
498
+ transformFunction: null
499
+ },
500
+ disabled: {
501
+ classPropertyName: "disabled",
502
+ publicName: "disabled",
503
+ isSignal: true,
504
+ isRequired: false,
505
+ transformFunction: null
506
+ },
507
+ label: {
508
+ classPropertyName: "label",
509
+ publicName: "label",
510
+ isSignal: true,
511
+ isRequired: false,
512
+ transformFunction: null
513
+ },
514
+ look: {
515
+ classPropertyName: "look",
516
+ publicName: "look",
517
+ isSignal: true,
518
+ isRequired: false,
519
+ transformFunction: null
520
+ },
521
+ removable: {
522
+ classPropertyName: "removable",
523
+ publicName: "removable",
524
+ isSignal: true,
525
+ isRequired: false,
526
+ transformFunction: null
527
+ },
528
+ removeLabel: {
529
+ classPropertyName: "removeLabel",
530
+ publicName: "removeLabel",
531
+ isSignal: true,
532
+ isRequired: false,
533
+ transformFunction: null
534
+ },
535
+ removeTabIndex: {
536
+ classPropertyName: "removeTabIndex",
537
+ publicName: "removeTabIndex",
538
+ isSignal: true,
539
+ isRequired: false,
540
+ transformFunction: null
541
+ },
542
+ rounded: {
543
+ classPropertyName: "rounded",
544
+ publicName: "rounded",
545
+ isSignal: true,
546
+ isRequired: false,
547
+ transformFunction: null
548
+ },
549
+ selected: {
550
+ classPropertyName: "selected",
551
+ publicName: "selected",
552
+ isSignal: true,
553
+ isRequired: false,
554
+ transformFunction: null
555
+ },
556
+ size: {
557
+ classPropertyName: "size",
558
+ publicName: "size",
559
+ isSignal: true,
560
+ isRequired: false,
561
+ transformFunction: null
562
+ },
563
+ tabindex: {
564
+ classPropertyName: "tabindex",
565
+ publicName: "tabindex",
566
+ isSignal: true,
567
+ isRequired: false,
568
+ transformFunction: null
569
+ },
570
+ toggleable: {
571
+ classPropertyName: "toggleable",
572
+ publicName: "toggleable",
573
+ isSignal: true,
574
+ isRequired: false,
575
+ transformFunction: null
576
+ },
577
+ userClass: {
578
+ classPropertyName: "userClass",
579
+ publicName: "class",
580
+ isSignal: true,
581
+ isRequired: false,
582
+ transformFunction: null
583
+ },
584
+ value: {
585
+ classPropertyName: "value",
586
+ publicName: "value",
587
+ isSignal: true,
588
+ isRequired: false,
589
+ transformFunction: null
590
+ }
591
+ },
592
+ outputs: {
593
+ contentClick: "contentClick",
594
+ remove: "remove",
595
+ selected: "selectedChange"
596
+ },
597
+ host: { properties: {
598
+ "class": "baseClass()",
599
+ "attr.tabindex": "split() ? null : effectiveTabIndex()",
600
+ "attr.aria-disabled": "hostRole() && disabled() ? 'true' : null",
601
+ "attr.role": "hostRole()",
602
+ "attr.aria-checked": "split() ? null : ariaChecked()",
603
+ "attr.aria-label": "split() ? null : ariaLabel() || null"
604
+ } },
605
+ queries: [{
606
+ propertyName: "prefixTemplate",
607
+ first: true,
608
+ predicate: ChipPrefixTemplateDirective,
609
+ descendants: true,
610
+ read: TemplateRef,
611
+ isSignal: true
612
+ }],
613
+ viewQueries: [{
614
+ propertyName: "bodyElement",
615
+ first: true,
616
+ predicate: ["body"],
617
+ descendants: true,
618
+ isSignal: true
619
+ }],
620
+ ngImport: i0,
621
+ template: "<span\n #body\n [class]=\"bodyClasses()\"\n [attr.aria-checked]=\"split() ? ariaChecked() : null\"\n [attr.aria-disabled]=\"split() && disabled() ? 'true' : null\"\n [attr.aria-label]=\"split() ? ariaLabel() || null : null\"\n [attr.role]=\"split() ? controlRole() : null\"\n [attr.tabindex]=\"split() ? effectiveTabIndex() : null\">\n @if (prefixTemplate()) {\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n }\n\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</span>\n\n@if (removable()) {\n @let removeAriaLabel = removeLabel() || messages().removeLabel(label() || ariaLabel());\n <button\n monaButton\n look=\"link\"\n [iconOnly]=\"true\"\n [size]=\"'small'\"\n [attr.aria-label]=\"removeAriaLabel\"\n [tabindex]=\"removeTabIndex()\"\n [disabled]=\"disabled()\"\n (click)=\"onRemoveClick($event)\"\n [attr.data-chip-remove]=\"true\">\n <svg lucideCircleX [size]=\"iconSize()\"></svg>\n </button>\n}\n",
622
+ dependencies: [
623
+ {
624
+ kind: "directive",
625
+ type: ButtonDirective,
626
+ selector: "button[monaButton]",
627
+ inputs: [
628
+ "aria-haspopup",
629
+ "disabled",
630
+ "iconOnly",
631
+ "loading",
632
+ "look",
633
+ "rounded",
634
+ "selected",
635
+ "size",
636
+ "tabindex",
637
+ "toggleable",
638
+ "type",
639
+ "class",
640
+ "value"
641
+ ],
642
+ outputs: ["lookChange", "selectedChange"]
643
+ },
644
+ {
645
+ kind: "directive",
646
+ type: NgTemplateOutlet,
647
+ selector: "[ngTemplateOutlet]",
648
+ inputs: [
649
+ "ngTemplateOutletContext",
650
+ "ngTemplateOutlet",
651
+ "ngTemplateOutletInjector"
652
+ ]
653
+ },
654
+ {
655
+ kind: "component",
656
+ type: LucideCircleX,
657
+ selector: "svg[lucideCircleX], svg[lucideXCircle]"
658
+ }
659
+ ]
660
+ });
661
+ }
662
+ };
663
+ i0.ɵɵngDeclareClassMetadata({
664
+ minVersion: "12.0.0",
665
+ version: "22.2.6",
666
+ ngImport: i0,
667
+ type: ChipComponent,
668
+ decorators: [{
669
+ type: Component,
670
+ args: [{
671
+ selector: "mona-chip",
672
+ imports: [
673
+ ButtonDirective,
674
+ NgTemplateOutlet,
675
+ LucideCircleX
676
+ ],
677
+ host: {
678
+ "[class]": "baseClass()",
679
+ "[attr.tabindex]": "split() ? null : effectiveTabIndex()",
680
+ "[attr.aria-disabled]": "hostRole() && disabled() ? 'true' : null",
681
+ "[attr.role]": "hostRole()",
682
+ "[attr.aria-checked]": "split() ? null : ariaChecked()",
683
+ "[attr.aria-label]": "split() ? null : ariaLabel() || null"
684
+ },
685
+ template: "<span\n #body\n [class]=\"bodyClasses()\"\n [attr.aria-checked]=\"split() ? ariaChecked() : null\"\n [attr.aria-disabled]=\"split() && disabled() ? 'true' : null\"\n [attr.aria-label]=\"split() ? ariaLabel() || null : null\"\n [attr.role]=\"split() ? controlRole() : null\"\n [attr.tabindex]=\"split() ? effectiveTabIndex() : null\">\n @if (prefixTemplate()) {\n <ng-container [ngTemplateOutlet]=\"prefixTemplate()\"></ng-container>\n }\n\n @if (label()) {\n <span>{{ label() }}</span>\n } @else {\n <ng-content></ng-content>\n }\n</span>\n\n@if (removable()) {\n @let removeAriaLabel = removeLabel() || messages().removeLabel(label() || ariaLabel());\n <button\n monaButton\n look=\"link\"\n [iconOnly]=\"true\"\n [size]=\"'small'\"\n [attr.aria-label]=\"removeAriaLabel\"\n [tabindex]=\"removeTabIndex()\"\n [disabled]=\"disabled()\"\n (click)=\"onRemoveClick($event)\"\n [attr.data-chip-remove]=\"true\">\n <svg lucideCircleX [size]=\"iconSize()\"></svg>\n </button>\n}\n"
686
+ }]
687
+ }],
688
+ ctorParameters: () => [],
689
+ propDecorators: {
690
+ bodyElement: [{
691
+ type: i0.ViewChild,
692
+ args: ["body", { isSignal: true }]
693
+ }],
694
+ prefixTemplate: [{
695
+ type: i0.ContentChild,
696
+ args: [i0.forwardRef(() => ChipPrefixTemplateDirective), {
697
+ read: TemplateRef,
698
+ isSignal: true
699
+ }]
700
+ }],
701
+ ariaLabel: [{
702
+ type: i0.Input,
703
+ args: [{
704
+ isSignal: true,
705
+ alias: "aria-label",
706
+ required: false
707
+ }]
708
+ }],
709
+ contentClick: [{
710
+ type: i0.Output,
711
+ args: ["contentClick"]
712
+ }],
713
+ disabled: [{
714
+ type: i0.Input,
715
+ args: [{
716
+ isSignal: true,
717
+ alias: "disabled",
718
+ required: false
719
+ }]
720
+ }],
721
+ label: [{
722
+ type: i0.Input,
723
+ args: [{
724
+ isSignal: true,
725
+ alias: "label",
726
+ required: false
727
+ }]
728
+ }],
729
+ look: [{
730
+ type: i0.Input,
731
+ args: [{
732
+ isSignal: true,
733
+ alias: "look",
734
+ required: false
735
+ }]
736
+ }],
737
+ removable: [{
738
+ type: i0.Input,
739
+ args: [{
740
+ isSignal: true,
741
+ alias: "removable",
742
+ required: false
743
+ }]
744
+ }],
745
+ remove: [{
746
+ type: i0.Output,
747
+ args: ["remove"]
748
+ }],
749
+ removeLabel: [{
750
+ type: i0.Input,
751
+ args: [{
752
+ isSignal: true,
753
+ alias: "removeLabel",
754
+ required: false
755
+ }]
756
+ }],
757
+ removeTabIndex: [{
758
+ type: i0.Input,
759
+ args: [{
760
+ isSignal: true,
761
+ alias: "removeTabIndex",
762
+ required: false
763
+ }]
764
+ }],
765
+ rounded: [{
766
+ type: i0.Input,
767
+ args: [{
768
+ isSignal: true,
769
+ alias: "rounded",
770
+ required: false
771
+ }]
772
+ }],
773
+ selected: [{
774
+ type: i0.Input,
775
+ args: [{
776
+ isSignal: true,
777
+ alias: "selected",
778
+ required: false
779
+ }]
780
+ }, {
781
+ type: i0.Output,
782
+ args: ["selectedChange"]
783
+ }],
784
+ size: [{
785
+ type: i0.Input,
786
+ args: [{
787
+ isSignal: true,
788
+ alias: "size",
789
+ required: false
790
+ }]
791
+ }],
792
+ tabindex: [{
793
+ type: i0.Input,
794
+ args: [{
795
+ isSignal: true,
796
+ alias: "tabindex",
797
+ required: false
798
+ }]
799
+ }],
800
+ toggleable: [{
801
+ type: i0.Input,
802
+ args: [{
803
+ isSignal: true,
804
+ alias: "toggleable",
805
+ required: false
806
+ }]
807
+ }],
808
+ userClass: [{
809
+ type: i0.Input,
810
+ args: [{
811
+ isSignal: true,
812
+ alias: "class",
813
+ required: false
814
+ }]
815
+ }],
816
+ value: [{
817
+ type: i0.Input,
818
+ args: [{
819
+ isSignal: true,
820
+ alias: "value",
821
+ required: false
822
+ }]
823
+ }]
824
+ }
825
+ });
606
826
  export { CHIP_DEFAULT_MESSAGES, ChipComponent, ChipPrefixTemplateDirective };
607
- //# sourceMappingURL=nanahoshi-mona-ui-chip.mjs.map
827
+
828
+ //# sourceMappingURL=nanahoshi-mona-ui-chip.mjs.map