govuk-react 0.10.6 → 1.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (332) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +45 -52
  3. package/dist/accordion.d.ts +4 -0
  4. package/dist/accordion.js +4 -0
  5. package/dist/accordion.js.map +1 -0
  6. package/dist/back-link.d.ts +21 -0
  7. package/dist/back-link.js +4 -0
  8. package/dist/back-link.js.map +1 -0
  9. package/dist/body.d.ts +1 -0
  10. package/dist/body.js +4 -0
  11. package/dist/body.js.map +1 -0
  12. package/dist/breadcrumbs.d.ts +1 -0
  13. package/dist/breadcrumbs.js +3 -0
  14. package/dist/breadcrumbs.js.map +1 -0
  15. package/dist/button.d.ts +26 -0
  16. package/dist/button.js +4 -0
  17. package/dist/button.js.map +1 -0
  18. package/dist/caption.d.ts +1 -0
  19. package/dist/caption.js +4 -0
  20. package/dist/caption.js.map +1 -0
  21. package/dist/character-count.d.ts +4 -0
  22. package/dist/character-count.js +4 -0
  23. package/dist/character-count.js.map +1 -0
  24. package/dist/checkboxes.d.ts +3 -0
  25. package/dist/checkboxes.js +4 -0
  26. package/dist/checkboxes.js.map +1 -0
  27. package/dist/chunk-2KPHO7N2.js +3 -0
  28. package/dist/chunk-2KPHO7N2.js.map +1 -0
  29. package/dist/chunk-2W35PR6E.js +3 -0
  30. package/dist/chunk-2W35PR6E.js.map +1 -0
  31. package/dist/chunk-57K6B6V2.js +38 -0
  32. package/dist/chunk-57K6B6V2.js.map +1 -0
  33. package/dist/chunk-5RYJUAI3.js +3 -0
  34. package/dist/chunk-5RYJUAI3.js.map +1 -0
  35. package/dist/chunk-5YT2PQAF.js +3 -0
  36. package/dist/chunk-5YT2PQAF.js.map +1 -0
  37. package/dist/chunk-B33BQUXM.js +8 -0
  38. package/dist/chunk-B33BQUXM.js.map +1 -0
  39. package/dist/chunk-BAXFWXMR.js +41 -0
  40. package/dist/chunk-BAXFWXMR.js.map +1 -0
  41. package/dist/chunk-BDIDAVNV.js +22 -0
  42. package/dist/chunk-BDIDAVNV.js.map +1 -0
  43. package/dist/chunk-D6TMELAY.js +3 -0
  44. package/dist/chunk-D6TMELAY.js.map +1 -0
  45. package/dist/chunk-DHTWPFZO.js +8 -0
  46. package/dist/chunk-DHTWPFZO.js.map +1 -0
  47. package/dist/chunk-DK2FZF7U.js +3 -0
  48. package/dist/chunk-DK2FZF7U.js.map +1 -0
  49. package/dist/chunk-EMM6RZT7.js +3 -0
  50. package/dist/chunk-EMM6RZT7.js.map +1 -0
  51. package/dist/chunk-EMNBPB3L.js +8 -0
  52. package/dist/chunk-EMNBPB3L.js.map +1 -0
  53. package/dist/chunk-FE2OFAA5.js +8 -0
  54. package/dist/chunk-FE2OFAA5.js.map +1 -0
  55. package/dist/chunk-FNDQEOKW.js +20 -0
  56. package/dist/chunk-FNDQEOKW.js.map +1 -0
  57. package/dist/chunk-HHH5BEO6.js +3 -0
  58. package/dist/chunk-HHH5BEO6.js.map +1 -0
  59. package/dist/chunk-HRURRTAU.js +83 -0
  60. package/dist/chunk-HRURRTAU.js.map +1 -0
  61. package/dist/chunk-IFETUZ4S.js +3 -0
  62. package/dist/chunk-IFETUZ4S.js.map +1 -0
  63. package/dist/chunk-JLNRFYFI.js +3 -0
  64. package/dist/chunk-JLNRFYFI.js.map +1 -0
  65. package/dist/chunk-K7VSNNQD.js +8 -0
  66. package/dist/chunk-K7VSNNQD.js.map +1 -0
  67. package/dist/chunk-KFWTQTVJ.js +3 -0
  68. package/dist/chunk-KFWTQTVJ.js.map +1 -0
  69. package/dist/chunk-L4GCVMBX.js +3 -0
  70. package/dist/chunk-L4GCVMBX.js.map +1 -0
  71. package/dist/chunk-L4O7OXGY.js +151 -0
  72. package/dist/chunk-L4O7OXGY.js.map +1 -0
  73. package/dist/chunk-LG7D7X4T.js +8 -0
  74. package/dist/chunk-LG7D7X4T.js.map +1 -0
  75. package/dist/chunk-M5BQAPSC.js +8 -0
  76. package/dist/chunk-M5BQAPSC.js.map +1 -0
  77. package/dist/chunk-NN44HUS7.js +64 -0
  78. package/dist/chunk-NN44HUS7.js.map +1 -0
  79. package/dist/chunk-NV2BSK6G.js +3 -0
  80. package/dist/chunk-NV2BSK6G.js.map +1 -0
  81. package/dist/chunk-OCGJIH5X.js +159 -0
  82. package/dist/chunk-OCGJIH5X.js.map +1 -0
  83. package/dist/chunk-OQVOKH2T.js +8 -0
  84. package/dist/chunk-OQVOKH2T.js.map +1 -0
  85. package/dist/chunk-OWBD4KZC.js +115 -0
  86. package/dist/chunk-OWBD4KZC.js.map +1 -0
  87. package/dist/chunk-PM2AAFY4.js +35 -0
  88. package/dist/chunk-PM2AAFY4.js.map +1 -0
  89. package/dist/chunk-PNMADTQQ.js +3 -0
  90. package/dist/chunk-PNMADTQQ.js.map +1 -0
  91. package/dist/chunk-PZ5AY32C.js +9 -0
  92. package/dist/chunk-PZ5AY32C.js.map +1 -0
  93. package/dist/chunk-QOWZLJK4.js +3 -0
  94. package/dist/chunk-QOWZLJK4.js.map +1 -0
  95. package/dist/chunk-QV7AS734.js +98 -0
  96. package/dist/chunk-QV7AS734.js.map +1 -0
  97. package/dist/chunk-RC24GP47.js +8 -0
  98. package/dist/chunk-RC24GP47.js.map +1 -0
  99. package/dist/chunk-RIB3ADHK.js +8 -0
  100. package/dist/chunk-RIB3ADHK.js.map +1 -0
  101. package/dist/chunk-RODK5NYM.js +3 -0
  102. package/dist/chunk-RODK5NYM.js.map +1 -0
  103. package/dist/chunk-SKQVJZMM.js +79 -0
  104. package/dist/chunk-SKQVJZMM.js.map +1 -0
  105. package/dist/chunk-SMUQZFJ7.js +179 -0
  106. package/dist/chunk-SMUQZFJ7.js.map +1 -0
  107. package/dist/chunk-SVIOO5V5.js +109 -0
  108. package/dist/chunk-SVIOO5V5.js.map +1 -0
  109. package/dist/chunk-SYW45KJ5.js +3 -0
  110. package/dist/chunk-SYW45KJ5.js.map +1 -0
  111. package/dist/chunk-T56AQZA4.js +3 -0
  112. package/dist/chunk-T56AQZA4.js.map +1 -0
  113. package/dist/chunk-TK6FAARU.js +12 -0
  114. package/dist/chunk-TK6FAARU.js.map +1 -0
  115. package/dist/chunk-TQOVKJLU.js +78 -0
  116. package/dist/chunk-TQOVKJLU.js.map +1 -0
  117. package/dist/chunk-U2FEV65D.js +8 -0
  118. package/dist/chunk-U2FEV65D.js.map +1 -0
  119. package/dist/chunk-UHX5TMH6.js +49 -0
  120. package/dist/chunk-UHX5TMH6.js.map +1 -0
  121. package/dist/chunk-VB3GA2KO.js +3 -0
  122. package/dist/chunk-VB3GA2KO.js.map +1 -0
  123. package/dist/chunk-VGZUAGCQ.js +8 -0
  124. package/dist/chunk-VGZUAGCQ.js.map +1 -0
  125. package/dist/chunk-VKUBJY23.js +8 -0
  126. package/dist/chunk-VKUBJY23.js.map +1 -0
  127. package/dist/chunk-VQ4FRNV3.js +8 -0
  128. package/dist/chunk-VQ4FRNV3.js.map +1 -0
  129. package/dist/chunk-W7RN6ITL.js +8 -0
  130. package/dist/chunk-W7RN6ITL.js.map +1 -0
  131. package/dist/chunk-WFHQPUFE.js +3 -0
  132. package/dist/chunk-WFHQPUFE.js.map +1 -0
  133. package/dist/chunk-XO7OW5TM.js +3 -0
  134. package/dist/chunk-XO7OW5TM.js.map +1 -0
  135. package/dist/chunk-YOBXV2EG.js +101 -0
  136. package/dist/chunk-YOBXV2EG.js.map +1 -0
  137. package/dist/chunk-YYDYVLVS.js +47 -0
  138. package/dist/chunk-YYDYVLVS.js.map +1 -0
  139. package/dist/chunk-Z4J4DQCF.js +8 -0
  140. package/dist/chunk-Z4J4DQCF.js.map +1 -0
  141. package/dist/chunk-ZHHORZMC.js +3 -0
  142. package/dist/chunk-ZHHORZMC.js.map +1 -0
  143. package/dist/cookie-banner.d.ts +1 -0
  144. package/dist/cookie-banner.js +3 -0
  145. package/dist/cookie-banner.js.map +1 -0
  146. package/dist/date-input.d.ts +1 -0
  147. package/dist/date-input.js +3 -0
  148. package/dist/date-input.js.map +1 -0
  149. package/dist/details.d.ts +1 -0
  150. package/dist/details.js +3 -0
  151. package/dist/details.js.map +1 -0
  152. package/dist/document-footer-metadata.d.ts +2 -0
  153. package/dist/document-footer-metadata.js +4 -0
  154. package/dist/document-footer-metadata.js.map +1 -0
  155. package/dist/error-message.d.ts +1 -0
  156. package/dist/error-message.js +4 -0
  157. package/dist/error-message.js.map +1 -0
  158. package/dist/error-summary.d.ts +3 -0
  159. package/dist/error-summary.js +4 -0
  160. package/dist/error-summary.js.map +1 -0
  161. package/dist/exit-this-page.d.ts +4 -0
  162. package/dist/exit-this-page.js +4 -0
  163. package/dist/exit-this-page.js.map +1 -0
  164. package/dist/feedback.d.ts +1 -0
  165. package/dist/feedback.js +3 -0
  166. package/dist/feedback.js.map +1 -0
  167. package/dist/fieldset.d.ts +1 -0
  168. package/dist/fieldset.js +3 -0
  169. package/dist/fieldset.js.map +1 -0
  170. package/dist/file-upload.d.ts +90 -0
  171. package/dist/file-upload.js +4 -0
  172. package/dist/file-upload.js.map +1 -0
  173. package/dist/footer.d.ts +1 -0
  174. package/dist/footer.js +3 -0
  175. package/dist/footer.js.map +1 -0
  176. package/dist/form-group.d.ts +1 -0
  177. package/dist/form-group.js +4 -0
  178. package/dist/form-group.js.map +1 -0
  179. package/dist/generic-header.d.ts +1 -0
  180. package/dist/generic-header.js +3 -0
  181. package/dist/generic-header.js.map +1 -0
  182. package/dist/grid-column.d.ts +1 -0
  183. package/dist/grid-column.js +4 -0
  184. package/dist/grid-column.js.map +1 -0
  185. package/dist/grid-row.d.ts +1 -0
  186. package/dist/grid-row.js +4 -0
  187. package/dist/grid-row.js.map +1 -0
  188. package/dist/header.d.ts +1 -0
  189. package/dist/header.js +3 -0
  190. package/dist/header.js.map +1 -0
  191. package/dist/heading.d.ts +1 -0
  192. package/dist/heading.js +4 -0
  193. package/dist/heading.js.map +1 -0
  194. package/dist/hint.d.ts +1 -0
  195. package/dist/hint.js +4 -0
  196. package/dist/hint.js.map +1 -0
  197. package/dist/index-7cuUiEo3.d.ts +98 -0
  198. package/dist/index-B8fw-F9t.d.ts +22 -0
  199. package/dist/index-BBckYYWt.d.ts +131 -0
  200. package/dist/index-BOPiKua4.d.ts +61 -0
  201. package/dist/index-BOfUYry5.d.ts +22 -0
  202. package/dist/index-BP18qbj1.d.ts +22 -0
  203. package/dist/index-BQaNJq4d.d.ts +22 -0
  204. package/dist/index-BnYaP7AC.d.ts +57 -0
  205. package/dist/index-C-c5LroN.d.ts +22 -0
  206. package/dist/index-CAxOsfPr.d.ts +22 -0
  207. package/dist/index-CHKQTetM.d.ts +52 -0
  208. package/dist/index-CWRQhs3p.d.ts +55 -0
  209. package/dist/index-CidkuScr.d.ts +22 -0
  210. package/dist/index-D-5h70y_.d.ts +22 -0
  211. package/dist/index-DDvVZ8mX.d.ts +22 -0
  212. package/dist/index-DQaFKwpy.d.ts +106 -0
  213. package/dist/index-DWibEGiF.d.ts +22 -0
  214. package/dist/index-D_wOwhn9.d.ts +127 -0
  215. package/dist/index-DhPVSZNZ.d.ts +40 -0
  216. package/dist/index-DhjWVeDK.d.ts +22 -0
  217. package/dist/index-DnvlWvry.d.ts +54 -0
  218. package/dist/index-Dr0S9iUZ.d.ts +22 -0
  219. package/dist/index-Dw9RbQVO.d.ts +22 -0
  220. package/dist/index-MxQB65RM.d.ts +48 -0
  221. package/dist/index-RZtIJBvk.d.ts +22 -0
  222. package/dist/index-TgEbRgDh.d.ts +22 -0
  223. package/dist/index-a8sYZpTj.d.ts +77 -0
  224. package/dist/index-rQaOtoWF.d.ts +59 -0
  225. package/dist/index-trAlT6HP.d.ts +22 -0
  226. package/dist/index-vBukON0x.d.ts +50 -0
  227. package/dist/index.d.ts +94 -0
  228. package/dist/index.js +61 -0
  229. package/dist/index.js.map +1 -0
  230. package/dist/input.d.ts +1 -0
  231. package/dist/input.js +3 -0
  232. package/dist/input.js.map +1 -0
  233. package/dist/inset-text.d.ts +1 -0
  234. package/dist/inset-text.js +4 -0
  235. package/dist/inset-text.js.map +1 -0
  236. package/dist/label.d.ts +1 -0
  237. package/dist/label.js +4 -0
  238. package/dist/label.js.map +1 -0
  239. package/dist/language-navigation.d.ts +1 -0
  240. package/dist/language-navigation.js +3 -0
  241. package/dist/language-navigation.js.map +1 -0
  242. package/dist/link.d.ts +1 -0
  243. package/dist/link.js +4 -0
  244. package/dist/link.js.map +1 -0
  245. package/dist/list.d.ts +1 -0
  246. package/dist/list.js +4 -0
  247. package/dist/list.js.map +1 -0
  248. package/dist/loading-box.d.ts +39 -0
  249. package/dist/loading-box.js +4 -0
  250. package/dist/loading-box.js.map +1 -0
  251. package/dist/main-wrapper.d.ts +1 -0
  252. package/dist/main-wrapper.js +4 -0
  253. package/dist/main-wrapper.js.map +1 -0
  254. package/dist/modal.d.ts +4 -0
  255. package/dist/modal.js +4 -0
  256. package/dist/modal.js.map +1 -0
  257. package/dist/notification-banner.d.ts +3 -0
  258. package/dist/notification-banner.js +4 -0
  259. package/dist/notification-banner.js.map +1 -0
  260. package/dist/page.d.ts +27 -0
  261. package/dist/page.js +7 -0
  262. package/dist/page.js.map +1 -0
  263. package/dist/pagination.d.ts +1 -0
  264. package/dist/pagination.js +3 -0
  265. package/dist/pagination.js.map +1 -0
  266. package/dist/panel.d.ts +1 -0
  267. package/dist/panel.js +3 -0
  268. package/dist/panel.js.map +1 -0
  269. package/dist/password-input.d.ts +4 -0
  270. package/dist/password-input.js +4 -0
  271. package/dist/password-input.js.map +1 -0
  272. package/dist/phase-banner.d.ts +1 -0
  273. package/dist/phase-banner.js +3 -0
  274. package/dist/phase-banner.js.map +1 -0
  275. package/dist/radios.d.ts +3 -0
  276. package/dist/radios.js +4 -0
  277. package/dist/radios.js.map +1 -0
  278. package/dist/related-items.d.ts +2 -0
  279. package/dist/related-items.js +4 -0
  280. package/dist/related-items.js.map +1 -0
  281. package/dist/search-box.d.ts +3 -0
  282. package/dist/search-box.js +4 -0
  283. package/dist/search-box.js.map +1 -0
  284. package/dist/section-break.d.ts +1 -0
  285. package/dist/section-break.js +4 -0
  286. package/dist/section-break.js.map +1 -0
  287. package/dist/select.d.ts +1 -0
  288. package/dist/select.js +3 -0
  289. package/dist/select.js.map +1 -0
  290. package/dist/service-navigation.d.ts +4 -0
  291. package/dist/service-navigation.js +4 -0
  292. package/dist/service-navigation.js.map +1 -0
  293. package/dist/skip-link.d.ts +16 -0
  294. package/dist/skip-link.js +4 -0
  295. package/dist/skip-link.js.map +1 -0
  296. package/dist/summary-list.d.ts +1 -0
  297. package/dist/summary-list.js +3 -0
  298. package/dist/summary-list.js.map +1 -0
  299. package/dist/table.d.ts +1 -0
  300. package/dist/table.js +3 -0
  301. package/dist/table.js.map +1 -0
  302. package/dist/tabs.d.ts +3 -0
  303. package/dist/tabs.js +4 -0
  304. package/dist/tabs.js.map +1 -0
  305. package/dist/tag.d.ts +1 -0
  306. package/dist/tag.js +4 -0
  307. package/dist/tag.js.map +1 -0
  308. package/dist/task-list.d.ts +1 -0
  309. package/dist/task-list.js +3 -0
  310. package/dist/task-list.js.map +1 -0
  311. package/dist/textarea.d.ts +1 -0
  312. package/dist/textarea.js +3 -0
  313. package/dist/textarea.js.map +1 -0
  314. package/dist/visually-hidden.d.ts +1 -0
  315. package/dist/visually-hidden.js +4 -0
  316. package/dist/visually-hidden.js.map +1 -0
  317. package/dist/warning-text.d.ts +1 -0
  318. package/dist/warning-text.js +3 -0
  319. package/dist/warning-text.js.map +1 -0
  320. package/dist/width-container.d.ts +1 -0
  321. package/dist/width-container.js +4 -0
  322. package/dist/width-container.js.map +1 -0
  323. package/package.json +38 -66
  324. package/dist/declarations/src/index.d.ts +0 -52
  325. package/dist/govuk-react.cjs.d.ts +0 -2
  326. package/dist/govuk-react.cjs.d.ts.map +0 -1
  327. package/dist/govuk-react.cjs.dev.js +0 -351
  328. package/dist/govuk-react.cjs.js +0 -7
  329. package/dist/govuk-react.cjs.prod.js +0 -351
  330. package/dist/govuk-react.esm.js +0 -51
  331. package/src/index.ts +0 -56
  332. package/src/test.tsx +0 -56
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Alasdair McLeay
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # govuk-react
2
2
 
3
- An implementation of the [GOV.UK Design System](https://govuk-design-system-production.cloudapps.digital) in [React](https://reactjs.org) using [CSSinJS](https://medium.com/seek-blog/a-unified-styling-language-d0c208de2660) using Object notation (with [styled-components](https://www.styled-components.com/docs/advanced#style-objects)).
3
+ An implementation of the [GOV.UK Design System](https://design-system.service.gov.uk) in [React](https://react.dev), built on [govuk-frontend-react](https://github.com/govuk-react/govuk-frontend-react) and styled by govuk-frontend's CSS.
4
4
 
5
5
  [![codecov](https://codecov.io/gh/govuk-react/govuk-react/branch/master/graph/badge.svg)](https://codecov.io/gh/govuk-react/govuk-react)
6
6
  [![Join the community on Spectrum](https://withspectrum.github.io/badge/badge.svg)](https://spectrum.chat/govuk-react)
@@ -17,62 +17,78 @@ We aim to track the following projects (in priority order) as to which component
17
17
  This project is being or has been used by:
18
18
 
19
19
  - [Connected Open Government Statistics](https://github.com/GSS-Cogs/chart-builder) [2](https://github.com/GSS-Cogs/dd-cms)
20
+ - [Data to Insight](https://github.com/data-to-insight/quality-lac-data-beta)
20
21
  - [Department for Education](https://github.com/DFE-Digital/meeting-timer)
21
22
  - [Department for Environment, Food & Rural Affairs](https://github.com/atoscerebro/defra-wtp) [2](https://github.com/DEFRA/eutd-mmo-cc-external-frontend)
22
23
  - [Department for International Trade](https://github.com/uktrade/data-science-frontend) [2](https://github.com/uktrade/data-hub-frontend) [3](https://github.com/uktrade/statement-of-works) [4](https://github.com/uktrade/data-hub-components)
23
24
  - [Department of Business, Energy and Industrial Strategy](https://github.com/UKGovernmentBEIS/beis-cosmetics-spa)
24
- - [Department of Health](https://github.com/DepartmentOfHealth-htbhf/htbhf-management-web-ui-spike)
25
+ - [Department for Energy Security and Net Zero](https://github.com/Integrated-Corporate-Services/desnz-syeia-frontend-beta)
26
+ - [Department of Health and Social Care](https://github.com/DepartmentOfHealth-htbhf/htbhf-management-web-ui-spike) [2](https://github.com/dhsc-govuk/FingertipsNext) [3](https://github.com/dhsc-govuk/HealthyBabies) [4](https://github.com/dhsc-govuk/gamblinglevy)
25
27
  - [Department for Environment, Food and Rural Affairs](https://github.com/DEFRA/eutd-mmo-cc-external-frontend)
26
- - [Department for Transport](https://github.com/fares-data-build-tool/fdbt-admin)
28
+ - [Department for Transport](https://github.com/fares-data-build-tool/fdbt-admin) [2](https://github.com/department-for-transport-BODS/create-disruptions-data) [3](https://github.com/department-for-transport-BODS/publish-devolved-bus-registration-data)
29
+ - [Driver and Vehicle Licensing Agency](https://github.com/dvla/lab-gen-ui)
27
30
  - [Food Standards Agency](https://github.com/FoodStandardsAgency/register-a-food-business-healthcheck-dashboard) [2](https://github.com/FSA-Civica/govuk-react/tree/slice-and-dice-packages/base)
28
31
  - [HM Courts & Tribunals Service](https://github.com/hmcts/mytime-frontend) [2](https://github.com/hmcts/rse-next-prototype)
29
32
  - [HM Land Registry](https://github.com/LandRegistry/title-token)
30
33
  - [HM Passport Office](https://github.com/UKHomeOffice/lev-react-components)
31
- - [HM Prison and Probation Services](https://github.com/ministryofjustice/prisonstaffhub) [2](https://github.com/ministryofjustice/prison-services-feedback-and-support)
34
+ - [HM Prison and Probation Services](https://github.com/ministryofjustice/prisonstaffhub) [2](https://github.com/ministryofjustice/prison-services-feedback-and-support) [3](https://github.com/ministryofjustice/digital-prison-services)
32
35
  - [Home Office](https://github.com/UKHomeOffice/system-register) [2]
33
36
  - [Made Tech](https://github.com/madetech/govuk-react-form) [2](https://github.com/madetech/academy20-zingtech-frontend)
34
37
  - [Ministry of Justice](https://github.com/ministryofjustice/manage-key-workers) [2](https://github.com/ministryofjustice/bichard7-next-ui)
35
38
  - [London Borough of Hackney](https://github.com/LBHackney-IT/document-evidence-store-frontend)
36
39
  - [Public Health England/UK Health Security Agency](https://web.archive.org/web/20220216110415if_/https://get-home-lateral-flow-testing-kit.service.gov.uk/static/js/2.dad2ad18.chunk.js.map)
37
40
  - [Skills Funding Agency](https://github.com/SkillsFundingAgency/CFS-Frontend) [2](https://github.com/SkillsFundingAgency/das-qna-config)
41
+ - [UK Research and Innovation](https://github.com/ukriorg/ukripoc-application) [2](https://github.com/ukriorg/ukripoc-opportunity) [3](https://github.com/ukriorg/ukripoc-front-door)
38
42
 
39
43
  The project is currently maintained for free by a small number of volunteers. If you would like to contribute, help maintain or sponsor this project, please get in touch via [Discussions](https://github.com/govuk-react/govuk-react/discussions) or [Twitter](https://twitter.com/penx).
40
44
 
41
45
  ## Usage
42
46
 
43
47
  ```sh
44
- npm install govuk-react styled-components @types/styled-components --save
48
+ npm install govuk-react govuk-frontend
49
+ ```
50
+
51
+ Load govuk-frontend's CSS once in your app:
52
+
53
+ ```js
54
+ import 'govuk-frontend/dist/govuk/govuk-frontend.min.css';
45
55
  ```
46
56
 
47
57
  ```jsx
48
- import { Button } from 'govuk-react'
58
+ import { Button } from 'govuk-react';
49
59
 
50
- const MyComponent = ({title}) => (<div>
51
- <h1>{title}</h1>
52
- <Button />
53
- </div>)
60
+ const MyComponent = ({ title }) => (
61
+ <div>
62
+ <h1>{title}</h1>
63
+ <Button>Save and continue</Button>
64
+ </div>
65
+ );
54
66
  ```
55
67
 
56
68
  See the [Storybook](https://govuk-react.github.io/govuk-react) for examples of all available components.
57
69
 
58
70
  Also see the [Example Application](packages/example-application/src) for basic usage.
59
71
 
60
- ## Using Link with a Router Link
72
+ ## Fonts and images
73
+
74
+ govuk-frontend's CSS loads its fonts and images from `/assets`. Serve `node_modules/govuk-frontend/dist/govuk/assets` at `/assets`, or copy its `fonts` and `images` folders and `manifest.json` into your app's `assets` folder. See govuk-frontend's guide to [importing font and images assets](https://frontend.design-system.service.gov.uk/import-font-and-images-assets/).
75
+
76
+ "If your service is on the service.gov.uk subdomain you must use the GDS Transport font."
61
77
 
62
- We provide a Link component which creates an element styled as a GDS link. As we are using styled-components it is possible to apply that style to an existing component using the `as` prop. Other props will be passed through.
78
+ "If your service is publicly available on a subdomain other than service.gov.uk, use an alternative typeface." See the Design System's [typeface guidance](https://design-system.service.gov.uk/styles/typeface/) and [using GOV.UK Frontend without GOV.UK branding](https://frontend.design-system.service.gov.uk/using-govuk-frontend-without-govuk-branding/), which sets `$govuk-font-family` with govuk-frontend's Sass API.
79
+
80
+ ## Using Link with a Router Link
63
81
 
64
- For example;
82
+ `Link`, `BackLink` and the navigation link parts take `asChild`, which applies their classes to your router link instead of rendering an `a`:
65
83
 
66
84
  ```jsx
67
- import { BrowserRouter, Link as RouterLink } from 'react-router';
68
- import { Link } from '@govuk-react/link';
85
+ import { Link as RouterLink } from 'react-router';
86
+ import { Link } from 'govuk-react/link';
69
87
 
70
88
  const MyComponent = () => (
71
- <nav>
72
- <BrowserRouter>
73
- <Link as={RouterLink} to="https://example.com">example</Link>
74
- </BrowserRouter>
75
- </nav>
89
+ <Link asChild>
90
+ <RouterLink to="/page">Page</RouterLink>
91
+ </Link>
76
92
  );
77
93
  ```
78
94
 
@@ -80,45 +96,22 @@ const MyComponent = () => (
80
96
 
81
97
  Use of these components assumes the following from the peer project:
82
98
 
83
- - The govuk-react `GlobalStyle` component is included on all pages.
84
- - The GDS Transport font face is included ([for gov.uk domains only](https://www.gov.uk/service-manual/design/making-your-service-look-like-govuk))
85
- - Optionally, either [normalize.css](https://necolas.github.io/normalize.css/) or [sanitize.css](https://csstools.github.io/sanitize.css/) is used as a CSS reset. We don't test for this, so please raise an issue if you find any problems with compatibility.
86
- - Other than the reset, no other styles affecting generic elements (without classes, IDs etc) are present in the CSS.
99
+ - `govuk-frontend` is installed and its CSS (`govuk-frontend/dist/govuk/govuk-frontend.min.css`) is loaded.
100
+ - govuk-frontend's font and image assets are served at `/assets` (see [Fonts and images](#fonts-and-images)).
101
+ - No other styles affecting generic elements (without classes, IDs etc) are present in the CSS.
87
102
 
88
- ## Why CSS-in-JS?
103
+ ## Imports
89
104
 
90
- See [A Unified Styling Language](https://medium.com/seek-blog/a-unified-styling-language-d0c208de2660).
91
-
92
- This project is part of a larger initiative to componetise large scale React applications. Using CSSinJS allows us to include styles inside a module bundle that can be published (using `npm publish`) and consumed by a peer application, without putting dependencies on the peer application to implement a specific CSS build system.
93
-
94
- ## Why not use GDS styles/classes directly
95
-
96
- 1. We want to be free to write different DOM structure and/or CSS that is more in keeping with a React and bem-ish architecture. (e.g. in React you often don't need to specify IDs for field inputs, and can wrap inputs with labels so that they are automatically associated. We want to leave the decision of whether to use input IDs to the parent project. GDS styles don't wrap inputs with labels and require IDs and for attributes).
97
- 2. We want a parent project to not have to worry about a specific build system (e.g. for handling `import styles.css`, particularly if you want universal support) or including certain CSS files. We want a simple `npm install govuk-react` to be enough to get govuk styled components on to your page, irrespective of your build system.
98
- 3. We want to distribute React applications as modules that have self contained styles. CSS in JS allows all styles to be contained in distributable JS modules that can be ported across projects.
99
-
100
- ## Why is this a monorepo?
101
-
102
- Components are published to npm independently. This means users have the ability to upgrade govuk-react and still use older components.
103
-
104
- This is particularly relevant in a large application where:
105
-
106
- - some code is reliant on a component that has either been deprecated or had breaking changes
107
- - you aren't able to refactor the existing code, e.g. it is a large job or managed by another team
108
- - you don't want to hold back from upgrading to the newest version of govuk-react
109
-
110
- e.g. for DateField, you import it separately as follows:
105
+ Import from the package root, or from a component's own subpath:
111
106
 
112
107
  ```js
113
- import { H1, Paragraph } from 'govuk-react';
114
- import DateField from '@govuk-react/date-field';
108
+ import { Body, Heading } from 'govuk-react';
109
+ import * as DateInput from 'govuk-react/date-input';
115
110
  ```
116
111
 
117
- Then in your package.json, you can update govuk-react, but specify the older version of '@govuk-react/date-field'.
118
-
119
- ## About the GDS font
112
+ ## Migrating to 1.0
120
113
 
121
- Unfortunately the GDS transport font has a relatively restrictive license [described on the gov.uk blog](https://designnotes.blog.gov.uk/2015/03/11/can-i-use-the-gov-uk-fonts/). We are investigating rendering an elegant alternative before falling back to Arial on [issue 272](https://github.com/govuk-react/govuk-react/issues/272).
114
+ See [MIGRATION.md](MIGRATION.md).
122
115
 
123
116
  ## Related sites and projects
124
117
 
@@ -0,0 +1,4 @@
1
+ import 'react';
2
+ import '@govuk-react/primitives/accordion';
3
+ export { SectionHeader, SectionHeaderProps, SectionHeading, SectionHeadingProps } from 'govuk-frontend-react/accordion';
4
+ export { C as Composite, a as CompositeProps, b as Controls, c as ControlsProps, R as Root, d as RootProps, S as Section, e as SectionButton, f as SectionButtonProps, g as SectionComposite, h as SectionCompositeProps, j as SectionContent, k as SectionContentProps, l as SectionProps, m as SectionSummary, n as SectionSummaryProps } from './index-7cuUiEo3.js';
@@ -0,0 +1,4 @@
1
+ export { Composite, Controls, Root, Section, SectionButton, SectionComposite, SectionContent, SectionHeader, SectionHeading, SectionSummary } from './chunk-YOBXV2EG.js';
2
+ import './chunk-PZ5AY32C.js';
3
+ //# sourceMappingURL=accordion.js.map
4
+ //# sourceMappingURL=accordion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"accordion.js"}
@@ -0,0 +1,21 @@
1
+ export { BackLink, BackLinkProps } from 'govuk-frontend-react/back-link';
2
+ import 'govuk-frontend-react/body';
3
+ import 'govuk-frontend-react/caption';
4
+ import 'govuk-frontend-react/error-message';
5
+ import 'govuk-frontend-react/form-group';
6
+ import 'govuk-frontend-react/grid';
7
+ import 'govuk-frontend-react/heading';
8
+ import 'govuk-frontend-react/hint';
9
+ import 'govuk-frontend-react/input';
10
+ import 'govuk-frontend-react/inset-text';
11
+ import 'govuk-frontend-react/label';
12
+ import 'govuk-frontend-react/link';
13
+ import 'govuk-frontend-react/list';
14
+ import 'govuk-frontend-react/main-wrapper';
15
+ import 'govuk-frontend-react/section-break';
16
+ import 'govuk-frontend-react/select';
17
+ import 'govuk-frontend-react/tag';
18
+ import 'govuk-frontend-react/textarea';
19
+ import 'govuk-frontend-react/visually-hidden';
20
+ import 'govuk-frontend-react/warning-text';
21
+ import 'govuk-frontend-react/width-container';
@@ -0,0 +1,4 @@
1
+ export { BackLink } from './chunk-NV2BSK6G.js';
2
+ import './chunk-PZ5AY32C.js';
3
+ //# sourceMappingURL=back-link.js.map
4
+ //# sourceMappingURL=back-link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"back-link.js"}
package/dist/body.d.ts ADDED
@@ -0,0 +1 @@
1
+ export { Body, BodyProps } from 'govuk-frontend-react/body';
package/dist/body.js ADDED
@@ -0,0 +1,4 @@
1
+ export { Body } from './chunk-IFETUZ4S.js';
2
+ import './chunk-PZ5AY32C.js';
3
+ //# sourceMappingURL=body.js.map
4
+ //# sourceMappingURL=body.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"body.js"}
@@ -0,0 +1 @@
1
+ export * from 'govuk-frontend-react/breadcrumbs';
@@ -0,0 +1,3 @@
1
+ import './chunk-EMNBPB3L.js';
2
+ //# sourceMappingURL=breadcrumbs.js.map
3
+ //# sourceMappingURL=breadcrumbs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"breadcrumbs.js"}
@@ -0,0 +1,26 @@
1
+ import { ReactNode, ElementType } from 'react';
2
+ import { ButtonLinkProps, ButtonProps } from 'govuk-frontend-react/button';
3
+ export { ButtonLinkProps, ButtonProps, ButtonVariant, StartButtonContent, StartButtonIcon, StartButtonIconProps } from 'govuk-frontend-react/button';
4
+
5
+ /**
6
+ * Use the button component to help users carry out an action.
7
+ *
8
+ * As in govuk-frontend, with `preventDoubleClick` a second click within a second is ignored, and
9
+ * Space activates a link button.
10
+ *
11
+ * @see https://design-system.service.gov.uk/components/button/
12
+ */
13
+ declare function Button(props: ButtonLinkProps): ReactNode;
14
+ declare function Button<As extends ElementType = 'button'>(props: ButtonProps<As>): ReactNode;
15
+ /**
16
+ * Use a start button for the main call to action on your service's start page.
17
+ *
18
+ * As in govuk-frontend, with `preventDoubleClick` a second click within a second is ignored, and
19
+ * Space activates a link button.
20
+ *
21
+ * @see https://design-system.service.gov.uk/components/button/#start-buttons
22
+ */
23
+ declare function StartButton(props: Omit<ButtonLinkProps, 'start'>): ReactNode;
24
+ declare function StartButton<As extends ElementType = 'button'>(props: Omit<ButtonProps<As>, 'start'>): ReactNode;
25
+
26
+ export { Button, StartButton };
package/dist/button.js ADDED
@@ -0,0 +1,4 @@
1
+ export { Button, StartButton, StartButtonContent, StartButtonIcon } from './chunk-BDIDAVNV.js';
2
+ import './chunk-PZ5AY32C.js';
3
+ //# sourceMappingURL=button.js.map
4
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"button.js"}
@@ -0,0 +1 @@
1
+ export { Caption, CaptionProps } from 'govuk-frontend-react/caption';
@@ -0,0 +1,4 @@
1
+ export { Caption } from './chunk-ZHHORZMC.js';
2
+ import './chunk-PZ5AY32C.js';
3
+ //# sourceMappingURL=caption.js.map
4
+ //# sourceMappingURL=caption.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"caption.js"}
@@ -0,0 +1,4 @@
1
+ import 'react';
2
+ import '@govuk-react/primitives/character-count';
3
+ import 'govuk-frontend-react/character-count';
4
+ export { F as Field, a as FieldProps, M as Message, b as MessageProps, R as Root, c as RootProps, S as ScreenReaderStatus, d as ScreenReaderStatusProps, e as Status, f as StatusProps, T as Textarea, g as TextareaProps } from './index-BnYaP7AC.js';
@@ -0,0 +1,4 @@
1
+ export { Field, Message, Root, ScreenReaderStatus, Status, Textarea } from './chunk-OCGJIH5X.js';
2
+ import './chunk-PZ5AY32C.js';
3
+ //# sourceMappingURL=character-count.js.map
4
+ //# sourceMappingURL=character-count.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"character-count.js"}
@@ -0,0 +1,3 @@
1
+ import 'react';
2
+ export { Divider, DividerProps, Hint, HintProps, Item, ItemProps, Label, LabelProps } from 'govuk-frontend-react/checkboxes';
3
+ export { C as Conditional, a as ConditionalProps, F as Field, b as FieldProps, I as Input, c as InputProps, d as ItemComposite, e as ItemCompositeProps, R as Root, f as RootProps, g as checkboxesCss } from './index-a8sYZpTj.js';
@@ -0,0 +1,4 @@
1
+ export { Conditional, Divider, Field, Hint, Input, Item, ItemComposite, Label, Root, checkboxesCss } from './chunk-HRURRTAU.js';
2
+ import './chunk-PZ5AY32C.js';
3
+ //# sourceMappingURL=checkboxes.js.map
4
+ //# sourceMappingURL=checkboxes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"checkboxes.js"}
@@ -0,0 +1,3 @@
1
+ export { WidthContainer } from 'govuk-frontend-react/width-container';
2
+ //# sourceMappingURL=chunk-2KPHO7N2.js.map
3
+ //# sourceMappingURL=chunk-2KPHO7N2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-2KPHO7N2.js","sourcesContent":[]}
@@ -0,0 +1,3 @@
1
+ export * from 'govuk-frontend-react/select';
2
+ //# sourceMappingURL=chunk-2W35PR6E.js.map
3
+ //# sourceMappingURL=chunk-2W35PR6E.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-2W35PR6E.js","sourcesContent":[]}
@@ -0,0 +1,38 @@
1
+ import { __export } from './chunk-PZ5AY32C.js';
2
+ import * as React from 'react';
3
+ import * as AutoFocus from '@govuk-react/primitives/auto-focus';
4
+ import * as FocusLinks from '@govuk-react/primitives/focus-links';
5
+ import * as Markup from 'govuk-frontend-react/error-summary';
6
+ import { Title, ListItemLink, ListItemComposite, ListItem, List, Description, Body, Alert } from 'govuk-frontend-react/error-summary';
7
+ export { Alert, Body, Description, List, ListItem, ListItemComposite, ListItemLink, Title } from 'govuk-frontend-react/error-summary';
8
+
9
+ // src/components/error-summary/index.tsx
10
+ var error_summary_exports = {};
11
+ __export(error_summary_exports, {
12
+ Alert: () => Alert,
13
+ Body: () => Body,
14
+ Composite: () => Composite,
15
+ Description: () => Description,
16
+ List: () => List,
17
+ ListItem: () => ListItem,
18
+ ListItemComposite: () => ListItemComposite,
19
+ ListItemLink: () => ListItemLink,
20
+ Root: () => Root4,
21
+ Title: () => Title
22
+ });
23
+ function Root4({ disableAutoFocus, ...props }) {
24
+ return /* @__PURE__ */ React.createElement(FocusLinks.Root, null, /* @__PURE__ */ React.createElement(AutoFocus.Root, { disabled: disableAutoFocus }, /* @__PURE__ */ React.createElement(AutoFocus.Target, { asChild: true, disabled: disableAutoFocus }, /* @__PURE__ */ React.createElement(Markup.Root, { disableAutoFocus, ...props }))));
25
+ }
26
+ var hasContent = (node) => {
27
+ if (node === null || node === void 0 || node === false || node === true || node === "") return false;
28
+ if (Array.isArray(node)) return node.some(hasContent);
29
+ return true;
30
+ };
31
+ function Composite({ title, description, errors, children, ...props }) {
32
+ const list = errors ? errors.map((item, index) => /* @__PURE__ */ React.createElement(Markup.ListItemComposite, { key: index, ...item })) : children;
33
+ return /* @__PURE__ */ React.createElement(Root4, { ...props }, /* @__PURE__ */ React.createElement(Markup.Alert, null, /* @__PURE__ */ React.createElement(Markup.Title, null, title), /* @__PURE__ */ React.createElement(Markup.Body, null, hasContent(description) && /* @__PURE__ */ React.createElement(Markup.Description, null, description), hasContent(list) && /* @__PURE__ */ React.createElement(Markup.List, null, list))));
34
+ }
35
+
36
+ export { Composite, Root4 as Root, error_summary_exports };
37
+ //# sourceMappingURL=chunk-57K6B6V2.js.map
38
+ //# sourceMappingURL=chunk-57K6B6V2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/error-summary/index.tsx"],"names":["Alert","Body","Description","List","ListItemComposite","Root","Title"],"mappings":";;;;;;;;;AAAA,IAAA,qBAAA,GAAA;AAAA,QAAA,CAAA,qBAAA,EAAA;AAAA,EAAA,KAAA,EAAA,MAAAA,KAAAA;AAAA,EAAA,IAAA,EAAA,MAAAC,IAAAA;AAAA,EAAA,SAAA,EAAA,MAAA,SAAA;AAAA,EAAA,WAAA,EAAA,MAAAC,WAAAA;AAAA,EAAA,IAAA,EAAA,MAAAC,IAAAA;AAAA,EAAA,QAAA,EAAA,MAAA,QAAA;AAAA,EAAA,iBAAA,EAAA,MAAAC,iBAAAA;AAAA,EAAA,YAAA,EAAA,MAAA,YAAA;AAAA,EAAA,IAAA,EAAA,MAAAC,KAAAA;AAAA,EAAA,KAAA,EAAA,MAAAC;AAAA,CAAA,CAAA;AAwCO,SAASD,KAAAA,CAAK,EAAE,gBAAA,EAAkB,GAAG,OAAM,EAAc;AAC9D,EAAA,uBACE,KAAA,CAAA,aAAA,CAAY,iBAAX,IAAA,kBACC,KAAA,CAAA,aAAA,CAAW,gBAAV,EAAe,QAAA,EAAU,gBAAA,EAAA,kBACxB,KAAA,CAAA,aAAA,CAAW,SAAA,CAAA,MAAA,EAAV,EAAiB,SAAO,IAAA,EAAC,QAAA,EAAU,gBAAA,EAAA,kBAClC,KAAA,CAAA,aAAA,CAAQ,MAAA,CAAA,IAAA,EAAP,EAAY,kBAAqC,GAAG,KAAA,EAAO,CAC9D,CACF,CACF,CAAA;AAEJ;AAIA,IAAM,UAAA,GAAa,CAAC,IAAA,KAAmC;AACrD,EAAA,IAAI,IAAA,KAAS,IAAA,IAAQ,IAAA,KAAS,MAAA,IAAa,IAAA,KAAS,SAAS,IAAA,KAAS,IAAA,IAAQ,IAAA,KAAS,EAAA,EAAI,OAAO,KAAA;AAClG,EAAA,IAAI,MAAM,OAAA,CAAQ,IAAI,GAAG,OAAO,IAAA,CAAK,KAAK,UAAU,CAAA;AACpD,EAAA,OAAO,IAAA;AACT,CAAA;AASO,SAAS,SAAA,CAAU,EAAE,KAAA,EAAO,WAAA,EAAa,QAAQ,QAAA,EAAU,GAAG,OAAM,EAAmB;AAC5F,EAAA,MAAM,IAAA,GAAO,MAAA,GAAS,MAAA,CAAO,GAAA,CAAI,CAAC,IAAA,EAAM,KAAA,qBAAU,KAAA,CAAA,aAAA,CAAQ,MAAA,CAAA,iBAAA,EAAP,EAAyB,GAAA,EAAK,KAAA,EAAQ,GAAG,IAAA,EAAM,CAAE,CAAA,GAAI,QAAA;AACxG,EAAA,uBACE,KAAA,CAAA,aAAA,CAACA,KAAAA,EAAA,EAAM,GAAG,yBACR,KAAA,CAAA,aAAA,CAAQ,MAAA,CAAA,KAAA,EAAP,IAAA,kBACC,KAAA,CAAA,aAAA,CAAQ,MAAA,CAAA,KAAA,EAAP,IAAA,EAAc,KAAM,CAAA,sCACb,MAAA,CAAA,IAAA,EAAP,IAAA,EACE,UAAA,CAAW,WAAW,CAAA,oBAAK,KAAA,CAAA,aAAA,CAAQ,MAAA,CAAA,WAAA,EAAP,IAAA,EAAoB,WAAY,CAAA,EAC5D,UAAA,CAAW,IAAI,CAAA,wCAAa,MAAA,CAAA,IAAA,EAAP,IAAA,EAAa,IAAK,CAC1C,CACF,CACF,CAAA;AAEJ","file":"chunk-57K6B6V2.js","sourcesContent":["import * as React from 'react';\nimport * as AutoFocus from '@govuk-react/primitives/auto-focus';\nimport * as FocusLinks from '@govuk-react/primitives/focus-links';\nimport * as Markup from 'govuk-frontend-react/error-summary';\n\n/*\n * govuk-frontend-react's ErrorSummary markup, with govuk-frontend's focus behaviour from\n * @govuk-react/primitives. The summary takes focus when it appears, and is rendered with\n * `autofocus`, so it takes focus when the page loads even without JavaScript. Its links move focus\n * to the field, with its label or legend in view.\n */\n\nexport {\n Alert,\n Title,\n Body,\n Description,\n List,\n ListItem,\n ListItemLink,\n ListItemComposite,\n type AlertProps,\n type TitleProps,\n type BodyProps,\n type DescriptionProps,\n type ListProps,\n type ListItemProps,\n type ListItemCompositeProps,\n} from 'govuk-frontend-react/error-summary';\n\nexport type RootProps = Markup.RootProps;\n\n/**\n * Use an error summary when there is a validation error.\n *\n * It takes focus when it appears. To move focus to it again, such as after another invalid submit,\n * give it a new `key`.\n *\n * @see https://design-system.service.gov.uk/components/error-summary/\n */\nexport function Root({ disableAutoFocus, ...props }: RootProps) {\n return (\n <FocusLinks.Root>\n <AutoFocus.Root disabled={disableAutoFocus}>\n <AutoFocus.Target asChild disabled={disableAutoFocus}>\n <Markup.Root disableAutoFocus={disableAutoFocus} {...props} />\n </AutoFocus.Target>\n </AutoFocus.Root>\n </FocusLinks.Root>\n );\n}\n\nexport type CompositeProps = Markup.CompositeProps;\n\nconst hasContent = (node: React.ReactNode): boolean => {\n if (node === null || node === undefined || node === false || node === true || node === '') return false;\n if (Array.isArray(node)) return node.some(hasContent);\n return true;\n};\n\n/**\n * Use an error summary when there is a validation error.\n *\n * Children are `ListItemComposite`s.\n *\n * @see https://design-system.service.gov.uk/components/error-summary/\n */\nexport function Composite({ title, description, errors, children, ...props }: CompositeProps) {\n const list = errors ? errors.map((item, index) => <Markup.ListItemComposite key={index} {...item} />) : children;\n return (\n <Root {...props}>\n <Markup.Alert>\n <Markup.Title>{title}</Markup.Title>\n <Markup.Body>\n {hasContent(description) && <Markup.Description>{description}</Markup.Description>}\n {hasContent(list) && <Markup.List>{list}</Markup.List>}\n </Markup.Body>\n </Markup.Alert>\n </Root>\n );\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export * from 'govuk-frontend-react/warning-text';
2
+ //# sourceMappingURL=chunk-5RYJUAI3.js.map
3
+ //# sourceMappingURL=chunk-5RYJUAI3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-5RYJUAI3.js","sourcesContent":[]}
@@ -0,0 +1,3 @@
1
+ export { Link } from 'govuk-frontend-react/link';
2
+ //# sourceMappingURL=chunk-5YT2PQAF.js.map
3
+ //# sourceMappingURL=chunk-5YT2PQAF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-5YT2PQAF.js","sourcesContent":[]}
@@ -0,0 +1,8 @@
1
+ export * from 'govuk-frontend-react/phase-banner';
2
+
3
+ // src/components/phase-banner/index.tsx
4
+ var phase_banner_exports = {};
5
+
6
+ export { phase_banner_exports };
7
+ //# sourceMappingURL=chunk-B33BQUXM.js.map
8
+ //# sourceMappingURL=chunk-B33BQUXM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/phase-banner/index.tsx"],"names":[],"mappings":";;;AAAA,IAAA,oBAAA,GAAA","file":"chunk-B33BQUXM.js","sourcesContent":["export * from 'govuk-frontend-react/phase-banner';\n"]}
@@ -0,0 +1,41 @@
1
+ import { __export } from './chunk-PZ5AY32C.js';
2
+ import * as React from 'react';
3
+ import { clsx } from 'clsx';
4
+
5
+ // src/components/document-footer-metadata/index.tsx
6
+ var document_footer_metadata_exports = {};
7
+ __export(document_footer_metadata_exports, {
8
+ Composite: () => Composite,
9
+ Definition: () => Definition,
10
+ ItemComposite: () => ItemComposite,
11
+ Root: () => Root,
12
+ Term: () => Term
13
+ });
14
+ function Root({ className, ...props }) {
15
+ return /* @__PURE__ */ React.createElement("dl", { className: clsx("govuk-body", className), ...props });
16
+ }
17
+ function Term({ className, ...props }) {
18
+ return /* @__PURE__ */ React.createElement("dt", { className: clsx("govuk-!-margin-bottom-1", className), ...props });
19
+ }
20
+ function Definition({ className, ...props }) {
21
+ return /* @__PURE__ */ React.createElement(
22
+ "dd",
23
+ {
24
+ className: clsx("govuk-!-font-weight-bold", "govuk-!-margin-left-0", "govuk-!-margin-bottom-2", className),
25
+ ...props
26
+ }
27
+ );
28
+ }
29
+ function ItemComposite({ term, definitions }) {
30
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Term, null, term, ":"), definitions.map((definition, index) => /* @__PURE__ */ React.createElement(Definition, { key: index }, definition)));
31
+ }
32
+ function Composite({ from, partOf, other, children, ...props }) {
33
+ return /* @__PURE__ */ React.createElement(Root, { ...props }, from && from.length > 0 && /* @__PURE__ */ React.createElement(ItemComposite, { term: "From", definitions: from }), partOf && partOf.length > 0 && /* @__PURE__ */ React.createElement(ItemComposite, { term: "Part of", definitions: partOf }), other == null ? void 0 : other.map((item, index) => {
34
+ var _a;
35
+ return /* @__PURE__ */ React.createElement(ItemComposite, { key: (_a = item.id) != null ? _a : index, term: item.title, definitions: [item.content] });
36
+ }), children);
37
+ }
38
+
39
+ export { Composite, Definition, ItemComposite, Root, Term, document_footer_metadata_exports };
40
+ //# sourceMappingURL=chunk-BAXFWXMR.js.map
41
+ //# sourceMappingURL=chunk-BAXFWXMR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/document-footer-metadata/index.tsx"],"names":[],"mappings":";;;;;AAAA,IAAA,gCAAA,GAAA;AAAA,QAAA,CAAA,gCAAA,EAAA;AAAA,EAAA,SAAA,EAAA,MAAA,SAAA;AAAA,EAAA,UAAA,EAAA,MAAA,UAAA;AAAA,EAAA,aAAA,EAAA,MAAA,aAAA;AAAA,EAAA,IAAA,EAAA,MAAA,IAAA;AAAA,EAAA,IAAA,EAAA,MAAA;AAAA,CAAA,CAAA;AAOO,SAAS,IAAA,CAAK,EAAE,SAAA,EAAW,GAAG,OAAM,EAAc;AACvD,EAAA,uBAAO,KAAA,CAAA,aAAA,CAAC,QAAG,SAAA,EAAW,IAAA,CAAK,cAAc,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AAClE;AAIO,SAAS,IAAA,CAAK,EAAE,SAAA,EAAW,GAAG,OAAM,EAAc;AACvD,EAAA,uBAAO,KAAA,CAAA,aAAA,CAAC,QAAG,SAAA,EAAW,IAAA,CAAK,2BAA2B,SAAS,CAAA,EAAI,GAAG,KAAA,EAAO,CAAA;AAC/E;AAIO,SAAS,UAAA,CAAW,EAAE,SAAA,EAAW,GAAG,OAAM,EAAoB;AACnE,EAAA,uBACE,KAAA,CAAA,aAAA;AAAA,IAAC,IAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,IAAA,CAAK,0BAAA,EAA4B,uBAAA,EAAyB,2BAA2B,SAAS,CAAA;AAAA,MACxG,GAAG;AAAA;AAAA,GACN;AAEJ;AAUO,SAAS,aAAA,CAAc,EAAE,IAAA,EAAM,WAAA,EAAY,EAAuB;AACvE,EAAA,iFAEI,KAAA,CAAA,aAAA,CAAC,IAAA,EAAA,IAAA,EAAM,IAAA,EAAK,GAAC,GACZ,WAAA,CAAY,GAAA,CAAI,CAAC,UAAA,EAAY,0BAC5B,KAAA,CAAA,aAAA,CAAC,UAAA,EAAA,EAAW,KAAK,KAAA,EAAA,EAAQ,UAAW,CACrC,CACH,CAAA;AAEJ;AAgBO,SAAS,SAAA,CAAU,EAAE,IAAA,EAAM,MAAA,EAAQ,OAAO,QAAA,EAAU,GAAG,OAAM,EAAmB;AACrF,EAAA,uBACE,KAAA,CAAA,aAAA,CAAC,IAAA,EAAA,EAAM,GAAG,KAAA,EAAA,EACP,IAAA,IAAQ,IAAA,CAAK,MAAA,GAAS,CAAA,oBAAK,KAAA,CAAA,aAAA,CAAC,aAAA,EAAA,EAAc,IAAA,EAAK,MAAA,EAAO,aAAa,IAAA,EAAM,CAAA,EACzE,MAAA,IAAU,MAAA,CAAO,MAAA,GAAS,CAAA,oBAAK,KAAA,CAAA,aAAA,CAAC,aAAA,EAAA,EAAc,IAAA,EAAK,SAAA,EAAU,WAAA,EAAa,MAAA,EAAQ,CAAA,EAClF,KAAA,IAAA,IAAA,GAAA,MAAA,GAAA,KAAA,CAAO,GAAA,CAAI,CAAC,MAAM,KAAA,KAAO;AAlEhC,IAAA,IAAA,EAAA;AAmEQ,IAAA,uBAAA,KAAA,CAAA,aAAA,CAAC,aAAA,EAAA,EAAc,GAAA,EAAA,CAAK,EAAA,GAAA,IAAA,CAAK,EAAA,KAAL,IAAA,GAAA,EAAA,GAAW,KAAA,EAAO,IAAA,EAAM,IAAA,CAAK,KAAA,EAAO,WAAA,EAAa,CAAC,IAAA,CAAK,OAAO,CAAA,EAAG,CAAA;AAAA,EAAA,CAAA,CAAA,EAEtF,QACH,CAAA;AAEJ","file":"chunk-BAXFWXMR.js","sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ReactNode } from 'react';\nimport { clsx } from 'clsx';\n\nexport type RootProps = ComponentProps<'dl'>;\n\n/** A list of metadata about a document, such as who it’s from and what it’s part of. */\nexport function Root({ className, ...props }: RootProps) {\n return <dl className={clsx('govuk-body', className)} {...props} />;\n}\n\nexport type TermProps = ComponentProps<'dt'>;\n\nexport function Term({ className, ...props }: TermProps) {\n return <dt className={clsx('govuk-!-margin-bottom-1', className)} {...props} />;\n}\n\nexport type DefinitionProps = ComponentProps<'dd'>;\n\nexport function Definition({ className, ...props }: DefinitionProps) {\n return (\n <dd\n className={clsx('govuk-!-font-weight-bold', 'govuk-!-margin-left-0', 'govuk-!-margin-bottom-2', className)}\n {...props}\n />\n );\n}\n\nexport type ItemCompositeProps = {\n /** The label, such as “From”. A colon is added after it. */\n term: ReactNode;\n /** The values. Each renders as its own definition. */\n definitions: ReactNode[];\n};\n\n/** A term and its values. */\nexport function ItemComposite({ term, definitions }: ItemCompositeProps) {\n return (\n <>\n <Term>{term}:</Term>\n {definitions.map((definition, index) => (\n <Definition key={index}>{definition}</Definition>\n ))}\n </>\n );\n}\n\nexport type CompositeProps = RootProps & {\n /** Values for “From”, such as organisation links. */\n from?: ReactNode[];\n /** Values for “Part of”, such as topic links. */\n partOf?: ReactNode[];\n /** Other items. Prefer `ItemComposite` children. */\n other?: { id?: string | number; title: ReactNode; content: ReactNode }[];\n};\n\n/**\n * Metadata about a document. Children are `ItemComposite`s, rendered after `from`, `partOf` and `other`.\n *\n * @see https://components.publishing.service.gov.uk/component-guide/metadata\n */\nexport function Composite({ from, partOf, other, children, ...props }: CompositeProps) {\n return (\n <Root {...props}>\n {from && from.length > 0 && <ItemComposite term=\"From\" definitions={from} />}\n {partOf && partOf.length > 0 && <ItemComposite term=\"Part of\" definitions={partOf} />}\n {other?.map((item, index) => (\n <ItemComposite key={item.id ?? index} term={item.title} definitions={[item.content]} />\n ))}\n {children}\n </Root>\n );\n}\n"]}
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+ import * as Primitives from '@govuk-react/primitives/button';
3
+ import { Button as Button$1, StartButton as StartButton$1 } from 'govuk-frontend-react/button';
4
+ export { StartButtonContent, StartButtonIcon } from 'govuk-frontend-react/button';
5
+
6
+ // src/components/button/index.tsx
7
+ function Button(props) {
8
+ return (
9
+ // Covers `as` components too, which govuk-frontend-react doesn't mark. Links can't be double submitted.
10
+ /* @__PURE__ */ React.createElement(Primitives.Root, { asChild: true, preventDoubleClick: props.href ? void 0 : props.preventDoubleClick }, /* @__PURE__ */ React.createElement(Button$1, { ...props }))
11
+ );
12
+ }
13
+ function StartButton(props) {
14
+ return (
15
+ // Covers `as` components too, which govuk-frontend-react doesn't mark. Links can't be double submitted.
16
+ /* @__PURE__ */ React.createElement(Primitives.Root, { asChild: true, preventDoubleClick: props.href ? void 0 : props.preventDoubleClick }, /* @__PURE__ */ React.createElement(StartButton$1, { ...props }))
17
+ );
18
+ }
19
+
20
+ export { Button, StartButton };
21
+ //# sourceMappingURL=chunk-BDIDAVNV.js.map
22
+ //# sourceMappingURL=chunk-BDIDAVNV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/button/index.tsx"],"names":["MarkupButton","MarkupStartButton"],"mappings":";;;;;;AAuBO,SAAS,OAAO,KAAA,EAAiC;AACtD,EAAA;AAAA;AAAA,oBAEE,KAAA,CAAA,aAAA,CAAY,UAAA,CAAA,IAAA,EAAX,EAAgB,OAAA,EAAO,MAAC,kBAAA,EAAoB,KAAA,CAAM,IAAA,GAAO,MAAA,GAAY,MAAM,kBAAA,EAAA,kBAC1E,KAAA,CAAA,aAAA,CAACA,QAAA,EAAA,EAAc,GAAG,OAAO,CAC3B;AAAA;AAEJ;AAYO,SAAS,YAAY,KAAA,EAAgD;AAC1E,EAAA;AAAA;AAAA,oBAEE,KAAA,CAAA,aAAA,CAAY,UAAA,CAAA,IAAA,EAAX,EAAgB,OAAA,EAAO,MAAC,kBAAA,EAAoB,KAAA,CAAM,IAAA,GAAO,MAAA,GAAY,MAAM,kBAAA,EAAA,kBAC1E,KAAA,CAAA,aAAA,CAACC,aAAA,EAAA,EAAmB,GAAG,OAAO,CAChC;AAAA;AAEJ","file":"chunk-BDIDAVNV.js","sourcesContent":["import * as React from 'react';\nimport type { ElementType, ReactNode } from 'react';\nimport * as Primitives from '@govuk-react/primitives/button';\nimport {\n Button as MarkupButton,\n StartButton as MarkupStartButton,\n type ButtonLinkProps,\n type ButtonProps,\n} from 'govuk-frontend-react/button';\n\nexport { StartButtonContent, StartButtonIcon } from 'govuk-frontend-react/button';\nexport type { ButtonLinkProps, ButtonProps, ButtonVariant, StartButtonIconProps } from 'govuk-frontend-react/button';\n\n/**\n * Use the button component to help users carry out an action.\n *\n * As in govuk-frontend, with `preventDoubleClick` a second click within a second is ignored, and\n * Space activates a link button.\n *\n * @see https://design-system.service.gov.uk/components/button/\n */\nexport function Button(props: ButtonLinkProps): ReactNode;\nexport function Button<As extends ElementType = 'button'>(props: ButtonProps<As>): ReactNode;\nexport function Button(props: ButtonProps<ElementType>) {\n return (\n // Covers `as` components too, which govuk-frontend-react doesn't mark. Links can't be double submitted.\n <Primitives.Root asChild preventDoubleClick={props.href ? undefined : props.preventDoubleClick}>\n <MarkupButton {...props} />\n </Primitives.Root>\n );\n}\n\n/**\n * Use a start button for the main call to action on your service's start page.\n *\n * As in govuk-frontend, with `preventDoubleClick` a second click within a second is ignored, and\n * Space activates a link button.\n *\n * @see https://design-system.service.gov.uk/components/button/#start-buttons\n */\nexport function StartButton(props: Omit<ButtonLinkProps, 'start'>): ReactNode;\nexport function StartButton<As extends ElementType = 'button'>(props: Omit<ButtonProps<As>, 'start'>): ReactNode;\nexport function StartButton(props: Omit<ButtonProps<ElementType>, 'start'>) {\n return (\n // Covers `as` components too, which govuk-frontend-react doesn't mark. Links can't be double submitted.\n <Primitives.Root asChild preventDoubleClick={props.href ? undefined : props.preventDoubleClick}>\n <MarkupStartButton {...props} />\n </Primitives.Root>\n );\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export { Tag } from 'govuk-frontend-react/tag';
2
+ //# sourceMappingURL=chunk-D6TMELAY.js.map
3
+ //# sourceMappingURL=chunk-D6TMELAY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-D6TMELAY.js","sourcesContent":[]}
@@ -0,0 +1,8 @@
1
+ export * from 'govuk-frontend-react/table';
2
+
3
+ // src/components/table/index.tsx
4
+ var table_exports = {};
5
+
6
+ export { table_exports };
7
+ //# sourceMappingURL=chunk-DHTWPFZO.js.map
8
+ //# sourceMappingURL=chunk-DHTWPFZO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/table/index.tsx"],"names":[],"mappings":";;;AAAA,IAAA,aAAA,GAAA","file":"chunk-DHTWPFZO.js","sourcesContent":["export * from 'govuk-frontend-react/table';\n"]}
@@ -0,0 +1,3 @@
1
+ export { Label, LabelComposite, LabelWrapper } from 'govuk-frontend-react/label';
2
+ //# sourceMappingURL=chunk-DK2FZF7U.js.map
3
+ //# sourceMappingURL=chunk-DK2FZF7U.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-DK2FZF7U.js","sourcesContent":[]}
@@ -0,0 +1,3 @@
1
+ export { Heading } from 'govuk-frontend-react/heading';
2
+ //# sourceMappingURL=chunk-EMM6RZT7.js.map
3
+ //# sourceMappingURL=chunk-EMM6RZT7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"chunk-EMM6RZT7.js","sourcesContent":[]}
@@ -0,0 +1,8 @@
1
+ export * from 'govuk-frontend-react/breadcrumbs';
2
+
3
+ // src/components/breadcrumbs/index.tsx
4
+ var breadcrumbs_exports = {};
5
+
6
+ export { breadcrumbs_exports };
7
+ //# sourceMappingURL=chunk-EMNBPB3L.js.map
8
+ //# sourceMappingURL=chunk-EMNBPB3L.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/breadcrumbs/index.tsx"],"names":[],"mappings":";;;AAAA,IAAA,mBAAA,GAAA","file":"chunk-EMNBPB3L.js","sourcesContent":["export * from 'govuk-frontend-react/breadcrumbs';\n"]}
@@ -0,0 +1,8 @@
1
+ export * from 'govuk-frontend-react/generic-header';
2
+
3
+ // src/components/generic-header/index.tsx
4
+ var generic_header_exports = {};
5
+
6
+ export { generic_header_exports };
7
+ //# sourceMappingURL=chunk-FE2OFAA5.js.map
8
+ //# sourceMappingURL=chunk-FE2OFAA5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/generic-header/index.tsx"],"names":[],"mappings":";;;AAAA,IAAA,sBAAA,GAAA","file":"chunk-FE2OFAA5.js","sourcesContent":["export * from 'govuk-frontend-react/generic-header';\n"]}