@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,17 +1,13 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, DOCUMENT, ElementRef, computed, signal, input, booleanAttribute, output, model, Component } from '@angular/core';
3
- import { injectComponentDirection, MonaI18nService } from '@nanahoshi/mona-ui/i18n';
4
- import { injectLabelAssociation, injectEffectiveDisabled, colorKey } from '@nanahoshi/mona-ui/internal';
5
- import { cva } from 'class-variance-authority';
6
-
7
- // Generated from i18n/catalogs/en-US.messages.json by scripts/generate-locale-catalogs.ts. Do not edit.
8
- // Edit the JSON file and run `npm run generate:locale-catalogs`.
1
+ import * as i0 from "@angular/core";
2
+ import { Component, DOCUMENT, ElementRef, booleanAttribute, computed, inject, input, model, output, signal } from "@angular/core";
3
+ import { MonaI18nService, injectComponentDirection } from "@nanahoshi/mona-ui/i18n";
4
+ import { colorKey, injectEffectiveDisabled, injectLabelAssociation } from "@nanahoshi/mona-ui/internal";
5
+ import { cva } from "class-variance-authority";
9
6
  const COLOR_PALETTE_DEFAULT_MESSAGES = {
10
- color: (color) => `Color ${color}`,
11
- colorPalette: "Color palette",
12
- namedColor: (name, color) => `${name}, ${color}`
7
+ color: (color) => `Color ${color}`,
8
+ colorPalette: "Color palette",
9
+ namedColor: (name, color) => `${name}, ${color}`
13
10
  };
14
-
15
11
  const colorPaletteBaseThemeVariants = cva(`
16
12
  grid gap-0.125 p-0.0625
17
13
  data-[disabled='true']:pointer-events-none
@@ -37,957 +33,1116 @@ const colorPaletteItemThemeVariants = cva(`
37
33
  focus-visible:border-2 focus-visible:border-black/90
38
34
  focus-visible:outline focus-visible:outline-2 focus-visible:outline-white/90!
39
35
  focus-visible:shadow-[0_0_0_4px_rgb(0_0_0/0.9)]
40
- `, {
41
- variants: {
42
- rounded: {
43
- none: "rounded-none",
44
- small: "rounded-sm",
45
- medium: "rounded",
46
- large: "rounded-lg",
47
- full: "rounded-full"
48
- }
49
- }
50
- });
51
-
36
+ `, { variants: { rounded: {
37
+ none: "rounded-none",
38
+ small: "rounded-sm",
39
+ medium: "rounded",
40
+ large: "rounded-lg",
41
+ full: "rounded-full"
42
+ } } });
52
43
  const flatColorScheme = {
53
- name: "flat",
54
- columns: 20,
55
- colors: [
56
- "#F9EBEA",
57
- "#FDEDEC",
58
- "#F5EEF8",
59
- "#F4ECF7",
60
- "#EAF2F8",
61
- "#EBF5FB",
62
- "#E8F8F5",
63
- "#E8F6F3",
64
- "#E9F7EF",
65
- "#EAFAF1",
66
- "#FEF9E7",
67
- "#FEF5E7",
68
- "#FDF2E9",
69
- "#FBEEE6",
70
- "#FDFEFE",
71
- "#F8F9F9",
72
- "#F4F6F6",
73
- "#F2F4F4",
74
- "#EBEDEF",
75
- "#EAECEE",
76
- "#F2D7D5",
77
- "#FADBD8",
78
- "#EBDEF0",
79
- "#E8DAEF",
80
- "#D4E6F1",
81
- "#D6EAF8",
82
- "#D1F2EB",
83
- "#D0ECE7",
84
- "#D4EFDF",
85
- "#D5F5E3",
86
- "#FCF3CF",
87
- "#FDEBD0",
88
- "#FAE5D3",
89
- "#F6DDCC",
90
- "#FBFCFC",
91
- "#F2F3F4",
92
- "#EAEDED",
93
- "#E5E8E8",
94
- "#D6DBDF",
95
- "#D5D8DC",
96
- "#E6B0AA",
97
- "#F5B7B1",
98
- "#D7BDE2",
99
- "#D2B4DE",
100
- "#A9CCE3",
101
- "#AED6F1",
102
- "#A3E4D7",
103
- "#A2D9CE",
104
- "#A9DFBF",
105
- "#ABEBC6",
106
- "#F9E79F",
107
- "#FAD7A0",
108
- "#F5CBA7",
109
- "#EDBB99",
110
- "#F7F9F9",
111
- "#E5E7E9",
112
- "#D5DBDB",
113
- "#CCD1D1",
114
- "#AEB6BF",
115
- "#ABB2B9",
116
- "#D98880",
117
- "#F1948A",
118
- "#C39BD3",
119
- "#BB8FCE",
120
- "#7FB3D5",
121
- "#85C1E9",
122
- "#76D7C4",
123
- "#73C6B6",
124
- "#7DCEA0",
125
- "#82E0AA",
126
- "#F7DC6F",
127
- "#F8C471",
128
- "#F0B27A",
129
- "#E59866",
130
- "#F4F6F7",
131
- "#D7DBDD",
132
- "#BFC9CA",
133
- "#B2BABB",
134
- "#85929E",
135
- "#808B96",
136
- "#CD6155",
137
- "#EC7063",
138
- "#AF7AC5",
139
- "#A569BD",
140
- "#5499C7",
141
- "#5DADE2",
142
- "#48C9B0",
143
- "#45B39D",
144
- "#52BE80",
145
- "#58D68D",
146
- "#F4D03F",
147
- "#F5B041",
148
- "#EB984E",
149
- "#DC7633",
150
- "#F0F3F4",
151
- "#CACFD2",
152
- "#AAB7B8",
153
- "#99A3A4",
154
- "#5D6D7E",
155
- "#566573",
156
- "#C0392B",
157
- "#E74C3C",
158
- "#9B59B6",
159
- "#8E44AD",
160
- "#2980B9",
161
- "#3498DB",
162
- "#1ABC9C",
163
- "#16A085",
164
- "#27AE60",
165
- "#2ECC71",
166
- "#F1C40F",
167
- "#F39C12",
168
- "#E67E22",
169
- "#D35400",
170
- "#ECF0F1",
171
- "#BDC3C7",
172
- "#95A5A6",
173
- "#7F8C8D",
174
- "#34495E",
175
- "#2C3E50",
176
- "#A93226",
177
- "#CB4335",
178
- "#884EA0",
179
- "#7D3C98",
180
- "#2471A3",
181
- "#2E86C1",
182
- "#17A589",
183
- "#138D75",
184
- "#229954",
185
- "#28B463",
186
- "#D4AC0D",
187
- "#D68910",
188
- "#CA6F1E",
189
- "#BA4A00",
190
- "#D0D3D4",
191
- "#A6ACAF",
192
- "#839192",
193
- "#707B7C",
194
- "#2E4053",
195
- "#273746",
196
- "#922B21",
197
- "#B03A2E",
198
- "#76448A",
199
- "#6C3483",
200
- "#1F618D",
201
- "#2874A6",
202
- "#148F77",
203
- "#117A65",
204
- "#1E8449",
205
- "#239B56",
206
- "#B7950B",
207
- "#B9770E",
208
- "#AF601A",
209
- "#A04000",
210
- "#B3B6B7",
211
- "#909497",
212
- "#717D7E",
213
- "#616A6B",
214
- "#283747",
215
- "#212F3D",
216
- "#7B241C",
217
- "#943126",
218
- "#633974",
219
- "#5B2C6F",
220
- "#1A5276",
221
- "#21618C",
222
- "#117864",
223
- "#0E6655",
224
- "#196F3D",
225
- "#1D8348",
226
- "#9A7D0A",
227
- "#9C640C",
228
- "#935116",
229
- "#873600",
230
- "#979A9A",
231
- "#797D7F",
232
- "#5F6A6A",
233
- "#515A5A",
234
- "#212F3C",
235
- "#1C2833",
236
- "#641E16",
237
- "#78281F",
238
- "#512E5F",
239
- "#4A235A",
240
- "#154360",
241
- "#1B4F72",
242
- "#0E6251",
243
- "#0B5345",
244
- "#145A32",
245
- "#186A3B",
246
- "#7D6608",
247
- "#7E5109",
248
- "#784212",
249
- "#6E2C00",
250
- "#7B7D7D",
251
- "#626567",
252
- "#4D5656",
253
- "#424949",
254
- "#1B2631",
255
- "#17202A"
256
- ]
44
+ name: "flat",
45
+ columns: 20,
46
+ colors: [
47
+ "#F9EBEA",
48
+ "#FDEDEC",
49
+ "#F5EEF8",
50
+ "#F4ECF7",
51
+ "#EAF2F8",
52
+ "#EBF5FB",
53
+ "#E8F8F5",
54
+ "#E8F6F3",
55
+ "#E9F7EF",
56
+ "#EAFAF1",
57
+ "#FEF9E7",
58
+ "#FEF5E7",
59
+ "#FDF2E9",
60
+ "#FBEEE6",
61
+ "#FDFEFE",
62
+ "#F8F9F9",
63
+ "#F4F6F6",
64
+ "#F2F4F4",
65
+ "#EBEDEF",
66
+ "#EAECEE",
67
+ "#F2D7D5",
68
+ "#FADBD8",
69
+ "#EBDEF0",
70
+ "#E8DAEF",
71
+ "#D4E6F1",
72
+ "#D6EAF8",
73
+ "#D1F2EB",
74
+ "#D0ECE7",
75
+ "#D4EFDF",
76
+ "#D5F5E3",
77
+ "#FCF3CF",
78
+ "#FDEBD0",
79
+ "#FAE5D3",
80
+ "#F6DDCC",
81
+ "#FBFCFC",
82
+ "#F2F3F4",
83
+ "#EAEDED",
84
+ "#E5E8E8",
85
+ "#D6DBDF",
86
+ "#D5D8DC",
87
+ "#E6B0AA",
88
+ "#F5B7B1",
89
+ "#D7BDE2",
90
+ "#D2B4DE",
91
+ "#A9CCE3",
92
+ "#AED6F1",
93
+ "#A3E4D7",
94
+ "#A2D9CE",
95
+ "#A9DFBF",
96
+ "#ABEBC6",
97
+ "#F9E79F",
98
+ "#FAD7A0",
99
+ "#F5CBA7",
100
+ "#EDBB99",
101
+ "#F7F9F9",
102
+ "#E5E7E9",
103
+ "#D5DBDB",
104
+ "#CCD1D1",
105
+ "#AEB6BF",
106
+ "#ABB2B9",
107
+ "#D98880",
108
+ "#F1948A",
109
+ "#C39BD3",
110
+ "#BB8FCE",
111
+ "#7FB3D5",
112
+ "#85C1E9",
113
+ "#76D7C4",
114
+ "#73C6B6",
115
+ "#7DCEA0",
116
+ "#82E0AA",
117
+ "#F7DC6F",
118
+ "#F8C471",
119
+ "#F0B27A",
120
+ "#E59866",
121
+ "#F4F6F7",
122
+ "#D7DBDD",
123
+ "#BFC9CA",
124
+ "#B2BABB",
125
+ "#85929E",
126
+ "#808B96",
127
+ "#CD6155",
128
+ "#EC7063",
129
+ "#AF7AC5",
130
+ "#A569BD",
131
+ "#5499C7",
132
+ "#5DADE2",
133
+ "#48C9B0",
134
+ "#45B39D",
135
+ "#52BE80",
136
+ "#58D68D",
137
+ "#F4D03F",
138
+ "#F5B041",
139
+ "#EB984E",
140
+ "#DC7633",
141
+ "#F0F3F4",
142
+ "#CACFD2",
143
+ "#AAB7B8",
144
+ "#99A3A4",
145
+ "#5D6D7E",
146
+ "#566573",
147
+ "#C0392B",
148
+ "#E74C3C",
149
+ "#9B59B6",
150
+ "#8E44AD",
151
+ "#2980B9",
152
+ "#3498DB",
153
+ "#1ABC9C",
154
+ "#16A085",
155
+ "#27AE60",
156
+ "#2ECC71",
157
+ "#F1C40F",
158
+ "#F39C12",
159
+ "#E67E22",
160
+ "#D35400",
161
+ "#ECF0F1",
162
+ "#BDC3C7",
163
+ "#95A5A6",
164
+ "#7F8C8D",
165
+ "#34495E",
166
+ "#2C3E50",
167
+ "#A93226",
168
+ "#CB4335",
169
+ "#884EA0",
170
+ "#7D3C98",
171
+ "#2471A3",
172
+ "#2E86C1",
173
+ "#17A589",
174
+ "#138D75",
175
+ "#229954",
176
+ "#28B463",
177
+ "#D4AC0D",
178
+ "#D68910",
179
+ "#CA6F1E",
180
+ "#BA4A00",
181
+ "#D0D3D4",
182
+ "#A6ACAF",
183
+ "#839192",
184
+ "#707B7C",
185
+ "#2E4053",
186
+ "#273746",
187
+ "#922B21",
188
+ "#B03A2E",
189
+ "#76448A",
190
+ "#6C3483",
191
+ "#1F618D",
192
+ "#2874A6",
193
+ "#148F77",
194
+ "#117A65",
195
+ "#1E8449",
196
+ "#239B56",
197
+ "#B7950B",
198
+ "#B9770E",
199
+ "#AF601A",
200
+ "#A04000",
201
+ "#B3B6B7",
202
+ "#909497",
203
+ "#717D7E",
204
+ "#616A6B",
205
+ "#283747",
206
+ "#212F3D",
207
+ "#7B241C",
208
+ "#943126",
209
+ "#633974",
210
+ "#5B2C6F",
211
+ "#1A5276",
212
+ "#21618C",
213
+ "#117864",
214
+ "#0E6655",
215
+ "#196F3D",
216
+ "#1D8348",
217
+ "#9A7D0A",
218
+ "#9C640C",
219
+ "#935116",
220
+ "#873600",
221
+ "#979A9A",
222
+ "#797D7F",
223
+ "#5F6A6A",
224
+ "#515A5A",
225
+ "#212F3C",
226
+ "#1C2833",
227
+ "#641E16",
228
+ "#78281F",
229
+ "#512E5F",
230
+ "#4A235A",
231
+ "#154360",
232
+ "#1B4F72",
233
+ "#0E6251",
234
+ "#0B5345",
235
+ "#145A32",
236
+ "#186A3B",
237
+ "#7D6608",
238
+ "#7E5109",
239
+ "#784212",
240
+ "#6E2C00",
241
+ "#7B7D7D",
242
+ "#626567",
243
+ "#4D5656",
244
+ "#424949",
245
+ "#1B2631",
246
+ "#17202A"
247
+ ]
257
248
  };
258
249
  const materialColorScheme = {
259
- name: "material",
260
- columns: 19,
261
- colors: [
262
- "#FFEBEE",
263
- "#FCE4EC",
264
- "#F3E5F5",
265
- "#EDE7F6",
266
- "#E8EAF6",
267
- "#E3F2FD",
268
- "#E1F5FE",
269
- "#E0F7FA",
270
- "#E0F2F1",
271
- "#E8F5E9",
272
- "#F1F8E9",
273
- "#F9FBE7",
274
- "#FFFDE7",
275
- "#FFF8E1",
276
- "#FFF3E0",
277
- "#FBE9E7",
278
- "#EFEBE9",
279
- "#FAFAFA",
280
- "#ECEFF1",
281
- "#FFCDD2",
282
- "#F8BBD0",
283
- "#E1BEE7",
284
- "#D1C4E9",
285
- "#C5CAE9",
286
- "#BBDEFB",
287
- "#B3E5FC",
288
- "#B2EBF2",
289
- "#B2DFDB",
290
- "#C8E6C9",
291
- "#DCEDC8",
292
- "#F0F4C3",
293
- "#FFF9C4",
294
- "#FFECB3",
295
- "#FFE0B2",
296
- "#FFCCBC",
297
- "#D7CCC8",
298
- "#F5F5F5",
299
- "#CFD8DC",
300
- "#EF9A9A",
301
- "#F48FB1",
302
- "#CE93D8",
303
- "#B39DDB",
304
- "#9FA8DA",
305
- "#90CAF9",
306
- "#81D4FA",
307
- "#80DEEA",
308
- "#80CBC4",
309
- "#A5D6A7",
310
- "#C5E1A5",
311
- "#E6EE9C",
312
- "#FFF59D",
313
- "#FFE082",
314
- "#FFCC80",
315
- "#FFAB91",
316
- "#BCAAA4",
317
- "#EEEEEE",
318
- "#B0BEC5",
319
- "#E57373",
320
- "#F06292",
321
- "#BA68C8",
322
- "#9575CD",
323
- "#7986CB",
324
- "#64B5F6",
325
- "#4FC3F7",
326
- "#4DD0E1",
327
- "#4DB6AC",
328
- "#81C784",
329
- "#AED581",
330
- "#DCE775",
331
- "#FFF176",
332
- "#FFD54F",
333
- "#FFB74D",
334
- "#FF8A65",
335
- "#A1887F",
336
- "#E0E0E0",
337
- "#90A4AE",
338
- "#EF5350",
339
- "#EC407A",
340
- "#AB47BC",
341
- "#7E57C2",
342
- "#5C6BC0",
343
- "#42A5F5",
344
- "#29B6F6",
345
- "#26C6DA",
346
- "#26A69A",
347
- "#66BB6A",
348
- "#9CCC65",
349
- "#D4E157",
350
- "#FFEE58",
351
- "#FFCA28",
352
- "#FFA726",
353
- "#FF7043",
354
- "#8D6E63",
355
- "#BDBDBD",
356
- "#78909C",
357
- "#F44336",
358
- "#E91E63",
359
- "#9C27B0",
360
- "#673AB7",
361
- "#3F51B5",
362
- "#2196F3",
363
- "#03A9F4",
364
- "#00BCD4",
365
- "#009688",
366
- "#4CAF50",
367
- "#8BC34A",
368
- "#CDDC39",
369
- "#FFEB3B",
370
- "#FFC107",
371
- "#FF9800",
372
- "#FF5722",
373
- "#795548",
374
- "#9E9E9E",
375
- "#607D8B",
376
- "#E53935",
377
- "#D81B60",
378
- "#8E24AA",
379
- "#5E35B1",
380
- "#3949AB",
381
- "#1E88E5",
382
- "#039BE5",
383
- "#00ACC1",
384
- "#00897B",
385
- "#43A047",
386
- "#7CB342",
387
- "#C0CA33",
388
- "#FDD835",
389
- "#FFB300",
390
- "#FB8C00",
391
- "#F4511E",
392
- "#6D4C41",
393
- "#757575",
394
- "#546E7A",
395
- "#D32F2F",
396
- "#C2185B",
397
- "#7B1FA2",
398
- "#512DA8",
399
- "#303F9F",
400
- "#1976D2",
401
- "#0288D1",
402
- "#0097A7",
403
- "#00796B",
404
- "#388E3C",
405
- "#689F38",
406
- "#AFB42B",
407
- "#FBC02D",
408
- "#FFA000",
409
- "#F57C00",
410
- "#E64A19",
411
- "#5D4037",
412
- "#616161",
413
- "#455A64",
414
- "#C62828",
415
- "#AD1457",
416
- "#6A1B9A",
417
- "#4527A0",
418
- "#283593",
419
- "#1565C0",
420
- "#0277BD",
421
- "#00838F",
422
- "#00695C",
423
- "#2E7D32",
424
- "#558B2F",
425
- "#9E9D24",
426
- "#F9A825",
427
- "#FF8F00",
428
- "#EF6C00",
429
- "#D84315",
430
- "#4E342E",
431
- "#424242",
432
- "#37474F",
433
- "#B71C1C",
434
- "#880E4F",
435
- "#4A148C",
436
- "#311B92",
437
- "#1A237E",
438
- "#0D47A1",
439
- "#01579B",
440
- "#006064",
441
- "#004D40",
442
- "#1B5E20",
443
- "#33691E",
444
- "#827717",
445
- "#F57F17",
446
- "#FF6F00",
447
- "#E65100",
448
- "#BF360C",
449
- "#3E2723",
450
- "#212121",
451
- "#263238"
452
- ]
250
+ name: "material",
251
+ columns: 19,
252
+ colors: [
253
+ "#FFEBEE",
254
+ "#FCE4EC",
255
+ "#F3E5F5",
256
+ "#EDE7F6",
257
+ "#E8EAF6",
258
+ "#E3F2FD",
259
+ "#E1F5FE",
260
+ "#E0F7FA",
261
+ "#E0F2F1",
262
+ "#E8F5E9",
263
+ "#F1F8E9",
264
+ "#F9FBE7",
265
+ "#FFFDE7",
266
+ "#FFF8E1",
267
+ "#FFF3E0",
268
+ "#FBE9E7",
269
+ "#EFEBE9",
270
+ "#FAFAFA",
271
+ "#ECEFF1",
272
+ "#FFCDD2",
273
+ "#F8BBD0",
274
+ "#E1BEE7",
275
+ "#D1C4E9",
276
+ "#C5CAE9",
277
+ "#BBDEFB",
278
+ "#B3E5FC",
279
+ "#B2EBF2",
280
+ "#B2DFDB",
281
+ "#C8E6C9",
282
+ "#DCEDC8",
283
+ "#F0F4C3",
284
+ "#FFF9C4",
285
+ "#FFECB3",
286
+ "#FFE0B2",
287
+ "#FFCCBC",
288
+ "#D7CCC8",
289
+ "#F5F5F5",
290
+ "#CFD8DC",
291
+ "#EF9A9A",
292
+ "#F48FB1",
293
+ "#CE93D8",
294
+ "#B39DDB",
295
+ "#9FA8DA",
296
+ "#90CAF9",
297
+ "#81D4FA",
298
+ "#80DEEA",
299
+ "#80CBC4",
300
+ "#A5D6A7",
301
+ "#C5E1A5",
302
+ "#E6EE9C",
303
+ "#FFF59D",
304
+ "#FFE082",
305
+ "#FFCC80",
306
+ "#FFAB91",
307
+ "#BCAAA4",
308
+ "#EEEEEE",
309
+ "#B0BEC5",
310
+ "#E57373",
311
+ "#F06292",
312
+ "#BA68C8",
313
+ "#9575CD",
314
+ "#7986CB",
315
+ "#64B5F6",
316
+ "#4FC3F7",
317
+ "#4DD0E1",
318
+ "#4DB6AC",
319
+ "#81C784",
320
+ "#AED581",
321
+ "#DCE775",
322
+ "#FFF176",
323
+ "#FFD54F",
324
+ "#FFB74D",
325
+ "#FF8A65",
326
+ "#A1887F",
327
+ "#E0E0E0",
328
+ "#90A4AE",
329
+ "#EF5350",
330
+ "#EC407A",
331
+ "#AB47BC",
332
+ "#7E57C2",
333
+ "#5C6BC0",
334
+ "#42A5F5",
335
+ "#29B6F6",
336
+ "#26C6DA",
337
+ "#26A69A",
338
+ "#66BB6A",
339
+ "#9CCC65",
340
+ "#D4E157",
341
+ "#FFEE58",
342
+ "#FFCA28",
343
+ "#FFA726",
344
+ "#FF7043",
345
+ "#8D6E63",
346
+ "#BDBDBD",
347
+ "#78909C",
348
+ "#F44336",
349
+ "#E91E63",
350
+ "#9C27B0",
351
+ "#673AB7",
352
+ "#3F51B5",
353
+ "#2196F3",
354
+ "#03A9F4",
355
+ "#00BCD4",
356
+ "#009688",
357
+ "#4CAF50",
358
+ "#8BC34A",
359
+ "#CDDC39",
360
+ "#FFEB3B",
361
+ "#FFC107",
362
+ "#FF9800",
363
+ "#FF5722",
364
+ "#795548",
365
+ "#9E9E9E",
366
+ "#607D8B",
367
+ "#E53935",
368
+ "#D81B60",
369
+ "#8E24AA",
370
+ "#5E35B1",
371
+ "#3949AB",
372
+ "#1E88E5",
373
+ "#039BE5",
374
+ "#00ACC1",
375
+ "#00897B",
376
+ "#43A047",
377
+ "#7CB342",
378
+ "#C0CA33",
379
+ "#FDD835",
380
+ "#FFB300",
381
+ "#FB8C00",
382
+ "#F4511E",
383
+ "#6D4C41",
384
+ "#757575",
385
+ "#546E7A",
386
+ "#D32F2F",
387
+ "#C2185B",
388
+ "#7B1FA2",
389
+ "#512DA8",
390
+ "#303F9F",
391
+ "#1976D2",
392
+ "#0288D1",
393
+ "#0097A7",
394
+ "#00796B",
395
+ "#388E3C",
396
+ "#689F38",
397
+ "#AFB42B",
398
+ "#FBC02D",
399
+ "#FFA000",
400
+ "#F57C00",
401
+ "#E64A19",
402
+ "#5D4037",
403
+ "#616161",
404
+ "#455A64",
405
+ "#C62828",
406
+ "#AD1457",
407
+ "#6A1B9A",
408
+ "#4527A0",
409
+ "#283593",
410
+ "#1565C0",
411
+ "#0277BD",
412
+ "#00838F",
413
+ "#00695C",
414
+ "#2E7D32",
415
+ "#558B2F",
416
+ "#9E9D24",
417
+ "#F9A825",
418
+ "#FF8F00",
419
+ "#EF6C00",
420
+ "#D84315",
421
+ "#4E342E",
422
+ "#424242",
423
+ "#37474F",
424
+ "#B71C1C",
425
+ "#880E4F",
426
+ "#4A148C",
427
+ "#311B92",
428
+ "#1A237E",
429
+ "#0D47A1",
430
+ "#01579B",
431
+ "#006064",
432
+ "#004D40",
433
+ "#1B5E20",
434
+ "#33691E",
435
+ "#827717",
436
+ "#F57F17",
437
+ "#FF6F00",
438
+ "#E65100",
439
+ "#BF360C",
440
+ "#3E2723",
441
+ "#212121",
442
+ "#263238"
443
+ ]
453
444
  };
454
445
  const websafeColorScheme = {
455
- name: "websafe",
456
- columns: 18,
457
- colors: [
458
- "#CCFF00",
459
- "#CCCC00",
460
- "#CC9900",
461
- "#CC6600",
462
- "#CC3300",
463
- "#CC0000",
464
- "#660000",
465
- "#663300",
466
- "#666600",
467
- "#669900",
468
- "#66CC00",
469
- "#66FF00",
470
- "#00FF00",
471
- "#00CC00",
472
- "#009900",
473
- "#006600",
474
- "#003300",
475
- "#000000",
476
- "#CCFF33",
477
- "#CCCC33",
478
- "#CC9933",
479
- "#CC6633",
480
- "#CC3333",
481
- "#CC0033",
482
- "#660033",
483
- "#663333",
484
- "#666633",
485
- "#669933",
486
- "#66CC33",
487
- "#66FF33",
488
- "#00FF33",
489
- "#00CC33",
490
- "#009933",
491
- "#006633",
492
- "#003333",
493
- "#000033",
494
- "#CCFF66",
495
- "#CCCC66",
496
- "#CC9966",
497
- "#CC6666",
498
- "#CC3366",
499
- "#CC0066",
500
- "#660066",
501
- "#663366",
502
- "#666666",
503
- "#669966",
504
- "#66CC66",
505
- "#66FF66",
506
- "#00FF66",
507
- "#00CC66",
508
- "#009966",
509
- "#006666",
510
- "#003366",
511
- "#000066",
512
- "#CCFF99",
513
- "#CCCC99",
514
- "#CC9999",
515
- "#CC6699",
516
- "#CC3399",
517
- "#CC0099",
518
- "#660099",
519
- "#663399",
520
- "#666699",
521
- "#669999",
522
- "#66CC99",
523
- "#66FF99",
524
- "#00FF99",
525
- "#00CC99",
526
- "#009999",
527
- "#006699",
528
- "#003399",
529
- "#000099",
530
- "#CCFFCC",
531
- "#CCCCCC",
532
- "#CC99CC",
533
- "#CC66CC",
534
- "#CC33CC",
535
- "#CC00CC",
536
- "#6600CC",
537
- "#6633CC",
538
- "#6666CC",
539
- "#6699CC",
540
- "#66CCCC",
541
- "#66FFCC",
542
- "#00FFCC",
543
- "#00CCCC",
544
- "#0099CC",
545
- "#0066CC",
546
- "#0033CC",
547
- "#0000CC",
548
- "#CCFFFF",
549
- "#CCCCFF",
550
- "#CC99FF",
551
- "#CC66FF",
552
- "#CC33FF",
553
- "#CC00FF",
554
- "#6600FF",
555
- "#6633FF",
556
- "#6666FF",
557
- "#6699FF",
558
- "#66CCFF",
559
- "#66FFFF",
560
- "#00FFFF",
561
- "#00CCFF",
562
- "#0099FF",
563
- "#0066FF",
564
- "#0033FF",
565
- "#0000FF",
566
- "#FFFFFF",
567
- "#FFCCFF",
568
- "#FF99FF",
569
- "#FF66FF",
570
- "#FF33FF",
571
- "#FF00FF",
572
- "#9900FF",
573
- "#9933FF",
574
- "#9966FF",
575
- "#9999FF",
576
- "#99CCFF",
577
- "#99FFFF",
578
- "#33FFFF",
579
- "#33CCFF",
580
- "#3399FF",
581
- "#3366FF",
582
- "#3333FF",
583
- "#3300FF",
584
- "#FFFFCC",
585
- "#FFCCCC",
586
- "#FF99CC",
587
- "#FF66CC",
588
- "#FF33CC",
589
- "#FF00CC",
590
- "#9900CC",
591
- "#9933CC",
592
- "#9966CC",
593
- "#9999CC",
594
- "#99CCCC",
595
- "#99FFCC",
596
- "#33FFCC",
597
- "#33CCCC",
598
- "#3399CC",
599
- "#3366CC",
600
- "#3333CC",
601
- "#3300CC",
602
- "#FFFF99",
603
- "#FFCC99",
604
- "#FF9999",
605
- "#FF6699",
606
- "#FF3399",
607
- "#FF0099",
608
- "#990099",
609
- "#993399",
610
- "#996699",
611
- "#999999",
612
- "#99CC99",
613
- "#99FF99",
614
- "#33FF99",
615
- "#33CC99",
616
- "#339999",
617
- "#336699",
618
- "#333399",
619
- "#330099",
620
- "#FFFF66",
621
- "#FFCC66",
622
- "#FF9966",
623
- "#FF6666",
624
- "#FF3366",
625
- "#FF0066",
626
- "#990066",
627
- "#993366",
628
- "#996666",
629
- "#999966",
630
- "#99CC66",
631
- "#99FF66",
632
- "#33FF66",
633
- "#33CC66",
634
- "#339966",
635
- "#336666",
636
- "#333366",
637
- "#330066",
638
- "#FFFF33",
639
- "#FFCC33",
640
- "#FF9933",
641
- "#FF6633",
642
- "#FF3333",
643
- "#FF0033",
644
- "#990033",
645
- "#993333",
646
- "#996633",
647
- "#999933",
648
- "#99CC33",
649
- "#99FF33",
650
- "#33FF33",
651
- "#33CC33",
652
- "#339933",
653
- "#336633",
654
- "#333333",
655
- "#330033",
656
- "#FFFF00",
657
- "#FFCC00",
658
- "#FF9900",
659
- "#FF6600",
660
- "#FF3300",
661
- "#FF0000",
662
- "#990000",
663
- "#993300",
664
- "#996600",
665
- "#999900",
666
- "#99CC00",
667
- "#99FF00",
668
- "#33FF00",
669
- "#33CC00",
670
- "#339900",
671
- "#336600",
672
- "#333300",
673
- "#330000"
674
- ]
446
+ name: "websafe",
447
+ columns: 18,
448
+ colors: [
449
+ "#CCFF00",
450
+ "#CCCC00",
451
+ "#CC9900",
452
+ "#CC6600",
453
+ "#CC3300",
454
+ "#CC0000",
455
+ "#660000",
456
+ "#663300",
457
+ "#666600",
458
+ "#669900",
459
+ "#66CC00",
460
+ "#66FF00",
461
+ "#00FF00",
462
+ "#00CC00",
463
+ "#009900",
464
+ "#006600",
465
+ "#003300",
466
+ "#000000",
467
+ "#CCFF33",
468
+ "#CCCC33",
469
+ "#CC9933",
470
+ "#CC6633",
471
+ "#CC3333",
472
+ "#CC0033",
473
+ "#660033",
474
+ "#663333",
475
+ "#666633",
476
+ "#669933",
477
+ "#66CC33",
478
+ "#66FF33",
479
+ "#00FF33",
480
+ "#00CC33",
481
+ "#009933",
482
+ "#006633",
483
+ "#003333",
484
+ "#000033",
485
+ "#CCFF66",
486
+ "#CCCC66",
487
+ "#CC9966",
488
+ "#CC6666",
489
+ "#CC3366",
490
+ "#CC0066",
491
+ "#660066",
492
+ "#663366",
493
+ "#666666",
494
+ "#669966",
495
+ "#66CC66",
496
+ "#66FF66",
497
+ "#00FF66",
498
+ "#00CC66",
499
+ "#009966",
500
+ "#006666",
501
+ "#003366",
502
+ "#000066",
503
+ "#CCFF99",
504
+ "#CCCC99",
505
+ "#CC9999",
506
+ "#CC6699",
507
+ "#CC3399",
508
+ "#CC0099",
509
+ "#660099",
510
+ "#663399",
511
+ "#666699",
512
+ "#669999",
513
+ "#66CC99",
514
+ "#66FF99",
515
+ "#00FF99",
516
+ "#00CC99",
517
+ "#009999",
518
+ "#006699",
519
+ "#003399",
520
+ "#000099",
521
+ "#CCFFCC",
522
+ "#CCCCCC",
523
+ "#CC99CC",
524
+ "#CC66CC",
525
+ "#CC33CC",
526
+ "#CC00CC",
527
+ "#6600CC",
528
+ "#6633CC",
529
+ "#6666CC",
530
+ "#6699CC",
531
+ "#66CCCC",
532
+ "#66FFCC",
533
+ "#00FFCC",
534
+ "#00CCCC",
535
+ "#0099CC",
536
+ "#0066CC",
537
+ "#0033CC",
538
+ "#0000CC",
539
+ "#CCFFFF",
540
+ "#CCCCFF",
541
+ "#CC99FF",
542
+ "#CC66FF",
543
+ "#CC33FF",
544
+ "#CC00FF",
545
+ "#6600FF",
546
+ "#6633FF",
547
+ "#6666FF",
548
+ "#6699FF",
549
+ "#66CCFF",
550
+ "#66FFFF",
551
+ "#00FFFF",
552
+ "#00CCFF",
553
+ "#0099FF",
554
+ "#0066FF",
555
+ "#0033FF",
556
+ "#0000FF",
557
+ "#FFFFFF",
558
+ "#FFCCFF",
559
+ "#FF99FF",
560
+ "#FF66FF",
561
+ "#FF33FF",
562
+ "#FF00FF",
563
+ "#9900FF",
564
+ "#9933FF",
565
+ "#9966FF",
566
+ "#9999FF",
567
+ "#99CCFF",
568
+ "#99FFFF",
569
+ "#33FFFF",
570
+ "#33CCFF",
571
+ "#3399FF",
572
+ "#3366FF",
573
+ "#3333FF",
574
+ "#3300FF",
575
+ "#FFFFCC",
576
+ "#FFCCCC",
577
+ "#FF99CC",
578
+ "#FF66CC",
579
+ "#FF33CC",
580
+ "#FF00CC",
581
+ "#9900CC",
582
+ "#9933CC",
583
+ "#9966CC",
584
+ "#9999CC",
585
+ "#99CCCC",
586
+ "#99FFCC",
587
+ "#33FFCC",
588
+ "#33CCCC",
589
+ "#3399CC",
590
+ "#3366CC",
591
+ "#3333CC",
592
+ "#3300CC",
593
+ "#FFFF99",
594
+ "#FFCC99",
595
+ "#FF9999",
596
+ "#FF6699",
597
+ "#FF3399",
598
+ "#FF0099",
599
+ "#990099",
600
+ "#993399",
601
+ "#996699",
602
+ "#999999",
603
+ "#99CC99",
604
+ "#99FF99",
605
+ "#33FF99",
606
+ "#33CC99",
607
+ "#339999",
608
+ "#336699",
609
+ "#333399",
610
+ "#330099",
611
+ "#FFFF66",
612
+ "#FFCC66",
613
+ "#FF9966",
614
+ "#FF6666",
615
+ "#FF3366",
616
+ "#FF0066",
617
+ "#990066",
618
+ "#993366",
619
+ "#996666",
620
+ "#999966",
621
+ "#99CC66",
622
+ "#99FF66",
623
+ "#33FF66",
624
+ "#33CC66",
625
+ "#339966",
626
+ "#336666",
627
+ "#333366",
628
+ "#330066",
629
+ "#FFFF33",
630
+ "#FFCC33",
631
+ "#FF9933",
632
+ "#FF6633",
633
+ "#FF3333",
634
+ "#FF0033",
635
+ "#990033",
636
+ "#993333",
637
+ "#996633",
638
+ "#999933",
639
+ "#99CC33",
640
+ "#99FF33",
641
+ "#33FF33",
642
+ "#33CC33",
643
+ "#339933",
644
+ "#336633",
645
+ "#333333",
646
+ "#330033",
647
+ "#FFFF00",
648
+ "#FFCC00",
649
+ "#FF9900",
650
+ "#FF6600",
651
+ "#FF3300",
652
+ "#FF0000",
653
+ "#990000",
654
+ "#993300",
655
+ "#996600",
656
+ "#999900",
657
+ "#99CC00",
658
+ "#99FF00",
659
+ "#33FF00",
660
+ "#33CC00",
661
+ "#339900",
662
+ "#336600",
663
+ "#333300",
664
+ "#330000"
665
+ ]
675
666
  };
676
-
677
- class ColorPaletteComponent {
678
- constructor() {
679
- this.#direction = injectComponentDirection();
680
- this.#document = inject(DOCUMENT);
681
- this.#elementRef = inject((ElementRef));
682
- this.#i18n = inject(MonaI18nService);
683
- this.#label = injectLabelAssociation({
684
- activate: () => this.focus(),
685
- ariaLabel: () => this.ariaLabel(),
686
- ariaLabelledBy: () => this.ariaLabelledBy()
687
- });
688
- this.activeColorIndex = computed(() => {
689
- const focused = this.focusedColorIndex();
690
- if (focused !== -1) {
691
- return Math.min(focused, this.grid().tiles.length - 1);
692
- }
693
- return Math.max(this.selectedIndex(), 0);
694
- }, /* @ts-ignore */
695
- ...(ngDevMode ? [{ debugName: "activeColorIndex" }] : /* istanbul ignore next */ []));
696
- this.baseClasses = computed(() => {
697
- return colorPaletteBaseThemeVariants();
698
- }, /* @ts-ignore */
699
- ...(ngDevMode ? [{ debugName: "baseClasses" }] : /* istanbul ignore next */ []));
700
- this.colorRows = computed(() => {
701
- const { columns, tiles } = this.grid();
702
- const rows = [];
703
- for (let i = 0; i < tiles.length; i += columns) {
704
- rows.push(tiles.slice(i, i + columns));
705
- }
706
- return rows;
707
- }, /* @ts-ignore */
708
- ...(ngDevMode ? [{ debugName: "colorRows" }] : /* istanbul ignore next */ []));
709
- this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled());
710
- this.focusedColorIndex = signal(-1, /* @ts-ignore */
711
- ...(ngDevMode ? [{ debugName: "focusedColorIndex" }] : /* istanbul ignore next */ []));
712
- this.grid = computed(() => {
713
- const palette = this.palette();
714
- if (typeof palette === "string") {
715
- return this.gridFromScheme(this.getColorScheme(palette));
716
- }
717
- // Read once, so a generator can be used as the palette.
718
- const items = Array.from(palette);
719
- if (items.length === 0) {
720
- return this.gridFromScheme(flatColorScheme);
721
- }
722
- return {
723
- columns: Math.min(items.length, Math.max(1, Math.floor(this.columns()) || 1)),
724
- tiles: items.map(item => typeof item === "string" ? { color: item, name: null } : { color: item.color, name: item.name || null })
725
- };
726
- }, /* @ts-ignore */
727
- ...(ngDevMode ? [{ debugName: "grid" }] : /* istanbul ignore next */ []));
728
- this.invalidState = computed(() => this.touched() && (this.invalid() || (this.required() && !this.value())), /* @ts-ignore */
729
- ...(ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []));
730
- this.isRtl = computed(() => this.#direction() === "rtl", /* @ts-ignore */
731
- ...(ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []));
732
- this.labelledBy = this.#label.labelledBy;
733
- this.messages = this.#i18n.componentMessages("colorPalette", COLOR_PALETTE_DEFAULT_MESSAGES);
734
- this.paletteItemClasses = computed(() => {
735
- const rounded = this.rounded();
736
- return colorPaletteItemThemeVariants({ rounded });
737
- }, /* @ts-ignore */
738
- ...(ngDevMode ? [{ debugName: "paletteItemClasses" }] : /* istanbul ignore next */ []));
739
- /**
740
- * The first tile showing the value. Two spellings of a color count as the same color, so a value that went through
741
- * a server or the color gradient keeps its selection, and a repeated color marks one tile only.
742
- */
743
- this.selectedIndex = computed(() => {
744
- const value = this.value();
745
- if (!value) {
746
- return -1;
747
- }
748
- const key = colorKey(value, this.#document);
749
- return this.tileKeys().indexOf(key);
750
- }, /* @ts-ignore */
751
- ...(ngDevMode ? [{ debugName: "selectedIndex" }] : /* istanbul ignore next */ []));
752
- this.tileKeys = computed(() => this.grid().tiles.map(tile => colorKey(tile.color, this.#document)), /* @ts-ignore */
753
- ...(ngDevMode ? [{ debugName: "tileKeys" }] : /* istanbul ignore next */ []));
754
- /**
755
- * @description Accessible label for the color palette grid.
756
- * @default ""
757
- */
758
- this.ariaLabel = input("", { ...(ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {}), alias: "aria-label" });
759
- /**
760
- * @description Id of the element that names the color palette grid.
761
- * @default ""
762
- */
763
- this.ariaLabelledBy = input("", { ...(ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {}), alias: "aria-labelledby" });
764
- /**
765
- * @description Whether activating the selected tile clears the value. A required palette never clears.
766
- * @default true
767
- */
768
- this.clearable = input(true, { ...(ngDevMode ? { debugName: "clearable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
769
- /**
770
- * @description Emitted with the tile's color each time a tile is activated, also when it's already selected, which
771
- * doesn't change `value`.
772
- */
773
- this.colorSelect = output();
774
- /**
775
- * @description The number of columns in the color palette grid. Only applicable when using a custom palette. A
776
- * value below 1 shows one column.
777
- * @default 10
778
- */
779
- this.columns = input(10, /* @ts-ignore */
780
- ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
781
- /**
782
- * @description Renders the component with reduced visual emphasis and removes pointer interaction.
783
- * @default false
784
- */
785
- this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
786
- /**
787
- * @description Marks the color palette as invalid. When bound to a signal form field via `[formField]`,
788
- * this is written by the `FormField` directive.
789
- * @default false
790
- */
791
- this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
792
- /**
793
- * @description The palette to display — one of the built-in `"flat"`, `"material"`, or `"websafe"` schemes, or a
794
- * custom iterable of colors. A custom color is a CSS color string, or a `{ color, name }` item when it has a name
795
- * of its own. An empty custom palette falls back to the flat scheme.
796
- * @default []
797
- */
798
- this.palette = input([], /* @ts-ignore */
799
- ...(ngDevMode ? [{ debugName: "palette" }] : /* istanbul ignore next */ []));
800
- /**
801
- * @description Prevents value changes while preserving the component's visual state. When bound to a signal
802
- * form field via `[formField]`, this is written by the `FormField` directive.
803
- * @default false
804
- */
805
- this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
806
- /**
807
- * @description Sets whether the color palette is required. When bound to a signal form field via `[formField]`,
808
- * this is written by the `FormField` directive.
809
- * @default false
810
- */
811
- this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
812
- /**
813
- * @description Border-radius preset applied to the color palette items.
814
- * @default "none"
815
- */
816
- this.rounded = input("none", /* @ts-ignore */
817
- ...(ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []));
818
- /**
819
- * @description The size of each tile in the color palette grid, in pixels. Below 24, tiles miss the minimum target
820
- * size of WCAG 2.5.8.
821
- * @default 24
822
- */
823
- this.tileSize = input(24, /* @ts-ignore */
824
- ...(ngDevMode ? [{ debugName: "tileSize" }] : /* istanbul ignore next */ []));
825
- /**
826
- * @description Emitted when focus leaves the color palette or a color is selected.
827
- * The `FormField` directive listens to this to mark the field as touched.
828
- */
829
- this.touch = output();
830
- /**
831
- * @description Sets the touched state of the color palette. When bound to a signal form field via `[formField]`,
832
- * this is written by the `FormField` directive.
833
- * @default false
834
- */
835
- this.touched = input(false, { ...(ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
836
- /**
837
- * @description Two-way bindable current color value.
838
- * @default null
839
- */
840
- this.value = model(null, /* @ts-ignore */
841
- ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
842
- }
843
- #direction;
844
- #document;
845
- #elementRef;
846
- #i18n;
847
- #label;
848
- /**
849
- * @description Moves focus to the palette's active tile.
850
- * @param options Options passed to the native `focus()` call, such as `preventScroll`.
851
- */
852
- focus(options) {
853
- const element = this.#elementRef.nativeElement;
854
- element.querySelector('[data-color-index][tabindex="0"]')?.focus(options);
855
- }
856
- /**
857
- * @internal
858
- */
859
- setLabelledBy(id) {
860
- this.#label.setLabelledBy(id);
861
- }
862
- onColorFocus(index) {
863
- this.focusedColorIndex.set(index);
864
- }
865
- onColorSelect(index) {
866
- if (this.effectiveDisabled() || this.readonly()) {
867
- return;
868
- }
869
- const { color } = this.grid().tiles[index];
870
- if (index !== this.selectedIndex()) {
871
- this.value.set(color);
872
- }
873
- else if (this.clearable() && !this.required()) {
874
- this.value.set(null);
875
- }
876
- this.colorSelect.emit(color);
877
- this.touch.emit();
878
- }
879
- onFocusOut(event) {
880
- const nextTarget = event.relatedTarget;
881
- const element = this.#elementRef.nativeElement;
882
- if (nextTarget instanceof Node && element.contains(nextTarget)) {
883
- return;
884
- }
885
- // Coming back to the grid starts from the selected color, which may have changed in the meantime.
886
- this.focusedColorIndex.set(-1);
887
- this.touch.emit();
888
- }
889
- onKeyDown(event, colorIndex) {
890
- if (this.effectiveDisabled()) {
891
- return;
892
- }
893
- const { columns, tiles } = this.grid();
894
- const lastIndex = tiles.length - 1;
895
- const rowStart = colorIndex - (colorIndex % columns);
896
- const isRtl = this.isRtl();
897
- const prevKey = isRtl ? "ArrowRight" : "ArrowLeft";
898
- const nextKey = isRtl ? "ArrowLeft" : "ArrowRight";
899
- let newIndex = colorIndex;
900
- let handled = false;
901
- switch (event.key) {
902
- case prevKey:
903
- newIndex = Math.max(0, colorIndex - 1);
904
- handled = true;
905
- break;
906
- case nextKey:
907
- newIndex = Math.min(lastIndex, colorIndex + 1);
908
- handled = true;
909
- break;
910
- case "ArrowUp":
911
- newIndex = colorIndex - columns >= 0 ? colorIndex - columns : colorIndex;
912
- handled = true;
913
- break;
914
- case "ArrowDown":
915
- newIndex = colorIndex + columns <= lastIndex ? colorIndex + columns : colorIndex;
916
- handled = true;
917
- break;
918
- case "Home":
919
- newIndex = event.ctrlKey ? 0 : rowStart;
920
- handled = true;
921
- break;
922
- case "End":
923
- newIndex = event.ctrlKey ? lastIndex : Math.min(lastIndex, rowStart + columns - 1);
924
- handled = true;
925
- break;
926
- case "Enter":
927
- case " ":
928
- if (!event.repeat) {
929
- this.onColorSelect(colorIndex);
930
- }
931
- handled = true;
932
- break;
933
- }
934
- if (handled) {
935
- event.preventDefault();
936
- event.stopPropagation();
937
- if (newIndex !== colorIndex) {
938
- this.focusColorTile(newIndex);
939
- }
940
- }
941
- }
942
- focusColorTile(index) {
943
- this.focusedColorIndex.set(index);
944
- const tiles = this.#elementRef.nativeElement.querySelectorAll("[data-color-index]");
945
- tiles[index]?.focus();
946
- }
947
- getColorScheme(paletteType) {
948
- switch (paletteType) {
949
- case "flat":
950
- return flatColorScheme;
951
- case "material":
952
- return materialColorScheme;
953
- case "websafe":
954
- return websafeColorScheme;
955
- }
956
- }
957
- gridFromScheme({ colors, columns }) {
958
- return { columns, tiles: colors.map(color => ({ color, name: null })) };
959
- }
960
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ColorPaletteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
961
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: ColorPaletteComponent, isStandalone: true, selector: "mona-color-palette", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, clearable: { classPropertyName: "clearable", publicName: "clearable", isSignal: true, isRequired: false, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, palette: { classPropertyName: "palette", publicName: "palette", 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 }, tileSize: { classPropertyName: "tileSize", publicName: "tileSize", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { colorSelect: "colorSelect", touch: "touch", value: "valueChange" }, host: { listeners: { "focusout": "onFocusOut($event)" }, properties: { "class": "baseClasses()", "style.grid-template-columns": "'repeat('+grid().columns+', minmax('+tileSize()+'px, 1fr))'", "style.grid-auto-rows": "tileSize()+'px'", "attr.data-disabled": "effectiveDisabled()", "attr.data-invalid": "invalidState() || null", "attr.data-readonly": "readonly()", "attr.data-required": "required() || null", "attr.role": "'grid'", "attr.aria-label": "labelledBy() ? null : ariaLabel() || messages().colorPalette", "attr.aria-labelledby": "labelledBy()", "attr.aria-disabled": "effectiveDisabled()", "attr.aria-invalid": "invalidState() ? 'true' : null", "attr.aria-readonly": "readonly()", "attr.aria-required": "required()" } }, ngImport: i0, template: "@for (row of colorRows(); track $index; let rowIndex = $index) {\n <div class=\"contents\" role=\"row\">\n @for (item of row; track $index; let colIndex = $index) {\n @let i = rowIndex * grid().columns + colIndex;\n @let label = item.name ? messages().namedColor(item.name, item.color) : messages().color(item.color);\n <div\n [class]=\"paletteItemClasses()\"\n [attr.data-selected]=\"i === selectedIndex()\"\n [attr.data-color-index]=\"i\"\n [attr.data-readonly]=\"readonly()\"\n [attr.tabindex]=\"effectiveDisabled() ? -1 : i === activeColorIndex() ? 0 : -1\"\n [attr.role]=\"'gridcell'\"\n [attr.title]=\"label\"\n [attr.aria-label]=\"label\"\n [attr.aria-disabled]=\"effectiveDisabled()\"\n [attr.aria-readonly]=\"readonly()\"\n [attr.aria-selected]=\"i === selectedIndex()\"\n [style.background-color]=\"item.color\"\n (click)=\"onColorSelect(i)\"\n (keydown)=\"onKeyDown($event, i)\"\n (focus)=\"onColorFocus(i)\"></div>\n }\n </div>\n}\n" }); }
962
- }
963
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: ColorPaletteComponent, decorators: [{
964
- type: Component,
965
- args: [{ selector: "mona-color-palette", host: {
966
- "[class]": "baseClasses()",
967
- "[style.grid-template-columns]": "'repeat('+grid().columns+', minmax('+tileSize()+'px, 1fr))'",
968
- "[style.grid-auto-rows]": "tileSize()+'px'",
969
- "[attr.data-disabled]": "effectiveDisabled()",
970
- "[attr.data-invalid]": "invalidState() || null",
971
- "[attr.data-readonly]": "readonly()",
972
- "(focusout)": "onFocusOut($event)",
973
- "[attr.data-required]": "required() || null",
974
- "[attr.role]": "'grid'",
975
- "[attr.aria-label]": "labelledBy() ? null : ariaLabel() || messages().colorPalette",
976
- "[attr.aria-labelledby]": "labelledBy()",
977
- "[attr.aria-disabled]": "effectiveDisabled()",
978
- "[attr.aria-invalid]": "invalidState() ? 'true' : null",
979
- "[attr.aria-readonly]": "readonly()",
980
- "[attr.aria-required]": "required()"
981
- }, template: "@for (row of colorRows(); track $index; let rowIndex = $index) {\n <div class=\"contents\" role=\"row\">\n @for (item of row; track $index; let colIndex = $index) {\n @let i = rowIndex * grid().columns + colIndex;\n @let label = item.name ? messages().namedColor(item.name, item.color) : messages().color(item.color);\n <div\n [class]=\"paletteItemClasses()\"\n [attr.data-selected]=\"i === selectedIndex()\"\n [attr.data-color-index]=\"i\"\n [attr.data-readonly]=\"readonly()\"\n [attr.tabindex]=\"effectiveDisabled() ? -1 : i === activeColorIndex() ? 0 : -1\"\n [attr.role]=\"'gridcell'\"\n [attr.title]=\"label\"\n [attr.aria-label]=\"label\"\n [attr.aria-disabled]=\"effectiveDisabled()\"\n [attr.aria-readonly]=\"readonly()\"\n [attr.aria-selected]=\"i === selectedIndex()\"\n [style.background-color]=\"item.color\"\n (click)=\"onColorSelect(i)\"\n (keydown)=\"onKeyDown($event, i)\"\n (focus)=\"onColorFocus(i)\"></div>\n }\n </div>\n}\n" }]
982
- }], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], colorSelect: [{ type: i0.Output, args: ["colorSelect"] }], columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], palette: [{ type: i0.Input, args: [{ isSignal: true, alias: "palette", 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 }] }], tileSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "tileSize", required: false }] }], touch: [{ type: i0.Output, args: ["touch"] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }] } });
983
-
984
- /*
985
- * Public API Surface of @nanahoshi/mona-ui/color-palette
986
- */
987
-
988
- /**
989
- * Generated bundle index. Do not edit.
990
- */
991
-
667
+ var ColorPaletteComponent = class ColorPaletteComponent {
668
+ constructor() {
669
+ this.#direction = injectComponentDirection();
670
+ this.#document = inject(DOCUMENT);
671
+ this.#elementRef = inject(ElementRef);
672
+ this.#i18n = inject(MonaI18nService);
673
+ this.#label = injectLabelAssociation({
674
+ activate: () => this.focus(),
675
+ ariaLabel: () => this.ariaLabel(),
676
+ ariaLabelledBy: () => this.ariaLabelledBy()
677
+ });
678
+ this.activeColorIndex = computed(() => {
679
+ const focused = this.focusedColorIndex();
680
+ if (focused !== -1) return Math.min(focused, this.grid().tiles.length - 1);
681
+ return Math.max(this.selectedIndex(), 0);
682
+ }, ...ngDevMode ? [{ debugName: "activeColorIndex" }] : /* istanbul ignore next */ []);
683
+ this.baseClasses = computed(() => {
684
+ return colorPaletteBaseThemeVariants();
685
+ }, ...ngDevMode ? [{ debugName: "baseClasses" }] : /* istanbul ignore next */ []);
686
+ this.colorRows = computed(() => {
687
+ const { columns, tiles } = this.grid();
688
+ const rows = [];
689
+ for (let i = 0; i < tiles.length; i += columns) rows.push(tiles.slice(i, i + columns));
690
+ return rows;
691
+ }, ...ngDevMode ? [{ debugName: "colorRows" }] : /* istanbul ignore next */ []);
692
+ this.effectiveDisabled = injectEffectiveDisabled(() => this.disabled());
693
+ this.focusedColorIndex = signal(-1, ...ngDevMode ? [{ debugName: "focusedColorIndex" }] : /* istanbul ignore next */ []);
694
+ this.grid = computed(() => {
695
+ const palette = this.palette();
696
+ if (typeof palette === "string") return this.gridFromScheme(this.getColorScheme(palette));
697
+ const items = Array.from(palette);
698
+ if (items.length === 0) return this.gridFromScheme(flatColorScheme);
699
+ return {
700
+ columns: Math.min(items.length, Math.max(1, Math.floor(this.columns()) || 1)),
701
+ tiles: items.map((item) => typeof item === "string" ? {
702
+ color: item,
703
+ name: null
704
+ } : {
705
+ color: item.color,
706
+ name: item.name || null
707
+ })
708
+ };
709
+ }, ...ngDevMode ? [{ debugName: "grid" }] : /* istanbul ignore next */ []);
710
+ this.invalidState = computed(() => this.touched() && (this.invalid() || this.required() && !this.value()), ...ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []);
711
+ this.isRtl = computed(() => this.#direction() === "rtl", ...ngDevMode ? [{ debugName: "isRtl" }] : /* istanbul ignore next */ []);
712
+ this.labelledBy = this.#label.labelledBy;
713
+ this.messages = this.#i18n.componentMessages("colorPalette", COLOR_PALETTE_DEFAULT_MESSAGES);
714
+ this.paletteItemClasses = computed(() => {
715
+ const rounded = this.rounded();
716
+ return colorPaletteItemThemeVariants({ rounded });
717
+ }, ...ngDevMode ? [{ debugName: "paletteItemClasses" }] : /* istanbul ignore next */ []);
718
+ this.selectedIndex = computed(() => {
719
+ const value = this.value();
720
+ if (!value) return -1;
721
+ const key = colorKey(value, this.#document);
722
+ return this.tileKeys().indexOf(key);
723
+ }, ...ngDevMode ? [{ debugName: "selectedIndex" }] : /* istanbul ignore next */ []);
724
+ this.tileKeys = computed(() => this.grid().tiles.map((tile) => colorKey(tile.color, this.#document)), ...ngDevMode ? [{ debugName: "tileKeys" }] : /* istanbul ignore next */ []);
725
+ this.ariaLabel = input("", {
726
+ ...ngDevMode ? { debugName: "ariaLabel" } : /* istanbul ignore next */ {},
727
+ alias: "aria-label"
728
+ });
729
+ this.ariaLabelledBy = input("", {
730
+ ...ngDevMode ? { debugName: "ariaLabelledBy" } : /* istanbul ignore next */ {},
731
+ alias: "aria-labelledby"
732
+ });
733
+ this.clearable = input(true, {
734
+ ...ngDevMode ? { debugName: "clearable" } : /* istanbul ignore next */ {},
735
+ transform: booleanAttribute
736
+ });
737
+ this.colorSelect = output();
738
+ this.columns = input(10, ...ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []);
739
+ this.disabled = input(false, {
740
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
741
+ transform: booleanAttribute
742
+ });
743
+ this.invalid = input(false, {
744
+ ...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
745
+ transform: booleanAttribute
746
+ });
747
+ this.palette = input([], ...ngDevMode ? [{ debugName: "palette" }] : /* istanbul ignore next */ []);
748
+ this.readonly = input(false, {
749
+ ...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
750
+ transform: booleanAttribute
751
+ });
752
+ this.required = input(false, {
753
+ ...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
754
+ transform: booleanAttribute
755
+ });
756
+ this.rounded = input("none", ...ngDevMode ? [{ debugName: "rounded" }] : /* istanbul ignore next */ []);
757
+ this.tileSize = input(24, ...ngDevMode ? [{ debugName: "tileSize" }] : /* istanbul ignore next */ []);
758
+ this.touch = output();
759
+ this.touched = input(false, {
760
+ ...ngDevMode ? { debugName: "touched" } : /* istanbul ignore next */ {},
761
+ transform: booleanAttribute
762
+ });
763
+ this.value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
764
+ }
765
+ #direction;
766
+ #document;
767
+ #elementRef;
768
+ #i18n;
769
+ #label;
770
+ focus(options) {
771
+ this.#elementRef.nativeElement.querySelector("[data-color-index][tabindex=\"0\"]")?.focus(options);
772
+ }
773
+ setLabelledBy(id) {
774
+ this.#label.setLabelledBy(id);
775
+ }
776
+ onColorFocus(index) {
777
+ this.focusedColorIndex.set(index);
778
+ }
779
+ onColorSelect(index) {
780
+ if (this.effectiveDisabled() || this.readonly()) return;
781
+ const { color } = this.grid().tiles[index];
782
+ if (index !== this.selectedIndex()) this.value.set(color);
783
+ else if (this.clearable() && !this.required()) this.value.set(null);
784
+ this.colorSelect.emit(color);
785
+ this.touch.emit();
786
+ }
787
+ onFocusOut(event) {
788
+ const nextTarget = event.relatedTarget;
789
+ const element = this.#elementRef.nativeElement;
790
+ if (nextTarget instanceof Node && element.contains(nextTarget)) return;
791
+ this.focusedColorIndex.set(-1);
792
+ this.touch.emit();
793
+ }
794
+ onKeyDown(event, colorIndex) {
795
+ if (this.effectiveDisabled()) return;
796
+ const { columns, tiles } = this.grid();
797
+ const lastIndex = tiles.length - 1;
798
+ const rowStart = colorIndex - colorIndex % columns;
799
+ const isRtl = this.isRtl();
800
+ const prevKey = isRtl ? "ArrowRight" : "ArrowLeft";
801
+ const nextKey = isRtl ? "ArrowLeft" : "ArrowRight";
802
+ let newIndex = colorIndex;
803
+ let handled = false;
804
+ switch (event.key) {
805
+ case prevKey:
806
+ newIndex = Math.max(0, colorIndex - 1);
807
+ handled = true;
808
+ break;
809
+ case nextKey:
810
+ newIndex = Math.min(lastIndex, colorIndex + 1);
811
+ handled = true;
812
+ break;
813
+ case "ArrowUp":
814
+ newIndex = colorIndex - columns >= 0 ? colorIndex - columns : colorIndex;
815
+ handled = true;
816
+ break;
817
+ case "ArrowDown":
818
+ newIndex = colorIndex + columns <= lastIndex ? colorIndex + columns : colorIndex;
819
+ handled = true;
820
+ break;
821
+ case "Home":
822
+ newIndex = event.ctrlKey ? 0 : rowStart;
823
+ handled = true;
824
+ break;
825
+ case "End":
826
+ newIndex = event.ctrlKey ? lastIndex : Math.min(lastIndex, rowStart + columns - 1);
827
+ handled = true;
828
+ break;
829
+ case "Enter":
830
+ case " ":
831
+ if (!event.repeat) this.onColorSelect(colorIndex);
832
+ handled = true;
833
+ }
834
+ if (handled) {
835
+ event.preventDefault();
836
+ event.stopPropagation();
837
+ if (newIndex !== colorIndex) this.focusColorTile(newIndex);
838
+ }
839
+ }
840
+ focusColorTile(index) {
841
+ this.focusedColorIndex.set(index);
842
+ this.#elementRef.nativeElement.querySelectorAll("[data-color-index]")[index]?.focus();
843
+ }
844
+ getColorScheme(paletteType) {
845
+ switch (paletteType) {
846
+ case "flat": return flatColorScheme;
847
+ case "material": return materialColorScheme;
848
+ case "websafe": return websafeColorScheme;
849
+ }
850
+ }
851
+ gridFromScheme({ colors, columns }) {
852
+ return {
853
+ columns,
854
+ tiles: colors.map((color) => ({
855
+ color,
856
+ name: null
857
+ }))
858
+ };
859
+ }
860
+ static {
861
+ this.ɵfac = i0.ɵɵngDeclareFactory({
862
+ minVersion: "12.0.0",
863
+ version: "22.2.6",
864
+ ngImport: i0,
865
+ type: ColorPaletteComponent,
866
+ deps: [],
867
+ target: i0.ɵɵFactoryTarget.Component
868
+ });
869
+ }
870
+ static {
871
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
872
+ minVersion: "17.0.0",
873
+ version: "22.2.6",
874
+ type: ColorPaletteComponent,
875
+ isStandalone: true,
876
+ selector: "mona-color-palette",
877
+ inputs: {
878
+ ariaLabel: {
879
+ classPropertyName: "ariaLabel",
880
+ publicName: "aria-label",
881
+ isSignal: true,
882
+ isRequired: false,
883
+ transformFunction: null
884
+ },
885
+ ariaLabelledBy: {
886
+ classPropertyName: "ariaLabelledBy",
887
+ publicName: "aria-labelledby",
888
+ isSignal: true,
889
+ isRequired: false,
890
+ transformFunction: null
891
+ },
892
+ clearable: {
893
+ classPropertyName: "clearable",
894
+ publicName: "clearable",
895
+ isSignal: true,
896
+ isRequired: false,
897
+ transformFunction: null
898
+ },
899
+ columns: {
900
+ classPropertyName: "columns",
901
+ publicName: "columns",
902
+ isSignal: true,
903
+ isRequired: false,
904
+ transformFunction: null
905
+ },
906
+ disabled: {
907
+ classPropertyName: "disabled",
908
+ publicName: "disabled",
909
+ isSignal: true,
910
+ isRequired: false,
911
+ transformFunction: null
912
+ },
913
+ invalid: {
914
+ classPropertyName: "invalid",
915
+ publicName: "invalid",
916
+ isSignal: true,
917
+ isRequired: false,
918
+ transformFunction: null
919
+ },
920
+ palette: {
921
+ classPropertyName: "palette",
922
+ publicName: "palette",
923
+ isSignal: true,
924
+ isRequired: false,
925
+ transformFunction: null
926
+ },
927
+ readonly: {
928
+ classPropertyName: "readonly",
929
+ publicName: "readonly",
930
+ isSignal: true,
931
+ isRequired: false,
932
+ transformFunction: null
933
+ },
934
+ required: {
935
+ classPropertyName: "required",
936
+ publicName: "required",
937
+ isSignal: true,
938
+ isRequired: false,
939
+ transformFunction: null
940
+ },
941
+ rounded: {
942
+ classPropertyName: "rounded",
943
+ publicName: "rounded",
944
+ isSignal: true,
945
+ isRequired: false,
946
+ transformFunction: null
947
+ },
948
+ tileSize: {
949
+ classPropertyName: "tileSize",
950
+ publicName: "tileSize",
951
+ isSignal: true,
952
+ isRequired: false,
953
+ transformFunction: null
954
+ },
955
+ touched: {
956
+ classPropertyName: "touched",
957
+ publicName: "touched",
958
+ isSignal: true,
959
+ isRequired: false,
960
+ transformFunction: null
961
+ },
962
+ value: {
963
+ classPropertyName: "value",
964
+ publicName: "value",
965
+ isSignal: true,
966
+ isRequired: false,
967
+ transformFunction: null
968
+ }
969
+ },
970
+ outputs: {
971
+ colorSelect: "colorSelect",
972
+ touch: "touch",
973
+ value: "valueChange"
974
+ },
975
+ host: {
976
+ listeners: { "focusout": "onFocusOut($event)" },
977
+ properties: {
978
+ "class": "baseClasses()",
979
+ "style.grid-template-columns": "'repeat('+grid().columns+', minmax('+tileSize()+'px, 1fr))'",
980
+ "style.grid-auto-rows": "tileSize()+'px'",
981
+ "attr.data-disabled": "effectiveDisabled()",
982
+ "attr.data-invalid": "invalidState() || null",
983
+ "attr.data-readonly": "readonly()",
984
+ "attr.data-required": "required() || null",
985
+ "attr.role": "'grid'",
986
+ "attr.aria-label": "labelledBy() ? null : ariaLabel() || messages().colorPalette",
987
+ "attr.aria-labelledby": "labelledBy()",
988
+ "attr.aria-disabled": "effectiveDisabled()",
989
+ "attr.aria-invalid": "invalidState() ? 'true' : null",
990
+ "attr.aria-readonly": "readonly()",
991
+ "attr.aria-required": "required()"
992
+ }
993
+ },
994
+ ngImport: i0,
995
+ template: "@for (row of colorRows(); track $index; let rowIndex = $index) {\n <div class=\"contents\" role=\"row\">\n @for (item of row; track $index; let colIndex = $index) {\n @let i = rowIndex * grid().columns + colIndex;\n @let label = item.name ? messages().namedColor(item.name, item.color) : messages().color(item.color);\n <div\n [class]=\"paletteItemClasses()\"\n [attr.data-selected]=\"i === selectedIndex()\"\n [attr.data-color-index]=\"i\"\n [attr.data-readonly]=\"readonly()\"\n [attr.tabindex]=\"effectiveDisabled() ? -1 : i === activeColorIndex() ? 0 : -1\"\n [attr.role]=\"'gridcell'\"\n [attr.title]=\"label\"\n [attr.aria-label]=\"label\"\n [attr.aria-disabled]=\"effectiveDisabled()\"\n [attr.aria-readonly]=\"readonly()\"\n [attr.aria-selected]=\"i === selectedIndex()\"\n [style.background-color]=\"item.color\"\n (click)=\"onColorSelect(i)\"\n (keydown)=\"onKeyDown($event, i)\"\n (focus)=\"onColorFocus(i)\"></div>\n }\n </div>\n}\n"
996
+ });
997
+ }
998
+ };
999
+ i0.ɵɵngDeclareClassMetadata({
1000
+ minVersion: "12.0.0",
1001
+ version: "22.2.6",
1002
+ ngImport: i0,
1003
+ type: ColorPaletteComponent,
1004
+ decorators: [{
1005
+ type: Component,
1006
+ args: [{
1007
+ selector: "mona-color-palette",
1008
+ host: {
1009
+ "[class]": "baseClasses()",
1010
+ "[style.grid-template-columns]": "'repeat('+grid().columns+', minmax('+tileSize()+'px, 1fr))'",
1011
+ "[style.grid-auto-rows]": "tileSize()+'px'",
1012
+ "[attr.data-disabled]": "effectiveDisabled()",
1013
+ "[attr.data-invalid]": "invalidState() || null",
1014
+ "[attr.data-readonly]": "readonly()",
1015
+ "(focusout)": "onFocusOut($event)",
1016
+ "[attr.data-required]": "required() || null",
1017
+ "[attr.role]": "'grid'",
1018
+ "[attr.aria-label]": "labelledBy() ? null : ariaLabel() || messages().colorPalette",
1019
+ "[attr.aria-labelledby]": "labelledBy()",
1020
+ "[attr.aria-disabled]": "effectiveDisabled()",
1021
+ "[attr.aria-invalid]": "invalidState() ? 'true' : null",
1022
+ "[attr.aria-readonly]": "readonly()",
1023
+ "[attr.aria-required]": "required()"
1024
+ },
1025
+ template: "@for (row of colorRows(); track $index; let rowIndex = $index) {\n <div class=\"contents\" role=\"row\">\n @for (item of row; track $index; let colIndex = $index) {\n @let i = rowIndex * grid().columns + colIndex;\n @let label = item.name ? messages().namedColor(item.name, item.color) : messages().color(item.color);\n <div\n [class]=\"paletteItemClasses()\"\n [attr.data-selected]=\"i === selectedIndex()\"\n [attr.data-color-index]=\"i\"\n [attr.data-readonly]=\"readonly()\"\n [attr.tabindex]=\"effectiveDisabled() ? -1 : i === activeColorIndex() ? 0 : -1\"\n [attr.role]=\"'gridcell'\"\n [attr.title]=\"label\"\n [attr.aria-label]=\"label\"\n [attr.aria-disabled]=\"effectiveDisabled()\"\n [attr.aria-readonly]=\"readonly()\"\n [attr.aria-selected]=\"i === selectedIndex()\"\n [style.background-color]=\"item.color\"\n (click)=\"onColorSelect(i)\"\n (keydown)=\"onKeyDown($event, i)\"\n (focus)=\"onColorFocus(i)\"></div>\n }\n </div>\n}\n"
1026
+ }]
1027
+ }],
1028
+ propDecorators: {
1029
+ ariaLabel: [{
1030
+ type: i0.Input,
1031
+ args: [{
1032
+ isSignal: true,
1033
+ alias: "aria-label",
1034
+ required: false
1035
+ }]
1036
+ }],
1037
+ ariaLabelledBy: [{
1038
+ type: i0.Input,
1039
+ args: [{
1040
+ isSignal: true,
1041
+ alias: "aria-labelledby",
1042
+ required: false
1043
+ }]
1044
+ }],
1045
+ clearable: [{
1046
+ type: i0.Input,
1047
+ args: [{
1048
+ isSignal: true,
1049
+ alias: "clearable",
1050
+ required: false
1051
+ }]
1052
+ }],
1053
+ colorSelect: [{
1054
+ type: i0.Output,
1055
+ args: ["colorSelect"]
1056
+ }],
1057
+ columns: [{
1058
+ type: i0.Input,
1059
+ args: [{
1060
+ isSignal: true,
1061
+ alias: "columns",
1062
+ required: false
1063
+ }]
1064
+ }],
1065
+ disabled: [{
1066
+ type: i0.Input,
1067
+ args: [{
1068
+ isSignal: true,
1069
+ alias: "disabled",
1070
+ required: false
1071
+ }]
1072
+ }],
1073
+ invalid: [{
1074
+ type: i0.Input,
1075
+ args: [{
1076
+ isSignal: true,
1077
+ alias: "invalid",
1078
+ required: false
1079
+ }]
1080
+ }],
1081
+ palette: [{
1082
+ type: i0.Input,
1083
+ args: [{
1084
+ isSignal: true,
1085
+ alias: "palette",
1086
+ required: false
1087
+ }]
1088
+ }],
1089
+ readonly: [{
1090
+ type: i0.Input,
1091
+ args: [{
1092
+ isSignal: true,
1093
+ alias: "readonly",
1094
+ required: false
1095
+ }]
1096
+ }],
1097
+ required: [{
1098
+ type: i0.Input,
1099
+ args: [{
1100
+ isSignal: true,
1101
+ alias: "required",
1102
+ required: false
1103
+ }]
1104
+ }],
1105
+ rounded: [{
1106
+ type: i0.Input,
1107
+ args: [{
1108
+ isSignal: true,
1109
+ alias: "rounded",
1110
+ required: false
1111
+ }]
1112
+ }],
1113
+ tileSize: [{
1114
+ type: i0.Input,
1115
+ args: [{
1116
+ isSignal: true,
1117
+ alias: "tileSize",
1118
+ required: false
1119
+ }]
1120
+ }],
1121
+ touch: [{
1122
+ type: i0.Output,
1123
+ args: ["touch"]
1124
+ }],
1125
+ touched: [{
1126
+ type: i0.Input,
1127
+ args: [{
1128
+ isSignal: true,
1129
+ alias: "touched",
1130
+ required: false
1131
+ }]
1132
+ }],
1133
+ value: [{
1134
+ type: i0.Input,
1135
+ args: [{
1136
+ isSignal: true,
1137
+ alias: "value",
1138
+ required: false
1139
+ }]
1140
+ }, {
1141
+ type: i0.Output,
1142
+ args: ["valueChange"]
1143
+ }]
1144
+ }
1145
+ });
992
1146
  export { COLOR_PALETTE_DEFAULT_MESSAGES, ColorPaletteComponent };
993
- //# sourceMappingURL=nanahoshi-mona-ui-color-palette.mjs.map
1147
+
1148
+ //# sourceMappingURL=nanahoshi-mona-ui-color-palette.mjs.map