@i-dot-ai-npm/component-library-react 0.0.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/package.json +27 -0
- package/src/accordion/Accordion.tsx +31 -0
- package/src/accordion/AccordionSection.tsx +17 -0
- package/src/accordion/AccordionSectionContent.tsx +17 -0
- package/src/accordion/AccordionSectionHeader.tsx +17 -0
- package/src/accordion/AccordionSectionHeading.tsx +19 -0
- package/src/accordion/AccordionSectionSummary.tsx +17 -0
- package/src/back-link/BackLink.tsx +24 -0
- package/src/breadcrumbs/BreadcrumbItem.tsx +20 -0
- package/src/breadcrumbs/Breadcrumbs.tsx +28 -0
- package/src/button/Button.tsx +26 -0
- package/src/button-group/ButtonGroup.tsx +17 -0
- package/src/card/Card.tsx +24 -0
- package/src/card/CardContent.tsx +17 -0
- package/src/card/CardGroup.tsx +17 -0
- package/src/card/CardHeading.tsx +17 -0
- package/src/card/CardIcon.tsx +17 -0
- package/src/card/CardLink.tsx +17 -0
- package/src/character-count/CharacterCount.tsx +14 -0
- package/src/character-count/CharacterCountMessage.tsx +17 -0
- package/src/checkboxes/CheckboxDivider.tsx +17 -0
- package/src/checkboxes/CheckboxInput.tsx +14 -0
- package/src/checkboxes/CheckboxItem.tsx +17 -0
- package/src/checkboxes/CheckboxLabel.tsx +17 -0
- package/src/checkboxes/Checkboxes.tsx +26 -0
- package/src/cookie-banner/CookieBanner.tsx +17 -0
- package/src/cookie-banner/CookieBannerActions.tsx +17 -0
- package/src/cookie-banner/CookieBannerContent.tsx +17 -0
- package/src/cookie-banner/CookieBannerHeading.tsx +17 -0
- package/src/cookie-banner/CookieBannerMessage.tsx +17 -0
- package/src/date-input/DateInput.tsx +17 -0
- package/src/date-input/DateInputField.tsx +21 -0
- package/src/date-input/DateInputItem.tsx +17 -0
- package/src/details/Details.tsx +17 -0
- package/src/details/DetailsSummary.tsx +19 -0
- package/src/details/DetailsText.tsx +17 -0
- package/src/error-message/ErrorMessage.tsx +20 -0
- package/src/error-summary/ErrorSummary.tsx +19 -0
- package/src/error-summary/ErrorSummaryBody.tsx +17 -0
- package/src/error-summary/ErrorSummaryItem.tsx +19 -0
- package/src/error-summary/ErrorSummaryList.tsx +17 -0
- package/src/error-summary/ErrorSummaryTitle.tsx +17 -0
- package/src/fieldset/Fieldset.tsx +17 -0
- package/src/fieldset/FieldsetLegend.tsx +24 -0
- package/src/file-upload/FileUpload.tsx +14 -0
- package/src/form-group/FormGroup.tsx +24 -0
- package/src/header/Header.tsx +24 -0
- package/src/hint/Hint.tsx +17 -0
- package/src/index.ts +110 -0
- package/src/input/Input.tsx +27 -0
- package/src/input-label/InputLabel.tsx +24 -0
- package/src/inset-text/InsetText.tsx +17 -0
- package/src/link/Link.tsx +28 -0
- package/src/list/List.tsx +24 -0
- package/src/list/ListItem.tsx +17 -0
- package/src/notification-banner/NotificationBanner.tsx +23 -0
- package/src/notification-banner/NotificationBannerContent.tsx +17 -0
- package/src/notification-banner/NotificationBannerHeader.tsx +17 -0
- package/src/notification-banner/NotificationBannerHeading.tsx +17 -0
- package/src/notification-banner/NotificationBannerTitle.tsx +17 -0
- package/src/pagination/Pagination.tsx +24 -0
- package/src/pagination/PaginationItem.tsx +26 -0
- package/src/pagination/PaginationList.tsx +17 -0
- package/src/pagination/PaginationNext.tsx +27 -0
- package/src/pagination/PaginationPrev.tsx +27 -0
- package/src/password-input/PasswordInput.tsx +20 -0
- package/src/phase-banner/PhaseBanner.tsx +19 -0
- package/src/radios/RadioDivider.tsx +17 -0
- package/src/radios/RadioInput.tsx +14 -0
- package/src/radios/RadioItem.tsx +17 -0
- package/src/radios/Radios.tsx +26 -0
- package/src/select/Select.tsx +26 -0
- package/src/select/SelectOption.tsx +17 -0
- package/src/service-navigation/ServiceNavigation.tsx +34 -0
- package/src/service-navigation/ServiceNavigationItem.tsx +20 -0
- package/src/side-nav/SideNav.tsx +17 -0
- package/src/side-nav/SideNavItem.tsx +20 -0
- package/src/side-nav/SideNavList.tsx +17 -0
- package/src/side-nav/SideNavSubnavHeading.tsx +17 -0
- package/src/side-nav/SideNavSubnavList.tsx +17 -0
- package/src/side-nav/SideNavTitle.tsx +17 -0
- package/src/skip-link/SkipLink.tsx +17 -0
- package/src/summary-list/SummaryList.tsx +24 -0
- package/src/summary-list/SummaryListActions.tsx +17 -0
- package/src/summary-list/SummaryListKey.tsx +17 -0
- package/src/summary-list/SummaryListRow.tsx +24 -0
- package/src/summary-list/SummaryListValue.tsx +17 -0
- package/src/table/Table.tsx +26 -0
- package/src/table/TableBody.tsx +17 -0
- package/src/table/TableCaption.tsx +24 -0
- package/src/table/TableCell.tsx +24 -0
- package/src/table/TableHead.tsx +17 -0
- package/src/table/TableHeader.tsx +24 -0
- package/src/table/TableRow.tsx +17 -0
- package/src/tabs/Tab.tsx +20 -0
- package/src/tabs/TabPanel.tsx +24 -0
- package/src/tabs/Tabs.tsx +31 -0
- package/src/tabs/TabsList.tsx +17 -0
- package/src/tabs/TabsTitle.tsx +17 -0
- package/src/tag/Tag.tsx +24 -0
- package/src/task-list/TaskList.tsx +17 -0
- package/src/task-list/TaskListHint.tsx +17 -0
- package/src/task-list/TaskListItem.tsx +24 -0
- package/src/task-list/TaskListLink.tsx +17 -0
- package/src/task-list/TaskListNameAndHint.tsx +17 -0
- package/src/task-list/TaskListStatus.tsx +17 -0
- package/src/textarea/Textarea.tsx +23 -0
- package/src/toggle/Toggle.tsx +16 -0
- package/src/toggle/ToggleItem.tsx +17 -0
- package/src/toggle/ToggleLabel.tsx +17 -0
- package/src/warning-text/WarningText.tsx +25 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type DateInputItemProps = {
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function DateInputItem({ class: className, children, ...rest }: DateInputItemProps) {
|
|
10
|
+
const classes = ["govuk-date-input__item", className ?? ""].filter(Boolean).join(" ");
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div className={classes} {...rest}>
|
|
14
|
+
{children ?? ""}
|
|
15
|
+
</div>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type DetailsProps = {
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function Details({ class: className, children, ...rest }: DetailsProps) {
|
|
10
|
+
const classes = ["govuk-details", className ?? ""].filter(Boolean).join(" ");
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<details className={classes} {...rest}>
|
|
14
|
+
{children ?? ""}
|
|
15
|
+
</details>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type DetailsSummaryProps = {
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function DetailsSummary({ class: className, children, ...rest }: DetailsSummaryProps) {
|
|
10
|
+
const classes = ["govuk-details__summary", className ?? ""].filter(Boolean).join(" ");
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<summary className={classes} {...rest}>
|
|
14
|
+
<span className="govuk-details__summary-text">
|
|
15
|
+
{children ?? ""}
|
|
16
|
+
</span>
|
|
17
|
+
</summary>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type DetailsTextProps = {
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function DetailsText({ class: className, children, ...rest }: DetailsTextProps) {
|
|
10
|
+
const classes = ["govuk-details__text", className ?? ""].filter(Boolean).join(" ");
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div className={classes} {...rest}>
|
|
14
|
+
{children ?? ""}
|
|
15
|
+
</div>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type ErrorMessageProps = {
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function ErrorMessage({ class: className, children, ...rest }: ErrorMessageProps) {
|
|
10
|
+
const classes = ["govuk-error-message", className ?? ""].filter(Boolean).join(" ");
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<p className={classes} {...rest}>
|
|
14
|
+
<span className="govuk-visually-hidden">
|
|
15
|
+
Error:
|
|
16
|
+
</span>
|
|
17
|
+
{children ?? ""}
|
|
18
|
+
</p>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type ErrorSummaryProps = {
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function ErrorSummary({ class: className, children, ...rest }: ErrorSummaryProps) {
|
|
10
|
+
const classes = ["govuk-error-summary", className ?? ""].filter(Boolean).join(" ");
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div className={classes} data-module="govuk-error-summary" {...rest}>
|
|
14
|
+
<div role="alert">
|
|
15
|
+
{children ?? ""}
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type ErrorSummaryBodyProps = {
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function ErrorSummaryBody({ class: className, children, ...rest }: ErrorSummaryBodyProps) {
|
|
10
|
+
const classes = ["govuk-error-summary__body", className ?? ""].filter(Boolean).join(" ");
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div className={classes} {...rest}>
|
|
14
|
+
{children ?? ""}
|
|
15
|
+
</div>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type ErrorSummaryItemProps = {
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function ErrorSummaryItem({ class: className, children, ...rest }: ErrorSummaryItemProps) {
|
|
10
|
+
const classes = ["", className ?? ""].filter(Boolean).join(" ");
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<li>
|
|
14
|
+
<a className={classes} {...rest}>
|
|
15
|
+
{children ?? ""}
|
|
16
|
+
</a>
|
|
17
|
+
</li>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type ErrorSummaryListProps = {
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function ErrorSummaryList({ class: className, children, ...rest }: ErrorSummaryListProps) {
|
|
10
|
+
const classes = ["govuk-list govuk-error-summary__list", className ?? ""].filter(Boolean).join(" ");
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<ul className={classes} {...rest}>
|
|
14
|
+
{children ?? ""}
|
|
15
|
+
</ul>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type ErrorSummaryTitleProps = {
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function ErrorSummaryTitle({ class: className, children, ...rest }: ErrorSummaryTitleProps) {
|
|
10
|
+
const classes = ["govuk-error-summary__title", className ?? ""].filter(Boolean).join(" ");
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<h2 className={classes} {...rest}>
|
|
14
|
+
{children ?? ""}
|
|
15
|
+
</h2>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type FieldsetProps = {
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function Fieldset({ class: className, children, ...rest }: FieldsetProps) {
|
|
10
|
+
const classes = ["govuk-fieldset", className ?? ""].filter(Boolean).join(" ");
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<fieldset className={classes} {...rest}>
|
|
14
|
+
{children ?? ""}
|
|
15
|
+
</fieldset>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type FieldsetLegendProps = {
|
|
4
|
+
size?: "small" | "medium" | "large" | "xl";
|
|
5
|
+
class?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default function FieldsetLegend({ size, class: className, children, ...rest }: FieldsetLegendProps) {
|
|
11
|
+
const classes = [
|
|
12
|
+
"govuk-fieldset__legend",
|
|
13
|
+
({ "small": "govuk-fieldset__legend--s", "medium": "govuk-fieldset__legend--m", "large": "govuk-fieldset__legend--l", "xl": "govuk-fieldset__legend--xl" }[size] ?? ""),
|
|
14
|
+
className ?? "",
|
|
15
|
+
]
|
|
16
|
+
.filter(Boolean)
|
|
17
|
+
.join(" ");
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<legend className={classes} {...rest}>
|
|
21
|
+
{children ?? ""}
|
|
22
|
+
</legend>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type FileUploadProps = {
|
|
4
|
+
class?: string;
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export default function FileUpload({ class: className, ...rest }: FileUploadProps) {
|
|
9
|
+
const classes = ["govuk-file-upload", className ?? ""].filter(Boolean).join(" ");
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<input className={classes} type="file" {...rest} />
|
|
13
|
+
);
|
|
14
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type FormGroupProps = {
|
|
4
|
+
inline?: boolean;
|
|
5
|
+
class?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default function FormGroup({ inline, class: className, children, ...rest }: FormGroupProps) {
|
|
11
|
+
const classes = [
|
|
12
|
+
"govuk-form-group",
|
|
13
|
+
inline ? "govuk-form-group--inline" : "",
|
|
14
|
+
className ?? "",
|
|
15
|
+
]
|
|
16
|
+
.filter(Boolean)
|
|
17
|
+
.join(" ");
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<div className={classes} {...rest}>
|
|
21
|
+
{children ?? ""}
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type HeaderProps = {
|
|
4
|
+
href?: string;
|
|
5
|
+
class?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default function Header({ href, class: className, children, ...rest }: HeaderProps) {
|
|
11
|
+
const classes = ["govuk-generic-header", className ?? ""].filter(Boolean).join(" ");
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<div className={classes} {...rest}>
|
|
15
|
+
<div className="govuk-generic-header__container govuk-width-container">
|
|
16
|
+
<div className="govuk-generic-header__logo">
|
|
17
|
+
<a className="govuk-generic-header__homepage-link" href={href}>
|
|
18
|
+
{children ?? ""}
|
|
19
|
+
</a>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type HintProps = {
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function Hint({ class: className, children, ...rest }: HintProps) {
|
|
10
|
+
const classes = ["govuk-hint", className ?? ""].filter(Boolean).join(" ");
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div className={classes} {...rest}>
|
|
14
|
+
{children ?? ""}
|
|
15
|
+
</div>
|
|
16
|
+
);
|
|
17
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// AUTO-GENERATED barrel. Do not edit by hand.
|
|
2
|
+
export { default as AccordionSectionContent } from "./accordion/AccordionSectionContent";
|
|
3
|
+
export { default as AccordionSectionHeader } from "./accordion/AccordionSectionHeader";
|
|
4
|
+
export { default as AccordionSectionHeading } from "./accordion/AccordionSectionHeading";
|
|
5
|
+
export { default as AccordionSectionSummary } from "./accordion/AccordionSectionSummary";
|
|
6
|
+
export { default as AccordionSection } from "./accordion/AccordionSection";
|
|
7
|
+
export { default as Accordion } from "./accordion/Accordion";
|
|
8
|
+
export { default as BackLink } from "./back-link/BackLink";
|
|
9
|
+
export { default as BreadcrumbItem } from "./breadcrumbs/BreadcrumbItem";
|
|
10
|
+
export { default as Breadcrumbs } from "./breadcrumbs/Breadcrumbs";
|
|
11
|
+
export { default as Button } from "./button/Button";
|
|
12
|
+
export { default as ButtonGroup } from "./button-group/ButtonGroup";
|
|
13
|
+
export { default as CardContent } from "./card/CardContent";
|
|
14
|
+
export { default as CardGroup } from "./card/CardGroup";
|
|
15
|
+
export { default as CardHeading } from "./card/CardHeading";
|
|
16
|
+
export { default as CardIcon } from "./card/CardIcon";
|
|
17
|
+
export { default as CardLink } from "./card/CardLink";
|
|
18
|
+
export { default as Card } from "./card/Card";
|
|
19
|
+
export { default as CharacterCountMessage } from "./character-count/CharacterCountMessage";
|
|
20
|
+
export { default as CharacterCount } from "./character-count/CharacterCount";
|
|
21
|
+
export { default as CheckboxDivider } from "./checkboxes/CheckboxDivider";
|
|
22
|
+
export { default as CheckboxInput } from "./checkboxes/CheckboxInput";
|
|
23
|
+
export { default as CheckboxItem } from "./checkboxes/CheckboxItem";
|
|
24
|
+
export { default as CheckboxLabel } from "./checkboxes/CheckboxLabel";
|
|
25
|
+
export { default as Checkboxes } from "./checkboxes/Checkboxes";
|
|
26
|
+
export { default as CookieBannerActions } from "./cookie-banner/CookieBannerActions";
|
|
27
|
+
export { default as CookieBannerContent } from "./cookie-banner/CookieBannerContent";
|
|
28
|
+
export { default as CookieBannerHeading } from "./cookie-banner/CookieBannerHeading";
|
|
29
|
+
export { default as CookieBannerMessage } from "./cookie-banner/CookieBannerMessage";
|
|
30
|
+
export { default as CookieBanner } from "./cookie-banner/CookieBanner";
|
|
31
|
+
export { default as DateInputField } from "./date-input/DateInputField";
|
|
32
|
+
export { default as DateInputItem } from "./date-input/DateInputItem";
|
|
33
|
+
export { default as DateInput } from "./date-input/DateInput";
|
|
34
|
+
export { default as DetailsSummary } from "./details/DetailsSummary";
|
|
35
|
+
export { default as DetailsText } from "./details/DetailsText";
|
|
36
|
+
export { default as Details } from "./details/Details";
|
|
37
|
+
export { default as ErrorMessage } from "./error-message/ErrorMessage";
|
|
38
|
+
export { default as ErrorSummaryBody } from "./error-summary/ErrorSummaryBody";
|
|
39
|
+
export { default as ErrorSummaryItem } from "./error-summary/ErrorSummaryItem";
|
|
40
|
+
export { default as ErrorSummaryList } from "./error-summary/ErrorSummaryList";
|
|
41
|
+
export { default as ErrorSummaryTitle } from "./error-summary/ErrorSummaryTitle";
|
|
42
|
+
export { default as ErrorSummary } from "./error-summary/ErrorSummary";
|
|
43
|
+
export { default as FieldsetLegend } from "./fieldset/FieldsetLegend";
|
|
44
|
+
export { default as Fieldset } from "./fieldset/Fieldset";
|
|
45
|
+
export { default as FileUpload } from "./file-upload/FileUpload";
|
|
46
|
+
export { default as FormGroup } from "./form-group/FormGroup";
|
|
47
|
+
export { default as Header } from "./header/Header";
|
|
48
|
+
export { default as Hint } from "./hint/Hint";
|
|
49
|
+
export { default as Input } from "./input/Input";
|
|
50
|
+
export { default as InputLabel } from "./input-label/InputLabel";
|
|
51
|
+
export { default as InsetText } from "./inset-text/InsetText";
|
|
52
|
+
export { default as Link } from "./link/Link";
|
|
53
|
+
export { default as ListItem } from "./list/ListItem";
|
|
54
|
+
export { default as List } from "./list/List";
|
|
55
|
+
export { default as NotificationBannerContent } from "./notification-banner/NotificationBannerContent";
|
|
56
|
+
export { default as NotificationBannerHeader } from "./notification-banner/NotificationBannerHeader";
|
|
57
|
+
export { default as NotificationBannerHeading } from "./notification-banner/NotificationBannerHeading";
|
|
58
|
+
export { default as NotificationBannerTitle } from "./notification-banner/NotificationBannerTitle";
|
|
59
|
+
export { default as NotificationBanner } from "./notification-banner/NotificationBanner";
|
|
60
|
+
export { default as PaginationItem } from "./pagination/PaginationItem";
|
|
61
|
+
export { default as PaginationList } from "./pagination/PaginationList";
|
|
62
|
+
export { default as PaginationNext } from "./pagination/PaginationNext";
|
|
63
|
+
export { default as PaginationPrev } from "./pagination/PaginationPrev";
|
|
64
|
+
export { default as Pagination } from "./pagination/Pagination";
|
|
65
|
+
export { default as PasswordInput } from "./password-input/PasswordInput";
|
|
66
|
+
export { default as PhaseBanner } from "./phase-banner/PhaseBanner";
|
|
67
|
+
export { default as RadioDivider } from "./radios/RadioDivider";
|
|
68
|
+
export { default as RadioInput } from "./radios/RadioInput";
|
|
69
|
+
export { default as RadioItem } from "./radios/RadioItem";
|
|
70
|
+
export { default as Radios } from "./radios/Radios";
|
|
71
|
+
export { default as SelectOption } from "./select/SelectOption";
|
|
72
|
+
export { default as Select } from "./select/Select";
|
|
73
|
+
export { default as ServiceNavigationItem } from "./service-navigation/ServiceNavigationItem";
|
|
74
|
+
export { default as ServiceNavigation } from "./service-navigation/ServiceNavigation";
|
|
75
|
+
export { default as SideNavItem } from "./side-nav/SideNavItem";
|
|
76
|
+
export { default as SideNavList } from "./side-nav/SideNavList";
|
|
77
|
+
export { default as SideNavSubnavHeading } from "./side-nav/SideNavSubnavHeading";
|
|
78
|
+
export { default as SideNavSubnavList } from "./side-nav/SideNavSubnavList";
|
|
79
|
+
export { default as SideNavTitle } from "./side-nav/SideNavTitle";
|
|
80
|
+
export { default as SideNav } from "./side-nav/SideNav";
|
|
81
|
+
export { default as SkipLink } from "./skip-link/SkipLink";
|
|
82
|
+
export { default as SummaryListActions } from "./summary-list/SummaryListActions";
|
|
83
|
+
export { default as SummaryListKey } from "./summary-list/SummaryListKey";
|
|
84
|
+
export { default as SummaryListRow } from "./summary-list/SummaryListRow";
|
|
85
|
+
export { default as SummaryListValue } from "./summary-list/SummaryListValue";
|
|
86
|
+
export { default as SummaryList } from "./summary-list/SummaryList";
|
|
87
|
+
export { default as TableBody } from "./table/TableBody";
|
|
88
|
+
export { default as TableCaption } from "./table/TableCaption";
|
|
89
|
+
export { default as TableCell } from "./table/TableCell";
|
|
90
|
+
export { default as TableHead } from "./table/TableHead";
|
|
91
|
+
export { default as TableHeader } from "./table/TableHeader";
|
|
92
|
+
export { default as TableRow } from "./table/TableRow";
|
|
93
|
+
export { default as Table } from "./table/Table";
|
|
94
|
+
export { default as TabPanel } from "./tabs/TabPanel";
|
|
95
|
+
export { default as Tab } from "./tabs/Tab";
|
|
96
|
+
export { default as TabsList } from "./tabs/TabsList";
|
|
97
|
+
export { default as TabsTitle } from "./tabs/TabsTitle";
|
|
98
|
+
export { default as Tabs } from "./tabs/Tabs";
|
|
99
|
+
export { default as Tag } from "./tag/Tag";
|
|
100
|
+
export { default as TaskListHint } from "./task-list/TaskListHint";
|
|
101
|
+
export { default as TaskListItem } from "./task-list/TaskListItem";
|
|
102
|
+
export { default as TaskListLink } from "./task-list/TaskListLink";
|
|
103
|
+
export { default as TaskListNameAndHint } from "./task-list/TaskListNameAndHint";
|
|
104
|
+
export { default as TaskListStatus } from "./task-list/TaskListStatus";
|
|
105
|
+
export { default as TaskList } from "./task-list/TaskList";
|
|
106
|
+
export { default as Textarea } from "./textarea/Textarea";
|
|
107
|
+
export { default as ToggleItem } from "./toggle/ToggleItem";
|
|
108
|
+
export { default as ToggleLabel } from "./toggle/ToggleLabel";
|
|
109
|
+
export { default as Toggle } from "./toggle/Toggle";
|
|
110
|
+
export { default as WarningText } from "./warning-text/WarningText";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type InputProps = {
|
|
4
|
+
error?: boolean;
|
|
5
|
+
extraLetterSpacing?: boolean;
|
|
6
|
+
subtle?: boolean;
|
|
7
|
+
width?: "2" | "3" | "4" | "5" | "10" | "20" | "30";
|
|
8
|
+
class?: string;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default function Input({ error, extraLetterSpacing, subtle, width, class: className, ...rest }: InputProps) {
|
|
13
|
+
const classes = [
|
|
14
|
+
"govuk-input",
|
|
15
|
+
error ? "govuk-input--error" : "",
|
|
16
|
+
extraLetterSpacing ? "govuk-input--extra-letter-spacing" : "",
|
|
17
|
+
subtle ? "govuk-input--subtle" : "",
|
|
18
|
+
({ "2": "govuk-input--width-2", "3": "govuk-input--width-3", "4": "govuk-input--width-4", "5": "govuk-input--width-5", "10": "govuk-input--width-10", "20": "govuk-input--width-20", "30": "govuk-input--width-30" }[width] ?? ""),
|
|
19
|
+
className ?? "",
|
|
20
|
+
]
|
|
21
|
+
.filter(Boolean)
|
|
22
|
+
.join(" ");
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<input className={classes} type="text" {...rest} />
|
|
26
|
+
);
|
|
27
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type InputLabelProps = {
|
|
4
|
+
size?: "small" | "medium" | "large" | "xl";
|
|
5
|
+
class?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default function InputLabel({ size, class: className, children, ...rest }: InputLabelProps) {
|
|
11
|
+
const classes = [
|
|
12
|
+
"govuk-label",
|
|
13
|
+
({ "small": "govuk-label--s", "medium": "govuk-label--m", "large": "govuk-label--l", "xl": "govuk-label--xl" }[size] ?? ""),
|
|
14
|
+
className ?? "",
|
|
15
|
+
]
|
|
16
|
+
.filter(Boolean)
|
|
17
|
+
.join(" ");
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<label className={classes} {...rest}>
|
|
21
|
+
{children ?? ""}
|
|
22
|
+
</label>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type InsetTextProps = {
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function InsetText({ class: className, children, ...rest }: InsetTextProps) {
|
|
10
|
+
const classes = ["govuk-inset-text", className ?? ""].filter(Boolean).join(" ");
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div className={classes} {...rest}>
|
|
14
|
+
{children ?? ""}
|
|
15
|
+
</div>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type LinkProps = {
|
|
4
|
+
noUnderline?: boolean;
|
|
5
|
+
noVisitedState?: boolean;
|
|
6
|
+
variant?: "warning" | "inverse";
|
|
7
|
+
class?: string;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default function Link({ noUnderline, noVisitedState, variant, class: className, children, ...rest }: LinkProps) {
|
|
13
|
+
const classes = [
|
|
14
|
+
"govuk-link",
|
|
15
|
+
noUnderline ? "govuk-link--no-underline" : "",
|
|
16
|
+
noVisitedState ? "govuk-link--no-visited-state" : "",
|
|
17
|
+
({ "warning": "govuk-link--warning", "inverse": "govuk-link--inverse" }[variant] ?? ""),
|
|
18
|
+
className ?? "",
|
|
19
|
+
]
|
|
20
|
+
.filter(Boolean)
|
|
21
|
+
.join(" ");
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<a className={classes} {...rest}>
|
|
25
|
+
{children ?? ""}
|
|
26
|
+
</a>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type ListProps = {
|
|
4
|
+
spaced?: boolean;
|
|
5
|
+
numbered?: string;
|
|
6
|
+
class?: string;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default function List({ spaced, numbered, class: className, children, ...rest }: ListProps) {
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
numbered ? (
|
|
15
|
+
<ol className={["govuk-list govuk-list--number", spaced ? "govuk-list--spaced" : "", className ?? ""].filter(Boolean).join(" ")} {...rest}>
|
|
16
|
+
{children ?? ""}
|
|
17
|
+
</ol>
|
|
18
|
+
) : (
|
|
19
|
+
<ul className={["govuk-list", spaced ? "govuk-list--spaced" : "", className ?? ""].filter(Boolean).join(" ")} {...rest}>
|
|
20
|
+
{children ?? ""}
|
|
21
|
+
</ul>
|
|
22
|
+
)
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type ListItemProps = {
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function ListItem({ class: className, children, ...rest }: ListItemProps) {
|
|
10
|
+
const classes = ["govuk-list-item", className ?? ""].filter(Boolean).join(" ");
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<li className={classes} {...rest}>
|
|
14
|
+
{children ?? ""}
|
|
15
|
+
</li>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type NotificationBannerProps = {
|
|
4
|
+
success?: string;
|
|
5
|
+
class?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default function NotificationBanner({ success, class: className, children, ...rest }: NotificationBannerProps) {
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
success ? (
|
|
14
|
+
<div className={["govuk-notification-banner govuk-notification-banner--success", className ?? ""].filter(Boolean).join(" ")} role="alert" aria-labelledby="govuk-notification-banner-title" data-module="govuk-notification-banner" {...rest}>
|
|
15
|
+
{children ?? ""}
|
|
16
|
+
</div>
|
|
17
|
+
) : (
|
|
18
|
+
<div className={["govuk-notification-banner", className ?? ""].filter(Boolean).join(" ")} role="region" aria-labelledby="govuk-notification-banner-title" data-module="govuk-notification-banner" {...rest}>
|
|
19
|
+
{children ?? ""}
|
|
20
|
+
</div>
|
|
21
|
+
)
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type NotificationBannerContentProps = {
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function NotificationBannerContent({ class: className, children, ...rest }: NotificationBannerContentProps) {
|
|
10
|
+
const classes = ["govuk-notification-banner__content", className ?? ""].filter(Boolean).join(" ");
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div className={classes} {...rest}>
|
|
14
|
+
{children ?? ""}
|
|
15
|
+
</div>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type NotificationBannerHeaderProps = {
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function NotificationBannerHeader({ class: className, children, ...rest }: NotificationBannerHeaderProps) {
|
|
10
|
+
const classes = ["govuk-notification-banner__header", className ?? ""].filter(Boolean).join(" ");
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<div className={classes} {...rest}>
|
|
14
|
+
{children ?? ""}
|
|
15
|
+
</div>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// AUTO-GENERATED from HTML spec. Do not edit by hand.
|
|
2
|
+
|
|
3
|
+
type NotificationBannerHeadingProps = {
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default function NotificationBannerHeading({ class: className, children, ...rest }: NotificationBannerHeadingProps) {
|
|
10
|
+
const classes = ["govuk-notification-banner__heading", className ?? ""].filter(Boolean).join(" ");
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<p className={classes} {...rest}>
|
|
14
|
+
{children ?? ""}
|
|
15
|
+
</p>
|
|
16
|
+
);
|
|
17
|
+
}
|