@ahrowe/ui 0.42.0 → 0.44.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 (332) hide show
  1. package/CHANGELOG.md +946 -0
  2. package/README.md +14 -12
  3. package/dist/cjs-types/common/accordion/accordion.types.d.ts +17 -2
  4. package/dist/cjs-types/common/actionButtons/actionButtons.types.d.ts +7 -1
  5. package/dist/cjs-types/common/actionIcon/actionIcon.d.ts +1 -1
  6. package/dist/cjs-types/common/actionIcon/actionIcon.types.d.ts +7 -9
  7. package/dist/cjs-types/common/alert/alert.types.d.ts +6 -8
  8. package/dist/cjs-types/common/animatedLogo/animatedLogo.types.d.ts +3 -2
  9. package/dist/cjs-types/common/badge/badge.types.d.ts +10 -6
  10. package/dist/cjs-types/common/button/button.types.d.ts +14 -4
  11. package/dist/cjs-types/common/calendar/calendar.types.d.ts +25 -10
  12. package/dist/cjs-types/common/calendar/components/agendaList/agendaList.d.ts +1 -1
  13. package/dist/cjs-types/common/calendar/components/agendaList/agendaList.types.d.ts +3 -0
  14. package/dist/cjs-types/common/calendar/components/calendarHeader/calendarHeader.d.ts +1 -1
  15. package/dist/cjs-types/common/calendar/components/calendarHeader/calendarHeader.types.d.ts +2 -0
  16. package/dist/cjs-types/common/calendar/components/compactMonth/compactMonth.d.ts +1 -1
  17. package/dist/cjs-types/common/calendar/components/monthView/monthView.d.ts +1 -1
  18. package/dist/cjs-types/common/calendar/components/monthView/monthView.types.d.ts +3 -2
  19. package/dist/cjs-types/common/calendar/components/timeGrid/timeGrid.d.ts +1 -1
  20. package/dist/cjs-types/common/calendar/components/timeGrid/timeGrid.types.d.ts +9 -1
  21. package/dist/cjs-types/common/calendar/dates.d.ts +21 -5
  22. package/dist/cjs-types/common/calendar/format.d.ts +3 -2
  23. package/dist/cjs-types/common/calendar/layout.d.ts +5 -0
  24. package/dist/cjs-types/common/calendar/useNow.d.ts +4 -0
  25. package/dist/cjs-types/common/calendar/view.types.d.ts +9 -2
  26. package/dist/cjs-types/common/card/card.types.d.ts +16 -2
  27. package/dist/cjs-types/common/chip/chip.types.d.ts +10 -5
  28. package/dist/cjs-types/common/configProvider/configProvider.types.d.ts +4 -0
  29. package/dist/cjs-types/common/copyButton/copyButton.types.d.ts +5 -4
  30. package/dist/cjs-types/common/fab/components/fabBase/fabBase.d.ts +1 -1
  31. package/dist/cjs-types/common/fab/components/fabBase/fabBase.types.d.ts +2 -1
  32. package/dist/cjs-types/common/loader/index.d.ts +2 -0
  33. package/dist/cjs-types/common/loader/loader.d.ts +4 -0
  34. package/dist/cjs-types/common/loader/loader.types.d.ts +31 -0
  35. package/dist/cjs-types/common/loadingOverlay/index.d.ts +2 -0
  36. package/dist/cjs-types/common/loadingOverlay/loadingOverlay.d.ts +4 -0
  37. package/dist/cjs-types/common/loadingOverlay/loadingOverlay.types.d.ts +21 -0
  38. package/dist/cjs-types/common/progressBar/progressBar.d.ts +0 -1
  39. package/dist/cjs-types/common/progressBar/progressBar.types.d.ts +3 -1
  40. package/dist/cjs-types/common/splitButton/splitButton.types.d.ts +4 -1
  41. package/dist/cjs-types/common/styles/tone.d.ts +11 -0
  42. package/dist/cjs-types/common/themeProvider/color.types.d.ts +20 -0
  43. package/dist/cjs-types/common/themeProvider/index.d.ts +2 -0
  44. package/dist/cjs-types/common/themeProvider/theme.types.d.ts +7 -6
  45. package/dist/cjs-types/common/timeline/timeline.types.d.ts +3 -10
  46. package/dist/cjs-types/common/toast/index.d.ts +1 -1
  47. package/dist/cjs-types/common/toast/toast.types.d.ts +7 -3
  48. package/dist/cjs-types/common/types/actions.types.d.ts +1 -1
  49. package/dist/cjs-types/common/utils/dismissClick.d.ts +4 -0
  50. package/dist/cjs-types/common/utils/isDev.d.ts +1 -0
  51. package/dist/cjs-types/index.d.ts +4 -1
  52. package/dist/esm/common/accordion/accordion.mjs +1 -1
  53. package/dist/esm/common/accordion/accordion.mjs.map +1 -1
  54. package/dist/esm/common/accordion/accordion.module.mjs +1 -1
  55. package/dist/esm/common/accordion/accordion.module.mjs.map +1 -1
  56. package/dist/esm/common/accordion/accordion.types.mjs +1 -1
  57. package/dist/esm/common/accordion/accordion.types.mjs.map +1 -1
  58. package/dist/esm/common/actionButtons/actionButtons.mjs +1 -1
  59. package/dist/esm/common/actionButtons/actionButtons.mjs.map +1 -1
  60. package/dist/esm/common/actionIcon/actionIcon.mjs +1 -1
  61. package/dist/esm/common/actionIcon/actionIcon.mjs.map +1 -1
  62. package/dist/esm/common/actionIcon/actionIcon.module.mjs +1 -1
  63. package/dist/esm/common/actionIcon/actionIcon.module.mjs.map +1 -1
  64. package/dist/esm/common/alert/alert.mjs +1 -1
  65. package/dist/esm/common/alert/alert.mjs.map +1 -1
  66. package/dist/esm/common/alert/alert.module.mjs +1 -1
  67. package/dist/esm/common/alert/alert.module.mjs.map +1 -1
  68. package/dist/esm/common/animatedLogo/animatedLogo.mjs +1 -1
  69. package/dist/esm/common/animatedLogo/animatedLogo.mjs.map +1 -1
  70. package/dist/esm/common/avatar/avatar.mjs +1 -1
  71. package/dist/esm/common/avatar/avatar.mjs.map +1 -1
  72. package/dist/esm/common/badge/badge.mjs +1 -1
  73. package/dist/esm/common/badge/badge.mjs.map +1 -1
  74. package/dist/esm/common/badge/badge.module.mjs +1 -1
  75. package/dist/esm/common/badge/badge.module.mjs.map +1 -1
  76. package/dist/esm/common/badge/badge.types.mjs +1 -1
  77. package/dist/esm/common/badge/badge.types.mjs.map +1 -1
  78. package/dist/esm/common/bodyEnd/bodyEnd.mjs +1 -1
  79. package/dist/esm/common/bodyEnd/bodyEnd.mjs.map +1 -1
  80. package/dist/esm/common/breadcrumb/breadcrumb.mjs +1 -1
  81. package/dist/esm/common/breadcrumb/breadcrumb.mjs.map +1 -1
  82. package/dist/esm/common/breadcrumb/breadcrumb.module.mjs.map +1 -1
  83. package/dist/esm/common/button/button.mjs +1 -1
  84. package/dist/esm/common/button/button.mjs.map +1 -1
  85. package/dist/esm/common/button/button.module.mjs +1 -1
  86. package/dist/esm/common/button/button.module.mjs.map +1 -1
  87. package/dist/esm/common/button/button.types.mjs +1 -1
  88. package/dist/esm/common/button/button.types.mjs.map +1 -1
  89. package/dist/esm/common/calendar/calendar.mjs +1 -1
  90. package/dist/esm/common/calendar/calendar.mjs.map +1 -1
  91. package/dist/esm/common/calendar/calendar.module.mjs.map +1 -1
  92. package/dist/esm/common/calendar/calendar.types.mjs.map +1 -1
  93. package/dist/esm/common/calendar/components/agendaList/agendaList.mjs +1 -1
  94. package/dist/esm/common/calendar/components/agendaList/agendaList.mjs.map +1 -1
  95. package/dist/esm/common/calendar/components/agendaList/agendaList.module.mjs.map +1 -1
  96. package/dist/esm/common/calendar/components/calendarHeader/calendarHeader.mjs +1 -1
  97. package/dist/esm/common/calendar/components/calendarHeader/calendarHeader.mjs.map +1 -1
  98. package/dist/esm/common/calendar/components/calendarHeader/calendarHeader.module.mjs +1 -1
  99. package/dist/esm/common/calendar/components/calendarHeader/calendarHeader.module.mjs.map +1 -1
  100. package/dist/esm/common/calendar/components/compactMonth/compactMonth.mjs +1 -1
  101. package/dist/esm/common/calendar/components/compactMonth/compactMonth.mjs.map +1 -1
  102. package/dist/esm/common/calendar/components/compactMonth/compactMonth.module.mjs +1 -1
  103. package/dist/esm/common/calendar/components/compactMonth/compactMonth.module.mjs.map +1 -1
  104. package/dist/esm/common/calendar/components/monthView/monthView.mjs +1 -1
  105. package/dist/esm/common/calendar/components/monthView/monthView.mjs.map +1 -1
  106. package/dist/esm/common/calendar/components/monthView/monthView.module.mjs +1 -1
  107. package/dist/esm/common/calendar/components/monthView/monthView.module.mjs.map +1 -1
  108. package/dist/esm/common/calendar/components/timeGrid/timeGrid.mjs +1 -1
  109. package/dist/esm/common/calendar/components/timeGrid/timeGrid.mjs.map +1 -1
  110. package/dist/esm/common/calendar/components/timeGrid/timeGrid.module.mjs +1 -1
  111. package/dist/esm/common/calendar/components/timeGrid/timeGrid.module.mjs.map +1 -1
  112. package/dist/esm/common/calendar/dates.mjs +1 -1
  113. package/dist/esm/common/calendar/dates.mjs.map +1 -1
  114. package/dist/esm/common/calendar/format.mjs +1 -1
  115. package/dist/esm/common/calendar/format.mjs.map +1 -1
  116. package/dist/esm/common/calendar/layout.mjs +1 -1
  117. package/dist/esm/common/calendar/layout.mjs.map +1 -1
  118. package/dist/esm/common/calendar/useNow.mjs +2 -0
  119. package/dist/esm/common/calendar/useNow.mjs.map +1 -0
  120. package/dist/esm/common/card/Card.mjs +1 -1
  121. package/dist/esm/common/card/Card.mjs.map +1 -1
  122. package/dist/esm/common/card/CardActions.mjs +1 -1
  123. package/dist/esm/common/card/CardActions.mjs.map +1 -1
  124. package/dist/esm/common/card/CardHeader.mjs.map +1 -1
  125. package/dist/esm/common/card/card.module.mjs +1 -1
  126. package/dist/esm/common/card/card.module.mjs.map +1 -1
  127. package/dist/esm/common/card/card.types.mjs +1 -1
  128. package/dist/esm/common/card/card.types.mjs.map +1 -1
  129. package/dist/esm/common/carousel/carousel.mjs +1 -1
  130. package/dist/esm/common/carousel/carousel.mjs.map +1 -1
  131. package/dist/esm/common/carousel/carousel.module.mjs.map +1 -1
  132. package/dist/esm/common/checkbox/checkbox.mjs +1 -1
  133. package/dist/esm/common/checkbox/checkbox.mjs.map +1 -1
  134. package/dist/esm/common/checkbox/checkbox.module.mjs +1 -1
  135. package/dist/esm/common/checkbox/checkbox.module.mjs.map +1 -1
  136. package/dist/esm/common/chip/chip.mjs +1 -1
  137. package/dist/esm/common/chip/chip.mjs.map +1 -1
  138. package/dist/esm/common/chip/chip.module.mjs +1 -1
  139. package/dist/esm/common/chip/chip.module.mjs.map +1 -1
  140. package/dist/esm/common/chip/chip.types.mjs +1 -1
  141. package/dist/esm/common/chip/chip.types.mjs.map +1 -1
  142. package/dist/esm/common/colorPicker/colorPicker.mjs +1 -1
  143. package/dist/esm/common/colorPicker/colorPicker.mjs.map +1 -1
  144. package/dist/esm/common/colorPicker/colorPicker.module.mjs.map +1 -1
  145. package/dist/esm/common/confirmModal/confirmModal.mjs +1 -1
  146. package/dist/esm/common/confirmModal/confirmModal.mjs.map +1 -1
  147. package/dist/esm/common/copyButton/copyButton.mjs +1 -1
  148. package/dist/esm/common/copyButton/copyButton.mjs.map +1 -1
  149. package/dist/esm/common/copyButton/copyButton.module.mjs +1 -1
  150. package/dist/esm/common/copyButton/copyButton.module.mjs.map +1 -1
  151. package/dist/esm/common/dropdown/dropdown.mjs +1 -1
  152. package/dist/esm/common/dropdown/dropdown.mjs.map +1 -1
  153. package/dist/esm/common/dropdown/dropdown.module.mjs +1 -1
  154. package/dist/esm/common/dropdown/dropdown.module.mjs.map +1 -1
  155. package/dist/esm/common/errorBoundary/errorBoundary.mjs +2 -2
  156. package/dist/esm/common/errorBoundary/errorBoundary.mjs.map +1 -1
  157. package/dist/esm/common/fab/components/fabBase/fabBase.mjs +1 -1
  158. package/dist/esm/common/fab/components/fabBase/fabBase.mjs.map +1 -1
  159. package/dist/esm/common/fab/fab.mjs +1 -1
  160. package/dist/esm/common/fab/fab.mjs.map +1 -1
  161. package/dist/esm/common/flip/flip.mjs +1 -1
  162. package/dist/esm/common/flip/flip.mjs.map +1 -1
  163. package/dist/esm/common/kanbanBoard/KanbanColumn.mjs +1 -1
  164. package/dist/esm/common/kanbanBoard/KanbanColumn.mjs.map +1 -1
  165. package/dist/esm/common/kanbanBoard/kanbanBoard.module.mjs +1 -1
  166. package/dist/esm/common/kanbanBoard/kanbanBoard.module.mjs.map +1 -1
  167. package/dist/esm/common/klipyPicker/klipyPicker.mjs +1 -1
  168. package/dist/esm/common/klipyPicker/klipyPicker.mjs.map +1 -1
  169. package/dist/esm/common/loader/loader.mjs +2 -0
  170. package/dist/esm/common/loader/loader.mjs.map +1 -0
  171. package/dist/esm/common/loader/loader.module.mjs +2 -0
  172. package/dist/esm/common/loader/loader.module.mjs.map +1 -0
  173. package/dist/esm/common/loader/loader.types.mjs +2 -0
  174. package/dist/esm/common/loader/loader.types.mjs.map +1 -0
  175. package/dist/esm/common/loadingOverlay/loadingOverlay.mjs +2 -0
  176. package/dist/esm/common/loadingOverlay/loadingOverlay.mjs.map +1 -0
  177. package/dist/esm/common/loadingOverlay/loadingOverlay.module.mjs +2 -0
  178. package/dist/esm/common/loadingOverlay/loadingOverlay.module.mjs.map +1 -0
  179. package/dist/esm/common/modal/modal.mjs +1 -1
  180. package/dist/esm/common/modal/modal.mjs.map +1 -1
  181. package/dist/esm/common/modal/modal.module.mjs.map +1 -1
  182. package/dist/esm/common/numberInput/numberInput.mjs +1 -1
  183. package/dist/esm/common/numberInput/numberInput.mjs.map +1 -1
  184. package/dist/esm/common/numberInput/numberInput.module.mjs.map +1 -1
  185. package/dist/esm/common/popover/popover.mjs +1 -1
  186. package/dist/esm/common/popover/popover.mjs.map +1 -1
  187. package/dist/esm/common/progressBar/progressBar.mjs +1 -1
  188. package/dist/esm/common/progressBar/progressBar.mjs.map +1 -1
  189. package/dist/esm/common/progressBar/progressBar.module.mjs +1 -1
  190. package/dist/esm/common/progressBar/progressBar.module.mjs.map +1 -1
  191. package/dist/esm/common/roomDrawer/roomDrawer.mjs +1 -1
  192. package/dist/esm/common/roomDrawer/roomDrawer.mjs.map +1 -1
  193. package/dist/esm/common/roomDrawer/roomDrawer.module.mjs.map +1 -1
  194. package/dist/esm/common/sectionHeader/sectionHeader.mjs.map +1 -1
  195. package/dist/esm/common/splitButton/splitButton.mjs +1 -1
  196. package/dist/esm/common/splitButton/splitButton.mjs.map +1 -1
  197. package/dist/esm/common/styles/tone.mjs +4 -0
  198. package/dist/esm/common/styles/tone.mjs.map +1 -0
  199. package/dist/esm/common/styles/tone.module.mjs +2 -0
  200. package/dist/esm/common/styles/tone.module.mjs.map +1 -0
  201. package/dist/esm/common/themeProvider/color.types.mjs +2 -0
  202. package/dist/esm/common/themeProvider/color.types.mjs.map +1 -0
  203. package/dist/esm/common/themeProvider/defaultTheme.mjs +1 -1
  204. package/dist/esm/common/themeProvider/defaultTheme.mjs.map +1 -1
  205. package/dist/esm/common/tilt/tilt.mjs +1 -1
  206. package/dist/esm/common/tilt/tilt.mjs.map +1 -1
  207. package/dist/esm/common/timeInput/timeInput.mjs +1 -1
  208. package/dist/esm/common/timeInput/timeInput.mjs.map +1 -1
  209. package/dist/esm/common/timeline/timeline.mjs +1 -1
  210. package/dist/esm/common/timeline/timeline.mjs.map +1 -1
  211. package/dist/esm/common/timeline/timeline.module.mjs +1 -1
  212. package/dist/esm/common/timeline/timeline.module.mjs.map +1 -1
  213. package/dist/esm/common/timeline/timeline.types.mjs +1 -1
  214. package/dist/esm/common/timeline/timeline.types.mjs.map +1 -1
  215. package/dist/esm/common/timer/timer.mjs +1 -1
  216. package/dist/esm/common/timer/timer.mjs.map +1 -1
  217. package/dist/esm/common/timer/timer.module.mjs +1 -1
  218. package/dist/esm/common/timer/timer.module.mjs.map +1 -1
  219. package/dist/esm/common/toast/toast.mjs +1 -1
  220. package/dist/esm/common/toast/toast.mjs.map +1 -1
  221. package/dist/esm/common/toast/toast.module.mjs +1 -1
  222. package/dist/esm/common/toast/toast.module.mjs.map +1 -1
  223. package/dist/esm/common/toast/toastHost.mjs +1 -1
  224. package/dist/esm/common/toast/toastHost.mjs.map +1 -1
  225. package/dist/esm/common/utils/dismissClick.mjs +2 -0
  226. package/dist/esm/common/utils/dismissClick.mjs.map +1 -0
  227. package/dist/esm/common/utils/isDev.mjs +2 -0
  228. package/dist/esm/common/utils/isDev.mjs.map +1 -0
  229. package/dist/esm/common/virtualList/virtualList.mjs +1 -1
  230. package/dist/esm/common/virtualList/virtualList.mjs.map +1 -1
  231. package/dist/esm/common/virtualList/virtualList.module.mjs +1 -1
  232. package/dist/esm/common/virtualList/virtualList.module.mjs.map +1 -1
  233. package/dist/esm/index.mjs +1 -1
  234. package/dist/esm/services/formValidation/FormValidatorGroupWithForm.mjs +1 -1
  235. package/dist/esm/services/formValidation/FormValidatorGroupWithForm.mjs.map +1 -1
  236. package/dist/index.cjs +5 -3
  237. package/dist/index.cjs.map +1 -1
  238. package/dist/style.css +1 -1
  239. package/dist/types/common/accordion/accordion.types.d.ts +17 -2
  240. package/dist/types/common/actionButtons/actionButtons.types.d.ts +7 -1
  241. package/dist/types/common/actionIcon/actionIcon.d.ts +1 -1
  242. package/dist/types/common/actionIcon/actionIcon.types.d.ts +7 -9
  243. package/dist/types/common/alert/alert.types.d.ts +6 -8
  244. package/dist/types/common/animatedLogo/animatedLogo.types.d.ts +3 -2
  245. package/dist/types/common/badge/badge.types.d.ts +10 -6
  246. package/dist/types/common/button/button.types.d.ts +14 -4
  247. package/dist/types/common/calendar/calendar.types.d.ts +25 -10
  248. package/dist/types/common/calendar/components/agendaList/agendaList.d.ts +1 -1
  249. package/dist/types/common/calendar/components/agendaList/agendaList.types.d.ts +3 -0
  250. package/dist/types/common/calendar/components/calendarHeader/calendarHeader.d.ts +1 -1
  251. package/dist/types/common/calendar/components/calendarHeader/calendarHeader.types.d.ts +2 -0
  252. package/dist/types/common/calendar/components/compactMonth/compactMonth.d.ts +1 -1
  253. package/dist/types/common/calendar/components/monthView/monthView.d.ts +1 -1
  254. package/dist/types/common/calendar/components/monthView/monthView.types.d.ts +3 -2
  255. package/dist/types/common/calendar/components/timeGrid/timeGrid.d.ts +1 -1
  256. package/dist/types/common/calendar/components/timeGrid/timeGrid.types.d.ts +9 -1
  257. package/dist/types/common/calendar/dates.d.ts +21 -5
  258. package/dist/types/common/calendar/format.d.ts +3 -2
  259. package/dist/types/common/calendar/layout.d.ts +5 -0
  260. package/dist/types/common/calendar/useNow.d.ts +4 -0
  261. package/dist/types/common/calendar/view.types.d.ts +9 -2
  262. package/dist/types/common/card/card.types.d.ts +16 -2
  263. package/dist/types/common/chip/chip.types.d.ts +10 -5
  264. package/dist/types/common/configProvider/configProvider.types.d.ts +4 -0
  265. package/dist/types/common/copyButton/copyButton.types.d.ts +5 -4
  266. package/dist/types/common/fab/components/fabBase/fabBase.d.ts +1 -1
  267. package/dist/types/common/fab/components/fabBase/fabBase.types.d.ts +2 -1
  268. package/dist/types/common/loader/index.d.ts +2 -0
  269. package/dist/types/common/loader/loader.d.ts +4 -0
  270. package/dist/types/common/loader/loader.types.d.ts +31 -0
  271. package/dist/types/common/loadingOverlay/index.d.ts +2 -0
  272. package/dist/types/common/loadingOverlay/loadingOverlay.d.ts +4 -0
  273. package/dist/types/common/loadingOverlay/loadingOverlay.types.d.ts +21 -0
  274. package/dist/types/common/progressBar/progressBar.d.ts +0 -1
  275. package/dist/types/common/progressBar/progressBar.types.d.ts +3 -1
  276. package/dist/types/common/splitButton/splitButton.types.d.ts +4 -1
  277. package/dist/types/common/styles/tone.d.ts +11 -0
  278. package/dist/types/common/themeProvider/color.types.d.ts +20 -0
  279. package/dist/types/common/themeProvider/index.d.ts +2 -0
  280. package/dist/types/common/themeProvider/theme.types.d.ts +7 -6
  281. package/dist/types/common/timeline/timeline.types.d.ts +3 -10
  282. package/dist/types/common/toast/index.d.ts +1 -1
  283. package/dist/types/common/toast/toast.types.d.ts +7 -3
  284. package/dist/types/common/types/actions.types.d.ts +1 -1
  285. package/dist/types/common/utils/dismissClick.d.ts +4 -0
  286. package/dist/types/common/utils/isDev.d.ts +1 -0
  287. package/dist/types/index.d.ts +4 -1
  288. package/docs/Accordion.md +74 -5
  289. package/docs/ActionButtons.md +6 -3
  290. package/docs/ActionIcon.md +39 -14
  291. package/docs/Alert.md +27 -17
  292. package/docs/AnimatedLogo.md +1 -1
  293. package/docs/Badge.md +24 -7
  294. package/docs/Button.md +98 -40
  295. package/docs/ButtonGroup.md +18 -18
  296. package/docs/CLAUDE.md +24 -13
  297. package/docs/Calendar.md +35 -17
  298. package/docs/Card.md +53 -14
  299. package/docs/Checkbox.md +1 -1
  300. package/docs/Chip.md +24 -9
  301. package/docs/ConfigProvider.md +4 -4
  302. package/docs/CopyButton.md +6 -5
  303. package/docs/Loader.md +95 -0
  304. package/docs/LoadingOverlay.md +85 -0
  305. package/docs/ProgressBar.md +7 -4
  306. package/docs/SectionHeader.md +1 -1
  307. package/docs/Skeleton.md +1 -1
  308. package/docs/SplitButton.md +6 -5
  309. package/docs/ThemeColor.md +103 -0
  310. package/docs/ThemeProvider.md +5 -5
  311. package/docs/Timeline.md +18 -9
  312. package/docs/Toast.md +25 -11
  313. package/package.json +3 -2
  314. package/dist/cjs-types/common/loading/index.d.ts +0 -1
  315. package/dist/cjs-types/common/loading/spinnerLoading/index.d.ts +0 -2
  316. package/dist/cjs-types/common/loading/spinnerLoading/spinnerLoading.d.ts +0 -6
  317. package/dist/esm/common/accordion/accordion.plain.module.mjs +0 -2
  318. package/dist/esm/common/accordion/accordion.plain.module.mjs.map +0 -1
  319. package/dist/esm/common/accordion/accordion.primary.module.mjs +0 -2
  320. package/dist/esm/common/accordion/accordion.primary.module.mjs.map +0 -1
  321. package/dist/esm/common/alert/alert.types.mjs +0 -2
  322. package/dist/esm/common/alert/alert.types.mjs.map +0 -1
  323. package/dist/esm/common/loading/spinnerLoading/index.mjs +0 -2
  324. package/dist/esm/common/loading/spinnerLoading/index.mjs.map +0 -1
  325. package/dist/esm/common/loading/spinnerLoading/spinnerLoading.mjs +0 -2
  326. package/dist/esm/common/loading/spinnerLoading/spinnerLoading.mjs.map +0 -1
  327. package/dist/esm/common/loading/spinnerLoading/spinnerLoading.module.mjs +0 -2
  328. package/dist/esm/common/loading/spinnerLoading/spinnerLoading.module.mjs.map +0 -1
  329. package/dist/types/common/loading/index.d.ts +0 -1
  330. package/dist/types/common/loading/spinnerLoading/index.d.ts +0 -2
  331. package/dist/types/common/loading/spinnerLoading/spinnerLoading.d.ts +0 -6
  332. package/docs/Loading.md +0 -68
@@ -1,6 +1,7 @@
1
1
  import { CSSProperties, MouseEvent, Ref } from 'react';
2
2
  import { IconContent } from '../types/icon.types.js';
3
- import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types.js';
3
+ import { SlotClassNames, SlotStyles } from '../types/slots.types.js';
4
+ import { ActionIconProps } from '../actionIcon/actionIcon.types.js';
4
5
  export type CopyButtonSlots = 'root' | 'icon';
5
6
  export interface CopyButtonLabels {
6
7
  /** Accessible name and tooltip before copying. Default: "Copy". */
@@ -10,7 +11,7 @@ export interface CopyButtonLabels {
10
11
  /** Announced when the copy fails. Default: "Could not copy". */
11
12
  failed?: string;
12
13
  }
13
- export interface CopyButtonProps extends Omit<HtmlProps<HTMLDivElement>, 'onCopy' | 'onError'> {
14
+ export interface CopyButtonProps extends Omit<ActionIconProps, 'icon' | 'onCopy' | 'onError' | 'onClick' | 'ref' | 'classNames' | 'styles'> {
14
15
  /** Text written to the clipboard on click. */
15
16
  value: string;
16
17
  /** How long the copied state shows, in ms. Default: 2000. */
@@ -24,11 +25,11 @@ export interface CopyButtonProps extends Omit<HtmlProps<HTMLDivElement>, 'onCopy
24
25
  /** Called when the clipboard refuses the write, e.g. outside a secure context. */
25
26
  onError?: () => void;
26
27
  /** Called on every click, before the copy. */
27
- onClick?: (event: MouseEvent<HTMLDivElement>) => void;
28
+ onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
28
29
  /** Text this component renders of its own. */
29
30
  labels?: CopyButtonLabels;
30
31
  /** Ref to the root element. */
31
- ref?: Ref<HTMLDivElement>;
32
+ ref?: Ref<HTMLButtonElement>;
32
33
  className?: string;
33
34
  style?: CSSProperties;
34
35
  classNames?: SlotClassNames<CopyButtonSlots>;
@@ -1,3 +1,3 @@
1
1
  import { FabBaseProps } from './fabBase.types.js';
2
- declare function FabBase({ style, children, size, className, styleType, onClick, }: FabBaseProps): import("react").JSX.Element;
2
+ declare function FabBase({ style, children, size, className, styleType, color, onClick, }: FabBaseProps): import("react").JSX.Element;
3
3
  export default FabBase;
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
- import { ButtonStyleType } from '../../../button/button.types.js';
2
+ import { ButtonProps, ButtonStyleType } from '../../../button/button.types.js';
3
3
  export type FabBaseSize = 'default' | 'mini';
4
4
  export interface FabBaseProps {
5
5
  children?: ReactNode;
@@ -8,5 +8,6 @@ export interface FabBaseProps {
8
8
  /** Forwarded from Fab's `button` slot. */
9
9
  style?: CSSProperties;
10
10
  styleType?: ButtonStyleType;
11
+ color?: ButtonProps['color'];
11
12
  onClick?: () => void;
12
13
  }
@@ -0,0 +1,2 @@
1
+ export { default } from './loader.js';
2
+ export * from './loader.types.js';
@@ -0,0 +1,4 @@
1
+ import { ReactElement } from 'react';
2
+ import { LoaderProps } from './loader.types.js';
3
+ declare function Loader(props: LoaderProps): ReactElement;
4
+ export default Loader;
@@ -0,0 +1,31 @@
1
+ import { CSSProperties } from 'react';
2
+ import { HtmlProps } from '../types/slots.types.js';
3
+ import { ColorValue } from '../themeProvider/color.types.js';
4
+ export declare enum LoaderType {
5
+ /** An arc that grows and shrinks on a faint track. The default, and the one that reads at any size. */
6
+ Spinner = "spinner",
7
+ /** A glowing head trailing a fading tail round a ring. For a hero spot: a page, a panel, an overlay. */
8
+ Comet = "comet",
9
+ /** Three dots in a wave. For a line of text or a chat reply being written. */
10
+ Dots = "dots",
11
+ /** Bars rising and falling like an equaliser. For media, uploads and data being processed. */
12
+ Bars = "bars",
13
+ /** Rings rippling out from a core. For waiting on something outside the app: a device, a connection, a search. */
14
+ Pulse = "pulse"
15
+ }
16
+ export interface LoaderLabels {
17
+ /** The loader's accessible name. */
18
+ loading?: string;
19
+ }
20
+ export interface LoaderProps extends HtmlProps<HTMLSpanElement> {
21
+ /** The animation. Defaults to `LoaderType.Spinner`. */
22
+ type?: LoaderType;
23
+ /** Width and height: any CSS length, or a number of pixels. Defaults to `'2.5em'`, so it follows the font size around it. */
24
+ size?: number | string;
25
+ /** A `ThemeColor` or any CSS colour. Defaults to `ThemeColor.Primary`; `ThemeColor.Neutral` takes the colour of the text around it. */
26
+ color?: ColorValue;
27
+ /** Text the loader produces itself. See `LoaderLabels`. */
28
+ labels?: LoaderLabels;
29
+ className?: string;
30
+ style?: CSSProperties;
31
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from './loadingOverlay.js';
2
+ export * from './loadingOverlay.types.js';
@@ -0,0 +1,4 @@
1
+ import { ReactElement } from 'react';
2
+ import { LoadingOverlayProps } from './loadingOverlay.types.js';
3
+ declare function LoadingOverlay(props: LoadingOverlayProps): ReactElement;
4
+ export default LoadingOverlay;
@@ -0,0 +1,21 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types.js';
3
+ export type LoadingOverlaySlots = 'content' | 'backdrop' | 'panel' | 'message';
4
+ export interface LoadingOverlayProps extends HtmlProps<HTMLDivElement> {
5
+ /** Covers the content, blocks the pointer and marks it `aria-busy`. Defaults to `false`. */
6
+ isLoading?: boolean;
7
+ /** What the overlay covers. */
8
+ children?: ReactNode;
9
+ /** Shown in place of the default `Loader`: a `Loader` of another type, an `AnimatedLogo`, anything. */
10
+ loader?: ReactNode;
11
+ /** Text under the loader, with a highlight sweeping across it. Also the default loader's accessible name. */
12
+ message?: ReactNode;
13
+ /** Milliseconds `isLoading` has to stay true before the overlay shows, so a fast load never flashes it. Once shown, it stays at least 400ms. Defaults to `200`. */
14
+ delay?: number;
15
+ className?: string;
16
+ style?: CSSProperties;
17
+ /** Classes for the inner elements. See `LoadingOverlaySlots`. */
18
+ classNames?: SlotClassNames<LoadingOverlaySlots>;
19
+ /** Inline styles for the inner elements. See `LoadingOverlaySlots`. */
20
+ styles?: SlotStyles<LoadingOverlaySlots>;
21
+ }
@@ -1,5 +1,4 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { ProgressBarProps } from './progressBar.types.js';
3
- export declare function getContrastColor(hexColor: string): string;
4
3
  declare function ProgressBar({ className, total, progress, style, classNames, styles: slotStyles, ...rest }: ProgressBarProps): ReactElement;
5
4
  export default ProgressBar;
@@ -1,8 +1,10 @@
1
1
  import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types.js';
2
+ import { ColorValue } from '../themeProvider/color.types.js';
2
3
  export interface Progress {
3
4
  amount: number;
4
5
  label?: string;
5
- color?: string;
6
+ /** A `ThemeColor` or any CSS colour; its label is black or white, whichever reads. Default `--primary-color`. */
7
+ color?: ColorValue;
6
8
  class?: string;
7
9
  }
8
10
  export type ProgressBarSlots = 'root' | 'fill' | 'label';
@@ -1,7 +1,7 @@
1
1
  import { PopoverAlign } from '../popover/popover.types.js';
2
2
  import { CSSProperties, ReactNode } from 'react';
3
3
  import { IconContent } from '../types/icon.types.js';
4
- import { ButtonStyleType, ButtonSize } from '../button/button.types.js';
4
+ import { ButtonProps, ButtonStyleType, ButtonSize } from '../button/button.types.js';
5
5
  import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types.js';
6
6
  export interface SplitButtonAction {
7
7
  id: string;
@@ -20,7 +20,10 @@ export interface SplitButtonProps extends HtmlProps {
20
20
  children?: ReactNode;
21
21
  onClick?: (event: React.MouseEvent<HTMLButtonElement>) => Promise<void> | void;
22
22
  actions: SplitButtonAction[];
23
+ /** Default `Filled`. */
23
24
  styleType?: ButtonStyleType;
25
+ /** A `ThemeColor` or any CSS colour, shared by both buttons (default `Primary`). */
26
+ color?: ButtonProps['color'];
24
27
  size?: ButtonSize;
25
28
  disabled?: boolean;
26
29
  isLoading?: boolean;
@@ -0,0 +1,11 @@
1
+ import { CSSProperties } from 'react';
2
+ import { ColorValue } from '../themeProvider/color.types.js';
3
+ /** The class, and for a colour of the caller's own the inline style, that set the --tone properties. */
4
+ export declare function toneProps(color: ColorValue): {
5
+ className: string;
6
+ style?: CSSProperties;
7
+ };
8
+ /** A colour as a CSS value, for a component that paints it itself rather than through --tone. */
9
+ export declare function cssColor(color: ColorValue): string;
10
+ /** Warns in development about a value that can never be a colour. A var() passes: it only resolves on screen. */
11
+ export declare function useToneCheck(component: string, colors: (ColorValue | undefined)[]): void;
@@ -0,0 +1,20 @@
1
+ /** The theme's named colours, shared by every component that takes a `color`. */
2
+ export declare enum ThemeColor {
3
+ /** `--primary-color`. */
4
+ Primary = "primary",
5
+ /** The surrounding text colour, with `--border-color` for an outline. */
6
+ Neutral = "neutral",
7
+ /** `--success-color`. */
8
+ Success = "success",
9
+ /** `--info-color`. */
10
+ Info = "info",
11
+ /** `--warn-color`. */
12
+ Warn = "warn",
13
+ /** `--error-color`. */
14
+ Error = "error"
15
+ }
16
+ /**
17
+ * A `ThemeColor`, or any CSS colour such as `'var(--brand)'` or `'#7c3aed'`.
18
+ * `string & {}` rather than `string`, which would swallow the enum into one plain string type.
19
+ */
20
+ export type ColorValue = ThemeColor | (string & {});
@@ -1,4 +1,6 @@
1
1
  export { default } from './themeProvider.js';
2
2
  export { defaultTheme } from './defaultTheme.js';
3
3
  export { lightTheme } from './lightTheme.js';
4
+ export { ThemeColor } from './color.types.js';
5
+ export type { ColorValue } from './color.types.js';
4
6
  export type { Theme, ThemeProviderProps, ThemeVariables } from './theme.types.js';
@@ -106,15 +106,10 @@ export interface ThemeVariables {
106
106
  * the device's own safe-area inset where that is larger. Modal sets --modal-padding on its own
107
107
  * panel, so this does not reach a Modal sheet. */
108
108
  '--sheet-safe-padding'?: string;
109
- /** Default-style button background. Falls back to transparent when unset. */
110
- '--button-default-background'?: string;
111
- /** Default-style button text colour. Falls back to --text-color when unset. */
112
- '--button-default-color'?: string;
113
- /** Default-style button border (full `border` shorthand, e.g. `1px solid var(--border-color)`). Falls back to a transparent 1px border when unset. */
114
- '--button-default-border'?: string;
115
109
  '--card-shadow'?: string;
116
110
  '--background-card-elevated'?: string;
117
111
  '--background-card-outlined'?: string;
112
+ /** Surface of a Neutral Light card, named after the old Filled style. Unset, it is the text-colour tint every Light uses; defaultTheme sets --background-accent. */
118
113
  '--background-card-filled'?: string;
119
114
  /** Slider track (unfilled) colour. Falls back to --background-accent-light. */
120
115
  '--slider-track-color'?: string;
@@ -214,6 +209,8 @@ export interface ThemeVariables {
214
209
  '--calendar-now-color'?: string;
215
210
  /** Corner radius of an event. Falls back to 6px. */
216
211
  '--calendar-event-radius'?: string;
212
+ /** The hours outside `workingHours` in the week and day views. Falls back to --background-accent. */
213
+ '--calendar-off-hours-color'?: string;
217
214
  /** Page button size. Falls back to 36px. */
218
215
  '--pagination-size'?: string;
219
216
  /** Gap between page buttons. Falls back to 4px. */
@@ -235,6 +232,10 @@ export interface ThemeVariables {
235
232
  /** Width a column collapses to once it has no cards (see `collapseEmptyColumns`). Falls back to 140px. */
236
233
  '--kanban-empty-column-width'?: string;
237
234
  '--option-picker-padding'?: string;
235
+ /** Veil over the content while it loads. Falls back to --background at 50%. */
236
+ '--loading-overlay-background'?: string;
237
+ /** How far the content under the veil is blurred. Falls back to 4px; 0px turns the blur off. */
238
+ '--loading-overlay-blur'?: string;
238
239
  /** Track (unfilled) background colour. Falls back to --background-accent. */
239
240
  '--progress-bar-track-color'?: string;
240
241
  /** Canvas behind the plan. Falls back to --background. */
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { IconContent } from '../types/icon.types.js';
3
3
  import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types.js';
4
+ import { ColorValue } from '../themeProvider/color.types.js';
4
5
  /** Layout of entries relative to the connecting line. */
5
6
  export declare enum TimelineAlignment {
6
7
  /** Line and markers on the left, content to the right (the default). */
@@ -10,14 +11,6 @@ export declare enum TimelineAlignment {
10
11
  /** Line down the center, entries alternating left/right. */
11
12
  Alternate = "alternate"
12
13
  }
13
- /** Semantic colour for an entry's marker, matching the theme's status colours. */
14
- export declare enum TimelineItemStatus {
15
- Default = "default",
16
- Primary = "primary",
17
- Success = "success",
18
- Warn = "warn",
19
- Error = "error"
20
- }
21
14
  export type TimelineSlots = 'root' | 'item' | 'marker' | 'dot' | 'connector' | 'content' | 'title' | 'description' | 'timestamp';
22
15
  export interface TimelineItem {
23
16
  /** Stable identity for the entry, used as its React key. Falls back to its array index when omitted; pass one whenever `items` can be reordered or have entries prepended (e.g. a live "newest first" audit log), so React doesn't misattribute row state across the shift. */
@@ -30,8 +23,8 @@ export interface TimelineItem {
30
23
  timestamp?: React.ReactNode;
31
24
  /** Icon shown in the marker instead of a plain dot — a FontAwesome icon or any node. */
32
25
  icon?: IconContent;
33
- /** Semantic marker colour (default `Default`). */
34
- status?: TimelineItemStatus;
26
+ /** The marker's colour: a `ThemeColor` or any CSS colour. Unset, it is `--timeline-dot-color`. */
27
+ color?: ColorValue;
35
28
  /** Extra content rendered under the description, e.g. a diff, an attachment, an actor avatar. */
36
29
  content?: React.ReactNode;
37
30
  /** Makes the whole entry clickable (e.g. to open the full record), rendering it as an accessible button. */
@@ -1,2 +1,2 @@
1
1
  export { showToast } from './toastService.js';
2
- export type { ToastContextConfig, ToastLabels, ToastOptions, ToastType, ToastPosition, ToastSlots, } from './toast.types.js';
2
+ export type { ToastContextConfig, ToastLabels, ToastOptions, ToastPosition, ToastSlots } from './toast.types.js';
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { SlotClassNames, SlotStyles } from '../types/slots.types.js';
3
+ import { ColorValue } from '../themeProvider/color.types.js';
3
4
  export type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
4
- export type ToastType = 'default' | 'info' | 'success' | 'error' | 'warn';
5
5
  export type ToastSlots = 'root' | 'icon' | 'content' | 'closeButton' | 'progressBar';
6
6
  /** Text Toast renders of its own, for translating it. */
7
7
  export interface ToastLabels {
@@ -25,7 +25,11 @@ export interface ToastContextConfig {
25
25
  labels?: ToastLabels;
26
26
  }
27
27
  export interface ToastOptions extends Omit<ToastContextConfig, 'allowStacking'> {
28
- type?: ToastType;
28
+ /**
29
+ * A `ThemeColor` (default `Primary`) or any CSS colour. A ThemeColor also picks the icon; any
30
+ * other colour shows a bell.
31
+ */
32
+ color?: ColorValue;
29
33
  classNames?: SlotClassNames<ToastSlots>;
30
34
  styles?: SlotStyles<ToastSlots>;
31
35
  }
@@ -44,7 +48,7 @@ export interface ResolvedToastOptions {
44
48
  showRemainingTime: boolean;
45
49
  showCloseButton: boolean;
46
50
  pauseOnHover: boolean;
47
- type: ToastType;
51
+ color: ColorValue;
48
52
  classNames?: SlotClassNames<ToastSlots>;
49
53
  styles?: SlotStyles<ToastSlots>;
50
54
  }
@@ -2,6 +2,6 @@ import { IconContent } from './icon.types.js';
2
2
  /** A single icon-triggered action, rendered as an `ActionIcon` */
3
3
  export interface IconAction {
4
4
  title?: string;
5
- onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
5
+ onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
6
6
  icon: IconContent;
7
7
  }
@@ -0,0 +1,4 @@
1
+ /** Records that the release just dispatched closed an overlay, which marks the click it raises. */
2
+ export declare function markDismiss(): void;
3
+ /** Whether the click `event` ends a press that closed an overlay. */
4
+ export declare function isDismissClick(event: Event): boolean;
@@ -0,0 +1 @@
1
+ export declare function isDev(): boolean;
@@ -76,7 +76,10 @@ export { default as KanbanBoard } from './common/kanbanBoard/index.js';
76
76
  export * from './common/kanbanBoard/index.js';
77
77
  export { default as KlipyPicker } from './common/klipyPicker/index.js';
78
78
  export * from './common/klipyPicker/index.js';
79
- export * from './common/loading/index.js';
79
+ export { default as Loader } from './common/loader/index.js';
80
+ export * from './common/loader/index.js';
81
+ export { default as LoadingOverlay } from './common/loadingOverlay/index.js';
82
+ export * from './common/loadingOverlay/index.js';
80
83
  export { default as Menu } from './common/menu/index.js';
81
84
  export * from './common/menu/index.js';
82
85
  export { default as Modal } from './common/modal/index.js';
package/docs/Accordion.md CHANGED
@@ -4,25 +4,60 @@
4
4
 
5
5
  **Keywords:** collapse, dropdown panel
6
6
 
7
- **Import:** `import { Accordion } from '@ahrowe/ui'`
7
+ **Import:** `import { Accordion, AccordionStyleType, ThemeColor } from '@ahrowe/ui'`
8
8
 
9
- **Style variants:** `AccordionStyleType.Default` | `AccordionStyleType.Primary` | `AccordionStyleType.Plain`
9
+ **Styles:** the library's own, meaning what they mean on Button, Badge and Chip, applied to the
10
+ header; `color` is the colour they use (a `ThemeColor`, default `Neutral`, or any CSS colour, see
11
+ [ThemeColor.md](ThemeColor.md)). The body is ordinary text on the page in every style. There is no
12
+ `Filled`: an accordion structures content, and a solid header would compete with the page's main
13
+ action.
14
+
15
+ - `AccordionStyleType.Outlined` (default): a border in the colour, the header's text in the colour
16
+ - `AccordionStyleType.Light`: the header in a light tint of the colour, its text in the colour
17
+ - `AccordionStyleType.Plain`: the header's text in the colour, no chrome and no padding, for a disclosure inside other content
18
+
19
+ Each accordion is one section; render several directly next to each other for a list, without a
20
+ wrapper around each one, and the arrow keys move between their headers. **Neighbours** keep a
21
+ small gap by default. With `joined` they make one block instead: one line between each, in the
22
+ border colour for Outlined and in the page colour for Light, open or closed. Two neighbours join
23
+ only when both are joined.
10
24
 
11
25
  ```tsx
12
- import { Accordion, AccordionStyleType } from '@ahrowe/ui';
26
+ import { Accordion, AccordionStyleType, ThemeColor } from '@ahrowe/ui';
13
27
 
14
28
  // Uncontrolled — manages its own open state
15
29
  <Accordion title="Section title">
16
30
  <p>Content goes here</p>
17
31
  </Accordion>
18
32
 
33
+ // A list of separate sections
34
+ {faqs.map((faq) => (
35
+ <Accordion key={faq.id} title={faq.question}>
36
+ {faq.answer}
37
+ </Accordion>
38
+ ))}
39
+
40
+ // The same list as one bordered control
41
+ {faqs.map((faq) => (
42
+ <Accordion key={faq.id} title={faq.question} joined>
43
+ {faq.answer}
44
+ </Accordion>
45
+ ))}
46
+
47
+ // Headers tinted in the primary colour
48
+ {steps.map((step) => (
49
+ <Accordion key={step.id} title={step.title} styleType={AccordionStyleType.Light} color={ThemeColor.Primary}>
50
+ {step.body}
51
+ </Accordion>
52
+ ))}
53
+
19
54
  // Controlled
20
55
  <Accordion
21
56
  id="section-1"
22
57
  title="Controlled section"
23
58
  expanded={isOpen}
24
59
  onHeaderClicked={(id, isExpanded) => setIsOpen(isExpanded)}
25
- styleType={AccordionStyleType.Primary}
60
+ styleType={AccordionStyleType.Light}
26
61
  >
27
62
  Content
28
63
  </Accordion>
@@ -36,7 +71,9 @@ import { Accordion, AccordionStyleType } from '@ahrowe/ui';
36
71
  | `expanded` | `boolean \| null` | Controlled open state |
37
72
  | `startOpen` | `boolean` | Uncontrolled initial state |
38
73
  | `onHeaderClicked` | `(id, isExpanded) => void` | Toggle callback |
39
- | `styleType` | `AccordionStyleType` | Visual variant |
74
+ | `styleType` | `AccordionStyleType` | `Outlined` (default), `Light` or `Plain` |
75
+ | `color` | `ColorValue` | A `ThemeColor` (default `Neutral`) or any CSS colour |
76
+ | `joined` | `boolean` | Joins the section to joined neighbours into one block. Default `false`: a small gap |
40
77
  | `hideHeader` | `boolean` | Hide the clickable header |
41
78
  | `id` | `string` | Passed back in `onHeaderClicked` |
42
79
 
@@ -49,8 +86,40 @@ a `role="region"` labelled by the header, so a screen reader can move between th
49
86
  An activation key pressed inside the body does not reach the header, so a Space typed into a
50
87
  field in an open section types a space instead of collapsing the section.
51
88
 
89
+ **Arrow keys**, the optional keys of the
90
+ [WAI-ARIA accordion pattern](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/): Down and Up
91
+ move the focus to the next and previous header and wrap at the ends, Home and End to the first and
92
+ last. They move among the accordions rendered beside each other under one parent, so a list nested
93
+ inside a section's body is a set of its own, and a key pressed inside a body stays there.
94
+
95
+ The pattern also wraps each header in a `role="heading"` with an `aria-level` that fits the page;
96
+ this header is not, because only the page knows that level.
97
+
52
98
  **Slots:** `root` `header` `title` `icon` `body` `bodyInner`
53
99
 
54
100
  ## Sizing
55
101
 
56
102
  The header's font, padding and chevron follow `--default-font-size`, as does the body's padding. There is no fixed height: the header is that padding plus one line of text, so a larger base font simply makes it taller.
103
+
104
+ **Theming:** every colour comes from `color`, through the variables listed in
105
+ [ThemeColor.md](ThemeColor.md); in `Neutral` that is the surrounding text colour and a
106
+ `--border-color` outline. The header tints on hover in its own text colour and shows a
107
+ `--focus-border-color` ring inside its edge on keyboard focus.
108
+
109
+ ## Migration from `Default`, `Primary` and `Plain`
110
+
111
+ Before 0.43 the styles were `Default` (bordered sections that moved apart when one opened),
112
+ `Primary` (borderless until open, then framed in `--primary-color`) and `Plain`. The styles are
113
+ now the library's shared ones, and `Default` and `Primary` are gone, so TypeScript points at each
114
+ use:
115
+
116
+ | Before | After |
117
+ |--------|-------|
118
+ | `styleType={AccordionStyleType.Default}` | `joined`: `Outlined` is the default style, and `joined` keeps neighbours in one box |
119
+ | `styleType={AccordionStyleType.Primary}` | `color={ThemeColor.Primary}`: Outlined, bordered in the primary colour |
120
+ | `styleType={AccordionStyleType.Plain}` | unchanged, with a small gap added above its body |
121
+
122
+ An Accordion without `styleType` compiles unchanged and looks different in a list: neighbours
123
+ used to join into one box and now keep a small gap. Add `joined` to every one in the list to keep
124
+ the box, now with square corners at each join; an open one stays in the box instead of moving
125
+ apart from the others.
@@ -7,7 +7,7 @@
7
7
  **Import:** `import { ActionButtons } from '@ahrowe/ui'`
8
8
 
9
9
  ```tsx
10
- import { ActionButtons, ButtonStyleType } from '@ahrowe/ui';
10
+ import { ActionButtons, ThemeColor } from '@ahrowe/ui';
11
11
 
12
12
  <ActionButtons
13
13
  labels={{ submit: 'Save', cancel: 'Discard' }}
@@ -19,7 +19,7 @@ import { ActionButtons, ButtonStyleType } from '@ahrowe/ui';
19
19
  // Destructive action
20
20
  <ActionButtons
21
21
  labels={{ submit: 'Delete' }}
22
- submitButtonStyle={ButtonStyleType.Delete}
22
+ submitButtonColor={ThemeColor.Error}
23
23
  onSubmit={handleDelete}
24
24
  onClose={onClose}
25
25
  />
@@ -41,7 +41,10 @@ import { ActionButtons, ButtonStyleType } from '@ahrowe/ui';
41
41
  | `onClose` | `() => void` | Secondary button click |
42
42
  | `labels.submit` | `ReactNode \| string` | Primary button label |
43
43
  | `labels.cancel` | `ReactNode \| string` | Secondary button label |
44
- | `submitButtonStyle` | `ButtonStyleType` | `Primary` (default), `Delete`, `Default` |
44
+ | `submitButtonStyle` | `ButtonStyleType` | Default `Filled` |
45
+ | `submitButtonColor` | `ColorValue` | Default `Primary`; `Error` for a destructive confirm; or any CSS colour |
46
+ | `cancelButtonStyle` | `ButtonStyleType` | Default `Outlined` |
47
+ | `cancelButtonColor` | `ColorValue` | Default `Primary`; or any CSS colour |
45
48
  | `isSubmitButtonLoading` | `boolean` | Shows spinner on primary button |
46
49
  | `isSubmitButtonDisabled` | `boolean` | |
47
50
  | `isCancelButtonLoading` | `boolean` | |
@@ -1,22 +1,28 @@
1
1
  # ActionIcon
2
2
 
3
- **When to use:** Clickable icon button without a label — toolbar actions, table row actions, icon-only controls.
3
+ **When to use:** Clickable icon button without a label — toolbar actions, table row actions, close buttons, icon-only controls.
4
4
 
5
- **Keywords:** toolbar button
5
+ **Keywords:** toolbar button, icon button, close, ghost
6
6
 
7
7
  **Import:** `import { ActionIcon } from '@ahrowe/ui'`
8
8
 
9
9
  **Requires:** `@fortawesome/free-solid-svg-icons` peer dependency.
10
10
 
11
+ An ActionIcon is a [Button](Button.md) holding only an icon and sized by it: a real `<button>`
12
+ with Button's hover, focus ring and ripple. It takes Button's `styleType` and `color`, plain and
13
+ in the surrounding text colour by default, so it fits whatever it sits on.
14
+
11
15
  ```tsx
12
- import { ActionIcon } from '@ahrowe/ui';
13
- import { faTrash } from '@fortawesome/free-solid-svg-icons';
14
-
15
- <ActionIcon
16
- icon={faTrash}
17
- title="Delete item"
18
- onClick={(e) => handleDelete(e)}
19
- />
16
+ import { ActionIcon, ButtonStyleType, ThemeColor } from '@ahrowe/ui';
17
+ import { faTrash, faXmark } from '@fortawesome/free-solid-svg-icons';
18
+
19
+ <ActionIcon icon={faXmark} aria-label="Close" onClick={onClose} />
20
+
21
+ // A destructive row action
22
+ <ActionIcon icon={faTrash} color={ThemeColor.Error} title="Delete item" onClick={handleDelete} />
23
+
24
+ // Filled, for an action that should stand out
25
+ <ActionIcon icon={faTrash} styleType={ButtonStyleType.Filled} color={ThemeColor.Error} aria-label="Delete" />
20
26
  ```
21
27
 
22
28
  **Key props:**
@@ -24,9 +30,28 @@ import { faTrash } from '@fortawesome/free-solid-svg-icons';
24
30
  | Prop | Type | Description |
25
31
  |------|------|-------------|
26
32
  | `icon` | `IconDefinition \| ReactElement` | FontAwesome icon or any React element (required) |
27
- | `title` | `string` | Tooltip / accessible label |
28
- | `onClick` | `(event: MouseEvent) => void` | Click handler |
29
- | `className` | `string` | Root element class |
30
- | `ref` | `Ref<HTMLDivElement>` | Ref to the root element |
33
+ | `styleType` | `ButtonStyleType` | Default `Plain`; any of Button's styles |
34
+ | `color` | `ColorValue` | A `ThemeColor` (default `Neutral`) or any CSS colour, see [ThemeColor.md](ThemeColor.md) |
35
+ | `title` | `string` | Tooltip. Give an icon-only button an `aria-label` as well |
36
+ | `onClick` | `(event: MouseEvent<HTMLButtonElement>) => void \| Promise<void>` | Click handler |
37
+ | `disabled` | `boolean` | Fades it and blocks clicks |
38
+ | `ref` | `Ref<HTMLButtonElement>` | Ref to the button |
39
+
40
+ Every other Button prop and native `<button>` attribute passes through, except `size`,
41
+ `children` and `isLoading`. The box is the icon plus `4px` on each side; set `width` and `height`
42
+ for a different one.
31
43
 
32
44
  **Slots:** `root` `icon`
45
+
46
+ ## Migration from the div
47
+
48
+ Before 0.43 an ActionIcon was a `div` with a button role and no colour of its own.
49
+
50
+ - **Types:** `ref` is `Ref<HTMLButtonElement>` and `onClick` receives a
51
+ `MouseEvent<HTMLButtonElement>`. A handler annotated with `HTMLDivElement` no longer compiles;
52
+ drop the annotation or change it. The same goes for the `onClick` of Card and SectionHeader
53
+ `actions`, which render ActionIcons.
54
+ - **Layout:** it is inline, like a button, where the div was a block of its own width. In a flex
55
+ row nothing changes; on its own in a block it now sits in the line.
56
+ - **Look:** it has Button's hover tint, focus ring and ripple, where the div only darkened on
57
+ hover. It takes the surrounding text colour as before; a colour of its own is now `color`.