@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,37 +1,22 @@
1
- import { NgTemplateOutlet } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { computed, input, Directive, InjectionToken, inject, ElementRef, booleanAttribute, output, contentChild, viewChild, TemplateRef, forwardRef, Component, Injector, linkedSignal, contentChildren, afterNextRender } from '@angular/core';
4
- import { LucideChevronRight, LucideEllipsis } from '@lucide/angular';
5
- import { MonaI18nService } from '@nanahoshi/mona-ui/i18n';
6
- import { twMerge } from 'tailwind-merge';
7
- import { cva } from 'class-variance-authority';
8
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
9
- import { fromEvent } from 'rxjs';
10
-
1
+ import { NgTemplateOutlet } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { Component, Directive, ElementRef, InjectionToken, Injector, TemplateRef, afterNextRender, booleanAttribute, computed, contentChild, contentChildren, forwardRef, inject, input, linkedSignal, output, viewChild } from "@angular/core";
4
+ import { LucideChevronRight, LucideEllipsis } from "@lucide/angular";
5
+ import { MonaI18nService } from "@nanahoshi/mona-ui/i18n";
6
+ import { twMerge } from "tailwind-merge";
7
+ import { cva } from "class-variance-authority";
8
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
9
+ import { fromEvent } from "rxjs";
11
10
  const breadcrumbListThemeVariants = cva(`
12
11
  flex list-none items-center gap-1 overflow-hidden px-2 py-1
13
- `, {
14
- variants: {
15
- disabled: {
16
- true: "pointer-events-none cursor-not-allowed text-disabled-foreground",
17
- false: ""
18
- }
19
- }
20
- });
21
- /**
22
- * `min-w-0`, or a flex item never gets narrower than its text, and nothing inside it ever truncates. The other items
23
- * shrink faster than the current page, so it's the one that stays readable. The current page keeps a factor of 1 rather
24
- * than a fraction, because flexbox only takes that fraction of the overflow once it's the last item left to shrink.
25
- */
26
- const breadcrumbListItemWrapperThemeVariants = cva(`flex min-w-0 items-center`, {
27
- variants: {
28
- current: {
29
- true: "",
30
- false: "shrink-[10]"
31
- }
32
- }
33
- });
34
- /** Inset focus, because the list clips anything outside it. */
12
+ `, { variants: { disabled: {
13
+ true: "pointer-events-none cursor-not-allowed text-disabled-foreground",
14
+ false: ""
15
+ } } });
16
+ const breadcrumbListItemWrapperThemeVariants = cva(`flex min-w-0 items-center`, { variants: { current: {
17
+ true: "",
18
+ false: "shrink-[10]"
19
+ } } });
35
20
  const breadcrumbListItemThemeVariants = cva(`
36
21
  flex h-full max-w-full min-w-0 items-center px-1
37
22
  cursor-pointer
@@ -39,358 +24,660 @@ const breadcrumbListItemThemeVariants = cva(`
39
24
  transition-colors duration-100 ease-in-out
40
25
  focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-focus-indicator
41
26
  `, {
42
- variants: {
43
- disabled: {
44
- true: "pointer-events-none cursor-not-allowed text-disabled-foreground",
45
- false: "text-muted-foreground hover:bg-hover hover:text-foreground active:bg-active active:text-foreground"
46
- }
47
- },
48
- defaultVariants: {
49
- disabled: false
50
- }
27
+ variants: { disabled: {
28
+ true: "pointer-events-none cursor-not-allowed text-disabled-foreground",
29
+ false: "text-muted-foreground hover:bg-hover hover:text-foreground active:bg-active active:text-foreground"
30
+ } },
31
+ defaultVariants: { disabled: false }
51
32
  });
52
- /** Text in a flex item only truncates from a block of its own, and an icon beside it has to stay on the same line. */
53
33
  const breadcrumbItemContentThemeVariants = cva(`min-w-0 truncate [&_svg]:inline`);
54
34
  const breadcrumbLinkThemeVariants = cva(`
55
35
  block max-w-full min-w-0 truncate rounded-sm px-1 [&_svg]:inline
56
36
  transition-colors duration-100 ease-in-out
57
37
  focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-focus-indicator
58
38
  `, {
59
- variants: {
60
- current: {
61
- true: "font-medium text-foreground",
62
- false: ""
63
- },
64
- disabled: {
65
- true: "pointer-events-none cursor-not-allowed text-disabled-foreground",
66
- false: ""
67
- }
68
- },
69
- compoundVariants: [
70
- {
71
- current: false,
72
- disabled: false,
73
- class: "text-muted-foreground hover:bg-hover hover:text-foreground active:bg-active active:text-foreground"
74
- }
75
- ],
76
- defaultVariants: {
77
- current: false,
78
- disabled: false
79
- }
39
+ variants: {
40
+ current: {
41
+ true: "font-medium text-foreground",
42
+ false: ""
43
+ },
44
+ disabled: {
45
+ true: "pointer-events-none cursor-not-allowed text-disabled-foreground",
46
+ false: ""
47
+ }
48
+ },
49
+ compoundVariants: [{
50
+ current: false,
51
+ disabled: false,
52
+ class: "text-muted-foreground hover:bg-hover hover:text-foreground active:bg-active active:text-foreground"
53
+ }],
54
+ defaultVariants: {
55
+ current: false,
56
+ disabled: false
57
+ }
80
58
  });
81
59
  const breadcrumbCurrentItemThemeVariants = cva(`block min-w-0 cursor-default truncate font-medium text-foreground [&_svg]:inline`);
82
-
83
- class BreadcrumbItemDirective {
84
- constructor() {
85
- this.baseClass = computed(() => {
86
- const disabled = this.disabled();
87
- const userClass = this.userClass();
88
- return twMerge(breadcrumbListItemThemeVariants({ disabled }), userClass);
89
- }, /* @ts-ignore */
90
- ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
91
- /**
92
- * @description Renders this item with reduced visual emphasis and removes pointer interaction.
93
- * @default false
94
- */
95
- this.disabled = input(false, /* @ts-ignore */
96
- ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
97
- /**
98
- * @description Additional CSS classes merged onto the breadcrumb item via `tailwind-merge`.
99
- * @default ""
100
- */
101
- this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
102
- }
103
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
104
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: BreadcrumbItemDirective, isStandalone: true, selector: "button[monaBreadcrumbItem]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "baseClass()", "disabled": "disabled()" } }, ngImport: i0 }); }
105
- }
106
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbItemDirective, decorators: [{
107
- type: Directive,
108
- args: [{
109
- selector: "button[monaBreadcrumbItem]",
110
- host: {
111
- "[class]": "baseClass()",
112
- "[disabled]": "disabled()"
113
- }
114
- }]
115
- }], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
116
-
117
- /**
118
- * Apply to an `<ng-template>` directly inside `<mona-breadcrumb>` to replace the default `ChevronRight` separator. One
119
- * directive per breadcrumb — the first match is used.
120
- */
121
- class BreadcrumbSeparatorTemplateDirective {
122
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbSeparatorTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
123
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: BreadcrumbSeparatorTemplateDirective, isStandalone: true, selector: "ng-template[monaBreadcrumbSeparatorTemplate]", ngImport: i0 }); }
124
- }
125
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbSeparatorTemplateDirective, decorators: [{
126
- type: Directive,
127
- args: [{
128
- selector: "ng-template[monaBreadcrumbSeparatorTemplate]"
129
- }]
130
- }] });
131
-
132
- // Generated from i18n/catalogs/en-US.messages.json by scripts/generate-locale-catalogs.ts. Do not edit.
133
- // Edit the JSON file and run `npm run generate:locale-catalogs`.
60
+ var BreadcrumbItemDirective = class BreadcrumbItemDirective {
61
+ constructor() {
62
+ this.baseClass = computed(() => {
63
+ const disabled = this.disabled();
64
+ const userClass = this.userClass();
65
+ return twMerge(breadcrumbListItemThemeVariants({ disabled }), userClass);
66
+ }, ...ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []);
67
+ this.disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
68
+ this.userClass = input("", {
69
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
70
+ alias: "class"
71
+ });
72
+ }
73
+ static {
74
+ this.ɵfac = i0.ɵɵngDeclareFactory({
75
+ minVersion: "12.0.0",
76
+ version: "22.2.6",
77
+ ngImport: i0,
78
+ type: BreadcrumbItemDirective,
79
+ deps: [],
80
+ target: i0.ɵɵFactoryTarget.Directive
81
+ });
82
+ }
83
+ static {
84
+ this.ɵdir = i0.ɵɵngDeclareDirective({
85
+ minVersion: "17.1.0",
86
+ version: "22.2.6",
87
+ type: BreadcrumbItemDirective,
88
+ isStandalone: true,
89
+ selector: "button[monaBreadcrumbItem]",
90
+ inputs: {
91
+ disabled: {
92
+ classPropertyName: "disabled",
93
+ publicName: "disabled",
94
+ isSignal: true,
95
+ isRequired: false,
96
+ transformFunction: null
97
+ },
98
+ userClass: {
99
+ classPropertyName: "userClass",
100
+ publicName: "class",
101
+ isSignal: true,
102
+ isRequired: false,
103
+ transformFunction: null
104
+ }
105
+ },
106
+ host: { properties: {
107
+ "class": "baseClass()",
108
+ "disabled": "disabled()"
109
+ } },
110
+ ngImport: i0
111
+ });
112
+ }
113
+ };
114
+ i0.ɵɵngDeclareClassMetadata({
115
+ minVersion: "12.0.0",
116
+ version: "22.2.6",
117
+ ngImport: i0,
118
+ type: BreadcrumbItemDirective,
119
+ decorators: [{
120
+ type: Directive,
121
+ args: [{
122
+ selector: "button[monaBreadcrumbItem]",
123
+ host: {
124
+ "[class]": "baseClass()",
125
+ "[disabled]": "disabled()"
126
+ }
127
+ }]
128
+ }],
129
+ propDecorators: {
130
+ disabled: [{
131
+ type: i0.Input,
132
+ args: [{
133
+ isSignal: true,
134
+ alias: "disabled",
135
+ required: false
136
+ }]
137
+ }],
138
+ userClass: [{
139
+ type: i0.Input,
140
+ args: [{
141
+ isSignal: true,
142
+ alias: "class",
143
+ required: false
144
+ }]
145
+ }]
146
+ }
147
+ });
148
+ var BreadcrumbSeparatorTemplateDirective = class BreadcrumbSeparatorTemplateDirective {
149
+ static {
150
+ this.ɵfac = i0.ɵɵngDeclareFactory({
151
+ minVersion: "12.0.0",
152
+ version: "22.2.6",
153
+ ngImport: i0,
154
+ type: BreadcrumbSeparatorTemplateDirective,
155
+ deps: [],
156
+ target: i0.ɵɵFactoryTarget.Directive
157
+ });
158
+ }
159
+ static {
160
+ this.ɵdir = i0.ɵɵngDeclareDirective({
161
+ minVersion: "14.0.0",
162
+ version: "22.2.6",
163
+ type: BreadcrumbSeparatorTemplateDirective,
164
+ isStandalone: true,
165
+ selector: "ng-template[monaBreadcrumbSeparatorTemplate]",
166
+ ngImport: i0
167
+ });
168
+ }
169
+ };
170
+ i0.ɵɵngDeclareClassMetadata({
171
+ minVersion: "12.0.0",
172
+ version: "22.2.6",
173
+ ngImport: i0,
174
+ type: BreadcrumbSeparatorTemplateDirective,
175
+ decorators: [{
176
+ type: Directive,
177
+ args: [{ selector: "ng-template[monaBreadcrumbSeparatorTemplate]" }]
178
+ }]
179
+ });
134
180
  const BREADCRUMB_DEFAULT_MESSAGES = {
135
- breadcrumb: "Breadcrumb",
136
- showFullPath: "Show full path"
181
+ breadcrumb: "Breadcrumb",
182
+ showFullPath: "Show full path"
137
183
  };
138
-
139
184
  const BREADCRUMB_CONTEXT = new InjectionToken("MONA_BREADCRUMB_CONTEXT");
140
185
  const BREADCRUMB_ITEM_CONTEXT = new InjectionToken("MONA_BREADCRUMB_ITEM_CONTEXT");
141
-
142
- /**
143
- * Makes a projected anchor the item's link, so the browser and the router treat it as one: ctrl-click, copy link, `href`,
144
- * `routerLink`, `target`. The item then renders no button around it.
145
- */
146
- class BreadcrumbLinkDirective {
147
- #item;
148
- constructor() {
149
- this.#item = inject(BREADCRUMB_ITEM_CONTEXT, { optional: true });
150
- this.current = computed(() => this.#item?.current() ?? false, /* @ts-ignore */
151
- ...(ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []));
152
- this.disabled = computed(() => this.#item?.effectiveDisabled() ?? false, /* @ts-ignore */
153
- ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
154
- this.linkClass = computed(() => {
155
- const variantClass = breadcrumbLinkThemeVariants({ current: this.current(), disabled: this.disabled() });
156
- return twMerge(variantClass, this.userClass());
157
- }, /* @ts-ignore */
158
- ...(ngDevMode ? [{ debugName: "linkClass" }] : /* istanbul ignore next */ []));
159
- /**
160
- * @description Additional CSS classes merged onto the link via `tailwind-merge`.
161
- * @default ""
162
- */
163
- this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
164
- const host = inject(ElementRef).nativeElement;
165
- // In the capture phase, so a disabled link stops a click before `routerLink`'s own listener can act on it.
166
- fromEvent(host, "click", { capture: true })
167
- .pipe(takeUntilDestroyed())
168
- .subscribe(event => {
169
- if (this.disabled()) {
170
- event.preventDefault();
171
- event.stopImmediatePropagation();
172
- }
173
- else if (!this.current()) {
174
- this.#item?.itemClick.emit(event);
175
- }
176
- });
177
- }
178
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbLinkDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
179
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: BreadcrumbLinkDirective, isStandalone: true, selector: "a[monaBreadcrumbLink]", inputs: { userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-current": "current() ? 'page' : null", "attr.aria-disabled": "disabled() ? true : null", "attr.tabindex": "disabled() ? -1 : null", "class": "linkClass()" } }, ngImport: i0 }); }
180
- }
181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbLinkDirective, decorators: [{
182
- type: Directive,
183
- args: [{
184
- selector: "a[monaBreadcrumbLink]",
185
- host: {
186
- "[attr.aria-current]": "current() ? 'page' : null",
187
- "[attr.aria-disabled]": "disabled() ? true : null",
188
- "[attr.tabindex]": "disabled() ? -1 : null",
189
- "[class]": "linkClass()"
190
- }
191
- }]
192
- }], ctorParameters: () => [], propDecorators: { userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
193
-
194
- /**
195
- * Use as a direct child of `<mona-breadcrumb>`. Project any Angular content — text, icons, or elements — into the
196
- * default slot.
197
- */
198
- class BreadcrumbItemComponent {
199
- constructor() {
200
- this.#breadcrumb = inject(BREADCRUMB_CONTEXT, { optional: true });
201
- /**
202
- * @internal
203
- */
204
- this.current = computed(() => this.#breadcrumb?.currentItem() === this, /* @ts-ignore */
205
- ...(ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []));
206
- /**
207
- * @description Renders this item with reduced visual emphasis and removes pointer interaction.
208
- * Has no visual effect when the parent breadcrumb is also disabled.
209
- * @default false
210
- */
211
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
212
- /**
213
- * @internal
214
- */
215
- this.effectiveDisabled = computed(() => !!this.#breadcrumb?.disabled() || this.disabled(), /* @ts-ignore */
216
- ...(ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []));
217
- /**
218
- * @description Emitted with the click when the item is clicked or activated via keyboard.
219
- * Not emitted when this is the current-page item or when the item is disabled.
220
- */
221
- this.itemClick = output();
222
- /**
223
- * @internal
224
- */
225
- this.link = contentChild(BreadcrumbLinkDirective, /* @ts-ignore */
226
- ...(ngDevMode ? [{ debugName: "link" }] : /* istanbul ignore next */ []));
227
- /**
228
- * @internal
229
- */
230
- this.templateRef = viewChild.required(TemplateRef, /* @ts-ignore */
231
- ...(ngDevMode ? [{ debugName: "templateRef" }] : /* istanbul ignore next */ []));
232
- }
233
- #breadcrumb;
234
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
235
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.6", type: BreadcrumbItemComponent, isStandalone: true, selector: "mona-breadcrumb-item", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick" }, providers: [{ provide: BREADCRUMB_ITEM_CONTEXT, useExisting: forwardRef(() => BreadcrumbItemComponent) }], queries: [{ propertyName: "link", first: true, predicate: BreadcrumbLinkDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n" }); }
236
- }
237
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbItemComponent, decorators: [{
238
- type: Component,
239
- args: [{ selector: "mona-breadcrumb-item", providers: [{ provide: BREADCRUMB_ITEM_CONTEXT, useExisting: forwardRef(() => BreadcrumbItemComponent) }], template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n" }]
240
- }], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], link: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BreadcrumbLinkDirective), { isSignal: true }] }], templateRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => TemplateRef), { isSignal: true }] }] } });
241
-
186
+ var BreadcrumbLinkDirective = class BreadcrumbLinkDirective {
187
+ #item;
188
+ constructor() {
189
+ this.#item = inject(BREADCRUMB_ITEM_CONTEXT, { optional: true });
190
+ this.current = computed(() => this.#item?.current() ?? false, ...ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []);
191
+ this.disabled = computed(() => this.#item?.effectiveDisabled() ?? false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
192
+ this.linkClass = computed(() => {
193
+ const variantClass = breadcrumbLinkThemeVariants({
194
+ current: this.current(),
195
+ disabled: this.disabled()
196
+ });
197
+ return twMerge(variantClass, this.userClass());
198
+ }, ...ngDevMode ? [{ debugName: "linkClass" }] : /* istanbul ignore next */ []);
199
+ this.userClass = input("", {
200
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
201
+ alias: "class"
202
+ });
203
+ const host = inject(ElementRef).nativeElement;
204
+ fromEvent(host, "click", { capture: true }).pipe(takeUntilDestroyed()).subscribe((event) => {
205
+ if (this.disabled()) {
206
+ event.preventDefault();
207
+ event.stopImmediatePropagation();
208
+ } else if (!this.current()) this.#item?.itemClick.emit(event);
209
+ });
210
+ }
211
+ static {
212
+ this.ɵfac = i0.ɵɵngDeclareFactory({
213
+ minVersion: "12.0.0",
214
+ version: "22.2.6",
215
+ ngImport: i0,
216
+ type: BreadcrumbLinkDirective,
217
+ deps: [],
218
+ target: i0.ɵɵFactoryTarget.Directive
219
+ });
220
+ }
221
+ static {
222
+ this.ɵdir = i0.ɵɵngDeclareDirective({
223
+ minVersion: "17.1.0",
224
+ version: "22.2.6",
225
+ type: BreadcrumbLinkDirective,
226
+ isStandalone: true,
227
+ selector: "a[monaBreadcrumbLink]",
228
+ inputs: { userClass: {
229
+ classPropertyName: "userClass",
230
+ publicName: "class",
231
+ isSignal: true,
232
+ isRequired: false,
233
+ transformFunction: null
234
+ } },
235
+ host: { properties: {
236
+ "attr.aria-current": "current() ? 'page' : null",
237
+ "attr.aria-disabled": "disabled() ? true : null",
238
+ "attr.tabindex": "disabled() ? -1 : null",
239
+ "class": "linkClass()"
240
+ } },
241
+ ngImport: i0
242
+ });
243
+ }
244
+ };
245
+ i0.ɵɵngDeclareClassMetadata({
246
+ minVersion: "12.0.0",
247
+ version: "22.2.6",
248
+ ngImport: i0,
249
+ type: BreadcrumbLinkDirective,
250
+ decorators: [{
251
+ type: Directive,
252
+ args: [{
253
+ selector: "a[monaBreadcrumbLink]",
254
+ host: {
255
+ "[attr.aria-current]": "current() ? 'page' : null",
256
+ "[attr.aria-disabled]": "disabled() ? true : null",
257
+ "[attr.tabindex]": "disabled() ? -1 : null",
258
+ "[class]": "linkClass()"
259
+ }
260
+ }]
261
+ }],
262
+ ctorParameters: () => [],
263
+ propDecorators: { userClass: [{
264
+ type: i0.Input,
265
+ args: [{
266
+ isSignal: true,
267
+ alias: "class",
268
+ required: false
269
+ }]
270
+ }] }
271
+ });
272
+ var BreadcrumbItemComponent = class BreadcrumbItemComponent {
273
+ constructor() {
274
+ this.#breadcrumb = inject(BREADCRUMB_CONTEXT, { optional: true });
275
+ this.current = computed(() => this.#breadcrumb?.currentItem() === this, ...ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []);
276
+ this.disabled = input(false, {
277
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
278
+ transform: booleanAttribute
279
+ });
280
+ this.effectiveDisabled = computed(() => !!this.#breadcrumb?.disabled() || this.disabled(), ...ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []);
281
+ this.itemClick = output();
282
+ this.link = contentChild(BreadcrumbLinkDirective, ...ngDevMode ? [{ debugName: "link" }] : /* istanbul ignore next */ []);
283
+ this.templateRef = viewChild.required(TemplateRef, ...ngDevMode ? [{ debugName: "templateRef" }] : /* istanbul ignore next */ []);
284
+ }
285
+ #breadcrumb;
286
+ static {
287
+ this.ɵfac = i0.ɵɵngDeclareFactory({
288
+ minVersion: "12.0.0",
289
+ version: "22.2.6",
290
+ ngImport: i0,
291
+ type: BreadcrumbItemComponent,
292
+ deps: [],
293
+ target: i0.ɵɵFactoryTarget.Component
294
+ });
295
+ }
296
+ static {
297
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
298
+ minVersion: "17.2.0",
299
+ version: "22.2.6",
300
+ type: BreadcrumbItemComponent,
301
+ isStandalone: true,
302
+ selector: "mona-breadcrumb-item",
303
+ inputs: { disabled: {
304
+ classPropertyName: "disabled",
305
+ publicName: "disabled",
306
+ isSignal: true,
307
+ isRequired: false,
308
+ transformFunction: null
309
+ } },
310
+ outputs: { itemClick: "itemClick" },
311
+ providers: [{
312
+ provide: BREADCRUMB_ITEM_CONTEXT,
313
+ useExisting: forwardRef(() => BreadcrumbItemComponent)
314
+ }],
315
+ queries: [{
316
+ propertyName: "link",
317
+ first: true,
318
+ predicate: BreadcrumbLinkDirective,
319
+ descendants: true,
320
+ isSignal: true
321
+ }],
322
+ viewQueries: [{
323
+ propertyName: "templateRef",
324
+ first: true,
325
+ predicate: TemplateRef,
326
+ descendants: true,
327
+ isSignal: true
328
+ }],
329
+ ngImport: i0,
330
+ template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n"
331
+ });
332
+ }
333
+ };
334
+ i0.ɵɵngDeclareClassMetadata({
335
+ minVersion: "12.0.0",
336
+ version: "22.2.6",
337
+ ngImport: i0,
338
+ type: BreadcrumbItemComponent,
339
+ decorators: [{
340
+ type: Component,
341
+ args: [{
342
+ selector: "mona-breadcrumb-item",
343
+ providers: [{
344
+ provide: BREADCRUMB_ITEM_CONTEXT,
345
+ useExisting: forwardRef(() => BreadcrumbItemComponent)
346
+ }],
347
+ template: "<ng-template>\n <ng-content></ng-content>\n</ng-template>\n"
348
+ }]
349
+ }],
350
+ propDecorators: {
351
+ disabled: [{
352
+ type: i0.Input,
353
+ args: [{
354
+ isSignal: true,
355
+ alias: "disabled",
356
+ required: false
357
+ }]
358
+ }],
359
+ itemClick: [{
360
+ type: i0.Output,
361
+ args: ["itemClick"]
362
+ }],
363
+ link: [{
364
+ type: i0.ContentChild,
365
+ args: [i0.forwardRef(() => BreadcrumbLinkDirective), { isSignal: true }]
366
+ }],
367
+ templateRef: [{
368
+ type: i0.ViewChild,
369
+ args: [i0.forwardRef(() => TemplateRef), { isSignal: true }]
370
+ }]
371
+ }
372
+ });
242
373
  function numberOrNull(value) {
243
- if (value == null || value === "") {
244
- return null;
245
- }
246
- const parsed = Number(value);
247
- return Number.isNaN(parsed) ? null : parsed;
374
+ if (value == null || value === "") return null;
375
+ const parsed = Number(value);
376
+ return Number.isNaN(parsed) ? null : parsed;
248
377
  }
249
- class BreadcrumbComponent {
250
- constructor() {
251
- this.#i18n = inject(MonaI18nService);
252
- this.#injector = inject(Injector);
253
- this.currentItemClass = computed(() => {
254
- return breadcrumbCurrentItemThemeVariants();
255
- }, /* @ts-ignore */
256
- ...(ngDevMode ? [{ debugName: "currentItemClass" }] : /* istanbul ignore next */ []));
257
- this.entries = computed(() => {
258
- const items = this.itemComponents();
259
- const hidden = this.hiddenCount();
260
- const entries = [];
261
- items.forEach((item, index) => {
262
- if (hidden > 0 && index === 1) {
263
- entries.push({ index: hidden, item: null, key: "expand" });
264
- }
265
- if (hidden === 0 || index === 0 || index > hidden) {
266
- entries.push({ index, item, key: item });
267
- }
268
- });
269
- return entries;
270
- }, /* @ts-ignore */
271
- ...(ngDevMode ? [{ debugName: "entries" }] : /* istanbul ignore next */ []));
272
- this.expanded = linkedSignal({ ...(ngDevMode ? { debugName: "expanded" } : /* istanbul ignore next */ {}), source: () => this.itemComponents(), computation: () => false });
273
- this.hasItems = computed(() => this.itemComponents().length > 0, /* @ts-ignore */
274
- ...(ngDevMode ? [{ debugName: "hasItems" }] : /* istanbul ignore next */ []));
275
- this.hiddenCount = computed(() => {
276
- const maxItems = this.maxItems();
277
- const count = this.itemComponents().length;
278
- if (maxItems === null || this.expanded()) {
279
- return 0;
280
- }
281
- // The first and last items are always kept, so nothing lower than two means anything.
282
- return Math.max(count - Math.max(Math.trunc(maxItems), 2), 0);
283
- }, /* @ts-ignore */
284
- ...(ngDevMode ? [{ debugName: "hiddenCount" }] : /* istanbul ignore next */ []));
285
- this.itemComponents = contentChildren(BreadcrumbItemComponent, /* @ts-ignore */
286
- ...(ngDevMode ? [{ debugName: "itemComponents" }] : /* istanbul ignore next */ []));
287
- this.itemContentClass = computed(() => {
288
- return breadcrumbItemContentThemeVariants();
289
- }, /* @ts-ignore */
290
- ...(ngDevMode ? [{ debugName: "itemContentClass" }] : /* istanbul ignore next */ []));
291
- this.listClass = computed(() => {
292
- const disabled = this.disabled();
293
- const userClass = this.userClass();
294
- const variantClass = breadcrumbListThemeVariants({ disabled });
295
- return twMerge(variantClass, userClass);
296
- }, /* @ts-ignore */
297
- ...(ngDevMode ? [{ debugName: "listClass" }] : /* istanbul ignore next */ []));
298
- this.listElement = viewChild("list", /* @ts-ignore */
299
- ...(ngDevMode ? [{ debugName: "listElement" }] : /* istanbul ignore next */ []));
300
- this.messages = this.#i18n.componentMessages("breadcrumb", BREADCRUMB_DEFAULT_MESSAGES);
301
- this.separatorTemplate = contentChild(BreadcrumbSeparatorTemplateDirective, { ...(ngDevMode ? { debugName: "separatorTemplate" } : /* istanbul ignore next */ {}), read: TemplateRef });
302
- /**
303
- * @description Accessible name for the breadcrumb navigation landmark.
304
- * Override when multiple breadcrumb components appear on the same page.
305
- * @default ""
306
- */
307
- this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
308
- /**
309
- * @internal
310
- */
311
- this.currentItem = computed(() => {
312
- return this.lastItemCurrent() ? (this.itemComponents().at(-1) ?? null) : null;
313
- }, /* @ts-ignore */
314
- ...(ngDevMode ? [{ debugName: "currentItem" }] : /* istanbul ignore next */ []));
315
- /**
316
- * @description Renders the entire breadcrumb with reduced visual emphasis and removes pointer interaction from all items.
317
- * @default false
318
- */
319
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
320
- /**
321
- * @description Treats the last item as the current page: not a button, and marked `aria-current="page"`. Turn it off
322
- * for a trail that ends before the page you're on.
323
- * @default true
324
- */
325
- this.lastItemCurrent = input(true, { ...(ngDevMode ? { debugName: "lastItemCurrent" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
326
- /**
327
- * @description The most items to show before the middle of the trail collapses behind a button that shows it again.
328
- * The first and last items always stay, so anything below 2 counts as 2. `null` never collapses.
329
- * @default null
330
- */
331
- this.maxItems = input(null, { ...(ngDevMode ? { debugName: "maxItems" } : /* istanbul ignore next */ {}), transform: numberOrNull });
332
- /**
333
- * @description Additional CSS classes merged onto the breadcrumb list via `tailwind-merge`.
334
- * @default ""
335
- */
336
- this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
337
- }
338
- #i18n;
339
- #injector;
340
- /**
341
- * Shows the whole trail. The button that was just activated goes away, so focus moves to the first item it revealed.
342
- */
343
- expand() {
344
- const firstRevealed = 1;
345
- const lastRevealed = this.hiddenCount();
346
- this.expanded.set(true);
347
- afterNextRender({
348
- read: () => {
349
- const list = this.listElement()?.nativeElement;
350
- for (let index = firstRevealed; index <= lastRevealed; index++) {
351
- const target = list
352
- ?.querySelector(`li[data-item-index="${index}"]`)
353
- ?.querySelector("a:not([aria-disabled='true']), button:not(:disabled)");
354
- if (target) {
355
- target.focus();
356
- return;
357
- }
358
- }
359
- list?.querySelector("a:not([aria-disabled='true']), button:not(:disabled)")?.focus();
360
- }
361
- }, { injector: this.#injector });
362
- }
363
- listItemClass(current) {
364
- return breadcrumbListItemWrapperThemeVariants({ current });
365
- }
366
- onItemClick(item, event) {
367
- if (!item.effectiveDisabled()) {
368
- item.itemClick.emit(event);
369
- }
370
- }
371
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
372
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: BreadcrumbComponent, isStandalone: true, selector: "mona-breadcrumb", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, lastItemCurrent: { classPropertyName: "lastItemCurrent", publicName: "lastItemCurrent", isSignal: true, isRequired: false, transformFunction: null }, maxItems: { classPropertyName: "maxItems", publicName: "maxItems", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-label": "hasItems() ? ariaLabel() || messages().breadcrumb : null", "attr.role": "hasItems() ? 'navigation' : null" }, classAttribute: "block max-w-full min-w-0" }, providers: [{ provide: BREADCRUMB_CONTEXT, useExisting: forwardRef(() => BreadcrumbComponent) }], queries: [{ propertyName: "itemComponents", predicate: BreadcrumbItemComponent, isSignal: true }, { propertyName: "separatorTemplate", first: true, predicate: BreadcrumbSeparatorTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "listElement", first: true, predicate: ["list"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (itemComponents().length > 0) {\n <ol #list role=\"list\" [class]=\"listClass()\">\n @for (entry of entries(); track entry.key) {\n @let item = entry.item;\n @if (item) {\n <li [class]=\"listItemClass(item.current())\" [attr.data-item-index]=\"entry.index\">\n @if (item.link()) {\n <!-- The anchor is the item, with its own classes and aria-current. -->\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n } @else if (item.current()) {\n <span aria-current=\"page\" [class]=\"currentItemClass()\">\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n </span>\n } @else {\n <button\n type=\"button\"\n monaBreadcrumbItem\n [disabled]=\"item.effectiveDisabled()\"\n (click)=\"onItemClick(item, $event)\">\n <span [class]=\"itemContentClass()\">\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n </span>\n </button>\n }\n </li>\n } @else {\n <li class=\"shrink-0\">\n <button\n type=\"button\"\n monaBreadcrumbItem\n data-breadcrumb-expand\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"messages().showFullPath\"\n (click)=\"expand()\">\n <svg lucideEllipsis [size]=\"18\" aria-hidden=\"true\"></svg>\n </button>\n </li>\n }\n\n @if (!$last) {\n <li class=\"shrink-0\" aria-hidden=\"true\" role=\"presentation\">\n @if (separatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"separatorTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: entry.index }\"></ng-container>\n } @else {\n <svg lucideChevronRight [size]=\"18\" class=\"rtl:rotate-180\"></svg>\n }\n </li>\n }\n }\n </ol>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: BreadcrumbItemDirective, selector: "button[monaBreadcrumbItem]", inputs: ["disabled", "class"] }, { kind: "component", type: LucideChevronRight, selector: "svg[lucideChevronRight]" }, { kind: "component", type: LucideEllipsis, selector: "svg[lucideEllipsis], svg[lucideMoreHorizontal]" }] }); }
373
- }
374
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BreadcrumbComponent, decorators: [{
375
- type: Component,
376
- args: [{ selector: "mona-breadcrumb", imports: [NgTemplateOutlet, BreadcrumbItemDirective, LucideChevronRight, LucideEllipsis], providers: [{ provide: BREADCRUMB_CONTEXT, useExisting: forwardRef(() => BreadcrumbComponent) }], host: {
377
- "[attr.aria-label]": "hasItems() ? ariaLabel() || messages().breadcrumb : null",
378
- "[attr.role]": "hasItems() ? 'navigation' : null",
379
- // In a flex parent the host is the flex item, and it would otherwise never get narrower than the trail's text:
380
- // min-w-0 for one that shrinks along its row, max-w-full for one sized to fit across a column.
381
- class: "block max-w-full min-w-0"
382
- }, template: "@if (itemComponents().length > 0) {\n <ol #list role=\"list\" [class]=\"listClass()\">\n @for (entry of entries(); track entry.key) {\n @let item = entry.item;\n @if (item) {\n <li [class]=\"listItemClass(item.current())\" [attr.data-item-index]=\"entry.index\">\n @if (item.link()) {\n <!-- The anchor is the item, with its own classes and aria-current. -->\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n } @else if (item.current()) {\n <span aria-current=\"page\" [class]=\"currentItemClass()\">\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n </span>\n } @else {\n <button\n type=\"button\"\n monaBreadcrumbItem\n [disabled]=\"item.effectiveDisabled()\"\n (click)=\"onItemClick(item, $event)\">\n <span [class]=\"itemContentClass()\">\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n </span>\n </button>\n }\n </li>\n } @else {\n <li class=\"shrink-0\">\n <button\n type=\"button\"\n monaBreadcrumbItem\n data-breadcrumb-expand\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"messages().showFullPath\"\n (click)=\"expand()\">\n <svg lucideEllipsis [size]=\"18\" aria-hidden=\"true\"></svg>\n </button>\n </li>\n }\n\n @if (!$last) {\n <li class=\"shrink-0\" aria-hidden=\"true\" role=\"presentation\">\n @if (separatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"separatorTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: entry.index }\"></ng-container>\n } @else {\n <svg lucideChevronRight [size]=\"18\" class=\"rtl:rotate-180\"></svg>\n }\n </li>\n }\n }\n </ol>\n}\n" }]
383
- }], propDecorators: { itemComponents: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BreadcrumbItemComponent), { isSignal: true }] }], listElement: [{ type: i0.ViewChild, args: ["list", { isSignal: true }] }], separatorTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BreadcrumbSeparatorTemplateDirective), { ...{
384
- read: TemplateRef
385
- }, isSignal: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], lastItemCurrent: [{ type: i0.Input, args: [{ isSignal: true, alias: "lastItemCurrent", required: false }] }], maxItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxItems", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
386
-
387
- /*
388
- * Public API Surface of @nanahoshi/mona-ui/breadcrumb
389
- */
390
-
391
- /**
392
- * Generated bundle index. Do not edit.
393
- */
394
-
378
+ var BreadcrumbComponent = class BreadcrumbComponent {
379
+ constructor() {
380
+ this.#i18n = inject(MonaI18nService);
381
+ this.#injector = inject(Injector);
382
+ this.currentItemClass = computed(() => {
383
+ return breadcrumbCurrentItemThemeVariants();
384
+ }, ...ngDevMode ? [{ debugName: "currentItemClass" }] : /* istanbul ignore next */ []);
385
+ this.entries = computed(() => {
386
+ const items = this.itemComponents();
387
+ const hidden = this.hiddenCount();
388
+ const entries = [];
389
+ items.forEach((item, index) => {
390
+ if (hidden > 0 && index === 1) entries.push({
391
+ index: hidden,
392
+ item: null,
393
+ key: "expand"
394
+ });
395
+ if (hidden === 0 || index === 0 || index > hidden) entries.push({
396
+ index,
397
+ item,
398
+ key: item
399
+ });
400
+ });
401
+ return entries;
402
+ }, ...ngDevMode ? [{ debugName: "entries" }] : /* istanbul ignore next */ []);
403
+ this.expanded = linkedSignal({
404
+ ...ngDevMode ? { debugName: "expanded" } : /* istanbul ignore next */ {},
405
+ source: () => this.itemComponents(),
406
+ computation: () => false
407
+ });
408
+ this.hasItems = computed(() => this.itemComponents().length > 0, ...ngDevMode ? [{ debugName: "hasItems" }] : /* istanbul ignore next */ []);
409
+ this.hiddenCount = computed(() => {
410
+ const maxItems = this.maxItems();
411
+ const count = this.itemComponents().length;
412
+ if (maxItems === null || this.expanded()) return 0;
413
+ return Math.max(count - Math.max(Math.trunc(maxItems), 2), 0);
414
+ }, ...ngDevMode ? [{ debugName: "hiddenCount" }] : /* istanbul ignore next */ []);
415
+ this.itemComponents = contentChildren(BreadcrumbItemComponent, ...ngDevMode ? [{ debugName: "itemComponents" }] : /* istanbul ignore next */ []);
416
+ this.itemContentClass = computed(() => {
417
+ return breadcrumbItemContentThemeVariants();
418
+ }, ...ngDevMode ? [{ debugName: "itemContentClass" }] : /* istanbul ignore next */ []);
419
+ this.listClass = computed(() => {
420
+ const disabled = this.disabled();
421
+ const userClass = this.userClass();
422
+ const variantClass = breadcrumbListThemeVariants({ disabled });
423
+ return twMerge(variantClass, userClass);
424
+ }, ...ngDevMode ? [{ debugName: "listClass" }] : /* istanbul ignore next */ []);
425
+ this.listElement = viewChild("list", ...ngDevMode ? [{ debugName: "listElement" }] : /* istanbul ignore next */ []);
426
+ this.messages = this.#i18n.componentMessages("breadcrumb", BREADCRUMB_DEFAULT_MESSAGES);
427
+ this.separatorTemplate = contentChild(BreadcrumbSeparatorTemplateDirective, {
428
+ ...ngDevMode ? { debugName: "separatorTemplate" } : /* istanbul ignore next */ {},
429
+ read: TemplateRef
430
+ });
431
+ this.ariaLabel = input("", {
432
+ ...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
433
+ alias: "aria-label"
434
+ });
435
+ this.currentItem = computed(() => {
436
+ return this.lastItemCurrent() ? this.itemComponents().at(-1) ?? null : null;
437
+ }, ...ngDevMode ? [{ debugName: "currentItem" }] : /* istanbul ignore next */ []);
438
+ this.disabled = input(false, {
439
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
440
+ transform: booleanAttribute
441
+ });
442
+ this.lastItemCurrent = input(true, {
443
+ ...ngDevMode ? { debugName: "lastItemCurrent" } : /* istanbul ignore next */ {},
444
+ transform: booleanAttribute
445
+ });
446
+ this.maxItems = input(null, {
447
+ ...ngDevMode ? { debugName: "maxItems" } : /* istanbul ignore next */ {},
448
+ transform: numberOrNull
449
+ });
450
+ this.userClass = input("", {
451
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
452
+ alias: "class"
453
+ });
454
+ }
455
+ #i18n;
456
+ #injector;
457
+ expand() {
458
+ const firstRevealed = 1;
459
+ const lastRevealed = this.hiddenCount();
460
+ this.expanded.set(true);
461
+ afterNextRender({ read: () => {
462
+ const list = this.listElement()?.nativeElement;
463
+ for (let index = firstRevealed; index <= lastRevealed; index++) {
464
+ const target = list?.querySelector(`li[data-item-index="${index}"]`)?.querySelector("a:not([aria-disabled='true']), button:not(:disabled)");
465
+ if (target) {
466
+ target.focus();
467
+ return;
468
+ }
469
+ }
470
+ list?.querySelector("a:not([aria-disabled='true']), button:not(:disabled)")?.focus();
471
+ } }, { injector: this.#injector });
472
+ }
473
+ listItemClass(current) {
474
+ return breadcrumbListItemWrapperThemeVariants({ current });
475
+ }
476
+ onItemClick(item, event) {
477
+ if (!item.effectiveDisabled()) item.itemClick.emit(event);
478
+ }
479
+ static {
480
+ this.ɵfac = i0.ɵɵngDeclareFactory({
481
+ minVersion: "12.0.0",
482
+ version: "22.2.6",
483
+ ngImport: i0,
484
+ type: BreadcrumbComponent,
485
+ deps: [],
486
+ target: i0.ɵɵFactoryTarget.Component
487
+ });
488
+ }
489
+ static {
490
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
491
+ minVersion: "17.0.0",
492
+ version: "22.2.6",
493
+ type: BreadcrumbComponent,
494
+ isStandalone: true,
495
+ selector: "mona-breadcrumb",
496
+ inputs: {
497
+ ariaLabel: {
498
+ classPropertyName: "ariaLabel",
499
+ publicName: "aria-label",
500
+ isSignal: true,
501
+ isRequired: false,
502
+ transformFunction: null
503
+ },
504
+ disabled: {
505
+ classPropertyName: "disabled",
506
+ publicName: "disabled",
507
+ isSignal: true,
508
+ isRequired: false,
509
+ transformFunction: null
510
+ },
511
+ lastItemCurrent: {
512
+ classPropertyName: "lastItemCurrent",
513
+ publicName: "lastItemCurrent",
514
+ isSignal: true,
515
+ isRequired: false,
516
+ transformFunction: null
517
+ },
518
+ maxItems: {
519
+ classPropertyName: "maxItems",
520
+ publicName: "maxItems",
521
+ isSignal: true,
522
+ isRequired: false,
523
+ transformFunction: null
524
+ },
525
+ userClass: {
526
+ classPropertyName: "userClass",
527
+ publicName: "class",
528
+ isSignal: true,
529
+ isRequired: false,
530
+ transformFunction: null
531
+ }
532
+ },
533
+ host: {
534
+ properties: {
535
+ "attr.aria-label": "hasItems() ? ariaLabel() || messages().breadcrumb : null",
536
+ "attr.role": "hasItems() ? 'navigation' : null"
537
+ },
538
+ classAttribute: "block max-w-full min-w-0"
539
+ },
540
+ providers: [{
541
+ provide: BREADCRUMB_CONTEXT,
542
+ useExisting: forwardRef(() => BreadcrumbComponent)
543
+ }],
544
+ queries: [{
545
+ propertyName: "itemComponents",
546
+ predicate: BreadcrumbItemComponent,
547
+ isSignal: true
548
+ }, {
549
+ propertyName: "separatorTemplate",
550
+ first: true,
551
+ predicate: BreadcrumbSeparatorTemplateDirective,
552
+ descendants: true,
553
+ read: TemplateRef,
554
+ isSignal: true
555
+ }],
556
+ viewQueries: [{
557
+ propertyName: "listElement",
558
+ first: true,
559
+ predicate: ["list"],
560
+ descendants: true,
561
+ isSignal: true
562
+ }],
563
+ ngImport: i0,
564
+ template: "@if (itemComponents().length > 0) {\n <ol #list role=\"list\" [class]=\"listClass()\">\n @for (entry of entries(); track entry.key) {\n @let item = entry.item;\n @if (item) {\n <li [class]=\"listItemClass(item.current())\" [attr.data-item-index]=\"entry.index\">\n @if (item.link()) {\n <!-- The anchor is the item, with its own classes and aria-current. -->\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n } @else if (item.current()) {\n <span aria-current=\"page\" [class]=\"currentItemClass()\">\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n </span>\n } @else {\n <button\n type=\"button\"\n monaBreadcrumbItem\n [disabled]=\"item.effectiveDisabled()\"\n (click)=\"onItemClick(item, $event)\">\n <span [class]=\"itemContentClass()\">\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n </span>\n </button>\n }\n </li>\n } @else {\n <li class=\"shrink-0\">\n <button\n type=\"button\"\n monaBreadcrumbItem\n data-breadcrumb-expand\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"messages().showFullPath\"\n (click)=\"expand()\">\n <svg lucideEllipsis [size]=\"18\" aria-hidden=\"true\"></svg>\n </button>\n </li>\n }\n\n @if (!$last) {\n <li class=\"shrink-0\" aria-hidden=\"true\" role=\"presentation\">\n @if (separatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"separatorTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: entry.index }\"></ng-container>\n } @else {\n <svg lucideChevronRight [size]=\"18\" class=\"rtl:rotate-180\"></svg>\n }\n </li>\n }\n }\n </ol>\n}\n",
565
+ dependencies: [
566
+ {
567
+ kind: "directive",
568
+ type: NgTemplateOutlet,
569
+ selector: "[ngTemplateOutlet]",
570
+ inputs: [
571
+ "ngTemplateOutletContext",
572
+ "ngTemplateOutlet",
573
+ "ngTemplateOutletInjector"
574
+ ]
575
+ },
576
+ {
577
+ kind: "directive",
578
+ type: BreadcrumbItemDirective,
579
+ selector: "button[monaBreadcrumbItem]",
580
+ inputs: ["disabled", "class"]
581
+ },
582
+ {
583
+ kind: "component",
584
+ type: LucideChevronRight,
585
+ selector: "svg[lucideChevronRight]"
586
+ },
587
+ {
588
+ kind: "component",
589
+ type: LucideEllipsis,
590
+ selector: "svg[lucideEllipsis], svg[lucideMoreHorizontal]"
591
+ }
592
+ ]
593
+ });
594
+ }
595
+ };
596
+ i0.ɵɵngDeclareClassMetadata({
597
+ minVersion: "12.0.0",
598
+ version: "22.2.6",
599
+ ngImport: i0,
600
+ type: BreadcrumbComponent,
601
+ decorators: [{
602
+ type: Component,
603
+ args: [{
604
+ selector: "mona-breadcrumb",
605
+ imports: [
606
+ NgTemplateOutlet,
607
+ BreadcrumbItemDirective,
608
+ LucideChevronRight,
609
+ LucideEllipsis
610
+ ],
611
+ providers: [{
612
+ provide: BREADCRUMB_CONTEXT,
613
+ useExisting: forwardRef(() => BreadcrumbComponent)
614
+ }],
615
+ host: {
616
+ "[attr.aria-label]": "hasItems() ? ariaLabel() || messages().breadcrumb : null",
617
+ "[attr.role]": "hasItems() ? 'navigation' : null",
618
+ class: "block max-w-full min-w-0"
619
+ },
620
+ template: "@if (itemComponents().length > 0) {\n <ol #list role=\"list\" [class]=\"listClass()\">\n @for (entry of entries(); track entry.key) {\n @let item = entry.item;\n @if (item) {\n <li [class]=\"listItemClass(item.current())\" [attr.data-item-index]=\"entry.index\">\n @if (item.link()) {\n <!-- The anchor is the item, with its own classes and aria-current. -->\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n } @else if (item.current()) {\n <span aria-current=\"page\" [class]=\"currentItemClass()\">\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n </span>\n } @else {\n <button\n type=\"button\"\n monaBreadcrumbItem\n [disabled]=\"item.effectiveDisabled()\"\n (click)=\"onItemClick(item, $event)\">\n <span [class]=\"itemContentClass()\">\n <ng-container [ngTemplateOutlet]=\"item.templateRef()\"></ng-container>\n </span>\n </button>\n }\n </li>\n } @else {\n <li class=\"shrink-0\">\n <button\n type=\"button\"\n monaBreadcrumbItem\n data-breadcrumb-expand\n [disabled]=\"disabled()\"\n [attr.aria-label]=\"messages().showFullPath\"\n (click)=\"expand()\">\n <svg lucideEllipsis [size]=\"18\" aria-hidden=\"true\"></svg>\n </button>\n </li>\n }\n\n @if (!$last) {\n <li class=\"shrink-0\" aria-hidden=\"true\" role=\"presentation\">\n @if (separatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"separatorTemplate()\"\n [ngTemplateOutletContext]=\"{ $implicit: entry.index }\"></ng-container>\n } @else {\n <svg lucideChevronRight [size]=\"18\" class=\"rtl:rotate-180\"></svg>\n }\n </li>\n }\n }\n </ol>\n}\n"
621
+ }]
622
+ }],
623
+ propDecorators: {
624
+ itemComponents: [{
625
+ type: i0.ContentChildren,
626
+ args: [i0.forwardRef(() => BreadcrumbItemComponent), { isSignal: true }]
627
+ }],
628
+ listElement: [{
629
+ type: i0.ViewChild,
630
+ args: ["list", { isSignal: true }]
631
+ }],
632
+ separatorTemplate: [{
633
+ type: i0.ContentChild,
634
+ args: [i0.forwardRef(() => BreadcrumbSeparatorTemplateDirective), {
635
+ read: TemplateRef,
636
+ isSignal: true
637
+ }]
638
+ }],
639
+ ariaLabel: [{
640
+ type: i0.Input,
641
+ args: [{
642
+ isSignal: true,
643
+ alias: "aria-label",
644
+ required: false
645
+ }]
646
+ }],
647
+ disabled: [{
648
+ type: i0.Input,
649
+ args: [{
650
+ isSignal: true,
651
+ alias: "disabled",
652
+ required: false
653
+ }]
654
+ }],
655
+ lastItemCurrent: [{
656
+ type: i0.Input,
657
+ args: [{
658
+ isSignal: true,
659
+ alias: "lastItemCurrent",
660
+ required: false
661
+ }]
662
+ }],
663
+ maxItems: [{
664
+ type: i0.Input,
665
+ args: [{
666
+ isSignal: true,
667
+ alias: "maxItems",
668
+ required: false
669
+ }]
670
+ }],
671
+ userClass: [{
672
+ type: i0.Input,
673
+ args: [{
674
+ isSignal: true,
675
+ alias: "class",
676
+ required: false
677
+ }]
678
+ }]
679
+ }
680
+ });
395
681
  export { BREADCRUMB_DEFAULT_MESSAGES, BreadcrumbComponent, BreadcrumbItemComponent, BreadcrumbLinkDirective, BreadcrumbSeparatorTemplateDirective };
396
- //# sourceMappingURL=nanahoshi-mona-ui-breadcrumb.mjs.map
682
+
683
+ //# sourceMappingURL=nanahoshi-mona-ui-breadcrumb.mjs.map