@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,49 +1,77 @@
1
- import { NgTemplateOutlet } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { Directive, inject, ElementRef, computed, viewChild, contentChildren, TemplateRef, input, booleanAttribute, output, model, Component } from '@angular/core';
4
- import { LucideX } from '@lucide/angular';
5
- import { ButtonDirective } from '@nanahoshi/mona-ui/button';
6
- import { MonaI18nService } from '@nanahoshi/mona-ui/i18n';
7
- import { themeControlSurfaceClasses, injectLabelAssociation, injectEffectiveDisabled, createElementControlId, AttributeBinderDirective } from '@nanahoshi/mona-ui/internal';
8
- import { twMerge } from 'tailwind-merge';
9
- import { cva } from 'class-variance-authority';
10
-
11
- /**
12
- * Marks an `<ng-template>` as a prefix slot. The template is rendered inside the container's left side. Multiple prefix
13
- * templates are supported and render in source order.
14
- */
15
- class TextBoxPrefixTemplateDirective {
16
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TextBoxPrefixTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
17
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: TextBoxPrefixTemplateDirective, isStandalone: true, selector: "ng-template[monaTextBoxPrefixTemplate]", ngImport: i0 }); }
18
- }
19
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TextBoxPrefixTemplateDirective, decorators: [{
20
- type: Directive,
21
- args: [{
22
- selector: "ng-template[monaTextBoxPrefixTemplate]"
23
- }]
24
- }] });
25
-
26
- /**
27
- * Marks an `<ng-template>` as a suffix slot. The template is rendered inside the container's right side, after the
28
- * optional clear button. Multiple suffix templates are supported and render in source order.
29
- */
30
- class TextBoxSuffixTemplateDirective {
31
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TextBoxSuffixTemplateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
32
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: TextBoxSuffixTemplateDirective, isStandalone: true, selector: "ng-template[monaTextBoxSuffixTemplate]", ngImport: i0 }); }
33
- }
34
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TextBoxSuffixTemplateDirective, decorators: [{
35
- type: Directive,
36
- args: [{
37
- selector: "ng-template[monaTextBoxSuffixTemplate]"
38
- }]
39
- }] });
40
-
41
- // Generated from i18n/catalogs/en-US.messages.json by scripts/generate-locale-catalogs.ts. Do not edit.
42
- // Edit the JSON file and run `npm run generate:locale-catalogs`.
43
- const TEXT_BOX_DEFAULT_MESSAGES = {
44
- clear: "Clear"
1
+ import { NgTemplateOutlet } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { Component, Directive, ElementRef, TemplateRef, booleanAttribute, computed, contentChildren, inject, input, model, output, viewChild } from "@angular/core";
4
+ import { LucideX } from "@lucide/angular";
5
+ import { ButtonDirective } from "@nanahoshi/mona-ui/button";
6
+ import { MonaI18nService } from "@nanahoshi/mona-ui/i18n";
7
+ import { AttributeBinderDirective, createElementControlId, injectEffectiveDisabled, injectLabelAssociation, themeControlSurfaceClasses } from "@nanahoshi/mona-ui/internal";
8
+ import { twMerge } from "tailwind-merge";
9
+ import { cva } from "class-variance-authority";
10
+ var TextBoxPrefixTemplateDirective = class TextBoxPrefixTemplateDirective {
11
+ static {
12
+ this.ɵfac = i0.ɵɵngDeclareFactory({
13
+ minVersion: "12.0.0",
14
+ version: "22.2.6",
15
+ ngImport: i0,
16
+ type: TextBoxPrefixTemplateDirective,
17
+ deps: [],
18
+ target: i0.ɵɵFactoryTarget.Directive
19
+ });
20
+ }
21
+ static {
22
+ this.ɵdir = i0.ɵɵngDeclareDirective({
23
+ minVersion: "14.0.0",
24
+ version: "22.2.6",
25
+ type: TextBoxPrefixTemplateDirective,
26
+ isStandalone: true,
27
+ selector: "ng-template[monaTextBoxPrefixTemplate]",
28
+ ngImport: i0
29
+ });
30
+ }
45
31
  };
46
-
32
+ i0.ɵɵngDeclareClassMetadata({
33
+ minVersion: "12.0.0",
34
+ version: "22.2.6",
35
+ ngImport: i0,
36
+ type: TextBoxPrefixTemplateDirective,
37
+ decorators: [{
38
+ type: Directive,
39
+ args: [{ selector: "ng-template[monaTextBoxPrefixTemplate]" }]
40
+ }]
41
+ });
42
+ var TextBoxSuffixTemplateDirective = class TextBoxSuffixTemplateDirective {
43
+ static {
44
+ this.ɵfac = i0.ɵɵngDeclareFactory({
45
+ minVersion: "12.0.0",
46
+ version: "22.2.6",
47
+ ngImport: i0,
48
+ type: TextBoxSuffixTemplateDirective,
49
+ deps: [],
50
+ target: i0.ɵɵFactoryTarget.Directive
51
+ });
52
+ }
53
+ static {
54
+ this.ɵdir = i0.ɵɵngDeclareDirective({
55
+ minVersion: "14.0.0",
56
+ version: "22.2.6",
57
+ type: TextBoxSuffixTemplateDirective,
58
+ isStandalone: true,
59
+ selector: "ng-template[monaTextBoxSuffixTemplate]",
60
+ ngImport: i0
61
+ });
62
+ }
63
+ };
64
+ i0.ɵɵngDeclareClassMetadata({
65
+ minVersion: "12.0.0",
66
+ version: "22.2.6",
67
+ ngImport: i0,
68
+ type: TextBoxSuffixTemplateDirective,
69
+ decorators: [{
70
+ type: Directive,
71
+ args: [{ selector: "ng-template[monaTextBoxSuffixTemplate]" }]
72
+ }]
73
+ });
74
+ const TEXT_BOX_DEFAULT_MESSAGES = { clear: "Clear" };
47
75
  const textBoxThemeVariants = cva(`
48
76
  flex w-full min-w-0 items-center
49
77
  overflow-hidden
@@ -74,22 +102,20 @@ const textBoxThemeVariants = cva(`
74
102
  [&>input]:bg-transparent
75
103
  [&>input]:border-0 [&>input]:outline-none [&>input:focus-visible]:outline-hidden
76
104
  [&>input]:placeholder:text-muted-foreground
77
- `, {
78
- variants: {
79
- rounded: {
80
- full: "rounded-full",
81
- large: "rounded-lg",
82
- medium: "rounded-md",
83
- none: "rounded-none",
84
- small: "rounded-sm"
85
- },
86
- size: {
87
- large: "h-10 text-base",
88
- medium: "h-9 text-sm",
89
- small: "h-8 text-xs"
90
- }
91
- }
92
- });
105
+ `, { variants: {
106
+ rounded: {
107
+ full: "rounded-full",
108
+ large: "rounded-lg",
109
+ medium: "rounded-md",
110
+ none: "rounded-none",
111
+ small: "rounded-sm"
112
+ },
113
+ size: {
114
+ large: "h-10 text-base",
115
+ medium: "h-9 text-sm",
116
+ small: "h-8 text-xs"
117
+ }
118
+ } });
93
119
  const inputThemeVariants = cva(`
94
120
  px-2
95
121
  ${themeControlSurfaceClasses} text-foreground
@@ -115,318 +141,794 @@ const inputThemeVariants = cva(`
115
141
  data-[invalid='true']:ring-2 data-[invalid='true']:ring-error/35
116
142
  data-[invalid='true']:focus-visible:border-error
117
143
  data-[invalid='true']:focus-visible:ring-error/35
118
- `, {
119
- variants: {
120
- rounded: {
121
- full: "rounded-full px-4",
122
- large: "rounded-lg",
123
- medium: "rounded-md",
124
- none: "rounded-none",
125
- small: "rounded-sm"
126
- },
127
- size: {
128
- large: "h-10 text-base",
129
- medium: "h-9 text-sm",
130
- small: "h-8 text-xs"
131
- }
132
- }
144
+ `, { variants: {
145
+ rounded: {
146
+ full: "rounded-full px-4",
147
+ large: "rounded-lg",
148
+ medium: "rounded-md",
149
+ none: "rounded-none",
150
+ small: "rounded-sm"
151
+ },
152
+ size: {
153
+ large: "h-10 text-base",
154
+ medium: "h-9 text-sm",
155
+ small: "h-8 text-xs"
156
+ }
157
+ } });
158
+ const selectableInputTypes = /* @__PURE__ */ new Set([
159
+ "password",
160
+ "search",
161
+ "tel",
162
+ "text",
163
+ "url"
164
+ ]);
165
+ var TextBoxComponent = class TextBoxComponent {
166
+ constructor() {
167
+ this.#hostElementRef = inject(ElementRef);
168
+ this.#i18n = inject(MonaI18nService);
169
+ this.#label = injectLabelAssociation({
170
+ ariaLabel: () => this.ariaLabel(),
171
+ ariaLabelledBy: () => this.ariaLabelledBy()
172
+ });
173
+ this.classes = computed(() => {
174
+ const rounded = this.rounded();
175
+ const size = this.size();
176
+ const classes = textBoxThemeVariants({
177
+ rounded,
178
+ size
179
+ });
180
+ const userClass = this.userClass();
181
+ return twMerge(classes, userClass);
182
+ }, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
183
+ this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled());
184
+ this.inputRef = viewChild.required("input", ...ngDevMode ? [{ debugName: "inputRef" }] : /* istanbul ignore next */ []);
185
+ this.invalidInput = computed(() => this.touched() && (this.invalid() || this.required() && !this.value()), ...ngDevMode ? [{ debugName: "invalidInput" }] : /* istanbul ignore next */ []);
186
+ this.labelledBy = this.#label.labelledBy;
187
+ this.messages = this.#i18n.componentMessages("textBox", TEXT_BOX_DEFAULT_MESSAGES);
188
+ this.prefixTemplateList = contentChildren(TextBoxPrefixTemplateDirective, {
189
+ ...ngDevMode ? { debugName: "prefixTemplateList" } : /* istanbul ignore next */ {},
190
+ read: TemplateRef
191
+ });
192
+ this.showClearButton = computed(() => this.clearButton() && !this.effectiveDisabled() && !this.readonly() && !!this.value(), ...ngDevMode ? [{ debugName: "showClearButton" }] : /* istanbul ignore next */ []);
193
+ this.suffixTemplateList = contentChildren(TextBoxSuffixTemplateDirective, {
194
+ ...ngDevMode ? { debugName: "suffixTemplateList" } : /* istanbul ignore next */ {},
195
+ read: TemplateRef
196
+ });
197
+ this.ariaDescribedBy = input("", {
198
+ ...ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {},
199
+ alias: "aria-describedby"
200
+ });
201
+ this.ariaLabel = input("", {
202
+ ...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
203
+ alias: "aria-label"
204
+ });
205
+ this.ariaLabelledBy = input("", {
206
+ ...ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {},
207
+ alias: "aria-labelledby"
208
+ });
209
+ this.clearButton = input(false, {
210
+ ...ngDevMode ? { debugName: "clearButton" } : /* istanbul ignore next */ {},
211
+ transform: booleanAttribute
212
+ });
213
+ this.disabled = input(false, {
214
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
215
+ transform: booleanAttribute
216
+ });
217
+ this.inputAttributes = input({}, ...ngDevMode ? [{ debugName: "inputAttributes" }] : /* istanbul ignore next */ []);
218
+ this.inputBlur = output();
219
+ this.inputClass = input("", ...ngDevMode ? [{ debugName: "inputClass" }] : /* istanbul ignore next */ []);
220
+ this.inputFocus = output();
221
+ this.inputId = input(createElementControlId(), ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
222
+ this.inputStyle = input(null, ...ngDevMode ? [{ debugName: "inputStyle" }] : /* istanbul ignore next */ []);
223
+ this.invalid = input(false, {
224
+ ...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
225
+ transform: booleanAttribute
226
+ });
227
+ this.maxLength = input(void 0, ...ngDevMode ? [{ debugName: "maxLength" }] : /* istanbul ignore next */ []);
228
+ this.minLength = input(void 0, ...ngDevMode ? [{ debugName: "minLength" }] : /* istanbul ignore next */ []);
229
+ this.name = input("", ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
230
+ this.placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
231
+ this.readonly = input(false, {
232
+ ...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
233
+ transform: booleanAttribute
234
+ });
235
+ this.required = input(false, {
236
+ ...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
237
+ transform: booleanAttribute
238
+ });
239
+ this.rounded = input("medium", ...ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []);
240
+ this.size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
241
+ this.touch = output();
242
+ this.touched = input(false, {
243
+ ...ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {},
244
+ transform: booleanAttribute
245
+ });
246
+ this.type = input("text", ...ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []);
247
+ this.userClass = input("", {
248
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
249
+ alias: "class"
250
+ });
251
+ this.value = model("", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
252
+ }
253
+ #hostElementRef;
254
+ #i18n;
255
+ #label;
256
+ focus(options) {
257
+ const input = this.inputRef().nativeElement;
258
+ input.focus(options);
259
+ if (selectableInputTypes.has(input.type)) {
260
+ const end = input.value.length;
261
+ input.setSelectionRange(end, end);
262
+ }
263
+ }
264
+ onClearClick() {
265
+ this.value.set("");
266
+ this.inputRef().nativeElement.focus();
267
+ }
268
+ onInputBlur(event) {
269
+ this.inputBlur.emit(event);
270
+ }
271
+ onValueChange(value) {
272
+ this.value.set(value);
273
+ }
274
+ setLabelledBy(id) {
275
+ this.#label.setLabelledBy(id);
276
+ }
277
+ onFocusOut(event) {
278
+ const nextTarget = event.relatedTarget;
279
+ if (nextTarget instanceof Node && this.#hostElementRef.nativeElement.contains(nextTarget)) return;
280
+ this.touch.emit();
281
+ }
282
+ static {
283
+ this.ɵfac = i0.ɵɵngDeclareFactory({
284
+ minVersion: "12.0.0",
285
+ version: "22.2.6",
286
+ ngImport: i0,
287
+ type: TextBoxComponent,
288
+ deps: [],
289
+ target: i0.ɵɵFactoryTarget.Component
290
+ });
291
+ }
292
+ static {
293
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
294
+ minVersion: "17.0.0",
295
+ version: "22.2.6",
296
+ type: TextBoxComponent,
297
+ isStandalone: true,
298
+ selector: "mona-text-box",
299
+ inputs: {
300
+ ariaDescribedBy: {
301
+ classPropertyName: "ariaDescribedBy",
302
+ publicName: "aria-describedby",
303
+ isSignal: true,
304
+ isRequired: false,
305
+ transformFunction: null
306
+ },
307
+ ariaLabel: {
308
+ classPropertyName: "ariaLabel",
309
+ publicName: "aria-label",
310
+ isSignal: true,
311
+ isRequired: false,
312
+ transformFunction: null
313
+ },
314
+ ariaLabelledBy: {
315
+ classPropertyName: "ariaLabelledBy",
316
+ publicName: "aria-labelledby",
317
+ isSignal: true,
318
+ isRequired: false,
319
+ transformFunction: null
320
+ },
321
+ clearButton: {
322
+ classPropertyName: "clearButton",
323
+ publicName: "clearButton",
324
+ isSignal: true,
325
+ isRequired: false,
326
+ transformFunction: null
327
+ },
328
+ disabled: {
329
+ classPropertyName: "disabled",
330
+ publicName: "disabled",
331
+ isSignal: true,
332
+ isRequired: false,
333
+ transformFunction: null
334
+ },
335
+ inputAttributes: {
336
+ classPropertyName: "inputAttributes",
337
+ publicName: "inputAttributes",
338
+ isSignal: true,
339
+ isRequired: false,
340
+ transformFunction: null
341
+ },
342
+ inputClass: {
343
+ classPropertyName: "inputClass",
344
+ publicName: "inputClass",
345
+ isSignal: true,
346
+ isRequired: false,
347
+ transformFunction: null
348
+ },
349
+ inputId: {
350
+ classPropertyName: "inputId",
351
+ publicName: "inputId",
352
+ isSignal: true,
353
+ isRequired: false,
354
+ transformFunction: null
355
+ },
356
+ inputStyle: {
357
+ classPropertyName: "inputStyle",
358
+ publicName: "inputStyle",
359
+ isSignal: true,
360
+ isRequired: false,
361
+ transformFunction: null
362
+ },
363
+ invalid: {
364
+ classPropertyName: "invalid",
365
+ publicName: "invalid",
366
+ isSignal: true,
367
+ isRequired: false,
368
+ transformFunction: null
369
+ },
370
+ maxLength: {
371
+ classPropertyName: "maxLength",
372
+ publicName: "maxLength",
373
+ isSignal: true,
374
+ isRequired: false,
375
+ transformFunction: null
376
+ },
377
+ minLength: {
378
+ classPropertyName: "minLength",
379
+ publicName: "minLength",
380
+ isSignal: true,
381
+ isRequired: false,
382
+ transformFunction: null
383
+ },
384
+ name: {
385
+ classPropertyName: "name",
386
+ publicName: "name",
387
+ isSignal: true,
388
+ isRequired: false,
389
+ transformFunction: null
390
+ },
391
+ placeholder: {
392
+ classPropertyName: "placeholder",
393
+ publicName: "placeholder",
394
+ isSignal: true,
395
+ isRequired: false,
396
+ transformFunction: null
397
+ },
398
+ readonly: {
399
+ classPropertyName: "readonly",
400
+ publicName: "readonly",
401
+ isSignal: true,
402
+ isRequired: false,
403
+ transformFunction: null
404
+ },
405
+ required: {
406
+ classPropertyName: "required",
407
+ publicName: "required",
408
+ isSignal: true,
409
+ isRequired: false,
410
+ transformFunction: null
411
+ },
412
+ rounded: {
413
+ classPropertyName: "rounded",
414
+ publicName: "rounded",
415
+ isSignal: true,
416
+ isRequired: false,
417
+ transformFunction: null
418
+ },
419
+ size: {
420
+ classPropertyName: "size",
421
+ publicName: "size",
422
+ isSignal: true,
423
+ isRequired: false,
424
+ transformFunction: null
425
+ },
426
+ touched: {
427
+ classPropertyName: "touched",
428
+ publicName: "touched",
429
+ isSignal: true,
430
+ isRequired: false,
431
+ transformFunction: null
432
+ },
433
+ type: {
434
+ classPropertyName: "type",
435
+ publicName: "type",
436
+ isSignal: true,
437
+ isRequired: false,
438
+ transformFunction: null
439
+ },
440
+ userClass: {
441
+ classPropertyName: "userClass",
442
+ publicName: "class",
443
+ isSignal: true,
444
+ isRequired: false,
445
+ transformFunction: null
446
+ },
447
+ value: {
448
+ classPropertyName: "value",
449
+ publicName: "value",
450
+ isSignal: true,
451
+ isRequired: false,
452
+ transformFunction: null
453
+ }
454
+ },
455
+ outputs: {
456
+ inputBlur: "inputBlur",
457
+ inputFocus: "inputFocus",
458
+ touch: "touch",
459
+ value: "valueChange"
460
+ },
461
+ host: {
462
+ listeners: { "focusout": "onFocusOut($event)" },
463
+ properties: {
464
+ "attr.aria-describedby": "null",
465
+ "attr.aria-label": "null",
466
+ "attr.aria-labelledby": "null",
467
+ "attr.data-disabled": "effectiveDisabled() || null",
468
+ "attr.data-readonly": "readonly() || null",
469
+ "attr.data-required": "required() || null",
470
+ "attr.data-invalid": "invalidInput() || null",
471
+ "class": "classes()"
472
+ }
473
+ },
474
+ queries: [{
475
+ propertyName: "prefixTemplateList",
476
+ predicate: TextBoxPrefixTemplateDirective,
477
+ read: TemplateRef,
478
+ isSignal: true
479
+ }, {
480
+ propertyName: "suffixTemplateList",
481
+ predicate: TextBoxSuffixTemplateDirective,
482
+ read: TemplateRef,
483
+ isSignal: true
484
+ }],
485
+ viewQueries: [{
486
+ propertyName: "inputRef",
487
+ first: true,
488
+ predicate: ["input"],
489
+ descendants: true,
490
+ isSignal: true
491
+ }],
492
+ ngImport: i0,
493
+ template: "@for (prefixTemplate of prefixTemplateList(); track $index) {\n <span class=\"flex h-full flex-wrap items-center\">\n <ng-container *ngTemplateOutlet=\"prefixTemplate\"></ng-container>\n </span>\n}\n<input\n [id]=\"inputId()\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [placeholder]=\"placeholder()\"\n [type]=\"type()\"\n [class]=\"inputClass()\"\n [style]=\"inputStyle()\"\n [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n [attr.aria-invalid]=\"invalidInput() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.minlength]=\"minLength() ?? null\"\n [attr.name]=\"name() || null\"\n [monaAttributeBinder]=\"inputAttributes()\"\n [value]=\"value()\"\n (input)=\"onValueChange(input.value)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"inputFocus.emit($event)\"\n #input />\n\n@if (showClearButton()) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n class=\"me-1 size-6 shrink-0 p-0 text-muted-foreground hover:text-foreground\"\n [attr.aria-label]=\"messages().clear\"\n (click)=\"onClearClick()\">\n <svg lucideX class=\"size-4\"></svg>\n </button>\n}\n\n@for (suffixTemplate of suffixTemplateList(); track $index) {\n <span class=\"flex h-full flex-wrap items-center\">\n <ng-container *ngTemplateOutlet=\"suffixTemplate\"></ng-container>\n </span>\n}\n",
494
+ dependencies: [
495
+ {
496
+ kind: "directive",
497
+ type: NgTemplateOutlet,
498
+ selector: "[ngTemplateOutlet]",
499
+ inputs: [
500
+ "ngTemplateOutletContext",
501
+ "ngTemplateOutlet",
502
+ "ngTemplateOutletInjector"
503
+ ]
504
+ },
505
+ {
506
+ kind: "directive",
507
+ type: ButtonDirective,
508
+ selector: "button[monaButton]",
509
+ inputs: [
510
+ "aria-haspopup",
511
+ "disabled",
512
+ "iconOnly",
513
+ "loading",
514
+ "look",
515
+ "rounded",
516
+ "selected",
517
+ "size",
518
+ "tabindex",
519
+ "toggleable",
520
+ "type",
521
+ "class",
522
+ "value"
523
+ ],
524
+ outputs: ["lookChange", "selectedChange"]
525
+ },
526
+ {
527
+ kind: "directive",
528
+ type: AttributeBinderDirective,
529
+ selector: "[monaAttributeBinder]",
530
+ inputs: ["monaAttributeBinder"]
531
+ },
532
+ {
533
+ kind: "component",
534
+ type: LucideX,
535
+ selector: "svg[lucideX]"
536
+ }
537
+ ]
538
+ });
539
+ }
540
+ };
541
+ i0.ɵɵngDeclareClassMetadata({
542
+ minVersion: "12.0.0",
543
+ version: "22.2.6",
544
+ ngImport: i0,
545
+ type: TextBoxComponent,
546
+ decorators: [{
547
+ type: Component,
548
+ args: [{
549
+ selector: "mona-text-box",
550
+ imports: [
551
+ NgTemplateOutlet,
552
+ ButtonDirective,
553
+ AttributeBinderDirective,
554
+ LucideX
555
+ ],
556
+ host: {
557
+ "[attr.aria-describedby]": "null",
558
+ "[attr.aria-label]": "null",
559
+ "[attr.aria-labelledby]": "null",
560
+ "[attr.data-disabled]": "effectiveDisabled() || null",
561
+ "[attr.data-readonly]": "readonly() || null",
562
+ "[attr.data-required]": "required() || null",
563
+ "[attr.data-invalid]": "invalidInput() || null",
564
+ "[class]": "classes()",
565
+ "(focusout)": "onFocusOut($event)"
566
+ },
567
+ template: "@for (prefixTemplate of prefixTemplateList(); track $index) {\n <span class=\"flex h-full flex-wrap items-center\">\n <ng-container *ngTemplateOutlet=\"prefixTemplate\"></ng-container>\n </span>\n}\n<input\n [id]=\"inputId()\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [placeholder]=\"placeholder()\"\n [type]=\"type()\"\n [class]=\"inputClass()\"\n [style]=\"inputStyle()\"\n [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n [attr.aria-invalid]=\"invalidInput() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.minlength]=\"minLength() ?? null\"\n [attr.name]=\"name() || null\"\n [monaAttributeBinder]=\"inputAttributes()\"\n [value]=\"value()\"\n (input)=\"onValueChange(input.value)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"inputFocus.emit($event)\"\n #input />\n\n@if (showClearButton()) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n class=\"me-1 size-6 shrink-0 p-0 text-muted-foreground hover:text-foreground\"\n [attr.aria-label]=\"messages().clear\"\n (click)=\"onClearClick()\">\n <svg lucideX class=\"size-4\"></svg>\n </button>\n}\n\n@for (suffixTemplate of suffixTemplateList(); track $index) {\n <span class=\"flex h-full flex-wrap items-center\">\n <ng-container *ngTemplateOutlet=\"suffixTemplate\"></ng-container>\n </span>\n}\n"
568
+ }]
569
+ }],
570
+ propDecorators: {
571
+ inputRef: [{
572
+ type: i0.ViewChild,
573
+ args: ["input", { isSignal: true }]
574
+ }],
575
+ prefixTemplateList: [{
576
+ type: i0.ContentChildren,
577
+ args: [i0.forwardRef(() => TextBoxPrefixTemplateDirective), {
578
+ read: TemplateRef,
579
+ isSignal: true
580
+ }]
581
+ }],
582
+ suffixTemplateList: [{
583
+ type: i0.ContentChildren,
584
+ args: [i0.forwardRef(() => TextBoxSuffixTemplateDirective), {
585
+ read: TemplateRef,
586
+ isSignal: true
587
+ }]
588
+ }],
589
+ ariaDescribedBy: [{
590
+ type: i0.Input,
591
+ args: [{
592
+ isSignal: true,
593
+ alias: "aria-describedby",
594
+ required: false
595
+ }]
596
+ }],
597
+ ariaLabel: [{
598
+ type: i0.Input,
599
+ args: [{
600
+ isSignal: true,
601
+ alias: "aria-label",
602
+ required: false
603
+ }]
604
+ }],
605
+ ariaLabelledBy: [{
606
+ type: i0.Input,
607
+ args: [{
608
+ isSignal: true,
609
+ alias: "aria-labelledby",
610
+ required: false
611
+ }]
612
+ }],
613
+ clearButton: [{
614
+ type: i0.Input,
615
+ args: [{
616
+ isSignal: true,
617
+ alias: "clearButton",
618
+ required: false
619
+ }]
620
+ }],
621
+ disabled: [{
622
+ type: i0.Input,
623
+ args: [{
624
+ isSignal: true,
625
+ alias: "disabled",
626
+ required: false
627
+ }]
628
+ }],
629
+ inputAttributes: [{
630
+ type: i0.Input,
631
+ args: [{
632
+ isSignal: true,
633
+ alias: "inputAttributes",
634
+ required: false
635
+ }]
636
+ }],
637
+ inputBlur: [{
638
+ type: i0.Output,
639
+ args: ["inputBlur"]
640
+ }],
641
+ inputClass: [{
642
+ type: i0.Input,
643
+ args: [{
644
+ isSignal: true,
645
+ alias: "inputClass",
646
+ required: false
647
+ }]
648
+ }],
649
+ inputFocus: [{
650
+ type: i0.Output,
651
+ args: ["inputFocus"]
652
+ }],
653
+ inputId: [{
654
+ type: i0.Input,
655
+ args: [{
656
+ isSignal: true,
657
+ alias: "inputId",
658
+ required: false
659
+ }]
660
+ }],
661
+ inputStyle: [{
662
+ type: i0.Input,
663
+ args: [{
664
+ isSignal: true,
665
+ alias: "inputStyle",
666
+ required: false
667
+ }]
668
+ }],
669
+ invalid: [{
670
+ type: i0.Input,
671
+ args: [{
672
+ isSignal: true,
673
+ alias: "invalid",
674
+ required: false
675
+ }]
676
+ }],
677
+ maxLength: [{
678
+ type: i0.Input,
679
+ args: [{
680
+ isSignal: true,
681
+ alias: "maxLength",
682
+ required: false
683
+ }]
684
+ }],
685
+ minLength: [{
686
+ type: i0.Input,
687
+ args: [{
688
+ isSignal: true,
689
+ alias: "minLength",
690
+ required: false
691
+ }]
692
+ }],
693
+ name: [{
694
+ type: i0.Input,
695
+ args: [{
696
+ isSignal: true,
697
+ alias: "name",
698
+ required: false
699
+ }]
700
+ }],
701
+ placeholder: [{
702
+ type: i0.Input,
703
+ args: [{
704
+ isSignal: true,
705
+ alias: "placeholder",
706
+ required: false
707
+ }]
708
+ }],
709
+ readonly: [{
710
+ type: i0.Input,
711
+ args: [{
712
+ isSignal: true,
713
+ alias: "readonly",
714
+ required: false
715
+ }]
716
+ }],
717
+ required: [{
718
+ type: i0.Input,
719
+ args: [{
720
+ isSignal: true,
721
+ alias: "required",
722
+ required: false
723
+ }]
724
+ }],
725
+ rounded: [{
726
+ type: i0.Input,
727
+ args: [{
728
+ isSignal: true,
729
+ alias: "rounded",
730
+ required: false
731
+ }]
732
+ }],
733
+ size: [{
734
+ type: i0.Input,
735
+ args: [{
736
+ isSignal: true,
737
+ alias: "size",
738
+ required: false
739
+ }]
740
+ }],
741
+ touch: [{
742
+ type: i0.Output,
743
+ args: ["touch"]
744
+ }],
745
+ touched: [{
746
+ type: i0.Input,
747
+ args: [{
748
+ isSignal: true,
749
+ alias: "touched",
750
+ required: false
751
+ }]
752
+ }],
753
+ type: [{
754
+ type: i0.Input,
755
+ args: [{
756
+ isSignal: true,
757
+ alias: "type",
758
+ required: false
759
+ }]
760
+ }],
761
+ userClass: [{
762
+ type: i0.Input,
763
+ args: [{
764
+ isSignal: true,
765
+ alias: "class",
766
+ required: false
767
+ }]
768
+ }],
769
+ value: [{
770
+ type: i0.Input,
771
+ args: [{
772
+ isSignal: true,
773
+ alias: "value",
774
+ required: false
775
+ }]
776
+ }, {
777
+ type: i0.Output,
778
+ args: ["valueChange"]
779
+ }]
780
+ }
781
+ });
782
+ var TextBoxDirective = class TextBoxDirective {
783
+ constructor() {
784
+ this.classes = computed(() => {
785
+ const rounded = this.rounded();
786
+ const size = this.size();
787
+ const classes = inputThemeVariants({
788
+ rounded,
789
+ size
790
+ });
791
+ const userClass = this.userClass();
792
+ return twMerge(classes, userClass);
793
+ }, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
794
+ this.inputInvalid = computed(() => this.touched() && this.invalid(), ...ngDevMode ? [{ debugName: "inputInvalid" }] : /* istanbul ignore next */ []);
795
+ this.invalid = input(false, {
796
+ ...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
797
+ transform: booleanAttribute
798
+ });
799
+ this.rounded = input("medium", ...ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []);
800
+ this.size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
801
+ this.touched = input(false, {
802
+ ...ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {},
803
+ transform: booleanAttribute
804
+ });
805
+ this.userClass = input("", {
806
+ ...ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {},
807
+ alias: "class"
808
+ });
809
+ }
810
+ static {
811
+ this.ɵfac = i0.ɵɵngDeclareFactory({
812
+ minVersion: "12.0.0",
813
+ version: "22.2.6",
814
+ ngImport: i0,
815
+ type: TextBoxDirective,
816
+ deps: [],
817
+ target: i0.ɵɵFactoryTarget.Directive
818
+ });
819
+ }
820
+ static {
821
+ this.ɵdir = i0.ɵɵngDeclareDirective({
822
+ minVersion: "17.1.0",
823
+ version: "22.2.6",
824
+ type: TextBoxDirective,
825
+ isStandalone: true,
826
+ selector: "input[monaTextBox]",
827
+ inputs: {
828
+ invalid: {
829
+ classPropertyName: "invalid",
830
+ publicName: "invalid",
831
+ isSignal: true,
832
+ isRequired: false,
833
+ transformFunction: null
834
+ },
835
+ rounded: {
836
+ classPropertyName: "rounded",
837
+ publicName: "rounded",
838
+ isSignal: true,
839
+ isRequired: false,
840
+ transformFunction: null
841
+ },
842
+ size: {
843
+ classPropertyName: "size",
844
+ publicName: "size",
845
+ isSignal: true,
846
+ isRequired: false,
847
+ transformFunction: null
848
+ },
849
+ touched: {
850
+ classPropertyName: "touched",
851
+ publicName: "touched",
852
+ isSignal: true,
853
+ isRequired: false,
854
+ transformFunction: null
855
+ },
856
+ userClass: {
857
+ classPropertyName: "userClass",
858
+ publicName: "class",
859
+ isSignal: true,
860
+ isRequired: false,
861
+ transformFunction: null
862
+ }
863
+ },
864
+ host: { properties: {
865
+ "attr.aria-invalid": "inputInvalid() || null",
866
+ "attr.data-invalid": "inputInvalid() || null",
867
+ "class": "classes()"
868
+ } },
869
+ ngImport: i0
870
+ });
871
+ }
872
+ };
873
+ i0.ɵɵngDeclareClassMetadata({
874
+ minVersion: "12.0.0",
875
+ version: "22.2.6",
876
+ ngImport: i0,
877
+ type: TextBoxDirective,
878
+ decorators: [{
879
+ type: Directive,
880
+ args: [{
881
+ selector: "input[monaTextBox]",
882
+ host: {
883
+ "[attr.aria-invalid]": "inputInvalid() || null",
884
+ "[attr.data-invalid]": "inputInvalid() || null",
885
+ "[class]": "classes()"
886
+ }
887
+ }]
888
+ }],
889
+ propDecorators: {
890
+ invalid: [{
891
+ type: i0.Input,
892
+ args: [{
893
+ isSignal: true,
894
+ alias: "invalid",
895
+ required: false
896
+ }]
897
+ }],
898
+ rounded: [{
899
+ type: i0.Input,
900
+ args: [{
901
+ isSignal: true,
902
+ alias: "rounded",
903
+ required: false
904
+ }]
905
+ }],
906
+ size: [{
907
+ type: i0.Input,
908
+ args: [{
909
+ isSignal: true,
910
+ alias: "size",
911
+ required: false
912
+ }]
913
+ }],
914
+ touched: [{
915
+ type: i0.Input,
916
+ args: [{
917
+ isSignal: true,
918
+ alias: "touched",
919
+ required: false
920
+ }]
921
+ }],
922
+ userClass: [{
923
+ type: i0.Input,
924
+ args: [{
925
+ isSignal: true,
926
+ alias: "class",
927
+ required: false
928
+ }]
929
+ }]
930
+ }
133
931
  });
134
-
135
- /** Input types that support `setSelectionRange`; `email` throws. */
136
- const selectableInputTypes = new Set(["password", "search", "tel", "text", "url"]);
137
- class TextBoxComponent {
138
- constructor() {
139
- this.#hostElementRef = inject(ElementRef);
140
- this.#i18n = inject(MonaI18nService);
141
- this.#label = injectLabelAssociation({
142
- ariaLabel: () => this.ariaLabel(),
143
- ariaLabelledBy: () => this.ariaLabelledBy()
144
- });
145
- this.classes = computed(() => {
146
- const rounded = this.rounded();
147
- const size = this.size();
148
- const classes = textBoxThemeVariants({ rounded, size });
149
- const userClass = this.userClass();
150
- return twMerge(classes, userClass);
151
- }, /* @ts-ignore */
152
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
153
- this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled());
154
- this.inputRef = viewChild.required("input", /* @ts-ignore */
155
- ...(ngDevMode ? [{ debugName: "inputRef" }] : /* istanbul ignore next */ []));
156
- this.invalidInput = computed(() => this.touched() && (this.invalid() || (this.required() && !this.value())), /* @ts-ignore */
157
- ...(ngDevMode ? [{ debugName: "invalidInput" }] : /* istanbul ignore next */ []));
158
- this.labelledBy = this.#label.labelledBy;
159
- this.messages = this.#i18n.componentMessages("textBox", TEXT_BOX_DEFAULT_MESSAGES);
160
- this.prefixTemplateList = contentChildren(TextBoxPrefixTemplateDirective, { ...(ngDevMode ? { debugName: "prefixTemplateList" } : /* istanbul ignore next */ {}), read: TemplateRef });
161
- this.showClearButton = computed(() => this.clearButton() && !this.effectiveDisabled() && !this.readonly() && !!this.value(), /* @ts-ignore */
162
- ...(ngDevMode ? [{ debugName: "showClearButton" }] : /* istanbul ignore next */ []));
163
- this.suffixTemplateList = contentChildren(TextBoxSuffixTemplateDirective, { ...(ngDevMode ? { debugName: "suffixTemplateList" } : /* istanbul ignore next */ {}), read: TemplateRef });
164
- /**
165
- * @description Id of an element that describes the inner input, such as a hint or an error message.
166
- * @default ""
167
- */
168
- this.ariaDescribedBy = input("", { ...(ngDevMode ? { debugName: "ariaDescribedBy" } : /* istanbul ignore next */ {}), alias: "aria-describedby" });
169
- /**
170
- * @description Accessible name of the inner input. Prefer a visible label, linked through {@link inputId} or
171
- * `aria-labelledby`; the placeholder is not a label.
172
- * @default ""
173
- */
174
- this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
175
- /**
176
- * @description Id of the element that labels the inner input.
177
- * @default ""
178
- */
179
- this.ariaLabelledBy = input("", { ...(ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {}), alias: "aria-labelledby" });
180
- /**
181
- * @description Displays a clear button that resets the value to empty.
182
- * The button is hidden while the value is empty or the text box is disabled or read-only.
183
- * @default false
184
- */
185
- this.clearButton = input(false, { ...(ngDevMode ? { debugName: "clearButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
186
- /**
187
- * @description Renders the component with reduced visual emphasis and removes pointer interaction.
188
- * @default false
189
- */
190
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
191
- /**
192
- * @description Additional HTML attributes applied directly to the inner `<input>` element.
193
- * @default {}
194
- */
195
- this.inputAttributes = input({}, /* @ts-ignore */
196
- ...(ngDevMode ? [{ debugName: "inputAttributes" }] : /* istanbul ignore next */ []));
197
- /**
198
- * @description Emitted when the inner input loses focus, including when focus moves to the clear button or to
199
- * content in the prefix or suffix templates.
200
- */
201
- this.inputBlur = output();
202
- /**
203
- * @description Additional CSS classes applied to the inner `<input>` element.
204
- * @default ""
205
- */
206
- this.inputClass = input("", /* @ts-ignore */
207
- ...(ngDevMode ? [{ debugName: "inputClass" }] : /* istanbul ignore next */ []));
208
- /**
209
- * @description Emitted when the inner input gains focus.
210
- */
211
- this.inputFocus = output();
212
- /**
213
- * @description Id of the inner `<input>` element. Point a `<label for>` or `<mona-label for>` at it to label the
214
- * text box. A unique id is generated when it isn't set.
215
- * @default generated
216
- */
217
- this.inputId = input(createElementControlId(), /* @ts-ignore */
218
- ...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
219
- /**
220
- * @description Inline styles applied to the inner `<input>` element.
221
- * Accepts a style string or a `CSSStyleDeclaration` partial.
222
- * @default null
223
- */
224
- this.inputStyle = input(null, /* @ts-ignore */
225
- ...(ngDevMode ? [{ debugName: "inputStyle" }] : /* istanbul ignore next */ []));
226
- /**
227
- * @description Marks the text box as invalid. When bound to a signal form field via `[formField]`,
228
- * this is written by the `FormField` directive.
229
- * @default false
230
- */
231
- this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
232
- /**
233
- * @description Maximum number of characters, set as `maxlength` on the inner input. When bound to a signal form
234
- * field via `[formField]`, this is written from the field's `maxLength` rule.
235
- * @default undefined
236
- */
237
- this.maxLength = input(undefined, /* @ts-ignore */
238
- ...(ngDevMode ? [{ debugName: "maxLength" }] : /* istanbul ignore next */ []));
239
- /**
240
- * @description Minimum number of characters, set as `minlength` on the inner input. When bound to a signal form
241
- * field via `[formField]`, this is written from the field's `minLength` rule.
242
- * @default undefined
243
- */
244
- this.minLength = input(undefined, /* @ts-ignore */
245
- ...(ngDevMode ? [{ debugName: "minLength" }] : /* istanbul ignore next */ []));
246
- /**
247
- * @description Name of the inner input, used by browsers and password managers for autofill. When bound to a
248
- * signal form field via `[formField]`, this is written by the `FormField` directive.
249
- * @default ""
250
- */
251
- this.name = input("", /* @ts-ignore */
252
- ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
253
- /**
254
- * @description Placeholder text shown when no value has been entered.
255
- * @default ""
256
- */
257
- this.placeholder = input("", /* @ts-ignore */
258
- ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
259
- /**
260
- * @description Prevents value changes while preserving the component's visual state.
261
- * @default false
262
- */
263
- this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
264
- /**
265
- * @description Marks the text box as required.
266
- * Triggers the invalid state when the value is empty and the field has been touched.
267
- * @default false
268
- */
269
- this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
270
- /**
271
- * @description Border-radius preset applied to the component.
272
- * @default "medium"
273
- */
274
- this.rounded = input("medium", /* @ts-ignore */
275
- ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
276
- /**
277
- * @description Size preset controlling the component's dimensions.
278
- * @default "medium"
279
- */
280
- this.size = input("medium", /* @ts-ignore */
281
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
282
- /**
283
- * @description Emitted when focus leaves the text box, including its clear button and prefix and suffix content.
284
- * Form directives (`[formField]`, `ngModel`, `formControl`) listen to this to mark the field as touched.
285
- */
286
- this.touch = output();
287
- /**
288
- * @description Sets the touched state of the text box. When bound to a signal form field via `[formField]`,
289
- * this is written by the `FormField` directive.
290
- * @default false
291
- */
292
- this.touched = input(false, { ...(ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
293
- /**
294
- * @description Sets the `type` attribute of the inner `<input>` element.
295
- * @default "text"
296
- */
297
- this.type = input("text", /* @ts-ignore */
298
- ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
299
- /**
300
- * @description Additional CSS classes merged onto the host element via `tailwind-merge`.
301
- * @default ""
302
- */
303
- this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
304
- /**
305
- * @description Two-way bindable current value of the text box.
306
- * @default ""
307
- */
308
- this.value = model("", /* @ts-ignore */
309
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
310
- }
311
- #hostElementRef;
312
- #i18n;
313
- #label;
314
- /**
315
- * Focuses the inner input and places the caret after the value, so the end of a long value is in view.
316
- * @param options Options passed to the native `focus()` call, such as `preventScroll`.
317
- */
318
- focus(options) {
319
- const input = this.inputRef().nativeElement;
320
- input.focus(options);
321
- if (selectableInputTypes.has(input.type)) {
322
- const end = input.value.length;
323
- input.setSelectionRange(end, end);
324
- }
325
- }
326
- onClearClick() {
327
- this.value.set("");
328
- this.inputRef().nativeElement.focus();
329
- }
330
- onInputBlur(event) {
331
- this.inputBlur.emit(event);
332
- }
333
- onValueChange(value) {
334
- this.value.set(value);
335
- }
336
- /**
337
- * @internal
338
- */
339
- setLabelledBy(id) {
340
- this.#label.setLabelledBy(id);
341
- }
342
- onFocusOut(event) {
343
- const nextTarget = event.relatedTarget;
344
- if (nextTarget instanceof Node && this.#hostElementRef.nativeElement.contains(nextTarget)) {
345
- return;
346
- }
347
- this.touch.emit();
348
- }
349
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TextBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
350
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: TextBoxComponent, isStandalone: true, selector: "mona-text-box", inputs: { ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, clearButton: { classPropertyName: "clearButton", publicName: "clearButton", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, inputAttributes: { classPropertyName: "inputAttributes", publicName: "inputAttributes", isSignal: true, isRequired: false, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, inputStyle: { classPropertyName: "inputStyle", publicName: "inputStyle", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { inputBlur: "inputBlur", inputFocus: "inputFocus", touch: "touch", value: "valueChange" }, host: { listeners: { "focusout": "onFocusOut($event)" }, properties: { "attr.aria-describedby": "null", "attr.aria-label": "null", "attr.aria-labelledby": "null", "attr.data-disabled": "effectiveDisabled() || null", "attr.data-readonly": "readonly() || null", "attr.data-required": "required() || null", "attr.data-invalid": "invalidInput() || null", "class": "classes()" } }, queries: [{ propertyName: "prefixTemplateList", predicate: TextBoxPrefixTemplateDirective, read: TemplateRef, isSignal: true }, { propertyName: "suffixTemplateList", predicate: TextBoxSuffixTemplateDirective, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: "@for (prefixTemplate of prefixTemplateList(); track $index) {\n <span class=\"flex h-full flex-wrap items-center\">\n <ng-container *ngTemplateOutlet=\"prefixTemplate\"></ng-container>\n </span>\n}\n<input\n [id]=\"inputId()\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [placeholder]=\"placeholder()\"\n [type]=\"type()\"\n [class]=\"inputClass()\"\n [style]=\"inputStyle()\"\n [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n [attr.aria-invalid]=\"invalidInput() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.minlength]=\"minLength() ?? null\"\n [attr.name]=\"name() || null\"\n [monaAttributeBinder]=\"inputAttributes()\"\n [value]=\"value()\"\n (input)=\"onValueChange(input.value)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"inputFocus.emit($event)\"\n #input />\n\n@if (showClearButton()) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n class=\"me-1 size-6 shrink-0 p-0 text-muted-foreground hover:text-foreground\"\n [attr.aria-label]=\"messages().clear\"\n (click)=\"onClearClick()\">\n <svg lucideX class=\"size-4\"></svg>\n </button>\n}\n\n@for (suffixTemplate of suffixTemplateList(); track $index) {\n <span class=\"flex h-full flex-wrap items-center\">\n <ng-container *ngTemplateOutlet=\"suffixTemplate\"></ng-container>\n </span>\n}\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: ButtonDirective, selector: "button[monaButton]", inputs: ["aria-haspopup", "disabled", "iconOnly", "loading", "look", "rounded", "selected", "size", "tabindex", "toggleable", "type", "class", "value"], outputs: ["lookChange", "selectedChange"] }, { kind: "directive", type: AttributeBinderDirective, selector: "[monaAttributeBinder]", inputs: ["monaAttributeBinder"] }, { kind: "component", type: LucideX, selector: "svg[lucideX]" }] }); }
351
- }
352
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TextBoxComponent, decorators: [{
353
- type: Component,
354
- args: [{ selector: "mona-text-box", imports: [NgTemplateOutlet, ButtonDirective, AttributeBinderDirective, LucideX], host: {
355
- // The ARIA inputs below are applied to the inner input, so the host must not keep the static attributes.
356
- "[attr.aria-describedby]": "null",
357
- "[attr.aria-label]": "null",
358
- "[attr.aria-labelledby]": "null",
359
- "[attr.data-disabled]": "effectiveDisabled() || null",
360
- "[attr.data-readonly]": "readonly() || null",
361
- "[attr.data-required]": "required() || null",
362
- "[attr.data-invalid]": "invalidInput() || null",
363
- "[class]": "classes()",
364
- "(focusout)": "onFocusOut($event)"
365
- }, template: "@for (prefixTemplate of prefixTemplateList(); track $index) {\n <span class=\"flex h-full flex-wrap items-center\">\n <ng-container *ngTemplateOutlet=\"prefixTemplate\"></ng-container>\n </span>\n}\n<input\n [id]=\"inputId()\"\n [disabled]=\"effectiveDisabled()\"\n [readonly]=\"readonly()\"\n [required]=\"required()\"\n [placeholder]=\"placeholder()\"\n [type]=\"type()\"\n [class]=\"inputClass()\"\n [style]=\"inputStyle()\"\n [attr.aria-describedby]=\"ariaDescribedBy() || null\"\n [attr.aria-invalid]=\"invalidInput() ? 'true' : null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.maxlength]=\"maxLength() ?? null\"\n [attr.minlength]=\"minLength() ?? null\"\n [attr.name]=\"name() || null\"\n [monaAttributeBinder]=\"inputAttributes()\"\n [value]=\"value()\"\n (input)=\"onValueChange(input.value)\"\n (blur)=\"onInputBlur($event)\"\n (focus)=\"inputFocus.emit($event)\"\n #input />\n\n@if (showClearButton()) {\n <button\n monaButton\n look=\"ghost\"\n size=\"small\"\n class=\"me-1 size-6 shrink-0 p-0 text-muted-foreground hover:text-foreground\"\n [attr.aria-label]=\"messages().clear\"\n (click)=\"onClearClick()\">\n <svg lucideX class=\"size-4\"></svg>\n </button>\n}\n\n@for (suffixTemplate of suffixTemplateList(); track $index) {\n <span class=\"flex h-full flex-wrap items-center\">\n <ng-container *ngTemplateOutlet=\"suffixTemplate\"></ng-container>\n </span>\n}\n" }]
366
- }], propDecorators: { inputRef: [{ type: i0.ViewChild, args: ["input", { isSignal: true }] }], prefixTemplateList: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TextBoxPrefixTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], suffixTemplateList: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => TextBoxSuffixTemplateDirective), { ...{ read: TemplateRef }, isSignal: true }] }], ariaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], clearButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearButton", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], inputAttributes: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputAttributes", required: false }] }], inputBlur: [{ type: i0.Output, args: ["inputBlur"] }], inputClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputClass", required: false }] }], inputFocus: [{ type: i0.Output, args: ["inputFocus"] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], inputStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyle", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
367
-
368
- class TextBoxDirective {
369
- constructor() {
370
- this.classes = computed(() => {
371
- const rounded = this.rounded();
372
- const size = this.size();
373
- const classes = inputThemeVariants({ rounded, size });
374
- const userClass = this.userClass();
375
- return twMerge(classes, userClass);
376
- }, /* @ts-ignore */
377
- ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
378
- this.inputInvalid = computed(() => this.touched() && this.invalid(), /* @ts-ignore */
379
- ...(ngDevMode ? [{ debugName: "inputInvalid" }] : /* istanbul ignore next */ []));
380
- /**
381
- * @description Marks the input as invalid, triggering error border and ring styling.
382
- * @default false
383
- */
384
- this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
385
- /**
386
- * @description Border-radius preset applied to the component.
387
- * @default "medium"
388
- */
389
- this.rounded = input("medium", /* @ts-ignore */
390
- ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
391
- /**
392
- * @description Size preset controlling the component's dimensions.
393
- * @default "medium"
394
- */
395
- this.size = input("medium", /* @ts-ignore */
396
- ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
397
- /**
398
- * @description Marks the input as touched. Error styling is only shown when both `invalid` and `touched` are `true`.
399
- * @default false
400
- */
401
- this.touched = input(false, { ...(ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
402
- /**
403
- * @description Additional CSS classes merged onto the host element via `tailwind-merge`.
404
- * @default ""
405
- */
406
- this.userClass = input("", { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: "class" });
407
- }
408
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TextBoxDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
409
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: TextBoxDirective, isStandalone: true, selector: "input[monaTextBox]", inputs: { invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-invalid": "inputInvalid() || null", "attr.data-invalid": "inputInvalid() || null", "class": "classes()" } }, ngImport: i0 }); }
410
- }
411
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: TextBoxDirective, decorators: [{
412
- type: Directive,
413
- args: [{
414
- selector: "input[monaTextBox]",
415
- host: {
416
- "[attr.aria-invalid]": "inputInvalid() || null",
417
- "[attr.data-invalid]": "inputInvalid() || null",
418
- "[class]": "classes()"
419
- }
420
- }]
421
- }], propDecorators: { invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
422
-
423
- /*
424
- * Public API Surface of @nanahoshi/mona-ui/text-box
425
- */
426
-
427
- /**
428
- * Generated bundle index. Do not edit.
429
- */
430
-
431
932
  export { TEXT_BOX_DEFAULT_MESSAGES, TextBoxComponent, TextBoxDirective, TextBoxPrefixTemplateDirective, TextBoxSuffixTemplateDirective };
432
- //# sourceMappingURL=nanahoshi-mona-ui-text-box.mjs.map
933
+
934
+ //# sourceMappingURL=nanahoshi-mona-ui-text-box.mjs.map