@openwarelabs/blocks 0.9.0 → 0.10.1

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 (291) hide show
  1. package/README.md +36 -10
  2. package/dist/app-shells/Shell01/Shell01.d.cts +6 -0
  3. package/dist/app-shells/Shell01/Shell01.d.ts +6 -0
  4. package/dist/app-shells/Shell01/Shell01.types.d.cts +48 -0
  5. package/dist/app-shells/Shell01/Shell01.types.d.ts +48 -0
  6. package/dist/app-shells/Shell02/Shell02.d.cts +7 -0
  7. package/dist/app-shells/Shell02/Shell02.d.ts +7 -0
  8. package/dist/app-shells/Shell02/Shell02.types.d.cts +50 -0
  9. package/dist/app-shells/Shell02/Shell02.types.d.ts +50 -0
  10. package/dist/app-shells/Shell03/Shell03.d.cts +6 -0
  11. package/dist/app-shells/Shell03/Shell03.d.ts +6 -0
  12. package/dist/app-shells/Shell03/Shell03.types.d.cts +73 -0
  13. package/dist/app-shells/Shell03/Shell03.types.d.ts +73 -0
  14. package/dist/app-shells/Shell04/Shell04.d.cts +6 -0
  15. package/dist/app-shells/Shell04/Shell04.d.ts +6 -0
  16. package/dist/app-shells/Shell04/Shell04.types.d.cts +68 -0
  17. package/dist/app-shells/Shell04/Shell04.types.d.ts +68 -0
  18. package/dist/blog/Blog01/Blog01.d.cts +3 -0
  19. package/dist/blog/Blog01/Blog01.d.ts +3 -0
  20. package/dist/blog/Blog01/Blog01.types.d.cts +55 -0
  21. package/dist/blog/Blog01/Blog01.types.d.ts +55 -0
  22. package/dist/blog/Blog02/Blog02.d.cts +3 -0
  23. package/dist/blog/Blog02/Blog02.d.ts +3 -0
  24. package/dist/blog/Blog02/Blog02.types.d.cts +51 -0
  25. package/dist/blog/Blog02/Blog02.types.d.ts +51 -0
  26. package/dist/blog/Blog03/Blog03.d.cts +3 -0
  27. package/dist/blog/Blog03/Blog03.d.ts +3 -0
  28. package/dist/blog/Blog03/Blog03.types.d.cts +66 -0
  29. package/dist/blog/Blog03/Blog03.types.d.ts +66 -0
  30. package/dist/blog/Blog04/Blog04.d.cts +3 -0
  31. package/dist/blog/Blog04/Blog04.d.ts +3 -0
  32. package/dist/blog/Blog04/Blog04.types.d.cts +64 -0
  33. package/dist/blog/Blog04/Blog04.types.d.ts +64 -0
  34. package/dist/chat/Chat01/Chat01.d.cts +6 -0
  35. package/dist/chat/Chat01/Chat01.d.ts +6 -0
  36. package/dist/chat/Chat01/Chat01.types.d.cts +95 -0
  37. package/dist/chat/Chat01/Chat01.types.d.ts +95 -0
  38. package/dist/chat/Chat02/Chat02.d.cts +6 -0
  39. package/dist/chat/Chat02/Chat02.d.ts +6 -0
  40. package/dist/chat/Chat02/Chat02.types.d.cts +70 -0
  41. package/dist/chat/Chat02/Chat02.types.d.ts +70 -0
  42. package/dist/chat/Chat03/Chat03.d.cts +6 -0
  43. package/dist/chat/Chat03/Chat03.d.ts +6 -0
  44. package/dist/chat/Chat03/Chat03.types.d.cts +96 -0
  45. package/dist/chat/Chat03/Chat03.types.d.ts +96 -0
  46. package/dist/contact/Contact01/Contact01.d.cts +3 -0
  47. package/dist/contact/Contact01/Contact01.d.ts +3 -0
  48. package/dist/contact/Contact01/Contact01.types.d.cts +103 -0
  49. package/dist/contact/Contact01/Contact01.types.d.ts +103 -0
  50. package/dist/contact/Contact02/Contact02.d.cts +3 -0
  51. package/dist/contact/Contact02/Contact02.d.ts +3 -0
  52. package/dist/contact/Contact02/Contact02.types.d.cts +56 -0
  53. package/dist/contact/Contact02/Contact02.types.d.ts +56 -0
  54. package/dist/dashboards/Dashboard01/Dashboard01.d.cts +3 -0
  55. package/dist/dashboards/Dashboard01/Dashboard01.d.ts +3 -0
  56. package/dist/dashboards/Dashboard01/Dashboard01.types.d.cts +53 -0
  57. package/dist/dashboards/Dashboard01/Dashboard01.types.d.ts +53 -0
  58. package/dist/dashboards/Dashboard02/Dashboard02.d.cts +3 -0
  59. package/dist/dashboards/Dashboard02/Dashboard02.d.ts +3 -0
  60. package/dist/dashboards/Dashboard02/Dashboard02.types.d.cts +74 -0
  61. package/dist/dashboards/Dashboard02/Dashboard02.types.d.ts +74 -0
  62. package/dist/dashboards/Dashboard03/Dashboard03.d.cts +6 -0
  63. package/dist/dashboards/Dashboard03/Dashboard03.d.ts +6 -0
  64. package/dist/dashboards/Dashboard03/Dashboard03.types.d.cts +131 -0
  65. package/dist/dashboards/Dashboard03/Dashboard03.types.d.ts +131 -0
  66. package/dist/empty-states/Empty01/Empty01.d.cts +3 -0
  67. package/dist/empty-states/Empty01/Empty01.d.ts +3 -0
  68. package/dist/empty-states/Empty01/Empty01.types.d.cts +94 -0
  69. package/dist/empty-states/Empty01/Empty01.types.d.ts +94 -0
  70. package/dist/empty-states/Empty02/Empty02.d.cts +3 -0
  71. package/dist/empty-states/Empty02/Empty02.d.ts +3 -0
  72. package/dist/empty-states/Empty02/Empty02.types.d.cts +72 -0
  73. package/dist/empty-states/Empty02/Empty02.types.d.ts +72 -0
  74. package/dist/empty-states/Empty03/Empty03.d.cts +3 -0
  75. package/dist/empty-states/Empty03/Empty03.d.ts +3 -0
  76. package/dist/empty-states/Empty03/Empty03.types.d.cts +72 -0
  77. package/dist/empty-states/Empty03/Empty03.types.d.ts +72 -0
  78. package/dist/error-pages/ErrorPage01/ErrorPage01.d.cts +3 -0
  79. package/dist/error-pages/ErrorPage01/ErrorPage01.d.ts +3 -0
  80. package/dist/error-pages/ErrorPage01/ErrorPage01.types.d.cts +48 -0
  81. package/dist/error-pages/ErrorPage01/ErrorPage01.types.d.ts +48 -0
  82. package/dist/error-pages/ErrorPage02/ErrorPage02.d.cts +3 -0
  83. package/dist/error-pages/ErrorPage02/ErrorPage02.d.ts +3 -0
  84. package/dist/error-pages/ErrorPage02/ErrorPage02.types.d.cts +45 -0
  85. package/dist/error-pages/ErrorPage02/ErrorPage02.types.d.ts +45 -0
  86. package/dist/error-pages/ErrorPage03/ErrorPage03.d.cts +3 -0
  87. package/dist/error-pages/ErrorPage03/ErrorPage03.d.ts +3 -0
  88. package/dist/error-pages/ErrorPage03/ErrorPage03.types.d.cts +45 -0
  89. package/dist/error-pages/ErrorPage03/ErrorPage03.types.d.ts +45 -0
  90. package/dist/faq/Faq01/Faq01.d.cts +3 -0
  91. package/dist/faq/Faq01/Faq01.d.ts +3 -0
  92. package/dist/faq/Faq01/Faq01.types.d.cts +23 -0
  93. package/dist/faq/Faq01/Faq01.types.d.ts +23 -0
  94. package/dist/faq/Faq02/Faq02.d.cts +3 -0
  95. package/dist/faq/Faq02/Faq02.d.ts +3 -0
  96. package/dist/faq/Faq02/Faq02.types.d.cts +24 -0
  97. package/dist/faq/Faq02/Faq02.types.d.ts +24 -0
  98. package/dist/faq/Faq03/Faq03.d.cts +3 -0
  99. package/dist/faq/Faq03/Faq03.d.ts +3 -0
  100. package/dist/faq/Faq03/Faq03.types.d.cts +42 -0
  101. package/dist/faq/Faq03/Faq03.types.d.ts +42 -0
  102. package/dist/forms/Form01/Form01.d.cts +3 -0
  103. package/dist/forms/Form01/Form01.d.ts +3 -0
  104. package/dist/forms/Form01/Form01.types.d.cts +20 -0
  105. package/dist/forms/Form01/Form01.types.d.ts +20 -0
  106. package/dist/forms/Form02/Form02.d.cts +3 -0
  107. package/dist/forms/Form02/Form02.d.ts +3 -0
  108. package/dist/forms/Form02/Form02.types.d.cts +38 -0
  109. package/dist/forms/Form02/Form02.types.d.ts +38 -0
  110. package/dist/forms/Form03/Form03.d.cts +3 -0
  111. package/dist/forms/Form03/Form03.d.ts +3 -0
  112. package/dist/forms/Form03/Form03.types.d.cts +55 -0
  113. package/dist/forms/Form03/Form03.types.d.ts +55 -0
  114. package/dist/index.cjs +6190 -22
  115. package/dist/index.cjs.map +4 -4
  116. package/dist/index.d.cts +135 -1
  117. package/dist/index.d.ts +135 -1
  118. package/dist/index.js +6220 -19
  119. package/dist/index.js.map +4 -4
  120. package/dist/lists-and-tables/List01/List01.d.cts +6 -0
  121. package/dist/lists-and-tables/List01/List01.d.ts +6 -0
  122. package/dist/lists-and-tables/List01/List01.types.d.cts +60 -0
  123. package/dist/lists-and-tables/List01/List01.types.d.ts +60 -0
  124. package/dist/lists-and-tables/List02/List02.d.cts +3 -0
  125. package/dist/lists-and-tables/List02/List02.d.ts +3 -0
  126. package/dist/lists-and-tables/List02/List02.types.d.cts +54 -0
  127. package/dist/lists-and-tables/List02/List02.types.d.ts +54 -0
  128. package/dist/lists-and-tables/List03/List03.d.cts +3 -0
  129. package/dist/lists-and-tables/List03/List03.d.ts +3 -0
  130. package/dist/lists-and-tables/List03/List03.types.d.cts +41 -0
  131. package/dist/lists-and-tables/List03/List03.types.d.ts +41 -0
  132. package/dist/lists-and-tables/List04/List04.d.cts +3 -0
  133. package/dist/lists-and-tables/List04/List04.d.ts +3 -0
  134. package/dist/lists-and-tables/List04/List04.types.d.cts +67 -0
  135. package/dist/lists-and-tables/List04/List04.types.d.ts +67 -0
  136. package/dist/logo-clouds/Logos01/Logos01.d.cts +3 -0
  137. package/dist/logo-clouds/Logos01/Logos01.d.ts +3 -0
  138. package/dist/logo-clouds/Logos01/Logos01.types.d.cts +13 -0
  139. package/dist/logo-clouds/Logos01/Logos01.types.d.ts +13 -0
  140. package/dist/logo-clouds/Logos02/Logos02.d.cts +3 -0
  141. package/dist/logo-clouds/Logos02/Logos02.d.ts +3 -0
  142. package/dist/logo-clouds/Logos02/Logos02.types.d.cts +28 -0
  143. package/dist/logo-clouds/Logos02/Logos02.types.d.ts +28 -0
  144. package/dist/logo-clouds/Logos03/Logos03.d.cts +3 -0
  145. package/dist/logo-clouds/Logos03/Logos03.d.ts +3 -0
  146. package/dist/logo-clouds/Logos03/Logos03.types.d.cts +23 -0
  147. package/dist/logo-clouds/Logos03/Logos03.types.d.ts +23 -0
  148. package/dist/newsletter/Newsletter01/Newsletter01.d.cts +3 -0
  149. package/dist/newsletter/Newsletter01/Newsletter01.d.ts +3 -0
  150. package/dist/newsletter/Newsletter01/Newsletter01.types.d.cts +39 -0
  151. package/dist/newsletter/Newsletter01/Newsletter01.types.d.ts +39 -0
  152. package/dist/newsletter/Newsletter02/Newsletter02.d.cts +3 -0
  153. package/dist/newsletter/Newsletter02/Newsletter02.d.ts +3 -0
  154. package/dist/newsletter/Newsletter02/Newsletter02.types.d.cts +42 -0
  155. package/dist/newsletter/Newsletter02/Newsletter02.types.d.ts +42 -0
  156. package/dist/notifications/Notifications01/Notifications01.d.cts +3 -0
  157. package/dist/notifications/Notifications01/Notifications01.d.ts +3 -0
  158. package/dist/notifications/Notifications01/Notifications01.types.d.cts +74 -0
  159. package/dist/notifications/Notifications01/Notifications01.types.d.ts +74 -0
  160. package/dist/notifications/Notifications02/Notifications02.d.cts +3 -0
  161. package/dist/notifications/Notifications02/Notifications02.d.ts +3 -0
  162. package/dist/notifications/Notifications02/Notifications02.types.d.cts +65 -0
  163. package/dist/notifications/Notifications02/Notifications02.types.d.ts +65 -0
  164. package/dist/notifications/Notifications03/Notifications03.d.cts +3 -0
  165. package/dist/notifications/Notifications03/Notifications03.d.ts +3 -0
  166. package/dist/notifications/Notifications03/Notifications03.types.d.cts +87 -0
  167. package/dist/notifications/Notifications03/Notifications03.types.d.ts +87 -0
  168. package/dist/onboarding/Onboarding01/Onboarding01.d.cts +3 -0
  169. package/dist/onboarding/Onboarding01/Onboarding01.d.ts +3 -0
  170. package/dist/onboarding/Onboarding01/Onboarding01.types.d.cts +46 -0
  171. package/dist/onboarding/Onboarding01/Onboarding01.types.d.ts +46 -0
  172. package/dist/onboarding/Onboarding02/Onboarding02.d.cts +3 -0
  173. package/dist/onboarding/Onboarding02/Onboarding02.d.ts +3 -0
  174. package/dist/onboarding/Onboarding02/Onboarding02.types.d.cts +68 -0
  175. package/dist/onboarding/Onboarding02/Onboarding02.types.d.ts +68 -0
  176. package/dist/onboarding/Onboarding03/Onboarding03.d.cts +3 -0
  177. package/dist/onboarding/Onboarding03/Onboarding03.d.ts +3 -0
  178. package/dist/onboarding/Onboarding03/Onboarding03.types.d.cts +38 -0
  179. package/dist/onboarding/Onboarding03/Onboarding03.types.d.ts +38 -0
  180. package/dist/page-headings/PageHeading01/PageHeading01.d.cts +6 -0
  181. package/dist/page-headings/PageHeading01/PageHeading01.d.ts +6 -0
  182. package/dist/page-headings/PageHeading01/PageHeading01.types.d.cts +35 -0
  183. package/dist/page-headings/PageHeading01/PageHeading01.types.d.ts +35 -0
  184. package/dist/page-headings/PageHeading02/PageHeading02.d.cts +3 -0
  185. package/dist/page-headings/PageHeading02/PageHeading02.d.ts +3 -0
  186. package/dist/page-headings/PageHeading02/PageHeading02.types.d.cts +49 -0
  187. package/dist/page-headings/PageHeading02/PageHeading02.types.d.ts +49 -0
  188. package/dist/page-headings/PageHeading03/PageHeading03.d.cts +6 -0
  189. package/dist/page-headings/PageHeading03/PageHeading03.d.ts +6 -0
  190. package/dist/page-headings/PageHeading03/PageHeading03.types.d.cts +83 -0
  191. package/dist/page-headings/PageHeading03/PageHeading03.types.d.ts +83 -0
  192. package/dist/section-headings/SectionHeading01/SectionHeading01.d.cts +3 -0
  193. package/dist/section-headings/SectionHeading01/SectionHeading01.d.ts +3 -0
  194. package/dist/section-headings/SectionHeading01/SectionHeading01.types.d.cts +9 -0
  195. package/dist/section-headings/SectionHeading01/SectionHeading01.types.d.ts +9 -0
  196. package/dist/section-headings/SectionHeading02/SectionHeading02.d.cts +3 -0
  197. package/dist/section-headings/SectionHeading02/SectionHeading02.d.ts +3 -0
  198. package/dist/section-headings/SectionHeading02/SectionHeading02.types.d.cts +12 -0
  199. package/dist/section-headings/SectionHeading02/SectionHeading02.types.d.ts +12 -0
  200. package/dist/section-headings/SectionHeading03/SectionHeading03.d.cts +3 -0
  201. package/dist/section-headings/SectionHeading03/SectionHeading03.d.ts +3 -0
  202. package/dist/section-headings/SectionHeading03/SectionHeading03.types.d.cts +12 -0
  203. package/dist/section-headings/SectionHeading03/SectionHeading03.types.d.ts +12 -0
  204. package/dist/settings/Settings01/Settings01.d.cts +3 -0
  205. package/dist/settings/Settings01/Settings01.d.ts +3 -0
  206. package/dist/settings/Settings01/Settings01.types.d.cts +46 -0
  207. package/dist/settings/Settings01/Settings01.types.d.ts +46 -0
  208. package/dist/settings/Settings02/Settings02.d.cts +3 -0
  209. package/dist/settings/Settings02/Settings02.d.ts +3 -0
  210. package/dist/settings/Settings02/Settings02.types.d.cts +45 -0
  211. package/dist/settings/Settings02/Settings02.types.d.ts +45 -0
  212. package/dist/settings/Settings03/Settings03.d.cts +3 -0
  213. package/dist/settings/Settings03/Settings03.d.ts +3 -0
  214. package/dist/settings/Settings03/Settings03.types.d.cts +132 -0
  215. package/dist/settings/Settings03/Settings03.types.d.ts +132 -0
  216. package/dist/settings/Settings04/Settings04.d.cts +3 -0
  217. package/dist/settings/Settings04/Settings04.d.ts +3 -0
  218. package/dist/settings/Settings04/Settings04.types.d.cts +124 -0
  219. package/dist/settings/Settings04/Settings04.types.d.ts +124 -0
  220. package/dist/settings/Settings05/Settings05.d.cts +3 -0
  221. package/dist/settings/Settings05/Settings05.d.ts +3 -0
  222. package/dist/settings/Settings05/Settings05.types.d.cts +94 -0
  223. package/dist/settings/Settings05/Settings05.types.d.ts +94 -0
  224. package/dist/shared/AppWorkspaceItems.d.cts +3 -0
  225. package/dist/shared/AppWorkspaceItems.d.ts +3 -0
  226. package/dist/shared/BlockActions.d.cts +1 -1
  227. package/dist/shared/BlockActions.d.ts +1 -1
  228. package/dist/shared/BlockMenuItems.d.cts +3 -0
  229. package/dist/shared/BlockMenuItems.d.ts +3 -0
  230. package/dist/shared/appShell.d.cts +19 -0
  231. package/dist/shared/appShell.d.ts +19 -0
  232. package/dist/shared/icons.d.cts +59 -13
  233. package/dist/shared/icons.d.ts +59 -13
  234. package/dist/shared/shared.types.d.cts +128 -0
  235. package/dist/shared/shared.types.d.ts +128 -0
  236. package/dist/shared/tableColumns.d.cts +10 -0
  237. package/dist/shared/tableColumns.d.ts +10 -0
  238. package/dist/sign-in/SignIn01/SignIn01.d.cts +3 -0
  239. package/dist/sign-in/SignIn01/SignIn01.d.ts +3 -0
  240. package/dist/sign-in/SignIn01/SignIn01.types.d.cts +52 -0
  241. package/dist/sign-in/SignIn01/SignIn01.types.d.ts +52 -0
  242. package/dist/sign-in/SignIn02/SignIn02.d.cts +3 -0
  243. package/dist/sign-in/SignIn02/SignIn02.d.ts +3 -0
  244. package/dist/sign-in/SignIn02/SignIn02.types.d.cts +79 -0
  245. package/dist/sign-in/SignIn02/SignIn02.types.d.ts +79 -0
  246. package/dist/sign-in/SignIn03/SignIn03.d.cts +3 -0
  247. package/dist/sign-in/SignIn03/SignIn03.d.ts +3 -0
  248. package/dist/sign-in/SignIn03/SignIn03.types.d.cts +51 -0
  249. package/dist/sign-in/SignIn03/SignIn03.types.d.ts +51 -0
  250. package/dist/sign-in/SignIn04/SignIn04.d.cts +3 -0
  251. package/dist/sign-in/SignIn04/SignIn04.d.ts +3 -0
  252. package/dist/sign-in/SignIn04/SignIn04.types.d.cts +56 -0
  253. package/dist/sign-in/SignIn04/SignIn04.types.d.ts +56 -0
  254. package/dist/sign-in/SignIn05/SignIn05.d.cts +3 -0
  255. package/dist/sign-in/SignIn05/SignIn05.d.ts +3 -0
  256. package/dist/sign-in/SignIn05/SignIn05.types.d.cts +86 -0
  257. package/dist/sign-in/SignIn05/SignIn05.types.d.ts +86 -0
  258. package/dist/stats/Stats01/Stats01.d.cts +3 -0
  259. package/dist/stats/Stats01/Stats01.d.ts +3 -0
  260. package/dist/stats/Stats01/Stats01.types.d.cts +19 -0
  261. package/dist/stats/Stats01/Stats01.types.d.ts +19 -0
  262. package/dist/stats/Stats02/Stats02.d.cts +3 -0
  263. package/dist/stats/Stats02/Stats02.d.ts +3 -0
  264. package/dist/stats/Stats02/Stats02.types.d.cts +30 -0
  265. package/dist/stats/Stats02/Stats02.types.d.ts +30 -0
  266. package/dist/stats/Stats03/Stats03.d.cts +3 -0
  267. package/dist/stats/Stats03/Stats03.d.ts +3 -0
  268. package/dist/stats/Stats03/Stats03.types.d.cts +24 -0
  269. package/dist/stats/Stats03/Stats03.types.d.ts +24 -0
  270. package/dist/styles.css +11992 -2727
  271. package/dist/team/Team01/Team01.d.cts +3 -0
  272. package/dist/team/Team01/Team01.d.ts +3 -0
  273. package/dist/team/Team01/Team01.types.d.cts +25 -0
  274. package/dist/team/Team01/Team01.types.d.ts +25 -0
  275. package/dist/team/Team02/Team02.d.cts +3 -0
  276. package/dist/team/Team02/Team02.d.ts +3 -0
  277. package/dist/team/Team02/Team02.types.d.cts +37 -0
  278. package/dist/team/Team02/Team02.types.d.ts +37 -0
  279. package/dist/testimonials/Testimonial01/Testimonial01.d.cts +3 -0
  280. package/dist/testimonials/Testimonial01/Testimonial01.d.ts +3 -0
  281. package/dist/testimonials/Testimonial01/Testimonial01.types.d.cts +21 -0
  282. package/dist/testimonials/Testimonial01/Testimonial01.types.d.ts +21 -0
  283. package/dist/testimonials/Testimonial02/Testimonial02.d.cts +3 -0
  284. package/dist/testimonials/Testimonial02/Testimonial02.d.ts +3 -0
  285. package/dist/testimonials/Testimonial02/Testimonial02.types.d.cts +25 -0
  286. package/dist/testimonials/Testimonial02/Testimonial02.types.d.ts +25 -0
  287. package/dist/testimonials/Testimonial03/Testimonial03.d.cts +3 -0
  288. package/dist/testimonials/Testimonial03/Testimonial03.d.ts +3 -0
  289. package/dist/testimonials/Testimonial03/Testimonial03.types.d.cts +45 -0
  290. package/dist/testimonials/Testimonial03/Testimonial03.types.d.ts +45 -0
  291. package/package.json +3 -3
@@ -0,0 +1,103 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ import type { SelectItem } from "@openwarelabs/ui";
3
+ /** What someone filled in. Fields the form doesn't show stay empty. */
4
+ export interface Contact01Values {
5
+ /** Their name. */
6
+ name: string;
7
+ /** Their email address, as typed. */
8
+ email: string;
9
+ /** Their company, or empty. */
10
+ company: string;
11
+ /** The chosen team size's value, or empty. */
12
+ size: string;
13
+ /** The chosen topic's value. */
14
+ topic: string;
15
+ /** What they wrote. */
16
+ message: string;
17
+ }
18
+ /** The messages under the fields that need fixing. */
19
+ export type Contact01Errors = Partial<Record<"name" | "email" | "message", string>>;
20
+ /** A way to reach you, in the list beside the form. */
21
+ export interface Contact01Detail {
22
+ /** A 16px icon in a tile before it. */
23
+ icon?: ReactNode;
24
+ /** What it is: "Sales". */
25
+ label: ReactNode;
26
+ /** The address or the fact: "sales@example.com", "Within one working day". */
27
+ value: ReactNode;
28
+ /** Makes the value a link, such as "mailto:sales@example.com". */
29
+ href?: string;
30
+ /** A line under it: "Plans, invoices and security reviews". */
31
+ note?: ReactNode;
32
+ }
33
+ /** The form's words, its validation messages included, in English unless you pass your own. */
34
+ export interface Contact01Labels {
35
+ /** @default "Name" */
36
+ name?: string;
37
+ /** @default "Work email" */
38
+ email?: string;
39
+ /** @default "you@example.com" */
40
+ emailPlaceholder?: string;
41
+ /** @default "Company" */
42
+ company?: string;
43
+ /** @default "Team size" */
44
+ size?: string;
45
+ /** @default "Choose a size" */
46
+ sizePlaceholder?: string;
47
+ /** After the labels of the fields that can be left empty. @default "(optional)" */
48
+ optional?: string;
49
+ /** @default "What's it about?" */
50
+ topic?: string;
51
+ /** @default "Message" */
52
+ message?: string;
53
+ /** Under the message until there's an error. @default "A few lines about your team and what you need." */
54
+ messageHint?: string;
55
+ /** The submit button. @default "Send message" */
56
+ submit?: string;
57
+ /** The button that brings the form back. @default "Send another message" */
58
+ again?: string;
59
+ /** @default "Enter your name." */
60
+ nameEmpty?: string;
61
+ /** @default "Enter your work email." */
62
+ emailEmpty?: string;
63
+ /** @default "Enter an email address like name@example.com." */
64
+ emailInvalid?: string;
65
+ /** @default "Tell us a little about what you need." */
66
+ messageEmpty?: string;
67
+ /** For a message under `minMessageLength`. @default "Add a few more words, so it reaches the right person." */
68
+ messageShort?: string;
69
+ /** Shown when `onSubmit` fails without a message of its own. @default "That didn't go through. Try again in a moment." */
70
+ failed?: string;
71
+ }
72
+ export interface Contact01Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children" | "onSubmit"> {
73
+ /** A short line in a Chip above the title, such as "Contact". */
74
+ eyebrow?: ReactNode;
75
+ /** The section's heading. */
76
+ title: ReactNode;
77
+ /** A sentence or two under the title. */
78
+ description?: ReactNode;
79
+ /** Ways to reach you and when you reply, listed under the heading. */
80
+ details?: Contact01Detail[];
81
+ /** The choices for "What's it about?". Leave out for no such field. */
82
+ topics?: SelectItem[];
83
+ /** The topic chosen at first. @default the first topic */
84
+ defaultTopic?: string;
85
+ /** The choices for an optional team size. Leave out for no such field. */
86
+ sizes?: SelectItem[];
87
+ /** The fewest characters a message can have.
88
+ * @default 20 */
89
+ minMessageLength?: number;
90
+ /**
91
+ * Sends the message. While its promise is pending the button shows a spinner; if it throws, the error's message
92
+ * shows beside the button, and once it resolves the form gives way to `successTitle`.
93
+ */
94
+ onSubmit(values: Contact01Values): void | Promise<void>;
95
+ /** A small line beside the button: "We use your details only to reply to you." */
96
+ note?: ReactNode;
97
+ /** What replaces the form once it's sent, given what they sent: "Thanks, Maya". */
98
+ successTitle(values: Contact01Values): ReactNode;
99
+ /** A line under it, given what they sent. */
100
+ successDescription?(values: Contact01Values): ReactNode;
101
+ /** Words that aren't content (field labels, names for screen readers, messages), in English unless you pass your own. */
102
+ labels?: Contact01Labels;
103
+ }
@@ -0,0 +1,3 @@
1
+ import type { Contact02Props } from "./Contact02.types.cjs";
2
+ /** Ways to get help before writing in, a card each with a few links and the way in, and a line about the service's state. */
3
+ export declare function Contact02({ eyebrow, title, description, options, status, labels, className, ...props }: Contact02Props): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { Contact02Props } from "./Contact02.types.js";
2
+ /** Ways to get help before writing in, a card each with a few links and the way in, and a line about the service's state. */
3
+ export declare function Contact02({ eyebrow, title, description, options, status, labels, className, ...props }: Contact02Props): import("react").JSX.Element;
@@ -0,0 +1,56 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ import type { BlockLink } from "../../shared/shared.types.cjs";
3
+ /** A row in an option's list: a guide, a thread, a reply time. */
4
+ export interface Contact02ListItem {
5
+ /** The row's words, on the left. */
6
+ label: ReactNode;
7
+ /** Makes them a link. */
8
+ href?: string;
9
+ /** A figure on the right, in tabular numerals: "4 min", "24 replies". */
10
+ meta?: ReactNode;
11
+ }
12
+ /** A way to get help, in a card of its own. */
13
+ export interface Contact02Option {
14
+ /** A 20px icon in a tile at the top. */
15
+ icon?: ReactNode;
16
+ /** The card's heading: "Documentation". */
17
+ title: ReactNode;
18
+ /** A sentence under it. */
19
+ description?: ReactNode;
20
+ /** An email address in a field with a copy button. */
21
+ email?: string;
22
+ /** A few rows under a hairline. */
23
+ list?: Contact02ListItem[];
24
+ /** The list's accessible name: "Popular guides". */
25
+ listLabel?: string;
26
+ /** The link along the card's foot, with an arrow: "Browse the docs". */
27
+ link: BlockLink;
28
+ /** Something on the right of the foot, such as avatars and a member count. */
29
+ footNote?: ReactNode;
30
+ }
31
+ /** A line under the cards about whether everything's working. */
32
+ export interface Contact02Status {
33
+ /** The state, after a green dot: "All systems working". */
34
+ label: ReactNode;
35
+ /** A line beside it, which can hold a link to the status page. */
36
+ description?: ReactNode;
37
+ }
38
+ /** The words on the cards that aren't content, in English unless you pass your own. */
39
+ export interface Contact02Labels {
40
+ /** The button that copies an option's email address. @default "Copy address" */
41
+ copyAddress?: string;
42
+ }
43
+ export interface Contact02Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children"> {
44
+ /** A short line in a Chip above the title, such as "Support". */
45
+ eyebrow?: ReactNode;
46
+ /** The section's heading. */
47
+ title: ReactNode;
48
+ /** A sentence or two under the title. */
49
+ description?: ReactNode;
50
+ /** The ways to get help, three to a row: the docs, a forum, email. */
51
+ options: Contact02Option[];
52
+ /** A line about the service's state under the cards. */
53
+ status?: Contact02Status;
54
+ /** Words that aren't content (field labels, names for screen readers, messages), in English unless you pass your own. */
55
+ labels?: Contact02Labels;
56
+ }
@@ -0,0 +1,56 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ import type { BlockLink } from "../../shared/shared.types.js";
3
+ /** A row in an option's list: a guide, a thread, a reply time. */
4
+ export interface Contact02ListItem {
5
+ /** The row's words, on the left. */
6
+ label: ReactNode;
7
+ /** Makes them a link. */
8
+ href?: string;
9
+ /** A figure on the right, in tabular numerals: "4 min", "24 replies". */
10
+ meta?: ReactNode;
11
+ }
12
+ /** A way to get help, in a card of its own. */
13
+ export interface Contact02Option {
14
+ /** A 20px icon in a tile at the top. */
15
+ icon?: ReactNode;
16
+ /** The card's heading: "Documentation". */
17
+ title: ReactNode;
18
+ /** A sentence under it. */
19
+ description?: ReactNode;
20
+ /** An email address in a field with a copy button. */
21
+ email?: string;
22
+ /** A few rows under a hairline. */
23
+ list?: Contact02ListItem[];
24
+ /** The list's accessible name: "Popular guides". */
25
+ listLabel?: string;
26
+ /** The link along the card's foot, with an arrow: "Browse the docs". */
27
+ link: BlockLink;
28
+ /** Something on the right of the foot, such as avatars and a member count. */
29
+ footNote?: ReactNode;
30
+ }
31
+ /** A line under the cards about whether everything's working. */
32
+ export interface Contact02Status {
33
+ /** The state, after a green dot: "All systems working". */
34
+ label: ReactNode;
35
+ /** A line beside it, which can hold a link to the status page. */
36
+ description?: ReactNode;
37
+ }
38
+ /** The words on the cards that aren't content, in English unless you pass your own. */
39
+ export interface Contact02Labels {
40
+ /** The button that copies an option's email address. @default "Copy address" */
41
+ copyAddress?: string;
42
+ }
43
+ export interface Contact02Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children"> {
44
+ /** A short line in a Chip above the title, such as "Support". */
45
+ eyebrow?: ReactNode;
46
+ /** The section's heading. */
47
+ title: ReactNode;
48
+ /** A sentence or two under the title. */
49
+ description?: ReactNode;
50
+ /** The ways to get help, three to a row: the docs, a forum, email. */
51
+ options: Contact02Option[];
52
+ /** A line about the service's state under the cards. */
53
+ status?: Contact02Status;
54
+ /** Words that aren't content (field labels, names for screen readers, messages), in English unless you pass your own. */
55
+ labels?: Contact02Labels;
56
+ }
@@ -0,0 +1,3 @@
1
+ import type { Dashboard01Props } from "./Dashboard01.types.cjs";
2
+ /** A page title with its filters, a row of stats, then a chart across the page in a card. */
3
+ export declare function Dashboard01({ title, description, filters, stats, chart, labels, className, ...props }: Dashboard01Props): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { Dashboard01Props } from "./Dashboard01.types.js";
2
+ /** A page title with its filters, a row of stats, then a chart across the page in a card. */
3
+ export declare function Dashboard01({ title, description, filters, stats, chart, labels, className, ...props }: Dashboard01Props): import("react").JSX.Element;
@@ -0,0 +1,53 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ import type { SegmentedControlOption, StatProps } from "@openwarelabs/ui";
3
+ /** A control beside the title that changes what the page shows: a select (a project) or segments (a time range). */
4
+ export interface Dashboard01Filter {
5
+ /** `select` for a list of choices, `segmented` for two to five side by side. */
6
+ kind: "select" | "segmented";
7
+ /** Names it for screen readers: "Project", "Time range". */
8
+ label: string;
9
+ /** Its choices. */
10
+ options: SegmentedControlOption[];
11
+ /** The chosen value, when you keep it yourself. */
12
+ value?: string;
13
+ /** The value chosen to start with. @default the first option's */
14
+ defaultValue?: string;
15
+ /** Called with the new value when it changes. */
16
+ onChange?(value: string): void;
17
+ }
18
+ /** One entry in the chart's legend. */
19
+ export interface Dashboard01LegendItem {
20
+ /** What the mark stands for. */
21
+ label: ReactNode;
22
+ /** The mark itself, drawn to match the chart: a short line, a small bar. */
23
+ swatch: ReactNode;
24
+ }
25
+ /** The chart across the page, in a card. */
26
+ export interface Dashboard01Chart {
27
+ /** The card's heading: "Deploys per day". */
28
+ title: ReactNode;
29
+ /** A caption under it, summing up what the chart shows. */
30
+ description?: ReactNode;
31
+ /** The legend, on the right of the heading. */
32
+ legend?: Dashboard01LegendItem[];
33
+ /** The chart: an SVG you draw, or one from a charting library. */
34
+ content: ReactNode;
35
+ }
36
+ export interface Dashboard01Labels {
37
+ /** Names the legend for screen readers. @default "Legend" */
38
+ legend?: string;
39
+ }
40
+ export interface Dashboard01Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children"> {
41
+ /** The page's name, as its h1. */
42
+ title: ReactNode;
43
+ /** A line under it. */
44
+ description?: ReactNode;
45
+ /** Controls on the right of the title that change what the stats and the chart show. */
46
+ filters?: Dashboard01Filter[];
47
+ /** A row of stats: four fill it on desktops, two to a row on tablets and phones. */
48
+ stats: StatProps[];
49
+ /** The chart across the page, under the stats. */
50
+ chart?: Dashboard01Chart;
51
+ /** Words that aren't content (names for screen readers), in English unless you pass your own. */
52
+ labels?: Dashboard01Labels;
53
+ }
@@ -0,0 +1,53 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ import type { SegmentedControlOption, StatProps } from "@openwarelabs/ui";
3
+ /** A control beside the title that changes what the page shows: a select (a project) or segments (a time range). */
4
+ export interface Dashboard01Filter {
5
+ /** `select` for a list of choices, `segmented` for two to five side by side. */
6
+ kind: "select" | "segmented";
7
+ /** Names it for screen readers: "Project", "Time range". */
8
+ label: string;
9
+ /** Its choices. */
10
+ options: SegmentedControlOption[];
11
+ /** The chosen value, when you keep it yourself. */
12
+ value?: string;
13
+ /** The value chosen to start with. @default the first option's */
14
+ defaultValue?: string;
15
+ /** Called with the new value when it changes. */
16
+ onChange?(value: string): void;
17
+ }
18
+ /** One entry in the chart's legend. */
19
+ export interface Dashboard01LegendItem {
20
+ /** What the mark stands for. */
21
+ label: ReactNode;
22
+ /** The mark itself, drawn to match the chart: a short line, a small bar. */
23
+ swatch: ReactNode;
24
+ }
25
+ /** The chart across the page, in a card. */
26
+ export interface Dashboard01Chart {
27
+ /** The card's heading: "Deploys per day". */
28
+ title: ReactNode;
29
+ /** A caption under it, summing up what the chart shows. */
30
+ description?: ReactNode;
31
+ /** The legend, on the right of the heading. */
32
+ legend?: Dashboard01LegendItem[];
33
+ /** The chart: an SVG you draw, or one from a charting library. */
34
+ content: ReactNode;
35
+ }
36
+ export interface Dashboard01Labels {
37
+ /** Names the legend for screen readers. @default "Legend" */
38
+ legend?: string;
39
+ }
40
+ export interface Dashboard01Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children"> {
41
+ /** The page's name, as its h1. */
42
+ title: ReactNode;
43
+ /** A line under it. */
44
+ description?: ReactNode;
45
+ /** Controls on the right of the title that change what the stats and the chart show. */
46
+ filters?: Dashboard01Filter[];
47
+ /** A row of stats: four fill it on desktops, two to a row on tablets and phones. */
48
+ stats: StatProps[];
49
+ /** The chart across the page, under the stats. */
50
+ chart?: Dashboard01Chart;
51
+ /** Words that aren't content (names for screen readers), in English unless you pass your own. */
52
+ labels?: Dashboard01Labels;
53
+ }
@@ -0,0 +1,3 @@
1
+ import type { Dashboard02Props } from "./Dashboard02.types.cjs";
2
+ /** The numbers on the left, with a table under them; what just happened in a feed on the right, grouped by day. */
3
+ export declare function Dashboard02<Row extends object>({ title, description, stats, table, events, newEvents, eventFilters, labels, className, ...props }: Dashboard02Props<Row>): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { Dashboard02Props } from "./Dashboard02.types.js";
2
+ /** The numbers on the left, with a table under them; what just happened in a feed on the right, grouped by day. */
3
+ export declare function Dashboard02<Row extends object>({ title, description, stats, table, events, newEvents, eventFilters, labels, className, ...props }: Dashboard02Props<Row>): import("react").JSX.Element;
@@ -0,0 +1,74 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ import type { StatProps, TableSort } from "@openwarelabs/ui";
3
+ import type { BlockTableColumn } from "../../shared/shared.types.cjs";
4
+ /** One thing that happened, in the feed. */
5
+ export interface Dashboard02Event {
6
+ /** Unique in the feed. */
7
+ id: string;
8
+ /** What sort of event it is, matched by the feed's filters: "deploy", "review". */
9
+ kind?: string;
10
+ /** A 14px icon in a round tile, usually from lucide-react. */
11
+ icon: ReactNode;
12
+ /** Colours the tile: green for something that went live, red for a failure, the primary colour for agents. */
13
+ tone?: "success" | "danger" | "primary";
14
+ /** The sentence: who did what. */
15
+ text: ReactNode;
16
+ /** A caption under it: where, how long, when. */
17
+ meta?: ReactNode;
18
+ /** The day it belongs to, as a heading over its group: "Today", "Yesterday". Events of a day sit together. */
19
+ day: string;
20
+ }
21
+ /** A filter over the feed: shows the events of one kind. */
22
+ export interface Dashboard02EventFilter {
23
+ /** The kind it shows, matching events' `kind`. */
24
+ value: string;
25
+ /** Its words. */
26
+ label: ReactNode;
27
+ }
28
+ /** The table under the stats, in its own card. */
29
+ export interface Dashboard02Table<Row> {
30
+ /** The card's heading: "Projects". */
31
+ title: ReactNode;
32
+ /** Describes the table for screen readers. */
33
+ caption: string;
34
+ /** Its columns. */
35
+ columns: Array<BlockTableColumn<Row>>;
36
+ /** Its rows. */
37
+ rows: Row[];
38
+ /** The order to start with. */
39
+ defaultSort?: TableSort;
40
+ }
41
+ export interface Dashboard02Labels {
42
+ /** The feed's heading. @default "Activity" */
43
+ feed?: string;
44
+ /** Names the feed's filters for screen readers. @default "Show" */
45
+ filters?: string;
46
+ /** The filter that shows every event. @default "All" */
47
+ all?: string;
48
+ /** The button over the feed when new events are waiting. @default "2 new events" */
49
+ newEvents?(count: number): ReactNode;
50
+ /** The button under the feed that shows the days before the first. @default "Show earlier activity" */
51
+ showEarlier?: string;
52
+ /** When nothing in the first day matches the filter. @default "Nothing like this has happened today." */
53
+ noneToday?: string;
54
+ /** When nothing at all matches it. @default "Nothing like this happened this week." */
55
+ none?: string;
56
+ }
57
+ export interface Dashboard02Props<Row extends object> extends Omit<HTMLAttributes<HTMLElement>, "title" | "children"> {
58
+ /** The page's name, as its h1. */
59
+ title: ReactNode;
60
+ /** A line under it. */
61
+ description?: ReactNode;
62
+ /** Stats on the left, two to a row: four fill it. */
63
+ stats: StatProps[];
64
+ /** A table under the stats. */
65
+ table?: Dashboard02Table<Row>;
66
+ /** What happened, newest first, in a feed on the right. Only the first day shows until the person asks for more. */
67
+ events: Dashboard02Event[];
68
+ /** Events that arrived while the page was open. A button over the feed shows how many, and adds them to it. */
69
+ newEvents?: Dashboard02Event[];
70
+ /** Filters over the feed, after "All", each showing the events of one kind. */
71
+ eventFilters?: Dashboard02EventFilter[];
72
+ /** Words that aren't content (headings, buttons, empty text), in English unless you pass your own. */
73
+ labels?: Dashboard02Labels;
74
+ }
@@ -0,0 +1,74 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ import type { StatProps, TableSort } from "@openwarelabs/ui";
3
+ import type { BlockTableColumn } from "../../shared/shared.types.js";
4
+ /** One thing that happened, in the feed. */
5
+ export interface Dashboard02Event {
6
+ /** Unique in the feed. */
7
+ id: string;
8
+ /** What sort of event it is, matched by the feed's filters: "deploy", "review". */
9
+ kind?: string;
10
+ /** A 14px icon in a round tile, usually from lucide-react. */
11
+ icon: ReactNode;
12
+ /** Colours the tile: green for something that went live, red for a failure, the primary colour for agents. */
13
+ tone?: "success" | "danger" | "primary";
14
+ /** The sentence: who did what. */
15
+ text: ReactNode;
16
+ /** A caption under it: where, how long, when. */
17
+ meta?: ReactNode;
18
+ /** The day it belongs to, as a heading over its group: "Today", "Yesterday". Events of a day sit together. */
19
+ day: string;
20
+ }
21
+ /** A filter over the feed: shows the events of one kind. */
22
+ export interface Dashboard02EventFilter {
23
+ /** The kind it shows, matching events' `kind`. */
24
+ value: string;
25
+ /** Its words. */
26
+ label: ReactNode;
27
+ }
28
+ /** The table under the stats, in its own card. */
29
+ export interface Dashboard02Table<Row> {
30
+ /** The card's heading: "Projects". */
31
+ title: ReactNode;
32
+ /** Describes the table for screen readers. */
33
+ caption: string;
34
+ /** Its columns. */
35
+ columns: Array<BlockTableColumn<Row>>;
36
+ /** Its rows. */
37
+ rows: Row[];
38
+ /** The order to start with. */
39
+ defaultSort?: TableSort;
40
+ }
41
+ export interface Dashboard02Labels {
42
+ /** The feed's heading. @default "Activity" */
43
+ feed?: string;
44
+ /** Names the feed's filters for screen readers. @default "Show" */
45
+ filters?: string;
46
+ /** The filter that shows every event. @default "All" */
47
+ all?: string;
48
+ /** The button over the feed when new events are waiting. @default "2 new events" */
49
+ newEvents?(count: number): ReactNode;
50
+ /** The button under the feed that shows the days before the first. @default "Show earlier activity" */
51
+ showEarlier?: string;
52
+ /** When nothing in the first day matches the filter. @default "Nothing like this has happened today." */
53
+ noneToday?: string;
54
+ /** When nothing at all matches it. @default "Nothing like this happened this week." */
55
+ none?: string;
56
+ }
57
+ export interface Dashboard02Props<Row extends object> extends Omit<HTMLAttributes<HTMLElement>, "title" | "children"> {
58
+ /** The page's name, as its h1. */
59
+ title: ReactNode;
60
+ /** A line under it. */
61
+ description?: ReactNode;
62
+ /** Stats on the left, two to a row: four fill it. */
63
+ stats: StatProps[];
64
+ /** A table under the stats. */
65
+ table?: Dashboard02Table<Row>;
66
+ /** What happened, newest first, in a feed on the right. Only the first day shows until the person asks for more. */
67
+ events: Dashboard02Event[];
68
+ /** Events that arrived while the page was open. A button over the feed shows how many, and adds them to it. */
69
+ newEvents?: Dashboard02Event[];
70
+ /** Filters over the feed, after "All", each showing the events of one kind. */
71
+ eventFilters?: Dashboard02EventFilter[];
72
+ /** Words that aren't content (headings, buttons, empty text), in English unless you pass your own. */
73
+ labels?: Dashboard02Labels;
74
+ }
@@ -0,0 +1,6 @@
1
+ import type { Dashboard03Props } from "./Dashboard03.types.cjs";
2
+ /**
3
+ * This month's spend against a budget the person can change, the same spend broken down in a table, and what the
4
+ * next invoice will be. The meter turns amber at 80% and red at the budget.
5
+ */
6
+ export declare function Dashboard03<Row extends object>({ title, description, spendTitle, spent, forecast, daysLeft, budget: budgetProp, defaultBudget, onBudgetChange, budgetOption, budgetNote, currency, locale, table, invoice, labels, className, ...props }: Dashboard03Props<Row>): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { Dashboard03Props } from "./Dashboard03.types.js";
2
+ /**
3
+ * This month's spend against a budget the person can change, the same spend broken down in a table, and what the
4
+ * next invoice will be. The meter turns amber at 80% and red at the budget.
5
+ */
6
+ export declare function Dashboard03<Row extends object>({ title, description, spendTitle, spent, forecast, daysLeft, budget: budgetProp, defaultBudget, onBudgetChange, budgetOption, budgetNote, currency, locale, table, invoice, labels, className, ...props }: Dashboard03Props<Row>): import("react").JSX.Element;
@@ -0,0 +1,131 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ import type { TableSort } from "@openwarelabs/ui";
3
+ import type { BlockButton, BlockTableColumn } from "../../shared/shared.types.cjs";
4
+ /** A choice in the budget's editor, such as pausing work when spend reaches it. */
5
+ export interface Dashboard03BudgetOption {
6
+ /** The checkbox's words. */
7
+ label: ReactNode;
8
+ /** A muted line under them. */
9
+ description?: ReactNode;
10
+ /** Whether it starts ticked. @default false */
11
+ defaultChecked?: boolean;
12
+ }
13
+ /** The table of spend, in its own card under the budget. */
14
+ export interface Dashboard03Table<Row> {
15
+ /** The card's heading: "By project". */
16
+ title: ReactNode;
17
+ /** A caption on the right of the heading: "So far this month". */
18
+ description?: ReactNode;
19
+ /** Describes the table for screen readers. */
20
+ caption: string;
21
+ /** Its columns. */
22
+ columns: Array<BlockTableColumn<Row>>;
23
+ /** Its rows. */
24
+ rows: Row[];
25
+ /** The order to start with. */
26
+ defaultSort?: TableSort;
27
+ }
28
+ /** One line of the next invoice. */
29
+ export interface Dashboard03InvoiceLine {
30
+ /** What it's for: "Business plan". */
31
+ label: ReactNode;
32
+ /** A caption under it: "14 people × €24". */
33
+ hint?: ReactNode;
34
+ /** The amount, formatted. */
35
+ amount: ReactNode;
36
+ }
37
+ /** The next invoice, in a card on the right. */
38
+ export interface Dashboard03Invoice {
39
+ /** The card's heading: "Next invoice". */
40
+ title: ReactNode;
41
+ /** A caption under it: when it's due. */
42
+ due?: ReactNode;
43
+ /** Its lines. */
44
+ lines: Dashboard03InvoiceLine[];
45
+ /** The total, under a hairline. */
46
+ total?: {
47
+ label: ReactNode;
48
+ amount: ReactNode;
49
+ };
50
+ /** A caption under the total: "Before VAT". */
51
+ note?: ReactNode;
52
+ /** The card it's paid with, and a button to change it. */
53
+ payment?: {
54
+ label: ReactNode;
55
+ detail?: ReactNode;
56
+ onChange?(): void;
57
+ };
58
+ /** A button at the foot of the card: "Download past invoices". */
59
+ action?: BlockButton;
60
+ }
61
+ /** What the forecast's sentence is made from. */
62
+ export interface Dashboard03Forecast {
63
+ /** The month's forecast spend, formatted in whole units. */
64
+ forecast: string;
65
+ /** How far over or under the budget it is, formatted in whole units. */
66
+ difference: string;
67
+ /** Whether the forecast goes over the budget. */
68
+ over: boolean;
69
+ /** Whether the budget option is ticked. */
70
+ optionChecked: boolean;
71
+ }
72
+ export interface Dashboard03Labels {
73
+ /** The button that opens the budget's editor. @default "Edit budget" */
74
+ editBudget?: string;
75
+ /** The editor's title. @default "Monthly budget" */
76
+ budgetTitle?: string;
77
+ /** The budget field's label. @default "Budget" */
78
+ budgetField?: string;
79
+ /** The field's error when the budget is missing or under 1. @default "Enter a budget of at least €1." */
80
+ budgetError?: string;
81
+ /** @default "Cancel" */
82
+ cancel?: string;
83
+ /** @default "Save budget" */
84
+ saveBudget?: string;
85
+ /** After the amount spent. @default "of a €3,000 budget" */
86
+ ofBudget?(budget: string): ReactNode;
87
+ /** Under the meter, on the left. @default "98% used" */
88
+ used?(percent: number): ReactNode;
89
+ /** Under the meter, on the right. @default "18 days left" */
90
+ daysLeft?(days: number): ReactNode;
91
+ /** Names the meter for screen readers. @default "98% of the budget spent" */
92
+ meter?(percent: number): string;
93
+ /** The sentence under the meter: where spend is heading. @default "At this pace you'll spend about €3,124 by the end of the month, €124 over budget." */
94
+ forecast?(forecast: Dashboard03Forecast): ReactNode;
95
+ /** The button that changes the payment card. @default "Change" */
96
+ changePayment?: string;
97
+ }
98
+ export interface Dashboard03Props<Row extends object> extends Omit<HTMLAttributes<HTMLElement>, "title" | "children"> {
99
+ /** The page's name, as its h1. */
100
+ title: ReactNode;
101
+ /** A line under it: the month and the plan. */
102
+ description?: ReactNode;
103
+ /** The budget card's heading. @default "Spend this month" */
104
+ spendTitle?: ReactNode;
105
+ /** What's been spent so far this month. */
106
+ spent: number;
107
+ /** The month's forecast spend, at the pace so far. */
108
+ forecast: number;
109
+ /** Days left in the month. */
110
+ daysLeft: number;
111
+ /** The monthly budget, when you keep it yourself. */
112
+ budget?: number;
113
+ /** The budget to start with. @default 1000 */
114
+ defaultBudget?: number;
115
+ /** Called when the person saves a new budget, with whether the option is ticked. */
116
+ onBudgetChange?(budget: number, optionChecked: boolean): void;
117
+ /** A checkbox in the budget's editor. */
118
+ budgetOption?: Dashboard03BudgetOption;
119
+ /** A caption in the editor, under the checkbox. */
120
+ budgetNote?: ReactNode;
121
+ /** The currency amounts are in. @default "EUR" */
122
+ currency?: string;
123
+ /** The locale amounts are formatted for. @default "en-IE" */
124
+ locale?: string;
125
+ /** The spend broken down, in a table under the budget. */
126
+ table?: Dashboard03Table<Row>;
127
+ /** The next invoice, on the right. */
128
+ invoice?: Dashboard03Invoice;
129
+ /** Words that aren't content (button labels, the meter's captions, the forecast), in English unless you pass your own. */
130
+ labels?: Dashboard03Labels;
131
+ }