@ahrowe/ui 0.42.0 → 0.43.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 (273) hide show
  1. package/CHANGELOG.md +934 -0
  2. package/README.md +11 -10
  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/copyButton/copyButton.types.d.ts +5 -4
  29. package/dist/cjs-types/common/fab/components/fabBase/fabBase.d.ts +1 -1
  30. package/dist/cjs-types/common/fab/components/fabBase/fabBase.types.d.ts +2 -1
  31. package/dist/cjs-types/common/progressBar/progressBar.d.ts +0 -1
  32. package/dist/cjs-types/common/progressBar/progressBar.types.d.ts +3 -1
  33. package/dist/cjs-types/common/splitButton/splitButton.types.d.ts +4 -1
  34. package/dist/cjs-types/common/styles/tone.d.ts +11 -0
  35. package/dist/cjs-types/common/themeProvider/color.types.d.ts +20 -0
  36. package/dist/cjs-types/common/themeProvider/index.d.ts +2 -0
  37. package/dist/cjs-types/common/themeProvider/theme.types.d.ts +3 -6
  38. package/dist/cjs-types/common/timeline/timeline.types.d.ts +3 -10
  39. package/dist/cjs-types/common/toast/index.d.ts +1 -1
  40. package/dist/cjs-types/common/toast/toast.types.d.ts +7 -3
  41. package/dist/cjs-types/common/types/actions.types.d.ts +1 -1
  42. package/dist/cjs-types/common/utils/dismissClick.d.ts +4 -0
  43. package/dist/cjs-types/common/utils/isDev.d.ts +1 -0
  44. package/dist/esm/common/accordion/accordion.mjs +1 -1
  45. package/dist/esm/common/accordion/accordion.mjs.map +1 -1
  46. package/dist/esm/common/accordion/accordion.module.mjs +1 -1
  47. package/dist/esm/common/accordion/accordion.module.mjs.map +1 -1
  48. package/dist/esm/common/accordion/accordion.types.mjs +1 -1
  49. package/dist/esm/common/accordion/accordion.types.mjs.map +1 -1
  50. package/dist/esm/common/actionButtons/actionButtons.mjs +1 -1
  51. package/dist/esm/common/actionButtons/actionButtons.mjs.map +1 -1
  52. package/dist/esm/common/actionIcon/actionIcon.mjs +1 -1
  53. package/dist/esm/common/actionIcon/actionIcon.mjs.map +1 -1
  54. package/dist/esm/common/actionIcon/actionIcon.module.mjs +1 -1
  55. package/dist/esm/common/actionIcon/actionIcon.module.mjs.map +1 -1
  56. package/dist/esm/common/alert/alert.mjs +1 -1
  57. package/dist/esm/common/alert/alert.mjs.map +1 -1
  58. package/dist/esm/common/alert/alert.module.mjs +1 -1
  59. package/dist/esm/common/alert/alert.module.mjs.map +1 -1
  60. package/dist/esm/common/animatedLogo/animatedLogo.mjs +1 -1
  61. package/dist/esm/common/animatedLogo/animatedLogo.mjs.map +1 -1
  62. package/dist/esm/common/avatar/avatar.mjs +1 -1
  63. package/dist/esm/common/avatar/avatar.mjs.map +1 -1
  64. package/dist/esm/common/badge/badge.mjs +1 -1
  65. package/dist/esm/common/badge/badge.mjs.map +1 -1
  66. package/dist/esm/common/badge/badge.module.mjs +1 -1
  67. package/dist/esm/common/badge/badge.module.mjs.map +1 -1
  68. package/dist/esm/common/badge/badge.types.mjs +1 -1
  69. package/dist/esm/common/badge/badge.types.mjs.map +1 -1
  70. package/dist/esm/common/bodyEnd/bodyEnd.mjs +1 -1
  71. package/dist/esm/common/bodyEnd/bodyEnd.mjs.map +1 -1
  72. package/dist/esm/common/breadcrumb/breadcrumb.mjs +1 -1
  73. package/dist/esm/common/breadcrumb/breadcrumb.mjs.map +1 -1
  74. package/dist/esm/common/breadcrumb/breadcrumb.module.mjs.map +1 -1
  75. package/dist/esm/common/button/button.mjs +1 -1
  76. package/dist/esm/common/button/button.mjs.map +1 -1
  77. package/dist/esm/common/button/button.module.mjs +1 -1
  78. package/dist/esm/common/button/button.module.mjs.map +1 -1
  79. package/dist/esm/common/button/button.types.mjs +1 -1
  80. package/dist/esm/common/button/button.types.mjs.map +1 -1
  81. package/dist/esm/common/calendar/calendar.mjs +1 -1
  82. package/dist/esm/common/calendar/calendar.mjs.map +1 -1
  83. package/dist/esm/common/calendar/calendar.module.mjs.map +1 -1
  84. package/dist/esm/common/calendar/calendar.types.mjs.map +1 -1
  85. package/dist/esm/common/calendar/components/agendaList/agendaList.mjs +1 -1
  86. package/dist/esm/common/calendar/components/agendaList/agendaList.mjs.map +1 -1
  87. package/dist/esm/common/calendar/components/agendaList/agendaList.module.mjs.map +1 -1
  88. package/dist/esm/common/calendar/components/calendarHeader/calendarHeader.mjs +1 -1
  89. package/dist/esm/common/calendar/components/calendarHeader/calendarHeader.mjs.map +1 -1
  90. package/dist/esm/common/calendar/components/calendarHeader/calendarHeader.module.mjs +1 -1
  91. package/dist/esm/common/calendar/components/calendarHeader/calendarHeader.module.mjs.map +1 -1
  92. package/dist/esm/common/calendar/components/compactMonth/compactMonth.mjs +1 -1
  93. package/dist/esm/common/calendar/components/compactMonth/compactMonth.mjs.map +1 -1
  94. package/dist/esm/common/calendar/components/compactMonth/compactMonth.module.mjs +1 -1
  95. package/dist/esm/common/calendar/components/compactMonth/compactMonth.module.mjs.map +1 -1
  96. package/dist/esm/common/calendar/components/monthView/monthView.mjs +1 -1
  97. package/dist/esm/common/calendar/components/monthView/monthView.mjs.map +1 -1
  98. package/dist/esm/common/calendar/components/monthView/monthView.module.mjs +1 -1
  99. package/dist/esm/common/calendar/components/monthView/monthView.module.mjs.map +1 -1
  100. package/dist/esm/common/calendar/components/timeGrid/timeGrid.mjs +1 -1
  101. package/dist/esm/common/calendar/components/timeGrid/timeGrid.mjs.map +1 -1
  102. package/dist/esm/common/calendar/components/timeGrid/timeGrid.module.mjs +1 -1
  103. package/dist/esm/common/calendar/components/timeGrid/timeGrid.module.mjs.map +1 -1
  104. package/dist/esm/common/calendar/dates.mjs +1 -1
  105. package/dist/esm/common/calendar/dates.mjs.map +1 -1
  106. package/dist/esm/common/calendar/format.mjs +1 -1
  107. package/dist/esm/common/calendar/format.mjs.map +1 -1
  108. package/dist/esm/common/calendar/layout.mjs +1 -1
  109. package/dist/esm/common/calendar/layout.mjs.map +1 -1
  110. package/dist/esm/common/calendar/useNow.mjs +2 -0
  111. package/dist/esm/common/calendar/useNow.mjs.map +1 -0
  112. package/dist/esm/common/card/Card.mjs +1 -1
  113. package/dist/esm/common/card/Card.mjs.map +1 -1
  114. package/dist/esm/common/card/CardActions.mjs +1 -1
  115. package/dist/esm/common/card/CardActions.mjs.map +1 -1
  116. package/dist/esm/common/card/CardHeader.mjs.map +1 -1
  117. package/dist/esm/common/card/card.module.mjs +1 -1
  118. package/dist/esm/common/card/card.module.mjs.map +1 -1
  119. package/dist/esm/common/card/card.types.mjs +1 -1
  120. package/dist/esm/common/card/card.types.mjs.map +1 -1
  121. package/dist/esm/common/carousel/carousel.mjs +1 -1
  122. package/dist/esm/common/carousel/carousel.mjs.map +1 -1
  123. package/dist/esm/common/carousel/carousel.module.mjs.map +1 -1
  124. package/dist/esm/common/chip/chip.mjs +1 -1
  125. package/dist/esm/common/chip/chip.mjs.map +1 -1
  126. package/dist/esm/common/chip/chip.module.mjs +1 -1
  127. package/dist/esm/common/chip/chip.module.mjs.map +1 -1
  128. package/dist/esm/common/chip/chip.types.mjs +1 -1
  129. package/dist/esm/common/chip/chip.types.mjs.map +1 -1
  130. package/dist/esm/common/colorPicker/colorPicker.mjs +1 -1
  131. package/dist/esm/common/colorPicker/colorPicker.mjs.map +1 -1
  132. package/dist/esm/common/colorPicker/colorPicker.module.mjs.map +1 -1
  133. package/dist/esm/common/confirmModal/confirmModal.mjs +1 -1
  134. package/dist/esm/common/confirmModal/confirmModal.mjs.map +1 -1
  135. package/dist/esm/common/copyButton/copyButton.mjs +1 -1
  136. package/dist/esm/common/copyButton/copyButton.mjs.map +1 -1
  137. package/dist/esm/common/copyButton/copyButton.module.mjs +1 -1
  138. package/dist/esm/common/copyButton/copyButton.module.mjs.map +1 -1
  139. package/dist/esm/common/errorBoundary/errorBoundary.mjs +2 -2
  140. package/dist/esm/common/errorBoundary/errorBoundary.mjs.map +1 -1
  141. package/dist/esm/common/fab/components/fabBase/fabBase.mjs +1 -1
  142. package/dist/esm/common/fab/components/fabBase/fabBase.mjs.map +1 -1
  143. package/dist/esm/common/fab/fab.mjs +1 -1
  144. package/dist/esm/common/fab/fab.mjs.map +1 -1
  145. package/dist/esm/common/flip/flip.mjs +1 -1
  146. package/dist/esm/common/flip/flip.mjs.map +1 -1
  147. package/dist/esm/common/klipyPicker/klipyPicker.mjs +1 -1
  148. package/dist/esm/common/klipyPicker/klipyPicker.mjs.map +1 -1
  149. package/dist/esm/common/modal/modal.mjs +1 -1
  150. package/dist/esm/common/modal/modal.mjs.map +1 -1
  151. package/dist/esm/common/modal/modal.module.mjs.map +1 -1
  152. package/dist/esm/common/numberInput/numberInput.mjs +1 -1
  153. package/dist/esm/common/numberInput/numberInput.mjs.map +1 -1
  154. package/dist/esm/common/numberInput/numberInput.module.mjs.map +1 -1
  155. package/dist/esm/common/popover/popover.mjs +1 -1
  156. package/dist/esm/common/popover/popover.mjs.map +1 -1
  157. package/dist/esm/common/progressBar/progressBar.mjs +1 -1
  158. package/dist/esm/common/progressBar/progressBar.mjs.map +1 -1
  159. package/dist/esm/common/progressBar/progressBar.module.mjs +1 -1
  160. package/dist/esm/common/progressBar/progressBar.module.mjs.map +1 -1
  161. package/dist/esm/common/roomDrawer/roomDrawer.mjs +1 -1
  162. package/dist/esm/common/roomDrawer/roomDrawer.mjs.map +1 -1
  163. package/dist/esm/common/roomDrawer/roomDrawer.module.mjs.map +1 -1
  164. package/dist/esm/common/sectionHeader/sectionHeader.mjs.map +1 -1
  165. package/dist/esm/common/splitButton/splitButton.mjs +1 -1
  166. package/dist/esm/common/splitButton/splitButton.mjs.map +1 -1
  167. package/dist/esm/common/styles/tone.mjs +4 -0
  168. package/dist/esm/common/styles/tone.mjs.map +1 -0
  169. package/dist/esm/common/styles/tone.module.mjs +2 -0
  170. package/dist/esm/common/styles/tone.module.mjs.map +1 -0
  171. package/dist/esm/common/themeProvider/color.types.mjs +2 -0
  172. package/dist/esm/common/themeProvider/color.types.mjs.map +1 -0
  173. package/dist/esm/common/themeProvider/defaultTheme.mjs +1 -1
  174. package/dist/esm/common/themeProvider/defaultTheme.mjs.map +1 -1
  175. package/dist/esm/common/tilt/tilt.mjs +1 -1
  176. package/dist/esm/common/tilt/tilt.mjs.map +1 -1
  177. package/dist/esm/common/timeInput/timeInput.mjs +1 -1
  178. package/dist/esm/common/timeInput/timeInput.mjs.map +1 -1
  179. package/dist/esm/common/timeline/timeline.mjs +1 -1
  180. package/dist/esm/common/timeline/timeline.mjs.map +1 -1
  181. package/dist/esm/common/timeline/timeline.module.mjs +1 -1
  182. package/dist/esm/common/timeline/timeline.module.mjs.map +1 -1
  183. package/dist/esm/common/timeline/timeline.types.mjs +1 -1
  184. package/dist/esm/common/timeline/timeline.types.mjs.map +1 -1
  185. package/dist/esm/common/timer/timer.mjs +1 -1
  186. package/dist/esm/common/timer/timer.mjs.map +1 -1
  187. package/dist/esm/common/timer/timer.module.mjs +1 -1
  188. package/dist/esm/common/timer/timer.module.mjs.map +1 -1
  189. package/dist/esm/common/toast/toast.mjs +1 -1
  190. package/dist/esm/common/toast/toast.mjs.map +1 -1
  191. package/dist/esm/common/toast/toast.module.mjs +1 -1
  192. package/dist/esm/common/toast/toast.module.mjs.map +1 -1
  193. package/dist/esm/common/toast/toastHost.mjs +1 -1
  194. package/dist/esm/common/toast/toastHost.mjs.map +1 -1
  195. package/dist/esm/common/utils/dismissClick.mjs +2 -0
  196. package/dist/esm/common/utils/dismissClick.mjs.map +1 -0
  197. package/dist/esm/common/utils/isDev.mjs +2 -0
  198. package/dist/esm/common/utils/isDev.mjs.map +1 -0
  199. package/dist/esm/index.mjs +1 -1
  200. package/dist/esm/services/formValidation/FormValidatorGroupWithForm.mjs +1 -1
  201. package/dist/esm/services/formValidation/FormValidatorGroupWithForm.mjs.map +1 -1
  202. package/dist/index.cjs +5 -3
  203. package/dist/index.cjs.map +1 -1
  204. package/dist/style.css +1 -1
  205. package/dist/types/common/accordion/accordion.types.d.ts +17 -2
  206. package/dist/types/common/actionButtons/actionButtons.types.d.ts +7 -1
  207. package/dist/types/common/actionIcon/actionIcon.d.ts +1 -1
  208. package/dist/types/common/actionIcon/actionIcon.types.d.ts +7 -9
  209. package/dist/types/common/alert/alert.types.d.ts +6 -8
  210. package/dist/types/common/animatedLogo/animatedLogo.types.d.ts +3 -2
  211. package/dist/types/common/badge/badge.types.d.ts +10 -6
  212. package/dist/types/common/button/button.types.d.ts +14 -4
  213. package/dist/types/common/calendar/calendar.types.d.ts +25 -10
  214. package/dist/types/common/calendar/components/agendaList/agendaList.d.ts +1 -1
  215. package/dist/types/common/calendar/components/agendaList/agendaList.types.d.ts +3 -0
  216. package/dist/types/common/calendar/components/calendarHeader/calendarHeader.d.ts +1 -1
  217. package/dist/types/common/calendar/components/calendarHeader/calendarHeader.types.d.ts +2 -0
  218. package/dist/types/common/calendar/components/compactMonth/compactMonth.d.ts +1 -1
  219. package/dist/types/common/calendar/components/monthView/monthView.d.ts +1 -1
  220. package/dist/types/common/calendar/components/monthView/monthView.types.d.ts +3 -2
  221. package/dist/types/common/calendar/components/timeGrid/timeGrid.d.ts +1 -1
  222. package/dist/types/common/calendar/components/timeGrid/timeGrid.types.d.ts +9 -1
  223. package/dist/types/common/calendar/dates.d.ts +21 -5
  224. package/dist/types/common/calendar/format.d.ts +3 -2
  225. package/dist/types/common/calendar/layout.d.ts +5 -0
  226. package/dist/types/common/calendar/useNow.d.ts +4 -0
  227. package/dist/types/common/calendar/view.types.d.ts +9 -2
  228. package/dist/types/common/card/card.types.d.ts +16 -2
  229. package/dist/types/common/chip/chip.types.d.ts +10 -5
  230. package/dist/types/common/copyButton/copyButton.types.d.ts +5 -4
  231. package/dist/types/common/fab/components/fabBase/fabBase.d.ts +1 -1
  232. package/dist/types/common/fab/components/fabBase/fabBase.types.d.ts +2 -1
  233. package/dist/types/common/progressBar/progressBar.d.ts +0 -1
  234. package/dist/types/common/progressBar/progressBar.types.d.ts +3 -1
  235. package/dist/types/common/splitButton/splitButton.types.d.ts +4 -1
  236. package/dist/types/common/styles/tone.d.ts +11 -0
  237. package/dist/types/common/themeProvider/color.types.d.ts +20 -0
  238. package/dist/types/common/themeProvider/index.d.ts +2 -0
  239. package/dist/types/common/themeProvider/theme.types.d.ts +3 -6
  240. package/dist/types/common/timeline/timeline.types.d.ts +3 -10
  241. package/dist/types/common/toast/index.d.ts +1 -1
  242. package/dist/types/common/toast/toast.types.d.ts +7 -3
  243. package/dist/types/common/types/actions.types.d.ts +1 -1
  244. package/dist/types/common/utils/dismissClick.d.ts +4 -0
  245. package/dist/types/common/utils/isDev.d.ts +1 -0
  246. package/docs/Accordion.md +74 -5
  247. package/docs/ActionButtons.md +6 -3
  248. package/docs/ActionIcon.md +39 -14
  249. package/docs/Alert.md +27 -17
  250. package/docs/AnimatedLogo.md +1 -1
  251. package/docs/Badge.md +24 -7
  252. package/docs/Button.md +98 -40
  253. package/docs/ButtonGroup.md +18 -18
  254. package/docs/CLAUDE.md +21 -11
  255. package/docs/Calendar.md +35 -17
  256. package/docs/Card.md +53 -14
  257. package/docs/Chip.md +24 -9
  258. package/docs/ConfigProvider.md +3 -3
  259. package/docs/CopyButton.md +6 -5
  260. package/docs/ProgressBar.md +7 -4
  261. package/docs/SectionHeader.md +1 -1
  262. package/docs/SplitButton.md +6 -5
  263. package/docs/ThemeColor.md +103 -0
  264. package/docs/ThemeProvider.md +5 -5
  265. package/docs/Timeline.md +18 -9
  266. package/docs/Toast.md +25 -11
  267. package/package.json +3 -2
  268. package/dist/esm/common/accordion/accordion.plain.module.mjs +0 -2
  269. package/dist/esm/common/accordion/accordion.plain.module.mjs.map +0 -1
  270. package/dist/esm/common/accordion/accordion.primary.module.mjs +0 -2
  271. package/dist/esm/common/accordion/accordion.primary.module.mjs.map +0 -1
  272. package/dist/esm/common/alert/alert.types.mjs +0 -2
  273. package/dist/esm/common/alert/alert.types.mjs.map +0 -1
package/README.md CHANGED
@@ -114,24 +114,24 @@ runs where `@ahrowe/ui` is installed.
114
114
 
115
115
  | Component | Description |
116
116
  |-----------|-------------|
117
- | `Accordion` | Collapsible sections for progressive disclosure — FAQs, settings panels, long-form content that users expand on demand |
117
+ | `Accordion`, `AccordionStyleType`, `ThemeColor` | Collapsible sections for progressive disclosure — FAQs, settings panels, long-form content that users expand on demand |
118
118
  | `ActionButtons` | Standardised Submit / Cancel button pair for forms, dialogs, and drawer footers |
119
- | `ActionIcon` | Clickable icon button without a label — toolbar actions, table row actions, icon-only controls |
119
+ | `ActionIcon` | Clickable icon button without a label — toolbar actions, table row actions, close buttons, icon-only controls |
120
120
  | `AhroweProvider` | The one wrapper an app needs, at its root: it applies the theme, sets default props for every component, shows toasts and renders the element that Modal, Tooltip, Popover, Menu and Toast portal into |
121
- | `Alert`, `AlertStyleType` | A persistent inline status message, used for form-level errors, page/section banners, empty-config warnings, and "here's what changed" notices |
121
+ | `Alert`, `ThemeColor` | A persistent inline status message, used for form-level errors, page/section banners, empty-config warnings, and "here's what changed" notices |
122
122
  | `AnimatedLogo` | A self-drawing SVG mark for splash/loading screens, empty states, or anywhere a brand or icon mark should feel alive rather than static |
123
123
  | `AnimatedText`, `AnimatedTextVariant`, `AnimatedTextUnit` | Decorative text entrance or emphasis effect, for hero headlines, empty-state messages, "premium"/"new" callouts, loading/decoding states |
124
124
  | `Avatar`, `AvatarGroup` | User or entity image — profile pictures, comment authors, member lists |
125
- | `Badge`, `BadgeStyleType`, `BadgePosition` | Small count or status indicator — unread counts, notification dots, "new" markers |
125
+ | `Badge`, `BadgeStyleType`, `BadgePosition`, `ThemeColor` | Small count or status indicator — unread counts, notification dots, "new" markers |
126
126
  | `BodyEnd` | Renders children through a React portal, to the end of the app |
127
127
  | `Breadcrumb` | A trail showing the current page's position within a hierarchy, with links back to each ancestor, such as a file browser path, a category/subcategory drill-down, or a multi-level settings page |
128
- | `Button`, `ButtonStyleType`, `ButtonSize`, `ButtonType` | Primary interactive action trigger |
128
+ | `Button`, `ButtonStyleType`, `ButtonSize`, `ButtonType`, `ThemeColor` | Primary interactive action trigger |
129
129
  | `ButtonGroup`, `ButtonGroupOrientation` | Joins a row (or column) of buttons into a single seamless control, merging their borders and rounding only the outer corners |
130
- | `Calendar`, `CalendarView` | Showing and editing your own events over time, in month, week, day and agenda views: bookings, shifts, appointments, a team schedule |
131
- | `Card`, `CardStyleType`, `CardHeader`, `CardMedia`, `CardContent`, `CardActions` | Surface container for grouping related content — list items, profile cards, dashboard tiles, product listings |
130
+ | `Calendar`, `CalendarView` | Showing and editing your own events over time, in month, week, day and agenda views: bookings, shifts, appointments |
131
+ | `Card`, `CardStyleType`, `CardHeader`, `CardMedia`, `CardContent`, `CardActions`, `ThemeColor` | Surface container for grouping related content — list items, profile cards, dashboard tiles, product listings |
132
132
  | `Carousel` | A slide track for stepping through a set of items one at a time, with arrows, dots, and drag/swipe support, plus optional autoplay |
133
133
  | `Checkbox` | Boolean toggle input — settings, multi-select lists, accept terms, feature flags |
134
- | `Chip`, `ChipContainer`, `ChipStyleType` | Compact tag, label, or filter token — selected items, applied filters, category badges, user avatars with remove |
134
+ | `Chip`, `ChipContainer`, `ChipStyleType`, `ThemeColor` | Compact tag, label, or filter token — selected items, applied filters, category badges, user avatars with remove |
135
135
  | `ColorPicker` | Hex colour selection — theme editors, annotation tools, customisation panels |
136
136
  | `CommandPalette` | A search-first dialog for running any command or jumping anywhere in the app from the keyboard, usually opened with ⌘K / Ctrl+K |
137
137
  | `ConfigProvider` | Set global **default props** for library components once, near the root of your app, instead of repeating the same prop on every instance |
@@ -186,12 +186,13 @@ runs where `@ahrowe/ui` is installed.
186
186
  | `Switch` | Sliding boolean toggle — settings panels, feature flags, preference lists |
187
187
  | `TabHeader` | A horizontal row of tabs to switch between sibling views or sections — settings panels, dashboards, detail pages |
188
188
  | `Textarea` | Multiline text input — comments, descriptions, notes, code snippets, long-form content |
189
+ | `ThemeColor` | The `color` prop of every component that takes one: the theme's named colours, or any CSS colour of your own |
189
190
  | `ThemeProvider` | Applies a theme to its subtree, injecting its CSS custom properties as inline styles so every component inside can use them |
190
191
  | `Tilt`, `TiltGroup` | Wrap content that should tilt toward the cursor in 3D |
191
192
  | `TimeInput` | Time-of-day selection — appointment times, opening hours, shift starts, reminders |
192
- | `Timeline`, `TimelineAlignment`, `TimelineItemStatus` | A vertical list of dated events, connected by a line, for audit logs, activity feeds, order status history, and deploy logs |
193
+ | `Timeline`, `TimelineAlignment`, `ThemeColor` | A vertical list of dated events, connected by a line, for audit logs, activity feeds, order status history, and deploy logs |
193
194
  | `Timer` | A countdown timer with a depleting ring, add/remove-time and pause/cancel controls, and an imperative ref API |
194
- | `showToast` | Non-blocking notifications — save confirmations, error alerts, info messages, warnings |
195
+ | `showToast`, `ThemeColor` | Non-blocking notifications — save confirmations, error alerts, info messages, warnings |
195
196
  | `Tooltip` | Contextual help, info icons, field explanations, error pointers |
196
197
  | `Tree`, `flattenTree` | A hierarchical list the user can expand, collapse and pick from: categories, nested locations, folder structures, org charts |
197
198
  | `VirtualList` | Efficiently render large lists or tables — thousands of rows rendered with a virtualised scroll window so only visible rows are in the DOM |
@@ -1,8 +1,16 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
2
  import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types.js';
3
+ import { ColorValue } from '../themeProvider/color.types.js';
4
+ /**
5
+ * How much the header stands out, as on Button, Badge and Chip. No `Filled`: a section of content
6
+ * should not compete with the page's main action.
7
+ */
3
8
  export declare enum AccordionStyleType {
4
- Default = "default",
5
- Primary = "primary",
9
+ /** The header in a light tint of the colour, its text in the colour. */
10
+ Light = "light",
11
+ /** A border in the colour, the header's text in the colour. The default. */
12
+ Outlined = "outlined",
13
+ /** The header's text in the colour, no chrome and no padding, for a disclosure inside other content. */
6
14
  Plain = "plain"
7
15
  }
8
16
  export type AccordionSlots = 'root' | 'header' | 'title' | 'icon' | 'body' | 'bodyInner';
@@ -12,6 +20,13 @@ export interface AccordionProps extends HtmlProps {
12
20
  expanded?: boolean | null;
13
21
  onHeaderClicked?: (id: string, isExpanded: boolean) => void;
14
22
  styleType?: AccordionStyleType;
23
+ /** A `ThemeColor` (default `Neutral`) or any CSS colour. */
24
+ color?: ColorValue;
25
+ /**
26
+ * Joins this accordion to the joined ones beside it into one block; otherwise neighbours keep a
27
+ * small gap. Default `false`.
28
+ */
29
+ joined?: boolean;
15
30
  startOpen?: boolean;
16
31
  hideHeader?: boolean;
17
32
  className?: string;
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, ReactElement } from 'react';
2
- import { ButtonStyleType } from '../button/index.js';
2
+ import { ButtonProps, ButtonStyleType } from '../button/index.js';
3
3
  import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types.js';
4
4
  import { IconContent } from '../types/icon.types.js';
5
5
  export type ActionButtonsSlots = 'root' | 'submitButton' | 'cancelButton';
@@ -13,11 +13,17 @@ export interface ActionButtonsLabels {
13
13
  export interface ActionButtonsProps extends HtmlProps {
14
14
  onSubmit?: () => void;
15
15
  onClose?: () => void;
16
+ /** Default `Filled`. */
16
17
  submitButtonStyle?: ButtonStyleType;
18
+ /** Default `Primary`; `Error` for a destructive confirm. */
19
+ submitButtonColor?: ButtonProps['color'];
17
20
  isSubmitButtonLoading?: boolean;
18
21
  isSubmitButtonDisabled?: boolean;
19
22
  submitButtonIcon?: IconContent;
23
+ /** Default `Outlined`. */
20
24
  cancelButtonStyle?: ButtonStyleType;
25
+ /** Default `Primary`. */
26
+ cancelButtonColor?: ButtonProps['color'];
21
27
  isCancelButtonLoading?: boolean;
22
28
  isCancelButtonDisabled?: boolean;
23
29
  cancelButtonIcon?: IconContent;
@@ -1,4 +1,4 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { ActionIconProps } from './actionIcon.types.js';
3
- declare function ActionIcon({ icon, className, style, title, onClick, classNames, styles: slotStyles, ...rest }: ActionIconProps): ReactElement;
3
+ declare function ActionIcon({ icon, styleType, color, className, style, classNames, styles: slotStyles, ...rest }: ActionIconProps): ReactElement;
4
4
  export default ActionIcon;
@@ -1,15 +1,13 @@
1
- import { default as React, CSSProperties } from 'react';
2
1
  import { IconContent } from '../types/icon.types.js';
3
- import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types.js';
2
+ import { SlotClassNames, SlotStyles } from '../types/slots.types.js';
3
+ import { ButtonProps } from '../button/button.types.js';
4
4
  export type ActionIconSlots = 'root' | 'icon';
5
- export interface ActionIconProps extends HtmlProps {
5
+ /**
6
+ * A Button with only an icon, sized by that icon, so every Button prop applies except the ones
7
+ * that describe a label or a size.
8
+ */
9
+ export interface ActionIconProps extends Omit<ButtonProps, 'icon' | 'size' | 'children' | 'isLoading' | 'classNames' | 'styles'> {
6
10
  icon: IconContent;
7
- className?: string;
8
- style?: CSSProperties;
9
- title?: string;
10
- onClick?: (event: React.MouseEvent<HTMLDivElement>) => void;
11
- /** Ref to the root element. */
12
- ref?: React.Ref<HTMLDivElement>;
13
11
  classNames?: SlotClassNames<ActionIconSlots>;
14
12
  styles?: SlotStyles<ActionIconSlots>;
15
13
  }
@@ -1,13 +1,7 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
2
  import { IconContent } from '../types/icon.types.js';
3
3
  import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types.js';
4
- export declare enum AlertStyleType {
5
- Default = "default",
6
- Info = "info",
7
- Success = "success",
8
- Warn = "warn",
9
- Error = "error"
10
- }
4
+ import { ColorValue } from '../themeProvider/color.types.js';
11
5
  export type AlertSlots = 'root' | 'icon' | 'content' | 'title' | 'description' | 'closeButton';
12
6
  /** Text Alert renders of its own, for translating it. */
13
7
  export interface AlertLabels {
@@ -17,7 +11,11 @@ export interface AlertLabels {
17
11
  export interface AlertProps extends Omit<HtmlProps, 'title'> {
18
12
  title?: ReactNode;
19
13
  children?: ReactNode;
20
- styleType?: AlertStyleType;
14
+ /**
15
+ * A `ThemeColor` (default `Primary`) or any CSS colour. A ThemeColor also picks the icon; any
16
+ * other colour shows `icon`, or a bell.
17
+ */
18
+ color?: ColorValue;
21
19
  icon?: IconContent;
22
20
  hideIcon?: boolean;
23
21
  onClose?: () => void;
@@ -1,5 +1,6 @@
1
1
  import { CSSProperties, SVGAttributes } from 'react';
2
2
  import { SlotClassNames, SlotStyles, DataProps } from '../types/slots.types.js';
3
+ import { ColorValue } from '../themeProvider/color.types.js';
3
4
  export type AnimatedLogoSlots = 'path';
4
5
  /**
5
6
  * The root here is an `<svg>`, not an HTML element, so the native attributes come from
@@ -16,8 +17,8 @@ export interface AnimatedLogoProps extends DataProps, Omit<SVGAttributes<SVGSVGE
16
17
  viewBox?: string;
17
18
  /** Width/height of the SVG (any valid CSS size). Defaults to `96`. */
18
19
  size?: number | string;
19
- /** Overrides the stroke/fill colour. Defaults to `var(--primary-color)`. */
20
- color?: string;
20
+ /** The stroke and fill: a `ThemeColor` or any CSS colour. Defaults to `--primary-color`. */
21
+ color?: ColorValue;
21
22
  /** Length of one draw-fill cycle, in seconds. Defaults to `4.2`. */
22
23
  duration?: number;
23
24
  /** Repeats the draw-fill-retract cycle forever. When `false`, plays once and holds filled. Defaults to `true`. */
@@ -1,12 +1,14 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
2
  import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types.js';
3
+ import { ColorValue } from '../themeProvider/color.types.js';
4
+ /** How much the badge stands out. Independent of its colour; a `dot` is always solid. */
3
5
  export declare enum BadgeStyleType {
4
- Default = "default",
5
- Primary = "primary",
6
- Success = "success",
7
- Info = "info",
8
- Warn = "warn",
9
- Error = "error"
6
+ /** Solid fill. The default. */
7
+ Filled = "filled",
8
+ /** A light tint of the colour behind text in the colour. */
9
+ Light = "light",
10
+ /** Border and text in the colour, no fill. */
11
+ Outlined = "outlined"
10
12
  }
11
13
  export declare enum BadgePosition {
12
14
  TopRight = "top-right",
@@ -22,6 +24,8 @@ export interface BadgeProps extends Omit<HtmlProps, 'content'> {
22
24
  dot?: boolean;
23
25
  showZero?: boolean;
24
26
  styleType?: BadgeStyleType;
27
+ /** A `ThemeColor` (default `Primary`) or any CSS colour, such as `'var(--brand)'`. */
28
+ color?: ColorValue;
25
29
  position?: BadgePosition;
26
30
  children?: ReactNode;
27
31
  className?: string;
@@ -1,10 +1,17 @@
1
1
  import { default as React, CSSProperties } from 'react';
2
2
  import { IconContent } from '../types/icon.types.js';
3
3
  import { SlotClassNames, SlotStyles, DataProps } from '../types/slots.types.js';
4
+ import { ColorValue } from '../themeProvider/color.types.js';
5
+ /** How much the button stands out. Independent of its colour. */
4
6
  export declare enum ButtonStyleType {
5
- Primary = "primary",
6
- Default = "default",
7
- Delete = "delete"
7
+ /** Solid fill, for the one main action. */
8
+ Filled = "filled",
9
+ /** A light tint of the colour behind text in the colour. */
10
+ Light = "light",
11
+ /** Border and text in the colour, no fill. The default. */
12
+ Outlined = "outlined",
13
+ /** Text in the colour, no fill and no border. For toolbar, icon and close buttons. */
14
+ Plain = "plain"
8
15
  }
9
16
  export declare enum ButtonSize {
10
17
  Default = "default",
@@ -22,13 +29,16 @@ export declare enum ButtonType {
22
29
  export type ButtonSlots = 'background' | 'content' | 'loadingContainer' | 'label';
23
30
  /**
24
31
  * `DataProps` supplies the `data-*` index signature, which `ButtonHTMLAttributes` doesn't cover.
25
- * `type` and `onClick` below deliberately narrow their inherited counterparts.
32
+ * `type`, `color` and `onClick` below deliberately narrow their inherited counterparts.
26
33
  */
27
34
  export interface ButtonProps extends DataProps, React.ButtonHTMLAttributes<HTMLButtonElement> {
28
35
  className?: string;
29
36
  style?: CSSProperties;
30
37
  type?: ButtonType;
38
+ /** Emphasis: `Filled`, `Light`, `Outlined` (default) or `Plain`. */
31
39
  styleType?: ButtonStyleType;
40
+ /** A `ThemeColor` (default `Primary`) or any CSS colour, such as `'var(--brand)'`. */
41
+ color?: ColorValue;
32
42
  size?: ButtonSize;
33
43
  onClick?: (event: React.MouseEvent<HTMLButtonElement>) => Promise<void> | void;
34
44
  children?: React.ReactNode;
@@ -1,5 +1,6 @@
1
1
  import { CSSProperties, ReactNode, Ref } from 'react';
2
2
  import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types.js';
3
+ import { ColorValue } from '../themeProvider/color.types.js';
3
4
  export declare enum CalendarView {
4
5
  Month = "month",
5
6
  Week = "week",
@@ -11,6 +12,7 @@ export type CalendarWeekday = 0 | 1 | 2 | 3 | 4 | 5 | 6;
11
12
  /** First day of the week, as `Date#getDay()` counts: 0 is Sunday, 1 is Monday. */
12
13
  export type CalendarWeekStart = CalendarWeekday;
13
14
  export interface CalendarEvent {
15
+ /** Unique among `events`: each occurrence of a recurring series needs an id of its own. */
14
16
  id: string | number;
15
17
  title: string;
16
18
  /** Local time. */
@@ -19,8 +21,8 @@ export interface CalendarEvent {
19
21
  end: Date;
20
22
  /** Shown in the all-day row instead of the time grid. Timed events of 24 hours or more are too. */
21
23
  allDay?: boolean;
22
- /** Any CSS colour. Falls back to `--primary-color`. */
23
- color?: string;
24
+ /** A `ThemeColor` or any CSS colour. Falls back to `--primary-color`. */
25
+ color?: ColorValue;
24
26
  /** Can be clicked but not moved or resized. */
25
27
  readOnly?: boolean;
26
28
  }
@@ -70,8 +72,10 @@ export interface CalendarLabels {
70
72
  eventCount?: (count: number) => string;
71
73
  /** A day or period without events (default `No events`). */
72
74
  noEvents?: string;
73
- /** Create button in a day's event list, shown when `onSlotCreate` is set (default `New event`). */
75
+ /** Create button in the header and in a day's event list, shown when `onSlotCreate` is set (default `New event`). */
74
76
  newEvent?: string;
77
+ /** A week number, shown with `showWeekNumbers` (default `Week 40`). */
78
+ weekNumber?: (week: number) => string;
75
79
  }
76
80
  export interface CalendarProps<E extends CalendarEvent = CalendarEvent> extends HtmlProps<HTMLDivElement> {
77
81
  /** The events to show. Only the ones inside the range `onRangeChange` reports are needed. */
@@ -84,7 +88,7 @@ export interface CalendarProps<E extends CalendarEvent = CalendarEvent> extends
84
88
  onDateChange?: (day: string) => void;
85
89
  /** Controlled view. Omit for uncontrolled. */
86
90
  view?: CalendarView;
87
- /** View shown initially when uncontrolled (default `CalendarView.Month`). */
91
+ /** View shown initially when uncontrolled (default the first of `views`). */
88
92
  defaultView?: CalendarView;
89
93
  onViewChange?: (view: CalendarView) => void;
90
94
  /** Views offered in the switcher, in order. The switcher is hidden when there is only one (default all four). */
@@ -99,9 +103,17 @@ export interface CalendarProps<E extends CalendarEvent = CalendarEvent> extends
99
103
  hiddenDays?: CalendarWeekday[];
100
104
  /**
101
105
  * Hour the week and day views open at, such as `6` for 06:00 (default an hour before now while
102
- * today is shown, otherwise 07:00).
106
+ * today is shown, otherwise the start of `workingHours`, or 07:00).
103
107
  */
104
108
  scrollToHour?: number;
109
+ /**
110
+ * Working time in the week and day views, `[8, 17]` for 08:00 to 17:00: the hours outside it are
111
+ * shaded. `[22, 6]` runs overnight. Its start is also the hour those views open at when today is
112
+ * not shown and `scrollToHour` is not set.
113
+ */
114
+ workingHours?: readonly [start: number, end: number];
115
+ /** Shows ISO 8601 week numbers: on each row of the month view, and in the corner of the week and day views. */
116
+ showWeekNumbers?: boolean;
105
117
  /**
106
118
  * Called on mount and whenever the shown period changes, with the period and one either side of
107
119
  * it, so the neighbours are already filled while swiping. Fetch events and expand recurring
@@ -117,10 +129,11 @@ export interface CalendarProps<E extends CalendarEvent = CalendarEvent> extends
117
129
  */
118
130
  onEventChange?: (change: CalendarEventChange<E>) => void | Promise<unknown>;
119
131
  /**
120
- * Empty time was clicked or dragged over. Setting it is what enables creating: a click creates
121
- * an hour, or an all-day slot in the month view. `anchor` marks the slot on screen, for a
122
- * popover's `anchor`: the day's cell in the month view, an invisible box over the slot in the
123
- * week and day views.
132
+ * Empty time was clicked or dragged over, or the header's New event button pressed. Setting it is
133
+ * what enables creating: a click creates an hour, or an all-day slot in the month view and the
134
+ * all-day row. `anchor` marks the slot on screen, for a popover's `anchor`: the first day's cell
135
+ * in the month view, the first day's header for the all-day row, an invisible box over the slot
136
+ * in the time grid, and the button itself from the header.
124
137
  */
125
138
  onSlotCreate?: (slot: CalendarSlot, anchor: HTMLElement) => void;
126
139
  /**
@@ -128,6 +141,8 @@ export interface CalendarProps<E extends CalendarEvent = CalendarEvent> extends
128
141
  * title where `context.singleLine` is set: further lines have no room there.
129
142
  */
130
143
  renderEvent?: (event: E, context: CalendarEventContext) => ReactNode;
144
+ /** A class for one event's element, next to `classNames.event`: a tentative, cancelled or selected event. */
145
+ eventClassName?: (event: E) => string | undefined;
131
146
  /** The root element. */
132
147
  ref?: Ref<HTMLDivElement>;
133
148
  className?: string;
@@ -138,4 +153,4 @@ export interface CalendarProps<E extends CalendarEvent = CalendarEvent> extends
138
153
  labels?: CalendarLabels;
139
154
  }
140
155
  /** The props `ConfigProvider` can set for every Calendar. The rest depend on the event type. */
141
- export type CalendarDefaults = Pick<CalendarProps, 'labels' | 'locale' | 'weekStartsOn' | 'slotMinutes' | 'views' | 'hiddenDays' | 'scrollToHour'>;
156
+ export type CalendarDefaults = Pick<CalendarProps, 'labels' | 'locale' | 'weekStartsOn' | 'slotMinutes' | 'views' | 'hiddenDays' | 'scrollToHour' | 'workingHours' | 'showWeekNumbers'>;
@@ -1,5 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { CalendarEvent } from '../../calendar.types.js';
3
3
  import { AgendaListProps } from './agendaList.types.js';
4
- declare function AgendaList<E extends CalendarEvent>({ events, start, days, hidden, scrollTo, showDayHeaders, locale, text, onEventClick, renderEvent, className, classNames, slotStyles, }: AgendaListProps<E>): ReactElement;
4
+ declare function AgendaList<E extends CalendarEvent>({ events, start, days, hidden, scrollTo, showDayHeaders, locale, today, text, onEventClick, renderEvent, eventClassName, className, classNames, slotStyles, }: AgendaListProps<E>): ReactElement;
5
5
  export default AgendaList;
@@ -14,9 +14,12 @@ export interface AgendaListProps<E extends CalendarEvent = CalendarEvent> {
14
14
  /** A dated heading over each day. The list of a single, already named day leaves them out. */
15
15
  showDayHeaders: boolean;
16
16
  locale: string | undefined;
17
+ /** Midnight of today. */
18
+ today: Date;
17
19
  text: Required<CalendarLabels>;
18
20
  onEventClick: ((event: E, anchor: HTMLElement) => void) | undefined;
19
21
  renderEvent: ((event: E, context: CalendarEventContext) => ReactNode) | undefined;
22
+ eventClassName: ((event: E) => string | undefined) | undefined;
20
23
  className?: string;
21
24
  classNames: SlotClassNames<CalendarSlots> | undefined;
22
25
  slotStyles: SlotStyles<CalendarSlots> | undefined;
@@ -1,4 +1,4 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { CalendarHeaderProps } from './calendarHeader.types.js';
3
- declare function CalendarHeader({ title, compact, direction, view, views, text, onStep, onToday, onViewChange, className, style, }: CalendarHeaderProps): ReactElement;
3
+ declare function CalendarHeader({ title, compact, direction, view, views, text, onStep, onToday, onViewChange, onCreate, className, style, }: CalendarHeaderProps): ReactElement;
4
4
  export default CalendarHeader;
@@ -12,6 +12,8 @@ export interface CalendarHeaderProps {
12
12
  onStep: (step: 1 | -1) => void;
13
13
  onToday: () => void;
14
14
  onViewChange: (view: CalendarView) => void;
15
+ /** The New event button was pressed; omitted where creating is off. */
16
+ onCreate: ((anchor: HTMLElement) => void) | undefined;
15
17
  className?: string;
16
18
  style?: CSSProperties;
17
19
  }
@@ -5,5 +5,5 @@ import { CompactMonthProps } from './compactMonth.types.js';
5
5
  * The month view of a narrow calendar: a grid of days with event dots over the selected day's
6
6
  * events. Scrolling that list folds the month up into the selected week, iOS-style.
7
7
  */
8
- declare function CompactMonth<E extends CalendarEvent>({ events, date, locale, weekStartsOn, hidden, text, onDateChange, onEventClick, onSlotCreate, renderEvent, classNames, slotStyles, }: CompactMonthProps<E>): ReactElement;
8
+ declare function CompactMonth<E extends CalendarEvent>({ events, date, today, locale, weekStartsOn, hidden, text, onDateChange, onEventClick, renderEvent, eventClassName, classNames, slotStyles, }: CompactMonthProps<E>): ReactElement;
9
9
  export default CompactMonth;
@@ -1,5 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { CalendarEvent } from '../../calendar.types.js';
3
3
  import { MonthViewProps } from './monthView.types.js';
4
- declare function MonthView<E extends CalendarEvent>({ events, date, locale, weekStartsOn, hidden, text, onDateChange, onOpenDay, onEventClick, onEventChange, onSlotCreate, renderEvent, classNames, slotStyles, }: MonthViewProps<E>): ReactElement;
4
+ declare function MonthView<E extends CalendarEvent>({ events, date, today, locale, weekStartsOn, hidden, showWeekNumbers, text, onDateChange, onOpenDay, onEventClick, onEventChange, onSlotCreate, renderEvent, eventClassName, classNames, slotStyles, }: MonthViewProps<E>): ReactElement;
5
5
  export default MonthView;
@@ -1,7 +1,8 @@
1
1
  import { CalendarEvent } from '../../calendar.types.js';
2
- /** An event picked up in the month view, and how many days it has been dragged. */
2
+ /** An event picked up in the month view, or a new slot drawn over days, and how far it has been dragged. */
3
3
  export interface MonthDrag<E extends CalendarEvent = CalendarEvent> {
4
- event: E;
4
+ /** The event being moved, or `null` while a new slot is drawn. */
5
+ event: E | null;
5
6
  /** The day under the pointer when it was picked up. */
6
7
  grabbed: Date;
7
8
  /** Days it has been dragged by. */
@@ -1,5 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { CalendarEvent } from '../../calendar.types.js';
3
3
  import { TimeGridProps } from './timeGrid.types.js';
4
- declare function TimeGrid<E extends CalendarEvent>({ events, date, view, locale, weekStartsOn, slotMinutes, hidden, scrollToHour, text, onDateChange, onOpenDay, onEventClick, onEventChange, onSlotCreate, renderEvent, classNames, slotStyles, zoomRef, }: TimeGridProps<E>): ReactElement;
4
+ declare function TimeGrid<E extends CalendarEvent>({ events, date, period, locale, weekStartsOn, slotMinutes, hidden, scrollToHour, workingHours, showWeekNumbers, text, onDateChange, onOpenDay, onEventClick, onEventChange, onSlotCreate, renderEvent, eventClassName, classNames, slotStyles, zoomRef, }: TimeGridProps<E>): ReactElement;
5
5
  export default TimeGrid;
@@ -36,5 +36,13 @@ export interface ResizeDrag<E extends CalendarEvent = CalendarEvent> extends Dra
36
36
  kind: 'resize';
37
37
  event: E;
38
38
  }
39
- export type TimeDrag<E extends CalendarEvent = CalendarEvent> = CreateDrag | MoveDrag<E> | ResizeDrag<E>;
39
+ /** A drag in the all-day row, which moves and creates by whole days. */
40
+ export interface AllDayDrag<E extends CalendarEvent = CalendarEvent> extends DragBase {
41
+ kind: 'allDay';
42
+ /** The event being moved, or `null` while a new slot is drawn. */
43
+ event: E | null;
44
+ /** Days from the period's first day to the one pressed. */
45
+ grabbed: number;
46
+ }
47
+ export type TimeDrag<E extends CalendarEvent = CalendarEvent> = CreateDrag | MoveDrag<E> | ResizeDrag<E> | AllDayDrag<E>;
40
48
  export {};
@@ -1,4 +1,4 @@
1
- import { CalendarView, CalendarRange, CalendarWeekStart } from './calendar.types.js';
1
+ import { CalendarView, CalendarRange, CalendarSlot, CalendarWeekStart } from './calendar.types.js';
2
2
  export declare const MINUTES_PER_DAY = 1440;
3
3
  export declare function startOfDay(date: Date): Date;
4
4
  /** Midnight, `days` calendar days away. */
@@ -27,18 +27,34 @@ export declare function atMinutes(day: Date, minutes: number): Date;
27
27
  * after the start instead.
28
28
  */
29
29
  export declare function endAfter(start: Date, end: Date, minutes: number): Date;
30
+ /**
31
+ * The Week view of a narrow calendar: three shown days from the selected one, paged by three, where
32
+ * seven columns would leave no room for a title. Not a `CalendarView`: the switcher still says Week.
33
+ */
34
+ export declare const NARROW_WEEK = "narrowWeek";
35
+ /** What the period arithmetic is keyed by: a view, or the narrow calendar's Week. */
36
+ export type CalendarPeriod = CalendarView | typeof NARROW_WEEK;
30
37
  /** Midnight of the first day of the period `date` is in. */
31
- export declare function periodStart(view: CalendarView, date: Date, weekStartsOn: CalendarWeekStart): Date;
38
+ export declare function periodStart(period: CalendarPeriod, date: Date, weekStartsOn: CalendarWeekStart): Date;
32
39
  /** The days a view shows for `date`. The month view is always six full weeks. */
33
- export declare function periodRange(view: CalendarView, date: Date, weekStartsOn: CalendarWeekStart): CalendarRange;
40
+ export declare function periodRange(period: CalendarPeriod, date: Date, weekStartsOn: CalendarWeekStart, hidden?: ReadonlySet<number>): CalendarRange;
34
41
  /** `hiddenDays` as a lookup. A list that leaves no day of the week hides nothing. */
35
42
  export declare function hiddenDaySet(hiddenDays: readonly number[] | undefined): ReadonlySet<number>;
36
43
  /** `date`, or the first shown day from it on in `direction`. */
37
44
  export declare function shownDay(date: Date, hidden: ReadonlySet<number>, direction?: 1 | -1): Date;
38
45
  /** `date` moved by `steps` periods, keeping its place in the period where it can. */
39
- export declare function stepDate(view: CalendarView, date: Date, steps: number, hidden?: ReadonlySet<number>): Date;
46
+ export declare function stepDate(period: CalendarPeriod, date: Date, steps: number, hidden?: ReadonlySet<number>): Date;
40
47
  /** The shown period plus one on either side: what the swipe pager can reveal. */
41
- export declare function rangeWithNeighbours(view: CalendarView, date: Date, weekStartsOn: CalendarWeekStart, hidden?: ReadonlySet<number>): CalendarRange;
48
+ export declare function rangeWithNeighbours(period: CalendarPeriod, date: Date, weekStartsOn: CalendarWeekStart, hidden?: ReadonlySet<number>): CalendarRange;
49
+ /** Every day from `first` to `last`, in either order: what creating whole days hands out. */
50
+ export declare function allDaySlot(first: Date, last?: Date): CalendarSlot;
51
+ /**
52
+ * What the header's New event button creates on `day`: in the week and day views the hour from
53
+ * the next full hour of the clock, as calendar apps do, and elsewhere the whole day.
54
+ */
55
+ export declare function newEventSlot(period: CalendarPeriod, day: Date, now: Date, slotMinutes: number): CalendarSlot;
56
+ /** The ISO 8601 week `date` falls in: weeks run Monday to Sunday, and week 1 holds 4 January. */
57
+ export declare function weekNumber(date: Date): number;
42
58
  /** Midnight of each of `count` days from `start`. */
43
59
  export declare function daysFrom(start: Date, count: number): Date[];
44
60
  /** The days of `count` from `start` that are not hidden: the columns a row of them draws. */
@@ -1,4 +1,5 @@
1
- import { CalendarView, CalendarRange, CalendarWeekStart } from './calendar.types.js';
1
+ import { CalendarRange, CalendarWeekStart } from './calendar.types.js';
2
+ import { CalendarPeriod } from './dates.js';
2
3
  /**
3
4
  * Cached, since building one costs about fifty times more than using it. A formatter keeps the
4
5
  * time zone it was built in while `Date` follows the current one, so the key carries the zone: a
@@ -29,4 +30,4 @@ export declare function formatDayNumber(date: Date, locale: string | undefined):
29
30
  export declare function formatLongDate(date: Date, locale: string | undefined): string;
30
31
  export declare function formatShortDate(date: Date, locale: string | undefined): string;
31
32
  export declare function formatMonthTitle(date: Date, locale: string | undefined): string;
32
- export declare function formatPeriodTitle(view: CalendarView, date: Date, range: CalendarRange, locale: string | undefined): string;
33
+ export declare function formatPeriodTitle(period: CalendarPeriod, date: Date, range: CalendarRange, locale: string | undefined): string;
@@ -6,6 +6,11 @@ import { CalendarEvent } from './calendar.types.js';
6
6
  export declare const BRIEF_EVENT_MINUTES = 15;
7
7
  /** `end`, clamped so an event that ends before it starts is treated as having no length. */
8
8
  export declare function eventEnd(event: CalendarEvent): Date;
9
+ /** `event` moved by `days` calendar days, keeping its clock times and its real length. */
10
+ export declare function moveByDays(event: CalendarEvent, days: number): {
11
+ start: Date;
12
+ end: Date;
13
+ };
9
14
  /** Drawn in the all-day row rather than the time grid. */
10
15
  export declare function isAllDayLike(event: CalendarEvent): boolean;
11
16
  /** First and last day (both midnight, both inclusive) the event appears on. */
@@ -0,0 +1,4 @@
1
+ /** The current time, updated on each minute boundary: it carries the now-line through the day. */
2
+ export declare function useNow(): Date;
3
+ /** Midnight of today, updated when the day changes: today's mark, for a calendar left open overnight. */
4
+ export declare function useToday(): Date;
@@ -1,18 +1,24 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { SlotClassNames, SlotStyles } from '../types/slots.types.js';
3
- import { CalendarEvent, CalendarEventChange, CalendarEventContext, CalendarLabels, CalendarSlot, CalendarSlots, CalendarView, CalendarWeekStart } from './calendar.types.js';
3
+ import { CalendarEvent, CalendarEventChange, CalendarEventContext, CalendarLabels, CalendarSlot, CalendarSlots, CalendarWeekStart } from './calendar.types.js';
4
+ import { CalendarPeriod } from './dates.js';
4
5
  /** What Calendar hands each of its views. Internal, so it stays out of the published types. */
5
6
  export interface CalendarViewProps<E extends CalendarEvent = CalendarEvent> {
6
7
  events: readonly E[];
7
8
  /** Local midnight of the selected day. */
8
9
  date: Date;
9
- view: CalendarView;
10
+ /** The view, or the narrow calendar's three-day Week. */
11
+ period: CalendarPeriod;
12
+ /** Midnight of today, a new value when the day changes. */
13
+ today: Date;
10
14
  locale: string | undefined;
11
15
  weekStartsOn: CalendarWeekStart;
12
16
  slotMinutes: number;
13
17
  /** Weekdays left out, as `Date#getDay()` counts. `date` is never one of them. */
14
18
  hidden: ReadonlySet<number>;
15
19
  scrollToHour: number | undefined;
20
+ workingHours: readonly [start: number, end: number] | undefined;
21
+ showWeekNumbers: boolean;
16
22
  text: Required<CalendarLabels>;
17
23
  onDateChange: (date: Date) => void;
18
24
  /** Opens a day in the Day view, or `undefined` where the Day view is not offered. */
@@ -21,6 +27,7 @@ export interface CalendarViewProps<E extends CalendarEvent = CalendarEvent> {
21
27
  onEventChange: ((change: CalendarEventChange<E>) => void) | undefined;
22
28
  onSlotCreate: ((slot: CalendarSlot, anchor: HTMLElement) => void) | undefined;
23
29
  renderEvent: ((event: E, context: CalendarEventContext) => ReactNode) | undefined;
30
+ eventClassName: ((event: E) => string | undefined) | undefined;
24
31
  classNames: SlotClassNames<CalendarSlots> | undefined;
25
32
  slotStyles: SlotStyles<CalendarSlots> | undefined;
26
33
  }
@@ -1,17 +1,30 @@
1
1
  import { default as React, ReactNode } from 'react';
2
- import { ButtonStyleType } from '../button/button.types.js';
2
+ import { ButtonProps, ButtonStyleType } from '../button/button.types.js';
3
3
  import { HtmlProps, SlotClassNames, SlotStyles } from '../types/slots.types.js';
4
4
  import { IconAction } from '../types/actions.types.js';
5
+ import { ColorValue } from '../themeProvider/color.types.js';
6
+ /**
7
+ * The card's surface. `Outlined` and `Light` mean what they do on Button, Badge and Chip; `Elevated`
8
+ * is a card's own. There is no `Filled`: body text on a solid colour reads badly.
9
+ */
5
10
  export declare enum CardStyleType {
11
+ /** A raised surface with a shadow, always neutral. The default. */
6
12
  Elevated = "elevated",
13
+ /** A border in the colour, no fill. */
7
14
  Outlined = "outlined",
8
- Filled = "filled"
15
+ /** A flat tint of the colour, no border. */
16
+ Light = "light"
9
17
  }
10
18
  export type CardSlots = 'root' | 'content';
11
19
  export interface CardProps extends Omit<HtmlProps, 'tabIndex'> {
12
20
  className?: string | undefined;
13
21
  children?: ReactNode;
14
22
  styleType?: CardStyleType;
23
+ /**
24
+ * The border of an `Outlined` card and the tint of a `Light` one: a `ThemeColor` (default
25
+ * `Neutral`) or any CSS colour. An `Elevated` card stays neutral.
26
+ */
27
+ color?: ColorValue;
15
28
  onClick?: () => void;
16
29
  tabIndex?: number | null;
17
30
  hoverEffect?: boolean;
@@ -45,6 +58,7 @@ export interface CardAction {
45
58
  id?: string;
46
59
  label?: string;
47
60
  styleType?: ButtonStyleType;
61
+ color?: ButtonProps['color'];
48
62
  onClick?: () => void;
49
63
  }
50
64
  export interface CardActionsProps {