@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
package/docs/Calendar.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Calendar
2
2
 
3
- **When to use:** Showing and editing your own events over time, in month, week, day and agenda views: bookings, shifts, appointments, a team schedule. To let a user pick one date, use [DatePicker](DatePicker.md); for a sequence of past steps, use [Timeline](Timeline.md).
3
+ **When to use:** Showing and editing your own events over time, in month, week, day and agenda views: bookings, shifts, appointments. To let a user pick one date, use [DatePicker](DatePicker.md); for a sequence of past steps, use [Timeline](Timeline.md).
4
4
 
5
- **Keywords:** schedule, scheduler, planner, appointments, booking, meetings, week view, month view, drag and drop, events
5
+ **Keywords:** schedule, scheduler, planner, appointments, booking, meetings, week view, month view, drag and drop, events, business hours, opening hours, calendar week, KW
6
6
 
7
7
  **Import:** `import { Calendar, CalendarView } from '@ahrowe/ui'`
8
8
  **Types:** `import type { CalendarProps, CalendarEvent, CalendarRange, CalendarEventChange, CalendarEventContext, CalendarSlot, CalendarLabels, CalendarWeekday, CalendarWeekStart, CalendarSlots, CalendarDefaults } from '@ahrowe/ui'`
@@ -49,8 +49,8 @@ const [editing, setEditing] = useState<{ booking: Booking | CalendarSlot; anchor
49
49
  // Read-only month and agenda
50
50
  <Calendar events={events} views={[CalendarView.Month, CalendarView.Agenda]} />
51
51
 
52
- // A working week that opens at 06:00
53
- <Calendar events={events} defaultView={CalendarView.Week} hiddenDays={[0, 6]} scrollToHour={6} />
52
+ // A working week, 08:00 to 17:00, with the rest of the day shaded
53
+ <Calendar events={events} defaultView={CalendarView.Week} hiddenDays={[0, 6]} workingHours={[8, 17]} />
54
54
  ```
55
55
 
56
56
  **Enums:** `CalendarView`: `Month`, `Week`, `Day`, `Agenda`
@@ -59,28 +59,38 @@ const [editing, setEditing] = useState<{ booking: Booking | CalendarSlot; anchor
59
59
 
60
60
  **Events** are plain objects: `{ id, title, start, end, allDay?, color?, readOnly? }`.
61
61
 
62
+ - `id` is **unique among `events`**. Each occurrence of a recurring series needs its own, such as `` `${seriesId}-${day}` ``: two events with one id are drawn with one React key, and a drag picks up the first of them.
62
63
  - `end` is **exclusive**, for timed and all-day events alike. A one-day all-day event on the 26th runs from midnight on the 26th to midnight on the 27th. A timed event ending at midnight does not show on the next day.
63
64
  - Timed events of 24 hours or more are drawn in the all-day row, not stretched down the time grid.
64
65
  - A timed event is drawn exactly as long as it lasts. One under 15 minutes has no room for its title, so it is a bar of its real length with the title on a line beneath it, and the next event in its column leaves that line free. Zoomed in far enough, the bar holds its title like any other event.
65
- - `color` is any CSS colour, `var(--success-color)` included. The event is tinted from it against the page background, so any colour reads in both light and dark themes.
66
+ - `color` is a `ThemeColor` (`color: ThemeColor.Success`) or any CSS colour, see [ThemeColor.md](ThemeColor.md). The event is tinted from it against the page background, so any colour reads in both light and dark themes.
66
67
  - `readOnly` events can still be clicked, but not moved or resized.
67
68
 
68
69
  **Loading events and recurring series.** `onRangeChange` fires on mount and whenever the shown period changes, with that period **and one either side of it**, because swiping reveals the neighbours before it pages. Fetch events for that range, and expand recurring series into it yourself: the calendar has no recurrence rules of its own.
69
70
 
70
71
  ```tsx
71
72
  const [events, setEvents] = useState<CalendarEvent[]>([]);
73
+ const latest = useRef<CalendarRange | null>(null);
72
74
 
73
75
  <Calendar
74
76
  events={events}
75
- onRangeChange={async ({ start, end }) => setEvents(await api.events(start, end))}
77
+ onRangeChange={async (range) => {
78
+ latest.current = range;
79
+ const loaded = await api.events(range.start, range.end);
80
+ // Paged on while this loaded: a later range's answer is the one to show.
81
+ if (latest.current === range) setEvents(loaded);
82
+ }}
76
83
  />
77
84
  ```
78
85
 
79
86
  **Editing:**
80
87
 
81
- - With a **mouse**, drag on empty time to create, drag an event to move it, and drag its bottom edge to resize it. A plain click on empty time creates an hour (or `slotMinutes`, if longer); in the month view it creates an all-day slot.
88
+ - With a **mouse**, drag on empty time to create, drag an event to move it, and drag its bottom edge to resize it. A plain click on empty time creates an hour (or `slotMinutes`, if longer).
89
+ - **Whole days** are created and moved the same way in the month view and in the all-day row of the week and day views: a click creates an all-day slot on that day, a drag across days creates one over all of them, and dragging an event moves it by days.
82
90
  - With **touch**, press and hold for 400ms to pick up, then drag. A tap does what a click does. On a coarse pointer the resize grip is always visible.
83
91
  - Moving and resizing snap to `slotMinutes`. A live time label follows the drag, and `Escape` cancels it.
92
+ - The header's **New event** button (shown when `onSlotCreate` is set) creates on the selected day: in the week and day views the hour from the next full hour of the clock (23:00 at the latest, so it stays on that day), elsewhere the whole day. It is the keyboard's way to create.
93
+ - A click on empty time that closes a `Popover` of this library, such as your editor, only closes it; the next click creates. A click on another event still opens that one.
84
94
  - Update `events` in the same render as `onEventChange`, or **return a promise**: the event then stays where it was dropped until the promise settles, and is drawn from `events` again after that. So update `events` before it resolves, and reject to put the event back:
85
95
 
86
96
  ```tsx
@@ -123,7 +133,11 @@ The example also:
123
133
 
124
134
  **Navigating:** the header's arrows, **Today** and the view switcher. In the month, week and day views a horizontal swipe on touch pages to the next or previous period, with its events already in view while you swipe; the agenda is a list and pages with the arrows only. Pinch the week or day view, or hold Ctrl and use the wheel or trackpad, to zoom the hours; the zoom is kept when switching views. Clicking a day number, or a weekday in the week view, opens that day.
125
135
 
126
- **On a narrow calendar** (under 600px of its own width, not the viewport's) the month view becomes a grid with coloured dots above the selected day's events. Tapping a day selects it rather than opening it, and with `onSlotCreate` set, a **New event** button above the list creates an all-day slot on the selected day. Scrolling the list folds the month up into the selected week; swiping then pages by week instead of by month. Under `prefers-reduced-motion: reduce` the month folds in one step, once the list has scrolled the whole way, instead of following the scroll.
136
+ **On a narrow calendar** (under 600px of its own width, not the viewport's) the month view becomes a grid with coloured dots above the selected day's events. Tapping a day selects it rather than opening it; the header's **New event** button creates an all-day slot on it. Scrolling the list folds the month up into the selected week; swiping then pages by week instead of by month. Under `prefers-reduced-motion: reduce` the month folds in one step, once the list has scrolled the whole way, instead of following the scroll.
137
+
138
+ The week view of a narrow calendar shows **three days** from the selected one and pages by three, as seven columns at phone width leave no room for a title. The switcher still calls it Week, and `onRangeChange` reports those three days and their neighbours.
139
+
140
+ **Working hours and week numbers:** `workingHours={[8, 17]}` shades the hours before 08:00 and from 17:00 in the week and day views, and makes 08:00 the hour they open at when today is not shown. `[22, 6]` is an overnight shift, shaded from 06:00 to 22:00. `showWeekNumbers` labels each row of the month view and the corner of the week and day views with its **ISO 8601** week, the numbering used across most of Europe; a week that starts on another day than Monday shows the ISO week holding most of its days. The month of a narrow calendar has no room for them and leaves them out. `labels.weekNumber` words it: ``(week) => `KW ${week}` `` in German.
127
141
 
128
142
  **Key props:**
129
143
 
@@ -131,30 +145,33 @@ The example also:
131
145
  |------|------|-------------|
132
146
  | `events` | `E[]` | The events to show, `E extends CalendarEvent` |
133
147
  | `date` / `defaultDate` / `onDateChange` | `string` | Selected day, `'YYYY-MM-DD'`, controlled or uncontrolled: the same value a [DatePicker](DatePicker.md) holds, so the two can share state |
134
- | `view` / `defaultView` / `onViewChange` | `CalendarView` | Shown view, controlled or uncontrolled (default `Month`) |
148
+ | `view` / `defaultView` / `onViewChange` | `CalendarView` | Shown view, controlled or uncontrolled (default the first of `views`) |
135
149
  | `views` | `CalendarView[]` | Views in the switcher, in order; hidden when there is one (default all four) |
136
150
  | `locale` | `string` | BCP 47 tag for dates, times and the week start (default the browser's) |
137
151
  | `weekStartsOn` | `0` to `6` | First day of the week, `0` being Sunday (default the locale's, else Monday) |
138
152
  | `slotMinutes` | `number` | What creating, moving and resizing snap to (default `15`) |
139
153
  | `hiddenDays` | `CalendarWeekday[]` | Weekdays left out of every view, `0` being Sunday: `[0, 6]` hides the weekend |
140
- | `scrollToHour` | `number` | Hour the week and day views open at, such as `6` (default an hour before now while today is shown, otherwise `7`) |
154
+ | `scrollToHour` | `number` | Hour the week and day views open at, such as `6` (default an hour before now while today is shown, otherwise the start of `workingHours`, or `7`) |
155
+ | `workingHours` | `[start, end]` | Hours of working time in the week and day views, `[8, 17]`, or `[22, 6]` overnight; the rest is shaded |
156
+ | `showWeekNumbers` | `boolean` | ISO 8601 week numbers on the month's rows and in the week and day views' corner (default `false`) |
141
157
  | `onRangeChange` | `(range: CalendarRange) => void` | The shown period plus one on either side |
142
158
  | `onEventClick` | `(event: E, anchor: HTMLElement) => void` | An event was clicked; `anchor` is its element, ready for `Popover`'s `anchor` |
143
159
  | `onEventChange` | `(change: CalendarEventChange<E>) => void \| Promise<unknown>` | Moved or resized. Setting it makes events draggable. A returned promise keeps the event in place until it settles |
144
- | `onSlotCreate` | `(slot: CalendarSlot, anchor: HTMLElement) => void` | Empty time clicked or dragged over. Setting it enables creating. `anchor` is the day's cell in the month view (the **New event** button in a narrow one) and an invisible box over the new slot in the week and day views, ready for `Popover`'s `anchor` |
160
+ | `onSlotCreate` | `(slot: CalendarSlot, anchor: HTMLElement) => void` | Empty time clicked or dragged over, or the header's **New event** pressed. Setting it enables creating. `anchor` is ready for `Popover`'s `anchor`: the first day's cell in the month view, the first day's header for the all-day row, an invisible box over the new slot in the time grid, and the button itself from the header |
145
161
  | `renderEvent` | `(event: E, context: CalendarEventContext) => ReactNode` | Content of an event in place of its title. No interactive elements. `context.singleLine` is set where it has one line: an event under 45 minutes, an all-day bar, a month row. Keep to the title there |
162
+ | `eventClassName` | `(event: E) => string \| undefined` | A class for one event's element in every view, next to `classNames.event`: a tentative, cancelled or selected event |
146
163
  | `ref` | `Ref<HTMLDivElement>` | The root element |
147
164
 
148
165
  Give the calendar a height. It is `40em` tall by default and scrolls inside itself; `style={{ height: '100dvh' }}` or a class sets another.
149
166
 
150
- **Keyboard:** in the month view the days are a grid with one tab stop on the selected day: `←`/`→` move a day, `↑`/`↓` a week, `Home`/`End` go to the start and end of the week, `PageUp`/`PageDown` a month. `Enter` or `Space` opens a list of that day's events, with a **New event** button when `onSlotCreate` is set. In the week and day views every event is a button, in time order.
167
+ **Keyboard:** in the month view the days are a grid with one tab stop on the selected day: `←`/`→` move a day, `↑`/`↓` a week, `Home`/`End` go to the start and end of the week, `PageUp`/`PageDown` a month. `Enter` or `Space` opens a list of that day's events, with a **New event** button when `onSlotCreate` is set. In the week and day views every event is a button, in time order. The header's **New event** button creates in every view; opened from it with the keyboard, a `Popover` editor takes the focus.
151
168
 
152
169
  **Accessibility:**
153
170
 
154
171
  - The period title is a polite live region, so paging is announced.
155
172
  - Days carry their full date and event count as their name, and today has `aria-current="date"`.
156
173
  - Each day column of the time grid is a group named by its date.
157
- - **Dragging needs a single-pointer alternative (WCAG 2.5.7).** Creating has one, a click. For moving and resizing it has to be your `onEventClick` dialog, so let it edit the start and end.
174
+ - **Dragging needs a single-pointer alternative (WCAG 2.5.7).** Creating has one, a click, and the header's button. For moving and resizing it has to be your `onEventClick` dialog, so let it edit the start and end.
158
175
 
159
176
  **Theming:** these are theme variables (typed on `ThemeVariables`). Set them theme-wide via `ThemeProvider`'s `variables`, or per instance via `style`:
160
177
 
@@ -164,21 +181,22 @@ Give the calendar a height. It is `40em` tall by default and scrolls inside itse
164
181
  | `--calendar-today-color` | `var(--primary-color)` |
165
182
  | `--calendar-now-color` | `var(--error-color)` |
166
183
  | `--calendar-event-radius` | `6px` |
184
+ | `--calendar-off-hours-color` | `var(--background-accent)` (the hours outside `workingHours`) |
167
185
 
168
- **Global defaults:** `ConfigProvider` sets `labels`, `locale`, `weekStartsOn`, `slotMinutes`, `views`, `hiddenDays` and `scrollToHour` for every calendar, e.g. `defaultProps={{ Calendar: { locale: 'de-AT', weekStartsOn: 1 } }}`. The other props depend on your event type, so they are set per instance. See [ConfigProvider.md](ConfigProvider.md).
186
+ **Global defaults:** `ConfigProvider` sets `labels`, `locale`, `weekStartsOn`, `slotMinutes`, `views`, `hiddenDays`, `scrollToHour`, `workingHours` and `showWeekNumbers` for every calendar, e.g. `defaultProps={{ Calendar: { locale: 'de-AT', weekStartsOn: 1 } }}`. The other props depend on your event type, so they are set per instance. See [ConfigProvider.md](ConfigProvider.md).
169
187
 
170
188
  **Slots:** `root` `header` `dayHeader` `cell` `event`
171
189
 
172
- **Labels:** `previous` `next` `today` `viewSwitcher` `month` `week` `day` `agenda` `allDay` `more` `eventCount` `noEvents` `newEvent`: the text this component renders of its own. `more` and `eventCount` are functions of a count. Dates and times come from `locale`, not from here. Pass `labels` to override any of them, on the component or app-wide through `ConfigProvider`; keys merge individually. Type: `CalendarLabels`.
190
+ **Labels:** `previous` `next` `today` `viewSwitcher` `month` `week` `day` `agenda` `allDay` `more` `eventCount` `noEvents` `newEvent` `weekNumber`: the text this component renders of its own. `more` and `eventCount` are functions of a count, `weekNumber` of the week's number. Dates and times come from `locale`, not from here. Pass `labels` to override any of them, on the component or app-wide through `ConfigProvider`; keys merge individually. Type: `CalendarLabels`.
173
191
 
174
192
  **Limits:**
175
193
 
176
- - **One time zone, the browser's.** A `timeZone` prop would need `Temporal`, which iOS Safari does not ship yet.
194
+ - **One time zone, the browser's.** Every day boundary and clock time is worked out from the local `Date` fields. Showing another zone would mean routing each of them through `Intl` offset lookups, which the calendar does not do.
177
195
  - **No recurrence rules.** Expand series for the range `onRangeChange` reports.
178
196
  - **Moving stays within the shown period**, and between days or times of the same kind: an event cannot be dragged from the time grid into the all-day row.
197
+ - **No resource columns.** A column per person or room, as a team schedule has, is not a view of its own.
179
198
  - **No right-to-left layout.**
180
199
  - **Safari on macOS** sends a trackpad pinch as a gesture event rather than a Ctrl+wheel, so there it zooms the page as usual; pinching on a touch screen zooms the hours in every browser.
181
200
  - **A controlled `date` must update in the same render as `onDateChange`.** After a swipe, the calendar shows the new period's panes straight away; a parent that updates later makes it jump back and forth.
182
- - **A tap outside your own popover also reaches the calendar.** `Popover` closes on pointer release and lets the click through, so a tap on empty time closes it and creates a slot: an editor opened from `onSlotCreate` moves to the new slot.
183
201
 
184
202
  HTML attributes such as `id`, `aria-label` and `data-*` are passed to the root element.
package/docs/Card.md CHANGED
@@ -4,26 +4,46 @@
4
4
 
5
5
  **Keywords:** panel, box
6
6
 
7
- **Import:** `import { Card, CardStyleType, CardHeader, CardMedia, CardContent, CardActions } from '@ahrowe/ui'`
7
+ **Import:** `import { Card, CardStyleType, CardHeader, CardMedia, CardContent, CardActions, ThemeColor } from '@ahrowe/ui'`
8
8
 
9
- **Style variants:** `CardStyleType.Elevated` (default) | `CardStyleType.Outlined` | `CardStyleType.Filled`
9
+ **Styles:** `Outlined` and `Light` mean what they mean on Button, Badge and Chip; `color` is the
10
+ colour they use (a `ThemeColor`, default `Neutral`, or any CSS colour, see
11
+ [ThemeColor.md](ThemeColor.md)). Text inside stays the page's text colour in every style. There
12
+ is no `Filled`: body text on a solid colour reads badly.
13
+
14
+ - `CardStyleType.Elevated` (default): a raised surface with a shadow, always neutral
15
+ - `CardStyleType.Outlined`: a border in the colour, no fill. In a colour it marks one card among its neighbours, such as the current plan. Say what the mark means in text as well (a subtitle or a Badge): the colour alone is not read out
16
+ - `CardStyleType.Light`: a flat tint of the colour, no border. In a colour it sets one card apart by a colour of its own, such as the recommended plan or a category
17
+
18
+ A message about something that happened (saved, failed, almost full) is not a coloured card but an
19
+ [Alert](Alert.md), which brings the icon, the screen-reader role and the dismiss button.
10
20
 
11
21
  ```tsx
12
- import { Card, CardStyleType, CardHeader, CardMedia, CardContent, CardActions } from '@ahrowe/ui';
22
+ import { Card, CardStyleType, CardHeader, CardMedia, CardContent, CardActions, ThemeColor } from '@ahrowe/ui';
13
23
 
14
- // Elevated (default) — accent fill + shadow
24
+ // Elevated (default): fill and shadow
15
25
  <Card>
16
- <CardHeader title="Elevated" subTitle="Fill + shadow" />
26
+ <CardHeader title="Elevated" subTitle="Fill and shadow" />
17
27
  </Card>
18
28
 
19
- // Outlined — transparent, defined by a border, no shadow
29
+ // Outlined: transparent, defined by a border, no shadow
20
30
  <Card styleType={CardStyleType.Outlined}>
21
31
  <CardHeader title="Outlined" />
22
32
  </Card>
23
33
 
24
- // Filled — flat accent fill, no shadow
25
- <Card styleType={CardStyleType.Filled}>
26
- <CardHeader title="Filled" />
34
+ // Light: flat fill, no shadow
35
+ <Card styleType={CardStyleType.Light}>
36
+ <CardHeader title="Light" />
37
+ </Card>
38
+
39
+ // The selected plan, bordered in the primary colour
40
+ <Card styleType={CardStyleType.Outlined} color={ThemeColor.Primary}>
41
+ <CardHeader title="Pro" subTitle="Your current plan" />
42
+ </Card>
43
+
44
+ // The recommended plan, tinted
45
+ <Card styleType={CardStyleType.Light} color={ThemeColor.Primary}>
46
+ <CardHeader title="Team" subTitle="Recommended for 5 people or more" />
27
47
  </Card>
28
48
 
29
49
  <Card hoverEffect onClick={handleClick}>
@@ -39,7 +59,7 @@ import { Card, CardStyleType, CardHeader, CardMedia, CardContent, CardActions }
39
59
  <CardActions
40
60
  actions={[
41
61
  { id: 'edit', label: 'Edit', onClick: handleEdit },
42
- { id: 'delete', label: 'Delete', styleType: ButtonStyleType.Delete, onClick: handleDelete },
62
+ { id: 'delete', label: 'Delete', color: ThemeColor.Error, onClick: handleDelete },
43
63
  ]}
44
64
  />
45
65
  </Card>
@@ -49,15 +69,16 @@ All sub-components are optional — use only what you need. Stacked sub-componen
49
69
 
50
70
  **Enums:**
51
71
 
52
- - `CardStyleType`: `Elevated` (default) | `Outlined` | `Filled`
72
+ - `CardStyleType`: `Elevated` (default) | `Outlined` | `Light`
53
73
 
54
74
  **CardProps:**
55
75
 
56
76
  | Prop | Type | Description |
57
77
  |------|------|-------------|
58
- | `styleType` | `CardStyleType` | Surface variant — `Elevated` (fill + shadow), `Outlined` (transparent + border), `Filled` (flat fill) |
78
+ | `styleType` | `CardStyleType` | `Elevated` (default, fill and shadow), `Outlined` (a border) or `Light` (a flat fill) |
79
+ | `color` | `ColorValue` | The border of `Outlined` and the tint of `Light`: a `ThemeColor` (default `Neutral`, the theme's card surfaces) or any CSS colour. `Elevated` ignores it |
59
80
  | `onClick` | `() => void` | Makes the card clickable, by pointer and by Enter/Space. A click or key on a control inside the card (a field, a link, a button, anything with an interactive `role`) is that control's, and neither fires this nor ripples |
60
- | `hoverEffect` | `boolean` | Adds hover elevation |
81
+ | `hoverEffect` | `boolean` | Lifts the card on hover and tints it in its text colour, over whatever its style and colour paint |
61
82
  | `tabIndex` | `number \| null` | For keyboard navigation |
62
83
  | `autoGap` | `boolean` | Space stacked sub-components apart with a shared gap (default `true`); set `false` to space them yourself |
63
84
  | `clip` | `boolean` | Clip content to the rounded corners (`overflow: hidden`, default `false`). Set `true` for full-bleed `CardMedia` or a clipped hover/ripple effect. Safe to enable even when the card holds a `Dropdown`/`Popover`/`Tooltip` — those popovers are portaled and always escape the card regardless of this setting |
@@ -75,7 +96,7 @@ All sub-components are optional — use only what you need. Stacked sub-componen
75
96
 
76
97
  | Prop | Type | Description |
77
98
  |------|------|-------------|
78
- | `actions` | `CardAction[]` | Array of `{ id, label, styleType, onClick }` renders Buttons |
99
+ | `actions` | `CardAction[]` | Array of `{ id, label, styleType, color, onClick }` renders Buttons (`Outlined` `Primary` unless set) |
79
100
  | `children` | `ReactNode` | Custom content instead of `actions` |
80
101
 
81
102
  ## Sizing
@@ -85,3 +106,21 @@ Card is spaced by its font: the padding, the header's gap and thumbnail, the gap
85
106
  `CardMedia` bleeds to the card's edges with a negative margin that has to stay equal to the padding, so change the two together.
86
107
 
87
108
  **Slots:** `root` `content`
109
+
110
+ ## Migration from `Filled`
111
+
112
+ Before 0.43 the flat style was called `Filled`. It is `Light` now, the name the library's other
113
+ components use for the same look. TypeScript points at each use:
114
+
115
+ | Before | After |
116
+ |--------|-------|
117
+ | `styleType={CardStyleType.Filled}` | `styleType={CardStyleType.Light}` |
118
+
119
+ `defaultTheme` and `lightTheme` still draw it in `Neutral` in `--background-accent`, through
120
+ `--background-card-filled`. A theme that does not set that variable now gets the see-through tint
121
+ of the text colour that every other `Light` uses, where it used to get `--background-accent`. On a
122
+ dark theme that tint is about as light as `Elevated`, so set the variable there to keep the two
123
+ apart.
124
+
125
+ A card with `hoverEffect` no longer turns `--background-accent` on hover: it keeps its own surface
126
+ and gets a light tint in its text colour over it, so a coloured card keeps its colour.
package/docs/Checkbox.md CHANGED
@@ -33,7 +33,7 @@ const agreedValidator = new FormValidator(false, [Validators.required()]);
33
33
  | `onToggle` | `(isToggled: boolean, event?) => void` | Change handler |
34
34
  | `formValidator` | `FormValidator` | Connects to form validation |
35
35
  | `disabled` | `boolean` | |
36
- | `isLoading` | `boolean` | Shows skeleton state |
36
+ | `isLoading` | `boolean` | Shows a [Loader](Loader.md) in place of the box and ignores clicks |
37
37
  | `children` | `ReactNode` | Custom label content |
38
38
  | `cursorDefault` | `boolean` | Use default cursor instead of pointer |
39
39
  | `ref` | `Ref<HTMLDivElement>` | Ref to the root element |
package/docs/Chip.md CHANGED
@@ -4,20 +4,22 @@
4
4
 
5
5
  **Keywords:** pill
6
6
 
7
- **Import:** `import { Chip, ChipContainer, ChipStyleType } from '@ahrowe/ui'`
7
+ **Import:** `import { Chip, ChipContainer, ChipStyleType, ThemeColor } from '@ahrowe/ui'`
8
8
 
9
- **Style variants:** `ChipStyleType.Default` (default) | `ChipStyleType.Primary` | `ChipStyleType.Info` | `ChipStyleType.Warn` | `ChipStyleType.Error`
9
+ **Styles:** `ChipStyleType.Light` (default) | `ChipStyleType.Filled` | `ChipStyleType.Outlined`, in any `color`: a `ThemeColor` (default `Neutral`) or any CSS colour, see [ThemeColor.md](ThemeColor.md).
10
10
 
11
11
  ```tsx
12
- import { Chip, ChipContainer, ChipStyleType } from '@ahrowe/ui';
12
+ import { Chip, ChipContainer, ChipStyleType, ThemeColor } from '@ahrowe/ui';
13
13
 
14
14
  // Basic chip
15
15
  <Chip text="React" />
16
16
 
17
- // Coloured variants
18
- <Chip text="Primary" styleType={ChipStyleType.Primary} />
19
- <Chip text="Warning" styleType={ChipStyleType.Warn} />
20
- <Chip text="Error" styleType={ChipStyleType.Error} />
17
+ // Colours: a light tint by default
18
+ <Chip text="Warning" color={ThemeColor.Warn} />
19
+ <Chip text="Error" color={ThemeColor.Error} />
20
+
21
+ // A selected filter: filled in the primary colour
22
+ <Chip text="Active" styleType={ChipStyleType.Filled} color={ThemeColor.Primary} onClick={toggle} />
21
23
 
22
24
  // Removable chip
23
25
  <Chip
@@ -47,14 +49,15 @@ import { Chip, ChipContainer, ChipStyleType } from '@ahrowe/ui';
47
49
 
48
50
  **Enums:**
49
51
 
50
- - `ChipStyleType`: `Default` (default) | `Primary` | `Info` | `Warn` | `Error`
52
+ - `ChipStyleType`: `Light` (default) | `Filled` | `Outlined`
51
53
 
52
54
  **ChipProps:**
53
55
 
54
56
  | Prop | Type | Description |
55
57
  |------|------|-------------|
56
58
  | `text` | `string` | Chip label |
57
- | `styleType` | `ChipStyleType` | Colour variant (default `Default`) |
59
+ | `styleType` | `ChipStyleType` | `Light` (default), `Filled` or `Outlined` |
60
+ | `color` | `ColorValue` | A `ThemeColor` (default `Neutral`) or any CSS colour |
58
61
  | `thumbnail` | `string` | Avatar image URL |
59
62
  | `labels.remove` | `string` | Accessible name for the remove button. Default: `'Remove'` |
60
63
  | `showRemoveIcon` | `boolean` | Show × icon |
@@ -70,3 +73,15 @@ import { Chip, ChipContainer, ChipStyleType } from '@ahrowe/ui';
70
73
  **Labels:** `remove` — the text this component renders of its own. Pass `labels` to override any of them, on the component or app-wide through `ConfigProvider`; keys merge individually. Type: `ChipLabels`.
71
74
 
72
75
  **Slots:** `root` `inner` `thumbnail` `text` `removeIcon`
76
+
77
+ ## Migration from colour styles
78
+
79
+ Before 0.43, `ChipStyleType` was a colour, and `Primary` was filled while the others were a light
80
+ tint. Style and colour are now separate props. The old members are gone and TypeScript points at
81
+ each:
82
+
83
+ | Before | After |
84
+ |--------|-------|
85
+ | `styleType={ChipStyleType.Default}` | nothing: `Light` `Neutral` is the default |
86
+ | `styleType={ChipStyleType.Primary}` | `styleType={ChipStyleType.Filled} color={ThemeColor.Primary}` |
87
+ | `styleType={ChipStyleType.Info}` (and `Warn`, `Error`) | `color={ThemeColor.Info}` |
@@ -95,10 +95,10 @@ A nested provider inherits it unless it sets its own, the same way `defaultProps
95
95
  Each entry is a `Partial<...Props>`, so any of that component's props can be defaulted:
96
96
 
97
97
  - **Form inputs:** `Input` · `Textarea` · `NumberInput` · `Dropdown` · `InputDropdown` · `Checkbox` · `Switch` · `RadioGroup` · `DatePicker` · `OptionPicker` · `OtpInput`
98
- - **Display:** `Button` · `CopyButton` · `ActionButtons` · `Badge` · `Chip` · `Card` · `SectionHeader` · `Skeleton` · `Accordion` · `Divider` · `Timer` · `WeatherIcon`
98
+ - **Display:** `Button` · `CopyButton` · `ActionButtons` · `Badge` · `Chip` · `Card` · `SectionHeader` · `Skeleton` · `Loader` · `LoadingOverlay` · `Accordion` · `Divider` · `Timer` · `WeatherIcon`
99
99
  - **Overlays:** `ConfirmModal` · `Modal` · `CommandPalette` · `Popover`
100
100
  - **Editors:** `RoomDrawer`, `RoomViewer`
101
- - **Scheduling:** `Calendar`, for `labels`, `locale`, `weekStartsOn`, `slotMinutes`, `views`, `hiddenDays` and `scrollToHour` only (see below)
101
+ - **Scheduling:** `Calendar`, for `labels`, `locale`, `weekStartsOn`, `slotMinutes`, `views`, `hiddenDays`, `scrollToHour`, `workingHours` and `showWeekNumbers` only (see below)
102
102
 
103
103
  ```tsx
104
104
  <ConfigProvider
@@ -106,7 +106,7 @@ Each entry is a `Partial<...Props>`, so any of that component's props can be def
106
106
  Input: { alwaysFloatLabel: true },
107
107
  Dropdown: { useMatLabelStyle: true },
108
108
  NumberInput: { decimalScale: 2, thousandSeparator: '.' },
109
- Button: { styleType: ButtonStyleType.Primary },
109
+ Button: { styleType: ButtonStyleType.Filled },
110
110
  Card: { styleType: CardStyleType.Outlined },
111
111
  Skeleton: { animation: SkeletonAnimation.Pulse },
112
112
  }}
@@ -138,6 +138,6 @@ Every string a component renders of its own is set through its `labels` prop, an
138
138
 
139
139
  **Labels merge per key**, unlike every other default here. An instance that overrides one string keeps the provider's translations for the rest, so `<Alert labels={{ dismiss: 'Weg damit' }} />` under the provider above does not lose anything else Alert might have been given. Anything the component does not produce itself, a `title`, a column `label`, a button's children, is already yours and never appears in `labels`.
140
140
 
141
- `ColorPicker` and `VirtualList` appear in `ComponentDefaults` with their labels only: the first is configured elsewhere, the second has generic props that a per-key default map cannot express. `Calendar` is generic too, so its entry is the props that do not depend on the event type: `labels`, `locale`, `weekStartsOn`, `slotMinutes`, `views`, `hiddenDays` and `scrollToHour`. `Toast` is not there at all, because `AhroweProvider`'s `toast` prop is already its app-wide configuration and carries `labels` itself.
141
+ `ColorPicker` and `VirtualList` appear in `ComponentDefaults` with their labels only: the first is configured elsewhere, the second has generic props that a per-key default map cannot express. `Calendar` is generic too, so its entry is the props that do not depend on the event type: `labels`, `locale`, `weekStartsOn`, `slotMinutes`, `views`, `hiddenDays`, `scrollToHour`, `workingHours` and `showWeekNumbers`. `Toast` is not there at all, because `AhroweProvider`'s `toast` prop is already its app-wide configuration and carries `labels` itself.
142
142
 
143
143
  Each component's doc lists its own keys under **Labels:**.
@@ -8,7 +8,7 @@
8
8
  **Types:** `import type { CopyButtonProps, CopyButtonLabels } from '@ahrowe/ui'`
9
9
 
10
10
  ```tsx
11
- import { CopyButton, Input } from '@ahrowe/ui';
11
+ import { CopyButton, Input, ThemeColor, showToast } from '@ahrowe/ui';
12
12
 
13
13
  <span>
14
14
  {invoice.number} <CopyButton value={invoice.number} />
@@ -18,10 +18,10 @@ import { CopyButton, Input } from '@ahrowe/ui';
18
18
  <Input label='API key' value={apiKey} readOnly suffix={<CopyButton value={apiKey} />} />
19
19
 
20
20
  // a toast on success, where the button is not where the user is looking
21
- <CopyButton value={url} onCopy={() => showToast('Link copied', { type: 'success' })} />
21
+ <CopyButton value={url} onCopy={() => showToast('Link copied', { color: ThemeColor.Success })} />
22
22
  ```
23
23
 
24
- After a click the icon rotates into a check (through `AnimatedIcon`, held still under `prefers-reduced-motion`) for `timeout` ms, the accessible name and tooltip read "Copied", and a polite live region announces it, because a swapped icon or a changed `aria-label` alone is not read out. A refused write (an insecure context, a blocked iframe) announces "Could not copy" and calls `onError`; the icon stays as it was. `CopyButton` shows no toast of its own: pass one through `onCopy` / `onError` if you want it.
24
+ It is an [ActionIcon](ActionIcon.md), so it takes the same `styleType` and `color`, and turns `Success` while copied. After a click the icon rotates into a check (through `AnimatedIcon`, held still under `prefers-reduced-motion`) for `timeout` ms, the accessible name and tooltip read "Copied", and a polite live region announces it, because a swapped icon or a changed `aria-label` alone is not read out. A refused write (an insecure context, a blocked iframe) announces "Could not copy" and calls `onError`; the icon stays as it was. `CopyButton` shows no toast of its own: pass one through `onCopy` / `onError` if you want it.
25
25
 
26
26
  The live region is rendered as a sibling of the button, so `CopyButton` returns two elements. It is visually hidden and takes no space.
27
27
 
@@ -35,8 +35,9 @@ The live region is rendered as a sibling of the button, so `CopyButton` returns
35
35
  | `copiedIcon` | `IconDefinition \| ReactElement` | Icon while copied (default `faCheck`) |
36
36
  | `onCopy` | `(value: string) => void` | Called after a successful copy |
37
37
  | `onError` | `() => void` | Called when the clipboard refuses the write. `useClipboard` returns the reason |
38
- | `onClick` | `(event: MouseEvent) => void` | Called on every click, before the copy |
39
- | `ref` | `Ref<HTMLDivElement>` | Ref to the button |
38
+ | `onClick` | `(event: MouseEvent<HTMLButtonElement>) => void` | Called on every click, before the copy |
39
+ | `color` | `ColorValue` | Its colour at rest (default `Neutral`); `Success` while copied |
40
+ | `ref` | `Ref<HTMLButtonElement>` | Ref to the button |
40
41
 
41
42
  **Global defaults:** adopts `ConfigProvider`, e.g. `defaultProps={{ CopyButton: { timeout: 1500 } }}`. See [ConfigProvider.md](ConfigProvider.md).
42
43
 
package/docs/Loader.md ADDED
@@ -0,0 +1,95 @@
1
+ # Loader
2
+
3
+ **When to use:** A loading indicator for something in progress with no known end: a fetch, a save, a connection. To cover content while it reloads use [LoadingOverlay.md](LoadingOverlay.md), for a button use `Button`'s own `isLoading`, and for content not there yet a [Skeleton.md](Skeleton.md) in its shape reads better. For progress you can measure, use [ProgressBar.md](ProgressBar.md).
4
+
5
+ **Keywords:** busy, waiting, activity indicator, throbber, async, fetching, typing indicator, equalizer, radar, ripple
6
+
7
+ **Import:** `import { Loader, LoaderType, ThemeColor } from '@ahrowe/ui'`
8
+ **Types:** `import type { LoaderProps, LoaderLabels } from '@ahrowe/ui'`
9
+
10
+ **Enums:** `LoaderType.Spinner` (default) | `LoaderType.Comet` | `LoaderType.Dots` | `LoaderType.Bars` | `LoaderType.Pulse`
11
+
12
+ - `Spinner`: an arc that grows and shrinks on a faint track. Reads at any size, down to 16px
13
+ - `Comet`: a glowing head trailing a tapering tail round a ring. For a hero spot: a page, a panel, an overlay
14
+ - `Dots`: three dots in a wave. For a line of text or a reply being written
15
+ - `Bars`: bars rising and falling like an equaliser. For media, uploads and data being processed
16
+ - `Pulse`: rings rippling out from a core. For waiting on something outside the app: a device, a connection, a search
17
+
18
+ ```tsx
19
+ import { Loader, LoaderType, ThemeColor } from '@ahrowe/ui';
20
+
21
+ // Default: a Spinner in --primary-color, 2.5em square
22
+ {isLoading && <Loader />}
23
+
24
+ <Loader type={LoaderType.Comet} size='4em' />
25
+ <Loader type={LoaderType.Pulse} color={ThemeColor.Success} />
26
+ <Loader type={LoaderType.Bars} color='#e879f9' size={24} />
27
+
28
+ // In a line of text: Neutral takes the text's own colour, 1em its size. Dots rest on the
29
+ // baseline like an ellipsis; the round types sit centred on the text like an icon
30
+ <p>Ava is typing <Loader type={LoaderType.Dots} size='1em' color={ThemeColor.Neutral} /></p>
31
+ ```
32
+
33
+ **Sizing:** `size` sets width and height, which are always equal. It is `2.5em` by default, so a
34
+ loader follows the font size of what it sits in; pass any CSS length, or a number of pixels. Size it
35
+ with `size` rather than a `width` in a class: the stylesheet reads `size`, and a class would tie with
36
+ it on specificity.
37
+
38
+ **Colour:** `color` takes a `ThemeColor` (default `Primary`) or any CSS colour, see
39
+ [ThemeColor.md](ThemeColor.md). `ThemeColor.Neutral` takes the colour of the text around it, which
40
+ is what a loader on a coloured surface wants.
41
+
42
+ ## One type for the whole app
43
+
44
+ Every component with a loading state draws it with this `Loader`: `Button` (and so `SplitButton`,
45
+ `ActionButtons` and `ConfirmModal`), `Checkbox`, `VirtualList`, `Dropdown`, `KanbanBoard` and
46
+ `LoadingOverlay`. A default set once reaches all of them:
47
+
48
+ ```tsx
49
+ <AhroweProvider defaultProps={{ Loader: { type: LoaderType.Dots } }}>
50
+ <App />
51
+ </AhroweProvider>
52
+ ```
53
+
54
+ An app-wide `type` and `labels` reach all of them. `color` reaches all but Button's, which keeps
55
+ the button's text colour. `size` reaches only `LoadingOverlay`'s default loader and the ones you
56
+ place yourself; the others size theirs to fit.
57
+
58
+ **Accessibility:** the root is a `role="progressbar"` with no value, which is how an indeterminate
59
+ progress indicator is announced, named "Loading" (`labels.loading`). Pass `aria-labelledby` to name
60
+ it after visible text instead, as `LoadingOverlay` does with its `message`. Inside something whose
61
+ name comes from its content (a custom checkbox) or that may only hold its own items (a list), pass
62
+ `aria-hidden` and mark the container `aria-busy` instead, as `Checkbox` and `VirtualList` do.
63
+
64
+ **Note:** a loader keeps moving under `prefers-reduced-motion`. One that stands still says the app
65
+ has hung, which is the opposite of what it is there to say.
66
+
67
+ **Key props:**
68
+
69
+ | Prop | Type | Description |
70
+ |------|------|-------------|
71
+ | `type` | `LoaderType` | The animation (default `Spinner`) |
72
+ | `size` | `number \| string` | Width and height, any CSS length or a number of pixels (default `'2.5em'`) |
73
+ | `color` | `ColorValue` | A `ThemeColor` or any CSS colour (default `ThemeColor.Primary`) |
74
+ | `labels` | `LoaderLabels` | Text the loader produces itself, see below |
75
+ | `className` / `style` | | Root `span` |
76
+
77
+ **Labels:** `loading`, the accessible name. Pass `labels` to override it, on the component or app-wide through `ConfigProvider`; keys merge individually. Type: `LoaderLabels`.
78
+
79
+ ## Migration from `SpinnerLoading`
80
+
81
+ `SpinnerLoading` was removed in favour of `Loader`, whose default type is the same kind of spinner.
82
+
83
+ ```tsx
84
+ // Before
85
+ <SpinnerLoading className="my-spinner" /> // .my-spinner { width: 24px; height: 24px }
86
+
87
+ // After
88
+ <Loader size={24} />
89
+ ```
90
+
91
+ It used to be 70px by default and is `2.5em` now (40px at a 16px base), and it is a `span` rather
92
+ than an `svg`. It is announced as a progressbar named "Loading", where `SpinnerLoading` was not
93
+ announced at all.
94
+
95
+ **Slots:** none. The root `span` takes `className` and `style`.
@@ -0,0 +1,85 @@
1
+ # LoadingOverlay
2
+
3
+ **When to use:** Covering content while it reloads: a table refreshing, a form saving, a panel fetching its next page. It frosts over what it wraps and keeps its shape in view. For content not there yet a [Skeleton.md](Skeleton.md) in its shape reads better, and a lone indicator with nothing to cover is a [Loader.md](Loader.md).
4
+
5
+ **Keywords:** spinner, frosted glass, scrim, dim, disable interaction, pending, mask
6
+
7
+ **Import:** `import { LoadingOverlay, Loader, LoaderType } from '@ahrowe/ui'`
8
+ **Types:** `import type { LoadingOverlayProps } from '@ahrowe/ui'`
9
+
10
+ ```tsx
11
+ import { LoadingOverlay, Loader, LoaderType, AnimatedLogo, ThemeColor } from '@ahrowe/ui';
12
+
13
+ // Wrap what is loading. It needs no positioned parent: it is one
14
+ <LoadingOverlay isLoading={isFetching}>
15
+ <InvoiceTable rows={rows} />
16
+ </LoadingOverlay>
17
+
18
+ // A message under the loader, with a highlight sweeping across it
19
+ <LoadingOverlay isLoading={isSaving} message="Saving changes…">
20
+ <ProfileForm />
21
+ </LoadingOverlay>
22
+
23
+ // Any loader in place of the default one
24
+ <LoadingOverlay
25
+ isLoading={isConnecting}
26
+ message="Connecting to the printer…"
27
+ loader={<Loader type={LoaderType.Pulse} color={ThemeColor.Success} size="3.5em" />}
28
+ >
29
+ <PrinterPanel />
30
+ </LoadingOverlay>
31
+
32
+ // A branded one
33
+ <LoadingOverlay isLoading={isBooting} loader={<AnimatedLogo size="4em" />}>
34
+ <Dashboard />
35
+ </LoadingOverlay>
36
+ ```
37
+
38
+ ## Timing
39
+
40
+ The overlay waits `delay` (200ms) after `isLoading` turns true before it shows, so a load that
41
+ finishes faster never flashes it. Once shown it stays at least 400ms, so one that finishes just
42
+ after it appeared does not flash it either, then fades out. Loading again while it fades brings it
43
+ straight back. `delay={0}` shows it at once, from the first render on.
44
+
45
+ The content is marked `aria-busy` the moment `isLoading` is true, delay or not.
46
+
47
+ ## What it blocks
48
+
49
+ The backdrop takes every pointer event over the content and shows a `progress` cursor. It does not
50
+ take the focus or block the keyboard: making the content `inert` would drop the focus of whoever
51
+ pressed the button that started the load. An action that must not run twice should still check its
52
+ own loading state.
53
+
54
+ **Wrapping:** the root is a `div` with `position: relative`, and the content sits in a `div` of its
55
+ own, so anything inside with a `z-index` (a sticky header) stays under the backdrop. The backdrop
56
+ takes the root's `border-radius`, so a `className` that rounds the root rounds the overlay too.
57
+ Content taller than the screen keeps the loader in view rather than at its middle.
58
+
59
+ **Scrolling content:** give the scrolling to `classNames.content` (its `overflow` and its height
60
+ limit), not to the root. The backdrop covers the root's box, so in a root that scrolls it would
61
+ scroll away with the content and leave the rest uncovered.
62
+
63
+ **Theme variables:** `--loading-overlay-background` (the veil, default `--background` at 50%) and
64
+ `--loading-overlay-blur` (default `4px`, `0px` turns the blur off). See
65
+ [ThemeProvider.md](ThemeProvider.md).
66
+
67
+ **App-wide:** `LoadingOverlay` takes `defaultProps` like any other component, so one
68
+ `AhroweProvider` can give every overlay the same `loader` or `delay`. Its default loader is a
69
+ `Loader`, which follows `defaultProps.Loader` as well.
70
+
71
+ **Key props:**
72
+
73
+ | Prop | Type | Description |
74
+ |------|------|-------------|
75
+ | `isLoading` | `boolean` | Covers the content, blocks the pointer and marks it `aria-busy` (default `false`) |
76
+ | `children` | `ReactNode` | What the overlay covers |
77
+ | `message` | `ReactNode` | Text under the loader. Also the default loader's accessible name |
78
+ | `loader` | `ReactNode` | Shown in place of the default `<Loader />` |
79
+ | `delay` | `number` | Milliseconds before it shows (default `200`) |
80
+ | `className` / `style` | | Root `div` |
81
+
82
+ **Note:** under `prefers-reduced-motion` the panel fades in without rising and the message stands
83
+ still. The loader itself keeps moving, see [Loader.md](Loader.md).
84
+
85
+ **Slots:** `content` (the `div` around `children`) `backdrop` (the veil over it) `panel` (the column holding the loader and the message, for a card behind them) `message`
@@ -7,15 +7,15 @@
7
7
  **Import:** `import { ProgressBar } from '@ahrowe/ui'`
8
8
 
9
9
  ```tsx
10
- import { ProgressBar } from '@ahrowe/ui';
10
+ import { ProgressBar, ThemeColor } from '@ahrowe/ui';
11
11
 
12
12
  // Simple percentage
13
13
  <ProgressBar progress={75} total={100} />
14
14
 
15
- // Single progress with label and custom colour
15
+ // Single progress with label, in a theme colour
16
16
  <ProgressBar
17
17
  total={100}
18
- progress={{ amount: 60, label: 'Used', color: '#6200ea' }}
18
+ progress={{ amount: 60, label: 'Used', color: ThemeColor.Warn }}
19
19
  />
20
20
 
21
21
  // Stacked / segmented bar
@@ -39,9 +39,12 @@ import { ProgressBar } from '@ahrowe/ui';
39
39
  **Progress object:**
40
40
 
41
41
  ```ts
42
- { amount: number; label?: string; color?: string; class?: string }
42
+ { amount: number; label?: string; color?: ColorValue; class?: string }
43
43
  ```
44
44
 
45
+ `color` is a `ThemeColor` or any CSS colour (see [ThemeColor.md](ThemeColor.md)), `--primary-color`
46
+ when unset. A label on a coloured segment is black or white, whichever reads on it.
47
+
45
48
  **Theming:** override theme-wide via `ThemeProvider`'s `variables`, or per instance via `style`; falls back to a built-in default when unset:
46
49
 
47
50
  | Variable | Falls back to |
@@ -77,7 +77,7 @@ import { faFolder, faPen, faTrash } from '@fortawesome/free-solid-svg-icons';
77
77
  interface SectionHeaderAction {
78
78
  title?: string;
79
79
  icon: IconDefinition | ReactElement;
80
- onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
80
+ onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
81
81
  }
82
82
  ```
83
83