@hmlr/govuk-react-components-library 1.2.3 → 1.3.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.
- package/README.md +6 -8
- package/dist/PDFViewerCanvas.cjs.js +3 -2
- package/dist/PDFViewerCanvas.cjs.js.map +1 -1
- package/dist/PDFViewerCanvas.esm.js +3 -2
- package/dist/PDFViewerCanvas.esm.js.map +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +29 -60
- package/dist/index.esm.js.map +1 -1
- package/dist/types/PDFViewerCanvas.d.ts +1 -0
- package/dist/types/components/Accordion/Accordion.config.d.ts +5 -0
- package/dist/types/components/Accordion/Accordion.d.ts +4 -0
- package/dist/types/components/Accordion/Accordion.types.d.ts +20 -0
- package/dist/types/components/Accordion/index.d.ts +2 -0
- package/dist/types/components/ActionLink/ActionLink.d.ts +4 -0
- package/dist/types/components/ActionLink/ActionLink.types.d.ts +13 -0
- package/dist/types/components/ActionLink/index.d.ts +1 -0
- package/dist/types/components/BackLink/BackLink.d.ts +4 -0
- package/dist/types/components/BackLink/BackLink.types.d.ts +9 -0
- package/dist/types/components/BackLink/index.d.ts +1 -0
- package/dist/types/components/Boolean/Boolean.d.ts +4 -0
- package/dist/types/components/Boolean/Boolean.types.d.ts +37 -0
- package/dist/types/components/Boolean/OmitKey.d.ts +5 -0
- package/dist/types/components/Boolean/index.d.ts +1 -0
- package/dist/types/components/Breadcrumbs/Breadcrumbs.d.ts +4 -0
- package/dist/types/components/Breadcrumbs/Breadcrumbs.types.d.ts +13 -0
- package/dist/types/components/Breadcrumbs/index.d.ts +1 -0
- package/dist/types/components/Button/Button.config.d.ts +2 -0
- package/dist/types/components/Button/Button.d.ts +4 -0
- package/dist/types/components/Button/Button.types.d.ts +13 -0
- package/dist/types/components/Button/index.d.ts +2 -0
- package/dist/types/components/CardColumn/CardColumn.d.ts +5 -0
- package/dist/types/components/CardColumn/CardColumn.types.d.ts +25 -0
- package/dist/types/components/CardColumn/index.d.ts +1 -0
- package/dist/types/components/CardLayout/CardLayout.d.ts +4 -0
- package/dist/types/components/CardLayout/CardLayout.types.d.ts +5 -0
- package/dist/types/components/CardLayout/index.d.ts +1 -0
- package/dist/types/components/CharacterCount/CharacterCount.config.d.ts +2 -0
- package/dist/types/components/CharacterCount/CharacterCount.d.ts +4 -0
- package/dist/types/components/CharacterCount/CharacterCount.types.d.ts +12 -0
- package/dist/types/components/CharacterCount/index.d.ts +1 -0
- package/dist/types/components/Checkboxes/Checkboxes.config.d.ts +1 -0
- package/dist/types/components/Checkboxes/Checkboxes.d.ts +4 -0
- package/dist/types/components/Checkboxes/Checkboxes.types.d.ts +3 -0
- package/dist/types/components/Checkboxes/index.d.ts +2 -0
- package/dist/types/components/CookieBanner/CookieBanner.d.ts +4 -0
- package/dist/types/components/CookieBanner/CookieBanner.types.d.ts +21 -0
- package/dist/types/components/CookieBanner/index.d.ts +1 -0
- package/dist/types/components/DataNavigation/DataNavigation.d.ts +4 -0
- package/dist/types/components/DataNavigation/DataNavigation.types.d.ts +34 -0
- package/dist/types/components/DataNavigation/index.d.ts +1 -0
- package/dist/types/components/DateInput/DateInput.d.ts +4 -0
- package/dist/types/components/DateInput/DateInput.types.d.ts +27 -0
- package/dist/types/components/DateInput/index.d.ts +1 -0
- package/dist/types/components/Details/Details.d.ts +4 -0
- package/dist/types/components/Details/Details.types.d.ts +5 -0
- package/dist/types/components/Details/index.d.ts +1 -0
- package/dist/types/components/DifferenceNavigation/DifferenceNavigation.d.ts +4 -0
- package/dist/types/components/DifferenceNavigation/DifferenceNavigation.types.d.ts +32 -0
- package/dist/types/components/DifferenceNavigation/index.d.ts +1 -0
- package/dist/types/components/ErrorBoundary/ErrorBoundary.d.ts +9 -0
- package/dist/types/components/ErrorBoundary/ErrorBoundary.types.d.ts +11 -0
- package/dist/types/components/ErrorBoundary/index.d.ts +1 -0
- package/dist/types/components/ErrorMessage/ErrorMessage.d.ts +4 -0
- package/dist/types/components/ErrorMessage/ErrorMessage.types.d.ts +6 -0
- package/dist/types/components/ErrorMessage/index.d.ts +1 -0
- package/dist/types/components/ErrorSummary/ErrorSummary.config.d.ts +2 -0
- package/dist/types/components/ErrorSummary/ErrorSummary.d.ts +4 -0
- package/dist/types/components/ErrorSummary/ErrorSummary.types.d.ts +13 -0
- package/dist/types/components/ErrorSummary/index.d.ts +2 -0
- package/dist/types/components/ExitThisPage/ExitThisPage.config.d.ts +1 -0
- package/dist/types/components/ExitThisPage/ExitThisPage.d.ts +4 -0
- package/dist/types/components/ExitThisPage/ExitThisPage.types.d.ts +17 -0
- package/dist/types/components/ExitThisPage/index.d.ts +2 -0
- package/dist/types/components/Fieldset/Fieldset.d.ts +4 -0
- package/dist/types/components/Fieldset/Fieldset.types.d.ts +12 -0
- package/dist/types/components/Fieldset/index.d.ts +1 -0
- package/dist/types/components/FileUpload/FileUpload.d.ts +4 -0
- package/dist/types/components/FileUpload/FileUpload.types.d.ts +13 -0
- package/dist/types/components/FileUpload/index.d.ts +1 -0
- package/dist/types/components/Footer/Footer.d.ts +4 -0
- package/dist/types/components/Footer/Footer.types.d.ts +40 -0
- package/dist/types/components/Footer/index.d.ts +1 -0
- package/dist/types/components/Header/Header.config.d.ts +1 -0
- package/dist/types/components/Header/Header.d.ts +4 -0
- package/dist/types/components/Header/Header.types.d.ts +28 -0
- package/dist/types/components/Header/index.d.ts +2 -0
- package/dist/types/components/Hint/Hint.d.ts +4 -0
- package/dist/types/components/Hint/Hint.types.d.ts +4 -0
- package/dist/types/components/Hint/index.d.ts +1 -0
- package/dist/types/components/Input/Input.d.ts +4 -0
- package/dist/types/components/Input/Input.types.d.ts +17 -0
- package/dist/types/components/Input/index.d.ts +1 -0
- package/dist/types/components/InsetText/InsetText.d.ts +4 -0
- package/dist/types/components/InsetText/InsetText.types.d.ts +4 -0
- package/dist/types/components/InsetText/index.d.ts +1 -0
- package/dist/types/components/Label/Label.d.ts +4 -0
- package/dist/types/components/Label/Label.types.d.ts +6 -0
- package/dist/types/components/Label/index.d.ts +1 -0
- package/dist/types/components/Landing/Landing.d.ts +4 -0
- package/dist/types/components/Landing/Landing.types.d.ts +4 -0
- package/dist/types/components/Landing/index.d.ts +1 -0
- package/dist/types/components/LinkWithRef/LinkWithRef.d.ts +4 -0
- package/dist/types/components/LinkWithRef/LinkWithRef.types.d.ts +9 -0
- package/dist/types/components/LinkWithRef/index.d.ts +1 -0
- package/dist/types/components/Loading/Loading.d.ts +5 -0
- package/dist/types/components/Loading/Loading.types.d.ts +4 -0
- package/dist/types/components/Loading/index.d.ts +1 -0
- package/dist/types/components/Main/Main.d.ts +4 -0
- package/dist/types/components/Main/Main.types.d.ts +5 -0
- package/dist/types/components/Main/index.d.ts +1 -0
- package/dist/types/components/NotFoundPage/NotFoundPage.d.ts +3 -0
- package/dist/types/components/NotFoundPage/index.d.ts +1 -0
- package/dist/types/components/NotificationBanner/NotificationBanner.config.d.ts +2 -0
- package/dist/types/components/NotificationBanner/NotificationBanner.d.ts +4 -0
- package/dist/types/components/NotificationBanner/NotificationBanner.types.d.ts +12 -0
- package/dist/types/components/NotificationBanner/index.d.ts +1 -0
- package/dist/types/components/PDFViewer/ObjectToQueryString.d.ts +1 -0
- package/dist/types/components/PDFViewer/PDFViewer.d.ts +4 -0
- package/dist/types/components/PDFViewer/PDFViewer.types.d.ts +25 -0
- package/dist/types/components/PDFViewer/PDFViewerBackend.d.ts +2 -0
- package/dist/types/components/PDFViewer/ResolvePDFSource.d.ts +27 -0
- package/dist/types/components/PDFViewer/Slugify.d.ts +1 -0
- package/dist/types/components/PDFViewer/index.d.ts +2 -0
- package/dist/types/components/PDFViewer/testutilities/SampleBase64.d.ts +44 -0
- package/dist/types/components/PDFViewerCanvas/PDFViewerCanvas.d.ts +9 -0
- package/dist/types/components/PDFViewerCanvas/PDFViewerCanvas.types.d.ts +38 -0
- package/dist/types/components/PDFViewerCanvas/index.d.ts +1 -0
- package/dist/types/components/Pagination/NavigationButton.d.ts +3 -0
- package/dist/types/components/Pagination/Pagination.d.ts +4 -0
- package/dist/types/components/Pagination/Pagination.types.d.ts +32 -0
- package/dist/types/components/Pagination/SvgIcon.d.ts +3 -0
- package/dist/types/components/Pagination/UsePagination.d.ts +9 -0
- package/dist/types/components/Pagination/index.d.ts +3 -0
- package/dist/types/components/Panel/Panel.d.ts +4 -0
- package/dist/types/components/Panel/Panel.types.d.ts +7 -0
- package/dist/types/components/Panel/index.d.ts +1 -0
- package/dist/types/components/PasswordInput/PasswordInput.config.d.ts +1 -0
- package/dist/types/components/PasswordInput/PasswordInput.d.ts +4 -0
- package/dist/types/components/PasswordInput/PasswordInput.types.d.ts +35 -0
- package/dist/types/components/PasswordInput/index.d.ts +2 -0
- package/dist/types/components/PhaseBanner/PhaseBanner.d.ts +4 -0
- package/dist/types/components/PhaseBanner/PhaseBanner.types.d.ts +6 -0
- package/dist/types/components/PhaseBanner/index.d.ts +1 -0
- package/dist/types/components/ProblemWithService/ProblemWithService.d.ts +4 -0
- package/dist/types/components/ProblemWithService/ProblemWithService.types.d.ts +7 -0
- package/dist/types/components/ProblemWithService/index.d.ts +1 -0
- package/dist/types/components/Radios/Radios.config.d.ts +1 -0
- package/dist/types/components/Radios/Radios.d.ts +4 -0
- package/dist/types/components/Radios/Radios.types.d.ts +7 -0
- package/dist/types/components/Radios/index.d.ts +2 -0
- package/dist/types/components/Select/Select.d.ts +4 -0
- package/dist/types/components/Select/Select.types.d.ts +19 -0
- package/dist/types/components/Select/index.d.ts +1 -0
- package/dist/types/components/ServiceNavigation/ServiceNavigation.d.ts +4 -0
- package/dist/types/components/ServiceNavigation/ServiceNavigation.types.d.ts +21 -0
- package/dist/types/components/ServiceNavigation/index.d.ts +1 -0
- package/dist/types/components/SkipLink/SkipLink.config.d.ts +1 -0
- package/dist/types/components/SkipLink/SkipLink.d.ts +4 -0
- package/dist/types/components/SkipLink/SkipLink.types.d.ts +5 -0
- package/dist/types/components/SkipLink/index.d.ts +2 -0
- package/dist/types/components/SummaryList/SummaryList.d.ts +4 -0
- package/dist/types/components/SummaryList/SummaryList.types.d.ts +22 -0
- package/dist/types/components/SummaryList/index.d.ts +1 -0
- package/dist/types/components/Table/Table.d.ts +4 -0
- package/dist/types/components/Table/Table.types.d.ts +21 -0
- package/dist/types/components/Table/index.d.ts +1 -0
- package/dist/types/components/Tabs/Tabs.config.d.ts +1 -0
- package/dist/types/components/Tabs/Tabs.d.ts +4 -0
- package/dist/types/components/Tabs/Tabs.types.d.ts +14 -0
- package/dist/types/components/Tabs/index.d.ts +2 -0
- package/dist/types/components/Tag/Tag.d.ts +4 -0
- package/dist/types/components/Tag/Tag.types.d.ts +4 -0
- package/dist/types/components/Tag/index.d.ts +1 -0
- package/dist/types/components/TaskList/TaskList.d.ts +4 -0
- package/dist/types/components/TaskList/TaskList.types.d.ts +21 -0
- package/dist/types/components/TaskList/index.d.ts +1 -0
- package/dist/types/components/Textarea/Textarea.d.ts +4 -0
- package/dist/types/components/Textarea/Textarea.types.d.ts +14 -0
- package/dist/types/components/Textarea/index.d.ts +1 -0
- package/dist/types/components/WarningInfo/WarningInfo.d.ts +4 -0
- package/dist/types/components/WarningInfo/WarningInfo.types.d.ts +8 -0
- package/dist/types/components/WarningInfo/index.d.ts +1 -0
- package/dist/types/components/WarningText/WarningText.d.ts +4 -0
- package/dist/types/components/WarningText/WarningText.types.d.ts +4 -0
- package/dist/types/components/WarningText/index.d.ts +1 -0
- package/dist/types/components/common.types.d.ts +10 -0
- package/dist/types/components/index.d.ts +51 -0
- package/dist/types/dynamics/index.d.ts +3 -0
- package/dist/types/dynamics/types.d.ts +37 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/ProcessExampleData.d.ts +3 -0
- package/dist/types/utils/StoriesFromFixtures.d.ts +5 -0
- package/dist/types/utils/TitleCase.d.ts +2 -0
- package/dist/types/utils/WithReference.d.ts +5 -0
- package/dist/types/utils/WithReference.types.d.ts +15 -0
- package/package.json +47 -27
- package/.gitattributes +0 -5
- package/.nvmrc +0 -1
- package/.prettierignore +0 -2
- package/.stylelintrc.json +0 -8
- package/assets/Advance-submodule-behaviours.png +0 -0
- package/assets/logo.png +0 -0
- package/assets/uml-diagram.svg +0 -2745
- package/scripts/generateStories.mjs +0 -451
|
@@ -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 @@
|
|
|
1
|
+
export { default as Boolean } from "./Boolean";
|
|
@@ -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,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,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 @@
|
|
|
1
|
+
export { default as CardLayout } from "./CardLayout";
|
|
@@ -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,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,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,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 @@
|
|
|
1
|
+
export { default as Details } from "./Details";
|
|
@@ -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 @@
|
|
|
1
|
+
export { default as ErrorBoundary } from "./ErrorBoundary";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ErrorMessage } from "./ErrorMessage";
|
|
@@ -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 @@
|
|
|
1
|
+
export declare function ConfigureOverallExitThisPage($scope?: Document | Element): void;
|
|
@@ -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,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,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,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,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
|
+
}
|