@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,587 +1,808 @@
1
- import { PreventableEvent } from '@nanahoshi/mona-ui/common';
2
- import * as i0 from '@angular/core';
3
- import { Directive, computed, input, inject, signal, contentChild, TemplateRef, viewChildren, booleanAttribute, model, output, effect, Component } from '@angular/core';
4
- import { NgTemplateOutlet } from '@angular/common';
5
- import { LucideCheck, LucideCircleAlert } from '@lucide/angular';
6
- import { select } from '@mirei/ts-collections';
7
- import { formatNumber, injectComponentDirection, MonaI18nService } from '@nanahoshi/mona-ui/i18n';
8
- import { createElementControlId } from '@nanahoshi/mona-ui/internal';
9
- import { cva } from 'class-variance-authority';
10
-
11
- /**
12
- * What `mona-stepper` reports before a click or key changes the step. Call `preventDefault()` to stay on the current step.
13
- */
14
- class StepSelectEvent extends PreventableEvent {
15
- #index;
16
- #previousIndex;
17
- #step;
18
- constructor(index, previousIndex, step, originalEvent) {
19
- super("stepSelect", originalEvent);
20
- this.#index = index;
21
- this.#previousIndex = previousIndex;
22
- this.#step = step;
23
- }
24
- /** Zero-based index of the step being selected. */
25
- get index() {
26
- return this.#index;
27
- }
28
- /** Zero-based index of the step that is current now. */
29
- get previousIndex() {
30
- return this.#previousIndex;
31
- }
32
- /** The options of the step being selected. */
33
- get step() {
34
- return this.#step;
35
- }
36
- }
37
-
38
- /**
39
- * Marks an ng-template as the custom indicator template for mona-stepper.
40
- * The template context provides the step options, index, active state, and current step index.
41
- */
42
- class StepperIndicatorTemplateDirective {
43
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: StepperIndicatorTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
44
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: StepperIndicatorTemplateDirective, isStandalone: true, selector: "ng-template[monaStepperIndicatorTemplate]", ngImport: i0 }); }
45
- }
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: StepperIndicatorTemplateDirective, decorators: [{
47
- type: Directive,
48
- args: [{
49
- selector: "ng-template[monaStepperIndicatorTemplate]"
50
- }]
51
- }] });
52
-
53
- /**
54
- * Marks an ng-template as the custom label template for mona-stepper.
55
- * The template context provides the step options, index, active state, and current step index.
56
- */
57
- class StepperLabelTemplateDirective {
58
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: StepperLabelTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
59
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: StepperLabelTemplateDirective, isStandalone: true, selector: "ng-template[monaStepperLabelTemplate]", ngImport: i0 }); }
60
- }
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: StepperLabelTemplateDirective, decorators: [{
62
- type: Directive,
63
- args: [{
64
- selector: "ng-template[monaStepperLabelTemplate]"
65
- }]
66
- }] });
67
-
68
- /**
69
- * Marks an ng-template as the custom step template for mona-stepper.
70
- * When provided, this template replaces the entire default step indicator and label for each step.
71
- * The template context provides the step options, index, active state, and current step index.
72
- */
73
- class StepperStepTemplateDirective {
74
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: StepperStepTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
75
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: StepperStepTemplateDirective, isStandalone: true, selector: "ng-template[monaStepperStepTemplate]", ngImport: i0 }); }
76
- }
77
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: StepperStepTemplateDirective, decorators: [{
78
- type: Directive,
79
- args: [{
80
- selector: "ng-template[monaStepperStepTemplate]"
81
- }]
82
- }] });
83
-
1
+ import { PreventableEvent } from "@nanahoshi/mona-ui/common";
2
+ import * as i0 from "@angular/core";
3
+ import { Component, Directive, TemplateRef, booleanAttribute, computed, contentChild, effect, inject, input, model, output, signal, viewChildren } from "@angular/core";
4
+ import { NgTemplateOutlet } from "@angular/common";
5
+ import { LucideCheck, LucideCircleAlert } from "@lucide/angular";
6
+ import { select } from "@mirei/ts-collections";
7
+ import { MonaI18nService, formatNumber, injectComponentDirection } from "@nanahoshi/mona-ui/i18n";
8
+ import { createElementControlId } from "@nanahoshi/mona-ui/internal";
9
+ import { cva } from "class-variance-authority";
10
+ var StepSelectEvent = class extends PreventableEvent {
11
+ #index;
12
+ #previousIndex;
13
+ #step;
14
+ constructor(index, previousIndex, step, originalEvent) {
15
+ super("stepSelect", originalEvent);
16
+ this.#index = index;
17
+ this.#previousIndex = previousIndex;
18
+ this.#step = step;
19
+ }
20
+ get index() {
21
+ return this.#index;
22
+ }
23
+ get previousIndex() {
24
+ return this.#previousIndex;
25
+ }
26
+ get step() {
27
+ return this.#step;
28
+ }
29
+ };
30
+ var StepperIndicatorTemplateDirective = class StepperIndicatorTemplateDirective {
31
+ static {
32
+ this.ɵfac = i0.ɵɵngDeclareFactory({
33
+ minVersion: "12.0.0",
34
+ version: "22.2.6",
35
+ ngImport: i0,
36
+ type: StepperIndicatorTemplateDirective,
37
+ deps: [],
38
+ target: i0.ɵɵFactoryTarget.Directive
39
+ });
40
+ }
41
+ static {
42
+ this.ɵdir = i0.ɵɵngDeclareDirective({
43
+ minVersion: "14.0.0",
44
+ version: "22.2.6",
45
+ type: StepperIndicatorTemplateDirective,
46
+ isStandalone: true,
47
+ selector: "ng-template[monaStepperIndicatorTemplate]",
48
+ ngImport: i0
49
+ });
50
+ }
51
+ };
52
+ i0.ɵɵngDeclareClassMetadata({
53
+ minVersion: "12.0.0",
54
+ version: "22.2.6",
55
+ ngImport: i0,
56
+ type: StepperIndicatorTemplateDirective,
57
+ decorators: [{
58
+ type: Directive,
59
+ args: [{ selector: "ng-template[monaStepperIndicatorTemplate]" }]
60
+ }]
61
+ });
62
+ var StepperLabelTemplateDirective = class StepperLabelTemplateDirective {
63
+ static {
64
+ this.ɵfac = i0.ɵɵngDeclareFactory({
65
+ minVersion: "12.0.0",
66
+ version: "22.2.6",
67
+ ngImport: i0,
68
+ type: StepperLabelTemplateDirective,
69
+ deps: [],
70
+ target: i0.ɵɵFactoryTarget.Directive
71
+ });
72
+ }
73
+ static {
74
+ this.ɵdir = i0.ɵɵngDeclareDirective({
75
+ minVersion: "14.0.0",
76
+ version: "22.2.6",
77
+ type: StepperLabelTemplateDirective,
78
+ isStandalone: true,
79
+ selector: "ng-template[monaStepperLabelTemplate]",
80
+ ngImport: i0
81
+ });
82
+ }
83
+ };
84
+ i0.ɵɵngDeclareClassMetadata({
85
+ minVersion: "12.0.0",
86
+ version: "22.2.6",
87
+ ngImport: i0,
88
+ type: StepperLabelTemplateDirective,
89
+ decorators: [{
90
+ type: Directive,
91
+ args: [{ selector: "ng-template[monaStepperLabelTemplate]" }]
92
+ }]
93
+ });
94
+ var StepperStepTemplateDirective = class StepperStepTemplateDirective {
95
+ static {
96
+ this.ɵfac = i0.ɵɵngDeclareFactory({
97
+ minVersion: "12.0.0",
98
+ version: "22.2.6",
99
+ ngImport: i0,
100
+ type: StepperStepTemplateDirective,
101
+ deps: [],
102
+ target: i0.ɵɵFactoryTarget.Directive
103
+ });
104
+ }
105
+ static {
106
+ this.ɵdir = i0.ɵɵngDeclareDirective({
107
+ minVersion: "14.0.0",
108
+ version: "22.2.6",
109
+ type: StepperStepTemplateDirective,
110
+ isStandalone: true,
111
+ selector: "ng-template[monaStepperStepTemplate]",
112
+ ngImport: i0
113
+ });
114
+ }
115
+ };
116
+ i0.ɵɵngDeclareClassMetadata({
117
+ minVersion: "12.0.0",
118
+ version: "22.2.6",
119
+ ngImport: i0,
120
+ type: StepperStepTemplateDirective,
121
+ decorators: [{
122
+ type: Directive,
123
+ args: [{ selector: "ng-template[monaStepperStepTemplate]" }]
124
+ }]
125
+ });
84
126
  const stepperBaseThemeVariants = cva(`
85
127
  relative
86
128
  `, {
87
- variants: {
88
- orientation: {
89
- horizontal: "grid h-auto w-full",
90
- // A flex row stretches the step list to the stepper's height.
91
- vertical: "flex h-full w-auto"
92
- }
93
- },
94
- defaultVariants: {
95
- orientation: "horizontal"
96
- }
129
+ variants: { orientation: {
130
+ horizontal: "grid h-auto w-full",
131
+ vertical: "flex h-full w-auto"
132
+ } },
133
+ defaultVariants: { orientation: "horizontal" }
97
134
  });
98
- /** The list is in the flow, so the stepper's box holds the indicators and labels. The track is drawn behind it. */
99
135
  const stepperStepListThemeVariants = cva(`
100
136
  relative z-1 col-span-full flex list-none
101
137
  font-medium
102
138
  `, {
103
- variants: {
104
- orientation: {
105
- horizontal: "w-full flex-row",
106
- vertical: "w-max flex-col"
107
- }
108
- },
109
- defaultVariants: {
110
- orientation: "horizontal"
111
- }
139
+ variants: { orientation: {
140
+ horizontal: "w-full flex-row",
141
+ vertical: "w-max flex-col"
142
+ } },
143
+ defaultVariants: { orientation: "horizontal" }
112
144
  });
113
145
  const stepperStepListItemThemeVariants = cva(`
114
146
  z-1 flex grow-1 shrink-0 basis-auto items-center
115
147
  `, {
116
- variants: {
117
- orientation: {
118
- horizontal: "flex-col gap-2",
119
- vertical: "flex-row justify-start gap-2"
120
- }
121
- },
122
- defaultVariants: {
123
- orientation: "horizontal"
124
- }
148
+ variants: { orientation: {
149
+ horizontal: "flex-col gap-2",
150
+ vertical: "flex-row justify-start gap-2"
151
+ } },
152
+ defaultVariants: { orientation: "horizontal" }
125
153
  });
126
154
  const stepperStepIndicatorThemeVariants = cva(`
127
155
  flex h-8 w-8 items-center justify-center
128
156
  border border-border cursor-[inherit]
129
157
  transition-colors duration-(--mona-motion-standard) ease-in-out
130
158
  focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-focus-indicator
131
- `, {
132
- variants: {
133
- invalid: {
134
- true: "border-2 border-error",
135
- false: ""
136
- },
137
- state: {
138
- completed: `
159
+ `, { variants: {
160
+ invalid: {
161
+ true: "border-2 border-error",
162
+ false: ""
163
+ },
164
+ state: {
165
+ completed: `
139
166
  bg-[var(--mona-indicator-color,var(--color-primary))]
140
167
  text-[var(--mona-indicator-foreground,var(--color-primary-foreground))]
141
168
  forced-colors:border-[Highlight]
142
169
  `,
143
- current: `
170
+ current: `
144
171
  bg-[var(--mona-indicator-color,var(--color-primary))]
145
172
  text-[var(--mona-indicator-foreground,var(--color-primary-foreground))]
146
173
  ring-2 ring-primary ring-offset-2 ring-offset-surface
147
174
  forced-colors:border-2 forced-colors:border-[Highlight]
148
175
  `,
149
- disabled: "border-dashed bg-surface-muted text-disabled-foreground",
150
- upcoming: "bg-surface-raised text-foreground"
151
- },
152
- rounded: {
153
- small: "rounded-sm",
154
- medium: "rounded-md",
155
- large: "rounded-lg",
156
- full: "rounded-full",
157
- none: "rounded-none"
158
- }
159
- }
160
- });
161
- /** The button around a `monaStepperStepTemplate`, whose looks are the template's. */
176
+ disabled: "border-dashed bg-surface-muted text-disabled-foreground",
177
+ upcoming: "bg-surface-raised text-foreground"
178
+ },
179
+ rounded: {
180
+ small: "rounded-sm",
181
+ medium: "rounded-md",
182
+ large: "rounded-lg",
183
+ full: "rounded-full",
184
+ none: "rounded-none"
185
+ }
186
+ } });
162
187
  const stepperStepButtonThemeVariants = cva(`
163
188
  cursor-[inherit] rounded-sm
164
189
  focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus-indicator
165
190
  `);
166
- const stepperStepLabelThemeVariants = cva("", {
167
- variants: {
168
- state: {
169
- completed: "",
170
- current: "font-semibold",
171
- disabled: "text-disabled-foreground",
172
- upcoming: ""
173
- }
174
- }
175
- });
176
- /** Placed by the component, from the first indicator's centre to the last one's. */
191
+ const stepperStepLabelThemeVariants = cva("", { variants: { state: {
192
+ completed: "",
193
+ current: "font-semibold",
194
+ disabled: "text-disabled-foreground",
195
+ upcoming: ""
196
+ } } });
177
197
  const stepperTrackThemeVariants = cva(`
178
198
  absolute
179
199
  bg-surface-muted text-foreground
180
200
  border border-border-subtle
181
201
  `, {
182
- variants: {
183
- orientation: {
184
- horizontal: "h-2",
185
- vertical: "w-2"
186
- }
187
- },
188
- defaultVariants: {
189
- orientation: "horizontal"
190
- }
202
+ variants: { orientation: {
203
+ horizontal: "h-2",
204
+ vertical: "w-2"
205
+ } },
206
+ defaultVariants: { orientation: "horizontal" }
191
207
  });
192
208
  const stepperTrackLineThemeVariants = cva(`
193
209
  absolute start-0 top-0 bg-[var(--mona-indicator-color,var(--color-primary))]
194
210
  `, {
195
- variants: {
196
- orientation: {
197
- horizontal: "h-full transition-width duration-(--mona-motion-standard) ease-out",
198
- vertical: "w-full transition-height duration-(--mona-motion-standard) ease-out"
199
- }
200
- },
201
- defaultVariants: {
202
- orientation: "horizontal"
203
- }
211
+ variants: { orientation: {
212
+ horizontal: "h-full transition-width duration-(--mona-motion-standard) ease-out",
213
+ vertical: "w-full transition-height duration-(--mona-motion-standard) ease-out"
214
+ } },
215
+ defaultVariants: { orientation: "horizontal" }
216
+ });
217
+ var StepperIndicatorDirective = class StepperIndicatorDirective {
218
+ constructor() {
219
+ this.stepIndicatorClass = computed(() => {
220
+ const invalid = this.invalid();
221
+ const rounded = this.rounded();
222
+ const state = this.state();
223
+ return stepperStepIndicatorThemeVariants({
224
+ invalid,
225
+ rounded,
226
+ state
227
+ });
228
+ }, ...ngDevMode ? [{ debugName: "stepIndicatorClass" }] : /* istanbul ignore next */ []);
229
+ this.invalid = input.required(...ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []);
230
+ this.rounded = input.required(...ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []);
231
+ this.state = input.required(...ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []);
232
+ }
233
+ static {
234
+ this.ɵfac = i0.ɵɵngDeclareFactory({
235
+ minVersion: "12.0.0",
236
+ version: "22.2.6",
237
+ ngImport: i0,
238
+ type: StepperIndicatorDirective,
239
+ deps: [],
240
+ target: i0.ɵɵFactoryTarget.Directive
241
+ });
242
+ }
243
+ static {
244
+ this.ɵdir = i0.ɵɵngDeclareDirective({
245
+ minVersion: "17.1.0",
246
+ version: "22.2.6",
247
+ type: StepperIndicatorDirective,
248
+ isStandalone: true,
249
+ selector: "button[monaStepperIndicator]",
250
+ inputs: {
251
+ invalid: {
252
+ classPropertyName: "invalid",
253
+ publicName: "invalid",
254
+ isSignal: true,
255
+ isRequired: true,
256
+ transformFunction: null
257
+ },
258
+ rounded: {
259
+ classPropertyName: "rounded",
260
+ publicName: "rounded",
261
+ isSignal: true,
262
+ isRequired: true,
263
+ transformFunction: null
264
+ },
265
+ state: {
266
+ classPropertyName: "state",
267
+ publicName: "state",
268
+ isSignal: true,
269
+ isRequired: true,
270
+ transformFunction: null
271
+ }
272
+ },
273
+ host: { properties: { "class": "stepIndicatorClass()" } },
274
+ ngImport: i0
275
+ });
276
+ }
277
+ };
278
+ i0.ɵɵngDeclareClassMetadata({
279
+ minVersion: "12.0.0",
280
+ version: "22.2.6",
281
+ ngImport: i0,
282
+ type: StepperIndicatorDirective,
283
+ decorators: [{
284
+ type: Directive,
285
+ args: [{
286
+ selector: "button[monaStepperIndicator]",
287
+ host: { "[class]": "stepIndicatorClass()" }
288
+ }]
289
+ }],
290
+ propDecorators: {
291
+ invalid: [{
292
+ type: i0.Input,
293
+ args: [{
294
+ isSignal: true,
295
+ alias: "invalid",
296
+ required: true
297
+ }]
298
+ }],
299
+ rounded: [{
300
+ type: i0.Input,
301
+ args: [{
302
+ isSignal: true,
303
+ alias: "rounded",
304
+ required: true
305
+ }]
306
+ }],
307
+ state: [{
308
+ type: i0.Input,
309
+ args: [{
310
+ isSignal: true,
311
+ alias: "state",
312
+ required: true
313
+ }]
314
+ }]
315
+ }
204
316
  });
205
-
206
- class StepperIndicatorDirective {
207
- constructor() {
208
- this.stepIndicatorClass = computed(() => {
209
- const invalid = this.invalid();
210
- const rounded = this.rounded();
211
- const state = this.state();
212
- return stepperStepIndicatorThemeVariants({ invalid, rounded, state });
213
- }, /* @ts-ignore */
214
- ...(ngDevMode ? [{ debugName: "stepIndicatorClass" }] : /* istanbul ignore next */ []));
215
- this.invalid = input.required(/* @ts-ignore */
216
- ...(ngDevMode ? [{ debugName: "invalid" }] : /* istanbul ignore next */ []));
217
- this.rounded = input.required(/* @ts-ignore */
218
- ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
219
- this.state = input.required(/* @ts-ignore */
220
- ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
221
- }
222
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: StepperIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
223
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: StepperIndicatorDirective, isStandalone: true, selector: "button[monaStepperIndicator]", inputs: { invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: true, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: true, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "class": "stepIndicatorClass()" } }, ngImport: i0 }); }
224
- }
225
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: StepperIndicatorDirective, decorators: [{
226
- type: Directive,
227
- args: [{
228
- selector: "button[monaStepperIndicator]",
229
- host: {
230
- "[class]": "stepIndicatorClass()"
231
- }
232
- }]
233
- }], propDecorators: { invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: true }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: true }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: true }] }] } });
234
-
235
- // Generated from i18n/catalogs/en-US.messages.json by scripts/generate-locale-catalogs.ts. Do not edit.
236
- // Edit the JSON file and run `npm run generate:locale-catalogs`.
237
317
  function localizeNumber(value, options) {
238
- return formatNumber(value, "en-US", options);
318
+ return formatNumber(value, "en-US", options);
239
319
  }
240
320
  const STEPPER_DEFAULT_MESSAGES = {
241
- stepCompleted: "Completed",
242
- stepInvalid: "Has errors",
243
- stepPosition: (current, total) => `Step ${localizeNumber(current)} of ${localizeNumber(total)}`,
244
- stepProgress: "Step progress",
245
- stepper: "Progress"
321
+ stepCompleted: "Completed",
322
+ stepInvalid: "Has errors",
323
+ stepPosition: (current, total) => `Step ${localizeNumber(current)} of ${localizeNumber(total)}`,
324
+ stepProgress: "Step progress",
325
+ stepper: "Progress"
246
326
  };
247
-
248
- /** What in a label or step template keeps its own clicks. */
249
327
  const PROJECTED_CONTROL_SELECTOR = "a[href], button, input, select, summary, textarea, [contenteditable], [tabindex]";
250
- class StepperComponent {
251
- /** The nearest steps on either side of the current one that aren't disabled: all that a linear stepper can reach. */
252
- #adjacentEnabledSteps;
253
- #direction;
254
- #i18n;
255
- #id;
256
- #trackItemSize;
257
- #trackLength;
258
- constructor() {
259
- /** The nearest steps on either side of the current one that aren't disabled: all that a linear stepper can reach. */
260
- this.#adjacentEnabledSteps = computed(() => {
261
- const active = this.activeStep();
262
- const enabled = this.viewSteps()
263
- .toArray()
264
- .filter(step => !step.options.disabled);
265
- if (!active) {
266
- return { next: undefined, previous: undefined };
267
- }
268
- return {
269
- next: enabled.find(step => step.index > active.index),
270
- previous: enabled.filter(step => step.index < active.index).pop()
271
- };
272
- }, /* @ts-ignore */
273
- ...(ngDevMode ? [{ debugName: "#adjacentEnabledSteps" }] : /* istanbul ignore next */ []));
274
- this.#direction = injectComponentDirection();
275
- this.#i18n = inject(MonaI18nService);
276
- this.#id = createElementControlId();
277
- this.#trackItemSize = computed(() => {
278
- const stepCount = this.viewSteps().length;
279
- return stepCount !== 0 ? 100 / stepCount : 0;
280
- }, /* @ts-ignore */
281
- ...(ngDevMode ? [{ debugName: "#trackItemSize" }] : /* istanbul ignore next */ []));
282
- this.#trackLength = computed(() => {
283
- const step = this.activeStep();
284
- const stepCount = this.viewSteps().length;
285
- return step && stepCount > 1 ? `${(100 / (stepCount - 1)) * step.index}%` : "0%";
286
- }, /* @ts-ignore */
287
- ...(ngDevMode ? [{ debugName: "#trackLength" }] : /* istanbul ignore next */ []));
288
- this.activeStep = computed(() => {
289
- const steps = this.viewSteps();
290
- if (steps.length === 0) {
291
- return undefined;
292
- }
293
- return steps.elementAt(this.normalizeIndex(this.step(), steps.length));
294
- }, /* @ts-ignore */
295
- ...(ngDevMode ? [{ debugName: "activeStep" }] : /* istanbul ignore next */ []));
296
- this.baseClass = computed(() => {
297
- const orientation = this.orientation();
298
- return stepperBaseThemeVariants({ orientation });
299
- }, /* @ts-ignore */
300
- ...(ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []));
301
- this.highlightedStep = signal(0, /* @ts-ignore */
302
- ...(ngDevMode ? [{ debugName: "highlightedStep" }] : /* istanbul ignore next */ []));
303
- this.hostStyles = computed(() => {
304
- const orientation = this.orientation();
305
- const stepCount = this.viewSteps().length;
306
- return {
307
- gridTemplateColumns: orientation === "horizontal" ? `repeat(${stepCount * 2}, 1fr)` : undefined,
308
- gridTemplateRows: orientation === "vertical" ? `repeat(${stepCount * 2}, 1fr)` : undefined
309
- };
310
- }, /* @ts-ignore */
311
- ...(ngDevMode ? [{ debugName: "hostStyles" }] : /* istanbul ignore next */ []));
312
- this.indicatorTemplate = contentChild(StepperIndicatorTemplateDirective, {
313
- read: TemplateRef
314
- });
315
- this.isRtl = computed(() => this.#direction() === "rtl", /* @ts-ignore */
316
- ...(ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []));
317
- this.labelTemplate = contentChild(StepperLabelTemplateDirective, { read: TemplateRef });
318
- this.listClass = computed(() => {
319
- const orientation = this.orientation();
320
- return stepperStepListThemeVariants({ orientation });
321
- }, /* @ts-ignore */
322
- ...(ngDevMode ? [{ debugName: "listClass" }] : /* istanbul ignore next */ []));
323
- this.listItemClass = computed(() => {
324
- const orientation = this.orientation();
325
- return stepperStepListItemThemeVariants({ orientation });
326
- }, /* @ts-ignore */
327
- ...(ngDevMode ? [{ debugName: "listItemClass" }] : /* istanbul ignore next */ []));
328
- this.messages = this.#i18n.componentMessages("stepper", STEPPER_DEFAULT_MESSAGES);
329
- this.progressMax = computed(() => Math.max(this.viewSteps().length - 1, 0), /* @ts-ignore */
330
- ...(ngDevMode ? [{ debugName: "progressMax" }] : /* istanbul ignore next */ []));
331
- this.progressText = computed(() => {
332
- const active = this.activeStep();
333
- return active ? this.positionText(active.index + 1) : null;
334
- }, /* @ts-ignore */
335
- ...(ngDevMode ? [{ debugName: "progressText" }] : /* istanbul ignore next */ []));
336
- this.stepButtonClass = computed(() => {
337
- return stepperStepButtonThemeVariants();
338
- }, /* @ts-ignore */
339
- ...(ngDevMode ? [{ debugName: "stepButtonClass" }] : /* istanbul ignore next */ []));
340
- this.stepButtons = viewChildren("stepButton", /* @ts-ignore */
341
- ...(ngDevMode ? [{ debugName: "stepButtons" }] : /* istanbul ignore next */ []));
342
- this.stepTemplate = contentChild(StepperStepTemplateDirective, {
343
- read: TemplateRef
344
- });
345
- this.trackClass = computed(() => {
346
- const orientation = this.orientation();
347
- return stepperTrackThemeVariants({ orientation });
348
- }, /* @ts-ignore */
349
- ...(ngDevMode ? [{ debugName: "trackClass" }] : /* istanbul ignore next */ []));
350
- this.trackInnerStyles = computed(() => {
351
- const orientation = this.orientation();
352
- const length = this.#trackLength();
353
- return {
354
- [orientation === "horizontal" ? "width" : "height"]: length
355
- };
356
- }, /* @ts-ignore */
357
- ...(ngDevMode ? [{ debugName: "trackInnerStyles" }] : /* istanbul ignore next */ []));
358
- this.trackItemStyles = computed(() => {
359
- const orientation = this.orientation();
360
- const itemSize = this.#trackItemSize();
361
- return {
362
- [orientation === "horizontal" ? "maxWidth" : "maxHeight"]: `${itemSize}%`
363
- };
364
- }, /* @ts-ignore */
365
- ...(ngDevMode ? [{ debugName: "trackItemStyles" }] : /* istanbul ignore next */ []));
366
- this.trackLineClass = computed(() => {
367
- const orientation = this.orientation();
368
- return stepperTrackLineThemeVariants({ orientation });
369
- }, /* @ts-ignore */
370
- ...(ngDevMode ? [{ debugName: "trackLineClass" }] : /* istanbul ignore next */ []));
371
- this.trackStyles = computed(() => {
372
- // Each step takes an equal share, with its indicator centred in it along the track. Across it, the 2rem
373
- // indicator's centre is 1rem in, and the 0.5rem track is centred on that.
374
- const edge = `${this.#trackItemSize() / 2}%`;
375
- return this.orientation() === "horizontal"
376
- ? { insetInlineEnd: edge, insetInlineStart: edge, top: "0.75rem" }
377
- : { bottom: edge, insetInlineStart: "0.75rem", top: edge };
378
- }, /* @ts-ignore */
379
- ...(ngDevMode ? [{ debugName: "trackStyles" }] : /* istanbul ignore next */ []));
380
- this.viewSteps = computed(() => {
381
- const steps = this.steps();
382
- return select(steps, (step, index) => ({
383
- options: step,
384
- index
385
- })).toImmutableSet();
386
- }, /* @ts-ignore */
387
- ...(ngDevMode ? [{ debugName: "viewSteps" }] : /* istanbul ignore next */ []));
388
- /**
389
- * @description Sets the accessible label for the stepper group.
390
- * @default ""
391
- */
392
- this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
393
- /**
394
- * @description Sets the flow of the stepper.
395
- * If set to true, the user will only be able to navigate to the previous or the next step.
396
- * @default true
397
- */
398
- this.linear = input(true, { ...(ngDevMode ? { debugName: "linear" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
399
- /**
400
- * @description Sets the orientation of the stepper.
401
- */
402
- this.orientation = input("horizontal", /* @ts-ignore */
403
- ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
404
- /**
405
- * @description Sets the accessible label for the progress bar element.
406
- * @default ""
407
- */
408
- this.progressAriaLabel = input("", /* @ts-ignore */
409
- ...(ngDevMode ? [{ debugName: "progressAriaLabel" }] : /* istanbul ignore next */ []));
410
- /**
411
- * @description Sets the roundness of the stepper steps.
412
- */
413
- this.rounded = input("full", /* @ts-ignore */
414
- ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
415
- /**
416
- * @description Sets the active step of the stepper.
417
- */
418
- this.step = model(0, /* @ts-ignore */
419
- ...(ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []));
420
- /**
421
- * @description Emitted before a click or key changes the step. Call `preventDefault()` to stay on the current step,
422
- * for example while its form is invalid. It doesn't fire when `step` is written from outside.
423
- */
424
- this.stepSelect = output();
425
- /**
426
- * @description Sets the steps of the stepper.
427
- */
428
- this.steps = input([], /* @ts-ignore */
429
- ...(ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []));
430
- effect(() => {
431
- const requested = this.step();
432
- const stepCount = this.viewSteps().length;
433
- if (stepCount === 0) {
434
- return; // Steps may still be on their way, so the value can't be judged yet.
435
- }
436
- const index = this.normalizeIndex(requested, stepCount);
437
- if (index !== requested) {
438
- this.step.set(index);
439
- }
440
- this.highlightedStep.set(index);
441
- });
442
- }
443
- descriptionId(step) {
444
- return `${this.#id}-${step.index}-description`;
445
- }
446
- formatStepNumber(value) {
447
- if (value == null) {
448
- return "";
449
- }
450
- return formatNumber(value, this.#i18n.localeId(), {
451
- maximumFractionDigits: 0,
452
- useGrouping: false
453
- });
454
- }
455
- isStepActive(step) {
456
- const active = this.activeStep();
457
- return active != null && step.index <= active.index;
458
- }
459
- isStepLocked(step) {
460
- if (step.options.disabled) {
461
- return true;
462
- }
463
- if (!this.linear()) {
464
- return false;
465
- }
466
- const active = this.activeStep();
467
- if (!active || step.index === active.index) {
468
- return false;
469
- }
470
- const { next, previous } = this.#adjacentEnabledSteps();
471
- return step.index !== next?.index && step.index !== previous?.index;
472
- }
473
- labelClass(state) {
474
- return stepperStepLabelThemeVariants({ state });
475
- }
476
- onIndicatorFocus(step) {
477
- this.highlightedStep.set(step.index);
478
- }
479
- /**
480
- * Enter and Space aren't here: they reach the step as the click a native button makes of them. Only the step buttons'
481
- * own keys count, so a control in a template keeps its arrows, and a modified key stays the browser's.
482
- */
483
- onKeydown(event) {
484
- if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) {
485
- return;
486
- }
487
- if (!this.stepButtons().some(button => button.nativeElement === event.target)) {
488
- return;
489
- }
490
- const orientation = this.orientation();
491
- const isRtl = this.isRtl();
492
- let previousKey = orientation === "vertical" ? "ArrowUp" : "ArrowLeft";
493
- let nextKey = orientation === "vertical" ? "ArrowDown" : "ArrowRight";
494
- if (orientation === "horizontal" && isRtl) {
495
- previousKey = "ArrowRight";
496
- nextKey = "ArrowLeft";
497
- }
498
- const reachable = this.viewSteps()
499
- .toArray()
500
- .filter(step => !this.isStepLocked(step));
501
- const current = this.highlightedStep();
502
- let target;
503
- if (event.key === previousKey) {
504
- target = reachable.filter(step => step.index < current).pop();
505
- }
506
- else if (event.key === nextKey) {
507
- target = reachable.find(step => step.index > current);
508
- }
509
- else if (event.key === "Home") {
510
- target = reachable[0];
511
- }
512
- else if (event.key === "End") {
513
- target = reachable[reachable.length - 1];
514
- }
515
- else {
516
- return;
517
- }
518
- event.preventDefault();
519
- if (target) {
520
- this.highlightedStep.set(target.index);
521
- this.stepButtons()[target.index]?.nativeElement.focus();
522
- }
523
- }
524
- onStepClick(step, event) {
525
- const control = event.target.closest(PROJECTED_CONTROL_SELECTOR);
526
- if (control && !this.stepButtons().some(button => button.nativeElement === control)) {
527
- return;
528
- }
529
- this.setActiveStep(step, event);
530
- }
531
- positionText(position) {
532
- return this.messages().stepPosition(position, this.viewSteps().length);
533
- }
534
- stepState(step) {
535
- const active = this.activeStep();
536
- if (step.index === active?.index) {
537
- return "current";
538
- }
539
- if (step.options.disabled) {
540
- return "disabled";
541
- }
542
- return (step.options.completed ?? (active != null && step.index < active.index)) ? "completed" : "upcoming";
543
- }
544
- normalizeIndex(value, stepCount) {
545
- return Number.isFinite(value) ? Math.min(Math.max(Math.trunc(value), 0), stepCount - 1) : 0;
546
- }
547
- setActiveStep(step, event) {
548
- const active = this.activeStep();
549
- if (this.isStepLocked(step) || step.index === active?.index) {
550
- return;
551
- }
552
- const selectEvent = new StepSelectEvent(step.index, active?.index ?? 0, step.options, event);
553
- this.stepSelect.emit(selectEvent);
554
- if (selectEvent.isDefaultPrevented()) {
555
- return;
556
- }
557
- this.step.set(step.index);
558
- this.highlightedStep.set(step.index);
559
- }
560
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: StepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
561
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: StepperComponent, isStandalone: true, selector: "mona-stepper", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, progressAriaLabel: { classPropertyName: "progressAriaLabel", publicName: "progressAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, steps: { classPropertyName: "steps", publicName: "steps", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { step: "stepChange", stepSelect: "stepSelect" }, host: { attributes: { "role": "group" }, listeners: { "keydown": "onKeydown($event)" }, properties: { "attr.aria-label": "ariaLabel() || messages().stepper", "class": "baseClass()", "style": "hostStyles()" } }, queries: [{ propertyName: "indicatorTemplate", first: true, predicate: StepperIndicatorTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "labelTemplate", first: true, predicate: StepperLabelTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }, { propertyName: "stepTemplate", first: true, predicate: StepperStepTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "stepButtons", predicate: ["stepButton"], descendants: true, isSignal: true }], ngImport: i0, template: "<ol role=\"list\" [class]=\"listClass()\">\n @for (step of viewSteps(); track step.index) {\n @let active = isStepActive(step);\n @let locked = isStepLocked(step);\n @let state = stepState(step);\n @let invalid = !!step.options.invalid;\n @let options = step.options;\n @let index = step.index;\n @let currentIndex = activeStep()?.index ?? -1;\n @let disabled = !!options.disabled;\n @let focusable = step.index === highlightedStep();\n <li\n [class]=\"listItemClass()\"\n [class.cursor-pointer]=\"!locked\"\n [class.cursor-not-allowed]=\"locked\"\n [style]=\"trackItemStyles()\"\n (click)=\"onStepClick(step, $event)\">\n @if (stepTemplate()) {\n <button\n #stepButton\n type=\"button\"\n [class]=\"stepButtonClass()\"\n [attr.aria-current]=\"state === 'current' ? 'step' : undefined\"\n [attr.aria-describedby]=\"descriptionId(step)\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focusable ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n <ng-container\n [ngTemplateOutlet]=\"stepTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled,\n invalid,\n state\n }\"></ng-container>\n </button>\n } @else {\n <button\n #stepButton\n monaStepperIndicator\n type=\"button\"\n [invalid]=\"invalid\"\n [rounded]=\"rounded()\"\n [state]=\"state\"\n [attr.aria-current]=\"state === 'current' ? 'step' : undefined\"\n [attr.aria-describedby]=\"descriptionId(step)\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focusable ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n @if (indicatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"indicatorTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled,\n invalid,\n state\n }\"></ng-container>\n } @else if (invalid) {\n <svg lucideCircleAlert [size]=\"16\" aria-hidden=\"true\"></svg>\n } @else if (state === \"completed\") {\n <svg lucideCheck [size]=\"16\" aria-hidden=\"true\"></svg>\n } @else {\n {{ formatStepNumber(step.index + 1) }}\n }\n </button>\n }\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled,\n invalid,\n state\n }\"></ng-container>\n } @else {\n <span [class]=\"labelClass(state)\" aria-hidden=\"true\">{{ options.label }}</span>\n }\n </li>\n }\n</ol>\n<!-- Read through aria-describedby, which also works on hidden text. Nothing here is shown or read twice. -->\n<div hidden>\n @for (step of viewSteps(); track step.index) {\n <span [id]=\"descriptionId(step)\">\n <span>{{ positionText(step.index + 1) }}</span>\n @if (stepState(step) === \"completed\") {\n <span> {{ messages().stepCompleted }}</span>\n }\n @if (step.options.invalid) {\n <span> {{ messages().stepInvalid }}</span>\n }\n </span>\n }\n</div>\n<div\n [class]=\"trackClass()\"\n [style]=\"trackStyles()\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"activeStep()?.index ?? 0\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"progressMax()\"\n [attr.aria-valuetext]=\"progressText()\"\n [attr.aria-label]=\"progressAriaLabel() || messages().stepProgress\">\n <div [class]=\"trackLineClass()\" [style]=\"trackInnerStyles()\"></div>\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: StepperIndicatorDirective, selector: "button[monaStepperIndicator]", inputs: ["invalid", "rounded", "state"] }, { kind: "component", type: LucideCheck, selector: "svg[lucideCheck]" }, { kind: "component", type: LucideCircleAlert, selector: "svg[lucideCircleAlert], svg[lucideAlertCircle]" }] }); }
562
- }
563
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: StepperComponent, decorators: [{
564
- type: Component,
565
- args: [{ selector: "mona-stepper", imports: [NgTemplateOutlet, StepperIndicatorDirective, LucideCheck, LucideCircleAlert], host: {
566
- role: "group",
567
- "[attr.aria-label]": "ariaLabel() || messages().stepper",
568
- "[class]": "baseClass()",
569
- "[style]": "hostStyles()",
570
- "(keydown)": "onKeydown($event)"
571
- }, template: "<ol role=\"list\" [class]=\"listClass()\">\n @for (step of viewSteps(); track step.index) {\n @let active = isStepActive(step);\n @let locked = isStepLocked(step);\n @let state = stepState(step);\n @let invalid = !!step.options.invalid;\n @let options = step.options;\n @let index = step.index;\n @let currentIndex = activeStep()?.index ?? -1;\n @let disabled = !!options.disabled;\n @let focusable = step.index === highlightedStep();\n <li\n [class]=\"listItemClass()\"\n [class.cursor-pointer]=\"!locked\"\n [class.cursor-not-allowed]=\"locked\"\n [style]=\"trackItemStyles()\"\n (click)=\"onStepClick(step, $event)\">\n @if (stepTemplate()) {\n <button\n #stepButton\n type=\"button\"\n [class]=\"stepButtonClass()\"\n [attr.aria-current]=\"state === 'current' ? 'step' : undefined\"\n [attr.aria-describedby]=\"descriptionId(step)\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focusable ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n <ng-container\n [ngTemplateOutlet]=\"stepTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled,\n invalid,\n state\n }\"></ng-container>\n </button>\n } @else {\n <button\n #stepButton\n monaStepperIndicator\n type=\"button\"\n [invalid]=\"invalid\"\n [rounded]=\"rounded()\"\n [state]=\"state\"\n [attr.aria-current]=\"state === 'current' ? 'step' : undefined\"\n [attr.aria-describedby]=\"descriptionId(step)\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focusable ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n @if (indicatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"indicatorTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled,\n invalid,\n state\n }\"></ng-container>\n } @else if (invalid) {\n <svg lucideCircleAlert [size]=\"16\" aria-hidden=\"true\"></svg>\n } @else if (state === \"completed\") {\n <svg lucideCheck [size]=\"16\" aria-hidden=\"true\"></svg>\n } @else {\n {{ formatStepNumber(step.index + 1) }}\n }\n </button>\n }\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled,\n invalid,\n state\n }\"></ng-container>\n } @else {\n <span [class]=\"labelClass(state)\" aria-hidden=\"true\">{{ options.label }}</span>\n }\n </li>\n }\n</ol>\n<!-- Read through aria-describedby, which also works on hidden text. Nothing here is shown or read twice. -->\n<div hidden>\n @for (step of viewSteps(); track step.index) {\n <span [id]=\"descriptionId(step)\">\n <span>{{ positionText(step.index + 1) }}</span>\n @if (stepState(step) === \"completed\") {\n <span> {{ messages().stepCompleted }}</span>\n }\n @if (step.options.invalid) {\n <span> {{ messages().stepInvalid }}</span>\n }\n </span>\n }\n</div>\n<div\n [class]=\"trackClass()\"\n [style]=\"trackStyles()\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"activeStep()?.index ?? 0\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"progressMax()\"\n [attr.aria-valuetext]=\"progressText()\"\n [attr.aria-label]=\"progressAriaLabel() || messages().stepProgress\">\n <div [class]=\"trackLineClass()\" [style]=\"trackInnerStyles()\"></div>\n</div>\n" }]
572
- }], ctorParameters: () => [], propDecorators: { indicatorTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StepperIndicatorTemplateDirective), { ...{
573
- read: TemplateRef
574
- }, isSignal: true }] }], labelTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StepperLabelTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], stepButtons: [{ type: i0.ViewChildren, args: ["stepButton", { isSignal: true }] }], stepTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => StepperStepTemplateDirective), { ...{
575
- read: TemplateRef
576
- }, isSignal: true }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], linear: [{ type: i0.Input, args: [{ isSignal: true, alias: "linear", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], progressAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "progressAriaLabel", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }, { type: i0.Output, args: ["stepChange"] }], stepSelect: [{ type: i0.Output, args: ["stepSelect"] }], steps: [{ type: i0.Input, args: [{ isSignal: true, alias: "steps", required: false }] }] } });
577
-
578
- /*
579
- * Public API Surface of @nanahoshi/mona-ui/stepper
580
- */
581
-
582
- /**
583
- * Generated bundle index. Do not edit.
584
- */
585
-
328
+ var StepperComponent = class StepperComponent {
329
+ #adjacentEnabledSteps;
330
+ #direction;
331
+ #i18n;
332
+ #id;
333
+ #trackItemSize;
334
+ #trackLength;
335
+ constructor() {
336
+ this.#adjacentEnabledSteps = computed(() => {
337
+ const active = this.activeStep();
338
+ const enabled = this.viewSteps().toArray().filter((step) => !step.options.disabled);
339
+ if (!active) return {
340
+ next: void 0,
341
+ previous: void 0
342
+ };
343
+ return {
344
+ next: enabled.find((step) => step.index > active.index),
345
+ previous: enabled.filter((step) => step.index < active.index).pop()
346
+ };
347
+ }, ...ngDevMode ? [{ debugName: "#adjacentEnabledSteps" }] : /* istanbul ignore next */ []);
348
+ this.#direction = injectComponentDirection();
349
+ this.#i18n = inject(MonaI18nService);
350
+ this.#id = createElementControlId();
351
+ this.#trackItemSize = computed(() => {
352
+ const stepCount = this.viewSteps().length;
353
+ return stepCount !== 0 ? 100 / stepCount : 0;
354
+ }, ...ngDevMode ? [{ debugName: "#trackItemSize" }] : /* istanbul ignore next */ []);
355
+ this.#trackLength = computed(() => {
356
+ const step = this.activeStep();
357
+ const stepCount = this.viewSteps().length;
358
+ return step && stepCount > 1 ? `${100 / (stepCount - 1) * step.index}%` : "0%";
359
+ }, ...ngDevMode ? [{ debugName: "#trackLength" }] : /* istanbul ignore next */ []);
360
+ this.activeStep = computed(() => {
361
+ const steps = this.viewSteps();
362
+ if (steps.length === 0) return;
363
+ return steps.elementAt(this.normalizeIndex(this.step(), steps.length));
364
+ }, ...ngDevMode ? [{ debugName: "activeStep" }] : /* istanbul ignore next */ []);
365
+ this.baseClass = computed(() => {
366
+ const orientation = this.orientation();
367
+ return stepperBaseThemeVariants({ orientation });
368
+ }, ...ngDevMode ? [{ debugName: "baseClass" }] : /* istanbul ignore next */ []);
369
+ this.highlightedStep = signal(0, ...ngDevMode ? [{ debugName: "highlightedStep" }] : /* istanbul ignore next */ []);
370
+ this.hostStyles = computed(() => {
371
+ const orientation = this.orientation();
372
+ const stepCount = this.viewSteps().length;
373
+ return {
374
+ gridTemplateColumns: orientation === "horizontal" ? `repeat(${stepCount * 2}, 1fr)` : void 0,
375
+ gridTemplateRows: orientation === "vertical" ? `repeat(${stepCount * 2}, 1fr)` : void 0
376
+ };
377
+ }, ...ngDevMode ? [{ debugName: "hostStyles" }] : /* istanbul ignore next */ []);
378
+ this.indicatorTemplate = contentChild(StepperIndicatorTemplateDirective, { read: TemplateRef });
379
+ this.isRtl = computed(() => this.#direction() === "rtl", ...ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []);
380
+ this.labelTemplate = contentChild(StepperLabelTemplateDirective, { read: TemplateRef });
381
+ this.listClass = computed(() => {
382
+ const orientation = this.orientation();
383
+ return stepperStepListThemeVariants({ orientation });
384
+ }, ...ngDevMode ? [{ debugName: "listClass" }] : /* istanbul ignore next */ []);
385
+ this.listItemClass = computed(() => {
386
+ const orientation = this.orientation();
387
+ return stepperStepListItemThemeVariants({ orientation });
388
+ }, ...ngDevMode ? [{ debugName: "listItemClass" }] : /* istanbul ignore next */ []);
389
+ this.messages = this.#i18n.componentMessages("stepper", STEPPER_DEFAULT_MESSAGES);
390
+ this.progressMax = computed(() => Math.max(this.viewSteps().length - 1, 0), ...ngDevMode ? [{ debugName: "progressMax" }] : /* istanbul ignore next */ []);
391
+ this.progressText = computed(() => {
392
+ const active = this.activeStep();
393
+ return active ? this.positionText(active.index + 1) : null;
394
+ }, ...ngDevMode ? [{ debugName: "progressText" }] : /* istanbul ignore next */ []);
395
+ this.stepButtonClass = computed(() => {
396
+ return stepperStepButtonThemeVariants();
397
+ }, ...ngDevMode ? [{ debugName: "stepButtonClass" }] : /* istanbul ignore next */ []);
398
+ this.stepButtons = viewChildren("stepButton", ...ngDevMode ? [{ debugName: "stepButtons" }] : /* istanbul ignore next */ []);
399
+ this.stepTemplate = contentChild(StepperStepTemplateDirective, { read: TemplateRef });
400
+ this.trackClass = computed(() => {
401
+ const orientation = this.orientation();
402
+ return stepperTrackThemeVariants({ orientation });
403
+ }, ...ngDevMode ? [{ debugName: "trackClass" }] : /* istanbul ignore next */ []);
404
+ this.trackInnerStyles = computed(() => {
405
+ const orientation = this.orientation();
406
+ const length = this.#trackLength();
407
+ return { [orientation === "horizontal" ? "width" : "height"]: length };
408
+ }, ...ngDevMode ? [{ debugName: "trackInnerStyles" }] : /* istanbul ignore next */ []);
409
+ this.trackItemStyles = computed(() => {
410
+ const orientation = this.orientation();
411
+ const itemSize = this.#trackItemSize();
412
+ return { [orientation === "horizontal" ? "maxWidth" : "maxHeight"]: `${itemSize}%` };
413
+ }, ...ngDevMode ? [{ debugName: "trackItemStyles" }] : /* istanbul ignore next */ []);
414
+ this.trackLineClass = computed(() => {
415
+ const orientation = this.orientation();
416
+ return stepperTrackLineThemeVariants({ orientation });
417
+ }, ...ngDevMode ? [{ debugName: "trackLineClass" }] : /* istanbul ignore next */ []);
418
+ this.trackStyles = computed(() => {
419
+ const edge = `${this.#trackItemSize() / 2}%`;
420
+ return this.orientation() === "horizontal" ? {
421
+ insetInlineEnd: edge,
422
+ insetInlineStart: edge,
423
+ top: "0.75rem"
424
+ } : {
425
+ bottom: edge,
426
+ insetInlineStart: "0.75rem",
427
+ top: edge
428
+ };
429
+ }, ...ngDevMode ? [{ debugName: "trackStyles" }] : /* istanbul ignore next */ []);
430
+ this.viewSteps = computed(() => {
431
+ const steps = this.steps();
432
+ return select(steps, (step, index) => ({
433
+ options: step,
434
+ index
435
+ })).toImmutableSet();
436
+ }, ...ngDevMode ? [{ debugName: "viewSteps" }] : /* istanbul ignore next */ []);
437
+ this.ariaLabel = input("", {
438
+ ...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
439
+ alias: "aria-label"
440
+ });
441
+ this.linear = input(true, {
442
+ ...ngDevMode ? { debugName: "linear" } : /* istanbul ignore next */ {},
443
+ transform: booleanAttribute
444
+ });
445
+ this.orientation = input("horizontal", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
446
+ this.progressAriaLabel = input("", ...ngDevMode ? [{ debugName: "progressAriaLabel" }] : /* istanbul ignore next */ []);
447
+ this.rounded = input("full", ...ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []);
448
+ this.step = model(0, ...ngDevMode ? [{ debugName: "step" }] : /* istanbul ignore next */ []);
449
+ this.stepSelect = output();
450
+ this.steps = input([], ...ngDevMode ? [{ debugName: "steps" }] : /* istanbul ignore next */ []);
451
+ effect(() => {
452
+ const requested = this.step();
453
+ const stepCount = this.viewSteps().length;
454
+ if (stepCount === 0) return;
455
+ const index = this.normalizeIndex(requested, stepCount);
456
+ if (index !== requested) this.step.set(index);
457
+ this.highlightedStep.set(index);
458
+ });
459
+ }
460
+ descriptionId(step) {
461
+ return `${this.#id}-${step.index}-description`;
462
+ }
463
+ formatStepNumber(value) {
464
+ if (value == null) return "";
465
+ return formatNumber(value, this.#i18n.localeId(), {
466
+ maximumFractionDigits: 0,
467
+ useGrouping: false
468
+ });
469
+ }
470
+ isStepActive(step) {
471
+ const active = this.activeStep();
472
+ return active != null && step.index <= active.index;
473
+ }
474
+ isStepLocked(step) {
475
+ if (step.options.disabled) return true;
476
+ if (!this.linear()) return false;
477
+ const active = this.activeStep();
478
+ if (!active || step.index === active.index) return false;
479
+ const { next, previous } = this.#adjacentEnabledSteps();
480
+ return step.index !== next?.index && step.index !== previous?.index;
481
+ }
482
+ labelClass(state) {
483
+ return stepperStepLabelThemeVariants({ state });
484
+ }
485
+ onIndicatorFocus(step) {
486
+ this.highlightedStep.set(step.index);
487
+ }
488
+ onKeydown(event) {
489
+ if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return;
490
+ if (!this.stepButtons().some((button) => button.nativeElement === event.target)) return;
491
+ const orientation = this.orientation();
492
+ const isRtl = this.isRtl();
493
+ let previousKey = orientation === "vertical" ? "ArrowUp" : "ArrowLeft";
494
+ let nextKey = orientation === "vertical" ? "ArrowDown" : "ArrowRight";
495
+ if (orientation === "horizontal" && isRtl) {
496
+ previousKey = "ArrowRight";
497
+ nextKey = "ArrowLeft";
498
+ }
499
+ const reachable = this.viewSteps().toArray().filter((step) => !this.isStepLocked(step));
500
+ const current = this.highlightedStep();
501
+ let target;
502
+ if (event.key === previousKey) target = reachable.filter((step) => step.index < current).pop();
503
+ else if (event.key === nextKey) target = reachable.find((step) => step.index > current);
504
+ else if (event.key === "Home") target = reachable[0];
505
+ else if (event.key === "End") target = reachable[reachable.length - 1];
506
+ else return;
507
+ event.preventDefault();
508
+ if (target) {
509
+ this.highlightedStep.set(target.index);
510
+ this.stepButtons()[target.index]?.nativeElement.focus();
511
+ }
512
+ }
513
+ onStepClick(step, event) {
514
+ const control = event.target.closest(PROJECTED_CONTROL_SELECTOR);
515
+ if (control && !this.stepButtons().some((button) => button.nativeElement === control)) return;
516
+ this.setActiveStep(step, event);
517
+ }
518
+ positionText(position) {
519
+ return this.messages().stepPosition(position, this.viewSteps().length);
520
+ }
521
+ stepState(step) {
522
+ const active = this.activeStep();
523
+ if (step.index === active?.index) return "current";
524
+ if (step.options.disabled) return "disabled";
525
+ return step.options.completed ?? (active != null && step.index < active.index) ? "completed" : "upcoming";
526
+ }
527
+ normalizeIndex(value, stepCount) {
528
+ return Number.isFinite(value) ? Math.min(Math.max(Math.trunc(value), 0), stepCount - 1) : 0;
529
+ }
530
+ setActiveStep(step, event) {
531
+ const active = this.activeStep();
532
+ if (this.isStepLocked(step) || step.index === active?.index) return;
533
+ const selectEvent = new StepSelectEvent(step.index, active?.index ?? 0, step.options, event);
534
+ this.stepSelect.emit(selectEvent);
535
+ if (selectEvent.isDefaultPrevented()) return;
536
+ this.step.set(step.index);
537
+ this.highlightedStep.set(step.index);
538
+ }
539
+ static {
540
+ this.ɵfac = i0.ɵɵngDeclareFactory({
541
+ minVersion: "12.0.0",
542
+ version: "22.2.6",
543
+ ngImport: i0,
544
+ type: StepperComponent,
545
+ deps: [],
546
+ target: i0.ɵɵFactoryTarget.Component
547
+ });
548
+ }
549
+ static {
550
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
551
+ minVersion: "17.0.0",
552
+ version: "22.2.6",
553
+ type: StepperComponent,
554
+ isStandalone: true,
555
+ selector: "mona-stepper",
556
+ inputs: {
557
+ ariaLabel: {
558
+ classPropertyName: "ariaLabel",
559
+ publicName: "aria-label",
560
+ isSignal: true,
561
+ isRequired: false,
562
+ transformFunction: null
563
+ },
564
+ linear: {
565
+ classPropertyName: "linear",
566
+ publicName: "linear",
567
+ isSignal: true,
568
+ isRequired: false,
569
+ transformFunction: null
570
+ },
571
+ orientation: {
572
+ classPropertyName: "orientation",
573
+ publicName: "orientation",
574
+ isSignal: true,
575
+ isRequired: false,
576
+ transformFunction: null
577
+ },
578
+ progressAriaLabel: {
579
+ classPropertyName: "progressAriaLabel",
580
+ publicName: "progressAriaLabel",
581
+ isSignal: true,
582
+ isRequired: false,
583
+ transformFunction: null
584
+ },
585
+ rounded: {
586
+ classPropertyName: "rounded",
587
+ publicName: "rounded",
588
+ isSignal: true,
589
+ isRequired: false,
590
+ transformFunction: null
591
+ },
592
+ step: {
593
+ classPropertyName: "step",
594
+ publicName: "step",
595
+ isSignal: true,
596
+ isRequired: false,
597
+ transformFunction: null
598
+ },
599
+ steps: {
600
+ classPropertyName: "steps",
601
+ publicName: "steps",
602
+ isSignal: true,
603
+ isRequired: false,
604
+ transformFunction: null
605
+ }
606
+ },
607
+ outputs: {
608
+ step: "stepChange",
609
+ stepSelect: "stepSelect"
610
+ },
611
+ host: {
612
+ attributes: { "role": "group" },
613
+ listeners: { "keydown": "onKeydown($event)" },
614
+ properties: {
615
+ "attr.aria-label": "ariaLabel() || messages().stepper",
616
+ "class": "baseClass()",
617
+ "style": "hostStyles()"
618
+ }
619
+ },
620
+ queries: [
621
+ {
622
+ propertyName: "indicatorTemplate",
623
+ first: true,
624
+ predicate: StepperIndicatorTemplateDirective,
625
+ descendants: true,
626
+ read: TemplateRef,
627
+ isSignal: true
628
+ },
629
+ {
630
+ propertyName: "labelTemplate",
631
+ first: true,
632
+ predicate: StepperLabelTemplateDirective,
633
+ descendants: true,
634
+ read: TemplateRef,
635
+ isSignal: true
636
+ },
637
+ {
638
+ propertyName: "stepTemplate",
639
+ first: true,
640
+ predicate: StepperStepTemplateDirective,
641
+ descendants: true,
642
+ read: TemplateRef,
643
+ isSignal: true
644
+ }
645
+ ],
646
+ viewQueries: [{
647
+ propertyName: "stepButtons",
648
+ predicate: ["stepButton"],
649
+ descendants: true,
650
+ isSignal: true
651
+ }],
652
+ ngImport: i0,
653
+ template: "<ol role=\"list\" [class]=\"listClass()\">\n @for (step of viewSteps(); track step.index) {\n @let active = isStepActive(step);\n @let locked = isStepLocked(step);\n @let state = stepState(step);\n @let invalid = !!step.options.invalid;\n @let options = step.options;\n @let index = step.index;\n @let currentIndex = activeStep()?.index ?? -1;\n @let disabled = !!options.disabled;\n @let focusable = step.index === highlightedStep();\n <li\n [class]=\"listItemClass()\"\n [class.cursor-pointer]=\"!locked\"\n [class.cursor-not-allowed]=\"locked\"\n [style]=\"trackItemStyles()\"\n (click)=\"onStepClick(step, $event)\">\n @if (stepTemplate()) {\n <button\n #stepButton\n type=\"button\"\n [class]=\"stepButtonClass()\"\n [attr.aria-current]=\"state === 'current' ? 'step' : undefined\"\n [attr.aria-describedby]=\"descriptionId(step)\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focusable ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n <ng-container\n [ngTemplateOutlet]=\"stepTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled,\n invalid,\n state\n }\"></ng-container>\n </button>\n } @else {\n <button\n #stepButton\n monaStepperIndicator\n type=\"button\"\n [invalid]=\"invalid\"\n [rounded]=\"rounded()\"\n [state]=\"state\"\n [attr.aria-current]=\"state === 'current' ? 'step' : undefined\"\n [attr.aria-describedby]=\"descriptionId(step)\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focusable ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n @if (indicatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"indicatorTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled,\n invalid,\n state\n }\"></ng-container>\n } @else if (invalid) {\n <svg lucideCircleAlert [size]=\"16\" aria-hidden=\"true\"></svg>\n } @else if (state === \"completed\") {\n <svg lucideCheck [size]=\"16\" aria-hidden=\"true\"></svg>\n } @else {\n {{ formatStepNumber(step.index + 1) }}\n }\n </button>\n }\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled,\n invalid,\n state\n }\"></ng-container>\n } @else {\n <span [class]=\"labelClass(state)\" aria-hidden=\"true\">{{ options.label }}</span>\n }\n </li>\n }\n</ol>\n<!-- Read through aria-describedby, which also works on hidden text. Nothing here is shown or read twice. -->\n<div hidden>\n @for (step of viewSteps(); track step.index) {\n <span [id]=\"descriptionId(step)\">\n <span>{{ positionText(step.index + 1) }}</span>\n @if (stepState(step) === \"completed\") {\n <span> {{ messages().stepCompleted }}</span>\n }\n @if (step.options.invalid) {\n <span> {{ messages().stepInvalid }}</span>\n }\n </span>\n }\n</div>\n<div\n [class]=\"trackClass()\"\n [style]=\"trackStyles()\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"activeStep()?.index ?? 0\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"progressMax()\"\n [attr.aria-valuetext]=\"progressText()\"\n [attr.aria-label]=\"progressAriaLabel() || messages().stepProgress\">\n <div [class]=\"trackLineClass()\" [style]=\"trackInnerStyles()\"></div>\n</div>\n",
654
+ dependencies: [
655
+ {
656
+ kind: "directive",
657
+ type: NgTemplateOutlet,
658
+ selector: "[ngTemplateOutlet]",
659
+ inputs: [
660
+ "ngTemplateOutletContext",
661
+ "ngTemplateOutlet",
662
+ "ngTemplateOutletInjector"
663
+ ]
664
+ },
665
+ {
666
+ kind: "directive",
667
+ type: StepperIndicatorDirective,
668
+ selector: "button[monaStepperIndicator]",
669
+ inputs: [
670
+ "invalid",
671
+ "rounded",
672
+ "state"
673
+ ]
674
+ },
675
+ {
676
+ kind: "component",
677
+ type: LucideCheck,
678
+ selector: "svg[lucideCheck]"
679
+ },
680
+ {
681
+ kind: "component",
682
+ type: LucideCircleAlert,
683
+ selector: "svg[lucideCircleExclamationPoint], svg[lucideAlertCircle], svg[lucideCircleAlert]"
684
+ }
685
+ ]
686
+ });
687
+ }
688
+ };
689
+ i0.ɵɵngDeclareClassMetadata({
690
+ minVersion: "12.0.0",
691
+ version: "22.2.6",
692
+ ngImport: i0,
693
+ type: StepperComponent,
694
+ decorators: [{
695
+ type: Component,
696
+ args: [{
697
+ selector: "mona-stepper",
698
+ imports: [
699
+ NgTemplateOutlet,
700
+ StepperIndicatorDirective,
701
+ LucideCheck,
702
+ LucideCircleAlert
703
+ ],
704
+ host: {
705
+ role: "group",
706
+ "[attr.aria-label]": "ariaLabel() || messages().stepper",
707
+ "[class]": "baseClass()",
708
+ "[style]": "hostStyles()",
709
+ "(keydown)": "onKeydown($event)"
710
+ },
711
+ template: "<ol role=\"list\" [class]=\"listClass()\">\n @for (step of viewSteps(); track step.index) {\n @let active = isStepActive(step);\n @let locked = isStepLocked(step);\n @let state = stepState(step);\n @let invalid = !!step.options.invalid;\n @let options = step.options;\n @let index = step.index;\n @let currentIndex = activeStep()?.index ?? -1;\n @let disabled = !!options.disabled;\n @let focusable = step.index === highlightedStep();\n <li\n [class]=\"listItemClass()\"\n [class.cursor-pointer]=\"!locked\"\n [class.cursor-not-allowed]=\"locked\"\n [style]=\"trackItemStyles()\"\n (click)=\"onStepClick(step, $event)\">\n @if (stepTemplate()) {\n <button\n #stepButton\n type=\"button\"\n [class]=\"stepButtonClass()\"\n [attr.aria-current]=\"state === 'current' ? 'step' : undefined\"\n [attr.aria-describedby]=\"descriptionId(step)\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focusable ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n <ng-container\n [ngTemplateOutlet]=\"stepTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled,\n invalid,\n state\n }\"></ng-container>\n </button>\n } @else {\n <button\n #stepButton\n monaStepperIndicator\n type=\"button\"\n [invalid]=\"invalid\"\n [rounded]=\"rounded()\"\n [state]=\"state\"\n [attr.aria-current]=\"state === 'current' ? 'step' : undefined\"\n [attr.aria-describedby]=\"descriptionId(step)\"\n [attr.aria-disabled]=\"locked ? true : undefined\"\n [attr.aria-label]=\"options.label\"\n [attr.tabindex]=\"focusable ? 0 : -1\"\n (focus)=\"onIndicatorFocus(step)\">\n @if (indicatorTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"indicatorTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled,\n invalid,\n state\n }\"></ng-container>\n } @else if (invalid) {\n <svg lucideCircleAlert [size]=\"16\" aria-hidden=\"true\"></svg>\n } @else if (state === \"completed\") {\n <svg lucideCheck [size]=\"16\" aria-hidden=\"true\"></svg>\n } @else {\n {{ formatStepNumber(step.index + 1) }}\n }\n </button>\n }\n @if (labelTemplate()) {\n <ng-container\n [ngTemplateOutlet]=\"labelTemplate()\"\n [ngTemplateOutletContext]=\"{\n $implicit: options,\n index,\n active,\n currentIndex,\n disabled,\n invalid,\n state\n }\"></ng-container>\n } @else {\n <span [class]=\"labelClass(state)\" aria-hidden=\"true\">{{ options.label }}</span>\n }\n </li>\n }\n</ol>\n<!-- Read through aria-describedby, which also works on hidden text. Nothing here is shown or read twice. -->\n<div hidden>\n @for (step of viewSteps(); track step.index) {\n <span [id]=\"descriptionId(step)\">\n <span>{{ positionText(step.index + 1) }}</span>\n @if (stepState(step) === \"completed\") {\n <span> {{ messages().stepCompleted }}</span>\n }\n @if (step.options.invalid) {\n <span> {{ messages().stepInvalid }}</span>\n }\n </span>\n }\n</div>\n<div\n [class]=\"trackClass()\"\n [style]=\"trackStyles()\"\n role=\"progressbar\"\n [attr.aria-valuenow]=\"activeStep()?.index ?? 0\"\n [attr.aria-valuemin]=\"0\"\n [attr.aria-valuemax]=\"progressMax()\"\n [attr.aria-valuetext]=\"progressText()\"\n [attr.aria-label]=\"progressAriaLabel() || messages().stepProgress\">\n <div [class]=\"trackLineClass()\" [style]=\"trackInnerStyles()\"></div>\n</div>\n"
712
+ }]
713
+ }],
714
+ ctorParameters: () => [],
715
+ propDecorators: {
716
+ indicatorTemplate: [{
717
+ type: i0.ContentChild,
718
+ args: [i0.forwardRef(() => StepperIndicatorTemplateDirective), {
719
+ read: TemplateRef,
720
+ isSignal: true
721
+ }]
722
+ }],
723
+ labelTemplate: [{
724
+ type: i0.ContentChild,
725
+ args: [i0.forwardRef(() => StepperLabelTemplateDirective), {
726
+ read: TemplateRef,
727
+ isSignal: true
728
+ }]
729
+ }],
730
+ stepButtons: [{
731
+ type: i0.ViewChildren,
732
+ args: ["stepButton", { isSignal: true }]
733
+ }],
734
+ stepTemplate: [{
735
+ type: i0.ContentChild,
736
+ args: [i0.forwardRef(() => StepperStepTemplateDirective), {
737
+ read: TemplateRef,
738
+ isSignal: true
739
+ }]
740
+ }],
741
+ ariaLabel: [{
742
+ type: i0.Input,
743
+ args: [{
744
+ isSignal: true,
745
+ alias: "aria-label",
746
+ required: false
747
+ }]
748
+ }],
749
+ linear: [{
750
+ type: i0.Input,
751
+ args: [{
752
+ isSignal: true,
753
+ alias: "linear",
754
+ required: false
755
+ }]
756
+ }],
757
+ orientation: [{
758
+ type: i0.Input,
759
+ args: [{
760
+ isSignal: true,
761
+ alias: "orientation",
762
+ required: false
763
+ }]
764
+ }],
765
+ progressAriaLabel: [{
766
+ type: i0.Input,
767
+ args: [{
768
+ isSignal: true,
769
+ alias: "progressAriaLabel",
770
+ required: false
771
+ }]
772
+ }],
773
+ rounded: [{
774
+ type: i0.Input,
775
+ args: [{
776
+ isSignal: true,
777
+ alias: "rounded",
778
+ required: false
779
+ }]
780
+ }],
781
+ step: [{
782
+ type: i0.Input,
783
+ args: [{
784
+ isSignal: true,
785
+ alias: "step",
786
+ required: false
787
+ }]
788
+ }, {
789
+ type: i0.Output,
790
+ args: ["stepChange"]
791
+ }],
792
+ stepSelect: [{
793
+ type: i0.Output,
794
+ args: ["stepSelect"]
795
+ }],
796
+ steps: [{
797
+ type: i0.Input,
798
+ args: [{
799
+ isSignal: true,
800
+ alias: "steps",
801
+ required: false
802
+ }]
803
+ }]
804
+ }
805
+ });
586
806
  export { STEPPER_DEFAULT_MESSAGES, StepSelectEvent, StepperComponent, StepperIndicatorTemplateDirective, StepperLabelTemplateDirective, StepperStepTemplateDirective };
587
- //# sourceMappingURL=nanahoshi-mona-ui-stepper.mjs.map
807
+
808
+ //# sourceMappingURL=nanahoshi-mona-ui-stepper.mjs.map