@hmlr/govuk-react-components-library 1.2.2 → 1.3.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 (209) hide show
  1. package/README.md +6 -8
  2. package/dist/PDFViewerCanvas.cjs.js +4 -3
  3. package/dist/PDFViewerCanvas.cjs.js.map +1 -1
  4. package/dist/PDFViewerCanvas.esm.js +4 -3
  5. package/dist/PDFViewerCanvas.esm.js.map +1 -1
  6. package/dist/index.cjs.css +127 -134
  7. package/dist/index.cjs.js +52 -27
  8. package/dist/index.cjs.js.map +1 -1
  9. package/dist/index.d.ts +31 -62
  10. package/dist/index.esm.css +127 -134
  11. package/dist/index.esm.js +52 -27
  12. package/dist/index.esm.js.map +1 -1
  13. package/dist/types/PDFViewerCanvas.d.ts +1 -0
  14. package/dist/types/components/Accordion/Accordion.config.d.ts +5 -0
  15. package/dist/types/components/Accordion/Accordion.d.ts +4 -0
  16. package/dist/types/components/Accordion/Accordion.types.d.ts +20 -0
  17. package/dist/types/components/Accordion/index.d.ts +2 -0
  18. package/dist/types/components/ActionLink/ActionLink.d.ts +4 -0
  19. package/dist/types/components/ActionLink/ActionLink.types.d.ts +13 -0
  20. package/dist/types/components/ActionLink/index.d.ts +1 -0
  21. package/dist/types/components/BackLink/BackLink.d.ts +4 -0
  22. package/dist/types/components/BackLink/BackLink.types.d.ts +9 -0
  23. package/dist/types/components/BackLink/index.d.ts +1 -0
  24. package/dist/types/components/Boolean/Boolean.d.ts +4 -0
  25. package/dist/types/components/Boolean/Boolean.types.d.ts +37 -0
  26. package/dist/types/components/Boolean/OmitKey.d.ts +5 -0
  27. package/dist/types/components/Boolean/index.d.ts +1 -0
  28. package/dist/types/components/Breadcrumbs/Breadcrumbs.d.ts +4 -0
  29. package/dist/types/components/Breadcrumbs/Breadcrumbs.types.d.ts +13 -0
  30. package/dist/types/components/Breadcrumbs/index.d.ts +1 -0
  31. package/dist/types/components/Button/Button.config.d.ts +2 -0
  32. package/dist/types/components/Button/Button.d.ts +4 -0
  33. package/dist/types/components/Button/Button.types.d.ts +13 -0
  34. package/dist/types/components/Button/index.d.ts +2 -0
  35. package/dist/types/components/CardColumn/CardColumn.d.ts +5 -0
  36. package/dist/types/components/CardColumn/CardColumn.types.d.ts +25 -0
  37. package/dist/types/components/CardColumn/index.d.ts +1 -0
  38. package/dist/types/components/CardLayout/CardLayout.d.ts +4 -0
  39. package/dist/types/components/CardLayout/CardLayout.types.d.ts +5 -0
  40. package/dist/types/components/CardLayout/index.d.ts +1 -0
  41. package/dist/types/components/CharacterCount/CharacterCount.config.d.ts +2 -0
  42. package/dist/types/components/CharacterCount/CharacterCount.d.ts +4 -0
  43. package/dist/types/components/CharacterCount/CharacterCount.types.d.ts +12 -0
  44. package/dist/types/components/CharacterCount/index.d.ts +1 -0
  45. package/dist/types/components/Checkboxes/Checkboxes.config.d.ts +1 -0
  46. package/dist/types/components/Checkboxes/Checkboxes.d.ts +4 -0
  47. package/dist/types/components/Checkboxes/Checkboxes.types.d.ts +3 -0
  48. package/dist/types/components/Checkboxes/index.d.ts +2 -0
  49. package/dist/types/components/CookieBanner/CookieBanner.d.ts +4 -0
  50. package/dist/types/components/CookieBanner/CookieBanner.types.d.ts +21 -0
  51. package/dist/types/components/CookieBanner/index.d.ts +1 -0
  52. package/dist/types/components/DataNavigation/DataNavigation.d.ts +4 -0
  53. package/dist/types/components/DataNavigation/DataNavigation.types.d.ts +34 -0
  54. package/dist/types/components/DataNavigation/index.d.ts +1 -0
  55. package/dist/types/components/DateInput/DateInput.d.ts +4 -0
  56. package/dist/types/components/DateInput/DateInput.types.d.ts +27 -0
  57. package/dist/types/components/DateInput/index.d.ts +1 -0
  58. package/dist/types/components/Details/Details.d.ts +4 -0
  59. package/dist/types/components/Details/Details.types.d.ts +5 -0
  60. package/dist/types/components/Details/index.d.ts +1 -0
  61. package/dist/types/components/DifferenceNavigation/DifferenceNavigation.d.ts +4 -0
  62. package/dist/types/components/DifferenceNavigation/DifferenceNavigation.types.d.ts +32 -0
  63. package/dist/types/components/DifferenceNavigation/index.d.ts +1 -0
  64. package/dist/types/components/ErrorBoundary/ErrorBoundary.d.ts +9 -0
  65. package/dist/types/components/ErrorBoundary/ErrorBoundary.types.d.ts +11 -0
  66. package/dist/types/components/ErrorBoundary/index.d.ts +1 -0
  67. package/dist/types/components/ErrorMessage/ErrorMessage.d.ts +4 -0
  68. package/dist/types/components/ErrorMessage/ErrorMessage.types.d.ts +6 -0
  69. package/dist/types/components/ErrorMessage/index.d.ts +1 -0
  70. package/dist/types/components/ErrorSummary/ErrorSummary.config.d.ts +2 -0
  71. package/dist/types/components/ErrorSummary/ErrorSummary.d.ts +4 -0
  72. package/dist/types/components/ErrorSummary/ErrorSummary.types.d.ts +13 -0
  73. package/dist/types/components/ErrorSummary/index.d.ts +2 -0
  74. package/dist/types/components/ExitThisPage/ExitThisPage.config.d.ts +1 -0
  75. package/dist/types/components/ExitThisPage/ExitThisPage.d.ts +4 -0
  76. package/dist/types/components/ExitThisPage/ExitThisPage.types.d.ts +17 -0
  77. package/dist/types/components/ExitThisPage/index.d.ts +2 -0
  78. package/dist/types/components/Fieldset/Fieldset.d.ts +4 -0
  79. package/dist/types/components/Fieldset/Fieldset.types.d.ts +12 -0
  80. package/dist/types/components/Fieldset/index.d.ts +1 -0
  81. package/dist/types/components/FileUpload/FileUpload.d.ts +4 -0
  82. package/dist/types/components/FileUpload/FileUpload.types.d.ts +13 -0
  83. package/dist/types/components/FileUpload/index.d.ts +1 -0
  84. package/dist/types/components/Footer/Footer.d.ts +4 -0
  85. package/dist/types/components/Footer/Footer.types.d.ts +40 -0
  86. package/dist/types/components/Footer/index.d.ts +1 -0
  87. package/dist/types/components/Header/Header.config.d.ts +1 -0
  88. package/dist/types/components/Header/Header.d.ts +4 -0
  89. package/dist/types/components/Header/Header.types.d.ts +28 -0
  90. package/dist/types/components/Header/index.d.ts +2 -0
  91. package/dist/types/components/Hint/Hint.d.ts +4 -0
  92. package/dist/types/components/Hint/Hint.types.d.ts +4 -0
  93. package/dist/types/components/Hint/index.d.ts +1 -0
  94. package/dist/types/components/Input/Input.d.ts +4 -0
  95. package/dist/types/components/Input/Input.types.d.ts +17 -0
  96. package/dist/types/components/Input/index.d.ts +1 -0
  97. package/dist/types/components/InsetText/InsetText.d.ts +4 -0
  98. package/dist/types/components/InsetText/InsetText.types.d.ts +4 -0
  99. package/dist/types/components/InsetText/index.d.ts +1 -0
  100. package/dist/types/components/Label/Label.d.ts +4 -0
  101. package/dist/types/components/Label/Label.types.d.ts +6 -0
  102. package/dist/types/components/Label/index.d.ts +1 -0
  103. package/dist/types/components/Landing/Landing.d.ts +4 -0
  104. package/dist/types/components/Landing/Landing.types.d.ts +4 -0
  105. package/dist/types/components/Landing/index.d.ts +1 -0
  106. package/dist/types/components/LinkWithRef/LinkWithRef.d.ts +4 -0
  107. package/dist/types/components/LinkWithRef/LinkWithRef.types.d.ts +9 -0
  108. package/dist/types/components/LinkWithRef/index.d.ts +1 -0
  109. package/dist/types/components/Loading/Loading.d.ts +5 -0
  110. package/dist/types/components/Loading/Loading.types.d.ts +4 -0
  111. package/dist/types/components/Loading/index.d.ts +1 -0
  112. package/dist/types/components/Main/Main.d.ts +4 -0
  113. package/dist/types/components/Main/Main.types.d.ts +5 -0
  114. package/dist/types/components/Main/index.d.ts +1 -0
  115. package/dist/types/components/NotFoundPage/NotFoundPage.d.ts +3 -0
  116. package/dist/types/components/NotFoundPage/index.d.ts +1 -0
  117. package/dist/types/components/NotificationBanner/NotificationBanner.config.d.ts +2 -0
  118. package/dist/types/components/NotificationBanner/NotificationBanner.d.ts +4 -0
  119. package/dist/types/components/NotificationBanner/NotificationBanner.types.d.ts +12 -0
  120. package/dist/types/components/NotificationBanner/index.d.ts +1 -0
  121. package/dist/types/components/PDFViewer/ObjectToQueryString.d.ts +1 -0
  122. package/dist/types/components/PDFViewer/PDFViewer.d.ts +4 -0
  123. package/dist/types/components/PDFViewer/PDFViewer.types.d.ts +25 -0
  124. package/dist/types/components/PDFViewer/PDFViewerBackend.d.ts +2 -0
  125. package/dist/types/components/PDFViewer/ResolvePDFSource.d.ts +27 -0
  126. package/dist/types/components/PDFViewer/Slugify.d.ts +1 -0
  127. package/dist/types/components/PDFViewer/index.d.ts +2 -0
  128. package/dist/types/components/PDFViewer/testutilities/SampleBase64.d.ts +44 -0
  129. package/dist/types/components/PDFViewerCanvas/PDFViewerCanvas.d.ts +9 -0
  130. package/dist/types/components/PDFViewerCanvas/PDFViewerCanvas.types.d.ts +38 -0
  131. package/dist/types/components/PDFViewerCanvas/index.d.ts +1 -0
  132. package/dist/types/components/Pagination/NavigationButton.d.ts +3 -0
  133. package/dist/types/components/Pagination/Pagination.d.ts +4 -0
  134. package/dist/types/components/Pagination/Pagination.types.d.ts +32 -0
  135. package/dist/types/components/Pagination/SvgIcon.d.ts +3 -0
  136. package/dist/types/components/Pagination/UsePagination.d.ts +9 -0
  137. package/dist/types/components/Pagination/index.d.ts +3 -0
  138. package/dist/types/components/Panel/Panel.d.ts +4 -0
  139. package/dist/types/components/Panel/Panel.types.d.ts +7 -0
  140. package/dist/types/components/Panel/index.d.ts +1 -0
  141. package/dist/types/components/PasswordInput/PasswordInput.config.d.ts +1 -0
  142. package/dist/types/components/PasswordInput/PasswordInput.d.ts +4 -0
  143. package/dist/types/components/PasswordInput/PasswordInput.types.d.ts +35 -0
  144. package/dist/types/components/PasswordInput/index.d.ts +2 -0
  145. package/dist/types/components/PhaseBanner/PhaseBanner.d.ts +4 -0
  146. package/dist/types/components/PhaseBanner/PhaseBanner.types.d.ts +6 -0
  147. package/dist/types/components/PhaseBanner/index.d.ts +1 -0
  148. package/dist/types/components/ProblemWithService/ProblemWithService.d.ts +4 -0
  149. package/dist/types/components/ProblemWithService/ProblemWithService.types.d.ts +7 -0
  150. package/dist/types/components/ProblemWithService/index.d.ts +1 -0
  151. package/dist/types/components/Radios/Radios.config.d.ts +1 -0
  152. package/dist/types/components/Radios/Radios.d.ts +4 -0
  153. package/dist/types/components/Radios/Radios.types.d.ts +7 -0
  154. package/dist/types/components/Radios/index.d.ts +2 -0
  155. package/dist/types/components/Select/Select.d.ts +4 -0
  156. package/dist/types/components/Select/Select.types.d.ts +19 -0
  157. package/dist/types/components/Select/index.d.ts +1 -0
  158. package/dist/types/components/ServiceNavigation/ServiceNavigation.d.ts +4 -0
  159. package/dist/types/components/ServiceNavigation/ServiceNavigation.types.d.ts +21 -0
  160. package/dist/types/components/ServiceNavigation/index.d.ts +1 -0
  161. package/dist/types/components/SkipLink/SkipLink.config.d.ts +1 -0
  162. package/dist/types/components/SkipLink/SkipLink.d.ts +4 -0
  163. package/dist/types/components/SkipLink/SkipLink.types.d.ts +5 -0
  164. package/dist/types/components/SkipLink/index.d.ts +2 -0
  165. package/dist/types/components/SummaryList/SummaryList.d.ts +4 -0
  166. package/dist/types/components/SummaryList/SummaryList.types.d.ts +22 -0
  167. package/dist/types/components/SummaryList/index.d.ts +1 -0
  168. package/dist/types/components/Table/Table.d.ts +4 -0
  169. package/dist/types/components/Table/Table.types.d.ts +21 -0
  170. package/dist/types/components/Table/index.d.ts +1 -0
  171. package/dist/types/components/Tabs/Tabs.config.d.ts +1 -0
  172. package/dist/types/components/Tabs/Tabs.d.ts +4 -0
  173. package/dist/types/components/Tabs/Tabs.types.d.ts +14 -0
  174. package/dist/types/components/Tabs/index.d.ts +2 -0
  175. package/dist/types/components/Tag/Tag.d.ts +4 -0
  176. package/dist/types/components/Tag/Tag.types.d.ts +4 -0
  177. package/dist/types/components/Tag/index.d.ts +1 -0
  178. package/dist/types/components/TaskList/TaskList.d.ts +4 -0
  179. package/dist/types/components/TaskList/TaskList.types.d.ts +21 -0
  180. package/dist/types/components/TaskList/index.d.ts +1 -0
  181. package/dist/types/components/Textarea/Textarea.d.ts +4 -0
  182. package/dist/types/components/Textarea/Textarea.types.d.ts +14 -0
  183. package/dist/types/components/Textarea/index.d.ts +1 -0
  184. package/dist/types/components/WarningInfo/WarningInfo.d.ts +4 -0
  185. package/dist/types/components/WarningInfo/WarningInfo.types.d.ts +8 -0
  186. package/dist/types/components/WarningInfo/index.d.ts +1 -0
  187. package/dist/types/components/WarningText/WarningText.d.ts +4 -0
  188. package/dist/types/components/WarningText/WarningText.types.d.ts +4 -0
  189. package/dist/types/components/WarningText/index.d.ts +1 -0
  190. package/dist/types/components/common.types.d.ts +10 -0
  191. package/dist/types/components/index.d.ts +51 -0
  192. package/dist/types/dynamics/index.d.ts +3 -0
  193. package/dist/types/dynamics/types.d.ts +37 -0
  194. package/dist/types/index.d.ts +1 -0
  195. package/dist/types/utils/ProcessExampleData.d.ts +3 -0
  196. package/dist/types/utils/StoriesFromFixtures.d.ts +5 -0
  197. package/dist/types/utils/TitleCase.d.ts +2 -0
  198. package/dist/types/utils/WithReference.d.ts +5 -0
  199. package/dist/types/utils/WithReference.types.d.ts +15 -0
  200. package/package.json +86 -58
  201. package/.gitattributes +0 -5
  202. package/.nvmrc +0 -1
  203. package/.stylelintrc.json +0 -8
  204. package/assets/Advance-submodule-behaviours.png +0 -0
  205. package/assets/logo.png +0 -0
  206. package/assets/uml-diagram.svg +0 -2745
  207. package/bundle-analysis-main.html +0 -4949
  208. package/bundle-analysis-pdfvc.html +0 -4949
  209. package/scripts/generateStories.mjs +0 -433
@@ -0,0 +1,37 @@
1
+ import { ErrorMessageProps } from "../ErrorMessage/ErrorMessage.types";
2
+ import { FieldsetProps } from "../Fieldset/Fieldset.types";
3
+ import { HintProps } from "../Hint/Hint.types";
4
+ import { LabelProps } from "../Label/Label.types";
5
+ import { FormGroupProps } from "../common.types";
6
+ export interface BooleanItem {
7
+ id?: string;
8
+ children?: React.ReactNode;
9
+ hint?: HintProps;
10
+ conditional?: {
11
+ children: React.ReactNode;
12
+ };
13
+ behaviour?: string;
14
+ label?: LabelProps;
15
+ reactListKey?: string | number;
16
+ divider?: string;
17
+ name?: string;
18
+ checked?: boolean;
19
+ value?: string;
20
+ defaultChecked?: boolean;
21
+ [key: string]: unknown;
22
+ }
23
+ export interface BooleanProps {
24
+ className?: string;
25
+ errorMessage?: ErrorMessageProps;
26
+ fieldset?: FieldsetProps;
27
+ formGroup?: FormGroupProps;
28
+ hint?: HintProps;
29
+ idPrefix?: string;
30
+ items?: BooleanItem[];
31
+ controlType: "radios" | "checkboxes";
32
+ name?: string;
33
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
34
+ onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
35
+ "aria-describedby"?: string;
36
+ [key: string]: unknown;
37
+ }
@@ -0,0 +1,5 @@
1
+ export default function omit(object: {
2
+ [key: string]: unknown;
3
+ } | undefined, key: string): {
4
+ [key: string]: unknown;
5
+ };
@@ -0,0 +1 @@
1
+ export { default as Boolean } from "./Boolean";
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { BreadcrumbsProps } from "./Breadcrumbs.types";
3
+ declare const Breadcrumbs: React.FC<BreadcrumbsProps>;
4
+ export default Breadcrumbs;
@@ -0,0 +1,13 @@
1
+ import { HTMLAttributes } from "react";
2
+ export interface BreadcrumbItem {
3
+ href?: string;
4
+ to?: string;
5
+ reactListKey?: string | number;
6
+ children: React.ReactNode;
7
+ [key: string]: unknown;
8
+ }
9
+ export interface BreadcrumbsProps extends HTMLAttributes<HTMLDivElement> {
10
+ items?: BreadcrumbItem[];
11
+ className?: string;
12
+ collapseOnMobile?: boolean;
13
+ }
@@ -0,0 +1 @@
1
+ export { default as Breadcrumbs } from "./Breadcrumbs";
@@ -0,0 +1,2 @@
1
+ import { ButtonConfig } from "govuk-frontend/dist/govuk/components/button/button";
2
+ export declare function ConfigureOverallButton($scope?: Document | Element, config?: ButtonConfig): void;
@@ -0,0 +1,4 @@
1
+ import React, { AnchorHTMLAttributes, ButtonHTMLAttributes } from "react";
2
+ import { ButtonProps } from "./Button.types";
3
+ declare const Button: React.FC<ButtonProps & ButtonHTMLAttributes<HTMLButtonElement> & AnchorHTMLAttributes<HTMLAnchorElement>>;
4
+ export default Button;
@@ -0,0 +1,13 @@
1
+ import { To } from "react-router";
2
+ export interface ButtonProps {
3
+ element?: string;
4
+ href?: string;
5
+ to?: To;
6
+ isStartButton?: boolean;
7
+ disabled?: boolean;
8
+ className?: string;
9
+ preventDoubleClick?: boolean;
10
+ name?: string;
11
+ type?: string;
12
+ children?: React.ReactNode;
13
+ }
@@ -0,0 +1,2 @@
1
+ export { default as Button } from "./Button";
2
+ export * from "./Button.config";
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import "./CardColumn.scss";
3
+ import { CardColumnProps } from "./CardColumn.types";
4
+ declare const CardColumn: React.FC<CardColumnProps>;
5
+ export default CardColumn;
@@ -0,0 +1,25 @@
1
+ export interface CardColumnProps {
2
+ link: string;
3
+ header: string;
4
+ body: string;
5
+ /**
6
+ * Text colour of the card header in its resting state.
7
+ *
8
+ * Defaults to the GOV.UK brand colour via the CSS custom property set by
9
+ * govuk-functional-colour("brand") in the SCSS — so if you've overridden
10
+ * $govuk-functional-colours at the Sass level, this default will follow.
11
+ *
12
+ * Pass an explicit value only when you need a per-instance override that
13
+ * sits outside the govuk-frontend theming system.
14
+ */
15
+ textColor?: string;
16
+ /**
17
+ * Background colour applied to the card header on hover.
18
+ *
19
+ * Defaults to the GOV.UK header background colour via the CSS custom
20
+ * property set by govuk-functional-colour("header-background") in the SCSS.
21
+ *
22
+ * Pass an explicit value only when you need a per-instance override.
23
+ */
24
+ hoverColor?: string;
25
+ }
@@ -0,0 +1 @@
1
+ export { default as CardColumn } from "./CardColumn";
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { CardLayoutProps } from "./CardLayout.types";
3
+ declare const CardLayout: React.FC<CardLayoutProps>;
4
+ export default CardLayout;
@@ -0,0 +1,5 @@
1
+ import { CardColumnProps } from "../CardColumn/CardColumn.types";
2
+ export interface CardLayoutProps {
3
+ cardColumns: Array<CardColumnProps>;
4
+ numberOfGridColumns?: number;
5
+ }
@@ -0,0 +1 @@
1
+ export { default as CardLayout } from "./CardLayout";
@@ -0,0 +1,2 @@
1
+ import { CharacterCountConfig } from "govuk-frontend/dist/govuk/components/character-count/character-count";
2
+ export declare function ConfigureOverallCharacterCount($scope?: Document | Element, config?: CharacterCountConfig): void;
@@ -0,0 +1,4 @@
1
+ import React, { TextareaHTMLAttributes } from "react";
2
+ import { CharacterCountProps } from "./CharacterCount.types";
3
+ declare const CharacterCount: React.FC<CharacterCountProps & TextareaHTMLAttributes<HTMLTextAreaElement>>;
4
+ export default CharacterCount;
@@ -0,0 +1,12 @@
1
+ import { ErrorMessageProps } from "../ErrorMessage/ErrorMessage.types";
2
+ export interface CharacterCountProps {
3
+ id?: string;
4
+ className?: string;
5
+ maxlength?: number;
6
+ threshold?: number;
7
+ maxwords?: number;
8
+ errorMessage?: ErrorMessageProps;
9
+ countMessage?: {
10
+ className?: string;
11
+ };
12
+ }
@@ -0,0 +1 @@
1
+ export { default as CharacterCount } from "./CharacterCount";
@@ -0,0 +1 @@
1
+ export declare function ConfigureOverallCheckboxes($scope?: Document | Element): void;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { CheckboxesProps } from "./Checkboxes.types";
3
+ declare const Checkboxes: React.FC<CheckboxesProps>;
4
+ export default Checkboxes;
@@ -0,0 +1,3 @@
1
+ export interface CheckboxesProps {
2
+ [key: string]: unknown;
3
+ }
@@ -0,0 +1,2 @@
1
+ export { default as Checkbox } from "./Checkboxes";
2
+ export * from "./Checkboxes.config";
@@ -0,0 +1,4 @@
1
+ import React, { HTMLAttributes } from "react";
2
+ import { CookieBannerProps } from "./CookieBanner.types";
3
+ declare const CookieBanner: React.FC<CookieBannerProps & HTMLAttributes<HTMLDivElement>>;
4
+ export default CookieBanner;
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ export interface CookieBannerMessageAction {
3
+ className?: string;
4
+ href?: string;
5
+ to?: string;
6
+ children?: React.ReactNode;
7
+ type?: "submit" | "reset" | "button";
8
+ [key: string]: unknown;
9
+ }
10
+ export interface CookieBannerMessageItem {
11
+ headingChildren?: React.ReactNode;
12
+ children?: React.ReactNode;
13
+ "aria-label"?: string;
14
+ actions?: CookieBannerMessageAction[];
15
+ className?: string;
16
+ [key: string]: unknown;
17
+ }
18
+ export interface CookieBannerProps {
19
+ className?: string;
20
+ messages: CookieBannerMessageItem[];
21
+ }
@@ -0,0 +1 @@
1
+ export { default as CookieBanner } from "./CookieBanner";
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { DataNavigationProps } from "./DataNavigation.types";
3
+ declare const DataNavigation: React.FC<DataNavigationProps>;
4
+ export default DataNavigation;
@@ -0,0 +1,34 @@
1
+ export interface DataNavigationProps {
2
+ dataId: number;
3
+ setDataFocus: (id: number) => void;
4
+ previousText?: string;
5
+ previousCondition: boolean;
6
+ nextText?: string;
7
+ nextCondition: boolean;
8
+ dataDescription?: string;
9
+ /**
10
+ * Background colour of the navigation buttons in their resting state.
11
+ * Defaults to govuk-functional-colour("brand") (#1d70b8).
12
+ */
13
+ buttonColour?: string;
14
+ /**
15
+ * Text colour of the navigation buttons in their resting state.
16
+ * Defaults to govuk-colour("white") (#ffffff).
17
+ */
18
+ buttonTextColour?: string;
19
+ /**
20
+ * Shadow colour of the navigation buttons.
21
+ * Defaults to govuk-colour("black") (#0b0c0c).
22
+ */
23
+ buttonShadowColour?: string;
24
+ /**
25
+ * Background colour of the navigation buttons on hover.
26
+ * Defaults to govuk-functional-colour("focus") (#ffdd00).
27
+ */
28
+ buttonHoverColour?: string;
29
+ /**
30
+ * Text colour of the navigation buttons on hover.
31
+ * Defaults to govuk-functional-colour("focus-text") (#0b0c0c).
32
+ */
33
+ buttonHoverTextColour?: string;
34
+ }
@@ -0,0 +1 @@
1
+ export { default as DataNavigation } from "./DataNavigation";
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { DateInputProps } from "./DateInput.types";
3
+ declare const DateInput: React.FC<DateInputProps>;
4
+ export default DateInput;
@@ -0,0 +1,27 @@
1
+ import { ErrorMessageProps } from "../ErrorMessage/ErrorMessage.types";
2
+ import { FieldsetProps } from "../Fieldset/Fieldset.types";
3
+ import { HintProps } from "../Hint/Hint.types";
4
+ import { FormGroupProps } from "../common.types";
5
+ export interface DateInputItem {
6
+ name: string;
7
+ className?: string;
8
+ type?: string;
9
+ label?: string;
10
+ reactListKey?: string | number;
11
+ id?: string;
12
+ pattern?: string;
13
+ inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined;
14
+ [key: string]: unknown;
15
+ }
16
+ export interface DateInputProps {
17
+ className?: string;
18
+ errorMessage?: ErrorMessageProps;
19
+ fieldset?: FieldsetProps;
20
+ formGroup?: FormGroupProps;
21
+ hint?: HintProps;
22
+ id?: string;
23
+ items?: Array<DateInputItem>;
24
+ namePrefix?: string;
25
+ onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
26
+ [key: string]: unknown;
27
+ }
@@ -0,0 +1 @@
1
+ export { default as DateInput } from "./DateInput";
@@ -0,0 +1,4 @@
1
+ import React, { HTMLAttributes } from "react";
2
+ import { DetailsProps } from "./Details.types";
3
+ declare const Details: React.FC<DetailsProps & HTMLAttributes<HTMLElement>>;
4
+ export default Details;
@@ -0,0 +1,5 @@
1
+ export interface DetailsProps {
2
+ className?: string;
3
+ children: React.ReactNode;
4
+ summaryChildren: React.ReactNode;
5
+ }
@@ -0,0 +1 @@
1
+ export { default as Details } from "./Details";
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { DifferenceNavigationProps } from "./DifferenceNavigation.types";
3
+ declare const DifferenceNavigation: React.FC<DifferenceNavigationProps>;
4
+ export default DifferenceNavigation;
@@ -0,0 +1,32 @@
1
+ export interface DifferenceNavigationProps {
2
+ differenceId: number;
3
+ setDifferenceFocus: (id: number) => void;
4
+ totalDifferences: number;
5
+ keyword?: string;
6
+ plural?: string;
7
+ /**
8
+ * Background colour of the navigation buttons in their resting state.
9
+ * Defaults to govuk-functional-colour("brand") (#1d70b8).
10
+ */
11
+ buttonColour?: string;
12
+ /**
13
+ * Text colour of the navigation buttons in their resting state.
14
+ * Defaults to govuk-colour("white") (#ffffff).
15
+ */
16
+ buttonTextColour?: string;
17
+ /**
18
+ * Shadow colour of the navigation buttons.
19
+ * Defaults to govuk-colour("black") (#0b0c0c).
20
+ */
21
+ buttonShadowColour?: string;
22
+ /**
23
+ * Background colour of the navigation buttons on hover.
24
+ * Defaults to govuk-functional-colour("focus") (#ffdd00).
25
+ */
26
+ buttonHoverColour?: string;
27
+ /**
28
+ * Text colour of the navigation buttons on hover.
29
+ * Defaults to govuk-functional-colour("focus-text") (#0b0c0c).
30
+ */
31
+ buttonHoverTextColour?: string;
32
+ }
@@ -0,0 +1 @@
1
+ export { default as DifferenceNavigation } from "./DifferenceNavigation";
@@ -0,0 +1,9 @@
1
+ import React, { Component, ReactNode } from "react";
2
+ import { ErrorBoundaryProps, ErrorBoundaryState } from "./ErrorBoundary.types";
3
+ declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
4
+ constructor(props: ErrorBoundaryProps);
5
+ static getDerivedStateFromError(): Partial<ErrorBoundaryState>;
6
+ componentDidCatch(error: Error, info: React.ErrorInfo): void;
7
+ render(): ReactNode;
8
+ }
9
+ export default ErrorBoundary;
@@ -0,0 +1,11 @@
1
+ export interface ErrorBoundaryProps {
2
+ children: React.ReactNode;
3
+ message?: string;
4
+ applicationName?: string;
5
+ basePageName?: string;
6
+ }
7
+ export interface ErrorBoundaryState {
8
+ hasError: boolean;
9
+ message: string;
10
+ applicationName: string;
11
+ }
@@ -0,0 +1 @@
1
+ export { default as ErrorBoundary } from "./ErrorBoundary";
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { ErrorMessageProps } from "./ErrorMessage.types";
3
+ declare const ErrorMessage: React.FC<ErrorMessageProps>;
4
+ export default ErrorMessage;
@@ -0,0 +1,6 @@
1
+ import { HTMLAttributes } from "react";
2
+ export interface ErrorMessageProps extends HTMLAttributes<HTMLParagraphElement> {
3
+ className?: string;
4
+ children?: React.ReactNode;
5
+ visuallyHiddenText?: string;
6
+ }
@@ -0,0 +1 @@
1
+ export { default as ErrorMessage } from "./ErrorMessage";
@@ -0,0 +1,2 @@
1
+ import { ErrorSummaryConfig } from "govuk-frontend/dist/govuk/components/error-summary/error-summary";
2
+ export declare function ConfigureOverallErrorSummary($scope?: Document | Element, config?: ErrorSummaryConfig): void;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { ErrorSummaryProps } from "./ErrorSummary.types";
3
+ declare const ErrorSummary: React.FC<ErrorSummaryProps>;
4
+ export default ErrorSummary;
@@ -0,0 +1,13 @@
1
+ import { HTMLAttributes } from "react";
2
+ export interface ErrorSummaryProps extends HTMLAttributes<HTMLDivElement> {
3
+ className?: string;
4
+ descriptionChildren?: React.ReactNode;
5
+ errorList?: Array<{
6
+ reactListKey?: string | number;
7
+ children: React.ReactNode;
8
+ href?: string;
9
+ [key: string]: unknown;
10
+ }>;
11
+ titleChildren?: React.ReactNode;
12
+ disableAutoFocus?: boolean;
13
+ }
@@ -0,0 +1,2 @@
1
+ export { default as ErrorSummary } from "./ErrorSummary";
2
+ export * from "./ErrorSummary.config";
@@ -0,0 +1 @@
1
+ export declare function ConfigureOverallExitThisPage($scope?: Document | Element): void;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { ExitThisPageProps } from "./ExitThisPage.types";
3
+ declare const ExitThisPage: React.FC<ExitThisPageProps>;
4
+ export default ExitThisPage;
@@ -0,0 +1,17 @@
1
+ import { HTMLAttributes, ReactNode } from "react";
2
+ export interface ExitThisPageProps extends HTMLAttributes<HTMLDivElement> {
3
+ /** Button label — defaults to "Exit this page". Maps from fixture `text`/`html` via processExampleData → children */
4
+ children?: ReactNode;
5
+ /** Additional CSS classes for the wrapper div. Maps from fixture `classes` → className */
6
+ className?: string;
7
+ /** URL the button links to. Defaults to "https://www.bbc.co.uk/weather" */
8
+ redirectUrl?: string;
9
+ /** i18n: text announced when the page exit is activated */
10
+ activatedText?: string;
11
+ /** i18n: text announced when the keyboard shortcut times out */
12
+ timedOutText?: string;
13
+ /** i18n: text announced when the shortcut still needs two more presses */
14
+ pressTwoMoreTimesText?: string;
15
+ /** i18n: text announced when the shortcut needs one more press */
16
+ pressOneMoreTimeText?: string;
17
+ }
@@ -0,0 +1,2 @@
1
+ export { default as ExitThisPage } from "./ExitThisPage";
2
+ export * from "./ExitThisPage.config";
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { FieldsetProps } from "./Fieldset.types";
3
+ declare const Fieldset: React.FC<FieldsetProps>;
4
+ export default Fieldset;
@@ -0,0 +1,12 @@
1
+ export interface LegendProps {
2
+ children: React.ReactNode;
3
+ className?: string;
4
+ isPageHeading?: boolean;
5
+ }
6
+ export interface FieldsetProps extends React.FieldsetHTMLAttributes<HTMLFieldSetElement> {
7
+ className?: string;
8
+ legend?: LegendProps;
9
+ children: React.ReactNode;
10
+ "aria-describedby"?: string;
11
+ [key: string]: unknown;
12
+ }
@@ -0,0 +1 @@
1
+ export { default as Fieldset } from "./Fieldset";
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { FileUploadProps } from "./FileUpload.types";
3
+ declare const FileUpload: React.FC<FileUploadProps>;
4
+ export default FileUpload;
@@ -0,0 +1,13 @@
1
+ import { ErrorMessageProps } from "../ErrorMessage/ErrorMessage.types";
2
+ import { HintProps } from "../Hint/Hint.types";
3
+ import { LabelProps } from "../Label/Label.types";
4
+ import { FormGroupProps } from "../common.types";
5
+ export interface FileUploadProps extends React.InputHTMLAttributes<HTMLInputElement> {
6
+ className?: string;
7
+ errorMessage?: ErrorMessageProps;
8
+ formGroup?: FormGroupProps;
9
+ hint?: HintProps;
10
+ label?: LabelProps;
11
+ "aria-describedby"?: string;
12
+ id?: string;
13
+ }
@@ -0,0 +1 @@
1
+ export { default as FileUpload } from "./FileUpload";
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { FooterProps } from "./Footer.types";
3
+ declare const Footer: React.FC<FooterProps>;
4
+ export default Footer;
@@ -0,0 +1,40 @@
1
+ import { HTMLAttributes } from "react";
2
+ import { To } from "react-router";
3
+ export interface NavigationItem {
4
+ columns: string | number;
5
+ title: string;
6
+ items?: Array<{
7
+ className?: string;
8
+ children: React.ReactNode;
9
+ href?: string;
10
+ to?: To;
11
+ reactListKey?: string | number;
12
+ [key: string]: unknown;
13
+ }>;
14
+ width?: string;
15
+ reactListKey?: string | number;
16
+ }
17
+ export interface MetaItem {
18
+ className?: string;
19
+ children: React.ReactNode;
20
+ reactListKey?: string | number;
21
+ [key: string]: unknown;
22
+ }
23
+ export interface Meta {
24
+ visuallyHiddenTitle?: string;
25
+ items?: MetaItem[];
26
+ children?: React.ReactNode;
27
+ }
28
+ export interface ContentLicence {
29
+ className?: string;
30
+ children: React.ReactNode;
31
+ reactListKey?: string | number;
32
+ [key: string]: unknown;
33
+ }
34
+ export interface FooterProps extends HTMLAttributes<HTMLElement> {
35
+ className?: string;
36
+ containerClassName?: string;
37
+ meta?: Meta;
38
+ navigation?: NavigationItem[];
39
+ contentLicence?: ContentLicence;
40
+ }
@@ -0,0 +1 @@
1
+ export { default as Footer } from "./Footer";
@@ -0,0 +1 @@
1
+ export declare function ConfigureOverallHeader($scope?: Document | Element): Promise<void>;
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { HeaderProps } from "./Header.types";
3
+ declare const Header: React.FC<HeaderProps>;
4
+ export default Header;
@@ -0,0 +1,28 @@
1
+ import { HTMLAttributes } from "react";
2
+ import { To } from "react-router";
3
+ export interface NavigationItem {
4
+ active?: boolean;
5
+ className?: string;
6
+ children?: React.ReactNode;
7
+ href?: string;
8
+ to?: To;
9
+ reactListKey?: string | number;
10
+ [key: string]: unknown;
11
+ }
12
+ export interface HeaderProps extends HTMLAttributes<HTMLDivElement> {
13
+ className?: string;
14
+ containerClassName?: string;
15
+ homepageUrlHref?: string;
16
+ homepageUrlTo?: To;
17
+ navigation?: NavigationItem[];
18
+ navigationClassName?: string;
19
+ productName?: React.ReactNode;
20
+ serviceName?: string;
21
+ serviceUrlHref?: string;
22
+ serviceUrlTo?: To;
23
+ navigationLabel?: string;
24
+ menuButtonLabel?: string;
25
+ logo?: string;
26
+ removeGovUKHeader?: boolean;
27
+ assetsPath?: string;
28
+ }
@@ -0,0 +1,2 @@
1
+ export { default as Header } from "./Header";
2
+ export * from "./Header.config";
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { HintProps } from "./Hint.types";
3
+ declare const Hint: React.FC<HintProps & React.HTMLAttributes<HTMLOrSVGElement>>;
4
+ export default Hint;
@@ -0,0 +1,4 @@
1
+ export interface HintProps {
2
+ className?: string;
3
+ children?: React.ReactNode;
4
+ }