@ahrowe/ui 0.41.2 → 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 (328) 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/floorPlan/floorPlan.graph.d.ts +10 -3
  32. package/dist/cjs-types/common/floorPlan/floorPlan.plan.d.ts +5 -0
  33. package/dist/cjs-types/common/floorPlan/floorPlan.rooms.d.ts +6 -2
  34. package/dist/cjs-types/common/floorPlan/floorPlan.snap.d.ts +1 -3
  35. package/dist/cjs-types/common/floorPlan/index.d.ts +1 -3
  36. package/dist/cjs-types/common/planCanvas/planCanvas.types.d.ts +1 -1
  37. package/dist/cjs-types/common/progressBar/progressBar.d.ts +0 -1
  38. package/dist/cjs-types/common/progressBar/progressBar.types.d.ts +3 -1
  39. package/dist/cjs-types/common/roomDrawer/roomDrawer.types.d.ts +29 -8
  40. package/dist/cjs-types/common/roomViewer/roomViewer.types.d.ts +4 -2
  41. package/dist/cjs-types/common/splitButton/splitButton.types.d.ts +4 -1
  42. package/dist/cjs-types/common/styles/tone.d.ts +11 -0
  43. package/dist/cjs-types/common/themeProvider/color.types.d.ts +20 -0
  44. package/dist/cjs-types/common/themeProvider/index.d.ts +2 -0
  45. package/dist/cjs-types/common/themeProvider/theme.types.d.ts +3 -6
  46. package/dist/cjs-types/common/timeline/timeline.types.d.ts +3 -10
  47. package/dist/cjs-types/common/toast/index.d.ts +1 -1
  48. package/dist/cjs-types/common/toast/toast.types.d.ts +7 -3
  49. package/dist/cjs-types/common/types/actions.types.d.ts +1 -1
  50. package/dist/cjs-types/common/utils/dismissClick.d.ts +4 -0
  51. package/dist/cjs-types/common/utils/isDev.d.ts +1 -0
  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/chip/chip.mjs +1 -1
  133. package/dist/esm/common/chip/chip.mjs.map +1 -1
  134. package/dist/esm/common/chip/chip.module.mjs +1 -1
  135. package/dist/esm/common/chip/chip.module.mjs.map +1 -1
  136. package/dist/esm/common/chip/chip.types.mjs +1 -1
  137. package/dist/esm/common/chip/chip.types.mjs.map +1 -1
  138. package/dist/esm/common/colorPicker/colorPicker.mjs +1 -1
  139. package/dist/esm/common/colorPicker/colorPicker.mjs.map +1 -1
  140. package/dist/esm/common/colorPicker/colorPicker.module.mjs.map +1 -1
  141. package/dist/esm/common/confirmModal/confirmModal.mjs +1 -1
  142. package/dist/esm/common/confirmModal/confirmModal.mjs.map +1 -1
  143. package/dist/esm/common/copyButton/copyButton.mjs +1 -1
  144. package/dist/esm/common/copyButton/copyButton.mjs.map +1 -1
  145. package/dist/esm/common/copyButton/copyButton.module.mjs +1 -1
  146. package/dist/esm/common/copyButton/copyButton.module.mjs.map +1 -1
  147. package/dist/esm/common/errorBoundary/errorBoundary.mjs +2 -2
  148. package/dist/esm/common/errorBoundary/errorBoundary.mjs.map +1 -1
  149. package/dist/esm/common/fab/components/fabBase/fabBase.mjs +1 -1
  150. package/dist/esm/common/fab/components/fabBase/fabBase.mjs.map +1 -1
  151. package/dist/esm/common/fab/fab.mjs +1 -1
  152. package/dist/esm/common/fab/fab.mjs.map +1 -1
  153. package/dist/esm/common/flip/flip.mjs +1 -1
  154. package/dist/esm/common/flip/flip.mjs.map +1 -1
  155. package/dist/esm/common/floorPlan/floorPlan.faces.mjs +1 -1
  156. package/dist/esm/common/floorPlan/floorPlan.faces.mjs.map +1 -1
  157. package/dist/esm/common/floorPlan/floorPlan.geometry.mjs +1 -1
  158. package/dist/esm/common/floorPlan/floorPlan.geometry.mjs.map +1 -1
  159. package/dist/esm/common/floorPlan/floorPlan.graph.mjs +1 -1
  160. package/dist/esm/common/floorPlan/floorPlan.graph.mjs.map +1 -1
  161. package/dist/esm/common/floorPlan/floorPlan.hit.mjs +1 -1
  162. package/dist/esm/common/floorPlan/floorPlan.hit.mjs.map +1 -1
  163. package/dist/esm/common/floorPlan/floorPlan.json.mjs +1 -1
  164. package/dist/esm/common/floorPlan/floorPlan.json.mjs.map +1 -1
  165. package/dist/esm/common/floorPlan/floorPlan.mesh.mjs +1 -1
  166. package/dist/esm/common/floorPlan/floorPlan.mesh.mjs.map +1 -1
  167. package/dist/esm/common/floorPlan/floorPlan.path.mjs +1 -1
  168. package/dist/esm/common/floorPlan/floorPlan.path.mjs.map +1 -1
  169. package/dist/esm/common/floorPlan/floorPlan.plan.mjs +1 -1
  170. package/dist/esm/common/floorPlan/floorPlan.plan.mjs.map +1 -1
  171. package/dist/esm/common/floorPlan/floorPlan.rooms.mjs +1 -1
  172. package/dist/esm/common/floorPlan/floorPlan.rooms.mjs.map +1 -1
  173. package/dist/esm/common/floorPlan/floorPlan.snap.mjs +1 -1
  174. package/dist/esm/common/floorPlan/floorPlan.snap.mjs.map +1 -1
  175. package/dist/esm/common/floorPlan/floorPlan.triangulate.mjs +1 -1
  176. package/dist/esm/common/floorPlan/floorPlan.triangulate.mjs.map +1 -1
  177. package/dist/esm/common/floorPlan/floorPlan.types.mjs +1 -1
  178. package/dist/esm/common/floorPlan/floorPlan.types.mjs.map +1 -1
  179. package/dist/esm/common/klipyPicker/klipyPicker.mjs +1 -1
  180. package/dist/esm/common/klipyPicker/klipyPicker.mjs.map +1 -1
  181. package/dist/esm/common/modal/modal.mjs +1 -1
  182. package/dist/esm/common/modal/modal.mjs.map +1 -1
  183. package/dist/esm/common/modal/modal.module.mjs.map +1 -1
  184. package/dist/esm/common/numberInput/numberInput.mjs +1 -1
  185. package/dist/esm/common/numberInput/numberInput.mjs.map +1 -1
  186. package/dist/esm/common/numberInput/numberInput.module.mjs.map +1 -1
  187. package/dist/esm/common/planCanvas/planCanvas.mjs +1 -1
  188. package/dist/esm/common/planCanvas/planCanvas.mjs.map +1 -1
  189. package/dist/esm/common/popover/popover.mjs +1 -1
  190. package/dist/esm/common/popover/popover.mjs.map +1 -1
  191. package/dist/esm/common/progressBar/progressBar.mjs +1 -1
  192. package/dist/esm/common/progressBar/progressBar.mjs.map +1 -1
  193. package/dist/esm/common/progressBar/progressBar.module.mjs +1 -1
  194. package/dist/esm/common/progressBar/progressBar.module.mjs.map +1 -1
  195. package/dist/esm/common/roomDrawer/roomDrawer.mjs +1 -1
  196. package/dist/esm/common/roomDrawer/roomDrawer.mjs.map +1 -1
  197. package/dist/esm/common/roomDrawer/roomDrawer.module.mjs.map +1 -1
  198. package/dist/esm/common/roomViewer/roomViewer.mjs +1 -1
  199. package/dist/esm/common/roomViewer/roomViewer.mjs.map +1 -1
  200. package/dist/esm/common/sectionHeader/sectionHeader.mjs.map +1 -1
  201. package/dist/esm/common/splitButton/splitButton.mjs +1 -1
  202. package/dist/esm/common/splitButton/splitButton.mjs.map +1 -1
  203. package/dist/esm/common/styles/tone.mjs +4 -0
  204. package/dist/esm/common/styles/tone.mjs.map +1 -0
  205. package/dist/esm/common/styles/tone.module.mjs +2 -0
  206. package/dist/esm/common/styles/tone.module.mjs.map +1 -0
  207. package/dist/esm/common/themeProvider/color.types.mjs +2 -0
  208. package/dist/esm/common/themeProvider/color.types.mjs.map +1 -0
  209. package/dist/esm/common/themeProvider/defaultTheme.mjs +1 -1
  210. package/dist/esm/common/themeProvider/defaultTheme.mjs.map +1 -1
  211. package/dist/esm/common/tilt/tilt.mjs +1 -1
  212. package/dist/esm/common/tilt/tilt.mjs.map +1 -1
  213. package/dist/esm/common/timeInput/timeInput.mjs +1 -1
  214. package/dist/esm/common/timeInput/timeInput.mjs.map +1 -1
  215. package/dist/esm/common/timeline/timeline.mjs +1 -1
  216. package/dist/esm/common/timeline/timeline.mjs.map +1 -1
  217. package/dist/esm/common/timeline/timeline.module.mjs +1 -1
  218. package/dist/esm/common/timeline/timeline.module.mjs.map +1 -1
  219. package/dist/esm/common/timeline/timeline.types.mjs +1 -1
  220. package/dist/esm/common/timeline/timeline.types.mjs.map +1 -1
  221. package/dist/esm/common/timer/timer.mjs +1 -1
  222. package/dist/esm/common/timer/timer.mjs.map +1 -1
  223. package/dist/esm/common/timer/timer.module.mjs +1 -1
  224. package/dist/esm/common/timer/timer.module.mjs.map +1 -1
  225. package/dist/esm/common/toast/toast.mjs +1 -1
  226. package/dist/esm/common/toast/toast.mjs.map +1 -1
  227. package/dist/esm/common/toast/toast.module.mjs +1 -1
  228. package/dist/esm/common/toast/toast.module.mjs.map +1 -1
  229. package/dist/esm/common/toast/toastHost.mjs +1 -1
  230. package/dist/esm/common/toast/toastHost.mjs.map +1 -1
  231. package/dist/esm/common/utils/dismissClick.mjs +2 -0
  232. package/dist/esm/common/utils/dismissClick.mjs.map +1 -0
  233. package/dist/esm/common/utils/isDev.mjs +2 -0
  234. package/dist/esm/common/utils/isDev.mjs.map +1 -0
  235. package/dist/esm/floor-plan.mjs +1 -0
  236. package/dist/esm/index.mjs +1 -1
  237. package/dist/esm/services/formValidation/FormValidatorGroupWithForm.mjs +1 -1
  238. package/dist/esm/services/formValidation/FormValidatorGroupWithForm.mjs.map +1 -1
  239. package/dist/floor-plan.cjs +1 -0
  240. package/dist/floorPlan-DLe5XAx6.cjs +2 -0
  241. package/dist/floorPlan-DLe5XAx6.cjs.map +1 -0
  242. package/dist/index.cjs +5 -3
  243. package/dist/index.cjs.map +1 -1
  244. package/dist/style.css +1 -1
  245. package/dist/types/common/accordion/accordion.types.d.ts +17 -2
  246. package/dist/types/common/actionButtons/actionButtons.types.d.ts +7 -1
  247. package/dist/types/common/actionIcon/actionIcon.d.ts +1 -1
  248. package/dist/types/common/actionIcon/actionIcon.types.d.ts +7 -9
  249. package/dist/types/common/alert/alert.types.d.ts +6 -8
  250. package/dist/types/common/animatedLogo/animatedLogo.types.d.ts +3 -2
  251. package/dist/types/common/badge/badge.types.d.ts +10 -6
  252. package/dist/types/common/button/button.types.d.ts +14 -4
  253. package/dist/types/common/calendar/calendar.types.d.ts +25 -10
  254. package/dist/types/common/calendar/components/agendaList/agendaList.d.ts +1 -1
  255. package/dist/types/common/calendar/components/agendaList/agendaList.types.d.ts +3 -0
  256. package/dist/types/common/calendar/components/calendarHeader/calendarHeader.d.ts +1 -1
  257. package/dist/types/common/calendar/components/calendarHeader/calendarHeader.types.d.ts +2 -0
  258. package/dist/types/common/calendar/components/compactMonth/compactMonth.d.ts +1 -1
  259. package/dist/types/common/calendar/components/monthView/monthView.d.ts +1 -1
  260. package/dist/types/common/calendar/components/monthView/monthView.types.d.ts +3 -2
  261. package/dist/types/common/calendar/components/timeGrid/timeGrid.d.ts +1 -1
  262. package/dist/types/common/calendar/components/timeGrid/timeGrid.types.d.ts +9 -1
  263. package/dist/types/common/calendar/dates.d.ts +21 -5
  264. package/dist/types/common/calendar/format.d.ts +3 -2
  265. package/dist/types/common/calendar/layout.d.ts +5 -0
  266. package/dist/types/common/calendar/useNow.d.ts +4 -0
  267. package/dist/types/common/calendar/view.types.d.ts +9 -2
  268. package/dist/types/common/card/card.types.d.ts +16 -2
  269. package/dist/types/common/chip/chip.types.d.ts +10 -5
  270. package/dist/types/common/copyButton/copyButton.types.d.ts +5 -4
  271. package/dist/types/common/fab/components/fabBase/fabBase.d.ts +1 -1
  272. package/dist/types/common/fab/components/fabBase/fabBase.types.d.ts +2 -1
  273. package/dist/types/common/floorPlan/floorPlan.graph.d.ts +10 -3
  274. package/dist/types/common/floorPlan/floorPlan.plan.d.ts +5 -0
  275. package/dist/types/common/floorPlan/floorPlan.rooms.d.ts +6 -2
  276. package/dist/types/common/floorPlan/floorPlan.snap.d.ts +1 -3
  277. package/dist/types/common/floorPlan/index.d.ts +1 -3
  278. package/dist/types/common/planCanvas/planCanvas.types.d.ts +1 -1
  279. package/dist/types/common/progressBar/progressBar.d.ts +0 -1
  280. package/dist/types/common/progressBar/progressBar.types.d.ts +3 -1
  281. package/dist/types/common/roomDrawer/roomDrawer.types.d.ts +29 -8
  282. package/dist/types/common/roomViewer/roomViewer.types.d.ts +4 -2
  283. package/dist/types/common/splitButton/splitButton.types.d.ts +4 -1
  284. package/dist/types/common/styles/tone.d.ts +11 -0
  285. package/dist/types/common/themeProvider/color.types.d.ts +20 -0
  286. package/dist/types/common/themeProvider/index.d.ts +2 -0
  287. package/dist/types/common/themeProvider/theme.types.d.ts +3 -6
  288. package/dist/types/common/timeline/timeline.types.d.ts +3 -10
  289. package/dist/types/common/toast/index.d.ts +1 -1
  290. package/dist/types/common/toast/toast.types.d.ts +7 -3
  291. package/dist/types/common/types/actions.types.d.ts +1 -1
  292. package/dist/types/common/utils/dismissClick.d.ts +4 -0
  293. package/dist/types/common/utils/isDev.d.ts +1 -0
  294. package/docs/Accordion.md +74 -5
  295. package/docs/ActionButtons.md +6 -3
  296. package/docs/ActionIcon.md +39 -14
  297. package/docs/Alert.md +27 -17
  298. package/docs/AnimatedLogo.md +1 -1
  299. package/docs/Badge.md +24 -7
  300. package/docs/Button.md +98 -40
  301. package/docs/ButtonGroup.md +18 -18
  302. package/docs/CLAUDE.md +24 -12
  303. package/docs/Calendar.md +35 -17
  304. package/docs/Card.md +53 -14
  305. package/docs/Chip.md +24 -9
  306. package/docs/ConfigProvider.md +3 -3
  307. package/docs/CopyButton.md +6 -5
  308. package/docs/FloorPlan.md +18 -14
  309. package/docs/ProgressBar.md +7 -4
  310. package/docs/RoomDrawer.md +42 -13
  311. package/docs/RoomViewer.md +1 -14
  312. package/docs/SectionHeader.md +1 -1
  313. package/docs/SplitButton.md +6 -5
  314. package/docs/ThemeColor.md +103 -0
  315. package/docs/ThemeProvider.md +5 -5
  316. package/docs/Timeline.md +18 -9
  317. package/docs/Toast.md +25 -11
  318. package/package.json +20 -2
  319. package/dist/cjs-types/common/floorPlan/legacySvg.d.ts +0 -27
  320. package/dist/esm/common/accordion/accordion.plain.module.mjs +0 -2
  321. package/dist/esm/common/accordion/accordion.plain.module.mjs.map +0 -1
  322. package/dist/esm/common/accordion/accordion.primary.module.mjs +0 -2
  323. package/dist/esm/common/accordion/accordion.primary.module.mjs.map +0 -1
  324. package/dist/esm/common/alert/alert.types.mjs +0 -2
  325. package/dist/esm/common/alert/alert.types.mjs.map +0 -1
  326. package/dist/esm/common/floorPlan/legacySvg.mjs +0 -2
  327. package/dist/esm/common/floorPlan/legacySvg.mjs.map +0 -1
  328. package/dist/types/common/floorPlan/legacySvg.d.ts +0 -27
@@ -1,10 +1,13 @@
1
1
  import { HtmlProps, SlotClassNames, SlotStyles } from '../types/slots.types.js';
2
+ import { ColorValue } from '../themeProvider/color.types.js';
3
+ /** How much the chip stands out. Independent of its colour. */
2
4
  export declare enum ChipStyleType {
3
- Default = "default",
4
- Primary = "primary",
5
- Info = "info",
6
- Warn = "warn",
7
- Error = "error"
5
+ /** Solid fill. */
6
+ Filled = "filled",
7
+ /** A light tint of the colour behind text in the colour. The default. */
8
+ Light = "light",
9
+ /** Border and text in the colour, no fill. */
10
+ Outlined = "outlined"
8
11
  }
9
12
  /** Text Chip renders of its own, for translating it. */
10
13
  export interface ChipLabels {
@@ -17,6 +20,8 @@ export interface ChipProps extends HtmlProps {
17
20
  text?: string;
18
21
  thumbnail?: React.ReactNode;
19
22
  styleType?: ChipStyleType;
23
+ /** A `ThemeColor` (default `Neutral`) or any CSS colour, such as `'var(--brand)'`. */
24
+ color?: ColorValue;
20
25
  showRemoveIcon?: boolean;
21
26
  /** Accessible name for the remove button. Default `'Remove'`. */
22
27
  onClick?: () => void;
@@ -1,6 +1,7 @@
1
1
  import { CSSProperties, MouseEvent, Ref } from 'react';
2
2
  import { IconContent } from '../types/icon.types.js';
3
- import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types.js';
3
+ import { SlotClassNames, SlotStyles } from '../types/slots.types.js';
4
+ import { ActionIconProps } from '../actionIcon/actionIcon.types.js';
4
5
  export type CopyButtonSlots = 'root' | 'icon';
5
6
  export interface CopyButtonLabels {
6
7
  /** Accessible name and tooltip before copying. Default: "Copy". */
@@ -10,7 +11,7 @@ export interface CopyButtonLabels {
10
11
  /** Announced when the copy fails. Default: "Could not copy". */
11
12
  failed?: string;
12
13
  }
13
- export interface CopyButtonProps extends Omit<HtmlProps<HTMLDivElement>, 'onCopy' | 'onError'> {
14
+ export interface CopyButtonProps extends Omit<ActionIconProps, 'icon' | 'onCopy' | 'onError' | 'onClick' | 'ref' | 'classNames' | 'styles'> {
14
15
  /** Text written to the clipboard on click. */
15
16
  value: string;
16
17
  /** How long the copied state shows, in ms. Default: 2000. */
@@ -24,11 +25,11 @@ export interface CopyButtonProps extends Omit<HtmlProps<HTMLDivElement>, 'onCopy
24
25
  /** Called when the clipboard refuses the write, e.g. outside a secure context. */
25
26
  onError?: () => void;
26
27
  /** Called on every click, before the copy. */
27
- onClick?: (event: MouseEvent<HTMLDivElement>) => void;
28
+ onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
28
29
  /** Text this component renders of its own. */
29
30
  labels?: CopyButtonLabels;
30
31
  /** Ref to the root element. */
31
- ref?: Ref<HTMLDivElement>;
32
+ ref?: Ref<HTMLButtonElement>;
32
33
  className?: string;
33
34
  style?: CSSProperties;
34
35
  classNames?: SlotClassNames<CopyButtonSlots>;
@@ -1,3 +1,3 @@
1
1
  import { FabBaseProps } from './fabBase.types.js';
2
- declare function FabBase({ style, children, size, className, styleType, onClick, }: FabBaseProps): import("react").JSX.Element;
2
+ declare function FabBase({ style, children, size, className, styleType, color, onClick, }: FabBaseProps): import("react").JSX.Element;
3
3
  export default FabBase;
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
- import { ButtonStyleType } from '../../../button/button.types.js';
2
+ import { ButtonProps, ButtonStyleType } from '../../../button/button.types.js';
3
3
  export type FabBaseSize = 'default' | 'mini';
4
4
  export interface FabBaseProps {
5
5
  children?: ReactNode;
@@ -8,5 +8,6 @@ export interface FabBaseProps {
8
8
  /** Forwarded from Fab's `button` slot. */
9
9
  style?: CSSProperties;
10
10
  styleType?: ButtonStyleType;
11
+ color?: ButtonProps['color'];
11
12
  onClick?: () => void;
12
13
  }
@@ -5,6 +5,13 @@ import { PlanEdit, PlanFloor, PlanIssue, PlanNode, PlanOpening, PlanPoint, PlanW
5
5
  * reproducible.
6
6
  */
7
7
  export declare function newId(prefix: string): string;
8
+ /**
9
+ * The first of `nameFor(start)`, `nameFor(start + 1)`, … that `used` does not hold.
10
+ *
11
+ * Bounded because `nameFor` is the caller's: one that ignores its number would never reach a
12
+ * free name. An injective one always finds one within `used.size + 1` tries.
13
+ */
14
+ export declare function freshName(nameFor: (n: number) => string, start: number, used: ReadonlySet<string>): string;
8
15
  /** Test-only: makes generated ids reproducible within a single test. */
9
16
  export declare function __resetIdSeq(): void;
10
17
  declare function wallLength(floor: PlanFloor, wall: PlanWall): number;
@@ -157,9 +164,9 @@ export declare function transformPlan(floor: PlanFloor, dx: number, dy: number):
157
164
  /**
158
165
  * Multiplies every coordinate and dimension by `factor`.
159
166
  *
160
- * The one place a scale factor belongs: converting a unitless legacy plan into the
161
- * module's millimetre invariant, once, at the import boundary. The caller picks the
162
- * factor, because nothing in the old data says what it should be.
167
+ * The one place a scale factor belongs: converting geometry drawn in another unit into
168
+ * the module's millimetre invariant, once, where it enters. The caller picks the factor,
169
+ * because nothing in the data says what it should be.
163
170
  */
164
171
  export declare function scalePlan(floor: PlanFloor, factor: number): PlanFloor;
165
172
  export declare function addOpening(floor: PlanFloor, opening: Omit<PlanOpening, 'id'>): PlanEdit<{
@@ -34,6 +34,11 @@ export declare function floorIndex(plan: FloorPlan, floorId: string): number;
34
34
  export declare function floorBelow(plan: FloorPlan, floorId: string): PlanFloor | null;
35
35
  export interface AddFloorOptions {
36
36
  label?: string;
37
+ /**
38
+ * Names the floor when `label` is not given. `n` is the floor count plus one, moved past
39
+ * any number whose name is taken. Default `` (n) => `Floor ${n}` ``.
40
+ */
41
+ nameFor?: (n: number) => string;
37
42
  /** Millimetres. Defaults to the storey height of the floor it is added above. */
38
43
  height?: number;
39
44
  /** Where to put it. Defaults to directly above `aboveFloorId`, else on top. */
@@ -22,8 +22,12 @@ export declare function derivePlan(floor: PlanFloor): PlanDerivation;
22
22
  /** Test-only: makes the room sequence counter reproducible. */
23
23
  export declare function __resetRoomSeq(): void;
24
24
  export interface CommitDerivationOptions {
25
- /** Names new rooms. Receives the 1-based index among rooms created in this call. */
26
- nameFor?: (index: number, face: DerivedRoom) => string;
25
+ /**
26
+ * Names a new room. `n` is the floor's room count plus one, moved past any number whose
27
+ * name is taken, so `` (n) => `Raum ${n}` `` numbers rooms the way the default does.
28
+ * Default `` (n) => `Room ${n}` ``.
29
+ */
30
+ nameFor?: (n: number, face: DerivedRoom) => string;
27
31
  }
28
32
  /**
29
33
  * Mints a `PlanRoom` for every face that matched nothing.
@@ -35,7 +35,7 @@ export interface SnapOptions {
35
35
  export declare const DEFAULT_SNAP_OPTIONS: SnapOptions;
36
36
  export interface SnapContext {
37
37
  floor: PlanFloor;
38
- /** World units per screen pixel at the current zoom. See `screenScale`. */
38
+ /** World units per screen pixel at the current zoom: `1 / view.zoom`. */
39
39
  pxToWorld: number;
40
40
  /** The anchored point. Required for angle lock; also enables the length readout. */
41
41
  origin?: PlanPoint;
@@ -70,8 +70,6 @@ export interface SnapResult {
70
70
  */
71
71
  angleRelativeTo?: 'world' | 'reference';
72
72
  }
73
- /** World units per screen pixel, from the element's current transform. */
74
- export declare function screenScale(svg: SVGSVGElement): number;
75
73
  /**
76
74
  * Client (screen) coordinates to world coordinates. Pure conversion, no snapping.
77
75
  *
@@ -18,7 +18,7 @@ export { HIT_PX, HIT_PX_COARSE, hitTest, selectionsEqual, worldTolerances } from
18
18
  export type { HitTestOptions, HitTolerances } from './floorPlan.hit.js';
19
19
  export { DEFAULT_WALL_ATTRS, addOpening, addRect, addWall, cleanupPlan, detachWall, dissolveNode, mergeNodes, moveNode, removeOpening, removeWall, scalePlan, splitWall, transformPlan, updateOpening, validatePlan, wallLength, weldShortWalls, } from './floorPlan.graph.js';
20
20
  export type { DetachWallResult, DissolveNodeOptions, ResolveNodeResult, SplitWallResult, WallAttrs, } from './floorPlan.graph.js';
21
- export { DEFAULT_SNAP_OPTIONS, SnapKind, clientToWorld, resolveSnap, screenScale } from './floorPlan.snap.js';
21
+ export { DEFAULT_SNAP_OPTIONS, SnapKind, clientToWorld, resolveSnap } from './floorPlan.snap.js';
22
22
  export type { SnapContext, SnapGuide, SnapOptions, SnapResult } from './floorPlan.snap.js';
23
23
  export { buildWallPaths, openingGeometry, wallCentrelineSpans } from './floorPlan.path.js';
24
24
  export type { BuildWallPathsOptions, WallCapLine, WallCapReason, WallPathGroup, WallPathResult, } from './floorPlan.path.js';
@@ -26,5 +26,3 @@ export { PLAN_FORMAT_VERSION, planFromJson, planToJson } from './floorPlan.json.
26
26
  export type { PlanParseResult } from './floorPlan.json.js';
27
27
  export { buildPlanMesh } from './floorPlan.mesh.js';
28
28
  export type { BuildPlanMeshOptions, PlanMesh, PlanMeshGroup, PlanMeshPart } from './floorPlan.mesh.js';
29
- export { planFromLegacySvg } from './legacySvg.js';
30
- export type { LegacyImportOptions } from './legacySvg.js';
@@ -33,7 +33,7 @@ export interface PlanCanvasProps {
33
33
  area: number;
34
34
  faceId: string;
35
35
  }) => ReactNode;
36
- /** Accessible name for a room. */
36
+ /** Accessible name for an interactive room. RoomViewer supplies the default, from its labels. */
37
37
  getRoomLabel?: (room: PlanRoom | null, context: {
38
38
  area: number;
39
39
  }) => string;
@@ -1,5 +1,4 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { ProgressBarProps } from './progressBar.types.js';
3
- export declare function getContrastColor(hexColor: string): string;
4
3
  declare function ProgressBar({ className, total, progress, style, classNames, styles: slotStyles, ...rest }: ProgressBarProps): ReactElement;
5
4
  export default ProgressBar;
@@ -1,8 +1,10 @@
1
1
  import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types.js';
2
+ import { ColorValue } from '../themeProvider/color.types.js';
2
3
  export interface Progress {
3
4
  amount: number;
4
5
  label?: string;
5
- color?: string;
6
+ /** A `ThemeColor` or any CSS colour; its label is black or white, whichever reads. Default `--primary-color`. */
7
+ color?: ColorValue;
6
8
  class?: string;
7
9
  }
8
10
  export type ProgressBarSlots = 'root' | 'fill' | 'label';
@@ -27,7 +27,10 @@ export interface RoomDrawerChangeMeta {
27
27
  /** Ids of whatever the change touched, for syncing an external selection. */
28
28
  targetIds: string[];
29
29
  }
30
- /** Every string the drawer's own chrome renders, for localisation. */
30
+ /**
31
+ * Every string the drawer produces of its own, for localisation: its chrome, and the names it
32
+ * gives the rooms and floors it creates, which are stored in the plan.
33
+ */
31
34
  export interface RoomDrawerLabels {
32
35
  /** The toolbar, read out by screen readers. */
33
36
  tools?: string;
@@ -54,12 +57,21 @@ export interface RoomDrawerLabels {
54
57
  floorHeight?: string;
55
58
  moveFloorUp?: string;
56
59
  moveFloorDown?: string;
60
+ /** Name of a new room. `n` counts the floor's rooms, skipping names already taken. */
61
+ newRoomName?: (n: number) => string;
62
+ /** Name of a floor added with the `+` button. `n` counts the floors, skipping names already taken. */
63
+ newFloorName?: (n: number) => string;
64
+ /** Name of a copied floor, from the name of the floor it copies. */
65
+ copiedFloorName?: (name: string) => string;
66
+ /** Name of the one floor an empty plan starts with, uncontrolled or after `clear()`. */
67
+ initialFloorName?: string;
57
68
  /** The inspector's noun for a floor, shown when nothing is selected. */
58
69
  selectedFloor?: string;
59
70
  /** Shown in the hint line when an opened file could not be read at all. */
60
71
  importFailed?: string;
61
72
  snap?: string;
62
- angleLock?: string;
73
+ /** The angle lock toggle, given `constrainAngle`. */
74
+ angleLock?: (angle: number) => string;
63
75
  grid?: string;
64
76
  zoomIn?: string;
65
77
  zoomOut?: string;
@@ -69,22 +81,27 @@ export interface RoomDrawerLabels {
69
81
  thickness?: string;
70
82
  width?: string;
71
83
  sill?: string;
72
- head?: string;
73
84
  deleteSelection?: string;
74
- /** Shown when several things are selected. `{count}` is replaced with the number. */
75
- selectedCount?: string;
85
+ /** What the inspector calls several things selected at once. */
86
+ selectedCount?: (count: number) => string;
76
87
  /** What the inspector calls the current selection. */
77
- selectedNothing?: string;
78
88
  selectedRoom?: string;
79
89
  selectedWall?: string;
80
90
  selectedCorner?: string;
81
- /** Overrides the opening's own kind, which is used by default. */
82
- selectedOpening?: string;
91
+ selectedDoor?: string;
92
+ selectedWindow?: string;
93
+ selectedArchway?: string;
94
+ selectedGap?: string;
95
+ /** Hint for the select tool with `multiSelect` on. */
83
96
  hintSelect?: string;
97
+ /** Hint for the select tool with `multiSelect` off. */
98
+ hintSelectSingle?: string;
84
99
  hintWall?: string;
85
100
  hintRect?: string;
86
101
  hintMeasure?: string;
87
102
  hintOpening?: string;
103
+ /** A drawing angle measured from the previous wall, given the formatted angle. */
104
+ relativeAngle?: (angle: string) => string;
88
105
  }
89
106
  /** Every icon in the chrome is overridable. */
90
107
  export interface RoomDrawerIcons {
@@ -259,6 +276,10 @@ export interface RoomDrawerProps extends Omit<HtmlProps<HTMLDivElement>, 'onChan
259
276
  showMeasurements?: boolean;
260
277
  formatLength?: (lengthMm: number) => string;
261
278
  formatArea?: (areaMm2: number) => string;
279
+ /** A drawing angle, in degrees from -180 to 180. */
280
+ formatAngle?: (degrees: number) => string;
281
+ /** The zoom readout. `zoom` is screen pixels per millimetre, so `1` reads as 100%. */
282
+ formatZoom?: (zoom: number) => string;
262
283
  showToolbar?: boolean;
263
284
  showInspector?: boolean;
264
285
  showHint?: boolean;
@@ -10,8 +10,10 @@ export interface RoomViewerLabels {
10
10
  zoomOut?: string;
11
11
  fit?: string;
12
12
  empty?: string;
13
- /** Announced when a room is selected. `{name}` and `{area}` are replaced. */
14
- selectedRoom?: string;
13
+ /** Stands in for the name of a room that has none. */
14
+ unnamedRoom?: string;
15
+ /** Announced when a room is selected, given its name and its formatted area. */
16
+ selectedRoom?: (name: string, area: string) => string;
15
17
  /** Announced when the selection is cleared. */
16
18
  noRoomSelected?: string;
17
19
  }
@@ -1,7 +1,7 @@
1
1
  import { PopoverAlign } from '../popover/popover.types.js';
2
2
  import { CSSProperties, ReactNode } from 'react';
3
3
  import { IconContent } from '../types/icon.types.js';
4
- import { ButtonStyleType, ButtonSize } from '../button/button.types.js';
4
+ import { ButtonProps, ButtonStyleType, ButtonSize } from '../button/button.types.js';
5
5
  import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types.js';
6
6
  export interface SplitButtonAction {
7
7
  id: string;
@@ -20,7 +20,10 @@ export interface SplitButtonProps extends HtmlProps {
20
20
  children?: ReactNode;
21
21
  onClick?: (event: React.MouseEvent<HTMLButtonElement>) => Promise<void> | void;
22
22
  actions: SplitButtonAction[];
23
+ /** Default `Filled`. */
23
24
  styleType?: ButtonStyleType;
25
+ /** A `ThemeColor` or any CSS colour, shared by both buttons (default `Primary`). */
26
+ color?: ButtonProps['color'];
24
27
  size?: ButtonSize;
25
28
  disabled?: boolean;
26
29
  isLoading?: boolean;
@@ -0,0 +1,11 @@
1
+ import { CSSProperties } from 'react';
2
+ import { ColorValue } from '../themeProvider/color.types.js';
3
+ /** The class, and for a colour of the caller's own the inline style, that set the --tone properties. */
4
+ export declare function toneProps(color: ColorValue): {
5
+ className: string;
6
+ style?: CSSProperties;
7
+ };
8
+ /** A colour as a CSS value, for a component that paints it itself rather than through --tone. */
9
+ export declare function cssColor(color: ColorValue): string;
10
+ /** Warns in development about a value that can never be a colour. A var() passes: it only resolves on screen. */
11
+ export declare function useToneCheck(component: string, colors: (ColorValue | undefined)[]): void;
@@ -0,0 +1,20 @@
1
+ /** The theme's named colours, shared by every component that takes a `color`. */
2
+ export declare enum ThemeColor {
3
+ /** `--primary-color`. */
4
+ Primary = "primary",
5
+ /** The surrounding text colour, with `--border-color` for an outline. */
6
+ Neutral = "neutral",
7
+ /** `--success-color`. */
8
+ Success = "success",
9
+ /** `--info-color`. */
10
+ Info = "info",
11
+ /** `--warn-color`. */
12
+ Warn = "warn",
13
+ /** `--error-color`. */
14
+ Error = "error"
15
+ }
16
+ /**
17
+ * A `ThemeColor`, or any CSS colour such as `'var(--brand)'` or `'#7c3aed'`.
18
+ * `string & {}` rather than `string`, which would swallow the enum into one plain string type.
19
+ */
20
+ export type ColorValue = ThemeColor | (string & {});
@@ -1,4 +1,6 @@
1
1
  export { default } from './themeProvider.js';
2
2
  export { defaultTheme } from './defaultTheme.js';
3
3
  export { lightTheme } from './lightTheme.js';
4
+ export { ThemeColor } from './color.types.js';
5
+ export type { ColorValue } from './color.types.js';
4
6
  export type { Theme, ThemeProviderProps, ThemeVariables } from './theme.types.js';
@@ -106,15 +106,10 @@ export interface ThemeVariables {
106
106
  * the device's own safe-area inset where that is larger. Modal sets --modal-padding on its own
107
107
  * panel, so this does not reach a Modal sheet. */
108
108
  '--sheet-safe-padding'?: string;
109
- /** Default-style button background. Falls back to transparent when unset. */
110
- '--button-default-background'?: string;
111
- /** Default-style button text colour. Falls back to --text-color when unset. */
112
- '--button-default-color'?: string;
113
- /** Default-style button border (full `border` shorthand, e.g. `1px solid var(--border-color)`). Falls back to a transparent 1px border when unset. */
114
- '--button-default-border'?: string;
115
109
  '--card-shadow'?: string;
116
110
  '--background-card-elevated'?: string;
117
111
  '--background-card-outlined'?: string;
112
+ /** Surface of a Neutral Light card, named after the old Filled style. Unset, it is the text-colour tint every Light uses; defaultTheme sets --background-accent. */
118
113
  '--background-card-filled'?: string;
119
114
  /** Slider track (unfilled) colour. Falls back to --background-accent-light. */
120
115
  '--slider-track-color'?: string;
@@ -214,6 +209,8 @@ export interface ThemeVariables {
214
209
  '--calendar-now-color'?: string;
215
210
  /** Corner radius of an event. Falls back to 6px. */
216
211
  '--calendar-event-radius'?: string;
212
+ /** The hours outside `workingHours` in the week and day views. Falls back to --background-accent. */
213
+ '--calendar-off-hours-color'?: string;
217
214
  /** Page button size. Falls back to 36px. */
218
215
  '--pagination-size'?: string;
219
216
  /** Gap between page buttons. Falls back to 4px. */
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { IconContent } from '../types/icon.types.js';
3
3
  import { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types.js';
4
+ import { ColorValue } from '../themeProvider/color.types.js';
4
5
  /** Layout of entries relative to the connecting line. */
5
6
  export declare enum TimelineAlignment {
6
7
  /** Line and markers on the left, content to the right (the default). */
@@ -10,14 +11,6 @@ export declare enum TimelineAlignment {
10
11
  /** Line down the center, entries alternating left/right. */
11
12
  Alternate = "alternate"
12
13
  }
13
- /** Semantic colour for an entry's marker, matching the theme's status colours. */
14
- export declare enum TimelineItemStatus {
15
- Default = "default",
16
- Primary = "primary",
17
- Success = "success",
18
- Warn = "warn",
19
- Error = "error"
20
- }
21
14
  export type TimelineSlots = 'root' | 'item' | 'marker' | 'dot' | 'connector' | 'content' | 'title' | 'description' | 'timestamp';
22
15
  export interface TimelineItem {
23
16
  /** Stable identity for the entry, used as its React key. Falls back to its array index when omitted; pass one whenever `items` can be reordered or have entries prepended (e.g. a live "newest first" audit log), so React doesn't misattribute row state across the shift. */
@@ -30,8 +23,8 @@ export interface TimelineItem {
30
23
  timestamp?: React.ReactNode;
31
24
  /** Icon shown in the marker instead of a plain dot — a FontAwesome icon or any node. */
32
25
  icon?: IconContent;
33
- /** Semantic marker colour (default `Default`). */
34
- status?: TimelineItemStatus;
26
+ /** The marker's colour: a `ThemeColor` or any CSS colour. Unset, it is `--timeline-dot-color`. */
27
+ color?: ColorValue;
35
28
  /** Extra content rendered under the description, e.g. a diff, an attachment, an actor avatar. */
36
29
  content?: React.ReactNode;
37
30
  /** Makes the whole entry clickable (e.g. to open the full record), rendering it as an accessible button. */
@@ -1,2 +1,2 @@
1
1
  export { showToast } from './toastService.js';
2
- export type { ToastContextConfig, ToastLabels, ToastOptions, ToastType, ToastPosition, ToastSlots, } from './toast.types.js';
2
+ export type { ToastContextConfig, ToastLabels, ToastOptions, ToastPosition, ToastSlots } from './toast.types.js';
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { SlotClassNames, SlotStyles } from '../types/slots.types.js';
3
+ import { ColorValue } from '../themeProvider/color.types.js';
3
4
  export type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
4
- export type ToastType = 'default' | 'info' | 'success' | 'error' | 'warn';
5
5
  export type ToastSlots = 'root' | 'icon' | 'content' | 'closeButton' | 'progressBar';
6
6
  /** Text Toast renders of its own, for translating it. */
7
7
  export interface ToastLabels {
@@ -25,7 +25,11 @@ export interface ToastContextConfig {
25
25
  labels?: ToastLabels;
26
26
  }
27
27
  export interface ToastOptions extends Omit<ToastContextConfig, 'allowStacking'> {
28
- type?: ToastType;
28
+ /**
29
+ * A `ThemeColor` (default `Primary`) or any CSS colour. A ThemeColor also picks the icon; any
30
+ * other colour shows a bell.
31
+ */
32
+ color?: ColorValue;
29
33
  classNames?: SlotClassNames<ToastSlots>;
30
34
  styles?: SlotStyles<ToastSlots>;
31
35
  }
@@ -44,7 +48,7 @@ export interface ResolvedToastOptions {
44
48
  showRemainingTime: boolean;
45
49
  showCloseButton: boolean;
46
50
  pauseOnHover: boolean;
47
- type: ToastType;
51
+ color: ColorValue;
48
52
  classNames?: SlotClassNames<ToastSlots>;
49
53
  styles?: SlotStyles<ToastSlots>;
50
54
  }
@@ -2,6 +2,6 @@ import { IconContent } from './icon.types.js';
2
2
  /** A single icon-triggered action, rendered as an `ActionIcon` */
3
3
  export interface IconAction {
4
4
  title?: string;
5
- onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
5
+ onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
6
6
  icon: IconContent;
7
7
  }
@@ -0,0 +1,4 @@
1
+ /** Records that the release just dispatched closed an overlay, which marks the click it raises. */
2
+ export declare function markDismiss(): void;
3
+ /** Whether the click `event` ends a press that closed an overlay. */
4
+ export declare function isDismissClick(event: Event): boolean;
@@ -0,0 +1 @@
1
+ export declare function isDev(): boolean;
@@ -1,2 +1,2 @@
1
- "use client";import{AccordionStyleType as e}from"./accordion.types.mjs";import t from"./accordion.module.mjs";import n from"./accordion.primary.module.mjs";import r from"./accordion.plain.module.mjs";import{useComponentDefaults as i}from"../configProvider/useComponentDefaults.mjs";import{isSelfActivation as a}from"../utils/activationKey.mjs";import{useEffect as o,useId as s,useRef as c,useState as l}from"react";import u from"classnames";import{FontAwesomeIcon as d}from"@fortawesome/react-fontawesome";import{faChevronDown as f}from"@fortawesome/free-solid-svg-icons";import{jsx as p,jsxs as m}from"react/jsx-runtime";var h={[e.Default]:t,[e.Primary]:n,[e.Plain]:r};function g(t){let{id:n=``,title:r=``,children:g=null,expanded:_=null,onHeaderClicked:v=()=>{},styleType:y=e.Default,startOpen:b=!1,hideHeader:x=!1,className:S,style:C,classNames:w,styles:T,...E}=i(`Accordion`,t),D=h[y],O=s(),k=`${O}-header`,A=`${O}-body`,j=c(null),M=c(null),[N,P]=l(_??b),[F,I]=l(null);o(()=>{_!==null&&P(_)},[_]),o(()=>{let e=j.current;e&&(e.inert=!N)},[N]),o(()=>{let e=M.current;if(!e)return;let t=new ResizeObserver(()=>I(e.offsetHeight));return t.observe(e),()=>t.unobserve(e)},[]);function L(){let e=!N;v(n,e),_===null&&P(e)}let R={height:N?F??`auto`:`0px`};return m(`div`,{...E,id:n||void 0,className:u(D.accordion,N&&D.accordionActive,S,w?.root),style:{...C,...T?.root},children:[!x&&m(`div`,{className:u(D.accordionHeader,N&&D.accordionHeaderActive,w?.header),style:T?.header,onClick:L,role:`button`,tabIndex:0,id:k,"aria-expanded":N,"aria-controls":A,onKeyDown:e=>{a(e)&&(e.preventDefault(),L())},children:[p(`div`,{className:u(D.accordionTitle,w?.title),style:T?.title,children:r}),p(d,{icon:f,className:u(D.accordionIcon,N&&D.accordionIconActive,w?.icon),style:T?.icon})]}),p(`div`,{ref:j,id:A,role:`region`,"aria-labelledby":x?void 0:k,className:u(D.accordionBody,N&&D.accordionBodyActive,w?.body),style:{...R,...T?.body},children:p(`div`,{className:u(D.accordionBodyInner,w?.bodyInner),style:T?.bodyInner,ref:M,children:g})})]})}export{g as default};
1
+ "use client";import{AccordionStyleType as e}from"./accordion.types.mjs";import t from"./accordion.module.mjs";import{useComponentDefaults as n}from"../configProvider/useComponentDefaults.mjs";import{isSelfActivation as r}from"../utils/activationKey.mjs";import{ThemeColor as i}from"../themeProvider/color.types.mjs";import{toneProps as a,useToneCheck as o}from"../styles/tone.mjs";import{useEffect as s,useId as c,useRef as l,useState as u}from"react";import d from"classnames";import{FontAwesomeIcon as f}from"@fortawesome/react-fontawesome";import{faChevronDown as p}from"@fortawesome/free-solid-svg-icons";import{jsx as m,jsxs as h}from"react/jsx-runtime";var g={[e.Light]:t.accordionStyleLight,[e.Outlined]:t.accordionStyleOutlined,[e.Plain]:t.accordionStylePlain},_=new Set([`ArrowDown`,`ArrowUp`,`Home`,`End`]);function v(e){return[...e.parentElement?.children??[]].flatMap(e=>{if(!e.classList.contains(t.accordion))return[];let n=e.querySelector(`:scope > [role="button"][aria-expanded]`);return n?[n]:[]})}function y(e,t){let n=e.parentElement?v(e.parentElement):[],r=n.indexOf(e);if(r<0)return;let i=n.length-1;n[t===`Home`?0:t===`End`?i:t===`ArrowDown`?(r+1)%n.length:(r-1+n.length)%n.length].focus()}function b(v){let{id:b=``,title:x=``,children:S=null,expanded:C=null,onHeaderClicked:w=()=>{},styleType:T=e.Outlined,color:E=i.Neutral,joined:D=!1,startOpen:O=!1,hideHeader:k=!1,className:A,style:j,classNames:M,styles:N,...P}=n(`Accordion`,v),F=c(),I=`${F}-header`,L=`${F}-body`,R=l(null),z=l(null),[B,V]=u(C??O),[H,U]=u(null);s(()=>{C!==null&&V(C)},[C]),s(()=>{let e=R.current;e&&(e.inert=!B)},[B]),s(()=>{let e=z.current;if(!e)return;let t=new ResizeObserver(()=>U(e.offsetHeight));return t.observe(e),()=>t.unobserve(e)},[]);function W(){let e=!B;w(b,e),C===null&&V(e)}let G={height:B?H??`auto`:`0px`},K=a(E);return o(`Accordion`,[E]),h(`div`,{...P,id:b||void 0,className:d(t.accordion,K.className,g[T],D&&t.accordionJoined,A,M?.root),style:{...K.style,...j,...N?.root},children:[!k&&h(`div`,{className:d(t.accordionHeader,M?.header),style:N?.header,onClick:W,role:`button`,tabIndex:0,id:I,"aria-expanded":B,"aria-controls":L,onKeyDown:e=>{if(_.has(e.key)&&e.target===e.currentTarget){e.preventDefault(),y(e.currentTarget,e.key);return}r(e)&&(e.preventDefault(),W())},children:[m(`div`,{className:d(t.accordionTitle,M?.title),style:N?.title,children:x}),m(f,{icon:p,className:d(t.accordionIcon,B&&t.accordionIconActive,M?.icon),style:N?.icon})]}),m(`div`,{ref:R,id:L,role:`region`,"aria-labelledby":k?void 0:I,className:d(t.accordionBody,M?.body),style:{...G,...N?.body},children:m(`div`,{className:d(t.accordionBodyInner,M?.bodyInner),style:N?.bodyInner,ref:z,children:S})})]})}export{b as default};
2
2
  //# sourceMappingURL=accordion.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.mjs","names":[],"sources":["../../../../package/common/accordion/accordion.tsx"],"sourcesContent":["import React, { useState, useEffect, useId, useRef, type ReactElement } from 'react';\nimport cx from 'classnames';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faChevronDown as arrowIcon } from '@fortawesome/free-solid-svg-icons';\n\nimport { AccordionStyleType, type AccordionProps } from './accordion.types';\n\nimport defaultStyles from './accordion.module.pcss';\nimport primaryStyles from './accordion.primary.module.pcss';\nimport plainStyles from './accordion.plain.module.pcss';\nimport { useComponentDefaults } from '../configProvider';\nimport { isSelfActivation } from '../utils/activationKey';\n\nconst STYLES_BY_TYPE: Record<AccordionStyleType, typeof defaultStyles> = {\n [AccordionStyleType.Default]: defaultStyles,\n [AccordionStyleType.Primary]: primaryStyles,\n [AccordionStyleType.Plain]: plainStyles,\n};\n\nfunction Accordion(props: AccordionProps): ReactElement {\n const {\n id = '',\n title = '',\n children = null,\n expanded = null,\n onHeaderClicked = () => {},\n styleType = AccordionStyleType.Default,\n startOpen = false,\n hideHeader = false,\n className,\n style,\n classNames,\n styles: slotStyles,\n ...rest\n } = useComponentDefaults('Accordion', props);\n const s = STYLES_BY_TYPE[styleType];\n // The header and the body name each other through aria-controls/aria-labelledby, so both need\n // an id that is stable across renders and unique even with several accordions on the page.\n const generatedId = useId();\n const headerId = `${generatedId}-header`;\n const bodyId = `${generatedId}-body`;\n const bodyRef = useRef<HTMLDivElement>(null);\n const bodyInnerRef = useRef<HTMLDivElement>(null);\n\n const [isExpanded, setIsExpanded] = useState(expanded ?? startOpen);\n const [bodyHeight, setBodyHeight] = useState<number | null>(null);\n\n useEffect(() => {\n // eslint-disable-next-line react-hooks/set-state-in-effect\n if (expanded !== null) setIsExpanded(expanded);\n }, [expanded]);\n\n useEffect(() => {\n const el = bodyRef.current;\n if (el) el.inert = !isExpanded;\n }, [isExpanded]);\n\n useEffect(() => {\n const el = bodyInnerRef.current;\n if (!el) return;\n const observer = new ResizeObserver(() => setBodyHeight(el.offsetHeight));\n observer.observe(el);\n return () => observer.unobserve(el);\n }, []);\n\n function toggleExpanded() {\n const next = !isExpanded;\n onHeaderClicked(id, next);\n if (expanded === null) setIsExpanded(next);\n }\n\n const bodyStyle = { height: isExpanded ? (bodyHeight ?? 'auto') : '0px' };\n\n return (\n <div\n {...rest}\n id={id || undefined}\n className={cx(s.accordion, isExpanded && s.accordionActive, className, classNames?.root)}\n style={{ ...style, ...slotStyles?.root }}\n >\n {!hideHeader && (\n <div\n className={cx(s.accordionHeader, isExpanded && s.accordionHeaderActive, classNames?.header)}\n style={slotStyles?.header}\n onClick={toggleExpanded}\n role='button'\n tabIndex={0}\n id={headerId}\n aria-expanded={isExpanded}\n aria-controls={bodyId}\n onKeyDown={(event) => {\n if (!isSelfActivation(event)) return;\n // Space scrolls the page otherwise, which is what a real <button> suppresses too.\n event.preventDefault();\n toggleExpanded();\n }}\n >\n <div className={cx(s.accordionTitle, classNames?.title)} style={slotStyles?.title}>\n {title}\n </div>\n <FontAwesomeIcon\n icon={arrowIcon}\n className={cx(s.accordionIcon, isExpanded && s.accordionIconActive, classNames?.icon)}\n style={slotStyles?.icon as React.CSSProperties & Record<`--fa-font-${string}`, string>}\n />\n </div>\n )}\n <div\n ref={bodyRef}\n id={bodyId}\n role='region'\n aria-labelledby={hideHeader ? undefined : headerId}\n className={cx(s.accordionBody, isExpanded && s.accordionBodyActive, classNames?.body)}\n style={{ ...bodyStyle, ...slotStyles?.body }}\n >\n <div\n className={cx(s.accordionBodyInner, classNames?.bodyInner)}\n style={slotStyles?.bodyInner}\n ref={bodyInnerRef}\n >\n {children}\n </div>\n </div>\n </div>\n );\n}\n\nexport default Accordion;\n"],"mappings":"8mBAaA,IAAM,EAAmE,EACtE,EAAmB,SAAU,GAC7B,EAAmB,SAAU,GAC7B,EAAmB,OAAQ,CAC9B,EAEA,SAAS,EAAU,EAAqC,CACtD,GAAM,CACJ,KAAK,GACL,QAAQ,GACR,WAAW,KACX,WAAW,KACX,sBAAwB,CAAC,EACzB,YAAY,EAAmB,QAC/B,YAAY,GACZ,aAAa,GACb,YACA,QACA,aACA,OAAQ,EACR,GAAG,GACD,EAAqB,YAAa,CAAK,EACrC,EAAI,EAAe,GAGnB,EAAc,EAAM,EACpB,EAAW,GAAG,EAAY,SAC1B,EAAS,GAAG,EAAY,OACxB,EAAU,EAAuB,IAAI,EACrC,EAAe,EAAuB,IAAI,EAE1C,CAAC,EAAY,GAAiB,EAAS,GAAY,CAAS,EAC5D,CAAC,EAAY,GAAiB,EAAwB,IAAI,EAEhE,MAAgB,CAEV,IAAa,MAAM,EAAc,CAAQ,CAC/C,EAAG,CAAC,CAAQ,CAAC,EAEb,MAAgB,CACd,IAAM,EAAK,EAAQ,QACf,IAAI,EAAG,MAAQ,CAAC,EACtB,EAAG,CAAC,CAAU,CAAC,EAEf,MAAgB,CACd,IAAM,EAAK,EAAa,QACxB,GAAI,CAAC,EAAI,OACT,IAAM,EAAW,IAAI,mBAAqB,EAAc,EAAG,YAAY,CAAC,EAExE,OADA,EAAS,QAAQ,CAAE,MACN,EAAS,UAAU,CAAE,CACpC,EAAG,CAAC,CAAC,EAEL,SAAS,GAAiB,CACxB,IAAM,EAAO,CAAC,EACd,EAAgB,EAAI,CAAI,EACpB,IAAa,MAAM,EAAc,CAAI,CAC3C,CAEA,IAAM,EAAY,CAAE,OAAQ,EAAc,GAAc,OAAU,KAAM,EAExE,OACE,EAAC,MAAD,CACE,GAAI,EACJ,GAAI,GAAM,IAAA,GACV,UAAW,EAAG,EAAE,UAAW,GAAc,EAAE,gBAAiB,EAAW,GAAY,IAAI,EACvF,MAAO,CAAE,GAAG,EAAO,GAAG,GAAY,IAAK,EAJzC,SAAA,CAMG,CAAC,GACA,EAAC,MAAD,CACE,UAAW,EAAG,EAAE,gBAAiB,GAAc,EAAE,sBAAuB,GAAY,MAAM,EAC1F,MAAO,GAAY,OACnB,QAAS,EACT,KAAK,SACL,SAAU,EACV,GAAI,EACJ,gBAAe,EACf,gBAAe,EACf,UAAY,GAAU,CACf,EAAiB,CAAK,IAE3B,EAAM,eAAe,EACrB,EAAe,EACjB,EAdF,SAAA,CAgBE,EAAC,MAAD,CAAK,UAAW,EAAG,EAAE,eAAgB,GAAY,KAAK,EAAG,MAAO,GAAY,MACzE,SAAA,CACE,CAAA,EACL,EAAC,EAAD,CACE,KAAM,EACN,UAAW,EAAG,EAAE,cAAe,GAAc,EAAE,oBAAqB,GAAY,IAAI,EACpF,MAAO,GAAY,IACpB,CAAA,CACE,CAEP,CAAA,EAAA,EAAC,MAAD,CACE,IAAK,EACL,GAAI,EACJ,KAAK,SACL,kBAAiB,EAAa,IAAA,GAAY,EAC1C,UAAW,EAAG,EAAE,cAAe,GAAc,EAAE,oBAAqB,GAAY,IAAI,EACpF,MAAO,CAAE,GAAG,EAAW,GAAG,GAAY,IAAK,EAE3C,SAAA,EAAC,MAAD,CACE,UAAW,EAAG,EAAE,mBAAoB,GAAY,SAAS,EACzD,MAAO,GAAY,UACnB,IAAK,EAEJ,UACE,CAAA,CACF,CAAA,CACF,GAET"}
1
+ {"version":3,"file":"accordion.mjs","names":[],"sources":["../../../../package/common/accordion/accordion.tsx"],"sourcesContent":["import React, { useState, useEffect, useId, useRef, type ReactElement } from 'react';\nimport cx from 'classnames';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faChevronDown as arrowIcon } from '@fortawesome/free-solid-svg-icons';\n\nimport { AccordionStyleType, type AccordionProps } from './accordion.types';\n\nimport s from './accordion.module.pcss';\nimport { useComponentDefaults } from '../configProvider';\nimport { isSelfActivation } from '../utils/activationKey';\nimport { ThemeColor } from '../themeProvider/color.types';\nimport { toneProps, useToneCheck } from '../styles/tone';\n\nconst CLASS_BY_STYLE: Record<AccordionStyleType, string> = {\n [AccordionStyleType.Light]: s.accordionStyleLight,\n [AccordionStyleType.Outlined]: s.accordionStyleOutlined,\n [AccordionStyleType.Plain]: s.accordionStylePlain,\n};\n\nconst NAVIGATION_KEYS = new Set(['ArrowDown', 'ArrowUp', 'Home', 'End']);\n\n/** Same parent only, so a list nested in a body is a set of its own. */\nfunction siblingHeaders(root: HTMLElement): HTMLElement[] {\n return [...(root.parentElement?.children ?? [])].flatMap((sibling) => {\n if (!sibling.classList.contains(s.accordion)) return [];\n const header = sibling.querySelector<HTMLElement>(':scope > [role=\"button\"][aria-expanded]');\n return header ? [header] : [];\n });\n}\n\nfunction focusSiblingHeader(header: HTMLElement, key: string) {\n const headers = header.parentElement ? siblingHeaders(header.parentElement) : [];\n const index = headers.indexOf(header);\n if (index < 0) return;\n const last = headers.length - 1;\n const next =\n key === 'Home'\n ? 0\n : key === 'End'\n ? last\n : key === 'ArrowDown'\n ? (index + 1) % headers.length\n : (index - 1 + headers.length) % headers.length;\n headers[next].focus();\n}\n\nfunction Accordion(props: AccordionProps): ReactElement {\n const {\n id = '',\n title = '',\n children = null,\n expanded = null,\n onHeaderClicked = () => {},\n styleType = AccordionStyleType.Outlined,\n color = ThemeColor.Neutral,\n joined = false,\n startOpen = false,\n hideHeader = false,\n className,\n style,\n classNames,\n styles: slotStyles,\n ...rest\n } = useComponentDefaults('Accordion', props);\n // The header and the body name each other through aria-controls/aria-labelledby, so both need\n // an id that is stable across renders and unique even with several accordions on the page.\n const generatedId = useId();\n const headerId = `${generatedId}-header`;\n const bodyId = `${generatedId}-body`;\n const bodyRef = useRef<HTMLDivElement>(null);\n const bodyInnerRef = useRef<HTMLDivElement>(null);\n\n const [isExpanded, setIsExpanded] = useState(expanded ?? startOpen);\n const [bodyHeight, setBodyHeight] = useState<number | null>(null);\n\n useEffect(() => {\n // eslint-disable-next-line react-hooks/set-state-in-effect\n if (expanded !== null) setIsExpanded(expanded);\n }, [expanded]);\n\n useEffect(() => {\n const el = bodyRef.current;\n if (el) el.inert = !isExpanded;\n }, [isExpanded]);\n\n useEffect(() => {\n const el = bodyInnerRef.current;\n if (!el) return;\n const observer = new ResizeObserver(() => setBodyHeight(el.offsetHeight));\n observer.observe(el);\n return () => observer.unobserve(el);\n }, []);\n\n function toggleExpanded() {\n const next = !isExpanded;\n onHeaderClicked(id, next);\n if (expanded === null) setIsExpanded(next);\n }\n\n const bodyStyle = { height: isExpanded ? (bodyHeight ?? 'auto') : '0px' };\n const tone = toneProps(color);\n useToneCheck('Accordion', [color]);\n\n return (\n <div\n {...rest}\n id={id || undefined}\n className={cx(\n s.accordion,\n tone.className,\n CLASS_BY_STYLE[styleType],\n joined && s.accordionJoined,\n className,\n classNames?.root,\n )}\n style={{ ...tone.style, ...style, ...slotStyles?.root }}\n >\n {!hideHeader && (\n <div\n className={cx(s.accordionHeader, classNames?.header)}\n style={slotStyles?.header}\n onClick={toggleExpanded}\n role='button'\n tabIndex={0}\n id={headerId}\n aria-expanded={isExpanded}\n aria-controls={bodyId}\n onKeyDown={(event) => {\n if (NAVIGATION_KEYS.has(event.key) && event.target === event.currentTarget) {\n event.preventDefault();\n focusSiblingHeader(event.currentTarget, event.key);\n return;\n }\n if (!isSelfActivation(event)) return;\n // Space scrolls the page otherwise, which is what a real <button> suppresses too.\n event.preventDefault();\n toggleExpanded();\n }}\n >\n <div className={cx(s.accordionTitle, classNames?.title)} style={slotStyles?.title}>\n {title}\n </div>\n <FontAwesomeIcon\n icon={arrowIcon}\n className={cx(s.accordionIcon, isExpanded && s.accordionIconActive, classNames?.icon)}\n style={slotStyles?.icon as React.CSSProperties & Record<`--fa-font-${string}`, string>}\n />\n </div>\n )}\n <div\n ref={bodyRef}\n id={bodyId}\n role='region'\n aria-labelledby={hideHeader ? undefined : headerId}\n className={cx(s.accordionBody, classNames?.body)}\n style={{ ...bodyStyle, ...slotStyles?.body }}\n >\n <div\n className={cx(s.accordionBodyInner, classNames?.bodyInner)}\n style={slotStyles?.bodyInner}\n ref={bodyInnerRef}\n >\n {children}\n </div>\n </div>\n </div>\n );\n}\n\nexport default Accordion;\n"],"mappings":"mpBAaA,IAAM,EAAqD,EACxD,EAAmB,OAAQ,EAAE,qBAC7B,EAAmB,UAAW,EAAE,wBAChC,EAAmB,OAAQ,EAAE,mBAChC,EAEM,EAAkB,IAAI,IAAI,CAAC,YAAa,UAAW,OAAQ,KAAK,CAAC,EAGvE,SAAS,EAAe,EAAkC,CACxD,MAAO,CAAC,GAAI,EAAK,eAAe,UAAY,CAAC,CAAE,CAAC,CAAC,QAAS,GAAY,CACpE,GAAI,CAAC,EAAQ,UAAU,SAAS,EAAE,SAAS,EAAG,MAAO,CAAC,EACtD,IAAM,EAAS,EAAQ,cAA2B,yCAAyC,EAC3F,OAAO,EAAS,CAAC,CAAM,EAAI,CAAC,CAC9B,CAAC,CACH,CAEA,SAAS,EAAmB,EAAqB,EAAa,CAC5D,IAAM,EAAU,EAAO,cAAgB,EAAe,EAAO,aAAa,EAAI,CAAC,EACzE,EAAQ,EAAQ,QAAQ,CAAM,EACpC,GAAI,EAAQ,EAAG,OACf,IAAM,EAAO,EAAQ,OAAS,EAS9B,EAPE,IAAQ,OACJ,EACA,IAAQ,MACN,EACA,IAAQ,aACL,EAAQ,GAAK,EAAQ,QACrB,EAAQ,EAAI,EAAQ,QAAU,EAAQ,OACpC,CAAC,MAAM,CACtB,CAEA,SAAS,EAAU,EAAqC,CACtD,GAAM,CACJ,KAAK,GACL,QAAQ,GACR,WAAW,KACX,WAAW,KACX,sBAAwB,CAAC,EACzB,YAAY,EAAmB,SAC/B,QAAQ,EAAW,QACnB,SAAS,GACT,YAAY,GACZ,aAAa,GACb,YACA,QACA,aACA,OAAQ,EACR,GAAG,GACD,EAAqB,YAAa,CAAK,EAGrC,EAAc,EAAM,EACpB,EAAW,GAAG,EAAY,SAC1B,EAAS,GAAG,EAAY,OACxB,EAAU,EAAuB,IAAI,EACrC,EAAe,EAAuB,IAAI,EAE1C,CAAC,EAAY,GAAiB,EAAS,GAAY,CAAS,EAC5D,CAAC,EAAY,GAAiB,EAAwB,IAAI,EAEhE,MAAgB,CAEV,IAAa,MAAM,EAAc,CAAQ,CAC/C,EAAG,CAAC,CAAQ,CAAC,EAEb,MAAgB,CACd,IAAM,EAAK,EAAQ,QACf,IAAI,EAAG,MAAQ,CAAC,EACtB,EAAG,CAAC,CAAU,CAAC,EAEf,MAAgB,CACd,IAAM,EAAK,EAAa,QACxB,GAAI,CAAC,EAAI,OACT,IAAM,EAAW,IAAI,mBAAqB,EAAc,EAAG,YAAY,CAAC,EAExE,OADA,EAAS,QAAQ,CAAE,MACN,EAAS,UAAU,CAAE,CACpC,EAAG,CAAC,CAAC,EAEL,SAAS,GAAiB,CACxB,IAAM,EAAO,CAAC,EACd,EAAgB,EAAI,CAAI,EACpB,IAAa,MAAM,EAAc,CAAI,CAC3C,CAEA,IAAM,EAAY,CAAE,OAAQ,EAAc,GAAc,OAAU,KAAM,EAClE,EAAO,EAAU,CAAK,EAG5B,OAFA,EAAa,YAAa,CAAC,CAAK,CAAC,EAG/B,EAAC,MAAD,CACE,GAAI,EACJ,GAAI,GAAM,IAAA,GACV,UAAW,EACT,EAAE,UACF,EAAK,UACL,EAAe,GACf,GAAU,EAAE,gBACZ,EACA,GAAY,IACd,EACA,MAAO,CAAE,GAAG,EAAK,MAAO,GAAG,EAAO,GAAG,GAAY,IAAK,EAXxD,SAAA,CAaG,CAAC,GACA,EAAC,MAAD,CACE,UAAW,EAAG,EAAE,gBAAiB,GAAY,MAAM,EACnD,MAAO,GAAY,OACnB,QAAS,EACT,KAAK,SACL,SAAU,EACV,GAAI,EACJ,gBAAe,EACf,gBAAe,EACf,UAAY,GAAU,CACpB,GAAI,EAAgB,IAAI,EAAM,GAAG,GAAK,EAAM,SAAW,EAAM,cAAe,CAC1E,EAAM,eAAe,EACrB,EAAmB,EAAM,cAAe,EAAM,GAAG,EACjD,MACF,CACK,EAAiB,CAAK,IAE3B,EAAM,eAAe,EACrB,EAAe,EACjB,EAnBF,SAAA,CAqBE,EAAC,MAAD,CAAK,UAAW,EAAG,EAAE,eAAgB,GAAY,KAAK,EAAG,MAAO,GAAY,MACzE,SAAA,CACE,CAAA,EACL,EAAC,EAAD,CACE,KAAM,EACN,UAAW,EAAG,EAAE,cAAe,GAAc,EAAE,oBAAqB,GAAY,IAAI,EACpF,MAAO,GAAY,IACpB,CAAA,CACE,CAEP,CAAA,EAAA,EAAC,MAAD,CACE,IAAK,EACL,GAAI,EACJ,KAAK,SACL,kBAAiB,EAAa,IAAA,GAAY,EAC1C,UAAW,EAAG,EAAE,cAAe,GAAY,IAAI,EAC/C,MAAO,CAAE,GAAG,EAAW,GAAG,GAAY,IAAK,EAE3C,SAAA,EAAC,MAAD,CACE,UAAW,EAAG,EAAE,mBAAoB,GAAY,SAAS,EACzD,MAAO,GAAY,UACnB,IAAK,EAEJ,UACE,CAAA,CACF,CAAA,CACF,GAET"}
@@ -1,2 +1,2 @@
1
- "use client";var e=`accordion_YZt8B`,t=`accordion-title_CGYKY`,n=`accordion-active_mocpj`,r=`accordion-header_OEjXM`,i=`accordion-header-active_6KvnM`,a=`accordion-body_2o-mY`,o=`accordion-body-inner_JI9nJ`,s=`accordion-body-active_sb2-U`,c=`accordion-icon_kLqp-`,l=`accordion-icon-active_lJwG8`,u={accordion:e,"accordion-title":`accordion-title_CGYKY`,accordionTitle:t,"accordion-active":`accordion-active_mocpj`,accordionActive:n,"accordion-header":`accordion-header_OEjXM`,accordionHeader:r,"accordion-header-active":`accordion-header-active_6KvnM`,accordionHeaderActive:i,"accordion-body":`accordion-body_2o-mY`,accordionBody:a,"accordion-body-inner":`accordion-body-inner_JI9nJ`,accordionBodyInner:o,"accordion-body-active":`accordion-body-active_sb2-U`,accordionBodyActive:s,"accordion-icon":`accordion-icon_kLqp-`,accordionIcon:c,"accordion-icon-active":`accordion-icon-active_lJwG8`,accordionIconActive:l};export{e as accordion,n as accordionActive,a as accordionBody,s as accordionBodyActive,o as accordionBodyInner,r as accordionHeader,i as accordionHeaderActive,c as accordionIcon,l as accordionIconActive,t as accordionTitle,u as default};
1
+ "use client";var e=`accordion_YZt8B`,t=`accordion-header_OEjXM`,n=`accordion-title_CGYKY`,r=`accordion-icon_kLqp-`,i=`accordion-icon-active_lJwG8`,a=`accordion-body_2o-mY`,o=`accordion-body-inner_JI9nJ`,s=`accordion-style-light_YY5Zn`,c=`accordion-style-outlined_XEtCe`,l=`accordion-style-plain_N2Diz`,u=`accordion-joined_hlHQx`,d={accordion:e,"accordion-header":`accordion-header_OEjXM`,accordionHeader:t,"accordion-title":`accordion-title_CGYKY`,accordionTitle:n,"accordion-icon":`accordion-icon_kLqp-`,accordionIcon:r,"accordion-icon-active":`accordion-icon-active_lJwG8`,accordionIconActive:i,"accordion-body":`accordion-body_2o-mY`,accordionBody:a,"accordion-body-inner":`accordion-body-inner_JI9nJ`,accordionBodyInner:o,"accordion-style-light":`accordion-style-light_YY5Zn`,accordionStyleLight:s,"accordion-style-outlined":`accordion-style-outlined_XEtCe`,accordionStyleOutlined:c,"accordion-style-plain":`accordion-style-plain_N2Diz`,accordionStylePlain:l,"accordion-joined":`accordion-joined_hlHQx`,accordionJoined:u};export{e as accordion,a as accordionBody,o as accordionBodyInner,t as accordionHeader,r as accordionIcon,i as accordionIconActive,u as accordionJoined,s as accordionStyleLight,c as accordionStyleOutlined,l as accordionStylePlain,n as accordionTitle,d as default};
2
2
  //# sourceMappingURL=accordion.module.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.module.mjs","names":[],"sources":["../../../../package/common/accordion/accordion.module.pcss"],"sourcesContent":[".accordion {\n transition: margin 0.2s;\n margin: -1px;\n color: var(--text-color);\n\n &-title {\n width: 100%;\n }\n\n &-active {\n margin: 0.625em 0;\n }\n\n &-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n /* There is no fixed height any more: the header is this padding plus the title's line. */\n padding: 0.75em 1em;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n background: var(--background);\n border-radius: var(--default-border-radius);\n border: 1px solid var(--border-color);\n\n /* The rest of the accordion measures from the header, so the base is set here. */\n font-size: var(--default-font-size);\n font-weight: 400;\n transition: all 0.2s;\n\n &-active {\n border: 1px solid var(--primary-color);\n background: var(--background-accent);\n border-radius: var(--default-border-radius) var(--default-border-radius) 0 0;\n }\n }\n\n &-body {\n overflow: hidden;\n transition: all 0.2s ease;\n position: relative;\n border-radius: 0 0 var(--default-border-radius) var(--default-border-radius);\n border: 1px solid var(--border-color);\n border-top: none;\n border-bottom: none;\n\n &-inner {\n padding: 1em;\n }\n\n &-active {\n border: 1px solid var(--primary-color);\n border-top: none;\n }\n }\n\n &-icon {\n transition: transform 0.2s;\n transform: rotate(0deg);\n flex-shrink: 0;\n width: 1em;\n height: 1em;\n color: var(--border-color);\n\n &-active {\n transform: rotate(180deg);\n }\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .accordion,\n .accordion-header,\n .accordion-body,\n .accordion-icon {\n transition: none;\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"accordion.module.mjs","names":[],"sources":["../../../../package/common/accordion/accordion.module.pcss"],"sourcesContent":[".accordion {\n color: var(--text-color);\n\n /* Clips the header's fill and hover layer to the corners; the body clips anyway, for its height\n transition. */\n overflow: hidden;\n\n /* Positioned, so a joined section paints over the one above, whose positioned header would\n otherwise cover the seam where WebKit draws it thinner than the 1px overlap. */\n position: relative;\n\n &-header {\n position: relative;\n display: flex;\n align-items: center;\n gap: 0.75em;\n padding: 0.75em 1em;\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n\n /* The rest of the accordion measures from the header, so the base is set here. */\n font-size: var(--default-font-size);\n\n /* A layer in currentcolor, so it shows on a fill as on nothing: a Light header already uses\n the background. */\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n background: currentcolor;\n opacity: 0;\n transition: opacity 0.15s;\n pointer-events: none;\n }\n\n /* (hover: hover) because on touch a tap latches :hover until the next tap elsewhere. */\n @media (hover: hover) {\n &:hover::before {\n opacity: 0.06;\n }\n }\n\n &:focus-visible {\n outline: 2px solid var(--focus-border-color, var(--primary-color));\n outline-offset: -2px;\n }\n }\n\n /* Positioned, so they paint above the hover layer, which is positioned too and comes first. */\n &-title {\n position: relative;\n flex: 1;\n min-width: 0;\n }\n\n &-icon {\n position: relative;\n flex-shrink: 0;\n width: 1em;\n height: 1em;\n transition: transform 0.2s;\n\n &-active {\n transform: rotate(180deg);\n }\n }\n\n &-body {\n overflow: hidden;\n position: relative;\n transition: height 0.2s ease;\n\n &-inner {\n padding: 1em;\n }\n }\n\n /* --accordion-seam is the line a joined section draws where it meets the one above. */\n &-style {\n &-light {\n /* The page colour: the border is the tint itself, so a seam in it would merge two tinted\n headers into one block. */\n --accordion-seam: var(--background);\n\n border: 1px solid var(--tone-light);\n border-radius: var(--default-border-radius);\n }\n\n &-outlined {\n --accordion-seam: var(--tone-outline);\n\n border: 1px solid var(--tone-outline);\n border-radius: var(--default-border-radius);\n }\n }\n\n &-style-light &-header {\n background: var(--tone-light);\n color: var(--tone-text);\n }\n\n &-style-outlined &-header,\n &-style-plain &-header {\n color: var(--tone-text);\n }\n\n /* Plain sits inside other content: no padding, so no hover layer, and the focus ring goes\n outside the text rather than over it. */\n &-style-plain &-header {\n padding: 0;\n\n &::before {\n display: none;\n }\n\n &:focus-visible {\n outline-offset: 2px;\n }\n }\n\n &-style-plain &-body-inner {\n padding: 0.375em 0 0;\n }\n\n & + & {\n margin-top: 0.5em;\n }\n\n /* Each joined section overlaps the one above by its 1px border, and that one hides (not removes)\n its bottom border: a 1px gap or two borders snap to different device pixels at fractional zoom.\n Ties `& + &` on specificity, so it stays after it. Firefox before 121 lacks :has(). */\n &-joined + &-joined {\n margin-top: -1px;\n border-top-color: var(--accordion-seam);\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n\n &-style-plain&-joined + &-style-plain&-joined {\n margin-top: 0;\n }\n\n &-joined:has(+ &-joined) {\n border-bottom-color: transparent;\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .accordion-body,\n .accordion-icon {\n transition: none;\n }\n}\n"],"mappings":""}
@@ -1,2 +1,2 @@
1
- "use client";var e=function(e){return e.Default=`default`,e.Primary=`primary`,e.Plain=`plain`,e}({});export{e as AccordionStyleType};
1
+ "use client";var e=function(e){return e.Light=`light`,e.Outlined=`outlined`,e.Plain=`plain`,e}({});export{e as AccordionStyleType};
2
2
  //# sourceMappingURL=accordion.types.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.types.mjs","names":[],"sources":["../../../../package/common/accordion/accordion.types.ts"],"sourcesContent":["import type { CSSProperties, ReactNode } from 'react';\nimport type { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types';\n\nexport enum AccordionStyleType {\n Default = 'default',\n Primary = 'primary',\n Plain = 'plain',\n}\n\nexport type AccordionSlots = 'root' | 'header' | 'title' | 'icon' | 'body' | 'bodyInner';\n\nexport interface AccordionProps extends HtmlProps {\n title?: string;\n children?: ReactNode;\n expanded?: boolean | null;\n onHeaderClicked?: (id: string, isExpanded: boolean) => void;\n styleType?: AccordionStyleType;\n startOpen?: boolean;\n hideHeader?: boolean;\n className?: string;\n style?: CSSProperties;\n classNames?: SlotClassNames<AccordionSlots>;\n styles?: SlotStyles<AccordionSlots>;\n}\n"],"mappings":"aAGA,IAAY,EAAL,SAAA,EAAA,OACL,GAAA,QAAA,UACA,EAAA,QAAA,UACA,EAAA,MAAA,SACF,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"accordion.types.mjs","names":[],"sources":["../../../../package/common/accordion/accordion.types.ts"],"sourcesContent":["import type { CSSProperties, ReactNode } from 'react';\nimport type { SlotClassNames, SlotStyles, HtmlProps } from '../types/slots.types';\nimport type { ColorValue } from '../themeProvider/color.types';\n\n/**\n * How much the header stands out, as on Button, Badge and Chip. No `Filled`: a section of content\n * should not compete with the page's main action.\n */\nexport enum AccordionStyleType {\n /** The header in a light tint of the colour, its text in the colour. */\n Light = 'light',\n /** A border in the colour, the header's text in the colour. The default. */\n Outlined = 'outlined',\n /** The header's text in the colour, no chrome and no padding, for a disclosure inside other content. */\n Plain = 'plain',\n}\n\nexport type AccordionSlots = 'root' | 'header' | 'title' | 'icon' | 'body' | 'bodyInner';\n\nexport interface AccordionProps extends HtmlProps {\n title?: string;\n children?: ReactNode;\n expanded?: boolean | null;\n onHeaderClicked?: (id: string, isExpanded: boolean) => void;\n styleType?: AccordionStyleType;\n /** A `ThemeColor` (default `Neutral`) or any CSS colour. */\n color?: ColorValue;\n /**\n * Joins this accordion to the joined ones beside it into one block; otherwise neighbours keep a\n * small gap. Default `false`.\n */\n joined?: boolean;\n startOpen?: boolean;\n hideHeader?: boolean;\n className?: string;\n style?: CSSProperties;\n classNames?: SlotClassNames<AccordionSlots>;\n styles?: SlotStyles<AccordionSlots>;\n}\n"],"mappings":"aAQA,IAAY,EAAL,SAAA,EAAA,OAEL,GAAA,MAAA,QAEA,EAAA,SAAA,WAEA,EAAA,MAAA,SACF,EAAA,CAAA,CAAA"}
@@ -1,2 +1,2 @@
1
- "use client";import{useComponentDefaults as e}from"../configProvider/useComponentDefaults.mjs";import{useLabels as t}from"../configProvider/useLabels.mjs";import n from"./actionButtons.module.mjs";import{ButtonStyleType as r,ButtonType as i}from"../button/button.types.mjs";import a from"../button/button.mjs";import o from"classnames";import{jsx as s,jsxs as c}from"react/jsx-runtime";var l={submit:`Save`,cancel:`Cancel`};function u(u){let{onSubmit:d=()=>null,onClose:f=()=>null,labels:p,submitButtonStyle:m=r.Primary,isSubmitButtonLoading:h=!1,isSubmitButtonDisabled:g=!1,submitButtonIcon:_=void 0,cancelButtonStyle:v=r.Default,isCancelButtonLoading:y=!1,isCancelButtonDisabled:b=!1,cancelButtonIcon:x=void 0,hidePrimaryButton:S=!1,hideSecondaryButton:C=!1,noMargin:w=!1,stackButtons:T=!1,className:E,style:D,classNames:O,styles:k,...A}=e(`ActionButtons`,u),j=t(`ActionButtons`,p,l);return c(`div`,{...A,className:o(n.actionButtons,!w&&n.actionButtonsMargin,T&&n.actionButtonsStacked,E,O?.root),style:{...D,...k?.root},children:[!S&&s(a,{isLoading:h,disabled:g,styleType:m,type:i.Submit,onClick:d,className:O?.submitButton,style:k?.submitButton,icon:_,children:j.submit}),!C&&s(a,{isLoading:y,disabled:b,onClick:f,styleType:v,className:O?.cancelButton,style:k?.cancelButton,icon:x,children:j.cancel})]})}export{u as default};
1
+ "use client";import{useComponentDefaults as e}from"../configProvider/useComponentDefaults.mjs";import{useLabels as t}from"../configProvider/useLabels.mjs";import{ThemeColor as n}from"../themeProvider/color.types.mjs";import r from"./actionButtons.module.mjs";import{ButtonStyleType as i,ButtonType as a}from"../button/button.types.mjs";import o from"../button/button.mjs";import s from"classnames";import{jsx as c,jsxs as l}from"react/jsx-runtime";var u={submit:`Save`,cancel:`Cancel`};function d(d){let{onSubmit:f=()=>null,onClose:p=()=>null,labels:m,submitButtonStyle:h=i.Filled,submitButtonColor:g=n.Primary,isSubmitButtonLoading:_=!1,isSubmitButtonDisabled:v=!1,submitButtonIcon:y=void 0,cancelButtonStyle:b=i.Outlined,cancelButtonColor:x=n.Primary,isCancelButtonLoading:S=!1,isCancelButtonDisabled:C=!1,cancelButtonIcon:w=void 0,hidePrimaryButton:T=!1,hideSecondaryButton:E=!1,noMargin:D=!1,stackButtons:O=!1,className:k,style:A,classNames:j,styles:M,...N}=e(`ActionButtons`,d),P=t(`ActionButtons`,m,u);return l(`div`,{...N,className:s(r.actionButtons,!D&&r.actionButtonsMargin,O&&r.actionButtonsStacked,k,j?.root),style:{...A,...M?.root},children:[!T&&c(o,{isLoading:_,disabled:v,styleType:h,color:g,type:a.Submit,onClick:f,className:j?.submitButton,style:M?.submitButton,icon:y,children:P.submit}),!E&&c(o,{isLoading:S,disabled:C,onClick:p,styleType:b,color:x,className:j?.cancelButton,style:M?.cancelButton,icon:w,children:P.cancel})]})}export{d as default};
2
2
  //# sourceMappingURL=actionButtons.mjs.map